patent-editor 0.2.8 → 0.2.9

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.
package/dist/lib.js CHANGED
@@ -49,12 +49,12 @@ import "mathlive";
49
49
  import { findWrapping as fr } from "@tiptap/pm/transform";
50
50
  import { Slice as pr, Fragment as hr } from "@tiptap/pm/model";
51
51
  import { createPortal as yr } from "react-dom";
52
- import { Undo2 as br, Redo2 as vr, Bold as Dt, Italic as Rt, Underline as Mt, Strikethrough as Ft, Code as $t, Superscript as zt, Subscript as Ot, Pilcrow as wr, Heading1 as xr, Heading2 as Cr, Heading3 as Tr, AlignLeft as Sr, AlignCenter as Er, AlignRight as kr, AlignJustify as _r, List as Ir, ListOrdered as Nr, Quote as Ar, FileCode2 as Lr, Table as Pr, Minus as Dr, CheckSquare as Rr, Image as Bt, Link2 as Ht, FileText as qt, Box as Mr, Workflow as Fr, FunctionSquare as $r, Sigma as zr, GitGraph as Or, Square as mt, ChevronDown as Ut, Trash2 as Br, Highlighter as Hr, Sparkles as qr, CaseSensitive as Ur, ChevronUp as Wr, Replace as gt, X as jr, ReplaceAll as Gr, PanelLeft as Vr, PanelLeftClose as Jr } from "lucide-react";
52
+ import { Undo2 as br, Redo2 as vr, Bold as Dt, Italic as Rt, Underline as Mt, Strikethrough as Ft, Code as $t, Superscript as zt, Subscript as Ot, Pilcrow as wr, Heading1 as xr, Heading2 as Cr, Heading3 as Tr, AlignLeft as Sr, AlignCenter as Er, AlignRight as kr, AlignJustify as _r, List as Ir, ListOrdered as Nr, Quote as Ar, FileCode2 as Lr, Table as Pr, Minus as Dr, CheckSquare as Rr, Image as Bt, Link2 as Ht, FileText as qt, Box as Mr, Workflow as Fr, FunctionSquare as $r, Sigma as zr, GitGraph as Or, Square as mt, ChevronDown as Ut, Highlighter as Br, Sparkles as Hr, CaseSensitive as qr, ChevronUp as Ur, Replace as gt, X as Wr, ReplaceAll as jr, PanelLeft as Gr, PanelLeftClose as Vr } from "lucide-react";
53
53
  import Y from "clsx";
54
- import { BubbleMenu as Kr } from "@tiptap/react/menus";
55
- import { convertMillimetersToTwip as he, Document as Xr, Packer as Yr, Paragraph as He, AlignmentType as it, TextRun as qe } from "docx";
56
- import { saveAs as Zr } from "file-saver";
57
- const Qr = new we("slashCommand"), ea = Oe.create({
54
+ import { BubbleMenu as Jr } from "@tiptap/react/menus";
55
+ import { convertMillimetersToTwip as he, Document as Kr, Packer as Xr, Paragraph as He, AlignmentType as it, TextRun as qe } from "docx";
56
+ import { saveAs as Yr } from "file-saver";
57
+ const Zr = new we("slashCommand"), Qr = Oe.create({
58
58
  name: "slashCommand",
59
59
  addOptions() {
60
60
  return {
@@ -71,11 +71,11 @@ const Qr = new we("slashCommand"), ea = Oe.create({
71
71
  Qn({
72
72
  editor: this.editor,
73
73
  ...this.options.suggestion,
74
- pluginKey: Qr
74
+ pluginKey: Zr
75
75
  })
76
76
  ];
77
77
  }
78
- }), ta = {
78
+ }), ea = {
79
79
  visible: !0,
80
80
  activeTab: "chat",
81
81
  activeSectionType: null,
@@ -94,7 +94,7 @@ const Qr = new we("slashCommand"), ea = Oe.create({
94
94
  aiService: null,
95
95
  chatSessionAPI: null,
96
96
  chatSessionId: null,
97
- rightPanel: { ...ta },
97
+ rightPanel: { ...ea },
98
98
  setEditor: (t) => e({ editor: t }),
99
99
  setDocument: (t) => e({ document: t }),
100
100
  setSelection: (t) => e({ selection: t }),
@@ -196,7 +196,7 @@ const Qr = new we("slashCommand"), ea = Oe.create({
196
196
  }
197
197
  );
198
198
  Wt.displayName = "SlashMenuList";
199
- function na(e) {
199
+ function ta(e) {
200
200
  const t = e === "zh";
201
201
  return [
202
202
  {
@@ -298,11 +298,11 @@ function na(e) {
298
298
  }
299
299
  ];
300
300
  }
301
- function ra() {
301
+ function na() {
302
302
  return {
303
303
  char: "/",
304
304
  items: ({ query: e }) => {
305
- const t = I.getState().editorLanguage, n = na(t);
305
+ const t = I.getState().editorLanguage, n = ta(t);
306
306
  if (!e) return n;
307
307
  const r = e.toLowerCase();
308
308
  return n.filter(
@@ -343,7 +343,7 @@ function ra() {
343
343
  }
344
344
  };
345
345
  }
346
- const aa = new we("searchReplace");
346
+ const ra = new we("searchReplace");
347
347
  function ke(e, t, n) {
348
348
  if (!t) return [];
349
349
  const r = [], a = e.textBetween(0, e.content.size, `
@@ -369,7 +369,7 @@ function ke(e, t, n) {
369
369
  }
370
370
  return r;
371
371
  }
372
- const ia = Oe.create({
372
+ const aa = Oe.create({
373
373
  name: "searchReplace",
374
374
  addStorage() {
375
375
  return {
@@ -433,7 +433,7 @@ const ia = Oe.create({
433
433
  const e = this.storage;
434
434
  return [
435
435
  new Be({
436
- key: aa,
436
+ key: ra,
437
437
  props: {
438
438
  decorations: (t) => {
439
439
  if (!e.searchTerm || e.results.length === 0)
@@ -458,13 +458,13 @@ function ft(e) {
458
458
  }
459
459
  });
460
460
  }
461
- const sa = -1, oa = 1, pt = 0;
461
+ const ia = -1, sa = 1, pt = 0;
462
462
  let Ge = null;
463
- function ca() {
463
+ function oa() {
464
464
  return Ge || (Ge = new Pt()), Ge;
465
465
  }
466
466
  const jt = new we("patchDiff");
467
- function la(e, t) {
467
+ function ca(e, t) {
468
468
  let n = null;
469
469
  return e.state.doc.descendants((r, a) => n ? !1 : r.type.name === "patent_section" && r.attrs.sectionType === t ? (n = { from: a + 1, to: a + r.nodeSize - 1 }, !1) : !0), n;
470
470
  }
@@ -504,7 +504,7 @@ function ht(e, t, n, r, a) {
504
504
  }
505
505
  return null;
506
506
  }
507
- function Rs(e, t, n, r, a) {
507
+ function Ds(e, t, n, r, a) {
508
508
  const i = t.target;
509
509
  let o = null;
510
510
  const c = /* @__PURE__ */ new Set();
@@ -514,7 +514,7 @@ function Rs(e, t, n, r, a) {
514
514
  if (!i)
515
515
  t.from != null && t.to != null && (o = { from: t.from, to: t.to });
516
516
  else if (i.type === "section" && i.sectionType)
517
- o = la(e, i.sectionType);
517
+ o = ca(e, i.sectionType);
518
518
  else if (i.type === "ref" && i.refIndex != null) {
519
519
  const d = n[i.refIndex];
520
520
  (d == null ? void 0 : d.from) != null && (d == null ? void 0 : d.to) != null && (o = { from: d.from, to: d.to });
@@ -539,7 +539,7 @@ function Rs(e, t, n, r, a) {
539
539
  }
540
540
  const j = /* @__PURE__ */ new Map();
541
541
  let De = [];
542
- function Ms(e) {
542
+ function Rs(e) {
543
543
  return De.push(e), () => {
544
544
  De = De.filter((t) => t !== e);
545
545
  };
@@ -547,16 +547,16 @@ function Ms(e) {
547
547
  function ue() {
548
548
  De.forEach((e) => e());
549
549
  }
550
- function Fs(e = "default") {
550
+ function Ms(e = "default") {
551
551
  return [...j.get(e) || []];
552
552
  }
553
- function $s(e, t = "default") {
553
+ function Fs(e, t = "default") {
554
554
  j.set(t, e), ue();
555
555
  }
556
- function zs(e = "default") {
556
+ function $s(e = "default") {
557
557
  j.delete(e), ue();
558
558
  }
559
- function Os(e, t, n = "default") {
559
+ function zs(e, t, n = "default") {
560
560
  const r = j.get(n) || [], a = r.find((c) => c.id === t);
561
561
  if (!a || a.status !== "pending") return !1;
562
562
  a.status = "accepted";
@@ -579,11 +579,11 @@ function Os(e, t, n = "default") {
579
579
  }
580
580
  return j.set(n, r.filter((c) => c.id !== t && c.status === "pending")), Ue(e), ue(), !0;
581
581
  }
582
- function Bs(e, t, n = "default") {
582
+ function Os(e, t, n = "default") {
583
583
  const r = j.get(n) || [], a = r.find((i) => i.id === t);
584
584
  return !a || a.status !== "pending" ? !1 : (a.status = "rejected", j.set(n, r.filter((i) => i.id !== t)), Ue(e), ue(), !0);
585
585
  }
586
- function Hs(e, t = "default") {
586
+ function Bs(e, t = "default") {
587
587
  const a = [...(j.get(t) || []).filter((o) => o.status === "pending")].sort((o, c) => c.from - o.from), { tr: i } = e.state;
588
588
  for (const o of a)
589
589
  if (o.type === "delete")
@@ -597,13 +597,13 @@ function Hs(e, t = "default") {
597
597
  i.insertText(o.content, o.from, o.to);
598
598
  e.view.dispatch(i), j.delete(t), Ue(e), ue();
599
599
  }
600
- function qs(e, t = "default") {
600
+ function Hs(e, t = "default") {
601
601
  j.delete(t), Ue(e), ue();
602
602
  }
603
603
  function Ue(e) {
604
604
  e.view.dispatch(e.state.tr.setMeta(jt, !0));
605
605
  }
606
- function da(e, t, n) {
606
+ function la(e, t, n) {
607
607
  const r = [];
608
608
  return e.nodesBetween(t, n, (a, i) => {
609
609
  if (a.isTextblock) {
@@ -613,7 +613,7 @@ function da(e, t, n) {
613
613
  return !0;
614
614
  }), r;
615
615
  }
616
- function ua(e, t) {
616
+ function da(e, t) {
617
617
  if (!t.originalText || !t.content) return null;
618
618
  try {
619
619
  const c = e.resolve(t.from), s = e.resolve(t.to);
@@ -621,7 +621,7 @@ function ua(e, t) {
621
621
  } catch {
622
622
  return null;
623
623
  }
624
- const n = ca(), r = n.diff_main(t.originalText, t.content);
624
+ const n = oa(), r = n.diff_main(t.originalText, t.content);
625
625
  n.diff_cleanupSemantic(r);
626
626
  const a = r.filter(([c]) => c === pt).reduce((c, [, s]) => c + s.length, 0);
627
627
  if (t.originalText.length > 0 && a / t.originalText.length < 0.3) return null;
@@ -630,7 +630,7 @@ function ua(e, t) {
630
630
  for (const [c, s] of r)
631
631
  if (c === pt)
632
632
  o += s.length;
633
- else if (c === sa) {
633
+ else if (c === ia) {
634
634
  const l = o + s.length;
635
635
  i.push(
636
636
  re.inline(o, l, {
@@ -638,7 +638,7 @@ function ua(e, t) {
638
638
  "data-patch-id": t.id
639
639
  })
640
640
  ), o = l;
641
- } else c === oa && i.push(
641
+ } else c === sa && i.push(
642
642
  re.widget(o, () => {
643
643
  const l = document.createElement("span");
644
644
  return l.className = "patch-diff-insert-inline", l.textContent = s, l.setAttribute("data-patch-id", t.id), l;
@@ -646,7 +646,7 @@ function ua(e, t) {
646
646
  );
647
647
  return i;
648
648
  }
649
- function ma(e = "default") {
649
+ function ua(e = "default") {
650
650
  return new Be({
651
651
  key: jt,
652
652
  props: {
@@ -656,14 +656,14 @@ function ma(e = "default") {
656
656
  const r = [];
657
657
  for (const a of n) {
658
658
  if (a.type === "replace") {
659
- const i = ua(t.doc, a);
659
+ const i = da(t.doc, a);
660
660
  if (i) {
661
661
  r.push(...i);
662
662
  continue;
663
663
  }
664
664
  }
665
665
  if (a.type === "delete" || a.type === "replace") {
666
- const i = da(t.doc, a.from, a.to);
666
+ const i = la(t.doc, a.from, a.to);
667
667
  for (const o of i)
668
668
  r.push(
669
669
  re.inline(o.from, o.to, {
@@ -709,7 +709,7 @@ function Jt(e, t) {
709
709
  );
710
710
  });
711
711
  }
712
- const ga = Z.create({
712
+ const ma = Z.create({
713
713
  name: "hardBreak",
714
714
  inline: !0,
715
715
  group: "inline",
@@ -730,7 +730,7 @@ const ga = Z.create({
730
730
  }
731
731
  };
732
732
  }
733
- }), fa = Oe.create({
733
+ }), ga = Oe.create({
734
734
  name: "dragDropUX",
735
735
  addProseMirrorPlugins() {
736
736
  return [
@@ -741,19 +741,19 @@ const ga = Z.create({
741
741
  Xn()
742
742
  ];
743
743
  }
744
- }), pa = Oe.create({
744
+ }), fa = Oe.create({
745
745
  name: "patchDiff",
746
746
  addOptions() {
747
747
  return { editorId: "default" };
748
748
  },
749
749
  addProseMirrorPlugins() {
750
- return [ma(this.options.editorId)];
750
+ return [ua(this.options.editorId)];
751
751
  }
752
- }), ha = [
752
+ }), pa = [
753
753
  An,
754
754
  Ln,
755
755
  Pn,
756
- fa,
756
+ ga,
757
757
  Dn.configure({
758
758
  levels: [1, 2, 3, 4, 5, 6]
759
759
  }),
@@ -762,7 +762,7 @@ const ga = Z.create({
762
762
  Fn,
763
763
  $n,
764
764
  zn,
765
- ga,
765
+ ma,
766
766
  On,
767
767
  Bn,
768
768
  Hn.configure({ nested: !0 }),
@@ -792,15 +792,15 @@ const ga = Z.create({
792
792
  placeholder: ({ node: e }) => e.type.name === "heading" ? "Heading" : "Type / for commands..."
793
793
  }),
794
794
  Jn,
795
- ea.configure({
796
- suggestion: ra()
795
+ Qr.configure({
796
+ suggestion: na()
797
797
  }),
798
- ia,
798
+ aa,
799
799
  Yn.configure({
800
800
  types: ["heading", "paragraph"],
801
801
  defaultAlignment: "left"
802
802
  })
803
- ], ya = [
803
+ ], ha = [
804
804
  nr,
805
805
  rr,
806
806
  ar,
@@ -814,11 +814,11 @@ const ga = Z.create({
814
814
  dr,
815
815
  ur,
816
816
  mr.configure({ multicolor: !0 })
817
- ], ba = [
818
- ...ha,
819
- ...ya
817
+ ], ya = [
818
+ ...pa,
819
+ ...ha
820
820
  ];
821
- class va {
821
+ class ba {
822
822
  constructor() {
823
823
  Se(this, "commands", /* @__PURE__ */ new Map());
824
824
  }
@@ -884,8 +884,8 @@ class va {
884
884
  return Array.from(this.commands.keys()).sort();
885
885
  }
886
886
  }
887
- const le = new va();
888
- class wa {
887
+ const le = new ba();
888
+ class va {
889
889
  constructor() {
890
890
  Se(this, "plugins", /* @__PURE__ */ new Map());
891
891
  Se(this, "lifecycleOrder", ["register", "init", "stateSync", "destroy"]);
@@ -970,7 +970,7 @@ class wa {
970
970
  });
971
971
  }
972
972
  }
973
- const B = new wa(), yt = {
973
+ const B = new va(), yt = {
974
974
  zh: {
975
975
  language: "语言",
976
976
  bold: "加粗",
@@ -1223,7 +1223,7 @@ const Ie = () => {
1223
1223
  document.querySelectorAll('body > svg[id^="standalone-mermaid-"]').forEach((e) => e.remove()), document.querySelectorAll('body > svg[id^="d"]').forEach((e) => {
1224
1224
  (e.id.startsWith("dmermaid") || e.id.startsWith("dstandalone")) && e.remove();
1225
1225
  }), document.querySelectorAll('body > div[id^="dstandalone-mermaid-"]').forEach((e) => e.remove()), document.querySelectorAll('body > div[id^="dmermaid"]').forEach((e) => e.remove()), document.querySelectorAll('body > div[id^="standalone-mermaid-"]').forEach((e) => e.remove());
1226
- }, xa = Z.create({
1226
+ }, wa = Z.create({
1227
1227
  name: "mermaid",
1228
1228
  group: "block",
1229
1229
  atom: !0,
@@ -1337,10 +1337,10 @@ const Ie = () => {
1337
1337
  };
1338
1338
  };
1339
1339
  }
1340
- }), Ca = {
1340
+ }), xa = {
1341
1341
  name: "mermaid",
1342
1342
  version: "1.0.0",
1343
- extensions: [xa],
1343
+ extensions: [wa],
1344
1344
  toolbarItems: [
1345
1345
  {
1346
1346
  id: "mermaid-insert",
@@ -1365,7 +1365,7 @@ const Ie = () => {
1365
1365
  }
1366
1366
  }
1367
1367
  }
1368
- }, Ve = "https://draw.goatpatent.com", Ta = Z.create({
1368
+ }, Ve = "https://draw.goatpatent.com", Ca = Z.create({
1369
1369
  name: "drawio",
1370
1370
  group: "block",
1371
1371
  atom: !0,
@@ -1461,10 +1461,10 @@ const Ie = () => {
1461
1461
  };
1462
1462
  };
1463
1463
  }
1464
- }), Sa = {
1464
+ }), Ta = {
1465
1465
  name: "drawio",
1466
1466
  version: "1.0.0",
1467
- extensions: [Ta],
1467
+ extensions: [Ca],
1468
1468
  toolbarItems: [
1469
1469
  {
1470
1470
  id: "drawio-insert",
@@ -1567,7 +1567,7 @@ const Ie = () => {
1567
1567
  ] })
1568
1568
  }
1569
1569
  );
1570
- }, Ea = Z.create({
1570
+ }, Sa = Z.create({
1571
1571
  name: "math_inline",
1572
1572
  group: "inline",
1573
1573
  inline: !0,
@@ -1600,7 +1600,7 @@ const Ie = () => {
1600
1600
  }
1601
1601
  });
1602
1602
  }
1603
- }), ka = Z.create({
1603
+ }), Ea = Z.create({
1604
1604
  name: "math_block",
1605
1605
  group: "block",
1606
1606
  atom: !0,
@@ -1623,10 +1623,10 @@ const Ie = () => {
1623
1623
  }
1624
1624
  });
1625
1625
  }
1626
- }), _a = {
1626
+ }), ka = {
1627
1627
  name: "math",
1628
1628
  version: "1.0.0",
1629
- extensions: [Ea, ka],
1629
+ extensions: [Sa, Ea],
1630
1630
  toolbarItems: [
1631
1631
  {
1632
1632
  id: "math-inline-insert",
@@ -1689,7 +1689,7 @@ const Ie = () => {
1689
1689
  };
1690
1690
  }
1691
1691
  return null;
1692
- }, Ia = (e) => {
1692
+ }, _a = (e) => {
1693
1693
  const { $from: t } = e.state.selection;
1694
1694
  for (let n = t.depth; n >= 0; n -= 1) {
1695
1695
  const r = t.node(n);
@@ -1700,7 +1700,7 @@ const Ie = () => {
1700
1700
  };
1701
1701
  }
1702
1702
  return null;
1703
- }, Na = (e, t) => e.state.schema.nodes[t] || null, Aa = (e) => {
1703
+ }, Ia = (e, t) => e.state.schema.nodes[t] || null, Na = (e) => {
1704
1704
  const t = Array.isArray(e.content) ? e.content : e.content ? [e.content] : void 0;
1705
1705
  return {
1706
1706
  type: e.type,
@@ -1708,7 +1708,7 @@ const Ie = () => {
1708
1708
  content: t
1709
1709
  };
1710
1710
  }, Yt = (e, t) => {
1711
- const n = Aa(t);
1711
+ const n = Na(t);
1712
1712
  return typeof t.position == "number" ? e.chain().focus().insertContentAt(t.position, n).run() : e.chain().focus().insertContent(n).run();
1713
1713
  }, ze = (e, t) => typeof t.position != "number" && !t.type ? !1 : e.commands.command(({ tr: n, state: r, dispatch: a }) => {
1714
1714
  var s;
@@ -1728,7 +1728,7 @@ const Ie = () => {
1728
1728
  const o = r.doc.nodeAt(i);
1729
1729
  return !o || t.type && o.type.name !== t.type ? !1 : (n.delete(i, i + o.nodeSize), a && a(n), !0);
1730
1730
  }), Qt = (e, t) => {
1731
- const n = Na(e, t.type);
1731
+ const n = Ia(e, t.type);
1732
1732
  return n ? e.commands.command(({ tr: r, state: a, dispatch: i }) => {
1733
1733
  const { from: o, to: c } = a.selection, s = a.selection.$from.blockRange(a.selection.$to);
1734
1734
  if (!s)
@@ -1736,7 +1736,7 @@ const Ie = () => {
1736
1736
  const l = fr(s, n, t.attrs);
1737
1737
  return l ? (r.wrap(s, l), i && i(r.scrollIntoView()), o <= c) : !1;
1738
1738
  }) : !1;
1739
- }, La = (e, t) => {
1739
+ }, Aa = (e, t) => {
1740
1740
  if (t.length === 0)
1741
1741
  return !1;
1742
1742
  const n = e.getJSON();
@@ -1748,13 +1748,13 @@ const Ie = () => {
1748
1748
  let Ne = 0;
1749
1749
  const Qe = [];
1750
1750
  let Ae = !1;
1751
- const Pa = 2e4, bt = 6e4;
1751
+ const La = 2e4, bt = 6e4;
1752
1752
  let F = null, Me = !1, ne = null, pe = null;
1753
1753
  const et = /* @__PURE__ */ new Map();
1754
1754
  function vt() {
1755
1755
  ne && (window.removeEventListener("message", ne), ne = null), F && (F.src = "about:blank", F.remove(), F = null), Me = !1;
1756
1756
  }
1757
- function Da(e, t) {
1757
+ function Pa(e, t) {
1758
1758
  const n = et.get(e);
1759
1759
  if (n) {
1760
1760
  t(n);
@@ -1796,13 +1796,13 @@ function tt() {
1796
1796
  de
1797
1797
  );
1798
1798
  }, 1500) : c.event === "export" && a(c.data || "");
1799
- }, window.addEventListener("message", ne), r = setTimeout(() => a(""), Pa), F ? Me && i() : (F = document.createElement("iframe"), F.style.cssText = "position:fixed;left:-9999px;top:-9999px;width:1920px;height:1080px;opacity:0;pointer-events:none;", document.body.appendChild(F), Me = !1, F.src = `${de}/?embed=1&proto=json&spin=0&chrome=0`);
1799
+ }, window.addEventListener("message", ne), r = setTimeout(() => a(""), La), F ? Me && i() : (F = document.createElement("iframe"), F.style.cssText = "position:fixed;left:-9999px;top:-9999px;width:1920px;height:1080px;opacity:0;pointer-events:none;", document.body.appendChild(F), Me = !1, F.src = `${de}/?embed=1&proto=json&spin=0&chrome=0`);
1800
1800
  }
1801
1801
  const Le = () => {
1802
1802
  document.querySelectorAll('body > svg[id^="fig-mermaid-"]').forEach((e) => e.remove()), document.querySelectorAll('body > svg[id^="d"]').forEach((e) => {
1803
1803
  (e.id.startsWith("dmermaid") || e.id.startsWith("dfi")) && e.remove();
1804
1804
  }), document.querySelectorAll("body > #dmermaid-svg").forEach((e) => e.remove()), document.querySelectorAll("body > style[data-mermaid-style]").forEach((e) => e.remove());
1805
- }, Ra = Z.create({
1805
+ }, Da = Z.create({
1806
1806
  name: "figure",
1807
1807
  group: "block",
1808
1808
  content: "inline*",
@@ -2014,7 +2014,7 @@ const Le = () => {
2014
2014
  U && Cn && !oe && !xe && !i && (se && clearTimeout(se), se = setTimeout(() => {
2015
2015
  se = null;
2016
2016
  const dt = typeof r.attrs.drawioXml == "string" ? r.attrs.drawioXml : "", Tn = typeof r.attrs.drawioSvg == "string" ? r.attrs.drawioSvg : "";
2017
- !dt || Tn || xe || (xe = !0, Da(dt, (ut) => {
2017
+ !dt || Tn || xe || (xe = !0, Pa(dt, (ut) => {
2018
2018
  xe = !1, ut ? (Ce = 0, z({ drawioSvg: ut })) : Ce < yn && (Ce++, me = setTimeout(() => {
2019
2019
  me = null, J();
2020
2020
  }, vn * Ce));
@@ -2043,7 +2043,7 @@ const Le = () => {
2043
2043
  };
2044
2044
  };
2045
2045
  }
2046
- }), Ma = Z.create({
2046
+ }), Ra = Z.create({
2047
2047
  name: "reference",
2048
2048
  group: "inline",
2049
2049
  inline: !0,
@@ -2144,7 +2144,7 @@ const Le = () => {
2144
2144
  design_description: "sectionTitle_design_description",
2145
2145
  design_views: "sectionTitle_design_views",
2146
2146
  design_brief: "sectionTitle_design_brief"
2147
- }, Fa = /* @__PURE__ */ new Set([
2147
+ }, Ma = /* @__PURE__ */ new Set([
2148
2148
  "abstract",
2149
2149
  "abstract_drawing",
2150
2150
  "claims",
@@ -2155,7 +2155,7 @@ const Le = () => {
2155
2155
  "design_description",
2156
2156
  "design_views",
2157
2157
  "design_brief"
2158
- ]), $a = /* @__PURE__ */ new Set([
2158
+ ]), Fa = /* @__PURE__ */ new Set([
2159
2159
  "technical_field",
2160
2160
  "background_art",
2161
2161
  "summary",
@@ -2170,7 +2170,7 @@ const Le = () => {
2170
2170
  return e.forEach((n) => {
2171
2171
  !t && ot(n) && (t = !0);
2172
2172
  }), t;
2173
- }, za = Z.create({
2173
+ }, $a = Z.create({
2174
2174
  name: "patent_title",
2175
2175
  group: "block",
2176
2176
  content: "inline*",
@@ -2233,7 +2233,7 @@ const Le = () => {
2233
2233
  };
2234
2234
  };
2235
2235
  }
2236
- }), Oa = Z.create({
2236
+ }), za = Z.create({
2237
2237
  name: "patent_section",
2238
2238
  group: "block",
2239
2239
  content: "block+",
@@ -2318,7 +2318,7 @@ const Le = () => {
2318
2318
  };
2319
2319
  c.addEventListener("click", m), s.addEventListener("focusin", d), s.addEventListener("click", d);
2320
2320
  const u = () => {
2321
- const b = I.getState(), w = H(b.editorLanguage), x = Object.keys(wt).includes(r.attrs.sectionType) ? r.attrs.sectionType : "technical_field", C = Fa.has(x), v = $a.has(x), E = wt[x], h = typeof w[E] == "string" ? w[E] : x, _ = ot(r), T = b.rightPanel.activeSectionPos === l();
2321
+ const b = I.getState(), w = H(b.editorLanguage), x = Object.keys(wt).includes(r.attrs.sectionType) ? r.attrs.sectionType : "technical_field", C = Ma.has(x), v = Fa.has(x), E = wt[x], h = typeof w[E] == "string" ? w[E] : x, _ = ot(r), T = b.rightPanel.activeSectionPos === l();
2322
2322
  a.className = `ps${_ ? "" : " ps--empty"}${v ? " ps--sub" : ""}`, a.setAttribute("data-section-type", x), i.className = C ? "pb-heading" : "ps-heading ps-heading--sub", i.textContent = h, c.textContent = `[${h}]`, c.style.display = _ ? "none" : "", c.classList.toggle("ps-placeholder--active", T && !_), s.classList.toggle("ps-content--has-content", _);
2323
2323
  };
2324
2324
  let f = I.getState().editorLanguage, p = I.getState().rightPanel.activeSectionPos;
@@ -2336,21 +2336,21 @@ const Le = () => {
2336
2336
  };
2337
2337
  };
2338
2338
  }
2339
- }), Ba = [
2339
+ }), Oa = [
2340
2340
  "abstract",
2341
2341
  // 说明书摘要
2342
2342
  "abstract_drawing"
2343
2343
  // 摘要附图
2344
- ], Ha = [
2344
+ ], Ba = [
2345
2345
  "technical_field",
2346
2346
  "background_art",
2347
2347
  "summary",
2348
2348
  "drawing_description",
2349
2349
  "detailed_description"
2350
- ], qa = [
2350
+ ], Ha = [
2351
2351
  "drawing_figures"
2352
2352
  // 说明书附图
2353
- ], Ua = [
2353
+ ], qa = [
2354
2354
  "design_product_name",
2355
2355
  "design_usage",
2356
2356
  "design_description",
@@ -2370,15 +2370,15 @@ const Le = () => {
2370
2370
  }), en = () => ({
2371
2371
  type: "patent_title",
2372
2372
  content: []
2373
- }), Wa = () => [
2373
+ }), Ua = () => [
2374
+ ...Oa.map(Fe),
2375
+ en(),
2374
2376
  ...Ba.map(Fe),
2377
+ ...Ha.map(Fe)
2378
+ ], Wa = () => [
2375
2379
  en(),
2376
- ...Ha.map(Fe),
2377
2380
  ...qa.map(Fe)
2378
- ], ja = () => [
2379
- en(),
2380
- ...Ua.map(Fe)
2381
- ], tn = (e = "invention") => ({ type: "doc", content: e === "design" ? ja() : Wa() }), ve = (e) => Xt(e, (t) => t.type.name === "figure"), V = (e) => typeof e != "string" ? "" : e.trim(), xt = (e) => {
2381
+ ], tn = (e = "invention") => ({ type: "doc", content: e === "design" ? Wa() : Ua() }), ve = (e) => Xt(e, (t) => t.type.name === "figure"), V = (e) => typeof e != "string" ? "" : e.trim(), xt = (e) => {
2382
2382
  const n = I.getState().editorLanguage === "en" ? "Fig." : "图", r = /* @__PURE__ */ new Set();
2383
2383
  ve(e).forEach((i) => {
2384
2384
  const o = V(i.node.attrs.id);
@@ -2388,14 +2388,14 @@ const Le = () => {
2388
2388
  for (; r.has(`${n}${a}`); )
2389
2389
  a += 1;
2390
2390
  return `${n}${a}`;
2391
- }, Ga = /^(Fig\.|图)(\d+)$/, Va = (e) => {
2391
+ }, ja = /^(Fig\.|图)(\d+)$/, Ga = (e) => {
2392
2392
  const n = I.getState().editorLanguage === "en" ? "Fig." : "图", r = ve(e);
2393
2393
  if (r.length === 0) return;
2394
2394
  const a = [];
2395
2395
  let i = 1;
2396
2396
  for (const c of r) {
2397
2397
  const s = V(c.node.attrs.id);
2398
- if (!Ga.exec(s)) continue;
2398
+ if (!ja.exec(s)) continue;
2399
2399
  const d = `${n}${i}`;
2400
2400
  s !== d && a.push({ pos: c.pos, expectedId: d, currentId: s }), i++;
2401
2401
  }
@@ -2438,12 +2438,12 @@ const Le = () => {
2438
2438
  return Object.keys(p).some(
2439
2439
  (b) => p[b] !== c.attrs[b]
2440
2440
  ) && (r.setNodeMarkup(s, void 0, p), o = !0), !0;
2441
- }), o && i && i(r), !0;
2441
+ }), o && i && (r.setMeta("addToHistory", !1), i(r)), !0;
2442
2442
  });
2443
- }, Ja = {
2443
+ }, Va = {
2444
2444
  name: "patent",
2445
2445
  version: "1.0.0",
2446
- extensions: [Ra, Ma, za, Oa],
2446
+ extensions: [Da, Ra, $a, za],
2447
2447
  toolbarItems: [
2448
2448
  {
2449
2449
  id: "patent-figure-insert",
@@ -2472,7 +2472,7 @@ const Le = () => {
2472
2472
  return s.doc.descendants((m, u) => (m.type.name !== "reference" || i && u !== i.pos || m.attrs.lang !== r && (c.setNodeMarkup(u, void 0, {
2473
2473
  ...m.attrs,
2474
2474
  lang: r
2475
- }), d = !0), !0)), d && l && l(c), !0;
2475
+ }), d = !0), !0)), d && l && (c.setMeta("addToHistory", !1), l(c)), !0;
2476
2476
  }) ? (Je(e), !0) : !1;
2477
2477
  }
2478
2478
  },
@@ -2589,13 +2589,13 @@ const Le = () => {
2589
2589
  }
2590
2590
  },
2591
2591
  onStateChange: (e) => {
2592
- Va(e), Je(e);
2592
+ Ga(e), Je(e);
2593
2593
  }
2594
- }, Ka = [Ca, Sa, _a, Ja];
2595
- Ka.forEach((e) => B.register(e));
2596
- const Xa = (e = {}) => {
2594
+ }, Ja = [xa, Ta, ka, Va];
2595
+ Ja.forEach((e) => B.register(e));
2596
+ const Ka = (e = {}) => {
2597
2597
  const t = [
2598
- ...ba,
2598
+ ...ya,
2599
2599
  ...B.getExtensions(),
2600
2600
  ...e.extensions || []
2601
2601
  ];
@@ -2619,12 +2619,12 @@ const Xa = (e = {}) => {
2619
2619
  updateNodeAttrs: (t) => ze(e, t),
2620
2620
  removeNode: (t) => Zt(e, t),
2621
2621
  wrapSelection: (t) => Qt(e, t),
2622
- applyTransactionBatch: (t) => La(e, t),
2622
+ applyTransactionBatch: (t) => Aa(e, t),
2623
2623
  findNodeByType: (t, n) => st(e, t, n),
2624
2624
  findAncestorNode: (t) => Re(e, t),
2625
- findCurrentBlock: () => Ia(e),
2625
+ findCurrentBlock: () => _a(e),
2626
2626
  findNodesByPredicate: (t, n) => Xt(e, t, n)
2627
- }), Ya = ["history", "text", "structure", "format", "technical", "patent"], Za = {
2627
+ }), Xa = ["history", "text", "structure", "format", "technical", "patent"], Ya = {
2628
2628
  history: "groupHistory",
2629
2629
  text: "groupText",
2630
2630
  structure: "groupStructure",
@@ -2633,7 +2633,7 @@ const Xa = (e = {}) => {
2633
2633
  patent: "groupPatent"
2634
2634
  }, Xe = (e, t) => {
2635
2635
  if (t) {
2636
- const n = Za[e];
2636
+ const n = Ya[e];
2637
2637
  if (n && typeof t[n] == "string") return t[n];
2638
2638
  }
2639
2639
  return e.split("_").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ");
@@ -2705,9 +2705,9 @@ const Xa = (e = {}) => {
2705
2705
  document.body
2706
2706
  )
2707
2707
  ] });
2708
- }, Qa = ({
2708
+ }, Za = ({
2709
2709
  editor: e,
2710
- groupOrder: t = Ya,
2710
+ groupOrder: t = Xa,
2711
2711
  collapsibleGroups: n = !0,
2712
2712
  defaultCollapsedGroups: r = []
2713
2713
  }) => {
@@ -3101,7 +3101,7 @@ const Xa = (e = {}) => {
3101
3101
  ] }, h.group);
3102
3102
  })
3103
3103
  ] }) });
3104
- }, ei = ({ editor: e }) => {
3104
+ }, Qa = ({ editor: e }) => {
3105
3105
  const [t, n] = $(0), [r, a] = $(""), i = I((v) => v.editorLanguage), o = H(i);
3106
3106
  if (M(() => {
3107
3107
  if (!e) return;
@@ -3211,20 +3211,7 @@ const Xa = (e = {}) => {
3211
3211
  )),
3212
3212
  /* @__PURE__ */ g("div", { className: "h-6 w-px bg-gray-200 mx-1" })
3213
3213
  ] });
3214
- })(),
3215
- /* @__PURE__ */ g(
3216
- "button",
3217
- {
3218
- onClick: async () => {
3219
- if (e.chain().focus().deleteSelection().run()) return;
3220
- const { from: v } = e.state.selection;
3221
- v > 1 && e.chain().focus().deleteRange({ from: v - 1, to: v }).run();
3222
- },
3223
- className: "p-2 hover:bg-red-50 text-red-600 rounded",
3224
- title: o.deleteSelection,
3225
- children: /* @__PURE__ */ g(Br, { size: 16 })
3226
- }
3227
- )
3214
+ })()
3228
3215
  ] }) });
3229
3216
  }, sn = {
3230
3217
  // Invention & Utility Model
@@ -3244,10 +3231,10 @@ const Xa = (e = {}) => {
3244
3231
  design_views: ["design_description"],
3245
3232
  design_brief: ["design_description", "design_views"]
3246
3233
  };
3247
- function Us(e, t) {
3234
+ function qs(e, t) {
3248
3235
  return (sn[e] || []).filter((r) => !t.has(r));
3249
3236
  }
3250
- function ti(e) {
3237
+ function ei(e) {
3251
3238
  const t = [];
3252
3239
  return e.state.doc.descendants((n, r) => n.type.name === "patent_title" ? (t.push({
3253
3240
  sectionType: "patent_title",
@@ -3278,10 +3265,10 @@ function on(e) {
3278
3265
  }
3279
3266
  return null;
3280
3267
  }
3281
- function ni(e, t) {
3268
+ function ti(e, t) {
3282
3269
  const n = sn[t];
3283
3270
  if (!n || n.length === 0) return [];
3284
- const r = ti(e), a = new Map(r.map((i) => [i.sectionType, i]));
3271
+ const r = ei(e), a = new Map(r.map((i) => [i.sectionType, i]));
3285
3272
  return n.map((i) => {
3286
3273
  const o = a.get(i);
3287
3274
  return !o || o.content.trim().length === 0 ? null : {
@@ -3290,14 +3277,14 @@ function ni(e, t) {
3290
3277
  };
3291
3278
  }).filter((i) => i !== null && i.content.length > 0);
3292
3279
  }
3293
- function Ws(e, t = {}) {
3280
+ function Us(e, t = {}) {
3294
3281
  const n = I.getState().editorLanguage, { from: r, to: a } = e.state.selection, i = r !== a ? e.state.doc.textBetween(r, a, " ", "\0") : void 0;
3295
3282
  let o = t.sectionType, c = t.targetSectionPos;
3296
3283
  if (!o) {
3297
3284
  const m = on(e);
3298
3285
  m && (o = m.sectionType, c = m.pos);
3299
3286
  }
3300
- const s = t.scope || (o ? "section" : i ? "selection" : "document"), l = o ? ni(e, o) : void 0;
3287
+ const s = t.scope || (o ? "section" : i ? "selection" : "document"), l = o ? ti(e, o) : void 0;
3301
3288
  let d;
3302
3289
  if (s === "selection" && r !== a) {
3303
3290
  const u = Math.max(0, r - 200), f = Math.min(e.state.doc.content.size, a + 200), p = e.state.doc.textBetween(u, r, " ", "\0"), y = e.state.doc.textBetween(a, f, " ", "\0");
@@ -3314,7 +3301,7 @@ function Ws(e, t = {}) {
3314
3301
  language: n
3315
3302
  };
3316
3303
  }
3317
- const ri = ({ editor: e, onSelectionOptimize: t }) => {
3304
+ const ni = ({ editor: e, onSelectionOptimize: t }) => {
3318
3305
  const { addChatReference: n, openChatPanel: r, editorLanguage: a } = I(), i = a === "zh", o = (l) => Y(
3319
3306
  "p-1.5 rounded transition-colors",
3320
3307
  l ? "bg-blue-100 text-blue-600" : "text-gray-600 hover:bg-gray-100"
@@ -3332,7 +3319,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3332
3319
  d !== null && (d === "" ? e.chain().focus().extendMarkRange("link").unsetLink().run() : e.chain().focus().extendMarkRange("link").setLink({ href: d }).run());
3333
3320
  };
3334
3321
  return /* @__PURE__ */ g(
3335
- Kr,
3322
+ Jr,
3336
3323
  {
3337
3324
  editor: e,
3338
3325
  shouldShow: ({ editor: l, state: d }) => {
@@ -3410,7 +3397,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3410
3397
  onClick: () => e.chain().focus().toggleHighlight().run(),
3411
3398
  className: o(e.isActive("highlight")),
3412
3399
  title: "Highlight",
3413
- children: /* @__PURE__ */ g(Hr, { size: 15 })
3400
+ children: /* @__PURE__ */ g(Br, { size: 15 })
3414
3401
  }
3415
3402
  ),
3416
3403
  /* @__PURE__ */ g(
@@ -3429,13 +3416,13 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3429
3416
  onClick: c,
3430
3417
  className: "p-1.5 rounded transition-colors text-purple-500 hover:bg-purple-50",
3431
3418
  title: i ? "AI 优化" : "AI Optimize",
3432
- children: /* @__PURE__ */ g(qr, { size: 15 })
3419
+ children: /* @__PURE__ */ g(Hr, { size: 15 })
3433
3420
  }
3434
3421
  )
3435
3422
  ] })
3436
3423
  }
3437
3424
  );
3438
- }, ai = ({ editor: e }) => {
3425
+ }, ri = ({ editor: e }) => {
3439
3426
  var x;
3440
3427
  const [t, n] = $(!1), [r, a] = $(!1), [i, o] = $(""), [c, s] = $(""), [l, d] = $(!1), m = W(null), u = e.extensionStorage.searchReplace, f = ((x = u == null ? void 0 : u.results) == null ? void 0 : x.length) ?? 0, p = (u == null ? void 0 : u.currentIndex) ?? -1;
3441
3428
  M(() => {
@@ -3492,10 +3479,10 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3492
3479
  onClick: w,
3493
3480
  className: Y("find-replace-btn", l && "find-replace-btn--active"),
3494
3481
  title: "Case Sensitive",
3495
- children: /* @__PURE__ */ g(Ur, { size: 15 })
3482
+ children: /* @__PURE__ */ g(qr, { size: 15 })
3496
3483
  }
3497
3484
  ),
3498
- /* @__PURE__ */ g("button", { onClick: () => e.commands.previousSearchResult(), className: "find-replace-btn", title: "Previous", children: /* @__PURE__ */ g(Wr, { size: 15 }) }),
3485
+ /* @__PURE__ */ g("button", { onClick: () => e.commands.previousSearchResult(), className: "find-replace-btn", title: "Previous", children: /* @__PURE__ */ g(Ur, { size: 15 }) }),
3499
3486
  /* @__PURE__ */ g("button", { onClick: () => e.commands.nextSearchResult(), className: "find-replace-btn", title: "Next", children: /* @__PURE__ */ g(Ut, { size: 15 }) }),
3500
3487
  /* @__PURE__ */ g(
3501
3488
  "button",
@@ -3506,7 +3493,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3506
3493
  children: /* @__PURE__ */ g(gt, { size: 15 })
3507
3494
  }
3508
3495
  ),
3509
- /* @__PURE__ */ g("button", { onClick: b, className: "find-replace-btn", title: "Close (Esc)", children: /* @__PURE__ */ g(jr, { size: 15 }) })
3496
+ /* @__PURE__ */ g("button", { onClick: b, className: "find-replace-btn", title: "Close (Esc)", children: /* @__PURE__ */ g(Wr, { size: 15 }) })
3510
3497
  ] }),
3511
3498
  r && /* @__PURE__ */ L("div", { className: "find-replace-row", children: [
3512
3499
  /* @__PURE__ */ g(
@@ -3525,10 +3512,10 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3525
3512
  }
3526
3513
  ),
3527
3514
  /* @__PURE__ */ g("button", { onClick: () => e.commands.replaceCurrent(), className: "find-replace-btn", title: "Replace", children: /* @__PURE__ */ g(gt, { size: 15 }) }),
3528
- /* @__PURE__ */ g("button", { onClick: () => e.commands.replaceAll(), className: "find-replace-btn", title: "Replace All", children: /* @__PURE__ */ g(Gr, { size: 15 }) })
3515
+ /* @__PURE__ */ g("button", { onClick: () => e.commands.replaceAll(), className: "find-replace-btn", title: "Replace All", children: /* @__PURE__ */ g(jr, { size: 15 }) })
3529
3516
  ] })
3530
3517
  ] }) : null;
3531
- }, ii = ({ editor: e }) => {
3518
+ }, ai = ({ editor: e }) => {
3532
3519
  const { editorLanguage: t } = I(), n = t === "zh", r = At(() => {
3533
3520
  const a = e.state, o = a.doc.textBetween(0, a.doc.content.size, " ", "\0").replace(/\s/g, "").length, { from: c, to: s } = a.selection;
3534
3521
  let l = 0;
@@ -3546,19 +3533,19 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3546
3533
  r.selectionCount
3547
3534
  ] })
3548
3535
  ] });
3549
- }, si = {
3536
+ }, ii = {
3550
3537
  empty: "○",
3551
3538
  filled: "●"
3552
- }, oi = {
3539
+ }, si = {
3553
3540
  empty: "text-gray-400",
3554
3541
  filled: "text-green-500"
3555
- }, ci = /* @__PURE__ */ new Set([
3542
+ }, oi = /* @__PURE__ */ new Set([
3556
3543
  "technical_field",
3557
3544
  "background_art",
3558
3545
  "summary",
3559
3546
  "drawing_description",
3560
3547
  "detailed_description"
3561
- ]), li = ({ editor: e }) => {
3548
+ ]), ci = ({ editor: e }) => {
3562
3549
  const { editorLanguage: t } = I(), n = H(t), [r, a] = $(!1), [i, o] = $(0);
3563
3550
  M(() => {
3564
3551
  const s = () => o((l) => l + 1);
@@ -3591,7 +3578,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3591
3578
  }), !1;
3592
3579
  }
3593
3580
  if (d.type.name === "patent_section") {
3594
- const u = d.attrs.sectionType, f = ci.has(u), p = `sectionTitle_${u}`, y = typeof n[p] == "string" ? n[p] : u, b = d.textContent || "", w = b.trim().length > 0;
3581
+ const u = d.attrs.sectionType, f = oi.has(u), p = `sectionTitle_${u}`, y = typeof n[p] == "string" ? n[p] : u, b = d.textContent || "", w = b.trim().length > 0;
3595
3582
  return s.push({
3596
3583
  type: "section",
3597
3584
  pos: m,
@@ -3620,7 +3607,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3620
3607
  onClick: () => a(!1),
3621
3608
  className: "outline-panel-toggle",
3622
3609
  title: t === "zh" ? "展开大纲" : "Expand Outline",
3623
- children: /* @__PURE__ */ g(Vr, { size: 16 })
3610
+ children: /* @__PURE__ */ g(Gr, { size: 16 })
3624
3611
  }
3625
3612
  ) }) : /* @__PURE__ */ L("div", { className: "outline-panel", children: [
3626
3613
  /* @__PURE__ */ L("div", { className: "outline-panel-header", children: [
@@ -3632,7 +3619,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3632
3619
  onClick: () => a(!0),
3633
3620
  className: "outline-panel-toggle ml-auto",
3634
3621
  title: t === "zh" ? "收起大纲" : "Collapse Outline",
3635
- children: /* @__PURE__ */ g(Jr, { size: 14 })
3622
+ children: /* @__PURE__ */ g(Vr, { size: 14 })
3636
3623
  }
3637
3624
  )
3638
3625
  ] }),
@@ -3654,7 +3641,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3654
3641
  }));
3655
3642
  },
3656
3643
  children: [
3657
- s.type === "section" && s.state && /* @__PURE__ */ g("span", { className: Y("outline-item-state", oi[s.state]), children: si[s.state] || "○" }),
3644
+ s.type === "section" && s.state && /* @__PURE__ */ g("span", { className: Y("outline-item-state", si[s.state]), children: ii[s.state] || "○" }),
3658
3645
  /* @__PURE__ */ g("span", { className: "outline-item-title", children: s.title }),
3659
3646
  s.type !== "book-group" && /* @__PURE__ */ g("span", { className: "outline-item-count", children: s.charCount })
3660
3647
  ]
@@ -3663,7 +3650,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3663
3650
  ))
3664
3651
  ] })
3665
3652
  ] });
3666
- }, di = ({
3653
+ }, li = ({
3667
3654
  editor: e,
3668
3655
  mode: t = "edit",
3669
3656
  className: n
@@ -3679,14 +3666,14 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3679
3666
  ),
3680
3667
  children: /* @__PURE__ */ g(In, { editor: e, className: "h-full" })
3681
3668
  }
3682
- )), cn = "patent-editor-draft", ui = 1500, mi = () => {
3669
+ )), cn = "patent-editor-draft", di = 1500, ui = () => {
3683
3670
  try {
3684
3671
  const e = localStorage.getItem(cn);
3685
3672
  return e ? JSON.parse(e) : null;
3686
3673
  } catch {
3687
3674
  return null;
3688
3675
  }
3689
- }, gi = ({
3676
+ }, mi = ({
3690
3677
  initialContent: e,
3691
3678
  onChange: t,
3692
3679
  className: n,
@@ -3696,7 +3683,7 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3696
3683
  onSelectionOptimize: o,
3697
3684
  patchEditorId: c = "default"
3698
3685
  }) => {
3699
- const { setEditor: s, setDocument: l, editorLanguage: d, autoSaveStatus: m, ai: u } = I(), { setAutoSaveStatus: f, setLastSavedAt: p } = I(), y = W(null), b = e || (t ? null : mi()) || {
3686
+ const { setEditor: s, setDocument: l, editorLanguage: d, autoSaveStatus: m, ai: u } = I(), { setAutoSaveStatus: f, setLastSavedAt: p } = I(), y = W(null), b = e || (t ? null : ui()) || {
3700
3687
  type: "doc",
3701
3688
  content: [
3702
3689
  {
@@ -3711,14 +3698,14 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3711
3698
  f("error");
3712
3699
  }
3713
3700
  }, [f, p]), x = Nn(
3714
- Xa({
3715
- extensions: [pa.configure({ editorId: c })],
3701
+ Ka({
3702
+ extensions: [fa.configure({ editorId: c })],
3716
3703
  content: b,
3717
3704
  onUpdate: ({ editor: h }) => {
3718
3705
  const _ = h.getJSON();
3719
3706
  l(_), B.notifyStateChange(h), t && t(_), t || (y.current && clearTimeout(y.current), y.current = setTimeout(() => {
3720
3707
  w(_);
3721
- }, ui));
3708
+ }, di));
3722
3709
  },
3723
3710
  onCreate: ({ editor: h }) => {
3724
3711
  s(h), i == null || i(h), B.initializePlugins(h), B.notifyStateChange(h);
@@ -3750,23 +3737,23 @@ const ri = ({ editor: e, onSelectionOptimize: t }) => {
3750
3737
  const v = H(d), E = m === "saving" ? v.autoSaveSaving : m === "saved" ? v.autoSaveSaved : m === "error" ? v.autoSaveError : "";
3751
3738
  return /* @__PURE__ */ L("div", { className: `editor-container flex flex-col h-full ${n}`, children: [
3752
3739
  !r && /* @__PURE__ */ L("div", { className: "flex items-center", children: [
3753
- /* @__PURE__ */ g(Qa, { editor: x }),
3740
+ /* @__PURE__ */ g(Za, { editor: x }),
3754
3741
  E && /* @__PURE__ */ g("span", { className: `auto-save-indicator auto-save-indicator--${m} ml-2`, children: E })
3755
3742
  ] }),
3756
- !r && x && /* @__PURE__ */ g(ei, { editor: x }),
3757
- !r && x && /* @__PURE__ */ g(ri, { editor: x, onSelectionOptimize: o }),
3758
- !r && x && /* @__PURE__ */ g(ai, { editor: x }),
3743
+ !r && x && /* @__PURE__ */ g(Qa, { editor: x }),
3744
+ !r && x && /* @__PURE__ */ g(ni, { editor: x, onSelectionOptimize: o }),
3745
+ !r && x && /* @__PURE__ */ g(ri, { editor: x }),
3759
3746
  /* @__PURE__ */ L("div", { className: "flex flex-1 overflow-hidden", children: [
3760
- !r && x && /* @__PURE__ */ g(li, { editor: x }),
3747
+ !r && x && /* @__PURE__ */ g(ci, { editor: x }),
3761
3748
  /* @__PURE__ */ g("div", { className: "flex-1 overflow-y-auto bg-white p-4 relative", children: /* @__PURE__ */ g(
3762
- di,
3749
+ li,
3763
3750
  {
3764
3751
  editor: x,
3765
3752
  mode: r || !a || u.status === "streaming" && u.activeSectionType === "claims" ? "readonly" : "edit"
3766
3753
  }
3767
3754
  ) })
3768
3755
  ] }),
3769
- !r && /* @__PURE__ */ g(ii, { editor: x })
3756
+ !r && /* @__PURE__ */ g(ai, { editor: x })
3770
3757
  ] });
3771
3758
  };
3772
3759
  function ln(e) {
@@ -3821,7 +3808,7 @@ function ln(e) {
3821
3808
  }
3822
3809
  });
3823
3810
  }
3824
- function fi(e, t) {
3811
+ function gi(e, t) {
3825
3812
  let n = null;
3826
3813
  return {
3827
3814
  async request(r) {
@@ -3843,7 +3830,7 @@ function fi(e, t) {
3843
3830
  }
3844
3831
  };
3845
3832
  }
3846
- function pi(e, t) {
3833
+ function fi(e, t) {
3847
3834
  let n = null;
3848
3835
  const r = e.replace(/\/+$/, "");
3849
3836
  async function a(i, o) {
@@ -3897,7 +3884,7 @@ function pi(e, t) {
3897
3884
  }
3898
3885
  };
3899
3886
  }
3900
- const hi = It(
3887
+ const pi = It(
3901
3888
  ({ initialContent: e, patentType: t, onChange: n, className: r, readOnly: a = !1, editable: i = !0, language: o, aiService: c, chatSessionAPI: s, aiBaseUrl: l, aiHeaders: d, onSelectionOptimize: m, patchEditorId: u }, f) => {
3902
3889
  const { setEditorLanguage: p, setAIService: y, setChatSessionAPI: b } = I(), w = W(null), x = ae((v) => {
3903
3890
  w.current = v;
@@ -3908,9 +3895,9 @@ const hi = It(
3908
3895
  return Ee.useEffect(() => {
3909
3896
  o && p(o);
3910
3897
  }, [o, p]), Ee.useEffect(() => {
3911
- c ? y(c) : l && y(fi(l, d));
3898
+ c ? y(c) : l && y(gi(l, d));
3912
3899
  }, [c, l, d, y]), Ee.useEffect(() => {
3913
- s ? b(s) : l && b(pi(l, d));
3900
+ s ? b(s) : l && b(fi(l, d));
3914
3901
  }, [s, l, d, b]), Nt(f, () => ({
3915
3902
  getContent: () => {
3916
3903
  var v;
@@ -3927,7 +3914,7 @@ const hi = It(
3927
3914
  (v = w.current) == null || v.commands.focus();
3928
3915
  }
3929
3916
  })), /* @__PURE__ */ g(
3930
- gi,
3917
+ mi,
3931
3918
  {
3932
3919
  initialContent: C,
3933
3920
  onChange: n,
@@ -3941,8 +3928,8 @@ const hi = It(
3941
3928
  );
3942
3929
  }
3943
3930
  );
3944
- hi.displayName = "PatentEditor";
3945
- async function js(e, t, n) {
3931
+ pi.displayName = "PatentEditor";
3932
+ async function Ws(e, t, n) {
3946
3933
  var a, i, o, c;
3947
3934
  let r = !1;
3948
3935
  (a = n.onStart) == null || a.call(n), n.mode === "section" && typeof n.targetSectionPos == "number" && un(e, n.targetSectionPos);
@@ -3961,7 +3948,7 @@ async function js(e, t, n) {
3961
3948
  (c = n.onError) == null || c.call(n, s instanceof Error ? s : new Error(String(s)));
3962
3949
  }
3963
3950
  }
3964
- async function Gs(e, t, n, r) {
3951
+ async function js(e, t, n, r) {
3965
3952
  var i, o, c, s, l, d, m, u;
3966
3953
  const a = new AbortController();
3967
3954
  (i = r.onStart) == null || i.call(r), r.mode === "section" && typeof r.targetSectionPos == "number" && un(e, r.targetSectionPos);
@@ -4191,7 +4178,7 @@ function rt(e, t = 30) {
4191
4178
  }
4192
4179
  });
4193
4180
  }
4194
- function yi(e) {
4181
+ function hi(e) {
4195
4182
  const t = [], n = $e(e, 3);
4196
4183
  for (const r of n)
4197
4184
  t.push({ type: "delta", content: r });
@@ -4203,7 +4190,7 @@ function $e(e, t) {
4203
4190
  n.push(e.slice(r, r + t));
4204
4191
  return n;
4205
4192
  }
4206
- function bi(e, t, n) {
4193
+ function yi(e, t, n) {
4207
4194
  const r = n === "zh", a = [];
4208
4195
  let i;
4209
4196
  if (e.includes("技术方案") || e.includes("draft") ? i = Pe["help-draft"][r ? "zh" : "en"] : e.includes("审查") || e.includes("review") || e.includes("Review") ? i = Pe.review[r ? "zh" : "en"] : e.includes("权利要求") || e.includes("claims") || e.includes("Optimize") ? i = Pe.claims[r ? "zh" : "en"] : i = Pe.default[r ? "zh" : "en"], t.length > 0) {
@@ -4251,7 +4238,7 @@ function bi(e, t, n) {
4251
4238
  a.push({ type: "delta", content: o });
4252
4239
  return a.push({ type: "done", usage: { tokens: i.length * 2 } }), a;
4253
4240
  }
4254
- function Vs() {
4241
+ function Gs() {
4255
4242
  let e = null;
4256
4243
  return {
4257
4244
  async request(t) {
@@ -4265,7 +4252,7 @@ function Vs() {
4265
4252
  ` : `[Generated based on instruction "${t.instruction}"]
4266
4253
 
4267
4254
  `) + a);
4268
- const o = yi(i);
4255
+ const o = hi(i);
4269
4256
  return rt(o, 25);
4270
4257
  },
4271
4258
  abort() {
@@ -4273,7 +4260,7 @@ function Vs() {
4273
4260
  }
4274
4261
  };
4275
4262
  }
4276
- function Js() {
4263
+ function Vs() {
4277
4264
  const e = /* @__PURE__ */ new Map();
4278
4265
  let t = null, n = null;
4279
4266
  return {
@@ -4316,7 +4303,7 @@ function Js() {
4316
4303
  status: "done",
4317
4304
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
4318
4305
  }), i.session.messageCount = i.messages.length, i.session.lastMessage = a.content, i.session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
4319
- const c = bi(
4306
+ const c = yi(
4320
4307
  a.content,
4321
4308
  a.references || [],
4322
4309
  a.language
@@ -4348,7 +4335,7 @@ function Js() {
4348
4335
  }
4349
4336
  };
4350
4337
  }
4351
- function vi(e) {
4338
+ function bi(e) {
4352
4339
  const t = [], n = e.replace(/\r\n/g, `
4353
4340
  `).trim();
4354
4341
  if (!n) return t;
@@ -4363,12 +4350,12 @@ function vi(e) {
4363
4350
  if (a.length === 0)
4364
4351
  return t.push({ number: 1, text: n, dependsOn: [] }), t;
4365
4352
  for (let o = 0; o < a.length; o++) {
4366
- const c = a[o].index + a[o].matchLength, s = o + 1 < a.length ? a[o + 1].index : n.length, l = n.slice(c, s).trim(), d = a[o].number, m = wi(l, d);
4353
+ const c = a[o].index + a[o].matchLength, s = o + 1 < a.length ? a[o + 1].index : n.length, l = n.slice(c, s).trim(), d = a[o].number, m = vi(l, d);
4367
4354
  t.push({ number: d, text: l, dependsOn: m });
4368
4355
  }
4369
4356
  return t;
4370
4357
  }
4371
- function wi(e, t) {
4358
+ function vi(e, t) {
4372
4359
  const n = [], r = /根据权利要求(\d+)(?:\s*[-~至到]\s*(\d+))?/g;
4373
4360
  let a;
4374
4361
  for (; (a = r.exec(e)) !== null; ) {
@@ -4384,18 +4371,18 @@ function wi(e, t) {
4384
4371
  }
4385
4372
  return [...new Set(n)].sort((o, c) => o - c);
4386
4373
  }
4387
- function Ks(e) {
4388
- return vi(e).map((n) => ({
4374
+ function Js(e) {
4375
+ return bi(e).map((n) => ({
4389
4376
  type: "paragraph",
4390
4377
  content: n.text ? [{ type: "text", text: `${n.number}. ${n.text}` }] : [{ type: "text", text: `${n.number}. ` }]
4391
4378
  }));
4392
4379
  }
4393
- const xi = -1, Ci = 1, Ti = 0, at = new we("docDiff");
4380
+ const wi = -1, xi = 1, Ci = 0, at = new we("docDiff");
4394
4381
  let Ye = null;
4395
- function Si() {
4382
+ function Ti() {
4396
4383
  return Ye || (Ye = new Pt()), Ye;
4397
4384
  }
4398
- function Ei(e, t, n) {
4385
+ function Si(e, t, n) {
4399
4386
  const r = [];
4400
4387
  return e.nodesBetween(t, n, (a, i) => {
4401
4388
  if (a.isTextblock) {
@@ -4405,15 +4392,15 @@ function Ei(e, t, n) {
4405
4392
  return !0;
4406
4393
  }), r;
4407
4394
  }
4408
- function Xs(e, t) {
4409
- const n = e.state.doc, r = n.content.size, { text: a, segments: i } = Gt(e, 0, r), o = Si(), c = o.diff_main(t, a);
4395
+ function Ks(e, t) {
4396
+ const n = e.state.doc, r = n.content.size, { text: a, segments: i } = Gt(e, 0, r), o = Ti(), c = o.diff_main(t, a);
4410
4397
  o.diff_cleanupSemantic(c);
4411
4398
  const s = [];
4412
4399
  let l = 0;
4413
4400
  for (const [u, f] of c)
4414
- if (u === Ti)
4401
+ if (u === Ci)
4415
4402
  l += f.length;
4416
- else if (u === Ci) {
4403
+ else if (u === xi) {
4417
4404
  let p = 0;
4418
4405
  for (; p < f.length; ) {
4419
4406
  for (; p < f.length && f[p] === "\0"; ) p++;
@@ -4422,13 +4409,13 @@ function Xs(e, t) {
4422
4409
  for (; p < f.length && f[p] !== "\0"; ) p++;
4423
4410
  const b = ye(i, l + y), w = ye(i, l + p);
4424
4411
  if (b >= 0 && w >= 0 && w > b)
4425
- for (const x of Ei(n, b, w))
4412
+ for (const x of Si(n, b, w))
4426
4413
  s.push(
4427
4414
  re.inline(x.from, x.to, { class: "patch-diff-insert-inline" })
4428
4415
  );
4429
4416
  }
4430
4417
  l += f.length;
4431
- } else if (u === xi) {
4418
+ } else if (u === wi) {
4432
4419
  const p = ye(i, l);
4433
4420
  if (p >= 0) {
4434
4421
  const y = f.replace(/\0/g, " ");
@@ -4458,22 +4445,22 @@ function Xs(e, t) {
4458
4445
  });
4459
4446
  e.registerPlugin(m);
4460
4447
  }
4461
- function Ys(e) {
4448
+ function Xs(e) {
4462
4449
  e.unregisterPlugin(at);
4463
4450
  }
4464
- const ki = /* @__PURE__ */ new Set([
4451
+ const Ei = /* @__PURE__ */ new Set([
4465
4452
  "abstract",
4466
4453
  "abstract_drawing",
4467
4454
  "claims",
4468
4455
  "drawing_figures"
4469
- ]), _i = /* @__PURE__ */ new Set([
4456
+ ]), ki = /* @__PURE__ */ new Set([
4470
4457
  "technical_field",
4471
4458
  "background_art",
4472
4459
  "summary",
4473
4460
  "drawing_description",
4474
4461
  "detailed_description"
4475
4462
  ]);
4476
- function Ii(e, t) {
4463
+ function _i(e, t) {
4477
4464
  const n = H(t), r = [];
4478
4465
  return e.state.doc.descendants((a) => {
4479
4466
  if (a.type.name === "patent_title") {
@@ -4509,7 +4496,7 @@ function Et(e) {
4509
4496
  spacing: { before: 240, after: 120 }
4510
4497
  });
4511
4498
  }
4512
- function Ni(e) {
4499
+ function Ii(e) {
4513
4500
  return new He({
4514
4501
  children: [new qe({ text: e, bold: !0, size: 36, font: "宋体" })],
4515
4502
  alignment: it.CENTER,
@@ -4523,11 +4510,11 @@ function Ze(e) {
4523
4510
  indent: { firstLine: he(7) }
4524
4511
  });
4525
4512
  }
4526
- function Ai(e, t) {
4513
+ function Ni(e, t) {
4527
4514
  const n = H(t), r = [];
4528
4515
  let a = !1;
4529
4516
  for (const i of e) {
4530
- if (ki.has(i.sectionType)) {
4517
+ if (Ei.has(i.sectionType)) {
4531
4518
  r.push(St(i.title));
4532
4519
  for (const o of i.paragraphs)
4533
4520
  r.push(Ze(o));
@@ -4539,10 +4526,10 @@ function Ai(e, t) {
4539
4526
  r.push(St(o)), a = !0;
4540
4527
  }
4541
4528
  for (const o of i.paragraphs)
4542
- r.push(Ni(o));
4529
+ r.push(Ii(o));
4543
4530
  continue;
4544
4531
  }
4545
- if (_i.has(i.sectionType)) {
4532
+ if (ki.has(i.sectionType)) {
4546
4533
  r.push(Et(i.title));
4547
4534
  for (const o of i.paragraphs)
4548
4535
  r.push(Ze(o));
@@ -4554,8 +4541,8 @@ function Ai(e, t) {
4554
4541
  }
4555
4542
  return r;
4556
4543
  }
4557
- async function Zs(e, t) {
4558
- const n = Ii(e, t), r = Ai(n, t), a = n.find((l) => l.type === "patent_title"), i = a != null && a.paragraphs[0] ? `${a.paragraphs[0]}.docx` : "patent-document.docx", o = {
4544
+ async function Ys(e, t) {
4545
+ const n = _i(e, t), r = Ni(n, t), a = n.find((l) => l.type === "patent_title"), i = a != null && a.paragraphs[0] ? `${a.paragraphs[0]}.docx` : "patent-document.docx", o = {
4559
4546
  properties: {
4560
4547
  page: {
4561
4548
  margin: {
@@ -4567,15 +4554,15 @@ async function Zs(e, t) {
4567
4554
  }
4568
4555
  },
4569
4556
  children: r
4570
- }, c = new Xr({
4557
+ }, c = new Kr({
4571
4558
  sections: [o]
4572
- }), s = await Yr.toBlob(c);
4573
- Zr(s, i);
4559
+ }), s = await Xr.toBlob(c);
4560
+ Yr(s, i);
4574
4561
  }
4575
- async function Qs(e) {
4562
+ async function Zs(e) {
4576
4563
  window.print();
4577
4564
  }
4578
- function eo(e, t) {
4565
+ function Qs(e, t) {
4579
4566
  const n = [], r = t === "zh";
4580
4567
  let a = 0;
4581
4568
  const i = () => `v_${++a}`;
@@ -4646,8 +4633,8 @@ function eo(e, t) {
4646
4633
  return !0;
4647
4634
  }), n;
4648
4635
  }
4649
- const Li = /^(\d+)\s*[.、]\s*/, kt = /根据权利要求(\d+)(?:\s*[-~至到]\s*(\d+))?/g, _t = /claims?\s+(\d+)(?:\s*[-~to]+\s*(\d+))?/gi;
4650
- function Pi(e, t) {
4636
+ const Ai = /^(\d+)\s*[.、]\s*/, kt = /根据权利要求(\d+)(?:\s*[-~至到]\s*(\d+))?/g, _t = /claims?\s+(\d+)(?:\s*[-~to]+\s*(\d+))?/gi;
4637
+ function Li(e, t) {
4651
4638
  const n = [];
4652
4639
  let r;
4653
4640
  for (kt.lastIndex = 0; (r = kt.exec(e)) !== null; ) {
@@ -4664,7 +4651,7 @@ function Pi(e, t) {
4664
4651
  }
4665
4652
  const mn = (e) => {
4666
4653
  if (e.type.name === "reference")
4667
- return Di(e);
4654
+ return Pi(e);
4668
4655
  if (e.type.name === "hardBreak")
4669
4656
  return `
4670
4657
  `;
@@ -4674,7 +4661,7 @@ const mn = (e) => {
4674
4661
  return e.forEach((n) => {
4675
4662
  t += mn(n);
4676
4663
  }), t;
4677
- }, Di = (e) => {
4664
+ }, Pi = (e) => {
4678
4665
  const t = e.attrs.lang === "en" ? "en" : "zh", n = e.attrs.targetType === "figure" ? "figure" : "claim", r = typeof e.attrs.displayText == "string" ? e.attrs.displayText.trim() : "";
4679
4666
  if (r)
4680
4667
  return r;
@@ -4684,17 +4671,17 @@ const mn = (e) => {
4684
4671
  }
4685
4672
  const a = Number(e.attrs.resolvedNumber);
4686
4673
  return Number.isFinite(a) ? t === "en" ? `Claim ${a}` : `权利要求${a}` : t === "en" ? "Claim ?" : "权利要求?";
4687
- }, to = (e) => {
4674
+ }, eo = (e) => {
4688
4675
  const t = [];
4689
4676
  return e.state.doc.descendants((n, r) => {
4690
4677
  if (n.type.name === "patent_section")
4691
4678
  return n.attrs.sectionType === "claims";
4692
4679
  if (n.type.name !== "paragraph") return !0;
4693
- const a = mn(n).trim(), i = Li.exec(a);
4680
+ const a = mn(n).trim(), i = Ai.exec(a);
4694
4681
  if (!i) return !0;
4695
4682
  const o = parseInt(i[1], 10);
4696
4683
  if (!Number.isFinite(o) || o <= 0) return !0;
4697
- const c = a.slice(i[0].length).trim(), s = Pi(c, o);
4684
+ const c = a.slice(i[0].length).trim(), s = Li(c, o);
4698
4685
  return t.push({
4699
4686
  claimId: `claim_${o}`,
4700
4687
  number: o,
@@ -4706,40 +4693,40 @@ const mn = (e) => {
4706
4693
  }), t;
4707
4694
  };
4708
4695
  export {
4709
- gi as EditorView,
4696
+ mi as EditorView,
4710
4697
  jt as PatchDiffPluginKey,
4711
- hi as PatentEditor,
4712
- Hs as acceptAllPatches,
4713
- Os as acceptPatch,
4714
- Xs as applyDocDiffDecorations,
4715
- Ws as buildAIContext,
4716
- Ks as buildClaimsJSONContent,
4698
+ pi as PatentEditor,
4699
+ Bs as acceptAllPatches,
4700
+ zs as acceptPatch,
4701
+ Ks as applyDocDiffDecorations,
4702
+ Us as buildAIContext,
4703
+ Js as buildClaimsJSONContent,
4717
4704
  tn as buildPatentDocument,
4718
- zs as clearPatches,
4719
- pi as createChatSessionAPI,
4705
+ $s as clearPatches,
4706
+ fi as createChatSessionAPI,
4720
4707
  ct as createCommandExecutor,
4721
- Xa as createEditorConfig,
4722
- Vs as createMockAIService,
4723
- Js as createMockChatSessionAPI,
4724
- fi as createSSEAdapter,
4725
- Qs as exportToPdf,
4726
- Zs as exportToWord,
4727
- to as extractClaimsFromEditor,
4708
+ Ka as createEditorConfig,
4709
+ Gs as createMockAIService,
4710
+ Vs as createMockChatSessionAPI,
4711
+ gi as createSSEAdapter,
4712
+ Zs as exportToPdf,
4713
+ Ys as exportToWord,
4714
+ eo as extractClaimsFromEditor,
4728
4715
  on as findSectionAtCursor,
4729
- ti as getAllSections,
4730
- Us as getMissingSectionDeps,
4731
- Fs as getPatches,
4732
- Ms as onPatchChange,
4716
+ ei as getAllSections,
4717
+ qs as getMissingSectionDeps,
4718
+ Ms as getPatches,
4719
+ Rs as onPatchChange,
4733
4720
  B as pluginManager,
4734
- qs as rejectAllPatches,
4735
- Bs as rejectPatch,
4736
- Ys as removeDocDiffDecorations,
4737
- Rs as resolvePatchTarget,
4721
+ Hs as rejectAllPatches,
4722
+ Os as rejectPatch,
4723
+ Xs as removeDocDiffDecorations,
4724
+ Ds as resolvePatchTarget,
4738
4725
  sn as sectionContextDeps,
4739
- $s as setPatches,
4726
+ Fs as setPatches,
4740
4727
  I as useEditorStore,
4741
- eo as validatePatentDocument,
4742
- js as writeStream,
4743
- Gs as writeStreamFromSSE
4728
+ Qs as validatePatentDocument,
4729
+ Ws as writeStream,
4730
+ js as writeStreamFromSSE
4744
4731
  };
4745
4732
  //# sourceMappingURL=lib.js.map