@stll/folio-vue 0.35.0 → 0.37.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 (45) hide show
  1. package/dist/{FindReplaceDialog-DEWjhuOw.js → FindReplaceDialog-BzbnMjiN.js} +1 -1
  2. package/dist/{FindReplaceDialog-CfcTl2Ra.cjs → FindReplaceDialog-CCb4Yi5f.cjs} +1 -1
  3. package/dist/{HorizontalRuler-Cuk0l4Us.cjs → HorizontalRuler-CoPJ4Lmf.cjs} +1 -1
  4. package/dist/{HorizontalRuler-TM9dg--R.js → HorizontalRuler-Ya0NQqx3.js} +1 -1
  5. package/dist/{HyperlinkDialog-BEse_y7R.js → HyperlinkDialog-BguOrehQ.js} +1 -1
  6. package/dist/{HyperlinkDialog-Cs1y6aol.cjs → HyperlinkDialog-CDSxSFvj.cjs} +1 -1
  7. package/dist/{ImagePropertiesDialog-mrJ8S3sl.js → ImagePropertiesDialog-1ILEgbl3.js} +1 -1
  8. package/dist/{ImagePropertiesDialog-CTbX2GrE.cjs → ImagePropertiesDialog-D_LmgAfL.cjs} +1 -1
  9. package/dist/{ImageSelectionOverlay-Dr0lg9WZ.cjs → ImageSelectionOverlay-B4Wv2QHk.cjs} +1 -1
  10. package/dist/{ImageSelectionOverlay-DULrvfOJ.js → ImageSelectionOverlay-BNwMBeYP.js} +1 -1
  11. package/dist/{InsertSymbolDialog-BjB-Q9EO.js → InsertSymbolDialog-B7-kknus.js} +1 -1
  12. package/dist/{InsertSymbolDialog-BsjgPYM-.cjs → InsertSymbolDialog-jfgojslX.cjs} +1 -1
  13. package/dist/{PageSetupDialog-DNNSezj3.js → PageSetupDialog-BC7bN_yo.js} +1 -1
  14. package/dist/{PageSetupDialog-CZ5fE9rz.cjs → PageSetupDialog-DAtIl9D_.cjs} +1 -1
  15. package/dist/{SetNumberingValueDialog-CwLHfO7f.js → SetNumberingValueDialog-DUJzE0l3.js} +1 -1
  16. package/dist/{SetNumberingValueDialog-ClCYr37D.cjs → SetNumberingValueDialog-XHMLKpRf.cjs} +1 -1
  17. package/dist/{SplitCellDialog-Bfuo5WCO.cjs → SplitCellDialog-EJ_09cM4.cjs} +1 -1
  18. package/dist/{SplitCellDialog-HIg4ZEqt.js → SplitCellDialog-dc5KoFhn.js} +1 -1
  19. package/dist/{StylePicker-F3cLPvRE.js → StylePicker-BBvLDSJP.js} +1 -1
  20. package/dist/{StylePicker-BnGGlXOX.cjs → StylePicker-DJidbDMg.cjs} +1 -1
  21. package/dist/{TablePropertiesDialog-ClJSuB0F.cjs → TablePropertiesDialog-BqDEDExN.cjs} +1 -1
  22. package/dist/{TablePropertiesDialog-CRX9Xgdr.js → TablePropertiesDialog-CxwsN5hC.js} +1 -1
  23. package/dist/{VerticalRuler-D973NTMv.js → VerticalRuler-BavScWGg.js} +1 -1
  24. package/dist/{VerticalRuler-DVi2P_TO.cjs → VerticalRuler-BcdGrbbo.cjs} +1 -1
  25. package/dist/{WatermarkDialog-BYyBTlDK.cjs → WatermarkDialog-CWUNUrfl.cjs} +1 -1
  26. package/dist/{WatermarkDialog-BoAdQ-qK.js → WatermarkDialog-H9jTrFRd.js} +1 -1
  27. package/dist/components/DocxEditor/types.d.ts +8 -0
  28. package/dist/composables/useDocxEditor.d.ts +3 -0
  29. package/dist/composables.cjs +1 -1
  30. package/dist/composables.js +1 -1
  31. package/dist/dialogs.cjs +1 -1
  32. package/dist/dialogs.js +8 -8
  33. package/dist/{folio-ui-ctJdVP-s.js → folio-ui-D5Gq10SE.js} +267 -271
  34. package/dist/{folio-ui-u7h3WXUO.cjs → folio-ui-DyqCUkAf.cjs} +1 -1
  35. package/dist/folio-vue.css +1 -1
  36. package/dist/i18n/index.d.ts +1 -4
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.js +320 -321
  40. package/dist/ui.cjs +1 -1
  41. package/dist/ui.js +12 -12
  42. package/dist/{useZoom-BmnLgNs0.js → useZoom-DknlzjRk.js} +381 -380
  43. package/dist/useZoom-DpnXZInU.cjs +1 -0
  44. package/package.json +2 -2
  45. package/dist/useZoom-Dbw8AiOs.cjs +0 -1
@@ -5,88 +5,88 @@ import { getEditorScrollRoot as g, scrollEditorBy as _ } from "@stll/folio-core/
5
5
  import { getMargins as te, getPageSize as ne, twipsToPixels as v } from "@stll/folio-core/paged-layout/sectionGeometry";
6
6
  import { readModel as y } from "@stll/folio-core/types/documentModel";
7
7
  import { readPaintedTableStart as b } from "@stll/folio-core/utils/paintedPositions";
8
- import { canonicalReviewHeldRevisionIds as x } from "@stll/folio-core/controller/canonicalReview";
9
- import { NO_ANONYMIZATION_TERMS as re } from "@stll/folio-core/controller/anonymizationHighlights";
10
- import { createDisplayListPainterLoader as ie } from "@stll/folio-core/controller/deferredDisplayListPainter";
11
- import { DOCUMENT_CHANGE_NOTIFY_DELAY_MS as S } from "@stll/folio-core/controller/documentChangeNotification";
12
- import { FOLIO_DOCX_SERIALIZATION_MODE as C, OP_STORIES as w, createFolioEditor as T } from "@stll/folio-core/controller/folioEditor";
13
- import { createFolioEditorEmitter as ae } from "@stll/folio-core/controller/folioEditorEvents";
14
- import { readFontSetSignature as oe, waitForInitialLayoutFonts as E, watchLayoutFontLoads as se } from "@stll/folio-core/controller/fontReadiness";
15
- import { createHeaderFooterEditorManager as ce } from "@stll/folio-core/controller/headerFooterEditorManager";
16
- import { createHyphenationReadiness as le } from "@stll/folio-core/controller/hyphenationReadiness";
17
- import { runLayoutPipelineWithPainter as ue } from "@stll/folio-core/controller/layoutPipelineExecution";
18
- import { TRANSACTION_LAYOUT_TIMING as D, browserClock as de, createLayoutScheduler as fe } from "@stll/folio-core/controller/layoutScheduler";
19
- import { createLayoutSession as pe } from "@stll/folio-core/controller/layoutSession";
20
- import { createNoteEditorManager as me } from "@stll/folio-core/controller/noteEditorManager";
21
- import { PAGE_RENDERER as O } from "@stll/folio-core/display-list/editor/pageRenderer";
22
- import { holdsUniqueParagraphIds as he, openOwnedCanonicalDocx as ge, prepareCanonicalDocumentInput as _e } from "@stll/folio-core/docx/canonicalSessionInput";
23
- import { carryParseFacts as ve, cloneDocumentWithParagraphPropertySources as ye } from "@stll/folio-core/docx/document-clone";
24
- import { getFootnoteText as be } from "@stll/folio-core/docx/storyPlainText";
25
- import { convertHeaderFooterPmDocToContent as xe, convertHeaderFooterToContent as Se } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
26
- import { resolveSectionHeaderFooterRefs as Ce } from "@stll/folio-core/layout-engine";
27
- import { LayoutPainter as we, releaseDisplayPageResources as Te } from "@stll/folio-core/layout-painter";
28
- import { LayoutSelectionGate as Ee } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
29
- import { ExtensionManager as De } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
30
- import { createStarterKit as Oe } from "@stll/folio-core/prosemirror/extensions/StarterKit";
31
- import { createTemplateDirectivesPlugin as ke } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
32
- import { createTemplatePreviewValuesPlugin as Ae } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
33
- import { templateSlashMenuPlugin as je } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
34
- import { resolveHeaderFooterContent as Me } from "@stll/folio-core/utils/headerFooter";
35
- import { FindReplaceManager as Ne } from "@stll/folio-core/managers/FindReplaceManager";
36
- import { findInDisplayedDocument as Pe } from "@stll/folio-core/prosemirror/findReplaceSelection";
37
- import { replaceFindMatch as Fe, replaceFindMatches as Ie } from "@stll/folio-core/prosemirror/replaceFindMatches";
38
- import { createFindMatchView as Le, getRenderedSearchStories as Re } from "@stll/folio-core/utils/findMatchView";
39
- import { createDefaultFindOptions as ze, replaceEligibility as Be } from "@stll/folio-core/utils/findReplace";
40
- import { createFindSearchKey as k, sameFindSearchKey as Ve } from "@stll/folio-core/utils/findSearchKey";
41
- import { MIN_CELL_WIDTH_TWIPS as He, MIN_ROW_HEIGHT_TWIPS as Ue, TWIPS_PER_PIXEL as A, clampRowResizeDelta as We, columnResizeCommand as Ge, readColumnWidthAt as Ke, readColumnWidths as qe, readRowHeight as Je, rightEdgeResizeCommand as Ye, rowResizeCommand as j } from "@stll/folio-core/prosemirror/tableResize";
42
- import { trackedChangeEntryRevisionIds as Xe } from "@stll/folio-core/prosemirror/projectionReview";
8
+ import { canonicalReviewHeldRevisionIds as re } from "@stll/folio-core/controller/canonicalReview";
9
+ import { NO_ANONYMIZATION_TERMS as ie } from "@stll/folio-core/controller/anonymizationHighlights";
10
+ import { createDisplayListPainterLoader as ae } from "@stll/folio-core/controller/deferredDisplayListPainter";
11
+ import { DOCUMENT_CHANGE_NOTIFY_DELAY_MS as x } from "@stll/folio-core/controller/documentChangeNotification";
12
+ import { FOLIO_DOCX_SERIALIZATION_MODE as S, OP_STORIES as C, createFolioEditor as w } from "@stll/folio-core/controller/folioEditor";
13
+ import { createFolioEditorEmitter as oe } from "@stll/folio-core/controller/folioEditorEvents";
14
+ import { readFontSetSignature as se, waitForInitialLayoutFonts as T, watchLayoutFontLoads as ce } from "@stll/folio-core/controller/fontReadiness";
15
+ import { createHeaderFooterEditorManager as le } from "@stll/folio-core/controller/headerFooterEditorManager";
16
+ import { createHyphenationReadiness as ue } from "@stll/folio-core/controller/hyphenationReadiness";
17
+ import { runLayoutPipelineWithPainter as de } from "@stll/folio-core/controller/layoutPipelineExecution";
18
+ import { TRANSACTION_LAYOUT_TIMING as E, browserClock as fe, createLayoutScheduler as pe } from "@stll/folio-core/controller/layoutScheduler";
19
+ import { createLayoutSession as me } from "@stll/folio-core/controller/layoutSession";
20
+ import { createNoteEditorManager as he } from "@stll/folio-core/controller/noteEditorManager";
21
+ import { PAGE_RENDERER as D } from "@stll/folio-core/display-list/editor/pageRenderer";
22
+ import { holdsUniqueParagraphIds as ge, openOwnedCanonicalDocx as _e, prepareCanonicalDocumentInput as ve } from "@stll/folio-core/docx/canonicalSessionInput";
23
+ import { carryParseFacts as ye, cloneDocumentWithParagraphPropertySources as be } from "@stll/folio-core/docx/document-clone";
24
+ import { getFootnoteText as xe } from "@stll/folio-core/docx/storyPlainText";
25
+ import { convertHeaderFooterPmDocToContent as Se, convertHeaderFooterToContent as Ce } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
26
+ import { resolveSectionHeaderFooterRefs as we } from "@stll/folio-core/layout-engine";
27
+ import { LayoutPainter as Te, releaseDisplayPageResources as Ee } from "@stll/folio-core/layout-painter";
28
+ import { LayoutSelectionGate as De } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
29
+ import { ExtensionManager as Oe } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
30
+ import { createStarterKit as ke } from "@stll/folio-core/prosemirror/extensions/StarterKit";
31
+ import { createTemplateDirectivesPlugin as Ae } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
32
+ import { createTemplatePreviewValuesPlugin as je } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
33
+ import { templateSlashMenuPlugin as Me } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
34
+ import { resolveHeaderFooterContent as Ne } from "@stll/folio-core/utils/headerFooter";
35
+ import { FindReplaceManager as Pe } from "@stll/folio-core/managers/FindReplaceManager";
36
+ import { findInDisplayedDocument as Fe } from "@stll/folio-core/prosemirror/findReplaceSelection";
37
+ import { replaceFindMatch as Ie, replaceFindMatches as Le } from "@stll/folio-core/prosemirror/replaceFindMatches";
38
+ import { createFindMatchView as Re, getRenderedSearchStories as ze } from "@stll/folio-core/utils/findMatchView";
39
+ import { createDefaultFindOptions as Be, replaceEligibility as Ve } from "@stll/folio-core/utils/findReplace";
40
+ import { createFindSearchKey as He, sameFindSearchKey as O } from "@stll/folio-core/utils/findSearchKey";
41
+ import { MIN_CELL_WIDTH_TWIPS as k, MIN_ROW_HEIGHT_TWIPS as Ue, TWIPS_PER_PIXEL as A, clampRowResizeDelta as We, columnResizeCommand as Ge, readColumnWidthAt as Ke, readColumnWidths as qe, readRowHeight as Je, rightEdgeResizeCommand as Ye, rowResizeCommand as Xe } from "@stll/folio-core/prosemirror/tableResize";
42
+ import { trackedChangeEntryRevisionIds as j } from "@stll/folio-core/prosemirror/projectionReview";
43
43
  import { extractTrackedChanges as Ze } from "@stll/folio-core/prosemirror/utils/extractTrackedChanges";
44
- import { ZOOM_MAX as M, ZOOM_MIN as N, ZOOM_STEP as P } from "@stll/folio-core/utils/zoom";
44
+ import { ZOOM_MAX as Qe, ZOOM_MIN as M, ZOOM_STEP as N } from "@stll/folio-core/utils/zoom";
45
45
  // src/utils/colorMode.ts
46
- var F = "(prefers-color-scheme: dark)";
47
- function I() {
46
+ var P = "(prefers-color-scheme: dark)";
47
+ function F() {
48
48
  return typeof window < "u" && typeof window.matchMedia == "function";
49
49
  }
50
- function L(e, t) {
50
+ function I(e, t) {
51
51
  return e === "dark" || e === "system" && t;
52
52
  }
53
- function Qe(e) {
54
- if (!I()) return () => {};
55
- let t = window.matchMedia(F);
53
+ function L(e) {
54
+ if (!F()) return () => {};
55
+ let t = window.matchMedia(P);
56
56
  e(t.matches);
57
57
  let n = (t) => e(t.matches);
58
58
  return t.addEventListener("change", n), () => t.removeEventListener("change", n);
59
59
  }
60
60
  // src/composables/useColorMode.ts
61
- var R = "light", z = Symbol("folioColorMode"), B = (t = R) => {
62
- a(z, e(() => u(t)));
63
- }, V = { install(t, n = R) {
64
- t.provide(z, e(() => u(n)));
61
+ var $e = "light", R = Symbol("folioColorMode"), et = (t = $e) => {
62
+ a(R, e(() => u(t)));
63
+ }, z = { install(t, n = $e) {
64
+ t.provide(R, e(() => u(n)));
65
65
  } };
66
- function $e() {
67
- let n = t(z, e(() => R)), i = s(!1), a = s(!1);
66
+ function B() {
67
+ let n = t(R, e(() => $e)), i = s(!1), a = s(!1);
68
68
  return r(() => {
69
69
  i.value = !0;
70
70
  }), f((e) => {
71
- i.value && n.value === "system" && e(Qe((e) => {
71
+ i.value && n.value === "system" && e(L((e) => {
72
72
  a.value = e;
73
73
  }));
74
- }), e(() => L(n.value, i.value && a.value));
74
+ }), e(() => I(n.value, i.value && a.value));
75
75
  }
76
76
  // src/utils/rawDocument.ts
77
- var et = (e) => H(e, /* @__PURE__ */ new Map()), H = (e, t) => {
77
+ var tt = (e) => V(e, /* @__PURE__ */ new Map()), V = (e, t) => {
78
78
  if (typeof e != "object" || !e) return e;
79
79
  let n = l(e), r = t.get(n);
80
80
  if (r !== void 0) return r;
81
81
  t.set(n, n);
82
- let i = tt(n, t);
82
+ let i = nt(n, t);
83
83
  return t.set(n, i), i;
84
- }, tt = (e, t) => {
84
+ }, nt = (e, t) => {
85
85
  if (ArrayBuffer.isView(e) || e instanceof ArrayBuffer) return e;
86
86
  if (e instanceof Map) {
87
87
  let n = !1, r = [];
88
88
  for (let [i, a] of e) {
89
- let e = H(i, t), o = H(a, t);
89
+ let e = V(i, t), o = V(a, t);
90
90
  (e !== i || o !== a) && (n = !0), r.push([e, o]);
91
91
  }
92
92
  return n ? new Map(r) : e;
@@ -94,14 +94,14 @@ var et = (e) => H(e, /* @__PURE__ */ new Map()), H = (e, t) => {
94
94
  if (e instanceof Set) {
95
95
  let n = !1, r = [];
96
96
  for (let i of e) {
97
- let e = H(i, t);
97
+ let e = V(i, t);
98
98
  e !== i && (n = !0), r.push(e);
99
99
  }
100
100
  return n ? new Set(r) : e;
101
101
  }
102
102
  if (Array.isArray(e)) {
103
103
  let n = !1, r = e.map((e) => {
104
- let r = H(e, t);
104
+ let r = V(e, t);
105
105
  return r !== e && (n = !0), r;
106
106
  });
107
107
  return n ? r : e;
@@ -109,15 +109,15 @@ var et = (e) => H(e, /* @__PURE__ */ new Map()), H = (e, t) => {
109
109
  let n = Object.getOwnPropertyDescriptors(e), r = !1;
110
110
  for (let e of Reflect.ownKeys(n)) {
111
111
  let i = Reflect.get(n, e);
112
- if (!U(i)) continue;
113
- let a = H(i.value, t);
112
+ if (!rt(i)) continue;
113
+ let a = V(i.value, t);
114
114
  a !== i.value && (r = !0, i.value = a);
115
115
  }
116
116
  if (!r) return e;
117
117
  let i = Object.create(Reflect.getPrototypeOf(e), n);
118
- return ve(i, e), i;
119
- }, U = (e) => typeof e == "object" && !!e && "value" in e, nt = 24, rt = "User", it = [], at = [];
120
- function ot(e) {
118
+ return ye(i, e), i;
119
+ }, rt = (e) => typeof e == "object" && !!e && "value" in e, it = 24, at = "User", ot = [], st = [];
120
+ function ct(e) {
121
121
  let t = e?.columnCount ?? 1;
122
122
  if (t <= 1) return;
123
123
  let n = {
@@ -127,24 +127,24 @@ function ot(e) {
127
127
  };
128
128
  return e?.separator !== void 0 && (n.separator = e.separator), n;
129
129
  }
130
- function st(e, t, n, r, i, a) {
130
+ function lt(e, t, n, r, i, a) {
131
131
  if (!e) return;
132
132
  let o = t ? {
133
133
  ...a,
134
134
  rId: t
135
135
  } : a, s = t ? n?.getView(t) : null;
136
- return s ? xe(s.state.doc, r, i, o) : Se(e, r, i, o);
136
+ return s ? Se(s.state.doc, r, i, o) : Ce(e, r, i, o);
137
137
  }
138
- function ct(e, t, n, r, i) {
138
+ function ut(e, t, n, r, i) {
139
139
  if (!e || e.size === 0) return;
140
140
  let a = /* @__PURE__ */ new Map();
141
141
  for (let [o, s] of e) {
142
- let e = st(s, o, t, n, r, i);
142
+ let e = lt(s, o, t, n, r, i);
143
143
  e && a.set(o, e);
144
144
  }
145
145
  return a.size > 0 ? a : void 0;
146
146
  }
147
- function lt(e, t, n) {
147
+ function dt(e, t, n) {
148
148
  let r = /* @__PURE__ */ new Map();
149
149
  if (!n || !n.package.footnotes) return r;
150
150
  let i = /* @__PURE__ */ new Map();
@@ -158,7 +158,7 @@ function lt(e, t, n) {
158
158
  e.push({
159
159
  displayNumber: String(o),
160
160
  noteId: n,
161
- text: be(r),
161
+ text: xe(r),
162
162
  ...a ? { content: {
163
163
  blocks: a.blocks,
164
164
  measures: a.measures,
@@ -170,7 +170,7 @@ function lt(e, t, n) {
170
170
  }
171
171
  return r;
172
172
  }
173
- var W = /* @__PURE__ */ new Set([
173
+ var H = /* @__PURE__ */ new Set([
174
174
  "black",
175
175
  "blue",
176
176
  "cyan",
@@ -189,328 +189,329 @@ var W = /* @__PURE__ */ new Set([
189
189
  "white",
190
190
  "yellow"
191
191
  ]);
192
- function ut(e) {
192
+ function ft(e) {
193
193
  let t = [], n = (e, r) => {
194
- for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !W.has(String(i.attrs.color)) && t.push(`${r}.marks[${n}]=${JSON.stringify(i.attrs)}`);
194
+ for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !H.has(String(i.attrs.color)) && t.push(`${r}.marks[${n}]=${JSON.stringify(i.attrs)}`);
195
195
  e.forEach((e, t, i) => {
196
196
  n(e, `${r}.content[${i}]`);
197
197
  });
198
198
  };
199
199
  return n(e, "doc"), t.join("; ");
200
200
  }
201
- function G(e) {
202
- let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: o = !1, pageGap: l = nt, pageRenderer: f, markupView: ee = "all-markup", showCommentHighlights: g = !0, altChunkMarkerText: _, showMarginGuides: v, marginGuideColor: b, password: x, editorMode: w, author: ve, externalPlugins: be = [], historyShortcuts: xe = "editor", onCanonicalHistory: Se, onCanonicalHistoryDrop: Ne, collaboration: Pe, getAnonymizationTerms: Fe, getDerivedFields: Ie, showTemplateDirectives: Le, onSlashMenuChange: Re, onSlashMenuKeyAction: ze, onChange: Be, onError: k, onSelectionUpdate: Ve, onEditorViewReady: He, onCopy: Ue, onCut: A, onPaste: We, onReadOnlyEditAttempt: Ge, featureFlags: Ke, onSelectiveSaveTripwire: qe } = e, Je = n ?? t, Ye = () => u(ve) ?? rt, j = c(null), Xe = () => {
201
+ function U(e) {
202
+ let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: o = !1, pageGap: l = it, pageRenderer: f, markupView: ee = "all-markup", showCommentHighlights: g = !0, altChunkMarkerText: _, showMarginGuides: v, marginGuideColor: b, password: re, editorMode: C, author: ye, externalPlugins: xe = [], historyShortcuts: Se = "editor", onCanonicalHistory: Ce, onCanonicalHistoryDrop: Pe, onCanonicalPasteWarnings: Fe, collaboration: Ie, getAnonymizationTerms: Le, getDerivedFields: Re, showTemplateDirectives: ze, onSlashMenuChange: Be, onSlashMenuKeyAction: Ve, onChange: He, onError: O, onSelectionUpdate: k, onEditorViewReady: Ue, onCopy: A, onCut: We, onPaste: Ge, onReadOnlyEditAttempt: Ke, featureFlags: qe, onSelectiveSaveTripwire: Je } = e, Ye = n ?? t, Xe = () => u(ye) ?? at, j = c(null), Ze = () => {
203
203
  let e = j.value;
204
204
  return (e && y(e).package.styles) ?? null;
205
- }, Ze = c(null), M = 0, N = !1, P = 0, F = !1, I = c(null), L = c(null), Qe = () => u(Pe), R = c([]), z = c(null), B = c(null), V = c(null), $e = s(0), H = c([]), tt = c([]), U = s(!1), W = s(null), G = s(!1), dt = (e) => ye(e), ft = (e) => {
206
- let t = dt(e);
207
- Be?.(t), q.emit("docChange", t);
208
- }, K = new De(Oe({ historyShortcuts: xe }));
209
- K.buildSchema(), K.initializeRuntime();
210
- let pt = ke(), mt = je({
211
- onChange: (e) => Re?.(e),
212
- onKeyAction: (e) => ze?.(e) ?? !1
213
- }), ht = Ae(), gt = () => u(Le) === !0;
214
- function _t() {
205
+ }, Qe = c(null), M = 0, N = !1, P = 0, F = !1, I = c(null), L = c(null), $e = () => u(Ie), R = c([]), et = c(null), z = c(null), B = c(null), V = s(0), nt = c([]), rt = c([]), H = s(!1), U = s(null), W = s(!1), pt = (e) => be(e), mt = (e) => {
206
+ let t = pt(e);
207
+ He?.(t), K.emit("docChange", t);
208
+ }, G = new Oe(ke({ historyShortcuts: Se }));
209
+ G.buildSchema(), G.initializeRuntime();
210
+ let ht = Ae(), gt = Me({
211
+ onChange: (e) => Be?.(e),
212
+ onKeyAction: (e) => Ve?.(e) ?? !1
213
+ }), _t = je(), vt = () => u(ze) === !0;
214
+ function yt() {
215
215
  return [
216
- ...be,
217
- ...gt() ? [pt, mt] : [],
218
- ht
216
+ ...xe,
217
+ ...vt() ? [ht, gt] : [],
218
+ _t
219
219
  ];
220
220
  }
221
- let q = ae(), J = new Ee(), Y = pe(), vt = le({
221
+ let K = oe(), q = new De(), J = me(), bt = ue({
222
222
  relayout: () => {
223
- let e = I.value?.state ?? Y.lastEditorState;
223
+ let e = I.value?.state ?? J.lastEditorState;
224
224
  e && Z(e, { reason: "hyphenation-ready" });
225
225
  },
226
- onError: (e) => k?.(e)
226
+ onError: (e) => O?.(e)
227
227
  });
228
- i(vt.cancel), i(se({
229
- measuredFontSet: () => Y.lastMeasureInputs?.fontSet ?? null,
228
+ i(bt.cancel), i(ce({
229
+ measuredFontSet: () => J.lastMeasureInputs?.fontSet ?? null,
230
230
  relayout: () => {
231
231
  if (F) return;
232
- let e = I.value?.state ?? Y.lastEditorState;
232
+ let e = I.value?.state ?? J.lastEditorState;
233
233
  e && Z(e, { reason: "font-ready" });
234
234
  }
235
235
  }));
236
- let yt = new we({
236
+ let xt = new Te({
237
237
  pageGap: l,
238
238
  showShadow: !0
239
- }), bt = ce({
240
- getHost: () => Je.value,
239
+ }), St = le({
240
+ getHost: () => Ye.value,
241
241
  getReadOnly: () => u(o),
242
242
  getCanonicalApi: () => $.api,
243
243
  readCanonicalDocument: () => $.readCanonicalDocument(),
244
244
  onSessionRefusal: (e, t, n) => {
245
- W.value = e, k?.(n ?? new p({
245
+ U.value = e, O?.(n ?? new p({
246
246
  ground: t,
247
247
  message: e
248
248
  }));
249
249
  },
250
- getStyles: Xe,
250
+ getStyles: Ze,
251
251
  onTransaction: ({ rId: e, kind: t, view: n, docChanged: r, selectionChanged: i }) => {
252
- if (r && (G.value = !0, wt.schedule()), r || i) {
252
+ if (r && (W.value = !0, Tt.schedule()), r || i) {
253
253
  let { from: r, to: i } = n.state.selection;
254
- z.value = {
254
+ et.value = {
255
255
  from: r,
256
256
  kind: t,
257
257
  rId: e,
258
258
  to: i
259
- }, Ve?.(n.state), q.emit("selectionChange", {
259
+ }, k?.(n.state), K.emit("selectionChange", {
260
260
  from: r,
261
261
  to: i
262
262
  });
263
263
  }
264
- J.requestRender();
264
+ q.requestRender();
265
265
  }
266
- }), X = me({
266
+ }), Y = he({
267
267
  getHost: () => r?.value ?? null,
268
268
  getCanonicalApi: () => $.api,
269
269
  readCanonicalDocument: () => $.readCanonicalDocument(),
270
270
  onSessionRefusal: (e, t, n) => {
271
- W.value = e, k?.(n ?? new p({
271
+ U.value = e, O?.(n ?? new p({
272
272
  ground: t,
273
273
  message: e
274
274
  }));
275
275
  },
276
- getStyles: Xe,
276
+ getStyles: Ze,
277
277
  onTransaction: ({ docChanged: e, selectionChanged: t, view: n }) => {
278
278
  if (e) {
279
- G.value = !0;
279
+ W.value = !0;
280
280
  let e = j.value;
281
- e && (j.value = $.readCanonicalDocument() ?? e, Ot()), wt.schedule();
281
+ e && (j.value = $.readCanonicalDocument() ?? e, kt()), Tt.schedule();
282
282
  }
283
283
  if (e || t) {
284
- Ve?.(n.state);
284
+ k?.(n.state);
285
285
  let { from: e, to: t } = n.state.selection;
286
- q.emit("selectionChange", {
286
+ K.emit("selectionChange", {
287
287
  from: e,
288
288
  to: t
289
289
  });
290
290
  }
291
291
  }
292
- }), xt = () => {
293
- bt.sync(), X.sync();
292
+ }), X = () => {
293
+ St.sync(), Y.sync();
294
294
  };
295
- function St(e) {
296
- e.layout && (V.value = e.layout), e.blocks && (H.value = e.blocks), e.measures && (tt.value = e.measures), e.blockLookup && yt.setBlockLookup(e.blockLookup), e.layout && q.emit("layoutComplete", e.layout);
295
+ function Ct(e) {
296
+ e.layout && (B.value = e.layout), e.blocks && (nt.value = e.blocks), e.measures && (rt.value = e.measures), e.blockLookup && xt.setBlockLookup(e.blockLookup), e.layout && K.emit("layoutComplete", e.layout);
297
297
  }
298
- let Ct = ie({
298
+ let wt = ae({
299
299
  onReady: () => {
300
- if (N || u(f) !== O.displayList) return;
300
+ if (N || u(f) !== D.displayList) return;
301
301
  let e = I.value;
302
302
  e && Z(e.state, { reason: "layout-input" });
303
303
  },
304
304
  onError: (e) => {
305
- !N && u(f) === O.displayList && k?.(e);
305
+ !N && u(f) === D.displayList && O?.(e);
306
306
  }
307
307
  });
308
308
  function Z(e, t = {}) {
309
309
  if (F) return;
310
- let n = u(f), r = n === O.displayList ? Ct() : void 0;
311
- if (n === O.displayList && !r) return;
312
- let i = a.value, o = i instanceof HTMLDivElement ? i : null, s = j.value, c = s && y(s), d = c?.package.document, p = d?.sections?.[0]?.properties ?? d?.finalSectionProperties ?? null, m = ne(p), h = te(p), x = ot(p), re = m.w - h.left - h.right;
313
- $e.value = re;
314
- let ie = c?.package.styles ?? null, S = s?.package.theme ?? null, C = s?.package.settings?.defaultTabStop, w = s?.package.settings?.mirrorMargins === !0, T = Me(c?.package);
310
+ let n = u(f), r = n === D.displayList ? wt() : void 0;
311
+ if (n === D.displayList && !r) return;
312
+ let i = a.value, o = i instanceof HTMLDivElement ? i : null, s = j.value, c = s && y(s), d = c?.package.document, p = d?.sections?.[0]?.properties ?? d?.finalSectionProperties ?? null, m = ne(p), h = te(p), re = ct(p), ie = m.w - h.left - h.right;
313
+ V.value = ie;
314
+ let ae = c?.package.styles ?? null, x = s?.package.theme ?? null, S = s?.package.settings?.defaultTabStop, C = s?.package.settings?.mirrorMargins === !0, w = Ne(c?.package);
315
315
  try {
316
- St(ue({
317
- contentWidth: re,
318
- columns: x,
316
+ Ct(de({
317
+ contentWidth: ie,
318
+ columns: re,
319
319
  pageSize: m,
320
320
  margins: h,
321
321
  pageGap: l,
322
322
  showMarginGuides: u(v) === !0,
323
323
  marginGuideColor: u(b),
324
324
  ...r ? { displayListPagePainter: r } : {},
325
- syncCoordinator: J,
326
- headerContent: T.headerContent,
327
- footerContent: T.footerContent,
328
- firstPageHeaderContent: T.firstPageHeaderContent,
329
- firstPageFooterContent: T.firstPageFooterContent,
330
- headerContentRId: T.activeHeaderRId,
331
- footerContentRId: T.activeFooterRId,
332
- firstPageHeaderContentRId: T.activeFirstHeaderRId,
333
- firstPageFooterContentRId: T.activeFirstFooterRId,
334
- sectionHeaderFooterRefs: Ce(c),
335
- theme: S,
325
+ syncCoordinator: q,
326
+ headerContent: w.headerContent,
327
+ footerContent: w.footerContent,
328
+ firstPageHeaderContent: w.firstPageHeaderContent,
329
+ firstPageFooterContent: w.firstPageFooterContent,
330
+ headerContentRId: w.activeHeaderRId,
331
+ footerContentRId: w.activeFooterRId,
332
+ firstPageHeaderContentRId: w.activeFirstHeaderRId,
333
+ firstPageFooterContentRId: w.activeFirstFooterRId,
334
+ sectionHeaderFooterRefs: we(c),
335
+ theme: x,
336
336
  sectionProperties: p,
337
337
  document: s,
338
- defaultTabStop: C,
339
- mirrorMargins: w,
340
- styles: ie,
341
- layout: V.value,
342
- hfPMs: bt,
343
- painter: yt,
338
+ defaultTabStop: S,
339
+ mirrorMargins: C,
340
+ styles: ae,
341
+ layout: B.value,
342
+ hfPMs: St,
343
+ painter: xt,
344
344
  pagesContainer: o,
345
- session: Y,
346
- renderHfFromContentOrPm: st,
347
- renderHeaderFooterContentByRId: ct,
348
- readFontSetSignature: oe,
349
- buildFootnoteRenderItems: lt,
350
- describeInvalidHighlightMarks: ut,
351
- emptyTemplatePreviewEntries: it,
352
- emptyTemplatePreviewHidden: at,
353
- hyphenationReadiness: vt,
345
+ session: J,
346
+ renderHfFromContentOrPm: lt,
347
+ renderHeaderFooterContentByRId: ut,
348
+ readFontSetSignature: se,
349
+ buildFootnoteRenderItems: dt,
350
+ describeInvalidHighlightMarks: ft,
351
+ emptyTemplatePreviewEntries: ot,
352
+ emptyTemplatePreviewHidden: st,
353
+ hyphenationReadiness: bt,
354
354
  markupView: u(ee),
355
355
  showCommentHighlights: u(g),
356
356
  ..._ === void 0 ? {} : { altChunkMarkerText: u(_) }
357
357
  }, e, t));
358
358
  } catch (e) {
359
359
  let t = e instanceof Error ? e : Error(String(e));
360
- k?.(t);
360
+ O?.(t);
361
361
  }
362
362
  }
363
- let wt = fe({
363
+ let Tt = pe({
364
364
  readState: () => I.value?.state ?? null,
365
365
  runLayout: (e, t) => Z(e, t),
366
- ...D,
367
- clock: de
366
+ ...E,
367
+ clock: fe
368
368
  }), Q = null;
369
- function Tt() {
369
+ function Et() {
370
370
  if (Q !== null && (window.clearTimeout(Q), Q = null), I.value && j.value) try {
371
371
  let e = $.readCanonicalDocument();
372
372
  if (!e) return;
373
- j.value = e, xt(), Dt(), ft(e);
373
+ j.value = e, X(), Ot(), mt(e);
374
374
  } catch (e) {
375
- k?.(e instanceof Error ? e : Error(String(e)));
375
+ O?.(e instanceof Error ? e : Error(String(e)));
376
376
  }
377
377
  }
378
- let Et = null;
379
- function Dt() {
380
- Et !== null && (window.clearTimeout(Et), Et = null);
381
- }
378
+ let Dt = null;
382
379
  function Ot() {
383
- Dt(), Et = window.setTimeout(() => {
384
- if (Et = null, Q !== null) return;
385
- let e = j.value;
386
- e && ft(e);
387
- }, S);
380
+ Dt !== null && (window.clearTimeout(Dt), Dt = null);
388
381
  }
389
382
  function kt() {
383
+ Ot(), Dt = window.setTimeout(() => {
384
+ if (Dt = null, Q !== null) return;
385
+ let e = j.value;
386
+ e && mt(e);
387
+ }, x);
388
+ }
389
+ function At() {
390
390
  Q !== null && window.clearTimeout(Q), Q = window.setTimeout(() => {
391
- Q = null, Tt();
392
- }, S);
391
+ Q = null, Et();
392
+ }, x);
393
393
  }
394
394
  let $ = m({
395
395
  getHost: () => t.value,
396
396
  getDocument: () => j.value,
397
- getStyles: Xe,
398
- getExtensionManager: () => K,
399
- getExternalPlugins: _t,
400
- getAnonymizationTerms: () => Fe?.() ?? re,
401
- getDerivedFields: () => Ie?.(),
402
- getCanonicalRoom: Qe,
397
+ getStyles: Ze,
398
+ getExtensionManager: () => G,
399
+ getExternalPlugins: yt,
400
+ getAnonymizationTerms: () => Le?.() ?? ie,
401
+ getDerivedFields: () => Re?.(),
402
+ getCanonicalRoom: $e,
403
403
  getReadOnly: () => u(o),
404
- getHistoryShortcuts: () => xe,
405
- onCanonicalHistory: (e) => Se?.(e),
406
- onCanonicalHistoryDrop: (e) => Ne?.(e),
407
- getEditingMode: () => u(w) ?? "editing",
408
- getSuggestionAuthor: Ye,
404
+ getHistoryShortcuts: () => Se,
405
+ onCanonicalHistory: (e) => Ce?.(e),
406
+ onCanonicalHistoryDrop: (e) => Pe?.(e),
407
+ onCanonicalPasteWarnings: (e) => Fe?.(e),
408
+ getEditingMode: () => u(C) ?? "editing",
409
+ getSuggestionAuthor: Xe,
409
410
  onSessionRefusal: (e, t, n) => {
410
- k?.(n ?? new p({
411
+ O?.(n ?? new p({
411
412
  ground: t,
412
413
  message: e
413
414
  }));
414
415
  },
415
416
  getDocumentIdentity: () => String(M),
416
417
  getDocumentContext: () => j.value,
417
- onTransaction: jt,
418
- onCanonicalCompositionLayout: Mt,
419
- getEmbeddedFontFamilyMap: () => Y.embeddedFontFamilyMap,
418
+ onTransaction: Mt,
419
+ onCanonicalCompositionLayout: Nt,
420
+ getEmbeddedFontFamilyMap: () => J.embeddedFontFamilyMap,
420
421
  onSelectionChange: (e) => {
421
- L.value = e, Ve?.(e), q.emit("selectionChange", {
422
+ L.value = e, k?.(e), K.emit("selectionChange", {
422
423
  from: e.selection.from,
423
424
  to: e.selection.to
424
425
  });
425
426
  },
426
427
  onKeyDown: () => !1,
427
- onCopy: () => Ue?.(),
428
- onCut: () => A?.(),
429
- onPaste: () => We?.(),
430
- onReadOnlyEditAttempt: () => Ge?.(),
431
- onEditorViewReady: Nt,
428
+ onCopy: () => A?.(),
429
+ onCut: () => We?.(),
430
+ onPaste: () => Ge?.(),
431
+ onReadOnlyEditAttempt: () => Ke?.(),
432
+ onEditorViewReady: Pt,
432
433
  onEditorViewDestroy: () => {
433
- I.value = null, U.value = !1, He?.(null);
434
+ I.value = null, H.value = !1, Ue?.(null);
434
435
  },
435
436
  onRemoteSelectionsChange: (e) => {
436
437
  R.value = e;
437
438
  }
438
- }), At = $.api.autocomplete.subscribe((t) => e.onAutocompleteChange?.(t));
439
- d(() => u(Pe), () => {
439
+ }), jt = $.api.autocomplete.subscribe((t) => e.onAutocompleteChange?.(t));
440
+ d(() => u(Ie), () => {
440
441
  R.value = [], $.retryViewCreation(), $.syncExternalDocument();
441
442
  }, { immediate: !0 });
442
- function jt({ newState: e, docChanged: t }) {
443
+ function Mt({ newState: e, docChanged: t }) {
443
444
  if (L.value = e, t) {
444
445
  let e = $.readCanonicalDocument();
445
- e && (j.value = e, xt()), G.value = !0, J.incrementStateSeq(), wt.schedule(), kt();
446
+ e && (j.value = e, X()), W.value = !0, q.incrementStateSeq(), Tt.schedule(), At();
446
447
  }
447
- J.requestRender();
448
+ q.requestRender();
448
449
  }
449
- function Mt() {
450
+ function Nt() {
450
451
  let e = I.value;
451
- e && (L.value = e.state), J.incrementStateSeq(), wt.schedule(), J.requestRender();
452
+ e && (L.value = e.state), q.incrementStateSeq(), Tt.schedule(), q.requestRender();
452
453
  }
453
- function Nt(e) {
454
- I.value = e, L.value = e.state, U.value = !0;
454
+ function Pt(e) {
455
+ I.value = e, L.value = e.state, H.value = !0;
455
456
  let t = j.value, n = M, r = ++P;
456
457
  F = !0;
457
458
  let i = () => {
458
- P === r && (F = !1, N || M !== n || $.getView() !== e || (Z(e.state, { reason: "initial" }), J.requestRender()));
459
+ P === r && (F = !1, N || M !== n || $.getView() !== e || (Z(e.state, { reason: "initial" }), q.requestRender()));
459
460
  };
460
- E(t, e.state.doc).then(i, i), He?.(e), u(o) || requestAnimationFrame(() => {
461
+ T(t, e.state.doc).then(i, i), Ue?.(e), u(o) || requestAnimationFrame(() => {
461
462
  I.value === e && !e.hasFocus() && e.focus();
462
463
  });
463
464
  }
464
- let Pt = {
465
+ let Ft = {
465
466
  getDocx: async (e) => {
466
- let t = await Gt(e);
467
- return t?.tripwireResult && qe?.(t.tripwireResult), t?.buffer ?? null;
467
+ let t = await Kt(e);
468
+ return t?.tripwireResult && Je?.(t.tripwireResult), t?.buffer ?? null;
468
469
  },
469
- loadDocument: Ht,
470
- loadDocx: Vt
471
- }, Ft = T({
470
+ loadDocument: Ut,
471
+ loadDocx: Ht
472
+ }, It = w({
472
473
  getEditorApi: () => $.api,
473
- getLayout: () => V.value,
474
+ getLayout: () => B.value,
474
475
  runLayout: (e, t) => Z(e, t),
475
- getDocumentIO: () => Pt,
476
- emitter: q
476
+ getDocumentIO: () => Ft,
477
+ emitter: K
477
478
  });
478
- d([() => u(w), Ye], () => {
479
- Ft.setCanonicalMode(u(w) === "suggesting" ? {
479
+ d([() => u(C), Xe], () => {
480
+ It.setCanonicalMode(u(C) === "suggesting" ? {
480
481
  type: "suggesting",
481
- author: Ye()
482
+ author: Xe()
482
483
  } : { type: "editing" });
483
484
  }), d(() => u(o), (e) => {
484
- $.syncEditable(), e && en(), bt.sync();
485
+ $.syncEditable(), e && tn(), St.sync();
485
486
  });
486
- function It(e) {
487
- let t = gt();
488
- if (t === e.state.plugins.includes(pt)) return;
489
- let n = e.state.plugins.filter((e) => e !== pt && e !== mt);
487
+ function Lt(e) {
488
+ let t = vt();
489
+ if (t === e.state.plugins.includes(ht)) return;
490
+ let n = e.state.plugins.filter((e) => e !== ht && e !== gt);
490
491
  if (t) {
491
- let e = n.indexOf(ht), t = e === -1 ? n.length : e;
492
- n.splice(t, 0, pt, mt);
492
+ let e = n.indexOf(_t), t = e === -1 ? n.length : e;
493
+ n.splice(t, 0, ht, gt);
493
494
  }
494
495
  e.updateState(e.state.reconfigure({ plugins: n }));
495
496
  }
496
- d(() => gt(), () => {
497
+ d(() => vt(), () => {
497
498
  let e = I.value;
498
- e && It(e);
499
+ e && Lt(e);
499
500
  });
500
- function Lt() {
501
- $.ensureView();
502
- }
503
501
  function Rt() {
504
- Dt(), M += 1, Ze.value = j.value?.originalBuffer ?? null, G.value = !1, z.value = null, B.value = null, X.activate(null), wt.dispose(), $.destroyView(), $.ensureView(), xt(), $.ensureView(), $.getView() || zt();
502
+ $.ensureView();
505
503
  }
506
504
  function zt() {
505
+ Ot(), M += 1, Qe.value = j.value?.originalBuffer ?? null, W.value = !1, et.value = null, z.value = null, Y.activate(null), Tt.dispose(), $.destroyView(), $.ensureView(), X(), $.ensureView(), $.getView() || Bt();
506
+ }
507
+ function Bt() {
507
508
  let e = j.value;
508
509
  if (e) try {
509
510
  let t = h({
510
511
  document: e,
511
512
  styles: y(e).package.styles ?? null,
512
- manager: K,
513
- externalPlugins: _t(),
513
+ manager: G,
514
+ externalPlugins: yt(),
514
515
  reason: "mount"
515
516
  });
516
517
  L.value = t;
@@ -519,114 +520,114 @@ function G(e) {
519
520
  let i = () => {
520
521
  P === r && (F = !1, N || M !== n || j.value !== e || $.getView() || Z(t, { reason: "initial" }));
521
522
  };
522
- E(e, t.doc).then(i, i);
523
+ T(e, t.doc).then(i, i);
523
524
  } catch (e) {
524
- k?.(e instanceof Error ? e : Error(String(e)));
525
+ O?.(e instanceof Error ? e : Error(String(e)));
525
526
  }
526
527
  }
527
528
  d([
528
529
  t,
529
530
  a,
530
- Je,
531
+ Ye,
531
532
  ...r ? [r] : []
532
533
  ], () => {
533
- t.value && j.value && !$.getView() && Lt(), xt();
534
+ t.value && j.value && !$.getView() && Rt(), X();
534
535
  }, { flush: "post" });
535
- let Bt = 0;
536
- async function Vt(e) {
537
- Bt += 1, W.value = null, U.value = !1;
536
+ let Vt = 0;
537
+ async function Ht(e) {
538
+ Vt += 1, U.value = null, H.value = !1;
538
539
  try {
539
- let t = await ge(e, { password: u(x) });
540
+ let t = await _e(e, { password: u(re) });
540
541
  if (t.isErr()) throw t.error;
541
542
  let n = t.value.document;
542
- j.value = n, Rt();
543
+ j.value = n, zt();
543
544
  } catch (e) {
544
545
  let t = e instanceof Error ? e : Error(String(e));
545
- W.value = t.message, k?.(t);
546
+ U.value = t.message, O?.(t);
546
547
  }
547
548
  }
548
- function Ht(e) {
549
- let t = Bt += 1;
550
- W.value = null;
551
- let n = et(e);
552
- he(n) ? Wt(n) : Ut(n, t);
549
+ function Ut(e) {
550
+ let t = Vt += 1;
551
+ U.value = null;
552
+ let n = tt(e);
553
+ ge(n) ? Gt(n) : Wt(n, t);
553
554
  }
554
- async function Ut(e, t) {
555
- let n = await _e(e);
556
- t === Bt && (n.isErr() ? (W.value = n.error.message, k?.(n.error)) : Wt(n.value));
555
+ async function Wt(e, t) {
556
+ let n = await ve(e);
557
+ t === Vt && (n.isErr() ? (U.value = n.error.message, O?.(n.error)) : Gt(n.value));
557
558
  }
558
- function Wt(e) {
559
- j.value = e, Rt();
559
+ function Gt(e) {
560
+ j.value = e, zt();
560
561
  }
561
- async function Gt(e) {
562
+ async function Kt(e) {
562
563
  let t = I.value, n = j.value;
563
564
  if (!t || !n) return null;
564
565
  try {
565
566
  let t = $.api.captureCanonicalSave();
566
567
  if (t) {
567
- let n = u(Ke), { canonicalSaveDiagnosticError: r, serializeCanonicalSave: i } = await import("@stll/folio-core/docx/canonicalSave"), a = await i({
568
+ let n = u(qe), { canonicalSaveDiagnosticError: r, serializeCanonicalSave: i } = await import("@stll/folio-core/docx/canonicalSave"), a = await i({
568
569
  snapshot: t,
569
570
  options: e,
570
571
  featureFlags: n
571
572
  });
572
- for (let t of a.diagnostics) e?.onDiagnostic || k?.(r(t));
573
+ for (let t of a.diagnostics) e?.onDiagnostic || O?.(r(t));
573
574
  return a;
574
575
  }
575
576
  return null;
576
577
  } catch (e) {
577
- return k?.(e instanceof Error ? e : Error(String(e))), null;
578
+ return O?.(e instanceof Error ? e : Error(String(e))), null;
578
579
  }
579
580
  }
580
- async function Kt(e) {
581
- let t = I.value, n = t?.state, r = await Gt({
581
+ async function qt(e) {
582
+ let t = I.value, n = t?.state, r = await Kt({
582
583
  onDiagnostic: e?.onDiagnostic,
583
584
  onSelectiveDecline: e?.onSelectiveDecline,
584
585
  onSerializationPath: e?.onSerializationPath,
585
- mode: e?.selective === !1 ? C.full : C.preferSelective
586
+ mode: e?.selective === !1 ? S.full : S.preferSelective
586
587
  });
587
588
  return r ? (I.value === t && t?.state.doc === n?.doc && (r.version === void 0 || $.api.isCanonicalSaveCurrent(r.version)) && (r.version !== void 0 && $.api.markCanonicalSaved(r.version, {
588
589
  buffer: r.buffer,
589
590
  path: r.path
590
- }), j.value = r.document, xt(), G.value = !1), r.tripwireResult && qe?.(r.tripwireResult), new Blob([r.buffer], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" })) : null;
591
- }
592
- function qt() {
593
- return $.readCanonicalDocument();
591
+ }), j.value = r.document, X(), W.value = !1), r.tripwireResult && Je?.(r.tripwireResult), new Blob([r.buffer], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" })) : null;
594
592
  }
595
593
  function Jt() {
596
- return qt();
594
+ return $.readCanonicalDocument();
597
595
  }
598
596
  function Yt() {
599
- let e = Jt();
600
- return e && dt(e);
597
+ return Jt();
601
598
  }
602
- function Xt(e) {
603
- Ht(e);
599
+ function Xt() {
600
+ let e = Yt();
601
+ return e && pt(e);
604
602
  }
605
603
  function Zt(e) {
606
- return bt.getView(e);
604
+ Ut(e);
607
605
  }
608
- function Qt() {
609
- xt();
606
+ function Qt(e) {
607
+ return St.getView(e);
610
608
  }
611
- function $t(e) {
612
- let t = X.activate(e);
613
- t && (B.value = e, requestAnimationFrame(() => t.focus()));
609
+ function $t() {
610
+ X();
614
611
  }
615
- function en() {
616
- X.activate(null), B.value = null;
612
+ function en(e) {
613
+ let t = Y.activate(e);
614
+ t && (z.value = e, requestAnimationFrame(() => t.focus()));
617
615
  }
618
616
  function tn() {
619
- let e = B.value;
620
- return e ? X.getView(e) : null;
617
+ Y.activate(null), z.value = null;
621
618
  }
622
619
  function nn() {
623
- return K.getCommands();
620
+ let e = z.value;
621
+ return e ? Y.getView(e) : null;
624
622
  }
625
623
  function rn() {
626
- let e = tn();
627
- e ? e.focus() : I.value?.focus();
624
+ return G.getCommands();
628
625
  }
629
626
  function an() {
627
+ let e = nn();
628
+ e ? e.focus() : I.value?.focus();
629
+ }
630
+ function on() {
630
631
  let e = I.value;
631
632
  e && Z(e.state, { reason: "manual" });
632
633
  }
@@ -637,60 +638,60 @@ function G(e) {
637
638
  () => u(ee),
638
639
  () => u(g),
639
640
  () => u(_)
640
- ], () => an());
641
- function on() {
642
- N = !0, a.value && Te(a.value), P += 1, F = !1, wt.dispose(), Q !== null && (window.clearTimeout(Q), Q = null), Dt(), $.destroyView(), R.value = [], bt.destroy(), X.destroy(), K.destroy(), L.value = null, V.value = null, j.value = null, Ze.value = null, U.value = !1;
641
+ ], () => on());
642
+ function sn() {
643
+ N = !0, a.value && Ee(a.value), P += 1, F = !1, Tt.dispose(), Q !== null && (window.clearTimeout(Q), Q = null), Ot(), $.destroyView(), R.value = [], St.destroy(), Y.destroy(), G.destroy(), L.value = null, B.value = null, j.value = null, Qe.value = null, H.value = !1;
643
644
  }
644
645
  return i(() => {
645
- on(), At();
646
+ sn(), jt();
646
647
  }), {
647
648
  setEmbeddedFontFamilies: (e) => {
648
- e ? Y.embeddedFontFamilyMap = new Map(e) : delete Y.embeddedFontFamilyMap, $.refreshFonts();
649
+ e ? J.embeddedFontFamilyMap = new Map(e) : delete J.embeddedFontFamilyMap, $.refreshFonts();
649
650
  },
650
- editor: Ft,
651
+ editor: It,
651
652
  editorView: I,
652
653
  editorState: L,
653
654
  remoteSelections: R,
654
- headerFooterSelection: z,
655
- activeNoteStory: B,
656
- isReady: U,
657
- isDirty: G,
658
- parseError: W,
655
+ headerFooterSelection: et,
656
+ activeNoteStory: z,
657
+ isReady: H,
658
+ isDirty: W,
659
+ parseError: U,
659
660
  modelDocument: j,
660
- readDocumentModel: qt,
661
- sourceBuffer: Ze,
662
- hiddenEditorWidth: $e,
663
- layout: V,
664
- blocks: H,
665
- measures: tt,
666
- syncCoordinator: J,
667
- loadBuffer: Vt,
668
- loadDocument: Ht,
669
- save: Kt,
670
- getDocument: Yt,
671
- readDocument: Jt,
672
- setDocument: Xt,
673
- getHeaderFooterView: Zt,
674
- syncHeaderFooterViews: Qt,
675
- openNoteStory: $t,
676
- closeNoteStory: en,
677
- getActiveNoteView: tn,
678
- getCommands: nn,
679
- focus: rn,
680
- reLayout: an,
681
- destroy: on
661
+ readDocumentModel: Jt,
662
+ sourceBuffer: Qe,
663
+ hiddenEditorWidth: V,
664
+ layout: B,
665
+ blocks: nt,
666
+ measures: rt,
667
+ syncCoordinator: q,
668
+ loadBuffer: Ht,
669
+ loadDocument: Ut,
670
+ save: qt,
671
+ getDocument: Xt,
672
+ readDocument: Yt,
673
+ setDocument: Zt,
674
+ getHeaderFooterView: Qt,
675
+ syncHeaderFooterViews: $t,
676
+ openNoteStory: en,
677
+ closeNoteStory: tn,
678
+ getActiveNoteView: nn,
679
+ getCommands: rn,
680
+ focus: an,
681
+ reLayout: on,
682
+ destroy: sn
682
683
  };
683
684
  }
684
685
  // src/composables/useFindReplace.ts
685
- function dt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot: l, revealComment: u, displayMode: f, readOnly: p, onReadonlyEditAttempt: m, onResultChange: h }) {
686
- let g = new Ne(), _ = s(""), te = s(""), ne = o(ze()), v = c([]), y = s(-1), b = e(() => v.value.at(y.value) ?? null), x = () => ee({
686
+ function W({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot: l, revealComment: u, displayMode: f, readOnly: p, onReadonlyEditAttempt: m, onResultChange: h }) {
687
+ let g = new Pe(), _ = s(""), te = s(""), ne = o(Be()), v = c([]), y = s(-1), b = e(() => v.value.at(y.value) ?? null), re = () => ee({
687
688
  editingMode: t.value?.editable === !1 ? "viewing" : "editing",
688
689
  readOnlyProp: p.value,
689
690
  displayMode: f.value
690
- }), re = e(x), ie = e(() => {
691
+ }), ie = e(re), ae = e(() => {
691
692
  let e = b.value;
692
- return x() === null && !!t.value && !!e && ae() && Be(e).status === "allowed";
693
- }), S = null, C, w = null, T = (e) => {
693
+ return re() === null && !!t.value && !!e && oe() && Ve(e).status === "allowed";
694
+ }), x = null, S, C = null, w = (e) => {
694
695
  let n = t.value?.state.doc;
695
696
  return {
696
697
  query: _.value,
@@ -701,54 +702,54 @@ function dt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot
701
702
  },
702
703
  document: e,
703
704
  ...n ? { bodyVersion: n } : {},
704
- context: { renderedStories: Re(a.value) }
705
+ context: { renderedStories: ze(a.value) }
705
706
  };
706
- }, ae = () => {
707
+ }, oe = () => {
707
708
  let e = r();
708
- return !!e && Ve(w, k(T(e)));
709
- }, oe = () => g.getResult(), E = () => h(oe()), se = () => {
710
- clearTimeout(C), C = void 0;
711
- }, ce = () => {
712
- se(), g.clear(), S?.destroy(), S = null, v.value = [], w = null, y.value = -1;
709
+ return !!e && O(C, He(w(e)));
710
+ }, se = () => g.getResult(), T = () => h(se()), ce = () => {
711
+ clearTimeout(S), S = void 0;
713
712
  }, le = () => {
714
- ce(), _.value = "", E();
715
- }, ue = (e) => (y.value = e, S?.navigate(e, u), E(), !0), D = (e = "query") => {
716
- se();
713
+ ce(), g.clear(), x?.destroy(), x = null, v.value = [], C = null, y.value = -1;
714
+ }, ue = () => {
715
+ le(), _.value = "", T();
716
+ }, de = (e) => (y.value = e, x?.navigate(e, u), T(), !0), E = (e = "query") => {
717
+ ce();
717
718
  let i = r(), o = n.value, s = t.value?.state.doc;
718
- if (!i || !_.value.trim()) return le(), [];
719
- let c = T(i), u = Pe({
719
+ if (!i || !_.value.trim()) return ue(), [];
720
+ let c = w(i), u = Fe({
720
721
  document: c.document,
721
722
  state: t.value?.state ?? null,
722
723
  searchText: c.query,
723
724
  options: c.options,
724
725
  context: c.context
725
726
  });
726
- if (u === null) return ce(), E(), [];
727
- let d = k(c), f = e === "refresh" && w?.query === d.query, p = g.setMatches(u, f ? g.getResult()?.currentIndex ?? 0 : 0);
728
- return w = d, v.value = u, y.value = u.length > 0 ? p.currentIndex : -1, S?.destroy(), S = o ? Le({
727
+ if (u === null) return le(), T(), [];
728
+ let d = He(c), f = e === "refresh" && C?.query === d.query, p = g.setMatches(u, f ? g.getResult()?.currentIndex ?? 0 : 0);
729
+ return C = d, v.value = u, y.value = u.length > 0 ? p.currentIndex : -1, x?.destroy(), x = o ? Re({
729
730
  container: o,
730
731
  document: i,
731
732
  bodyDoc: s,
732
733
  matches: u,
733
734
  commentRoot: l?.value ?? void 0,
734
735
  layout: a.value
735
- }) : null, S?.paint(y.value), u.at(0) && !f ? ue(0) : E(), u;
736
- }, de = () => {
737
- se(), C = setTimeout(() => D("refresh"), 120);
738
- }, fe = (e, t) => (_.value = e, Object.assign(ne, ze(), t), D(), oe()), pe = (e) => {
736
+ }) : null, x?.paint(y.value), u.at(0) && !f ? de(0) : T(), u;
737
+ }, fe = () => {
738
+ ce(), S = setTimeout(() => E("refresh"), 120);
739
+ }, pe = (e, t) => (_.value = e, Object.assign(ne, Be(), t), E(), se()), me = (e) => {
739
740
  let t = g.goTo(e);
740
- return t ? ue(t.index) : !1;
741
- }, me = (e) => {
741
+ return t ? de(t.index) : !1;
742
+ }, he = (e) => {
742
743
  let t = g.navigate(e);
743
- return t ? (ue(t.index), t.match) : null;
744
- }, O = () => !ae() && (D("refresh"), !0), he = () => {
745
- let e = x();
744
+ return t ? (de(t.index), t.match) : null;
745
+ }, D = () => !oe() && (E("refresh"), !0), ge = () => {
746
+ let e = re();
746
747
  return e !== null && (m?.(e), !0);
747
748
  };
748
749
  return d(f, () => {
749
- _.value.trim() && D();
750
+ _.value.trim() && E();
750
751
  }), i(() => {
751
- se(), S?.destroy();
752
+ ce(), x?.destroy();
752
753
  }), {
753
754
  searchText: _,
754
755
  replaceText: te,
@@ -756,36 +757,36 @@ function dt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot
756
757
  matches: v,
757
758
  currentIndex: y,
758
759
  currentMatch: b,
759
- canReplaceCurrent: ie,
760
- replacementRefusal: re,
761
- performSearch: D,
762
- scheduleSearch: de,
763
- find: fe,
764
- getFindResult: oe,
765
- goToMatch: pe,
766
- findNext: () => me("next"),
767
- findPrevious: () => me("previous"),
760
+ canReplaceCurrent: ae,
761
+ replacementRefusal: ie,
762
+ performSearch: E,
763
+ scheduleSearch: fe,
764
+ find: pe,
765
+ getFindResult: se,
766
+ goToMatch: me,
767
+ findNext: () => he("next"),
768
+ findPrevious: () => he("previous"),
768
769
  replaceCurrent: () => {
769
770
  let e = t.value;
770
- if (!e || he() || O()) return !1;
771
+ if (!e || ge() || D()) return !1;
771
772
  let n = b.value;
772
- if (!ie.value || !n) return !1;
773
- let r = e.state.doc, i = Fe(e, n, te.value);
774
- return e.state.doc !== r && D("refresh"), i;
773
+ if (!ae.value || !n) return !1;
774
+ let r = e.state.doc, i = Ie(e, n, te.value);
775
+ return e.state.doc !== r && E("refresh"), i;
775
776
  },
776
777
  replaceAll: () => {
777
778
  let e = t.value, n = v.value.length;
778
- if (!e || he() || O()) return {
779
+ if (!e || ge() || D()) return {
779
780
  replacedCount: 0,
780
781
  skippedCount: n
781
782
  };
782
- let r = e.state.doc, i = Ie(e, v.value, te.value);
783
- return e.state.doc !== r && D(), i;
783
+ let r = e.state.doc, i = Le(e, v.value, te.value);
784
+ return e.state.doc !== r && E(), i;
784
785
  },
785
- clear: le
786
+ clear: ue
786
787
  };
787
788
  }
788
- function ft(e, t) {
789
+ function pt(e, t) {
789
790
  if (t < e.top + 40) {
790
791
  let n = Math.max(0, e.top + 40 - t);
791
792
  return -Math.min(12, n / 40 * 12);
@@ -797,7 +798,7 @@ function ft(e, t) {
797
798
  return 0;
798
799
  }
799
800
  // src/composables/useDragAutoScroll.ts
800
- function K({ pagesContainer: e, onScrollExtendSelection: t }) {
801
+ function mt({ pagesContainer: e, onScrollExtendSelection: t }) {
801
802
  let n = null, r = 0, a = 0, o = !1;
802
803
  function s() {
803
804
  return g(e.value);
@@ -809,7 +810,7 @@ function K({ pagesContainer: e, onScrollExtendSelection: t }) {
809
810
  if (!o) return;
810
811
  let e = s();
811
812
  if (!e) return;
812
- let i = ft(e.getBoundingClientRect(), a);
813
+ let i = pt(e.getBoundingClientRect(), a);
813
814
  i !== 0 && (_(e, i), t(r, a)), n = requestAnimationFrame(l);
814
815
  }
815
816
  function u() {
@@ -829,7 +830,7 @@ function K({ pagesContainer: e, onScrollExtendSelection: t }) {
829
830
  };
830
831
  }
831
832
  // src/composables/useTableResize.ts
832
- function pt({ runCommand: e }) {
833
+ function G({ runCommand: e }) {
833
834
  let t = {
834
835
  active: !1,
835
836
  startX: 0,
@@ -862,7 +863,7 @@ function pt({ runCommand: e }) {
862
863
  }
863
864
  function o(e, a) {
864
865
  let o = e.target;
865
- return o instanceof HTMLElement ? o.classList.contains("layout-table-resize-handle") ? (e.preventDefault(), e.stopPropagation(), i = a, t.active = !0, t.startX = e.clientX, t.handle = o, o.classList.add("dragging"), t.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), t.tablePmStart = b(o) ?? 0, mt(a, t), !0) : o.classList.contains("layout-table-row-resize-handle") || o.classList.contains("layout-table-edge-handle-bottom") ? (e.preventDefault(), e.stopPropagation(), i = a, n.active = !0, n.startY = e.clientY, n.handle = o, n.isEdge = o.dataset.isEdge === "bottom", o.classList.add("dragging"), n.rowIndex = parseInt(o.dataset.rowIndex ?? "0", 10), n.tablePmStart = b(o) ?? 0, ht(a, n, o), !0) : o.classList.contains("layout-table-edge-handle-right") ? (e.preventDefault(), e.stopPropagation(), i = a, r.active = !0, r.startX = e.clientX, r.handle = o, o.classList.add("dragging"), r.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), r.tablePmStart = b(o) ?? 0, gt(a, r), !0) : !1 : !1;
866
+ return o instanceof HTMLElement ? o.classList.contains("layout-table-resize-handle") ? (e.preventDefault(), e.stopPropagation(), i = a, t.active = !0, t.startX = e.clientX, t.handle = o, o.classList.add("dragging"), t.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), t.tablePmStart = b(o) ?? 0, ht(a, t), !0) : o.classList.contains("layout-table-row-resize-handle") || o.classList.contains("layout-table-edge-handle-bottom") ? (e.preventDefault(), e.stopPropagation(), i = a, n.active = !0, n.startY = e.clientY, n.handle = o, n.isEdge = o.dataset.isEdge === "bottom", o.classList.add("dragging"), n.rowIndex = parseInt(o.dataset.rowIndex ?? "0", 10), n.tablePmStart = b(o) ?? 0, gt(a, n, o), !0) : o.classList.contains("layout-table-edge-handle-right") ? (e.preventDefault(), e.stopPropagation(), i = a, r.active = !0, r.startX = e.clientX, r.handle = o, o.classList.add("dragging"), r.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), r.tablePmStart = b(o) ?? 0, _t(a, r), !0) : !1 : !1;
866
867
  }
867
868
  function s(e) {
868
869
  if (t.active && t.handle) {
@@ -870,7 +871,7 @@ function pt({ runCommand: e }) {
870
871
  let n = e.clientX - t.startX, r = parseFloat(t.handle.style.left);
871
872
  t.handle.style.left = `${r + n}px`, t.startX = e.clientX;
872
873
  let i = Math.round(n * A), a = t.origWidths.left + i, o = t.origWidths.right - i;
873
- a >= He && o >= He && (t.origWidths = {
874
+ a >= k && o >= k && (t.origWidths = {
874
875
  left: a,
875
876
  right: o
876
877
  });
@@ -889,7 +890,7 @@ function pt({ runCommand: e }) {
889
890
  let t = e.clientX - r.startX, n = parseFloat(r.handle.style.left);
890
891
  r.handle.style.left = `${n + t}px`, r.startX = e.clientX;
891
892
  let i = Math.round(t * A), a = r.origWidth + i;
892
- a >= He && (r.origWidth = a);
893
+ a >= k && (r.origWidth = a);
893
894
  }
894
895
  }
895
896
  function c(a) {
@@ -898,7 +899,7 @@ function pt({ runCommand: e }) {
898
899
  colIdx: t.columnIndex,
899
900
  newLeft: t.origWidths.left,
900
901
  newRight: t.origWidths.right
901
- })), t.handle = null) : n.active ? (n.active = !1, n.handle?.classList.remove("dragging"), i && e(i, j({
902
+ })), t.handle = null) : n.active ? (n.active = !1, n.handle?.classList.remove("dragging"), i && e(i, Xe({
902
903
  pmStart: n.tablePmStart,
903
904
  rowIdx: n.rowIndex,
904
905
  newHeight: n.origHeight
@@ -919,11 +920,11 @@ function pt({ runCommand: e }) {
919
920
  isResizing: a
920
921
  };
921
922
  }
922
- function mt(e, t) {
923
+ function ht(e, t) {
923
924
  let n = qe(e, t.tablePmStart, t.columnIndex);
924
925
  n && (t.origWidths = n);
925
926
  }
926
- function ht(e, t, n) {
927
+ function gt(e, t, n) {
927
928
  let r = Je(e, t.tablePmStart, t.rowIndex);
928
929
  if (r != null) t.origHeight = r;
929
930
  else {
@@ -932,29 +933,29 @@ function ht(e, t, n) {
932
933
  }
933
934
  t.minimumHeight = Math.min(Ue, t.origHeight);
934
935
  }
935
- function gt(e, t) {
936
+ function _t(e, t) {
936
937
  let n = Ke(e, t.tablePmStart, t.columnIndex);
937
938
  n != null && (t.origWidth = n);
938
939
  }
939
940
  // src/composables/useTrackedChanges.ts
940
- function _t(t, n, r) {
941
+ function vt(t, n, r) {
941
942
  return e(() => {
942
943
  n.value;
943
944
  let e = t.value?.state ?? null, i = Ze(e);
944
945
  if (e === null || !r) return i;
945
- let a = x({
946
+ let a = re({
946
947
  editor: r,
947
948
  state: e,
948
- story: w.MAIN,
949
+ story: C.MAIN,
949
950
  target: {
950
951
  type: "revisions",
951
- ids: i.entries.flatMap(Xe)
952
+ ids: i.entries.flatMap(j)
952
953
  }
953
954
  });
954
955
  if (a.accept.size === 0 && a.reject.size === 0) return i;
955
956
  let o = i.entries;
956
957
  for (let e of o) {
957
- let t = Xe(e);
958
+ let t = j(e);
958
959
  e.heldByLock = {
959
960
  accept: t.some((e) => a.accept.has(e)),
960
961
  reject: t.some((e) => a.reject.has(e))
@@ -964,7 +965,7 @@ function _t(t, n, r) {
964
965
  });
965
966
  }
966
967
  // src/composables/useZoom.ts
967
- var q = N, J = M, Y = [
968
+ var yt = M, K = Qe, q = [
968
969
  .5,
969
970
  .75,
970
971
  1,
@@ -972,16 +973,16 @@ var q = N, J = M, Y = [
972
973
  1.5,
973
974
  2
974
975
  ];
975
- function vt(t = 1) {
976
- let i = s(Math.max(q, Math.min(J, t))), a = e(() => Math.round(i.value * 100)), o = e(() => i.value <= q), c = e(() => i.value >= J);
976
+ function J(t = 1) {
977
+ let i = s(Math.max(yt, Math.min(K, t))), a = e(() => Math.round(i.value * 100)), o = e(() => i.value <= yt), c = e(() => i.value >= K);
977
978
  function l(e) {
978
- i.value = Math.max(q, Math.min(J, Math.round(e * 100) / 100));
979
+ i.value = Math.max(yt, Math.min(K, Math.round(e * 100) / 100));
979
980
  }
980
981
  function u() {
981
- l(i.value + P);
982
+ l(i.value + N);
982
983
  }
983
984
  function d() {
984
- l(i.value - P);
985
+ l(i.value - N);
985
986
  }
986
987
  function f() {
987
988
  l(1);
@@ -1007,7 +1008,7 @@ function vt(t = 1) {
1007
1008
  handleWheel: p,
1008
1009
  handleKeyDown: m,
1009
1010
  installShortcuts: h,
1010
- ZOOM_PRESETS: Y
1011
+ ZOOM_PRESETS: q
1011
1012
  };
1012
1013
  }
1013
- export { K as a, V as c, $e as d, pt as i, R as l, Ze as n, dt as o, _t as r, G as s, vt as t, B as u };
1014
+ export { mt as a, z as c, B as d, G as i, $e as l, Ze as n, W as o, vt as r, U as s, J as t, et as u };