@norio-office/rich-text 0.7.0 → 0.8.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 (61) hide show
  1. package/README.md +895 -816
  2. package/dist/ai/bridge.d.ts +335 -0
  3. package/dist/ai/consume-stream.d.ts +8 -0
  4. package/dist/ai/executor.d.ts +19 -0
  5. package/dist/ai/index.d.ts +8 -0
  6. package/dist/ai/index.js +4106 -0
  7. package/dist/ai/tools.d.ts +158 -0
  8. package/dist/ai-protocol/index.d.ts +12 -0
  9. package/dist/ai-protocol/index.js +2372 -0
  10. package/dist/ai-protocol/json-schema.d.ts +5 -0
  11. package/dist/ai-protocol/patch.d.ts +77 -0
  12. package/dist/ai-protocol/references.d.ts +11 -0
  13. package/dist/ai-protocol/stream.d.ts +94 -0
  14. package/dist/ai-protocol/tools.d.ts +8 -0
  15. package/dist/ai-protocol/validation.d.ts +20 -0
  16. package/dist/components/RichTextEditor.vue.d.ts +11 -8
  17. package/dist/components/TextSelectionMenu.vue.d.ts +29 -1
  18. package/dist/document/ai-identity.d.ts +4 -0
  19. package/dist/document/nodes/columns-block.d.ts +2 -0
  20. package/dist/document/nodes/countdown-block.d.ts +2 -0
  21. package/dist/document/nodes/formula-block.d.ts +2 -0
  22. package/dist/document/nodes/highlight-block.d.ts +2 -0
  23. package/dist/document/nodes/image-block.d.ts +8 -0
  24. package/dist/document/nodes/link-block.d.ts +2 -0
  25. package/dist/document/nodes/local-file-block.d.ts +2 -0
  26. package/dist/document/nodes/mention.d.ts +2 -0
  27. package/dist/document/nodes/office-code-block.d.ts +1 -0
  28. package/dist/document/nodes/table-cells.d.ts +2 -0
  29. package/dist/document/nodes/themed-table.d.ts +1 -0
  30. package/dist/document/nodes/video-block.d.ts +8 -0
  31. package/dist/document/schema.d.ts +17 -0
  32. package/dist/extensions/ai-identity.d.ts +1 -0
  33. package/dist/extensions/columns-block.d.ts +1 -2
  34. package/dist/extensions/countdown-block.d.ts +1 -2
  35. package/dist/extensions/formula-block.d.ts +1 -2
  36. package/dist/extensions/highlight-block.d.ts +1 -2
  37. package/dist/extensions/image-block.d.ts +4 -8
  38. package/dist/extensions/link-block.d.ts +1 -2
  39. package/dist/extensions/local-file-block.d.ts +1 -2
  40. package/dist/extensions/mention.d.ts +1 -2
  41. package/dist/extensions/video-block.d.ts +4 -8
  42. package/dist/{html2canvas-4hiP1s1t.js → html2canvas-BnDzIoab.js} +112 -126
  43. package/dist/index.js +8272 -7604
  44. package/dist/index.umd.cjs +2189 -1990
  45. package/dist/nordox/index.d.ts +95 -0
  46. package/dist/nordox/index.js +2094 -0
  47. package/dist/{chunk-C_CI6nMA.js → rolldown-runtime-VHNaYcLd.js} +3 -3
  48. package/dist/style.css +1 -1
  49. package/dist/types.d.ts +9 -1
  50. package/docs/ai/README.md +108 -0
  51. package/docs/ai/acceptance-report.md +88 -0
  52. package/docs/ai/capability-matrix.md +43 -0
  53. package/docs/ai/compatibility.md +9 -0
  54. package/docs/icons.md +21 -0
  55. package/examples/ai/browser/App.vue +151 -0
  56. package/examples/ai/browser/index.html +12 -0
  57. package/examples/ai/browser/main.ts +5 -0
  58. package/examples/ai/browser/tsconfig.json +7 -0
  59. package/examples/ai/browser/vite.config.ts +14 -0
  60. package/examples/ai/node.mjs +28 -0
  61. package/package.json +15 -1
@@ -0,0 +1,4106 @@
1
+ import { DOMSerializer as e, Fragment as t } from "@tiptap/pm/model";
2
+ import { closeHistory as n } from "@tiptap/pm/history";
3
+ import { EditorState as r, NodeSelection as i, Plugin as a, PluginKey as o, TextSelection as s } from "@tiptap/pm/state";
4
+ import { CellSelection as c, TableMap as l, addColumnAfter as u, addColumnBefore as d, addRowAfter as f, addRowBefore as p, deleteColumn as m, deleteRow as h, mergeCells as g, splitCell as _ } from "@tiptap/pm/tables";
5
+ import { Decoration as v, DecorationSet as y } from "@tiptap/pm/view";
6
+ import { absolutePositionToRelativePosition as b, relativePositionToAbsolutePosition as x, ySyncPluginKey as S, yUndoPluginKey as C } from "@tiptap/y-tiptap";
7
+ import { Extension as w, Mark as T, Node as E, getSchema as ee, mergeAttributes as D } from "@tiptap/core";
8
+ import te from "@tiptap/extension-text-style/background-color";
9
+ import O from "@tiptap/extension-text-style/color";
10
+ import k from "@tiptap/extension-text-style/font-size";
11
+ import A from "@tiptap/extension-font-family";
12
+ import j from "@tiptap/extension-subscript";
13
+ import M from "@tiptap/extension-superscript";
14
+ import N from "@tiptap/extension-table-row";
15
+ import ne from "@tiptap/extension-task-item";
16
+ import P from "@tiptap/extension-task-list";
17
+ import { TextStyle as F } from "@tiptap/extension-text-style/text-style";
18
+ import re from "@tiptap/extension-underline";
19
+ import I from "@tiptap/starter-kit";
20
+ import L from "@tiptap/extension-code-block-lowlight";
21
+ import { common as ie, createLowlight as ae } from "lowlight";
22
+ import oe from "@tiptap/extension-table-cell";
23
+ import se from "@tiptap/extension-table-header";
24
+ import { Table as ce } from "@tiptap/extension-table";
25
+ import R from "@tiptap/extension-horizontal-rule";
26
+ import { computed as le, createElementBlock as ue, defineComponent as de, h as fe, normalizeClass as pe, normalizeStyle as me, openBlock as he, render as ge } from "vue";
27
+ //#region src/document/ai-identity.ts
28
+ var _e = [
29
+ "paragraph",
30
+ "heading",
31
+ "blockquote",
32
+ "bulletList",
33
+ "orderedList",
34
+ "listItem",
35
+ "taskList",
36
+ "taskItem",
37
+ "codeBlock",
38
+ "horizontalRule",
39
+ "table",
40
+ "tableRow",
41
+ "tableCell",
42
+ "tableHeader",
43
+ "columnsBlock",
44
+ "columnsColumn",
45
+ "highlightBlock",
46
+ "imageBlock",
47
+ "videoBlock",
48
+ "localFileBlock",
49
+ "linkBlock",
50
+ "formulaBlock",
51
+ "countdownBlock"
52
+ ], ve = w.create({
53
+ name: "aiIdentity",
54
+ addGlobalAttributes() {
55
+ return [{
56
+ types: [..._e],
57
+ attributes: { aiId: {
58
+ default: null,
59
+ parseHTML: (e) => e.getAttribute("data-ai-id"),
60
+ renderHTML: (e) => e.aiId ? { "data-ai-id": e.aiId } : {}
61
+ } }
62
+ }];
63
+ }
64
+ });
65
+ function ye(e) {
66
+ let t = JSON.parse(JSON.stringify(e)), n = /* @__PURE__ */ new Set(), r = new Set(_e);
67
+ function i(e) {
68
+ if (e.type && r.has(e.type)) {
69
+ let t = e.attrs?.aiId;
70
+ (typeof t != "string" || !t || n.has(t)) && (e.attrs = {
71
+ ...e.attrs,
72
+ aiId: crypto.randomUUID()
73
+ }), n.add(e.attrs?.aiId);
74
+ }
75
+ e.content?.forEach(i);
76
+ }
77
+ return i(t), t;
78
+ }
79
+ function be(e) {
80
+ return Math.round(e * 1e3) / 1e3;
81
+ }
82
+ function z(e) {
83
+ if (e <= 0) return [];
84
+ let t = 100 / e, n = Array.from({ length: e }, () => be(t)), r = n.reduce((e, t) => e + t, 0);
85
+ return n[e - 1] = be(n[e - 1] + (100 - r)), n;
86
+ }
87
+ function xe(e, t) {
88
+ if (t <= 0) return [];
89
+ if (!Array.isArray(e) || e.length !== t) return z(t);
90
+ let n = e.map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0);
91
+ if (n.length !== t) return z(t);
92
+ let r = n.reduce((e, t) => e + t, 0);
93
+ if (r <= 0) return z(t);
94
+ let i = n.map((e) => e / r * 100);
95
+ if (10 * t > 100) return z(t);
96
+ let a = i.map((e) => e).map((e) => e < 10 ? 10 : e), o = a.reduce((e, t) => e + t, 0) - 100;
97
+ for (; o > .001;) {
98
+ let e = a.map((e, t) => ({
99
+ width: e,
100
+ index: t
101
+ })).filter(({ width: e }) => e > 10.001);
102
+ if (!e.length) return z(t);
103
+ let n = o / e.length, r = 0;
104
+ if (e.forEach(({ index: e }) => {
105
+ let t = a[e] - 10, i = Math.min(t, n);
106
+ a[e] -= i, r += i;
107
+ }), r <= .001) return z(t);
108
+ o -= r;
109
+ }
110
+ return a = a.map((e) => be(e)), r = a.reduce((e, t) => e + t, 0), a[t - 1] = be(a[t - 1] + (100 - r)), a;
111
+ }
112
+ //#endregion
113
+ //#region src/document/nodes/columns-block.ts
114
+ var Se = E.create({
115
+ name: "columnsBlock",
116
+ group: "block",
117
+ content: "columnsColumn+",
118
+ defining: !0,
119
+ isolating: !0,
120
+ addAttributes() {
121
+ return { widths: {
122
+ default: z(2),
123
+ parseHTML: (e) => {
124
+ let t = e.getAttribute("data-widths");
125
+ if (!t) return z(e.childElementCount || 2);
126
+ try {
127
+ return xe(JSON.parse(decodeURIComponent(t)), e.childElementCount || 2);
128
+ } catch {
129
+ return z(e.childElementCount || 2);
130
+ }
131
+ },
132
+ renderHTML: (e) => ({ "data-widths": encodeURIComponent(JSON.stringify(e.widths ?? z(2))) })
133
+ } };
134
+ },
135
+ parseHTML() {
136
+ return [{ tag: "div[data-type=\"columns-block\"]" }];
137
+ },
138
+ renderHTML({ HTMLAttributes: e }) {
139
+ return [
140
+ "div",
141
+ D(e, { "data-type": "columns-block" }),
142
+ 0
143
+ ];
144
+ }
145
+ }), Ce = E.create({
146
+ name: "countdownBlock",
147
+ group: "block",
148
+ atom: !0,
149
+ selectable: !0,
150
+ draggable: !0,
151
+ addAttributes() {
152
+ return {
153
+ targetTimestamp: {
154
+ default: 0,
155
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-target-timestamp") ?? "0", 10) || 0,
156
+ renderHTML: (e) => ({ "data-target-timestamp": String(e.targetTimestamp ?? 0) })
157
+ },
158
+ mode: {
159
+ default: "duration",
160
+ parseHTML: (e) => e.getAttribute("data-mode") || "duration",
161
+ renderHTML: (e) => ({ "data-mode": String(e.mode ?? "duration") })
162
+ },
163
+ color: {
164
+ default: "#ff8b00",
165
+ parseHTML: (e) => e.getAttribute("data-color") || "#ff8b00",
166
+ renderHTML: (e) => ({ "data-color": String(e.color ?? "#ff8b00") })
167
+ },
168
+ reminderEnabled: {
169
+ default: !0,
170
+ parseHTML: (e) => e.getAttribute("data-reminder-enabled") !== "false",
171
+ renderHTML: (e) => ({ "data-reminder-enabled": e.reminderEnabled === !1 ? "false" : "true" })
172
+ }
173
+ };
174
+ },
175
+ parseHTML() {
176
+ return [{ tag: "div[data-type=\"countdown-block\"]" }];
177
+ },
178
+ renderHTML({ HTMLAttributes: e }) {
179
+ return ["div", {
180
+ ...e,
181
+ "data-type": "countdown-block"
182
+ }];
183
+ }
184
+ }), we = E.create({
185
+ name: "formulaBlock",
186
+ group: "block",
187
+ atom: !0,
188
+ selectable: !0,
189
+ draggable: !0,
190
+ addAttributes() {
191
+ return { latex: {
192
+ default: "",
193
+ parseHTML: (e) => e.getAttribute("data-latex") || "",
194
+ renderHTML: (e) => ({ "data-latex": String(e.latex ?? "") })
195
+ } };
196
+ },
197
+ parseHTML() {
198
+ return [{ tag: "div[data-type=\"formula-block\"]" }];
199
+ },
200
+ renderHTML({ HTMLAttributes: e }) {
201
+ return ["div", {
202
+ ...e,
203
+ "data-type": "formula-block"
204
+ }];
205
+ }
206
+ }), Te = "高亮块", Ee = "✍️", De = "#f3c389", Oe = "#fff8ef", ke = E.create({
207
+ name: "highlightBlock",
208
+ group: "block",
209
+ content: "block+",
210
+ defining: !0,
211
+ isolating: !0,
212
+ addAttributes() {
213
+ return {
214
+ titleEnabled: {
215
+ default: !0,
216
+ parseHTML: (e) => e.getAttribute("data-title-enabled") !== "false",
217
+ renderHTML: (e) => ({ "data-title-enabled": e.titleEnabled ? "true" : "false" })
218
+ },
219
+ emojiEnabled: {
220
+ default: !0,
221
+ parseHTML: (e) => e.getAttribute("data-emoji-enabled") !== "false",
222
+ renderHTML: (e) => ({ "data-emoji-enabled": e.emojiEnabled ? "true" : "false" })
223
+ },
224
+ title: {
225
+ default: Te,
226
+ parseHTML: (e) => e.getAttribute("data-title") || Te,
227
+ renderHTML: (e) => ({ "data-title": e.title || Te })
228
+ },
229
+ emoji: {
230
+ default: Ee,
231
+ parseHTML: (e) => e.getAttribute("data-emoji") || Ee,
232
+ renderHTML: (e) => ({ "data-emoji": e.emoji || Ee })
233
+ },
234
+ borderColor: {
235
+ default: De,
236
+ parseHTML: (e) => e.getAttribute("data-border-color") || De,
237
+ renderHTML: (e) => ({ "data-border-color": e.borderColor || De })
238
+ },
239
+ backgroundColor: {
240
+ default: Oe,
241
+ parseHTML: (e) => e.getAttribute("data-background-color") || Oe,
242
+ renderHTML: (e) => ({ "data-background-color": e.backgroundColor || Oe })
243
+ }
244
+ };
245
+ },
246
+ parseHTML() {
247
+ return [{ tag: "div[data-type=\"highlight-block\"]" }];
248
+ },
249
+ renderHTML({ HTMLAttributes: e }) {
250
+ return [
251
+ "div",
252
+ D(e, { "data-type": "highlight-block" }),
253
+ 0
254
+ ];
255
+ }
256
+ }), Ae = E.create({
257
+ name: "imageBlock",
258
+ group: "block",
259
+ atom: !0,
260
+ selectable: !0,
261
+ draggable: !0,
262
+ addOptions() {
263
+ return {
264
+ uploadImage: null,
265
+ onUploadError: null
266
+ };
267
+ },
268
+ addAttributes() {
269
+ return {
270
+ images: {
271
+ default: [],
272
+ parseHTML: (e) => {
273
+ let t = e.getAttribute("data-images");
274
+ if (!t) return [];
275
+ try {
276
+ return JSON.parse(decodeURIComponent(t));
277
+ } catch {
278
+ return [];
279
+ }
280
+ },
281
+ renderHTML: (e) => ({ "data-images": encodeURIComponent(JSON.stringify(e.images ?? [])) })
282
+ },
283
+ widthPercent: {
284
+ default: 100,
285
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-width-percent") ?? "100", 10) || 100,
286
+ renderHTML: (e) => ({ "data-width-percent": String(e.widthPercent ?? 100) })
287
+ },
288
+ align: {
289
+ default: "left",
290
+ parseHTML: (e) => e.getAttribute("data-align") || "left",
291
+ renderHTML: (e) => ({ "data-align": String(e.align ?? "left") })
292
+ },
293
+ height: {
294
+ default: 146,
295
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-height") ?? "146", 10) || 146,
296
+ renderHTML: (e) => ({ "data-height": String(e.height ?? 146) })
297
+ }
298
+ };
299
+ },
300
+ parseHTML() {
301
+ return [{ tag: "div[data-type=\"image-block\"]" }];
302
+ },
303
+ renderHTML({ HTMLAttributes: e }) {
304
+ return ["div", {
305
+ ...e,
306
+ "data-type": "image-block"
307
+ }];
308
+ }
309
+ }), je = E.create({
310
+ name: "linkBlock",
311
+ group: "block",
312
+ atom: !0,
313
+ selectable: !0,
314
+ draggable: !0,
315
+ addAttributes() {
316
+ return {
317
+ title: {
318
+ default: "",
319
+ parseHTML: (e) => e.getAttribute("data-title") || "",
320
+ renderHTML: (e) => ({ "data-title": String(e.title ?? "") })
321
+ },
322
+ url: {
323
+ default: "",
324
+ parseHTML: (e) => e.getAttribute("data-url") || "",
325
+ renderHTML: (e) => ({ "data-url": String(e.url ?? "") })
326
+ },
327
+ displayMode: {
328
+ default: "preview",
329
+ parseHTML: (e) => e.getAttribute("data-display-mode") || "preview",
330
+ renderHTML: (e) => ({ "data-display-mode": String(e.displayMode ?? "preview") })
331
+ },
332
+ align: {
333
+ default: "left",
334
+ parseHTML: (e) => e.getAttribute("data-align") || "left",
335
+ renderHTML: (e) => ({ "data-align": String(e.align ?? "left") })
336
+ },
337
+ widthPercent: {
338
+ default: 100,
339
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-width-percent") ?? "100", 10) || 100,
340
+ renderHTML: (e) => ({ "data-width-percent": String(e.widthPercent ?? 100) })
341
+ },
342
+ height: {
343
+ default: 420,
344
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-height") ?? "420", 10) || 420,
345
+ renderHTML: (e) => ({ "data-height": String(e.height ?? 420) })
346
+ }
347
+ };
348
+ },
349
+ parseHTML() {
350
+ return [{ tag: "div[data-type=\"link-block\"]" }];
351
+ },
352
+ renderHTML({ HTMLAttributes: e }) {
353
+ return ["div", {
354
+ ...e,
355
+ "data-type": "link-block"
356
+ }];
357
+ }
358
+ }), Me = E.create({
359
+ name: "localFileBlock",
360
+ group: "block",
361
+ atom: !0,
362
+ selectable: !0,
363
+ draggable: !0,
364
+ addOptions() {
365
+ return {
366
+ onClick: null,
367
+ onDownload: null
368
+ };
369
+ },
370
+ addAttributes() {
371
+ return {
372
+ assetId: {
373
+ default: "",
374
+ parseHTML: (e) => e.getAttribute("data-asset-id") || "",
375
+ renderHTML: (e) => ({ "data-asset-id": String(e.assetId ?? "") })
376
+ },
377
+ url: {
378
+ default: "",
379
+ parseHTML: (e) => e.getAttribute("data-url") || "",
380
+ renderHTML: (e) => ({ "data-url": String(e.url ?? "") })
381
+ },
382
+ name: {
383
+ default: "",
384
+ parseHTML: (e) => e.getAttribute("data-name") || "",
385
+ renderHTML: (e) => ({ "data-name": String(e.name ?? "") })
386
+ },
387
+ size: {
388
+ default: 0,
389
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-size") ?? "0", 10) || 0,
390
+ renderHTML: (e) => ({ "data-size": String(e.size ?? 0) })
391
+ },
392
+ mimeType: {
393
+ default: "",
394
+ parseHTML: (e) => e.getAttribute("data-mime-type") || "",
395
+ renderHTML: (e) => ({ "data-mime-type": String(e.mimeType ?? "") })
396
+ }
397
+ };
398
+ },
399
+ parseHTML() {
400
+ return [{ tag: "div[data-type=\"local-file-block\"]" }];
401
+ },
402
+ renderHTML({ HTMLAttributes: e }) {
403
+ return ["div", {
404
+ ...e,
405
+ "data-type": "local-file-block"
406
+ }];
407
+ }
408
+ }), Ne = E.create({
409
+ name: "mention",
410
+ group: "inline",
411
+ inline: !0,
412
+ atom: !0,
413
+ selectable: !0,
414
+ addOptions() {
415
+ return { onClick: null };
416
+ },
417
+ addAttributes() {
418
+ return {
419
+ id: {
420
+ default: "",
421
+ parseHTML: (e) => e.getAttribute("data-mention-id") || "",
422
+ renderHTML: (e) => ({ "data-mention-id": String(e.id ?? "") })
423
+ },
424
+ name: {
425
+ default: "",
426
+ parseHTML: (e) => e.getAttribute("data-mention-name") || "",
427
+ renderHTML: (e) => ({ "data-mention-name": String(e.name ?? "") })
428
+ },
429
+ type: {
430
+ default: 1,
431
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-mention-type") ?? "1", 10) === 2 ? 2 : 1,
432
+ renderHTML: (e) => ({ "data-mention-type": String(Number(e.type ?? 1) === 2 ? 2 : 1) })
433
+ },
434
+ avatar: {
435
+ default: "",
436
+ parseHTML: (e) => e.getAttribute("data-mention-avatar") || "",
437
+ renderHTML: (e) => ({ "data-mention-avatar": String(e.avatar ?? "") })
438
+ },
439
+ icon: {
440
+ default: "",
441
+ parseHTML: (e) => e.getAttribute("data-mention-icon") || "",
442
+ renderHTML: (e) => ({ "data-mention-icon": String(e.icon ?? "") })
443
+ },
444
+ tag: {
445
+ default: "",
446
+ parseHTML: (e) => e.getAttribute("data-mention-tag") || "",
447
+ renderHTML: (e) => ({ "data-mention-tag": String(e.tag ?? "") })
448
+ },
449
+ updatedAt: {
450
+ default: "",
451
+ parseHTML: (e) => e.getAttribute("data-mention-updated-at") || "",
452
+ renderHTML: (e) => ({ "data-mention-updated-at": String(e.updatedAt ?? "") })
453
+ }
454
+ };
455
+ },
456
+ parseHTML() {
457
+ return [{ tag: "span[data-type=\"mention\"]" }];
458
+ },
459
+ renderHTML({ HTMLAttributes: e }) {
460
+ let t = String(e["data-mention-name"] ?? e.name ?? "");
461
+ return [
462
+ "span",
463
+ {
464
+ ...e,
465
+ "data-type": "mention",
466
+ class: "norio-office-rich-mention-inline"
467
+ },
468
+ `@${t}`
469
+ ];
470
+ },
471
+ renderText({ node: e }) {
472
+ return `@${String(e.attrs.name ?? "")}`;
473
+ }
474
+ }), Pe = ae(ie), Fe = L.configure({ lowlight: Pe }).extend({ addAttributes() {
475
+ return {
476
+ ...this.parent?.(),
477
+ language: {
478
+ default: "plain_text",
479
+ parseHTML: (e) => e.getAttribute("data-language") || "plain_text",
480
+ renderHTML: (e) => {
481
+ let t = e.language || "plain_text";
482
+ return t === "plain_text" ? { "data-language": t } : {
483
+ "data-language": t,
484
+ class: `language-${t}`
485
+ };
486
+ }
487
+ },
488
+ wrapLines: {
489
+ default: !1,
490
+ parseHTML: (e) => e.getAttribute("data-wrap-lines") === "true",
491
+ renderHTML: (e) => ({ "data-wrap-lines": e.wrapLines ? "true" : "false" })
492
+ },
493
+ darkTheme: {
494
+ default: !1,
495
+ parseHTML: (e) => e.getAttribute("data-dark-theme") === "true",
496
+ renderHTML: (e) => ({ "data-dark-theme": e.darkTheme ? "true" : "false" })
497
+ },
498
+ fixedHeight: {
499
+ default: !1,
500
+ parseHTML: (e) => e.getAttribute("data-fixed-height") === "true",
501
+ renderHTML: (e) => ({ "data-fixed-height": e.fixedHeight ? "true" : "false" })
502
+ }
503
+ };
504
+ } }), Ie = {
505
+ default: null,
506
+ parseHTML: (e) => e.getAttribute("data-cell-background") || e.style.backgroundColor || null,
507
+ renderHTML: (e) => e.backgroundColor ? {
508
+ "data-cell-background": e.backgroundColor,
509
+ style: `background-color: ${e.backgroundColor};`
510
+ } : {}
511
+ }, Le = oe.extend({ addAttributes() {
512
+ return {
513
+ ...this.parent?.(),
514
+ backgroundColor: Ie
515
+ };
516
+ } }), Re = se.extend({ addAttributes() {
517
+ return {
518
+ ...this.parent?.(),
519
+ backgroundColor: Ie
520
+ };
521
+ } });
522
+ //#endregion
523
+ //#region src/utils/table-theme.ts
524
+ function ze(e) {
525
+ if (!e || typeof e != "object") return null;
526
+ let t = e;
527
+ return [
528
+ t.header,
529
+ t.odd,
530
+ t.even
531
+ ].every((e) => typeof e == "string" && /^#[\da-f]{6}$/i.test(e)) ? {
532
+ header: t.header.toLowerCase(),
533
+ odd: t.odd.toLowerCase(),
534
+ even: t.even.toLowerCase()
535
+ } : null;
536
+ }
537
+ function Be(e) {
538
+ let t = [
539
+ 1,
540
+ 3,
541
+ 5
542
+ ].map((t) => {
543
+ let n = Number.parseInt(e.slice(t, t + 2), 16) / 255;
544
+ return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
545
+ });
546
+ return t[0] * .2126 + t[1] * .7152 + t[2] * .0722 > .179 ? "#16213a" : "#ffffff";
547
+ }
548
+ function Ve(e) {
549
+ let t = ze(e);
550
+ return t ? {
551
+ "data-table-theme": "true",
552
+ "data-table-theme-header": t.header,
553
+ "data-table-theme-odd": t.odd,
554
+ "data-table-theme-even": t.even,
555
+ style: `--norio-office-rich-table-header:${t.header};--norio-office-rich-table-header-text:${Be(t.header)};--norio-office-rich-table-odd:${t.odd};--norio-office-rich-table-even:${t.even};`
556
+ } : {};
557
+ }
558
+ //#endregion
559
+ //#region src/document/nodes/themed-table.ts
560
+ var He = ce.extend({ addAttributes() {
561
+ return {
562
+ ...this.parent?.(),
563
+ tableTheme: {
564
+ default: null,
565
+ parseHTML: (e) => ze({
566
+ header: e.getAttribute("data-table-theme-header"),
567
+ odd: e.getAttribute("data-table-theme-odd"),
568
+ even: e.getAttribute("data-table-theme-even")
569
+ }),
570
+ renderHTML: (e) => Ve(e.tableTheme)
571
+ }
572
+ };
573
+ } }), Ue = E.create({
574
+ name: "videoBlock",
575
+ group: "block",
576
+ atom: !0,
577
+ selectable: !0,
578
+ draggable: !0,
579
+ addOptions() {
580
+ return {
581
+ uploadVideo: null,
582
+ onUploadError: null
583
+ };
584
+ },
585
+ addAttributes() {
586
+ return {
587
+ assetId: {
588
+ default: "",
589
+ parseHTML: (e) => e.getAttribute("data-asset-id") || "",
590
+ renderHTML: (e) => ({ "data-asset-id": String(e.assetId ?? "") })
591
+ },
592
+ src: {
593
+ default: "",
594
+ parseHTML: (e) => e.getAttribute("data-src") || "",
595
+ renderHTML: (e) => ({ "data-src": String(e.src ?? "") })
596
+ },
597
+ name: {
598
+ default: "",
599
+ parseHTML: (e) => e.getAttribute("data-name") || "",
600
+ renderHTML: (e) => ({ "data-name": String(e.name ?? "") })
601
+ },
602
+ description: {
603
+ default: "",
604
+ parseHTML: (e) => e.getAttribute("data-description") || "",
605
+ renderHTML: (e) => ({ "data-description": String(e.description ?? "") })
606
+ },
607
+ mimeType: {
608
+ default: "video/mp4",
609
+ parseHTML: (e) => e.getAttribute("data-mime-type") || "video/mp4",
610
+ renderHTML: (e) => ({ "data-mime-type": String(e.mimeType ?? "video/mp4") })
611
+ },
612
+ align: {
613
+ default: "left",
614
+ parseHTML: (e) => e.getAttribute("data-align") || "left",
615
+ renderHTML: (e) => ({ "data-align": String(e.align ?? "left") })
616
+ },
617
+ widthPercent: {
618
+ default: 100,
619
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-width-percent") ?? "100", 10) || 100,
620
+ renderHTML: (e) => ({ "data-width-percent": String(e.widthPercent ?? 100) })
621
+ },
622
+ height: {
623
+ default: 220,
624
+ parseHTML: (e) => Number.parseInt(e.getAttribute("data-height") ?? "220", 10) || 220,
625
+ renderHTML: (e) => ({ "data-height": String(e.height ?? 220) })
626
+ }
627
+ };
628
+ },
629
+ parseHTML() {
630
+ return [{ tag: "div[data-type=\"video-block\"]" }];
631
+ },
632
+ renderHTML({ HTMLAttributes: e }) {
633
+ return ["div", {
634
+ ...e,
635
+ "data-type": "video-block"
636
+ }];
637
+ }
638
+ });
639
+ //#endregion
640
+ //#region src/extensions/columns-column.ts
641
+ function We(e) {
642
+ return e.textContent.trim().length === 0;
643
+ }
644
+ var Ge = E.create({
645
+ name: "columnsColumn",
646
+ content: "block+",
647
+ defining: !0,
648
+ isolating: !0,
649
+ parseHTML() {
650
+ return [{ tag: "div[data-type=\"columns-column\"]" }];
651
+ },
652
+ renderHTML({ HTMLAttributes: e }) {
653
+ return [
654
+ "div",
655
+ D(e, {
656
+ "data-type": "columns-column",
657
+ class: "norio-office-rich-columns__column"
658
+ }),
659
+ 0
660
+ ];
661
+ },
662
+ addKeyboardShortcuts() {
663
+ return { Backspace: () => {
664
+ let { state: e, view: t } = this.editor, { selection: n, schema: r } = e;
665
+ if (!n.empty || n.$from.parentOffset !== 0) return !1;
666
+ let i = -1, a = -1;
667
+ for (let e = n.$from.depth; e > 0; --e) {
668
+ let t = n.$from.node(e).type.name;
669
+ if (t === "columnsColumn" && a < 0 && (a = e), t === "columnsBlock") {
670
+ i = e;
671
+ break;
672
+ }
673
+ }
674
+ if (i < 0 || a < 0) return !1;
675
+ let o = n.$from.node(i), c = n.$from.node(a);
676
+ if (!We(c)) return !1;
677
+ let l = n.$from.before(i), u = n.$from.before(a), d = n.$from.index(i), f = e.tr;
678
+ if (o.childCount <= 1) {
679
+ let e = r.nodes.paragraph?.create();
680
+ return e ? (f.replaceWith(l, l + o.nodeSize, e), f.setSelection(s.near(f.doc.resolve(Math.min(l + 1, f.doc.content.size)), 1)), t.dispatch(f.scrollIntoView()), !0) : !1;
681
+ }
682
+ f.delete(u, u + c.nodeSize), f.setNodeMarkup(l, void 0, {
683
+ ...o.attrs,
684
+ widths: z(o.childCount - 1)
685
+ });
686
+ let p = f.doc.nodeAt(l);
687
+ if (p) {
688
+ let e = Math.max(0, d - 1), t = l + 1;
689
+ for (let n = 0; n < e; n += 1) t += p.child(n).nodeSize;
690
+ f.setSelection(s.near(f.doc.resolve(Math.min(t + 1, f.doc.content.size)), 1));
691
+ }
692
+ return t.dispatch(f.scrollIntoView()), !0;
693
+ } };
694
+ }
695
+ }), Ke = T.create({
696
+ name: "commentMark",
697
+ inclusive: !1,
698
+ addAttributes() {
699
+ return { threadId: {
700
+ default: "",
701
+ parseHTML: (e) => e.getAttribute("data-comment-thread-id") || "",
702
+ renderHTML: (e) => ({ "data-comment-thread-id": String(e.threadId ?? "") })
703
+ } };
704
+ },
705
+ parseHTML() {
706
+ return [{ tag: "span[data-comment-thread-id]" }];
707
+ },
708
+ renderHTML({ HTMLAttributes: e }) {
709
+ return [
710
+ "span",
711
+ {
712
+ ...e,
713
+ class: "norio-office-rich-comment-mark"
714
+ },
715
+ 0
716
+ ];
717
+ }
718
+ });
719
+ //#endregion
720
+ //#region src/extensions/indent.ts
721
+ function qe(e, t, n) {
722
+ return Math.max(t, Math.min(n, e));
723
+ }
724
+ var Je = w.create({
725
+ name: "indent",
726
+ addOptions() {
727
+ return {
728
+ types: ["paragraph", "heading"],
729
+ minLevel: 0,
730
+ maxLevel: 8,
731
+ stepEm: 2
732
+ };
733
+ },
734
+ addGlobalAttributes() {
735
+ return [{
736
+ types: this.options.types,
737
+ attributes: { indent: {
738
+ default: 0,
739
+ parseHTML: (e) => {
740
+ let t = e.getAttribute("data-indent"), n = Number.parseInt(t ?? "0", 10);
741
+ return Number.isNaN(n) ? this.options.minLevel : qe(n, this.options.minLevel, this.options.maxLevel);
742
+ },
743
+ renderHTML: (e) => {
744
+ let t = Number(e.indent ?? 0);
745
+ return t ? {
746
+ "data-indent": String(t),
747
+ style: `margin-left: ${t * this.options.stepEm}em;`
748
+ } : {};
749
+ }
750
+ } }
751
+ }];
752
+ },
753
+ addCommands() {
754
+ let e = (e) => ({ state: t, dispatch: n }) => {
755
+ let r = t.tr, i = !1, a = /* @__PURE__ */ new Set();
756
+ for (let { $from: n, $to: o } of t.selection.ranges) t.doc.nodesBetween(n.pos, o.pos, (t, n) => {
757
+ if (!this.options.types.includes(t.type.name) || a.has(n)) return;
758
+ a.add(n);
759
+ let o = Number(t.attrs.indent ?? 0), s = qe(o + e, this.options.minLevel, this.options.maxLevel);
760
+ s !== o && (r.setNodeMarkup(n, void 0, {
761
+ ...t.attrs,
762
+ indent: s
763
+ }), i = !0);
764
+ });
765
+ return i ? (n && n(r), !0) : !1;
766
+ };
767
+ return {
768
+ increaseIndent: () => e(1),
769
+ decreaseIndent: () => e(-1)
770
+ };
771
+ }
772
+ }), Ye = w.create({
773
+ name: "quoteStyle",
774
+ addOptions() {
775
+ return {
776
+ defaultBorderColor: "#c084fc",
777
+ defaultBackgroundColor: "#fcf5ff"
778
+ };
779
+ },
780
+ addGlobalAttributes() {
781
+ return [{
782
+ types: ["blockquote"],
783
+ attributes: {
784
+ quoteBorderColor: {
785
+ default: this.options.defaultBorderColor,
786
+ parseHTML: (e) => e.getAttribute("data-quote-border-color") || this.options.defaultBorderColor,
787
+ renderHTML: (e) => {
788
+ let t = e.quoteBorderColor || this.options.defaultBorderColor, n = e.quoteBackgroundColor || this.options.defaultBackgroundColor;
789
+ return {
790
+ "data-quote-border-color": t,
791
+ "data-quote-background-color": n,
792
+ style: `--norio-office-rich-quote-border-color:${t};--norio-office-rich-quote-background-color:${n};`
793
+ };
794
+ }
795
+ },
796
+ quoteBackgroundColor: {
797
+ default: this.options.defaultBackgroundColor,
798
+ parseHTML: (e) => e.getAttribute("data-quote-background-color") || this.options.defaultBackgroundColor
799
+ }
800
+ }
801
+ }];
802
+ },
803
+ addCommands() {
804
+ return {
805
+ setQuoteStyle: (e) => ({ commands: t }) => t.updateAttributes("blockquote", {
806
+ quoteBorderColor: e.quoteBorderColor ?? this.options.defaultBorderColor,
807
+ quoteBackgroundColor: e.quoteBackgroundColor ?? this.options.defaultBackgroundColor
808
+ }),
809
+ resetQuoteStyle: () => ({ commands: e }) => e.updateAttributes("blockquote", {
810
+ quoteBorderColor: this.options.defaultBorderColor,
811
+ quoteBackgroundColor: this.options.defaultBackgroundColor
812
+ })
813
+ };
814
+ }
815
+ }), Xe = [
816
+ {
817
+ value: "solid",
818
+ label: "实线"
819
+ },
820
+ {
821
+ value: "dashed",
822
+ label: "虚线"
823
+ },
824
+ {
825
+ value: "dotted",
826
+ label: "点状线"
827
+ }
828
+ ];
829
+ function Ze(e) {
830
+ return Xe.find((t) => t.value === e)?.value ?? "solid";
831
+ }
832
+ function Qe(e) {
833
+ return typeof e == "string" && /^#[\da-f]{6}$/i.test(e) ? e.toLowerCase() : null;
834
+ }
835
+ //#endregion
836
+ //#region src/extensions/styled-horizontal-rule.ts
837
+ var $e = R.extend({ addAttributes() {
838
+ return {
839
+ ...this.parent?.(),
840
+ lineStyle: {
841
+ default: "solid",
842
+ parseHTML: (e) => Ze(e.getAttribute("data-line-style") || e.style.borderTopStyle),
843
+ renderHTML: (e) => {
844
+ let t = Ze(e.lineStyle);
845
+ return {
846
+ "data-line-style": t,
847
+ style: `border-top-style: ${t}; border-top-width: ${t === "solid" ? 1 : 2}px;`
848
+ };
849
+ }
850
+ },
851
+ lineColor: {
852
+ default: null,
853
+ parseHTML: (e) => Qe(e.getAttribute("data-line-color")),
854
+ renderHTML: (e) => {
855
+ let t = Qe(e.lineColor);
856
+ return t ? {
857
+ "data-line-color": t,
858
+ style: `border-top-color: ${t};`
859
+ } : {};
860
+ }
861
+ }
862
+ };
863
+ } }), et = w.create({
864
+ name: "textAlign",
865
+ addOptions() {
866
+ return {
867
+ types: ["paragraph", "heading"],
868
+ alignments: [
869
+ "left",
870
+ "center",
871
+ "right"
872
+ ]
873
+ };
874
+ },
875
+ addGlobalAttributes() {
876
+ return [{
877
+ types: this.options.types,
878
+ attributes: { textAlign: {
879
+ default: null,
880
+ parseHTML: (e) => {
881
+ let t = e.style.textAlign || e.getAttribute("data-text-align");
882
+ return this.options.alignments.includes(t) ? t : null;
883
+ },
884
+ renderHTML: (e) => !e.textAlign || e.textAlign === "left" ? {} : {
885
+ "data-text-align": e.textAlign,
886
+ style: `text-align: ${e.textAlign};`
887
+ }
888
+ } }
889
+ }];
890
+ },
891
+ addCommands() {
892
+ let e = (e) => ({ state: t, dispatch: n }) => {
893
+ let { selection: r, doc: i } = t, a = t.tr, o = !1;
894
+ for (let { $from: t, $to: n } of r.ranges) i.nodesBetween(t.pos, n.pos, (t, n) => {
895
+ if (!this.options.types.includes(t.type.name)) return;
896
+ let r = e === "left" ? null : e;
897
+ return t.attrs.textAlign === r || (a = a.setNodeMarkup(n, void 0, {
898
+ ...t.attrs,
899
+ textAlign: r
900
+ }), o = !0), !1;
901
+ });
902
+ if (!o) {
903
+ let { $from: t } = r;
904
+ for (let n = t.depth; n > 0; --n) {
905
+ let r = t.node(n);
906
+ if (this.options.types.includes(r.type.name)) {
907
+ a = a.setNodeMarkup(t.before(n), void 0, {
908
+ ...r.attrs,
909
+ textAlign: e === "left" ? null : e
910
+ }), o = !0;
911
+ break;
912
+ }
913
+ }
914
+ }
915
+ return o ? (n && n(a), !0) : !1;
916
+ };
917
+ return {
918
+ setTextAlign: (t) => (n) => e(t)(n),
919
+ unsetTextAlign: () => (t) => e(null)(t)
920
+ };
921
+ }
922
+ });
923
+ //#endregion
924
+ //#region src/document/schema.ts
925
+ function tt() {
926
+ return [
927
+ I.configure({
928
+ codeBlock: !1,
929
+ horizontalRule: !1,
930
+ underline: !1
931
+ }),
932
+ ve,
933
+ He,
934
+ N,
935
+ Re,
936
+ Le,
937
+ $e,
938
+ Ke,
939
+ Je,
940
+ Se,
941
+ Ge,
942
+ Ce,
943
+ we,
944
+ Ae,
945
+ je,
946
+ Me,
947
+ Ne,
948
+ Ue,
949
+ Fe,
950
+ ke,
951
+ F,
952
+ A,
953
+ k,
954
+ te,
955
+ O,
956
+ M,
957
+ j,
958
+ P,
959
+ ne.configure({ nested: !1 }),
960
+ re,
961
+ Ye,
962
+ et
963
+ ];
964
+ }
965
+ var nt;
966
+ function B() {
967
+ return nt ??= ee(tt()), nt;
968
+ }
969
+ //#endregion
970
+ //#region src/ai-protocol/validation.ts
971
+ function rt(e) {
972
+ return typeof e == "object" && !!e && !Array.isArray(e);
973
+ }
974
+ function V(e, t, n, r) {
975
+ e.push({
976
+ path: t,
977
+ code: n,
978
+ message: r
979
+ });
980
+ }
981
+ function it(e) {
982
+ if (e.length > 80 || /[;{}<>\\]/.test(e)) return !1;
983
+ if (/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e) || /^[a-z]+$/i.test(e)) return !0;
984
+ let t = /^(rgba?)\((.*)\)$/i.exec(e);
985
+ if (!t) return !1;
986
+ let n = t[2].trim(), r = n.includes(",") ? n.split(",").map((e) => e.trim()) : null, i = r ? null : n.replace(/\s*\/\s*/, " / ").split(/\s+/), a = r ?? i ?? [], o, s;
987
+ if (a.includes("/")) {
988
+ if (a.indexOf("/") !== 3 || a.length !== 5) return !1;
989
+ o = a.slice(0, 3), s = a[4];
990
+ } else if (o = a.slice(0, 3), s = a[3], a.length !== (s === void 0 ? 3 : 4) || s !== void 0 && (!r || t[1].toLowerCase() !== "rgba")) return !1;
991
+ if (t[1].toLowerCase() === "rgba" && s === void 0) return !1;
992
+ let c = (e, t) => {
993
+ if (!/^(?:\d+(?:\.\d*)?|\.\d+)%?$/.test(e)) return !1;
994
+ let n = e.endsWith("%"), r = Number.parseFloat(e);
995
+ return Number.isFinite(r) && r >= 0 && r <= (n ? 100 : t);
996
+ };
997
+ return o.length === 3 && o.every((e) => c(e, 255)) && (s === void 0 || c(s, 1));
998
+ }
999
+ function at(e, t, n) {
1000
+ if (t === "aiId") return n === null || typeof n == "string" && !!n.trim();
1001
+ let r = B(), i = r.nodes[e]?.spec.attrs?.[t] ?? r.marks[e]?.spec.attrs?.[t];
1002
+ if (n === null) return i?.default === null;
1003
+ if (t === "images" && e === "imageBlock") {
1004
+ let e = /* @__PURE__ */ new Set([
1005
+ "id",
1006
+ "assetId",
1007
+ "src",
1008
+ "alt",
1009
+ "name",
1010
+ "description",
1011
+ "descriptionVisible",
1012
+ "link",
1013
+ "linkTarget",
1014
+ "rotation"
1015
+ ]);
1016
+ return Array.isArray(n) && n.length <= 4 && n.every((t) => !rt(t) || Object.keys(t).some((t) => !e.has(t)) ? !1 : Object.entries(t).every(([e, t]) => e === "descriptionVisible" ? typeof t == "boolean" : e === "rotation" ? typeof t == "number" && Number.isFinite(t) : e === "linkTarget" ? t === "_blank" || t === "_self" : e === "src" || e === "link" ? at("link", "href", t) : typeof t == "string" && (e !== "id" && e !== "assetId" || !!t.trim())));
1017
+ }
1018
+ if (t === "indent") return Number.isInteger(n) && n >= 0 && n <= 8;
1019
+ if (t === "level") return Number.isInteger(n) && n >= 1 && n <= 6;
1020
+ if (t === "textAlign" || t === "align") return [
1021
+ "left",
1022
+ "center",
1023
+ "right"
1024
+ ].includes(String(n));
1025
+ if (t === "colwidth") return Array.isArray(n) && n.length > 0 && n.every((e) => Number.isSafeInteger(e) && e > 0);
1026
+ if (t === "type" && e === "orderedList") return [
1027
+ "1",
1028
+ "a",
1029
+ "A",
1030
+ "i",
1031
+ "I"
1032
+ ].includes(String(n));
1033
+ if (t === "displayMode" && e === "linkBlock") return [
1034
+ "text",
1035
+ "card",
1036
+ "preview"
1037
+ ].includes(String(n));
1038
+ if (t === "lineStyle" && e === "horizontalRule") return [
1039
+ "solid",
1040
+ "dashed",
1041
+ "dotted"
1042
+ ].includes(String(n));
1043
+ if (t === "widthPercent") return typeof n == "number" && Number.isFinite(n) && n > 0 && n <= 100;
1044
+ if (t === "height" || t === "size" || t === "targetTimestamp") return Number.isSafeInteger(n) && n >= 0;
1045
+ if (t === "mode" && e === "countdownBlock") return ["duration", "deadline"].includes(String(n));
1046
+ if (t === "tableTheme") return rt(n) && Object.keys(n).length === 3 && ze(n) !== null;
1047
+ if (t === "widths") return Array.isArray(n) && n.every((e) => typeof e == "number" && Number.isFinite(e) && e > 0);
1048
+ if (t === "colspan" || t === "rowspan" || t === "start") return Number.isSafeInteger(n) && n >= 1;
1049
+ if (t === "fontSize") return typeof n == "string" && /^\d{1,3}px$/.test(n) && Number.parseInt(n, 10) > 0;
1050
+ if (t === "fontFamily") return typeof n == "string" && n.length <= 120 && !/[;{}<>\\]/.test(n);
1051
+ if (/color$/i.test(t) || t === "backgroundColor") return typeof n == "string" && it(n);
1052
+ if (t === "href" || t === "url" || t === "src") return typeof n == "string" && !/^\s*(?:javascript|vbscript):/i.test(n) && !/[<>]/.test(n);
1053
+ let a = i?.default;
1054
+ return a === null ? typeof n == "string" : Array.isArray(a) ? Array.isArray(n) : a !== void 0 && typeof n == typeof a && (typeof n != "number" || Number.isFinite(n));
1055
+ }
1056
+ function ot(e, t, n, r, i) {
1057
+ if (e !== void 0) {
1058
+ if (!rt(e)) V(i, r, "INVALID_ATTRIBUTES", "Attributes must be an object.");
1059
+ else for (let [a, o] of Object.entries(e)) {
1060
+ let e = t?.[a], s = `${r}.${a}`;
1061
+ if (!e) {
1062
+ V(i, s, "UNKNOWN_ATTRIBUTE", `Unknown attribute: ${a}.`);
1063
+ continue;
1064
+ }
1065
+ let c = e.default;
1066
+ at(n, a, o) ? c != null && o !== null && (Array.isArray(c) ? !Array.isArray(o) : typeof o != typeof c) && V(i, s, "INVALID_ATTRIBUTE_VALUE", `Invalid value for ${a}.`) : V(i, s, "INVALID_ATTRIBUTE_VALUE", `Invalid value for ${a}.`);
1067
+ }
1068
+ }
1069
+ }
1070
+ function st(e, t, n, r) {
1071
+ if (!rt(e) || typeof e.type != "string") {
1072
+ V(r, n, "INVALID_MARK", "Mark must have a type.");
1073
+ return;
1074
+ }
1075
+ let i = t.marks[e.type];
1076
+ if (!i) V(r, `${n}.type`, "UNKNOWN_MARK", `Unknown mark: ${e.type}.`);
1077
+ else {
1078
+ for (let t of Object.keys(e)) t !== "type" && t !== "attrs" && V(r, `${n}.${t}`, "UNKNOWN_FIELD", `Unknown mark field: ${t}.`);
1079
+ ot(e.attrs, i.spec.attrs, e.type, `${n}.attrs`, r);
1080
+ }
1081
+ }
1082
+ function ct(e, t = "$") {
1083
+ let n = [];
1084
+ if (lt(e, B(), t, n), n.length) return n;
1085
+ try {
1086
+ B().nodeFromJSON(e).check();
1087
+ } catch (e) {
1088
+ V(n, t, "INVALID_NODE", e instanceof Error ? e.message : "Invalid node structure.");
1089
+ }
1090
+ return n;
1091
+ }
1092
+ function lt(e, t, n, r) {
1093
+ if (!rt(e) || typeof e.type != "string") {
1094
+ V(r, n, "INVALID_NODE", "Node must have a type.");
1095
+ return;
1096
+ }
1097
+ let i = t.nodes[e.type];
1098
+ if (!i) V(r, `${n}.type`, "UNKNOWN_NODE", `Unknown node: ${e.type}.`);
1099
+ else {
1100
+ for (let t of Object.keys(e)) t !== "type" && t !== "attrs" && t !== "content" && t !== "text" && t !== "marks" && V(r, `${n}.${t}`, "UNKNOWN_FIELD", `Unknown node field: ${t}.`);
1101
+ if (ot(e.attrs, i.spec.attrs, e.type, `${n}.attrs`, r), e.type === "text" ? (typeof e.text != "string" || !e.text.length) && V(r, `${n}.text`, "INVALID_TEXT", "Text must be a nonempty string.") : e.text !== void 0 && V(r, `${n}.text`, "INVALID_TEXT", "Only text nodes may contain text."), e.content !== void 0 && (i.isLeaf ? V(r, `${n}.content`, "INVALID_CONTENT", "Leaf nodes cannot contain child nodes.") : Array.isArray(e.content) ? e.content.forEach((e, i) => lt(e, t, `${n}.content[${i}]`, r)) : V(r, `${n}.content`, "INVALID_CONTENT", "Content must be an array.")), e.marks !== void 0 && (i.isInline ? Array.isArray(e.marks) ? e.marks.forEach((e, i) => st(e, t, `${n}.marks[${i}]`, r)) : V(r, `${n}.marks`, "INVALID_MARKS", "Marks must be an array.") : V(r, `${n}.marks`, "INVALID_MARKS", "Only inline nodes can have marks.")), e.type === "columnsBlock" && Array.isArray(e.content) && rt(e.attrs)) {
1102
+ let t = e.attrs.widths;
1103
+ t !== void 0 && (!Array.isArray(t) || t.length !== e.content.length || t.some((e) => typeof e != "number" || !Number.isFinite(e) || e <= 0)) && V(r, `${n}.attrs.widths`, "INVALID_COLUMNS_WIDTHS", "Column widths must match the number of columns and be positive numbers.");
1104
+ }
1105
+ }
1106
+ }
1107
+ function ut(e) {
1108
+ let t = [], n = B();
1109
+ if (lt(e, n, "$", t), rt(e) && e.type !== "doc" && V(t, "$.type", "INVALID_ROOT", "Document root must be doc."), t.length) return {
1110
+ valid: !1,
1111
+ errors: t,
1112
+ schemaVersion: "1"
1113
+ };
1114
+ try {
1115
+ let r = n.nodeFromJSON(e);
1116
+ r.check();
1117
+ let i = /* @__PURE__ */ new Set();
1118
+ return r.descendants((e, n) => {
1119
+ let r = e.attrs.aiId;
1120
+ r != null && (typeof r != "string" || !r.trim() || i.has(r) ? V(t, `$.pos[${n}].attrs.aiId`, "INVALID_AI_ID", "Block aiId must be unique and nonempty.") : i.add(r));
1121
+ }), t.length ? {
1122
+ valid: !1,
1123
+ errors: t,
1124
+ schemaVersion: "1"
1125
+ } : {
1126
+ valid: !0,
1127
+ document: r.toJSON(),
1128
+ schemaVersion: "1",
1129
+ errors: []
1130
+ };
1131
+ } catch (e) {
1132
+ return V(t, "$", "INVALID_DOCUMENT", e instanceof Error ? e.message : "Invalid document structure."), {
1133
+ valid: !1,
1134
+ errors: t,
1135
+ schemaVersion: "1"
1136
+ };
1137
+ }
1138
+ }
1139
+ function dt(e, t = "legacy-json") {
1140
+ if (t !== "legacy-json" && t !== "1") return {
1141
+ valid: !1,
1142
+ schemaVersion: "1",
1143
+ errors: [{
1144
+ path: "$",
1145
+ code: "SCHEMA_VERSION_UNSUPPORTED",
1146
+ message: `Unsupported document schema version: ${t}.`
1147
+ }]
1148
+ };
1149
+ let n = ut(e);
1150
+ return !n.valid && !n.errors.every((e) => e.code === "INVALID_AI_ID") ? n : ut(ye(n.valid ? n.document : e));
1151
+ }
1152
+ //#endregion
1153
+ //#region src/ai-protocol/patch.ts
1154
+ var ft = {
1155
+ insertContent: [
1156
+ "type",
1157
+ "targetRef",
1158
+ "position",
1159
+ "content"
1160
+ ],
1161
+ replaceText: [
1162
+ "type",
1163
+ "targetRef",
1164
+ "text"
1165
+ ],
1166
+ replaceFragment: [
1167
+ "type",
1168
+ "targetRef",
1169
+ "content"
1170
+ ],
1171
+ setMarks: [
1172
+ "type",
1173
+ "targetRef",
1174
+ "marks"
1175
+ ],
1176
+ unsetMarks: [
1177
+ "type",
1178
+ "targetRef",
1179
+ "markTypes"
1180
+ ],
1181
+ setNodeAttributes: [
1182
+ "type",
1183
+ "targetRef",
1184
+ "nodeType",
1185
+ "attrs"
1186
+ ],
1187
+ unsetNodeAttributes: [
1188
+ "type",
1189
+ "targetRef",
1190
+ "nodeType",
1191
+ "attributes"
1192
+ ],
1193
+ deleteContent: ["type", "targetRef"],
1194
+ moveBlocks: [
1195
+ "type",
1196
+ "targetRef",
1197
+ "destinationRef",
1198
+ "position"
1199
+ ],
1200
+ transformBlocks: [
1201
+ "type",
1202
+ "targetRef",
1203
+ "nodeType",
1204
+ "attrs"
1205
+ ],
1206
+ tableOperation: [
1207
+ "type",
1208
+ "targetRef",
1209
+ "action",
1210
+ "content",
1211
+ "value"
1212
+ ]
1213
+ }, pt = /* @__PURE__ */ new Set([
1214
+ "insertRowBefore",
1215
+ "insertRowAfter",
1216
+ "deleteRow",
1217
+ "insertColumnBefore",
1218
+ "insertColumnAfter",
1219
+ "deleteColumn",
1220
+ "mergeCells",
1221
+ "splitCell",
1222
+ "setCellContent",
1223
+ "setCellBackground",
1224
+ "setTableTheme"
1225
+ ]);
1226
+ function mt(e) {
1227
+ return typeof e == "object" && !!e && !Array.isArray(e);
1228
+ }
1229
+ function H(e, t, n, r) {
1230
+ e.push({
1231
+ path: t,
1232
+ code: n,
1233
+ message: r
1234
+ });
1235
+ }
1236
+ function ht(e, t, n, r, i) {
1237
+ if (!mt(e)) H(i, r, "INVALID_ATTRIBUTES", "Attributes must be an object.");
1238
+ else for (let a of Object.keys(e)) t?.[a] ? at(n, a, e[a]) || H(i, `${r}.${a}`, "INVALID_ATTRIBUTE_VALUE", `Invalid value for ${a}.`) : H(i, `${r}.${a}`, "UNKNOWN_ATTRIBUTE", `Unknown attribute: ${a}.`);
1239
+ }
1240
+ function gt(e, t, n) {
1241
+ if (!Array.isArray(e) || !e.length) {
1242
+ H(n, t, "INVALID_FRAGMENT", "Fragment must contain at least one node.");
1243
+ return;
1244
+ }
1245
+ let r = B();
1246
+ function i(e, t) {
1247
+ mt(e.attrs) && Object.prototype.hasOwnProperty.call(e.attrs, "aiId") && H(n, `${t}.attrs.aiId`, "OUT_OF_SCOPE", "AI cannot supply node identity."), Array.isArray(e.content) && e.content.forEach((e, n) => {
1248
+ mt(e) && i(e, `${t}.content[${n}]`);
1249
+ });
1250
+ }
1251
+ for (let [a, o] of e.entries()) !mt(o) || typeof o.type != "string" || !r.nodes[o.type] ? H(n, `${t}[${a}]`, "UNKNOWN_NODE", "Fragment contains an unknown node.") : (i(o, `${t}[${a}]`), n.push(...ct(o, `${t}[${a}]`)));
1252
+ }
1253
+ function _t(e) {
1254
+ let t = [];
1255
+ if (!mt(e)) return {
1256
+ valid: !1,
1257
+ errors: [{
1258
+ path: "$",
1259
+ code: "INVALID_PATCH",
1260
+ message: "Patch must be an object."
1261
+ }]
1262
+ };
1263
+ let n = /* @__PURE__ */ new Set([
1264
+ "protocolVersion",
1265
+ "documentId",
1266
+ "requestId",
1267
+ "contextId",
1268
+ "baseRevision",
1269
+ "operations"
1270
+ ]);
1271
+ for (let r of Object.keys(e)) n.has(r) || H(t, `$.${r}`, "UNKNOWN_FIELD", `Unknown patch field: ${r}.`);
1272
+ e.protocolVersion !== 1 && H(t, "$.protocolVersion", "SCHEMA_VERSION_UNSUPPORTED", "Only protocol version 1 is supported.");
1273
+ for (let n of [
1274
+ "documentId",
1275
+ "requestId",
1276
+ "contextId"
1277
+ ]) (typeof e[n] != "string" || !e[n].trim()) && H(t, `$.${n}`, "INVALID_FIELD", `${n} must be nonempty.`);
1278
+ if ((!Number.isSafeInteger(e.baseRevision) || e.baseRevision < 0) && H(t, "$.baseRevision", "INVALID_REVISION", "baseRevision must be a nonnegative integer."), !Array.isArray(e.operations) || !e.operations.length || e.operations.length > 500) H(t, "$.operations", "INVALID_OPERATIONS", "Patch must contain 1 to 500 operations.");
1279
+ else {
1280
+ let n = B();
1281
+ e.operations.forEach((e, r) => {
1282
+ let i = `$.operations[${r}]`;
1283
+ if (!mt(e) || typeof e.type != "string" || !(e.type in ft)) {
1284
+ H(t, i, "UNKNOWN_OPERATION", "Unknown patch operation.");
1285
+ return;
1286
+ }
1287
+ let a = e.type;
1288
+ for (let n of Object.keys(e)) ft[a].includes(n) || H(t, `${i}.${n}`, "UNKNOWN_FIELD", `Unknown operation field: ${n}.`);
1289
+ switch ((typeof e.targetRef != "string" || !e.targetRef) && H(t, `${i}.targetRef`, "INVALID_TARGET", "Missing targetRef."), a) {
1290
+ case "insertContent":
1291
+ [
1292
+ "at",
1293
+ "before",
1294
+ "after"
1295
+ ].includes(String(e.position)) || H(t, `${i}.position`, "INVALID_POSITION", "Invalid insertion position."), gt(e.content, `${i}.content`, t);
1296
+ break;
1297
+ case "replaceText":
1298
+ typeof e.text != "string" && H(t, `${i}.text`, "INVALID_TEXT", "Replacement must be text.");
1299
+ break;
1300
+ case "replaceFragment":
1301
+ gt(e.content, `${i}.content`, t);
1302
+ break;
1303
+ case "setMarks":
1304
+ !Array.isArray(e.marks) || !e.marks.length ? H(t, `${i}.marks`, "INVALID_MARKS", "Marks are required.") : e.marks.forEach((e, r) => {
1305
+ let a = `${i}.marks[${r}]`;
1306
+ if (!mt(e) || typeof e.type != "string" || !n.marks[e.type]) H(t, a, "UNKNOWN_MARK", "Unknown mark.");
1307
+ else {
1308
+ for (let n of Object.keys(e)) n !== "type" && n !== "attrs" && H(t, `${a}.${n}`, "UNKNOWN_FIELD", `Unknown mark field: ${n}.`);
1309
+ e.attrs !== void 0 && ht(e.attrs, n.marks[e.type].spec.attrs, e.type, `${a}.attrs`, t);
1310
+ }
1311
+ });
1312
+ break;
1313
+ case "unsetMarks":
1314
+ (!Array.isArray(e.markTypes) || !e.markTypes.length || e.markTypes.some((e) => typeof e != "string" || !n.marks[e])) && H(t, `${i}.markTypes`, "UNKNOWN_MARK", "Unknown or missing mark type.");
1315
+ break;
1316
+ case "setNodeAttributes":
1317
+ case "unsetNodeAttributes":
1318
+ case "transformBlocks": {
1319
+ let r = typeof e.nodeType == "string" ? n.nodes[e.nodeType] : void 0;
1320
+ r || H(t, `${i}.nodeType`, "UNKNOWN_NODE", "Unknown node type."), a === "unsetNodeAttributes" ? ((!Array.isArray(e.attributes) || !e.attributes.length || e.attributes.some((e) => typeof e != "string" || !r?.spec.attrs?.[e])) && H(t, `${i}.attributes`, "UNKNOWN_ATTRIBUTE", "Unknown or missing attribute name."), Array.isArray(e.attributes) && e.attributes.includes("aiId") && H(t, `${i}.attributes`, "OUT_OF_SCOPE", "AI cannot remove node identity.")) : (e.attrs !== void 0 || a === "setNodeAttributes") && (ht(e.attrs, r?.spec.attrs, String(e.nodeType), `${i}.attrs`, t), mt(e.attrs) && Object.prototype.hasOwnProperty.call(e.attrs, "aiId") && H(t, `${i}.attrs.aiId`, "OUT_OF_SCOPE", "AI cannot set node identity."));
1321
+ break;
1322
+ }
1323
+ case "moveBlocks":
1324
+ (typeof e.destinationRef != "string" || !e.destinationRef || !["before", "after"].includes(String(e.position))) && H(t, i, "INVALID_MOVE", "Move requires a destination and position.");
1325
+ break;
1326
+ case "tableOperation": pt.has(String(e.action)) || H(t, `${i}.action`, "UNKNOWN_OPERATION", "Unknown table action."), e.action === "setCellContent" ? gt(e.content, `${i}.content`, t) : e.content !== void 0 && H(t, `${i}.content`, "UNKNOWN_FIELD", "This table action does not accept content."), !["setCellBackground", "setTableTheme"].includes(String(e.action)) && e.value !== void 0 && H(t, `${i}.value`, "UNKNOWN_FIELD", "This table action does not accept a value."), e.action === "setCellBackground" && !at("tableCell", "backgroundColor", e.value) && H(t, `${i}.value`, "INVALID_ATTRIBUTE_VALUE", "Invalid cell background color."), e.action === "setTableTheme" && !at("table", "tableTheme", e.value) && H(t, `${i}.value`, "INVALID_ATTRIBUTE_VALUE", "Invalid table theme.");
1327
+ }
1328
+ });
1329
+ }
1330
+ return t.length ? {
1331
+ valid: !1,
1332
+ errors: t
1333
+ } : {
1334
+ valid: !0,
1335
+ patch: e,
1336
+ errors: []
1337
+ };
1338
+ }
1339
+ //#endregion
1340
+ //#region src/ai-protocol/stream.ts
1341
+ var U = class extends Error {
1342
+ code;
1343
+ constructor(e, t) {
1344
+ super(t), this.code = e, this.name = "RichTextStreamError";
1345
+ }
1346
+ }, vt = {
1347
+ maxEventBytes: 262144,
1348
+ maxTotalBytes: 16777216,
1349
+ maxTextLength: 2e6,
1350
+ maxNodes: 2e4,
1351
+ maxDepth: 32,
1352
+ maxOperations: 500,
1353
+ maxEvents: 1e5
1354
+ };
1355
+ function yt(e) {
1356
+ return typeof e == "object" && !!e && !Array.isArray(e);
1357
+ }
1358
+ function W(e) {
1359
+ throw new U("INVALID_STREAM_EVENT", e);
1360
+ }
1361
+ function bt(e) {
1362
+ if (!yt(e) || e.protocolVersion !== 1 || typeof e.streamId != "string" || !e.streamId || !Number.isSafeInteger(e.seq) || e.seq < 1 || !yt(e.payload)) return W("Invalid stream envelope.");
1363
+ if (typeof e.type != "string" || ![
1364
+ "node.open",
1365
+ "text.delta",
1366
+ "node.attrs",
1367
+ "node.close",
1368
+ "operation",
1369
+ "stream.end"
1370
+ ].includes(e.type)) return W("Unknown stream event type.");
1371
+ let t = e.payload;
1372
+ if (Object.keys(e).some((e) => ![
1373
+ "protocolVersion",
1374
+ "streamId",
1375
+ "seq",
1376
+ "type",
1377
+ "payload"
1378
+ ].includes(e))) return W("Unknown stream envelope field.");
1379
+ let n = {
1380
+ "node.open": [
1381
+ "nodeRef",
1382
+ "nodeType",
1383
+ "attrs"
1384
+ ],
1385
+ "text.delta": [
1386
+ "nodeRef",
1387
+ "text",
1388
+ "marks"
1389
+ ],
1390
+ "node.attrs": ["nodeRef", "attrs"],
1391
+ "node.close": ["nodeRef"],
1392
+ operation: ["operation"],
1393
+ "stream.end": []
1394
+ };
1395
+ if (Object.keys(t).some((t) => !n[e.type].includes(t))) return W("Unknown stream payload field.");
1396
+ switch (e.type) {
1397
+ case "node.open":
1398
+ if (typeof t.nodeRef != "string" || !t.nodeRef || typeof t.nodeType != "string" || !t.nodeType || t.attrs !== void 0 && !yt(t.attrs)) return W("Invalid node.open payload.");
1399
+ if (!B().nodes[t.nodeType]) return W("Unknown node type.");
1400
+ if (yt(t.attrs)) {
1401
+ if (Object.prototype.hasOwnProperty.call(t.attrs, "aiId")) return W("AI cannot supply node identity.");
1402
+ let e = B().nodes[t.nodeType].spec.attrs ?? {};
1403
+ if (Object.entries(t.attrs).some(([n, r]) => !Object.prototype.hasOwnProperty.call(e, n) || !at(t.nodeType, n, r))) return W("Invalid node.open attributes.");
1404
+ }
1405
+ break;
1406
+ case "text.delta":
1407
+ if (typeof t.text != "string" || !t.text || t.nodeRef !== void 0 && typeof t.nodeRef != "string" || t.marks !== void 0 && !Array.isArray(t.marks)) return W("Invalid text.delta payload.");
1408
+ if (t.marks && ct({
1409
+ type: "text",
1410
+ text: "x",
1411
+ marks: t.marks
1412
+ }).length) return W("Invalid text.delta marks.");
1413
+ break;
1414
+ case "node.attrs":
1415
+ if (typeof t.nodeRef != "string" || !yt(t.attrs)) return W("Invalid node.attrs payload.");
1416
+ if (Object.prototype.hasOwnProperty.call(t.attrs, "aiId")) return W("AI cannot supply node identity.");
1417
+ break;
1418
+ case "node.close":
1419
+ if (typeof t.nodeRef != "string") return W("Invalid node.close payload.");
1420
+ break;
1421
+ case "operation":
1422
+ if (!yt(t.operation)) return W("Invalid operation payload.");
1423
+ {
1424
+ let e = _t({
1425
+ protocolVersion: 1,
1426
+ documentId: "stream",
1427
+ requestId: "stream",
1428
+ contextId: "stream",
1429
+ baseRevision: 0,
1430
+ operations: [t.operation]
1431
+ });
1432
+ if (!e.valid) return W(`Invalid streamed operation: ${e.errors[0]?.code ?? "INVALID_OPERATION"} at ${e.errors[0]?.path ?? "operation"}.`);
1433
+ }
1434
+ break;
1435
+ case "stream.end": if (Object.keys(t).length) return W("stream.end payload must be empty.");
1436
+ }
1437
+ return e;
1438
+ }
1439
+ function xt(e = {}) {
1440
+ let t = {
1441
+ ...vt,
1442
+ ...e
1443
+ }, n = new TextDecoder("utf-8", { fatal: !0 }), r = new TextEncoder(), i = "", a = 0, o = !1;
1444
+ function s(e) {
1445
+ if (e.endsWith("\r") && (e = e.slice(0, -1)), !e) return null;
1446
+ if (r.encode(e).byteLength > t.maxEventBytes) throw new U("STREAM_LIMIT_EXCEEDED", "Stream event exceeds byte limit.");
1447
+ try {
1448
+ return bt(JSON.parse(e));
1449
+ } catch (e) {
1450
+ if (e instanceof U) throw e;
1451
+ return W("Invalid stream JSON line.");
1452
+ }
1453
+ }
1454
+ function c(e) {
1455
+ if (o) throw new U("STREAM_CLOSED", "Stream decoder is closed.");
1456
+ let c = typeof e == "string" ? r.encode(e) : e;
1457
+ if (a += c.byteLength, a > t.maxTotalBytes) throw new U("STREAM_LIMIT_EXCEEDED", "Stream exceeds total byte limit.");
1458
+ try {
1459
+ i += n.decode(c, { stream: !0 });
1460
+ } catch {
1461
+ return W("Invalid UTF-8 stream chunk.");
1462
+ }
1463
+ let l = [], u = 0, d = i.indexOf("\n", u);
1464
+ for (; d >= 0;) {
1465
+ let e = s(i.slice(u, d));
1466
+ e && l.push(e), u = d + 1, d = i.indexOf("\n", u);
1467
+ }
1468
+ if (i = i.slice(u), r.encode(i).byteLength > t.maxEventBytes) throw new U("STREAM_LIMIT_EXCEEDED", "Incomplete stream event exceeds byte limit.");
1469
+ return l;
1470
+ }
1471
+ function l() {
1472
+ if (o) throw new U("STREAM_CLOSED", "Stream decoder is closed.");
1473
+ o = !0;
1474
+ try {
1475
+ i += n.decode();
1476
+ } catch {
1477
+ return W("Incomplete UTF-8 sequence.");
1478
+ }
1479
+ if (i.trim()) throw new U("STREAM_INCOMPLETE", "Stream ends with an incomplete event line.");
1480
+ return [];
1481
+ }
1482
+ return {
1483
+ push: c,
1484
+ finish: l
1485
+ };
1486
+ }
1487
+ function St(e) {
1488
+ let t = {
1489
+ ...vt,
1490
+ ...e.limits
1491
+ }, n = B(), r = [], i = [], a = [], o = /* @__PURE__ */ new Map(), s = "", c = 0, l = 0, u = 0, d = !1;
1492
+ function f(f) {
1493
+ let p = bt(f);
1494
+ if (p.streamId !== e.streamId) return W("Event belongs to a different stream.");
1495
+ let m = JSON.stringify(p);
1496
+ if (p.seq <= c) {
1497
+ if (o.get(p.seq) === m) return;
1498
+ throw new U("STREAM_SEQUENCE_ERROR", "Conflicting retransmitted event.");
1499
+ }
1500
+ if (d) throw new U("STREAM_CLOSED", "Stream already ended.");
1501
+ if (p.seq !== c + 1) throw new U("STREAM_SEQUENCE_ERROR", "Stream sequence has a gap.");
1502
+ if (p.seq > t.maxEvents) throw new U("STREAM_LIMIT_EXCEEDED", "Stream event count exceeded.");
1503
+ switch (p.type) {
1504
+ case "node.open": {
1505
+ let r = p.payload;
1506
+ if (e.mode === "replaceText" || e.mode === "operations") return W("Nodes are not allowed in this stream mode.");
1507
+ if (++l > t.maxNodes || i.length >= t.maxDepth) throw new U("STREAM_LIMIT_EXCEEDED", "Stream node or depth limit exceeded.");
1508
+ let a = r.nodeType;
1509
+ if (!n.nodes[a] || a === "doc" || a === "text") return W(`Unknown or unsupported node type: ${a}.`);
1510
+ let o = r.nodeRef;
1511
+ if (i.some((e) => e.ref === o)) return W("Duplicate open nodeRef.");
1512
+ i.push({
1513
+ ref: o,
1514
+ node: {
1515
+ type: a,
1516
+ ...r.attrs ? { attrs: r.attrs } : {},
1517
+ content: []
1518
+ }
1519
+ });
1520
+ break;
1521
+ }
1522
+ case "text.delta": {
1523
+ let n = p.payload, r = n.text;
1524
+ if (u += r.length, u > t.maxTextLength) throw new U("STREAM_LIMIT_EXCEEDED", "Stream text limit exceeded.");
1525
+ if (e.mode === "replaceText") {
1526
+ if (n.nodeRef && n.nodeRef !== "replacement") return W("replaceText accepts only the replacement slot.");
1527
+ s += r;
1528
+ break;
1529
+ }
1530
+ let a = i[i.length - 1];
1531
+ if (!a || n.nodeRef && n.nodeRef !== a.ref) return W("Text target is not the current open node.");
1532
+ let o = n.marks, c = a.node.content?.[a.node.content.length - 1];
1533
+ c?.type === "text" && JSON.stringify(c.marks ?? []) === JSON.stringify(o ?? []) ? c.text = (c.text ?? "") + r : a.node.content?.push({
1534
+ type: "text",
1535
+ text: r,
1536
+ ...o ? { marks: o } : {}
1537
+ });
1538
+ break;
1539
+ }
1540
+ case "node.attrs": {
1541
+ let e = p.payload, t = i[i.length - 1];
1542
+ if (!t || t.ref !== e.nodeRef) return W("Attribute target is not the current open node.");
1543
+ let r = n.nodes[t.node.type].spec.attrs ?? {};
1544
+ if (Object.entries(e.attrs).some(([e, n]) => !Object.prototype.hasOwnProperty.call(r, e) || !at(t.node.type, e, n))) return W("Invalid node attributes.");
1545
+ t.node.attrs = {
1546
+ ...t.node.attrs,
1547
+ ...e.attrs
1548
+ };
1549
+ break;
1550
+ }
1551
+ case "node.close": {
1552
+ let e = p.payload, t = i[i.length - 1];
1553
+ if (!t || t.ref !== e.nodeRef) return W("Nodes must close in stack order.");
1554
+ let a = t.node.content?.length ? t.node : {
1555
+ ...t.node,
1556
+ content: void 0
1557
+ };
1558
+ try {
1559
+ n.nodeFromJSON(a).check();
1560
+ } catch {
1561
+ return W("Closed node is not valid under the editor schema.");
1562
+ }
1563
+ i.pop();
1564
+ let o = i[i.length - 1];
1565
+ o ? o.node.content?.push(a) : r.push(a);
1566
+ break;
1567
+ }
1568
+ case "operation": {
1569
+ let n = p.payload;
1570
+ if (e.mode !== "operations") return W("Operation event is not allowed in this stream mode.");
1571
+ if (a.length >= t.maxOperations) throw new U("STREAM_LIMIT_EXCEEDED", "Stream operation limit exceeded.");
1572
+ a.push(n.operation);
1573
+ break;
1574
+ }
1575
+ case "stream.end":
1576
+ if (i.length) throw new U("STREAM_INCOMPLETE", "Nodes remain open at stream.end.");
1577
+ if (e.mode === "createDocument") {
1578
+ let e = ut({
1579
+ type: "doc",
1580
+ content: r
1581
+ });
1582
+ if (!e.valid) return W(e.errors[0]?.message ?? "Invalid generated document.");
1583
+ }
1584
+ d = !0;
1585
+ }
1586
+ c = p.seq, o.set(c, m);
1587
+ }
1588
+ function p(e) {
1589
+ return f(e), h();
1590
+ }
1591
+ function m(e) {
1592
+ return f(e), {
1593
+ seq: c,
1594
+ ended: d
1595
+ };
1596
+ }
1597
+ function h() {
1598
+ return {
1599
+ committed: !1,
1600
+ streamId: e.streamId,
1601
+ mode: e.mode,
1602
+ seq: c,
1603
+ ended: d,
1604
+ nodes: structuredClone(r),
1605
+ openNodes: structuredClone(i.map((e) => e.node)),
1606
+ replacementText: s,
1607
+ operations: structuredClone(a)
1608
+ };
1609
+ }
1610
+ function g() {
1611
+ if (!d) throw new U("STREAM_INCOMPLETE", "Stream has not ended.");
1612
+ return h();
1613
+ }
1614
+ return {
1615
+ append: p,
1616
+ appendFast: m,
1617
+ snapshot: h,
1618
+ result: g,
1619
+ currentNodeType: () => i[i.length - 1]?.node.type
1620
+ };
1621
+ }
1622
+ //#endregion
1623
+ //#region src/ai-protocol/references.ts
1624
+ function G(e) {
1625
+ return typeof e == "string" && e.trim() ? e : void 0;
1626
+ }
1627
+ function Ct(e, t) {
1628
+ for (let n of e ?? []) if (n.type === "commentMark") {
1629
+ let e = G(n.attrs?.threadId);
1630
+ e && t.push({
1631
+ kind: "comment",
1632
+ id: e
1633
+ });
1634
+ } else if (n.type === "link") {
1635
+ let e = G(n.attrs?.href);
1636
+ e && t.push({
1637
+ kind: "link",
1638
+ source: e
1639
+ });
1640
+ }
1641
+ }
1642
+ function wt(e, t) {
1643
+ let n = e.attrs ?? {};
1644
+ if (e.type === "imageBlock" && Array.isArray(n.images)) for (let e of n.images) {
1645
+ let n = G(e?.assetId), r = G(e?.src);
1646
+ (n || r) && t.push({
1647
+ kind: "image",
1648
+ id: n,
1649
+ source: r
1650
+ });
1651
+ let i = G(e?.link);
1652
+ i && t.push({
1653
+ kind: "link",
1654
+ source: i
1655
+ });
1656
+ }
1657
+ else if (e.type === "videoBlock" || e.type === "localFileBlock") {
1658
+ let r = G(n.assetId), i = G(e.type === "videoBlock" ? n.src : n.url);
1659
+ (r || i) && t.push({
1660
+ kind: e.type === "videoBlock" ? "video" : "file",
1661
+ id: r,
1662
+ source: i
1663
+ });
1664
+ } else if (e.type === "linkBlock") {
1665
+ let e = G(n.url);
1666
+ e && t.push({
1667
+ kind: "link",
1668
+ source: e
1669
+ });
1670
+ } else if (e.type === "mention") {
1671
+ let e = G(n.id);
1672
+ e && t.push({
1673
+ kind: "mention",
1674
+ id: e
1675
+ });
1676
+ }
1677
+ Ct(e.marks, t), e.content?.forEach((e) => wt(e, t));
1678
+ }
1679
+ function Tt(e) {
1680
+ let t = [];
1681
+ return wt(e, t), t;
1682
+ }
1683
+ function Et(e, t) {
1684
+ e.type === "insertContent" || e.type === "replaceFragment" || e.type === "tableOperation" && e.action === "setCellContent" ? e.content?.forEach((e) => wt(e, t)) : e.type === "setMarks" ? Ct(e.marks, t) : (e.type === "setNodeAttributes" || e.type === "transformBlocks") && wt({
1685
+ type: e.nodeType,
1686
+ attrs: e.attrs
1687
+ }, t);
1688
+ }
1689
+ function Dt(e) {
1690
+ let t = [];
1691
+ return e.operations.forEach((e) => Et(e, t)), t;
1692
+ }
1693
+ function Ot(e, t) {
1694
+ let n = [];
1695
+ switch (e.type) {
1696
+ case "node.open":
1697
+ wt({
1698
+ type: e.payload.nodeType,
1699
+ attrs: e.payload.attrs
1700
+ }, n);
1701
+ break;
1702
+ case "node.attrs":
1703
+ t && wt({
1704
+ type: t,
1705
+ attrs: e.payload.attrs
1706
+ }, n);
1707
+ break;
1708
+ case "text.delta":
1709
+ Ct(e.payload.marks, n);
1710
+ break;
1711
+ case "operation": Et(e.payload.operation, n);
1712
+ }
1713
+ return n;
1714
+ }
1715
+ //#endregion
1716
+ //#region src/ai-protocol/json-schema.ts
1717
+ function kt(e, t, n) {
1718
+ let r = e === null, i = (e) => r ? [e, "null"] : e;
1719
+ return t === "images" && n === "imageBlock" ? {
1720
+ type: "array",
1721
+ maxItems: 4,
1722
+ items: {
1723
+ type: "object",
1724
+ additionalProperties: !1,
1725
+ properties: {
1726
+ id: {
1727
+ type: "string",
1728
+ minLength: 1
1729
+ },
1730
+ assetId: {
1731
+ type: "string",
1732
+ minLength: 1
1733
+ },
1734
+ src: { type: "string" },
1735
+ alt: { type: "string" },
1736
+ name: { type: "string" },
1737
+ description: { type: "string" },
1738
+ descriptionVisible: { type: "boolean" },
1739
+ link: { type: "string" },
1740
+ linkTarget: { enum: ["_blank", "_self"] },
1741
+ rotation: { type: "number" }
1742
+ }
1743
+ }
1744
+ } : t === "indent" ? {
1745
+ type: i("integer"),
1746
+ minimum: 0,
1747
+ maximum: 8
1748
+ } : t === "level" ? {
1749
+ type: i("integer"),
1750
+ minimum: 1,
1751
+ maximum: 6
1752
+ } : t === "align" || t === "textAlign" ? { enum: [
1753
+ "left",
1754
+ "center",
1755
+ "right",
1756
+ ...r ? [null] : []
1757
+ ] } : t === "colwidth" ? {
1758
+ type: ["array", "null"],
1759
+ items: {
1760
+ type: "integer",
1761
+ minimum: 1
1762
+ },
1763
+ minItems: 1
1764
+ } : t === "type" && n === "orderedList" ? { enum: [
1765
+ "1",
1766
+ "a",
1767
+ "A",
1768
+ "i",
1769
+ "I",
1770
+ null
1771
+ ] } : t === "displayMode" && n === "linkBlock" ? { enum: [
1772
+ "text",
1773
+ "card",
1774
+ "preview"
1775
+ ] } : t === "lineStyle" && n === "horizontalRule" ? { enum: [
1776
+ "solid",
1777
+ "dashed",
1778
+ "dotted"
1779
+ ] } : t === "widthPercent" ? {
1780
+ type: i("number"),
1781
+ exclusiveMinimum: 0,
1782
+ maximum: 100
1783
+ } : [
1784
+ "height",
1785
+ "size",
1786
+ "targetTimestamp"
1787
+ ].includes(t) ? {
1788
+ type: i("integer"),
1789
+ minimum: 0
1790
+ } : [
1791
+ "colspan",
1792
+ "rowspan",
1793
+ "start"
1794
+ ].includes(t) ? {
1795
+ type: i("integer"),
1796
+ minimum: 1
1797
+ } : t === "fontSize" ? {
1798
+ type: i("string"),
1799
+ pattern: "^\\d{1,3}px$"
1800
+ } : /color$/i.test(t) || t === "backgroundColor" ? {
1801
+ type: i("string"),
1802
+ maxLength: 80,
1803
+ pattern: "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
1804
+ } : t === "widths" ? {
1805
+ type: i("array"),
1806
+ items: {
1807
+ type: "number",
1808
+ exclusiveMinimum: 0
1809
+ }
1810
+ } : t === "tableTheme" ? { anyOf: [{ type: "null" }, {
1811
+ type: "object",
1812
+ required: [
1813
+ "header",
1814
+ "odd",
1815
+ "even"
1816
+ ],
1817
+ additionalProperties: !1,
1818
+ properties: Object.fromEntries([
1819
+ "header",
1820
+ "odd",
1821
+ "even"
1822
+ ].map((e) => [e, {
1823
+ type: "string",
1824
+ pattern: "^#[0-9a-fA-F]{6}$"
1825
+ }]))
1826
+ }] } : Array.isArray(e) ? { type: "array" } : e === null ? { type: ["string", "null"] } : e === void 0 ? {} : typeof e == "object" ? { type: "object" } : typeof e == "number" ? { type: "number" } : { type: typeof e };
1827
+ }
1828
+ function At(e, t) {
1829
+ if (!e || !Object.keys(e).length) return;
1830
+ let n = {}, r = [];
1831
+ for (let [i, a] of Object.entries(e)) n[i] = kt(a.default, i, t), a.default === void 0 && r.push(i);
1832
+ return {
1833
+ type: "object",
1834
+ properties: n,
1835
+ additionalProperties: !1,
1836
+ ...r.length ? { required: r } : {}
1837
+ };
1838
+ }
1839
+ function jt() {
1840
+ let e = B(), t = {}, n = [], r = [];
1841
+ return e.spec.marks.forEach((e, n) => {
1842
+ let i = At(n.attrs, e);
1843
+ t[`mark_${e}`] = {
1844
+ type: "object",
1845
+ properties: {
1846
+ type: { const: e },
1847
+ ...i ? { attrs: i } : {}
1848
+ },
1849
+ required: ["type"],
1850
+ additionalProperties: !1
1851
+ }, r.push({ $ref: `#/$defs/mark_${e}` });
1852
+ }), e.spec.nodes.forEach((e, r) => {
1853
+ let i = At(r.attrs, e), a = { type: { const: e } };
1854
+ i && (a.attrs = i), e === "text" ? a.text = {
1855
+ type: "string",
1856
+ minLength: 1
1857
+ } : r.content && (a.content = {
1858
+ type: "array",
1859
+ items: { $ref: "#/$defs/node" }
1860
+ }), e !== "doc" && (a.marks = {
1861
+ type: "array",
1862
+ items: { $ref: "#/$defs/mark" }
1863
+ }), t[`node_${e}`] = {
1864
+ type: "object",
1865
+ properties: a,
1866
+ required: e === "text" ? ["type", "text"] : ["type"],
1867
+ additionalProperties: !1
1868
+ }, n.push({ $ref: `#/$defs/node_${e}` });
1869
+ }), t.node = { oneOf: n }, t.mark = { oneOf: r }, {
1870
+ $schema: "https://json-schema.org/draft/2020-12/schema",
1871
+ $id: "https://norio-office.github.io/rich-text/document.schema.json",
1872
+ title: "Norio rich text document",
1873
+ $ref: "#/$defs/node_doc",
1874
+ $defs: t
1875
+ };
1876
+ }
1877
+ //#endregion
1878
+ //#region ../../node_modules/fflate/esm/browser.js
1879
+ var K = Uint8Array, q = Uint16Array, Mt = Int32Array, Nt = new K([
1880
+ 0,
1881
+ 0,
1882
+ 0,
1883
+ 0,
1884
+ 0,
1885
+ 0,
1886
+ 0,
1887
+ 0,
1888
+ 1,
1889
+ 1,
1890
+ 1,
1891
+ 1,
1892
+ 2,
1893
+ 2,
1894
+ 2,
1895
+ 2,
1896
+ 3,
1897
+ 3,
1898
+ 3,
1899
+ 3,
1900
+ 4,
1901
+ 4,
1902
+ 4,
1903
+ 4,
1904
+ 5,
1905
+ 5,
1906
+ 5,
1907
+ 5,
1908
+ 0,
1909
+ 0,
1910
+ 0,
1911
+ 0
1912
+ ]), Pt = new K([
1913
+ 0,
1914
+ 0,
1915
+ 0,
1916
+ 0,
1917
+ 1,
1918
+ 1,
1919
+ 2,
1920
+ 2,
1921
+ 3,
1922
+ 3,
1923
+ 4,
1924
+ 4,
1925
+ 5,
1926
+ 5,
1927
+ 6,
1928
+ 6,
1929
+ 7,
1930
+ 7,
1931
+ 8,
1932
+ 8,
1933
+ 9,
1934
+ 9,
1935
+ 10,
1936
+ 10,
1937
+ 11,
1938
+ 11,
1939
+ 12,
1940
+ 12,
1941
+ 13,
1942
+ 13,
1943
+ 0,
1944
+ 0
1945
+ ]), Ft = new K([
1946
+ 16,
1947
+ 17,
1948
+ 18,
1949
+ 0,
1950
+ 8,
1951
+ 7,
1952
+ 9,
1953
+ 6,
1954
+ 10,
1955
+ 5,
1956
+ 11,
1957
+ 4,
1958
+ 12,
1959
+ 3,
1960
+ 13,
1961
+ 2,
1962
+ 14,
1963
+ 1,
1964
+ 15
1965
+ ]), It = function(e, t) {
1966
+ for (var n = new q(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
1967
+ for (var i = new Mt(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
1968
+ return {
1969
+ b: n,
1970
+ r: i
1971
+ };
1972
+ }, Lt = It(Nt, 2), Rt = Lt.b, zt = Lt.r;
1973
+ Rt[28] = 258, zt[258] = 28;
1974
+ var Bt = It(Pt, 0);
1975
+ Bt.b;
1976
+ for (var Vt = Bt.r, Ht = new q(32768), J = 0; J < 32768; ++J) {
1977
+ var Ut = (J & 43690) >> 1 | (J & 21845) << 1;
1978
+ Ut = (Ut & 52428) >> 2 | (Ut & 13107) << 2, Ut = (Ut & 61680) >> 4 | (Ut & 3855) << 4, Ht[J] = ((Ut & 65280) >> 8 | (Ut & 255) << 8) >> 1;
1979
+ }
1980
+ for (var Wt = (function(e, t, n) {
1981
+ for (var r = e.length, i = 0, a = new q(t); i < r; ++i) e[i] && ++a[e[i] - 1];
1982
+ var o = new q(t);
1983
+ for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
1984
+ var s;
1985
+ if (n) {
1986
+ s = new q(1 << t);
1987
+ var c = 15 - t;
1988
+ for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Ht[d] >> c] = l;
1989
+ } else for (s = new q(r), i = 0; i < r; ++i) e[i] && (s[i] = Ht[o[e[i] - 1]++] >> 15 - e[i]);
1990
+ return s;
1991
+ }), Gt = new K(288), J = 0; J < 144; ++J) Gt[J] = 8;
1992
+ for (var J = 144; J < 256; ++J) Gt[J] = 9;
1993
+ for (var J = 256; J < 280; ++J) Gt[J] = 7;
1994
+ for (var J = 280; J < 288; ++J) Gt[J] = 8;
1995
+ for (var Kt = new K(32), J = 0; J < 32; ++J) Kt[J] = 5;
1996
+ var qt = /*#__PURE__*/ Wt(Gt, 9, 0), Jt = /*#__PURE__*/ Wt(Kt, 5, 0), Yt = function(e) {
1997
+ return (e + 7) / 8 | 0;
1998
+ }, Xt = function(e, t, n) {
1999
+ return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new K(e.subarray(t, n));
2000
+ }, Zt = [
2001
+ "unexpected EOF",
2002
+ "invalid block type",
2003
+ "invalid length/literal",
2004
+ "invalid distance",
2005
+ "stream finished",
2006
+ "no stream handler",
2007
+ ,
2008
+ "no callback",
2009
+ "invalid UTF-8 data",
2010
+ "extra field too long",
2011
+ "date not in range 1980-2099",
2012
+ "filename too long",
2013
+ "stream finishing",
2014
+ "invalid zip data"
2015
+ ], Qt = function(e, t, n) {
2016
+ var r = Error(t || Zt[e]);
2017
+ if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, Qt), !n) throw r;
2018
+ return r;
2019
+ }, $t = function(e, t, n) {
2020
+ n <<= t & 7;
2021
+ var r = t / 8 | 0;
2022
+ e[r] |= n, e[r + 1] |= n >> 8;
2023
+ }, en = function(e, t, n) {
2024
+ n <<= t & 7;
2025
+ var r = t / 8 | 0;
2026
+ e[r] |= n, e[r + 1] |= n >> 8, e[r + 2] |= n >> 16;
2027
+ }, tn = function(e, t) {
2028
+ for (var n = [], r = 0; r < e.length; ++r) e[r] && n.push({
2029
+ s: r,
2030
+ f: e[r]
2031
+ });
2032
+ var i = n.length, a = n.slice();
2033
+ if (!i) return {
2034
+ t: ln,
2035
+ l: 0
2036
+ };
2037
+ if (i == 1) {
2038
+ var o = new K(n[0].s + 1);
2039
+ return o[n[0].s] = 1, {
2040
+ t: o,
2041
+ l: 1
2042
+ };
2043
+ }
2044
+ n.sort(function(e, t) {
2045
+ return e.f - t.f;
2046
+ }), n.push({
2047
+ s: -1,
2048
+ f: 25001
2049
+ });
2050
+ var s = n[0], c = n[1], l = 0, u = 1, d = 2;
2051
+ for (n[0] = {
2052
+ s: -1,
2053
+ f: s.f + c.f,
2054
+ l: s,
2055
+ r: c
2056
+ }; u != i - 1;) s = n[n[l].f < n[d].f ? l++ : d++], c = n[l != u && n[l].f < n[d].f ? l++ : d++], n[u++] = {
2057
+ s: -1,
2058
+ f: s.f + c.f,
2059
+ l: s,
2060
+ r: c
2061
+ };
2062
+ for (var f = a[0].s, r = 1; r < i; ++r) a[r].s > f && (f = a[r].s);
2063
+ var p = new q(f + 1), m = nn(n[u - 1], p, 0);
2064
+ if (m > t) {
2065
+ var r = 0, h = 0, g = m - t, _ = 1 << g;
2066
+ for (a.sort(function(e, t) {
2067
+ return p[t.s] - p[e.s] || e.f - t.f;
2068
+ }); r < i; ++r) {
2069
+ var v = a[r].s;
2070
+ if (p[v] > t) h += _ - (1 << m - p[v]), p[v] = t;
2071
+ else break;
2072
+ }
2073
+ for (h >>= g; h > 0;) {
2074
+ var y = a[r].s;
2075
+ p[y] < t ? h -= 1 << t - p[y]++ - 1 : ++r;
2076
+ }
2077
+ for (; r >= 0 && h; --r) {
2078
+ var b = a[r].s;
2079
+ p[b] == t && (--p[b], ++h);
2080
+ }
2081
+ m = t;
2082
+ }
2083
+ return {
2084
+ t: new K(p),
2085
+ l: m
2086
+ };
2087
+ }, nn = function(e, t, n) {
2088
+ return e.s == -1 ? Math.max(nn(e.l, t, n + 1), nn(e.r, t, n + 1)) : t[e.s] = n;
2089
+ }, rn = function(e) {
2090
+ for (var t = e.length; t && !e[--t];);
2091
+ for (var n = new q(++t), r = 0, i = e[0], a = 1, o = function(e) {
2092
+ n[r++] = e;
2093
+ }, s = 1; s <= t; ++s) if (e[s] == i && s != t) ++a;
2094
+ else {
2095
+ if (!i && a > 2) {
2096
+ for (; a > 138; a -= 138) o(32754);
2097
+ a > 2 && (o(a > 10 ? a - 11 << 5 | 28690 : a - 3 << 5 | 12305), a = 0);
2098
+ } else if (a > 3) {
2099
+ for (o(i), --a; a > 6; a -= 6) o(8304);
2100
+ a > 2 && (o(a - 3 << 5 | 8208), a = 0);
2101
+ }
2102
+ for (; a--;) o(i);
2103
+ a = 1, i = e[s];
2104
+ }
2105
+ return {
2106
+ c: n.subarray(0, r),
2107
+ n: t
2108
+ };
2109
+ }, an = function(e, t) {
2110
+ for (var n = 0, r = 0; r < t.length; ++r) n += e[r] * t[r];
2111
+ return n;
2112
+ }, on = function(e, t, n) {
2113
+ var r = n.length, i = Yt(t + 2);
2114
+ e[i] = r & 255, e[i + 1] = r >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
2115
+ for (var a = 0; a < r; ++a) e[i + a + 4] = n[a];
2116
+ return (i + 4 + r) * 8;
2117
+ }, sn = function(e, t, n, r, i, a, o, s, c, l, u) {
2118
+ $t(t, u++, n), ++i[256];
2119
+ for (var d = tn(i, 15), f = d.t, p = d.l, m = tn(a, 15), h = m.t, g = m.l, _ = rn(f), v = _.c, y = _.n, b = rn(h), x = b.c, S = b.n, C = new q(19), w = 0; w < v.length; ++w) ++C[v[w] & 31];
2120
+ for (var w = 0; w < x.length; ++w) ++C[x[w] & 31];
2121
+ for (var T = tn(C, 7), E = T.t, ee = T.l, D = 19; D > 4 && !E[Ft[D - 1]]; --D);
2122
+ var te = l + 5 << 3, O = an(i, Gt) + an(a, Kt) + o, k = an(i, f) + an(a, h) + o + 14 + 3 * D + an(C, E) + 2 * C[16] + 3 * C[17] + 7 * C[18];
2123
+ if (c >= 0 && te <= O && te <= k) return on(t, u, e.subarray(c, c + l));
2124
+ var A, j, M, N;
2125
+ if ($t(t, u, 1 + (k < O)), u += 2, k < O) {
2126
+ A = Wt(f, p, 0), j = f, M = Wt(h, g, 0), N = h;
2127
+ var ne = Wt(E, ee, 0);
2128
+ $t(t, u, y - 257), $t(t, u + 5, S - 1), $t(t, u + 10, D - 4), u += 14;
2129
+ for (var w = 0; w < D; ++w) $t(t, u + 3 * w, E[Ft[w]]);
2130
+ u += 3 * D;
2131
+ for (var P = [v, x], F = 0; F < 2; ++F) for (var re = P[F], w = 0; w < re.length; ++w) {
2132
+ var I = re[w] & 31;
2133
+ $t(t, u, ne[I]), u += E[I], I > 15 && ($t(t, u, re[w] >> 5 & 127), u += re[w] >> 12);
2134
+ }
2135
+ } else A = qt, j = Gt, M = Jt, N = Kt;
2136
+ for (var w = 0; w < s; ++w) {
2137
+ var L = r[w];
2138
+ if (L > 255) {
2139
+ var I = L >> 18 & 31;
2140
+ en(t, u, A[I + 257]), u += j[I + 257], I > 7 && ($t(t, u, L >> 23 & 31), u += Nt[I]);
2141
+ var ie = L & 31;
2142
+ en(t, u, M[ie]), u += N[ie], ie > 3 && (en(t, u, L >> 5 & 8191), u += Pt[ie]);
2143
+ } else en(t, u, A[L]), u += j[L];
2144
+ }
2145
+ return en(t, u, A[256]), u + j[256];
2146
+ }, cn = /*#__PURE__*/ new Mt([
2147
+ 65540,
2148
+ 131080,
2149
+ 131088,
2150
+ 131104,
2151
+ 262176,
2152
+ 1048704,
2153
+ 1048832,
2154
+ 2114560,
2155
+ 2117632
2156
+ ]), ln = /*#__PURE__*/ new K(0), un = function(e, t, n, r, i, a) {
2157
+ var o = a.z || e.length, s = new K(r + o + 5 * (1 + Math.ceil(o / 7e3)) + i), c = s.subarray(r, s.length - i), l = a.l, u = (a.r || 0) & 7;
2158
+ if (t) {
2159
+ u && (c[0] = a.r >> 3);
2160
+ for (var d = cn[t - 1], f = d >> 13, p = d & 8191, m = (1 << n) - 1, h = a.p || new q(32768), g = a.h || new q(m + 1), _ = Math.ceil(n / 3), v = 2 * _, y = function(t) {
2161
+ return (e[t] ^ e[t + 1] << _ ^ e[t + 2] << v) & m;
2162
+ }, b = new Mt(25e3), x = new q(288), S = new q(32), C = 0, w = 0, T = a.i || 0, E = 0, ee = a.w || 0, D = 0; T + 2 < o; ++T) {
2163
+ var te = y(T), O = T & 32767, k = g[te];
2164
+ if (h[O] = k, g[te] = O, ee <= T) {
2165
+ var A = o - T;
2166
+ if ((C > 7e3 || E > 24576) && (A > 423 || !l)) {
2167
+ u = sn(e, c, 0, b, x, S, w, E, D, T - D, u), E = C = w = 0, D = T;
2168
+ for (var j = 0; j < 286; ++j) x[j] = 0;
2169
+ for (var j = 0; j < 30; ++j) S[j] = 0;
2170
+ }
2171
+ var M = 2, N = 0, ne = p, P = O - k & 32767;
2172
+ if (A > 2 && te == y(T - P)) for (var F = Math.min(f, A) - 1, re = Math.min(32767, T), I = Math.min(258, A); P <= re && --ne && O != k;) {
2173
+ if (e[T + M] == e[T + M - P]) {
2174
+ for (var L = 0; L < I && e[T + L] == e[T + L - P]; ++L);
2175
+ if (L > M) {
2176
+ if (M = L, N = P, L > F) break;
2177
+ for (var ie = Math.min(P, L - 2), ae = 0, j = 0; j < ie; ++j) {
2178
+ var oe = T - P + j & 32767, se = oe - h[oe] & 32767;
2179
+ se > ae && (ae = se, k = oe);
2180
+ }
2181
+ }
2182
+ }
2183
+ O = k, k = h[O], P += O - k & 32767;
2184
+ }
2185
+ if (N) {
2186
+ b[E++] = 268435456 | zt[M] << 18 | Vt[N];
2187
+ var ce = zt[M] & 31, R = Vt[N] & 31;
2188
+ w += Nt[ce] + Pt[R], ++x[257 + ce], ++S[R], ee = T + M, ++C;
2189
+ } else b[E++] = e[T], ++x[e[T]];
2190
+ }
2191
+ }
2192
+ for (T = Math.max(T, ee); T < o; ++T) b[E++] = e[T], ++x[e[T]];
2193
+ u = sn(e, c, l, b, x, S, w, E, D, T - D, u), l || (a.r = u & 7 | c[u / 8 | 0] << 3, u -= 7, a.h = g, a.p = h, a.i = T, a.w = ee);
2194
+ } else {
2195
+ for (var T = a.w || 0; T < o + l; T += 65535) {
2196
+ var le = T + 65535;
2197
+ le >= o && (c[u / 8 | 0] = l, le = o), u = on(c, u + 1, e.subarray(T, le));
2198
+ }
2199
+ a.i = o;
2200
+ }
2201
+ return Xt(s, 0, r + Yt(u) + i);
2202
+ }, dn = /*#__PURE__*/ (function() {
2203
+ for (var e = /* @__PURE__ */ new Int32Array(256), t = 0; t < 256; ++t) {
2204
+ for (var n = t, r = 9; --r;) n = (n & 1 && -306674912) ^ n >>> 1;
2205
+ e[t] = n;
2206
+ }
2207
+ return e;
2208
+ })(), fn = function() {
2209
+ var e = -1;
2210
+ return {
2211
+ p: function(t) {
2212
+ for (var n = e, r = 0; r < t.length; ++r) n = dn[n & 255 ^ t[r]] ^ n >>> 8;
2213
+ e = n;
2214
+ },
2215
+ d: function() {
2216
+ return ~e;
2217
+ }
2218
+ };
2219
+ }, pn = function(e, t, n, r, i) {
2220
+ if (!i && (i = { l: 1 }, t.dictionary)) {
2221
+ var a = t.dictionary.subarray(-32768), o = new K(a.length + e.length);
2222
+ o.set(a), o.set(e, a.length), e = o, i.w = a.length;
2223
+ }
2224
+ return un(e, t.level == null ? 6 : t.level, t.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, n, r, i);
2225
+ }, mn = function(e, t) {
2226
+ var n = {};
2227
+ for (var r in e) n[r] = e[r];
2228
+ for (var r in t) n[r] = t[r];
2229
+ return n;
2230
+ }, Y = function(e, t, n) {
2231
+ for (; n; ++t) e[t] = n, n >>>= 8;
2232
+ };
2233
+ function hn(e, t) {
2234
+ return pn(e, t || {}, 0, 0);
2235
+ }
2236
+ var gn = function(e, t, n, r) {
2237
+ for (var i in e) {
2238
+ var a = e[i], o = t + i, s = r;
2239
+ Array.isArray(a) && (s = mn(r, a[1]), a = a[0]), ArrayBuffer.isView(a) ? n[o] = [a, s] : (n[o += "/"] = [new K(0), s], gn(a, o, n, r));
2240
+ }
2241
+ }, _n = typeof TextEncoder < "u" && /*#__PURE__*/ new TextEncoder(), vn = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
2242
+ try {
2243
+ vn.decode(ln, { stream: !0 });
2244
+ } catch {}
2245
+ function yn(e, t) {
2246
+ if (t) {
2247
+ for (var n = new K(e.length), r = 0; r < e.length; ++r) n[r] = e.charCodeAt(r);
2248
+ return n;
2249
+ }
2250
+ if (_n) return _n.encode(e);
2251
+ for (var i = e.length, a = new K(e.length + (e.length >> 1)), o = 0, s = function(e) {
2252
+ a[o++] = e;
2253
+ }, r = 0; r < i; ++r) {
2254
+ if (o + 5 > a.length) {
2255
+ var c = new K(o + 8 + (i - r << 1));
2256
+ c.set(a), a = c;
2257
+ }
2258
+ var l = e.charCodeAt(r);
2259
+ l < 128 || t ? s(l) : l < 2048 ? (s(192 | l >> 6), s(128 | l & 63)) : l > 55295 && l < 57344 ? (l = 65536 + (l & 1047552) | e.charCodeAt(++r) & 1023, s(240 | l >> 18), s(128 | l >> 12 & 63), s(128 | l >> 6 & 63), s(128 | l & 63)) : (s(224 | l >> 12), s(128 | l >> 6 & 63), s(128 | l & 63));
2260
+ }
2261
+ return Xt(a, 0, o);
2262
+ }
2263
+ var bn = function(e) {
2264
+ var t = 0;
2265
+ if (e) for (var n in e) {
2266
+ var r = e[n].length;
2267
+ r > 65535 && Qt(9), t += r + 4;
2268
+ }
2269
+ return t;
2270
+ }, xn = function(e, t, n, r, i, a, o, s) {
2271
+ var c = r.length, l = n.extra, u = s && s.length, d = bn(l);
2272
+ Y(e, t, o == null ? 67324752 : 33639248), t += 4, o != null && (e[t++] = 20, e[t++] = n.os), e[t] = 20, t += 2, e[t++] = n.flag << 1 | (a < 0 && 8), e[t++] = i && 8, e[t++] = n.compression & 255, e[t++] = n.compression >> 8;
2273
+ var f = new Date(n.mtime == null ? Date.now() : n.mtime), p = f.getFullYear() - 1980;
2274
+ if ((p < 0 || p > 119) && Qt(10), Y(e, t, p << 25 | f.getMonth() + 1 << 21 | f.getDate() << 16 | f.getHours() << 11 | f.getMinutes() << 5 | f.getSeconds() >> 1), t += 4, a != -1 && (Y(e, t, n.crc), Y(e, t + 4, a < 0 ? -a - 2 : a), Y(e, t + 8, n.size)), Y(e, t + 12, c), Y(e, t + 14, d), t += 16, o != null && (Y(e, t, u), Y(e, t + 6, n.attrs), Y(e, t + 10, o), t += 14), e.set(r, t), t += c, d) for (var m in l) {
2275
+ var h = l[m], g = h.length;
2276
+ Y(e, t, +m), Y(e, t + 2, g), e.set(h, t + 4), t += 4 + g;
2277
+ }
2278
+ return u && (e.set(s, t), t += u), t;
2279
+ }, Sn = function(e, t, n, r, i) {
2280
+ Y(e, t, 101010256), Y(e, t + 8, n), Y(e, t + 10, n), Y(e, t + 12, r), Y(e, t + 16, i);
2281
+ };
2282
+ function Cn(e, t) {
2283
+ t ||= {};
2284
+ var n = {}, r = [];
2285
+ gn(e, "", n, t);
2286
+ var i = 0, a = 0;
2287
+ for (var o in n) {
2288
+ var s = n[o], c = s[0], l = s[1], u = l.level == 0 ? 0 : 8, d = yn(o), f = d.length, p = l.comment, m = p && yn(p), h = m && m.length, g = bn(l.extra);
2289
+ f > 65535 && Qt(11);
2290
+ var _ = u ? hn(c, l) : c, v = _.length, y = fn();
2291
+ y.p(c), r.push(mn(l, {
2292
+ size: c.length,
2293
+ crc: y.d(),
2294
+ c: _,
2295
+ f: d,
2296
+ m,
2297
+ u: f != o.length || m && p.length != h,
2298
+ o: i,
2299
+ compression: u
2300
+ })), i += 30 + f + g + v, a += 76 + 2 * (f + g) + (h || 0) + v;
2301
+ }
2302
+ for (var b = new K(a + 22), x = i, S = a - i, C = 0; C < r.length; ++C) {
2303
+ var d = r[C];
2304
+ xn(b, d.o, d, d.f, d.u, d.c.length);
2305
+ var w = 30 + d.f.length + bn(d.extra);
2306
+ b.set(d.c, d.o + w), xn(b, i, d, d.f, d.u, d.c.length, d.o, d.m), i += 16 + w + (d.m ? d.m.length : 0);
2307
+ }
2308
+ return Sn(b, i, r.length, S, x), b;
2309
+ }
2310
+ var wn = {
2311
+ maxArchiveBytes: 134217728,
2312
+ maxEntries: 2e3,
2313
+ maxResourceBytes: 67108864,
2314
+ maxUncompressedBytes: 268435456,
2315
+ maxCompressionRatio: 200
2316
+ }, Tn = class extends Error {
2317
+ code;
2318
+ constructor(e, t) {
2319
+ super(t), this.code = e, this.name = "NordoxError";
2320
+ }
2321
+ };
2322
+ function X(e, t) {
2323
+ throw new Tn(e, t);
2324
+ }
2325
+ function En(e) {
2326
+ e?.aborted && X("CANCELLED", "Operation cancelled.");
2327
+ }
2328
+ function Dn(e) {
2329
+ return typeof e == "object" && !!e && !Array.isArray(e);
2330
+ }
2331
+ function On(e) {
2332
+ return /^[a-zA-Z0-9_-]{1,128}$/.test(e);
2333
+ }
2334
+ function kn(e) {
2335
+ if (!e || /^(blob:|data:|file:|nordox:|javascript:|vbscript:|about:)/i.test(e) || /[\s<>\\]/.test(e)) return !1;
2336
+ if (/^https?:\/\//i.test(e)) try {
2337
+ let t = new URL(e);
2338
+ if (t.username || t.password) return !1;
2339
+ for (let e of t.searchParams.keys()) if (/^(?:token|access[_-]?token|id[_-]?token|key|api[_-]?key|auth|authorization|signature|sig|credential|access[_-]?key|x-amz-(?:algorithm|credential|date|expires|security-token|signature)|x-goog-(?:algorithm|credential|date|expires|signature)|googleaccessid|expires|policy)$/i.test(e)) return !1;
2340
+ return !0;
2341
+ } catch {
2342
+ return !1;
2343
+ }
2344
+ return /^(?:asset|norio|ipfs|s3|oss):[a-zA-Z0-9/_:.-]+$/i.test(e);
2345
+ }
2346
+ function An(e, t) {
2347
+ function n(e) {
2348
+ if (e.type === "imageBlock" && Array.isArray(e.attrs?.images)) for (let n of e.attrs.images) Dn(n) && t(n, "src", "image");
2349
+ else e.type === "videoBlock" && Dn(e.attrs) ? t(e.attrs, "src", "video") : e.type === "localFileBlock" && Dn(e.attrs) && t(e.attrs, "url", "file");
2350
+ e.content?.forEach(n);
2351
+ }
2352
+ n(e);
2353
+ }
2354
+ function jn(e, t, n) {
2355
+ return `assets/${e === "image" ? "images" : e === "video" ? "videos" : "files"}/${t}.${n?.split("/")[1]?.replace(/[^a-zA-Z0-9]/g, "") || "bin"}`;
2356
+ }
2357
+ function Mn(e) {
2358
+ let t = 2166136261;
2359
+ for (let n of e) t = Math.imul(t ^ n, 16777619);
2360
+ return (t >>> 0).toString(16);
2361
+ }
2362
+ function Nn(e, t) {
2363
+ return e.byteLength === t.byteLength && e.every((e, n) => e === t[n]);
2364
+ }
2365
+ async function Pn(e, t = {}) {
2366
+ En(t.signal);
2367
+ let n = dt(e);
2368
+ n.valid || X("INVALID_DOCUMENT", n.errors[0]?.message ?? "Invalid document.");
2369
+ let r = n.document, i = {
2370
+ ...wn,
2371
+ ...t.limits
2372
+ }, a = {
2373
+ images: t.assetPackaging?.images ?? "reference",
2374
+ videos: t.assetPackaging?.videos ?? "reference",
2375
+ files: t.assetPackaging?.files ?? "reference"
2376
+ }, o = {}, s = [], c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = [];
2377
+ An(r, (e, t, n) => {
2378
+ typeof e[t] == "string" && e[t] && d.push({
2379
+ item: e,
2380
+ field: t,
2381
+ kind: n
2382
+ });
2383
+ });
2384
+ let f = 0;
2385
+ for (let [e, { item: n, field: r, kind: a }] of d.entries()) {
2386
+ En(t.signal);
2387
+ let p = n[r], m = typeof n.assetId == "string" ? n.assetId : typeof n.id == "string" ? n.id : "", h = On(m) ? m : `${a}-${e + 1}`, g = t.existingResources?.get(h), _ = t.assetPackaging?.[`${a}s`] ?? (g?.resource.storage === "embedded" ? "embed" : "reference"), v = {
2388
+ id: h,
2389
+ kind: a,
2390
+ source: p,
2391
+ mimeType: typeof n.mimeType == "string" ? n.mimeType : void 0,
2392
+ name: typeof n.name == "string" ? n.name : void 0
2393
+ }, y = c.get(h);
2394
+ if (y) y.kind !== a && X("INVALID_DOCUMENT", `Resource ${h} has conflicting kinds.`), p !== l.get(h) && p !== `nordox:asset/${h}` && p !== g?.displayUrl && X("INVALID_DOCUMENT", `Resource ${h} has conflicting sources.`), n.assetId = h, n[r] = y.storage === "embedded" ? `nordox:asset/${h}` : y.source;
2395
+ else {
2396
+ if (_ === "embed") {
2397
+ let e = p === `nordox:asset/${h}` || p === g?.displayUrl ? g?.bytes : void 0, d = v.mimeType || g?.resource.mimeType, m = v.name || g?.resource.name;
2398
+ if (!e) {
2399
+ t.resourceResolver || X("ASSET_EMBED_FAILED", `No byte resolver for ${h}.`);
2400
+ try {
2401
+ let n = await t.resourceResolver.readBytes(v, {
2402
+ signal: t.signal,
2403
+ maxBytes: i.maxResourceBytes
2404
+ });
2405
+ e = n.bytes, d = n.mimeType || d, m = n.name || m;
2406
+ } catch {
2407
+ t.signal?.aborted && X("CANCELLED", "Operation cancelled."), X("ASSET_EMBED_FAILED", `Could not embed resource ${h}.`);
2408
+ }
2409
+ }
2410
+ e instanceof Uint8Array || X("ASSET_EMBED_FAILED", `Invalid bytes for ${h}.`), e.byteLength > i.maxResourceBytes && X("NORDOX_LIMIT_EXCEEDED", `Resource ${h} is too large.`);
2411
+ let _ = `${a}:${d ?? ""}:${e.byteLength}:${Mn(e)}`, y = u.get(_) ?? [], b = y.find((t) => Nn(t.bytes, e)), x = b?.path ?? jn(a, h, d);
2412
+ if (!b) {
2413
+ f += e.byteLength, f > i.maxUncompressedBytes && X("NORDOX_LIMIT_EXCEEDED", "Package is too large.");
2414
+ let t = e.slice();
2415
+ o[x] = t, y.push({
2416
+ path: x,
2417
+ bytes: t
2418
+ }), u.set(_, y);
2419
+ }
2420
+ let S = {
2421
+ id: h,
2422
+ kind: a,
2423
+ storage: "embedded",
2424
+ path: x,
2425
+ mimeType: d,
2426
+ name: m,
2427
+ byteLength: e.byteLength
2428
+ };
2429
+ s.push(S), c.set(h, S), l.set(h, p), n.assetId = h, n[r] = `nordox:asset/${h}`;
2430
+ } else {
2431
+ let e = kn(p) ? p : g?.resource.source, i = e || p;
2432
+ if (!e && t.resourceResolver?.resolveReference) {
2433
+ try {
2434
+ i = await t.resourceResolver.resolveReference(v);
2435
+ } catch {
2436
+ En(t.signal), X("ASSET_REFERENCE_NOT_PERSISTABLE", `Resource ${h} needs a persistent reference.`);
2437
+ }
2438
+ En(t.signal);
2439
+ }
2440
+ kn(i) || X("ASSET_REFERENCE_NOT_PERSISTABLE", `Resource ${h} needs a persistent reference or embedding.`);
2441
+ let o = {
2442
+ id: h,
2443
+ kind: a,
2444
+ storage: "external",
2445
+ source: i,
2446
+ mimeType: v.mimeType,
2447
+ name: v.name
2448
+ };
2449
+ s.push(o), c.set(h, o), l.set(h, p), n.assetId = h, n[r] = i;
2450
+ }
2451
+ t.onProgress?.({
2452
+ phase: "prepare",
2453
+ completed: e + 1,
2454
+ total: d.length
2455
+ });
2456
+ }
2457
+ }
2458
+ s.length + 2 > i.maxEntries && X("NORDOX_LIMIT_EXCEEDED", "Too many ZIP entries.");
2459
+ let p = {
2460
+ format: "nordox",
2461
+ formatVersion: 1,
2462
+ schemaVersion: "1",
2463
+ title: t.title?.trim() || "Untitled",
2464
+ assetPackaging: a,
2465
+ resources: s
2466
+ };
2467
+ o["manifest.json"] = yn(JSON.stringify(p)), o["document.json"] = yn(JSON.stringify(r)), t.onProgress?.({
2468
+ phase: "zip",
2469
+ completed: 0,
2470
+ total: 1
2471
+ }), En(t.signal);
2472
+ let m = Cn(o, { level: 0 });
2473
+ return m.byteLength > i.maxArchiveBytes && X("NORDOX_LIMIT_EXCEEDED", "Archive is too large."), En(t.signal), t.onProgress?.({
2474
+ phase: "zip",
2475
+ completed: 1,
2476
+ total: 1
2477
+ }), m;
2478
+ }
2479
+ //#endregion
2480
+ //#region src/ai/executor.ts
2481
+ var Fn = class extends Error {
2482
+ code;
2483
+ constructor(e, t) {
2484
+ super(t), this.code = e, this.name = "RichTextAiExecutionError";
2485
+ }
2486
+ }, In = new Set(_e);
2487
+ function Z(e, t) {
2488
+ throw new Fn(e, t);
2489
+ }
2490
+ function Ln(e, n) {
2491
+ let r = (e) => {
2492
+ e.attrs && Object.prototype.hasOwnProperty.call(e.attrs, "aiId") && Z("OUT_OF_SCOPE", "AI cannot supply node identity."), e.content?.forEach(r);
2493
+ };
2494
+ return n.forEach(r), t.fromArray(n.map((t) => e.schema.nodeFromJSON(t)));
2495
+ }
2496
+ function Rn(e, t) {
2497
+ let n = e.mapping.map(t.from, 1), r = e.mapping.map(t.to, t.from === t.to ? 1 : -1);
2498
+ return (n < 0 || r < n || r > e.doc.content.size) && Z("TARGET_NOT_FOUND", "Target was removed by an earlier operation."), {
2499
+ from: n,
2500
+ to: r
2501
+ };
2502
+ }
2503
+ function zn(e, t) {
2504
+ let { from: n } = Rn(e, t), r = e.doc.nodeAt(n);
2505
+ return (!r || t.nodeId && r.attrs.aiId !== t.nodeId) && Z("TARGET_NOT_FOUND", "Target node no longer matches."), {
2506
+ node: r,
2507
+ pos: n
2508
+ };
2509
+ }
2510
+ function Bn(e, t, n) {
2511
+ let i = {
2512
+ insertRowBefore: p,
2513
+ insertRowAfter: f,
2514
+ deleteRow: h,
2515
+ insertColumnBefore: d,
2516
+ insertColumnAfter: u,
2517
+ deleteColumn: m,
2518
+ mergeCells: g,
2519
+ splitCell: _
2520
+ }[t.action];
2521
+ i || Z("UNSUPPORTED_CAPABILITY", `Unsupported table action: ${t.action}.`);
2522
+ let { from: a } = Rn(e, n), o = n.positions?.length === 2 ? c.create(e.doc, ...n.positions.map((t) => e.mapping.map(t))) : s.near(e.doc.resolve(Math.min(a + 1, e.doc.content.size))), l = r.create({
2523
+ schema: e.doc.type.schema,
2524
+ doc: e.doc,
2525
+ selection: o
2526
+ }), v;
2527
+ if (i(l, (e) => {
2528
+ v = e;
2529
+ }) || Z("UNSUPPORTED_CAPABILITY", `Table action ${t.action} is unavailable for this selection.`), v) for (let t of v.steps) e.step(t);
2530
+ }
2531
+ function Vn(e, t, n, r, i) {
2532
+ let { from: a, to: o } = Rn(t, r);
2533
+ switch (n.type) {
2534
+ case "insertContent": {
2535
+ let i = n.position === "before" ? a : n.position === "after" ? o : a;
2536
+ n.position === "at" && r.kind !== "cursor" && Z("OUT_OF_SCOPE", "Insertion at target requires a cursor."), t.insert(i, Ln(e, n.content));
2537
+ break;
2538
+ }
2539
+ case "replaceText":
2540
+ r.kind !== "textRange" && r.kind !== "cursor" && Z("OUT_OF_SCOPE", "Text replacement requires a text selection."), t.insertText(n.text, a, o);
2541
+ break;
2542
+ case "replaceFragment":
2543
+ r.kind === "cursor" && Z("OUT_OF_SCOPE", "Fragment replacement requires a selected range."), t.replaceWith(a, o, Ln(e, n.content));
2544
+ break;
2545
+ case "setMarks":
2546
+ r.kind !== "textRange" && Z("OUT_OF_SCOPE", "Marks require selected text.");
2547
+ for (let r of n.marks) {
2548
+ let n = e.schema.marks[r.type], i = [];
2549
+ t.doc.nodesBetween(a, o, (e, t) => {
2550
+ if (!e.isText) return;
2551
+ let s = Math.max(a, t), c = Math.min(o, t + e.nodeSize);
2552
+ if (s >= c) return;
2553
+ let l = e.marks.find((e) => e.type === n);
2554
+ i.push({
2555
+ from: s,
2556
+ to: c,
2557
+ attrs: {
2558
+ ...l?.attrs,
2559
+ ...r.attrs
2560
+ }
2561
+ });
2562
+ });
2563
+ for (let e of i) t.addMark(e.from, e.to, n.create(e.attrs));
2564
+ }
2565
+ break;
2566
+ case "unsetMarks":
2567
+ r.kind !== "textRange" && Z("OUT_OF_SCOPE", "Marks require selected text.");
2568
+ for (let r of n.markTypes) t.removeMark(a, o, e.schema.marks[r]);
2569
+ break;
2570
+ case "setNodeAttributes": {
2571
+ "aiId" in n.attrs && Z("OUT_OF_SCOPE", "AI cannot set node identity.");
2572
+ let { node: e, pos: i } = zn(t, r);
2573
+ e.type.name !== n.nodeType && Z("TARGET_NOT_FOUND", "Target node type changed."), t.setNodeMarkup(i, void 0, {
2574
+ ...e.attrs,
2575
+ ...n.attrs
2576
+ });
2577
+ break;
2578
+ }
2579
+ case "unsetNodeAttributes": {
2580
+ n.attributes.includes("aiId") && Z("OUT_OF_SCOPE", "AI cannot remove node identity.");
2581
+ let { node: e, pos: i } = zn(t, r);
2582
+ e.type.name !== n.nodeType && Z("TARGET_NOT_FOUND", "Target node type changed.");
2583
+ let a = { ...e.attrs };
2584
+ for (let t of n.attributes) a[t] = e.type.spec.attrs?.[t]?.default ?? null;
2585
+ t.setNodeMarkup(i, void 0, a);
2586
+ break;
2587
+ }
2588
+ case "deleteContent":
2589
+ (r.kind === "cursor" || r.kind === "document") && Z("OUT_OF_SCOPE", "Deletion requires a selected target."), t.delete(a, o);
2590
+ break;
2591
+ case "moveBlocks": {
2592
+ r.kind !== "node" && r.kind !== "blockSet" && Z("OUT_OF_SCOPE", "Move requires a selected block.");
2593
+ let e = i.get(n.destinationRef);
2594
+ (!e || ![
2595
+ "node",
2596
+ "blockSet",
2597
+ "cursor"
2598
+ ].includes(e.kind)) && Z("OUT_OF_SCOPE", "Move destination is not authorized.");
2599
+ let s = n.position === "before" ? e.from : e.to;
2600
+ s >= r.from && s <= r.to && Z("OUT_OF_SCOPE", "Cannot move a block into itself.");
2601
+ let c = t.doc.nodeAt(a);
2602
+ (!c || o !== a + c.nodeSize || !c.isBlock) && Z("OUT_OF_SCOPE", "Move source must be one complete block.");
2603
+ let l = t.doc.resolve(a).parent, u = t.doc.resolve(t.mapping.map(s));
2604
+ l !== (e.kind === "cursor" && u.parent.isTextblock ? u.node(u.depth - 1) : u.parent) && Z("UNSUPPORTED_CAPABILITY", "Cross-container moves are not supported."), t.delete(a, o);
2605
+ let d = t.mapping.map(s, n.position === "before" ? -1 : 1);
2606
+ t.insert(d, c);
2607
+ break;
2608
+ }
2609
+ case "transformBlocks": {
2610
+ n.attrs && Object.prototype.hasOwnProperty.call(n.attrs, "aiId") && Z("OUT_OF_SCOPE", "AI cannot set node identity.");
2611
+ let { node: i, pos: a } = zn(t, r), o = e.schema.nodes[n.nodeType];
2612
+ if ((!o || ![
2613
+ "paragraph",
2614
+ "heading",
2615
+ "blockquote",
2616
+ "bulletList",
2617
+ "orderedList",
2618
+ "taskList"
2619
+ ].includes(n.nodeType)) && Z("UNSUPPORTED_CAPABILITY", "This block transformation is not supported."), ["paragraph", "heading"].includes(i.type.name) && ["paragraph", "heading"].includes(n.nodeType)) t.setNodeMarkup(a, o, {
2620
+ ...i.attrs,
2621
+ ...n.attrs
2622
+ });
2623
+ else if (["paragraph", "heading"].includes(i.type.name) && n.nodeType === "blockquote") t.replaceWith(a, a + i.nodeSize, o.create({ ...n.attrs }, i));
2624
+ else if (["paragraph", "heading"].includes(i.type.name) && [
2625
+ "bulletList",
2626
+ "orderedList",
2627
+ "taskList"
2628
+ ].includes(n.nodeType)) {
2629
+ let r = e.schema.nodes[n.nodeType === "taskList" ? "taskItem" : "listItem"], s = i.type.name === "paragraph" ? i : e.schema.nodes.paragraph.create(i.attrs, i.content, i.marks);
2630
+ t.replaceWith(a, a + i.nodeSize, o.create({ ...n.attrs }, r.create(null, s)));
2631
+ } else if (["paragraph", "heading"].includes(n.nodeType) && [
2632
+ "blockquote",
2633
+ "bulletList",
2634
+ "orderedList",
2635
+ "taskList"
2636
+ ].includes(i.type.name)) {
2637
+ let e = i.type.name === "blockquote" ? i.firstChild : i.firstChild?.firstChild;
2638
+ (i.childCount !== 1 || !e || !["paragraph", "heading"].includes(e.type.name)) && Z("UNSUPPORTED_CAPABILITY", "Only a single-paragraph container can be unwrapped.");
2639
+ let r = {
2640
+ ...e.attrs,
2641
+ ...n.attrs,
2642
+ aiId: i.attrs.aiId ?? e.attrs.aiId
2643
+ };
2644
+ t.replaceWith(a, a + i.nodeSize, o.create(r, e.content, e.marks));
2645
+ } else ["bulletList", "orderedList"].includes(i.type.name) && ["bulletList", "orderedList"].includes(n.nodeType) ? t.setNodeMarkup(a, o, {
2646
+ ...i.attrs,
2647
+ ...n.attrs
2648
+ }) : Z("UNSUPPORTED_CAPABILITY", "This block transformation is not supported.");
2649
+ break;
2650
+ }
2651
+ case "tableOperation": {
2652
+ r.kind !== "tableCells" && r.kind !== "node" && r.kind !== "blockSet" && Z("OUT_OF_SCOPE", "Table action requires a table target.");
2653
+ let i = t.doc.nodeAt(a);
2654
+ if (!r.positions && (!i || ![
2655
+ "table",
2656
+ "tableRow",
2657
+ "tableCell",
2658
+ "tableHeader"
2659
+ ].includes(i.type.name)) && Z("OUT_OF_SCOPE", "Table action requires a table target."), n.action === "setCellContent") {
2660
+ let { node: i, pos: a } = zn(t, r);
2661
+ ["tableCell", "tableHeader"].includes(i.type.name) || Z("OUT_OF_SCOPE", "Target must be a table cell."), t.replaceWith(a + 1, a + i.nodeSize - 1, Ln(e, n.content ?? []));
2662
+ } else if (n.action === "setCellBackground") {
2663
+ let { node: e, pos: i } = zn(t, r);
2664
+ ["tableCell", "tableHeader"].includes(e.type.name) || Z("OUT_OF_SCOPE", "Target must be a table cell."), t.setNodeMarkup(i, void 0, {
2665
+ ...e.attrs,
2666
+ backgroundColor: n.value ?? null
2667
+ });
2668
+ } else if (n.action === "setTableTheme") {
2669
+ let e = t.doc.resolve(a), r = -1;
2670
+ for (let t = e.depth; t > 0; t--) if (e.node(t).type.name === "table") {
2671
+ r = t;
2672
+ break;
2673
+ }
2674
+ i?.type.name !== "table" && r < 0 && Z("OUT_OF_SCOPE", "Target is not inside a table.");
2675
+ let o = i?.type.name === "table" ? a : e.before(r), s = t.doc.nodeAt(o);
2676
+ s || Z("TARGET_NOT_FOUND", "Table is missing."), t.setNodeMarkup(o, void 0, {
2677
+ ...s.attrs,
2678
+ tableTheme: n.value ?? null
2679
+ });
2680
+ } else Bn(t, n, r);
2681
+ break;
2682
+ }
2683
+ }
2684
+ }
2685
+ function Hn(e) {
2686
+ let t = /* @__PURE__ */ new Set();
2687
+ e.doc.descendants((n, r) => {
2688
+ if (!In.has(n.type.name)) return !0;
2689
+ let i = n.attrs.aiId;
2690
+ if (typeof i != "string" || !i || t.has(i)) {
2691
+ let i = crypto.randomUUID();
2692
+ e.setNodeMarkup(r, void 0, {
2693
+ ...n.attrs,
2694
+ aiId: i
2695
+ }), t.add(i);
2696
+ } else t.add(i);
2697
+ return !0;
2698
+ });
2699
+ }
2700
+ function Un(e, t, n) {
2701
+ let r = e.tr;
2702
+ try {
2703
+ for (let i of t.operations) {
2704
+ let t = n.get(i.targetRef);
2705
+ t || Z("OUT_OF_SCOPE", `Unknown targetRef: ${i.targetRef}.`), Vn(e, r, i, t, n);
2706
+ }
2707
+ Hn(r), r.doc.check();
2708
+ let i = ut(r.doc.toJSON());
2709
+ i.valid || Z("INVALID_DOCUMENT", i.errors[0]?.message ?? "Patch produced invalid content.");
2710
+ } catch (e) {
2711
+ if (e instanceof Fn) throw e;
2712
+ Z("INVALID_DOCUMENT", e instanceof Error ? e.message : "Patch could not be applied.");
2713
+ }
2714
+ return r.setMeta("richTextAi", {
2715
+ requestId: t.requestId,
2716
+ contextId: t.contextId
2717
+ }), r;
2718
+ }
2719
+ //#endregion
2720
+ //#region src/assets/icons/mono/To-do.svg?raw
2721
+ var Wn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M900.3614811 38.68444445H123.6385189C77.52059221 38.68444445 38.68444445 77.52059221 38.68444445 123.6385189v776.7229622c0 46.11792555 38.83614777 84.95407445 84.95407445 84.95407445h776.7229622c46.11792555 0 84.95407445-38.83614777 84.95407445-84.95407445V123.6385189c0-46.11792555-38.83614777-84.95407445-84.95407445-84.95407445z m12.13629668 861.67703665c0 7.28177778-4.8545189 12.13629667-12.13629668 12.13629668H123.6385189c-7.28177778 0-12.13629667-4.8545189-12.13629668-12.13629668V123.6385189c0-7.28177778 4.8545189-12.13629667 12.13629668-12.13629668h776.7229622c7.28177778 0 12.13629667 4.8545189 12.13629668 12.13629668v776.7229622z\" /><path d=\"M730.45333333 363.93718557l-276.70755555 266.99851776-133.49925888-143.20829554c-14.56355555-14.56355555-36.40888889-14.56355555-50.97244445-2.42726002-14.56355555 14.56355555-14.56355555 36.40888889-2.42726002 50.97244444l160.19911112 169.90814891c7.28177778 7.28177778 16.99081443 12.13629667 26.69985223 12.13629554 9.70903666 0 19.41807445-4.8545189 24.27259221-9.70903666l300.98014891-291.27111111c14.56355555-14.56355555 14.56355555-36.40888889 0-50.97244444-12.13629667-14.56355555-33.98163001-16.99081443-48.54518557-2.42725888z\" /></svg>", Gn = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M512 14.41185223C237.71970333 14.41185223 14.41185223 237.71970333 14.41185223 512S237.71970333 1009.58814777 512 1009.58814777 1009.58814777 786.28029667 1009.58814777 512 786.28029667 14.41185223 512 14.41185223z m0 922.35851776c-233.01688889 0-424.77036999-191.7534811-424.77036999-424.77036999S278.98311111 87.22963001 512 87.22963001 936.77036999 278.98311111 936.77036999 512 745.01688889 936.77036999 512 936.77036999z\" /><path d=\"M706.18074112 475.59111111h-157.77185223V317.81925888c0-19.41807445-16.99081443-36.40888889-36.40888889-36.40888889s-36.40888889 16.99081443-36.40888889 36.40888889v157.77185223H317.81925888c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.40888889s16.99081443 36.40888889 36.40888889 36.40888889h157.77185223V706.18074112c0 19.41807445 16.99081443 36.40888889 36.40888889 36.40888889s36.40888889-16.99081443 36.40888889-36.40888889v-157.77185223H706.18074112c19.41807445 0 36.40888889-16.99081443 36.40888889-36.40888889s-16.99081443-36.40888889-36.40888889-36.40888889z\" /></svg>", Kn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M953.86906294 470.57477531H553.42522469V70.13093706c0-22.0934536-19.33177108-41.42522469-41.42522469-41.4252247s-41.42522469 19.33177108-41.42522469 41.4252247v400.44383825H70.13093706c-22.0934536 0-41.42522469 19.33177108-41.4252247 41.42522469s19.33177108 41.42522469 41.4252247 41.42522469h400.44383825V953.86906294c0 22.0934536 19.33177108 41.42522469 41.42522469 41.4252247s41.42522469-19.33177108 41.42522469-41.4252247V553.42522469H953.86906294c22.0934536 0 41.42522469-19.33177108 41.4252247-41.42522469s-19.33177108-41.42522469-41.4252247-41.42522469z\" /></svg>", qn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M952.14301275 457.62939259c-12.94538311-12.94538311-36.24707201-15.53445925-51.78153127 0l-416.84132386 414.25224651c-90.61767941 90.61767941-240.78411852 90.61767941-333.99087407 0-44.01430164-44.01430164-69.90506667-103.56306132-69.90506666-165.70089835s23.30168889-121.68659794 69.90506666-165.70089837L566.37060741 123.63851852c56.95968355-56.95968355 147.57736297-56.95968355 204.53704651 0 28.47984238 28.47984238 41.42522429 64.72691317 41.42522549 100.97398518 0 38.83614815-15.53445925 75.08322016-41.42522549 100.97398519L356.65540741 745.01688889c-20.71261275 20.71261275-54.37060741 20.71261275-77.6722963 0-10.35630577-10.35630577-15.53445925-23.30168889-15.53445926-38.83614814s5.17815349-28.47984238 15.53445926-38.83614816l385.77240534-383.18332798c12.94538311-12.94538311 15.53445925-36.24707201 0-51.78153128-12.94538311-15.53445925-36.24707201-15.53445925-51.78153127 0L227.20157984 615.56306132c-23.30168889 23.30168889-36.24707201 56.95968355-36.24707079 90.61767943S203.89989095 770.90765392 227.20157984 796.79842016c49.19245392 49.19245392 129.45382756 49.19245392 178.64628148 0L822.68918518 379.9570963c41.42522429-41.42522429 64.72691317-95.79583169 64.72691318-152.75551646s-23.30168889-113.91936831-64.72691318-152.75551523a217.22352238 217.22352238 0 0 0-308.10010904 0l-414.25224651 414.2522465c-56.95968355 56.95968355-90.61767941 134.63197984-90.61767941 217.48242964s31.06891852 160.52274608 90.61767941 217.48242962c59.5487609 59.5487609 139.81013333 90.61767941 217.48242962 90.61767941s157.93366873-31.06891852 217.48242964-90.61767941l416.84132386-414.25224651c12.94538311-15.53445925 12.94538311-38.83614815 0-51.78153127z\" /></svg>", Jn = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M904.91891318 188.36543169H167.03209836l113.91936831-113.91936708c15.53445925-15.53445925 15.53445925-41.42522429 0-56.95968477-15.53445925-15.53445925-41.42522429-15.53445925-56.95968355 0l-176.05720534 176.05720534c-15.53445925 15.53445925-15.53445925 41.42522429 0 56.95968355l176.05720534 176.05720535c7.76722963 7.76722963 18.12353539 12.94538311 28.47984117 12.94538311s20.71261275-5.17815349 28.47984238-12.94538311c15.53445925-15.53445925 15.53445925-41.42522429 0-56.95968355L179.97748149 268.62680534h724.94143169c7.76722963 0 12.94538311 5.17815349 12.94538312 12.94538191v517.81530905c0 7.76722963-5.17815349 12.94538311-12.94538312 12.94538311H76.41442016c-20.71261275 0-38.83614815 18.12353539-38.83614815 38.83614815s18.12353539 38.83614815 38.83614815 38.83614815h828.50449302c49.19245392 0 90.61767941-41.42522429 90.61767941-90.61767941V278.98311111c0-49.19245392-41.42522429-90.61767941-90.61767941-90.61767942z\" /></svg>", Yn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M370.036364 35.002182l517.399272 517.445818 2.839273 3.258182 1.070546 1.536c1.396364 2.141091 2.187636 4.328727 1.954909 5.12 3.770182 11.496727 3.770182 23.086545 0.232727 29.184 0 3.723636-1.303273 6.237091-5.026909 10.24l-366.312727 366.452363c-21.643636 21.597091-47.010909 32.488727-75.869091 32.488728-26.763636 0-55.202909-11.776-75.869091-32.488728L55.854545 653.684364c-43.473455-39.842909-43.473455-108.544-0.139636-151.877819l335.592727-335.592727L315.112727 89.925818A37.888 37.888 0 0 1 311.528727 39.051636l3.537455-4.049454a38.027636 38.027636 0 0 1 54.923636 0z m519.074909 708.887273h6.516363l72.471273 72.471272c43.473455 39.842909 43.473455 108.544 0.279273 151.738182-39.842909 43.473455-108.590545 43.473455-151.738182 0.279273-43.473455-39.842909-43.473455-108.590545-0.139636-151.877818l72.610909-72.610909z m-232.680728-19.828364h-420.305454l189.207273 189.253818a28.672 28.672 0 0 0 38.167272 3.258182l3.723637-3.258182 189.207272-189.253818z m235.93891 126.370909l-20.945455 20.945455a26.810182 26.810182 0 0 0-9.029818 20.945454c0 18.245818 11.776 30.021818 29.975273 30.021818 18.152727 0 29.975273-11.776 29.975272-29.975272a26.810182 26.810182 0 0 0-9.029818-20.945455l-20.945454-20.945455zM446.277818 221.137455l-335.592727 335.592727a28.858182 28.858182 0 0 0 0 41.890909l45.149091 47.057454 577.629091 1.396364 69.399272-69.352727L446.370909 221.090909z\" /></svg>", Xn = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M1.81641 10.5706C3.23498 9.64808 3.97475 9.16094 5.39333 8.23847C5.93038 7.88923 6.64748 7.92724 7.14035 8.33105L9.28597 10.0126\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linejoin=\"miter\"\n fill=\"none\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n d=\"M7 14.25H3.25C2.42157 14.25 1.75 13.5784 1.75 12.75V3.25C1.75 2.42157 2.42157 1.75 3.25 1.75H12.75C13.5784 1.75 14.25 2.42157 14.25 3.25V8\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n fill=\"none\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n d=\"M12 5.25024C12 5.9406 11.4404 6.50024 10.75 6.50024C10.0596 6.50024 9.5 5.9406 9.5 5.25024C9.5 4.55989 10.0596 4.00024 10.75 4.00024C11.4404 4.00024 12 4.55989 12 5.25024Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10 11.9995H14.5M12.25 9.74951L12.25 14.2495\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"miter\"\n fill=\"none\"\n vector-effect=\"non-scaling-stroke\"\n />\n</svg>\n", Zn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M577.98578013 512L983.32700093 106.65877919c18.85308003-18.85308003 18.85308003-47.1327001 0-65.98578012-18.85308003-18.85308003-47.1327001-18.85308003-65.98578012 0L512 446.01421987l-405.34122081-408.48340032c-18.85308003-18.85308003-47.1327001-18.85308003-65.98578012 0-18.85308003 18.85308003-18.85308003 47.1327001 0 65.98578012l405.3412208 408.48340033-408.48340032 405.34122081c-18.85308003 18.85308003-18.85308003 47.1327001 0 65.98578012 9.42654002 9.42654002 21.99525954 12.56871953 34.5639791 12.56871954s25.13744054-3.14217952 34.56398054-12.56871954L512 577.98578013 917.34122081 983.32700093c9.42654002 9.42654002 21.99525954 12.56871953 34.56398054 12.56871954s25.13744054-3.14217952 34.5639791-12.56871954c18.85308003-18.85308003 18.85308003-47.1327001 0-65.98578012L577.98578013 512z\" /></svg>", Qn = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M295.97392555 266.84681443c-14.56355555-14.56355555-36.40888889-14.56355555-50.97244445 0l-218.45333333 218.45333334c-14.56355555 14.56355555-14.56355555 36.40888889 0 50.97244444l218.45333333 218.45333334c7.28177778 7.28177778 16.99081443 9.70903666 26.69985223 9.70903779s19.41807445-2.42725888 26.69985224-9.70903779c14.56355555-14.56355555 14.56355555-36.40888889 0-50.97244445L101.79318557 512l191.7534811-191.7534811c14.56355555-14.56355555 14.56355555-38.83614777 2.42725888-53.39970447zM999.87911111 485.30014777l-218.45333333-218.45333334c-14.56355555-14.56355555-36.40888889-14.56355555-50.97244445 0-14.56355555 14.56355555-14.56355555 36.40888889 0 50.97244445l191.7534811 191.75348224-191.7534811 191.7534811c-14.56355555 14.56355555-14.56355555 36.40888889 0 50.97244445 7.28177778 7.28177778 16.99081443 9.70903666 26.69985224 9.70903666s19.41807445-2.42725888 26.69985109-9.70903666l218.45333333-218.45333334c9.70903666-9.70903666 9.70903666-33.98163001-2.42725888-48.54518556zM638.2174811 16.83911111c-19.41807445-4.8545189-38.83614777 7.28177778-43.69066667 26.69985223L346.94636999 956.18844445c-4.8545189 19.41807445 7.28177778 38.83614777 26.69985223 43.69066666 2.42725888 0 7.28177778 2.42725888 9.70903666 2.42725888 16.99081443 0 31.55436999-9.70903666 33.98163001-26.69985109L662.49007445 60.52977778c4.8545189-19.41807445-4.8545189-38.83614777-24.27259335-43.69066667z\" /></svg>", $n = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M238.93333333 238.93333333a91.02222187 91.02222187 0 0 1 91.02222187-91.02222186 45.51111147 45.51111147 0 1 0 0-91.02222294 182.0444448 182.0444448 0 0 0-182.04444373 182.0444448v136.53333334a91.02222187 91.02222187 0 0 1-91.02222294 91.02222186 45.51111147 45.51111147 0 1 0 0 91.02222294 91.02222187 91.02222187 0 0 1 91.02222294 91.02222186v136.53333334a182.0444448 182.0444448 0 0 0 182.04444373 182.0444448 45.51111147 45.51111147 0 1 0 0-91.02222294 91.02222187 91.02222187 0 0 1-91.02222187-91.02222186v-136.53333334a182.0444448 182.0444448 0 0 0-62.80533333-136.53333333A182.0444448 182.0444448 0 0 0 238.93333333 375.46666667V238.93333333z m728.17777814 227.5555552a91.02222187 91.02222187 0 0 1-91.02222294-91.02222186V238.93333333a182.0444448 182.0444448 0 0 0-182.04444373-182.0444448 45.51111147 45.51111147 0 0 0 0 91.02222294 91.02222187 91.02222187 0 0 1 91.02222187 91.02222186v136.53333334a182.0444448 182.0444448 0 0 0 62.80533333 136.53333333A182.0444448 182.0444448 0 0 0 785.06666667 648.53333333v136.53333334a91.02222187 91.02222187 0 0 1-91.02222187 91.02222186 45.51111147 45.51111147 0 0 0 0 91.02222294 182.0444448 182.0444448 0 0 0 182.04444373-182.0444448v-136.53333334a91.02222187 91.02222187 0 0 1 91.02222294-91.02222186 45.51111147 45.51111147 0 1 0 0-91.02222294z\" /></svg>", er = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M926.25224651 16.24493868H97.74775349c-49.19245392 0-90.61767941 41.42522429-90.61767941 90.61767821v621.37837037c0 49.19245392 41.42522429 90.61767941 90.61767941 90.61767941h183.82443376V961.25787615c0 15.53445925 10.35630577 31.06891852 23.30168889 36.24707201 5.17815349 2.58907614 10.35630577 2.58907614 15.53445925 2.58907613 10.35630577 0 20.71261275-5.17815349 28.47984239-12.9453819l165.70089836-168.28997572H926.25224651c49.19245392 0 90.61767941-41.42522429 90.61767941-90.61767941V106.86261689c0-49.19245392-41.42522429-90.61767941-90.61767941-90.61767821z m12.94538312 711.99604858c0 7.76722963-5.17815349 12.94538311-12.94538312 12.94538311H499.05461689c-10.35630577 0-20.71261275 5.17815349-28.47984118 12.94538313l-108.74121481 113.91936709V780.02251852c0-20.71261275-18.12353539-38.83614815-38.83614815-38.83614815H97.74775349c-7.76722963 0-12.94538311-5.17815349-12.94538312-12.94538311V106.86261689c0-7.76722963 5.17815349-12.94538311 12.94538312-12.94538191h828.50449302c7.76722963 0 12.94538311 5.17815349 12.94538312 12.94538191v621.37837037z\" /><path d=\"M512 443.44256832H253.09234608c-20.71261275 0-38.83614815 18.12353539-38.83614814 38.83614813S232.37973333 521.11486461 253.09234608 521.11486461h258.90765392c20.71261275 0 38.83614815-18.12353539 38.83614815-38.83614816S532.71261275 443.44256832 512 443.44256832zM706.18074075 262.20720948H253.09234608c-20.71261275 0-38.83614815 18.12353539-38.83614814 38.83614815S232.37973333 339.87950578 253.09234608 339.87950578h453.08839467c20.71261275 0 38.83614815-18.12353539 38.83614814-38.83614815s-18.12353539-38.83614815-38.83614814-38.83614815z\" /></svg>", tr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M973.17925888 160.04740779h-109.22666667V50.82074112c0-19.41807445-16.99081443-36.40888889-36.40888888-36.40888889s-36.40888889 16.99081443-36.4088889 36.40888889v109.22666667H245.0014811c-46.11792555 0-84.95407445 38.83614777-84.95407331 84.95407331v546.13333333H50.82074112c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.4088889s16.99081443 36.40888889 36.40888889 36.40888888h109.22666667V973.17925888c0 19.41807445 16.99081443 36.40888889 36.40888888 36.40888889s36.40888889-16.99081443 36.4088889-36.40888889v-109.22666667H778.9985189c46.11792555 0 84.95407445-38.83614777 84.95407331-84.95407331V232.86518557H973.17925888c19.41807445 0 36.40888889-16.99081443 36.40888889-36.4088889s-16.99081443-36.40888889-36.40888889-36.40888888zM791.13481443 778.9985189c0 7.28177778-4.8545189 12.13629667-12.13629553 12.13629553H232.86518557V245.0014811c0-7.28177778 4.8545189-12.13629667 12.13629553-12.13629553h546.13333333V778.9985189z\" /></svg>", nr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M996.562475 131.235956V848.476632a322.978348 322.978348 0 0 1-1.356084 57.134648 151.651166 151.651166 0 0 1-27.659003 64.401212 138.857918 138.857918 0 0 1-80.3416 50.09836 236.700681 236.700681 0 0 1-52.401145 2.712169H189.999339a246.832934 246.832934 0 0 1-48.358479-1.893401 137.757698 137.757698 0 0 1-81.416232-46.874462 151.369715 151.369715 0 0 1-30.08972-63.60803 329.067934 329.067934 0 0 1-2.149266-63.32658v-675.483513a293.553877 293.553877 0 0 1 3.479763-65.194394A137.348314 137.348314 0 0 1 118.254802 8.625464 221.655821 221.655821 0 0 1 194.835187 0.540131h516.054052c19.343392 0 141.03277 0.179105 160.376162 0.255865a154.695959 154.695959 0 0 1 53.475778 16.170666 143.437901 143.437901 0 0 1 63.966242 74.917262 154.823892 154.823892 0 0 1 6.447797 25.867948c0.51173 4.503223 0.9467 8.98086 1.407257 13.484084z m-76.580384 4.298532l-0.537317-5.654616-3.50535-13.484084a62.891609 62.891609 0 0 0-25.586497-30.447931 111.736231 111.736231 0 0 0-58.593077-8.622649H204.583642a227.412783 227.412783 0 0 0-54.550411 1.8934 61.407592 61.407592 0 0 0-42.703863 40.938395 170.841039 170.841039 0 0 0-2.686582 44.725196v686.255429a222.065205 222.065205 0 0 0 1.330498 46.900049 71.642191 71.642191 0 0 0 15.351898 28.835981c15.761282 19.548083 41.833922 19.113113 77.117701 19.113113h633.163448a183.352836 183.352836 0 0 0 42.447998-1.867814 62.149601 62.149601 0 0 0 33.59507-22.362598c14.09816-19.241046 12.358278-40.145213 12.358278-73.049448V135.534488zM828.408019 507.152766a35.821095 35.821095 0 0 1-28.477771 39.889349 141.083943 141.083943 0 0 1-28.145146 0.537316h-362.816524a36.15372 36.15372 0 0 1-5.910481-70.618731 121.97083 121.97083 0 0 1 29.833855-1.074633h341.323867a95.974949 95.974949 0 0 1 33.59507 2.968034 36.614277 36.614277 0 0 1 18.524624 19.676016z m-4.145013 231.992766a35.514057 35.514057 0 0 1-29.552403 37.995948l-48.358479 0.281451H458.32493c-42.192133 0-74.78933 5.756962-81.134781-31.522564a33.467138 33.467138 0 0 1 4.01708-20.750649c13.202632-25.816775 45.006648-19.420151 82.235001-19.420151H734.991719a197.476582 197.476582 0 0 1 71.207221 4.60557 37.10042 37.10042 0 0 1 16.375358 20.187746z m10.464878-461.836266a36.691036 36.691036 0 0 1-17.475578 35.56523 162.423081 162.423081 0 0 1-67.164554 4.835848h-296.803362c-40.759289 0-69.979069 4.01708-76.043068-31.778429a33.467138 33.467138 0 0 1 4.01708-20.750648c12.255932-23.769855 38.021534-19.420151 72.81917-19.420151h309.59661a154.823892 154.823892 0 0 1 50.789196 3.249485 36.179306 36.179306 0 0 1 18.268759 19.676016zM230.937734 230.818601a51.172993 51.172993 0 1 1-51.172994 51.172994 51.172993 51.172993 0 0 1 51.172994-51.172994z m0 230.278471a51.172993 51.172993 0 1 1-51.172994 51.172993 51.172993 51.172993 0 0 1 51.172994-51.172993z m0 230.278471a51.172993 51.172993 0 1 1-51.172994 51.172993 51.172993 51.172993 0 0 1 51.172994-51.172993z\" /></svg>", rr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M900.3614811 99.36592555h-157.77185109V50.82074112c0-19.41807445-16.99081443-36.40888889-36.40888889-36.40888889s-36.40888889 16.99081443-36.40888889 36.40888889v48.54518443h-315.54370446V50.82074112c0-19.41807445-16.99081443-36.40888889-36.40888889-36.40888889s-36.40888889 16.99081443-36.40888889 36.40888889v48.54518443H123.6385189c-46.11792555 0-84.95407445 38.83614777-84.95407445 84.95407445v703.90518557C38.68444445 934.34311111 77.52059221 973.17925888 123.6385189 973.17925888h776.7229622c46.11792555 0 84.95407445-38.83614777 84.95407445-84.95407331v-703.90518557C985.31555555 138.20207445 946.47940779 99.36592555 900.3614811 99.36592555zM123.6385189 172.18370333h157.77185109v72.81777777c0 19.41807445 16.99081443 36.40888889 36.40888889 36.40888889s36.40888889-16.99081443 36.40888889-36.40888889v-72.81777777h315.54370446v72.81777777c0 19.41807445 16.99081443 36.40888889 36.40888889 36.40888889s36.40888889-16.99081443 36.40888889-36.40888889v-72.81777777H900.3614811c7.28177778 0 12.13629667 4.8545189 12.13629668 12.13629667v220.88059221c-4.8545189-2.42725888-7.28177778-2.42725888-12.13629668-2.42725888H123.6385189c-4.8545189 0-7.28177778 0-12.13629668 2.42725888v-220.88059221c0-7.28177778 4.8545189-12.13629667 12.13629668-12.13629667z m776.7229622 728.17777777H123.6385189c-7.28177778 0-12.13629667-4.8545189-12.13629668-12.13629553V473.16385223c4.8545189 2.42725888 7.28177778 2.42725888 12.13629668 2.42725888h776.7229622c4.8545189 0 7.28177778 0 12.13629668-2.42725888v415.06133334c0 7.28177778-4.8545189 12.13629667-12.13629668 12.13629553z\" /><path d=\"M366.36444445 621.22666667h-97.09037c-19.41807445 0-36.40888889 16.99081443-36.40888888 36.40888888s16.99081443 36.40888889 36.40888888 36.4088889h97.09037c19.41807445 0 36.40888889-16.99081443 36.40888888-36.4088889s-16.99081443-36.40888889-36.40888888-36.40888888zM754.72592555 621.22666667h-218.45333334c-19.41807445 0-36.40888889 16.99081443-36.40888888 36.40888888s16.99081443 36.40888889 36.40888888 36.4088889h218.45333334c19.41807445 0 36.40888889-16.99081443 36.40888888-36.4088889s-16.99081443-36.40888889-36.40888888-36.40888888z\" /></svg>", ir = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M952.14301275 183.18727941h-245.962272V97.74775349c0-49.19245392-41.42522429-90.61767941-90.61767943-90.61767941h-207.12612264c-49.19245392 0-90.61767941 41.42522429-90.61767943 90.61767941v85.43952592H71.85698725c-20.71261275 0-38.83614815 18.12353539-38.83614815 38.83614815s18.12353539 38.83614815 38.83614815 38.83614815h64.72691439V926.25224651c0 49.19245392 41.42522429 90.61767941 90.6176782 90.61767941h569.59684032c49.19245392 0 90.61767941-41.42522429 90.6176782-90.61767941V260.85957571H952.14301275c20.71261275 0 38.83614815-18.12353539 38.83614815-38.83614815s-18.12353539-38.83614815-38.83614815-38.83614815zM395.49155555 97.74775349c0-7.76722963 5.17815349-12.94538311 12.94538313-12.94538312h207.12612264c7.76722963 0 12.94538311 5.17815349 12.94538313 12.94538312v85.43952592h-233.0168889V97.74775349z m414.25224651 828.50449302c0 7.76722963-5.17815349 12.94538311-12.9453819 12.94538312H227.20157984c-7.76722963 0-12.94538311-5.17815349-12.9453819-12.94538312V266.03772799h595.48760412V926.25224651z\" /><path d=\"M408.43693868 783.85303703c20.71261275 0 38.83614815-18.12353539 38.83614815-38.83614814V486.10923498c0-20.71261275-18.12353539-38.83614815-38.83614815-38.83614815s-38.83614815 18.12353539-38.83614815 38.83614815v258.90765391c0 20.71261275 18.12353539 38.83614815 38.83614815 38.83614814zM615.56306132 783.85303703c20.71261275 0 38.83614815-18.12353539 38.83614815-38.83614814V486.10923498c0-20.71261275-18.12353539-38.83614815-38.83614815-38.83614815s-38.83614815 18.12353539-38.83614815 38.83614815v258.90765391c0 20.71261275 18.12353539 38.83614815 38.83614815 38.83614814z\" /></svg>", ar = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M318.68228521 97.74775309m-82.85044939 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /><path d=\"M705.31771479 97.74775309m-82.85044938 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /><path d=\"M318.68228521 512m-82.85044939 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /><path d=\"M705.31771479 512m-82.85044938 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /><path d=\"M318.68228521 926.25224691m-82.85044939 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /><path d=\"M705.31771479 926.25224691m-82.85044938 0a82.85044939 82.85044939 0 1 0 165.70089877 0 82.85044939 82.85044939 0 1 0-165.70089877 0Z\" /></svg>", or = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill=\"currentColor\"\n d=\"M880.9302 268.359418l-170.568047-165.301795L795.646177 20.479868a74.093238 74.093238 0 0 1 102.399341 0l68.168705 66.120718a68.607559 68.607559 0 0 1 0 99.181077l-85.284023 82.577755zM385.390528 748.246618L214.749339 583.091109l463.722734-445.656564 170.641188 165.301795-463.722733 445.583421zM77.753649 883.852604l103.789047-268.505703 169.105198 163.838947-272.894245 104.593613zM843.773867 940.318527c23.917561 0 43.227151 18.724451 43.227151 41.837445a42.495727 42.495727 0 0 1-43.154008 41.837445H79.728493a42.495727 42.495727 0 0 1-43.154008-41.837445c0-23.112994 19.30959-41.837445 43.154008-41.837445h764.045374z\"\n />\n</svg>\n", sr = "<svg viewBox=\"0 0 1028 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill=\"currentColor\"\n d=\"M559.78666667 753.28v137.6h206.72a34.56 34.56 0 1 1 0 69.12H283.94666667a34.56 34.56 0 1 1 0-69.12H490.66666667v-137.6H180.26666667A137.6 137.6 0 0 1 42.66666667 615.68V201.6A137.6 137.6 0 0 1 180.26666667 64h689.28a137.6 137.6 0 0 1 137.6 137.6v414.08a137.6 137.6 0 0 1-137.6 137.6zM180.26666667 133.12a69.76 69.76 0 0 0-68.48 68.48v414.08a69.76 69.76 0 0 0 69.12 69.12h688.64A69.76 69.76 0 0 0 938.66666667 615.68V201.6a69.76 69.76 0 0 0-69.12-69.12z\"\n />\n</svg>\n", cr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M926.25224651 214.25619794H514.58907614c-5.17815349 0-7.76722963-2.58907614-10.35630577-5.17815349l-46.60337778-80.26137244c-15.53445925-25.89076502-46.60337778-44.01430164-77.67229629-44.01430164H97.74775349c-49.19245392 0-90.61767941 41.42522429-90.61767941 90.61767941v673.15990044c0 49.19245392 41.42522429 90.61767941 90.61767941 90.61767941h828.50449302c49.19245392 0 90.61767941-41.42522429 90.61767941-90.61767941V304.87387614c0-49.19245392-41.42522429-90.61767941-90.61767941-90.6176782z m-828.50449302-51.78153127h282.20934281c5.17815349 0 7.76722963 2.58907614 10.35630576 5.17815349l46.60337778 80.26137243c15.53445925 25.89076502 46.60337778 44.01430164 77.6722963 44.01430164H926.25224651c7.76722963 0 12.94538311 5.17815349 12.94538312 12.94538191v90.61767941h-854.39525926V175.42004978c0-7.76722963 5.17815349-12.94538311 12.94538312-12.94538311z m828.50449302 699.05066666H97.74775349c-7.76722963 0-12.94538311-5.17815349-12.94538312-12.94538311V473.16385185h854.39525926V848.57995022c0 7.76722963-5.17815349 12.94538311-12.94538312 12.94538311z\" /></svg>", lr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1.095703125em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1122 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M981.917808 561.09589H140.273973C63.123288 561.09589 0 497.972603 0 420.821918V140.273973C0 63.123288 63.123288 0 140.273973 0h841.643835c77.150685 0 140.273973 63.123288 140.273973 140.273973v280.547945c0 77.150685-63.123288 140.273973-140.273973 140.273972zM140.273973 84.164384c-28.054795 0-56.109589 28.054795-56.109589 56.109589v280.547945c0 28.054795 28.054795 56.109589 56.109589 56.109589h841.643835c28.054795 0 56.109589-28.054795 56.109589-56.109589V140.273973c0-28.054795-28.054795-56.109589-56.109589-56.109589H140.273973zM841.643836 813.589041H140.273973c-21.041096 0-42.082192-21.041096-42.082192-42.082192s21.041096-42.082192 42.082192-42.082191h701.369863c21.041096 0 42.082192 21.041096 42.082191 42.082191s-21.041096 42.082192-42.082191 42.082192zM701.369863 1024H140.273973c-21.041096 0-42.082192-21.041096-42.082192-42.082192s21.041096-42.082192 42.082192-42.082192h561.09589c21.041096 0 42.082192 21.041096 42.082192 42.082192s-21.041096 42.082192-42.082192 42.082192z\" /></svg>", ur = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M977.97525428 301.5046245A55.23363335 55.23363335 0 0 1 1000.89721108 346.29910124v552.33632964a55.23363335 55.23363335 0 0 1-110.46726542 0v-475.72728036l-93.01343827 31.04130085a55.23363335 55.23363335 0 0 1-34.90765556-104.83343486l165.70089876-55.23363334a55.23363335 55.23363335 0 0 1 49.71026963 7.62224133zM61.92545184 70.13093706a55.23363335 55.23363335 0 0 1 55.23363338 55.23363206v331.40179753h331.40179751V125.36456912a55.23363335 55.23363335 0 1 1 110.46726541 0v773.27086176a55.23363335 55.23363335 0 1 1-110.46726541 0v-331.40179753H117.15908519v331.40179753a55.23363335 55.23363335 0 1 1-110.4672667 0V125.36456912a55.23363335 55.23363335 0 0 1 55.23363335-55.23363206z\" /></svg>", dr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M803.27111111 414.90963001a97.09036999 97.09036999 0 0 0-97.09036999 97.09036999v24.27259221a48.54518557 48.54518557 0 1 1-97.09037113 0V512a194.18074112 194.18074112 0 0 1 194.18074112-194.18074112h8.34977223a185.83096889 185.83096889 0 0 1 131.41181554 317.29133113L774.82363221 803.27111111H948.90666667a48.54518557 48.54518557 0 1 1 0 97.09036999h-291.27111112a48.54518557 48.54518557 0 0 1-34.32144554-82.86663111l251.07569778-251.07569778A88.7405989 88.7405989 0 0 0 811.62088334 414.90963001H803.27111111zM75.09333333 123.6385189a48.54518557 48.54518557 0 0 1 48.54518557 48.54518443v291.2711111h291.27111111V172.18370333a48.54518557 48.54518557 0 1 1 97.09036999 0v679.63259334a48.54518557 48.54518557 0 1 1-97.09036999 0v-291.2711111H123.6385189v291.2711111a48.54518557 48.54518557 0 1 1-97.09037113 0V172.18370333a48.54518557 48.54518557 0 0 1 48.54518556-48.54518443z\" /></svg>", fr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M609.09036999 366.36444445a48.54518557 48.54518557 0 0 1 48.54518556-48.54518557h291.27111112a48.54518557 48.54518557 0 0 1 34.32144554 82.86663111l-120.53769443 120.58624A194.27783111 194.27783111 0 0 1 803.27111111 900.3614811a194.18074112 194.18074112 0 0 1-183.1124389-129.56709888 48.54518557 48.54518557 0 0 1 91.55622002-32.28254777A97.09036999 97.09036999 0 1 0 803.27111111 609.09036999h-48.54518556a48.54518557 48.54518557 0 0 1-34.32144555-82.86663111L831.71859001 414.90963001H657.63555555a48.54518557 48.54518557 0 0 1-48.54518556-48.54518556zM75.09333333 123.6385189a48.54518557 48.54518557 0 0 1 48.54518557 48.54518443v291.2711111h291.27111111V172.18370333a48.54518557 48.54518557 0 1 1 97.09036999 0v679.63259334a48.54518557 48.54518557 0 1 1-97.09036999 0v-291.2711111H123.6385189v291.2711111a48.54518557 48.54518557 0 1 1-97.09037113 0V172.18370333a48.54518557 48.54518557 0 0 1 48.54518556-48.54518443z\" /></svg>", pr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M817.73757667 320.05233778a48.54518557 48.54518557 0 0 1 31.89418667 60.77857223L747.9296 706.18074112H948.90666667a48.54518557 48.54518557 0 1 1 0 97.09036999h-266.9985189a48.54518557 48.54518557 0 0 1-46.31210667-63.01164999l121.36296335-388.36148224a48.54518557 48.54518557 0 0 1 60.77857222-31.8456411z\" /><path d=\"M900.3614811 560.54518557a48.54518557 48.54518557 0 0 1 48.54518557 48.54518442v242.72592668a48.54518557 48.54518557 0 1 1-97.09037 0v-242.72592668a48.54518557 48.54518557 0 0 1 48.54518443-48.54518442zM75.09333333 123.6385189a48.54518557 48.54518557 0 0 1 48.54518557 48.54518443v291.2711111h291.27111111V172.18370333a48.54518557 48.54518557 0 1 1 97.09036999 0v679.63259334a48.54518557 48.54518557 0 1 1-97.09036999 0v-291.2711111H123.6385189v291.2711111a48.54518557 48.54518557 0 1 1-97.09037113 0V172.18370333a48.54518557 48.54518557 0 0 1 48.54518556-48.54518443z\" /></svg>", mr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M720.67956978 344.12427734A51.78153127 51.78153127 0 0 1 770.90765392 304.87387614h207.12612386a51.78153127 51.78153127 0 1 1 0 103.56306254h-166.63296592l-26.71926992 107.08420501A207.12612386 207.12612386 0 1 1 667.34459259 856.14005453a51.78153127 51.78153127 0 1 1 77.6722963-68.50696534 103.56306132 103.56306132 0 1 0 0-137.01393066 51.78153127 51.78153127 0 0 1-89.0642335-46.75872237l64.72691439-259.73615882zM45.96622222 97.74775349a51.78153127 51.78153127 0 0 1 51.78153127 51.78153006v310.68918518h310.68918519V149.52928355a51.78153127 51.78153127 0 1 1 103.56306132 0v724.9414329a51.78153127 51.78153127 0 1 1-103.56306132 0v-310.68918518H97.74775349v310.68918518a51.78153127 51.78153127 0 1 1-103.56306254 0V149.52928355a51.78153127 51.78153127 0 0 1 51.78153127-51.78153006z\" /></svg>", hr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M899.48119586 259.5132551a51.78153127 51.78153127 0 0 1 20.29835969 70.37110045l-101.3364563 183.82443497a206.86721539 206.86721539 0 0 1 107.7055846 27.59955554 205.77980325 205.77980325 0 0 1 75.85994313 281.89865484 207.64393836 207.64393836 0 0 1-282.72715853 75.44569007 205.77980325 205.77980325 0 0 1-76.22241423-281.38083913l186.05104119-337.40845511a51.78153127 51.78153127 0 0 1 70.37110045-20.35014163z m-24.85513481 371.58426549a104.08087703 104.08087703 0 0 0-141.67426844 37.64517333 102.21674192 102.21674192 0 0 0 37.85229864 140.12082253 104.08087703 104.08087703 0 0 0 141.67426845-37.64517335 102.21674192 102.21674192 0 0 0-37.90408059-140.12082251zM45.96622222 97.74775349a51.78153127 51.78153127 0 0 1 51.78153127 51.78153006v310.68918518h310.68918519V149.52928355a51.78153127 51.78153127 0 1 1 103.56306132 0v724.9414329a51.78153127 51.78153127 0 1 1-103.56306132 0v-310.68918518H97.74775349v310.68918518a51.78153127 51.78153127 0 1 1-103.56306254 0V149.52928355a51.78153127 51.78153127 0 0 1 51.78153127-51.78153006z\" /></svg>", gr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M268.006898 704.272332H63.828908c-20.199124 0-36.575478-16.376354-36.575479-36.575478 0-20.199124 16.376354-36.575478 36.575479-36.575478H356.384138c20.199124 0 36.55928 16.376354 36.55928 36.575478v292.55523c0 20.199124-16.376354 36.575478-36.55928 36.575478-20.199124 0-36.575478-16.376354-36.575478-36.575478V755.879716L62.435865 1013.252511c-14.28679 14.28679-37.433981 14.28679-51.720772 0s-14.28679-37.433981 0-51.720771l257.275606-257.275606z m487.905215-384.463673h204.372368c20.199124 0 36.575478 16.376354 36.575478 36.575478 0 20.199124-16.376354 36.55928-36.575478 36.55928H667.729251c-20.199124 0-36.55928-16.376354-36.55928-36.55928V63.828907c0-20.199124 16.376354-36.575478 36.55928-36.575478 20.199124 0 36.575478 16.376354 36.575478 36.575478v204.17799L961.580335 10.731291c14.28679-14.28679 37.433981-14.28679 51.720771 0s14.28679 37.433981 0 51.720771L755.928311 319.824857z m-51.623582 436.184444v204.275179c0 20.199124-16.376354 36.575478-36.55928 36.575478-20.199124 0-36.575478-16.376354-36.575478-36.575478V667.713052c0-20.199124 16.376354-36.575478 36.575478-36.575478h292.55523c20.199124 0 36.575478 16.376354 36.575478 36.575478 0 20.199124-16.376354 36.575478-36.575478 36.575478H756.009302l257.275606 257.275606c14.28679 14.28679 14.28679 37.433981 0 51.720772s-37.433981 14.28679-51.720771 0L704.288531 756.009301zM319.824858 268.087888V63.812709c0-20.199124 16.376354-36.575478 36.575478-36.575479 20.199124 0 36.575478 16.376354 36.575478 36.575479V356.367939c0 20.199124-16.376354 36.575478-36.575478 36.575478H63.845106c-20.199124 0-36.575478-16.376354-36.575478-36.575478 0-20.199124 16.376354-36.55928 36.575478-36.55928h204.275179L10.74749 62.435864c-14.28679-14.28679-14.28679-37.433981 0-51.720772s37.433981-14.28679 51.720771 0L319.841056 268.087888z\" /></svg>", _r = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M884.82702222 7.13007408H139.17297778c-72.49414281 0-132.0429037 59.5487609-132.0429037 132.0429037v748.24312058c0 72.49414281 59.5487609 132.0429037 132.0429037 132.0429037h748.24312058c72.49414281 0 132.0429037-59.5487609 132.0429037-132.0429037V139.17297778c-2.58907614-72.49414281-62.13783703-132.0429037-134.63197984-132.0429037zM84.80237037 884.82702222V139.17297778c0-28.47984238 23.30168889-54.37060741 54.37060741-54.37060741h748.24312058c28.47984238 0 54.37060741 23.30168889 54.37060741 54.37060741v471.21193127l-152.75551524-152.75551646c-33.65799466-33.65799466-93.20675555-33.65799466-126.86475143 0l-473.80100741 466.03377778c-5.17815349 5.17815349-7.76722963 10.35630577-7.76722963 15.53445926H139.17297778c-31.06891852 0-54.37060741-23.30168889-54.37060741-54.37060741z m800.02465185 54.37060741H284.16126461l429.78670576-429.78670577c2.58907614-2.58907614 7.76722963-2.58907614 10.35630577-2.58907735s5.17815349 0 10.35630697 2.58907735l194.18074075 194.18074075c5.17815349 5.17815349 10.35630577 7.76722963 15.53445925 7.76722962v173.46812799c-5.17815349 31.06891852-28.47984238 54.37060741-59.54876089 54.37060741z\" /><path d=\"M346.29910164 475.75292799c72.49414281 0 129.45382756-56.95968355 129.45382635-129.45382635s-56.95968355-129.45382756-129.45382635-129.45382756-129.45382756 56.95968355-129.45382756 129.45382756 59.5487609 129.45382756 129.45382756 129.45382635z m0-181.23535762c28.47984238 0 51.78153127 23.30168889 51.78153005 51.78153127s-23.30168889 51.78153127-51.78153005 51.78153005-51.78153127-23.30168889-51.78153127-51.78153005 23.30168889-51.78153127 51.78153127-51.78153127z\" /></svg>", vr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M305.72964052 498.13661547v409.43195841h166.69669761c81.83597973 0 140.14621547-14.28348693 175.01472854-42.85046081 34.86851307-28.6509952 52.34477973-75.70248213 52.34477973-141.32250241 0-86.45710719-18.40049281-145.6075488-55.11745708-177.45132373-36.71696428-31.9277952-94.10297386-47.80767147-172.24205119-47.80767146H305.72964052z m2e-8-400.27372266v285.9218048h163.83999998c67.88857388 0 117.1245952-13.02317973 147.54002135-39.06953813 30.4994464-26.04635948 45.70715948-58.81435946 45.7071584-98.304 0-52.59684054-15.03967147-90.49009281-45.03499413-113.67975468-29.99532266-23.27368213-79.39938453-34.86851307-148.21218562-34.86851199h-163.84zM164.15507734-17.91737386h308.27126079c106.45398934 0 188.54203092 23.02162027 246.18010239 68.98084053 57.63807147 46.04324052 86.54112853 111.15913813 86.54112854 195.34769281 0 45.11901547-15.29173333 85.95298453-45.79117974 122.66994773-30.41542614 36.80098453-76.12258453 59.8226048-136.95343572 69.06486187 68.30867734 10.25050239 121.82974401 39.48964054 160.7312416 87.54937493 38.81747734 48.1437536 58.22621547 118.72098453 58.22621546 211.73169173 0 94.35503574-30.9195488 165.52041068-92.7586464 213.74818453-61.83909759 48.05973333-153.92557973 72.17362027-276.17542613 72.17362025H164.07105599V-17.91737386z\" /></svg>", yr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M967.34678181 553.42633799L60.75509994 553.42633799c-22.86765869 0-41.42633799-18.55867931-41.42633801-41.42633799s18.55867931-41.42633799 41.42633801-41.42633799l906.59168315 0c22.90774276 0 41.42411139 18.55867931 41.4241114 41.42633799S990.25452586 553.42633799 967.34678181 553.42633799z\" /></svg>", br = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M34.98919506 55.02799013m46.60337778 0l882.87510124 0q46.60337778 0 46.60337777 46.60337777l0 0q0 46.60337778-46.60337777 46.60337779l-882.87510124 0q-46.60337778 0-46.60337778-46.60337779l0 0q0-46.60337778 46.60337778-46.60337777Z\" /><path d=\"M253.76616297 465.39662222m46.60337778 0l445.32116542 0q46.60337778 0 46.60337778 46.60337778l0 0q0 46.60337778-46.60337778 46.60337778l-445.32116542 0q-46.60337778 0-46.60337778-46.60337778l0 0q0-46.60337778 46.60337778-46.60337778Z\" /><path d=\"M129.49048889 875.76525431m46.60337778 0l693.87251358 0q46.60337778 0 46.60337778 46.60337779l0 0q0 46.60337778-46.60337778 46.60337777l-693.87251358 0q-46.60337778 0-46.60337778-46.60337777l0 0q0-46.60337778 46.60337778-46.60337779Z\" /></svg>\n", xr = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill=\"currentColor\"\n d=\"M934.86648889 876.88533333H96.0512c-49.67537778 0-90.3168-40.64142222-90.3168-90.3168V239.02435555c0-49.67537778 40.64142222-90.3168 90.3168-90.3168h838.81528889c49.67537778 0 90.3168 40.64142222 90.3168 90.3168v547.54417778c0 49.67537778-40.64142222 90.3168-90.3168 90.3168z m17.49902222-147.61528888V296.31146667c0-41.13066667-33.65546667-74.78613333-74.78613333-74.78613334H153.33831111c-41.13066667 0-74.78613333 33.65546667-74.78613333 74.78613334v432.95857778c0 41.13066667 33.65546667 74.78613333 74.78613333 74.78613333H877.568c41.14204445 0.01137778 74.79751111-33.64408889 74.79751111-74.78613333z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M42.14328889 367.16088889h946.63111111v72.81777778h-946.63111111zM843.13884445 658.432h-291.27111112c-20.10453333 0-36.40888889-16.30435555-36.40888888-36.40888889s16.30435555-36.40888889 36.40888888-36.40888889h291.27111112c20.10453333 0 36.40888889 16.30435555 36.40888888 36.40888889s-16.30435555 36.40888889-36.40888888 36.40888889z\"\n />\n</svg>\n", Sr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M936.60855349 89.98052386c-106.15213868-106.15213868-279.62026667-108.74121482-388.36148148-2.58907735l-82.85044979 82.85044979c-15.53445925 15.53445925-15.53445925 38.83614815 0 54.3706074s38.83614815 15.53445925 54.37060741 0l82.85044978-82.85044978c77.6722963-75.08322016 201.94797037-75.08322016 279.62026667 2.58907735 77.6722963 77.6722963 77.6722963 204.53704651 2.58907614 282.20934281l-142.39920947 144.98828682c-41.42522429 41.42522429-98.38490905 62.13783703-155.34459259 59.54875969-56.95968355-5.17815349-111.33029095-33.65799466-144.98828683-80.26137244-12.94538311-18.12353539-36.24707201-20.71261275-54.37060741-7.76722963-18.12353539 12.94538311-20.71261275 36.24707201-7.76722962 54.3706074 49.19245392 64.72691317 121.68659794 106.15213868 201.94797037 111.33029097h20.71261274c72.49414281 0 144.98828683-28.47984238 196.76981689-82.85044858l142.39920947-144.98828683c100.97398518-108.74121482 100.97398518-284.79842016-5.17815228-390.95055762z\" /><path d=\"M504.23277037 801.97657244l-80.26137243 82.85044978c-77.6722963 75.08322016-201.94797037 75.08322016-279.62026667-2.58907614-77.6722963-77.6722963-77.6722963-204.53704651-2.58907735-282.20934402l142.39921069-144.98828561c41.42522429-41.42522429 98.38490905-62.13783703 155.34459258-59.5487609 56.95968355 5.17815349 111.33029095 33.65799466 144.98828562 80.26137244 12.94538311 18.12353539 36.24707201 20.71261275 54.37060741 7.76722963 18.12353539-12.94538311 20.71261275-36.24707201 7.76722962-54.3706074-49.19245392-64.72691317-121.68659794-106.15213868-201.94797037-111.33029097-80.26137244-5.17815349-157.93366873 23.30168889-214.89335228 80.26137244l-142.39921068 144.98828683c-103.56306132 108.74121482-103.56306132 284.79842016 2.58907735 390.95055762 54.37060741 54.37060741 124.27567408 80.26137244 196.76981689 80.26137364 69.90506667 0 139.81013333-25.89076502 194.18074073-77.67229629l80.26137244-82.85044979c15.53445925-15.53445925 15.53445925-38.83614815 0-54.3706074-18.12353539-12.94538311-41.42522429-12.94538311-56.95968355 2.58907614z\" /></svg>", Cr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M876.08888889 14.41185223H147.91111111c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.40888889v871.38607331c0 14.56355555 4.8545189 26.69985223 14.56355556 38.83614891 9.70903666 12.13629667 24.27259221 19.41807445 41.26340779 21.84533333h7.28177777c14.56355555 0 26.69985223-4.8545189 38.83614777-14.56355555l300.98014777-242.72592669 300.98014891 242.72592669c9.70903666 9.70903666 24.27259221 14.56355555 38.83614776 14.56355555 33.98163001 0 60.6814811-26.69985223 60.68148111-60.68148224V50.82074112c-2.42725888-19.41807445-19.41807445-36.40888889-38.83614777-36.40888889z m-36.40888889 883.52236999L533.84533333 650.35377778c-12.13629667-9.70903666-31.55436999-9.70903666-46.11792554 0L184.32 897.93422222V87.22963001h655.36v810.70459221z\" /><path d=\"M317.81925888 317.81925888h364.08888889c19.41807445 0 36.40888889-16.99081443 36.40888889-36.40888889S701.32622222 245.0014811 681.90814777 245.0014811H317.81925888c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.40888889S298.40118557 317.81925888 317.81925888 317.81925888zM317.81925888 512h242.72592669c19.41807445 0 36.40888889-16.99081443 36.40888888-36.40888889S579.96325888 439.18222222 560.54518557 439.18222222H317.81925888c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.40888889S298.40118557 512 317.81925888 512z\" /></svg>", wr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M618.666667 1024a64 64 0 0 1-64-64V704h64v234.666667a21.333333 21.333333 0 0 0 21.333333 21.333333h298.666667a21.333333 21.333333 0 0 0 21.333333-21.333333V85.333333a21.333333 21.333333 0 0 0-21.333333-21.333333H640a21.333333 21.333333 0 0 0-21.333333 21.333333v234.666667h-64V64a64 64 0 0 1 64-64h341.333333a64 64 0 0 1 64 64v896a64 64 0 0 1-64 64zM64 1024a64 64 0 0 1-64-64V64a64 64 0 0 1 64-64h341.333333a64 64 0 0 1 64 64v256h-64V85.333333a21.333333 21.333333 0 0 0-21.333333-21.333333H85.333333a21.333333 21.333333 0 0 0-21.333333 21.333333v853.333334a21.333333 21.333333 0 0 0 21.333333 21.333333h298.666667a21.333333 21.333333 0 0 0 21.333333-21.333333V704h64v256a64 64 0 0 1-64 64z m490.069333-511.744l191.850667-191.872v128h128v127.893333h-128v128z m-277.077333 64H149.098667v-127.893333h127.893333v-128l191.850667 191.872-191.850667 191.829333z\" /></svg>", Tr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M996.0282643 52.03437037v223.30785185c0 13.40575289-10.8668397 24.27259259-24.2725926 24.2725926s-24.27259259-10.8668397-24.27259259-24.2725926V110.63326341L668.73055763 389.38578489c-9.47844741 9.47844741-24.84785303 9.47844741-34.32630045 0-9.47844741-9.47844741-9.47844741-24.84785303 0-34.32630044l278.75373512-278.75494875-164.71017245 0.00242727c-13.40575289 0-24.27259259-10.8668397-24.2725926-24.2725926s10.8668397-24.27259259 24.2725926-24.27259259h223.30785185c13.40575289 0 24.27259259 10.8668397 24.2725926 24.27259259zM27.76177778 52.03437037v223.30785185c0 13.40575289 10.8668397 24.27259259 24.27259259 24.2725926s24.27259259-10.8668397 24.2725926-24.2725926V110.63326341l278.75252148 278.75252148c9.47844741 9.47844741 24.84785303 9.47844741 34.32630044 0 9.47844741-9.47844741 9.47844741-24.84785303 0-34.32630044L110.63204978 76.3045357 275.34222222 76.30696297c13.40575289 0 24.27259259-10.8668397 24.2725926-24.2725926s-10.8668397-24.27259259-24.2725926-24.27259259H52.03437037c-13.40575289 0-24.27259259 10.8668397-24.27259259 24.27259259z m968.26648652 920.93493096v-223.30785185c0-13.40575289-10.8668397-24.27259259-24.2725926-24.27259259s-24.27259259 10.8668397-24.27259259 24.27259259v164.70895882L668.73055763 635.61788682c-9.47844741-9.47844741-24.84785303-9.47844741-34.32630045 0-9.47844741 9.47844741-9.47844741 24.84785303 0 34.32630043L913.1579923 948.70034963l-164.71017245-0.00242726c-13.40575289 0-24.27259259 10.8668397-24.2725926 24.2725926s10.8668397 24.27259259 24.2725926 24.27259258h223.30785185c13.40575289 0 24.27259259-10.8668397 24.2725926-24.27259258z m-968.26648652 0v-223.30785185c0-13.40575289 10.8668397-24.27259259 24.27259259-24.27259259s24.27259259 10.8668397 24.2725926 24.27259259v164.70895882l278.75252148-278.75252148c9.47844741-9.47844741 24.84785303-9.47844741 34.32630044 0 9.47844741 9.47844741 9.47844741 24.84785303 0 34.32630043L110.63204978 948.70034963 275.34222222 948.69670875c13.40575289 0 24.27259259 10.8668397 24.2725926 24.27259258s-10.8668397 24.27259259-24.2725926 24.27259259H52.03437037c-13.40575289 0-24.27259259-10.8668397-24.27259259-24.27259259z\" /></svg>", Er = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M926.25224651 809.74380206H97.74775349c-7.76722963 0-12.94538311-5.17815349-12.94538312-12.9453819V278.98311111c0-7.76722963 5.17815349-12.94538311 12.94538312-12.94538312h727.53050783l-100.97398518 100.97398518c-15.53445925 15.53445925-15.53445925 41.42522429 0 56.95968477 7.76722963 7.76722963 18.12353539 12.94538311 28.47984238 12.9453819s20.71261275-5.17815349 28.47984238-12.9453819l176.05720412-176.05720535c15.53445925-15.53445925 15.53445925-41.42522429 0-56.95968354l-176.05720412-176.05720535c-15.53445925-15.53445925-41.42522429-15.53445925-56.95968476 0-15.53445925 15.53445925-15.53445925 41.42522429 0 56.95968355l113.91936831 113.9193683H97.74775349c-49.19245392 0-90.61767941 41.42522429-90.61767941 90.61767943v517.81530783c0 49.19245392 41.42522429 90.61767941 90.61767941 90.61767941h828.50449302c20.71261275 0 38.83614815-18.12353539 38.83614815-38.83614814s-18.12353539-36.24707201-38.83614815-36.24707202z\" /></svg>", Dr = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M554.3 829.36666667L981 402.66666667c12.5-12.5 12.5-32.8 0-45.3L636.7 13.26666667c-12.5-12.5-32.8-12.5-45.3 0L90.5 514.16666667c-50 50-50 131 0 181l272.1 270.3c24 23.8 56.4 37.2 90.2 37.2H864c17.7 0 32-14.3 32-32s-14.3-32-32-32H599.5c-57 0-85.6-68.9-45.2-109.3z m71.1-736.9l276.4 276.4c6.2 6.2 6.2 16.4 0 22.6L607.9 685.26666667l-299-299 293.8-293.9c6.3-6.2 16.4-6.2 22.7 0.1zM135.8 559.36666667l127.9-127.9 299 299-127.9 127.9c-25 25-65.5 25-90.5 0L135.8 649.96666667c-25-25-25-65.6 0-90.6z\" /></svg>", Or = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M990.9791609 253.09234608L770.90765392 33.0208391c-18.12353539-18.12353539-38.83614815-25.89076502-64.72691317-25.89076502H97.74775349C48.55529836 7.13007408 7.13007408 48.55529836 7.13007408 97.74775349v828.50449302c0 49.19245392 41.42522429 90.61767941 90.61767941 90.61767941h828.50449302c49.19245392 0 90.61767941-41.42522429 90.61767941-90.61767941V315.23018311c0-23.30168889-10.35630577-46.60337778-25.89076502-62.13783703zM682.87905185 939.19762963H341.12094815V677.70089836h341.7581037v261.49673127z m256.31857778-12.94538312c0 7.76722963-5.17815349 12.94538311-12.94538312 12.94538312h-170.87905185V641.45382756c0-20.71261275-15.53445925-36.24707201-36.2470708-36.24707201H304.87387614c-20.71261275 0-36.24707201 15.53445925-36.2470708 36.24707201v297.74380207H97.74775349c-7.76722963 0-12.94538311-5.17815349-12.94538312-12.94538312V97.74775349c0-7.76722963 5.17815349-12.94538311 12.94538312-12.94538312h170.87905185V278.98311111c0 20.71261275 15.53445925 36.24707201 36.2470708 36.247072h336.57995142c20.71261275 0 36.24707201-15.53445925 36.2470708-36.247072s-15.53445925-36.24707201-36.2470708-36.24707201H341.12094815V84.80237037h367.64886874c2.58907614 0 7.76722963 2.58907614 10.35630697 2.58907614l217.48242963 217.48242963c2.58907614 2.58907614 2.58907614 5.17815349 2.58907614 10.35630697V926.25224651z\" /></svg>", kr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M135.01812622 195.19288888a19.41807408 19.41807408 0 0 1 15.30144237 7.46382223L358.57355852 469.20618666 566.82633482 202.65671111A19.41807408 19.41807408 0 0 1 582.12777718 195.19288888h99.99094519a9.70903703 9.70903703 0 0 1 7.65193481 15.68616297L423.25759052 551.99999999 691.66634667 895.54820741A9.70903703 9.70903703 0 0 1 684.01683912 911.23437036h-99.99215881a19.41807408 19.41807408 0 0 1-15.30144238-7.46382221L358.57355852 634.7925997 148.42145186 903.77176178A19.41807408 19.41807408 0 0 1 133.12122312 911.23437036h-99.9909452a9.70903703 9.70903703 0 0 1-7.6519348-15.68616295l268.40996977-343.54942105-266.51306667-341.11973451A9.70903703 9.70903703 0 0 1 35.02596741 195.19288888h99.99215881zM853.05481482 56.8391111c68.70357333 0 124.39703703 55.6934637 124.39703703 124.39703705 0 32.73887289-12.98219615 59.78825008-36.69045095 82.39331554l-0.97939912 0.9296403c-15.19707022 14.29412978-30.73031585 24.33934222-60.87323496 41.02310876l-14.27228445 7.85097006c-28.21810252 15.59878163-41.88235852 24.52988208-53.32081778 35.74260622-4.18702222 4.10570903-7.67378015 8.25510875-10.48575999 12.56834844l-0.28763023 0.44418844 167.2272403 0.458752a9.70903703 9.70903703 0 0 1 9.68233718 9.70903706v43.69066665a9.70903703 9.70903703 0 0 1-9.70903703 9.70903704h-0.02791348l-229.37600001-0.64929185a9.70903703 9.70903703 0 0 1-9.68112354-9.70903703V393.62133332c0-35.68677925 13.55624297-65.07603437 38.47691376-89.50882608l1.04372148-1.01702161c16.71896178-16.16069215 33.98648415-27.29817125 67.57004327-45.80238223l10.40080592-5.71134104c27.51541097-15.17037037 40.37745778-23.43882903 51.06225304-33.62482251C909.05654045 206.66168889 914.34311112 195.64799999 914.34311112 181.23614815c0-33.84813037-27.44016592-61.2882963-61.2882963-61.2882963-33.5095277 0-60.73852208 26.89403259-61.2798009 60.27491555l-0.0084954 1.01338075v4.24770369a9.70903703 9.70903703 0 0 1-9.70903704 9.70903704h-43.69066666a9.70903703 9.70903703 0 0 1-9.70903703-9.70903704v-4.24770369c0-68.70357333 55.6934637-124.39703703 124.39703703-124.39703705z\" /></svg>", Ar = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path d=\"M159.9488 565.3504h-64v277.2992h64v-277.2992z m21.3504-21.3504h682.6496c11.776 0 21.3504 9.5744 21.3504 21.3504v277.2992c0 11.776-9.5744 21.3504-21.3504 21.3504H181.2992a21.3504 21.3504 0 0 1-21.3504-21.3504h-64l0.4608 8.704c4.096 40.192 36.0448 72.1408 76.1856 76.1856l8.704 0.4608h682.6496c44.1856 0 80.5376-33.5872 84.8896-76.5952l0.4608-8.7552v-277.2992c0-47.104-38.2464-85.3504-85.3504-85.3504H181.2992c-44.1856 0-80.5376 33.5872-84.8896 76.5952l-0.4608 8.7552h64c0-11.776 9.5744-21.3504 21.3504-21.3504zM554.7008 96a32 32 0 1 0-64 0v298.6496a32 32 0 0 0 64 0V96z\"/><path d=\"M373.3504 277.248h298.6496a32 32 0 1 0 0-64H373.3504a32 32 0 1 0 0 64z\"/></svg>\n", jr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg\n t=\"1775292622888\"\n class=\"icon\"\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"3051\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n width=\"200\"\n height=\"200\"\n>\n <path d=\"M330.752 524.8c0 101.888 83.456 185.344 185.344 185.344s185.344-83.456 185.344-185.344-83.456-185.344-185.344-185.344c-102.4 0-185.344 83.456-185.344 185.344z m281.6 0c0 53.248-43.52 96.768-96.768 96.768s-96.768-43.52-96.768-96.768 43.52-96.768 96.768-96.768 96.768 43.52 96.768 96.768z\" p-id=\"3052\" />\n <path d=\"M942.08 241.152L535.04 6.656c-12.288-6.656-26.624-6.656-38.912 0L89.088 241.152c-12.288 6.656-19.456 19.968-19.456 33.792v470.016c0 13.824 7.168 26.624 19.456 33.792L496.128 1013.76c6.144 3.584 12.8 5.12 19.456 5.12s13.312-1.536 19.456-5.12l407.04-235.008c12.288-6.656 19.456-19.968 19.456-33.792V274.944c-0.512-13.824-7.68-26.624-19.456-33.792z m-57.856 481.28l-368.128 212.48-368.128-212.48v-424.96l367.616-212.48 368.128 212.48v424.96h0.512z\" p-id=\"3053\" />\n</svg>\n", Mr = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775139343625\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2812\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M829.46910953 512L194.53089047 988.91924343V35.08075657L829.46910953 512z\" p-id=\"2813\"></path></svg>", Nr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M512 14.41185223C237.71970333 14.41185223 14.41185223 237.71970333 14.41185223 512S237.71970333 1009.58814777 512 1009.58814777 1009.58814777 786.28029667 1009.58814777 512 786.28029667 14.41185223 512 14.41185223z m0 922.35851776c-233.01688889 0-424.77036999-191.7534811-424.77036999-424.77036999S278.98311111 87.22963001 512 87.22963001 936.77036999 278.98311111 936.77036999 512 745.01688889 936.77036999 512 936.77036999z\" /><path d=\"M696.47170333 621.22666667c-53.39970333 65.536-114.08118557 97.09036999-184.47170333 97.09036999s-131.072-31.55436999-184.47170333-97.09036999c-12.13629667-14.56355555-36.40888889-16.99081443-50.97244444-4.8545189-14.56355555 12.13629667-16.99081443 36.40888889-4.8545189 50.97244444 67.96325888 80.09955555 148.06281443 121.36296334 240.29866667 121.36296334s172.33540779-41.26340779 240.29866667-121.36296334c12.13629667-14.56355555 9.70903666-38.83614777-4.8545189-50.97244444-14.56355555-12.13629667-38.83614777-9.70903666-50.97244444 4.8545189zM342.09185223 512c26.69985223 0 48.54518557-21.84533333 48.54518443-48.54518557v-72.81777777c0-26.69985223-21.84533333-48.54518557-48.54518443-48.54518443s-48.54518557 21.84533333-48.54518556 48.54518443v72.81777777c0 26.69985223 21.84533333 48.54518557 48.54518556 48.54518557zM681.90814777 512c26.69985223 0 48.54518557-21.84533333 48.54518556-48.54518557v-72.81777777c0-26.69985223-21.84533333-48.54518557-48.54518556-48.54518443s-48.54518557 21.84533333-48.54518443 48.54518443v72.81777777c0 26.69985223 21.84533333 48.54518557 48.54518443 48.54518557z\" /></svg>", Pr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M152.83768889 505.51466666l162.13333334-149.36746667c4.23253333-4.16426667 9.28426667-6.28053333 15.01866666-6.28053333s10.71786667 2.11626667 15.01866667 6.3488c4.23253333 4.23253333 6.28053333 9.28426667 6.28053333 14.9504V486.39999999h102.4c18.8416 0 34.13333333 15.29173333 34.13333334 34.13333334s-15.29173333 34.13333333-34.13333334 34.13333333h-102.4v115.23413333c0 5.7344-2.048 10.78613333-6.3488 15.01866667-4.23253333 4.23253333-9.28426667 6.28053333-14.9504 6.28053333s-10.78613333-2.048-15.01866666-6.3488l-162.13333334-149.2992C148.60515556 531.31946666 146.48888889 526.26773333 146.48888889 520.53333333s2.11626667-10.71786667 6.3488-15.01866667z m738.23573334 0l-162.13333334-149.36746667c-4.23253333-4.16426667-9.28426667-6.28053333-15.01866666-6.28053333s-10.71786667 2.11626667-15.01866667 6.3488c-4.23253333 4.23253333-6.28053333 9.28426667-6.28053333 14.9504V486.39999999h-102.4c-18.8416 0-34.13333333 15.29173333-34.13333334 34.13333334s15.29173333 34.13333333 34.13333334 34.13333333h102.4v115.23413333c0 5.7344 2.048 10.78613333 6.3488 15.01866667 4.23253333 4.23253333 9.28426667 6.28053333 14.9504 6.28053333s10.71786667-2.048 15.01866666-6.3488l162.13333334-149.36746666c4.23253333-4.16426667 6.3488-9.216 6.3488-14.9504s-2.11626667-10.71786667-6.3488-15.01866667zM419.55555556 145.06666666v136.53333333h68.26666667V145.06666666c0-37.75146667-30.5152-68.26666667-68.26666667-68.26666667H78.22222223c-37.75146667 0-68.26666667 30.5152-68.26666667 68.26666667v750.93333333c0 37.75146667 30.5152 68.26666667 68.26666667 68.26666667h341.33333333c37.75146667 0 68.26666667-30.5152 68.26666667-68.26666667V759.46666666h-68.26666667v136.53333333H78.22222223V145.06666666h341.33333333m204.8 0h341.33333333v750.93333333H624.35555556V759.46666666h-68.26666667v136.53333333c0 37.75146667 30.5152 68.26666667 68.26666667 68.26666667h341.33333333c37.75146667 0 68.26666667-30.5152 68.26666667-68.26666667V145.06666666c0-37.75146667-30.5152-68.26666667-68.26666667-68.26666667H624.35555556c-37.75146667 0-68.26666667 30.5152-68.26666667 68.26666667v136.53333333h68.26666667V145.06666666\" /></svg>", Fr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M75.09333333 524.13629667c19.41807445 0 36.40888889-16.99081443 36.40888889-36.40888888v-194.18074112c0-7.28177778 4.8545189-12.13629667 12.13629668-12.13629668h742.74133333l-94.66311111 94.66311111c-14.56355555 14.56355555-14.56355555 38.83614777 0 53.39970447 7.28177778 7.28177778 16.99081443 12.13629667 26.69985109 12.13629553s19.41807445-4.8545189 26.69985224-12.13629553l165.05363-165.05363002c14.56355555-14.56355555 14.56355555-38.83614777 0-53.39970332l-165.05363-165.05363001c-14.56355555-14.56355555-38.83614777-14.56355555-53.39970333 0-14.56355555 14.56355555-14.56355555 38.83614777 0 53.39970333l106.79940665 106.79940778H123.6385189c-46.11792555 0-84.95407445 38.83614777-84.95407445 84.95407446v194.18073998c0 21.84533333 16.99081443 38.83614777 36.40888888 38.8361489zM961.04296334 499.86370333c-19.41807445 0-36.40888889 16.99081443-36.40888889 36.40888888v194.18074112c0 7.28177778-4.8545189 12.13629667-12.13629667 12.13629668H169.75644445l94.6631111-94.66311111c14.56355555-14.56355555 14.56355555-38.83614777 0-53.39970447-14.56355555-14.56355555-38.83614777-14.56355555-53.39970332 0l-165.05363001 165.05363002c-14.56355555 14.56355555-14.56355555 38.83614777 0 53.39970332l165.05363001 165.05363001c7.28177778 7.28177778 16.99081443 12.13629667 26.6998511 12.13629667s19.41807445-4.8545189 26.69985222-12.13629667c14.56355555-14.56355555 14.56355555-38.83614777 0-53.39970333l-106.79940778-106.79940778h754.87763001c46.11792555 0 84.95407445-38.83614777 84.95407445-84.95407446v-194.18073998c0-21.84533333-14.56355555-38.83614777-36.40888889-38.8361489z\" /></svg>", Ir = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M926.25224691 1009.1026963h-131.31796227l-93.9524096-272.16372622H317.63284575L229.06571536 1009.1026963H97.74775309L448.37085488 14.8973037h127.17543979L926.25224691 1009.1026963zM664.11342507 624.59376071L525.09037101 211.25286875c-4.39107381-13.17322145-9.11354943-36.37134729-14.2502773-69.26297568H507.85747753c-4.39107381 29.99186267-9.36210078 53.02428761-14.83023044 69.26297568L355.08124887 624.59376071h309.0321762z\" /></svg>", Lr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M953.86906294 28.70571236H70.13093706c-22.0934536 0-41.42522469 19.33177108-41.4252247 41.4252247v165.70089876c0 22.0934536 19.33177108 41.42522469 41.4252247 41.42522469s41.42522469-19.33177108 41.42522469-41.42522469V111.55616175h359.01861356v800.8876765H346.29910124c-22.0934536 0-41.42522469 19.33177108-41.42522471 41.42522469s19.33177108 41.42522469 41.42522471 41.4252247h331.40179752c22.0934536 0 41.42522469-19.33177108 41.42522471-41.4252247s-19.33177108-41.42522469-41.42522471-41.42522469h-124.27567407v-800.8876765h359.01861356V235.83183582c0 22.0934536 19.33177108 41.42522469 41.42522469 41.42522469s41.42522469-19.33177108 41.4252247-41.42522469V70.13093706c0-22.0934536-19.33177108-41.42522469-41.4252247-41.4252247z\" /></svg>", Rr = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill=\"currentColor\"\n d=\"M108.77975024 423.62618732a88.37381268 88.37381268 0 1 0 0 176.74762536 88.37381268 88.37381268 0 0 0 0-176.74762536zM340.79046737 467.81309366l0 88.37381268a11.07618405 11.07618405 0 0 0 11.01726772 11.07618406L992.51787698 567.2630904a11.07618405 11.07618405 0 0 0 11.07618546-11.07618406l0-88.37381268a11.07618405 11.07618405 0 0 0-11.07618546-11.07618406l-640.71014189 0c-6.06833559 0-11.01726911 5.00784985-11.01726772 11.07618406z\"\n />\n</svg>\n", zr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M338.432 76.79999999h604.5184a56.832 56.832 0 0 1 0 113.66400001H338.432a56.832 56.832 0 0 1 0-113.66400001z m0 384.00000001h604.5184a56.832 56.832 0 0 1 0 113.66400001H338.432a56.832 56.832 0 1 1 0-113.66400001z m0 384.00000001h604.5184a56.832 56.832 0 0 1 0 113.66399999H338.432a56.832 56.832 0 1 1 0-113.66400001z m-223.232-614.40000002a89.6 89.6 0 1 1 0-179.19999999 89.6 89.6 0 0 1 0 179.20000001z m0 384.00000001a89.6 89.6 0 1 1 0-179.20000001 89.6 89.6 0 0 1 0 179.20000001z m0 384.00000001a89.6 89.6 0 1 1 0-179.20000001 89.6 89.6 0 0 1 0 179.20000001z\" /></svg>", Br = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M161.11663446 123.6385189L399.18222223 411.41437667 637.24781 123.6385189H763.27111111l-301.07723889 363.94325333L763.27111111 851.52502557V851.81629667h-125.73203l-238.35685889-288.06712888L160.82536334 851.81629667H35.09333334v-0.2912711l301.0772389-363.94325334L35.09333334 123.6385189h126.02330112zM935.60651891 734.33694777a38.83614777 38.83614777 0 1 0-64.07964446-17.47626667l-56.06968888 16.01991111a97.09036999 97.09036999 0 1 1 160.10201998 43.88484779L896.47909888 851.81629667H1005.99703666v48.54518443h-194.18073998v-48.54518443l123.79022223-117.4793489z\" /></svg>", Vr = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path d=\"M159.9488 458.6496h-64V181.3504h64v277.2992z m21.3504 21.3504h682.6496c11.776 0 21.3504-9.5744 21.3504-21.3504V181.3504a21.3504 21.3504 0 0 0-21.3504-21.3504H181.2992a21.3504 21.3504 0 0 0-21.3504 21.3504h-64l0.4608-8.7552A85.3504 85.3504 0 0 1 172.544 96.4608l8.704-0.512h682.6496c44.1856 0 80.5376 33.6384 84.8896 76.6464l0.4608 8.704v277.3504c0 47.104-38.2464 85.3504-85.3504 85.3504H181.2992a85.3504 85.3504 0 0 1-84.8896-76.5952l-0.4608-8.7552h64c0 11.776 9.5744 21.3504 21.3504 21.3504zM554.7008 928a32 32 0 0 1-64 0v-298.6496a32 32 0 0 1 64 0v298.6496z\"/><path d=\"M373.3504 746.752h298.6496a32 32 0 1 1 0 64H373.3504a32 32 0 1 1 0-64z\"/></svg>\n", Hr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M21.33333333 945.23076899L966.56410232 945.23076899 966.56410232 1024 21.33333333 1024 21.33333333 945.23076899ZM21.33333333 0L428.41027633 0 428.41027633 61.934356 340.48719432 68.127823 320.41025632 86.088783 320.41025632 530.15804101C320.41025632 614.80203801 338.41004933 675.29066301 374.41026633 711.62564899 410.41040433 747.960635 469.48677532 766.127892 551.64103532 766.127892 627.33369731 766.127892 682.14085534 746.82517699 716.06408533 708.21927401 749.98731534 669.613371 766.94869333 606.33773301 766.94869333 518.390469L766.94869333 91.043525 745.48715034 69.36646899 654.79485733 61.934356 654.79485733 0 976.71792933 0 976.71792933 61.934356 890.17945234 69.36646899 870.79489633 91.043525 870.79489633 531.396687C870.79489633 649.072561 841.25667134 734.334661 782.17951134 787.185585 723.10227333 840.03651001 627.79552133 866.46153801 496.25642033 866.46153801 427.48686433 866.46153801 367.14128433 857.48113701 315.21794633 839.52009801 263.29460833 821.55906 222.56422034 795.856581 193.02568032 762.411796 170.41016731 735.986373 154.37180734 705.74206 144.91028334 671.67799099 135.44868133 637.61392202 130.71795833 588.789524 130.71795833 525.20329799L130.71795833 86.088783 110.64102034 68.127823 21.33333333 61.934356 21.33333333 0Z\" /></svg>", Ur = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M775.992889 231.992889L640 231.992889c-4.408889 0-7.992889-3.584-7.992889-7.992889l-1e-8-56.007111a7.992889 7.992889 0 0 1 7.99288901-7.992889L775.992889 160l0-135.992889a7.992889 7.992889 0 0 1 7.992889-8.021333l56.035555 0a7.992889 7.992889 0 0 1 7.964445 8.021333l0 135.992889L984.035556 160a7.992889 7.992889 0 0 1 7.992888 7.992889l0 56.007111c0 4.408889-3.584 7.992889-7.992888 7.992889l-136.021334 0 0 136.021333c0 4.408889-3.555556 7.964444-7.964444 7.964445l-56.03555599 0c-4.408889 0-7.964444-3.555556-7.96444401-7.964445l0-136.02133299zM32 167.99288901a7.992889 7.992889 0 0 1 7.992889-7.99288901L563.996444 160a7.992889 7.992889 0 0 1 7.992889 7.992889l0 56.007111c0 4.408889-3.584 7.992889-7.964444 7.992889l-460.032 0 0 243.996444L920.007111 475.989333 920.007111 384a7.992889 7.992889 0 0 1 7.992889-7.992889L984.007111 376.007111a7.992889 7.992889 0 0 1 7.992889 7.992889L992 856.00711099c0 4.408889-3.584 7.992889-7.992889 7.99288901l-944.014222 0c-4.408889 0-7.992889-3.584-7.992889-7.99288901l0-688.01422198zM920.007111 548.010667l-816.014222 0L103.992889 792.007111 920.007111 792.007111l0-243.996444z\" /></svg>", Wr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M248.007111 792.007111H384c4.408889 0 7.992889 3.584 7.992889 7.992889v56.007111a7.992889 7.992889 0 0 1-7.992889 7.992889H248.007111v135.992889a7.992889 7.992889 0 0 1-7.992889 8.021333h-56.035555a7.992889 7.992889 0 0 1-7.964445-8.021333v-135.992889H39.964444a7.992889 7.992889 0 0 1-7.992888-7.992889v-56.007111c0-4.408889 3.584-7.992889 7.992888-7.992889h136.021334v-136.021333c0-4.408889 3.555556-7.964444 7.964444-7.964445h56.035556c4.408889 0 7.964444 3.555556 7.964444 7.964445v136.021333zM992 856.007111a7.992889 7.992889 0 0 1-7.992889 7.992889H460.003556a7.992889 7.992889 0 0 1-7.992889-7.992889v-56.007111c0-4.408889 3.584-7.992889 7.964444-7.992889h460.032v-243.996444H103.992889V640a7.992889 7.992889 0 0 1-7.992889 7.992889H39.992889a7.992889 7.992889 0 0 1-7.992889-7.992889V167.992889c0-4.408889 3.584-7.992889 7.992889-7.992889h944.014222c4.408889 0 7.992889 3.584 7.992889 7.992889v688.014222zM103.992889 475.989333h816.014222V231.992889H103.992889v243.996444z\" /></svg>", Gr = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M572.97000122 759.36541748l308.51916504-372.27749634a66.10583497 66.10583497 0 0 0 7.7041626-74.25c-12.91333008-24.06500244-39.58374023-39.28875732-68.74749756-39.28875732H203.48083496c-29.1645813 0-55.79708862 15.22375488-68.74749756 39.32583618-12.94958497 24.06500244-9.90417481 52.82583618 7.77749634 74.21292114L450.99291992 759.36541748c14.49041748 17.49874878 37.05166626 27.77041626 60.97000122 27.77041626 23.91915893 0 46.48040771-10.27166748 60.97082519-27.77041626z\" /></svg>", Kr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M792.007111 775.992889L792.007111 640c0-4.408889 3.584-7.992889 7.992889-7.992889l56.007111-1e-8a7.992889 7.992889 0 0 1 7.992889 7.99288901L864 775.992889l135.992889 0a7.992889 7.992889 0 0 1 8.021333 7.992889l0 56.035555a7.992889 7.992889 0 0 1-8.021333 7.964445l-135.992889 0L864 984.035556a7.992889 7.992889 0 0 1-7.992889 7.992888l-56.007111 0c-4.408889 0-7.992889-3.584-7.992889-7.992888l0-136.021334-136.021333 0c-4.408889 0-7.964444-3.555556-7.964445-7.964444l0-56.03555599c0-4.408889 3.555556-7.964444 7.964445-7.96444401l136.02133299 0zM856.00711099 32a7.992889 7.992889 0 0 1 7.99288901 7.992889L864 563.996444a7.992889 7.992889 0 0 1-7.992889 7.992889l-56.007111 0c-4.408889 0-7.992889-3.584-7.992889-7.964444l0-460.032-243.996444 0L548.010667 920.007111 640 920.007111a7.992889 7.992889 0 0 1 7.992889 7.992889L647.992889 984.007111a7.992889 7.992889 0 0 1-7.992889 7.992889L167.99288901 992c-4.408889 0-7.992889-3.584-7.99288901-7.992889l0-944.014222c0-4.408889 3.584-7.992889 7.99288901-7.992889l688.01422198 0zM475.989333 920.007111l0-816.014222L231.992889 103.992889 231.992889 920.007111l243.996444 0z\" /></svg>", qr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M231.992889 248.007111L231.992889 384c0 4.408889-3.584 7.992889-7.992889 7.992889l-56.007111 1e-8a7.992889 7.992889 0 0 1-7.992889-7.99288901L160 248.007111l-135.992889 0a7.992889 7.992889 0 0 1-8.021333-7.992889l0-56.035555a7.992889 7.992889 0 0 1 8.021333-7.964445l135.992889 0L160 39.964444a7.992889 7.992889 0 0 1 7.992889-7.992888l56.007111 0c4.408889 0 7.992889 3.584 7.992889 7.992888l0 136.021334 136.021333 0c4.408889 0 7.964444 3.555556 7.964445 7.964444l0 56.03555599c0 4.408889-3.555556 7.964444-7.964445 7.96444401l-136.02133299 0zM167.99288901 992a7.992889 7.992889 0 0 1-7.99288901-7.992889L160 460.003556a7.992889 7.992889 0 0 1 7.992889-7.992889l56.007111 0c4.408889 0 7.992889 3.584 7.992889 7.964444l0 460.032 243.996444 0L475.989333 103.992889 384 103.992889a7.992889 7.992889 0 0 1-7.992889-7.992889L376.007111 39.992889a7.992889 7.992889 0 0 1 7.992889-7.992889L856.00711099 32c4.408889 0 7.992889 3.584 7.99288901 7.992889l0 944.014222c0 4.408889-3.584 7.992889-7.99288901 7.992889l-688.01422198 0zM548.010667 103.992889l0 816.014222L792.007111 920.007111 792.007111 103.992889l-243.996444 0z\" /></svg>", Jr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1.0625em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1088 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M320.67069556-18.24287605h589.45333054l-23.41906035 120.71862812H663.73783637l-158.36587232 819.04849586h223.05550319L705.00840688 1042.24287605H115.37832871l23.50743417-120.71862812h222.26013888l159.07286282-819.04849586H297.2516352z\" /></svg>", Yr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1019.7229 566.9H947.0229c-8.8 0-16-7.2-16-16V244c0-35.3-28.7-64-64-64H196.0229c-2.2 0-4 1.8-4 4v56c0 2.2 1.8 4 4 4h655c8.8 0 16 7.2 16 16v290.9c0 8.8-7.2 16-16 16h-72.7c-3.1 0-5 3.3-3.5 6L895.5229 782c1.5 2.7 5.4 2.7 6.9 0l120.7-209.1c1.6-2.6-0.3-6-3.4-6zM4.0229 462.1h72.7c8.8 0 16 7.2 16 16V785c0 35.3 28.7 64 64 64h639c2.2 0 4-1.8 4-4v-56c0-2.2-1.8-4-4-4h-623c-8.8 0-16-7.2-16-16V478.1c0-8.8 7.2-16 16-16h72.7c3.1 0 5-3.3 3.5-6L128.2229 247c-1.5-2.7-5.4-2.7-6.9 0L0.5229 456.1c-1.5 2.6 0.4 6 3.5 6z\" /></svg>\n", Xr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M162.01955555 526.67733334c-16.49777779 1.70666668-29.80977778 15.01866667-31.51644445 31.51644444-2.38933334 22.64177779 16.61155555 41.75644446 39.36711113 39.36711111 16.49777779-1.70666668 29.80977778-15.01866667 31.63022221-31.63022222 2.27555555-22.64177779-16.83911111-41.64266667-39.48088889-39.25333335zM231.424 468.4231111c24.80355555-2.16177779 44.82844445-22.18666668 47.104-47.104 2.84444446-32.42666668-24.12088889-59.50577779-56.54755556-56.54755555-24.80355555 2.16177779-44.82844445 22.18666668-47.104 47.104-2.95822222 32.31288889 24.12088889 59.392 56.54755556 56.54755558zM402.54577778 233.13066666c-32.42666668 2.048-58.70933333 28.33066668-60.75733333 60.75733335-2.50311111 39.25333334 30.03733333 71.79377779 69.29066668 69.29066666 32.42666668-2.048 58.70933333-28.33066668 60.75733333-60.75733334 2.38933334-39.36711111-30.03733333-71.79377779-69.29066668-69.29066667zM637.04177779 218.22577778c-39.93600001 2.50311111-72.13511111 34.816-74.63822225 74.63822222-3.07200001 48.24177778 36.864 88.29155555 85.1057778 85.10577778 39.93600001-2.50311111 72.13511111-34.816 74.63822222-74.63822223 3.18577778-48.24177778-36.75022223-88.17777779-85.10577777-85.10577777zM1029.12000001 243.93955555c-0.5688889-8.64711111-4.55111111-16.61155555-11.15022224-22.30044444l-0.79644444-0.68266666c-5.91644445-5.12000001-13.53955556-7.96444445-21.39022222-7.96444445-9.44355556 0-18.432 4.096-24.576 11.26400001L582.54222222 671.744l-49.49333335 97.28000001 1.25155558 1.02399999-5.57511113 12.85688887 12.62933335-6.71288887 1.70666665 1.4791111 88.74666667-61.78133332 389.46133334-448.28444445c5.68888889-6.59911111 8.41955555-15.01866667 7.85066668-23.66577778zM950.95466667 471.38133332c-15.70133333-1.59288889-30.37866668 8.41955555-34.58844445 23.55200001-7.85066668 27.98933333-21.95911113 73.38666668-39.93600001 111.27466667C850.4888889 661.04888889 802.58844445 737.39377779 722.14755556 789.61777778c-82.14755555 53.36177779-162.3608889 64.51200001-215.26755557 64.51200001-42.09777778 0-82.14755555-6.94044446-115.71199999-20.13866668-30.60622223-11.94666668-52.79288889-27.98933333-62.46400001-45.16977779-3.86844445-6.94044446-8.192-14.67733334-12.74311112-22.98311111-19.56977778-35.3848889-41.64266667-75.66222223-56.54755554-88.06399998-18.09066668-15.01866667-44.48711113-17.06666667-68.03911111-17.06666667-9.21600001 0-46.42133333 1.47911113-55.18222223 1.47911111-37.66044446 0-56.20622222-7.39555556-63.82933332-25.48622222-20.25244445-48.12800001-8.30577779-130.04800001 30.49244444-208.66844445C162.92977778 306.51733333 270.79111111 217.65688887 398.90488889 184.32c45.51111111-12.06044445 92.38755555-21.50400001 138.01244445-21.50400001 97.39377778 0 213.67466667 37.31911111 287.28888888 87.83644447 12.97066667 8.87466667 30.60622223 6.59911111 40.61866668-5.57511113 11.83288889-14.336 8.07822223-35.72622222-7.73688891-45.28355555-26.51022223-15.92888889-65.87733334-38.68444445-98.19022221-53.58933332-68.60800001-31.74400001-140.74311113-47.6728889-215.26755556-47.67288891-77.48266668 0-169.30133333 18.65955555-247.12533333 53.70311112-88.86044446 39.82222222-153.82755555 96.71111111-204.11733334 167.82222223-41.41511111 58.48177778-77.14133333 126.40711113-91.13600001 191.9431111-8.53333334 39.93600001-7.73688889 65.30844445-2.73066664 99.89688889 4.77866667 33.22311111 15.24622222 59.73333334 30.60622221 76.80000001 25.48622222 28.55822223 58.59555556 42.55288889 101.26222222 42.55288889 15.81511113 0 64.0568889-5.68888889 71.7937778-5.68888889 8.41955555 0 13.88088889 1.36533333 16.384 4.32355556 7.28177778 8.41955555 16.384 25.48622222 26.96533332 45.39733332 8.53333334 16.04266668 18.09066668 34.24711113 28.89955555 51.54133335 13.76711113 22.18666668 41.98400001 45.96622222 75.66222223 63.60177776 30.72 16.04266668 81.80622223 35.27111111 150.41422221 35.27111111 81.92 0 168.73244446-26.85155555 257.93422223-79.75822223 85.21955556-50.51733333 139.94666667-135.28177779 170.89422222-197.51822221 21.61777778-43.5768889 39.4808889-99.21422222 49.83466666-135.50933334 5.46133333-19.68355556-7.96444445-39.4808889-28.21688888-41.5288889z\" /></svg>", Zr = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M866.375 714.5H163.25c-45 0-84.375-39.375-84.375-84.375V163.25C78.875 118.25 118.25 78.875 163.25 78.875h703.125c45 0 84.375 39.375 84.375 84.375v466.875c0 45-39.375 84.375-84.375 84.375zM163.25 135.125c-16.875 0-28.125 11.25-28.125 28.125v466.875c0 16.875 11.25 28.125 28.125 28.125h703.125c16.875 0 28.125-11.25 28.125-28.125V163.25c0-16.875-11.25-28.125-28.125-28.125H163.25z\" fill=\"currentColor\"></path><path d=\"M512 922.625c-16.875 0-28.125-11.25-28.125-28.125v-202.5c0-16.875 11.25-28.125 28.125-28.125s28.125 11.25 28.125 28.125v202.5c0 16.875-11.25 28.125-28.125 28.125z\" fill=\"currentColor\"></path><path d=\"M832.625 945.125H191.375c-16.875 0-28.125-11.25-28.125-28.125s11.25-28.125 28.125-28.125h646.875c16.875 0 28.125 11.25 28.125 28.125s-16.875 28.125-33.75 28.125z\" fill=\"currentColor\"></path></svg>\n", Qr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M800.768 477.184c-14.336 0-30.72 2.048-45.056 4.096 18.432-51.2 77.824-188.416 237.568-315.392 36.864-28.672-20.48-86.016-59.392-57.344-155.648 116.736-356.352 317.44-356.352 573.44v20.48c0 122.88 100.352 223.232 223.232 223.232S1024 825.344 1024 702.464c0-124.928-100.352-225.28-223.232-225.28zM223.232 477.184c-14.336 0-30.72 2.048-45.056 4.096 18.432-51.2 77.824-188.416 237.568-315.392 36.864-28.672-20.48-86.016-59.392-57.344C200.704 225.28 0 425.984 0 681.984v20.48c0 122.88 100.352 223.232 223.232 223.232s223.232-100.352 223.232-223.232c0-124.928-100.352-225.28-223.232-225.28z\" /></svg>", $r = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M34.98919506 55.02799013m46.60337778 0l882.87510124 0q46.60337778 0 46.60337777 46.60337777l0 0q0 46.60337778-46.60337777 46.60337779l-882.87510124 0q-46.60337778 0-46.60337778-46.60337779l0 0q0-46.60337778 46.60337778-46.60337777Z\" /><path d=\"M472.54313086 465.39662222m46.60337778 0l445.32116544 0q46.60337778 0 46.60337777 46.60337778l0 0q0 46.60337778-46.60337777 46.60337778l-445.32116544 0q-46.60337778 0-46.60337778-46.60337778l0 0q0-46.60337778 46.60337778-46.60337778Z\" /><path d=\"M223.99178272 875.76525431m46.60337778 0l693.87251358 0q46.60337778 0 46.60337777 46.60337779l0 0q0 46.60337778-46.60337777 46.60337777l-693.87251358 0q-46.60337778 0-46.60337778-46.60337777l0 0q0-46.60337778 46.60337778-46.60337779Z\" /></svg>\n", ei = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M796.45320912 470.57477531l-497.1026963-441.86906295c-22.0934536-19.33177108-57.99531457-19.33177108-77.32708565 5.52336243-19.33177108 22.0934536-19.33177108 57.99531457 5.52336371 77.32708696L677.70089876 512 227.54679088 912.44383825c-22.0934536 19.33177108-24.85513482 55.23363335-5.52336371 77.32708696 11.04672615 11.04672615 24.85513482 19.33177108 41.42522468 19.33177109 13.80840865 0 24.85513482-5.52336372 35.90186097-13.80840866l497.1026963-441.86906295c11.04672615-11.04672615 19.33177108-24.85513482 19.33177238-41.42522469s-5.52336372-30.37849854-19.33177238-41.42522469z\" /></svg>\n", ti = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M45.96622222 978.03377778h932.06755556v-103.56265719H45.96622222V978.03377778z m0-673.16030578v414.253056L253.09275022 512 45.96622222 304.873472z m414.25184237 466.03377778H978.03377778V667.34459259H460.21806459v103.56265719zM45.96622222 45.96622222v103.56265719h932.06755556V45.96622222H45.96622222z m414.25184237 310.68918519H978.03377778v-103.56265719H460.21806459V356.65540741z m0 207.126528H978.03377778v-103.56387082H460.21806459v103.56387082z\" /></svg>", ni = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M338.432 76.8h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 0 1 0-113.664z m0 384h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 1 1 0-113.664z m0 384h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 1 1 0-113.664zM166.6048 51.2v204.8H109.9776V121.8048a172.032 172.032 0 0 1-26.5728 16.896A207.616 207.616 0 0 1 51.2 151.04v-45.8752c19.0464-6.144 33.792-13.4656 44.3904-22.1184 10.496-8.6016 18.7392-19.2 24.6784-31.8464h46.336z m52.4288 563.2H51.2c1.9456-16.5888 7.7824-32.1536 17.5104-46.7456 9.728-14.6432 28.0576-31.8464 54.8864-51.712 16.384-12.1856 26.88-21.504 31.4368-27.7504a31.0784 31.0784 0 0 0 6.8608-18.0224 20.992 20.992 0 0 0-6.7584-15.7184 23.7056 23.7056 0 0 0-17.1008-6.5536 23.8592 23.8592 0 0 0-17.5616 6.7584c-4.5056 4.5056-7.5776 12.3904-9.1136 23.7568L55.296 473.9072c2.2016-15.7696 6.2464-28.0576 12.1344-36.864 5.8368-8.8576 14.08-15.6672 24.7808-20.3776 10.6496-4.7104 25.4464-7.0656 44.288-7.0656 19.712 0 35.0208 2.2528 45.9264 6.7072 10.9568 4.5056 19.5584 11.4176 25.856 20.6848 6.2464 9.3184 9.4208 19.712 9.4208 31.232 0 12.288-3.584 24.064-10.8032 35.1744-7.168 11.2128-20.2752 23.4496-39.2192 36.864a414.72 414.72 0 0 0-22.5792 16.3328c-3.84 3.072-8.2944 7.168-13.4144 12.1856h87.3472V614.4z m-112.8448 239.872l-52.0192-9.3184c4.3008-16.5888 12.6464-29.2864 24.9344-38.0928 12.288-8.8576 29.696-13.2608 52.224-13.2608 25.8048 0 44.544 4.8128 56.064 14.4384a45.4144 45.4144 0 0 1 17.2544 36.352 40.6016 40.6016 0 0 1-7.0144 23.2448c-4.6592 6.912-11.776 13.0048-21.1968 18.2272 7.68 1.8944 13.5168 4.096 17.5616 6.656 6.5536 4.0448 11.6736 9.3696 15.36 15.9744 3.584 6.656 5.4272 14.5408 5.4272 23.7056 0 11.52-3.0208 22.5792-9.0624 33.1776a60.6208 60.6208 0 0 1-26.0608 24.4224c-11.3152 5.7344-26.2656 8.6016-44.6976 8.6016-18.0224 0-32.256-2.0992-42.6496-6.3488a63.6416 63.6416 0 0 1-25.6-18.5856 85.3504 85.3504 0 0 1-15.5136-30.72l54.9888-7.3216c2.1504 11.1104 5.5296 18.7904 10.0352 23.04a24.32 24.32 0 0 0 17.408 6.4512 23.8592 23.8592 0 0 0 18.432-8.1408 30.9248 30.9248 0 0 0 7.3216-21.6064c0-9.216-2.3552-16.2816-7.0656-21.3504a25.088 25.088 0 0 0-19.2512-7.5264c-4.3008 0-10.24 1.024-17.8176 3.2256l2.816-39.3216c3.072 0.4608 5.4272 0.6656 7.168 0.6656a25.088 25.088 0 0 0 18.0224-6.8608 21.8112 21.8112 0 0 0 7.2192-16.384 19.5584 19.5584 0 0 0-5.376-14.4384 20.0704 20.0704 0 0 0-14.848-5.376 21.8112 21.8112 0 0 0-15.872 5.8368c-3.9936 3.9424-6.7584 10.8032-8.192 20.6336z\" /></svg>", ri = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M614.4 1024H128c-70.656 0-128-57.344-128-128V128C0 57.344 57.344 0 128 0h614.4c70.656 0 128 57.344 128 128v230.4c0 14.336-11.264 25.6-25.6 25.6s-25.6-11.264-25.6-25.6V128c0-42.496-34.304-76.8-76.8-76.8H128c-42.496 0-76.8 34.304-76.8 76.8v768c0 42.496 34.304 76.8 76.8 76.8h486.4c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z\" /><path d=\"M691.2 256H179.2c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h512c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM384 443.904H179.2c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h204.8c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM281.6 631.296H179.2c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h102.4c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM332.8 819.2H179.2c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h153.6c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM640 896c-141.312 0-256-114.688-256-256s114.688-256 256-256 256 114.688 256 256-114.688 256-256 256z m0-460.8c-113.152 0-204.8 91.648-204.8 204.8s91.648 204.8 204.8 204.8 204.8-91.648 204.8-204.8-91.648-204.8-204.8-204.8z\" /><path d=\"M998.4 1024c-6.656 0-13.312-2.56-17.92-7.68l-189.44-189.44c-10.24-10.24-10.24-26.112 0-36.352s26.112-10.24 36.352 0l189.44 189.44c10.24 10.24 10.24 26.112 0 36.352-5.12 5.12-11.776 7.68-18.432 7.68z\" /></svg>\n", ii = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\"><path d=\"M986.543158 252.766316c-32.875789-30.181053-141.204211-134.736842-152.791579-144.437895a94.315789 94.315789 0 0 0-61.44-31.528421 85.692632 85.692632 0 0 0-65.751579 26.947368l-75.722105 72.218948a248.724211 248.724211 0 0 1-118.837895 26.947368 250.071579 250.071579 0 0 1-118.837895-26.947368l-75.722105-71.949474a85.423158 85.423158 0 0 0-65.751579-26.947368A94.315789 94.315789 0 0 0 190.248421 107.789474c-11.587368 11.048421-119.915789 114.256842-152.791579 144.437894a71.410526 71.410526 0 0 0-24.791579 50.661053 84.345263 84.345263 0 0 0 22.63579 57.397895L134.736842 455.410526a69.254737 69.254737 0 0 0 77.069474 14.282106V835.368421A103.747368 103.747368 0 0 0 242.526316 912.168421a146.863158 146.863158 0 0 0 97.28 35.301053h344.117895A147.671579 147.671579 0 0 0 781.473684 912.168421 103.747368 103.747368 0 0 0 812.463158 835.368421V469.692632A69.254737 69.254737 0 0 0 889.263158 455.410526l100.513684-95.663158a85.692632 85.692632 0 0 0 21.288421-56.32 71.410526 71.410526 0 0 0-24.522105-50.661052z m-35.031579 68.985263l-99.43579 94.854737a16.976842 16.976842 0 0 1-21.557894 2.155789l-26.947369-26.947368a26.947368 26.947368 0 0 0-29.372631-5.928421 26.947368 26.947368 0 0 0-16.707369 24.791579V835.368421a50.122105 50.122105 0 0 1-14.012631 37.99579 94.046316 94.046316 0 0 1-63.056842 20.210526H341.423158a94.585263 94.585263 0 0 1-61.978947-20.210526A50.122105 50.122105 0 0 1 265.431579 835.368421V411.755789a26.947368 26.947368 0 0 0-46.08-18.863157l-26.947368 26.947368a16.976842 16.976842 0 0 1-21.827369-2.155789L73.835789 323.368421a19.671579 19.671579 0 0 1 0-30.72C107.789474 260.311579 223.393684 151.174737 228.244211 146.593684l2.425263-2.425263a41.229474 41.229474 0 0 1 24.252631-13.473684 33.684211 33.684211 0 0 1 25.061053 12.126316c48.505263 45.810526 78.416842 74.374737 78.416842 74.374736l3.772632 2.964211a291.301053 291.301053 0 0 0 147.941052 36.648421h3.772632a291.301053 291.301053 0 0 0 147.941052-36.648421l3.772632-2.964211s29.911579-26.947368 78.147368-74.374736a33.953684 33.953684 0 0 1 25.061053-12.126316 39.612632 39.612632 0 0 1 24.522105 13.473684l2.425263 2.425263c4.850526 4.581053 119.376842 113.717895 154.408422 146.054737a18.863158 18.863158 0 0 1 1.347368 29.103158z\"></path></svg>\n", ai = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M34.98919506 55.02799013m46.60337778 0l882.87510124 0q46.60337778 0 46.60337777 46.60337777l0 0q0 46.60337778-46.60337777 46.60337779l-882.87510124 0q-46.60337778 0-46.60337778-46.60337779l0 0q0-46.60337778 46.60337778-46.60337777Z\" /><path d=\"M34.98919506 465.39662222m46.60337778 0l445.32116544 0q46.60337778 0 46.60337778 46.60337778l0 0q0 46.60337778-46.60337778 46.60337778l-445.32116544 0q-46.60337778 0-46.60337778-46.60337778l0 0q0-46.60337778 46.60337778-46.60337778Z\" /><path d=\"M34.98919506 875.76525431m46.60337778 0l693.87251358 0q46.60337778 0 46.60337778 46.60337779l0 0q0 46.60337778-46.60337778 46.60337777l-693.87251358 0q-46.60337778 0-46.60337778-46.60337777l0 0q0-46.60337778 46.60337778-46.60337779Z\" /></svg>\n", oi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M346.29910124 512L796.45320912 111.55616175c22.0934536-19.33177108 24.85513482-55.23363335 5.52336371-77.32708696-19.33177108-22.0934536-55.23363335-24.85513482-77.32708565-5.52336243l-497.1026963 441.86906295c-13.80840865 11.04672615-19.33177108 24.85513482-19.33177238 41.42522469s5.52336372 30.37849854 19.33177238 41.42522469l497.1026963 441.86906295c11.04672615 8.28504494 24.85513482 13.80840865 35.90186097 13.80840866 16.57008987 0 30.37849854-5.52336372 41.42522468-19.33177109 19.33177108-22.0934536 19.33177108-57.99531457-5.52336371-77.32708696L346.29910124 512z\" /></svg>\n", si = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M456.76593556 788.1677331H1009.1026963V677.70089876H456.76593556v110.46683434zM14.8973037 512l220.9349632 220.9349632V291.0650368L14.8973037 512z m0 497.1026963h994.2053926v-110.46683434H14.8973037V1009.1026963z m0-994.2053926v110.46683434h994.2053926V14.8973037H14.8973037z m441.86863186 331.40179754H1009.1026963v-110.46683434H456.76593556V346.29910124z m0 220.9349632H1009.1026963v-110.46812888H456.76593556v110.46812888z\" /></svg>", ci = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1024\" height=\"1024\" viewBox=\"0 0 24 24\" fill=\"none\">\n <title>标记位置并发送给 AI</title>\n <path fill=\"#1677FF\" d=\"M12 2.5C13.35 8.55 15.45 10.65 21.5 12C15.45 13.35 13.35 15.45 12 21.5C10.65 15.45 8.55 13.35 2.5 12C8.55 10.65 10.65 8.55 12 2.5Z\"/>\n</svg>\n", li = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M961.16432592 31.88811852H59.8016c-29.12711111 0-53.03561482 23.9085037-53.03561482 53.03561481V933.12948148c0 29.12711111 23.9085037 53.03561482 53.03561482 53.03561482H961.04296297c29.12711111 0 53.03561482-23.9085037 53.03561481-53.03561482V84.92373333c0.12136297-29.12711111-23.78714075-53.03561482-52.91425186-53.03561481zM324.97967408 929.85268148H59.8016v-209.95792593h265.05671111v209.95792593z m0-262.87217778H59.8016V472.55703703h265.05671111v194.42346667z m0-247.45908148H59.8016V191.96586667h265.05671111v227.55555555zM643.072 929.85268148H377.89392592v-209.95792593H643.072v209.95792593z m0-262.87217778H377.89392592V472.55703703H643.072v194.42346667z m0-247.45908148H377.89392592V191.96586667H643.072v227.55555555z m318.09232592 510.33125926H695.98625185v-209.95792593H961.04296297v209.95792593z m0-262.87217778H695.98625185V472.55703703H961.04296297v194.42346667z m0-247.45908148H695.98625185V191.96586667H961.04296297v227.55555555z\" fill=\"#4697EC\" /><path d=\"M59.8016 191.96586667h265.05671111v227.55555555H59.8016zM377.89392592 472.55703703h265.05671111v194.42346667H377.89392592zM695.98625185 719.89475555H961.04296297v209.83656297H695.98625185z\" fill=\"#D9EFFF\" /></svg>", ui = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M261.48571399 32.72685699h72.155429V98.62857099H275.09028601c-46.04342899 0-69.04685701 25.088-69.04685702 77.38514299v217.563429c0 62.75657101-29.25714299 105.61828601-85.75999998 127.59771401 56.46628601 23.04 85.76 65.90171399 85.76 127.63428602v218.587428c0 50.17600001 23.04 76.32457101 69.046857 76.324572h58.55085701v65.901714H261.48571399c-42.89828601 0-76.36114299-13.60457101-99.364571-40.77714302-23.04-25.12457101-33.46285701-59.61142901-33.46285698-103.57028499V651.95428601c0-31.37828598-7.31428601-54.38171402-19.89485703-69.04685702-14.62857101-16.71314301-41.83771399-26.14857101-79.46971499-27.172572V486.65142898c37.66857101-2.08457099 64.84114301-10.45942901 79.46971499-27.172572 12.544-14.62857101 19.89485701-37.66857101 19.89485703-69.04685699V178.09828598c0-43.92228601 10.45942901-79.46971399 33.46285698-104.59428598C185.12457101 46.33142901 218.58742899 32.72685699 261.48571399 32.72685699z m433.37142902 0h72.15542798c41.83771399 0 75.33714301 13.60457101 99.36457202 40.77714301 21.97942899 25.12457101 33.49942899 60.672 33.499428 104.59428601v212.33371398c0 31.37828598 6.25371402 54.38171402 19.858286 70.07085702 14.62857101 15.72571399 40.77714299 24.064 79.50628598 26.14857197v69.04685702c-38.72914299 1.02400001-64.87771399 10.45942901-79.50628598 27.17257099-13.60457101 14.62857101-19.85828601 37.66857101-19.858286 69.04685703v213.35771496c0 43.95885699-11.52 78.44571399-33.499428 103.57028505-24.02742899 27.17257101-57.52685701 40.77714299-99.364572 40.77714296H694.85714299v-65.901714h58.587428c46.00685701 0 69.01028601-26.14857101 69.010286-76.324572v-218.624c0-61.696 28.23314299-104.59428601 85.76-127.597714-57.52685701-21.94285701-85.76-64.84114301-85.76-127.634286V176.05028601c0-52.29714301-23.00342899-77.38514301-69.010286-77.38514301H694.85714299V32.72685699z\" fill=\"#35BD4B\" /></svg>", di = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M977.9095021 946.96485925h-75.3421274v-109.44026547c0-86.7444205-67.05449339-164.99925902-69.90506667-168.29256439l-1.77092835-2.03501416L647.72457055 507.33966222c31.30193541-28.28048308 86.69781712-78.52669155 148.8744903-135.87991514 102.33325037-94.40290892 106.49648545-166.66921339 105.93724493-183.18234358V77.03514075h75.3421274a38.83614815 38.83614815 0 1 0 0-77.6722963H46.08273067a38.83614815 38.83614815 0 1 0 0 77.6722963h75.27222234v111.2577972c-0.55924053 16.52089742 3.60399455 88.77943467 105.94501214 183.19011082a19872.20068883 19872.20068883 0 0 0 148.87449032 135.87991514L195.00382435 665.41831965l-3.80594252 3.81370974c-2.8583405 3.29330537-69.90506667 81.55591111-69.90506666 168.29256439V946.96485925h-75.2100845a38.83614815 38.83614815 0 1 0 0 77.6722963h931.82677143a38.83614815 38.83614815 0 1 0 0-77.6722963zM199.15929221 837.52459378c0-46.06743893 34.26901712-97.3078528 49.35297707-115.59967858L434.8248064 559.38010075a68.41375858 68.41375858 0 0 0 0.92430032-102.97793044 19782.38821262 19782.38821262 0 0 1-155.5853767-141.95388871c-73.43138892-67.7380096-80.30538715-114.17827555-80.94229997-122.12415147V77.03514075h625.4483987v112.06558908l0.16311182 3.61952902c0.04660338 0.43496485-2.33016889 49.03452065-81.1054118 121.73578998-67.108864 61.90482015-126.28738655 115.49870459-155.59314394 141.93835425a68.41375858 68.41375858 0 0 0 0.92430032 102.98569767l186.31253713 162.54481445c15.16163223 18.40833422 49.3607443 69.58661025 49.3607443 115.60744581V946.96485925h-625.57267437v-109.44026547z\" fill=\"#FB3F50\" /><path d=\"M636.60966495 884.82702222H389.27777185a55.68326922 55.68326922 0 0 1-55.96288948-55.26383881v-16.02379473a76.34410003 76.34410003 0 0 1 28.82418915-59.66009078l138.11687728-111.07138371a38.47108835 38.47108835 0 0 1 54.24633173 6.05843911 38.93712213 38.93712213 0 0 1-6.02737018 54.53371923l-129.11465814 103.84009292h217.24941274a38.83614815 38.83614815 0 0 1 0 77.58685677zM491.89840972 381.92997262a38.44778667 38.44778667 0 0 1-30.16791989-14.56355555 38.93712213 38.93712213 0 0 1 6.0273702-54.53371924L596.88028539 209.00037215H379.62310542a38.83614815 38.83614815 0 0 1 0-77.594624H626.95499852a55.68326922 55.68326922 0 0 1 55.96288948 55.27160604v16.02379473a76.32856557 76.32856557 0 0 1-28.83195638 59.66785801L515.9845888 373.43262341a38.29244208 38.29244208 0 0 1-24.08617908 8.49734921z\" fill=\"#FFCA1E\" /></svg>", fi = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M252.9052448 98.62257813m45.5111104 0l427.1672896 0q45.51111147 0 45.5111104 45.5111104l0 159.15235627q0 45.51111147-45.5111104 45.5111104l-427.1672896 0q-45.51111147 0-45.5111104-45.5111104l0-159.15235627q0-45.51111147 45.5111104-45.5111104Z\" fill=\"#B3CDFF\"></path><path d=\"M92.61511147 271.61031147m45.5111104 0l747.79306666 0q45.51111147 0 45.51111147 45.5111104l0 396.21973333q0 45.51111147-45.51111147 45.51111147l-747.79306666 0q-45.51111147 0-45.5111104-45.51111147l0-396.21973333q0-45.51111147 45.5111104-45.5111104Z\" fill=\"#1971FD\"></path><path d=\"M213.85671147 515.23128853m45.5111104 0l505.26435626 0q45.51111147 0 45.5111104 45.51111147l0 319.12391147q0 45.51111147-45.5111104 45.5111104l-505.26435626 0q-45.51111147 0-45.5111104-45.5111104l0-319.12391147q0-45.51111147 45.5111104-45.51111147Z\" fill=\"#B3CDFF\"></path><path d=\"M719.8947552 399.9971552a51.2 51.2 0 1 0 102.4 0 51.2 51.2 0 1 0-102.4 0Z\" fill=\"#FFFFFF\"></path></svg>\n", pi = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775136722304\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1393\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M-172.13692839-150.80359506m0 0l1325.60719012 0q0 0 0 0l0 1325.60719012q0 0 0 0l-1325.60719012 0q0 0 0 0l0-1325.60719012q0 0 0 0Z\" fill=\"#1E6FFF\" fill-opacity=\"0\" p-id=\"1394\"></path><path d=\"M92.32170604 453.17618094l307.5408681 340.59819741q233.72111771-326.84502282 332.72740472-438.69312948 98.92343657-111.84810667 201.49229291-165.12094562-15.57588448 83.67895387 0 110.35679858 15.57588448 26.59499425 76.71951613 20.71261234-318.31142653 232.31266007-440.51583936 377.79804919-122.28726329 145.56823956-144.90543598 263.38157859l-379.04080592-386.08309413 45.9819994-122.95006688z\" fill=\"#1E6FFF\" p-id=\"1395\"></path></svg>", mi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M77.03514075 77.03514075h869.9297185a62.13783703 62.13783703 0 0 1 0 124.27567407H77.03514075a62.13783703 62.13783703 0 1 1 0-124.27567407z m0 745.65404443h869.9297185a62.13783703 62.13783703 0 0 1 0 124.27567407H77.03514075a62.13783703 62.13783703 0 0 1 0-124.27567407z m0-372.82702221h159.75637902a62.13783703 62.13783703 0 1 1 0 124.27567406H77.03514075a62.13783703 62.13783703 0 0 1 0-124.27567406z m355.05560082 0h159.81851686a62.13783703 62.13783703 0 0 1 0 124.27567406H432.09074157a62.13783703 62.13783703 0 0 1 0-124.27567406z m355.11773866 0H946.96485925a62.13783703 62.13783703 0 0 1 0 124.27567406h-159.75637902a62.13783703 62.13783703 0 0 1 0-124.27567406z\" fill=\"#FF8142\" /></svg>", hi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg t=\"1775293814008\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1486\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\">\n <path d=\"M25.3830637 892.59425185V131.40574815q0-40.70028325 28.73874963-69.4390329 28.81642192-28.81642192 69.51670519-28.81642192h248.55134815q40.70028325 0 69.43903288 28.73874964 28.81642192 28.81642192 28.81642193 69.51670518v761.1885037q0 40.70028325-28.73874963 69.4390329-28.81642192 28.81642192-69.51670518 28.81642192H123.63851852q-40.70028325 0-69.43903289-28.73874964-28.81642192-28.81642192-28.81642193-69.51670518z m103.30415408 0q0-5.04869925-5.04869926-5.04869926h248.55134815q-5.04869925 0-5.04869926 5.04869926V131.40574815q0 5.04869925 5.04869926 5.04869926H123.63851852q5.04869925 0 5.04869926-5.04869926v761.1885037z\" fill=\"#047FFE\" p-id=\"1487\" />\n <path d=\"M553.55467852 892.59425185V131.40574815q0-40.70028325 28.73874963-69.4390329 28.81642192-28.81642192 69.51670518-28.81642192H900.36148148q40.70028325 0 69.43903289 28.73874964 28.81642192 28.81642192 28.81642193 69.51670518v761.1885037q0 40.70028325-28.73874963 69.4390329-28.81642192 28.81642192-69.51670519 28.81642192H651.81013333q-40.70028325 0-69.43903288-28.73874964-28.81642192-28.81642192-28.81642193-69.51670518z m103.30415407 0q0-5.04869925-5.04869926-5.04869926H900.36148148q-5.04869925 0-5.04869926 5.04869926V131.40574815q0 5.04869925 5.04869926 5.04869926H651.81013333q5.04869925 0 5.04869926-5.04869926v761.1885037z\" fill=\"#047FFE\" fill-opacity=\".8\" p-id=\"1488\" />\n</svg>\n", gi = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1776086534554\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1806\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M96 1024V0h448v384h384v640H96z m96-256a32 32 0 0 0 32 32h96a32 32 0 0 0 32-32v-96a32 32 0 0 0-32-32H224a32 32 0 0 0-32 32v96z m160-416a32 32 0 0 0-32-32H224a32 32 0 0 0-32 32v96a32 32 0 0 0 32 32h96a32 32 0 0 0 32-32v-96z m128 160a32 32 0 0 0-32-32H352a32 32 0 0 0-32 32v96a32 32 0 0 0 32 32h96a32 32 0 0 0 32-32v-96z m0 320a32 32 0 0 0-32-32H352a32 32 0 0 0-32 32v96a32 32 0 0 0 32 32h96a32 32 0 0 0 32-32v-96z\" fill=\"#3CC451\" p-id=\"1807\"></path><path d=\"M608 0l320 320H608V0z\" fill=\"#B0E7B8\" p-id=\"1808\"></path></svg>\n", _i = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.86105703 589.6722963a44.38416983 44.38416983 0 0 1 44.3841686-44.38416984h917.77585304a44.38416983 44.38416983 0 0 1 0 88.76833966H53.24522563a44.38416983 44.38416983 0 0 1-44.38416862-44.38416982z m-2e-8 372.82702222a44.38416983 44.38416983 0 0 1 44.38416862-44.38416984H598.10528795a44.38416983 44.38416983 0 0 1 0 88.76833967H53.24522563a44.38416983 44.38416983 0 0 1-44.38416862-44.38416983z\" fill=\"#4857e2\" /><path d=\"M53.15645713 36.64554667c29.55985625-22.45838985 68.35162075-35.06349428 109.36259318-35.06349429h698.96189938c41.09974096 0 79.89150425 12.60510443 109.36259318 35.06349429 29.47108895 22.54715835 51.57440475 56.81173724 51.57440475 98.089014v133.15250829c0 41.27727798-22.1033158 75.54185565-51.57440475 98.08901401-29.55985625 22.45838985-68.35162075 35.06349428-109.36259318 35.06349427H162.60781882c-41.09974096 0-79.89150425-12.60510443-109.36259317-35.06349427C23.7741379 343.3401561 1.58205238 309.16434572 1.58205238 267.88706896v-133.15250829c0-41.27727798 22.1033158-75.54185565 51.57440475-98.089014z m53.7936139 70.65959718c-12.60510443 9.58698109-16.59967897 19.70657082-16.59967898 27.42941682v133.15250829c0 7.72284598 3.99457575 17.75366721 16.59967898 27.51818532 12.69387295 9.58698109 32.22290674 16.86598451 55.56897928 16.8659833h698.96189938c23.34607254 0 42.87510755-7.27900343 55.56897928-16.8659833 12.60510443-9.76451691 16.59967897-19.79533934 16.59967898-27.51818532v-133.15250829c0-7.72284598-3.99457575-17.75366721-16.59967898-27.51818532a92.31907165 92.31907165 0 0 0-55.56897928-16.8659833H162.60781882a92.31907165 92.31907165 0 0 0-55.56897926 16.8659833z\" fill=\"#4857E2\" /></svg>", vi = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775322692966\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1580\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M449.86216297 567.92405333q0 42.99938323 70.09148018 42.99938324l54.68129658-0.9942054 12.17901606 0.82850449c32.39452571 4.30822337 60.48082805 25.5179384 74.15115221 56.17260469l26.3464429 59.0723704-44.49069133 99.83479151c-13.75317459 30.65466627-41.75662649 51.86438131-74.23400264 56.17260467l-12.26186651 0.74565405h-36.45419773a48.13611109 48.13611109 0 0 0-47.39045704 44.65639223 48.88176514 48.88176514 0 0 0 38.9397112 52.69288581l8.5335963 0.82850448h36.45419772a189.31327683 189.31327683 0 0 0 166.03230056-100.24904375l6.62803596-13.50462325 10.77055842-24.02663031 10.68770796 24.02663031 6.62803596 13.50462325a189.31327683 189.31327683 0 0 0 165.9494501 100.41474466h38.35975807l8.53359628-0.8285045a48.88176514 48.88176514 0 0 0 38.93971121-52.69288581 48.13611109 48.13611109 0 0 0-47.47330749-44.65639221h-38.44260852l-12.17901605-0.8285045a95.44371769 95.44371769 0 0 1-74.06830175-56.08975422l-44.73924267-99.75194107 26.51214381-59.0723704c13.67032415-30.65466627 41.67377603-51.86438131 74.06830174-56.25545513l12.26186651-0.8285045h56.58685693a48.13611109 48.13611109 0 0 0 47.39045705-44.57354177 48.88176514 48.88176514 0 0 0-38.85686077-52.77573625L961.4636879 512h-56.58685693c-68.26877029 0-131.23511182 37.77980492-165.12094562 98.92343657A189.2304264 189.2304264 0 0 0 574.63493973 512H512q-62.13783703 0-62.13783703 55.92405333z\" fill=\"#617D8B\" p-id=\"1581\"></path><path d=\"M54.00271582 911.75341827a48.88176514 48.88176514 0 0 0-38.93971121 52.69288582c2.23696213 25.35223751 22.86672403 44.73924267 47.47330749 44.65639221h25.18653661l15.74158539-0.4971027C218.37800738 1000.81765136 311.5019125 908.85365253 323.9294799 790.46036037l38.35975806-360.7308566 217.89668188 0.08285045q56.00690379 0 56.00690379-42.0880283 0-25.35223751-12.67611876-39.18826255-15.24448269-16.81864123-48.96461559-16.73579078H372.72839458l9.27925034-87.572925 2.15411169-13.7531746c13.67032415-68.35162075 71.99704051-117.39908677 139.68585765-117.48193722h56.50400649l8.53359628-0.74565404a48.88176514 48.88176514 0 0 0 38.9397112-52.69288582A48.13611109 48.13611109 0 0 0 580.35162075 14.8973037h-56.50400649l-15.74158537 0.4971027C393.19245558 23.18234864 300.23425138 115.14634747 287.72383351 233.53963963l-10.52200706 98.1777825H121.77438341l-8.61644674 0.74565405a48.88176514 48.88176514 0 0 0-38.85686076 52.69288581c2.23696213 25.35223751 22.78387358 44.73924267 47.4733075 44.65639223h144.98828642l-37.11700133 350.04314863-1.98841078 13.7531746c-13.67032415 68.35162075-72.07989097 117.39908677-139.76870812 117.39908678h-25.26938705l-8.53359629 0.74565404z\" fill=\"#F99B0B\" p-id=\"1582\"></path></svg>\n", yi = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775347368945\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1612\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M766.86222222 38.68444445a72.81777778 72.81777778 0 0 1 72.81777778 72.81777777v72.81777778h-582.54222222a72.81777778 72.81777778 0 0 0-72.81777778 72.81777778v582.54222222h-72.81777778a72.81777778 72.81777778 0 0 1-72.81777777-72.81777778v-655.36a72.81777778 72.81777778 0 0 1 72.81777777-72.81777777h655.36z\" fill=\"#047AFF\" p-id=\"1613\"></path><path d=\"M257.13777778 257.13777778m72.81777777 0l582.54222223 0q72.81777778 0 72.81777777 72.81777777l0 582.54222223q0 72.81777778-72.81777777 72.81777777l-582.54222223 0q-72.81777778 0-72.81777777-72.81777777l0-582.54222223q0-72.81777778 72.81777777-72.81777777Z\" fill=\"#10CD88\" p-id=\"1614\"></path><path d=\"M763.07569778 439.18222222h-65.536l-76.45866667 251.22133333L541.05429333 439.18222222H475.59111111L402.77333333 803.27111111h65.536L519.28177778 548.40888889l76.38584889 247.43480889h54.61333333l72.81777778-247.50762667 50.89962667 254.78940444h61.8951111l-72.81777777-363.94325333z\" fill=\"#FFFFFF\" p-id=\"1615\"></path></svg>\n", bi = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775317977198\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1701\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"M501.64369423 374.77894281c0-12.94538311-2.58907614-33.65799466-7.76722962-36.2470708a124.27567408 124.27567408 0 0 0 5.17815228 67.31598931 106.15213868 106.15213868 0 0 0 2.58907734-31.06891851z\" fill=\"#FF5A5A\" p-id=\"1702\"></path><path d=\"M644.0429037 20.07545719H146.94020741a41.42522429 41.42522429 0 0 0-33.65799466 15.53445926A46.60337778 46.60337778 0 0 0 97.74775349 69.26791111v885.46417778a41.42522429 41.42522429 0 0 0 15.53445926 33.65799466 46.60337778 46.60337778 0 0 0 33.65799466 15.53445926h730.11958518a54.37060741 54.37060741 0 0 0 49.19245392-49.19245392V299.69572386z m54.37060741 582.54222222a38.83614815 38.83614815 0 0 1-20.71261275 5.17815228 302.92195555 302.92195555 0 0 1-100.97398519-31.06891852 1390.3341037 1390.3341037 0 0 0-137.22105598 31.06891852 401.30686461 401.30686461 0 0 1-46.60337778 69.90506667 67.31599053 67.31599053 0 0 1-46.60337777 28.47984239h-2.58907735c-15.53445925 0-28.47984238-10.35630577-28.47984118-20.71261276a59.5487609 59.5487609 0 0 1 12.94538191-38.83614815 323.63456831 323.63456831 0 0 1 82.8504498-56.95968354 54.37060741 54.37060741 0 0 0 12.94538312-18.1235354c18.12353539-36.24707201 38.83614815-75.08322016 54.3706074-111.33029217s-38.83614815-113.91936831-5.17815349-137.22105598l15.53445926-5.1781535a23.30168889 23.30168889 0 0 1 18.1235354 7.76722964 77.6722963 77.6722963 0 0 1 15.53445926 56.95968355 243.37319466 243.37319466 0 0 1-12.94538191 69.90506666 222.66058311 222.66058311 0 0 0 80.26137244 95.79583291l59.54876089-5.17815349a72.49414281 72.49414281 0 0 1 54.37060742 15.53445926 31.06891852 31.06891852 0 0 1 7.76722962 23.30168889 28.47984238 28.47984238 0 0 1-12.94538312 20.71261274z\" fill=\"#FF5A5A\" p-id=\"1703\"></path><path d=\"M452.4512391 581.90506667l93.20675556-25.89076503a261.49673127 261.49673127 0 0 1-49.19245391-59.54876089c-2.58907614 5.17815349-20.71261275 44.01430164-44.01430165 85.43952592z m-108.74121481 100.97398518a108.74121482 108.74121482 0 0 0 36.24707201-44.01430163l-31.06891852 36.247072z m300.33287941-111.33029095h-5.17815348a126.86475022 126.86475022 0 0 0 46.60337777 12.94538191h5.17815349a80.26137244 80.26137244 0 0 0-46.60337778-7.76722964z\" fill=\"#FF5A5A\" p-id=\"1704\"></path><path d=\"M926.25224651 299.69572386h-233.01688889a46.60337778 46.60337778 0 0 1-33.65799465-15.53445925 49.19245392 49.19245392 0 0 1-15.53445927-33.65799588V20.07545719z\" fill=\"#FF9797\" p-id=\"1705\"></path></svg>\n", xi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M869.76574805 225.00010553l-17.65653391-42.57827044c-210.02718435 134.34684189-362.20054755 303.33379015-430.76355526 388.49149498L254.03180259 433.8397093l-74.21333048 62.13959111 289.34711411 307.39252224C519.27335138 670.28940573 676.99108751 410.00076743 869.76574805 225.00010553z\" fill=\"#336DF4\" /><path d=\"M951.42940331 6.10448497L72.56943276 6.10448497c-40.44760973 0-73.23881586 32.79004103-73.23881587 73.23881586l0 865.31106816c0 40.44760973 32.79004103 73.24114489 73.23881585 73.2411449l878.85997057 0c40.44993877 0 73.23881586-32.79237006 73.23881587-73.2411449L1024.66821918 79.34330083C1024.66821918 38.8956911 991.88050603 6.10448497 951.42940331 6.10448497zM951.42940331 945.61957092L72.56943276 945.61957092 72.56943276 78.37344313l878.85997055 0L951.42940331 945.61957092z\" fill=\"#336DF4\" /></svg>", Si = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg t=\"1775293823696\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1796\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\">\n <path d=\"M301.11971555 231.79719111h11.06830223c13.39847111 0 24.46677333-11.06830222 24.46677333-24.46677333V40.72334222c0-16.31118222-13.39847111-29.70965333-29.70965333-29.70965333-16.89372445 0-30.29219555 13.39847111-30.29219556 30.29219556v154.9562311c0.58254222 29.12711111 7.57304889 35.53507555 24.46677333 35.53507556z m382.14769778 0h11.65084445c13.39847111 0 24.46677333-11.06830222 24.46677333-24.46677333V42.47096889c0-17.47626667-13.98101333-31.45728-31.45728-31.45728-15.72864 0-28.54456889 12.81592889-28.54456889 28.54456889v156.70385777c0 23.30168889 6.40796445 35.53507555 23.88423111 35.53507556z m167.18961778-154.95623111h-101.36234666v65.82727111h101.36234666c36.11761778 0 65.82727111 29.70965333 65.82727111 65.82727111v65.82727111H79.75367111V214.32092445c0-39.61287111 32.03982222-71.65269333 71.65269334-71.65269334h89.71150222V76.84096H151.40636445c-71.65269333 0-131.65454222 71.65269333-131.65454223 137.47996445v573.22154666c0 65.82727111 60.00184889 143.30538667 131.65454223 143.30538667h704.87608888c65.82727111 0 119.42115555-71.65269333 119.42115556-143.30538667V214.32092445c-5.82542222-65.82727111-53.59388445-137.47996445-125.24657778-137.47996445z m65.82727111 704.87608889c0 49.51608889-40.19541333 89.71150222-89.71150222 89.71150222H157.23178667c-39.61287111 0-71.65269333-32.03982222-71.65269334-71.65269333V340.15004445h830.12266667v441.56700444z m-286.61077333-704.87608889H372.77240889v65.82727111h256.90112V76.84096z m0 0\" fill=\"#2E77ED\" p-id=\"1797\" />\n <path d=\"M739.77400889 527.14609778c-1.16508445-16.89372445-16.31118222-29.70965333-33.20490667-29.70965333H288.88632889c-20.38897778 0-33.20490667 19.80643555-33.20490667 33.20490666 0 19.80643555 13.39847111 33.20490667 33.20490667 33.20490667h418.26531556c20.97152 0 34.36999111-15.14609778 32.62236444-36.70016zM378.59783111 616.8576c-20.38897778 0-33.20490667 19.80643555-33.20490666 33.20490667 0 19.80643555 13.39847111 33.20490667 33.20490666 33.20490666h238.84231111c16.89372445 0 32.03982222-12.81592889 33.20490667-29.70965333 1.74762667-21.55406222-12.23338667-36.70016-33.20490667-36.70016h-238.84231111z\" fill=\"#FFBB12\" p-id=\"1798\" />\n</svg>\n", Ci = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg t=\"1775293819201\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1639\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\">\n <path d=\"M11.0592 864.6656m78.5408 0l846.336 0q78.5408 0 78.5408 78.5408l0 1.4336q0 78.5408-78.5408 78.5408l-846.336 0q-78.5408 0-78.5408-78.5408l0-1.4336q0-78.5408 78.5408-78.5408Z\" fill=\"#C2E3FF\" opacity=\".64\" p-id=\"1640\" />\n <path d=\"M920.4736 10.24H105.1648Q11.1616 10.24 11.0592 112.64v548.6592q0 102.4 94.1056 102.4h815.3088q94.0032 0 94.0032-102.4V112.64q0-102.912-94.0032-102.4zM668.16 418.4064L444.1088 553.6768a33.5872 33.5872 0 0 1-34.6112 0A36.4544 36.4544 0 0 1 392.192 522.24V251.6992a36.4544 36.4544 0 0 1 17.408-31.3344 33.3824 33.3824 0 0 1 34.6112 0l223.9488 135.2704A35.6352 35.6352 0 0 1 680.8576 368.64a37.2736 37.2736 0 0 1-12.6976 49.7664z\" fill=\"#43ADFF\" p-id=\"1641\" />\n</svg>\n", wi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M862.27098738 1020.22536912H169.80693143c-89.22993398 0-161.5583763-72.32844231-161.55837628-161.55837629V165.27086933c0-89.22993398 72.32844231-161.5583763 161.55837628-161.5583763h692.46405595c89.22993398 0 161.5583763 72.32844231 161.5583763 161.5583763v693.33398566c0 89.22993398-72.32844231 161.62051413-161.5583763 161.62051413z\" fill=\"#FFAC3E\" /><path d=\"M1023.82936368 438.11811177l-427.19762963 265.0800128a56.37765954 56.37765954 0 0 1-69.53223965-7.95364315l-139.00234145-138.44310092a56.43358359 56.43358359 0 0 0-79.03932872-0.55924053l-300.80926908 291.36431786v15.53445927c0 86.7444205 70.27789369 157.02231419 157.02231418 157.02231419h701.53618015c86.7444205 0 157.02231419-70.27789369 157.0223142-157.02231419v-425.02280533z\" fill=\"#FF7C0E\" /><path d=\"M299.98570003 298.05942708m-83.57539081 0a83.57539082 83.57539082 0 1 0 167.15078163 0 83.57539082 83.57539082 0 1 0-167.15078163 0Z\" fill=\"#FFFFFF\" /></svg>", Ti = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1775317969720\" class=\"icon\" viewBox=\"0 0 1160 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1549\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"226.5625\" height=\"200\"><path d=\"M828.932292 109.805711c45.73702 0 82.87275 36.862673 82.87275 82.326636v658.61309a82.599693 82.599693 0 0 1-82.87275 82.394901H82.87275A82.599693 82.599693 0 0 1 0 850.745437V192.132347a82.599693 82.599693 0 0 1 82.87275-82.326636h746.059542zM336.542551 466.554468c-24.370323 0-97.344762 96.389063-166.223349 196.805715l-10.512688 15.495976c-26.213456 38.637542-51.880799 77.616406-76.933764 117.004854h718.412537c-1.29702-0.887435-121.783349-201.857266-157.96338-201.857266-35.497389 0-103.215484 97.481291-103.215484 97.48129-52.631705-58.70722-169.226974-224.930569-203.563872-224.930569z m356.339172-192.095485a83.214071 83.214071 0 0 0-59.321598 22.663718c-15.905561 15.018126-25.189493 35.83871-25.667342 57.683257a83.69192 83.69192 0 0 0 82.872749 84.306298 82.599693 82.599693 0 0 0 83.964978-81.302673 82.599693 82.599693 0 0 0-81.917051-83.3506zM417.77696 31.643192l-138.849401-27.305684c-46.146605-9.010876-64.441413-5.734194-75.56848 27.305684h214.349617z m681.959449 183.42593l-108.608356-21.298434v674.928236c3.618003 32.220707-5.665929 64.509678-25.803871 89.972228a114.683871 114.683871 0 0 1-85.671583 25.257757h-65.533641l139.600308 27.305684c57.546728 11.263595 71.882212 2.59404 83.214071-58.502427l119.462366-651.513613c10.922273-59.321598 2.389247-74.407988-56.659294-86.149431z\" fill=\"#2C95FF\" p-id=\"1550\"></path></svg>\n", Ei = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.95555555 102.4m68.26666667 0l887.46666666 0q68.26666667 0 68.26666667 68.26666667l0 682.66666666q0 68.26666667-68.26666667 68.26666667l-887.46666666 0q-68.26666667 0-68.26666667-68.26666667l0-682.66666666q0-68.26666667 68.26666667-68.26666667Z\" fill=\"#5A8FFA\" /><path d=\"M966.03022222 307.2v546.13333333h-887.46666667V307.2h887.46666667zM624.35555555 614.4H214.75555555v68.26666667h409.6v-68.26666667zM829.15555555 443.73333333H214.75555555v68.26666667h614.4V443.73333333zM180.62222222 170.66666667v68.26666666H78.22222222V170.66666667h102.4zM351.28888888 170.66666667v68.26666666H248.88888888V170.66666667H351.28888888z m170.66666667 0v68.26666666H419.55555555V170.66666667h102.4z\" fill=\"#E8F0FF\" /></svg>", Di = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M979.096493 980.95048601H44.904061C19.82989801 980.95048601 0.000277 960.442811 0.000277 935.839135v-740.047567c0-25.184865 20.410811-45.111351 44.903784-45.111352h934.192432c25.07416201 0 44.903784 20.507676 44.903784 45.111352v740.047567c0 25.184865-20.410811 45.111351-44.903784 45.11135099z\" fill=\"#FFA000\" /><path d=\"M512.000277 344.40994601H0.000277V112.902919a45.09751399 45.09751399 0 0 1 44.903784-45.24973h350.470918c19.82962201 0 37.320649 12.924541 43.14637899 32.311352L512.000277 344.423784z\" fill=\"#FFA000\" /><path d=\"M909.699736 925.599135H114.300817c-25.184865 0-45.111351-20.13405399-45.11135101-44.28108101v-603.32972999c0-24.728216 20.49383801-44.281081 45.11135101-44.281081h795.398919c25.184865 0 45.111351 20.13405399 45.111352 44.281081v603.32972999c0.567351 24.147027-19.92648599 44.281081-45.111352 44.28108101z\" fill=\"#FFFFFF\" /><path d=\"M979.096493 980.95048601H44.904061C19.82989801 980.95048601 0.000277 960.802595 0.000277 936.627892V361.056865c0-24.755892 20.410811-44.322595 44.903784-44.32259501h934.192432c25.07416201 0 44.903784 20.147892 44.903784 44.32259501v575.571027c0 24.755892-20.410811 44.322595-44.903784 44.32259401z\" fill=\"#FFCA28\" /><path d=\"M364.46125001 485.708108H106.634655C93.91768199 485.708108 83.027304 476.02162201 83.027304 463.512216c0-11.96973001 10.295351-22.223568 23.607351-22.223567h257.21773c12.716973 0 23.607351 9.68648601 23.607351 22.223567 0 11.955892-10.295351 22.223568-22.99848599 22.223568z m0 149.296433H106.634655c-12.716973 0-23.607351-9.68648601-23.607351-22.223568 0-12.537081 10.295351-22.223568 23.607351-22.223568h257.21773c12.716973 0 23.607351 9.68648601 23.607351 22.223568 0 12.537081-10.295351 22.223568-22.99848599 22.223568z\" fill=\"#FFF8E1\" /></svg>", Oi = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M338.432 76.79999999h604.5184a56.832 56.832 0 0 1 0 113.66400001H338.432a56.832 56.832 0 0 1 0-113.66400001z m0 384.00000001h604.5184a56.832 56.832 0 0 1 0 113.66400001H338.432a56.832 56.832 0 1 1 0-113.66400001z m0 384.00000001h604.5184a56.832 56.832 0 0 1 0 113.66399999H338.432a56.832 56.832 0 1 1 0-113.66400001z m-223.232-614.40000002a89.6 89.6 0 1 1 0-179.19999999 89.6 89.6 0 0 1 0 179.20000001z m0 384.00000001a89.6 89.6 0 1 1 0-179.20000001 89.6 89.6 0 0 1 0 179.20000001z m0 384.00000001a89.6 89.6 0 1 1 0-179.20000001 89.6 89.6 0 0 1 0 179.20000001z\" fill=\"#5B65F5\" /></svg>", ki = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M860.78198114 886.70496575H139.65166972c-45.9543826 0-82.4822247-36.52784211-82.48222608-82.48222472V428.33945687c0-20.03139801 15.31812707-35.34952507 35.34952506-35.34952506s35.34952507 15.31812707 35.34952508 35.34952506v375.88328416c0 7.06990501 4.71326955 11.78317456 11.78317594 11.78317456h722.30862847c7.06990501 0 11.78317456-4.71326955 11.78317457-11.78317456V428.33945687c0-20.03139801 15.31812707-35.34952507 35.34952506-35.34952506s35.34952507 15.31812707 35.34952508 35.34952506v375.88328416c-1.17831705 45.9543826-37.70616053 82.4822247-83.66054176 82.48222472z\" fill=\"#190D04\"></path><path d=\"M507.28673045 634.54502071c-35.34952507 0-69.52073311-15.31812707-93.0870836-41.24111305L276.33649907 441.30094987c-12.96149298-14.13981003-11.78317456-36.52784211 2.35663547-49.48933512s36.52784211-11.78317456 49.48933509 2.35663548l137.86314777 152.0029578c10.60485751 11.78317456 25.92298459 17.67476253 42.4194301 17.67476253s30.63625552-8.24822206 41.24111303-20.03139799l120.18838523-148.4680053c11.78317456-15.31812707 34.17120803-17.67476253 49.48933511-4.71326954 15.31812707 11.78317456 17.67476253 34.17120803 4.71326955 49.48933509L605.08708222 587.41231969c-23.56635051 28.27962006-57.73755715 44.77606555-94.26539927 45.95438258-1.17831705 1.17831705-2.35663547 1.17831705-3.5349525 1.17831844z\" fill=\"#E56D1C\"></path><path d=\"M500.21682544 626.29679726c-20.03139801 0-35.34952507-15.31812707-35.34952508-35.34952507V149.07820882c0-20.03139801 15.31812707-35.34952507 35.34952508-35.34952508s35.34952507 15.31812707 35.34952507 35.34952508v441.86906337c0 18.85307957-15.31812707 35.34952507-35.34952507 35.34952507z\" fill=\"#E56D1C\"></path></svg>\n", Ai = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M800.768 477.184c-14.336 0-30.72 2.048-45.056 4.096 18.432-51.2 77.824-188.416 237.568-315.392 36.864-28.672-20.48-86.016-59.392-57.344-155.648 116.736-356.352 317.44-356.352 573.44v20.48c0 122.88 100.352 223.232 223.232 223.232S1024 825.344 1024 702.464c0-124.928-100.352-225.28-223.232-225.28zM223.232 477.184c-14.336 0-30.72 2.048-45.056 4.096 18.432-51.2 77.824-188.416 237.568-315.392 36.864-28.672-20.48-86.016-59.392-57.344C200.704 225.28 0 425.984 0 681.984v20.48c0 122.88 100.352 223.232 223.232 223.232s223.232-100.352 223.232-223.232c0-124.928-100.352-225.28-223.232-225.28z\" fill=\"#336DF4\" /></svg>", ji = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M338.432 76.8h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 0 1 0-113.664z m0 384h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 1 1 0-113.664z m0 384h604.5184a56.832 56.832 0 0 1 0 113.664H338.432a56.832 56.832 0 1 1 0-113.664zM166.6048 51.2v204.8H109.9776V121.8048a172.032 172.032 0 0 1-26.5728 16.896A207.616 207.616 0 0 1 51.2 151.04v-45.8752c19.0464-6.144 33.792-13.4656 44.3904-22.1184 10.496-8.6016 18.7392-19.2 24.6784-31.8464h46.336z m52.4288 563.2H51.2c1.9456-16.5888 7.7824-32.1536 17.5104-46.7456 9.728-14.6432 28.0576-31.8464 54.8864-51.712 16.384-12.1856 26.88-21.504 31.4368-27.7504a31.0784 31.0784 0 0 0 6.8608-18.0224 20.992 20.992 0 0 0-6.7584-15.7184 23.7056 23.7056 0 0 0-17.1008-6.5536 23.8592 23.8592 0 0 0-17.5616 6.7584c-4.5056 4.5056-7.5776 12.3904-9.1136 23.7568L55.296 473.9072c2.2016-15.7696 6.2464-28.0576 12.1344-36.864 5.8368-8.8576 14.08-15.6672 24.7808-20.3776 10.6496-4.7104 25.4464-7.0656 44.288-7.0656 19.712 0 35.0208 2.2528 45.9264 6.7072 10.9568 4.5056 19.5584 11.4176 25.856 20.6848 6.2464 9.3184 9.4208 19.712 9.4208 31.232 0 12.288-3.584 24.064-10.8032 35.1744-7.168 11.2128-20.2752 23.4496-39.2192 36.864a414.72 414.72 0 0 0-22.5792 16.3328c-3.84 3.072-8.2944 7.168-13.4144 12.1856h87.3472V614.4z m-112.8448 239.872l-52.0192-9.3184c4.3008-16.5888 12.6464-29.2864 24.9344-38.0928 12.288-8.8576 29.696-13.2608 52.224-13.2608 25.8048 0 44.544 4.8128 56.064 14.4384a45.4144 45.4144 0 0 1 17.2544 36.352 40.6016 40.6016 0 0 1-7.0144 23.2448c-4.6592 6.912-11.776 13.0048-21.1968 18.2272 7.68 1.8944 13.5168 4.096 17.5616 6.656 6.5536 4.0448 11.6736 9.3696 15.36 15.9744 3.584 6.656 5.4272 14.5408 5.4272 23.7056 0 11.52-3.0208 22.5792-9.0624 33.1776a60.6208 60.6208 0 0 1-26.0608 24.4224c-11.3152 5.7344-26.2656 8.6016-44.6976 8.6016-18.0224 0-32.256-2.0992-42.6496-6.3488a63.6416 63.6416 0 0 1-25.6-18.5856 85.3504 85.3504 0 0 1-15.5136-30.72l54.9888-7.3216c2.1504 11.1104 5.5296 18.7904 10.0352 23.04a24.32 24.32 0 0 0 17.408 6.4512 23.8592 23.8592 0 0 0 18.432-8.1408 30.9248 30.9248 0 0 0 7.3216-21.6064c0-9.216-2.3552-16.2816-7.0656-21.3504a25.088 25.088 0 0 0-19.2512-7.5264c-4.3008 0-10.24 1.024-17.8176 3.2256l2.816-39.3216c3.072 0.4608 5.4272 0.6656 7.168 0.6656a25.088 25.088 0 0 0 18.0224-6.8608 21.8112 21.8112 0 0 0 7.2192-16.384 19.5584 19.5584 0 0 0-5.376-14.4384 20.0704 20.0704 0 0 0-14.848-5.376 21.8112 21.8112 0 0 0-15.872 5.8368c-3.9936 3.9424-6.7584 10.8032-8.192 20.6336z\" fill=\"#5B65F5\" /></svg>", Mi = /* #__PURE__ */ Object.assign({
2722
+ "./assets/icons/mono/To-do.svg": Wn,
2723
+ "./assets/icons/mono/add-circle.svg": Gn,
2724
+ "./assets/icons/mono/add.svg": Kn,
2725
+ "./assets/icons/mono/attachment.svg": qn,
2726
+ "./assets/icons/mono/back.svg": Jn,
2727
+ "./assets/icons/mono/beijingse.svg": Yn,
2728
+ "./assets/icons/mono/charutupian.svg": Xn,
2729
+ "./assets/icons/mono/close.svg": Zn,
2730
+ "./assets/icons/mono/code.svg": Qn,
2731
+ "./assets/icons/mono/codeblock.svg": $n,
2732
+ "./assets/icons/mono/comment.svg": er,
2733
+ "./assets/icons/mono/cut.svg": tr,
2734
+ "./assets/icons/mono/dagang.svg": nr,
2735
+ "./assets/icons/mono/days.svg": rr,
2736
+ "./assets/icons/mono/delete.svg": ir,
2737
+ "./assets/icons/mono/drag.svg": ar,
2738
+ "./assets/icons/mono/edit.svg": or,
2739
+ "./assets/icons/mono/fangdayulan.svg": sr,
2740
+ "./assets/icons/mono/folder.svg": cr,
2741
+ "./assets/icons/mono/gaoliangkuai.svg": lr,
2742
+ "./assets/icons/mono/h1.svg": ur,
2743
+ "./assets/icons/mono/h2.svg": dr,
2744
+ "./assets/icons/mono/h3.svg": fr,
2745
+ "./assets/icons/mono/h4.svg": pr,
2746
+ "./assets/icons/mono/h5.svg": mr,
2747
+ "./assets/icons/mono/h6.svg": hr,
2748
+ "./assets/icons/mono/huanyuan.svg": gr,
2749
+ "./assets/icons/mono/image.svg": _r,
2750
+ "./assets/icons/mono/jiacu.svg": vr,
2751
+ "./assets/icons/mono/jianshao.svg": yr,
2752
+ "./assets/icons/mono/juzhongduiqi.svg": br,
2753
+ "./assets/icons/mono/kapianyulan.svg": xr,
2754
+ "./assets/icons/mono/link.svg": Sr,
2755
+ "./assets/icons/mono/mark.svg": Cr,
2756
+ "./assets/icons/mono/merge.svg": wr,
2757
+ "./assets/icons/mono/quanpingzuidahua.svg": Tr,
2758
+ "./assets/icons/mono/redo.svg": Er,
2759
+ "./assets/icons/mono/rubber.svg": Dr,
2760
+ "./assets/icons/mono/save.svg": Or,
2761
+ "./assets/icons/mono/shangbiao.svg": kr,
2762
+ "./assets/icons/mono/shangfangtianjia.svg": Ar,
2763
+ "./assets/icons/mono/shezhi.svg": jr,
2764
+ "./assets/icons/mono/shixinxiangyou.svg": Mr,
2765
+ "./assets/icons/mono/smile.svg": Nr,
2766
+ "./assets/icons/mono/split.svg": Pr,
2767
+ "./assets/icons/mono/switch.svg": Fr,
2768
+ "./assets/icons/mono/text-color.svg": Ir,
2769
+ "./assets/icons/mono/text.svg": Lr,
2770
+ "./assets/icons/mono/wenziyulan.svg": Rr,
2771
+ "./assets/icons/mono/wuxuliebiao.svg": zr,
2772
+ "./assets/icons/mono/xiabiao.svg": Br,
2773
+ "./assets/icons/mono/xiafangtianjia.svg": Vr,
2774
+ "./assets/icons/mono/xiahuaxian.svg": Hr,
2775
+ "./assets/icons/mono/xiangshangcharu.svg": Ur,
2776
+ "./assets/icons/mono/xiangxiacharujilu-copy.svg": Wr,
2777
+ "./assets/icons/mono/xiangxiajiantou.svg": Gr,
2778
+ "./assets/icons/mono/xiangyoucharu.svg": Kr,
2779
+ "./assets/icons/mono/xiangzuocharu.svg": qr,
2780
+ "./assets/icons/mono/xieti.svg": Jr,
2781
+ "./assets/icons/mono/xuanzhuan.svg": Yr,
2782
+ "./assets/icons/mono/yanse.svg": Xr,
2783
+ "./assets/icons/mono/yanshi.svg": Zr,
2784
+ "./assets/icons/mono/yinyong.svg": Qr,
2785
+ "./assets/icons/mono/youduiqi.svg": $r,
2786
+ "./assets/icons/mono/youjiantou.svg": ei,
2787
+ "./assets/icons/mono/yousuojin.svg": ti,
2788
+ "./assets/icons/mono/youxuliebiao.svg": ni,
2789
+ "./assets/icons/mono/yulan.svg": ri,
2790
+ "./assets/icons/mono/zhuti.svg": ii,
2791
+ "./assets/icons/mono/zuoduiqi.svg": ai,
2792
+ "./assets/icons/mono/zuojiantou.svg": oi,
2793
+ "./assets/icons/mono/zuosuojin.svg": si
2794
+ }), Ni = /* #__PURE__ */ Object.assign({
2795
+ "./assets/icons/color/ai-mark.svg": ci,
2796
+ "./assets/icons/color/biaoge.svg": li,
2797
+ "./assets/icons/color/daimakuai.svg": ui,
2798
+ "./assets/icons/color/daojishi.svg": di,
2799
+ "./assets/icons/color/dayin.svg": fi,
2800
+ "./assets/icons/color/duihao.svg": pi,
2801
+ "./assets/icons/color/fengexian.svg": mi,
2802
+ "./assets/icons/color/fenlan.svg": hi,
2803
+ "./assets/icons/color/file.svg": gi,
2804
+ "./assets/icons/color/gaoliangkuai1.svg": _i,
2805
+ "./assets/icons/color/jisuangongshi.svg": vi,
2806
+ "./assets/icons/color/markdown.svg": yi,
2807
+ "./assets/icons/color/pdfdaochu.svg": bi,
2808
+ "./assets/icons/color/renwu.svg": xi,
2809
+ "./assets/icons/color/riqi.svg": Si,
2810
+ "./assets/icons/color/shipin.svg": Ci,
2811
+ "./assets/icons/color/tupian.svg": wi,
2812
+ "./assets/icons/color/tupiandaochu.svg": Ti,
2813
+ "./assets/icons/color/wangye.svg": Ei,
2814
+ "./assets/icons/color/wenjianjia.svg": Di,
2815
+ "./assets/icons/color/wuxuliebiao.svg": Oi,
2816
+ "./assets/icons/color/xiazai.svg": ki,
2817
+ "./assets/icons/color/yinyong.svg": Ai,
2818
+ "./assets/icons/color/youxuliebiao.svg": ji
2819
+ });
2820
+ function Pi(e) {
2821
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e.split("/").pop()?.replace(/\.svg$/i, "") ?? e, String(t)]));
2822
+ }
2823
+ var Fi = Pi(Mi), Ii = Pi(Ni);
2824
+ Object.keys(Fi).sort(), Object.keys(Ii).sort();
2825
+ //#endregion
2826
+ //#region src/components/OfficeColorIcon.vue?vue&type=script&setup=true&lang.ts
2827
+ var Li = [
2828
+ "data-name",
2829
+ "title",
2830
+ "innerHTML"
2831
+ ], Ri = /* @__PURE__ */ de({
2832
+ __name: "OfficeColorIcon",
2833
+ props: {
2834
+ name: {},
2835
+ size: { default: 22 },
2836
+ backgroundColor: { default: "#ffffff" }
2837
+ },
2838
+ setup(e) {
2839
+ let t = e, n = le(() => Ii[t.name] ?? ""), r = le(() => typeof t.size == "number" ? `${t.size}px` : t.size), i = le(() => ({
2840
+ width: r.value,
2841
+ height: r.value,
2842
+ backgroundColor: t.backgroundColor
2843
+ }));
2844
+ return (t, r) => (he(), ue("span", {
2845
+ class: pe(["norio-office-rich-icon", { "norio-office-rich-icon--missing": !n.value }]),
2846
+ style: me(i.value),
2847
+ "data-name": e.name,
2848
+ title: n.value ? void 0 : `Unknown icon: ${e.name}`,
2849
+ innerHTML: n.value
2850
+ }, null, 14, Li));
2851
+ }
2852
+ }), Q = class extends Error {
2853
+ code;
2854
+ retryable;
2855
+ constructor(e, t, n = !1) {
2856
+ super(t), this.code = e, this.retryable = n, this.name = "RichTextAiBridgeError";
2857
+ }
2858
+ };
2859
+ function $(e, t, n = !1) {
2860
+ throw new Q(e, t, n);
2861
+ }
2862
+ function zi(e, t, n) {
2863
+ let r = e.state.doc;
2864
+ if (t === n) {
2865
+ let e = r.resolve(t);
2866
+ return JSON.stringify({
2867
+ parent: e.parent.toJSON(),
2868
+ offset: e.parentOffset
2869
+ });
2870
+ }
2871
+ return JSON.stringify(r.slice(t, n).toJSON());
2872
+ }
2873
+ function Bi(e) {
2874
+ return Array.isArray(e) ? `[${e.map(Bi).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${Bi(t)}`).join(",")}}` : JSON.stringify(e);
2875
+ }
2876
+ function Vi(e) {
2877
+ let t = S.getState(e.state);
2878
+ return (!t?.type?.doc || !t.binding?.mapping) && $("COLLABORATION_NOT_READY", "Collaborative document is not ready.", !0), t;
2879
+ }
2880
+ function Hi(e, t, n) {
2881
+ let r = n.getSelectedBlocks();
2882
+ if (r.length) return {
2883
+ kind: "blockSet",
2884
+ blocks: r,
2885
+ revision: t
2886
+ };
2887
+ let { selection: a, doc: o } = e.state;
2888
+ if (a instanceof c) {
2889
+ let e = o.resolve(a.$anchorCell.pos), n = -1;
2890
+ for (let t = e.depth; t > 0; t--) if (e.node(t).type.name === "table") {
2891
+ n = t;
2892
+ break;
2893
+ }
2894
+ let r = n > 0 ? e.node(n) : null, i = n > 0 ? e.start(n) : -1, s = r ? l.get(r) : null, c = [];
2895
+ return a.forEachCell((e, t) => {
2896
+ let n = s && t >= i ? s.findCell(t - i) : null;
2897
+ c.push({
2898
+ from: t,
2899
+ to: t + e.nodeSize,
2900
+ nodeId: e.attrs.aiId,
2901
+ ...n ? {
2902
+ row: n.top,
2903
+ column: n.left
2904
+ } : {}
2905
+ });
2906
+ }), {
2907
+ kind: "tableCells",
2908
+ from: a.from,
2909
+ to: a.to,
2910
+ cells: c,
2911
+ tableId: r?.attrs.aiId ?? null,
2912
+ anchorCell: a.$anchorCell.pos,
2913
+ headCell: a.$headCell.pos,
2914
+ revision: t
2915
+ };
2916
+ }
2917
+ if (a instanceof i) return {
2918
+ kind: "node",
2919
+ from: a.from,
2920
+ to: a.to,
2921
+ node: a.node.toJSON(),
2922
+ revision: t
2923
+ };
2924
+ if (a.empty) return {
2925
+ kind: "cursor",
2926
+ from: a.from,
2927
+ to: a.from,
2928
+ direction: "forward",
2929
+ revision: t
2930
+ };
2931
+ let s = [], u = [];
2932
+ return o.nodesBetween(a.from, a.to, (e, t) => {
2933
+ e.isTextblock && s.push({
2934
+ from: t,
2935
+ to: t + e.nodeSize,
2936
+ nodeId: e.attrs.aiId
2937
+ }), e.isText && u.push({
2938
+ from: Math.max(t, a.from),
2939
+ to: Math.min(t + e.nodeSize, a.to),
2940
+ marks: e.marks.map((e) => e.toJSON())
2941
+ });
2942
+ }), {
2943
+ kind: "textRange",
2944
+ from: a.from,
2945
+ to: a.to,
2946
+ direction: a.anchor <= a.head ? "forward" : "backward",
2947
+ text: o.textBetween(a.from, a.to, "\n"),
2948
+ blocks: s,
2949
+ markRanges: u,
2950
+ revision: t
2951
+ };
2952
+ }
2953
+ function Ui(t, r) {
2954
+ r.documentId?.trim() || $("DOCUMENT_NOT_FOUND", "documentId is required.");
2955
+ let i = t.getAiAdapter(), s = i.getEditor() ?? $("EDITOR_NOT_READY", "Editor is not ready.", !0), c = 0, u = !1, d = Hi(s, c, i), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Set(), g = crypto.randomUUID(), _ = null, S = new o(`norio-rich-text-ai-preview-${crypto.randomUUID()}`), w = null;
2956
+ function T(e) {
2957
+ for (let t of h) t(e);
2958
+ }
2959
+ function E() {
2960
+ let e = _?.value.targetId, t = "";
2961
+ if (!s.isEditable) t = "预览模式不可选择 AI 编辑范围";
2962
+ else if (d.kind === "none") t = "请先在正文选择目标或放置光标";
2963
+ else if (i.isCollaborationConfigured()) try {
2964
+ Vi(s);
2965
+ } catch {
2966
+ t = "协作文档尚未就绪";
2967
+ }
2968
+ i.setAiTargetUiState?.({
2969
+ active: !!e,
2970
+ busy: !!e && [...f.values()].some((t) => t.targetId === e && !t.cancelled),
2971
+ available: !t,
2972
+ reason: t
2973
+ });
2974
+ }
2975
+ function ee(e) {
2976
+ let t = s.state.doc;
2977
+ return e.kind === "blockSet" || e.kind === "tableCells" ? (e.kind === "blockSet" ? e.blocks : e.cells)?.flatMap((e) => {
2978
+ let n = t.nodeAt(e.from);
2979
+ return n ? [n.toJSON()] : [];
2980
+ }) ?? [] : e.kind === "node" ? e.node ? [e.node] : [] : e.kind === "cursor" && e.from !== void 0 ? [t.resolve(e.from).parent.toJSON()] : e.from !== void 0 && e.to !== void 0 ? t.slice(e.from, e.to).content.toJSON() ?? [] : [];
2981
+ }
2982
+ function D(e) {
2983
+ return e.kind === "cursor" ? "AI 将在此调整" : e.kind === "blockSet" ? `AI 将调整 ${e.blocks?.length ?? 0} 个节点` : e.kind === "tableCells" ? `AI 将调整 ${e.cells?.length ?? 0} 个单元格` : e.kind === "node" ? "AI 将调整此节点" : "AI 将调整选中内容";
2984
+ }
2985
+ function te(e) {
2986
+ let t = e.dom.parentElement;
2987
+ if (!t) return {
2988
+ update() {},
2989
+ destroy() {}
2990
+ };
2991
+ let n = document.createElement("div");
2992
+ n.className = "norio-office-rich-ai-target-overlay";
2993
+ let r = document.createElement("div");
2994
+ r.className = "norio-office-rich-ai-target-badge";
2995
+ let i = document.createElement("span");
2996
+ i.className = "norio-office-rich-ai-target-icon", ge(fe(Ri, {
2997
+ name: "ai-mark",
2998
+ size: 14,
2999
+ backgroundColor: "transparent",
3000
+ "aria-hidden": "true"
3001
+ }), i);
3002
+ let a = document.createElement("span");
3003
+ a.textContent = _?.value.summary ?? "AI 将在此调整";
3004
+ let o = document.createElement("button");
3005
+ o.type = "button", o.textContent = "×", o.title = "取消 AI 编辑范围", o.setAttribute("aria-label", "取消 AI 编辑范围"), o.addEventListener("mousedown", (e) => e.preventDefault()), o.addEventListener("click", (e) => {
3006
+ e.preventDefault(), e.stopPropagation(), R({ reason: "badge-close" });
3007
+ }), r.append(i, a, o);
3008
+ let c = document.createElement("div");
3009
+ c.className = "norio-office-rich-ai-target-connector";
3010
+ let l = document.createElement("div");
3011
+ l.className = "norio-office-rich-ai-target-rail";
3012
+ let d = document.createElement("div");
3013
+ d.className = "norio-office-rich-ai-target-cursor", n.append(r, c, l, d);
3014
+ let f = null;
3015
+ function p() {
3016
+ f = null;
3017
+ let i = _?.value.selection;
3018
+ if (!i || u || s.isDestroyed) {
3019
+ n.remove();
3020
+ return;
3021
+ }
3022
+ n.isConnected || t.append(n), a.textContent = _?.value.summary ?? "AI 将在此调整";
3023
+ let o = t.getBoundingClientRect(), p = (t.offsetWidth ? o.width / t.offsetWidth : 1) || 1, m = (e) => e / p, h = [];
3024
+ if (i.kind !== "cursor") {
3025
+ let t = i.kind === "textRange" ? ".norio-office-rich-ai-target-text" : ".norio-office-rich-ai-target-node";
3026
+ h = [...e.dom.querySelectorAll(t)].flatMap((e) => [...e.getClientRects()]).filter((e) => e.width > 0 && e.height > 0);
3027
+ }
3028
+ let g, v, y, b;
3029
+ if (i.kind === "cursor" && i.from !== void 0) try {
3030
+ let t = e.coordsAtPos(i.from);
3031
+ g = t.top, v = t.bottom, y = b = t.left;
3032
+ } catch {
3033
+ g = o.top, v = g + 20, y = b = o.left;
3034
+ }
3035
+ else h.length ? (g = Math.min(...h.map((e) => e.top)), v = Math.max(...h.map((e) => e.bottom)), y = Math.min(...h.map((e) => e.left)), b = Math.max(...h.filter((e) => Math.abs(e.top - g) < 3 * p).map((e) => e.right))) : (g = o.top, v = g + 20, y = b = o.left);
3036
+ let x = r.getBoundingClientRect(), S = x.width || 180 * p, C = x.height || 27 * p, w = b - S + 34 * p, T = Math.max(o.left + 4 * p, 8), E = Math.min(o.right - S - 4 * p, window.innerWidth - S - 8), ee = E >= T ? Math.max(T, Math.min(E, w)) : w, D = (i.kind === "cursor" ? 27 : 16) * p, te = t.closest(".norio-office-rich-editor")?.querySelector(".norio-office-rich-editor__toolbar"), O = Math.max(o.top + 4 * p, (te?.getBoundingClientRect().bottom ?? 0) + 6, 8), k = g - O - C, A = k < 6 * p, j = A ? v + D : g - C - Math.min(D, k);
3037
+ r.style.left = `${m(ee - o.left)}px`, r.style.top = `${m(j - o.top)}px`, c.style.left = `${m(b - o.left)}px`, c.style.top = `${m((A ? v : j + C) - o.top)}px`, c.style.height = `${m(Math.max(0, A ? j - v : g - j - C))}px`;
3038
+ let M = i.kind === "cursor";
3039
+ d.hidden = !M;
3040
+ let N = i.kind === "blockSet" ? [...i.blocks ?? []].sort((e, t) => e.from - t.from) : [], ne = N.every((e, t) => t === 0 || N[t - 1].to === e.from);
3041
+ l.hidden = M || i.kind === "tableCells" || i.kind === "blockSet" && !ne, M ? (d.style.left = `${m(y - o.left)}px`, d.style.top = `${m(g - o.top)}px`, d.style.height = `${Math.max(18, m(v - g))}px`) : (l.classList.toggle("norio-office-rich-ai-target-rail--blocks", i.kind === "blockSet"), l.style.left = `${m(y - o.left) - (i.kind === "blockSet" ? 16 : 3)}px`, l.style.top = `${m(g - o.top)}px`, l.style.height = `${Math.max(2, m(v - g))}px`);
3042
+ }
3043
+ function m() {
3044
+ f === null && (f = requestAnimationFrame(p));
3045
+ }
3046
+ let h = typeof ResizeObserver == "function" ? new ResizeObserver(m) : null;
3047
+ return h?.observe(t), h?.observe(e.dom), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), p(), {
3048
+ update: p,
3049
+ destroy() {
3050
+ f !== null && cancelAnimationFrame(f), h?.disconnect(), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m), ge(null, i), n.remove();
3051
+ }
3052
+ };
3053
+ }
3054
+ function O(e) {
3055
+ let t = _?.value.selection;
3056
+ if (!t || t.kind === "none") return [];
3057
+ let n = [], r = (t, n) => t >= 0 && n <= e.doc.content.size && t <= n;
3058
+ t.kind === "textRange" && t.from !== void 0 && t.to !== void 0 && t.from < t.to && r(t.from, t.to) && n.push(v.inline(t.from, t.to, { class: "norio-office-rich-ai-target-text" }));
3059
+ let i = (t.kind === "blockSet" ? t.blocks : t.kind === "tableCells" ? t.cells : null) ?? (t.kind === "node" && t.from !== void 0 && t.to !== void 0 ? [{
3060
+ from: t.from,
3061
+ to: t.to
3062
+ }] : []);
3063
+ for (let t of i) r(t.from, t.to) && e.doc.nodeAt(t.from) && n.push(v.node(t.from, t.to, { class: "norio-office-rich-ai-target-node" }));
3064
+ return n;
3065
+ }
3066
+ function k(e, t) {
3067
+ for (let n of e) {
3068
+ let e = Bi(n);
3069
+ if (t?.has(e)) continue;
3070
+ let i = !1;
3071
+ try {
3072
+ i = r.authorizeExternalReference?.(n) === !0;
3073
+ } catch {}
3074
+ i || $([
3075
+ "image",
3076
+ "video",
3077
+ "file"
3078
+ ].includes(n.kind) ? "RESOURCE_UNAVAILABLE" : "UNSUPPORTED_CAPABILITY", `Host authorization is required for ${n.kind} references.`), t?.add(e);
3079
+ }
3080
+ }
3081
+ function A(t, n = t.targetRef) {
3082
+ let i = t.builder.snapshot(), a = t.mode !== "replaceText", o = document.createElement(a ? "div" : "span");
3083
+ o.className = `norio-office-rich-ai-preview${a ? " norio-office-rich-ai-preview--block" : ""}`, o.setAttribute("data-ai-stream-id", t.id);
3084
+ let c = i.nodes.map((e) => ({
3085
+ node: e,
3086
+ complete: !0
3087
+ }));
3088
+ if (i.openNodes.length) {
3089
+ let e = i.openNodes;
3090
+ for (let t = e.length - 2; t >= 0; t--) e[t].content = [...e[t].content ?? [], e[t + 1]];
3091
+ c.push({
3092
+ node: e[0],
3093
+ complete: !1
3094
+ });
3095
+ }
3096
+ let l = !1;
3097
+ if (t.mode === "operations" && i.operations.length) try {
3098
+ let a = P(t.contextId), c = ae(a), u = c.get(n);
3099
+ if (u) {
3100
+ let n = {
3101
+ protocolVersion: 1,
3102
+ documentId: r.documentId,
3103
+ requestId: t.requestId,
3104
+ contextId: a.id,
3105
+ baseRevision: a.baseRevision,
3106
+ operations: i.operations
3107
+ }, d = Un(s.state, n, c), f = Math.min(d.mapping.map(u.from, -1), d.doc.content.size), p = d.doc.resolve(f), m = d.doc.nodeAt(f);
3108
+ if (!m?.isBlock) {
3109
+ for (let e = p.depth; e > 0; e--) if (p.node(e).isBlock) {
3110
+ m = p.node(e);
3111
+ break;
3112
+ }
3113
+ }
3114
+ m?.isBlock && (o.appendChild(e.fromSchema(s.schema).serializeNode(m)), l = !0);
3115
+ }
3116
+ } catch {}
3117
+ for (let { node: t, complete: n } of c) try {
3118
+ let r = s.schema.nodeFromJSON(t);
3119
+ n && r.check(), o.appendChild(e.fromSchema(s.schema).serializeNode(r)), l = !0;
3120
+ } catch {
3121
+ t.content?.length && (o.appendChild(document.createTextNode(t.content.map((e) => e.text ?? "").join(""))), l = !0);
3122
+ }
3123
+ return i.replacementText && (o.appendChild(document.createTextNode(i.replacementText)), l = !0), l || (o.textContent = "生成中..."), o;
3124
+ }
3125
+ s.registerPlugin(new a({
3126
+ key: S,
3127
+ view: te,
3128
+ props: { decorations(e) {
3129
+ let t = O(e);
3130
+ for (let n of p.values()) {
3131
+ if (n.discarded || n.committed) continue;
3132
+ let r = f.get(n.contextId);
3133
+ if (!r) continue;
3134
+ let i = n.builder.snapshot(), a = n.mode === "operations" && i.operations.length ? [...new Set(i.operations.map((e) => e.targetRef))] : [n.targetRef];
3135
+ for (let o of a) {
3136
+ let a = r.targets.get(o);
3137
+ if (!a) continue;
3138
+ let s = n.mode === "createDocument" ? 0 : a.from;
3139
+ s < 0 || s > e.doc.content.size || t.push(v.widget(s, () => A(n, o), {
3140
+ side: 1,
3141
+ key: `${n.id}:${o}:${i.seq}`
3142
+ }));
3143
+ }
3144
+ }
3145
+ return y.create(e.doc, t);
3146
+ } }
3147
+ }));
3148
+ function j(e = !1) {
3149
+ if (!(u || s.isDestroyed)) {
3150
+ if (e && w !== null && (cancelAnimationFrame(w), w = null), !e && typeof requestAnimationFrame == "function") {
3151
+ if (w !== null) return;
3152
+ w = requestAnimationFrame(() => {
3153
+ w = null, j(!0);
3154
+ });
3155
+ } else s.view.dispatch(s.state.tr.setMeta(S, !0).setMeta("addToHistory", !1));
3156
+ }
3157
+ }
3158
+ function M() {
3159
+ (u || i.getEditor() !== s || s.isDestroyed) && $("EDITOR_NOT_READY", "Editor is no longer available.", !0);
3160
+ }
3161
+ function N({ transaction: e }) {
3162
+ if (!e.docChanged) return;
3163
+ c++;
3164
+ let t = e.getMeta("richTextAi") ? "ai" : "user", n = (n) => {
3165
+ let r = n.from, a = n.to;
3166
+ if (t === "user" && !i.isCollaborationConfigured()) for (let t of e.mapping.maps) t.forEach((e, t) => {
3167
+ (e === t ? n.from === n.to ? e === r : r < e && e < a : r < t && a > e) && (n.invalidated = !0);
3168
+ }), r = t.map(r, 1), a = n.from === n.to ? r : t.map(a, -1);
3169
+ else r = e.mapping.map(r, 1), a = n.from === n.to ? r : e.mapping.map(a, -1);
3170
+ n.from = r, n.to = a, n.positions &&= n.positions.map((t) => e.mapping.map(t, 1));
3171
+ };
3172
+ for (let e of f.values()) for (let t of e.targets.values()) n(t);
3173
+ if (_) {
3174
+ for (let e of _.targets.values()) n(e);
3175
+ let t = _.value.selection, r = (t) => ({
3176
+ ...t,
3177
+ from: e.mapping.map(t.from, 1),
3178
+ to: e.mapping.map(t.to, -1)
3179
+ });
3180
+ t.from !== void 0 && (t.from = e.mapping.map(t.from, 1), t.to = t.kind === "cursor" ? t.from : e.mapping.map(t.to ?? t.from, -1)), t.blocks &&= t.blocks.map(r), t.cells &&= t.cells.map(r), t.markRanges &&= t.markRanges.map(r), t.anchorCell !== void 0 && (t.anchorCell = e.mapping.map(t.anchorCell, 1)), t.headCell !== void 0 && (t.headCell = e.mapping.map(t.headCell, 1)), t.revision = c, _.value.revision = c;
3181
+ }
3182
+ if (T({
3183
+ type: "change",
3184
+ source: t,
3185
+ revision: c
3186
+ }), E(), _ && t === "user") {
3187
+ let e = _.value.targetId;
3188
+ queueMicrotask(() => {
3189
+ if (!(u || _?.value.targetId !== e)) {
3190
+ try {
3191
+ for (let e of _.targets.values()) ie(e);
3192
+ } catch {
3193
+ R({
3194
+ targetId: e,
3195
+ reason: "invalidated"
3196
+ }), T({
3197
+ type: "ai-target-invalidated",
3198
+ targetId: e,
3199
+ reason: "target-changed"
3200
+ });
3201
+ }
3202
+ j();
3203
+ }
3204
+ });
3205
+ }
3206
+ t === "user" && p.size && queueMicrotask(() => {
3207
+ if (!u) {
3208
+ for (let e of [...p.values()]) if (!(e.discarded || e.committed)) try {
3209
+ ae(P(e.contextId));
3210
+ } catch {
3211
+ we({
3212
+ streamId: e.id,
3213
+ reason: "target changed"
3214
+ });
3215
+ }
3216
+ }
3217
+ });
3218
+ }
3219
+ function ne() {
3220
+ u || (d = Hi(s, c, i), E());
3221
+ }
3222
+ s.on("transaction", N), s.on("selectionUpdate", ne);
3223
+ function P(e) {
3224
+ M();
3225
+ let t = f.get(e);
3226
+ return (!t || t.cancelled) && $("CONTEXT_EXPIRED", "Edit context does not exist.", !0), Date.now() > t.expiresAt && (f.delete(e), E(), $("CONTEXT_EXPIRED", "Edit context has expired.", !0)), t;
3227
+ }
3228
+ function F(e) {
3229
+ let t = {
3230
+ ...e,
3231
+ fingerprint: zi(s, e.from, e.to)
3232
+ };
3233
+ if (i.isCollaborationConfigured()) {
3234
+ let n = Vi(s);
3235
+ t.relativeFrom = b(e.from, n.type, n.binding?.mapping), t.relativeTo = b(e.to, n.type, n.binding?.mapping), t.relativePositions = e.positions?.map((e) => b(e, n.type, n.binding?.mapping));
3236
+ }
3237
+ return t;
3238
+ }
3239
+ function re(e, t) {
3240
+ let n = /* @__PURE__ */ new Map();
3241
+ if (e.kind === "blockSet" || e.kind === "tableCells") {
3242
+ if (e.kind === "tableCells" && e.cells?.length && e.anchorCell !== void 0 && e.headCell !== void 0) {
3243
+ let r = `${t}:cells`;
3244
+ n.set(r, F({
3245
+ ref: r,
3246
+ kind: "tableCells",
3247
+ from: Math.min(...e.cells.map((e) => e.from)),
3248
+ to: Math.max(...e.cells.map((e) => e.to)),
3249
+ positions: [e.anchorCell, e.headCell]
3250
+ }));
3251
+ }
3252
+ for (let [r, i] of (e.kind === "blockSet" ? e.blocks ?? [] : e.cells ?? []).entries()) {
3253
+ let a = `${t}:${r}`;
3254
+ n.set(a, F({
3255
+ ref: a,
3256
+ kind: e.kind,
3257
+ from: i.from,
3258
+ to: i.to,
3259
+ nodeId: i.nodeId
3260
+ }));
3261
+ }
3262
+ } else if (e.kind !== "none" && e.from !== void 0 && e.to !== void 0) {
3263
+ let r = `${t}:selection`;
3264
+ n.set(r, F({
3265
+ ref: r,
3266
+ kind: e.kind,
3267
+ from: e.from,
3268
+ to: e.to,
3269
+ nodeId: e.kind === "node" ? s.state.doc.nodeAt(e.from)?.attrs.aiId : void 0
3270
+ }));
3271
+ }
3272
+ return n;
3273
+ }
3274
+ function I(e) {
3275
+ let t = (t) => {
3276
+ let n = `${t.ref}:text`;
3277
+ e.set(n, F({
3278
+ ref: n,
3279
+ kind: "textRange",
3280
+ from: t.from + 1,
3281
+ to: t.to - 1,
3282
+ parentRef: t.ref,
3283
+ tableRow: t.tableRow,
3284
+ tableColumn: t.tableColumn,
3285
+ isHeader: t.isHeader
3286
+ }));
3287
+ };
3288
+ for (let n of [...e.values()]) {
3289
+ if (n.positions || ![
3290
+ "node",
3291
+ "blockSet",
3292
+ "tableCells"
3293
+ ].includes(n.kind)) continue;
3294
+ let r = s.state.doc.nodeAt(n.from);
3295
+ if (r && n.to === n.from + r.nodeSize) {
3296
+ if (["tableCell", "tableHeader"].includes(r.type.name)) {
3297
+ let e = s.state.doc.resolve(n.from);
3298
+ for (let t = e.depth; t > 0; t--) {
3299
+ if (e.node(t).type.name !== "table") continue;
3300
+ let i = l.get(e.node(t)).findCell(n.from - e.start(t));
3301
+ n.tableRow = i.top, n.tableColumn = i.left, n.isHeader = r.type.name === "tableHeader" || i.top === 0;
3302
+ break;
3303
+ }
3304
+ t(n);
3305
+ } else if (r.type.name === "table") {
3306
+ let i = l.get(r);
3307
+ r.forEach((r, a) => {
3308
+ r.forEach((r, o) => {
3309
+ let s = n.from + 2 + a + o, c = i.findCell(s - n.from - 1), l = `${n.ref}:cell:${c.top}:${c.left}`, u = F({
3310
+ ref: l,
3311
+ kind: "tableCells",
3312
+ from: s,
3313
+ to: s + r.nodeSize,
3314
+ nodeId: r.attrs.aiId,
3315
+ parentRef: n.ref,
3316
+ tableRow: c.top,
3317
+ tableColumn: c.left,
3318
+ isHeader: r.type.name === "tableHeader" || c.top === 0
3319
+ });
3320
+ e.set(l, u), t(u);
3321
+ });
3322
+ });
3323
+ }
3324
+ }
3325
+ }
3326
+ }
3327
+ function L(e) {
3328
+ let t = s.state.doc.nodeAt(e.from), n = !!t && e.to === e.from + t.nodeSize && [
3329
+ "node",
3330
+ "blockSet",
3331
+ "tableCells"
3332
+ ].includes(e.kind) && !e.positions, r = n ? t.type.name : void 0, i = e.kind === "cursor" ? ["insertContent"] : e.kind === "document" ? ["replaceFragment"] : e.kind === "textRange" ? [
3333
+ "insertContent",
3334
+ "replaceText",
3335
+ "replaceFragment",
3336
+ "setMarks",
3337
+ "unsetMarks",
3338
+ "deleteContent"
3339
+ ] : e.positions ? [] : [
3340
+ "insertContent",
3341
+ "replaceFragment",
3342
+ "setNodeAttributes",
3343
+ "unsetNodeAttributes",
3344
+ "deleteContent"
3345
+ ];
3346
+ n && ["node", "blockSet"].includes(e.kind) && i.push("moveBlocks", "transformBlocks");
3347
+ let a = [
3348
+ "insertRowBefore",
3349
+ "insertRowAfter",
3350
+ "deleteRow",
3351
+ "insertColumnBefore",
3352
+ "insertColumnAfter",
3353
+ "deleteColumn",
3354
+ "mergeCells",
3355
+ "splitCell",
3356
+ "setTableTheme"
3357
+ ], o = e.positions || ["table", "tableRow"].includes(r ?? "") ? a : ["tableCell", "tableHeader"].includes(r ?? "") ? [
3358
+ ...a,
3359
+ "setCellContent",
3360
+ "setCellBackground"
3361
+ ] : [];
3362
+ return o.length && i.push("tableOperation"), {
3363
+ nodeType: r,
3364
+ parentRef: e.parentRef,
3365
+ tableRow: e.tableRow,
3366
+ tableColumn: e.tableColumn,
3367
+ isHeader: e.isHeader,
3368
+ operations: i,
3369
+ tableActions: o
3370
+ };
3371
+ }
3372
+ function ie(e) {
3373
+ e.invalidated && $("TARGET_CHANGED", `Target ${e.ref} was modified.`, !0);
3374
+ let { from: t, to: n } = e;
3375
+ if (i.isCollaborationConfigured()) {
3376
+ let r = Vi(s);
3377
+ t = x(r.type?.doc, r.type, e.relativeFrom, r.binding?.mapping) ?? -1, n = x(r.type?.doc, r.type, e.relativeTo, r.binding?.mapping) ?? -1;
3378
+ }
3379
+ let r = i.isCollaborationConfigured() && e.relativePositions ? e.relativePositions.map((e) => {
3380
+ let t = Vi(s);
3381
+ return x(t.type?.doc, t.type, e, t.binding?.mapping) ?? -1;
3382
+ }) : e.positions;
3383
+ return r?.some((e) => e < 0 || e > s.state.doc.content.size) && $("TARGET_CHANGED", `Target ${e.ref} changed or was removed.`, !0), (t < 0 || n < t || n > s.state.doc.content.size || zi(s, t, n) !== e.fingerprint) && $("TARGET_CHANGED", `Target ${e.ref} changed or was removed.`, !0), e.nodeId && s.state.doc.nodeAt(t)?.attrs.aiId !== e.nodeId && $("TARGET_CHANGED", `Target ${e.ref} identity changed.`, !0), {
3384
+ ...e,
3385
+ from: t,
3386
+ to: n,
3387
+ positions: r
3388
+ };
3389
+ }
3390
+ function ae(e) {
3391
+ !i.isCollaborationConfigured() && !e.targetId && e.baseRevision !== c && $("TARGET_CHANGED", "Document changed since the target was captured.", !0);
3392
+ let t = /* @__PURE__ */ new Map();
3393
+ for (let [n, r] of e.targets) t.set(n, ie(r));
3394
+ return t;
3395
+ }
3396
+ function oe() {
3397
+ return M(), {
3398
+ documentId: r.documentId,
3399
+ revision: c,
3400
+ schemaVersion: "1",
3401
+ document: s.getJSON(),
3402
+ text: s.getText()
3403
+ };
3404
+ }
3405
+ function se() {
3406
+ return M(), (s.isFocused || i.getSelectedBlocks().length) && (d = Hi(s, c, i)), structuredClone(d);
3407
+ }
3408
+ function ce() {
3409
+ return M(), _ ? structuredClone(_.value) : null;
3410
+ }
3411
+ function R(e = {}) {
3412
+ if (!_ || e.targetId && e.targetId !== _.value.targetId) return !1;
3413
+ let t = _.value.targetId;
3414
+ _ = null;
3415
+ for (let e of [...f.values()]) e.targetId === t && Te(e.id);
3416
+ return E(), !u && !s.isDestroyed && j(!0), T({
3417
+ type: "ai-target-change",
3418
+ target: null,
3419
+ reason: e.reason ?? "host-close"
3420
+ }), !0;
3421
+ }
3422
+ function le() {
3423
+ M(), s.isEditable || $("READ_ONLY", "Editor is in preview mode."), i.isCollaborationConfigured() && Vi(s), _ && [...f.values()].some((e) => e.targetId === _?.value.targetId && !e.cancelled) && $("OUT_OF_SCOPE", "Stop the current AI edit before choosing another target.");
3424
+ let e = se();
3425
+ if (e.kind === "none" && $("TARGET_NOT_FOUND", "No reliable edit target is selected."), _) {
3426
+ let { revision: t, ...n } = _.value.selection, { revision: r, ...i } = e;
3427
+ if (Bi(n) === Bi(i)) return structuredClone(_.value);
3428
+ }
3429
+ let t = crypto.randomUUID(), n = re(e, t);
3430
+ n.size || $("TARGET_NOT_FOUND", "No reliable edit target is selected.");
3431
+ let a = ee(e), o = e.text ?? a.map((e) => {
3432
+ try {
3433
+ return s.schema.nodeFromJSON(e).textContent;
3434
+ } catch {
3435
+ return "";
3436
+ }
3437
+ }).join("\n"), l = o.slice(0, 240), u = {
3438
+ targetId: t,
3439
+ documentId: r.documentId,
3440
+ editorSessionId: g,
3441
+ revision: c,
3442
+ selection: e,
3443
+ summary: D(e),
3444
+ previewText: l,
3445
+ previewTruncated: o.length > l.length,
3446
+ content: a
3447
+ }, d = !!_;
3448
+ return _ = {
3449
+ value: u,
3450
+ targets: n
3451
+ }, E(), j(!0), T({
3452
+ type: "ai-target-change",
3453
+ target: structuredClone(u),
3454
+ reason: d ? "replace" : "select"
3455
+ }), structuredClone(u);
3456
+ }
3457
+ function ue(e) {
3458
+ M(), e.requestId?.trim() || $("INVALID_DOCUMENT", "requestId is required."), s.isEditable || $("READ_ONLY", "Editor is in preview mode.");
3459
+ let t = crypto.randomUUID();
3460
+ if (e.targetId && (e.scope === "document" || _?.value.targetId !== e.targetId) && $("TARGET_NOT_FOUND", "The selected AI target is no longer active.", !0), e.targetId) for (let e of _.targets.values()) ie(e);
3461
+ let n = e.targetId ? structuredClone(_.value.selection) : se(), i = /* @__PURE__ */ new Map();
3462
+ if (e.scope === "document") {
3463
+ r.policy?.allowWholeDocument || $("OUT_OF_SCOPE", "Whole-document editing was not authorized.");
3464
+ let e = `${t}:document`;
3465
+ i.set(e, F({
3466
+ ref: e,
3467
+ kind: "document",
3468
+ from: 0,
3469
+ to: s.state.doc.content.size
3470
+ }));
3471
+ } else for (let [e, r] of re(n, t)) i.set(e, r);
3472
+ if (e.additionalBlocks?.length) {
3473
+ (e.scope === "document" || n.kind !== "cursor") && $("OUT_OF_SCOPE", "Additional blocks require a cursor anchor.");
3474
+ for (let [n, r] of e.additionalBlocks.entries()) {
3475
+ let e = Number.isInteger(r.from) && r.from >= 0 ? s.state.doc.nodeAt(r.from) : null;
3476
+ (!e?.isBlock || r.to !== r.from + e.nodeSize || r.nodeId && e.attrs.aiId !== r.nodeId) && $("TARGET_CHANGED", "An additional block changed or is not complete.", !0);
3477
+ let a = `${t}:block:${n}`;
3478
+ i.set(a, F({
3479
+ ref: a,
3480
+ kind: "blockSet",
3481
+ ...r
3482
+ }));
3483
+ }
3484
+ }
3485
+ i.size || $("TARGET_NOT_FOUND", "No reliable edit target is selected."), e.includeDescendants && I(i);
3486
+ let a = {
3487
+ id: t,
3488
+ targetId: e.targetId,
3489
+ requestId: e.requestId,
3490
+ expiresAt: Date.now() + (r.policy?.contextTtlMs ?? 3e5),
3491
+ baseRevision: c,
3492
+ targets: i,
3493
+ selection: e.additionalBlocks?.length ? {
3494
+ ...n,
3495
+ kind: "blockSet",
3496
+ blocks: e.additionalBlocks
3497
+ } : n,
3498
+ writePolicy: e.writePolicy,
3499
+ cancelled: !1
3500
+ };
3501
+ return f.set(t, a), E(), {
3502
+ contextId: t,
3503
+ documentId: r.documentId,
3504
+ requestId: e.requestId,
3505
+ baseRevision: c,
3506
+ expiresAt: a.expiresAt,
3507
+ selection: a.selection,
3508
+ targetRefs: [...i.keys()]
3509
+ };
3510
+ }
3511
+ function de(e) {
3512
+ let t = ae(P(e.contextId)), n = Math.min(Math.max(1, e.budget ?? 12e3), r.policy?.maxReadCharacters ?? 12e3), i = e.cursor?.lastIndexOf(":") ?? -1, a = i > 0 ? e.cursor?.slice(0, i) : void 0, o = i > 0 ? Number(e.cursor?.slice(i + 1)) : 0;
3513
+ e.cursor && (!a || !Number.isSafeInteger(o) || o < 0 || !t.has(a)) && $("OUT_OF_SCOPE", "Invalid read cursor.");
3514
+ let l = a ? [a] : e.targetRefs ?? [...t.keys()], u = n, d = l.map((n) => {
3515
+ let r = t.get(n);
3516
+ r || $("OUT_OF_SCOPE", `Unknown targetRef: ${n}.`);
3517
+ let i = s.state.doc.textBetween(r.from, r.to, "\n"), c = a === n ? o : 0;
3518
+ c > i.length && $("OUT_OF_SCOPE", "Read cursor is past target content.");
3519
+ let l = i.length - c > u, d = i.slice(c, c + u);
3520
+ u = Math.max(0, u - d.length);
3521
+ let f = [];
3522
+ e.includeNeighbors && s.state.doc.forEach((e, t) => f.push({
3523
+ from: t,
3524
+ to: t + e.nodeSize,
3525
+ text: e.textContent.slice(0, 160)
3526
+ }));
3527
+ let p = f.findIndex((e) => e.from <= r.from && e.to >= r.to);
3528
+ return {
3529
+ targetRef: n,
3530
+ kind: r.kind,
3531
+ ...L(r),
3532
+ text: d,
3533
+ truncated: l,
3534
+ content: l || c ? null : s.state.doc.slice(r.from, r.to).toJSON(),
3535
+ nextCursor: l ? `${n}:${c + d.length}` : null,
3536
+ neighbors: e.includeNeighbors && p >= 0 ? {
3537
+ before: f[p - 1]?.text ?? null,
3538
+ after: f[p + 1]?.text ?? null
3539
+ } : void 0
3540
+ };
3541
+ });
3542
+ return {
3543
+ documentId: r.documentId,
3544
+ revision: c,
3545
+ results: d,
3546
+ truncated: d.some((e) => e.truncated)
3547
+ };
3548
+ }
3549
+ function pe(e) {
3550
+ return structuredClone(P(e).selection);
3551
+ }
3552
+ function me(e) {
3553
+ P(e.contextId);
3554
+ let t = [], n = Math.min(Math.max(1, e.limit ?? 100), 100), i = !1;
3555
+ return s.state.doc.descendants((e) => {
3556
+ if (e.isBlock && [
3557
+ "heading",
3558
+ "paragraph",
3559
+ "table",
3560
+ "columnsBlock",
3561
+ "highlightBlock"
3562
+ ].includes(e.type.name)) {
3563
+ if (t.length >= n) return i = !0, !1;
3564
+ t.push({
3565
+ aiId: typeof e.attrs.aiId == "string" ? e.attrs.aiId : null,
3566
+ nodeType: e.type.name,
3567
+ level: e.type.name === "heading" ? e.attrs.level : null,
3568
+ text: e.textContent.slice(0, 120)
3569
+ });
3570
+ }
3571
+ return !0;
3572
+ }), {
3573
+ documentId: r.documentId,
3574
+ revision: c,
3575
+ blocks: t,
3576
+ truncated: i
3577
+ };
3578
+ }
3579
+ function he(e) {
3580
+ let t = P(e.contextId);
3581
+ s.isEditable || $("READ_ONLY", "Editor is in preview mode.");
3582
+ let n = _t(e.patch);
3583
+ n.valid || $("INVALID_DOCUMENT", n.errors[0]?.message ?? "Invalid patch.");
3584
+ let i = n.patch;
3585
+ (i.documentId !== r.documentId || i.contextId !== t.id || i.requestId !== t.requestId) && $("OUT_OF_SCOPE", "Patch does not belong to this edit context."), i.baseRevision !== t.baseRevision && $("TARGET_CHANGED", "Patch base revision does not match context.", !0), k(Dt(i));
3586
+ for (let e of i.operations) {
3587
+ (r.policy?.allowedOperations && !r.policy.allowedOperations.includes(e.type) || t.writePolicy?.allowedOperations && !t.writePolicy.allowedOperations.includes(e.type)) && $("UNSUPPORTED_CAPABILITY", `Operation ${e.type} is not allowed.`);
3588
+ let n = t.writePolicy;
3589
+ if (n) {
3590
+ if (e.type === "setMarks" && n.allowedMarkAttributes) for (let t of e.marks) {
3591
+ let e = n.allowedMarkAttributes[t.type];
3592
+ (!e || Object.keys(t.attrs ?? {}).some((t) => !e.includes("*") && !e.includes(t))) && $("OUT_OF_SCOPE", `Mark ${t.type} has attributes outside this edit context.`);
3593
+ }
3594
+ if (e.type === "unsetMarks" && n.allowedMarkAttributes && e.markTypes.some((e) => !n.allowedMarkAttributes?.[e]?.includes("*")) && $("OUT_OF_SCOPE", "Removing this mark is outside this edit context."), (e.type === "setNodeAttributes" || e.type === "unsetNodeAttributes") && n.allowedNodeAttributes) {
3595
+ let t = n.allowedNodeAttributes[e.nodeType], r = e.type === "setNodeAttributes" ? Object.keys(e.attrs) : e.attributes;
3596
+ (!t || r.some((e) => !t.includes("*") && !t.includes(e))) && $("OUT_OF_SCOPE", `Node ${e.nodeType} has attributes outside this edit context.`);
3597
+ }
3598
+ e.type === "tableOperation" && n.allowedTableActions && !n.allowedTableActions.includes(e.action) && $("OUT_OF_SCOPE", `Table action ${e.action} is outside this edit context.`);
3599
+ }
3600
+ }
3601
+ let a = ae(t);
3602
+ return {
3603
+ patch: i,
3604
+ transaction: Un(s.state, i, a)
3605
+ };
3606
+ }
3607
+ function _e(e) {
3608
+ let { transaction: t } = he(e);
3609
+ return {
3610
+ valid: !0,
3611
+ changed: t.docChanged,
3612
+ revision: c
3613
+ };
3614
+ }
3615
+ function ve(e) {
3616
+ let { transaction: t } = he(e);
3617
+ return {
3618
+ committed: !1,
3619
+ changed: t.docChanged,
3620
+ document: t.doc.toJSON(),
3621
+ revision: c
3622
+ };
3623
+ }
3624
+ function ye(e, t = !0) {
3625
+ M();
3626
+ let a = _t(e.patch);
3627
+ a.valid || $("INVALID_DOCUMENT", a.errors[0]?.message ?? "Invalid patch.");
3628
+ let o = a.patch;
3629
+ (o.contextId !== e.contextId || o.documentId !== r.documentId) && $("OUT_OF_SCOPE", "Patch is not bound to this editor.");
3630
+ let l = m.get(o.requestId), u = Bi(o);
3631
+ if (l) return l.fingerprint !== u && $("REQUEST_ID_CONFLICT", "requestId was used for a different patch."), l.result;
3632
+ let d = P(e.contextId), { patch: f, transaction: p } = he(e), g = f.requestId, v = c;
3633
+ if (p.docChanged) {
3634
+ let e = i.isCollaborationConfigured() ? C.getState(s.state)?.undoManager : void 0;
3635
+ e?.stopCapturing(), s.view.dispatch(n(p)), e?.stopCapturing(), i.isCollaborationConfigured() || s.view.dispatch(n(s.state.tr));
3636
+ }
3637
+ let y = {
3638
+ requestId: f.requestId,
3639
+ previousRevision: v,
3640
+ revision: c,
3641
+ changed: p.docChanged,
3642
+ targetRefs: [...new Set(f.operations.map((e) => e.targetRef))]
3643
+ };
3644
+ m.set(g, {
3645
+ fingerprint: u,
3646
+ result: y
3647
+ }), m.size > 100 && m.delete(m.keys().next().value);
3648
+ for (let e of h) e({
3649
+ type: "applied",
3650
+ requestId: g,
3651
+ previousRevision: v,
3652
+ revision: c,
3653
+ changed: y.changed
3654
+ });
3655
+ return t && d.targetId === _?.value.targetId && R({
3656
+ targetId: d.targetId,
3657
+ reason: "commit"
3658
+ }), y;
3659
+ }
3660
+ function be(e) {
3661
+ let t = P(e.contextId);
3662
+ (!t.targets.has(e.targetRef) || e.requestId !== t.requestId) && $("OUT_OF_SCOPE", "Stream target is not authorized.");
3663
+ let n = crypto.randomUUID();
3664
+ return p.set(n, {
3665
+ id: n,
3666
+ contextId: t.id,
3667
+ requestId: t.requestId,
3668
+ mode: e.mode,
3669
+ targetRef: e.targetRef,
3670
+ builder: St({
3671
+ streamId: n,
3672
+ mode: e.mode
3673
+ }),
3674
+ discarded: !1,
3675
+ authorizedReferences: /* @__PURE__ */ new Set()
3676
+ }), j(), { streamId: n };
3677
+ }
3678
+ function z(e) {
3679
+ let t = p.get(e);
3680
+ return (!t || t.discarded) && $("STREAM_CLOSED", "Stream is no longer active."), P(t.contextId), t;
3681
+ }
3682
+ function xe(e) {
3683
+ let t = z(e.streamId);
3684
+ try {
3685
+ ae(P(t.contextId));
3686
+ } catch (e) {
3687
+ throw we({
3688
+ streamId: t.id,
3689
+ reason: "target changed"
3690
+ }), e;
3691
+ }
3692
+ let n;
3693
+ try {
3694
+ n = t.builder.appendFast(e.event), k(Ot(e.event, t.builder.currentNodeType()), t.authorizedReferences);
3695
+ } catch (e) {
3696
+ throw we({
3697
+ streamId: t.id,
3698
+ reason: e instanceof Error ? e.message : "invalid event"
3699
+ }), e;
3700
+ }
3701
+ j();
3702
+ for (let e of h) e({
3703
+ type: "stream-preview",
3704
+ streamId: t.id,
3705
+ committed: !1,
3706
+ seq: n.seq
3707
+ });
3708
+ return {
3709
+ committed: !1,
3710
+ streamId: t.id,
3711
+ seq: n.seq,
3712
+ ended: n.ended
3713
+ };
3714
+ }
3715
+ function Se(e) {
3716
+ return z(e).builder.snapshot();
3717
+ }
3718
+ async function Ce(e) {
3719
+ let t = p.get(e.streamId);
3720
+ if (t?.committed) return t.committed;
3721
+ let n = z(e.streamId);
3722
+ try {
3723
+ e.signal?.aborted && $("CANCELLED", "Stream was cancelled.");
3724
+ let t = n.builder.result();
3725
+ if (n.mode === "createDocument") {
3726
+ let i = ut({
3727
+ type: "doc",
3728
+ content: t.nodes
3729
+ });
3730
+ i.valid || $("INVALID_DOCUMENT", i.errors[0]?.message ?? "Invalid streamed document."), k(Tt(i.document), n.authorizedReferences);
3731
+ let a = await Pn(i.document, {
3732
+ assetPackaging: r.assetPackaging,
3733
+ resourceResolver: r.resourceResolver,
3734
+ signal: e.signal
3735
+ });
3736
+ return (e.signal?.aborted || n.discarded) && $("CANCELLED", "Stream was cancelled."), n.committed = {
3737
+ document: i.document,
3738
+ bytes: a
3739
+ }, j(!0), n.committed;
3740
+ }
3741
+ let i = P(n.contextId), a = n.mode === "insertContent" ? {
3742
+ type: "insertContent",
3743
+ targetRef: n.targetRef,
3744
+ position: "at",
3745
+ content: t.nodes
3746
+ } : n.mode === "replaceText" ? {
3747
+ type: "replaceText",
3748
+ targetRef: n.targetRef,
3749
+ text: t.replacementText
3750
+ } : n.mode === "replaceFragment" ? {
3751
+ type: "replaceFragment",
3752
+ targetRef: n.targetRef,
3753
+ content: t.nodes
3754
+ } : t.operations[0], o = n.mode === "operations" ? t.operations : [a];
3755
+ (e.signal?.aborted || n.discarded) && $("CANCELLED", "Stream was cancelled.");
3756
+ let s = {
3757
+ protocolVersion: 1,
3758
+ documentId: r.documentId,
3759
+ requestId: i.requestId,
3760
+ contextId: i.id,
3761
+ baseRevision: i.baseRevision,
3762
+ operations: o
3763
+ };
3764
+ return n.committed = ye({
3765
+ contextId: i.id,
3766
+ patch: s
3767
+ }, !1), j(!0), i.targetId === _?.value.targetId && R({
3768
+ targetId: i.targetId,
3769
+ reason: "commit"
3770
+ }), n.committed;
3771
+ } catch (e) {
3772
+ throw n.committed || we({
3773
+ streamId: n.id,
3774
+ reason: e instanceof Error ? e.message : "commit failed"
3775
+ }), e;
3776
+ }
3777
+ }
3778
+ function we(e) {
3779
+ let t = p.get(e.streamId);
3780
+ if (t) {
3781
+ t.committed && $("STREAM_ALREADY_COMMITTED", "Committed content must be undone normally."), t.discarded = !0, p.delete(e.streamId), j(!0);
3782
+ for (let t of h) t({
3783
+ type: "stream-discarded",
3784
+ streamId: e.streamId,
3785
+ reason: e.reason
3786
+ });
3787
+ }
3788
+ }
3789
+ function Te(e) {
3790
+ let t = f.get(e);
3791
+ t && (t.cancelled = !0);
3792
+ for (let [t, n] of p) n.contextId === e && !n.committed && we({
3793
+ streamId: t,
3794
+ reason: "context cancelled"
3795
+ });
3796
+ f.delete(e), E();
3797
+ }
3798
+ function Ee(e) {
3799
+ return M(), h.add(e), () => h.delete(e);
3800
+ }
3801
+ function De() {
3802
+ u || (R({ reason: "dispose" }), u = !0, w !== null && cancelAnimationFrame(w), w = null, s.off("transaction", N), s.off("selectionUpdate", ne), s.unregisterPlugin(S), i.bindAiTargetControls?.(null), i.setAiTargetUiState?.({
3803
+ active: !1,
3804
+ busy: !1,
3805
+ available: !1,
3806
+ reason: "AI Bridge 尚未连接"
3807
+ }), f.clear(), p.clear(), m.clear(), h.clear());
3808
+ }
3809
+ function Oe() {
3810
+ M();
3811
+ let e = B(), t = jt().$defs, n = (e) => Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Object.fromEntries(Object.entries(t.spec.attrs ?? {}).map(([e, t]) => [e, { default: t.default ?? null }]))])), a = (e, n) => Object.fromEntries(Object.keys(n).map((n) => [n, t[`${e}_${n}`]?.properties?.attrs?.properties ?? {}])), o = !!r.authorizeExternalReference;
3812
+ return {
3813
+ schemaVersion: "1",
3814
+ protocolVersion: 1,
3815
+ streamProtocolVersion: 1,
3816
+ documentId: r.documentId,
3817
+ mode: s.isEditable ? "edit" : "preview",
3818
+ collaboration: i.isCollaborationConfigured(),
3819
+ nodes: Object.keys(e.nodes),
3820
+ marks: Object.keys(e.marks),
3821
+ nodeAttributes: n(e.nodes),
3822
+ markAttributes: n(e.marks),
3823
+ nodeAttributeConstraints: a("node", e.nodes),
3824
+ markAttributeConstraints: a("mark", e.marks),
3825
+ nodeContentRules: Object.fromEntries(Object.entries(e.nodes).map(([e, t]) => [e, {
3826
+ content: t.spec.content ?? null,
3827
+ marks: t.spec.marks ?? null
3828
+ }])),
3829
+ targetKinds: [
3830
+ "cursor",
3831
+ "textRange",
3832
+ "node",
3833
+ "blockSet",
3834
+ "tableCells",
3835
+ "none"
3836
+ ],
3837
+ externalDependencies: {
3838
+ authorizationConfigured: o,
3839
+ byteResolverConfigured: !!r.resourceResolver?.readBytes,
3840
+ media: o ? "Per-reference host authorization is required." : "Host authorization callback is not configured.",
3841
+ mentions: o ? "Host must authorize each mention identity." : "Host authorization callback is not configured.",
3842
+ comments: o ? "Host must authorize each existing comment thread; AI does not create threads." : "Host authorization callback is not configured.",
3843
+ embedding: r.resourceResolver?.readBytes ? "Host byte resolver is configured." : "Embedding new external resources requires a host byte resolver."
3844
+ },
3845
+ resourcePackaging: {
3846
+ images: ["embed", "reference"],
3847
+ videos: ["embed", "reference"],
3848
+ files: ["embed", "reference"]
3849
+ },
3850
+ operations: s.isEditable ? r.policy?.allowedOperations ?? [
3851
+ "insertContent",
3852
+ "replaceText",
3853
+ "replaceFragment",
3854
+ "setMarks",
3855
+ "unsetMarks",
3856
+ "setNodeAttributes",
3857
+ "unsetNodeAttributes",
3858
+ "deleteContent",
3859
+ "moveBlocks",
3860
+ "transformBlocks",
3861
+ "tableOperation"
3862
+ ] : [],
3863
+ streamModes: [
3864
+ "createDocument",
3865
+ "insertContent",
3866
+ "replaceText",
3867
+ "replaceFragment",
3868
+ "operations"
3869
+ ],
3870
+ streamEvents: [
3871
+ "node.open",
3872
+ "text.delta",
3873
+ "node.attrs",
3874
+ "node.close",
3875
+ "operation",
3876
+ "stream.end"
3877
+ ],
3878
+ streamLimits: vt,
3879
+ streamPreview: {
3880
+ localOnly: !0,
3881
+ committedDocumentUnchangedUntilCommit: !0
3882
+ },
3883
+ commitSemantics: "one-transaction-after-complete-transport"
3884
+ };
3885
+ }
3886
+ return i.bindAiTargetControls?.({
3887
+ select: () => {
3888
+ le();
3889
+ },
3890
+ clear: (e) => {
3891
+ R({ reason: e });
3892
+ }
3893
+ }), E(), {
3894
+ getCapabilities: Oe,
3895
+ getDocumentSnapshot: oe,
3896
+ captureSelection: se,
3897
+ selectAiTarget: le,
3898
+ getAiTarget: ce,
3899
+ clearAiTarget: R,
3900
+ createEditContext: ue,
3901
+ getContextSelection: pe,
3902
+ getOutline: me,
3903
+ readContent: de,
3904
+ validatePatch: _e,
3905
+ previewPatch: ve,
3906
+ applyPatch: ye,
3907
+ beginStream: be,
3908
+ appendStreamEvent: xe,
3909
+ getStreamSnapshot: Se,
3910
+ commitStream: Ce,
3911
+ discardStream: we,
3912
+ cancelContext: Te,
3913
+ onEvent: Ee,
3914
+ dispose: De
3915
+ };
3916
+ }
3917
+ //#endregion
3918
+ //#region src/ai/tools.ts
3919
+ function Wi(e) {
3920
+ return typeof e == "object" && !!e && !Array.isArray(e);
3921
+ }
3922
+ function Gi(e) {
3923
+ return Wi(e) ? Wi(e.attrs) && Object.prototype.hasOwnProperty.call(e.attrs, "aiId") || Array.isArray(e.content) && e.content.some(Gi) : !1;
3924
+ }
3925
+ function Ki(e, t) {
3926
+ if (typeof e[t] != "string" || !e[t].trim()) throw new Q("INVALID_DOCUMENT", `${t} is required.`);
3927
+ return e[t];
3928
+ }
3929
+ function qi() {
3930
+ throw new Q("INVALID_DOCUMENT", "Document validation failed.");
3931
+ }
3932
+ var Ji = {
3933
+ ASSET_EMBED_FAILED: "A document resource could not be embedded.",
3934
+ ASSET_REFERENCE_NOT_PERSISTABLE: "A document resource has no durable reference.",
3935
+ CANCELLED: "The operation was cancelled.",
3936
+ COLLABORATION_NOT_READY: "The collaborative document is not ready.",
3937
+ CONTEXT_EXPIRED: "The edit context expired; capture a new selection.",
3938
+ DOCUMENT_NOT_FOUND: "The document is unavailable; refresh the context.",
3939
+ DOCUMENT_SAVE_FAILED: "The host could not save the document.",
3940
+ EDITOR_NOT_READY: "The editor is unavailable.",
3941
+ INVALID_DOCUMENT: "Document or patch validation failed.",
3942
+ NORDOX_LIMIT_EXCEEDED: "The native document exceeds a package limit.",
3943
+ NORDOX_RESOURCE_MISSING: "A packaged resource is missing.",
3944
+ NORDOX_VERSION_UNSUPPORTED: "The native document version is unsupported.",
3945
+ OUT_OF_SCOPE: "The requested operation is outside the authorized scope.",
3946
+ READ_ONLY: "The editor is in preview mode.",
3947
+ REQUEST_ID_CONFLICT: "The request ID was already used for different content.",
3948
+ RESOURCE_UNAVAILABLE: "The requested resource is unavailable or unauthorized.",
3949
+ TARGET_CHANGED: "The target changed; read it again before retrying.",
3950
+ TARGET_NOT_FOUND: "The target is unavailable; select it again.",
3951
+ UNSUPPORTED_CAPABILITY: "The requested operation is unsupported or unauthorized."
3952
+ };
3953
+ function Yi(e, t) {
3954
+ let n = {
3955
+ richtext_get_capabilities: async () => e.getCapabilities(),
3956
+ richtext_create_document: async (e) => {
3957
+ if (Gi(e.document)) throw new Q("OUT_OF_SCOPE", "AI cannot supply node identity.");
3958
+ let n = ut(e.document);
3959
+ n.valid || qi();
3960
+ let r = /* @__PURE__ */ new Set();
3961
+ for (let e of Tt(n.document)) {
3962
+ let n = JSON.stringify(e);
3963
+ if (r.has(n)) continue;
3964
+ let i = !1;
3965
+ try {
3966
+ i = await t.authorizeExternalReference?.(e) === !0;
3967
+ } catch {}
3968
+ if (!i) throw new Q([
3969
+ "image",
3970
+ "video",
3971
+ "file"
3972
+ ].includes(e.kind) ? "RESOURCE_UNAVAILABLE" : "UNSUPPORTED_CAPABILITY", `Host authorization is required for ${e.kind} references.`);
3973
+ r.add(n);
3974
+ }
3975
+ let i = typeof e.title == "string" && e.title.trim() ? e.title.trim() : "Untitled", a = dt(n.document, "1");
3976
+ a.valid || qi();
3977
+ let o = await Pn(a.document, {
3978
+ title: i,
3979
+ assetPackaging: t.assetPackaging,
3980
+ resourceResolver: t.resourceResolver
3981
+ }), s;
3982
+ try {
3983
+ s = await t.createDocument({
3984
+ title: i,
3985
+ document: a.document,
3986
+ bytes: o
3987
+ });
3988
+ } catch {
3989
+ throw new Q("DOCUMENT_SAVE_FAILED", "Host could not save the document.", !0);
3990
+ }
3991
+ if (!s || typeof s.documentId != "string" || !s.documentId.trim()) throw new Q("DOCUMENT_SAVE_FAILED", "Host did not return a saved document ID.", !0);
3992
+ return {
3993
+ documentId: s.documentId,
3994
+ ...typeof s.name == "string" ? { name: s.name } : {},
3995
+ byteLength: o.byteLength,
3996
+ format: "nordox"
3997
+ };
3998
+ },
3999
+ richtext_read_document: async (t) => {
4000
+ let n = Ki(t, "contextId"), r = typeof t.budget == "number" ? t.budget : void 0, i = typeof t.cursor == "string" ? t.cursor : void 0;
4001
+ return {
4002
+ ...e.readContent({
4003
+ contextId: n,
4004
+ budget: r,
4005
+ cursor: i
4006
+ }),
4007
+ outline: e.getOutline({ contextId: n })
4008
+ };
4009
+ },
4010
+ richtext_get_selection: async (t) => e.getContextSelection(Ki(t, "contextId")),
4011
+ richtext_read_target: async (t) => {
4012
+ let n = Ki(t, "contextId");
4013
+ if (!Array.isArray(t.targetRefs) || t.targetRefs.some((e) => typeof e != "string")) throw new Q("INVALID_DOCUMENT", "targetRefs must be an array of strings.");
4014
+ let r = typeof t.budget == "number" ? t.budget : void 0, i = typeof t.cursor == "string" ? t.cursor : void 0;
4015
+ return e.readContent({
4016
+ contextId: n,
4017
+ targetRefs: t.targetRefs,
4018
+ budget: r,
4019
+ cursor: i,
4020
+ includeNeighbors: !0
4021
+ });
4022
+ },
4023
+ richtext_apply_patch: async (t) => e.applyPatch({
4024
+ contextId: Ki(t, "contextId"),
4025
+ patch: t
4026
+ })
4027
+ };
4028
+ function r(e) {
4029
+ return async (t) => {
4030
+ try {
4031
+ if (!Wi(t)) throw new Q("INVALID_DOCUMENT", "Tool input must be an object.");
4032
+ return {
4033
+ ok: !0,
4034
+ data: await e(t)
4035
+ };
4036
+ } catch (e) {
4037
+ let t = e instanceof Q || e instanceof Tn;
4038
+ return {
4039
+ ok: !1,
4040
+ error: {
4041
+ code: t ? e.code : "TOOL_EXECUTION_FAILED",
4042
+ message: t ? Ji[e.code] ?? "Tool execution failed." : "Tool execution failed.",
4043
+ retryable: e instanceof Q && e.retryable,
4044
+ requiresContextRefresh: t && [
4045
+ "TARGET_CHANGED",
4046
+ "TARGET_NOT_FOUND",
4047
+ "CONTEXT_EXPIRED",
4048
+ "DOCUMENT_NOT_FOUND"
4049
+ ].includes(e.code)
4050
+ }
4051
+ };
4052
+ }
4053
+ };
4054
+ }
4055
+ return {
4056
+ richtext_get_capabilities: r(n.richtext_get_capabilities),
4057
+ richtext_create_document: r(n.richtext_create_document),
4058
+ richtext_read_document: r(n.richtext_read_document),
4059
+ richtext_get_selection: r(n.richtext_get_selection),
4060
+ richtext_read_target: r(n.richtext_read_target),
4061
+ richtext_apply_patch: r(n.richtext_apply_patch)
4062
+ };
4063
+ }
4064
+ //#endregion
4065
+ //#region src/ai/consume-stream.ts
4066
+ async function Xi(e, t, n) {
4067
+ let r = xt(), i = t[Symbol.asyncIterator](), a = !1, o, s = new Promise((t, r) => {
4068
+ o = () => {
4069
+ try {
4070
+ e.discardStream({
4071
+ streamId: n.streamId,
4072
+ reason: "cancelled"
4073
+ });
4074
+ } catch {}
4075
+ r(/* @__PURE__ */ Error("CANCELLED: Stream cancelled."));
4076
+ }, n.signal?.addEventListener("abort", o, { once: !0 }), n.signal?.aborted && o();
4077
+ });
4078
+ try {
4079
+ for (;;) {
4080
+ let t = await Promise.race([i.next(), s]);
4081
+ if (t.done) {
4082
+ a = !0;
4083
+ break;
4084
+ }
4085
+ if (n.signal?.aborted) throw Error("CANCELLED: Stream cancelled.");
4086
+ for (let i of r.push(t.value)) e.appendStreamEvent({
4087
+ streamId: n.streamId,
4088
+ event: i
4089
+ });
4090
+ }
4091
+ if (r.finish(), n.signal?.aborted) throw Error("CANCELLED: Stream cancelled.");
4092
+ return await e.commitStream({
4093
+ streamId: n.streamId,
4094
+ signal: n.signal
4095
+ });
4096
+ } catch (t) {
4097
+ throw e.discardStream({
4098
+ streamId: n.streamId,
4099
+ reason: t instanceof Error ? t.message : "Stream failed."
4100
+ }), t;
4101
+ } finally {
4102
+ o && n.signal?.removeEventListener("abort", o), a || i.return?.().catch(() => {});
4103
+ }
4104
+ }
4105
+ //#endregion
4106
+ export { Q as RichTextAiBridgeError, Fn as RichTextAiExecutionError, Un as buildRichTextPatchTransaction, Xi as consumeRichTextAiStream, Ui as createRichTextAiBridge, Yi as createRichTextToolHandlers };