@pstdio/ui 0.24.2 → 0.26.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 (109) hide show
  1. package/README.md +8 -1
  2. package/dist/{MermaidComponent-DSvPk-J8.js → MermaidComponent-X__B6qib.js} +3 -3
  3. package/dist/{MermaidComponent-DSvPk-J8.js.map → MermaidComponent-X__B6qib.js.map} +1 -1
  4. package/dist/activity-timeline-BynMjXSB.js +283 -0
  5. package/dist/activity-timeline-BynMjXSB.js.map +1 -0
  6. package/dist/alert-ubcrW24X.js +33 -0
  7. package/dist/alert-ubcrW24X.js.map +1 -0
  8. package/dist/browser-storage-BinyFNJX.js +40 -0
  9. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  10. package/dist/chat-ui.js +1515 -1428
  11. package/dist/chat-ui.js.map +1 -1
  12. package/dist/components/activity/activity-comment.d.ts +10 -2
  13. package/dist/components/chat-ui/components/chat-history-story.d.ts +14 -0
  14. package/dist/components/chat-ui/components/chat-input-history.d.ts +6 -0
  15. package/dist/components/chat-ui/components/chat-input.d.ts +2 -0
  16. package/dist/components/chat-ui/components/chat-panel-composer.d.ts +49 -0
  17. package/dist/components/chat-ui/components/use-chat-input-history.d.ts +16 -0
  18. package/dist/components/diff-viewer/code-editor.d.ts +2 -0
  19. package/dist/components/rich-text/index.d.ts +2 -0
  20. package/dist/components/rich-text/markdown-editor/markdown-editor-scrolling.play.d.ts +4 -0
  21. package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +3 -1
  22. package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +2 -0
  23. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +2 -0
  24. package/dist/components/rich-text/resource-activity-feed/resource-activity-feed.d.ts +58 -0
  25. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +1 -0
  26. package/dist/data-table.js +6 -6
  27. package/dist/diff.js +524 -522
  28. package/dist/diff.js.map +1 -1
  29. package/dist/{edit-mode-data-table-2E4GSOou.js → edit-mode-data-table-Nfmfi7bz.js} +23 -22
  30. package/dist/{edit-mode-data-table-2E4GSOou.js.map → edit-mode-data-table-Nfmfi7bz.js.map} +1 -1
  31. package/dist/index.d.ts +0 -1
  32. package/dist/index.js +1619 -1852
  33. package/dist/index.js.map +1 -1
  34. package/dist/{kanban-renderer-toolbar-Dcbxujbk.js → kanban-renderer-toolbar-Buek4icz.js} +34 -33
  35. package/dist/{kanban-renderer-toolbar-Dcbxujbk.js.map → kanban-renderer-toolbar-Buek4icz.js.map} +1 -1
  36. package/dist/kanban-renderer.js +31 -30
  37. package/dist/kanban-renderer.js.map +1 -1
  38. package/dist/lazy-markdown-editor-PzIBc9-l.js +42 -0
  39. package/dist/lazy-markdown-editor-PzIBc9-l.js.map +1 -0
  40. package/dist/{list-row-BDoV_iMV.js → list-row-DHzRa9-O.js} +2 -2
  41. package/dist/{list-row-BDoV_iMV.js.map → list-row-DHzRa9-O.js.map} +1 -1
  42. package/dist/{markdown-Cli3KGu9.js → markdown-BCfPxNpb.js} +322 -302
  43. package/dist/markdown-BCfPxNpb.js.map +1 -0
  44. package/dist/markdown-editor-CsJ4KNGu.js +1034 -0
  45. package/dist/markdown-editor-CsJ4KNGu.js.map +1 -0
  46. package/dist/{mermaid-renderer-CVnuKs-A.js → mermaid-renderer-D0YP0FmJ.js} +3 -3
  47. package/dist/{mermaid-renderer-CVnuKs-A.js.map → mermaid-renderer-D0YP0FmJ.js.map} +1 -1
  48. package/dist/mermaid.js +1 -1
  49. package/dist/{param-editor-CaRflJ3e.js → param-editor-CFM2Nf3l.js} +2 -2
  50. package/dist/{param-editor-CaRflJ3e.js.map → param-editor-CFM2Nf3l.js.map} +1 -1
  51. package/dist/param-editor-field-Bj-AGUY6.js +1728 -0
  52. package/dist/param-editor-field-Bj-AGUY6.js.map +1 -0
  53. package/dist/param-editor.d.ts +2 -0
  54. package/dist/param-editor.js +47 -0
  55. package/dist/param-editor.js.map +1 -0
  56. package/dist/prism-n5gcERyD.js +202 -0
  57. package/dist/prism-n5gcERyD.js.map +1 -0
  58. package/dist/radio-BfjibByI.js +51 -0
  59. package/dist/radio-BfjibByI.js.map +1 -0
  60. package/dist/rich-message-q6Y6QJOq.js +633 -0
  61. package/dist/rich-message-q6Y6QJOq.js.map +1 -0
  62. package/dist/rich-text.js +342 -177
  63. package/dist/rich-text.js.map +1 -1
  64. package/dist/scroll-area-BMbg1WcD.js +91 -0
  65. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  66. package/dist/slider-DBHjdxsU.js +1092 -0
  67. package/dist/slider-DBHjdxsU.js.map +1 -0
  68. package/dist/style.css +1 -1
  69. package/dist/terminal.js +96 -93
  70. package/dist/terminal.js.map +1 -1
  71. package/dist/theme/primitives/colors.d.ts +0 -23
  72. package/dist/theme/recipes/activity-comment.d.ts +36 -0
  73. package/dist/theme/recipes/alert.d.ts +1 -1
  74. package/dist/theme/recipes/dialog.d.ts +1 -1
  75. package/dist/theme/recipes/drawer.d.ts +1 -1
  76. package/dist/theme/recipes/menu.d.ts +1 -1
  77. package/dist/theme/recipes/popover.d.ts +1 -1
  78. package/dist/theme/recipes/progress-circle.d.ts +3 -3
  79. package/dist/theme/recipes/switch.d.ts +1 -1
  80. package/dist/theme/recipes/timeline.d.ts +10 -1
  81. package/dist/theme/recipes/tooltip.d.ts +1 -1
  82. package/dist/theme/recipes/window-title-bar.d.ts +1 -1
  83. package/dist/{theme-B5OVwYEU.js → theme-AzJH4Om3.js} +127 -808
  84. package/dist/theme-AzJH4Om3.js.map +1 -0
  85. package/dist/{theme-preference-Bpobguh4.js → theme-preference-DxGW1qg-.js} +2 -2
  86. package/dist/{theme-preference-Bpobguh4.js.map → theme-preference-DxGW1qg-.js.map} +1 -1
  87. package/dist/theme.js +1 -1
  88. package/dist/{tree-list-CZvcg3_6.js → tree-list-CPjbGTvs.js} +2 -2
  89. package/dist/{tree-list-CZvcg3_6.js.map → tree-list-CPjbGTvs.js.map} +1 -1
  90. package/dist/{workspace-badge-BR_GgsAG.js → workspace-badge-CuOcmnZc.js} +2 -2
  91. package/dist/{workspace-badge-BR_GgsAG.js.map → workspace-badge-CuOcmnZc.js.map} +1 -1
  92. package/package.json +7 -2
  93. package/dist/browser-storage-DPtOQJx0.js +0 -127
  94. package/dist/browser-storage-DPtOQJx0.js.map +0 -1
  95. package/dist/lazy-markdown-editor-DSlelhHV.js +0 -235
  96. package/dist/lazy-markdown-editor-DSlelhHV.js.map +0 -1
  97. package/dist/markdown-Cli3KGu9.js.map +0 -1
  98. package/dist/markdown-editor-BHoRATej.js +0 -1019
  99. package/dist/markdown-editor-BHoRATej.js.map +0 -1
  100. package/dist/param-editor-field-DVQlXbid.js +0 -2810
  101. package/dist/param-editor-field-DVQlXbid.js.map +0 -1
  102. package/dist/radio-cLMEBBZk.js +0 -76
  103. package/dist/radio-cLMEBBZk.js.map +0 -1
  104. package/dist/rich-message-gWYlm8Ji.js +0 -628
  105. package/dist/rich-message-gWYlm8Ji.js.map +0 -1
  106. package/dist/theme/recipes/landing-story.d.ts +0 -10
  107. package/dist/theme/recipes/landing-tool-demo.d.ts +0 -1
  108. package/dist/theme/recipes/landing.d.ts +0 -23
  109. package/dist/theme-B5OVwYEU.js.map +0 -1
@@ -1,31 +1,32 @@
1
1
  import { jsx as h } from "react/jsx-runtime";
2
2
  import { c as x } from "react/compiler-runtime";
3
- import { chakra as Tt, Box as $, Text as Ke, Image as $t, Code as Re, Link as St } from "@chakra-ui/react";
4
- import { ContentEditable as vt } from "@lexical/react/LexicalContentEditable";
5
- import { S as Ot } from "./browser-storage-DPtOQJx0.js";
6
- import { LinkNode as Ee, AutoLinkNode as je, $createLinkNode as Mt, $isLinkNode as We, $isAutoLinkNode as Ve, $createAutoLinkNode as Lt } from "@lexical/link";
7
- import { ListNode as Rt, ListItemNode as It, $isListNode as Ge, $isListItemNode as At, $createListNode as Bt, $createListItemNode as Dt } from "@lexical/list";
8
- import { CHECK_LIST as Ft, TRANSFORMERS as qt, LINK as Pt } from "@lexical/markdown";
9
- import { QuoteNode as zt, HeadingNode as Ut, $isHeadingNode as Ht, $isQuoteNode as Jt, $createQuoteNode as Kt, $createHeadingNode as jt } from "@lexical/rich-text";
10
- import { CodeNode as Qe, CodeHighlightNode as Wt, registerCodeHighlighting as Vt, $isCodeNode as Gt, $createCodeNode as Qt } from "@lexical/code";
11
- import { DecoratorNode as F, $getSelection as Xt, $getNodeByKey as ke, $isRangeSelection as Yt, $applyNodeReplacement as q, HISTORY_PUSH_TAG as Ie, $createParagraphNode as re, REDO_COMMAND as Zt, UNDO_COMMAND as en, ElementNode as tn, TextNode as ye, $createTextNode as E, $nodesOfType as nn, $isParagraphNode as Xe, $isElementNode as Ye, $isTextNode as rn, $isLineBreakNode as sn, $getRoot as Ze, $createLineBreakNode as ln } from "lexical";
3
+ import { chakra as St, Box as $, Text as je, Image as vt, Code as Ie, Link as Ot } from "@chakra-ui/react";
4
+ import { ContentEditable as Mt } from "@lexical/react/LexicalContentEditable";
5
+ import { S as Lt } from "./scroll-area-BMbg1WcD.js";
6
+ import { LinkNode as Ee, AutoLinkNode as We, $createLinkNode as Rt, $isLinkNode as Ve, $isAutoLinkNode as Ge, $createAutoLinkNode as It } from "@lexical/link";
7
+ import { ListNode as At, ListItemNode as Dt, $isListNode as Qe, $isListItemNode as Bt, $createListNode as Ft, $createListItemNode as qt } from "@lexical/list";
8
+ import { CHECK_LIST as Pt, TRANSFORMERS as zt, LINK as Ut } from "@lexical/markdown";
9
+ import { QuoteNode as Ht, HeadingNode as Jt, $isHeadingNode as Kt, $isQuoteNode as jt, $createQuoteNode as Wt, $createHeadingNode as Vt } from "@lexical/rich-text";
10
+ import { CodeNode as Xe, CodeHighlightNode as Gt, registerCodeHighlighting as Qt, $isCodeNode as Xt, $createCodeNode as Yt } from "@lexical/code";
11
+ import { DecoratorNode as F, $getSelection as Zt, $getNodeByKey as ke, $isRangeSelection as en, $applyNodeReplacement as q, HISTORY_PUSH_TAG as Ae, $createParagraphNode as re, REDO_COMMAND as tn, UNDO_COMMAND as nn, ElementNode as rn, TextNode as ye, $createTextNode as N, $nodesOfType as sn, $isParagraphNode as Ye, $isElementNode as Ze, $isTextNode as et, $isLineBreakNode as tt, $isInlineElementOrDecoratorNode as ln, $getRoot as nt, $createLineBreakNode as on } from "lexical";
12
12
  import { useLexicalComposerContext as le } from "@lexical/react/LexicalComposerContext";
13
- import * as on from "react";
14
- import { createContext as an, useContext as cn, useRef as et, useEffect as oe, Fragment as un, useState as dn, Suspense as tt, lazy as pn } from "react";
13
+ import * as an from "react";
14
+ import { createContext as cn, useContext as un, useRef as rt, useEffect as oe, Fragment as dn, useState as pn, Suspense as it, lazy as hn } from "react";
15
15
  import { diffChars as te } from "diff";
16
- import { fromMarkdown as nt } from "mdast-util-from-markdown";
17
- import { gfmToMarkdown as hn, gfmFromMarkdown as fn } from "mdast-util-gfm";
18
- import { mathToMarkdown as mn, mathFromMarkdown as _n } from "mdast-util-math";
19
- import { toMarkdown as gn } from "mdast-util-to-markdown";
20
- import { gfm as kn } from "micromark-extension-gfm";
21
- import { math as yn } from "micromark-extension-math";
22
- import { R as bn, L as xn } from "./lazy-markdown-editor-DSlelhHV.js";
23
- import { E as Cn } from "./edit-mode-data-table-2E4GSOou.js";
24
- import Nn from "dompurify";
25
- import wn from "katex";
26
- import { TreeView as En } from "@lexical/react/LexicalTreeView";
27
- const Tn = Tt(vt);
28
- function si(t) {
16
+ import { fromMarkdown as st } from "mdast-util-from-markdown";
17
+ import { gfmToMarkdown as fn, gfmFromMarkdown as mn } from "mdast-util-gfm";
18
+ import { mathToMarkdown as _n, mathFromMarkdown as gn } from "mdast-util-math";
19
+ import { toMarkdown as kn } from "mdast-util-to-markdown";
20
+ import { gfm as yn } from "micromark-extension-gfm";
21
+ import { math as bn } from "micromark-extension-math";
22
+ import { R as xn } from "./prism-n5gcERyD.js";
23
+ import { E as Cn } from "./edit-mode-data-table-Nfmfi7bz.js";
24
+ import { L as Nn } from "./lazy-markdown-editor-PzIBc9-l.js";
25
+ import wn from "dompurify";
26
+ import En from "katex";
27
+ import { TreeView as Tn } from "@lexical/react/LexicalTreeView";
28
+ const $n = St(Mt);
29
+ function ai(t) {
29
30
  const e = x(11), {
30
31
  onRef: n,
31
32
  fullWidth: r,
@@ -34,7 +35,7 @@ function si(t) {
34
35
  scrollable: l
35
36
  } = t, a = r === void 0 ? !1 : r, o = s === void 0 ? !1 : s, c = l === void 0 ? !0 : l, u = a ? "100%" : "45rem", d = a ? "0" : "auto";
36
37
  let p;
37
- e[0] !== u || e[1] !== d ? (p = /* @__PURE__ */ h(Tn, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: d, 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] = d, e[2] = p) : p = e[2];
38
+ e[0] !== u || e[1] !== d ? (p = /* @__PURE__ */ h($n, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: d, 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] = d, e[2] = p) : p = e[2];
38
39
  let _;
39
40
  e[3] !== n || e[4] !== i || e[5] !== p ? (_ = /* @__PURE__ */ h($, { ref: n, width: "100%", minH: "100%", padding: i, children: p }), e[3] = n, e[4] = i, e[5] = p, e[6] = _) : _ = e[6];
40
41
  const g = _;
@@ -47,7 +48,7 @@ function si(t) {
47
48
  minH: "100%"
48
49
  }, e[7] = k) : k = e[7];
49
50
  let y;
50
- return e[8] !== g || e[9] !== m ? (y = /* @__PURE__ */ h(Ot, { className: "rich-text", "data-rich-message": m, height: "100%", minH: "0", position: "relative", contentProps: k, children: g }), e[8] = g, e[9] = m, e[10] = y) : y = e[10], y;
51
+ return e[8] !== g || e[9] !== m ? (y = /* @__PURE__ */ h(Lt, { className: "rich-text", "data-rich-message": m, height: "100%", minH: "0", position: "relative", contentProps: k, children: g }), e[8] = g, e[9] = m, e[10] = y) : y = e[10], y;
51
52
  }
52
53
  class S extends F {
53
54
  __href;
@@ -83,7 +84,7 @@ class S extends F {
83
84
  }
84
85
  decorate(e, n) {
85
86
  const r = this.__href, s = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), a = /^#?\$PROJECT\//i.test(r);
86
- return /* @__PURE__ */ h($, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ h(bn, { fileName: s, onSelect: () => {
87
+ return /* @__PURE__ */ h($, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ h(xn, { fileName: s, onSelect: () => {
87
88
  if (l)
88
89
  window.open(r, "_blank", "noopener,noreferrer");
89
90
  else if (a) {
@@ -99,26 +100,26 @@ class S extends F {
99
100
  function Te(t, e) {
100
101
  return new S(t, e);
101
102
  }
102
- function rt(t) {
103
+ function lt(t) {
103
104
  return t instanceof S;
104
105
  }
105
- const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
106
+ const De = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Sn = {
106
107
  dependencies: [S],
107
108
  export: (t) => {
108
- if (rt(t)) {
109
+ if (lt(t)) {
109
110
  const e = t.__href, n = t.__label ?? e;
110
111
  return n ? `{{link('${n}')}}` : `{{link('${e}')}}`;
111
112
  }
112
113
  return null;
113
114
  },
114
- regExp: Ae,
115
- importRegExp: Ae,
115
+ regExp: De,
116
+ importRegExp: De,
116
117
  replace: (t, e) => {
117
118
  const n = e[2], i = /^(https?:\/\/|\/)/i.test(n) ? n : `#${n}`, s = n;
118
119
  t.replace(Te(i, s));
119
120
  },
120
121
  type: "text-match"
121
- }, Sn = {
122
+ }, vn = {
122
123
  code: "rich-text__code",
123
124
  codeHighlight: {
124
125
  atrule: "rich-text__tokenAttr",
@@ -192,19 +193,19 @@ const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
192
193
  row: "rich-text__row",
193
194
  content: "rich-text__content"
194
195
  }
195
- }, it = {
196
- extensions: [kn(), yn()],
197
- mdastExtensions: [fn(), _n()]
198
- }, vn = {
196
+ }, ot = {
197
+ extensions: [yn(), bn()],
198
+ mdastExtensions: [mn(), gn()]
199
+ }, On = {
199
200
  bullet: "-",
200
201
  emphasis: "*",
201
- extensions: [hn(), mn()],
202
+ extensions: [fn(), _n()],
202
203
  fence: "`",
203
204
  fences: !0,
204
205
  listItemIndent: "one",
205
206
  rule: "-",
206
207
  strong: "*"
207
- }, On = (t) => t.match(/^ {0,3}(`{3,}|~{3,})/), Mn = (t) => {
208
+ }, Mn = (t) => t.match(/^ {0,3}(`{3,}|~{3,})/), Ln = (t) => {
208
209
  let e = null, n = "";
209
210
  for (let r = 0; r < t.length; ) {
210
211
  if (t[r] === "`") {
@@ -226,7 +227,7 @@ const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
226
227
  n += t[r], r += 1;
227
228
  }
228
229
  return n;
229
- }, Ln = (t) => {
230
+ }, Rn = (t) => {
230
231
  let e = null;
231
232
  const n = [];
232
233
  for (const r of t.split(`
@@ -237,7 +238,7 @@ const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
237
238
  l?.[0] === e.character && l.length >= e.length && (e = null);
238
239
  continue;
239
240
  }
240
- const i = On(r)?.[1];
241
+ const i = Mn(r)?.[1];
241
242
  if (i) {
242
243
  e = {
243
244
  character: i[0] ?? "`",
@@ -259,37 +260,37 @@ const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
259
260
  n.push(r.replace("\\]", () => "$$"));
260
261
  continue;
261
262
  }
262
- n.push(Mn(r));
263
+ n.push(Ln(r));
263
264
  }
264
265
  return n.join(`
265
266
  `);
266
- }, st = (t) => nt(Ln(t), it), D = (t) => nt(t, it), lt = (t) => gn(t, vn).trimEnd(), $e = (t) => lt({
267
+ }, at = (t) => st(Rn(t), ot), B = (t) => st(t, ot), ct = (t) => kn(t, On).trimEnd(), $e = (t) => ct({
267
268
  type: "root",
268
269
  children: [t]
269
270
  }), U = (t) => $e({
270
271
  type: "paragraph",
271
272
  children: t
272
- }), ot = (t) => {
273
- const n = st(t).children[0];
273
+ }), ut = (t) => {
274
+ const n = at(t).children[0];
274
275
  return n?.type === "paragraph" || n?.type === "heading" ? n.children : [];
275
- }, Rn = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]), In = /^data:image\/(?:png|gif|jpeg|webp);base64,[a-z0-9+/=]+$/i, at = /^[a-z][a-z\d+.-]*:/i, An = (t) => {
276
- if (t.startsWith("#") || t.startsWith("/") || t.startsWith("./") || t.startsWith("../") || !at.test(t)) return !0;
276
+ }, In = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]), An = /^data:image\/(?:png|gif|jpeg|webp);base64,[a-z0-9+/=]+$/i, dt = /^[a-z][a-z\d+.-]*:/i, Dn = (t) => {
277
+ if (t.startsWith("#") || t.startsWith("/") || t.startsWith("./") || t.startsWith("../") || !dt.test(t)) return !0;
277
278
  try {
278
- return Rn.has(new URL(t).protocol);
279
+ return In.has(new URL(t).protocol);
279
280
  } catch {
280
281
  return !1;
281
282
  }
282
- }, Bn = (t) => t.startsWith("https://") ? !0 : In.test(t), ae = (t, e, n) => {
283
+ }, Bn = (t) => t.startsWith("https://") ? !0 : An.test(t), ae = (t, e, n) => {
283
284
  const r = n ? n(t, e) : t;
284
- return r === null ? null : e === "image" ? !at.test(t) && !n ? null : Bn(r) ? r : null : An(r) ? r : null;
285
- }, ct = an(void 0), li = (t) => {
285
+ return r === null ? null : e === "image" ? !dt.test(t) && !n ? null : Bn(r) ? r : null : Dn(r) ? r : null;
286
+ }, pt = cn(void 0), ci = (t) => {
286
287
  const e = x(3), {
287
288
  children: n,
288
289
  resolver: r
289
290
  } = t;
290
291
  let i;
291
- return e[0] !== n || e[1] !== r ? (i = /* @__PURE__ */ h(ct.Provider, { value: r, children: n }), e[0] = n, e[1] = r, e[2] = i) : i = e[2], i;
292
- }, Se = () => cn(ct), ut = (t) => {
292
+ return e[0] !== n || e[1] !== r ? (i = /* @__PURE__ */ h(pt.Provider, { value: r, children: n }), e[0] = n, e[1] = r, e[2] = i) : i = e[2], i;
293
+ }, Se = () => un(pt), ht = (t) => {
293
294
  const e = x(10), {
294
295
  source: n,
295
296
  alt: r,
@@ -302,11 +303,11 @@ const Ae = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, $n = {
302
303
  if (!o) {
303
304
  const d = r || "Image";
304
305
  let p;
305
- return e[3] !== d ? (p = /* @__PURE__ */ h($, { as: "span", display: "inline-block", paddingX: "xs", paddingY: "2xs", background: "bg.muted", borderRadius: "sm", children: /* @__PURE__ */ h(Ke, { as: "span", textStyle: "label/S/regular", color: "fg.muted", children: d }) }), e[3] = d, e[4] = p) : p = e[4], p;
306
+ return e[3] !== d ? (p = /* @__PURE__ */ h($, { as: "span", display: "inline-block", paddingX: "xs", paddingY: "2xs", background: "bg.muted", borderRadius: "sm", children: /* @__PURE__ */ h(je, { as: "span", textStyle: "label/S/regular", color: "fg.muted", children: d }) }), e[3] = d, e[4] = p) : p = e[4], p;
306
307
  }
307
308
  const c = i ?? void 0;
308
309
  let u;
309
- return e[5] !== r || e[6] !== s || e[7] !== o || e[8] !== c ? (u = /* @__PURE__ */ h($t, { src: o, alt: r, title: c, loading: "lazy", referrerPolicy: "no-referrer", onLoad: s }), e[5] = r, e[6] = s, e[7] = o, e[8] = c, e[9] = u) : u = e[9], u;
310
+ return e[5] !== r || e[6] !== s || e[7] !== o || e[8] !== c ? (u = /* @__PURE__ */ h(vt, { src: o, alt: r, title: c, loading: "lazy", referrerPolicy: "no-referrer", onLoad: s }), e[5] = r, e[6] = s, e[7] = o, e[8] = c, e[9] = u) : u = e[9], u;
310
311
  };
311
312
  class K extends F {
312
313
  __source;
@@ -359,8 +360,8 @@ class K extends F {
359
360
  if (!e.isEditable()) return;
360
361
  let r = null;
361
362
  e.getEditorState().read(() => {
362
- const s = Xt(), l = ke(this.getKey());
363
- if (!Yt(s) || !s.isCollapsed() || !l) return;
363
+ const s = Zt(), l = ke(this.getKey());
364
+ if (!en(s) || !s.isCollapsed() || !l) return;
364
365
  const c = l.getTopLevelElement()?.getNextSibling()?.getKey(), u = s.anchor.getNode().getTopLevelElement();
365
366
  c && c === u?.getKey() && (r = c);
366
367
  });
@@ -371,12 +372,12 @@ class K extends F {
371
372
  });
372
373
  });
373
374
  };
374
- return /* @__PURE__ */ h(ut, { source: this.__source, alt: this.__alt, title: this.__title, onLoad: n });
375
+ return /* @__PURE__ */ h(ht, { source: this.__source, alt: this.__alt, title: this.__title, onLoad: n });
375
376
  }
376
377
  }
377
- const be = (t, e, n = null) => q(new K(t, e, n)), Dn = (t) => t instanceof K, dt = (t) => /^<!--[\s\S]*-->$/.test(t.trim()), Fn = (t, e) => {
378
+ const be = (t, e, n = null) => q(new K(t, e, n)), Fn = (t) => t instanceof K, ft = (t) => /^<!--[\s\S]*-->$/.test(t.trim()), qn = (t, e) => {
378
379
  if (typeof document > "u") return null;
379
- const n = Nn.sanitize(t, {
380
+ const n = wn.sanitize(t, {
380
381
  FORBID_TAGS: ["script", "style", "iframe", "object", "embed", "form", "input", "button", "textarea", "select"]
381
382
  }), r = document.createElement("template");
382
383
  r.innerHTML = n;
@@ -385,11 +386,11 @@ const be = (t, e, n = null) => q(new K(t, e, n)), Dn = (t) => t instanceof K, dt
385
386
  o ? i.setAttribute(s, o) : i.removeAttribute(s);
386
387
  }
387
388
  return r.content;
388
- }, pt = (t) => {
389
+ }, mt = (t) => {
389
390
  const e = x(7), {
390
391
  source: n,
391
392
  display: r
392
- } = t, i = Se(), s = et(null);
393
+ } = t, i = Se(), s = rt(null);
393
394
  let l;
394
395
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = (d) => {
395
396
  s.current = d;
@@ -397,9 +398,9 @@ const be = (t, e, n = null) => q(new K(t, e, n)), Dn = (t) => t instanceof K, dt
397
398
  const a = l;
398
399
  let o, c;
399
400
  if (e[1] !== i || e[2] !== n ? (o = () => {
400
- const d = Fn(n, i), p = s.current;
401
+ const d = qn(n, i), p = s.current;
401
402
  p && p.replaceChildren(d ? d.cloneNode(!0) : document.createTextNode(""));
402
- }, c = [i, n], e[1] = i, e[2] = n, e[3] = o, e[4] = c) : (o = e[3], c = e[4]), oe(o, c), dt(n))
403
+ }, c = [i, n], e[1] = i, e[2] = n, e[3] = o, e[4] = c) : (o = e[3], c = e[4]), oe(o, c), ft(n))
403
404
  return null;
404
405
  if (r === "inline") {
405
406
  let d;
@@ -436,7 +437,7 @@ class j extends F {
436
437
  return this.__display;
437
438
  }
438
439
  getTextContent() {
439
- return dt(this.__source) ? "" : this.__source;
440
+ return ft(this.__source) ? "" : this.__source;
440
441
  }
441
442
  exportJSON() {
442
443
  return {
@@ -450,10 +451,10 @@ class j extends F {
450
451
  return ve(e.source, e.display);
451
452
  }
452
453
  decorate() {
453
- return /* @__PURE__ */ h(pt, { source: this.__source, display: this.__display });
454
+ return /* @__PURE__ */ h(mt, { source: this.__source, display: this.__display });
454
455
  }
455
456
  }
456
- const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
457
+ const ve = (t, e) => q(new j(t, e)), _t = (t) => t instanceof j, D = (t) => {
457
458
  const e = x(5), {
458
459
  nodes: n
459
460
  } = t, r = Se();
@@ -464,27 +465,27 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
464
465
  const o = `${l.type}-${a}`;
465
466
  switch (l.type) {
466
467
  case "text":
467
- return /* @__PURE__ */ h(un, { children: l.value }, o);
468
+ return /* @__PURE__ */ h(dn, { children: l.value }, o);
468
469
  case "strong":
469
- return /* @__PURE__ */ h(Ke, { as: "strong", fontWeight: "semibold", children: /* @__PURE__ */ h(B, { nodes: l.children }) }, o);
470
+ return /* @__PURE__ */ h(je, { as: "strong", fontWeight: "semibold", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
470
471
  case "emphasis":
471
- return /* @__PURE__ */ h($, { as: "em", children: /* @__PURE__ */ h(B, { nodes: l.children }) }, o);
472
+ return /* @__PURE__ */ h($, { as: "em", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
472
473
  case "delete":
473
- return /* @__PURE__ */ h($, { as: "del", children: /* @__PURE__ */ h(B, { nodes: l.children }) }, o);
474
+ return /* @__PURE__ */ h($, { as: "del", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
474
475
  case "inlineCode":
475
- return /* @__PURE__ */ h(Re, { children: l.value }, o);
476
+ return /* @__PURE__ */ h(Ie, { children: l.value }, o);
476
477
  case "break":
477
478
  return /* @__PURE__ */ h("br", {}, o);
478
479
  case "link": {
479
480
  const c = ae(l.url, "link", r);
480
- return c ? /* @__PURE__ */ h(St, { href: c, title: l.title ?? void 0, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ h(B, { nodes: l.children }) }, o) : /* @__PURE__ */ h(B, { nodes: l.children }, o);
481
+ return c ? /* @__PURE__ */ h(Ot, { href: c, title: l.title ?? void 0, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o) : /* @__PURE__ */ h(D, { nodes: l.children }, o);
481
482
  }
482
483
  case "image":
483
- return /* @__PURE__ */ h(ut, { source: l.url, alt: l.alt ?? "", title: l.title ?? null }, o);
484
+ return /* @__PURE__ */ h(ht, { source: l.url, alt: l.alt ?? "", title: l.title ?? null }, o);
484
485
  case "html":
485
- return /* @__PURE__ */ h(pt, { source: l.value, display: "inline" }, o);
486
+ return /* @__PURE__ */ h(mt, { source: l.value, display: "inline" }, o);
486
487
  case "inlineMath":
487
- return /* @__PURE__ */ h(Re, { children: l.value }, o);
488
+ return /* @__PURE__ */ h(Ie, { children: l.value }, o);
488
489
  default:
489
490
  return null;
490
491
  }
@@ -492,23 +493,23 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
492
493
  } else
493
494
  i = e[2];
494
495
  return i;
495
- }, ft = (t) => {
496
+ }, gt = (t) => {
496
497
  const e = x(4), {
497
498
  value: n
498
499
  } = t;
499
500
  let r;
500
- e[0] !== n ? (r = ot(n), e[0] = n, e[1] = r) : r = e[1];
501
+ e[0] !== n ? (r = ut(n), e[0] = n, e[1] = r) : r = e[1];
501
502
  let i;
502
- return e[2] !== r ? (i = /* @__PURE__ */ h(B, { nodes: r }), e[2] = r, e[3] = i) : i = e[3], i;
503
- }, qn = (t) => t.rows.map((e) => ({
503
+ return e[2] !== r ? (i = /* @__PURE__ */ h(D, { nodes: r }), e[2] = r, e[3] = i) : i = e[3], i;
504
+ }, Pn = (t) => t.rows.map((e) => ({
504
505
  id: e.id,
505
506
  ...e.cells
506
- })), Pn = (t) => t.columns, zn = (t) => {
507
+ })), zn = (t) => t.columns, Un = (t) => {
507
508
  const e = x(38), {
508
509
  editor: n,
509
510
  nodeKey: r,
510
511
  table: i
511
- } = t, [s, l] = dn(!1), a = et(null);
512
+ } = t, [s, l] = pn(!1), a = rt(null);
512
513
  let o;
513
514
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = () => {
514
515
  setTimeout(() => a.current?.focus(), 0);
@@ -520,7 +521,7 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
520
521
  const b = ke(r);
521
522
  xe(b) && b.setTable(f(b.getTable()));
522
523
  }, {
523
- tag: Ie
524
+ tag: Ae
524
525
  }), c();
525
526
  }, e[1] = n, e[2] = r, e[3] = u) : u = e[3];
526
527
  const d = u;
@@ -528,9 +529,9 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
528
529
  e[4] !== d ? (p = (f) => {
529
530
  d((b) => ({
530
531
  columns: f,
531
- rows: b.rows.map((N) => ({
532
- ...N,
533
- cells: Object.fromEntries(f.map((A) => [A.id, N.cells[A.id] ?? ""]))
532
+ rows: b.rows.map((E) => ({
533
+ ...E,
534
+ cells: Object.fromEntries(f.map((A) => [A.id, E.cells[A.id] ?? ""]))
534
535
  }))
535
536
  }));
536
537
  }, e[4] = d, e[5] = p) : p = e[5];
@@ -539,9 +540,9 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
539
540
  e[6] !== d ? (g = (f) => {
540
541
  d((b) => ({
541
542
  ...b,
542
- rows: f.map((N, A) => ({
543
- id: String(N.id ?? b.rows[A]?.id ?? `row-${A + 1}`),
544
- cells: Object.fromEntries(b.columns.map((Le) => [Le.id, String(N[Le.id] ?? "")]))
543
+ rows: f.map((E, A) => ({
544
+ id: String(E.id ?? b.rows[A]?.id ?? `row-${A + 1}`),
545
+ cells: Object.fromEntries(b.columns.map((Re) => [Re.id, String(E[Re.id] ?? "")]))
545
546
  }))
546
547
  }));
547
548
  }, e[6] = d, e[7] = g) : g = e[7];
@@ -555,52 +556,52 @@ const ve = (t, e) => q(new j(t, e)), ht = (t) => t instanceof j, B = (t) => {
555
556
  f.replace(b), b.select();
556
557
  }
557
558
  }, {
558
- tag: Ie
559
+ tag: Ae
559
560
  }), setTimeout(() => n.focus(), 0);
560
561
  }, e[8] = n, e[9] = r, e[10] = k) : k = e[10];
561
562
  const y = k;
562
- let C;
563
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = (f) => {
563
+ let w;
564
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (f) => {
564
565
  f.target.closest("button, input, textarea, [contenteditable='true'], [role='menuitem']") || (f.preventDefault(), a.current?.focus());
565
- }, e[11] = C) : C = e[11];
566
- const wt = C;
566
+ }, e[11] = w) : w = e[11];
567
+ const Tt = w;
567
568
  let G;
568
569
  e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (G = (f) => {
569
570
  f.currentTarget.contains(f.relatedTarget) || l(!1);
570
571
  }, e[12] = G) : G = e[12];
571
- const Et = G;
572
+ const $t = G;
572
573
  let Q;
573
574
  e[13] !== y || e[14] !== n || e[15] !== s ? (Q = (f) => {
574
- const b = f.target, N = b.matches("input, textarea") || b.isContentEditable;
575
- if ((f.ctrlKey || f.metaKey) && f.key.toLowerCase() === "z" && !N) {
576
- f.preventDefault(), f.stopPropagation(), n.dispatchCommand(f.shiftKey ? Zt : en, void 0);
575
+ const b = f.target, E = b.matches("input, textarea") || b.isContentEditable;
576
+ if ((f.ctrlKey || f.metaKey) && f.key.toLowerCase() === "z" && !E) {
577
+ f.preventDefault(), f.stopPropagation(), n.dispatchCommand(f.shiftKey ? tn : nn, void 0);
577
578
  return;
578
579
  }
579
- N || s && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), f.stopPropagation(), y());
580
+ E || s && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), f.stopPropagation(), y());
580
581
  }, e[13] = y, e[14] = n, e[15] = s, e[16] = Q) : Q = e[16];
581
582
  const de = Q, pe = String(s), he = s ? "2px solid" : "none";
582
583
  let X;
583
584
  e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = () => l(!0), e[17] = X) : X = e[17];
584
585
  let M;
585
- e[18] !== i ? (M = qn(i), e[18] = i, e[19] = M) : M = e[19];
586
+ e[18] !== i ? (M = Pn(i), e[18] = i, e[19] = M) : M = e[19];
586
587
  let L;
587
- e[20] !== i ? (L = Pn(i), e[20] = i, e[21] = L) : L = e[21];
588
+ e[20] !== i ? (L = zn(i), e[20] = i, e[21] = L) : L = e[21];
588
589
  let R;
589
590
  e[22] !== _ || e[23] !== m || e[24] !== L ? (R = {
590
591
  columns: L,
591
592
  onColumnsChange: _,
592
593
  onDataChange: m,
593
- renderHeader: Un,
594
- renderCell: Hn,
595
- renderCellEditor: Jn
594
+ renderHeader: Hn,
595
+ renderCell: Jn,
596
+ renderCellEditor: Kn
596
597
  }, e[22] = _, e[23] = m, e[24] = L, e[25] = R) : R = e[25];
597
598
  let Y;
598
599
  e[26] !== n ? (Y = n.isEditable(), e[26] = n, e[27] = Y) : Y = e[27];
599
600
  const fe = !Y;
600
601
  let I;
601
- e[28] !== M || e[29] !== R || e[30] !== fe ? (I = /* @__PURE__ */ h(Cn, { data: M, editMode: R, fullWidth: !0, getRowId: Kn, initialPageSize: 30, isReadOnly: fe }), e[28] = M, e[29] = R, e[30] = fe, e[31] = I) : I = e[31];
602
+ e[28] !== M || e[29] !== R || e[30] !== fe ? (I = /* @__PURE__ */ h(Cn, { data: M, editMode: R, fullWidth: !0, getRowId: jn, initialPageSize: 30, isReadOnly: fe }), e[28] = M, e[29] = R, e[30] = fe, e[31] = I) : I = e[31];
602
603
  let Z;
603
- return e[32] !== de || e[33] !== s || e[34] !== I || e[35] !== pe || e[36] !== he ? (Z = /* @__PURE__ */ h($, { ref: a, "data-testid": "markdown-table-node", "data-selected": pe, "aria-label": "Markdown table", "aria-selected": s, tabIndex: 0, outline: he, outlineColor: "border.accent-light", outlineOffset: "2px", borderRadius: "sm", onFocus: X, onBlur: Et, onClick: wt, onKeyDownCapture: de, children: I }), e[32] = de, e[33] = s, e[34] = I, e[35] = pe, e[36] = he, e[37] = Z) : Z = e[37], Z;
604
+ return e[32] !== de || e[33] !== s || e[34] !== I || e[35] !== pe || e[36] !== he ? (Z = /* @__PURE__ */ h($, { ref: a, "data-testid": "markdown-table-node", "data-selected": pe, "aria-label": "Markdown table", "aria-selected": s, tabIndex: 0, outline: he, outlineColor: "border.accent-light", outlineOffset: "2px", borderRadius: "sm", onFocus: X, onBlur: $t, onClick: Tt, onKeyDownCapture: de, children: I }), e[32] = de, e[33] = s, e[34] = I, e[35] = pe, e[36] = he, e[37] = Z) : Z = e[37], Z;
604
605
  };
605
606
  class W extends F {
606
607
  __table;
@@ -627,7 +628,7 @@ class W extends F {
627
628
  return !1;
628
629
  }
629
630
  decorate(e) {
630
- return /* @__PURE__ */ h(zn, { editor: e, nodeKey: this.__key, table: this.__table });
631
+ return /* @__PURE__ */ h(Un, { editor: e, nodeKey: this.__key, table: this.__table });
631
632
  }
632
633
  exportJSON() {
633
634
  return {
@@ -637,7 +638,7 @@ class W extends F {
637
638
  };
638
639
  }
639
640
  static importJSON(e) {
640
- return mt(e.table);
641
+ return kt(e.table);
641
642
  }
642
643
  getTextContent() {
643
644
  const e = this.__table.columns.map((i) => i.label).join(" | "), n = this.__table.columns.map(() => "---").join(" | "), r = this.__table.rows.map((i) => this.__table.columns.map((s) => i.cells[s.id] ?? "").join(" | "));
@@ -645,21 +646,21 @@ class W extends F {
645
646
  `);
646
647
  }
647
648
  }
648
- const mt = (t) => q(new W(t)), xe = (t) => t instanceof W;
649
- function Un(t) {
650
- return /* @__PURE__ */ h(ft, { value: t.label });
651
- }
649
+ const kt = (t) => q(new W(t)), xe = (t) => t instanceof W;
652
650
  function Hn(t) {
653
- return /* @__PURE__ */ h(ft, { value: String(t.value ?? "") });
651
+ return /* @__PURE__ */ h(gt, { value: t.label });
654
652
  }
655
653
  function Jn(t) {
654
+ return /* @__PURE__ */ h(gt, { value: String(t.value ?? "") });
655
+ }
656
+ function Kn(t) {
656
657
  const {
657
658
  value: e,
658
659
  onChange: n
659
660
  } = t;
660
- return /* @__PURE__ */ h(xn, { autoFocus: !0, defaultState: e, fullWidth: !0, isEditable: !0, padding: "xs", scrollable: !1, onChange: n });
661
+ return /* @__PURE__ */ h(Nn, { autoFocus: !0, defaultState: e, fullWidth: !0, isEditable: !0, padding: "xs", scrollable: !1, onChange: n });
661
662
  }
662
- function Kn(t) {
663
+ function jn(t) {
663
664
  return String(t.id);
664
665
  }
665
666
  const Ce = (t, e) => ae(t, "link", e) ?? "about:blank";
@@ -701,7 +702,7 @@ class V extends Ee {
701
702
  });
702
703
  }
703
704
  }
704
- const Ne = (t, e, n) => q(new V(t, Ce(t, e), n)), jn = (t) => t instanceof V, Wn = on.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
705
+ const Ne = (t, e, n) => q(new V(t, Ce(t, e), n)), Wn = (t) => t instanceof V, Vn = an.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
705
706
  function Be(t) {
706
707
  let e = t.getAttribute("data-lexical-equation");
707
708
  const n = t.getAttribute("data-lexical-inline") === "true";
@@ -738,7 +739,7 @@ class O extends F {
738
739
  }
739
740
  exportDOM() {
740
741
  const e = document.createElement(this.__inline ? "span" : "div"), n = btoa(this.__equation);
741
- return e.setAttribute("data-lexical-equation", n), e.setAttribute("data-lexical-inline", `${this.__inline}`), wn.render(this.__equation, e, {
742
+ return e.setAttribute("data-lexical-equation", n), e.setAttribute("data-lexical-inline", `${this.__inline}`), En.render(this.__equation, e, {
742
743
  displayMode: !this.__inline,
743
744
  // true === block display //
744
745
  errorColor: "#cc0000",
@@ -779,7 +780,7 @@ class O extends F {
779
780
  return this.__inline;
780
781
  }
781
782
  decorate() {
782
- return /* @__PURE__ */ h(tt, { fallback: null, children: /* @__PURE__ */ h(Wn, { equation: this.__equation, inline: this.__inline }) });
783
+ return /* @__PURE__ */ h(it, { fallback: null, children: /* @__PURE__ */ h(Vn, { equation: this.__equation, inline: this.__inline }) });
783
784
  }
784
785
  }
785
786
  function P(t = "", e = !1) {
@@ -789,7 +790,7 @@ function P(t = "", e = !1) {
789
790
  function ce(t) {
790
791
  return t instanceof O;
791
792
  }
792
- const Vn = {
793
+ const Gn = {
793
794
  dependencies: [O],
794
795
  export: (t) => ce(t) && t.isInline() ? `\\( ${t.getEquation().trim()} \\)` : null,
795
796
  importRegExp: /\\\((.*?)\\\)/,
@@ -799,7 +800,7 @@ const Vn = {
799
800
  t.replace(n);
800
801
  },
801
802
  type: "text-match"
802
- }, Gn = {
803
+ }, Qn = {
803
804
  dependencies: [O],
804
805
  regExpStart: /\\\[/,
805
806
  regExpEnd: /\\]/,
@@ -807,10 +808,10 @@ const Vn = {
807
808
  replace: (t, e, n, r, i) => i ? (t.append(P(i.join(" "), !1)), !0) : !1,
808
809
  type: "multiline-element"
809
810
  };
810
- function oi() {
811
+ function ui() {
811
812
  return null;
812
813
  }
813
- class z extends tn {
814
+ class z extends rn {
814
815
  static getType() {
815
816
  return "hr";
816
817
  }
@@ -839,10 +840,10 @@ class z extends tn {
839
840
  function Oe() {
840
841
  return new z();
841
842
  }
842
- function _t(t) {
843
+ function yt(t) {
843
844
  return t instanceof z;
844
845
  }
845
- const Qn = pn(() => import("./MermaidComponent-DSvPk-J8.js"));
846
+ const Xn = hn(() => import("./MermaidComponent-X__B6qib.js"));
846
847
  class v extends F {
847
848
  __code;
848
849
  static getType() {
@@ -883,25 +884,25 @@ ${this.__code}
883
884
  n.__code = e;
884
885
  }
885
886
  decorate() {
886
- return /* @__PURE__ */ h(tt, { fallback: null, children: /* @__PURE__ */ h(Qn, { code: this.__code, nodeKey: this.__key }) });
887
+ return /* @__PURE__ */ h(it, { fallback: null, children: /* @__PURE__ */ h(Xn, { code: this.__code, nodeKey: this.__key }) });
887
888
  }
888
889
  }
889
- function Xn(t) {
890
+ function Yn(t) {
890
891
  return t instanceof v;
891
892
  }
892
- function Yn(t) {
893
+ function Zn(t) {
893
894
  return q(new v(t));
894
895
  }
895
- const Zn = {
896
+ const er = {
896
897
  dependencies: [z],
897
- export: (t) => _t(t) ? "***" : null,
898
+ export: (t) => yt(t) ? "***" : null,
898
899
  regExp: /^(---|\*\*\*|___)\s?$/,
899
900
  replace: (t) => {
900
901
  const e = Oe();
901
902
  t.replace(e);
902
903
  },
903
904
  type: "element"
904
- }, er = {
905
+ }, tr = {
905
906
  dependencies: [ye],
906
907
  export: (t, e) => {
907
908
  if (t instanceof ye) {
@@ -921,38 +922,38 @@ const Zn = {
921
922
  regExp: /<ins>(.*)<\/ins>/,
922
923
  importRegExp: /<ins>(.*)<\/ins>/,
923
924
  replace: (t, e) => {
924
- const n = E(e[1]);
925
+ const n = N(e[1]);
925
926
  n.toggleFormat("underline"), t.replace(n);
926
927
  },
927
928
  type: "text-match"
928
- }, tr = {
929
+ }, nr = {
929
930
  dependencies: [ye],
930
931
  export: (t, e) => null,
931
932
  regExp: /<u>(.*)<\/u>/,
932
933
  importRegExp: /<u>(.*)<\/u>/,
933
934
  replace: (t, e) => {
934
- const n = E(e[1]);
935
+ const n = N(e[1]);
935
936
  n.toggleFormat("underline"), t.replace(n);
936
937
  },
937
938
  type: "text-match"
938
- }, De = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, H = (t) => t.replace(/\\([*_`~\\])/g, "$1"), nr = (t) => t.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), rr = (t) => t?.replace(/\\(["\\])/g, "$1"), gt = (t, e, n) => {
939
+ }, Fe = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, H = (t) => t.replace(/\\([*_`~\\])/g, "$1"), rr = (t) => t.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), ir = (t) => t?.replace(/\\(["\\])/g, "$1"), bt = (t, e, n) => {
939
940
  if (t !== e)
940
941
  return n;
941
942
  const r = e.replace(/([*_`~\\])/g, "\\$1");
942
943
  return n.replace(r, e);
943
- }, ir = {
944
+ }, sr = {
944
945
  dependencies: [Ee],
945
946
  export: (t, e) => {
946
- if (!We(t) || Ve(t))
947
+ if (!Ve(t) || Ge(t))
947
948
  return null;
948
- const n = t.getTitle(), r = H(t.getURL()), i = gt(t.getTextContent(), r, e(t));
949
- return n != null ? `[${i}](${r} "${nr(n)}")` : `[${i}](${r})`;
949
+ const n = t.getTitle(), r = H(t.getURL()), i = bt(t.getTextContent(), r, e(t));
950
+ return n != null ? `[${i}](${r} "${rr(n)}")` : `[${i}](${r})`;
950
951
  },
951
952
  importRegExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,
952
953
  regExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,
953
954
  replace: (t, e) => {
954
- const [, n, r, i] = e, s = H(r), l = Mt(s, {
955
- title: rr(i)
955
+ const [, n, r, i] = e, s = H(r), l = Rt(s, {
956
+ title: ir(i)
956
957
  }), a = n.split("[").length - 1, o = n.split("]").length - 1;
957
958
  let c = n, u = "";
958
959
  if (a < o)
@@ -961,52 +962,52 @@ const Zn = {
961
962
  const _ = n.split("[");
962
963
  u = `[${_[0]}`, c = _.slice(1).join("[");
963
964
  }
964
- const d = H(c), p = E(d === s ? s : d);
965
- return p.setFormat(t.getFormat()), l.append(p), t.replace(l), u && l.insertBefore(E(u)), p;
965
+ const d = H(c), p = N(d === s ? s : d);
966
+ return p.setFormat(t.getFormat()), l.append(p), t.replace(l), u && l.insertBefore(N(u)), p;
966
967
  },
967
968
  trigger: ")",
968
969
  type: "text-match"
969
- }, sr = {
970
- dependencies: [je],
970
+ }, lr = {
971
+ dependencies: [We],
971
972
  export: (t, e) => {
972
- if (!Ve(t))
973
+ if (!Ge(t))
973
974
  return null;
974
975
  const n = H(t.getURL());
975
- return gt(t.getTextContent(), n, e(t));
976
+ return bt(t.getTextContent(), n, e(t));
976
977
  },
977
- regExp: De,
978
- importRegExp: De,
978
+ regExp: Fe,
979
+ importRegExp: Fe,
979
980
  replace: (t, e) => {
980
- const n = H(e[0]), r = Lt(n), i = E(n);
981
+ const n = H(e[0]), r = It(n), i = N(n);
981
982
  i.setFormat(t.getFormat()), r.append(i), t.replace(r);
982
983
  },
983
984
  type: "text-match"
984
- }, lr = [Zn, er, tr, ir, sr], ai = [zt, Ee, je, V, K, j, W, Ut, Rt, It, Qe, Wt, v, O, z, S], or = [Ft, ...qt.filter((t) => t !== Pt), ...lr, Vn, Gn], ci = [...or, $n], ui = Sn;
985
- function ar(t) {
985
+ }, or = [er, tr, nr, sr, lr], di = [Ht, Ee, We, V, K, j, W, Jt, At, Dt, Xe, Gt, v, O, z, S], ar = [Pt, ...zt.filter((t) => t !== Ut), ...or, Gn, Qn], pi = [...ar, Sn], hi = vn;
986
+ function cr(t) {
986
987
  return t.trim().toLowerCase() === "mermaid";
987
988
  }
988
- function cr(t) {
989
+ function ur(t) {
989
990
  const e = t.getLanguage() ?? "plaintext";
990
- return ar(e) ? (t.replace(new v(t.getTextContent())), !0) : !1;
991
+ return cr(e) ? (t.replace(new v(t.getTextContent())), !0) : !1;
991
992
  }
992
- function di() {
993
+ function fi() {
993
994
  const t = x(3), [e] = le();
994
995
  let n, r;
995
996
  return t[0] !== e ? (n = () => {
996
- e.update(ur);
997
+ e.update(dr);
997
998
  }, r = [e], t[0] = e, t[1] = n, t[2] = r) : (n = t[1], r = t[2]), oe(n, r), null;
998
999
  }
999
- function ur() {
1000
- const t = nn(Qe);
1000
+ function dr() {
1001
+ const t = sn(Xe);
1001
1002
  for (const e of t)
1002
- cr(e);
1003
+ ur(e);
1003
1004
  }
1004
- function pi() {
1005
+ function mi() {
1005
1006
  const t = x(3), [e] = le();
1006
1007
  let n, r;
1007
- return t[0] !== e ? (n = () => Vt(e), r = [e], t[0] = e, t[1] = n, t[2] = r) : (n = t[1], r = t[2]), oe(n, r), null;
1008
+ return t[0] !== e ? (n = () => Qt(e), r = [e], t[0] = e, t[1] = n, t[2] = r) : (n = t[1], r = t[2]), oe(n, r), null;
1008
1009
  }
1009
- const dr = (t) => {
1010
+ const pr = (t) => {
1010
1011
  let e = t.hasFormat("code") ? {
1011
1012
  type: "inlineCode",
1012
1013
  value: t.getTextContent()
@@ -1030,12 +1031,12 @@ const dr = (t) => {
1030
1031
  type: "html",
1031
1032
  value: "</ins>"
1032
1033
  }] : [e];
1033
- }, kt = (t) => {
1034
- if (rn(t)) return dr(t);
1035
- if (sn(t)) return [{
1034
+ }, Me = (t) => {
1035
+ if (et(t)) return pr(t);
1036
+ if (tt(t)) return [{
1036
1037
  type: "break"
1037
1038
  }];
1038
- if (Dn(t))
1039
+ if (Fn(t))
1039
1040
  return [{
1040
1041
  type: "image",
1041
1042
  url: t.getSource(),
@@ -1046,40 +1047,56 @@ const dr = (t) => {
1046
1047
  type: "inlineMath",
1047
1048
  value: t.getEquation()
1048
1049
  }];
1049
- if (ht(t)) return [{
1050
+ if (_t(t)) return [{
1050
1051
  type: "html",
1051
1052
  value: t.getSource()
1052
1053
  }];
1053
- if (rt(t)) return [{
1054
+ if (lt(t)) return [{
1054
1055
  type: "text",
1055
1056
  value: t.getTextContent()
1056
1057
  }];
1057
- if (We(t))
1058
+ if (Ve(t))
1058
1059
  return [{
1059
1060
  type: "link",
1060
- url: jn(t) ? t.getSource() : t.getURL(),
1061
+ url: Wn(t) ? t.getSource() : t.getURL(),
1061
1062
  title: t.getTitle(),
1062
1063
  children: ie(t)
1063
1064
  }];
1064
- if (Ye(t)) return ie(t);
1065
+ if (Ze(t)) return ie(t);
1065
1066
  const e = t.getTextContent();
1066
1067
  return e ? [{
1067
1068
  type: "text",
1068
1069
  value: e
1069
1070
  }] : [];
1070
- }, ie = (t) => t.getChildren().flatMap(kt), we = (t) => ({
1071
+ }, ie = (t) => t.getChildren().flatMap(Me), hr = (t) => {
1072
+ const e = [], n = [], r = () => {
1073
+ n.length && e.push({
1074
+ type: "paragraph",
1075
+ children: n.splice(0)
1076
+ });
1077
+ };
1078
+ for (const i of t.getChildren())
1079
+ if (et(i) || tt(i) || ln(i))
1080
+ n.push(...Me(i));
1081
+ else {
1082
+ r();
1083
+ const s = Ct(i);
1084
+ s && e.push(s);
1085
+ }
1086
+ return r(), e;
1087
+ }, we = (t) => ({
1071
1088
  type: "paragraph",
1072
1089
  children: ie(t)
1073
- }), pr = (t) => {
1090
+ }), fr = (t) => {
1074
1091
  const e = [], n = [];
1075
1092
  for (const r of t.getChildren())
1076
- Ge(r) ? (n.length && e.push({
1093
+ Qe(r) ? (n.length && e.push({
1077
1094
  type: "paragraph",
1078
1095
  children: n.splice(0)
1079
- }), e.push(yt(r))) : Xe(r) ? (n.length && e.push({
1096
+ }), e.push(xt(r))) : Ye(r) ? (n.length && e.push({
1080
1097
  type: "paragraph",
1081
1098
  children: n.splice(0)
1082
- }), e.push(we(r))) : n.push(...kt(r));
1099
+ }), e.push(we(r))) : n.push(...Me(r));
1083
1100
  return (n.length || e.length === 0) && e.unshift({
1084
1101
  type: "paragraph",
1085
1102
  children: n
@@ -1089,50 +1106,50 @@ const dr = (t) => {
1089
1106
  spread: !1,
1090
1107
  children: e
1091
1108
  };
1092
- }, yt = (t) => ({
1109
+ }, xt = (t) => ({
1093
1110
  type: "list",
1094
1111
  ordered: t.getListType() === "number",
1095
1112
  start: t.getListType() === "number" ? t.getStart() : null,
1096
1113
  spread: !1,
1097
- children: t.getChildren().filter(At).map(pr)
1098
- }), Fe = (t) => ({
1114
+ children: t.getChildren().filter(Bt).map(fr)
1115
+ }), qe = (t) => ({
1099
1116
  type: "tableCell",
1100
- children: ot(t)
1101
- }), hr = (t) => {
1117
+ children: ut(t)
1118
+ }), mr = (t) => {
1102
1119
  const e = t.getTable();
1103
1120
  return {
1104
1121
  type: "table",
1105
1122
  align: e.columns.map((n) => n.alignment),
1106
1123
  children: [{
1107
1124
  type: "tableRow",
1108
- children: e.columns.map((n) => Fe(n.label))
1125
+ children: e.columns.map((n) => qe(n.label))
1109
1126
  }, ...e.rows.map((n) => ({
1110
1127
  type: "tableRow",
1111
- children: e.columns.map((r) => Fe(n.cells[r.id] ?? ""))
1128
+ children: e.columns.map((r) => qe(n.cells[r.id] ?? ""))
1112
1129
  }))]
1113
1130
  };
1114
- }, bt = (t) => {
1115
- if (Xe(t)) return we(t);
1116
- if (Ht(t))
1131
+ }, Ct = (t) => {
1132
+ if (Ye(t)) return we(t);
1133
+ if (Kt(t))
1117
1134
  return {
1118
1135
  type: "heading",
1119
1136
  depth: Number(t.getTag().slice(1)),
1120
1137
  children: ie(t)
1121
1138
  };
1122
- if (Jt(t))
1139
+ if (jt(t))
1123
1140
  return {
1124
1141
  type: "blockquote",
1125
- children: t.getChildren().map(bt).filter((n) => n !== null)
1142
+ children: hr(t)
1126
1143
  };
1127
- if (Ge(t)) return yt(t);
1128
- if (Gt(t))
1144
+ if (Qe(t)) return xt(t);
1145
+ if (Xt(t))
1129
1146
  return {
1130
1147
  type: "code",
1131
1148
  lang: t.getLanguage() || null,
1132
1149
  meta: null,
1133
1150
  value: t.getTextContent()
1134
1151
  };
1135
- if (Xn(t)) return {
1152
+ if (Yn(t)) return {
1136
1153
  type: "code",
1137
1154
  lang: "mermaid",
1138
1155
  meta: null,
@@ -1143,15 +1160,15 @@ const dr = (t) => {
1143
1160
  meta: null,
1144
1161
  value: t.getEquation()
1145
1162
  };
1146
- if (_t(t)) return {
1163
+ if (yt(t)) return {
1147
1164
  type: "thematicBreak"
1148
1165
  };
1149
- if (xe(t)) return hr(t);
1150
- if (ht(t)) return {
1166
+ if (xe(t)) return mr(t);
1167
+ if (_t(t)) return {
1151
1168
  type: "html",
1152
1169
  value: t.getSource()
1153
1170
  };
1154
- if (Ye(t)) return we(t);
1171
+ if (Ze(t)) return we(t);
1155
1172
  const e = t.getTextContent();
1156
1173
  return e ? {
1157
1174
  type: "paragraph",
@@ -1160,59 +1177,59 @@ const dr = (t) => {
1160
1177
  value: e
1161
1178
  }]
1162
1179
  } : null;
1163
- }, qe = (t) => {
1180
+ }, Pe = (t) => {
1164
1181
  const e = {
1165
1182
  type: "root",
1166
- children: t.getChildren().map(bt).filter((n) => n !== null)
1183
+ children: t.getChildren().map(Ct).filter((n) => n !== null)
1167
1184
  };
1168
- return lt(e);
1169
- }, fr = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/g, T = (t, e) => {
1170
- const n = E(t);
1185
+ return ct(e);
1186
+ }, _r = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/g, T = (t, e) => {
1187
+ const n = N(t);
1171
1188
  for (const r of e) n.toggleFormat(r);
1172
1189
  return n;
1173
- }, mr = (t, e) => {
1190
+ }, gr = (t, e) => {
1174
1191
  const n = [];
1175
1192
  let r = 0;
1176
- for (const i of t.matchAll(fr)) {
1193
+ for (const i of t.matchAll(_r)) {
1177
1194
  const s = i.index ?? 0;
1178
1195
  s > r && n.push(T(t.slice(r, s), e));
1179
1196
  const l = i[2] ?? "", a = /^(?:https?:\/\/|\/)/i.test(l) ? l : `#${l}`;
1180
1197
  n.push(Te(a, l)), r = s + i[0].length;
1181
1198
  }
1182
1199
  return r < t.length && n.push(T(t.slice(r), e)), n;
1183
- }, Pe = (t, e) => e.definitions.get(t.identifier.toLowerCase());
1184
- function _r(t, e, n) {
1200
+ }, ze = (t, e) => e.definitions.get(t.identifier.toLowerCase());
1201
+ function kr(t, e, n) {
1185
1202
  switch (t.type) {
1186
1203
  case "text":
1187
- return mr(t.value, n);
1204
+ return gr(t.value, n);
1188
1205
  case "strong":
1189
- return w(t.children, e, /* @__PURE__ */ new Set([...n, "bold"]));
1206
+ return C(t.children, e, /* @__PURE__ */ new Set([...n, "bold"]));
1190
1207
  case "emphasis":
1191
- return w(t.children, e, /* @__PURE__ */ new Set([...n, "italic"]));
1208
+ return C(t.children, e, /* @__PURE__ */ new Set([...n, "italic"]));
1192
1209
  case "delete":
1193
- return w(t.children, e, /* @__PURE__ */ new Set([...n, "strikethrough"]));
1210
+ return C(t.children, e, /* @__PURE__ */ new Set([...n, "strikethrough"]));
1194
1211
  case "inlineCode":
1195
1212
  return [T(t.value, /* @__PURE__ */ new Set([...n, "code"]))];
1196
1213
  case "break":
1197
- return [ln()];
1214
+ return [on()];
1198
1215
  case "link": {
1199
1216
  const r = Ne(t.url, e.resolver, {
1200
1217
  title: t.title
1201
1218
  });
1202
- return r.append(...w(t.children, e, n)), [r];
1219
+ return r.append(...C(t.children, e, n)), [r];
1203
1220
  }
1204
1221
  case "linkReference": {
1205
- const r = Pe(t, e);
1222
+ const r = ze(t, e);
1206
1223
  if (!r) return [T(U([t]), n)];
1207
1224
  const i = Ne(r.url, e.resolver, {
1208
1225
  title: r.title
1209
1226
  });
1210
- return i.append(...w(t.children, e, n)), [i];
1227
+ return i.append(...C(t.children, e, n)), [i];
1211
1228
  }
1212
1229
  case "image":
1213
1230
  return [be(t.url, t.alt ?? "", t.title ?? null)];
1214
1231
  case "imageReference": {
1215
- const r = Pe(t, e);
1232
+ const r = ze(t, e);
1216
1233
  return r ? [be(r.url, t.alt ?? "", r.title ?? null)] : [T(U([t]), n)];
1217
1234
  }
1218
1235
  case "inlineMath":
@@ -1223,7 +1240,7 @@ function _r(t, e, n) {
1223
1240
  return [T(U([t]), n)];
1224
1241
  }
1225
1242
  }
1226
- function w(t, e, n = /* @__PURE__ */ new Set()) {
1243
+ function C(t, e, n = /* @__PURE__ */ new Set()) {
1227
1244
  const r = [];
1228
1245
  let i = 0;
1229
1246
  for (const s of t) {
@@ -1236,11 +1253,11 @@ function w(t, e, n = /* @__PURE__ */ new Set()) {
1236
1253
  continue;
1237
1254
  }
1238
1255
  const l = new Set(n);
1239
- i > 0 && l.add("underline"), r.push(..._r(s, e, l));
1256
+ i > 0 && l.add("underline"), r.push(...kr(s, e, l));
1240
1257
  }
1241
1258
  return r;
1242
1259
  }
1243
- const gr = (t, e) => {
1260
+ const yr = (t, e) => {
1244
1261
  e.tableIndex += 1;
1245
1262
  const n = `table-${e.tableIndex}`, r = t.children[0], i = Math.max(r?.children.length ?? 0, 1), s = Array.from({
1246
1263
  length: i
@@ -1256,41 +1273,44 @@ const gr = (t, e) => {
1256
1273
  columns: s,
1257
1274
  rows: l
1258
1275
  };
1259
- }, kr = (t, e, n) => {
1276
+ }, br = (t, e, n) => {
1260
1277
  if (e.type !== "listItem") return;
1261
- const r = Dt(e.checked ?? void 0);
1278
+ const r = qt(e.checked ?? void 0);
1262
1279
  t.append(r);
1263
1280
  for (const i of e.children)
1264
- i.type === "paragraph" ? r.append(...w(i.children, n)) : i.type === "list" ? Me(r, i, n) : r.append(T($e(i), /* @__PURE__ */ new Set()));
1265
- }, Me = (t, e, n) => {
1281
+ i.type === "paragraph" ? r.append(...C(i.children, n)) : i.type === "list" ? Le(r, i, n) : r.append(T($e(i), /* @__PURE__ */ new Set()));
1282
+ }, Le = (t, e, n) => {
1266
1283
  switch (e.type) {
1267
1284
  case "paragraph": {
1268
1285
  const r = re();
1269
- r.append(...w(e.children, n)), t.append(r);
1286
+ r.append(...C(e.children, n)), t.append(r);
1270
1287
  break;
1271
1288
  }
1272
1289
  case "heading": {
1273
- const r = jt(`h${e.depth}`);
1274
- r.append(...w(e.children, n)), t.append(r);
1290
+ const r = Vt(`h${e.depth}`);
1291
+ r.append(...C(e.children, n)), t.append(r);
1275
1292
  break;
1276
1293
  }
1277
1294
  case "blockquote": {
1278
- const r = Kt();
1295
+ const r = Wt();
1279
1296
  t.append(r);
1280
- for (const i of e.children) Me(r, i, n);
1297
+ for (const [i, s] of e.children.entries())
1298
+ s.type === "paragraph" ? (e.children[i - 1]?.type === "paragraph" && r.append(N(`
1299
+
1300
+ `)), r.append(...C(s.children, n))) : Le(r, s, n);
1281
1301
  break;
1282
1302
  }
1283
1303
  case "list": {
1284
1304
  const r = e.children.some((l) => l.checked !== null && l.checked !== void 0);
1285
1305
  let i = "bullet";
1286
1306
  e.ordered ? i = "number" : r && (i = "check");
1287
- const s = Bt(i, e.start ?? 1);
1307
+ const s = Ft(i, e.start ?? 1);
1288
1308
  t.append(s);
1289
- for (const l of e.children) kr(s, l, n);
1309
+ for (const l of e.children) br(s, l, n);
1290
1310
  break;
1291
1311
  }
1292
1312
  case "code":
1293
- t.append(e.lang === "mermaid" ? Yn(e.value) : Qt(e.lang ?? void 0).append(E(e.value)));
1313
+ t.append(e.lang === "mermaid" ? Zn(e.value) : Yt(e.lang ?? void 0).append(N(e.value)));
1294
1314
  break;
1295
1315
  case "math":
1296
1316
  t.append(P(e.value, !1));
@@ -1299,7 +1319,7 @@ const gr = (t, e) => {
1299
1319
  t.append(Oe());
1300
1320
  break;
1301
1321
  case "table":
1302
- t.append(mt(gr(e, n)));
1322
+ t.append(kt(yr(e, n)));
1303
1323
  break;
1304
1324
  case "html":
1305
1325
  t.append(ve(e.value, "block"));
@@ -1308,17 +1328,17 @@ const gr = (t, e) => {
1308
1328
  break;
1309
1329
  default: {
1310
1330
  const r = re();
1311
- r.append(E($e(e))), t.append(r);
1331
+ r.append(N($e(e))), t.append(r);
1312
1332
  }
1313
1333
  }
1314
- }, yr = (t, e) => {
1315
- const n = st(t), i = {
1334
+ }, xr = (t, e) => {
1335
+ const n = at(t), i = {
1316
1336
  definitions: new Map(n.children.filter((l) => l.type === "definition").map((l) => [l.identifier.toLowerCase(), l])),
1317
1337
  resolver: e,
1318
1338
  tableIndex: 0
1319
- }, s = Ze();
1339
+ }, s = nt();
1320
1340
  s.clear();
1321
- for (const l of n.children) Me(s, l, i);
1341
+ for (const l of n.children) Le(s, l, i);
1322
1342
  s.isEmpty() && s.append(re());
1323
1343
  }, ee = (t) => {
1324
1344
  const e = t.position?.start.offset, n = t.position?.end.offset;
@@ -1326,16 +1346,16 @@ const gr = (t, e) => {
1326
1346
  end: n,
1327
1347
  start: e
1328
1348
  };
1329
- }, ze = (t) => typeof t == "object" && t !== null && "children" in t && Array.isArray(t.children), br = (t) => typeof t == "object" && t !== null && "type" in t && (t.type === "link" || t.type === "linkReference"), ue = (t) => {
1349
+ }, Ue = (t) => typeof t == "object" && t !== null && "children" in t && Array.isArray(t.children), Cr = (t) => typeof t == "object" && t !== null && "type" in t && (t.type === "link" || t.type === "linkReference"), ue = (t) => {
1330
1350
  const e = [];
1331
- if (!ze(t)) return e;
1351
+ if (!Ue(t)) return e;
1332
1352
  for (const n of t.children)
1333
- br(n) && e.push(n), ze(n) && e.push(...ue(n));
1353
+ Cr(n) && e.push(n), Ue(n) && e.push(...ue(n));
1334
1354
  return e;
1335
- }, ne = (t) => D(t).children.flatMap((e) => e.type === "table" ? [] : ue(e).map((n) => ({
1355
+ }, ne = (t) => B(t).children.flatMap((e) => e.type === "table" ? [] : ue(e).map((n) => ({
1336
1356
  block: e,
1337
1357
  node: n
1338
- }))), xr = (t, e, n, r, i, s) => {
1358
+ }))), Nr = (t, e, n, r, i, s) => {
1339
1359
  const l = ee(r), a = ee(s);
1340
1360
  if (!l || !a) return [];
1341
1361
  const o = i.map(ee);
@@ -1362,8 +1382,8 @@ const gr = (t, e) => {
1362
1382
  }
1363
1383
  return g !== d.length ? [] : _.flatMap((m, k) => {
1364
1384
  if (ne(m.value).length > 0) return [];
1365
- const y = ee(n[k]?.node ?? {}), C = o[k];
1366
- return !y || !C ? [] : [{
1385
+ const y = ee(n[k]?.node ?? {}), w = o[k];
1386
+ return !y || !w ? [] : [{
1367
1387
  edit: {
1368
1388
  ...y,
1369
1389
  replacement: m.value
@@ -1371,11 +1391,11 @@ const gr = (t, e) => {
1371
1391
  normalization: {
1372
1392
  start: a.start + m.start,
1373
1393
  end: a.start + m.end,
1374
- replacement: t.slice(C.start, C.end)
1394
+ replacement: t.slice(w.start, w.end)
1375
1395
  }
1376
1396
  }];
1377
1397
  });
1378
- }, Cr = (t, e, n, r, i, s, l, a) => {
1398
+ }, wr = (t, e, n, r, i, s, l, a) => {
1379
1399
  const o = s.map((c, u) => u);
1380
1400
  o.sort((c, u) => +(u === l) - +(c === l));
1381
1401
  for (const c of o) {
@@ -1384,7 +1404,7 @@ const gr = (t, e) => {
1384
1404
  if (!u) continue;
1385
1405
  const d = ue(u);
1386
1406
  if (i.length <= d.length) continue;
1387
- const p = xr(e, n, t, r, i, u);
1407
+ const p = Nr(e, n, t, r, i, u);
1388
1408
  if (p.length === i.length - d.length)
1389
1409
  return {
1390
1410
  currentBlockIndex: c,
@@ -1392,19 +1412,19 @@ const gr = (t, e) => {
1392
1412
  };
1393
1413
  }
1394
1414
  return null;
1395
- }, Nr = (t, e, n) => {
1415
+ }, Er = (t, e, n) => {
1396
1416
  const r = ne(t);
1397
1417
  if (ne(n).length >= ne(e).length)
1398
1418
  return {
1399
1419
  edits: [],
1400
1420
  normalizedCurrent: n
1401
1421
  };
1402
- const i = D(e), s = D(n), l = [], a = [], o = /* @__PURE__ */ new Set();
1422
+ const i = B(e), s = B(n), l = [], a = [], o = /* @__PURE__ */ new Set();
1403
1423
  let c = 0;
1404
1424
  for (let d = 0; d < i.children.length; d += 1) {
1405
1425
  const p = i.children[d];
1406
1426
  if (!p || p.type === "table") continue;
1407
- const _ = ue(p), g = Cr(r.slice(c, c + _.length), e, n, p, _, s.children, d, o);
1427
+ const _ = ue(p), g = wr(r.slice(c, c + _.length), e, n, p, _, s.children, d, o);
1408
1428
  if (g) {
1409
1429
  for (const m of g.replacements)
1410
1430
  l.push(m.edit), a.push(m.normalization);
@@ -1420,8 +1440,8 @@ const gr = (t, e) => {
1420
1440
  normalizedCurrent: u
1421
1441
  };
1422
1442
  };
1423
- function* wr(t, e) {
1424
- const n = D(t).children, r = D(e).children;
1443
+ function* Tr(t, e) {
1444
+ const n = B(t).children, r = B(e).children;
1425
1445
  if (!(n.length === r.length && n.every((a, o) => a.type === r[o]?.type && a.position?.end.offset !== void 0 && r[o]?.position?.end.offset !== void 0))) {
1426
1446
  yield* te(t, e);
1427
1447
  return;
@@ -1433,7 +1453,7 @@ function* wr(t, e) {
1433
1453
  }
1434
1454
  yield* te(t.slice(s), e.slice(l));
1435
1455
  }
1436
- const Ue = (t, e) => {
1456
+ const He = (t, e) => {
1437
1457
  const n = Array.from({
1438
1458
  length: t.length + 1
1439
1459
  }).fill(-1), r = Array.from({
@@ -1441,7 +1461,7 @@ const Ue = (t, e) => {
1441
1461
  }).fill(-1);
1442
1462
  let i = 0, s = 0, l = !1;
1443
1463
  n[0] = 0, r[0] = 0;
1444
- for (const a of wr(t, e)) {
1464
+ for (const a of Tr(t, e)) {
1445
1465
  const o = a.value.length;
1446
1466
  if (a.added) {
1447
1467
  r[i] = s, s += o, n[i] = s, l && (r[i] = s), l = !1;
@@ -1463,19 +1483,19 @@ const Ue = (t, e) => {
1463
1483
  end: r,
1464
1484
  start: n
1465
1485
  };
1466
- }, xt = (t, e, n) => {
1486
+ }, Nt = (t, e, n) => {
1467
1487
  for (let r = e; r >= 0 && r < t.length; r += n) {
1468
1488
  const i = t[r];
1469
1489
  if (i !== void 0 && i >= 0) return i;
1470
1490
  }
1471
1491
  return n === -1 ? 0 : t.at(-1) ?? 0;
1472
- }, Er = (t, e) => {
1492
+ }, $r = (t, e) => {
1473
1493
  const n = t.start[e];
1474
- return n !== void 0 && n >= 0 ? n : xt(t.start, e, -1);
1475
- }, He = (t, e) => {
1494
+ return n !== void 0 && n >= 0 ? n : Nt(t.start, e, -1);
1495
+ }, Je = (t, e) => {
1476
1496
  const n = t.end[e];
1477
- return n !== void 0 && n >= 0 ? n : xt(t.end, e, 1);
1478
- }, Tr = (t, e) => {
1497
+ return n !== void 0 && n >= 0 ? n : Nt(t.end, e, 1);
1498
+ }, Sr = (t, e) => {
1479
1499
  const n = [];
1480
1500
  let r = 0, i = null;
1481
1501
  const s = () => {
@@ -1497,21 +1517,21 @@ const Ue = (t, e) => {
1497
1517
  r += l.value.length, i.end = r;
1498
1518
  }
1499
1519
  return s(), n;
1500
- }, $r = (t) => t.includes(`\r
1520
+ }, vr = (t) => t.includes(`\r
1501
1521
  `) ? `\r
1502
1522
  ` : `
1503
1523
  `, me = (t, e) => {
1504
- const n = $r(e);
1524
+ const n = vr(e);
1505
1525
  return n === `
1506
1526
  ` ? t : t.replaceAll(`
1507
1527
  `, n);
1508
- }, se = (t) => Array.isArray(t) ? t.map(se) : !t || typeof t != "object" ? t : Object.fromEntries(Object.entries(t).filter(([e]) => e !== "position").map(([e, n]) => [e, se(n)])), Ct = (t, e) => JSON.stringify(se(t)) === JSON.stringify(se(e)), _e = (t) => D(t).children.filter((e) => e.type === "table" && !!e.position), ge = (t) => t.children.flatMap((e) => e.children), Je = (t, e) => t.children.length === e.children.length && t.children.every((n, r) => n.children.length === e.children[r]?.children.length), J = (t) => {
1528
+ }, se = (t) => Array.isArray(t) ? t.map(se) : !t || typeof t != "object" ? t : Object.fromEntries(Object.entries(t).filter(([e]) => e !== "position").map(([e, n]) => [e, se(n)])), wt = (t, e) => JSON.stringify(se(t)) === JSON.stringify(se(e)), _e = (t) => B(t).children.filter((e) => e.type === "table" && !!e.position), ge = (t) => t.children.flatMap((e) => e.children), Ke = (t, e) => t.children.length === e.children.length && t.children.every((n, r) => n.children.length === e.children[r]?.children.length), J = (t) => {
1509
1529
  const e = t.position?.start.offset, n = t.position?.end.offset;
1510
1530
  return e === void 0 || n === void 0 ? null : {
1511
1531
  end: n,
1512
1532
  start: e
1513
1533
  };
1514
- }, Nt = (t, e) => {
1534
+ }, Et = (t, e) => {
1515
1535
  const n = e.children[0], r = e.children.at(-1), i = n?.position?.start.offset, s = r?.position?.end.offset;
1516
1536
  if (i !== void 0 && s !== void 0)
1517
1537
  return {
@@ -1525,31 +1545,31 @@ const Ue = (t, e) => {
1525
1545
  start: p,
1526
1546
  end: p
1527
1547
  };
1528
- }, Sr = (t, e) => {
1529
- const n = Nt(t, e);
1548
+ }, Or = (t, e) => {
1549
+ const n = Et(t, e);
1530
1550
  return n ? t.slice(n.start, n.end) : "";
1531
- }, vr = (t, e, n, r, i) => {
1551
+ }, Mr = (t, e, n, r, i) => {
1532
1552
  const s = ge(n), l = ge(r);
1533
1553
  return ge(i).flatMap((o, c) => {
1534
1554
  const u = s[c], d = l[c];
1535
- if (!u || !d || Ct(d, o)) return [];
1536
- const p = Nt(t, u);
1555
+ if (!u || !d || wt(d, o)) return [];
1556
+ const p = Et(t, u);
1537
1557
  return p ? [{
1538
1558
  ...p,
1539
- replacement: Sr(e, o)
1559
+ replacement: Or(e, o)
1540
1560
  }] : [];
1541
1561
  });
1542
- }, Or = (t, e, n, r, i) => {
1543
- if (Ct(r, i)) return [];
1544
- if (Je(r, i) && Je(n, r) && JSON.stringify(r.align) === JSON.stringify(i.align))
1545
- return vr(t, e, n, r, i);
1562
+ }, Lr = (t, e, n, r, i) => {
1563
+ if (wt(r, i)) return [];
1564
+ if (Ke(r, i) && Ke(n, r) && JSON.stringify(r.align) === JSON.stringify(i.align))
1565
+ return Mr(t, e, n, r, i);
1546
1566
  const l = J(n), a = J(i);
1547
1567
  return !l || !a ? [] : [{
1548
1568
  start: l.start,
1549
1569
  end: l.end,
1550
1570
  replacement: e.slice(a.start, a.end)
1551
1571
  }];
1552
- }, Mr = (t, e, n) => {
1572
+ }, Rr = (t, e, n) => {
1553
1573
  const r = _e(t), i = _e(e), s = _e(n);
1554
1574
  if (r.length !== i.length || i.length !== s.length)
1555
1575
  return {
@@ -1562,17 +1582,17 @@ const Ue = (t, e) => {
1562
1582
  const c = r[o], u = i[o], d = s[o];
1563
1583
  if (!c || !u || !d) continue;
1564
1584
  const p = J(u), _ = J(d);
1565
- !p || !_ || (a = a.slice(0, _.start) + e.slice(p.start, p.end) + a.slice(_.end), l.push(...Or(t, n, c, u, d)));
1585
+ !p || !_ || (a = a.slice(0, _.start) + e.slice(p.start, p.end) + a.slice(_.end), l.push(...Lr(t, n, c, u, d)));
1566
1586
  }
1567
1587
  return {
1568
1588
  edits: l,
1569
1589
  normalizedCurrent: a
1570
1590
  };
1571
- }, Lr = (t, e, n, r) => {
1591
+ }, Ir = (t, e, n, r) => {
1572
1592
  if (n === r) return t;
1573
- const i = Nr(t, n, r), s = Mr(t, n, i.normalizedCurrent), l = Tr(n, s.normalizedCurrent).map((o) => ({
1574
- start: o.start === o.end ? He(e, o.start) : Er(e, o.start),
1575
- end: He(e, o.end),
1593
+ const i = Er(t, n, r), s = Rr(t, n, i.normalizedCurrent), l = Sr(n, s.normalizedCurrent).map((o) => ({
1594
+ start: o.start === o.end ? Je(e, o.start) : $r(e, o.start),
1595
+ end: Je(e, o.end),
1576
1596
  replacement: me(o.replacement, t)
1577
1597
  })).concat(i.edits.map((o) => ({
1578
1598
  ...o,
@@ -1585,19 +1605,19 @@ const Ue = (t, e) => {
1585
1605
  for (const o of l)
1586
1606
  a = a.slice(0, o.start) + o.replacement + a.slice(o.end);
1587
1607
  return a;
1588
- }, hi = (t, e) => {
1608
+ }, _i = (t, e) => {
1589
1609
  let n = null, r = null;
1590
1610
  return {
1591
1611
  importToLexical() {
1592
- yr(t, e), n = qe(Ze()), r = Ue(n, t);
1612
+ xr(t, e), n = Pe(nt()), r = He(n, t);
1593
1613
  },
1594
1614
  exportFromLexical(i) {
1595
- const s = qe(i), l = n ?? s;
1596
- return Lr(t, r ?? Ue(l, t), l, s);
1615
+ const s = Pe(i), l = n ?? s;
1616
+ return Ir(t, r ?? He(l, t), l, s);
1597
1617
  }
1598
1618
  };
1599
1619
  };
1600
- function fi(t) {
1620
+ function gi(t) {
1601
1621
  const e = x(4), {
1602
1622
  isEditable: n
1603
1623
  } = t, [r] = le();
@@ -1606,14 +1626,14 @@ function fi(t) {
1606
1626
  r.setEditable(n);
1607
1627
  }, s = [n, r], e[0] = r, e[1] = n, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), oe(i, s), null;
1608
1628
  }
1609
- function mi() {
1629
+ function ki() {
1610
1630
  const t = x(2), [e] = le();
1611
1631
  let n;
1612
- return t[0] !== e ? (n = /* @__PURE__ */ h($, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ h(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 }) }), t[0] = e, t[1] = n) : n = t[1], n;
1632
+ return t[0] !== e ? (n = /* @__PURE__ */ h($, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ h(Tn, { 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 }) }), t[0] = e, t[1] = n) : n = t[1], n;
1613
1633
  }
1614
- const Rr = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
1615
- function _i(t) {
1616
- const e = t.match(Rr);
1634
+ const Ar = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
1635
+ function yi(t) {
1636
+ const e = t.match(Ar);
1617
1637
  return e ? {
1618
1638
  frontmatter: e[0],
1619
1639
  body: t.slice(e[0].length)
@@ -1623,21 +1643,21 @@ function _i(t) {
1623
1643
  };
1624
1644
  }
1625
1645
  export {
1626
- Xn as $,
1627
- pi as C,
1628
- oi as E,
1629
- di as I,
1630
- li as M,
1631
- fi as T,
1632
- ai as a,
1633
- si as b,
1646
+ Yn as $,
1647
+ mi as C,
1648
+ ui as E,
1649
+ fi as I,
1650
+ ci as M,
1651
+ gi as T,
1652
+ di as a,
1653
+ ai as b,
1634
1654
  be as c,
1635
- mt as d,
1636
- ui as e,
1637
- hi as f,
1638
- ci as g,
1639
- mi as h,
1640
- _i as s,
1641
- Sn as t
1655
+ kt as d,
1656
+ hi as e,
1657
+ _i as f,
1658
+ pi as g,
1659
+ ki as h,
1660
+ yi as s,
1661
+ vn as t
1642
1662
  };
1643
- //# sourceMappingURL=markdown-Cli3KGu9.js.map
1663
+ //# sourceMappingURL=markdown-BCfPxNpb.js.map