eddyter 1.3.36 → 1.3.37

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 (234) hide show
  1. package/README.md +444 -444
  2. package/dist/App.d.ts +2 -3
  3. package/dist/Provider/EditorProvider.d.ts +26 -27
  4. package/dist/Provider/LexicalProvider.d.ts +5 -6
  5. package/dist/api/ai/index.d.ts +31 -31
  6. package/dist/api/auth.d.ts +108 -108
  7. package/dist/api/config/axios.d.ts +1 -2
  8. package/dist/api/config/endpoints.d.ts +22 -22
  9. package/dist/api/featureSuggestion.d.ts +23 -23
  10. package/dist/api/linkPreview.d.ts +15 -15
  11. package/dist/api/transcript/index.d.ts +21 -21
  12. package/dist/assets/style.css +5401 -5400
  13. package/dist/{babel-d155920e.js → babel-d3085146.js} +3565 -3292
  14. package/dist/babel-d3085146.js.map +1 -0
  15. package/dist/components/AiPlugin/index.d.ts +6 -6
  16. package/dist/components/AlignMenu/AlignMenu.d.ts +8 -9
  17. package/dist/components/AlignMenu/AlignMenuDrop.d.ts +2 -3
  18. package/dist/components/AlignMenu/index.d.ts +1 -1
  19. package/dist/components/AutoExpandingDemo.d.ts +5 -6
  20. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +2 -3
  21. package/dist/components/BlockFormatMenu/constants.d.ts +14 -14
  22. package/dist/components/BlockFormatMenu/index.d.ts +1 -1
  23. package/dist/components/ChartEditDialog.d.ts +8 -9
  24. package/dist/components/ChartInsertDialog.d.ts +7 -8
  25. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +6 -7
  26. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +8 -9
  27. package/dist/components/CodeActionMenuPlugin/index.d.ts +4 -5
  28. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
  29. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -3
  30. package/dist/components/ColorPicker/index.d.ts +1 -1
  31. package/dist/components/CommentSidebar/CommentSidebar.d.ts +7 -8
  32. package/dist/components/CommentSidebar/index.d.ts +1 -1
  33. package/dist/components/CommentToggle/CommentToggle.d.ts +7 -8
  34. package/dist/components/CommentToggle/index.d.ts +1 -1
  35. package/dist/components/CommentView/CommentView.d.ts +8 -9
  36. package/dist/components/CommentView/index.d.ts +1 -1
  37. package/dist/components/ConfigurableEditorWithAuth.d.ts +22 -23
  38. package/dist/components/DatePicker/DatePickerWidget.d.ts +6 -7
  39. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +2 -3
  40. package/dist/components/EmojiPickerWidget/index.d.ts +1 -1
  41. package/dist/components/FeatureSuggestionDialog/index.d.ts +6 -6
  42. package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -7
  43. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +4 -5
  44. package/dist/components/FileView/index.d.ts +8 -9
  45. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +6 -7
  46. package/dist/components/FontSizePicker/FontSizeControl.d.ts +2 -3
  47. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +2 -3
  48. package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +2 -3
  49. package/dist/components/FormatTextMenu/index.d.ts +1 -1
  50. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +6 -7
  51. package/dist/components/HtmlViewDisplay.d.ts +2 -3
  52. package/dist/components/ImageComparisonDialog/index.d.ts +10 -11
  53. package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +10 -11
  54. package/dist/components/ImageGenerationDialog/index.d.ts +10 -11
  55. package/dist/components/ImageInsertTest.d.ts +2 -3
  56. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +8 -9
  57. package/dist/components/ImageView/ImageDialog/index.d.ts +5 -6
  58. package/dist/components/ImageView/ImageResizer.d.ts +15 -16
  59. package/dist/components/ImageView/index.d.ts +16 -17
  60. package/dist/components/InsertMenu/InsertMenu.d.ts +8 -9
  61. package/dist/components/InsertMenu/InsertMenuDrop.d.ts +8 -9
  62. package/dist/components/InsertMenu/index.d.ts +1 -1
  63. package/dist/components/LanguageSelectorDialog/index.d.ts +7 -8
  64. package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +5 -6
  65. package/dist/components/NotePanelMenu/index.d.ts +1 -1
  66. package/dist/components/NotePanelView/NotePanelView.d.ts +8 -9
  67. package/dist/components/NotePanelView/index.d.ts +1 -1
  68. package/dist/components/Placeholder/Placeholder.d.ts +2 -3
  69. package/dist/components/Placeholder/index.d.ts +1 -1
  70. package/dist/components/Placeholder/styles.d.ts +1 -1
  71. package/dist/components/ScopedEditor.d.ts +8 -8
  72. package/dist/components/SignatureCaption/index.d.ts +5 -6
  73. package/dist/components/TableColorPicker/index.d.ts +7 -8
  74. package/dist/components/TableModal/TableModal.d.ts +9 -10
  75. package/dist/components/TextEnhanceDialog/index.d.ts +9 -10
  76. package/dist/components/ToneAdjustDialog/index.d.ts +7 -8
  77. package/dist/components/Toolbar/Toolbar.d.ts +2 -3
  78. package/dist/components/Toolbar/index.d.ts +1 -1
  79. package/dist/components/Toolbar/styles.d.ts +6 -6
  80. package/dist/components/VoiceTranscriptIcon/VoiceTranscriptIcon.d.ts +1 -2
  81. package/dist/components/VoiceTranscriptIcon/index.d.ts +1 -1
  82. package/dist/components/ui/avatar.d.ts +6 -6
  83. package/dist/components/ui/badge.d.ts +8 -9
  84. package/dist/components/ui/button.d.ts +10 -11
  85. package/dist/components/ui/calendar.d.ts +7 -8
  86. package/dist/components/ui/card.d.ts +8 -8
  87. package/dist/components/ui/checkbox.d.ts +4 -4
  88. package/dist/components/ui/dialog.d.ts +19 -19
  89. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  90. package/dist/components/ui/input.d.ts +3 -3
  91. package/dist/components/ui/label.d.ts +4 -4
  92. package/dist/components/ui/popover.d.ts +7 -7
  93. package/dist/components/ui/select.d.ts +13 -13
  94. package/dist/components/ui/separator.d.ts +4 -4
  95. package/dist/components/ui/sheet.d.ts +24 -24
  96. package/dist/components/ui/skeleton.d.ts +3 -3
  97. package/dist/components/ui/tabs.d.ts +7 -7
  98. package/dist/components/ui/textarea.d.ts +3 -3
  99. package/dist/components/ui/tooltip.d.ts +7 -7
  100. package/dist/constants.d.ts +21 -22
  101. package/dist/context/CommentContext.d.ts +42 -43
  102. package/dist/context/HtmlViewContext.d.ts +16 -17
  103. package/dist/context/ToolbarContext.d.ts +55 -56
  104. package/dist/editorConfig.d.ts +48 -48
  105. package/dist/{estree-b1fff53b.js → estree-164983f6.js} +1763 -1778
  106. package/dist/estree-164983f6.js.map +1 -0
  107. package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
  108. package/dist/hooks/useBlockFormat.d.ts +16 -17
  109. package/dist/hooks/useColorPicker.d.ts +6 -6
  110. package/dist/hooks/useCustomCommands.d.ts +2 -3
  111. package/dist/hooks/useDebounce.d.ts +1 -1
  112. package/dist/hooks/useEditorToolbar.d.ts +9 -10
  113. package/dist/hooks/useInsertMenu.d.ts +9 -9
  114. package/dist/hooks/useModal.d.ts +5 -5
  115. package/dist/hooks/useReactNativeBridge.d.ts +54 -54
  116. package/dist/hooks/useS3Uploader.d.ts +11 -11
  117. package/dist/hooks/useVoiceToText.d.ts +20 -20
  118. package/dist/{html-f95ee5dc.js → html-5586dbf6.js} +701 -656
  119. package/dist/html-5586dbf6.js.map +1 -0
  120. package/dist/{html2pdf.bundle-2195a04c.js → html2pdf.bundle-d4225b87.js} +2 -2
  121. package/dist/html2pdf.bundle-d4225b87.js.map +1 -0
  122. package/dist/{html2pdf.bundle.min-e3118523.js → html2pdf.bundle.min-4f1c3930.js} +2 -2
  123. package/dist/html2pdf.bundle.min-4f1c3930.js.map +1 -0
  124. package/dist/{index-08c4c610.js → index-35336e5d.js} +2 -2
  125. package/dist/index-35336e5d.js.map +1 -0
  126. package/dist/{index-455942f2.js → index-6717344b.js} +901 -351
  127. package/dist/index-6717344b.js.map +1 -0
  128. package/dist/{index-acc78985.js → index-da40f793.js} +2 -2
  129. package/dist/index-da40f793.js.map +1 -0
  130. package/dist/index.d.ts +10 -10
  131. package/dist/index.js +1 -1
  132. package/dist/lib/utils.d.ts +1 -2
  133. package/dist/main.d.ts +0 -1
  134. package/dist/{markdown-1d9e6c3f.js → markdown-d513479b.js} +1836 -1789
  135. package/dist/markdown-d513479b.js.map +1 -0
  136. package/dist/nodes/ChartNode.d.ts +40 -41
  137. package/dist/nodes/CommentNode.d.ts +33 -34
  138. package/dist/nodes/CommentedTextNode.d.ts +28 -29
  139. package/dist/nodes/EmbedNode.d.ts +31 -32
  140. package/dist/nodes/FileNode.d.ts +31 -32
  141. package/dist/nodes/ImageNode.d.ts +64 -65
  142. package/dist/nodes/MentionNode.d.ts +74 -75
  143. package/dist/nodes/NotePanelNode.d.ts +30 -31
  144. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +24 -25
  145. package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
  146. package/dist/pages/NotFound.d.ts +2 -2
  147. package/dist/pages/RichTextEditor.d.ts +6 -6
  148. package/dist/pages/TextareaEditor.d.ts +6 -6
  149. package/dist/pages/styles.d.ts +5 -5
  150. package/dist/plugins/AIChatPlugin.d.ts +10 -11
  151. package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
  152. package/dist/plugins/AutocompletePlugin.d.ts +22 -22
  153. package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
  154. package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
  155. package/dist/plugins/CodeHighlightPlugin.d.ts +2 -3
  156. package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +20 -21
  157. package/dist/plugins/CommentBubblePlugin.d.ts +2 -3
  158. package/dist/plugins/CommentPlugin.d.ts +6 -7
  159. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +28 -29
  160. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
  161. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +6 -7
  162. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
  163. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
  164. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +3 -4
  165. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +5 -6
  166. package/dist/plugins/FilePlugin.d.ts +7 -8
  167. package/dist/plugins/FloatingEnhanceButton/index.d.ts +3 -4
  168. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +5 -6
  169. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +26 -27
  170. package/dist/plugins/GrammarCheckPlugin.d.ts +1 -2
  171. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
  172. package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
  173. package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
  174. package/dist/plugins/ImagePlugin.d.ts +6 -7
  175. package/dist/plugins/LinkPlugin/index.d.ts +5 -6
  176. package/dist/plugins/LinkPreviewPlugin/index.d.ts +4 -4
  177. package/dist/plugins/LocalStoragePlugin.d.ts +6 -7
  178. package/dist/plugins/MarkdownShortcutsPlugin/index.d.ts +20 -20
  179. package/dist/plugins/MentionsPlugin/index.d.ts +6 -7
  180. package/dist/plugins/NotePanelPlugin.d.ts +6 -7
  181. package/dist/plugins/PasteOptionsPlugin/index.d.ts +17 -17
  182. package/dist/plugins/RichTextPastePlugin/index.d.ts +5 -6
  183. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +5 -6
  184. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
  185. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
  186. package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
  187. package/dist/plugins/TableActionMenuPlugin/index.d.ts +5 -6
  188. package/dist/plugins/TableCellResizer/index.d.ts +1 -2
  189. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
  190. package/dist/plugins/TablePlugin.d.ts +4 -5
  191. package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
  192. package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
  193. package/dist/plugins/TreeViewPlugin.d.ts +2 -3
  194. package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
  195. package/dist/plugins/VoiceTranscriptPlugin.d.ts +22 -22
  196. package/dist/plugins/WordCountPlugin.d.ts +2 -3
  197. package/dist/{postcss-c2592f3f.js → postcss-f084f74d.js} +1378 -1357
  198. package/dist/postcss-f084f74d.js.map +1 -0
  199. package/dist/standalone-5a8c6b7e.js +2518 -0
  200. package/dist/standalone-5a8c6b7e.js.map +1 -0
  201. package/dist/styles/PlaygroundEditorTheme.d.ts +2 -3
  202. package/dist/types.d.ts +149 -150
  203. package/dist/typescript-b1005db4.js +13705 -0
  204. package/dist/typescript-b1005db4.js.map +1 -0
  205. package/dist/ui/ColorPicker.d.ts +13 -14
  206. package/dist/ui/Icons.d.ts +48 -48
  207. package/dist/ui/TextInput.d.ts +10 -11
  208. package/dist/utils/dateFormats.d.ts +33 -33
  209. package/dist/utils/debounce.d.ts +5 -6
  210. package/dist/utils/editorStyleConverter.d.ts +16 -17
  211. package/dist/utils/export.d.ts +1 -2
  212. package/dist/utils/getDOMRangeRect.d.ts +13 -13
  213. package/dist/utils/getSelectedNode.d.ts +2 -3
  214. package/dist/utils/helper.d.ts +3 -3
  215. package/dist/utils/index.d.ts +3 -4
  216. package/dist/utils/invarient.d.ts +1 -1
  217. package/dist/utils/setFloatingElemPosition.d.ts +8 -8
  218. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
  219. package/dist/utils/url.d.ts +9 -9
  220. package/package.json +149 -149
  221. package/dist/babel-d155920e.js.map +0 -1
  222. package/dist/estree-b1fff53b.js.map +0 -1
  223. package/dist/html-f95ee5dc.js.map +0 -1
  224. package/dist/html2pdf.bundle-2195a04c.js.map +0 -1
  225. package/dist/html2pdf.bundle.min-e3118523.js.map +0 -1
  226. package/dist/index-08c4c610.js.map +0 -1
  227. package/dist/index-455942f2.js.map +0 -1
  228. package/dist/index-acc78985.js.map +0 -1
  229. package/dist/markdown-1d9e6c3f.js.map +0 -1
  230. package/dist/postcss-c2592f3f.js.map +0 -1
  231. package/dist/standalone-bcc7f37a.js +0 -2649
  232. package/dist/standalone-bcc7f37a.js.map +0 -1
  233. package/dist/typescript-48c10f50.js +0 -13601
  234. package/dist/typescript-48c10f50.js.map +0 -1
@@ -1604,7 +1604,7 @@ const AiTextTransform = async ({ content, apiKey }) => {
1604
1604
  const AI_ACTION_COMMAND = createCommand(
1605
1605
  "AI_ACTION_COMMAND"
1606
1606
  );
1607
- const ImageView = React__default.lazy(() => import("./index-acc78985.js"));
1607
+ const ImageView = React__default.lazy(() => import("./index-da40f793.js"));
1608
1608
  function isGoogleDocCheckboxImg(img) {
1609
1609
  return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
1610
1610
  }
@@ -1907,18 +1907,18 @@ const ImagePlugin = ({
1907
1907
  }, [captionsEnabled, editor]);
1908
1908
  return null;
1909
1909
  };
1910
- function setRef$1(ref, value) {
1910
+ function setRef(ref, value) {
1911
1911
  if (typeof ref === "function") {
1912
1912
  return ref(value);
1913
1913
  } else if (ref !== null && ref !== void 0) {
1914
1914
  ref.current = value;
1915
1915
  }
1916
1916
  }
1917
- function composeRefs$1(...refs) {
1917
+ function composeRefs(...refs) {
1918
1918
  return (node) => {
1919
1919
  let hasCleanup = false;
1920
1920
  const cleanups = refs.map((ref) => {
1921
- const cleanup = setRef$1(ref, node);
1921
+ const cleanup = setRef(ref, node);
1922
1922
  if (!hasCleanup && typeof cleanup == "function") {
1923
1923
  hasCleanup = true;
1924
1924
  }
@@ -1931,31 +1931,34 @@ function composeRefs$1(...refs) {
1931
1931
  if (typeof cleanup == "function") {
1932
1932
  cleanup();
1933
1933
  } else {
1934
- setRef$1(refs[i2], null);
1934
+ setRef(refs[i2], null);
1935
1935
  }
1936
1936
  }
1937
1937
  };
1938
1938
  }
1939
1939
  };
1940
1940
  }
1941
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1942
- var use = React$1[" use ".trim().toString()];
1943
- function isPromiseLike(value) {
1941
+ function useComposedRefs(...refs) {
1942
+ return React$1.useCallback(composeRefs(...refs), refs);
1943
+ }
1944
+ var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
1945
+ var use$3 = React$1[" use ".trim().toString()];
1946
+ function isPromiseLike$3(value) {
1944
1947
  return typeof value === "object" && value !== null && "then" in value;
1945
1948
  }
1946
- function isLazyComponent(element) {
1947
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
1949
+ function isLazyComponent$3(element) {
1950
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
1948
1951
  }
1949
1952
  // @__NO_SIDE_EFFECTS__
1950
- function createSlot$1(ownerName) {
1951
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
1953
+ function createSlot$4(ownerName) {
1954
+ const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
1952
1955
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
1953
1956
  let { children, ...slotProps } = props;
1954
- if (isLazyComponent(children) && typeof use === "function") {
1955
- children = use(children._payload);
1957
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
1958
+ children = use$3(children._payload);
1956
1959
  }
1957
1960
  const childrenArray = React$1.Children.toArray(children);
1958
- const slottable = childrenArray.find(isSlottable$1);
1961
+ const slottable = childrenArray.find(isSlottable$4);
1959
1962
  if (slottable) {
1960
1963
  const newElement = slottable.props.children;
1961
1964
  const newChildren = childrenArray.map((child) => {
@@ -1974,19 +1977,19 @@ function createSlot$1(ownerName) {
1974
1977
  Slot2.displayName = `${ownerName}.Slot`;
1975
1978
  return Slot2;
1976
1979
  }
1977
- var Slot$4 = /* @__PURE__ */ createSlot$1("Slot");
1980
+ var Slot$4 = /* @__PURE__ */ createSlot$4("Slot");
1978
1981
  // @__NO_SIDE_EFFECTS__
1979
- function createSlotClone$1(ownerName) {
1982
+ function createSlotClone$4(ownerName) {
1980
1983
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
1981
1984
  let { children, ...slotProps } = props;
1982
- if (isLazyComponent(children) && typeof use === "function") {
1983
- children = use(children._payload);
1985
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
1986
+ children = use$3(children._payload);
1984
1987
  }
1985
1988
  if (React$1.isValidElement(children)) {
1986
- const childrenRef = getElementRef$2(children);
1987
- const props2 = mergeProps$1(slotProps, children.props);
1989
+ const childrenRef = getElementRef$5(children);
1990
+ const props2 = mergeProps$4(slotProps, children.props);
1988
1991
  if (children.type !== React$1.Fragment) {
1989
- props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
1992
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
1990
1993
  }
1991
1994
  return React$1.cloneElement(children, props2);
1992
1995
  }
@@ -1995,11 +1998,11 @@ function createSlotClone$1(ownerName) {
1995
1998
  SlotClone.displayName = `${ownerName}.SlotClone`;
1996
1999
  return SlotClone;
1997
2000
  }
1998
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
1999
- function isSlottable$1(child) {
2000
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
2001
+ var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
2002
+ function isSlottable$4(child) {
2003
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
2001
2004
  }
2002
- function mergeProps$1(slotProps, childProps) {
2005
+ function mergeProps$4(slotProps, childProps) {
2003
2006
  const overrideProps = { ...childProps };
2004
2007
  for (const propName in childProps) {
2005
2008
  const slotPropValue = slotProps[propName];
@@ -2023,7 +2026,7 @@ function mergeProps$1(slotProps, childProps) {
2023
2026
  }
2024
2027
  return { ...slotProps, ...overrideProps };
2025
2028
  }
2026
- function getElementRef$2(element) {
2029
+ function getElementRef$5(element) {
2027
2030
  var _a, _b;
2028
2031
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
2029
2032
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -2098,7 +2101,28 @@ const cva = (base, config) => (props) => {
2098
2101
  }, []);
2099
2102
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2100
2103
  };
2104
+ const concatArrays = (array1, array2) => {
2105
+ const combinedArray = new Array(array1.length + array2.length);
2106
+ for (let i2 = 0; i2 < array1.length; i2++) {
2107
+ combinedArray[i2] = array1[i2];
2108
+ }
2109
+ for (let i2 = 0; i2 < array2.length; i2++) {
2110
+ combinedArray[array1.length + i2] = array2[i2];
2111
+ }
2112
+ return combinedArray;
2113
+ };
2114
+ const createClassValidatorObject = (classGroupId, validator) => ({
2115
+ classGroupId,
2116
+ validator
2117
+ });
2118
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
2119
+ nextPart,
2120
+ validators,
2121
+ classGroupId
2122
+ });
2101
2123
  const CLASS_PART_SEPARATOR = "-";
2124
+ const EMPTY_CONFLICTS = [];
2125
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
2102
2126
  const createClassGroupUtils = (config) => {
2103
2127
  const classMap = createClassMap(config);
2104
2128
  const {
@@ -2106,104 +2130,135 @@ const createClassGroupUtils = (config) => {
2106
2130
  conflictingClassGroupModifiers
2107
2131
  } = config;
2108
2132
  const getClassGroupId = (className) => {
2109
- const classParts = className.split(CLASS_PART_SEPARATOR);
2110
- if (classParts[0] === "" && classParts.length !== 1) {
2111
- classParts.shift();
2133
+ if (className.startsWith("[") && className.endsWith("]")) {
2134
+ return getGroupIdForArbitraryProperty(className);
2112
2135
  }
2113
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
2136
+ const classParts = className.split(CLASS_PART_SEPARATOR);
2137
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
2138
+ return getGroupRecursive(classParts, startIndex, classMap);
2114
2139
  };
2115
2140
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
2116
- const conflicts = conflictingClassGroups[classGroupId] || [];
2117
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
2118
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
2141
+ if (hasPostfixModifier) {
2142
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
2143
+ const baseConflicts = conflictingClassGroups[classGroupId];
2144
+ if (modifierConflicts) {
2145
+ if (baseConflicts) {
2146
+ return concatArrays(baseConflicts, modifierConflicts);
2147
+ }
2148
+ return modifierConflicts;
2149
+ }
2150
+ return baseConflicts || EMPTY_CONFLICTS;
2119
2151
  }
2120
- return conflicts;
2152
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
2121
2153
  };
2122
2154
  return {
2123
2155
  getClassGroupId,
2124
2156
  getConflictingClassGroupIds
2125
2157
  };
2126
2158
  };
2127
- const getGroupRecursive = (classParts, classPartObject) => {
2128
- var _a;
2129
- if (classParts.length === 0) {
2159
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
2160
+ const classPathsLength = classParts.length - startIndex;
2161
+ if (classPathsLength === 0) {
2130
2162
  return classPartObject.classGroupId;
2131
2163
  }
2132
- const currentClassPart = classParts[0];
2164
+ const currentClassPart = classParts[startIndex];
2133
2165
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
2134
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
2135
- if (classGroupFromNextClassPart) {
2136
- return classGroupFromNextClassPart;
2166
+ if (nextClassPartObject) {
2167
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
2168
+ if (result)
2169
+ return result;
2137
2170
  }
2138
- if (classPartObject.validators.length === 0) {
2171
+ const validators = classPartObject.validators;
2172
+ if (validators === null) {
2139
2173
  return void 0;
2140
2174
  }
2141
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
2142
- return (_a = classPartObject.validators.find(({
2143
- validator
2144
- }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
2145
- };
2146
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
2147
- const getGroupIdForArbitraryProperty = (className) => {
2148
- if (arbitraryPropertyRegex.test(className)) {
2149
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
2150
- const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
2151
- if (property) {
2152
- return "arbitrary.." + property;
2175
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
2176
+ const validatorsLength = validators.length;
2177
+ for (let i2 = 0; i2 < validatorsLength; i2++) {
2178
+ const validatorObj = validators[i2];
2179
+ if (validatorObj.validator(classRest)) {
2180
+ return validatorObj.classGroupId;
2153
2181
  }
2154
2182
  }
2183
+ return void 0;
2155
2184
  };
2185
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
2186
+ const content = className.slice(1, -1);
2187
+ const colonIndex = content.indexOf(":");
2188
+ const property = content.slice(0, colonIndex);
2189
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
2190
+ })();
2156
2191
  const createClassMap = (config) => {
2157
2192
  const {
2158
2193
  theme: theme2,
2159
2194
  classGroups
2160
2195
  } = config;
2161
- const classMap = {
2162
- nextPart: /* @__PURE__ */ new Map(),
2163
- validators: []
2164
- };
2196
+ return processClassGroups(classGroups, theme2);
2197
+ };
2198
+ const processClassGroups = (classGroups, theme2) => {
2199
+ const classMap = createClassPartObject();
2165
2200
  for (const classGroupId in classGroups) {
2166
- processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme2);
2201
+ const group = classGroups[classGroupId];
2202
+ processClassesRecursively(group, classMap, classGroupId, theme2);
2167
2203
  }
2168
2204
  return classMap;
2169
2205
  };
2170
2206
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme2) => {
2171
- classGroup.forEach((classDefinition) => {
2172
- if (typeof classDefinition === "string") {
2173
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2174
- classPartObjectToEdit.classGroupId = classGroupId;
2175
- return;
2176
- }
2177
- if (typeof classDefinition === "function") {
2178
- if (isThemeGetter(classDefinition)) {
2179
- processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2180
- return;
2181
- }
2182
- classPartObject.validators.push({
2183
- validator: classDefinition,
2184
- classGroupId
2185
- });
2186
- return;
2187
- }
2188
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
2189
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme2);
2190
- });
2191
- });
2207
+ const len = classGroup.length;
2208
+ for (let i2 = 0; i2 < len; i2++) {
2209
+ const classDefinition = classGroup[i2];
2210
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme2);
2211
+ }
2212
+ };
2213
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2214
+ if (typeof classDefinition === "string") {
2215
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
2216
+ return;
2217
+ }
2218
+ if (typeof classDefinition === "function") {
2219
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme2);
2220
+ return;
2221
+ }
2222
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme2);
2223
+ };
2224
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
2225
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2226
+ classPartObjectToEdit.classGroupId = classGroupId;
2227
+ };
2228
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2229
+ if (isThemeGetter(classDefinition)) {
2230
+ processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2231
+ return;
2232
+ }
2233
+ if (classPartObject.validators === null) {
2234
+ classPartObject.validators = [];
2235
+ }
2236
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
2237
+ };
2238
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2239
+ const entries = Object.entries(classDefinition);
2240
+ const len = entries.length;
2241
+ for (let i2 = 0; i2 < len; i2++) {
2242
+ const [key, value] = entries[i2];
2243
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme2);
2244
+ }
2192
2245
  };
2193
2246
  const getPart = (classPartObject, path) => {
2194
- let currentClassPartObject = classPartObject;
2195
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
2196
- if (!currentClassPartObject.nextPart.has(pathPart)) {
2197
- currentClassPartObject.nextPart.set(pathPart, {
2198
- nextPart: /* @__PURE__ */ new Map(),
2199
- validators: []
2200
- });
2247
+ let current = classPartObject;
2248
+ const parts = path.split(CLASS_PART_SEPARATOR);
2249
+ const len = parts.length;
2250
+ for (let i2 = 0; i2 < len; i2++) {
2251
+ const part = parts[i2];
2252
+ let next = current.nextPart.get(part);
2253
+ if (!next) {
2254
+ next = createClassPartObject();
2255
+ current.nextPart.set(part, next);
2201
2256
  }
2202
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
2203
- });
2204
- return currentClassPartObject;
2257
+ current = next;
2258
+ }
2259
+ return current;
2205
2260
  };
2206
- const isThemeGetter = (func) => func.isThemeGetter;
2261
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
2207
2262
  const createLruCache = (maxCacheSize) => {
2208
2263
  if (maxCacheSize < 1) {
2209
2264
  return {
@@ -2213,31 +2268,31 @@ const createLruCache = (maxCacheSize) => {
2213
2268
  };
2214
2269
  }
2215
2270
  let cacheSize = 0;
2216
- let cache2 = /* @__PURE__ */ new Map();
2217
- let previousCache = /* @__PURE__ */ new Map();
2271
+ let cache2 = /* @__PURE__ */ Object.create(null);
2272
+ let previousCache = /* @__PURE__ */ Object.create(null);
2218
2273
  const update = (key, value) => {
2219
- cache2.set(key, value);
2274
+ cache2[key] = value;
2220
2275
  cacheSize++;
2221
2276
  if (cacheSize > maxCacheSize) {
2222
2277
  cacheSize = 0;
2223
2278
  previousCache = cache2;
2224
- cache2 = /* @__PURE__ */ new Map();
2279
+ cache2 = /* @__PURE__ */ Object.create(null);
2225
2280
  }
2226
2281
  };
2227
2282
  return {
2228
2283
  get(key) {
2229
- let value = cache2.get(key);
2284
+ let value = cache2[key];
2230
2285
  if (value !== void 0) {
2231
2286
  return value;
2232
2287
  }
2233
- if ((value = previousCache.get(key)) !== void 0) {
2288
+ if ((value = previousCache[key]) !== void 0) {
2234
2289
  update(key, value);
2235
2290
  return value;
2236
2291
  }
2237
2292
  },
2238
2293
  set(key, value) {
2239
- if (cache2.has(key)) {
2240
- cache2.set(key, value);
2294
+ if (key in cache2) {
2295
+ cache2[key] = value;
2241
2296
  } else {
2242
2297
  update(key, value);
2243
2298
  }
@@ -2246,7 +2301,14 @@ const createLruCache = (maxCacheSize) => {
2246
2301
  };
2247
2302
  const IMPORTANT_MODIFIER = "!";
2248
2303
  const MODIFIER_SEPARATOR = ":";
2249
- const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
2304
+ const EMPTY_MODIFIERS = [];
2305
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
2306
+ modifiers,
2307
+ hasImportantModifier,
2308
+ baseClassName,
2309
+ maybePostfixModifierPosition,
2310
+ isExternal
2311
+ });
2250
2312
  const createParseClassName = (config) => {
2251
2313
  const {
2252
2314
  prefix,
@@ -2258,12 +2320,13 @@ const createParseClassName = (config) => {
2258
2320
  let parenDepth = 0;
2259
2321
  let modifierStart = 0;
2260
2322
  let postfixModifierPosition;
2261
- for (let index2 = 0; index2 < className.length; index2++) {
2262
- let currentCharacter = className[index2];
2323
+ const len = className.length;
2324
+ for (let index2 = 0; index2 < len; index2++) {
2325
+ const currentCharacter = className[index2];
2263
2326
  if (bracketDepth === 0 && parenDepth === 0) {
2264
2327
  if (currentCharacter === MODIFIER_SEPARATOR) {
2265
2328
  modifiers.push(className.slice(modifierStart, index2));
2266
- modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
2329
+ modifierStart = index2 + 1;
2267
2330
  continue;
2268
2331
  }
2269
2332
  if (currentCharacter === "/") {
@@ -2271,37 +2334,38 @@ const createParseClassName = (config) => {
2271
2334
  continue;
2272
2335
  }
2273
2336
  }
2274
- if (currentCharacter === "[") {
2337
+ if (currentCharacter === "[")
2275
2338
  bracketDepth++;
2276
- } else if (currentCharacter === "]") {
2339
+ else if (currentCharacter === "]")
2277
2340
  bracketDepth--;
2278
- } else if (currentCharacter === "(") {
2341
+ else if (currentCharacter === "(")
2279
2342
  parenDepth++;
2280
- } else if (currentCharacter === ")") {
2343
+ else if (currentCharacter === ")")
2281
2344
  parenDepth--;
2282
- }
2283
2345
  }
2284
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
2285
- const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
2286
- const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
2346
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2347
+ let baseClassName = baseClassNameWithImportantModifier;
2348
+ let hasImportantModifier = false;
2349
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2350
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2351
+ hasImportantModifier = true;
2352
+ } else if (
2353
+ /**
2354
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
2355
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
2356
+ */
2357
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
2358
+ ) {
2359
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
2360
+ hasImportantModifier = true;
2361
+ }
2287
2362
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
2288
- return {
2289
- modifiers,
2290
- hasImportantModifier,
2291
- baseClassName,
2292
- maybePostfixModifierPosition
2293
- };
2363
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2294
2364
  };
2295
2365
  if (prefix) {
2296
2366
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
2297
2367
  const parseClassNameOriginal = parseClassName;
2298
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
2299
- isExternal: true,
2300
- modifiers: [],
2301
- hasImportantModifier: false,
2302
- baseClassName: className,
2303
- maybePostfixModifierPosition: void 0
2304
- };
2368
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
2305
2369
  }
2306
2370
  if (experimentalParseClassName) {
2307
2371
  const parseClassNameOriginal = parseClassName;
@@ -2312,36 +2376,35 @@ const createParseClassName = (config) => {
2312
2376
  }
2313
2377
  return parseClassName;
2314
2378
  };
2315
- const stripImportantModifier = (baseClassName) => {
2316
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
2317
- return baseClassName.substring(0, baseClassName.length - 1);
2318
- }
2319
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
2320
- return baseClassName.substring(1);
2321
- }
2322
- return baseClassName;
2323
- };
2324
2379
  const createSortModifiers = (config) => {
2325
- const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
2326
- const sortModifiers = (modifiers) => {
2327
- if (modifiers.length <= 1) {
2328
- return modifiers;
2329
- }
2330
- const sortedModifiers = [];
2331
- let unsortedModifiers = [];
2332
- modifiers.forEach((modifier) => {
2333
- const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
2334
- if (isPositionSensitive) {
2335
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
2336
- unsortedModifiers = [];
2380
+ const modifierWeights = /* @__PURE__ */ new Map();
2381
+ config.orderSensitiveModifiers.forEach((mod, index2) => {
2382
+ modifierWeights.set(mod, 1e6 + index2);
2383
+ });
2384
+ return (modifiers) => {
2385
+ const result = [];
2386
+ let currentSegment = [];
2387
+ for (let i2 = 0; i2 < modifiers.length; i2++) {
2388
+ const modifier = modifiers[i2];
2389
+ const isArbitrary = modifier[0] === "[";
2390
+ const isOrderSensitive = modifierWeights.has(modifier);
2391
+ if (isArbitrary || isOrderSensitive) {
2392
+ if (currentSegment.length > 0) {
2393
+ currentSegment.sort();
2394
+ result.push(...currentSegment);
2395
+ currentSegment = [];
2396
+ }
2397
+ result.push(modifier);
2337
2398
  } else {
2338
- unsortedModifiers.push(modifier);
2399
+ currentSegment.push(modifier);
2339
2400
  }
2340
- });
2341
- sortedModifiers.push(...unsortedModifiers.sort());
2342
- return sortedModifiers;
2401
+ }
2402
+ if (currentSegment.length > 0) {
2403
+ currentSegment.sort();
2404
+ result.push(...currentSegment);
2405
+ }
2406
+ return result;
2343
2407
  };
2344
- return sortModifiers;
2345
2408
  };
2346
2409
  const createConfigUtils = (config) => ({
2347
2410
  cache: createLruCache(config.cacheSize),
@@ -2387,10 +2450,10 @@ const mergeClassList = (classList, configUtils) => {
2387
2450
  }
2388
2451
  hasPostfixModifier = false;
2389
2452
  }
2390
- const variantModifier = sortModifiers(modifiers).join(":");
2453
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
2391
2454
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2392
2455
  const classId = modifierId + classGroupId;
2393
- if (classGroupsInConflict.includes(classId)) {
2456
+ if (classGroupsInConflict.indexOf(classId) > -1) {
2394
2457
  continue;
2395
2458
  }
2396
2459
  classGroupsInConflict.push(classId);
@@ -2403,13 +2466,13 @@ const mergeClassList = (classList, configUtils) => {
2403
2466
  }
2404
2467
  return result;
2405
2468
  };
2406
- function twJoin() {
2469
+ const twJoin = (...classLists) => {
2407
2470
  let index2 = 0;
2408
2471
  let argument;
2409
2472
  let resolvedValue;
2410
2473
  let string = "";
2411
- while (index2 < arguments.length) {
2412
- if (argument = arguments[index2++]) {
2474
+ while (index2 < classLists.length) {
2475
+ if (argument = classLists[index2++]) {
2413
2476
  if (resolvedValue = toValue(argument)) {
2414
2477
  string && (string += " ");
2415
2478
  string += resolvedValue;
@@ -2417,7 +2480,7 @@ function twJoin() {
2417
2480
  }
2418
2481
  }
2419
2482
  return string;
2420
- }
2483
+ };
2421
2484
  const toValue = (mix) => {
2422
2485
  if (typeof mix === "string") {
2423
2486
  return mix;
@@ -2434,20 +2497,20 @@ const toValue = (mix) => {
2434
2497
  }
2435
2498
  return string;
2436
2499
  };
2437
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2500
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2438
2501
  let configUtils;
2439
2502
  let cacheGet;
2440
2503
  let cacheSet;
2441
- let functionToCall = initTailwindMerge;
2442
- function initTailwindMerge(classList) {
2504
+ let functionToCall;
2505
+ const initTailwindMerge = (classList) => {
2443
2506
  const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2444
2507
  configUtils = createConfigUtils(config);
2445
2508
  cacheGet = configUtils.cache.get;
2446
2509
  cacheSet = configUtils.cache.set;
2447
2510
  functionToCall = tailwindMerge;
2448
2511
  return tailwindMerge(classList);
2449
- }
2450
- function tailwindMerge(classList) {
2512
+ };
2513
+ const tailwindMerge = (classList) => {
2451
2514
  const cachedResult = cacheGet(classList);
2452
2515
  if (cachedResult) {
2453
2516
  return cachedResult;
@@ -2455,13 +2518,13 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2455
2518
  const result = mergeClassList(classList, configUtils);
2456
2519
  cacheSet(classList, result);
2457
2520
  return result;
2458
- }
2459
- return function callTailwindMerge() {
2460
- return functionToCall(twJoin.apply(null, arguments));
2461
2521
  };
2462
- }
2522
+ functionToCall = initTailwindMerge;
2523
+ return (...args) => functionToCall(twJoin(...args));
2524
+ };
2525
+ const fallbackThemeArr = [];
2463
2526
  const fromTheme = (key) => {
2464
- const themeGetter = (theme2) => theme2[key] || [];
2527
+ const themeGetter = (theme2) => theme2[key] || fallbackThemeArr;
2465
2528
  themeGetter.isThemeGetter = true;
2466
2529
  return themeGetter;
2467
2530
  };
@@ -5103,40 +5166,6 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
5103
5166
  }
5104
5167
  };
5105
5168
  }
5106
- function setRef(ref, value) {
5107
- if (typeof ref === "function") {
5108
- return ref(value);
5109
- } else if (ref !== null && ref !== void 0) {
5110
- ref.current = value;
5111
- }
5112
- }
5113
- function composeRefs(...refs) {
5114
- return (node) => {
5115
- let hasCleanup = false;
5116
- const cleanups = refs.map((ref) => {
5117
- const cleanup = setRef(ref, node);
5118
- if (!hasCleanup && typeof cleanup == "function") {
5119
- hasCleanup = true;
5120
- }
5121
- return cleanup;
5122
- });
5123
- if (hasCleanup) {
5124
- return () => {
5125
- for (let i2 = 0; i2 < cleanups.length; i2++) {
5126
- const cleanup = cleanups[i2];
5127
- if (typeof cleanup == "function") {
5128
- cleanup();
5129
- } else {
5130
- setRef(refs[i2], null);
5131
- }
5132
- }
5133
- };
5134
- }
5135
- };
5136
- }
5137
- function useComposedRefs(...refs) {
5138
- return React$1.useCallback(composeRefs(...refs), refs);
5139
- }
5140
5169
  function createContext2(rootComponentName, defaultContext) {
5141
5170
  const Context2 = React$1.createContext(defaultContext);
5142
5171
  const Provider2 = (props) => {
@@ -5155,7 +5184,7 @@ function createContext2(rootComponentName, defaultContext) {
5155
5184
  }
5156
5185
  return [Provider2, useContext2];
5157
5186
  }
5158
- function createContextScope(scopeName, createContextScopeDeps = []) {
5187
+ function createContextScope$1(scopeName, createContextScopeDeps = []) {
5159
5188
  let defaultContexts = [];
5160
5189
  function createContext3(rootComponentName, defaultContext) {
5161
5190
  const BaseContext = React$1.createContext(defaultContext);
@@ -5194,9 +5223,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
5194
5223
  };
5195
5224
  };
5196
5225
  createScope.scopeName = scopeName;
5197
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
5226
+ return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
5198
5227
  }
5199
- function composeContextScopes(...scopes) {
5228
+ function composeContextScopes$1(...scopes) {
5200
5229
  const baseScope = scopes[0];
5201
5230
  if (scopes.length === 1)
5202
5231
  return baseScope;
@@ -5296,12 +5325,12 @@ function isFunction(value) {
5296
5325
  return typeof value === "function";
5297
5326
  }
5298
5327
  // @__NO_SIDE_EFFECTS__
5299
- function createSlot(ownerName) {
5300
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
5328
+ function createSlot$3(ownerName) {
5329
+ const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
5301
5330
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
5302
5331
  const { children, ...slotProps } = props;
5303
5332
  const childrenArray = React$1.Children.toArray(children);
5304
- const slottable = childrenArray.find(isSlottable);
5333
+ const slottable = childrenArray.find(isSlottable$3);
5305
5334
  if (slottable) {
5306
5335
  const newElement = slottable.props.children;
5307
5336
  const newChildren = childrenArray.map((child) => {
@@ -5321,12 +5350,12 @@ function createSlot(ownerName) {
5321
5350
  return Slot2;
5322
5351
  }
5323
5352
  // @__NO_SIDE_EFFECTS__
5324
- function createSlotClone(ownerName) {
5353
+ function createSlotClone$3(ownerName) {
5325
5354
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
5326
5355
  const { children, ...slotProps } = props;
5327
5356
  if (React$1.isValidElement(children)) {
5328
- const childrenRef = getElementRef$1(children);
5329
- const props2 = mergeProps(slotProps, children.props);
5357
+ const childrenRef = getElementRef$4(children);
5358
+ const props2 = mergeProps$3(slotProps, children.props);
5330
5359
  if (children.type !== React$1.Fragment) {
5331
5360
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
5332
5361
  }
@@ -5337,20 +5366,20 @@ function createSlotClone(ownerName) {
5337
5366
  SlotClone.displayName = `${ownerName}.SlotClone`;
5338
5367
  return SlotClone;
5339
5368
  }
5340
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
5369
+ var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
5341
5370
  // @__NO_SIDE_EFFECTS__
5342
5371
  function createSlottable(ownerName) {
5343
5372
  const Slottable2 = ({ children }) => {
5344
5373
  return /* @__PURE__ */ jsx(Fragment, { children });
5345
5374
  };
5346
5375
  Slottable2.displayName = `${ownerName}.Slottable`;
5347
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
5376
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER$3;
5348
5377
  return Slottable2;
5349
5378
  }
5350
- function isSlottable(child) {
5351
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
5379
+ function isSlottable$3(child) {
5380
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
5352
5381
  }
5353
- function mergeProps(slotProps, childProps) {
5382
+ function mergeProps$3(slotProps, childProps) {
5354
5383
  const overrideProps = { ...childProps };
5355
5384
  for (const propName in childProps) {
5356
5385
  const slotPropValue = slotProps[propName];
@@ -5374,7 +5403,7 @@ function mergeProps(slotProps, childProps) {
5374
5403
  }
5375
5404
  return { ...slotProps, ...overrideProps };
5376
5405
  }
5377
- function getElementRef$1(element) {
5406
+ function getElementRef$4(element) {
5378
5407
  var _a, _b;
5379
5408
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
5380
5409
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -5388,7 +5417,7 @@ function getElementRef$1(element) {
5388
5417
  }
5389
5418
  return element.props.ref || element.ref;
5390
5419
  }
5391
- var NODES = [
5420
+ var NODES$3 = [
5392
5421
  "a",
5393
5422
  "button",
5394
5423
  "div",
@@ -5407,8 +5436,8 @@ var NODES = [
5407
5436
  "svg",
5408
5437
  "ul"
5409
5438
  ];
5410
- var Primitive = NODES.reduce((primitive, node) => {
5411
- const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
5439
+ var Primitive$3 = NODES$3.reduce((primitive, node) => {
5440
+ const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
5412
5441
  const Node2 = React$1.forwardRef((props, forwardedRef) => {
5413
5442
  const { asChild, ...primitiveProps } = props;
5414
5443
  const Comp = asChild ? Slot2 : node;
@@ -5541,7 +5570,7 @@ var DismissableLayer = React$1.forwardRef(
5541
5570
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
5542
5571
  }, []);
5543
5572
  return /* @__PURE__ */ jsx(
5544
- Primitive.div,
5573
+ Primitive$3.div,
5545
5574
  {
5546
5575
  ...layerProps,
5547
5576
  ref: composedRefs,
@@ -5574,7 +5603,7 @@ var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
5574
5603
  };
5575
5604
  }
5576
5605
  }, [context.branches]);
5577
- return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
5606
+ return /* @__PURE__ */ jsx(Primitive$3.div, { ...props, ref: composedRefs });
5578
5607
  });
5579
5608
  DismissableLayerBranch.displayName = BRANCH_NAME;
5580
5609
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -5783,7 +5812,7 @@ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
5783
5812
  },
5784
5813
  [loop, trapped, focusScope.paused]
5785
5814
  );
5786
- return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5815
+ return /* @__PURE__ */ jsx(Primitive$3.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5787
5816
  });
5788
5817
  FocusScope.displayName = FOCUS_SCOPE_NAME;
5789
5818
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -5880,7 +5909,7 @@ var Portal$5 = React$1.forwardRef((props, forwardedRef) => {
5880
5909
  const [mounted, setMounted] = React$1.useState(false);
5881
5910
  useLayoutEffect2(() => setMounted(true), []);
5882
5911
  const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
5883
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
5912
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : null;
5884
5913
  });
5885
5914
  Portal$5.displayName = PORTAL_NAME$6;
5886
5915
  function useStateMachine(initialState, machine) {
@@ -5893,7 +5922,7 @@ var Presence = (props) => {
5893
5922
  const { present, children } = props;
5894
5923
  const presence = usePresence(present);
5895
5924
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React$1.Children.only(children);
5896
- const ref = useComposedRefs(presence.ref, getElementRef(child));
5925
+ const ref = useComposedRefs(presence.ref, getElementRef$3(child));
5897
5926
  const forceMount = typeof children === "function";
5898
5927
  return forceMount || presence.isPresent ? React$1.cloneElement(child, { ref }) : null;
5899
5928
  };
@@ -5992,7 +6021,7 @@ function usePresence(present) {
5992
6021
  function getAnimationName(styles) {
5993
6022
  return (styles == null ? void 0 : styles.animationName) || "none";
5994
6023
  }
5995
- function getElementRef(element) {
6024
+ function getElementRef$3(element) {
5996
6025
  var _a, _b;
5997
6026
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
5998
6027
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -6815,7 +6844,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
6815
6844
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
6816
6845
  };
6817
6846
  var DIALOG_NAME = "Dialog";
6818
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
6847
+ var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
6819
6848
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
6820
6849
  var Dialog$1 = (props) => {
6821
6850
  const {
@@ -6859,7 +6888,7 @@ var DialogTrigger = React$1.forwardRef(
6859
6888
  const context = useDialogContext(TRIGGER_NAME$5, __scopeDialog);
6860
6889
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
6861
6890
  return /* @__PURE__ */ jsx(
6862
- Primitive.button,
6891
+ Primitive$3.button,
6863
6892
  {
6864
6893
  type: "button",
6865
6894
  "aria-haspopup": "dialog",
@@ -6894,7 +6923,7 @@ var DialogOverlay$1 = React$1.forwardRef(
6894
6923
  }
6895
6924
  );
6896
6925
  DialogOverlay$1.displayName = OVERLAY_NAME;
6897
- var Slot$3 = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll");
6926
+ var Slot$3 = /* @__PURE__ */ createSlot$3("DialogOverlay.RemoveScroll");
6898
6927
  var DialogOverlayImpl = React$1.forwardRef(
6899
6928
  (props, forwardedRef) => {
6900
6929
  const { __scopeDialog, ...overlayProps } = props;
@@ -6903,7 +6932,7 @@ var DialogOverlayImpl = React$1.forwardRef(
6903
6932
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
6904
6933
  // ie. when `Overlay` and `Content` are siblings
6905
6934
  /* @__PURE__ */ jsx(RemoveScroll, { as: Slot$3, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
6906
- Primitive.div,
6935
+ Primitive$3.div,
6907
6936
  {
6908
6937
  "data-state": getState$1(context.open),
6909
6938
  ...overlayProps,
@@ -7048,7 +7077,7 @@ var DialogTitle$1 = React$1.forwardRef(
7048
7077
  (props, forwardedRef) => {
7049
7078
  const { __scopeDialog, ...titleProps } = props;
7050
7079
  const context = useDialogContext(TITLE_NAME, __scopeDialog);
7051
- return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
7080
+ return /* @__PURE__ */ jsx(Primitive$3.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
7052
7081
  }
7053
7082
  );
7054
7083
  DialogTitle$1.displayName = TITLE_NAME;
@@ -7057,7 +7086,7 @@ var DialogDescription$1 = React$1.forwardRef(
7057
7086
  (props, forwardedRef) => {
7058
7087
  const { __scopeDialog, ...descriptionProps } = props;
7059
7088
  const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
7060
- return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
7089
+ return /* @__PURE__ */ jsx(Primitive$3.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
7061
7090
  }
7062
7091
  );
7063
7092
  DialogDescription$1.displayName = DESCRIPTION_NAME;
@@ -7067,7 +7096,7 @@ var DialogClose = React$1.forwardRef(
7067
7096
  const { __scopeDialog, ...closeProps } = props;
7068
7097
  const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
7069
7098
  return /* @__PURE__ */ jsx(
7070
- Primitive.button,
7099
+ Primitive$3.button,
7071
7100
  {
7072
7101
  type: "button",
7073
7102
  ...closeProps,
@@ -8097,7 +8126,7 @@ const DialogContent = React$1.forwardRef(({ className, children, ...props }, ref
8097
8126
  /* @__PURE__ */ jsxs(
8098
8127
  Close,
8099
8128
  {
8100
- className: "closeDialog cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\r\n",
8129
+ className: "closeDialog cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\n",
8101
8130
  children: [
8102
8131
  /* @__PURE__ */ jsx(X$1, { className: "cteditor-h-4 cteditor-w-4" }),
8103
8132
  /* @__PURE__ */ jsx("span", { className: "!cteditor-sr-only", children: "Close" })
@@ -8175,10 +8204,140 @@ const Input$1 = React$1.forwardRef(
8175
8204
  }
8176
8205
  );
8177
8206
  Input$1.displayName = "Input";
8207
+ var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
8208
+ var use$2 = React$1[" use ".trim().toString()];
8209
+ function isPromiseLike$2(value) {
8210
+ return typeof value === "object" && value !== null && "then" in value;
8211
+ }
8212
+ function isLazyComponent$2(element) {
8213
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
8214
+ }
8215
+ // @__NO_SIDE_EFFECTS__
8216
+ function createSlot$2(ownerName) {
8217
+ const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
8218
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
8219
+ let { children, ...slotProps } = props;
8220
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
8221
+ children = use$2(children._payload);
8222
+ }
8223
+ const childrenArray = React$1.Children.toArray(children);
8224
+ const slottable = childrenArray.find(isSlottable$2);
8225
+ if (slottable) {
8226
+ const newElement = slottable.props.children;
8227
+ const newChildren = childrenArray.map((child) => {
8228
+ if (child === slottable) {
8229
+ if (React$1.Children.count(newElement) > 1)
8230
+ return React$1.Children.only(null);
8231
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
8232
+ } else {
8233
+ return child;
8234
+ }
8235
+ });
8236
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
8237
+ }
8238
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
8239
+ });
8240
+ Slot2.displayName = `${ownerName}.Slot`;
8241
+ return Slot2;
8242
+ }
8243
+ // @__NO_SIDE_EFFECTS__
8244
+ function createSlotClone$2(ownerName) {
8245
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
8246
+ let { children, ...slotProps } = props;
8247
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
8248
+ children = use$2(children._payload);
8249
+ }
8250
+ if (React$1.isValidElement(children)) {
8251
+ const childrenRef = getElementRef$2(children);
8252
+ const props2 = mergeProps$2(slotProps, children.props);
8253
+ if (children.type !== React$1.Fragment) {
8254
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
8255
+ }
8256
+ return React$1.cloneElement(children, props2);
8257
+ }
8258
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
8259
+ });
8260
+ SlotClone.displayName = `${ownerName}.SlotClone`;
8261
+ return SlotClone;
8262
+ }
8263
+ var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
8264
+ function isSlottable$2(child) {
8265
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
8266
+ }
8267
+ function mergeProps$2(slotProps, childProps) {
8268
+ const overrideProps = { ...childProps };
8269
+ for (const propName in childProps) {
8270
+ const slotPropValue = slotProps[propName];
8271
+ const childPropValue = childProps[propName];
8272
+ const isHandler = /^on[A-Z]/.test(propName);
8273
+ if (isHandler) {
8274
+ if (slotPropValue && childPropValue) {
8275
+ overrideProps[propName] = (...args) => {
8276
+ const result = childPropValue(...args);
8277
+ slotPropValue(...args);
8278
+ return result;
8279
+ };
8280
+ } else if (slotPropValue) {
8281
+ overrideProps[propName] = slotPropValue;
8282
+ }
8283
+ } else if (propName === "style") {
8284
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
8285
+ } else if (propName === "className") {
8286
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
8287
+ }
8288
+ }
8289
+ return { ...slotProps, ...overrideProps };
8290
+ }
8291
+ function getElementRef$2(element) {
8292
+ var _a, _b;
8293
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
8294
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8295
+ if (mayWarn) {
8296
+ return element.ref;
8297
+ }
8298
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
8299
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8300
+ if (mayWarn) {
8301
+ return element.props.ref;
8302
+ }
8303
+ return element.props.ref || element.ref;
8304
+ }
8305
+ var NODES$2 = [
8306
+ "a",
8307
+ "button",
8308
+ "div",
8309
+ "form",
8310
+ "h2",
8311
+ "h3",
8312
+ "img",
8313
+ "input",
8314
+ "label",
8315
+ "li",
8316
+ "nav",
8317
+ "ol",
8318
+ "p",
8319
+ "select",
8320
+ "span",
8321
+ "svg",
8322
+ "ul"
8323
+ ];
8324
+ var Primitive$2 = NODES$2.reduce((primitive, node) => {
8325
+ const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
8326
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
8327
+ const { asChild, ...primitiveProps } = props;
8328
+ const Comp = asChild ? Slot2 : node;
8329
+ if (typeof window !== "undefined") {
8330
+ window[Symbol.for("radix-ui")] = true;
8331
+ }
8332
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
8333
+ });
8334
+ Node2.displayName = `Primitive.${node}`;
8335
+ return { ...primitive, [node]: Node2 };
8336
+ }, {});
8178
8337
  var NAME$4 = "Label";
8179
8338
  var Label$3 = React$1.forwardRef((props, forwardedRef) => {
8180
8339
  return /* @__PURE__ */ jsx(
8181
- Primitive.label,
8340
+ Primitive$2.label,
8182
8341
  {
8183
8342
  ...props,
8184
8343
  ref: forwardedRef,
@@ -9252,16 +9411,16 @@ function CopyButton({ editor, getCodeDOMNode }) {
9252
9411
  }
9253
9412
  const index$7 = "";
9254
9413
  const PRETTIER_PARSER_MODULES = {
9255
- css: [() => import("./postcss-c2592f3f.js")],
9256
- html: [() => import("./html-f95ee5dc.js")],
9414
+ css: [() => import("./postcss-f084f74d.js")],
9415
+ html: [() => import("./html-5586dbf6.js")],
9257
9416
  js: [
9258
- () => import("./babel-d155920e.js"),
9259
- () => import("./estree-b1fff53b.js")
9417
+ () => import("./babel-d3085146.js"),
9418
+ () => import("./estree-164983f6.js")
9260
9419
  ],
9261
- markdown: [() => import("./markdown-1d9e6c3f.js")],
9420
+ markdown: [() => import("./markdown-d513479b.js")],
9262
9421
  typescript: [
9263
- () => import("./typescript-48c10f50.js"),
9264
- () => import("./estree-b1fff53b.js")
9422
+ () => import("./typescript-b1005db4.js"),
9423
+ () => import("./estree-164983f6.js")
9265
9424
  ]
9266
9425
  };
9267
9426
  async function loadPrettierParserByLang(lang) {
@@ -9272,7 +9431,7 @@ async function loadPrettierParserByLang(lang) {
9272
9431
  return modules;
9273
9432
  }
9274
9433
  async function loadPrettierFormat() {
9275
- const { format } = await import("./standalone-bcc7f37a.js");
9434
+ const { format } = await import("./standalone-5a8c6b7e.js");
9276
9435
  return format;
9277
9436
  }
9278
9437
  const PRETTIER_OPTIONS_BY_LANG = {
@@ -9749,6 +9908,199 @@ function $createCommentedTextNode(text, commentId, commentText, commentAuthor, c
9749
9908
  function $isCommentedTextNode(node) {
9750
9909
  return node instanceof CommentedTextNode;
9751
9910
  }
9911
+ function createContextScope(scopeName, createContextScopeDeps = []) {
9912
+ let defaultContexts = [];
9913
+ function createContext3(rootComponentName, defaultContext) {
9914
+ const BaseContext = React$1.createContext(defaultContext);
9915
+ BaseContext.displayName = rootComponentName + "Context";
9916
+ const index2 = defaultContexts.length;
9917
+ defaultContexts = [...defaultContexts, defaultContext];
9918
+ const Provider2 = (props) => {
9919
+ var _a;
9920
+ const { scope, children, ...context } = props;
9921
+ const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9922
+ const value = React$1.useMemo(() => context, Object.values(context));
9923
+ return /* @__PURE__ */ jsx(Context2.Provider, { value, children });
9924
+ };
9925
+ Provider2.displayName = rootComponentName + "Provider";
9926
+ function useContext2(consumerName, scope) {
9927
+ var _a;
9928
+ const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9929
+ const context = React$1.useContext(Context2);
9930
+ if (context)
9931
+ return context;
9932
+ if (defaultContext !== void 0)
9933
+ return defaultContext;
9934
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
9935
+ }
9936
+ return [Provider2, useContext2];
9937
+ }
9938
+ const createScope = () => {
9939
+ const scopeContexts = defaultContexts.map((defaultContext) => {
9940
+ return React$1.createContext(defaultContext);
9941
+ });
9942
+ return function useScope(scope) {
9943
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
9944
+ return React$1.useMemo(
9945
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
9946
+ [scope, contexts]
9947
+ );
9948
+ };
9949
+ };
9950
+ createScope.scopeName = scopeName;
9951
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
9952
+ }
9953
+ function composeContextScopes(...scopes) {
9954
+ const baseScope = scopes[0];
9955
+ if (scopes.length === 1)
9956
+ return baseScope;
9957
+ const createScope = () => {
9958
+ const scopeHooks = scopes.map((createScope2) => ({
9959
+ useScope: createScope2(),
9960
+ scopeName: createScope2.scopeName
9961
+ }));
9962
+ return function useComposedScopes(overrideScopes) {
9963
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
9964
+ const scopeProps = useScope(overrideScopes);
9965
+ const currentScope = scopeProps[`__scope${scopeName}`];
9966
+ return { ...nextScopes2, ...currentScope };
9967
+ }, {});
9968
+ return React$1.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
9969
+ };
9970
+ };
9971
+ createScope.scopeName = baseScope.scopeName;
9972
+ return createScope;
9973
+ }
9974
+ var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
9975
+ var use$1 = React$1[" use ".trim().toString()];
9976
+ function isPromiseLike$1(value) {
9977
+ return typeof value === "object" && value !== null && "then" in value;
9978
+ }
9979
+ function isLazyComponent$1(element) {
9980
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
9981
+ }
9982
+ // @__NO_SIDE_EFFECTS__
9983
+ function createSlot$1(ownerName) {
9984
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
9985
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
9986
+ let { children, ...slotProps } = props;
9987
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
9988
+ children = use$1(children._payload);
9989
+ }
9990
+ const childrenArray = React$1.Children.toArray(children);
9991
+ const slottable = childrenArray.find(isSlottable$1);
9992
+ if (slottable) {
9993
+ const newElement = slottable.props.children;
9994
+ const newChildren = childrenArray.map((child) => {
9995
+ if (child === slottable) {
9996
+ if (React$1.Children.count(newElement) > 1)
9997
+ return React$1.Children.only(null);
9998
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
9999
+ } else {
10000
+ return child;
10001
+ }
10002
+ });
10003
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
10004
+ }
10005
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
10006
+ });
10007
+ Slot2.displayName = `${ownerName}.Slot`;
10008
+ return Slot2;
10009
+ }
10010
+ // @__NO_SIDE_EFFECTS__
10011
+ function createSlotClone$1(ownerName) {
10012
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
10013
+ let { children, ...slotProps } = props;
10014
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
10015
+ children = use$1(children._payload);
10016
+ }
10017
+ if (React$1.isValidElement(children)) {
10018
+ const childrenRef = getElementRef$1(children);
10019
+ const props2 = mergeProps$1(slotProps, children.props);
10020
+ if (children.type !== React$1.Fragment) {
10021
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10022
+ }
10023
+ return React$1.cloneElement(children, props2);
10024
+ }
10025
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
10026
+ });
10027
+ SlotClone.displayName = `${ownerName}.SlotClone`;
10028
+ return SlotClone;
10029
+ }
10030
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
10031
+ function isSlottable$1(child) {
10032
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
10033
+ }
10034
+ function mergeProps$1(slotProps, childProps) {
10035
+ const overrideProps = { ...childProps };
10036
+ for (const propName in childProps) {
10037
+ const slotPropValue = slotProps[propName];
10038
+ const childPropValue = childProps[propName];
10039
+ const isHandler = /^on[A-Z]/.test(propName);
10040
+ if (isHandler) {
10041
+ if (slotPropValue && childPropValue) {
10042
+ overrideProps[propName] = (...args) => {
10043
+ const result = childPropValue(...args);
10044
+ slotPropValue(...args);
10045
+ return result;
10046
+ };
10047
+ } else if (slotPropValue) {
10048
+ overrideProps[propName] = slotPropValue;
10049
+ }
10050
+ } else if (propName === "style") {
10051
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10052
+ } else if (propName === "className") {
10053
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10054
+ }
10055
+ }
10056
+ return { ...slotProps, ...overrideProps };
10057
+ }
10058
+ function getElementRef$1(element) {
10059
+ var _a, _b;
10060
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
10061
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10062
+ if (mayWarn) {
10063
+ return element.ref;
10064
+ }
10065
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
10066
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10067
+ if (mayWarn) {
10068
+ return element.props.ref;
10069
+ }
10070
+ return element.props.ref || element.ref;
10071
+ }
10072
+ var NODES$1 = [
10073
+ "a",
10074
+ "button",
10075
+ "div",
10076
+ "form",
10077
+ "h2",
10078
+ "h3",
10079
+ "img",
10080
+ "input",
10081
+ "label",
10082
+ "li",
10083
+ "nav",
10084
+ "ol",
10085
+ "p",
10086
+ "select",
10087
+ "span",
10088
+ "svg",
10089
+ "ul"
10090
+ ];
10091
+ var Primitive$1 = NODES$1.reduce((primitive, node) => {
10092
+ const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
10093
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
10094
+ const { asChild, ...primitiveProps } = props;
10095
+ const Comp = asChild ? Slot2 : node;
10096
+ if (typeof window !== "undefined") {
10097
+ window[Symbol.for("radix-ui")] = true;
10098
+ }
10099
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
10100
+ });
10101
+ Node2.displayName = `Primitive.${node}`;
10102
+ return { ...primitive, [node]: Node2 };
10103
+ }, {});
9752
10104
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9753
10105
  function getDefaultExportFromCjs(x2) {
9754
10106
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -9834,7 +10186,7 @@ var Avatar$1 = React$1.forwardRef(
9834
10186
  scope: __scopeAvatar,
9835
10187
  imageLoadingStatus,
9836
10188
  onImageLoadingStatusChange: setImageLoadingStatus,
9837
- children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
10189
+ children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
9838
10190
  }
9839
10191
  );
9840
10192
  }
@@ -9856,7 +10208,7 @@ var AvatarImage$1 = React$1.forwardRef(
9856
10208
  handleLoadingStatusChange(imageLoadingStatus);
9857
10209
  }
9858
10210
  }, [imageLoadingStatus, handleLoadingStatusChange]);
9859
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
10211
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
9860
10212
  }
9861
10213
  );
9862
10214
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -9872,7 +10224,7 @@ var AvatarFallback$1 = React$1.forwardRef(
9872
10224
  return () => window.clearTimeout(timerId);
9873
10225
  }
9874
10226
  }, [delayMs]);
9875
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
10227
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
9876
10228
  }
9877
10229
  );
9878
10230
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -10017,6 +10369,136 @@ const CardFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PU
10017
10369
  }
10018
10370
  ));
10019
10371
  CardFooter.displayName = "CardFooter";
10372
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
10373
+ var use = React$1[" use ".trim().toString()];
10374
+ function isPromiseLike(value) {
10375
+ return typeof value === "object" && value !== null && "then" in value;
10376
+ }
10377
+ function isLazyComponent(element) {
10378
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
10379
+ }
10380
+ // @__NO_SIDE_EFFECTS__
10381
+ function createSlot(ownerName) {
10382
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
10383
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
10384
+ let { children, ...slotProps } = props;
10385
+ if (isLazyComponent(children) && typeof use === "function") {
10386
+ children = use(children._payload);
10387
+ }
10388
+ const childrenArray = React$1.Children.toArray(children);
10389
+ const slottable = childrenArray.find(isSlottable);
10390
+ if (slottable) {
10391
+ const newElement = slottable.props.children;
10392
+ const newChildren = childrenArray.map((child) => {
10393
+ if (child === slottable) {
10394
+ if (React$1.Children.count(newElement) > 1)
10395
+ return React$1.Children.only(null);
10396
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
10397
+ } else {
10398
+ return child;
10399
+ }
10400
+ });
10401
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
10402
+ }
10403
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
10404
+ });
10405
+ Slot2.displayName = `${ownerName}.Slot`;
10406
+ return Slot2;
10407
+ }
10408
+ // @__NO_SIDE_EFFECTS__
10409
+ function createSlotClone(ownerName) {
10410
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
10411
+ let { children, ...slotProps } = props;
10412
+ if (isLazyComponent(children) && typeof use === "function") {
10413
+ children = use(children._payload);
10414
+ }
10415
+ if (React$1.isValidElement(children)) {
10416
+ const childrenRef = getElementRef(children);
10417
+ const props2 = mergeProps(slotProps, children.props);
10418
+ if (children.type !== React$1.Fragment) {
10419
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10420
+ }
10421
+ return React$1.cloneElement(children, props2);
10422
+ }
10423
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
10424
+ });
10425
+ SlotClone.displayName = `${ownerName}.SlotClone`;
10426
+ return SlotClone;
10427
+ }
10428
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
10429
+ function isSlottable(child) {
10430
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
10431
+ }
10432
+ function mergeProps(slotProps, childProps) {
10433
+ const overrideProps = { ...childProps };
10434
+ for (const propName in childProps) {
10435
+ const slotPropValue = slotProps[propName];
10436
+ const childPropValue = childProps[propName];
10437
+ const isHandler = /^on[A-Z]/.test(propName);
10438
+ if (isHandler) {
10439
+ if (slotPropValue && childPropValue) {
10440
+ overrideProps[propName] = (...args) => {
10441
+ const result = childPropValue(...args);
10442
+ slotPropValue(...args);
10443
+ return result;
10444
+ };
10445
+ } else if (slotPropValue) {
10446
+ overrideProps[propName] = slotPropValue;
10447
+ }
10448
+ } else if (propName === "style") {
10449
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10450
+ } else if (propName === "className") {
10451
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10452
+ }
10453
+ }
10454
+ return { ...slotProps, ...overrideProps };
10455
+ }
10456
+ function getElementRef(element) {
10457
+ var _a, _b;
10458
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
10459
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10460
+ if (mayWarn) {
10461
+ return element.ref;
10462
+ }
10463
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
10464
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10465
+ if (mayWarn) {
10466
+ return element.props.ref;
10467
+ }
10468
+ return element.props.ref || element.ref;
10469
+ }
10470
+ var NODES = [
10471
+ "a",
10472
+ "button",
10473
+ "div",
10474
+ "form",
10475
+ "h2",
10476
+ "h3",
10477
+ "img",
10478
+ "input",
10479
+ "label",
10480
+ "li",
10481
+ "nav",
10482
+ "ol",
10483
+ "p",
10484
+ "select",
10485
+ "span",
10486
+ "svg",
10487
+ "ul"
10488
+ ];
10489
+ var Primitive = NODES.reduce((primitive, node) => {
10490
+ const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
10491
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
10492
+ const { asChild, ...primitiveProps } = props;
10493
+ const Comp = asChild ? Slot2 : node;
10494
+ if (typeof window !== "undefined") {
10495
+ window[Symbol.for("radix-ui")] = true;
10496
+ }
10497
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
10498
+ });
10499
+ Node2.displayName = `Primitive.${node}`;
10500
+ return { ...primitive, [node]: Node2 };
10501
+ }, {});
10020
10502
  var NAME$3 = "Separator";
10021
10503
  var DEFAULT_ORIENTATION = "horizontal";
10022
10504
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -10143,7 +10625,7 @@ const SheetDescription = React$1.forwardRef(({ className, ...props }, ref) => /*
10143
10625
  SheetDescription.displayName = Description.displayName;
10144
10626
  function createCollection(name) {
10145
10627
  const PROVIDER_NAME2 = name + "CollectionProvider";
10146
- const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
10628
+ const [createCollectionContext, createCollectionScope2] = createContextScope$1(PROVIDER_NAME2);
10147
10629
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
10148
10630
  PROVIDER_NAME2,
10149
10631
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -10156,7 +10638,7 @@ function createCollection(name) {
10156
10638
  };
10157
10639
  CollectionProvider.displayName = PROVIDER_NAME2;
10158
10640
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
10159
- const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
10641
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot$3(COLLECTION_SLOT_NAME);
10160
10642
  const CollectionSlot = React__default.forwardRef(
10161
10643
  (props, forwardedRef) => {
10162
10644
  const { scope, children } = props;
@@ -10168,7 +10650,7 @@ function createCollection(name) {
10168
10650
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
10169
10651
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
10170
10652
  const ITEM_DATA_ATTR = "data-radix-collection-item";
10171
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
10653
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$3(ITEM_SLOT_NAME);
10172
10654
  const CollectionItemSlot = React__default.forwardRef(
10173
10655
  (props, forwardedRef) => {
10174
10656
  const { scope, children, ...itemData } = props;
@@ -10213,7 +10695,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
10213
10695
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
10214
10696
  var GROUP_NAME$3 = "RovingFocusGroup";
10215
10697
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(GROUP_NAME$3);
10216
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
10698
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
10217
10699
  GROUP_NAME$3,
10218
10700
  [createCollectionScope$2]
10219
10701
  );
@@ -10280,7 +10762,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((props, forwardedRef) => {
10280
10762
  []
10281
10763
  ),
10282
10764
  children: /* @__PURE__ */ jsx(
10283
- Primitive.div,
10765
+ Primitive$3.div,
10284
10766
  {
10285
10767
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
10286
10768
  "data-orientation": orientation,
@@ -10345,7 +10827,7 @@ var RovingFocusGroupItem = React$1.forwardRef(
10345
10827
  focusable,
10346
10828
  active,
10347
10829
  children: /* @__PURE__ */ jsx(
10348
- Primitive.span,
10830
+ Primitive$3.span,
10349
10831
  {
10350
10832
  tabIndex: isCurrentTabStop ? 0 : -1,
10351
10833
  "data-orientation": context.orientation,
@@ -10430,7 +10912,7 @@ function wrapArray$2(array, startIndex) {
10430
10912
  var Root$2 = RovingFocusGroup;
10431
10913
  var Item$1 = RovingFocusGroupItem;
10432
10914
  var TABS_NAME = "Tabs";
10433
- var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
10915
+ var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
10434
10916
  createRovingFocusGroupScope
10435
10917
  ]);
10436
10918
  var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
@@ -10465,7 +10947,7 @@ var Tabs$1 = React$1.forwardRef(
10465
10947
  dir: direction,
10466
10948
  activationMode,
10467
10949
  children: /* @__PURE__ */ jsx(
10468
- Primitive.div,
10950
+ Primitive$3.div,
10469
10951
  {
10470
10952
  dir: direction,
10471
10953
  "data-orientation": orientation,
@@ -10493,7 +10975,7 @@ var TabsList$1 = React$1.forwardRef(
10493
10975
  dir: context.dir,
10494
10976
  loop,
10495
10977
  children: /* @__PURE__ */ jsx(
10496
- Primitive.div,
10978
+ Primitive$3.div,
10497
10979
  {
10498
10980
  role: "tablist",
10499
10981
  "aria-orientation": context.orientation,
@@ -10523,7 +11005,7 @@ var TabsTrigger$1 = React$1.forwardRef(
10523
11005
  focusable: !disabled,
10524
11006
  active: isSelected,
10525
11007
  children: /* @__PURE__ */ jsx(
10526
- Primitive.button,
11008
+ Primitive$3.button,
10527
11009
  {
10528
11010
  type: "button",
10529
11011
  role: "tab",
@@ -10573,7 +11055,7 @@ var TabsContent$1 = React$1.forwardRef(
10573
11055
  return () => cancelAnimationFrame(rAF);
10574
11056
  }, []);
10575
11057
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
10576
- Primitive.div,
11058
+ Primitive$3.div,
10577
11059
  {
10578
11060
  "data-state": isSelected ? "active" : "inactive",
10579
11061
  "data-orientation": context.orientation,
@@ -12995,7 +13477,7 @@ var NAME$2 = "Arrow";
12995
13477
  var Arrow$1 = React$1.forwardRef((props, forwardedRef) => {
12996
13478
  const { children, width = 10, height = 5, ...arrowProps } = props;
12997
13479
  return /* @__PURE__ */ jsx(
12998
- Primitive.svg,
13480
+ Primitive$3.svg,
12999
13481
  {
13000
13482
  ...arrowProps,
13001
13483
  ref: forwardedRef,
@@ -13044,7 +13526,7 @@ function useSize(element) {
13044
13526
  return size2;
13045
13527
  }
13046
13528
  var POPPER_NAME = "Popper";
13047
- var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
13529
+ var [createPopperContext, createPopperScope] = createContextScope$1(POPPER_NAME);
13048
13530
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
13049
13531
  var Popper = (props) => {
13050
13532
  const { __scopePopper, children } = props;
@@ -13067,7 +13549,7 @@ var PopperAnchor = React$1.forwardRef(
13067
13549
  context.onAnchorChange(anchorRef.current);
13068
13550
  }
13069
13551
  });
13070
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
13552
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$3.div, { ...anchorProps, ref: composedRefs });
13071
13553
  }
13072
13554
  );
13073
13555
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -13196,7 +13678,7 @@ var PopperContent = React$1.forwardRef(
13196
13678
  arrowY,
13197
13679
  shouldHideArrow: cannotCenterArrow,
13198
13680
  children: /* @__PURE__ */ jsx(
13199
- Primitive.div,
13681
+ Primitive$3.div,
13200
13682
  {
13201
13683
  "data-side": placedSide,
13202
13684
  "data-align": placedAlign,
@@ -13332,7 +13814,7 @@ var NAME$1 = "VisuallyHidden";
13332
13814
  var VisuallyHidden = React$1.forwardRef(
13333
13815
  (props, forwardedRef) => {
13334
13816
  return /* @__PURE__ */ jsx(
13335
- Primitive.span,
13817
+ Primitive$3.span,
13336
13818
  {
13337
13819
  ...props,
13338
13820
  ref: forwardedRef,
@@ -13343,7 +13825,7 @@ var VisuallyHidden = React$1.forwardRef(
13343
13825
  );
13344
13826
  VisuallyHidden.displayName = NAME$1;
13345
13827
  var Root = VisuallyHidden;
13346
- var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
13828
+ var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
13347
13829
  createPopperScope
13348
13830
  ]);
13349
13831
  var usePopperScope$3 = createPopperScope();
@@ -13504,7 +13986,7 @@ var TooltipTrigger$1 = React$1.forwardRef(
13504
13986
  return () => document.removeEventListener("pointerup", handlePointerUp);
13505
13987
  }, [handlePointerUp]);
13506
13988
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
13507
- Primitive.button,
13989
+ Primitive$3.button,
13508
13990
  {
13509
13991
  "aria-describedby": context.open ? context.contentId : void 0,
13510
13992
  "data-state": context.stateAttribute,
@@ -14127,7 +14609,7 @@ const HtmlViewDisplay = () => {
14127
14609
  onBlur: handleTextareaBlur,
14128
14610
  onClick: handleTextareaClick,
14129
14611
  onKeyDown: handleTextareaKeyDown,
14130
- className: " cteditor-w-full cteditor-flex-1\r\n cteditor-font-mono cteditor-text-[13px] \r\n cteditor-p-3 \r\n cteditor-border cteditor-rounded-lg \r\n cteditor-resize-y cteditor-leading-[1.4] \r\n cteditor-outline-none cteditor-transition-colors cteditor-duration-200 \r\n cteditor-whitespace-pre-wrap cteditor-break-words\r\n dark:cteditor-text-background\r\n cteditor-text-foreground\r\n cteditor-bg-foreground/5\r\n",
14612
+ className: " cteditor-w-full cteditor-flex-1\n cteditor-font-mono cteditor-text-[13px] \n cteditor-p-3 \n cteditor-border cteditor-rounded-lg \n cteditor-resize-y cteditor-leading-[1.4] \n cteditor-outline-none cteditor-transition-colors cteditor-duration-200 \n cteditor-whitespace-pre-wrap cteditor-break-words\n dark:cteditor-text-background\n cteditor-text-foreground\n cteditor-bg-foreground/5\n",
14131
14613
  placeholder: "HTML content will appear here... Edit and click 'Sync to Editor' to apply changes."
14132
14614
  }
14133
14615
  )
@@ -15333,7 +15815,7 @@ const EmbedComponent = ({ url, displayType, alignment, width: initialWidth, heig
15333
15815
  }
15334
15816
  );
15335
15817
  };
15336
- const FileComponent = React$1.lazy(() => import("./index-08c4c610.js"));
15818
+ const FileComponent = React$1.lazy(() => import("./index-35336e5d.js"));
15337
15819
  function convertFileElement(domNode) {
15338
15820
  if (domNode instanceof HTMLDivElement) {
15339
15821
  const dataUrl = domNode.getAttribute("data-lexical-file-src");
@@ -15816,7 +16298,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
15816
16298
  var SELECTION_KEYS$1 = [" ", "Enter"];
15817
16299
  var SELECT_NAME = "Select";
15818
16300
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(SELECT_NAME);
15819
- var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
16301
+ var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
15820
16302
  createCollectionScope$1,
15821
16303
  createPopperScope
15822
16304
  ]);
@@ -15953,7 +16435,7 @@ var SelectTrigger$1 = React$1.forwardRef(
15953
16435
  }
15954
16436
  };
15955
16437
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
15956
- Primitive.button,
16438
+ Primitive$3.button,
15957
16439
  {
15958
16440
  type: "button",
15959
16441
  role: "combobox",
@@ -16014,7 +16496,7 @@ var SelectValue$1 = React$1.forwardRef(
16014
16496
  onValueNodeHasChildrenChange(hasChildren);
16015
16497
  }, [onValueNodeHasChildrenChange, hasChildren]);
16016
16498
  return /* @__PURE__ */ jsx(
16017
- Primitive.span,
16499
+ Primitive$3.span,
16018
16500
  {
16019
16501
  ...valueProps,
16020
16502
  ref: composedRefs,
@@ -16029,7 +16511,7 @@ var ICON_NAME = "SelectIcon";
16029
16511
  var SelectIcon = React$1.forwardRef(
16030
16512
  (props, forwardedRef) => {
16031
16513
  const { __scopeSelect, children, ...iconProps } = props;
16032
- return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
16514
+ return /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
16033
16515
  }
16034
16516
  );
16035
16517
  SelectIcon.displayName = ICON_NAME;
@@ -16060,7 +16542,7 @@ SelectContent$1.displayName = CONTENT_NAME$3;
16060
16542
  var CONTENT_MARGIN = 10;
16061
16543
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$3);
16062
16544
  var CONTENT_IMPL_NAME = "SelectContentImpl";
16063
- var Slot$2 = /* @__PURE__ */ createSlot("SelectContent.RemoveScroll");
16545
+ var Slot$2 = /* @__PURE__ */ createSlot$3("SelectContent.RemoveScroll");
16064
16546
  var SelectContentImpl = React$1.forwardRef(
16065
16547
  (props, forwardedRef) => {
16066
16548
  const {
@@ -16449,7 +16931,7 @@ var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
16449
16931
  zIndex: contentZIndex
16450
16932
  },
16451
16933
  children: /* @__PURE__ */ jsx(
16452
- Primitive.div,
16934
+ Primitive$3.div,
16453
16935
  {
16454
16936
  ...popperProps,
16455
16937
  ref: composedRefs,
@@ -16523,7 +17005,7 @@ var SelectViewport = React$1.forwardRef(
16523
17005
  }
16524
17006
  ),
16525
17007
  /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
16526
- Primitive.div,
17008
+ Primitive$3.div,
16527
17009
  {
16528
17010
  "data-radix-select-viewport": "",
16529
17011
  role: "presentation",
@@ -16578,7 +17060,7 @@ var SelectGroup = React$1.forwardRef(
16578
17060
  (props, forwardedRef) => {
16579
17061
  const { __scopeSelect, ...groupProps } = props;
16580
17062
  const groupId = useId();
16581
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
17063
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
16582
17064
  }
16583
17065
  );
16584
17066
  SelectGroup.displayName = GROUP_NAME$2;
@@ -16587,7 +17069,7 @@ var SelectLabel$1 = React$1.forwardRef(
16587
17069
  (props, forwardedRef) => {
16588
17070
  const { __scopeSelect, ...labelProps } = props;
16589
17071
  const groupContext = useSelectGroupContext(LABEL_NAME$2, __scopeSelect);
16590
- return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
17072
+ return /* @__PURE__ */ jsx(Primitive$3.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
16591
17073
  }
16592
17074
  );
16593
17075
  SelectLabel$1.displayName = LABEL_NAME$2;
@@ -16646,7 +17128,7 @@ var SelectItem$1 = React$1.forwardRef(
16646
17128
  disabled,
16647
17129
  textValue,
16648
17130
  children: /* @__PURE__ */ jsx(
16649
- Primitive.div,
17131
+ Primitive$3.div,
16650
17132
  {
16651
17133
  role: "option",
16652
17134
  "aria-labelledby": textId,
@@ -16734,7 +17216,7 @@ var SelectItemText = React$1.forwardRef(
16734
17216
  return () => onNativeOptionRemove(nativeOption);
16735
17217
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
16736
17218
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16737
- /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
17219
+ /* @__PURE__ */ jsx(Primitive$3.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
16738
17220
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
16739
17221
  ] });
16740
17222
  }
@@ -16745,7 +17227,7 @@ var SelectItemIndicator = React$1.forwardRef(
16745
17227
  (props, forwardedRef) => {
16746
17228
  const { __scopeSelect, ...itemIndicatorProps } = props;
16747
17229
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
16748
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
17230
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
16749
17231
  }
16750
17232
  );
16751
17233
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -16836,7 +17318,7 @@ var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
16836
17318
  (_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
16837
17319
  }, [getItems]);
16838
17320
  return /* @__PURE__ */ jsx(
16839
- Primitive.div,
17321
+ Primitive$3.div,
16840
17322
  {
16841
17323
  "aria-hidden": true,
16842
17324
  ...scrollIndicatorProps,
@@ -16864,7 +17346,7 @@ var SEPARATOR_NAME$2 = "SelectSeparator";
16864
17346
  var SelectSeparator$1 = React$1.forwardRef(
16865
17347
  (props, forwardedRef) => {
16866
17348
  const { __scopeSelect, ...separatorProps } = props;
16867
- return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
17349
+ return /* @__PURE__ */ jsx(Primitive$3.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
16868
17350
  }
16869
17351
  );
16870
17352
  SelectSeparator$1.displayName = SEPARATOR_NAME$2;
@@ -16902,7 +17384,7 @@ var SelectBubbleInput = React$1.forwardRef(
16902
17384
  }
16903
17385
  }, [prevValue, value]);
16904
17386
  return /* @__PURE__ */ jsx(
16905
- Primitive.select,
17387
+ Primitive$3.select,
16906
17388
  {
16907
17389
  ...props,
16908
17390
  style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
@@ -20171,8 +20653,6 @@ function TableOptionPlugin({ isActive }) {
20171
20653
  if ($isTableCellNode(cellNode)) {
20172
20654
  cellNode.setHeaderStyles(TableCellHeaderStates.COLUMN);
20173
20655
  cellNode.setBackgroundColor(headerColor);
20174
- const textNode = $createTextNode("​");
20175
- cellNode.append(textNode);
20176
20656
  }
20177
20657
  }
20178
20658
  }
@@ -20866,10 +21346,10 @@ const PDF_CONFIG = {
20866
21346
  };
20867
21347
  const loadHtml2Pdf = async () => {
20868
21348
  try {
20869
- const mod = await import("./html2pdf.bundle.min-e3118523.js").then((n) => n.h);
21349
+ const mod = await import("./html2pdf.bundle.min-4f1c3930.js").then((n) => n.h);
20870
21350
  return (mod == null ? void 0 : mod.default) || mod;
20871
21351
  } catch {
20872
- const mod2 = await import("./html2pdf.bundle-2195a04c.js").then((n) => n.h);
21352
+ const mod2 = await import("./html2pdf.bundle-d4225b87.js").then((n) => n.h);
20873
21353
  return (mod2 == null ? void 0 : mod2.default) || mod2;
20874
21354
  }
20875
21355
  };
@@ -21621,7 +22101,7 @@ var SUB_CLOSE_KEYS = {
21621
22101
  };
21622
22102
  var MENU_NAME = "Menu";
21623
22103
  var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
21624
- var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
22104
+ var [createMenuContext, createMenuScope] = createContextScope$1(MENU_NAME, [
21625
22105
  createCollectionScope,
21626
22106
  createPopperScope,
21627
22107
  createRovingFocusGroupScope
@@ -21746,7 +22226,7 @@ var MenuRootContentNonModal = React$1.forwardRef((props, forwardedRef) => {
21746
22226
  }
21747
22227
  );
21748
22228
  });
21749
- var Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock");
22229
+ var Slot$1 = /* @__PURE__ */ createSlot$3("MenuContent.ScrollLock");
21750
22230
  var MenuContentImpl = React$1.forwardRef(
21751
22231
  (props, forwardedRef) => {
21752
22232
  const {
@@ -21948,7 +22428,7 @@ var GROUP_NAME$1 = "MenuGroup";
21948
22428
  var MenuGroup = React$1.forwardRef(
21949
22429
  (props, forwardedRef) => {
21950
22430
  const { __scopeMenu, ...groupProps } = props;
21951
- return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
22431
+ return /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", ...groupProps, ref: forwardedRef });
21952
22432
  }
21953
22433
  );
21954
22434
  MenuGroup.displayName = GROUP_NAME$1;
@@ -21956,7 +22436,7 @@ var LABEL_NAME$1 = "MenuLabel";
21956
22436
  var MenuLabel = React$1.forwardRef(
21957
22437
  (props, forwardedRef) => {
21958
22438
  const { __scopeMenu, ...labelProps } = props;
21959
- return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
22439
+ return /* @__PURE__ */ jsx(Primitive$3.div, { ...labelProps, ref: forwardedRef });
21960
22440
  }
21961
22441
  );
21962
22442
  MenuLabel.displayName = LABEL_NAME$1;
@@ -22036,7 +22516,7 @@ var MenuItemImpl = React$1.forwardRef(
22036
22516
  disabled,
22037
22517
  textValue: textValue ?? textContent,
22038
22518
  children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
22039
- Primitive.div,
22519
+ Primitive$3.div,
22040
22520
  {
22041
22521
  role: "menuitem",
22042
22522
  "data-highlighted": isFocused ? "" : void 0,
@@ -22147,7 +22627,7 @@ var MenuItemIndicator = React$1.forwardRef(
22147
22627
  {
22148
22628
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
22149
22629
  children: /* @__PURE__ */ jsx(
22150
- Primitive.span,
22630
+ Primitive$3.span,
22151
22631
  {
22152
22632
  ...itemIndicatorProps,
22153
22633
  ref: forwardedRef,
@@ -22164,7 +22644,7 @@ var MenuSeparator = React$1.forwardRef(
22164
22644
  (props, forwardedRef) => {
22165
22645
  const { __scopeMenu, ...separatorProps } = props;
22166
22646
  return /* @__PURE__ */ jsx(
22167
- Primitive.div,
22647
+ Primitive$3.div,
22168
22648
  {
22169
22649
  role: "separator",
22170
22650
  "aria-orientation": "horizontal",
@@ -22424,7 +22904,7 @@ var Arrow2 = MenuArrow;
22424
22904
  var SubTrigger = MenuSubTrigger;
22425
22905
  var SubContent = MenuSubContent;
22426
22906
  var DROPDOWN_MENU_NAME = "DropdownMenu";
22427
- var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
22907
+ var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
22428
22908
  DROPDOWN_MENU_NAME,
22429
22909
  [createMenuScope]
22430
22910
  );
@@ -22471,7 +22951,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
22471
22951
  const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
22472
22952
  const menuScope = useMenuScope(__scopeDropdownMenu);
22473
22953
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
22474
- Primitive.button,
22954
+ Primitive$3.button,
22475
22955
  {
22476
22956
  type: "button",
22477
22957
  id: context.triggerId,
@@ -22810,13 +23290,13 @@ const AlignMenu = () => {
22810
23290
  {
22811
23291
  variant: "ghost",
22812
23292
  size: "sm",
22813
- className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\r\n",
23293
+ className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\n",
22814
23294
  children: [
22815
23295
  /* @__PURE__ */ jsx(AlignLeft, { className: "!cteditor-size-4" }),
22816
23296
  /* @__PURE__ */ jsx(
22817
23297
  ChevronDown,
22818
23298
  {
22819
- className: "!cteditor-size-4 cteditor-opacity-50\r\n"
23299
+ className: "!cteditor-size-4 cteditor-opacity-50\n"
22820
23300
  }
22821
23301
  )
22822
23302
  ]
@@ -23319,7 +23799,7 @@ var V = "undefined" != typeof window ? useLayoutEffect$1 : useEffect$1, $ = func
23319
23799
  return React__default.createElement(U, u({}, r2, { colorModel: W }));
23320
23800
  };
23321
23801
  var POPOVER_NAME = "Popover";
23322
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
23802
+ var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
23323
23803
  createPopperScope
23324
23804
  ]);
23325
23805
  var usePopperScope = createPopperScope();
@@ -23383,7 +23863,7 @@ var PopoverTrigger$1 = React$1.forwardRef(
23383
23863
  const popperScope = usePopperScope(__scopePopover);
23384
23864
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
23385
23865
  const trigger = /* @__PURE__ */ jsx(
23386
- Primitive.button,
23866
+ Primitive$3.button,
23387
23867
  {
23388
23868
  type: "button",
23389
23869
  "aria-haspopup": "dialog",
@@ -23419,7 +23899,7 @@ var PopoverContent$1 = React$1.forwardRef(
23419
23899
  }
23420
23900
  );
23421
23901
  PopoverContent$1.displayName = CONTENT_NAME;
23422
- var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
23902
+ var Slot = /* @__PURE__ */ createSlot$3("PopoverContent.RemoveScroll");
23423
23903
  var PopoverContentModal = React$1.forwardRef(
23424
23904
  (props, forwardedRef) => {
23425
23905
  const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
@@ -23576,7 +24056,7 @@ var PopoverClose = React$1.forwardRef(
23576
24056
  const { __scopePopover, ...closeProps } = props;
23577
24057
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
23578
24058
  return /* @__PURE__ */ jsx(
23579
- Primitive.button,
24059
+ Primitive$3.button,
23580
24060
  {
23581
24061
  type: "button",
23582
24062
  ...closeProps,
@@ -23791,7 +24271,7 @@ const ColorPicker$2 = ({
23791
24271
  {
23792
24272
  onMouseDown: (e) => e.preventDefault(),
23793
24273
  onClick: () => setShowAdvanced(!showAdvanced),
23794
- className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\r\n",
24274
+ className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\n",
23795
24275
  children: [
23796
24276
  /* @__PURE__ */ jsx("span", { className: "cteditor-text-xs", children: showAdvanced ? "▼" : "▶" }),
23797
24277
  showAdvanced ? "Hide Advanced" : "Show Advanced"
@@ -30439,31 +30919,43 @@ const EmbedPreviewPlugin = ({
30439
30919
  if (!text.match(/^https?:\/\//)) {
30440
30920
  return false;
30441
30921
  }
30922
+ const selection = $getSelection();
30923
+ if (!$isRangeSelection(selection)) {
30924
+ return false;
30925
+ }
30926
+ const anchorNode = selection.anchor.getNode();
30927
+ let isInsideTableCell = false;
30928
+ let currentNode = anchorNode;
30929
+ while (currentNode) {
30930
+ if ($isTableCellNode(currentNode)) {
30931
+ isInsideTableCell = true;
30932
+ break;
30933
+ }
30934
+ currentNode = currentNode.getParent();
30935
+ }
30936
+ if (isInsideTableCell) {
30937
+ selection.insertText(text);
30938
+ return true;
30939
+ }
30442
30940
  const isVideoEmbed = VIDEO_EMBED_URLS.some(
30443
30941
  (domain) => text.includes(domain)
30444
30942
  );
30445
30943
  if (isVideoEmbed) {
30446
30944
  console.log("Detected video embed URL:", text);
30447
- const selection2 = $getSelection();
30448
- if ($isRangeSelection(selection2)) {
30449
- const embedNode = $createEmbedNode(text);
30450
- embedNode.setDisplayType("embed");
30451
- selection2.insertNodes([embedNode]);
30452
- console.log("Inserted video embed node");
30453
- }
30945
+ const embedNode2 = $createEmbedNode(text);
30946
+ embedNode2.setDisplayType("embed");
30947
+ selection.insertNodes([embedNode2]);
30948
+ console.log("Inserted video embed node");
30454
30949
  return true;
30455
30950
  }
30456
- const selection = $getSelection();
30457
- if ($isRangeSelection(selection)) {
30458
- const embedNode = $createEmbedNode(text);
30459
- if (text.match(/\.(pdf|docx?|xlsx?|pptx?|zip|rar|txt)$/)) {
30460
- embedNode.setDisplayType("card");
30461
- } else {
30462
- embedNode.setDisplayType("url");
30463
- }
30464
- selection.insertNodes([embedNode]);
30465
- console.log("Inserted embed node with URL:", text);
30951
+ const embedNode = $createEmbedNode(text);
30952
+ if (text.match(/\.(pdf|docx?|xlsx?|pptx?|zip|rar|txt)$/)) {
30953
+ embedNode.setDisplayType("card");
30954
+ } else {
30955
+ embedNode.setDisplayType("url");
30466
30956
  }
30957
+ selection.insertNodes([embedNode]);
30958
+ console.log("Inserted embed node with URL:", text);
30467
30959
  return true;
30468
30960
  },
30469
30961
  COMMAND_PRIORITY_HIGH
@@ -34573,6 +35065,23 @@ function RichTextPastePlugin() {
34573
35065
  const selection = $getSelection();
34574
35066
  if (!$isRangeSelection(selection))
34575
35067
  return;
35068
+ const anchorNode = selection.anchor.getNode();
35069
+ let isInsideTableCell = false;
35070
+ let currentNode = anchorNode;
35071
+ while (currentNode) {
35072
+ if ($isTableCellNode(currentNode)) {
35073
+ isInsideTableCell = true;
35074
+ break;
35075
+ }
35076
+ currentNode = currentNode.getParent();
35077
+ }
35078
+ if (isInsideTableCell) {
35079
+ if (plainText) {
35080
+ const cleanText = plainText.replace(/[\r\n]+/g, " ").trim();
35081
+ selection.insertText(cleanText);
35082
+ }
35083
+ return;
35084
+ }
34576
35085
  try {
34577
35086
  const nodes = convertHTMLToNodesWithStyles(htmlContent, editor);
34578
35087
  if (nodes.length > 0) {
@@ -35185,6 +35694,21 @@ function PasteOptionsPlugin() {
35185
35694
  const selection = $getSelection();
35186
35695
  if (!$isRangeSelection(selection))
35187
35696
  return;
35697
+ const anchorNode = selection.anchor.getNode();
35698
+ let isInsideTableCell = false;
35699
+ let currentNode = anchorNode;
35700
+ while (currentNode) {
35701
+ if ($isTableCellNode(currentNode)) {
35702
+ isInsideTableCell = true;
35703
+ break;
35704
+ }
35705
+ currentNode = currentNode.getParent();
35706
+ }
35707
+ if (isInsideTableCell) {
35708
+ const cleanText = pasteData.plain.replace(/[\r\n]+/g, " ").trim();
35709
+ selection.insertText(cleanText);
35710
+ return;
35711
+ }
35188
35712
  let nodes = [];
35189
35713
  if (mode === "plain") {
35190
35714
  nodes = convertPlainTextToNodes(pasteData.plain);
@@ -36572,15 +37096,7 @@ function TableActionMenu({
36572
37096
  }
36573
37097
  if (newHeaderCell.getChildrenSize() === 0) {
36574
37098
  const paragraph = $createParagraphNode();
36575
- const textNode = $createTextNode("​");
36576
- paragraph.append(textNode);
36577
37099
  newHeaderCell.append(paragraph);
36578
- } else {
36579
- const firstChild = newHeaderCell.getFirstChild();
36580
- if ($isParagraphNode(firstChild) && firstChild.getTextContentSize() === 0) {
36581
- const textNode = $createTextNode("​");
36582
- firstChild.append(textNode);
36583
- }
36584
37100
  }
36585
37101
  }
36586
37102
  }
@@ -36916,7 +37432,7 @@ function TableActionMenu({
36916
37432
  /* @__PURE__ */ jsxs(
36917
37433
  "div",
36918
37434
  {
36919
- className: "dropdown table-drop cteditor-z-[100]\r\n cteditor-flex\r\n cteditor-flex-col\r\n cteditor-fixed\r\n cteditor-min-h-[40px]\r\n cteditor-min-w-[200px]\r\n cteditor-p-[6px]\r\n cteditor-overflow-y-auto\r\n cteditor-overflow-x-hidden \r\n cteditor-shadow-xl\r\n cteditor-rounded-lg\r\n cteditor-border\r\n cteditor-border-border\r\n cteditor-bg-background \r\n cteditor-backdrop-blur-md\r\n cteditor-space-y-0.5\r\n ",
37435
+ className: "dropdown table-drop cteditor-z-[100]\n cteditor-flex\n cteditor-flex-col\n cteditor-fixed\n cteditor-min-h-[40px]\n cteditor-min-w-[200px]\n cteditor-p-[6px]\n cteditor-overflow-y-auto\n cteditor-overflow-x-hidden \n cteditor-shadow-xl\n cteditor-rounded-lg\n cteditor-border\n cteditor-border-border\n cteditor-bg-background \n cteditor-backdrop-blur-md\n cteditor-space-y-0.5\n ",
36920
37436
  ref: dropDownRef,
36921
37437
  onClick: (e) => {
36922
37438
  e.stopPropagation();
@@ -38220,15 +38736,7 @@ function TableHoverActionsContainer({
38220
38736
  }
38221
38737
  if (newHeaderCell.getChildrenSize() === 0) {
38222
38738
  const paragraph = $createParagraphNode();
38223
- const textNode = $createTextNode("​");
38224
- paragraph.append(textNode);
38225
38739
  newHeaderCell.append(paragraph);
38226
- } else {
38227
- const firstChild = newHeaderCell.getFirstChild();
38228
- if ($isParagraphNode(firstChild) && firstChild.getTextContentSize() === 0) {
38229
- const textNode = $createTextNode("​");
38230
- firstChild.append(textNode);
38231
- }
38232
38740
  }
38233
38741
  }
38234
38742
  }
@@ -39348,6 +39856,47 @@ const WordCountPlugin = () => {
39348
39856
  ] })
39349
39857
  ] });
39350
39858
  };
39859
+ const NORMALIZED_CODE_BLOCK_COLORS = {
39860
+ // Dark neutral background - works on both light and dark pages
39861
+ backgroundColor: "#2d2d2d",
39862
+ // Light text for readability on dark background
39863
+ textColor: "#f8f8f2",
39864
+ // Slightly lighter gutter background
39865
+ gutterBackgroundColor: "#252525",
39866
+ gutterTextColor: "#8c8c8c",
39867
+ // Syntax highlighting token colors (inspired by popular dark themes like Monokai/One Dark)
39868
+ tokenColors: {
39869
+ comment: "#6a9955",
39870
+ // Green for comments
39871
+ punctuation: "#d4d4d4",
39872
+ // Light gray for punctuation
39873
+ property: "#e06c75",
39874
+ // Red/pink for properties, numbers, tags
39875
+ selector: "#98c379",
39876
+ // Green for strings, selectors
39877
+ operator: "#d19a66",
39878
+ // Orange for operators
39879
+ attr: "#61afef",
39880
+ // Blue for keywords, attributes
39881
+ variable: "#e5c07b",
39882
+ // Yellow for variables, regex
39883
+ function: "#c678dd"
39884
+ // Purple for functions, class names
39885
+ }
39886
+ };
39887
+ function getNormalizedTokenColor(tokenClass) {
39888
+ const classToColor = {
39889
+ "PlaygroundEditorTheme__tokenComment": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.comment,
39890
+ "PlaygroundEditorTheme__tokenPunctuation": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.punctuation,
39891
+ "PlaygroundEditorTheme__tokenProperty": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.property,
39892
+ "PlaygroundEditorTheme__tokenSelector": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.selector,
39893
+ "PlaygroundEditorTheme__tokenOperator": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.operator,
39894
+ "PlaygroundEditorTheme__tokenAttr": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.attr,
39895
+ "PlaygroundEditorTheme__tokenVariable": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.variable,
39896
+ "PlaygroundEditorTheme__tokenFunction": NORMALIZED_CODE_BLOCK_COLORS.tokenColors.function
39897
+ };
39898
+ return classToColor[tokenClass] || NORMALIZED_CODE_BLOCK_COLORS.textColor;
39899
+ }
39351
39900
  function exportEditorWithInlineStyle(editor) {
39352
39901
  const rootElement = editor.getRootElement();
39353
39902
  if (!rootElement)
@@ -39556,7 +40105,7 @@ function processHtmlForExport(html, tableStyleMap, codeBlockStyles) {
39556
40105
  });
39557
40106
  });
39558
40107
  cleanupHeaderCellStructure(doc.body);
39559
- applyCodeSyntaxHighlighting(doc.body, codeBlockStyles);
40108
+ applyCodeSyntaxHighlighting(doc.body);
39560
40109
  processCodeBlocks(doc.body, codeBlockStyles);
39561
40110
  applyGenericSafeStyles(doc.body, codeBlockStyles);
39562
40111
  cleanupClasses(doc.body);
@@ -39737,12 +40286,10 @@ function applyGenericSafeStyles(container, codeBlockStyles) {
39737
40286
  addStyle("ul, ol", "margin: 1em 0; padding-left: 40px;");
39738
40287
  addStyle("li", "margin: 0.5em 0;");
39739
40288
  addStyle("a", "color: #0066cc; text-decoration: underline;");
39740
- const codeBlockBg = codeBlockStyles.backgroundColor || "#f5f5f5";
39741
- const codeBlockText = codeBlockStyles.textColor || "#333";
39742
40289
  const codeBlockFont = codeBlockStyles.fontFamily || "Menlo, Consolas, Monaco, monospace";
39743
40290
  addStyle(
39744
40291
  "code:not(.code-line-numbers):not(.code-content):not([data-language]):not([data-highlight-language])",
39745
- `font-family: ${codeBlockFont}; background-color: ${codeBlockBg}; color: ${codeBlockText}; padding: 2px 4px; border-radius: 3px;`
40292
+ `font-family: ${codeBlockFont}; background-color: ${NORMALIZED_CODE_BLOCK_COLORS.backgroundColor}; color: ${NORMALIZED_CODE_BLOCK_COLORS.textColor}; padding: 2px 6px; border-radius: 3px;`
39746
40293
  );
39747
40294
  addStyle(
39748
40295
  "blockquote",
@@ -39754,15 +40301,18 @@ function applyGenericSafeStyles(container, codeBlockStyles) {
39754
40301
  }
39755
40302
  function applyCodeSyntaxHighlighting(container, codeBlockStyles) {
39756
40303
  const codeBlocks = container.querySelectorAll('code, pre[data-language], pre[data-highlight-language], pre[spellcheck="false"]');
39757
- codeBlocks.forEach((codeBlock, codeBlockIndex) => {
39758
- const capturedSpanColors = codeBlockStyles.spanColors.get(codeBlockIndex) || [];
40304
+ codeBlocks.forEach((codeBlock) => {
39759
40305
  const spans = codeBlock.querySelectorAll("span");
39760
- spans.forEach((span, spanIndex) => {
40306
+ spans.forEach((span) => {
39761
40307
  const htmlSpan = span;
39762
- if (spanIndex < capturedSpanColors.length) {
39763
- const { color } = capturedSpanColors[spanIndex];
39764
- if (color && color !== codeBlockStyles.textColor) {
39765
- htmlSpan.style.color = color;
40308
+ const classList = Array.from(htmlSpan.classList);
40309
+ for (const className of classList) {
40310
+ if (className.startsWith("PlaygroundEditorTheme__token")) {
40311
+ const normalizedColor = getNormalizedTokenColor(className);
40312
+ if (normalizedColor !== NORMALIZED_CODE_BLOCK_COLORS.textColor) {
40313
+ htmlSpan.style.color = normalizedColor;
40314
+ }
40315
+ break;
39766
40316
  }
39767
40317
  }
39768
40318
  });
@@ -39798,8 +40348,8 @@ function processCodeBlocks(container, codeBlockStyles) {
39798
40348
  const fontFamily = codeBlockStyles.fontFamily || "Menlo, Consolas, Monaco, monospace";
39799
40349
  const fontSize = codeBlockStyles.fontSize || "13px";
39800
40350
  const lineHeight = codeBlockStyles.lineHeight || "1.53";
39801
- const gutterBg = codeBlockStyles.gutterBackgroundColor || "rgba(0, 0, 0, 0.1)";
39802
- const gutterColor = codeBlockStyles.gutterTextColor || "rgba(0, 0, 0, 0.5)";
40351
+ const gutterBg = NORMALIZED_CODE_BLOCK_COLORS.gutterBackgroundColor;
40352
+ const gutterColor = NORMALIZED_CODE_BLOCK_COLORS.gutterTextColor;
39803
40353
  gutter.style.cssText = [
39804
40354
  "display: table-cell",
39805
40355
  "vertical-align: top",
@@ -39812,7 +40362,7 @@ function processCodeBlocks(container, codeBlockStyles) {
39812
40362
  `font-family: ${fontFamily}`,
39813
40363
  `font-size: ${fontSize}`,
39814
40364
  `line-height: ${lineHeight}`,
39815
- "border-right: 1px solid rgba(128, 128, 128, 0.3)",
40365
+ "border-right: 1px solid #404040",
39816
40366
  "border-top-left-radius: 5px",
39817
40367
  "border-bottom-left-radius: 5px",
39818
40368
  "user-select: none",
@@ -39835,8 +40385,8 @@ function processCodeBlocks(container, codeBlockStyles) {
39835
40385
  while (htmlCodeBlock.firstChild) {
39836
40386
  codeContent.appendChild(htmlCodeBlock.firstChild);
39837
40387
  }
39838
- const codeBlockBg = codeBlockStyles.backgroundColor || "#f5f5f5";
39839
- const codeBlockText = codeBlockStyles.textColor || "#333";
40388
+ const codeBlockBg = NORMALIZED_CODE_BLOCK_COLORS.backgroundColor;
40389
+ const codeBlockText = NORMALIZED_CODE_BLOCK_COLORS.textColor;
39840
40390
  htmlCodeBlock.style.cssText = [
39841
40391
  "display: table",
39842
40392
  "table-layout: fixed",
@@ -41063,4 +41613,4 @@ export {
41063
41613
  useReactNativeBridge as w,
41064
41614
  editorConfig as x
41065
41615
  };
41066
- //# sourceMappingURL=index-455942f2.js.map
41616
+ //# sourceMappingURL=index-6717344b.js.map