laif-ds 0.2.85 → 0.2.86

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 (120) hide show
  1. package/README.md +11 -81
  2. package/dist/CHANGELOG.md +7 -0
  3. package/dist/_virtual/index3.js +5 -5
  4. package/dist/_virtual/index4.js +5 -5
  5. package/dist/_virtual/index5.js +4 -4
  6. package/dist/_virtual/index7.js +5 -2
  7. package/dist/_virtual/index8.js +2 -5
  8. package/dist/agent-docs/adoption-report.json +2 -2
  9. package/dist/agent-docs/manifest.json +3 -3
  10. package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
  11. package/dist/components/editor/editor-ui/content-editable.js +1 -1
  12. package/dist/components/editor/nodes/mention-node.js +2 -2
  13. package/dist/components/editor/plugins/actions/clear-editor-plugin.js +2 -2
  14. package/dist/components/editor/plugins/actions/counter-character-plugin.js +2 -2
  15. package/dist/components/editor/plugins/mention-plugin.js +21 -21
  16. package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +10 -10
  17. package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +5 -5
  18. package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +5 -5
  19. package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +5 -5
  20. package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +9 -9
  21. package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +3 -3
  22. package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +13 -13
  23. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +2 -2
  24. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +18 -19
  25. package/dist/components/editor/plugins/toolbar/mention-insert-toolbar-plugin.js +1 -1
  26. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +3 -3
  27. package/dist/components/ui/app-editor.js +51 -51
  28. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  29. package/dist/components/ui/markdown-renderer.js +33 -32
  30. package/dist/lib/utils.js +35 -34
  31. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  32. package/dist/node_modules/@floating-ui/{utils → core/node_modules/@floating-ui/utils}/dist/floating-ui.utils.js +33 -39
  33. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +20 -19
  34. package/dist/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +12 -0
  35. package/dist/node_modules/@lexical/clipboard/dist/LexicalClipboard.prod.js +354 -0
  36. package/dist/node_modules/@lexical/code-core/dist/LexicalCodeCore.prod.js +298 -0
  37. package/dist/node_modules/@lexical/dragon/dist/LexicalDragon.prod.js +89 -0
  38. package/dist/node_modules/@lexical/extension/dist/LexicalExtension.prod.js +611 -0
  39. package/dist/node_modules/@lexical/history/dist/LexicalHistory.prod.js +96 -0
  40. package/dist/node_modules/@lexical/html/dist/LexicalHtml.prod.js +604 -0
  41. package/dist/node_modules/@lexical/link/dist/LexicalLink.prod.js +201 -0
  42. package/dist/node_modules/@lexical/list/dist/LexicalList.prod.js +843 -0
  43. package/dist/node_modules/@lexical/markdown/dist/LexicalMarkdown.prod.js +555 -0
  44. package/dist/node_modules/@lexical/react/dist/LexicalCheckListPlugin.prod.js +11 -0
  45. package/dist/node_modules/@lexical/react/dist/LexicalClearEditorPlugin.prod.js +13 -0
  46. package/dist/node_modules/@lexical/react/dist/LexicalComposer.prod.js +45 -0
  47. package/dist/node_modules/@lexical/react/{LexicalComposerContext.prod.js → dist/LexicalComposerContext.prod.js} +1 -1
  48. package/dist/node_modules/@lexical/react/dist/LexicalContentEditable.prod.js +53 -0
  49. package/dist/node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.js +21 -0
  50. package/dist/node_modules/@lexical/react/{LexicalHistoryPlugin.prod.js → dist/LexicalHistoryPlugin.prod.js} +3 -3
  51. package/dist/node_modules/@lexical/react/dist/LexicalListPlugin.prod.js +17 -0
  52. package/dist/node_modules/@lexical/react/dist/LexicalOnChangePlugin.prod.js +16 -0
  53. package/dist/node_modules/@lexical/react/dist/LexicalReactProviderExtension.prod.js +6 -0
  54. package/dist/node_modules/@lexical/react/dist/LexicalRichTextPlugin.prod.js +77 -0
  55. package/dist/node_modules/@lexical/react/dist/LexicalTypeaheadMenuPlugin.prod.js +245 -0
  56. package/dist/node_modules/@lexical/react/dist/useLexicalEditable.prod.js +22 -0
  57. package/dist/node_modules/@lexical/rich-text/dist/LexicalRichText.prod.js +567 -0
  58. package/dist/node_modules/@lexical/selection/dist/LexicalSelection.prod.js +123 -0
  59. package/dist/node_modules/@lexical/table/dist/LexicalTable.prod.js +929 -0
  60. package/dist/node_modules/@lexical/text/{LexicalText.prod.js → dist/LexicalText.prod.js} +6 -6
  61. package/dist/node_modules/@lexical/utils/dist/LexicalUtils.prod.js +111 -0
  62. package/dist/node_modules/eventemitter3/index.js +1 -1
  63. package/dist/node_modules/eventemitter3/index2.js +1 -1
  64. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  65. package/dist/node_modules/lexical/dist/Lexical.prod.js +6731 -0
  66. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  67. package/dist/node_modules/unified/lib/index.js +1 -1
  68. package/package.json +14 -14
  69. package/dist/_virtual/prism-cpp.js +0 -3
  70. package/dist/_virtual/prism-cpp2.js +0 -5
  71. package/dist/_virtual/prism-java.js +0 -3
  72. package/dist/_virtual/prism-java2.js +0 -5
  73. package/dist/_virtual/prism-python.js +0 -3
  74. package/dist/_virtual/prism-python2.js +0 -5
  75. package/dist/_virtual/prism-rust.js +0 -3
  76. package/dist/_virtual/prism-rust2.js +0 -5
  77. package/dist/_virtual/prism-typescript.js +0 -3
  78. package/dist/_virtual/prism-typescript2.js +0 -5
  79. package/dist/_virtual/prism.js +0 -3
  80. package/dist/_virtual/prism2.js +0 -5
  81. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +0 -159
  82. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +0 -236
  83. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +0 -46
  84. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +0 -89
  85. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +0 -108
  86. package/dist/node_modules/@lexical/link/LexicalLink.prod.js +0 -187
  87. package/dist/node_modules/@lexical/list/LexicalList.prod.js +0 -729
  88. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +0 -367
  89. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +0 -11
  90. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +0 -17
  91. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +0 -45
  92. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +0 -55
  93. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +0 -49
  94. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +0 -17
  95. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +0 -16
  96. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +0 -56
  97. package/dist/node_modules/@lexical/react/LexicalTypeaheadMenuPlugin.prod.js +0 -220
  98. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +0 -21
  99. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +0 -376
  100. package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +0 -107
  101. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +0 -661
  102. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +0 -102
  103. package/dist/node_modules/lexical/Lexical.prod.js +0 -4912
  104. package/dist/node_modules/prismjs/components/prism-c.js +0 -77
  105. package/dist/node_modules/prismjs/components/prism-clike.js +0 -32
  106. package/dist/node_modules/prismjs/components/prism-cpp.js +0 -93
  107. package/dist/node_modules/prismjs/components/prism-css.js +0 -56
  108. package/dist/node_modules/prismjs/components/prism-java.js +0 -122
  109. package/dist/node_modules/prismjs/components/prism-javascript.js +0 -138
  110. package/dist/node_modules/prismjs/components/prism-markdown.js +0 -301
  111. package/dist/node_modules/prismjs/components/prism-markup.js +0 -174
  112. package/dist/node_modules/prismjs/components/prism-objectivec.js +0 -11
  113. package/dist/node_modules/prismjs/components/prism-powershell.js +0 -56
  114. package/dist/node_modules/prismjs/components/prism-python.js +0 -69
  115. package/dist/node_modules/prismjs/components/prism-rust.js +0 -124
  116. package/dist/node_modules/prismjs/components/prism-sql.js +0 -34
  117. package/dist/node_modules/prismjs/components/prism-swift.js +0 -114
  118. package/dist/node_modules/prismjs/components/prism-typescript.js +0 -53
  119. package/dist/node_modules/prismjs/prism.js +0 -1165
  120. /package/dist/node_modules/@floating-ui/{utils → dom/node_modules/@floating-ui/utils}/dist/floating-ui.utils.dom.js +0 -0
@@ -0,0 +1,604 @@
1
+ "use client";
2
+ import { $sliceSelectedTextNodeContent as me } from "../../selection/dist/LexicalSelection.prod.js";
3
+ import { isDOMDocumentNode as X, ArtificialNode__DO_NOT_USE as Y, $createLineBreakNode as L, $getEditor as w, $assumeActiveEditor as ge, $getDocument as Z, isHTMLElement as m, $isRootOrShadowRoot as ye, $isBlockElementNode as I, isBlockDomNode as R, isInlineDomNode as W, $isElementNode as v, $getRoot as Se, $isRangeSelection as xe, $getSlotFrame as $e, $getEditorDOMRenderConfig as ee, $isTextNode as P, isDocumentFragment as V, $isNodeSelection as Ce, isDOMTextNode as _, $createParagraphNode as B, $setFormatFromDOM as Ne, setNodeIndentFromDOM as ke, $setDirectionFromDOM as be, $generateNodesFromRawText as Ie, $createTextNode as ve, isOnlyChildInBlockNode as De, isLastChildInBlockNode as we, IS_UNDERLINE as q, IS_STRIKETHROUGH as z, IS_SUBSCRIPT as E, IS_SUPERSCRIPT as T, IS_HIGHLIGHT as Re, IS_CODE as Ae, IS_BOLD as G, IS_ITALIC as j, createState as Oe, $isDecoratorNode as Ee, $isLineBreakNode as Te } from "../../../lexical/dist/Lexical.prod.js";
4
+ import { objectKlassEquals as We } from "../../utils/dist/LexicalUtils.prod.js";
5
+ import { getPeerDependencyFromEditor as te, $createHorizontalRuleNode as Me, HorizontalRuleNode as Fe } from "../../extension/dist/LexicalExtension.prod.js";
6
+ function k(e, ...t) {
7
+ const n = new URL("https://lexical.dev/docs/error"), o = new URLSearchParams();
8
+ o.append("code", e);
9
+ for (const s of t) o.append("v", s);
10
+ throw n.search = o.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
11
+ }
12
+ let N;
13
+ function ne(e, t) {
14
+ const { key: n } = t;
15
+ return e && n in e ? e[n] : t.defaultValue;
16
+ }
17
+ function oe(e) {
18
+ return N && N.editor === e ? N : void 0;
19
+ }
20
+ function Le(e, t) {
21
+ if ("cfg" in t) {
22
+ const { cfg: n, updater: o } = t;
23
+ return [n, o(ne(e, n))];
24
+ }
25
+ return t;
26
+ }
27
+ function Pe(e, t) {
28
+ let n = t;
29
+ for (const o of e) {
30
+ const [s, r] = Le(n, o), i = s.key;
31
+ if (n === t && ne(n, s) === r) continue;
32
+ const l = n === t || n === void 0 ? _e(t) : n;
33
+ l[i] = r, n = l;
34
+ }
35
+ return n;
36
+ }
37
+ function _e(e) {
38
+ return Object.create(e || null);
39
+ }
40
+ function re(e, t) {
41
+ return [e, t];
42
+ }
43
+ function Be(e, t, n, o = w()) {
44
+ const s = N, r = oe(o);
45
+ try {
46
+ return N = { ...r, editor: o, [e]: t }, n();
47
+ } finally {
48
+ N = s;
49
+ }
50
+ }
51
+ function Ue(e, t = () => {
52
+ }) {
53
+ return (n, o = w()) => (s) => {
54
+ const r = oe(o), i = r && r[e], l = Pe(n, i || t(o));
55
+ return l && l !== i ? Be(e, l, s, o) : s();
56
+ };
57
+ }
58
+ function se(e, t, n, o) {
59
+ return Object.assign(Oe(Symbol(t), { isEqual: o, parse: n }), { [e]: !0 });
60
+ }
61
+ function He(e) {
62
+ if (!X(e)) return;
63
+ const t = e;
64
+ if (t.querySelector("style") === null) return;
65
+ const n = /* @__PURE__ */ new Map();
66
+ function o(s) {
67
+ let r = n.get(s);
68
+ if (r === void 0) {
69
+ r = /* @__PURE__ */ new Set();
70
+ for (let i = 0; i < s.style.length; i++) r.add(s.style[i]);
71
+ n.set(s, r);
72
+ }
73
+ return r;
74
+ }
75
+ try {
76
+ for (const s of Array.from(t.styleSheets)) {
77
+ let r;
78
+ try {
79
+ r = s.cssRules;
80
+ } catch {
81
+ continue;
82
+ }
83
+ for (const i of Array.from(r)) {
84
+ if (!We(i, CSSStyleRule)) continue;
85
+ let l;
86
+ try {
87
+ l = t.querySelectorAll(i.selectorText);
88
+ } catch {
89
+ continue;
90
+ }
91
+ for (const a of Array.from(l)) {
92
+ if (!m(a)) continue;
93
+ const c = o(a);
94
+ for (let u = 0; u < i.style.length; u++) {
95
+ const h = i.style[u];
96
+ c.has(h) || a.style.setProperty(h, i.style.getPropertyValue(h), i.style.getPropertyPriority(h));
97
+ }
98
+ }
99
+ }
100
+ }
101
+ } catch {
102
+ }
103
+ }
104
+ const ie = "@lexical/html/DOM", le = Symbol.for("@lexical/html/DOMExportContext"), Ve = Symbol.for("@lexical/html/DOMImportContext");
105
+ function qe(e, t, n) {
106
+ return se(le, e, t, n);
107
+ }
108
+ const ze = /* @__PURE__ */ qe("isExport", Boolean);
109
+ function Ge(e) {
110
+ const t = te(e, ie);
111
+ return t ? t.output.defaults : void 0;
112
+ }
113
+ function je(e) {
114
+ const t = te(e, ie);
115
+ return t ? t.output.runtime : void 0;
116
+ }
117
+ function Ke(e = w()) {
118
+ const t = je(e);
119
+ return t ? t.getSessionConfig() : ee(e);
120
+ }
121
+ const Je = Ue(le, Ge), A = Symbol.for("@lexical/html/SelectorImpl");
122
+ function D(e, t) {
123
+ const n = { kind: "element", predicate: (o = t, o.length === 0 ? m : o.length === 1 ? o[0] : (r, i) => {
124
+ for (const l of o) if (!l(r, i)) return !1;
125
+ return !0;
126
+ }), tags: e };
127
+ var o;
128
+ const s = (r) => D(e, [...t, r]);
129
+ return { [A]: n, attr: (r, i, l) => s(M(r, i, l)), classAll: (...r) => s(ae(r)), classAny: (...r) => s((function(i) {
130
+ const l = ce(i);
131
+ return l.length === 0 ? () => !1 : (a) => {
132
+ if (!m(a)) return !1;
133
+ const c = a.classList;
134
+ for (const u of l) if (c.contains(u)) return !0;
135
+ return !1;
136
+ };
137
+ })(r)), styleAny: (r, i, l) => s((function(a, c, u) {
138
+ if (typeof c == "string") return (h) => m(h) && h.style.getPropertyValue(a) === c;
139
+ if (c instanceof RegExp) {
140
+ const h = u && u.capture, p = c;
141
+ return (d, f) => {
142
+ if (!m(d)) return !1;
143
+ const g = d.style.getPropertyValue(a);
144
+ if (!g) return !1;
145
+ const x = g.match(p);
146
+ return x !== null && (h !== void 0 && (f[h] = x), !0);
147
+ };
148
+ }
149
+ k(362, JSON.stringify(a));
150
+ })(r, i, l)) };
151
+ }
152
+ function ce(e) {
153
+ const t = [];
154
+ for (const n of e) n && t.push(n);
155
+ return t;
156
+ }
157
+ function ae(e) {
158
+ const t = ce(e);
159
+ return t.length === 0 ? () => !0 : (n) => {
160
+ if (!m(n)) return !1;
161
+ const o = n.classList;
162
+ for (const s of t) if (!o.contains(s)) return !1;
163
+ return !0;
164
+ };
165
+ }
166
+ function M(e, t, n) {
167
+ if (t === !0) return (o) => m(o) && o.hasAttribute(e);
168
+ if (typeof t == "string") return (o) => m(o) && o.getAttribute(e) === t;
169
+ if (t instanceof RegExp) {
170
+ const o = n && n.capture, s = t;
171
+ return (r, i) => {
172
+ if (!m(r)) return !1;
173
+ const l = r.getAttribute(e);
174
+ if (l == null) return !1;
175
+ const a = l.match(s);
176
+ return a !== null && (o !== void 0 && (i[o] = a), !0);
177
+ };
178
+ }
179
+ k(361, JSON.stringify(e));
180
+ }
181
+ const Qe = { kind: "text", predicate: _, tags: /* @__PURE__ */ new Set() }, Xe = { [A]: Qe }, Ye = { kind: "comment", predicate: (e) => e.nodeType === 8, tags: /* @__PURE__ */ new Set() }, Ze = { [A]: Ye }, C = { any: () => D(/* @__PURE__ */ new Set(), []), comment: () => Ze, tag(...e) {
182
+ e.length > 0 || k(363);
183
+ const t = /* @__PURE__ */ new Set();
184
+ for (const n of e) t.add(n.toUpperCase());
185
+ return D(t, []);
186
+ }, text: () => Xe };
187
+ function Ot(e, t) {
188
+ return m(e) && e.nodeName === t.toUpperCase();
189
+ }
190
+ const ue = /[A-Za-z0-9_-]/;
191
+ class et {
192
+ constructor(t, n) {
193
+ this.source = t, this.pos = n;
194
+ }
195
+ peek(t = 0) {
196
+ return this.source[this.pos + t] || "";
197
+ }
198
+ consume() {
199
+ return this.source[this.pos++] || "";
200
+ }
201
+ eof() {
202
+ return this.pos >= this.source.length;
203
+ }
204
+ skipWhitespace() {
205
+ for (; !this.eof() && /\s/.test(this.peek()); ) this.pos++;
206
+ }
207
+ readIdent() {
208
+ const t = this.pos;
209
+ for (; !this.eof() && ue.test(this.peek()); ) this.pos++;
210
+ return this.source.slice(t, this.pos);
211
+ }
212
+ readQuoted() {
213
+ const t = this.consume();
214
+ this.assert(t === '"' || t === "'", "expected quote");
215
+ const n = this.pos;
216
+ for (; !this.eof() && this.peek() !== t; ) this.peek() === "\\" ? this.pos += 2 : this.pos++;
217
+ this.assert(!this.eof(), "unterminated string");
218
+ const o = this.source.slice(n, this.pos);
219
+ return this.pos++, o.replace(/\\(.)/g, "$1");
220
+ }
221
+ assert(t, n) {
222
+ t || k(364, String(this.pos + 1), n, this.source);
223
+ }
224
+ }
225
+ function tt(e) {
226
+ const t = /* @__PURE__ */ new Set(), n = [], o = [];
227
+ if (e.skipWhitespace(), e.peek() === "*") e.consume();
228
+ else if (ue.test(e.peek())) {
229
+ const s = e.readIdent();
230
+ s && t.add(s.toUpperCase());
231
+ }
232
+ for (; !e.eof(); ) {
233
+ const s = e.peek();
234
+ if (s === ".") {
235
+ e.consume();
236
+ const r = e.readIdent();
237
+ e.assert(r !== "", 'expected class name after "."'), o.push(r);
238
+ } else if (s === "#") {
239
+ e.consume();
240
+ const r = e.readIdent();
241
+ e.assert(r !== "", 'expected id after "#"'), n.push(M("id", r));
242
+ } else {
243
+ if (s !== "[") break;
244
+ {
245
+ e.consume(), e.skipWhitespace();
246
+ const r = e.readIdent();
247
+ e.assert(r !== "", 'expected attribute name after "["'), e.skipWhitespace();
248
+ let i = !0;
249
+ if (e.peek() === "=") {
250
+ e.consume(), e.skipWhitespace();
251
+ const l = e.peek();
252
+ l === '"' || l === "'" ? i = e.readQuoted() : (i = e.readIdent(), e.assert(i !== "", "expected attribute value")), e.skipWhitespace();
253
+ }
254
+ e.assert(e.peek() === "]", 'expected "]"'), e.consume(), n.push(M(r, i));
255
+ }
256
+ }
257
+ }
258
+ return o.length > 0 && n.push(ae(o)), { predicates: n, tags: t };
259
+ }
260
+ function nt(e) {
261
+ const t = new et(e, 0), n = [];
262
+ for (; ; ) {
263
+ const s = tt(t);
264
+ if (n.push(s), t.skipWhitespace(), t.eof()) break;
265
+ t.assert(t.peek() === ",", 'expected "," (selector lists are the only supported combinator)'), t.consume(), t.skipWhitespace();
266
+ }
267
+ if (n.length === 1) return D(n[0].tags, n[0].predicates);
268
+ const o = /* @__PURE__ */ new Set();
269
+ for (const s of n) for (const r of s.tags) o.add(r);
270
+ return D(o, [(s, r) => {
271
+ for (const i of n) {
272
+ const l = s.nodeName;
273
+ if (i.tags.size > 0 && !i.tags.has(l)) continue;
274
+ let a = !0;
275
+ for (const c of i.predicates) if (!c(s, r)) {
276
+ a = !1;
277
+ break;
278
+ }
279
+ if (a) return !0;
280
+ }
281
+ return !1;
282
+ }]);
283
+ }
284
+ function Et(e) {
285
+ return e;
286
+ }
287
+ function U(e, t, n) {
288
+ return se(Ve, e, t, n);
289
+ }
290
+ const F = /* @__PURE__ */ U("textFormat", () => 0), ot = /* @__PURE__ */ U("textStyle", () => ({}));
291
+ function rt(e) {
292
+ if (!m(e)) return !1;
293
+ if (e.nodeName === "PRE") return !0;
294
+ const t = e.style.whiteSpace;
295
+ return typeof t == "string" && t.startsWith("pre");
296
+ }
297
+ function st(e) {
298
+ if (_(e)) return !0;
299
+ if (!m(e)) return !1;
300
+ const t = e.style.display;
301
+ return t ? t.startsWith("inline") : !R(e) && W(e);
302
+ }
303
+ const it = /* @__PURE__ */ U("whitespaceConfig", () => ({ isInline: st, preservesWhitespace: rt }));
304
+ function fe(e) {
305
+ return I(e) || Ee(e) && !e.isInline();
306
+ }
307
+ function lt(e, t) {
308
+ const n = [];
309
+ let o = [];
310
+ const s = () => {
311
+ o.length !== 0 && (n.push(t().splice(0, 0, o)), o = []);
312
+ };
313
+ for (const r of e) if (fe(r)) {
314
+ if (s(), v(r)) {
315
+ const i = lt(r.getChildren(), t);
316
+ r.splice(0, r.getChildrenSize(), i);
317
+ }
318
+ n.push(r);
319
+ } else o.push(r);
320
+ return s(), n;
321
+ }
322
+ function ct(e, t) {
323
+ if (!m(t)) return e;
324
+ const n = t.style.textAlign;
325
+ if (!H(n)) return e;
326
+ for (const o of e) I(o) && o.getFormatType() === "" && o.setFormat(n);
327
+ return e;
328
+ }
329
+ function at(e, t, n) {
330
+ e.length === 1 && Te(e[0]) && (e = []);
331
+ const o = B();
332
+ if (m(n)) {
333
+ const s = n.style.textAlign;
334
+ H(s) && o.setFormat(s);
335
+ }
336
+ return [o.splice(0, 0, e)];
337
+ }
338
+ const ut = { $accepts: fe, $packageRun: at, name: "BlockSchema" }, $ = C, ft = /* @__PURE__ */ new Set(["center", "end", "justify", "left", "right", "start"]);
339
+ function H(e) {
340
+ return ft.has(e);
341
+ }
342
+ const pt = { B: { fontWeight: "bold" }, EM: { fontStyle: "italic" }, I: { fontStyle: "italic" }, S: { textDecoration: "line-through" }, STRONG: { fontWeight: "bold" }, SUB: { verticalAlign: "sub" }, SUP: { verticalAlign: "super" }, U: { textDecoration: "underline" } }, dt = { CODE: Ae, MARK: Re }, ht = /* @__PURE__ */ new Set(["font-weight", "font-style", "text-decoration", "vertical-align"]), mt = { $import: (e, t) => {
343
+ const n = e.get(F), o = pt[t.nodeName], s = (function(p) {
344
+ return { fontStyle: p.style.fontStyle, fontWeight: p.style.fontWeight, textDecoration: p.style.textDecoration, verticalAlign: p.style.verticalAlign };
345
+ })(t), r = o ? (i = o, { fontStyle: (l = s).fontStyle || i.fontStyle, fontWeight: l.fontWeight || i.fontWeight, textDecoration: l.textDecoration || i.textDecoration, verticalAlign: l.verticalAlign || i.verticalAlign }) : s;
346
+ var i, l;
347
+ let a = (c = n, u = (function(p) {
348
+ let d = 0, f = 0;
349
+ const { fontWeight: g, fontStyle: x, textDecoration: y, verticalAlign: S } = p;
350
+ if (g === "700" || g === "bold" ? d |= G : g !== "normal" && g !== "400" || (f |= G), x === "italic" ? d |= j : x === "normal" && (f |= j), y) {
351
+ const b = y.split(" ");
352
+ b.includes("underline") && (d |= q), b.includes("line-through") && (d |= z), b.includes("none") && (f |= q | z);
353
+ }
354
+ return S === "sub" ? (d |= E, f |= T) : S === "super" ? (d |= T, f |= E) : S === "baseline" && (f |= E | T), { clear: f, set: d };
355
+ })(r), c & ~u.clear | u.set);
356
+ var c, u;
357
+ const h = dt[t.nodeName];
358
+ return h && (a |= h), a === n ? e.$importChildren(t) : e.$importChildren(t, { context: [re(F, a)] });
359
+ }, match: $.tag("b", "strong", "em", "i", "code", "mark", "s", "sub", "sup", "u", "span"), name: "@lexical/html/inline-format" };
360
+ function K(e, t, n) {
361
+ let o = e;
362
+ for (; ; ) {
363
+ let s = null;
364
+ for (; (s = t ? o.nextSibling : o.previousSibling) === null; ) {
365
+ const i = o.parentNode;
366
+ if (i === null) return null;
367
+ o = i;
368
+ }
369
+ if (o = s, !n.isInline(o)) return null;
370
+ let r = o;
371
+ for (; (r = t ? o.firstChild : o.lastChild) !== null; ) o = r;
372
+ if (_(o)) return o;
373
+ if (o.nodeName === "BR") return null;
374
+ }
375
+ }
376
+ function J(e, t) {
377
+ return t !== 0 && P(e) ? e.setFormat(t) : e;
378
+ }
379
+ function Q(e, t) {
380
+ if (P(e)) {
381
+ const n = (function(o) {
382
+ let s = "";
383
+ for (const r in o) ht.has(r) || (s += `${r}: ${o[r]}; `);
384
+ return s.trimEnd();
385
+ })(t);
386
+ n !== "" && e.setStyle(n);
387
+ }
388
+ return e;
389
+ }
390
+ const gt = { $import: (e, t) => {
391
+ const n = e.get(F), o = e.get(ot), s = e.get(it);
392
+ if ((function(l, a) {
393
+ let c = l.parentNode;
394
+ for (; c !== null; ) {
395
+ if (a.preservesWhitespace(c)) return !0;
396
+ c = c.parentNode;
397
+ }
398
+ return !1;
399
+ })(t, s)) {
400
+ const l = Ie(t.textContent || "");
401
+ for (const a of l) J(a, n), Q(a, o);
402
+ return l;
403
+ }
404
+ const r = (function(l, a) {
405
+ let c = (l.textContent || "").replace(/\r/g, "").replace(/[ \t\n]+/g, " ");
406
+ if (c.length === 0) return "";
407
+ if (c[0] === " ") {
408
+ let u = l, h = !0;
409
+ for (; u !== null && (u = K(u, !1, a)) !== null; ) {
410
+ const p = u.textContent || "";
411
+ if (p.length > 0) {
412
+ /[ \t\n]$/.test(p) && (c = c.slice(1)), h = !1;
413
+ break;
414
+ }
415
+ }
416
+ h && (c = c.slice(1));
417
+ }
418
+ if (c.length > 0 && c[c.length - 1] === " ") {
419
+ let u = l, h = !0;
420
+ for (; u !== null && (u = K(u, !0, a)) !== null; ) if ((u.textContent || "").replace(/^( |\t|\r?\n)+/, "").length > 0) {
421
+ h = !1;
422
+ break;
423
+ }
424
+ h && (c = c.slice(0, -1));
425
+ }
426
+ return c;
427
+ })(t, s);
428
+ if (r === "") return [];
429
+ const i = ve(r);
430
+ return J(i, n), Q(i, o), [i];
431
+ }, match: $.text(), name: "@lexical/html/#text" }, yt = { $import: () => [], match: $.tag("script", "style"), name: "@lexical/html/script-style-ignore" }, St = { $import: (e, t) => De(t) || we(t) ? [] : [L()], match: $.tag("br"), name: "@lexical/html/br" }, xt = { $import: (e, t) => {
432
+ const n = B();
433
+ if (Ne(n, t), ke(t, n), n.getFormatType() === "") {
434
+ const o = t.getAttribute("align");
435
+ o && H(o) && n.setFormat(o);
436
+ }
437
+ return be(n, t), [n.splice(0, 0, e.$importChildren(t))];
438
+ }, match: $.tag("p"), name: "@lexical/html/p" }, $t = { $import: (e, t, n) => w().hasNode(Fe) ? [Me()] : n(), match: $.tag("hr"), name: "@lexical/html/hr" };
439
+ $.any();
440
+ function Ct(e, t) {
441
+ const n = [];
442
+ let o = 0, s = 0;
443
+ for (; o < e.length && s < t.length; ) e[o] <= t[s] ? n.push(e[o++]) : n.push(t[s++]);
444
+ for (; o < e.length; ) n.push(e[o++]);
445
+ for (; s < t.length; ) n.push(t[s++]);
446
+ return n;
447
+ }
448
+ function Nt(e) {
449
+ const t = [], n = /* @__PURE__ */ new Map(), o = [], s = [], r = [], i = /* @__PURE__ */ new Set();
450
+ e.forEach((a, c) => {
451
+ const u = (function(p) {
452
+ const d = p[A];
453
+ return d === void 0 && k(360), d;
454
+ })(a.match), h = a.name || (function(p, d) {
455
+ return p.kind === "text" ? `#text@${d}` : p.kind === "comment" ? `#comment@${d}` : p.tags.size === 0 ? `*@${d}` : `${Array.from(p.tags).join(",").toLowerCase()}@${d}`;
456
+ })(u, c);
457
+ if (a.name && i.add(a.name), t.push({ $import: a.$import, name: h, predicate: u.predicate }), u.kind === "text") s.push(c);
458
+ else if (u.kind === "comment") r.push(c);
459
+ else if (u.tags.size === 0) o.push(c);
460
+ else for (const p of u.tags) {
461
+ let d = n.get(p);
462
+ d || (d = [], n.set(p, d)), d.push(c);
463
+ }
464
+ });
465
+ const l = /* @__PURE__ */ new Map();
466
+ if (o.length === 0) for (const [a, c] of n) l.set(a, c);
467
+ else for (const [a, c] of n) l.set(a, Ct(c, o));
468
+ return { byTag: l, commentIndices: r, rules: t, textIndices: s, wildcardIndices: o };
469
+ }
470
+ function kt(e) {
471
+ const t = [];
472
+ for (const n of e) if (bt(n)) for (const o of n.rules) t.push(o);
473
+ else t.push(n);
474
+ return t;
475
+ }
476
+ function bt(e) {
477
+ return typeof e == "object" && e !== null && "__type" in e && e.__type === "CompiledOverlayRules";
478
+ }
479
+ function Tt(e) {
480
+ const t = kt(e);
481
+ return { __type: "CompiledOverlayRules", dispatch: Nt(t), rules: t };
482
+ }
483
+ C.any();
484
+ const Wt = { any: C.any, comment: C.comment, css: nt, tag: C.tag, text: C.text }, pe = /* @__PURE__ */ new Set(["STYLE", "SCRIPT"]);
485
+ function Mt(e, t) {
486
+ He(t);
487
+ const n = X(t) ? t.body.childNodes : t.childNodes, o = [], s = [];
488
+ for (const r of n) if (!pe.has(r.nodeName)) {
489
+ const i = he(r, e, s, !1);
490
+ if (i !== null) for (const l of i) o.push(l);
491
+ }
492
+ return (function(r) {
493
+ for (const i of r) i.getParent() && i.getNextSibling() instanceof Y && i.insertAfter(L());
494
+ for (const i of r) {
495
+ const l = i.getParent();
496
+ l && l.splice(i.getIndexWithinParent(), 1, i.getChildren());
497
+ }
498
+ })(s), o;
499
+ }
500
+ function It(e, t = null, n = w()) {
501
+ return Je([re(ze, !0)], n)(() => {
502
+ const o = Se(), s = Ke(n), r = xe(t) ? $e(t.anchor.getNode()) : null, i = e.append.bind(e);
503
+ for (const l of (v(r) ? r : o).getChildren()) de(n, l, i, t, s);
504
+ return e;
505
+ });
506
+ }
507
+ function Ft(e, t = null) {
508
+ return (typeof document > "u" || typeof window > "u" && global.window === void 0) && k(338), ge(e), It(Z().createElement("div"), t, e).innerHTML;
509
+ }
510
+ function de(e, t, n, o = null, s = ee(e)) {
511
+ let r = s.$shouldInclude(t, o, e);
512
+ const i = s.$shouldExclude(t, o, e);
513
+ let l = t;
514
+ o !== null && P(t) && (l = me(o, t, "clone"));
515
+ const a = s.$exportDOM(l, e), { element: c, after: u, append: h, $getChildNodes: p } = a;
516
+ if (!c) return !1;
517
+ const d = Z().createDocumentFragment(), f = p ? p() : v(l) ? l.getChildren() : [], g = r && Ce(o) && v(t) ? null : o, x = d.append.bind(d);
518
+ for (const y of f) {
519
+ const S = de(e, y, x, g, s);
520
+ !r && S && s.$extractWithChild(t, y, o, "html", e) && (r = !0);
521
+ }
522
+ if (r && !i) {
523
+ if ((m(c) || V(c)) && (h ? h(d) : c.append(d)), n(c), u) {
524
+ const y = u.call(l, c);
525
+ y && (V(c) ? c.replaceChildren(y) : c.replaceWith(y));
526
+ }
527
+ } else n(d);
528
+ return r;
529
+ }
530
+ function he(e, t, n, o, s = /* @__PURE__ */ new Map(), r) {
531
+ const i = [];
532
+ if (pe.has(e.nodeName)) return i;
533
+ let l = null;
534
+ const a = (function(f, g) {
535
+ const { nodeName: x } = f, y = g._htmlConversions.get(x.toLowerCase());
536
+ let S = null;
537
+ if (y !== void 0) for (const b of y) {
538
+ const O = b(f);
539
+ O !== null && (S === null || (S.priority || 0) <= (O.priority || 0)) && (S = O);
540
+ }
541
+ return S !== null ? S.conversion : null;
542
+ })(e, t), c = a ? a(e) : null;
543
+ let u = null;
544
+ if (c !== null) {
545
+ u = c.after;
546
+ const f = c.node;
547
+ if (l = Array.isArray(f) ? f[f.length - 1] : f, l !== null) {
548
+ for (const [, g] of s) if (l = g(l, r), !l) break;
549
+ l && i.push(...Array.isArray(f) ? f : [l]);
550
+ }
551
+ c.forChild != null && s.set(e.nodeName, c.forChild);
552
+ }
553
+ const h = e.childNodes;
554
+ let p = [];
555
+ const d = (l == null || !ye(l)) && (l != null && I(l) || o);
556
+ for (let f = 0; f < h.length; f++) p.push(...he(h[f], t, n, d, new Map(s), l));
557
+ if (u != null && (p = u(p)), R(e) && (p = vt(e, p, d ? () => {
558
+ const f = new Y();
559
+ return n.push(f), f;
560
+ } : B)), l == null) if (p.length > 0) for (const f of p) i.push(f);
561
+ else R(e) && (function(f) {
562
+ return f.nextSibling == null || f.previousSibling == null ? !1 : W(f.nextSibling) && W(f.previousSibling);
563
+ })(e) && i.push(L());
564
+ else v(l) && l.append(...p);
565
+ return i;
566
+ }
567
+ function vt(e, t, n) {
568
+ const o = e.style.textAlign, s = [];
569
+ let r = [];
570
+ for (let i = 0; i < t.length; i++) {
571
+ const l = t[i];
572
+ if (I(l)) o && !l.getFormat() && l.setFormat(o), s.push(l);
573
+ else if (r.push(l), i === t.length - 1 || i < t.length - 1 && I(t[i + 1])) {
574
+ const a = n();
575
+ a.setFormat(o), a.append(...r), s.push(a), r = [];
576
+ }
577
+ }
578
+ return s;
579
+ }
580
+ export {
581
+ lt as $distributeInlineWrapper,
582
+ It as $generateDOMFromNodes,
583
+ Ft as $generateHtmlFromNodes,
584
+ Mt as $generateNodesFromDOM,
585
+ Ke as $getSessionDOMRenderConfig,
586
+ fe as $isBlockLevel,
587
+ ct as $propagateTextAlignToBlockChildren,
588
+ Je as $withRenderContext,
589
+ ut as BlockSchema,
590
+ F as ImportTextFormat,
591
+ ot as ImportTextStyle,
592
+ it as ImportWhitespaceConfig,
593
+ ze as RenderContextExport,
594
+ re as contextValue,
595
+ U as createImportState,
596
+ qe as createRenderState,
597
+ st as defaultIsInline,
598
+ rt as defaultPreservesWhitespace,
599
+ Et as defineImportRule,
600
+ Tt as defineOverlayRules,
601
+ Ot as isElementOfTag,
602
+ nt as parseSelector,
603
+ Wt as sel
604
+ };