@pstdio/ui 0.8.0 → 0.10.0

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 (93) hide show
  1. package/dist/{MermaidComponent-D7Baqkwx.js → MermaidComponent-Cz_Iob5U.js} +56 -53
  2. package/dist/MermaidComponent-Cz_Iob5U.js.map +1 -0
  3. package/dist/chat-ui.js +117 -117
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/data-renderer/data-renderer-board.d.ts +1 -0
  6. package/dist/components/data-renderer/data-renderer-card.d.ts +5 -20
  7. package/dist/components/data-renderer/data-renderer-content.d.ts +20 -0
  8. package/dist/components/data-renderer/data-renderer-grouping.d.ts +11 -10
  9. package/dist/components/data-renderer/data-renderer-helpers.d.ts +63 -15
  10. package/dist/components/data-renderer/data-renderer-list.d.ts +13 -8
  11. package/dist/components/data-renderer/data-renderer-story-fixtures.d.ts +13 -0
  12. package/dist/components/data-renderer/data-renderer-toolbar.d.ts +12 -0
  13. package/dist/components/data-renderer/data-renderer.d.ts +15 -23
  14. package/dist/components/data-renderer/display-menu.d.ts +9 -8
  15. package/dist/components/data-renderer/filter-menu.d.ts +5 -4
  16. package/dist/components/data-renderer/types.d.ts +83 -49
  17. package/dist/components/data-renderer/use-data-renderer-store.d.ts +15 -11
  18. package/dist/components/data-renderer/use-resolved-attributes.d.ts +14 -0
  19. package/dist/components/diff-viewer/diff-card-body.d.ts +10 -0
  20. package/dist/components/diff-viewer/diff-card-content.d.ts +1 -0
  21. package/dist/components/diff-viewer/diff-card.d.ts +1 -0
  22. package/dist/components/diff-viewer/diff-drawer-empty-state.d.ts +1 -0
  23. package/dist/components/diff-viewer/diff-drawer-height.d.ts +10 -0
  24. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +47 -0
  25. package/dist/components/diff-viewer/diff-drawer.d.ts +2 -7
  26. package/dist/components/diff-viewer/diff-size.d.ts +2 -0
  27. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +19 -0
  28. package/dist/components/icon-color-picker.d.ts +29 -0
  29. package/dist/components/list-row/list-row-content.d.ts +9 -0
  30. package/dist/components/list-row/list-row.types.d.ts +3 -0
  31. package/dist/components/palette.d.ts +1 -0
  32. package/dist/components/param-editor/index.d.ts +2 -0
  33. package/dist/components/rich-text/shared/lexical-code.d.ts +2 -0
  34. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +1 -1
  35. package/dist/components/rich-text/shared/prism-global.d.ts +2 -0
  36. package/dist/components/tab-strip/tab-visibility-filter.d.ts +19 -0
  37. package/dist/components/tab-strip/tab-visibility.store.d.ts +41 -0
  38. package/dist/components/tag-editor/index.d.ts +4 -0
  39. package/dist/components/tag-editor/tag-editor-row.d.ts +19 -0
  40. package/dist/components/tag-editor/tag-editor.d.ts +2 -0
  41. package/dist/components/tag-editor/tag-editor.types.d.ts +44 -0
  42. package/dist/components/tag-editor/tag-settings-panel.d.ts +24 -0
  43. package/dist/components/tree-list/tree-list-model.d.ts +58 -0
  44. package/dist/components/tree-list/tree-list-node-row.d.ts +20 -0
  45. package/dist/components/tree-list/tree-list-order-filter.d.ts +3 -0
  46. package/dist/components/tree-list/tree-list-order.store.d.ts +42 -0
  47. package/dist/components/tree-list/tree-list-reorder.d.ts +13 -0
  48. package/dist/components/tree-list/tree-list-section-header.d.ts +14 -0
  49. package/dist/components/tree-list/tree-list-sortable.d.ts +22 -0
  50. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +17 -0
  51. package/dist/components/tree-list/tree-list-visibility.store.d.ts +45 -0
  52. package/dist/components/tree-list/tree-list.d.ts +7 -27
  53. package/dist/components/tree-list/tree-list.types.d.ts +2 -0
  54. package/dist/components/tree-list/use-tree-list-keyboard-navigation.d.ts +15 -0
  55. package/dist/get-file-type-icon-ufFb0IkR.js +102 -0
  56. package/dist/get-file-type-icon-ufFb0IkR.js.map +1 -0
  57. package/dist/index.d.ts +22 -3
  58. package/dist/index.js +5840 -4141
  59. package/dist/index.js.map +1 -1
  60. package/dist/{rich-message-33DPxuWJ.js → rich-message-CEOSsdR2.js} +428 -421
  61. package/dist/rich-message-CEOSsdR2.js.map +1 -0
  62. package/dist/rich-text.js +26 -26
  63. package/dist/rich-text.js.map +1 -1
  64. package/dist/theme/custom/index.d.ts +0 -3
  65. package/dist/theme/index.d.ts +1 -1
  66. package/dist/theme/recipes/editable.d.ts +46 -1
  67. package/dist/theme/recipes/tabs.d.ts +30 -0
  68. package/dist/theme/tokens/colors.d.ts +6 -0
  69. package/dist/{theme-D-aCJqTf.js → theme-DOFdi_Ir.js} +244 -149
  70. package/dist/theme-DOFdi_Ir.js.map +1 -0
  71. package/dist/theme.js +2 -4
  72. package/dist/utils/browser-storage.d.ts +7 -0
  73. package/dist/utils/prism.d.ts +1 -0
  74. package/package.json +9 -4
  75. package/dist/MermaidComponent-D7Baqkwx.js.map +0 -1
  76. package/dist/components/data-renderer/tag-badge.d.ts +0 -10
  77. package/dist/components/data-renderer/tag-option-icon.d.ts +0 -2
  78. package/dist/get-file-type-icon-Bwqf1WXA.js +0 -101
  79. package/dist/get-file-type-icon-Bwqf1WXA.js.map +0 -1
  80. package/dist/rich-message-33DPxuWJ.js.map +0 -1
  81. package/dist/theme/custom/monokai.json.d.ts +0 -80
  82. package/dist/theme-D-aCJqTf.js.map +0 -1
  83. /package/dist/components/{param-editor-color-input.d.ts → param-editor/color-input.d.ts} +0 -0
  84. /package/dist/components/{param-editor-date-input.d.ts → param-editor/date-input.d.ts} +0 -0
  85. /package/dist/components/{param-editor-horizontal-text-input.d.ts → param-editor/horizontal-text-input.d.ts} +0 -0
  86. /package/dist/components/{param-editor-input-group.d.ts → param-editor/input-group.d.ts} +0 -0
  87. /package/dist/components/{param-editor-number-input.d.ts → param-editor/number-input.d.ts} +0 -0
  88. /package/dist/components/{param-editor-horizontal.d.ts → param-editor/param-editor-horizontal.d.ts} +0 -0
  89. /package/dist/components/{param-editor-label.d.ts → param-editor/param-editor-label.d.ts} +0 -0
  90. /package/dist/components/{param-editor.d.ts → param-editor/param-editor.d.ts} +0 -0
  91. /package/dist/components/{param-editor.types.d.ts → param-editor/param-editor.types.d.ts} +0 -0
  92. /package/dist/components/{param-editor-selection-input.d.ts → param-editor/selection-input.d.ts} +0 -0
  93. /package/dist/components/{param-editor-text-input.d.ts → param-editor/text-input.d.ts} +0 -0
@@ -1,51 +1,52 @@
1
- import { DecoratorNode as Z, $applyNodeReplacement as ut, ElementNode as $e, TextNode as re, $createTextNode as X, $nodesOfType as mt, createCommand as I, isHTMLElement as ft, $createParagraphNode as ce, COMMAND_PRIORITY_LOW as Oe, $getSelection as pt, $isRangeSelection as ht, $isElementNode as _t, KEY_DOWN_COMMAND as gt, COMMAND_PRIORITY_HIGH as Et, $getRoot as Le } from "lexical";
2
- import { jsx as l, jsxs as F, Fragment as be } from "react/jsx-runtime";
1
+ import { DecoratorNode as Z, $applyNodeReplacement as mt, ElementNode as Oe, TextNode as re, $createTextNode as X, $nodesOfType as ft, createCommand as k, isHTMLElement as pt, $createParagraphNode as ae, COMMAND_PRIORITY_LOW as Le, $getSelection as ht, $isRangeSelection as _t, $isElementNode as gt, KEY_DOWN_COMMAND as Et, COMMAND_PRIORITY_HIGH as xt, $getRoot as ve } from "lexical";
2
+ import { jsx as l, jsxs as D, Fragment as Te } from "react/jsx-runtime";
3
3
  import { c as C } from "react/compiler-runtime";
4
- import { chakra as ae, Box as v, Text as w, Spacer as xt, IconButton as bt, Table as z, Textarea as Tt, Tooltip as ne, Flex as fe, Kbd as St } from "@chakra-ui/react";
5
- import { MarkNode as yt } from "@lexical/mark";
6
- import { LexicalComposer as ve } from "@lexical/react/LexicalComposer";
7
- import { LexicalErrorBoundary as we } from "@lexical/react/LexicalErrorBoundary";
8
- import { HistoryPlugin as Rt } from "@lexical/react/LexicalHistoryPlugin";
9
- import { OnChangePlugin as Pe } from "@lexical/react/LexicalOnChangePlugin";
10
- import { RichTextPlugin as Me } from "@lexical/react/LexicalRichTextPlugin";
11
- import * as Nt from "react";
12
- import { Suspense as Ae, lazy as Ct, useEffect as B, useImperativeHandle as It, useState as kt, forwardRef as $t, useRef as Ot } from "react";
4
+ import { chakra as de, Box as F, Text as v, Spacer as bt, IconButton as Tt, Table as q, Textarea as St, Tooltip as ne, Flex as pe, Kbd as yt } from "@chakra-ui/react";
5
+ import { MarkNode as Rt } from "@lexical/mark";
6
+ import { LexicalComposer as we } from "@lexical/react/LexicalComposer";
7
+ import { LexicalErrorBoundary as Pe } from "@lexical/react/LexicalErrorBoundary";
8
+ import { HistoryPlugin as Nt } from "@lexical/react/LexicalHistoryPlugin";
9
+ import { OnChangePlugin as Me } from "@lexical/react/LexicalOnChangePlugin";
10
+ import { RichTextPlugin as Ae } from "@lexical/react/LexicalRichTextPlugin";
11
+ import * as Ct from "react";
12
+ import { Suspense as De, lazy as kt, useEffect as z, useImperativeHandle as It, useState as $t, forwardRef as Ot, useRef as Lt } from "react";
13
13
  import { useLexicalComposerContext as H } from "@lexical/react/LexicalComposerContext";
14
- import { $setBlocksType as Lt } from "@lexical/selection";
15
- import { addClassNamesToElement as De, mergeRegister as pe } from "@lexical/utils";
16
- import { LexicalTypeaheadMenuPlugin as vt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
17
- import * as wt from "react-dom";
18
- import { CodeNode as he, CodeHighlightNode as Fe, registerCodeHighlighting as Pt } from "@lexical/code";
19
- import { LinkNode as _e, AutoLinkNode as ge, $createLinkNode as Mt, $isLinkNode as At, $isAutoLinkNode as He, $createAutoLinkNode as Dt } from "@lexical/link";
20
- import { ListNode as Be, ListItemNode as Ue } from "@lexical/list";
21
- import { CHECK_LIST as Ft, TRANSFORMERS as Ht, LINK as Bt, $convertFromMarkdownString as ze, $convertToMarkdownString as Ut } from "@lexical/markdown";
22
- import { ClickableLinkPlugin as zt } from "@lexical/react/LexicalClickableLinkPlugin";
23
- import { HorizontalRulePlugin as qt } from "@lexical/react/LexicalHorizontalRulePlugin";
24
- import { LinkPlugin as Wt } from "@lexical/react/LexicalLinkPlugin";
25
- import { ListPlugin as Jt } from "@lexical/react/LexicalListPlugin";
26
- import { TabIndentationPlugin as jt } from "@lexical/react/LexicalTabIndentationPlugin";
14
+ import { $setBlocksType as vt } from "@lexical/selection";
15
+ import { addClassNamesToElement as Fe, mergeRegister as he } from "@lexical/utils";
16
+ import { LexicalTypeaheadMenuPlugin as wt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
17
+ import * as Pt from "react-dom";
18
+ import { S as ie, g as Mt, T as At } from "./get-file-type-icon-ufFb0IkR.js";
19
+ import { LinkNode as _e, AutoLinkNode as ge, $createLinkNode as Dt, $isLinkNode as Ft, $isAutoLinkNode as He, $createAutoLinkNode as Ht } from "@lexical/link";
20
+ import { ListNode as ze, ListItemNode as Be } from "@lexical/list";
21
+ import { CHECK_LIST as zt, TRANSFORMERS as Bt, LINK as Ut, $convertFromMarkdownString as Ue, $convertToMarkdownString as qt } from "@lexical/markdown";
22
+ import { ClickableLinkPlugin as Wt } from "@lexical/react/LexicalClickableLinkPlugin";
23
+ import { HorizontalRulePlugin as Jt } from "@lexical/react/LexicalHorizontalRulePlugin";
24
+ import { LinkPlugin as jt } from "@lexical/react/LexicalLinkPlugin";
25
+ import { ListPlugin as Kt } from "@lexical/react/LexicalListPlugin";
26
+ import { TabIndentationPlugin as Gt } from "@lexical/react/LexicalTabIndentationPlugin";
27
27
  import { QuoteNode as qe, HeadingNode as We } from "@lexical/rich-text";
28
- import { ContentEditable as Kt } from "@lexical/react/LexicalContentEditable";
29
- import { S as Gt, g as Vt, T as Xt } from "./get-file-type-icon-Bwqf1WXA.js";
30
- import { X as Yt } from "lucide-react";
31
- import Qt from "katex";
32
- import { TreeView as Zt } from "@lexical/react/LexicalTreeView";
33
- const en = ae(Kt);
34
- function Je(n) {
28
+ import { ContentEditable as Vt } from "@lexical/react/LexicalContentEditable";
29
+ import { X as Xt } from "lucide-react";
30
+ import Yt from "prismjs";
31
+ import { CodeNode as Ee, CodeHighlightNode as Je, registerCodeHighlighting as Qt } from "@lexical/code";
32
+ import Zt from "katex";
33
+ import { TreeView as en } from "@lexical/react/LexicalTreeView";
34
+ const tn = de(Vt);
35
+ function je(n) {
35
36
  const e = C(11), {
36
37
  onRef: t,
37
38
  fullWidth: r,
38
39
  padding: o,
39
40
  isRichMessage: i,
40
41
  scrollable: s
41
- } = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, p = s === void 0 ? !0 : s, u = c ? "100%" : "720px", h = c ? "0" : "auto";
42
+ } = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, f = s === void 0 ? !0 : s, u = c ? "100%" : "720px", h = c ? "0" : "auto";
42
43
  let m;
43
- e[0] !== u || e[1] !== h ? (m = /* @__PURE__ */ l(en, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: h, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = h, e[2] = m) : m = e[2];
44
+ e[0] !== u || e[1] !== h ? (m = /* @__PURE__ */ l(tn, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: h, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = h, e[2] = m) : m = e[2];
44
45
  let d;
45
- e[3] !== t || e[4] !== o || e[5] !== m ? (d = /* @__PURE__ */ l(v, { ref: t, width: "100%", minH: "100%", padding: o, children: m }), e[3] = t, e[4] = o, e[5] = m, e[6] = d) : d = e[6];
46
- const f = d;
47
- if (!p)
48
- return f;
46
+ e[3] !== t || e[4] !== o || e[5] !== m ? (d = /* @__PURE__ */ l(F, { ref: t, width: "100%", minH: "100%", padding: o, children: m }), e[3] = t, e[4] = o, e[5] = m, e[6] = d) : d = e[6];
47
+ const p = d;
48
+ if (!f)
49
+ return p;
49
50
  const x = a ? "true" : void 0;
50
51
  let g;
51
52
  e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
@@ -53,9 +54,9 @@ function Je(n) {
53
54
  minH: "100%"
54
55
  }, e[7] = g) : g = e[7];
55
56
  let _;
56
- return e[8] !== f || e[9] !== x ? (_ = /* @__PURE__ */ l(Gt, { className: "rich-text", "data-rich-message": x, height: "100%", minH: "0", position: "relative", contentProps: g, children: f }), e[8] = f, e[9] = x, e[10] = _) : _ = e[10], _;
57
+ return e[8] !== p || e[9] !== x ? (_ = /* @__PURE__ */ l(ie, { className: "rich-text", "data-rich-message": x, height: "100%", minH: "0", position: "relative", contentProps: g, children: p }), e[8] = p, e[9] = x, e[10] = _) : _ = e[10], _;
57
58
  }
58
- const tn = {
59
+ const nn = {
59
60
  sm: {
60
61
  container: {
61
62
  height: "20px",
@@ -78,7 +79,7 @@ const tn = {
78
79
  iconSize: 14,
79
80
  textStyle: "sm"
80
81
  }
81
- }, nn = {
82
+ }, rn = {
82
83
  neutral: {
83
84
  color: "color.primary",
84
85
  bg: "bg.muted",
@@ -93,7 +94,7 @@ const tn = {
93
94
  bg: "var(--schub-accent-subtle)"
94
95
  }
95
96
  }
96
- }, rn = "md", on = "neutral", je = (n) => {
97
+ }, on = "md", sn = "neutral", Ke = (n) => {
97
98
  const e = C(39);
98
99
  let t, r, o, i, s, c, a;
99
100
  e[0] !== n ? ({
@@ -105,50 +106,50 @@ const tn = {
105
106
  icon: r,
106
107
  ...s
107
108
  } = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] = s, e[6] = c, e[7] = a) : (t = e[1], r = e[2], o = e[3], i = e[4], s = e[5], c = e[6], a = e[7]);
108
- const p = c === void 0 ? rn : c, u = a === void 0 ? on : a;
109
+ const f = c === void 0 ? on : c, u = a === void 0 ? sn : a;
109
110
  let h;
110
- e[8] !== t ? (h = Vt(t), e[8] = t, e[9] = h) : h = e[9];
111
- const m = h, d = tn[p], f = nn[u], x = i ? "pointer" : "default";
111
+ e[8] !== t ? (h = Mt(t), e[8] = t, e[9] = h) : h = e[9];
112
+ const m = h, d = nn[f], p = rn[u], x = i ? "pointer" : "default";
112
113
  let g;
113
- e[10] !== t || e[11] !== i ? (g = (k) => {
114
- k.stopPropagation(), i?.(t);
114
+ e[10] !== t || e[11] !== i ? (g = (I) => {
115
+ I.stopPropagation(), i?.(t);
115
116
  }, e[10] = t, e[11] = i, e[12] = g) : g = e[12];
116
117
  let _;
117
118
  e[13] !== m || e[14] !== r || e[15] !== d.iconSize ? (_ = r ?? /* @__PURE__ */ l(m, { size: d.iconSize }), e[13] = m, e[14] = r, e[15] = d.iconSize, e[16] = _) : _ = e[16];
118
119
  let y;
119
- e[17] !== _ ? (y = /* @__PURE__ */ l(ae.span, { mr: "xs", display: "inline-flex", children: _ }), e[17] = _, e[18] = y) : y = e[18];
120
+ e[17] !== _ ? (y = /* @__PURE__ */ l(de.span, { mr: "xs", display: "inline-flex", children: _ }), e[17] = _, e[18] = y) : y = e[18];
120
121
  let S;
121
122
  e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
122
123
  base: "14rem"
123
124
  }, e[19] = S) : S = e[19];
124
125
  let R;
125
- e[20] !== t || e[21] !== d.textStyle ? (R = /* @__PURE__ */ l(w, { maxW: S, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: d.textStyle, children: t }), e[20] = t, e[21] = d.textStyle, e[22] = R) : R = e[22];
126
+ e[20] !== t || e[21] !== d.textStyle ? (R = /* @__PURE__ */ l(v, { maxW: S, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: d.textStyle, children: t }), e[20] = t, e[21] = d.textStyle, e[22] = R) : R = e[22];
126
127
  let b;
127
- e[23] !== t || e[24] !== R ? (b = /* @__PURE__ */ l(Xt, { content: t, children: R }), e[23] = t, e[24] = R, e[25] = b) : b = e[25];
128
+ e[23] !== t || e[24] !== R ? (b = /* @__PURE__ */ l(At, { content: t, children: R }), e[23] = t, e[24] = R, e[25] = b) : b = e[25];
128
129
  let N;
129
- e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(xt, {}), e[26] = N) : N = e[26];
130
+ e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(bt, {}), e[26] = N) : N = e[26];
130
131
  let T;
131
- e[27] !== t || e[28] !== o ? (T = o && /* @__PURE__ */ l(bt, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
132
+ e[27] !== t || e[28] !== o ? (T = o && /* @__PURE__ */ l(Tt, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
132
133
  bg: "transparent"
133
- }, onClick: (k) => {
134
- k.stopPropagation(), o?.(t);
135
- }, children: /* @__PURE__ */ l(Yt, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = T) : T = e[29];
134
+ }, onClick: (I) => {
135
+ I.stopPropagation(), o?.(t);
136
+ }, children: /* @__PURE__ */ l(Xt, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = T) : T = e[29];
136
137
  let E;
137
- return e[30] !== s || e[31] !== d.container || e[32] !== T || e[33] !== x || e[34] !== g || e[35] !== y || e[36] !== b || e[37] !== f ? (E = /* @__PURE__ */ F(ae.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: x, ...f, ...d.container, onClick: g, ...s, children: [
138
+ return e[30] !== s || e[31] !== d.container || e[32] !== T || e[33] !== x || e[34] !== g || e[35] !== y || e[36] !== b || e[37] !== p ? (E = /* @__PURE__ */ D(de.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: x, ...p, ...d.container, onClick: g, ...s, children: [
138
139
  y,
139
140
  b,
140
141
  N,
141
142
  T
142
- ] }), e[30] = s, e[31] = d.container, e[32] = T, e[33] = x, e[34] = g, e[35] = y, e[36] = b, e[37] = f, e[38] = E) : E = e[38], E;
143
+ ] }), e[30] = s, e[31] = d.container, e[32] = T, e[33] = x, e[34] = g, e[35] = y, e[36] = b, e[37] = p, e[38] = E) : E = e[38], E;
143
144
  };
144
- let ie = class de extends Z {
145
+ let se = class ue extends Z {
145
146
  __href;
146
147
  __label;
147
148
  static getType() {
148
149
  return "reference-link";
149
150
  }
150
151
  static clone(e) {
151
- return new de(e.__href, e.__label, e.__key);
152
+ return new ue(e.__href, e.__label, e.__key);
152
153
  }
153
154
  constructor(e, t, r) {
154
155
  super(r), this.__href = e, this.__label = t;
@@ -164,53 +165,53 @@ let ie = class de extends Z {
164
165
  }
165
166
  exportJSON() {
166
167
  return {
167
- type: de.getType(),
168
+ type: ue.getType(),
168
169
  version: 1,
169
170
  href: this.__href,
170
171
  label: this.__label
171
172
  };
172
173
  }
173
174
  static importJSON(e) {
174
- return Ke(e.href, e.label);
175
+ return Ge(e.href, e.label);
175
176
  }
176
177
  decorate(e, t) {
177
178
  const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
178
- return /* @__PURE__ */ l(v, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(je, { fileName: i, onSelect: () => {
179
+ return /* @__PURE__ */ l(F, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Ke, { fileName: i, onSelect: () => {
179
180
  if (s)
180
181
  window.open(r, "_blank", "noopener,noreferrer");
181
182
  else if (c) {
182
- const a = r.replace(/^#?\$PROJECT\//i, ""), p = new CustomEvent("ui:open-project-file", {
183
+ const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
183
184
  detail: a
184
185
  });
185
- window.dispatchEvent(p);
186
+ window.dispatchEvent(f);
186
187
  } else
187
188
  window.location.assign(r);
188
189
  } }) });
189
190
  }
190
191
  };
191
- function Ke(n, e) {
192
- return new ie(n, e);
192
+ function Ge(n, e) {
193
+ return new se(n, e);
193
194
  }
194
- function sn(n) {
195
- return n instanceof ie;
195
+ function ln(n) {
196
+ return n instanceof se;
196
197
  }
197
- const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, ln = {
198
- dependencies: [ie],
198
+ const Se = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, cn = {
199
+ dependencies: [se],
199
200
  export: (n) => {
200
- if (sn(n)) {
201
+ if (ln(n)) {
201
202
  const e = n.__href, t = n.__label ?? e;
202
203
  return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
203
204
  }
204
205
  return null;
205
206
  },
206
- regExp: Te,
207
- importRegExp: Te,
207
+ regExp: Se,
208
+ importRegExp: Se,
208
209
  replace: (n, e) => {
209
210
  const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
210
- n.replace(Ke(o, i));
211
+ n.replace(Ge(o, i));
211
212
  },
212
213
  type: "text-match"
213
- }, Ee = {
214
+ }, xe = {
214
215
  code: "rich-text__code",
215
216
  codeHighlight: {
216
217
  atrule: "rich-text__tokenAttr",
@@ -284,26 +285,32 @@ const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, ln = {
284
285
  row: "rich-text__row",
285
286
  content: "rich-text__content"
286
287
  }
287
- }, Y = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", cn = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), To = (n) => {
288
- const e = C(6), {
288
+ }, an = globalThis;
289
+ an.Prism ??= Yt;
290
+ const Y = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", dn = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), Ro = (n) => {
291
+ const e = C(8), {
289
292
  defaultCode: t,
290
293
  isEditable: r,
291
294
  showLineNumbers: o,
292
295
  disableScroll: i
293
- } = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, p = i === void 0 ? !1 : i;
296
+ } = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, f = i === void 0 ? !1 : i;
294
297
  if (c) {
295
- let h;
296
- return e[0] !== s ? (h = /* @__PURE__ */ l(Tt, { defaultValue: s, fontFamily: "mono", fontSize: Y, resize: "vertical", minHeight: "100%" }), e[0] = s, e[1] = h) : h = e[1], h;
298
+ let d;
299
+ return e[0] !== s ? (d = /* @__PURE__ */ l(St, { defaultValue: s, fontFamily: "mono", fontSize: Y, resize: "vertical", minHeight: "100%" }), e[0] = s, e[1] = d) : d = e[1], d;
297
300
  }
298
301
  let u;
299
- if (e[2] !== s || e[3] !== p || e[4] !== a) {
300
- const h = a ? s.split(`
302
+ if (e[2] !== s || e[3] !== f || e[4] !== a) {
303
+ const d = a ? s.split(`
301
304
  `) : [s];
302
- u = /* @__PURE__ */ l(v, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: Y, lineHeight: "1.5", overflowY: p ? "hidden" : "auto", background: "bg.code", borderRadius: "md", width: "100%", children: a ? /* @__PURE__ */ l(v, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: h.map(dn) }) : /* @__PURE__ */ l(v, { as: "code", children: s }) }), e[2] = s, e[3] = p, e[4] = a, e[5] = u;
305
+ u = /* @__PURE__ */ l(F, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: Y, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: f ? "hidden" : void 0, children: a ? /* @__PURE__ */ l(F, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: d.map(mn) }) : /* @__PURE__ */ l(F, { as: "code", children: s }) }), e[2] = s, e[3] = f, e[4] = a, e[5] = u;
303
306
  } else
304
307
  u = e[5];
305
- return u;
306
- }, an = (n) => {
308
+ const h = u;
309
+ if (f)
310
+ return h;
311
+ let m;
312
+ return e[6] !== h ? (m = /* @__PURE__ */ l(ie, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: h }), e[6] = h, e[7] = m) : m = e[7], m;
313
+ }, un = (n) => {
307
314
  const e = C(26), {
308
315
  data: t,
309
316
  fullWidth: r,
@@ -312,46 +319,46 @@ const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, ln = {
312
319
  } = n, s = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o;
313
320
  let a;
314
321
  e[0] !== i ? (a = i === void 0 ? [] : i, e[0] = i, e[1] = a) : a = e[1];
315
- const p = a;
322
+ const f = a;
316
323
  if (!t.length) {
317
324
  const b = c ? "0" : "1px";
318
325
  let N;
319
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(w, { textStyle: "label/S/regular", fontSize: Y, color: "fg.muted", children: "No data" }), e[2] = N) : N = e[2];
326
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(v, { textStyle: "label/S/regular", fontSize: Y, color: "fg.muted", children: "No data" }), e[2] = N) : N = e[2];
320
327
  let T;
321
- return e[3] !== b ? (T = /* @__PURE__ */ l(v, { padding: "sm", borderWidth: b, borderColor: "border.muted", children: N }), e[3] = b, e[4] = T) : T = e[4], T;
328
+ return e[3] !== b ? (T = /* @__PURE__ */ l(F, { padding: "sm", borderWidth: b, borderColor: "border.muted", children: N }), e[3] = b, e[4] = T) : T = e[4], T;
322
329
  }
323
330
  let u;
324
- e[5] !== p ? (u = new Set(p), e[5] = p, e[6] = u) : u = e[6];
331
+ e[5] !== f ? (u = new Set(f), e[5] = f, e[6] = u) : u = e[6];
325
332
  const h = u;
326
333
  let m;
327
334
  e[7] !== t[0] ? (m = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = m) : m = e[8];
328
335
  let d;
329
336
  e[9] !== h || e[10] !== m ? (d = m.filter((b) => !h.has(b)), e[9] = h, e[10] = m, e[11] = d) : d = e[11];
330
- const f = d, x = s ? "100%" : "fit-content", g = c ? "0" : "1px";
337
+ const p = d, x = s ? "100%" : "fit-content", g = c ? "0" : "1px";
331
338
  let _;
332
- e[12] !== f ? (_ = /* @__PURE__ */ l(z.Header, { children: /* @__PURE__ */ l(z.Row, { background: "bg.muted", children: f.map(un) }) }), e[12] = f, e[13] = _) : _ = e[13];
339
+ e[12] !== p ? (_ = /* @__PURE__ */ l(q.Header, { children: /* @__PURE__ */ l(q.Row, { background: "bg.muted", children: p.map(fn) }) }), e[12] = p, e[13] = _) : _ = e[13];
333
340
  let y;
334
- if (e[14] !== f || e[15] !== t) {
341
+ if (e[14] !== p || e[15] !== t) {
335
342
  let b;
336
- e[17] !== f ? (b = (N, T) => /* @__PURE__ */ l(z.Row, { children: f.map((E) => /* @__PURE__ */ l(z.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(w, { textStyle: "paragraph/S/regular", fontSize: Y, children: cn(N[E]) }) }, `${T}-${E}`)) }, `${T}-${f.join("-")}`), e[17] = f, e[18] = b) : b = e[18], y = t.map(b), e[14] = f, e[15] = t, e[16] = y;
343
+ e[17] !== p ? (b = (N, T) => /* @__PURE__ */ l(q.Row, { children: p.map((E) => /* @__PURE__ */ l(q.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(v, { textStyle: "paragraph/S/regular", fontSize: Y, children: dn(N[E]) }) }, `${T}-${E}`)) }, `${T}-${p.join("-")}`), e[17] = p, e[18] = b) : b = e[18], y = t.map(b), e[14] = p, e[15] = t, e[16] = y;
337
344
  } else
338
345
  y = e[16];
339
346
  let S;
340
- e[19] !== y ? (S = /* @__PURE__ */ l(z.Body, { children: y }), e[19] = y, e[20] = S) : S = e[20];
347
+ e[19] !== y ? (S = /* @__PURE__ */ l(q.Body, { children: y }), e[19] = y, e[20] = S) : S = e[20];
341
348
  let R;
342
- return e[21] !== S || e[22] !== x || e[23] !== g || e[24] !== _ ? (R = /* @__PURE__ */ l(z.ScrollArea, { overflowX: "auto", maxWidth: "100%", children: /* @__PURE__ */ F(z.Root, { size: "sm", width: x, borderWidth: g, borderColor: "border.muted", children: [
349
+ return e[21] !== S || e[22] !== x || e[23] !== g || e[24] !== _ ? (R = /* @__PURE__ */ l(ie, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ D(q.Root, { size: "sm", width: x, borderWidth: g, borderColor: "border.muted", children: [
343
350
  _,
344
351
  S
345
352
  ] }) }), e[21] = S, e[22] = x, e[23] = g, e[24] = _, e[25] = R) : R = e[25], R;
346
353
  };
347
- function dn(n, e) {
348
- return /* @__PURE__ */ F(v, { as: "span", display: "contents", children: [
349
- /* @__PURE__ */ l(w, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
350
- /* @__PURE__ */ l(w, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
354
+ function mn(n, e) {
355
+ return /* @__PURE__ */ D(F, { as: "span", display: "contents", children: [
356
+ /* @__PURE__ */ l(v, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
357
+ /* @__PURE__ */ l(v, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
351
358
  ] }, `${e}-${n}`);
352
359
  }
353
- function un(n) {
354
- return /* @__PURE__ */ l(z.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(w, { textStyle: "label/S/medium", fontSize: Y, children: n }) }, n);
360
+ function fn(n) {
361
+ return /* @__PURE__ */ l(q.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(v, { textStyle: "label/S/medium", fontSize: Y, children: n }) }, n);
355
362
  }
356
363
  class W extends Z {
357
364
  __data;
@@ -374,7 +381,7 @@ class W extends Z {
374
381
  return !1;
375
382
  }
376
383
  decorate() {
377
- return /* @__PURE__ */ l(an, { fullWidth: !0, isReadOnly: !0, data: this.__data });
384
+ return /* @__PURE__ */ l(un, { fullWidth: !0, isReadOnly: !0, data: this.__data });
378
385
  }
379
386
  exportJSON() {
380
387
  return {
@@ -393,34 +400,34 @@ class W extends Z {
393
400
  `);
394
401
  }
395
402
  }
396
- function Se(n) {
403
+ function ye(n) {
397
404
  return new W(n);
398
405
  }
399
- function ye(n) {
406
+ function Re(n) {
400
407
  return n instanceof W;
401
408
  }
402
- const mn = Nt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
403
- function Re(n) {
409
+ const pn = Ct.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
410
+ function Ne(n) {
404
411
  let e = n.getAttribute("data-lexical-equation");
405
412
  const t = n.getAttribute("data-lexical-inline") === "true";
406
413
  return e = atob(e || ""), e ? {
407
- node: se(e, t)
414
+ node: le(e, t)
408
415
  } : null;
409
416
  }
410
- class q extends Z {
417
+ class U extends Z {
411
418
  __equation;
412
419
  __inline;
413
420
  static getType() {
414
421
  return "equation";
415
422
  }
416
423
  static clone(e) {
417
- return new q(e.__equation, e.__inline, e.__key);
424
+ return new U(e.__equation, e.__inline, e.__key);
418
425
  }
419
426
  constructor(e, t, r) {
420
427
  super(r), this.__equation = e, this.__inline = t ?? !1;
421
428
  }
422
429
  static importJSON(e) {
423
- return se(e.equation, e.inline);
430
+ return le(e.equation, e.inline);
424
431
  }
425
432
  exportJSON() {
426
433
  return {
@@ -436,7 +443,7 @@ class q extends Z {
436
443
  }
437
444
  exportDOM() {
438
445
  const e = document.createElement(this.__inline ? "span" : "div"), t = btoa(this.__equation);
439
- return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), Qt.render(this.__equation, e, {
446
+ return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), Zt.render(this.__equation, e, {
440
447
  displayMode: !this.__inline,
441
448
  // true === block display //
442
449
  errorColor: "#cc0000",
@@ -451,11 +458,11 @@ class q extends Z {
451
458
  static importDOM() {
452
459
  return {
453
460
  div: (e) => e.hasAttribute("data-lexical-equation") ? {
454
- conversion: Re,
461
+ conversion: Ne,
455
462
  priority: 2
456
463
  } : null,
457
464
  span: (e) => e.hasAttribute("data-lexical-equation") ? {
458
- conversion: Re,
465
+ conversion: Ne,
459
466
  priority: 1
460
467
  } : null
461
468
  };
@@ -477,38 +484,38 @@ class q extends Z {
477
484
  return this.__inline;
478
485
  }
479
486
  decorate() {
480
- return /* @__PURE__ */ l(Ae, { fallback: null, children: /* @__PURE__ */ l(mn, { equation: this.__equation, inline: this.__inline }) });
487
+ return /* @__PURE__ */ l(De, { fallback: null, children: /* @__PURE__ */ l(pn, { equation: this.__equation, inline: this.__inline }) });
481
488
  }
482
489
  }
483
- function se(n = "", e = !1) {
484
- const t = new q(n, e);
485
- return ut(t);
490
+ function le(n = "", e = !1) {
491
+ const t = new U(n, e);
492
+ return mt(t);
486
493
  }
487
- function Ge(n) {
488
- return n instanceof q;
494
+ function Ve(n) {
495
+ return n instanceof U;
489
496
  }
490
- const fn = {
491
- dependencies: [q],
492
- export: (n) => Ge(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
497
+ const hn = {
498
+ dependencies: [U],
499
+ export: (n) => Ve(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
493
500
  importRegExp: /\\\((.*?)\\\)/,
494
501
  regExp: /\\\((.*?)\\\)/,
495
502
  replace: (n, e) => {
496
- const t = se(e[1].trim(), !0);
503
+ const t = le(e[1].trim(), !0);
497
504
  n.replace(t);
498
505
  },
499
506
  type: "text-match"
500
- }, pn = {
501
- dependencies: [q],
507
+ }, _n = {
508
+ dependencies: [U],
502
509
  regExpStart: /\\\[/,
503
510
  regExpEnd: /\\]/,
504
- export: (n) => Ge(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
505
- replace: (n, e, t, r, o) => o ? (n.append(se(o.join(" "), !1)), !0) : !1,
511
+ export: (n) => Ve(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
512
+ replace: (n, e, t, r, o) => o ? (n.append(le(o.join(" "), !1)), !0) : !1,
506
513
  type: "multiline-element"
507
514
  };
508
- function hn() {
515
+ function gn() {
509
516
  return null;
510
517
  }
511
- class K extends $e {
518
+ class K extends Oe {
512
519
  static getType() {
513
520
  return "hr";
514
521
  }
@@ -516,7 +523,7 @@ class K extends $e {
516
523
  return new K(e?.__key);
517
524
  }
518
525
  static importJSON(e) {
519
- return Ve();
526
+ return Xe();
520
527
  }
521
528
  exportJSON() {
522
529
  return {
@@ -534,13 +541,13 @@ class K extends $e {
534
541
  return null;
535
542
  }
536
543
  }
537
- function Ve() {
544
+ function Xe() {
538
545
  return new K();
539
546
  }
540
- function _n(n) {
547
+ function En(n) {
541
548
  return n instanceof K;
542
549
  }
543
- const gn = Ct(() => import("./MermaidComponent-D7Baqkwx.js"));
550
+ const xn = kt(() => import("./MermaidComponent-Cz_Iob5U.js"));
544
551
  class J extends Z {
545
552
  __code;
546
553
  static getType() {
@@ -581,25 +588,25 @@ ${this.__code}
581
588
  t.__code = e;
582
589
  }
583
590
  decorate() {
584
- return /* @__PURE__ */ l(Ae, { fallback: null, children: /* @__PURE__ */ l(gn, { code: this.__code, nodeKey: this.__key }) });
591
+ return /* @__PURE__ */ l(De, { fallback: null, children: /* @__PURE__ */ l(xn, { code: this.__code, nodeKey: this.__key }) });
585
592
  }
586
593
  }
587
- function So(n) {
594
+ function No(n) {
588
595
  return n instanceof J;
589
596
  }
590
- const En = {
597
+ const bn = {
591
598
  dependencies: [K],
592
- export: (n) => _n(n) ? "***" : null,
599
+ export: (n) => En(n) ? "***" : null,
593
600
  regExp: /^(---|\*\*\*|___)\s?$/,
594
601
  replace: (n) => {
595
- const e = Ve();
602
+ const e = Xe();
596
603
  n.replace(e);
597
604
  },
598
605
  type: "element"
599
- }, xn = {
606
+ }, Tn = {
600
607
  dependencies: [],
601
608
  export: (n, e) => {
602
- if (ye(n)) {
609
+ if (Re(n)) {
603
610
  const t = n.getData();
604
611
  if (!t.length) return "";
605
612
  const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), s = t.map((c) => r.map((a) => String(c[a] || "")).join(" | "));
@@ -616,25 +623,25 @@ const En = {
616
623
  return;
617
624
  }
618
625
  const s = t[0].split("|").slice(1, -1).map((c) => c.trim());
619
- if (o?.getType() === "data_table" && ye(o)) {
620
- const c = o.getData(), a = {}, p = c.length === 1 && Object.values(c[0]).every((d) => d === ""), u = c.length > 0 ? Object.keys(c[0]) : s.map((d, f) => `col_${f}`);
621
- s.forEach((d, f) => {
622
- const x = u[f] || `col_${f}`;
626
+ if (o?.getType() === "data_table" && Re(o)) {
627
+ const c = o.getData(), a = {}, f = c.length === 1 && Object.values(c[0]).every((d) => d === ""), u = c.length > 0 ? Object.keys(c[0]) : s.map((d, p) => `col_${p}`);
628
+ s.forEach((d, p) => {
629
+ const x = u[p] || `col_${p}`;
623
630
  a[x] = d;
624
631
  });
625
- const h = p ? [a] : [...c, a], m = Se(h);
632
+ const h = f ? [a] : [...c, a], m = ye(h);
626
633
  o.replace(m), n.remove();
627
634
  } else {
628
635
  const c = {};
629
- s.forEach((p, u) => {
630
- c[p || `col_${u}`] = "";
636
+ s.forEach((f, u) => {
637
+ c[f || `col_${u}`] = "";
631
638
  });
632
- const a = Se([c]);
639
+ const a = ye([c]);
633
640
  n.replace(a);
634
641
  }
635
642
  },
636
643
  type: "element"
637
- }, bn = {
644
+ }, Sn = {
638
645
  dependencies: [re],
639
646
  export: (n, e) => {
640
647
  if (n instanceof re) {
@@ -658,7 +665,7 @@ const En = {
658
665
  t.toggleFormat("underline"), n.replace(t);
659
666
  },
660
667
  type: "text-match"
661
- }, Tn = {
668
+ }, yn = {
662
669
  dependencies: [re],
663
670
  export: (n, e) => null,
664
671
  regExp: /<u>(.*)<\/u>/,
@@ -668,146 +675,146 @@ const En = {
668
675
  t.toggleFormat("underline"), n.replace(t);
669
676
  },
670
677
  type: "text-match"
671
- }, Ne = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, V = (n) => n.replace(/\\([*_`~\\])/g, "$1"), Sn = (n) => n.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), yn = (n) => n?.replace(/\\(["\\])/g, "$1"), Xe = (n, e, t) => {
678
+ }, Ce = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, V = (n) => n.replace(/\\([*_`~\\])/g, "$1"), Rn = (n) => n.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Nn = (n) => n?.replace(/\\(["\\])/g, "$1"), Ye = (n, e, t) => {
672
679
  if (n !== e)
673
680
  return t;
674
681
  const r = e.replace(/([*_`~\\])/g, "\\$1");
675
682
  return t.replace(r, e);
676
- }, Rn = {
683
+ }, Cn = {
677
684
  dependencies: [_e],
678
685
  export: (n, e) => {
679
- if (!At(n) || He(n))
686
+ if (!Ft(n) || He(n))
680
687
  return null;
681
- const t = n.getTitle(), r = V(n.getURL()), o = Xe(n.getTextContent(), r, e(n));
682
- return t != null ? `[${o}](${r} "${Sn(t)}")` : `[${o}](${r})`;
688
+ const t = n.getTitle(), r = V(n.getURL()), o = Ye(n.getTextContent(), r, e(n));
689
+ return t != null ? `[${o}](${r} "${Rn(t)}")` : `[${o}](${r})`;
683
690
  },
684
691
  importRegExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,
685
692
  regExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,
686
693
  replace: (n, e) => {
687
- const [, t, r, o] = e, i = V(r), s = Mt(i, {
688
- title: yn(o)
694
+ const [, t, r, o] = e, i = V(r), s = Dt(i, {
695
+ title: Nn(o)
689
696
  }), c = t.split("[").length - 1, a = t.split("]").length - 1;
690
- let p = t, u = "";
697
+ let f = t, u = "";
691
698
  if (c < a)
692
699
  return;
693
700
  if (c > a) {
694
701
  const d = t.split("[");
695
- u = `[${d[0]}`, p = d.slice(1).join("[");
702
+ u = `[${d[0]}`, f = d.slice(1).join("[");
696
703
  }
697
- const h = V(p), m = X(h === i ? i : h);
704
+ const h = V(f), m = X(h === i ? i : h);
698
705
  return m.setFormat(n.getFormat()), s.append(m), n.replace(s), u && s.insertBefore(X(u)), m;
699
706
  },
700
707
  trigger: ")",
701
708
  type: "text-match"
702
- }, Nn = {
709
+ }, kn = {
703
710
  dependencies: [ge],
704
711
  export: (n, e) => {
705
712
  if (!He(n))
706
713
  return null;
707
714
  const t = V(n.getURL());
708
- return Xe(n.getTextContent(), t, e(n));
715
+ return Ye(n.getTextContent(), t, e(n));
709
716
  },
710
- regExp: Ne,
711
- importRegExp: Ne,
717
+ regExp: Ce,
718
+ importRegExp: Ce,
712
719
  replace: (n, e) => {
713
- const t = V(e[0]), r = Dt(t), o = X(t);
720
+ const t = V(e[0]), r = Ht(t), o = X(t);
714
721
  o.setFormat(n.getFormat()), r.append(o), n.replace(r);
715
722
  },
716
723
  type: "text-match"
717
- }, Cn = [xn, En, bn, Tn, Rn, Nn], yo = [qe, _e, ge, W, We, Be, Ue, he, Fe, J, q, K, ie], Ye = [Ft, ...Ht.filter((n) => n !== Bt), ...Cn, fn, pn], Ro = [...Ye, ln], No = Ee;
718
- function In(n) {
724
+ }, In = [Tn, bn, Sn, yn, Cn, kn], Co = [qe, _e, ge, W, We, ze, Be, Ee, Je, J, U, K, se], Qe = [zt, ...Bt.filter((n) => n !== Ut), ...In, hn, _n], ko = [...Qe, cn], Io = xe;
725
+ function $n(n) {
719
726
  return n.trim().toLowerCase() === "mermaid";
720
727
  }
721
- function kn(n) {
728
+ function On(n) {
722
729
  const e = n.getLanguage() ?? "plaintext";
723
- return In(e) ? (n.replace(new J(n.getTextContent())), !0) : !1;
730
+ return $n(e) ? (n.replace(new J(n.getTextContent())), !0) : !1;
724
731
  }
725
- function $n() {
732
+ function Ln() {
726
733
  const n = C(3), [e] = H();
727
734
  let t, r;
728
735
  return n[0] !== e ? (t = () => {
729
- e.update(On);
730
- }, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
736
+ e.update(vn);
737
+ }, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
731
738
  }
732
- function On() {
733
- const n = mt(he);
739
+ function vn() {
740
+ const n = ft(Ee);
734
741
  for (const e of n)
735
- kn(e);
742
+ On(e);
736
743
  }
737
- function Ln() {
744
+ function wn() {
738
745
  const n = C(3), [e] = H();
739
746
  let t, r;
740
- return n[0] !== e ? (t = () => Pt(e), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
747
+ return n[0] !== e ? (t = () => Qt(e), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
741
748
  }
742
- const Co = I("TOGGLE_LINK_EDIT_MODE_COMMAND");
743
- function Qe(n) {
749
+ const $o = k("TOGGLE_LINK_EDIT_MODE_COMMAND");
750
+ function Ze(n) {
744
751
  const e = C(4), {
745
752
  isEditable: t
746
753
  } = n, [r] = H();
747
754
  let o, i;
748
755
  return e[0] !== r || e[1] !== t ? (o = () => {
749
756
  r.setEditable(t);
750
- }, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
757
+ }, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
751
758
  }
752
- function Ze() {
759
+ function et() {
753
760
  const n = C(2), [e] = H();
754
761
  let t;
755
- return n[0] !== e ? (t = /* @__PURE__ */ l(v, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ l(Zt, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
762
+ return n[0] !== e ? (t = /* @__PURE__ */ l(F, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ l(en, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
756
763
  }
757
- const vn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/, wn = /^```/, Pn = /^([ \t]*)((?:[-*+])|(?:\d+\.))\s+/, Mn = /^([ \t]+)/;
758
- function et(n) {
764
+ const Pn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/, Mn = /^```/, An = /^([ \t]*)((?:[-*+])|(?:\d+\.))\s+/, Dn = /^([ \t]+)/;
765
+ function tt(n) {
759
766
  let e = 0;
760
767
  for (const t of n)
761
768
  e += t === " " ? 4 : 1;
762
769
  return e;
763
770
  }
764
- function An(n, e) {
771
+ function Fn(n, e) {
765
772
  return [...n].reverse().find((t) => t.sourceIndentWidth < e);
766
773
  }
767
- function ue(n, e, t) {
774
+ function me(n, e, t) {
768
775
  return e === t && !n.includes(" ") ? n : " ".repeat(e);
769
776
  }
770
- function Dn(n, e) {
771
- const t = n.match(Mn);
777
+ function Hn(n, e) {
778
+ const t = n.match(Dn);
772
779
  if (!t)
773
780
  return n.trim() !== "" && (e.length = 0), n;
774
- const r = et(t[1]), o = An(e, r);
781
+ const r = tt(t[1]), o = Fn(e, r);
775
782
  if (!o) return n;
776
- const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s = ue(t[1], i, r);
783
+ const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s = me(t[1], i, r);
777
784
  return s === t[1] ? n : `${s}${n.slice(t[1].length)}`;
778
785
  }
779
- function Fn(n, e, t) {
780
- const r = et(e[1]);
786
+ function zn(n, e, t) {
787
+ const r = tt(e[1]);
781
788
  for (; t.length && t.at(-1).sourceIndentWidth > r; )
782
789
  t.pop();
783
790
  const o = t.at(-1);
784
791
  if (o?.sourceIndentWidth === r)
785
- return `${ue(e[1], o.normalizedIndentWidth, r)}${n.slice(e[1].length)}`;
792
+ return `${me(e[1], o.normalizedIndentWidth, r)}${n.slice(e[1].length)}`;
786
793
  const i = t.at(-1), s = r - (i?.sourceIndentWidth ?? 0);
787
794
  let c = r;
788
795
  return i && s === 2 && !e[1].includes(" ") && (c = i.normalizedIndentWidth + 4), t.push({
789
796
  normalizedIndentWidth: c,
790
797
  sourceIndentWidth: r
791
- }), `${ue(e[1], c, r)}${n.slice(e[1].length)}`;
798
+ }), `${me(e[1], c, r)}${n.slice(e[1].length)}`;
792
799
  }
793
- function Hn(n, e) {
794
- if (wn.test(n.trimStart()))
800
+ function Bn(n, e) {
801
+ if (Mn.test(n.trimStart()))
795
802
  return e.isInCodeFence = !e.isInCodeFence, n;
796
803
  if (e.isInCodeFence) return n;
797
- const t = n.match(Pn);
798
- return t ? Fn(n, t, e.activeListIndents) : Dn(n, e.activeListIndents);
804
+ const t = n.match(An);
805
+ return t ? zn(n, t, e.activeListIndents) : Hn(n, e.activeListIndents);
799
806
  }
800
- function tt(n) {
807
+ function nt(n) {
801
808
  const e = n.split(`
802
809
  `), t = {
803
810
  isInCodeFence: !1,
804
811
  activeListIndents: []
805
812
  };
806
- return e.map((r) => Hn(r, t)).join(`
813
+ return e.map((r) => Bn(r, t)).join(`
807
814
  `);
808
815
  }
809
- function Bn(n) {
810
- const e = n.match(vn);
816
+ function Un(n) {
817
+ const e = n.match(Pn);
811
818
  return e ? {
812
819
  frontmatter: e[0],
813
820
  body: n.slice(e[0].length)
@@ -816,29 +823,29 @@ function Bn(n) {
816
823
  body: n
817
824
  };
818
825
  }
819
- const Un = "UPLOAD_FILE", zn = "OPEN_CONTEXT", qn = "RUN_PROMPT", Wn = "UPDATE_FORMAT", Jn = "UPDATE_BEHAVIOR", jn = "INSERT_PROMPT", Kn = "RENAME_PROMPT", Gn = "DUPLICATE_PROMPT", Vn = "DELETE_PROMPT", Xn = "DELETE_REFERENCES", Yn = "RENAME_REFERENCES", Qn = "INSERT_REFERENCE", Zn = "INSERT_BLOCK";
820
- I(Un);
821
- I(zn);
822
- I(qn);
823
- I(Wn);
824
- I(Jn);
825
- I(jn);
826
- I(Kn);
827
- I(Gn);
828
- I(Vn);
829
- I(Xn);
830
- I(Yn);
831
- const nt = I(Qn), er = I(Zn), tr = "INSERT_NEW_FILE_PLACEHOLDER", nr = "INSERT_NEW_TEXT_PLACEHOLDER", rr = "INSERT_PLACEHOLDER_REFERENCE";
832
- I(tr);
833
- I(nr);
834
- I(rr);
835
- function or(n) {
826
+ const qn = "UPLOAD_FILE", Wn = "OPEN_CONTEXT", Jn = "RUN_PROMPT", jn = "UPDATE_FORMAT", Kn = "UPDATE_BEHAVIOR", Gn = "INSERT_PROMPT", Vn = "RENAME_PROMPT", Xn = "DUPLICATE_PROMPT", Yn = "DELETE_PROMPT", Qn = "DELETE_REFERENCES", Zn = "RENAME_REFERENCES", er = "INSERT_REFERENCE", tr = "INSERT_BLOCK";
827
+ k(qn);
828
+ k(Wn);
829
+ k(Jn);
830
+ k(jn);
831
+ k(Kn);
832
+ k(Gn);
833
+ k(Vn);
834
+ k(Xn);
835
+ k(Yn);
836
+ k(Qn);
837
+ k(Zn);
838
+ const rt = k(er), nr = k(tr), rr = "INSERT_NEW_FILE_PLACEHOLDER", or = "INSERT_NEW_TEXT_PLACEHOLDER", ir = "INSERT_PLACEHOLDER_REFERENCE";
839
+ k(rr);
840
+ k(or);
841
+ k(ir);
842
+ function sr(n) {
836
843
  const e = oe();
837
844
  return n.style !== null && e.setFormat(n.style.textAlign), {
838
845
  node: e
839
846
  };
840
847
  }
841
- class ee extends $e {
848
+ class ee extends Oe {
842
849
  static getType() {
843
850
  return "comment";
844
851
  }
@@ -847,7 +854,7 @@ class ee extends $e {
847
854
  }
848
855
  createDOM(e) {
849
856
  const t = document.createElement("blockquote");
850
- return De(t, e.theme.comment), t;
857
+ return Fe(t, e.theme.comment), t;
851
858
  }
852
859
  updateDOM() {
853
860
  return !1;
@@ -855,7 +862,7 @@ class ee extends $e {
855
862
  static importDOM() {
856
863
  return {
857
864
  blockquote: () => ({
858
- conversion: or,
865
+ conversion: sr,
859
866
  priority: 0
860
867
  })
861
868
  };
@@ -864,7 +871,7 @@ class ee extends $e {
864
871
  const {
865
872
  element: t
866
873
  } = super.exportDOM(e);
867
- if (t && ft(t)) {
874
+ if (t && pt(t)) {
868
875
  this.isEmpty() && t.append(document.createElement("br"));
869
876
  const r = this.getFormatType();
870
877
  t.style.textAlign = r;
@@ -890,11 +897,11 @@ class ee extends $e {
890
897
  }
891
898
  // mutation
892
899
  insertNewAfter(e, t) {
893
- const r = ce(), o = this.getDirection();
900
+ const r = ae(), o = this.getDirection();
894
901
  return r.setDirection(o), this.insertAfter(r, t), r;
895
902
  }
896
903
  collapseAtStart() {
897
- const e = ce();
904
+ const e = ae();
898
905
  return this.getChildren().forEach((r) => {
899
906
  e.append(r);
900
907
  }), this.replace(e), !0;
@@ -903,58 +910,58 @@ class ee extends $e {
903
910
  function oe() {
904
911
  return new ee();
905
912
  }
906
- const ir = (n, e) => {
907
- const t = pt(), r = oe();
913
+ const lr = (n, e) => {
914
+ const t = ht(), r = oe();
908
915
  if (e) {
909
916
  e.getParent()?.replace(r, !0), e.remove(), r.selectEnd();
910
917
  return;
911
918
  }
912
- ht(t) && Lt(t, oe);
919
+ _t(t) && vt(t, oe);
913
920
  };
914
- function sr() {
921
+ function cr() {
915
922
  const n = C(3), [e] = H();
916
923
  let t, r;
917
- return n[0] !== e ? (t = () => pe(e.registerCommand(er, lr, Oe)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
924
+ return n[0] !== e ? (t = () => he(e.registerCommand(nr, ar, Le)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
918
925
  }
919
- function lr(n) {
926
+ function ar(n) {
920
927
  const {
921
928
  optionId: e,
922
929
  nodeToReplace: t
923
930
  } = n;
924
- return ir(e, t), !1;
931
+ return lr(e, t), !1;
925
932
  }
926
- const cr = () => {
933
+ const dr = () => {
927
934
  const n = C(3), [e] = H();
928
935
  let t, r;
929
- n[0] !== e ? (t = () => pe(e.registerNodeTransform(ee, (o) => {
930
- const s = o.getChildren().filter(ar);
936
+ n[0] !== e ? (t = () => he(e.registerNodeTransform(ee, (o) => {
937
+ const s = o.getChildren().filter(ur);
931
938
  s.length > 0 && e.update(() => {
932
- s.forEach(dr);
939
+ s.forEach(mr);
933
940
  });
934
- })), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r);
941
+ })), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r);
935
942
  };
936
- function ar(n) {
943
+ function ur(n) {
937
944
  return n.getType() === "comment";
938
945
  }
939
- function dr(n) {
940
- n.replace(ce(), !0);
946
+ function mr(n) {
947
+ n.replace(ae(), !0);
941
948
  }
942
- function ur() {
943
- return cr(), sr(), null;
949
+ function fr() {
950
+ return dr(), cr(), null;
944
951
  }
945
- const mr = (n) => {
952
+ const pr = (n) => {
946
953
  let e = "";
947
954
  const t = n.getChildren(), r = t.length;
948
955
  for (let o = 0; o < r; o++) {
949
956
  const i = t[o];
950
- e += i.getTextContent(), _t(i) && o !== r - 1 && !i.isInline() && (e += `
957
+ e += i.getTextContent(), gt(i) && o !== r - 1 && !i.isInline() && (e += `
951
958
  `);
952
959
  }
953
960
  return e;
954
- }, fr = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, pr = (n) => n.type === "paragraph" && !!n.children?.length, rt = (n) => {
961
+ }, hr = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, _r = (n) => n.type === "paragraph" && !!n.children?.length, ot = (n) => {
955
962
  if (n.type === "comment")
956
963
  return "";
957
- const e = fr(n);
964
+ const e = hr(n);
958
965
  if (e !== null)
959
966
  return e;
960
967
  let t = typeof n.text == "string" ? n.text : "";
@@ -968,18 +975,18 @@ const mr = (n) => {
968
975
  `);
969
976
  continue;
970
977
  }
971
- t += rt(s), pr(s) && (t += `
978
+ t += ot(s), _r(s) && (t += `
972
979
  `);
973
980
  }
974
981
  return t;
975
- }, ot = (n) => {
982
+ }, it = (n) => {
976
983
  try {
977
984
  const e = JSON.parse(n);
978
- return rt(e.root ?? {});
985
+ return ot(e.root ?? {});
979
986
  } catch {
980
987
  return "";
981
988
  }
982
- }, hr = {
989
+ }, gr = {
983
990
  root: {
984
991
  direction: "ltr",
985
992
  format: "",
@@ -997,7 +1004,7 @@ const mr = (n) => {
997
1004
  }]
998
1005
  }
999
1006
  };
1000
- function _r(n = "") {
1007
+ function Er(n = "") {
1001
1008
  return n.trim() ? {
1002
1009
  root: {
1003
1010
  direction: "ltr",
@@ -1023,9 +1030,9 @@ function _r(n = "") {
1023
1030
  }] : []
1024
1031
  }))
1025
1032
  }
1026
- } : JSON.parse(JSON.stringify(hr));
1033
+ } : JSON.parse(JSON.stringify(gr));
1027
1034
  }
1028
- function gr(n) {
1035
+ function xr(n) {
1029
1036
  const e = C(4), {
1030
1037
  editorRef: t,
1031
1038
  previousTextRef: r
@@ -1033,22 +1040,22 @@ function gr(n) {
1033
1040
  let i, s;
1034
1041
  return e[0] !== o || e[1] !== r ? (i = () => ({
1035
1042
  setEditorValue: (c) => {
1036
- const a = o.parseEditorState(JSON.stringify(_r(c)));
1037
- o.setEditorState(a), r.current = ot(c), o.focus(void 0, {
1043
+ const a = o.parseEditorState(JSON.stringify(Er(c)));
1044
+ o.setEditorState(a), r.current = it(c), o.focus(void 0, {
1038
1045
  defaultSelection: "rootEnd"
1039
1046
  });
1040
1047
  }
1041
1048
  }), s = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), It(t, i, s), null;
1042
1049
  }
1043
- const Er = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
1044
- function xr(n) {
1050
+ const br = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
1051
+ function Tr(n) {
1045
1052
  const e = C(4), {
1046
1053
  onSubmit: t
1047
1054
  } = n, [r] = H();
1048
1055
  let o, i;
1049
- return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(gt, (s) => Er(s) ? (s.preventDefault(), t?.(), !0) : !1, Et), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
1056
+ return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(Et, (s) => br(s) ? (s.preventDefault(), t?.(), !0) : !1, xt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
1050
1057
  }
1051
- const Ce = ["table", "connector"], br = (n) => n.sort((r, o) => Ce.indexOf(r.group) - Ce.indexOf(o.group)).map((r, o) => ({
1058
+ const ke = ["table", "connector"], Sr = (n) => n.sort((r, o) => ke.indexOf(r.group) - ke.indexOf(o.group)).map((r, o) => ({
1052
1059
  ...r,
1053
1060
  index: o
1054
1061
  })).reduce((r, o) => {
@@ -1064,30 +1071,30 @@ function Ie(n) {
1064
1071
  setRefElement: s,
1065
1072
  secondaryLabel: c,
1066
1073
  primaryLabel: a,
1067
- tabIndex: p
1068
- } = n, u = p === void 0 ? -1 : p, h = r ? "bg.active" : "transparent", m = r ? "bg.active" : "bg.hover";
1074
+ tabIndex: f
1075
+ } = n, u = f === void 0 ? -1 : f, h = r ? "bg.active" : "transparent", m = r ? "bg.active" : "bg.hover";
1069
1076
  let d;
1070
1077
  e[0] !== m ? (d = {
1071
1078
  bg: m
1072
1079
  }, e[0] = m, e[1] = d) : d = e[1];
1073
- let f;
1074
- e[2] !== a ? (f = /* @__PURE__ */ l(ne.Trigger, { children: /* @__PURE__ */ l(w, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = f) : f = e[3];
1080
+ let p;
1081
+ e[2] !== a ? (p = /* @__PURE__ */ l(ne.Trigger, { children: /* @__PURE__ */ l(v, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = p) : p = e[3];
1075
1082
  let x;
1076
1083
  e[4] !== a ? (x = /* @__PURE__ */ l(ne.Positioner, { children: /* @__PURE__ */ l(ne.Content, { children: a }) }), e[4] = a, e[5] = x) : x = e[5];
1077
1084
  let g;
1078
- e[6] !== f || e[7] !== x ? (g = /* @__PURE__ */ F(ne.Root, { children: [
1079
- f,
1085
+ e[6] !== p || e[7] !== x ? (g = /* @__PURE__ */ D(ne.Root, { children: [
1086
+ p,
1080
1087
  x
1081
- ] }), e[6] = f, e[7] = x, e[8] = g) : g = e[8];
1088
+ ] }), e[6] = p, e[7] = x, e[8] = g) : g = e[8];
1082
1089
  let _;
1083
- e[9] !== c ? (_ = c && /* @__PURE__ */ l(w, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = _) : _ = e[10];
1090
+ e[9] !== c ? (_ = c && /* @__PURE__ */ l(v, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = _) : _ = e[10];
1084
1091
  let y;
1085
- return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== g || e[19] !== _ || e[20] !== u ? (y = /* @__PURE__ */ F(fe, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: h, _hover: d, tabIndex: u, ref: s, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
1092
+ return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== g || e[19] !== _ || e[20] !== u ? (y = /* @__PURE__ */ D(pe, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: h, _hover: d, tabIndex: u, ref: s, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
1086
1093
  g,
1087
1094
  _
1088
1095
  ] }), e[11] = t, e[12] = r, e[13] = o, e[14] = i, e[15] = s, e[16] = h, e[17] = d, e[18] = g, e[19] = _, e[20] = u, e[21] = y) : y = e[21], y;
1089
1096
  }
1090
- const Tr = (n) => {
1097
+ const yr = (n) => {
1091
1098
  const e = C(12), {
1092
1099
  options: t,
1093
1100
  selectedIndex: r,
@@ -1096,37 +1103,37 @@ const Tr = (n) => {
1096
1103
  } = n, {
1097
1104
  table: s,
1098
1105
  connector: c
1099
- } = br(t), a = s === void 0 ? [] : s, p = c === void 0 ? [] : c, u = [...a, ...p].length;
1106
+ } = Sr(t), a = s === void 0 ? [] : s, f = c === void 0 ? [] : c, u = [...a, ...f].length;
1100
1107
  let h, m;
1101
1108
  e[0] !== r ? (h = () => {
1102
1109
  document.getElementById(`typeahead-item-${r}`)?.scrollIntoView({
1103
1110
  behavior: "instant",
1104
1111
  block: "nearest"
1105
1112
  });
1106
- }, m = [r], e[0] = r, e[1] = h, e[2] = m) : (h = e[1], m = e[2]), B(h, m);
1107
- const d = v, f = "1000", x = "absolute", g = "modal", _ = "auto", y = "24rem";
1113
+ }, m = [r], e[0] = r, e[1] = h, e[2] = m) : (h = e[1], m = e[2]), z(h, m);
1114
+ const d = ie, p = "1000", x = "absolute", g = "modal", _ = "24rem", y = !1;
1108
1115
  let S;
1109
1116
  e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
1110
1117
  base: "100vw",
1111
1118
  md: "264px"
1112
1119
  }, e[3] = S) : S = e[3];
1113
1120
  let R;
1114
- e[4] !== u ? (R = !u && /* @__PURE__ */ l(w, { children: "No results" }), e[4] = u, e[5] = R) : R = e[5];
1115
- const b = !!a.length && /* @__PURE__ */ F(be, { children: [
1116
- /* @__PURE__ */ l(w, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
1117
- /* @__PURE__ */ l(v, { children: a.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1118
- ] }), N = !!p.length && /* @__PURE__ */ F(be, { children: [
1119
- /* @__PURE__ */ l(w, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
1120
- /* @__PURE__ */ l(v, { children: p.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1121
+ e[4] !== u ? (R = !u && /* @__PURE__ */ l(v, { children: "No results" }), e[4] = u, e[5] = R) : R = e[5];
1122
+ const b = !!a.length && /* @__PURE__ */ D(Te, { children: [
1123
+ /* @__PURE__ */ l(v, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
1124
+ /* @__PURE__ */ l(F, { children: a.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1125
+ ] }), N = !!f.length && /* @__PURE__ */ D(Te, { children: [
1126
+ /* @__PURE__ */ l(v, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
1127
+ /* @__PURE__ */ l(F, { children: f.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1121
1128
  ] });
1122
1129
  let T;
1123
- return e[6] !== d || e[7] !== R || e[8] !== b || e[9] !== N || e[10] !== S ? (T = /* @__PURE__ */ F(d, { zIndex: f, position: x, layerStyle: g, overflow: _, maxHeight: y, minWidth: S, children: [
1130
+ return e[6] !== d || e[7] !== R || e[8] !== b || e[9] !== N || e[10] !== S ? (T = /* @__PURE__ */ D(d, { zIndex: p, position: x, layerStyle: g, maxHeight: _, showHorizontalScrollbar: y, minWidth: S, children: [
1124
1131
  R,
1125
1132
  b,
1126
1133
  N
1127
1134
  ] }), e[6] = d, e[7] = R, e[8] = b, e[9] = N, e[10] = S, e[11] = T) : T = e[11], T;
1128
- }, Sr = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
1129
- function yr(n, e = []) {
1135
+ }, Rr = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
1136
+ function Nr(n, e = []) {
1130
1137
  const t = e.map((r, o) => ({
1131
1138
  id: r.resourceId,
1132
1139
  key: r.resourceId,
@@ -1137,12 +1144,12 @@ function yr(n, e = []) {
1137
1144
  setRefElement: () => {
1138
1145
  }
1139
1146
  }));
1140
- return n == null || n === "" ? t : Sr(t, n);
1147
+ return n == null || n === "" ? t : Rr(t, n);
1141
1148
  }
1142
- const it = "\\.\\-<>_:", xe = ["#"].join(""), st = `[^${xe}${it}\\s]`, Rr = `(?:[${it}]|)`, lt = 75, Nr = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}${Rr}){0,${lt}}))$`), Cr = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}){0,${lt}}))$`);
1143
- function Ir(n, e) {
1144
- let t = Nr.exec(n);
1145
- if (t === null && (t = Cr.exec(n)), t !== null) {
1149
+ const st = "\\.\\-<>_:", be = ["#"].join(""), lt = `[^${be}${st}\\s]`, Cr = `(?:[${st}]|)`, ct = 75, kr = new RegExp(`(^|\\s|\\()([${be}]((?:${lt}${Cr}){0,${ct}}))$`), Ir = new RegExp(`(^|\\s|\\()([${be}]((?:${lt}){0,${ct}}))$`);
1150
+ function $r(n, e) {
1151
+ let t = kr.exec(n);
1152
+ if (t === null && (t = Ir.exec(n)), t !== null) {
1146
1153
  const r = t[1], o = t[3];
1147
1154
  if (o.length >= e)
1148
1155
  return {
@@ -1153,47 +1160,47 @@ function Ir(n, e) {
1153
1160
  }
1154
1161
  return null;
1155
1162
  }
1156
- const kr = 20;
1157
- function $r(n) {
1163
+ const Or = 20;
1164
+ function Lr(n) {
1158
1165
  const e = C(9), {
1159
1166
  items: t
1160
1167
  } = n;
1161
1168
  let r;
1162
1169
  e[0] !== t ? (r = t === void 0 ? [] : t, e[0] = t, e[1] = r) : r = e[1];
1163
- const o = r, [i, s] = kt(null), [c] = H(), a = yr(i, o);
1164
- let p;
1165
- e[2] !== c ? (p = (x, g, _) => {
1170
+ const o = r, [i, s] = $t(null), [c] = H(), a = Nr(i, o);
1171
+ let f;
1172
+ e[2] !== c ? (f = (x, g, _) => {
1166
1173
  c.update(() => {
1167
- g && (c.dispatchCommand(nt, {
1174
+ g && (c.dispatchCommand(rt, {
1168
1175
  resourceId: x.id,
1169
1176
  resourceType: x.group,
1170
1177
  name: x.name,
1171
1178
  nodeToReplace: g
1172
1179
  }), _());
1173
1180
  });
1174
- }, e[2] = c, e[3] = p) : p = e[3];
1175
- const u = p, h = Lr;
1181
+ }, e[2] = c, e[3] = f) : f = e[3];
1182
+ const u = f, h = wr;
1176
1183
  let m;
1177
- e[4] !== a ? (m = a.slice(0, kr), e[4] = a, e[5] = m) : m = e[5];
1184
+ e[4] !== a ? (m = a.slice(0, Or), e[4] = a, e[5] = m) : m = e[5];
1178
1185
  const d = m;
1179
- let f;
1180
- return e[6] !== d || e[7] !== u ? (f = /* @__PURE__ */ l(vt, { onQueryChange: s, onSelectOption: u, triggerFn: h, options: d, menuRenderFn: Or }), e[6] = d, e[7] = u, e[8] = f) : f = e[8], f;
1186
+ let p;
1187
+ return e[6] !== d || e[7] !== u ? (p = /* @__PURE__ */ l(wt, { onQueryChange: s, onSelectOption: u, triggerFn: h, options: d, menuRenderFn: vr }), e[6] = d, e[7] = u, e[8] = p) : p = e[8], p;
1181
1188
  }
1182
- function Or(n, e) {
1189
+ function vr(n, e) {
1183
1190
  const {
1184
1191
  options: t,
1185
1192
  selectedIndex: r,
1186
1193
  selectOptionAndCleanUp: o,
1187
1194
  setHighlightedIndex: i
1188
1195
  } = e;
1189
- return n.current ? wt.createPortal(/* @__PURE__ */ l(Tr, { options: t, selectedIndex: r, onSelectItem: (s, c) => {
1196
+ return n.current ? Pt.createPortal(/* @__PURE__ */ l(yr, { options: t, selectedIndex: r, onSelectItem: (s, c) => {
1190
1197
  i(c), o(s);
1191
1198
  }, onMouseEnterItem: (s) => {
1192
1199
  i(s);
1193
1200
  } }), n.current) : null;
1194
1201
  }
1195
- function Lr(n) {
1196
- return Ir(n, 0);
1202
+ function wr(n) {
1203
+ return $r(n, 0);
1197
1204
  }
1198
1205
  class Q extends re {
1199
1206
  __referenceId;
@@ -1221,7 +1228,7 @@ class Q extends re {
1221
1228
  }
1222
1229
  createDOM(e) {
1223
1230
  const t = document.createElement("span");
1224
- return De(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
1231
+ return Fe(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
1225
1232
  }
1226
1233
  updateDOM(e, t) {
1227
1234
  return (e.__name !== this.__name || e.__referenceId !== this.__referenceId) && (t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`), !1;
@@ -1235,7 +1242,7 @@ class Q extends re {
1235
1242
  static importDOM() {
1236
1243
  return {
1237
1244
  span: (e) => !e.hasAttribute("data-reference-id") || !e.hasAttribute("data-name") ? null : {
1238
- conversion: vr,
1245
+ conversion: Pr,
1239
1246
  priority: 1
1240
1247
  }
1241
1248
  };
@@ -1255,123 +1262,123 @@ class Q extends re {
1255
1262
  return `#${this.__name}`;
1256
1263
  }
1257
1264
  }
1258
- function vr(n) {
1265
+ function Pr(n) {
1259
1266
  const e = n.getAttribute("data-reference-id"), t = n.getAttribute("data-name");
1260
1267
  return !e || !t ? null : {
1261
- node: ct(e, t)
1268
+ node: at(e, t)
1262
1269
  };
1263
1270
  }
1264
- function ct(n, e) {
1271
+ function at(n, e) {
1265
1272
  return new Q(n, e);
1266
1273
  }
1267
- const wr = (n, e, t) => {
1268
- const r = ct(e, t);
1274
+ const Mr = (n, e, t) => {
1275
+ const r = at(e, t);
1269
1276
  if (n) {
1270
1277
  n?.replace(r), n.remove(), r.selectEnd();
1271
1278
  return;
1272
1279
  }
1273
1280
  };
1274
- function Pr(n) {
1281
+ function Ar(n) {
1275
1282
  const e = C(4), {
1276
1283
  onAddReference: t
1277
1284
  } = n, [r] = H();
1278
1285
  let o, i;
1279
- return e[0] !== r || e[1] !== t ? (o = () => pe(r.registerCommand(nt, (s) => {
1286
+ return e[0] !== r || e[1] !== t ? (o = () => he(r.registerCommand(rt, (s) => {
1280
1287
  const {
1281
1288
  resourceId: c,
1282
1289
  resourceType: a,
1283
- name: p,
1290
+ name: f,
1284
1291
  nodeToReplace: u
1285
1292
  } = s;
1286
1293
  return r.update(() => {
1287
- wr(u, c, p);
1294
+ Mr(u, c, f);
1288
1295
  }), t?.(c, a), !0;
1289
- }, Oe)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
1296
+ }, Le)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
1290
1297
  }
1291
- const Mr = {
1292
- ...Ee,
1298
+ const Dr = {
1299
+ ...xe,
1293
1300
  // Override paragraph class to remove margins specifically for prompt input
1294
1301
  paragraph: "rich-text__p rich-text__p--no-margin"
1295
- }, Ar = [ee, yt, Q], Dr = (n, e) => {
1302
+ }, Fr = [ee, Rt, Q], Hr = (n, e) => {
1296
1303
  const t = C(39), {
1297
1304
  defaultState: r,
1298
1305
  debug: o,
1299
1306
  isEditable: i,
1300
1307
  placeholder: s
1301
1308
  } = n, c = o === void 0 ? !1 : o, a = i === void 0 ? !0 : i, {
1302
- onChange: p,
1309
+ onChange: f,
1303
1310
  onError: u,
1304
1311
  onSubmit: h,
1305
1312
  references: m,
1306
1313
  onAddReference: d
1307
- } = n, f = u === void 0 ? Fr : u;
1314
+ } = n, p = u === void 0 ? zr : u;
1308
1315
  let x;
1309
1316
  t[0] !== m ? (x = m === void 0 ? [] : m, t[0] = m, t[1] = x) : x = t[1];
1310
1317
  const g = x;
1311
1318
  let _;
1312
- t[2] !== r || t[3] !== a || t[4] !== f ? (_ = {
1319
+ t[2] !== r || t[3] !== a || t[4] !== p ? (_ = {
1313
1320
  namespace: "PROMPT_EDITOR",
1314
- nodes: Ar,
1321
+ nodes: Fr,
1315
1322
  editorState: r,
1316
1323
  editable: a,
1317
- onError: f,
1318
- theme: Mr
1319
- }, t[2] = r, t[3] = a, t[4] = f, t[5] = _) : _ = t[5];
1324
+ onError: p,
1325
+ theme: Dr
1326
+ }, t[2] = r, t[3] = a, t[4] = p, t[5] = _) : _ = t[5];
1320
1327
  const y = _;
1321
1328
  let S;
1322
- t[6] !== r ? (S = ot(r), t[6] = r, t[7] = S) : S = t[7];
1323
- const R = Ot(S);
1329
+ t[6] !== r ? (S = it(r), t[6] = r, t[7] = S) : S = t[7];
1330
+ const R = Lt(S);
1324
1331
  let b;
1325
- t[8] !== s ? (b = s ?? /* @__PURE__ */ F(w, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
1332
+ t[8] !== s ? (b = s ?? /* @__PURE__ */ D(v, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
1326
1333
  "Type your query here or press ",
1327
- /* @__PURE__ */ l(St, { color: "fg.subtle", children: "#" }),
1334
+ /* @__PURE__ */ l(yt, { color: "fg.subtle", children: "#" }),
1328
1335
  " to add a reference."
1329
1336
  ] }), t[8] = s, t[9] = b) : b = t[9];
1330
1337
  const N = b;
1331
1338
  let T;
1332
- t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ l(Rt, {}), t[10] = T) : T = t[10];
1339
+ t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ l(Nt, {}), t[10] = T) : T = t[10];
1333
1340
  let E;
1334
- t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Je, { fullWidth: !0 }), t[11] = E) : E = t[11];
1335
- let k;
1336
- t[12] !== N ? (k = /* @__PURE__ */ l(Me, { contentEditable: E, placeholder: N, ErrorBoundary: we }), t[12] = N, t[13] = k) : k = t[13];
1337
- let P;
1338
- t[14] !== p ? (P = /* @__PURE__ */ l(Pe, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (te) => {
1341
+ t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(je, { fullWidth: !0 }), t[11] = E) : E = t[11];
1342
+ let I;
1343
+ t[12] !== N ? (I = /* @__PURE__ */ l(Ae, { contentEditable: E, placeholder: N, ErrorBoundary: Pe }), t[12] = N, t[13] = I) : I = t[13];
1344
+ let w;
1345
+ t[14] !== f ? (w = /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (te) => {
1339
1346
  te.read(() => {
1340
- const dt = Le(), le = mr(dt);
1341
- le !== R.current && (R.current = le, p?.(le, te.toJSON()));
1347
+ const ut = ve(), ce = pr(ut);
1348
+ ce !== R.current && (R.current = ce, f?.(ce, te.toJSON()));
1342
1349
  });
1343
- } }), t[14] = p, t[15] = P) : P = t[15];
1344
- let M;
1345
- t[16] !== e ? (M = /* @__PURE__ */ l(gr, { editorRef: e, previousTextRef: R }), t[16] = e, t[17] = M) : M = t[17];
1350
+ } }), t[14] = f, t[15] = w) : w = t[15];
1351
+ let P;
1352
+ t[16] !== e ? (P = /* @__PURE__ */ l(xr, { editorRef: e, previousTextRef: R }), t[16] = e, t[17] = P) : P = t[17];
1346
1353
  let $;
1347
- t[18] !== a ? ($ = /* @__PURE__ */ l(Qe, { isEditable: a }), t[18] = a, t[19] = $) : $ = t[19];
1348
- let A;
1349
- t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ l(ur, {}), t[20] = A) : A = t[20];
1354
+ t[18] !== a ? ($ = /* @__PURE__ */ l(Ze, { isEditable: a }), t[18] = a, t[19] = $) : $ = t[19];
1355
+ let M;
1356
+ t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ l(fr, {}), t[20] = M) : M = t[20];
1350
1357
  let O;
1351
- t[21] !== h ? (O = /* @__PURE__ */ l(xr, { onSubmit: h }), t[21] = h, t[22] = O) : O = t[22];
1358
+ t[21] !== h ? (O = /* @__PURE__ */ l(Tr, { onSubmit: h }), t[21] = h, t[22] = O) : O = t[22];
1352
1359
  let L;
1353
- t[23] !== g ? (L = /* @__PURE__ */ l($r, { items: g }), t[23] = g, t[24] = L) : L = t[24];
1354
- let D;
1355
- t[25] !== d ? (D = /* @__PURE__ */ l(Pr, { onAddReference: d }), t[25] = d, t[26] = D) : D = t[26];
1356
- let U;
1357
- t[27] !== c ? (U = c ? /* @__PURE__ */ l(Ze, {}) : "", t[27] = c, t[28] = U) : U = t[28];
1360
+ t[23] !== g ? (L = /* @__PURE__ */ l(Lr, { items: g }), t[23] = g, t[24] = L) : L = t[24];
1361
+ let A;
1362
+ t[25] !== d ? (A = /* @__PURE__ */ l(Ar, { onAddReference: d }), t[25] = d, t[26] = A) : A = t[26];
1363
+ let B;
1364
+ t[27] !== c ? (B = c ? /* @__PURE__ */ l(et, {}) : "", t[27] = c, t[28] = B) : B = t[28];
1358
1365
  let G;
1359
- return t[29] !== y || t[30] !== k || t[31] !== P || t[32] !== M || t[33] !== $ || t[34] !== O || t[35] !== L || t[36] !== D || t[37] !== U ? (G = /* @__PURE__ */ l(fe, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ F(ve, { initialConfig: y, children: [
1366
+ return t[29] !== y || t[30] !== I || t[31] !== w || t[32] !== P || t[33] !== $ || t[34] !== O || t[35] !== L || t[36] !== A || t[37] !== B ? (G = /* @__PURE__ */ l(pe, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ D(we, { initialConfig: y, children: [
1360
1367
  T,
1361
- k,
1368
+ I,
1369
+ w,
1362
1370
  P,
1363
- M,
1364
1371
  $,
1365
- A,
1372
+ M,
1366
1373
  O,
1367
1374
  L,
1368
- D,
1369
- U
1370
- ] }) }), t[29] = y, t[30] = k, t[31] = P, t[32] = M, t[33] = $, t[34] = O, t[35] = L, t[36] = D, t[37] = U, t[38] = G) : G = t[38], G;
1371
- }, Io = $t(Dr);
1372
- function Fr() {
1375
+ A,
1376
+ B
1377
+ ] }) }), t[29] = y, t[30] = I, t[31] = w, t[32] = P, t[33] = $, t[34] = O, t[35] = L, t[36] = A, t[37] = B, t[38] = G) : G = t[38], G;
1378
+ }, Oo = Ot(Hr);
1379
+ function zr() {
1373
1380
  }
1374
- function Hr(n) {
1381
+ function Br(n) {
1375
1382
  const e = C(5), {
1376
1383
  value: t,
1377
1384
  onUpdate: r
@@ -1381,7 +1388,7 @@ function Hr(n) {
1381
1388
  o && o.update(() => r(t), {
1382
1389
  tag: "history-merge"
1383
1390
  });
1384
- }, s = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = s) : (i = e[3], s = e[4]), B(i, s), null;
1391
+ }, s = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = s) : (i = e[3], s = e[4]), z(i, s), null;
1385
1392
  }
1386
1393
  class j extends Z {
1387
1394
  __href;
@@ -1413,138 +1420,138 @@ class j extends Z {
1413
1420
  };
1414
1421
  }
1415
1422
  static importJSON(e) {
1416
- return at(e.href, e.label);
1423
+ return dt(e.href, e.label);
1417
1424
  }
1418
1425
  decorate(e, t) {
1419
1426
  const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
1420
- return /* @__PURE__ */ l(v, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(je, { fileName: i, onSelect: () => {
1427
+ return /* @__PURE__ */ l(F, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Ke, { fileName: i, onSelect: () => {
1421
1428
  if (s)
1422
1429
  window.open(r, "_blank", "noopener,noreferrer");
1423
1430
  else if (c) {
1424
- const a = r.replace(/^#?\$PROJECT\//i, ""), p = new CustomEvent("ui:open-project-file", {
1431
+ const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
1425
1432
  detail: a
1426
1433
  });
1427
- window.dispatchEvent(p);
1434
+ window.dispatchEvent(f);
1428
1435
  } else
1429
1436
  window.location.assign(r);
1430
1437
  } }) });
1431
1438
  }
1432
1439
  }
1433
- function at(n, e) {
1440
+ function dt(n, e) {
1434
1441
  return new j(n, e);
1435
1442
  }
1436
- function Br(n) {
1443
+ function Ur(n) {
1437
1444
  return n instanceof j;
1438
1445
  }
1439
- const ke = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Ur = {
1446
+ const $e = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, qr = {
1440
1447
  dependencies: [j],
1441
1448
  export: (n) => {
1442
- if (Br(n)) {
1449
+ if (Ur(n)) {
1443
1450
  const e = n.__href, t = n.__label ?? e;
1444
1451
  return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
1445
1452
  }
1446
1453
  return null;
1447
1454
  },
1448
- regExp: ke,
1449
- importRegExp: ke,
1455
+ regExp: $e,
1456
+ importRegExp: $e,
1450
1457
  replace: (n, e) => {
1451
1458
  const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
1452
- n.replace(at(o, i));
1459
+ n.replace(dt(o, i));
1453
1460
  },
1454
1461
  type: "text-match"
1455
- }, me = [...Ye, Ur];
1456
- function ko(n) {
1462
+ }, fe = [...Qe, qr];
1463
+ function Lo(n) {
1457
1464
  const e = C(37), {
1458
1465
  debug: t,
1459
1466
  defaultState: r,
1460
1467
  fullWidth: o,
1461
1468
  isEditable: i,
1462
1469
  onChange: s
1463
- } = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, p = o === void 0 ? !1 : o, u = i === void 0 ? !1 : i;
1470
+ } = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, f = o === void 0 ? !1 : o, u = i === void 0 ? !1 : i;
1464
1471
  let h;
1465
- e[0] !== a ? (h = Bn(a), e[0] = a, e[1] = h) : h = e[1];
1472
+ e[0] !== a ? (h = Un(a), e[0] = a, e[1] = h) : h = e[1];
1466
1473
  const {
1467
1474
  frontmatter: m,
1468
1475
  body: d
1469
- } = h, f = u && !!s;
1476
+ } = h, p = u && !!s;
1470
1477
  let x;
1471
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = [qe, _e, ge, W, We, Be, Ue, he, Fe, J, q, K, j], e[2] = x) : x = e[2];
1478
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = [qe, _e, ge, W, We, ze, Be, Ee, Je, J, U, K, j], e[2] = x) : x = e[2];
1472
1479
  let g;
1473
- e[3] !== d ? (g = () => ze(tt(d), me, void 0, !1), e[3] = d, e[4] = g) : g = e[4];
1480
+ e[3] !== d ? (g = () => Ue(nt(d), fe, void 0, !1), e[3] = d, e[4] = g) : g = e[4];
1474
1481
  let _;
1475
1482
  e[5] !== u || e[6] !== g ? (_ = {
1476
1483
  namespace: "RICH_MESSAGE",
1477
1484
  nodes: x,
1478
1485
  editorState: g,
1479
- onError: qr,
1486
+ onError: Jr,
1480
1487
  editable: u,
1481
- theme: Ee
1488
+ theme: xe
1482
1489
  }, e[5] = u, e[6] = g, e[7] = _) : _ = e[7];
1483
1490
  const y = _;
1484
1491
  let S;
1485
- e[8] !== d ? (S = /* @__PURE__ */ l(Hr, { value: d, onUpdate: zr }), e[8] = d, e[9] = S) : S = e[9];
1492
+ e[8] !== d ? (S = /* @__PURE__ */ l(Br, { value: d, onUpdate: Wr }), e[8] = d, e[9] = S) : S = e[9];
1486
1493
  let R, b, N;
1487
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(Wt, {}), R = /* @__PURE__ */ l(zt, { newTab: !0 }), b = /* @__PURE__ */ l(Jt, {}), e[10] = R, e[11] = b, e[12] = N) : (R = e[10], b = e[11], N = e[12]);
1494
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(jt, {}), R = /* @__PURE__ */ l(Wt, { newTab: !0 }), b = /* @__PURE__ */ l(Kt, {}), e[10] = R, e[11] = b, e[12] = N) : (R = e[10], b = e[11], N = e[12]);
1488
1495
  let T;
1489
- e[13] !== u ? (T = u ? /* @__PURE__ */ l(jt, { maxIndent: 7 }) : null, e[13] = u, e[14] = T) : T = e[14];
1490
- let E, k, P, M;
1491
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(qt, {}), k = /* @__PURE__ */ l(Ln, {}), P = /* @__PURE__ */ l($n, {}), M = /* @__PURE__ */ l(hn, {}), e[15] = E, e[16] = k, e[17] = P, e[18] = M) : (E = e[15], k = e[16], P = e[17], M = e[18]);
1496
+ e[13] !== u ? (T = u ? /* @__PURE__ */ l(Gt, { maxIndent: 7 }) : null, e[13] = u, e[14] = T) : T = e[14];
1497
+ let E, I, w, P;
1498
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Jt, {}), I = /* @__PURE__ */ l(wn, {}), w = /* @__PURE__ */ l(Ln, {}), P = /* @__PURE__ */ l(gn, {}), e[15] = E, e[16] = I, e[17] = w, e[18] = P) : (E = e[15], I = e[16], w = e[17], P = e[18]);
1492
1499
  let $;
1493
- e[19] !== p ? ($ = /* @__PURE__ */ l(Me, { contentEditable: /* @__PURE__ */ l(Je, { fullWidth: p, isRichMessage: !0 }), ErrorBoundary: we }), e[19] = p, e[20] = $) : $ = e[20];
1494
- let A;
1495
- e[21] !== m || e[22] !== s || e[23] !== f ? (A = f ? /* @__PURE__ */ l(Pe, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (U) => {
1496
- U.read(() => {
1497
- const G = Le(), te = Ut(me, G);
1500
+ e[19] !== f ? ($ = /* @__PURE__ */ l(Ae, { contentEditable: /* @__PURE__ */ l(je, { fullWidth: f, isRichMessage: !0 }), ErrorBoundary: Pe }), e[19] = f, e[20] = $) : $ = e[20];
1501
+ let M;
1502
+ e[21] !== m || e[22] !== s || e[23] !== p ? (M = p ? /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (B) => {
1503
+ B.read(() => {
1504
+ const G = ve(), te = qt(fe, G);
1498
1505
  s?.(m + te);
1499
1506
  });
1500
- } }) : null, e[21] = m, e[22] = s, e[23] = f, e[24] = A) : A = e[24];
1507
+ } }) : null, e[21] = m, e[22] = s, e[23] = p, e[24] = M) : M = e[24];
1501
1508
  let O;
1502
- e[25] !== u ? (O = /* @__PURE__ */ l(Qe, { isEditable: u }), e[25] = u, e[26] = O) : O = e[26];
1509
+ e[25] !== u ? (O = /* @__PURE__ */ l(Ze, { isEditable: u }), e[25] = u, e[26] = O) : O = e[26];
1503
1510
  let L;
1504
- e[27] !== c ? (L = c && /* @__PURE__ */ l(Ze, {}), e[27] = c, e[28] = L) : L = e[28];
1505
- let D;
1506
- return e[29] !== y || e[30] !== T || e[31] !== $ || e[32] !== A || e[33] !== O || e[34] !== L || e[35] !== S ? (D = /* @__PURE__ */ l(fe, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ F(ve, { initialConfig: y, children: [
1511
+ e[27] !== c ? (L = c && /* @__PURE__ */ l(et, {}), e[27] = c, e[28] = L) : L = e[28];
1512
+ let A;
1513
+ return e[29] !== y || e[30] !== T || e[31] !== $ || e[32] !== M || e[33] !== O || e[34] !== L || e[35] !== S ? (A = /* @__PURE__ */ l(pe, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ D(we, { initialConfig: y, children: [
1507
1514
  S,
1508
1515
  N,
1509
1516
  R,
1510
1517
  b,
1511
1518
  T,
1512
1519
  E,
1513
- k,
1520
+ I,
1521
+ w,
1514
1522
  P,
1515
- M,
1516
1523
  $,
1517
- A,
1524
+ M,
1518
1525
  O,
1519
1526
  L
1520
- ] }) }), e[29] = y, e[30] = T, e[31] = $, e[32] = A, e[33] = O, e[34] = L, e[35] = S, e[36] = D) : D = e[36], D;
1527
+ ] }) }), e[29] = y, e[30] = T, e[31] = $, e[32] = M, e[33] = O, e[34] = L, e[35] = S, e[36] = A) : A = e[36], A;
1521
1528
  }
1522
- function zr(n) {
1523
- ze(tt(n), me, void 0, !1);
1529
+ function Wr(n) {
1530
+ Ue(nt(n), fe, void 0, !1);
1524
1531
  }
1525
- function qr(n) {
1532
+ function Jr(n) {
1526
1533
  return console.error(n);
1527
1534
  }
1528
1535
  export {
1529
- So as $,
1530
- Ln as C,
1531
- To as D,
1532
- hn as E,
1533
- $n as I,
1534
- Io as P,
1535
- ko as R,
1536
- Co as T,
1537
- yo as a,
1538
- Je as b,
1539
- Ro as c,
1540
- Qe as d,
1541
- No as e,
1542
- Ze as f,
1543
- an as g,
1544
- _r as h,
1545
- ot as i,
1546
- je as j,
1547
- tt as n,
1548
- Bn as s
1536
+ No as $,
1537
+ wn as C,
1538
+ Ro as D,
1539
+ gn as E,
1540
+ Ln as I,
1541
+ Oo as P,
1542
+ Lo as R,
1543
+ $o as T,
1544
+ Co as a,
1545
+ je as b,
1546
+ ko as c,
1547
+ Ze as d,
1548
+ Io as e,
1549
+ et as f,
1550
+ un as g,
1551
+ Er as h,
1552
+ it as i,
1553
+ Ke as j,
1554
+ nt as n,
1555
+ Un as s
1549
1556
  };
1550
- //# sourceMappingURL=rich-message-33DPxuWJ.js.map
1557
+ //# sourceMappingURL=rich-message-CEOSsdR2.js.map