@stll/folio-vue 0.3.0 → 0.4.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.
package/dist/index.js CHANGED
@@ -1,69 +1,71 @@
1
- import { E as e, S as t, T as n, a as r, b as i, c as a, i as o, n as s, r as c, s as l, t as u, u as d, x as f, y as p } from "./PageSetupDialog-Djs8aW5A.js";
2
- import { D as m, O as h, T as g, a as _, b as v, f as y, i as b, n as x, p as ee, r as S, t as te, y as ne } from "./ListButtons-CDkmhg3v.js";
1
+ import { A as e, F as t, O as n, P as r, _ as i, d as a, f as o, g as s, j as c, k as l, m as u, p as d, u as f, y as p } from "./WatermarkDialog-D-uTab0-.js";
2
+ import { D as m, O as h, T as g, a as _, b as v, f as y, i as b, n as x, p as ee, r as S, t as te, y as ne } from "./ListButtons-BaILr4AO.js";
3
3
  import { t as re } from "./zIndex-BY0qa8Au.js";
4
- import { a as ie, i as C, o as ae, r as oe, t as w } from "./useZoom-CIIRid8U.js";
5
- import { Fragment as T, Teleport as E, computed as D, createApp as se, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as ce, createStaticVNode as le, createTextVNode as ue, createVNode as M, defineComponent as N, h as P, inject as F, mergeProps as de, nextTick as I, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as fe, onMounted as pe, openBlock as z, provide as me, ref as B, renderList as V, renderSlot as he, shallowRef as ge, toDisplayString as H, unref as U, vModelText as W, watch as G, withCtx as _e, withDirectives as K, withKeys as q, withModifiers as J } from "vue";
6
- import { createStyleResolver as Y, extractSelectionState as ve, getSelectedText as ye, insertImageFromFile as be, insertImageFromFile as xe, insertPageBreakInView as Se, insertPageBreakInView as Ce, insertTableInView as X, insertTableInView as we, insertTableOfContentsInView as Te, insertTableOfContentsInView as Ee } from "@stll/folio-core/prosemirror";
7
- import { extractSelectionContext as De } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
8
- import { inspectDocxCompatibility as Oe } from "@stll/folio-core/docx/compatibility";
9
- import { clearAllCaches as ke, resetCanvasContext as Ae } from "@stll/folio-core/layout-bridge/engine/measuring";
10
- import { onFontsLoaded as je } from "@stll/folio-core/utils/fontLoader";
11
- import { twipsToPixels as Me } from "@stll/folio-core/paged-layout/sectionGeometry";
12
- import { measureDirectiveGutter as Ne, projectRangesToRects as Pe } from "@stll/folio-core/paged-layout/rangeProjection";
13
- import { prefersReducedMotionBehavior as Fe } from "@stll/folio-core/paged-layout/scrollNavigation";
14
- import { anonymizationDecorationsKey as Ie, getAnonymizationMatches as Le, getAnonymizationMatches as Re, setAnonymizationTermsMeta as ze, slugAnonymizationLabel as Be } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
15
- import { NodeSelection as Ve, Selection as He, TextSelection as Z } from "prosemirror-state";
16
- import { pixelsToEmu as Ue } from "@stll/folio-core/utils/units";
17
- import { IMAGE_LAYOUT_OPTIONS as We, captureInlinePositionEmu as Ge, deriveLayoutChoice as Ke, findImageElement as qe, isImageLayoutOptionEnabled as Je, toolbarValueToLayoutTarget as Ye } from "@stll/folio-core/layout-painter/imageLayout";
18
- import { isTrackChangesMode as Xe, toggledTrackChangesMode as Ze } from "@stll/folio-core/managers/EditorModeManager";
19
- import { clickToPositionDom as Qe } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
20
- import { calculateResizedImageDimensions as $e, commitImageFloatMove as et, commitImageInlineMove as tt, commitImageResize as nt, isFloatingImage as rt } from "@stll/folio-core/prosemirror/imageCommit";
21
- import { findBodyPmAnchor as it, findBodyPmSpans as at } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
22
- import { getTemplateDirectives as ot, getTemplateDirectives as st, scanDirectives as ct } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
23
- import { clearFormatting as lt } from "@stll/folio-core/prosemirror/commands/formatting";
24
- import { getTableContext as ut } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
25
- import { PENDING_COMMENT_ID as dt, createCommentIdAllocator as ft, seedCommentAllocator as pt } from "@stll/folio-core/prosemirror/commentIdAllocator";
26
- import { createComment as mt } from "@stll/folio-core/prosemirror/commentOps";
27
- import { findChangeRange as ht } from "@stll/folio-core/prosemirror/queries";
28
- import { acceptAIEditRevision as gt, acceptChange as _t, findAIEditRevisionRange as vt, rejectAIEditRevision as yt, rejectChange as bt } from "@stll/folio-core/prosemirror/commands/comments";
29
- import { makeRevisionInfo as xt } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
30
- import { setTemplatePreviewValues as St } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
31
- import { clearTemplateSlashMenu as Ct, consumeTemplateSlashQuery as wt, getTemplateSlashMenu as Tt, resetTemplateSlashQuery as Et, templateSlashMenuKey as Dt } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
32
- import { applyFolioAIEditOperations as Ot, applyFolioAIEditOperations as kt, createFolioAIEditSnapshot as At, createFolioAIEditSnapshot as jt, diffWordSegments as Mt, getCommentAnchorsFromDoc as Nt, getTrackedChangesFromDoc as Pt, hashFolioAIBlockText as Ft, normalizeFolioAIBlockText as It } from "@stll/folio-core/ai-edits";
33
- import { findPageIndexContainingPmPos as Lt } from "@stll/folio-core/layout-engine";
34
- import { findParagraphFragmentsByParaId as Rt, flashParagraphElements as Q } from "@stll/folio-core/paged-layout/paragraphFlash";
35
- import { blockSdtAttrsToSdtProperties as zt, findBlockSdtMatch as $, findBlockSdtMatches as Bt, removeContentControlTr as Vt, setContentControlContentTr as Ht, setContentControlValueTr as Ut } from "@stll/folio-core/prosemirror/commands/contentControls";
36
- import { setContentControlContentBlocksTr as Wt } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
37
- import { createFolioAIEditSnapshot as Gt } from "@stll/folio-core/ai-edits/snapshot";
38
- import { findParagraphByParaId as Kt } from "@stll/folio-core/prosemirror/utils/findParagraphByParaId";
39
- import { deriveBlockId as qt, getFolioParaIdFromBlockId as Jt, getFolioParaIdFromBlockId as Yt, getSequentialFolioBlockIdIndex as Xt, isFolioBlockId as Zt, isSequentialFolioBlockId as Qt } from "@stll/folio-core/types/block-id";
40
- import { applyStyle as $t, removeTabStop as en, setIndentFirstLine as tn, setIndentLeft as nn, setIndentRight as rn } from "@stll/folio-core/prosemirror/commands/paragraph";
41
- import { getCachedNumberingMap as an } from "@stll/folio-core/docx";
42
- import { insertPageBreak as on } from "@stll/folio-core/prosemirror/commands/pageBreak";
43
- import { insertSectionBreakContinuous as sn, insertSectionBreakNextPage as cn } from "@stll/folio-core/prosemirror/commands/sectionBreak";
44
- import { editHyperlinkAtCursor as ln, removeHyperlinkAtCursor as un } from "@stll/folio-core/prosemirror/commands/hyperlink";
45
- import { collectHeadings as dn } from "@stll/folio-core/utils/headingCollector";
46
- import { TABLE_INSERT_HIDE_DELAY_MS as fn, detectTableInsertHover as pn } from "@stll/folio-core/layout-bridge/tableInsertHover";
47
- import { createCellDragTracker as mn, findCellPosFromPmPos as hn } from "@stll/folio-core/prosemirror/cellDragSelection";
48
- import { createEmptyDocument as gn } from "@stll/folio-core/utils/createDocument";
49
- import { createDocx as _n } from "@stll/folio-core/docx/rezip";
50
- import { DEFAULT_AI_SUGGESTION_PRESETS as vn } from "@stll/folio-core/ai-suggestions/types";
51
- import { applySuggestions as yn } from "@stll/folio-core/ai-suggestions/apply";
52
- import { isSuggestionStale as bn, resolveSuggestionAnchor as xn } from "@stll/folio-core/ai-suggestions/conflict";
53
- import { buildPositionalText as Sn } from "@stll/folio-core/ai-suggestions/text-positions";
54
- import { setAISuggestionsMeta as Cn, setFocusedSuggestionMeta as wn } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
55
- import { scrollFolioPositionIntoView as Tn } from "@stll/folio-core/paged-layout/scrollToPmPosition";
56
- import { getFolioCaretViewportRect as En, getFolioSelectionViewportRect as Dn } from "@stll/folio-core/paged-layout/selectionViewportRect";
57
- import { createAICitationDecorationsPlugin as On, setAICitationsMeta as kn, setActiveCitationMeta as An } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
58
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as jn, acceptAutocompleteSuggestion as Mn, acceptAutocompleteWord as Nn, appendAutocompleteToken as Pn, autocompleteSuggestionKey as Fn, autocompleteSuggestionPlugin as In, clearAutocompleteSuggestion as Ln, finishAutocompleteSuggestion as Rn, getAutocompleteSuggestion as zn, shouldTriggerAutocomplete as Bn, startAutocompleteSuggestion as Vn } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
59
- import { fromMarkdown as Hn, toMarkdown as Un, toMarkdownResult as Wn } from "@stll/folio-core/markdown";
4
+ import { a as ie, i as C, o as ae, r as oe, t as w } from "./useZoom-BR--m9w3.js";
5
+ import { FindReplaceDialog as T, FootnotePropertiesDialog as se, HyperlinkDialog as ce, ImagePositionDialog as le, ImagePropertiesDialog as E, InsertImageDialog as D, InsertSymbolDialog as ue, InsertTableDialog as de, PageSetupDialog as fe, PasteSpecialDialog as O, SplitCellDialog as k, TablePropertiesDialog as A, WatermarkDialog as j } from "./dialogs.js";
6
+ import { Fragment as M, Teleport as pe, computed as N, createApp as me, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createSlots as he, createStaticVNode as ge, createTextVNode as R, createVNode as z, defineComponent as B, h as _e, inject as ve, mergeProps as ye, nextTick as be, normalizeClass as V, normalizeStyle as H, onBeforeUnmount as xe, onMounted as Se, openBlock as U, provide as Ce, ref as W, renderList as G, renderSlot as we, shallowRef as Te, toDisplayString as K, unref as q, vModelText as Ee, watch as J, withCtx as De, withDirectives as Oe, withKeys as ke, withModifiers as Y } from "vue";
7
+ import { createStyleResolver as Ae, extractSelectionState as je, getSelectedText as Me, insertImageFromFile as Ne, insertImageFromFile as Pe, insertPageBreakInView as X, insertPageBreakInView as Fe, insertTableInView as Ie, insertTableInView as Le, insertTableOfContentsInView as Re, insertTableOfContentsInView as ze } from "@stll/folio-core/prosemirror";
8
+ import { extractSelectionContext as Be } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
9
+ import { inspectDocxCompatibility as Ve } from "@stll/folio-core/docx/compatibility";
10
+ import { clearAllCaches as He, resetCanvasContext as Ue } from "@stll/folio-core/layout-bridge/engine/measuring";
11
+ import { onFontsLoaded as We } from "@stll/folio-core/utils/fontLoader";
12
+ import { twipsToPixels as Ge } from "@stll/folio-core/paged-layout/sectionGeometry";
13
+ import { measureDirectiveGutter as Ke, projectRangesToRects as qe } from "@stll/folio-core/paged-layout/rangeProjection";
14
+ import { prefersReducedMotionBehavior as Je } from "@stll/folio-core/paged-layout/scrollNavigation";
15
+ import { anonymizationDecorationsKey as Ye, getAnonymizationMatches as Xe, getAnonymizationMatches as Ze, setAnonymizationTermsMeta as Qe, slugAnonymizationLabel as $e } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
16
+ import { NodeSelection as Z, Selection as et, TextSelection as tt } from "prosemirror-state";
17
+ import { pixelsToEmu as nt } from "@stll/folio-core/utils/units";
18
+ import { IMAGE_LAYOUT_OPTIONS as rt, captureInlinePositionEmu as it, deriveLayoutChoice as at, findImageElement as ot, isImageLayoutOptionEnabled as st, toolbarValueToLayoutTarget as ct } from "@stll/folio-core/layout-painter/imageLayout";
19
+ import { isTrackChangesMode as lt, toggledTrackChangesMode as ut } from "@stll/folio-core/managers/EditorModeManager";
20
+ import { clickToPositionDom as dt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
21
+ import { calculateResizedImageDimensions as ft, commitImageFloatMove as pt, commitImageInlineMove as mt, commitImageResize as ht, isFloatingImage as gt } from "@stll/folio-core/prosemirror/imageCommit";
22
+ import { findBodyPmAnchor as _t, findBodyPmSpans as vt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
23
+ import { getTemplateDirectives as yt, getTemplateDirectives as bt, scanDirectives as xt } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
24
+ import { clearFormatting as St } from "@stll/folio-core/prosemirror/commands/formatting";
25
+ import { getTableContext as Ct } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
26
+ import { PENDING_COMMENT_ID as wt, createCommentIdAllocator as Tt, seedCommentAllocator as Et } from "@stll/folio-core/prosemirror/commentIdAllocator";
27
+ import { createComment as Dt } from "@stll/folio-core/prosemirror/commentOps";
28
+ import { findChangeRange as Ot } from "@stll/folio-core/prosemirror/queries";
29
+ import { acceptAIEditRevision as kt, acceptChange as At, findAIEditRevisionRange as jt, rejectAIEditRevision as Mt, rejectChange as Nt } from "@stll/folio-core/prosemirror/commands/comments";
30
+ import { makeRevisionInfo as Pt } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
31
+ import { setTemplatePreviewValues as Ft } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
32
+ import { clearTemplateSlashMenu as It, consumeTemplateSlashQuery as Lt, getTemplateSlashMenu as Rt, resetTemplateSlashQuery as Q, templateSlashMenuKey as zt } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
33
+ import { applyFolioAIEditOperations as $, applyFolioAIEditOperations as Bt, createFolioAIEditSnapshot as Vt, createFolioAIEditSnapshot as Ht, diffWordSegments as Ut, getCommentAnchorsFromDoc as Wt, getTrackedChangesFromDoc as Gt, hashFolioAIBlockText as Kt, normalizeFolioAIBlockText as qt } from "@stll/folio-core/ai-edits";
34
+ import { findPageIndexContainingPmPos as Jt } from "@stll/folio-core/layout-engine";
35
+ import { findParagraphFragmentsByParaId as Yt, flashParagraphElements as Xt } from "@stll/folio-core/paged-layout/paragraphFlash";
36
+ import { blockSdtAttrsToSdtProperties as Zt, findBlockSdtMatch as Qt, findBlockSdtMatches as $t, removeContentControlTr as en, setContentControlContentTr as tn, setContentControlValueTr as nn } from "@stll/folio-core/prosemirror/commands/contentControls";
37
+ import { setContentControlContentBlocksTr as rn } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
38
+ import { createFolioAIEditSnapshot as an } from "@stll/folio-core/ai-edits/snapshot";
39
+ import { findParagraphByParaId as on } from "@stll/folio-core/prosemirror/utils/findParagraphByParaId";
40
+ import { deriveBlockId as sn, getFolioParaIdFromBlockId as cn, getFolioParaIdFromBlockId as ln, getSequentialFolioBlockIdIndex as un, isFolioBlockId as dn, isSequentialFolioBlockId as fn } from "@stll/folio-core/types/block-id";
41
+ import { applyStyle as pn, removeTabStop as mn, setIndentFirstLine as hn, setIndentLeft as gn, setIndentRight as _n } from "@stll/folio-core/prosemirror/commands/paragraph";
42
+ import { getCachedNumberingMap as vn } from "@stll/folio-core/docx";
43
+ import { insertPageBreak as yn } from "@stll/folio-core/prosemirror/commands/pageBreak";
44
+ import { insertSectionBreakContinuous as bn, insertSectionBreakNextPage as xn } from "@stll/folio-core/prosemirror/commands/sectionBreak";
45
+ import { editHyperlinkAtCursor as Sn, removeHyperlinkAtCursor as Cn } from "@stll/folio-core/prosemirror/commands/hyperlink";
46
+ import { collectHeadings as wn } from "@stll/folio-core/utils/headingCollector";
47
+ import { TABLE_INSERT_HIDE_DELAY_MS as Tn, detectTableInsertHover as En } from "@stll/folio-core/layout-bridge/tableInsertHover";
48
+ import { createCellDragTracker as Dn, findCellPosFromPmPos as On } from "@stll/folio-core/prosemirror/cellDragSelection";
49
+ import { getDocumentWatermark as kn, setDocumentWatermark as An } from "@stll/folio-core/watermark";
50
+ import { createEmptyDocument as jn } from "@stll/folio-core/utils/createDocument";
51
+ import { createDocx as Mn } from "@stll/folio-core/docx/rezip";
52
+ import { DEFAULT_AI_SUGGESTION_PRESETS as Nn } from "@stll/folio-core/ai-suggestions/types";
53
+ import { applySuggestions as Pn } from "@stll/folio-core/ai-suggestions/apply";
54
+ import { isSuggestionStale as Fn, resolveSuggestionAnchor as In } from "@stll/folio-core/ai-suggestions/conflict";
55
+ import { buildPositionalText as Ln } from "@stll/folio-core/ai-suggestions/text-positions";
56
+ import { setAISuggestionsMeta as Rn, setFocusedSuggestionMeta as zn } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
57
+ import { scrollFolioPositionIntoView as Bn } from "@stll/folio-core/paged-layout/scrollToPmPosition";
58
+ import { getFolioCaretViewportRect as Vn, getFolioSelectionViewportRect as Hn } from "@stll/folio-core/paged-layout/selectionViewportRect";
59
+ import { createAICitationDecorationsPlugin as Un, setAICitationsMeta as Wn, setActiveCitationMeta as Gn } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
60
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Kn, acceptAutocompleteSuggestion as qn, acceptAutocompleteWord as Jn, appendAutocompleteToken as Yn, autocompleteSuggestionKey as Xn, autocompleteSuggestionPlugin as Zn, clearAutocompleteSuggestion as Qn, finishAutocompleteSuggestion as $n, getAutocompleteSuggestion as er, shouldTriggerAutocomplete as tr, startAutocompleteSuggestion as nr } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
61
+ import { fromMarkdown as rr, toMarkdown as ir, toMarkdownResult as ar } from "@stll/folio-core/markdown";
60
62
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
61
- var Gn = [
63
+ var or = [
62
64
  "data-folio-anonymization-label",
63
65
  "data-folio-anonymization-canonical",
64
66
  "data-folio-anonymization-selected",
65
67
  "title"
66
- ], Kn = /*#__PURE__*/ e(/* @__PURE__ */ N({
68
+ ], sr = /*#__PURE__*/ t(/* @__PURE__ */ B({
67
69
  __name: "AnonymizationRectsOverlay",
68
70
  props: {
69
71
  getView: { type: Function },
@@ -78,7 +80,7 @@ var Gn = [
78
80
  selectionSeq: {}
79
81
  },
80
82
  setup(e) {
81
- let t = e, n = B(null), r = B([]), i = 0, a = null;
83
+ let t = e, n = W(null), r = W([]), i = 0, a = null;
82
84
  function o() {
83
85
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
84
86
  a = null, s();
@@ -90,12 +92,12 @@ var Gn = [
90
92
  r.value = [];
91
93
  return;
92
94
  }
93
- let s = Re(o);
95
+ let s = Ze(o);
94
96
  if (s.length === 0) {
95
97
  r.value = [];
96
98
  return;
97
99
  }
98
- let c = await Pe(s, {
100
+ let c = await qe(s, {
99
101
  pagesContainer: a,
100
102
  zoom: t.zoom,
101
103
  layout: t.layout,
@@ -115,7 +117,7 @@ var Gn = [
115
117
  }))
116
118
  }));
117
119
  }
118
- G(() => [
120
+ J(() => [
119
121
  t.editorState,
120
122
  t.zoom,
121
123
  t.layout,
@@ -137,10 +139,10 @@ var Gn = [
137
139
  index: a
138
140
  }, i.item(a)?.scrollIntoView({
139
141
  block: "center",
140
- behavior: Fe()
142
+ behavior: Je()
141
143
  });
142
144
  }
143
- G(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
145
+ J(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
144
146
  function u(e) {
145
147
  if (e.button !== 0 || !t.onTermClick) return;
146
148
  let r = n.value;
@@ -157,35 +159,35 @@ var Gn = [
157
159
  }
158
160
  }
159
161
  }
160
- return pe(() => {
162
+ return Se(() => {
161
163
  document.addEventListener("click", u), o();
162
- }), fe(() => {
164
+ }), xe(() => {
163
165
  document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
164
- }), (t, i) => (z(), A("div", {
166
+ }), (t, i) => (U(), I("div", {
165
167
  ref_key: "rootRef",
166
168
  ref: n,
167
169
  class: "folio-anonymization-overlay",
168
170
  "data-folio-anonymization-overlay": ""
169
- }, [(z(!0), A(T, null, V(r.value, (t) => (z(), A(T, { key: `${t.label}:${t.canonical}` }, [(z(!0), A(T, null, V(t.rects, (n, r) => (z(), A("span", {
171
+ }, [(U(!0), I(M, null, G(r.value, (t) => (U(), I(M, { key: `${t.label}:${t.canonical}` }, [(U(!0), I(M, null, G(t.rects, (n, r) => (U(), I("span", {
170
172
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
171
- class: L(["folio-anonymization-term", `folio-anonymization-term--${U(Be)(t.label)}`]),
173
+ class: V(["folio-anonymization-term", `folio-anonymization-term--${q($e)(t.label)}`]),
172
174
  "data-folio-anonymization-label": t.label,
173
175
  "data-folio-anonymization-canonical": t.canonical,
174
176
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
175
177
  title: `Anonymized: ${t.canonical}`,
176
- style: R({
178
+ style: H({
177
179
  position: "absolute",
178
180
  left: `${n.left}px`,
179
181
  top: `${n.top}px`,
180
182
  width: `${n.width}px`,
181
183
  height: `${n.height}px`
182
184
  })
183
- }, null, 14, Gn))), 128))], 64))), 128))], 512));
185
+ }, null, 14, or))), 128))], 64))), 128))], 512));
184
186
  }
185
- }), [["__scopeId", "data-v-c7db88e1"]]), qn = { class: "doc-outline__header" }, Jn = { class: "doc-outline__body" }, Yn = {
187
+ }), [["__scopeId", "data-v-c7db88e1"]]), cr = { class: "doc-outline__header" }, lr = { class: "doc-outline__body" }, ur = {
186
188
  key: 0,
187
189
  class: "doc-outline__empty"
188
- }, Xn = /*#__PURE__*/ e(/* @__PURE__ */ N({
190
+ }, dr = /*#__PURE__*/ t(/* @__PURE__ */ B({
189
191
  __name: "DocumentOutline",
190
192
  props: {
191
193
  isOpen: { type: Boolean },
@@ -196,7 +198,7 @@ var Gn = [
196
198
  },
197
199
  emits: ["close", "navigate"],
198
200
  setup(e, { emit: t }) {
199
- let r = e, { OutlineRail: i } = d(), a = D(() => r.headings.length ? Math.min(...r.headings.map((e) => e.level)) : 0), o = D(() => r.headings.map((e) => ({
201
+ let n = e, { OutlineRail: i } = p(), a = N(() => n.headings.length ? Math.min(...n.headings.map((e) => e.level)) : 0), o = N(() => n.headings.map((e) => ({
200
202
  id: String(e.pmPos),
201
203
  label: e.text || "(untitled)",
202
204
  level: e.level - a.value
@@ -204,33 +206,33 @@ var Gn = [
204
206
  function c(e) {
205
207
  s("navigate", Number(e));
206
208
  }
207
- return (t, r) => e.isOpen ? (z(), A("nav", {
209
+ return (t, n) => e.isOpen ? (U(), I("nav", {
208
210
  key: 0,
209
211
  class: "doc-outline",
210
- style: R({
212
+ style: H({
211
213
  left: e.leftOffset + "px",
212
214
  top: e.topPx + "px"
213
215
  }),
214
216
  role: "navigation",
215
217
  "aria-label": "Document outline",
216
- onMousedown: r[1] ||= J(() => {}, ["stop"])
217
- }, [j("div", qn, [j("button", {
218
+ onMousedown: n[1] ||= Y(() => {}, ["stop"])
219
+ }, [L("div", cr, [L("button", {
218
220
  class: "doc-outline__back",
219
221
  title: "Close outline",
220
222
  "aria-label": "Close outline",
221
- onClick: r[0] ||= (e) => t.$emit("close")
222
- }, [M(n, {
223
+ onClick: n[0] ||= (e) => t.$emit("close")
224
+ }, [z(r, {
223
225
  name: "arrow_back",
224
226
  size: 20
225
- })]), r[2] ||= j("span", { class: "doc-outline__title" }, "Document Outline", -1)]), j("div", Jn, [e.headings.length === 0 ? (z(), A("div", Yn, "No headings found")) : (z(), O(U(i), {
227
+ })]), n[2] ||= L("span", { class: "doc-outline__title" }, "Document Outline", -1)]), L("div", lr, [e.headings.length === 0 ? (U(), I("div", ur, "No headings found")) : (U(), P(q(i), {
226
228
  key: 1,
227
229
  items: o.value,
228
230
  "get-scroll-container": e.getScrollContainer ?? (() => null),
229
231
  "on-jump": c,
230
232
  "aria-label": "Document outline"
231
- }, null, 8, ["items", "get-scroll-container"]))])], 36)) : k("", !0);
233
+ }, null, 8, ["items", "get-scroll-container"]))])], 36)) : F("", !0);
232
234
  }
233
- }), [["__scopeId", "data-v-92482e57"]]), Zn = /* @__PURE__ */ N({
235
+ }), [["__scopeId", "data-v-92482e57"]]), fr = /* @__PURE__ */ B({
234
236
  __name: "DocxEditorDialogs",
235
237
  props: {
236
238
  view: {},
@@ -256,51 +258,51 @@ var Gn = [
256
258
  ],
257
259
  setup(e, { emit: t }) {
258
260
  let n = t;
259
- return (t, i) => (z(), A(T, null, [
260
- M(r, {
261
+ return (t, r) => (U(), I(M, null, [
262
+ z(u, {
261
263
  "is-open": e.showFindReplace,
262
264
  view: e.view,
263
- onClose: i[0] ||= (e) => n("update:showFindReplace", !1)
265
+ onClose: r[0] ||= (e) => n("update:showFindReplace", !1)
264
266
  }, null, 8, ["is-open", "view"]),
265
- M(o, {
267
+ z(d, {
266
268
  "is-open": e.showHyperlink,
267
269
  view: e.view,
268
270
  bookmarks: e.bookmarks,
269
- onClose: i[1] ||= (e) => n("update:showHyperlink", !1),
270
- onSubmit: i[2] ||= (e) => n("hyperlink-submit", e),
271
- onRemove: i[3] ||= (e) => n("hyperlink-remove")
271
+ onClose: r[1] ||= (e) => n("update:showHyperlink", !1),
272
+ onSubmit: r[2] ||= (e) => n("hyperlink-submit", e),
273
+ onRemove: r[3] ||= (e) => n("hyperlink-remove")
272
274
  }, null, 8, [
273
275
  "is-open",
274
276
  "view",
275
277
  "bookmarks"
276
278
  ]),
277
- M(s, {
279
+ z(a, {
278
280
  "is-open": e.showInsertSymbol,
279
- onClose: i[4] ||= (e) => n("update:showInsertSymbol", !1),
280
- onInsert: i[5] ||= (e) => n("insert-symbol", e)
281
+ onClose: r[4] ||= (e) => n("update:showInsertSymbol", !1),
282
+ onInsert: r[5] ||= (e) => n("insert-symbol", e)
281
283
  }, null, 8, ["is-open"]),
282
- M(c, {
284
+ z(o, {
283
285
  "is-open": e.showImageProperties,
284
286
  view: e.view,
285
287
  "pm-pos": e.selectedImagePmPos,
286
- onClose: i[6] ||= (e) => n("update:showImageProperties", !1)
288
+ onClose: r[6] ||= (e) => n("update:showImageProperties", !1)
287
289
  }, null, 8, [
288
290
  "is-open",
289
291
  "view",
290
292
  "pm-pos"
291
293
  ]),
292
- M(u, {
294
+ z(f, {
293
295
  "is-open": e.showPageSetup,
294
296
  "section-properties": e.sectionProperties,
295
- onClose: i[7] ||= (e) => n("update:showPageSetup", !1),
296
- onApply: i[8] ||= (e) => n("page-setup-apply", e)
297
+ onClose: r[7] ||= (e) => n("update:showPageSetup", !1),
298
+ onApply: r[8] ||= (e) => n("page-setup-apply", e)
297
299
  }, null, 8, ["is-open", "section-properties"])
298
300
  ], 64));
299
301
  }
300
- }), Qn = {
302
+ }), pr = {
301
303
  key: 0,
302
304
  class: "docx-editor-vue__title-bar"
303
- }, $n = { class: "docx-editor-vue__title-bar-left" }, er = { class: "docx-editor-vue__title-bar-center" }, tr = { class: "docx-editor-vue__title-bar-right" }, nr = /* @__PURE__ */ N({
305
+ }, mr = { class: "docx-editor-vue__title-bar-left" }, hr = { class: "docx-editor-vue__title-bar-center" }, gr = { class: "docx-editor-vue__title-bar-right" }, _r = /* @__PURE__ */ B({
304
306
  __name: "DocxEditorMenuBar",
305
307
  props: {
306
308
  showMenuBar: {
@@ -332,13 +334,13 @@ var Gn = [
332
334
  ],
333
335
  setup(e, { emit: t }) {
334
336
  let n = t;
335
- return (t, r) => e.showMenuBar ? (z(), A("div", Qn, [
336
- j("div", $n, [he(t.$slots, "title-bar-left")]),
337
- j("div", er, [M(m, {
337
+ return (t, r) => e.showMenuBar ? (U(), I("div", pr, [
338
+ L("div", mr, [we(t.$slots, "title-bar-left")]),
339
+ L("div", hr, [z(m, {
338
340
  "model-value": e.documentName,
339
341
  editable: e.documentNameEditable,
340
342
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
341
- }, null, 8, ["model-value", "editable"]), M(g, {
343
+ }, null, 8, ["model-value", "editable"]), z(g, {
342
344
  "show-file-open": e.showFileOpen,
343
345
  "show-help-menu": e.showHelpMenu,
344
346
  "show-table-insert": e.showTableInsert,
@@ -349,40 +351,40 @@ var Gn = [
349
351
  "show-help-menu",
350
352
  "show-table-insert"
351
353
  ])]),
352
- j("div", tr, [he(t.$slots, "title-bar-right")])
353
- ])) : k("", !0);
354
+ L("div", gr, [we(t.$slots, "title-bar-right")])
355
+ ])) : F("", !0);
354
356
  }
355
- }), rr = Symbol("docx-portal-class");
356
- function ir(e) {
357
- me(rr, D(() => ({
357
+ }), vr = Symbol("docx-portal-class");
358
+ function yr(e) {
359
+ Ce(vr, N(() => ({
358
360
  "ep-root": !0,
359
- dark: !!U(e)
361
+ dark: !!q(e)
360
362
  })));
361
363
  }
362
- function ar() {
363
- return F(rr, D(() => ({ "ep-root": !0 })));
364
+ function br() {
365
+ return ve(vr, N(() => ({ "ep-root": !0 })));
364
366
  }
365
367
  //#endregion
366
368
  //#region src/components/ImageContextMenu.vue?vue&type=script&setup=true&lang.ts
367
- var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "image-ctx-menu__label" }, lr = {
369
+ var xr = ["aria-label"], Sr = { class: "image-ctx-menu__icon" }, Cr = { class: "image-ctx-menu__label" }, wr = {
368
370
  key: 1,
369
371
  class: "image-ctx-menu__divider",
370
372
  role: "separator"
371
- }, ur = [
373
+ }, Tr = [
372
374
  "data-wrap-type",
373
375
  "data-current",
374
376
  "data-disabled",
375
377
  "disabled",
376
378
  "title",
377
379
  "onClick"
378
- ], dr = { class: "image-ctx-menu__icon" }, fr = { class: "image-ctx-menu__label" }, pr = ["aria-label"], mr = ["disabled", "onClick"], hr = { class: "image-ctx-menu__label" }, gr = {
380
+ ], Er = { class: "image-ctx-menu__icon" }, Dr = { class: "image-ctx-menu__label" }, Or = ["aria-label"], kr = ["disabled", "onClick"], Ar = { class: "image-ctx-menu__label" }, jr = {
379
381
  key: 0,
380
382
  class: "image-ctx-menu__shortcut"
381
- }, _r = {
383
+ }, Mr = {
382
384
  key: 0,
383
385
  class: "image-ctx-menu__divider",
384
386
  role: "separator"
385
- }, vr = 18, yr = 260, br = 10, xr = /*#__PURE__*/ e(/* @__PURE__ */ N({
387
+ }, Nr = 18, Pr = 260, Fr = 10, Ir = /*#__PURE__*/ t(/* @__PURE__ */ B({
386
388
  __name: "ImageContextMenu",
387
389
  props: {
388
390
  state: {},
@@ -398,12 +400,12 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
398
400
  "text-action",
399
401
  "open-properties"
400
402
  ],
401
- setup(e, { emit: r }) {
402
- let i = e, a = r;
403
- function o() {
404
- a("open-properties"), a("close");
403
+ setup(e, { emit: t }) {
404
+ let n = e, i = t;
405
+ function a() {
406
+ i("open-properties"), i("close");
405
407
  }
406
- let { t: s } = t(), c = ar(), l = We, u = D(() => i.state ? Ke(i.state.currentWrapType, i.state.currentCssFloat ?? null) : null), d = {
408
+ let { t: o } = c(), s = br(), l = rt, u = N(() => n.state ? at(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
407
409
  inline: "wrap_text",
408
410
  squareLeft: "format_image_left",
409
411
  squareRight: "format_image_right",
@@ -413,104 +415,104 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
413
415
  function f(e) {
414
416
  return d[e];
415
417
  }
416
- let p = D(() => {
417
- if (!i.state) return {};
418
- let e = We.length * 36 + 16, t = i.state.position.x, n = i.state.position.y;
419
- return typeof window < "u" && (t + yr > window.innerWidth && (t = window.innerWidth - yr - br), n + e > window.innerHeight && (n = window.innerHeight - e - br), t < br && (t = br), n < br && (n = br)), {
418
+ let p = N(() => {
419
+ if (!n.state) return {};
420
+ let e = rt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
421
+ return typeof window < "u" && (t + Pr > window.innerWidth && (t = window.innerWidth - Pr - Fr), r + e > window.innerHeight && (r = window.innerHeight - e - Fr), t < Fr && (t = Fr), r < Fr && (r = Fr)), {
420
422
  position: "fixed",
421
423
  left: `${t}px`,
422
- top: `${n}px`,
423
- minWidth: `${yr}px`,
424
+ top: `${r}px`,
425
+ minWidth: `${Pr}px`,
424
426
  zIndex: 400
425
427
  };
426
428
  });
427
429
  function m(e) {
428
- return i.state ? Je(e, i.state.currentWrapType) : !1;
430
+ return n.state ? st(e, n.state.currentWrapType) : !1;
429
431
  }
430
432
  function h(e) {
431
- m(e) && (a("select", e.choice), a("close"));
433
+ m(e) && (i("select", e.choice), i("close"));
432
434
  }
433
435
  function g(e) {
434
- e.disabled || (a("text-action", e.action), a("close"));
436
+ e.disabled || (i("text-action", e.action), i("close"));
435
437
  }
436
438
  function _(e) {
437
- e.preventDefault(), a("close");
439
+ e.preventDefault(), i("close");
438
440
  }
439
441
  function v(e) {
440
- e.key === "Escape" && (e.preventDefault(), a("close"));
442
+ e.key === "Escape" && (e.preventDefault(), i("close"));
441
443
  }
442
- return (t, r) => (z(), O(E, { to: "body" }, [e.state && e.state.open ? (z(), A("div", {
444
+ return (t, n) => (U(), P(pe, { to: "body" }, [e.state && e.state.open ? (U(), I("div", {
443
445
  key: 0,
444
446
  class: "image-ctx-menu-backdrop",
445
447
  onMousedown: _,
446
- onContextmenu: r[0] ||= J((e) => t.$emit("close"), ["prevent"])
447
- }, null, 32)) : k("", !0), e.state && e.state.open ? (z(), A("div", {
448
+ onContextmenu: n[0] ||= Y((e) => t.$emit("close"), ["prevent"])
449
+ }, null, 32)) : F("", !0), e.state && e.state.open ? (U(), I("div", {
448
450
  key: 1,
449
- class: L(["image-ctx-menu", U(c)]),
451
+ class: V(["image-ctx-menu", q(s)]),
450
452
  role: "menu",
451
- "aria-label": U(s)("imageWrap.menu.ariaLabel"),
453
+ "aria-label": q(o)("imageWrap.menu.ariaLabel"),
452
454
  "data-testid": "image-context-menu",
453
- style: R(p.value),
454
- onContextmenu: r[4] ||= J(() => {}, ["prevent"]),
455
+ style: H(p.value),
456
+ onContextmenu: n[4] ||= Y(() => {}, ["prevent"]),
455
457
  onKeydown: v
456
458
  }, [
457
- e.canOpenProperties ? (z(), A("button", {
459
+ e.canOpenProperties ? (U(), I("button", {
458
460
  key: 0,
459
461
  type: "button",
460
462
  role: "menuitem",
461
463
  class: "image-ctx-menu__item",
462
464
  "data-action": "open-properties",
463
- onMousedown: r[1] ||= J(() => {}, ["prevent"]),
464
- onClick: o
465
- }, [j("span", sr, [M(n, {
465
+ onMousedown: n[1] ||= Y(() => {}, ["prevent"]),
466
+ onClick: a
467
+ }, [L("span", Sr, [z(r, {
466
468
  name: "settings",
467
- size: vr
468
- })]), j("span", cr, H(U(s)("imageWrap.menu.imageProperties")), 1)], 32)) : k("", !0),
469
- e.canOpenProperties ? (z(), A("div", lr)) : k("", !0),
470
- (z(!0), A(T, null, V(U(l), (e) => (z(), A("button", {
469
+ size: Nr
470
+ })]), L("span", Cr, K(q(o)("imageWrap.menu.imageProperties")), 1)], 32)) : F("", !0),
471
+ e.canOpenProperties ? (U(), I("div", wr)) : F("", !0),
472
+ (U(!0), I(M, null, G(q(l), (e) => (U(), I("button", {
471
473
  key: e.choice,
472
474
  type: "button",
473
475
  role: "menuitem",
474
- class: L(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
476
+ class: V(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
475
477
  "data-wrap-type": e.choice,
476
478
  "data-current": e.choice === u.value ? "true" : "false",
477
479
  "data-disabled": m(e) ? "false" : "true",
478
480
  disabled: !m(e),
479
- title: U(s)(`imageWrap.menuDesc.${e.i18nDescKey}`),
480
- onMousedown: r[2] ||= J(() => {}, ["prevent"]),
481
+ title: q(o)(`imageWrap.menuDesc.${e.i18nDescKey}`),
482
+ onMousedown: n[2] ||= Y(() => {}, ["prevent"]),
481
483
  onClick: (t) => h(e)
482
484
  }, [
483
- j("span", dr, [M(n, {
485
+ L("span", Er, [z(r, {
484
486
  name: f(e.iconHint),
485
- size: vr
487
+ size: Nr
486
488
  }, null, 8, ["name"])]),
487
- j("span", fr, H(U(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
488
- e.choice === u.value ? (z(), A("span", {
489
+ L("span", Dr, K(q(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
490
+ e.choice === u.value ? (U(), I("span", {
489
491
  key: 0,
490
492
  class: "image-ctx-menu__current-dot",
491
- "aria-label": U(s)("imageWrap.menu.ariaLabel")
492
- }, "●", 8, pr)) : k("", !0)
493
- ], 42, ur))), 128)),
494
- e.textActions && e.textActions.length > 0 ? (z(), A(T, { key: 2 }, [r[5] ||= j("div", {
493
+ "aria-label": q(o)("imageWrap.menu.ariaLabel")
494
+ }, "●", 8, Or)) : F("", !0)
495
+ ], 42, Tr))), 128)),
496
+ e.textActions && e.textActions.length > 0 ? (U(), I(M, { key: 2 }, [n[5] ||= L("div", {
495
497
  class: "image-ctx-menu__divider",
496
498
  role: "separator"
497
- }, null, -1), (z(!0), A(T, null, V(e.textActions, (e, t) => (z(), A(T, { key: `${e.action}-${t}` }, [j("button", {
499
+ }, null, -1), (U(!0), I(M, null, G(e.textActions, (e, t) => (U(), I(M, { key: `${e.action}-${t}` }, [L("button", {
498
500
  type: "button",
499
501
  role: "menuitem",
500
502
  class: "image-ctx-menu__item image-ctx-menu__item--text",
501
503
  disabled: e.disabled,
502
- onMousedown: r[3] ||= J(() => {}, ["prevent"]),
504
+ onMousedown: n[3] ||= Y(() => {}, ["prevent"]),
503
505
  onClick: (t) => g(e)
504
- }, [j("span", hr, H(e.label), 1), e.shortcut ? (z(), A("span", gr, H(e.shortcut), 1)) : k("", !0)], 40, mr), e.dividerAfter ? (z(), A("div", _r)) : k("", !0)], 64))), 128))], 64)) : k("", !0)
505
- ], 46, or)) : k("", !0)]));
506
+ }, [L("span", Ar, K(e.label), 1), e.shortcut ? (U(), I("span", jr, K(e.shortcut), 1)) : F("", !0)], 40, kr), e.dividerAfter ? (U(), I("div", Mr)) : F("", !0)], 64))), 128))], 64)) : F("", !0)
507
+ ], 46, xr)) : F("", !0)]));
506
508
  }
507
- }), [["__scopeId", "data-v-37e33eb5"]]), Sr = ["disabled", "onMousedown"], Cr = {
509
+ }), [["__scopeId", "data-v-37e33eb5"]]), Lr = ["disabled", "onMousedown"], Rr = {
508
510
  key: 0,
509
511
  class: "ctx-menu__icon"
510
- }, wr = { class: "ctx-menu__label" }, Tr = {
512
+ }, zr = { class: "ctx-menu__label" }, Br = {
511
513
  key: 1,
512
514
  class: "ctx-menu__shortcut"
513
- }, Er = 220, Dr = 32, Or = 10, kr = /*#__PURE__*/ e(/* @__PURE__ */ N({
515
+ }, Vr = 220, Hr = 32, Ur = 10, Wr = /*#__PURE__*/ t(/* @__PURE__ */ B({
514
516
  __name: "TextContextMenu",
515
517
  props: {
516
518
  isOpen: { type: Boolean },
@@ -524,11 +526,11 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
524
526
  customItems: {}
525
527
  },
526
528
  emits: ["close", "action"],
527
- setup(e, { emit: n }) {
528
- let r = e, i = ({ node: e }) => e;
529
- i.props = ["node"];
530
- let a = n, { t: o } = t(), s = ar(), c = B(null), l = D(() => {
531
- let e = [], t = r.customItems ?? [];
529
+ setup(e, { emit: t }) {
530
+ let n = e, r = ({ node: e }) => e;
531
+ r.props = ["node"];
532
+ let i = t, { t: a } = c(), o = br(), s = W(null), l = N(() => {
533
+ let e = [], t = n.customItems ?? [];
532
534
  for (let [n, r] of t.entries()) e.push({
533
535
  id: `custom-${r.id}`,
534
536
  label: r.label,
@@ -543,28 +545,28 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
543
545
  });
544
546
  return e.push({
545
547
  id: "cut",
546
- label: o("cut"),
548
+ label: a("cut"),
547
549
  action: "cut",
548
- shortcut: o("contextMenu.cutShortcut"),
549
- disabled: !r.hasSelection || !r.isEditable
550
+ shortcut: a("contextMenu.cutShortcut"),
551
+ disabled: !n.hasSelection || !n.isEditable
550
552
  }, {
551
553
  id: "copy",
552
- label: o("copy"),
554
+ label: a("copy"),
553
555
  action: "copy",
554
- shortcut: o("contextMenu.copyShortcut"),
555
- disabled: !r.hasSelection
556
+ shortcut: a("contextMenu.copyShortcut"),
557
+ disabled: !n.hasSelection
556
558
  }, {
557
559
  id: "paste",
558
- label: o("paste"),
560
+ label: a("paste"),
559
561
  action: "paste",
560
- shortcut: o("contextMenu.pasteShortcut"),
561
- disabled: !r.isEditable
562
+ shortcut: a("contextMenu.pasteShortcut"),
563
+ disabled: !n.isEditable
562
564
  }, {
563
565
  id: "pasteAsPlainText",
564
- label: o("pasteUnformatted"),
566
+ label: a("pasteUnformatted"),
565
567
  action: "pasteAsPlainText",
566
- shortcut: o("contextMenu.pastePlainTextShortcut"),
567
- disabled: !r.isEditable
568
+ shortcut: a("contextMenu.pastePlainTextShortcut"),
569
+ disabled: !n.isEditable
568
570
  }, {
569
571
  id: "div1",
570
572
  label: "",
@@ -572,49 +574,49 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
572
574
  divider: !0
573
575
  }, {
574
576
  id: "delete",
575
- label: o("delete"),
577
+ label: a("delete"),
576
578
  action: "delete",
577
- shortcut: o("contextMenu.deleteShortcut"),
578
- disabled: !r.hasSelection || !r.isEditable
579
+ shortcut: a("contextMenu.deleteShortcut"),
580
+ disabled: !n.hasSelection || !n.isEditable
579
581
  }, {
580
582
  id: "selectAll",
581
- label: o("selectAll"),
583
+ label: a("selectAll"),
582
584
  action: "selectAll",
583
- shortcut: o("contextMenu.selectAllShortcut")
584
- }), r.onImage && r.isEditable && e.push({
585
+ shortcut: a("contextMenu.selectAllShortcut")
586
+ }), n.onImage && n.isEditable && e.push({
585
587
  id: "div-img",
586
588
  label: "",
587
589
  action: "",
588
590
  divider: !0
589
591
  }, {
590
592
  id: "replaceImage",
591
- label: o("imageOverlay.replaceImage"),
593
+ label: a("imageOverlay.replaceImage"),
592
594
  action: "replaceImage"
593
595
  }, {
594
596
  id: "imageProperties",
595
- label: o("imageWrap.menu.imageProperties"),
597
+ label: a("imageWrap.menu.imageProperties"),
596
598
  action: "imageProperties"
597
599
  }, {
598
600
  id: "deleteImage",
599
- label: o("imageOverlay.deleteImage"),
601
+ label: a("imageOverlay.deleteImage"),
600
602
  action: "deleteImage",
601
- shortcut: o("contextMenu.deleteShortcut")
602
- }), r.inTable && r.isEditable && e.push({
603
+ shortcut: a("contextMenu.deleteShortcut")
604
+ }), n.inTable && n.isEditable && e.push({
603
605
  id: "div2",
604
606
  label: "",
605
607
  action: "",
606
608
  divider: !0
607
609
  }, {
608
610
  id: "addRowAbove",
609
- label: o("insertRowAbove"),
611
+ label: a("insertRowAbove"),
610
612
  action: "addRowAbove"
611
613
  }, {
612
614
  id: "addRowBelow",
613
- label: o("insertRowBelow"),
615
+ label: a("insertRowBelow"),
614
616
  action: "addRowBelow"
615
617
  }, {
616
618
  id: "deleteRow",
617
- label: o("deleteRow"),
619
+ label: a("deleteRow"),
618
620
  action: "deleteRow"
619
621
  }, {
620
622
  id: "div3",
@@ -623,15 +625,15 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
623
625
  divider: !0
624
626
  }, {
625
627
  id: "addColLeft",
626
- label: o("insertColumnLeft"),
628
+ label: a("insertColumnLeft"),
627
629
  action: "addColumnLeft"
628
630
  }, {
629
631
  id: "addColRight",
630
- label: o("insertColumnRight"),
632
+ label: a("insertColumnRight"),
631
633
  action: "addColumnRight"
632
634
  }, {
633
635
  id: "deleteCol",
634
- label: o("deleteColumn"),
636
+ label: a("deleteColumn"),
635
637
  action: "deleteColumn"
636
638
  }, {
637
639
  id: "div4",
@@ -640,14 +642,14 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
640
642
  divider: !0
641
643
  }, {
642
644
  id: "mergeCells",
643
- label: o("table.mergeCells"),
645
+ label: a("table.mergeCells"),
644
646
  action: "mergeCells",
645
- disabled: !r.canMergeCells
647
+ disabled: !n.canMergeCells
646
648
  }, {
647
649
  id: "splitCell",
648
- label: o("table.splitCell"),
650
+ label: a("table.splitCell"),
649
651
  action: "splitCell",
650
- disabled: !r.canSplitCell
652
+ disabled: !n.canSplitCell
651
653
  }, {
652
654
  id: "div5",
653
655
  label: "",
@@ -655,16 +657,16 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
655
657
  divider: !0
656
658
  }, {
657
659
  id: "selectTable",
658
- label: o("table.selectTable"),
660
+ label: a("table.selectTable"),
659
661
  action: "selectTable"
660
662
  }, {
661
663
  id: "deleteTable",
662
- label: o("table.deleteTable"),
664
+ label: a("table.deleteTable"),
663
665
  action: "deleteTable"
664
666
  }), e;
665
- }), u = D(() => {
666
- let e = r.position.x, t = r.position.y, n = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = n * Dr + i * 9;
667
- return typeof window < "u" && (e + Er + Or > window.innerWidth && (e = window.innerWidth - Er - Or), t + a + Or > window.innerHeight && (t = window.innerHeight - a - Or)), {
667
+ }), u = N(() => {
668
+ let e = n.position.x, t = n.position.y, r = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = r * Hr + i * 9;
669
+ return typeof window < "u" && (e + Vr + Ur > window.innerWidth && (e = window.innerWidth - Vr - Ur), t + a + Ur > window.innerHeight && (t = window.innerHeight - a - Ur)), {
668
670
  position: "fixed",
669
671
  left: `${e}px`,
670
672
  top: `${t}px`,
@@ -672,42 +674,42 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
672
674
  };
673
675
  });
674
676
  function d(e) {
675
- e && (a("action", e), a("close"));
677
+ e && (i("action", e), i("close"));
676
678
  }
677
679
  function f(e) {
678
- e.key === "Escape" && a("close");
680
+ e.key === "Escape" && i("close");
679
681
  }
680
- return G(() => r.isOpen, (e) => {
681
- e && I(() => c.value?.focus());
682
- }), (t, n) => (z(), O(E, { to: "body" }, [e.isOpen ? (z(), A("div", {
682
+ return J(() => n.isOpen, (e) => {
683
+ e && be(() => s.value?.focus());
684
+ }), (t, n) => (U(), P(pe, { to: "body" }, [e.isOpen ? (U(), I("div", {
683
685
  key: 0,
684
686
  class: "ctx-menu-backdrop",
685
687
  onMousedown: n[0] ||= (e) => t.$emit("close"),
686
- onContextmenu: n[1] ||= J((e) => t.$emit("close"), ["prevent"])
687
- }, null, 32)) : k("", !0), e.isOpen ? (z(), A("div", {
688
+ onContextmenu: n[1] ||= Y((e) => t.$emit("close"), ["prevent"])
689
+ }, null, 32)) : F("", !0), e.isOpen ? (U(), I("div", {
688
690
  key: 1,
689
691
  ref_key: "menuRef",
690
- ref: c,
691
- class: L(["ctx-menu", U(s)]),
692
- style: R(u.value),
693
- onContextmenu: n[2] ||= J(() => {}, ["prevent"]),
692
+ ref: s,
693
+ class: V(["ctx-menu", q(o)]),
694
+ style: H(u.value),
695
+ onContextmenu: n[2] ||= Y(() => {}, ["prevent"]),
694
696
  onKeydown: f
695
- }, [(z(!0), A(T, null, V(l.value, (e, t) => (z(), A("button", {
697
+ }, [(U(!0), I(M, null, G(l.value, (e, t) => (U(), I("button", {
696
698
  key: e.id || t,
697
- class: L(["ctx-menu__item", {
699
+ class: V(["ctx-menu__item", {
698
700
  "ctx-menu__item--disabled": e.disabled,
699
701
  "ctx-menu__item--divider": e.divider,
700
702
  "ctx-menu__item--emphasis": e.emphasis
701
703
  }]),
702
704
  disabled: e.disabled,
703
- onMousedown: J((t) => d(e.action), ["prevent"])
705
+ onMousedown: Y((t) => d(e.action), ["prevent"])
704
706
  }, [
705
- e.icon ? (z(), A("span", Cr, [M(i, { node: e.icon }, null, 8, ["node"])])) : k("", !0),
706
- j("span", wr, H(e.label), 1),
707
- e.shortcut ? (z(), A("span", Tr, H(e.shortcut), 1)) : k("", !0)
708
- ], 42, Sr))), 128))], 38)) : k("", !0)]));
707
+ e.icon ? (U(), I("span", Rr, [z(r, { node: e.icon }, null, 8, ["node"])])) : F("", !0),
708
+ L("span", zr, K(e.label), 1),
709
+ e.shortcut ? (U(), I("span", Br, K(e.shortcut), 1)) : F("", !0)
710
+ ], 42, Lr))), 128))], 38)) : F("", !0)]));
709
711
  }
710
- }), [["__scopeId", "data-v-f7db4540"]]), Ar = /* @__PURE__ */ N({
712
+ }), [["__scopeId", "data-v-f7db4540"]]), Gr = /* @__PURE__ */ B({
711
713
  __name: "DocxEditorOverlays",
712
714
  props: {
713
715
  readOnly: { type: Boolean },
@@ -726,7 +728,7 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
726
728
  ],
727
729
  setup(e, { emit: t }) {
728
730
  let n = t;
729
- return (t, r) => (z(), A(T, null, [M(kr, {
731
+ return (t, r) => (U(), I(M, null, [z(Wr, {
730
732
  "is-open": e.contextMenu.isOpen,
731
733
  position: e.contextMenu.position,
732
734
  "has-selection": e.contextMenu.hasSelection,
@@ -748,7 +750,7 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
748
750
  "can-merge-cells",
749
751
  "can-split-cell",
750
752
  "custom-items"
751
- ]), M(xr, {
753
+ ]), z(Ir, {
752
754
  state: e.imageContextMenu,
753
755
  "text-actions": e.imageContextMenuTextActions,
754
756
  "can-open-properties": e.canOpenImageProperties,
@@ -765,7 +767,7 @@ var or = ["aria-label"], sr = { class: "image-ctx-menu__icon" }, cr = { class: "
765
767
  });
766
768
  //#endregion
767
769
  //#region src/composables/imageOverlayRect.ts
768
- function jr(e) {
770
+ function Kr(e) {
769
771
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
770
772
  return {
771
773
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -776,13 +778,13 @@ function jr(e) {
776
778
  }
777
779
  //#endregion
778
780
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
779
- var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
781
+ var qr = ["data-handle", "onMousedown"], Jr = ["title"], Yr = {
780
782
  key: 0,
781
783
  class: "image-overlay__dim"
782
- }, Fr = {
784
+ }, Xr = {
783
785
  key: 1,
784
786
  class: "image-overlay__dim image-overlay__dim--rotate"
785
- }, Ir = 4, Lr = 15, Rr = 250, zr = 700, Br = /*#__PURE__*/ e(/* @__PURE__ */ N({
787
+ }, Zr = 4, Qr = 15, $r = 250, ei = 700, ti = /*#__PURE__*/ t(/* @__PURE__ */ B({
786
788
  __name: "ImageSelectionOverlay",
787
789
  props: {
788
790
  imageInfo: {},
@@ -795,8 +797,8 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
795
797
  "interact-end",
796
798
  "context-menu"
797
799
  ],
798
- setup(e, { emit: n }) {
799
- let { t: r } = t(), i = e, a = n, o = B(null), s = B(!1), c = B(!1), l = B(!1), u = B(0), d = B(0), f = B(0), p = B(null), m = "se", h = 0, g = 0, _ = 0, v = 0, y = null, b = null, x = null, ee = null;
800
+ setup(e, { emit: t }) {
801
+ let { t: n } = c(), r = e, i = t, a = W(null), o = W(!1), s = W(!1), l = W(!1), u = W(0), d = W(0), f = W(0), p = W(null), m = "se", h = 0, g = 0, _ = 0, v = 0, y = null, b = null, x = null, ee = null;
800
802
  function S(e, t) {
801
803
  if (!e) return null;
802
804
  try {
@@ -812,37 +814,37 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
812
814
  return typeof t == "string" ? t : null;
813
815
  }
814
816
  function ne() {
815
- return o.value?.closest(".docx-editor-vue__pages-viewport")?.querySelector(".docx-editor-vue__pages") ?? null;
817
+ return a.value?.closest(".docx-editor-vue__pages-viewport")?.querySelector(".docx-editor-vue__pages") ?? null;
816
818
  }
817
819
  function ie() {
818
- let e = i.imageInfo;
820
+ let e = r.imageInfo;
819
821
  if (!e) return null;
820
822
  if (e.element.isConnected) return e.element;
821
823
  let t = ne();
822
824
  if (!t) return null;
823
- let n = it(t, e.pmPos);
824
- return n ? qe(n) : null;
825
+ let n = _t(t, e.pmPos);
826
+ return n ? ot(n) : null;
825
827
  }
826
828
  function C() {
827
829
  let e = ie();
828
- if (!e || !o.value) {
830
+ if (!e || !a.value) {
829
831
  p.value = null;
830
832
  return;
831
833
  }
832
- let t = o.value.offsetParent;
834
+ let t = a.value.offsetParent;
833
835
  if (!(t instanceof HTMLElement)) {
834
836
  p.value = null;
835
837
  return;
836
838
  }
837
839
  let n = t.getBoundingClientRect();
838
- p.value = jr({
840
+ p.value = Kr({
839
841
  imageRect: e.getBoundingClientRect(),
840
842
  parentRect: n,
841
843
  scrollLeft: t.scrollLeft,
842
844
  scrollTop: t.scrollTop,
843
845
  parentOffsetWidth: t.offsetWidth,
844
846
  parentClientWidth: t.clientWidth,
845
- zoom: i.zoom
847
+ zoom: r.zoom
846
848
  });
847
849
  }
848
850
  let ae = null;
@@ -853,41 +855,41 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
853
855
  let o = a - r;
854
856
  C();
855
857
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
856
- n = c === t ? n + 1 : 0, t = c, !(o >= Rr && n >= 2) && o < zr && (e = requestAnimationFrame(i));
858
+ n = c === t ? n + 1 : 0, t = c, !(o >= $r && n >= 2) && o < ei && (e = requestAnimationFrame(i));
857
859
  };
858
860
  e = requestAnimationFrame(i);
859
- let a = setTimeout(C, Rr);
861
+ let a = setTimeout(C, $r);
860
862
  ae = () => {
861
863
  cancelAnimationFrame(e), clearTimeout(a);
862
864
  };
863
865
  }
864
- G(() => i.imageInfo, (e, t, n) => {
865
- if (!i.imageInfo) {
866
+ J(() => r.imageInfo, (e, t, n) => {
867
+ if (!r.imageInfo) {
866
868
  p.value = null;
867
869
  return;
868
870
  }
869
871
  oe(), n(() => ae?.());
870
- }, { immediate: !0 }), G(() => i.zoom, () => {
871
- i.imageInfo && oe();
872
- }), G(() => i.imageInfo, (e, t, n) => {
873
- if (!i.imageInfo) return;
874
- let r = () => {
872
+ }, { immediate: !0 }), J(() => r.zoom, () => {
873
+ r.imageInfo && oe();
874
+ }), J(() => r.imageInfo, (e, t, n) => {
875
+ if (!r.imageInfo) return;
876
+ let i = () => {
875
877
  b && cancelAnimationFrame(b), b = requestAnimationFrame(C);
876
- }, a = o.value?.closest(".docx-editor-vue__pages-viewport");
877
- a?.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r, { passive: !0 });
878
+ }, o = a.value?.closest(".docx-editor-vue__pages-viewport");
879
+ o?.addEventListener("scroll", i, { passive: !0 }), window.addEventListener("resize", i, { passive: !0 });
878
880
  let s = null, c = !1;
879
- I(() => {
880
- if (c || !i.imageInfo) return;
881
+ be(() => {
882
+ if (c || !r.imageInfo) return;
881
883
  let e = ne();
882
884
  e && (s = new MutationObserver(() => oe()), s.observe(e, {
883
885
  attributes: !0,
884
886
  attributeFilter: ["style"]
885
887
  }));
886
888
  }), n(() => {
887
- c = !0, a?.removeEventListener("scroll", r), window.removeEventListener("resize", r), s?.disconnect(), b && cancelAnimationFrame(b);
889
+ c = !0, o?.removeEventListener("scroll", i), window.removeEventListener("resize", i), s?.disconnect(), b && cancelAnimationFrame(b);
888
890
  });
889
891
  }, { immediate: !0 });
890
- let w = D(() => s.value ? u.value : p.value?.width || 0), E = D(() => s.value ? d.value : p.value?.height || 0), se = D(() => {
892
+ let w = N(() => o.value ? u.value : p.value?.width || 0), T = N(() => o.value ? d.value : p.value?.height || 0), se = N(() => {
891
893
  let e = p.value;
892
894
  if (!e) return {
893
895
  position: "absolute",
@@ -896,20 +898,20 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
896
898
  visibility: "hidden",
897
899
  pointerEvents: "none"
898
900
  };
899
- let t = s.value ? u.value : e.width, n = s.value ? d.value : e.height, r = i.zoom || 1;
901
+ let t = o.value ? u.value : e.width, n = o.value ? d.value : e.height, i = r.zoom || 1;
900
902
  return {
901
903
  position: "absolute",
902
- left: `${e.left * r}px`,
903
- top: `${e.top * r}px`,
904
+ left: `${e.left * i}px`,
905
+ top: `${e.top * i}px`,
904
906
  width: `${t}px`,
905
907
  height: `${n}px`,
906
- transform: r === 1 ? void 0 : `scale(${r})`,
908
+ transform: i === 1 ? void 0 : `scale(${i})`,
907
909
  transformOrigin: "top left",
908
910
  zIndex: re.imageOverlay,
909
911
  pointerEvents: "auto"
910
912
  };
911
- }), O = D(() => {
912
- let e = w.value, t = E.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
913
+ }), ce = N(() => {
914
+ let e = w.value, t = T.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
913
915
  return [
914
916
  {
915
917
  pos: "nw",
@@ -977,11 +979,11 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
977
979
  }
978
980
  ];
979
981
  });
980
- function ce(e, t) {
981
- !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", le), document.addEventListener("mouseup", ue));
982
+ function le(e, t) {
983
+ !r.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), o.value = !0, i("interact-start"), document.addEventListener("mousemove", E), document.addEventListener("mouseup", D));
982
984
  }
983
- function le(e) {
984
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = $e(m, n, r, _, v, a);
985
+ function E(e) {
986
+ let t = r.zoom, n = (e.clientX - h) / t, i = (e.clientY - g) / t, a = !e.shiftKey, o = ft(m, n, i, _, v, a);
985
987
  u.value = Math.round(o.width), d.value = Math.round(o.height);
986
988
  let s = y;
987
989
  s && (p.value = {
@@ -991,83 +993,83 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
991
993
  height: s.height
992
994
  });
993
995
  }
994
- function ue() {
995
- document.removeEventListener("mousemove", le), document.removeEventListener("mouseup", ue), s.value = !1, y = null, a("interact-end");
996
- let e = i.view, t = i.imageInfo;
996
+ function D() {
997
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", D), o.value = !1, y = null, i("interact-end");
998
+ let e = r.view, t = r.imageInfo;
997
999
  if (!e || !t) {
998
1000
  C();
999
1001
  return;
1000
1002
  }
1001
- let n = nt(e, t.pmPos, u.value, d.value);
1002
- n !== null && ve(n), I(() => C());
1003
+ let n = ht(e, t.pmPos, u.value, d.value);
1004
+ n !== null && _e(n), be(() => C());
1003
1005
  }
1004
- let M = 0, N = 0, P = 0, F = 0, de = null, L = null;
1005
- function pe(e) {
1006
+ let ue = 0, de = 0, fe = 0, O = 0, k = null, A = null;
1007
+ function j(e) {
1006
1008
  if (!e) return 0;
1007
1009
  let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
1008
1010
  return t ? parseFloat(t) : 0;
1009
1011
  }
1010
- function me(e, t) {
1012
+ function pe(e, t) {
1011
1013
  let n = /scaleX\(-1\)/.test(e || ""), r = /scaleY\(-1\)/.test(e || ""), i = [], a = (t % 360 + 360) % 360;
1012
1014
  return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
1013
1015
  }
1014
- function he(e, t) {
1015
- return Math.atan2(e - M, -(t - N)) * 180 / Math.PI;
1016
+ function me(e, t) {
1017
+ return Math.atan2(e - ue, -(t - de)) * 180 / Math.PI;
1016
1018
  }
1017
- function ge(e) {
1018
- if (!i.imageInfo) return;
1019
- let t = i.imageInfo.element.getBoundingClientRect();
1020
- M = t.left + t.width / 2, N = t.top + t.height / 2, de = te(S(i.view, i.imageInfo.pmPos)), F = pe(de), L = i.imageInfo.element.querySelector("img"), P = he(e.clientX, e.clientY), f.value = F, l.value = !0, a("interact-start"), document.addEventListener("mousemove", W), document.addEventListener("mouseup", _e);
1019
+ function P(e) {
1020
+ if (!r.imageInfo) return;
1021
+ let t = r.imageInfo.element.getBoundingClientRect();
1022
+ ue = t.left + t.width / 2, de = t.top + t.height / 2, k = te(S(r.view, r.imageInfo.pmPos)), O = j(k), A = r.imageInfo.element.querySelector("img"), fe = me(e.clientX, e.clientY), f.value = O, l.value = !0, i("interact-start"), document.addEventListener("mousemove", he), document.addEventListener("mouseup", ge);
1021
1023
  }
1022
- function W(e) {
1023
- let t = he(e.clientX, e.clientY) - P, n = F + t;
1024
- e.shiftKey || (n = Math.round(n / Lr) * Lr), f.value = (n % 360 + 360) % 360, L && (L.style.transform = me(de, f.value) || "");
1024
+ function he(e) {
1025
+ let t = me(e.clientX, e.clientY) - fe, n = O + t;
1026
+ e.shiftKey || (n = Math.round(n / Qr) * Qr), f.value = (n % 360 + 360) % 360, A && (A.style.transform = pe(k, f.value) || "");
1025
1027
  }
1026
- function _e() {
1027
- document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", _e), l.value = !1, a("interact-end");
1028
- let e = i.view, t = i.imageInfo;
1028
+ function ge() {
1029
+ document.removeEventListener("mousemove", he), document.removeEventListener("mouseup", ge), l.value = !1, i("interact-end");
1030
+ let e = r.view, t = r.imageInfo;
1029
1031
  try {
1030
1032
  let n = e && t ? S(e, t.pmPos) : null;
1031
1033
  e && t && n && (e.dispatch(e.state.tr.setNodeMarkup(t.pmPos, void 0, {
1032
1034
  ...n.attrs,
1033
- transform: me(te(n), f.value)
1034
- })), ve(t.pmPos));
1035
+ transform: pe(te(n), f.value)
1036
+ })), _e(t.pmPos));
1035
1037
  } catch {} finally {
1036
- L && (L.style.transform = ""), L = null, de = null;
1038
+ A && (A.style.transform = ""), A = null, k = null;
1037
1039
  }
1038
- I(() => C());
1040
+ be(() => C());
1039
1041
  }
1040
- let K = null;
1041
- function q(e) {
1042
- if (!i.imageInfo || !p.value) return;
1043
- let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1044
- let s = e.clientX - t, l = e.clientY - n;
1045
- if (!(!o && Math.sqrt(s * s + l * l) < Ir)) {
1042
+ let R = null;
1043
+ function z(e) {
1044
+ if (!r.imageInfo || !p.value) return;
1045
+ let t = e.clientX, n = e.clientY, a = p.value, o = !1, c = (e) => {
1046
+ let c = e.clientX - t, l = e.clientY - n;
1047
+ if (!(!o && Math.sqrt(c * c + l * l) < Zr)) {
1046
1048
  if (!o) {
1047
- o = !0, c.value = !0, a("interact-start"), K = document.createElement("div"), K.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
1048
- let e = i.zoom;
1049
- K.style.width = `${r.width * e}px`, K.style.height = `${r.height * e}px`, document.body.appendChild(K);
1049
+ o = !0, s.value = !0, i("interact-start"), R = document.createElement("div"), R.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
1050
+ let e = r.zoom;
1051
+ R.style.width = `${a.width * e}px`, R.style.height = `${a.height * e}px`, document.body.appendChild(R);
1050
1052
  }
1051
- if (K) {
1052
- let t = i.zoom;
1053
- K.style.left = `${e.clientX - r.width * t / 2}px`, K.style.top = `${e.clientY - r.height * t / 2}px`;
1053
+ if (R) {
1054
+ let t = r.zoom;
1055
+ R.style.left = `${e.clientX - a.width * t / 2}px`, R.style.top = `${e.clientY - a.height * t / 2}px`;
1054
1056
  }
1055
1057
  }
1056
1058
  }, l = (e) => {
1057
- document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), x = null, ee = null, K &&= (K.remove(), null), c.value = !1, o && (a("interact-end"), Y(e.clientX, e.clientY));
1059
+ document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", l), x = null, ee = null, R &&= (R.remove(), null), s.value = !1, o && (i("interact-end"), B(e.clientX, e.clientY));
1058
1060
  };
1059
- x = s, ee = l, document.addEventListener("mousemove", s), document.addEventListener("mouseup", l);
1061
+ x = c, ee = l, document.addEventListener("mousemove", c), document.addEventListener("mouseup", l);
1060
1062
  }
1061
- function Y(e, t) {
1062
- let n = i.view, r = i.imageInfo;
1063
- if (!n || !r) return;
1064
- let a = S(n, r.pmPos);
1065
- if (a) {
1066
- if (rt(a)) {
1067
- let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1068
- if (!a || a.length === 0) return;
1063
+ function B(e, t) {
1064
+ let n = r.view, i = r.imageInfo;
1065
+ if (!n || !i) return;
1066
+ let o = S(n, i.pmPos);
1067
+ if (o) {
1068
+ if (gt(o)) {
1069
+ let o = (a.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1070
+ if (!o || o.length === 0) return;
1069
1071
  let s = null;
1070
- for (let e of a) {
1072
+ for (let e of o) {
1071
1073
  let n = e.getBoundingClientRect();
1072
1074
  if (t >= n.top && t <= n.bottom) {
1073
1075
  s = e.querySelector(".layout-page-content");
@@ -1075,66 +1077,66 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1075
1077
  }
1076
1078
  }
1077
1079
  if (!s) {
1078
- let e = a.item(a.length - 1);
1080
+ let e = o.item(o.length - 1);
1079
1081
  s = e ? e.querySelector(".layout-page-content") : null;
1080
1082
  }
1081
1083
  if (!s) return;
1082
- let c = s.getBoundingClientRect(), l = i.zoom, u = Ue((e - c.left) / l), d = Ue((t - c.top) / l), f = et(n, r.pmPos, u, d);
1083
- f !== null && ve(f);
1084
+ let c = s.getBoundingClientRect(), l = r.zoom, u = nt((e - c.left) / l), d = nt((t - c.top) / l), f = pt(n, i.pmPos, u, d);
1085
+ f !== null && _e(f);
1084
1086
  } else {
1085
- let i = ne();
1086
- if (!i) return;
1087
- let a = Qe(i, e, t, 1);
1087
+ let r = ne();
1088
+ if (!r) return;
1089
+ let a = dt(r, e, t, 1);
1088
1090
  if (a == null || a < 0) return;
1089
- let o = tt(n, r.pmPos, a);
1090
- o !== null && ve(o);
1091
+ let o = mt(n, i.pmPos, a);
1092
+ o !== null && _e(o);
1091
1093
  }
1092
- I(() => C());
1094
+ be(() => C());
1093
1095
  }
1094
1096
  }
1095
- function ve(e) {
1096
- let t = i.view;
1097
+ function _e(e) {
1098
+ let t = r.view;
1097
1099
  if (t) try {
1098
- let n = Ve.create(t.state.doc, e);
1100
+ let n = Z.create(t.state.doc, e);
1099
1101
  t.dispatch(t.state.tr.setSelection(n));
1100
1102
  } catch {}
1101
1103
  }
1102
- return fe(() => {
1103
- document.removeEventListener("mousemove", le), document.removeEventListener("mouseup", ue), document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", _e), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), K &&= (K.remove(), null), b && cancelAnimationFrame(b), ae?.();
1104
- }), (t, n) => e.imageInfo ? (z(), A("div", {
1104
+ return xe(() => {
1105
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", D), document.removeEventListener("mousemove", he), document.removeEventListener("mouseup", ge), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), R &&= (R.remove(), null), b && cancelAnimationFrame(b), ae?.();
1106
+ }), (t, r) => e.imageInfo ? (U(), I("div", {
1105
1107
  key: 0,
1106
1108
  ref_key: "overlayRootRef",
1107
- ref: o,
1109
+ ref: a,
1108
1110
  class: "image-overlay",
1109
- style: R(se.value),
1110
- onMousedown: n[3] ||= J(() => {}, ["stop"])
1111
+ style: H(se.value),
1112
+ onMousedown: r[3] ||= Y(() => {}, ["stop"])
1111
1113
  }, [
1112
- n[4] ||= j("div", { class: "image-overlay__border" }, null, -1),
1113
- j("div", {
1114
+ r[4] ||= L("div", { class: "image-overlay__border" }, null, -1),
1115
+ L("div", {
1114
1116
  class: "image-overlay__body",
1115
- style: R({ cursor: c.value ? "grabbing" : "grab" }),
1116
- onMousedown: n[0] ||= J((e) => q(e), ["prevent", "stop"]),
1117
- onContextmenu: n[1] ||= J((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1117
+ style: H({ cursor: s.value ? "grabbing" : "grab" }),
1118
+ onMousedown: r[0] ||= Y((e) => z(e), ["prevent", "stop"]),
1119
+ onContextmenu: r[1] ||= Y((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1118
1120
  }, null, 36),
1119
- (z(!0), A(T, null, V(O.value, (e) => (z(), A("div", {
1121
+ (U(!0), I(M, null, G(ce.value, (e) => (U(), I("div", {
1120
1122
  key: e.pos,
1121
1123
  class: "image-overlay__handle",
1122
- style: R(e.style),
1124
+ style: H(e.style),
1123
1125
  "data-handle": e.pos,
1124
- onMousedown: J((t) => ce(t, e.pos), ["prevent", "stop"])
1125
- }, null, 44, Mr))), 128)),
1126
- n[5] ||= j("div", { class: "image-overlay__rotate-line" }, null, -1),
1127
- j("div", {
1126
+ onMousedown: Y((t) => le(t, e.pos), ["prevent", "stop"])
1127
+ }, null, 44, qr))), 128)),
1128
+ r[5] ||= L("div", { class: "image-overlay__rotate-line" }, null, -1),
1129
+ L("div", {
1128
1130
  class: "image-overlay__rotate-handle",
1129
- style: R({ left: `${w.value / 2 - 7}px` }),
1130
- title: U(r)("imageOverlay.rotate"),
1131
- onMousedown: n[2] ||= J((e) => ge(e), ["prevent", "stop"])
1132
- }, null, 44, Nr),
1133
- s.value ? (z(), A("div", Pr, H(Math.round(u.value)) + " × " + H(Math.round(d.value)), 1)) : k("", !0),
1134
- l.value ? (z(), A("div", Fr, H(Math.round(f.value)) + "° ", 1)) : k("", !0)
1135
- ], 36)) : k("", !0);
1131
+ style: H({ left: `${w.value / 2 - 7}px` }),
1132
+ title: q(n)("imageOverlay.rotate"),
1133
+ onMousedown: r[2] ||= Y((e) => P(e), ["prevent", "stop"])
1134
+ }, null, 44, Jr),
1135
+ o.value ? (U(), I("div", Yr, K(Math.round(u.value)) + " × " + K(Math.round(d.value)), 1)) : F("", !0),
1136
+ l.value ? (U(), I("div", Xr, K(Math.round(f.value)) + "° ", 1)) : F("", !0)
1137
+ ], 36)) : F("", !0);
1136
1138
  }
1137
- }), [["__scopeId", "data-v-4741c675"]]), Vr = ["title", "aria-label"], Hr = /* @__PURE__ */ N({
1139
+ }), [["__scopeId", "data-v-4741c675"]]), ni = ["title", "aria-label"], ri = /* @__PURE__ */ B({
1138
1140
  __name: "OutlineToggleButton",
1139
1141
  props: {
1140
1142
  leftOffset: {},
@@ -1142,24 +1144,24 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1142
1144
  },
1143
1145
  emits: ["toggle"],
1144
1146
  setup(e) {
1145
- let { t: r } = t();
1146
- return (t, i) => (z(), A("button", {
1147
+ let { t } = c();
1148
+ return (n, i) => (U(), I("button", {
1147
1149
  type: "button",
1148
1150
  class: "docx-outline-toggle docx-editor-vue__outline-toggle",
1149
- style: R({
1151
+ style: H({
1150
1152
  left: e.leftOffset + "px",
1151
1153
  top: e.topPx + "px"
1152
1154
  }),
1153
- title: U(r)("editor.showDocumentOutline"),
1154
- "aria-label": U(r)("editor.showDocumentOutline"),
1155
- onClick: i[0] ||= (e) => t.$emit("toggle"),
1156
- onMousedown: i[1] ||= J(() => {}, ["stop"])
1157
- }, [M(n, {
1155
+ title: q(t)("editor.showDocumentOutline"),
1156
+ "aria-label": q(t)("editor.showDocumentOutline"),
1157
+ onClick: i[0] ||= (e) => n.$emit("toggle"),
1158
+ onMousedown: i[1] ||= Y(() => {}, ["stop"])
1159
+ }, [z(r, {
1158
1160
  name: "format_list_bulleted",
1159
1161
  size: 20
1160
- })], 44, Vr));
1162
+ })], 44, ni));
1161
1163
  }
1162
- }), Ur = /*#__PURE__*/ e(/* @__PURE__ */ N({
1164
+ }), ii = /*#__PURE__*/ t(/* @__PURE__ */ B({
1163
1165
  __name: "PageIndicator",
1164
1166
  props: {
1165
1167
  currentPage: {},
@@ -1167,18 +1169,18 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1167
1169
  visible: { type: Boolean }
1168
1170
  },
1169
1171
  setup(e) {
1170
- let { t: n } = t();
1171
- return (t, r) => (z(), A("div", {
1172
+ let { t } = c();
1173
+ return (n, r) => (U(), I("div", {
1172
1174
  class: "docx-editor-vue__page-indicator",
1173
- style: R({ opacity: +!!e.visible }),
1175
+ style: H({ opacity: +!!e.visible }),
1174
1176
  "aria-live": "polite",
1175
1177
  role: "status"
1176
- }, H(U(n)("viewer.pageIndicator", {
1178
+ }, K(q(t)("viewer.pageIndicator", {
1177
1179
  current: e.currentPage,
1178
1180
  total: e.totalPages
1179
1181
  })), 5));
1180
1182
  }
1181
- }), [["__scopeId", "data-v-877b9ee2"]]), Wr = ["data-folio-block-id"], Gr = ["data-folio-block-id", "title"], Kr = 2.5, qr = 5, Jr = 6, Yr = 2, Xr = 2, Zr = /*#__PURE__*/ e(/* @__PURE__ */ N({
1183
+ }), [["__scopeId", "data-v-877b9ee2"]]), ai = ["data-folio-block-id"], oi = ["data-folio-block-id", "title"], si = 2.5, ci = 5, li = 6, ui = 2, di = 2, fi = /*#__PURE__*/ t(/* @__PURE__ */ B({
1182
1184
  __name: "TemplateDirectivesOverlay",
1183
1185
  props: {
1184
1186
  getView: { type: Function },
@@ -1192,19 +1194,19 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1192
1194
  setup(e) {
1193
1195
  let t = e, n = new Set(["if", "each"]), r = new Set(["endif", "endeach"]), i = (e) => e === "each" ? "each" : "if";
1194
1196
  function a(e) {
1195
- let t = e - Jr - Kr - Yr;
1196
- return t <= 0 ? 0 : Math.floor(t / qr);
1197
+ let t = e - li - si - ui;
1198
+ return t <= 0 ? 0 : Math.floor(t / ci);
1197
1199
  }
1198
1200
  function o(e, t, n) {
1199
1201
  let r = a(n), i = Math.min(Math.max(0, e), r);
1200
- return t - Jr - Kr - (r - i) * qr;
1202
+ return t - li - si - (r - i) * ci;
1201
1203
  }
1202
1204
  function s(e, t) {
1203
- if (t.length === 0) return e.bottom - e.top >= Xr ? [e] : [];
1205
+ if (t.length === 0) return e.bottom - e.top >= di ? [e] : [];
1204
1206
  let n = [];
1205
1207
  for (let r of t) {
1206
1208
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1207
- i - t >= Xr && n.push({
1209
+ i - t >= di && n.push({
1208
1210
  top: t,
1209
1211
  bottom: i
1210
1212
  });
@@ -1269,7 +1271,7 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1269
1271
  }
1270
1272
  return i;
1271
1273
  }
1272
- let f = B([]), p = B([]), m = B(null), h = B(null), g = B(null), _ = 0, v = null;
1274
+ let f = W([]), p = W([]), m = W(null), h = W(null), g = W(null), _ = 0, v = null;
1273
1275
  function y() {
1274
1276
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1275
1277
  v = null, b();
@@ -1281,12 +1283,12 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1281
1283
  f.value = [], p.value = [], m.value = null, h.value = null;
1282
1284
  return;
1283
1285
  }
1284
- let a = st(i);
1286
+ let a = bt(i);
1285
1287
  if (a.length === 0) {
1286
1288
  f.value = [], p.value = [], m.value = null, h.value = null;
1287
1289
  return;
1288
1290
  }
1289
- let o = Ne(r, t.zoom), s = await Pe(a, {
1291
+ let o = Ke(r, t.zoom), s = await qe(a, {
1290
1292
  pagesContainer: r,
1291
1293
  zoom: t.zoom,
1292
1294
  layout: t.layout,
@@ -1295,22 +1297,22 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1295
1297
  });
1296
1298
  e === _ && (f.value = a, h.value = i.selection.head, m.value = o, p.value = s);
1297
1299
  }
1298
- G(() => [
1300
+ J(() => [
1299
1301
  t.editorState,
1300
1302
  t.zoom,
1301
1303
  t.layout,
1302
1304
  t.blocks,
1303
1305
  t.measures
1304
1306
  ], () => y());
1305
- let x = D(() => c(f.value)), ee = D(() => m.value ? d(x.value, p.value, m.value) : []), S = D(() => {
1307
+ let x = N(() => c(f.value)), ee = N(() => m.value ? d(x.value, p.value, m.value) : []), S = N(() => {
1306
1308
  let e = /* @__PURE__ */ new Map();
1307
1309
  for (let t of x.value) e.set(t.openerFrom, t.blockId), e.set(t.closerFrom, t.blockId);
1308
1310
  return e;
1309
- }), te = D(() => {
1311
+ }), te = N(() => {
1310
1312
  let e = /* @__PURE__ */ new Map();
1311
1313
  for (let t of x.value) e.set(t.closerFrom, l(t.kind, t.openerExpr));
1312
1314
  return e;
1313
- }), ne = D(() => u(x.value, h.value));
1315
+ }), ne = N(() => u(x.value, h.value));
1314
1316
  function re(e) {
1315
1317
  return e === g.value || e === ne.value;
1316
1318
  }
@@ -1337,7 +1339,7 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1337
1339
  let t = e.dataset.folioBlockId;
1338
1340
  return t === void 0 ? null : Number(t);
1339
1341
  }
1340
- function E(e) {
1342
+ function T(e) {
1341
1343
  let t = w(e.target);
1342
1344
  t !== null && (g.value = t);
1343
1345
  }
@@ -1347,43 +1349,43 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1347
1349
  let n = w(e.relatedTarget);
1348
1350
  n !== t && g.value === t && (g.value = n);
1349
1351
  }
1350
- return pe(() => y()), fe(() => {
1352
+ return Se(() => y()), xe(() => {
1351
1353
  v !== null && (cancelAnimationFrame(v), v = null);
1352
- }), (t, n) => (z(), A("div", {
1354
+ }), (t, n) => (U(), I("div", {
1353
1355
  class: "folio-template-directives-overlay",
1354
1356
  "data-folio-template-directives-overlay": "",
1355
- onPointerover: E,
1357
+ onPointerover: T,
1356
1358
  onPointerout: se
1357
- }, [(z(!0), A(T, null, V(ee.value, (t) => (z(), A(T, { key: `rail:${t.blockId}` }, [(z(!0), A(T, null, V(t.segments, (n, r) => (z(), A("div", {
1359
+ }, [(U(!0), I(M, null, G(ee.value, (t) => (U(), I(M, { key: `rail:${t.blockId}` }, [(U(!0), I(M, null, G(t.segments, (n, r) => (U(), I("div", {
1358
1360
  key: `rail:${t.blockId}:${r}`,
1359
- class: L([
1361
+ class: V([
1360
1362
  "folio-template-band-rail",
1361
1363
  `folio-template-band-rail--${t.kind}`,
1362
1364
  { "folio-template-band-rail--active": re(t.blockId) }
1363
1365
  ]),
1364
1366
  "data-folio-block-id": t.blockId,
1365
- style: R({
1367
+ style: H({
1366
1368
  position: "absolute",
1367
1369
  left: `${t.railX * e.zoom}px`,
1368
1370
  top: `${n.top * e.zoom}px`,
1369
- width: `${Kr * e.zoom}px`,
1371
+ width: `${si * e.zoom}px`,
1370
1372
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1371
1373
  })
1372
- }, null, 14, Wr))), 128))], 64))), 128)), (z(!0), A(T, null, V(p.value, (t, n) => (z(), A(T, { key: `d:${n}` }, [(z(!0), A(T, null, V(t.rects, (r, i) => (z(), A("span", {
1374
+ }, null, 14, ai))), 128))], 64))), 128)), (U(!0), I(M, null, G(p.value, (t, n) => (U(), I(M, { key: `d:${n}` }, [(U(!0), I(M, null, G(t.rects, (r, i) => (U(), I("span", {
1373
1375
  key: `d:${n}:${i}`,
1374
- class: L(oe(t.range)),
1376
+ class: V(oe(t.range)),
1375
1377
  "data-folio-block-id": C(t.range),
1376
1378
  title: ae(t.range),
1377
- style: R({
1379
+ style: H({
1378
1380
  position: "absolute",
1379
1381
  left: `${(r.x - 1) * e.zoom}px`,
1380
1382
  top: `${(r.y + 1) * e.zoom}px`,
1381
1383
  width: `${(r.width + 2) * e.zoom}px`,
1382
1384
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1383
1385
  })
1384
- }, null, 14, Gr))), 128))], 64))), 128))], 32));
1386
+ }, null, 14, oi))), 128))], 64))), 128))], 32));
1385
1387
  }
1386
- }), [["__scopeId", "data-v-142d2ac6"]]), Qr = ["href", "title"], $r = ["title"], ei = ["title"], ti = ["title"], ni = { class: "docx-hyperlink-popup__edit-row" }, ri = ["placeholder", "onKeydown"], ii = { class: "docx-hyperlink-popup__edit-row" }, ai = ["onKeydown"], oi = ["disabled"], si = /*#__PURE__*/ e(/* @__PURE__ */ N({
1388
+ }), [["__scopeId", "data-v-142d2ac6"]]), pi = ["href", "title"], mi = ["title"], hi = ["title"], gi = ["title"], _i = { class: "docx-hyperlink-popup__edit-row" }, vi = ["placeholder", "onKeydown"], yi = { class: "docx-hyperlink-popup__edit-row" }, bi = ["onKeydown"], xi = ["disabled"], Si = /*#__PURE__*/ t(/* @__PURE__ */ B({
1387
1389
  __name: "HyperlinkPopup",
1388
1390
  props: {
1389
1391
  data: {},
@@ -1396,70 +1398,70 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1396
1398
  "remove",
1397
1399
  "close"
1398
1400
  ],
1399
- setup(e, { emit: n }) {
1400
- let { t: r } = t(), i = e, a = n, o = B(!1), s = B(""), c = B(""), l = B(null), u = D(() => ({
1401
- left: (i.data?.position.left ?? 0) + "px",
1402
- top: (i.data?.position.top ?? 0) + "px"
1401
+ setup(e, { emit: t }) {
1402
+ let { t: n } = c(), r = e, i = t, a = W(!1), o = W(""), s = W(""), l = W(null), u = N(() => ({
1403
+ left: (r.data?.position.left ?? 0) + "px",
1404
+ top: (r.data?.position.top ?? 0) + "px"
1403
1405
  }));
1404
- G(() => i.data?.href, () => {
1405
- o.value = !1;
1406
+ J(() => r.data?.href, () => {
1407
+ a.value = !1;
1406
1408
  });
1407
1409
  let d = null, f = null;
1408
1410
  function p() {
1409
1411
  f &&= (clearTimeout(f), null), d &&= (document.removeEventListener("mousedown", d), null);
1410
1412
  }
1411
- G(() => i.data, (e) => {
1413
+ J(() => r.data, (e) => {
1412
1414
  p(), e && (d = (e) => {
1413
1415
  let t = l.value, n = e.target;
1414
- t && n instanceof Node && !t.contains(n) && a("close");
1416
+ t && n instanceof Node && !t.contains(n) && i("close");
1415
1417
  }, f = setTimeout(() => {
1416
1418
  d && document.addEventListener("mousedown", d);
1417
1419
  }, 0));
1418
- }, { immediate: !0 }), fe(p);
1420
+ }, { immediate: !0 }), xe(p);
1419
1421
  function m() {
1420
- i.data && (s.value = i.data.displayText, c.value = i.data.href, o.value = !0);
1422
+ r.data && (o.value = r.data.displayText, s.value = r.data.href, a.value = !0);
1421
1423
  }
1422
1424
  function h() {
1423
- c.value.trim() && (a("edit", s.value, c.value), o.value = !1);
1425
+ s.value.trim() && (i("edit", o.value, s.value), a.value = !1);
1424
1426
  }
1425
1427
  function g() {
1426
- i.data && (a("copy", i.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(i.data.href).catch(() => {}));
1428
+ r.data && (i("copy", r.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(r.data.href).catch(() => {}));
1427
1429
  }
1428
- return (t, n) => e.data ? (z(), A("div", {
1430
+ return (t, r) => e.data ? (U(), I("div", {
1429
1431
  key: 0,
1430
1432
  ref_key: "popupRef",
1431
1433
  ref: l,
1432
- class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
1433
- style: R(u.value),
1434
- onMousedown: n[6] ||= J(() => {}, ["stop"])
1435
- }, [o.value ? (z(), A(T, { key: 1 }, [j("div", ni, [K(j("input", {
1434
+ class: V(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": a.value }]),
1435
+ style: H(u.value),
1436
+ onMousedown: r[6] ||= Y(() => {}, ["stop"])
1437
+ }, [a.value ? (U(), I(M, { key: 1 }, [L("div", _i, [Oe(L("input", {
1436
1438
  class: "docx-hyperlink-popup__input",
1437
- placeholder: U(r)("displayText"),
1438
- "onUpdate:modelValue": n[2] ||= (e) => s.value = e,
1439
- onKeydown: [q(J(h, ["prevent"]), ["enter"]), n[3] ||= q((e) => t.$emit("close"), ["esc"])]
1440
- }, null, 40, ri), [[W, s.value]])]), j("div", ii, [K(j("input", {
1439
+ placeholder: q(n)("displayText"),
1440
+ "onUpdate:modelValue": r[2] ||= (e) => o.value = e,
1441
+ onKeydown: [ke(Y(h, ["prevent"]), ["enter"]), r[3] ||= ke((e) => t.$emit("close"), ["esc"])]
1442
+ }, null, 40, vi), [[Ee, o.value]])]), L("div", yi, [Oe(L("input", {
1441
1443
  class: "docx-hyperlink-popup__input",
1442
1444
  placeholder: "https://...",
1443
- "onUpdate:modelValue": n[4] ||= (e) => c.value = e,
1444
- onKeydown: [q(J(h, ["prevent"]), ["enter"]), n[5] ||= q((e) => t.$emit("close"), ["esc"])]
1445
- }, null, 40, ai), [[W, c.value]]), j("button", {
1445
+ "onUpdate:modelValue": r[4] ||= (e) => s.value = e,
1446
+ onKeydown: [ke(Y(h, ["prevent"]), ["enter"]), r[5] ||= ke((e) => t.$emit("close"), ["esc"])]
1447
+ }, null, 40, bi), [[Ee, s.value]]), L("button", {
1446
1448
  class: "docx-hyperlink-popup__apply",
1447
- disabled: !c.value.trim(),
1448
- onClick: J(h, ["prevent"])
1449
- }, H(U(r)("common.apply")), 9, oi)])], 64)) : (z(), A(T, { key: 0 }, [
1450
- n[10] ||= le("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-8bc31a34><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-8bc31a34><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-8bc31a34></circle><path d=\"M2 12h20\" data-v-8bc31a34></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-8bc31a34></path></svg></span>", 1),
1451
- j("a", {
1449
+ disabled: !s.value.trim(),
1450
+ onClick: Y(h, ["prevent"])
1451
+ }, K(q(n)("common.apply")), 9, xi)])], 64)) : (U(), I(M, { key: 0 }, [
1452
+ r[10] ||= ge("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-8bc31a34><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-8bc31a34><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-8bc31a34></circle><path d=\"M2 12h20\" data-v-8bc31a34></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-8bc31a34></path></svg></span>", 1),
1453
+ L("a", {
1452
1454
  class: "docx-hyperlink-popup__url",
1453
1455
  href: e.data.href,
1454
1456
  title: e.data.href,
1455
- onClick: n[0] ||= J((n) => t.$emit("navigate", e.data.href), ["prevent"])
1456
- }, H(e.data.href), 9, Qr),
1457
- n[11] ||= j("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1458
- j("button", {
1457
+ onClick: r[0] ||= Y((n) => t.$emit("navigate", e.data.href), ["prevent"])
1458
+ }, K(e.data.href), 9, pi),
1459
+ r[11] ||= L("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1460
+ L("button", {
1459
1461
  class: "docx-hyperlink-popup__btn",
1460
- title: U(r)("copyLink"),
1461
- onClick: J(g, ["prevent"])
1462
- }, [...n[7] ||= [j("svg", {
1462
+ title: q(n)("copyLink"),
1463
+ onClick: Y(g, ["prevent"])
1464
+ }, [...r[7] ||= [L("svg", {
1463
1465
  width: "18",
1464
1466
  height: "18",
1465
1467
  viewBox: "0 0 24 24",
@@ -1468,20 +1470,20 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1468
1470
  "stroke-width": "2",
1469
1471
  "stroke-linecap": "round",
1470
1472
  "stroke-linejoin": "round"
1471
- }, [j("rect", {
1473
+ }, [L("rect", {
1472
1474
  x: "9",
1473
1475
  y: "9",
1474
1476
  width: "13",
1475
1477
  height: "13",
1476
1478
  rx: "2",
1477
1479
  ry: "2"
1478
- }), j("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, $r),
1479
- e.readOnly ? k("", !0) : (z(), A("button", {
1480
+ }), L("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, mi),
1481
+ e.readOnly ? F("", !0) : (U(), I("button", {
1480
1482
  key: 0,
1481
1483
  class: "docx-hyperlink-popup__btn",
1482
- title: U(r)("editLink"),
1483
- onClick: J(m, ["prevent"])
1484
- }, [...n[8] ||= [j("svg", {
1484
+ title: q(n)("editLink"),
1485
+ onClick: Y(m, ["prevent"])
1486
+ }, [...r[8] ||= [L("svg", {
1485
1487
  width: "18",
1486
1488
  height: "18",
1487
1489
  viewBox: "0 0 24 24",
@@ -1490,44 +1492,44 @@ var Mr = ["data-handle", "onMousedown"], Nr = ["title"], Pr = {
1490
1492
  "stroke-width": "2",
1491
1493
  "stroke-linecap": "round",
1492
1494
  "stroke-linejoin": "round"
1493
- }, [j("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), j("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, ei)),
1494
- e.readOnly ? k("", !0) : (z(), A("button", {
1495
+ }, [L("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), L("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, hi)),
1496
+ e.readOnly ? F("", !0) : (U(), I("button", {
1495
1497
  key: 1,
1496
1498
  class: "docx-hyperlink-popup__btn",
1497
- title: U(r)("removeLink"),
1498
- onClick: n[1] ||= J((e) => t.$emit("remove"), ["prevent"])
1499
- }, [...n[9] ||= [le("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-8bc31a34><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-8bc31a34></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-8bc31a34></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-8bc31a34></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-8bc31a34></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-8bc31a34></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-8bc31a34></line></svg>", 1)]], 8, ti))
1500
- ], 64))], 38)) : k("", !0);
1499
+ title: q(n)("removeLink"),
1500
+ onClick: r[1] ||= Y((e) => t.$emit("remove"), ["prevent"])
1501
+ }, [...r[9] ||= [ge("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-8bc31a34><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-8bc31a34></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-8bc31a34></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-8bc31a34></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-8bc31a34></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-8bc31a34></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-8bc31a34></line></svg>", 1)]], 8, gi))
1502
+ ], 64))], 38)) : F("", !0);
1501
1503
  }
1502
1504
  }), [["__scopeId", "data-v-8bc31a34"]]);
1503
1505
  //#endregion
1504
1506
  //#region src/composables/commentMarks.ts
1505
- function ci(e, t) {
1507
+ function Ci(e, t) {
1506
1508
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
1507
1509
  return n === r ? null : {
1508
1510
  from: n,
1509
1511
  to: r
1510
1512
  };
1511
1513
  }
1512
- function li({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
1514
+ function wi({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
1513
1515
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
1514
- return i ? ci(e, i) : null;
1516
+ return i ? Ci(e, i) : null;
1515
1517
  }
1516
- function ui(e, t, n, r) {
1517
- let i = e.state.schema.marks.comment, a = ci(e.state.doc.content.size, t);
1518
+ function Ti(e, t, n, r) {
1519
+ let i = e.state.schema.marks.comment, a = Ci(e.state.doc.content.size, t);
1518
1520
  if (!i || !a) return !1;
1519
1521
  let o = e.state.tr;
1520
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: dt }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(He.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
1522
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: wt }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(et.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
1521
1523
  }
1522
- function di(e, t) {
1523
- let n = e.state.schema.marks.comment, r = ci(e.state.doc.content.size, t);
1524
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: dt })));
1524
+ function Ei(e, t) {
1525
+ let n = e.state.schema.marks.comment, r = Ci(e.state.doc.content.size, t);
1526
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: wt })));
1525
1527
  }
1526
1528
  //#endregion
1527
1529
  //#region src/composables/useCommentLifecycle.ts
1528
- var fi = 408, pi = 12;
1529
- function mi(e) {
1530
- let t = B(!1), n = B(null), r = B(null), i = B(null), a = B(null);
1530
+ var Di = 408, Oi = 12;
1531
+ function ki(e) {
1532
+ let t = W(!1), n = W(null), r = W(null), i = W(null), a = W(null);
1531
1533
  function o(t) {
1532
1534
  let n = e.editorView.value, r = e.pagesContainer.value;
1533
1535
  if (!n || !r) return null;
@@ -1559,7 +1561,7 @@ function mi(e) {
1559
1561
  r.value = null;
1560
1562
  return;
1561
1563
  }
1562
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + pi : l.width / 2 + fi;
1564
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Oi : l.width / 2 + Di;
1563
1565
  r.value = {
1564
1566
  top: c.top - l.top,
1565
1567
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -1570,7 +1572,7 @@ function mi(e) {
1570
1572
  function c() {
1571
1573
  let s = e.editorView.value;
1572
1574
  if (!s) return;
1573
- let c = r.value, l = s.state.selection, u = li({
1575
+ let c = r.value, l = s.state.selection, u = wi({
1574
1576
  docSize: s.state.doc.content.size,
1575
1577
  capturedRange: c ? {
1576
1578
  from: c.from,
@@ -1589,7 +1591,7 @@ function mi(e) {
1589
1591
  r.value = null;
1590
1592
  return;
1591
1593
  }
1592
- if (!ui(s, u, dt, { selectEnd: !0 })) {
1594
+ if (!Ti(s, u, wt, { selectEnd: !0 })) {
1593
1595
  r.value = null, i.value = null;
1594
1596
  return;
1595
1597
  }
@@ -1602,11 +1604,11 @@ function mi(e) {
1602
1604
  let n = e.editorView.value, r = i.value;
1603
1605
  if (!n || !r) return !1;
1604
1606
  let a = e.createComment(t);
1605
- return ui(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
1607
+ return Ti(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
1606
1608
  }
1607
1609
  function d() {
1608
1610
  let t = e.editorView.value;
1609
- t && i.value && di(t, i.value), l();
1611
+ t && i.value && Ei(t, i.value), l();
1610
1612
  }
1611
1613
  return {
1612
1614
  isAddingComment: t,
@@ -1620,15 +1622,15 @@ function mi(e) {
1620
1622
  }
1621
1623
  //#endregion
1622
1624
  //#region src/composables/useCommentManagement.ts
1623
- function hi(e) {
1624
- let t = ft(), n = B([]), r = B(!1);
1625
+ function Ai(e) {
1626
+ let t = Tt(), n = W([]), r = W(!1);
1625
1627
  function i() {
1626
1628
  r.value = !0;
1627
1629
  }
1628
1630
  function a() {
1629
1631
  r.value = !1;
1630
1632
  }
1631
- let o = D(() => e.commentsProp() !== void 0), s = D(() => o.value ? e.commentsProp() ?? [] : n.value);
1633
+ let o = N(() => e.commentsProp() !== void 0), s = N(() => o.value ? e.commentsProp() ?? [] : n.value);
1632
1634
  function c(t) {
1633
1635
  o.value || (n.value = t), e.onCommentsChange(t);
1634
1636
  }
@@ -1636,12 +1638,12 @@ function hi(e) {
1636
1638
  i(), c([...s.value, e]);
1637
1639
  }
1638
1640
  function u(n, r) {
1639
- return pt(t, s.value, e.editorView.value), mt(t, n, e.author(), r);
1641
+ return Et(t, s.value, e.editorView.value), Dt(t, n, e.author(), r);
1640
1642
  }
1641
1643
  function d() {
1642
1644
  if (a(), o.value) return;
1643
1645
  let n = e.getDocument()?.package.document.comments;
1644
- pt(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
1646
+ Et(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
1645
1647
  }
1646
1648
  function f(e, t) {
1647
1649
  l(u(t, e));
@@ -1667,8 +1669,8 @@ function hi(e) {
1667
1669
  function _(t, n) {
1668
1670
  let r = e.editorView.value;
1669
1671
  if (!r) return;
1670
- let i = ht(r, t);
1671
- i && (n ? _t : bt)(i.from, i.to)(r.state, r.dispatch);
1672
+ let i = Ot(r, t);
1673
+ i && (n ? At : Nt)(i.from, i.to)(r.state, r.dispatch);
1672
1674
  }
1673
1675
  function v(e) {
1674
1676
  _(e, !0);
@@ -1678,15 +1680,15 @@ function hi(e) {
1678
1680
  }
1679
1681
  function b(t, n) {
1680
1682
  let r = e.editorView.value;
1681
- r && _t(t, n)(r.state, r.dispatch);
1683
+ r && At(t, n)(r.state, r.dispatch);
1682
1684
  }
1683
1685
  function x(t, n) {
1684
1686
  let r = e.editorView.value;
1685
- r && bt(t, n)(r.state, r.dispatch);
1687
+ r && Nt(t, n)(r.state, r.dispatch);
1686
1688
  }
1687
1689
  return {
1688
1690
  comments: s,
1689
- commentsDirty: D(() => r.value),
1691
+ commentsDirty: N(() => r.value),
1690
1692
  clearCommentsDirty: a,
1691
1693
  createComment: u,
1692
1694
  pushComment: l,
@@ -1705,8 +1707,8 @@ function hi(e) {
1705
1707
  }
1706
1708
  //#endregion
1707
1709
  //#region src/utils/imageClipboard.ts
1708
- function gi(e, t, n) {
1709
- let r = xt(e.state), i = e.state.schema.marks.insertion;
1710
+ function ji(e, t, n) {
1711
+ let r = Pt(e.state), i = e.state.schema.marks.insertion;
1710
1712
  if (!r || !i) return;
1711
1713
  let a = t.selection.from, o = a - n.nodeSize;
1712
1714
  o < 0 || t.addMark(o, a, i.create({
@@ -1715,7 +1717,7 @@ function gi(e, t, n) {
1715
1717
  date: r.date
1716
1718
  }));
1717
1719
  }
1718
- function _i(e, t) {
1720
+ function Mi(e, t) {
1719
1721
  let n = e.state.doc.nodeAt(t);
1720
1722
  if (!n || n.type.name !== "image") return;
1721
1723
  let r = n.attrs.src;
@@ -1729,7 +1731,7 @@ function _i(e, t) {
1729
1731
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
1730
1732
  });
1731
1733
  }
1732
- function vi(e) {
1734
+ function Ni(e) {
1733
1735
  return new Promise((t, n) => {
1734
1736
  let r = new FileReader();
1735
1737
  r.onload = () => {
@@ -1737,7 +1739,7 @@ function vi(e) {
1737
1739
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
1738
1740
  });
1739
1741
  }
1740
- function yi(e) {
1742
+ function Pi(e) {
1741
1743
  return new Promise((t) => {
1742
1744
  let n = new Image();
1743
1745
  n.onload = () => t({
@@ -1749,7 +1751,7 @@ function yi(e) {
1749
1751
  }), n.src = e;
1750
1752
  });
1751
1753
  }
1752
- function bi(e, t, n, r) {
1754
+ function Fi(e, t, n, r) {
1753
1755
  let i = e.state.schema.nodes.image;
1754
1756
  if (!i) return;
1755
1757
  let a = i.create({
@@ -1760,23 +1762,23 @@ function bi(e, t, n, r) {
1760
1762
  wrapType: "inline",
1761
1763
  displayMode: "inline"
1762
1764
  }), o = e.state.tr.replaceSelectionWith(a);
1763
- gi(e, o, a), e.dispatch(o);
1765
+ ji(e, o, a), e.dispatch(o);
1764
1766
  }
1765
- async function xi(e) {
1767
+ async function Ii(e) {
1766
1768
  try {
1767
1769
  let t = await navigator.clipboard.read();
1768
1770
  for (let n of t) {
1769
1771
  let t = n.types.find((e) => e.startsWith("image/"));
1770
1772
  if (t) {
1771
- let r = await vi(await n.getType(t)), i = await yi(r), a = i.width, o = i.height;
1772
- a > 612 && (o = Math.round(612 / a * o), a = 612), bi(e, r, a, o);
1773
+ let r = await Ni(await n.getType(t)), i = await Pi(r), a = i.width, o = i.height;
1774
+ a > 612 && (o = Math.round(612 / a * o), a = 612), Fi(e, r, a, o);
1773
1775
  return;
1774
1776
  }
1775
1777
  if (n.types.includes("text/html")) {
1776
1778
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
1777
1779
  if (r) {
1778
1780
  let n = /data-width="(?<w>\d+)"/u.exec(t)?.groups?.w, i = /data-height="(?<h>\d+)"/u.exec(t)?.groups?.h, a = n ? Number(n) : 200, o = i ? Number(i) : 200;
1779
- bi(e, r, a || 200, o || 200);
1781
+ Fi(e, r, a || 200, o || 200);
1780
1782
  return;
1781
1783
  }
1782
1784
  }
@@ -1797,14 +1799,14 @@ async function xi(e) {
1797
1799
  }
1798
1800
  }
1799
1801
  }
1800
- function Si(e, t) {
1802
+ function Li(e, t) {
1801
1803
  let n = e.state.doc.nodeAt(t);
1802
1804
  if (!n || n.type.name !== "image") return;
1803
1805
  let r = document.createElement("input");
1804
1806
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
1805
1807
  let i = r.files?.[0];
1806
1808
  if (!i) return;
1807
- let a = await vi(i), o = await yi(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
1809
+ let a = await Ni(i), o = await Pi(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
1808
1810
  try {
1809
1811
  let r = e.state.tr.setNodeMarkup(t, void 0, {
1810
1812
  ...n.attrs,
@@ -1819,7 +1821,7 @@ function Si(e, t) {
1819
1821
  }
1820
1822
  //#endregion
1821
1823
  //#region src/composables/useContextMenus.ts
1822
- var Ci = new Set([
1824
+ var Ri = new Set([
1823
1825
  "inline",
1824
1826
  "square",
1825
1827
  "tight",
@@ -1828,17 +1830,17 @@ var Ci = new Set([
1828
1830
  "behind",
1829
1831
  "inFront"
1830
1832
  ]);
1831
- function wi(e) {
1832
- return typeof e == "string" && Ci.has(e);
1833
+ function zi(e) {
1834
+ return typeof e == "string" && Ri.has(e);
1833
1835
  }
1834
- function Ti(e) {
1835
- return wi(e) ? e : "inline";
1836
+ function Bi(e) {
1837
+ return zi(e) ? e : "inline";
1836
1838
  }
1837
- function Ei(e) {
1839
+ function Vi(e) {
1838
1840
  return e === "left" || e === "right" || e === "none" ? e : null;
1839
1841
  }
1840
- function Di(e) {
1841
- let { t: n } = t(), r = B({
1842
+ function Hi(e) {
1843
+ let { t } = c(), n = W({
1842
1844
  isOpen: !1,
1843
1845
  position: {
1844
1846
  x: 0,
@@ -1849,37 +1851,37 @@ function Di(e) {
1849
1851
  onImage: !1,
1850
1852
  canMergeCells: !1,
1851
1853
  canSplitCell: !1
1852
- }), i = B(null), a = B({
1854
+ }), r = W(null), i = W({
1853
1855
  from: 0,
1854
1856
  to: 0
1855
- }), o = D(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || r.value.hasSelection)), s = D(() => [
1857
+ }), a = N(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), o = N(() => [
1856
1858
  {
1857
1859
  action: "cut",
1858
- label: n("contextMenu.cut"),
1859
- shortcut: n("contextMenu.cutShortcut")
1860
+ label: t("contextMenu.cut"),
1861
+ shortcut: t("contextMenu.cutShortcut")
1860
1862
  },
1861
1863
  {
1862
1864
  action: "copy",
1863
- label: n("contextMenu.copy"),
1864
- shortcut: n("contextMenu.copyShortcut")
1865
+ label: t("contextMenu.copy"),
1866
+ shortcut: t("contextMenu.copyShortcut")
1865
1867
  },
1866
1868
  {
1867
1869
  action: "paste",
1868
- label: n("contextMenu.paste"),
1869
- shortcut: n("contextMenu.pasteShortcut"),
1870
+ label: t("contextMenu.paste"),
1871
+ shortcut: t("contextMenu.pasteShortcut"),
1870
1872
  dividerAfter: !0
1871
1873
  },
1872
1874
  {
1873
1875
  action: "delete",
1874
- label: n("contextMenu.delete"),
1875
- shortcut: n("contextMenu.deleteShortcut")
1876
+ label: t("contextMenu.delete"),
1877
+ shortcut: t("contextMenu.deleteShortcut")
1876
1878
  }
1877
1879
  ]);
1878
- function c(e, t) {
1880
+ function s(e, t) {
1879
1881
  t(e.state, (t) => e.dispatch(t), e);
1880
1882
  }
1881
1883
  function l(t, n, r, i, a) {
1882
- let o = i === "inline" ? Ge(t, e.zoom.value) : void 0;
1884
+ let o = i === "inline" ? it(t, e.zoom.value) : void 0;
1883
1885
  return {
1884
1886
  open: !0,
1885
1887
  position: r,
@@ -1890,43 +1892,43 @@ function Di(e) {
1890
1892
  };
1891
1893
  }
1892
1894
  function u(t) {
1893
- let n = e.editorView.value;
1894
- if (!n) return;
1895
- let o = qe(t.target);
1895
+ let a = e.editorView.value;
1896
+ if (!a) return;
1897
+ let o = ot(t.target);
1896
1898
  if (o) {
1897
- let a = Number(o.dataset.pmStart);
1898
- if (!Number.isNaN(a)) {
1899
+ let i = Number(o.dataset.pmStart);
1900
+ if (!Number.isNaN(i)) {
1899
1901
  try {
1900
- let e = Ve.create(n.state.doc, a);
1901
- n.dispatch(n.state.tr.setSelection(e));
1902
+ let e = Z.create(a.state.doc, i);
1903
+ a.dispatch(a.state.tr.setSelection(e));
1902
1904
  } catch {}
1903
1905
  e.selectedImage.value = {
1904
1906
  element: o,
1905
- pmPos: a,
1907
+ pmPos: i,
1906
1908
  width: o.offsetWidth,
1907
1909
  height: o.offsetHeight
1908
1910
  }, e.clearOverlay();
1909
- let s = n.state.doc.nodeAt(a);
1911
+ let s = a.state.doc.nodeAt(i);
1910
1912
  if (s && s.type.name === "image") {
1911
- i.value = l(o, a, {
1913
+ r.value = l(o, i, {
1912
1914
  x: t.clientX,
1913
1915
  y: t.clientY
1914
- }, Ti(s.attrs.wrapType), Ei(s.attrs.cssFloat)), r.value.isOpen = !1;
1916
+ }, Bi(s.attrs.wrapType), Vi(s.attrs.cssFloat)), n.value.isOpen = !1;
1915
1917
  return;
1916
1918
  }
1917
1919
  }
1918
1920
  }
1919
1921
  {
1920
- let { from: r, to: i } = n.state.selection, a = e.resolvePos(t.clientX, t.clientY);
1921
- if (a !== null && (a < r || a > i)) try {
1922
- e.setPmSelection(a);
1922
+ let { from: n, to: r } = a.state.selection, i = e.resolvePos(t.clientX, t.clientY);
1923
+ if (i !== null && (i < n || i > r)) try {
1924
+ e.setPmSelection(i);
1923
1925
  } catch {}
1924
1926
  }
1925
- let s = ut(n.state), { empty: c, from: u, to: d } = n.state.selection;
1926
- a.value = {
1927
+ let s = Ct(a.state), { empty: c, from: u, to: d } = a.state.selection;
1928
+ i.value = {
1927
1929
  from: u,
1928
1930
  to: d
1929
- }, i.value &&= null, r.value = {
1931
+ }, r.value &&= null, n.value = {
1930
1932
  isOpen: !0,
1931
1933
  position: {
1932
1934
  x: t.clientX,
@@ -1940,46 +1942,46 @@ function Di(e) {
1940
1942
  };
1941
1943
  }
1942
1944
  function d(t) {
1943
- let n = e.editorView.value, a = e.selectedImage.value;
1944
- if (!n || !a) return;
1945
- let o = n.state.doc.nodeAt(a.pmPos);
1946
- !o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
1945
+ let i = e.editorView.value, a = e.selectedImage.value;
1946
+ if (!i || !a) return;
1947
+ let o = i.state.doc.nodeAt(a.pmPos);
1948
+ !o || o.type.name !== "image" || (r.value = l(a.element, a.pmPos, {
1947
1949
  x: t.clientX,
1948
1950
  y: t.clientY
1949
- }, Ti(o.attrs.wrapType), Ei(o.attrs.cssFloat)), r.value.isOpen = !1);
1951
+ }, Bi(o.attrs.wrapType), Vi(o.attrs.cssFloat)), n.value.isOpen = !1);
1950
1952
  }
1951
1953
  function f(t) {
1952
- let n = e.editorView.value, r = i.value;
1953
- if (!n || !r) return;
1954
- let a = r.inlinePositionEmu && t !== "inline" ? { initialPositionEmu: r.inlinePositionEmu } : void 0, o = e.getCommands().setImageWrapType;
1955
- o && (c(n, o(r.pmPos, t, a)), n.focus());
1954
+ let n = e.editorView.value, i = r.value;
1955
+ if (!n || !i) return;
1956
+ let a = i.inlinePositionEmu && t !== "inline" ? { initialPositionEmu: i.inlinePositionEmu } : void 0, o = e.getCommands().setImageWrapType;
1957
+ o && (s(n, o(i.pmPos, t, a)), n.focus());
1956
1958
  }
1957
1959
  function p(t) {
1958
1960
  let n = e.editorView.value;
1959
1961
  if (!n) return;
1960
1962
  let r = e.getCommands();
1961
1963
  if (t.startsWith("custom:")) {
1962
- let r = a.value, i = r.from === r.to ? {
1964
+ let r = i.value, a = r.from === r.to ? {
1963
1965
  from: n.state.selection.from,
1964
1966
  to: n.state.selection.to
1965
1967
  } : r;
1966
- e.onCustomContextAction?.(t.slice(7), i), n.focus();
1968
+ e.onCustomContextAction?.(t.slice(7), a), n.focus();
1967
1969
  return;
1968
1970
  }
1969
1971
  switch (t) {
1970
1972
  case "cut":
1971
1973
  if (e.selectedImage.value) {
1972
1974
  let t = e.selectedImage.value.pmPos;
1973
- _i(n, t);
1975
+ Mi(n, t);
1974
1976
  let r = n.state.doc.nodeAt(t);
1975
1977
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null);
1976
1978
  } else n.focus(), document.execCommand("cut");
1977
1979
  break;
1978
1980
  case "copy":
1979
- e.selectedImage.value ? _i(n, e.selectedImage.value.pmPos) : (n.focus(), document.execCommand("copy"));
1981
+ e.selectedImage.value ? Mi(n, e.selectedImage.value.pmPos) : (n.focus(), document.execCommand("copy"));
1980
1982
  break;
1981
1983
  case "paste":
1982
- xi(n);
1984
+ Ii(n);
1983
1985
  break;
1984
1986
  case "pasteAsPlainText":
1985
1987
  navigator.clipboard.readText().then((e) => {
@@ -1992,7 +1994,7 @@ function Di(e) {
1992
1994
  break;
1993
1995
  }
1994
1996
  case "selectAll": {
1995
- let e = Z.create(n.state.doc, 0, n.state.doc.content.size);
1997
+ let e = tt.create(n.state.doc, 0, n.state.doc.content.size);
1996
1998
  n.dispatch(n.state.tr.setSelection(e));
1997
1999
  break;
1998
2000
  }
@@ -2000,7 +2002,7 @@ function Di(e) {
2000
2002
  e.selectedImage.value && (e.showImageProperties.value = !0);
2001
2003
  break;
2002
2004
  case "replaceImage":
2003
- e.selectedImage.value && Si(n, e.selectedImage.value.pmPos);
2005
+ e.selectedImage.value && Li(n, e.selectedImage.value.pmPos);
2004
2006
  break;
2005
2007
  case "deleteImage":
2006
2008
  if (e.selectedImage.value) {
@@ -2019,17 +2021,17 @@ function Di(e) {
2019
2021
  case "selectTable":
2020
2022
  case "deleteTable": {
2021
2023
  let e = r[t];
2022
- e && c(n, e());
2024
+ e && s(n, e());
2023
2025
  break;
2024
2026
  }
2025
2027
  }
2026
2028
  n.focus();
2027
2029
  }
2028
2030
  return {
2029
- contextMenu: r,
2030
- imageContextMenu: i,
2031
- imageContextMenuTextActions: s,
2032
- customTextMenuItems: o,
2031
+ contextMenu: n,
2032
+ imageContextMenu: r,
2033
+ imageContextMenuTextActions: o,
2034
+ customTextMenuItems: a,
2033
2035
  handleContextMenu: u,
2034
2036
  handleSelectedImageContextMenu: d,
2035
2037
  handleImageWrapSelect: f,
@@ -2038,43 +2040,43 @@ function Di(e) {
2038
2040
  }
2039
2041
  //#endregion
2040
2042
  //#region src/composables/useDocumentLifecycle.ts
2041
- function Oi(e) {
2043
+ function Ui(e) {
2042
2044
  async function t(t) {
2043
2045
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2044
2046
  }
2045
2047
  function n(t) {
2046
2048
  e.sidebarAutoOpenedRef.value = !1, e.loadDocument(t);
2047
2049
  }
2048
- G(e.documentBuffer, (e) => {
2050
+ J(e.documentBuffer, (e) => {
2049
2051
  e && t(e);
2050
- }), G(e.document, (e) => {
2052
+ }), J(e.document, (e) => {
2051
2053
  e && n(e);
2052
- }), pe(async () => {
2053
- await I();
2054
+ }), Se(async () => {
2055
+ await be();
2054
2056
  let r = e.documentBuffer(), i = e.document();
2055
2057
  r ? await t(r) : i && n(i);
2056
2058
  });
2057
2059
  }
2058
2060
  //#endregion
2059
2061
  //#region src/utils/aiEditRange.ts
2060
- var ki = ({ blockId: e, doc: t, snapshot: n }) => {
2061
- let r = Yt(e);
2062
+ var Wi = ({ blockId: e, doc: t, snapshot: n }) => {
2063
+ let r = ln(e);
2062
2064
  if (r !== null) {
2063
- let e = Kt(t, r);
2065
+ let e = on(t, r);
2064
2066
  if (e !== null) return {
2065
2067
  from: e.from,
2066
2068
  to: e.to
2067
2069
  };
2068
2070
  }
2069
- let i = n ?? Gt(t), a = i.anchors[e] ?? Ai(e, i);
2070
- return a ? ji(t.content.size, a) : null;
2071
- }, Ai = (e, t) => {
2072
- let n = Xt(e);
2071
+ let i = n ?? an(t), a = i.anchors[e] ?? Gi(e, i);
2072
+ return a ? Ki(t.content.size, a) : null;
2073
+ }, Gi = (e, t) => {
2074
+ let n = un(e);
2073
2075
  if (n === null) return;
2074
2076
  let r = t.blocks.at(n - 1);
2075
2077
  return r ? t.anchors[r.id] : void 0;
2076
2078
  };
2077
- function ji(e, t) {
2079
+ function Ki(e, t) {
2078
2080
  return {
2079
2081
  from: Math.min(Math.max(t.from, 0), e),
2080
2082
  to: Math.min(Math.max(t.to, 0), e)
@@ -2082,7 +2084,7 @@ function ji(e, t) {
2082
2084
  }
2083
2085
  //#endregion
2084
2086
  //#region src/utils/pageText.ts
2085
- var Mi = (e, t, n) => {
2087
+ var qi = (e, t, n) => {
2086
2088
  if (!e || !Number.isInteger(n) || n < 1) return null;
2087
2089
  let r = e.pages[n - 1];
2088
2090
  if (!r) return null;
@@ -2092,7 +2094,7 @@ var Mi = (e, t, n) => {
2092
2094
  };
2093
2095
  //#endregion
2094
2096
  //#region src/composables/useDocxEditorRefApi.ts
2095
- function Ni(e) {
2097
+ function Ji(e) {
2096
2098
  function t() {
2097
2099
  e.onPrint?.(), window.print();
2098
2100
  }
@@ -2105,11 +2107,11 @@ function Ni(e) {
2105
2107
  function r(t, n) {
2106
2108
  let r = e.pagesRef.value;
2107
2109
  if (!r) return !1;
2108
- let i = Rt(r, t), a = i.at(0);
2110
+ let i = Yt(r, t), a = i.at(0);
2109
2111
  return a ? (a.scrollIntoView({
2110
2112
  block: "center",
2111
2113
  behavior: "smooth"
2112
- }), n?.highlight && Q(i, n.highlight), !0) : !1;
2114
+ }), n?.highlight && Xt(i, n.highlight), !0) : !1;
2113
2115
  }
2114
2116
  function i() {
2115
2117
  return e.zoom.value;
@@ -2140,7 +2142,7 @@ function Ni(e) {
2140
2142
  getPageNumberForPmPos: (t) => {
2141
2143
  let n = e.layout.value;
2142
2144
  if (!n) return null;
2143
- let r = Lt(n, t);
2145
+ let r = Jt(n, t);
2144
2146
  return r == null ? null : r + 1;
2145
2147
  }
2146
2148
  }, a;
@@ -2151,7 +2153,7 @@ function Ni(e) {
2151
2153
  function c() {
2152
2154
  let t = e.layout.value, n = e.editorView.value;
2153
2155
  if (!t || !n) return 0;
2154
- let r = Lt(t, n.state.selection.from);
2156
+ let r = Jt(t, n.state.selection.from);
2155
2157
  return r == null ? 0 : r + 1;
2156
2158
  }
2157
2159
  function l(t) {
@@ -2184,11 +2186,11 @@ function Ni(e) {
2184
2186
  ensureEditorView: () => e.editor.ensureView(),
2185
2187
  createAIEditSnapshot: () => {
2186
2188
  let t = e.editorView.value;
2187
- return t ? jt(t.state.doc) : null;
2189
+ return t ? Ht(t.state.doc) : null;
2188
2190
  },
2189
2191
  applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
2190
2192
  let a = e.editorView.value;
2191
- return a ? kt({
2193
+ return a ? Bt({
2192
2194
  view: a,
2193
2195
  snapshot: t,
2194
2196
  operations: n,
@@ -2205,54 +2207,54 @@ function Ni(e) {
2205
2207
  },
2206
2208
  acceptAIEditOperation: (t) => {
2207
2209
  let n = e.editorView.value;
2208
- return n ? gt(t)(n.state, n.dispatch) : !1;
2210
+ return n ? kt(t)(n.state, n.dispatch) : !1;
2209
2211
  },
2210
2212
  rejectAIEditOperation: (t) => {
2211
2213
  let n = e.editorView.value;
2212
- return n ? yt(t)(n.state, n.dispatch) : !1;
2214
+ return n ? Mt(t)(n.state, n.dispatch) : !1;
2213
2215
  },
2214
2216
  undo: () => e.editor.undo(),
2215
2217
  redo: () => e.editor.redo(),
2216
2218
  scrollToAIEditOperation: (t) => {
2217
2219
  let n = e.editorView.value;
2218
2220
  if (!n) return !1;
2219
- let r = vt(n.state, t);
2221
+ let r = jt(n.state, t);
2220
2222
  if (!r) return !1;
2221
- let { from: i, to: a } = ji(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2222
- return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2223
+ let { from: i, to: a } = Ki(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2224
+ return n.dispatch(n.state.tr.setSelection(tt.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2223
2225
  },
2224
2226
  scrollToBlock: (t, n) => {
2225
2227
  let r = e.editorView.value;
2226
2228
  if (!r) return !1;
2227
- let i = ki({
2229
+ let i = Wi({
2228
2230
  blockId: t,
2229
2231
  doc: r.state.doc,
2230
2232
  snapshot: n
2231
2233
  });
2232
2234
  if (i === null) return !1;
2233
2235
  let { from: a, to: o } = i, s = r.state.doc.resolve(a), c = r.state.doc.resolve(o);
2234
- return r.dispatch(r.state.tr.setSelection(Z.between(s, c))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(a)), !0;
2236
+ return r.dispatch(r.state.tr.setSelection(tt.between(s, c))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(a)), !0;
2235
2237
  },
2236
2238
  getTrackedChanges: () => {
2237
2239
  let t = e.editorView.value;
2238
- return t ? Pt(t.state.doc) : [];
2240
+ return t ? Gt(t.state.doc) : [];
2239
2241
  },
2240
2242
  getCommentAnchors: () => {
2241
2243
  let t = e.editorView.value;
2242
- return t ? Nt(t.state.doc) : [];
2244
+ return t ? Wt(t.state.doc) : [];
2243
2245
  },
2244
2246
  getSelectionText: () => {
2245
2247
  let t = e.editorView.value;
2246
- return t ? ye(t.state) : "";
2248
+ return t ? Me(t.state) : "";
2247
2249
  },
2248
2250
  getPageText: (t) => {
2249
2251
  let n = e.editorView.value;
2250
- return n ? Mi(e.layout.value, n.state.doc, t) : null;
2252
+ return n ? qi(e.layout.value, n.state.doc, t) : null;
2251
2253
  },
2252
2254
  getContentControls: (t = {}) => {
2253
2255
  let n = e.editorView.value;
2254
- return n ? Bt(n.state.doc, t).map((e) => ({
2255
- properties: zt(e.node),
2256
+ return n ? $t(n.state.doc, t).map((e) => ({
2257
+ properties: Zt(e.node),
2256
2258
  path: e.path,
2257
2259
  pmPos: e.pos
2258
2260
  })) : [];
@@ -2260,60 +2262,60 @@ function Ni(e) {
2260
2262
  scrollToContentControl: (t) => {
2261
2263
  let n = e.editorView.value;
2262
2264
  if (!n) return !1;
2263
- let r = $(n.state.doc, t);
2265
+ let r = Qt(n.state.doc, t);
2264
2266
  if (!r) return !1;
2265
2267
  let i = r.pos + 1, a = n.state.doc.resolve(i);
2266
- return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2268
+ return n.dispatch(n.state.tr.setSelection(tt.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2267
2269
  },
2268
2270
  setContentControlContent: (t, n, r = {}) => {
2269
2271
  let i = e.editorView.value;
2270
2272
  if (!i) return !1;
2271
- let a = typeof n == "string" ? Ht(i.state, t, n, r) : Wt(i.state, t, n, r);
2273
+ let a = typeof n == "string" ? tn(i.state, t, n, r) : rn(i.state, t, n, r);
2272
2274
  return a ? (i.dispatch(a), !0) : !1;
2273
2275
  },
2274
2276
  setContentControlValue: (t, n, r = {}) => {
2275
2277
  let i = e.editorView.value;
2276
2278
  if (!i) return !1;
2277
- let a = Ut(i.state, t, n, r);
2279
+ let a = nn(i.state, t, n, r);
2278
2280
  return a ? (i.dispatch(a), !0) : !1;
2279
2281
  },
2280
2282
  removeContentControl: (t, n = {}) => {
2281
2283
  let r = e.editorView.value;
2282
2284
  if (!r) return !1;
2283
- let i = Vt(r.state, t, n);
2285
+ let i = en(r.state, t, n);
2284
2286
  return i ? (r.dispatch(i), !0) : !1;
2285
2287
  }
2286
2288
  } };
2287
2289
  }
2288
2290
  //#endregion
2289
2291
  //#region src/composables/useFormattingActions.ts
2290
- function Pi(e) {
2292
+ function Yi(e) {
2291
2293
  let t = () => e.activeView?.value ?? e.editorView.value;
2292
2294
  function n() {
2293
2295
  let e = t();
2294
- e && (lt(e.state, e.dispatch, e), e.focus());
2296
+ e && (St(e.state, e.dispatch, e), e.focus());
2295
2297
  }
2296
2298
  function r(n) {
2297
2299
  let r = t();
2298
2300
  if (!r) return;
2299
2301
  let i = e.getDocument(), a = i?.package?.styles;
2300
2302
  if (a) {
2301
- let e = Y(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? an(i.package.numbering) : null };
2302
- e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), $t(n, t)(r.state, (e) => r.dispatch(e));
2303
- } else $t(n)(r.state, (e) => r.dispatch(e));
2303
+ let e = Ae(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? vn(i.package.numbering) : null };
2304
+ e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), pn(n, t)(r.state, (e) => r.dispatch(e));
2305
+ } else pn(n)(r.state, (e) => r.dispatch(e));
2304
2306
  r.focus();
2305
2307
  }
2306
2308
  function i() {
2307
2309
  let t = e.editorView.value;
2308
- t && (on(t.state, (e) => t.dispatch(e), t), t.focus());
2310
+ t && (yn(t.state, (e) => t.dispatch(e), t), t.focus());
2309
2311
  }
2310
2312
  function a() {
2311
2313
  let t = e.editorView.value;
2312
- t && (cn(t.state, (e) => t.dispatch(e), t), t.focus());
2314
+ t && (xn(t.state, (e) => t.dispatch(e), t), t.focus());
2313
2315
  }
2314
2316
  function o() {
2315
2317
  let t = e.editorView.value;
2316
- t && (sn(t.state, (e) => t.dispatch(e), t), t.focus());
2318
+ t && (bn(t.state, (e) => t.dispatch(e), t), t.focus());
2317
2319
  }
2318
2320
  function s(e) {
2319
2321
  let n = t();
@@ -2332,8 +2334,8 @@ function Pi(e) {
2332
2334
  }
2333
2335
  //#endregion
2334
2336
  //#region src/composables/useHyperlinkManagement.ts
2335
- function Fi(e) {
2336
- let t = B(null);
2337
+ function Xi(e) {
2338
+ let t = W(null);
2337
2339
  function n(e, t) {
2338
2340
  t(e.state, (t) => e.dispatch(t), e);
2339
2341
  }
@@ -2363,14 +2365,14 @@ function Fi(e) {
2363
2365
  }
2364
2366
  function o(n, r) {
2365
2367
  let i = e.editorView.value;
2366
- i && (ln(i, {
2368
+ i && (Sn(i, {
2367
2369
  displayText: n,
2368
2370
  href: r
2369
2371
  }), t.value = null, i.focus());
2370
2372
  }
2371
2373
  function s() {
2372
2374
  let n = e.editorView.value;
2373
- n && (un(n, { popupHref: t.value?.href }), t.value = null, n.focus());
2375
+ n && (Cn(n, { popupHref: t.value?.href }), t.value = null, n.focus());
2374
2376
  }
2375
2377
  return {
2376
2378
  hyperlinkPopupData: t,
@@ -2383,8 +2385,8 @@ function Fi(e) {
2383
2385
  }
2384
2386
  //#endregion
2385
2387
  //#region src/composables/useImageActions.ts
2386
- function Ii(e) {
2387
- let t = ge(null), n = B(!1), r = D(() => {
2388
+ function Zi(e) {
2389
+ let t = Te(null), n = W(!1), r = N(() => {
2388
2390
  e.stateTick.value;
2389
2391
  let n = e.editorView.value, r = t.value;
2390
2392
  if (!n || !r) return null;
@@ -2403,9 +2405,9 @@ function Ii(e) {
2403
2405
  function a(n) {
2404
2406
  let r = e.editorView.value, a = t.value;
2405
2407
  if (!r || !a) return;
2406
- let o = Ye(n);
2408
+ let o = ct(n);
2407
2409
  if (!o) return;
2408
- let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: Ge(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
2410
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: it(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
2409
2411
  c && (i(r, c(a.pmPos, o, s)), r.focus());
2410
2412
  }
2411
2413
  function o(n) {
@@ -2433,7 +2435,7 @@ function Ii(e) {
2433
2435
  }
2434
2436
  //#endregion
2435
2437
  //#region src/composables/useKeyboardShortcuts.ts
2436
- function Li(e) {
2438
+ function Qi(e) {
2437
2439
  function t(t) {
2438
2440
  if (t.key === "F1") {
2439
2441
  t.preventDefault(), e.showKeyboardShortcuts.value = !0;
@@ -2448,14 +2450,14 @@ function Li(e) {
2448
2450
  e.disableFindReplaceShortcuts?.() && (t.key === "f" || t.key === "h") || (t.key === "f" || t.key === "h" ? (t.preventDefault(), e.showFindReplace.value = !0) : t.key === "k" ? (t.preventDefault(), e.showHyperlink.value = !0) : t.key === "/" && (t.preventDefault(), e.showKeyboardShortcuts.value = !e.showKeyboardShortcuts.value));
2449
2451
  }
2450
2452
  }
2451
- return pe(() => window.addEventListener("keydown", t)), fe(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
2453
+ return Se(() => window.addEventListener("keydown", t)), xe(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
2452
2454
  }
2453
2455
  //#endregion
2454
2456
  //#region src/composables/useOutlineSidebar.ts
2455
- function Ri(e) {
2457
+ function $i(e) {
2456
2458
  function t() {
2457
2459
  let t = e.editorView.value;
2458
- t && (e.outlineHeadings.value = dn(t.state.doc));
2460
+ t && (e.outlineHeadings.value = wn(t.state.doc));
2459
2461
  }
2460
2462
  function n() {
2461
2463
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -2466,7 +2468,7 @@ function Ri(e) {
2466
2468
  function i(t) {
2467
2469
  let n = e.editorView.value;
2468
2470
  if (!n) return;
2469
- let r = n.state.doc.resolve(Math.min(t + 1, n.state.doc.content.size)), i = Z.near(r);
2471
+ let r = n.state.doc.resolve(Math.min(t + 1, n.state.doc.content.size)), i = tt.near(r);
2470
2472
  n.dispatch(n.state.tr.setSelection(i)), e.scrollToVisiblePosition(t), n.focus();
2471
2473
  }
2472
2474
  function a() {
@@ -2486,7 +2488,7 @@ function Ri(e) {
2486
2488
  }
2487
2489
  //#endregion
2488
2490
  //#region src/composables/usePageSetupControls.ts
2489
- function zi(e) {
2491
+ function ea(e) {
2490
2492
  function t(t) {
2491
2493
  let n = e.getDocument();
2492
2494
  if (!n?.package?.document) return;
@@ -2513,19 +2515,19 @@ function zi(e) {
2513
2515
  }
2514
2516
  function s(t) {
2515
2517
  let n = e.editorView.value;
2516
- n && nn(t)(n.state, n.dispatch);
2518
+ n && gn(t)(n.state, n.dispatch);
2517
2519
  }
2518
2520
  function c(t) {
2519
2521
  let n = e.editorView.value;
2520
- n && rn(t)(n.state, n.dispatch);
2522
+ n && _n(t)(n.state, n.dispatch);
2521
2523
  }
2522
2524
  function l(t) {
2523
2525
  let n = e.editorView.value;
2524
- n && (t < 0 ? tn(-t, !0)(n.state, n.dispatch) : tn(t, !1)(n.state, n.dispatch));
2526
+ n && (t < 0 ? hn(-t, !0)(n.state, n.dispatch) : hn(t, !1)(n.state, n.dispatch));
2525
2527
  }
2526
2528
  function u(t) {
2527
2529
  let n = e.editorView.value;
2528
- n && en(t)(n.state, n.dispatch);
2530
+ n && mn(t)(n.state, n.dispatch);
2529
2531
  }
2530
2532
  return {
2531
2533
  handlePageSetupApply: t,
@@ -2541,45 +2543,45 @@ function zi(e) {
2541
2543
  }
2542
2544
  //#endregion
2543
2545
  //#region src/utils/textSelection.ts
2544
- var Bi = /[\p{L}\p{N}\p{M}_''-]/u, Vi = /\s/;
2545
- function Hi(e) {
2546
- return !e || e.length === 0 ? !1 : Bi.test(e);
2546
+ var ta = /[\p{L}\p{N}\p{M}_''-]/u, na = /\s/;
2547
+ function ra(e) {
2548
+ return !e || e.length === 0 ? !1 : ta.test(e);
2547
2549
  }
2548
- function Ui(e) {
2549
- return !e || e.length === 0 ? !1 : Vi.test(e);
2550
+ function ia(e) {
2551
+ return !e || e.length === 0 ? !1 : na.test(e);
2550
2552
  }
2551
- function Wi(e, t) {
2553
+ function aa(e, t) {
2552
2554
  if (!e || e.length === 0) return [0, 0];
2553
2555
  t = Math.max(0, Math.min(t, e.length - 1));
2554
2556
  let n = e[t];
2555
- if (Ui(n)) {
2557
+ if (ia(n)) {
2556
2558
  let n = t, r = t;
2557
- for (; n > 0 && Ui(e[n - 1]);) n--;
2558
- for (; r < e.length && Ui(e[r]);) r++;
2559
+ for (; n > 0 && ia(e[n - 1]);) n--;
2560
+ for (; r < e.length && ia(e[r]);) r++;
2559
2561
  return [n, r];
2560
2562
  }
2561
- if (Hi(n)) {
2563
+ if (ra(n)) {
2562
2564
  let n = t, r = t;
2563
- for (; n > 0 && Hi(e[n - 1]);) n--;
2564
- for (; r < e.length && Hi(e[r]);) r++;
2565
+ for (; n > 0 && ra(e[n - 1]);) n--;
2566
+ for (; r < e.length && ra(e[r]);) r++;
2565
2567
  return [n, r];
2566
2568
  }
2567
2569
  return [t, t + 1];
2568
2570
  }
2569
2571
  //#endregion
2570
2572
  //#region src/utils/domQueries.ts
2571
- function Gi(e, t, n) {
2572
- let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : at(e);
2573
+ function oa(e, t, n) {
2574
+ let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : vt(e);
2573
2575
  for (let e of r) {
2574
2576
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
2575
2577
  if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
2576
2578
  }
2577
2579
  return null;
2578
2580
  }
2579
- function Ki(e, t, n) {
2581
+ function sa(e, t, n) {
2580
2582
  if (!e || !t) return;
2581
- let r = it(e, n);
2582
- if (!r) for (let t of at(e)) {
2583
+ let r = _t(e, n);
2584
+ if (!r) for (let t of vt(e)) {
2583
2585
  let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
2584
2586
  if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
2585
2587
  r = t;
@@ -2593,21 +2595,21 @@ function Ki(e, t, n) {
2593
2595
  behavior: "smooth"
2594
2596
  });
2595
2597
  }
2596
- function qi(e, t, n, r) {
2598
+ function ca(e, t, n, r) {
2597
2599
  if (!e || !t) return null;
2598
- let i = Qe(e, n, r, 1);
2600
+ let i = dt(e, n, r, 1);
2599
2601
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
2600
2602
  }
2601
- function Ji(e, t, n, r) {
2603
+ function la(e, t, n, r) {
2602
2604
  if (!e) return;
2603
- let i = Gi(e, t, r);
2605
+ let i = oa(e, t, r);
2604
2606
  if (!i) return;
2605
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Wi(a, t - o), l = o + s, u = o + c;
2607
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = aa(a, t - o), l = o + s, u = o + c;
2606
2608
  l < u && n(l, u);
2607
2609
  }
2608
- function Yi(e, t, n, r) {
2610
+ function ua(e, t, n, r) {
2609
2611
  if (!e) return;
2610
- let i = Gi(e, t, r);
2612
+ let i = oa(e, t, r);
2611
2613
  if (!i) return;
2612
2614
  let a = i.closest(".layout-paragraph");
2613
2615
  if (!a) return;
@@ -2616,26 +2618,26 @@ function Yi(e, t, n, r) {
2616
2618
  }
2617
2619
  //#endregion
2618
2620
  //#region src/composables/usePagesPointer.ts
2619
- var Xi = 500;
2620
- function Zi(e) {
2621
- let t = B(null), n = null;
2621
+ var da = 500;
2622
+ function fa(e) {
2623
+ let t = W(null), n = null;
2622
2624
  function r() {
2623
2625
  n !== null && (clearTimeout(n), n = null);
2624
2626
  }
2625
- let i = ge(null), a = 0, o = null, s = 0, c = !1, l = null, u = mn(), d = ie({
2627
+ let i = Te(null), a = 0, o = null, s = 0, c = !1, l = null, u = Dn(), d = ie({
2626
2628
  pagesContainer: e.pagesRef,
2627
2629
  onScrollExtendSelection: (e, t) => {
2628
2630
  if (!c || l === null) return;
2629
2631
  let n = m(e, t);
2630
2632
  n !== null && n !== l && g(l, n);
2631
2633
  }
2632
- }), f = B({
2634
+ }), f = W({
2633
2635
  currentPage: 1,
2634
2636
  totalPages: 1,
2635
2637
  visible: !1
2636
2638
  }), p = null;
2637
2639
  function m(t, n) {
2638
- return qi(e.pagesRef.value, e.editorView.value, t, n);
2640
+ return ca(e.pagesRef.value, e.editorView.value, t, n);
2639
2641
  }
2640
2642
  function h() {
2641
2643
  let t = i.value;
@@ -2648,18 +2650,18 @@ function Zi(e) {
2648
2650
  function g(e, t) {
2649
2651
  let n = h();
2650
2652
  if (n) try {
2651
- let r = n.state.doc.resolve(e), i = t === void 0 ? r : n.state.doc.resolve(t), a = Z.between(r, i);
2653
+ let r = n.state.doc.resolve(e), i = t === void 0 ? r : n.state.doc.resolve(t), a = tt.between(r, i);
2652
2654
  n.dispatch(n.state.tr.setSelection(a));
2653
2655
  } catch {}
2654
2656
  }
2655
2657
  function _(t) {
2656
- Ki(e.pagesRef.value, e.pagesViewportRef.value, t);
2658
+ sa(e.pagesRef.value, e.pagesViewportRef.value, t);
2657
2659
  }
2658
2660
  function v(t) {
2659
- Ji(e.pagesRef.value, t, g, i.value?.position);
2661
+ la(e.pagesRef.value, t, g, i.value?.position);
2660
2662
  }
2661
2663
  function y(t) {
2662
- Yi(e.pagesRef.value, t, g, i.value?.position);
2664
+ ua(e.pagesRef.value, t, g, i.value?.position);
2663
2665
  }
2664
2666
  function b(t) {
2665
2667
  let n = e.editorView.value;
@@ -2688,7 +2690,7 @@ function Zi(e) {
2688
2690
  if (!o) return;
2689
2691
  let s = e.pagesViewportRef.value;
2690
2692
  if (!s || !(a.target instanceof HTMLElement)) return;
2691
- let l = pn({
2693
+ let l = En({
2692
2694
  mouseX: a.clientX,
2693
2695
  mouseY: a.clientY,
2694
2696
  pagesContainer: o,
@@ -2698,7 +2700,7 @@ function Zi(e) {
2698
2700
  if (!l) {
2699
2701
  n === null && (n = setTimeout(() => {
2700
2702
  t.value = null, n = null;
2701
- }, fn));
2703
+ }, Tn));
2702
2704
  return;
2703
2705
  }
2704
2706
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -2713,7 +2715,7 @@ function Zi(e) {
2713
2715
  n.preventDefault(), n.stopPropagation();
2714
2716
  let r = t.value, i = e.editorView.value;
2715
2717
  if (!r || !i) return;
2716
- let a = i.state.tr.setSelection(Z.create(i.state.doc, r.cellPmPos + 1));
2718
+ let a = i.state.tr.setSelection(tt.create(i.state.doc, r.cellPmPos + 1));
2717
2719
  i.dispatch(a);
2718
2720
  let o = e.getCommands(), s = r.type === "row" ? o.addRowBelow : o.addColumnRight;
2719
2721
  s && (s()(i.state, (e) => i.dispatch(e), i), t.value = null, i.focus());
@@ -2858,13 +2860,13 @@ function Zi(e) {
2858
2860
  i.value && d && (d.closest(".layout-page-header") || d.closest(".layout-page-footer") || d.closest(".hf-editor") || (i.value = null, n.focus()));
2859
2861
  let f = h() ?? n;
2860
2862
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
2861
- let p = qe(r);
2863
+ let p = ot(r);
2862
2864
  if (p) {
2863
2865
  t.preventDefault(), t.stopPropagation();
2864
2866
  let n = Number(p.dataset.pmStart);
2865
2867
  if (!Number.isNaN(n)) {
2866
2868
  try {
2867
- f.dispatch(f.state.tr.setSelection(Ve.create(f.state.doc, n)));
2869
+ f.dispatch(f.state.tr.setSelection(Z.create(f.state.doc, n)));
2868
2870
  } catch {}
2869
2871
  e.selectedImage.value = {
2870
2872
  element: p,
@@ -2883,12 +2885,12 @@ function Zi(e) {
2883
2885
  return;
2884
2886
  }
2885
2887
  let b = Date.now();
2886
- if (b - a < Xi && o === _ ? s++ : s = 1, a = b, o = _, s === 2) v(_);
2888
+ if (b - a < da && o === _ ? s++ : s = 1, a = b, o = _, s === 2) v(_);
2887
2889
  else if (s >= 3) y(_), s = 0;
2888
2890
  else if (t.shiftKey) {
2889
2891
  let { from: e } = f.state.selection;
2890
2892
  g(e, _);
2891
- } else g(_), l = _, c = !0, u.begin(hn(f, _));
2893
+ } else g(_), l = _, c = !0, u.begin(On(f, _));
2892
2894
  f.focus();
2893
2895
  }
2894
2896
  function ae(e) {
@@ -2932,9 +2934,9 @@ function Zi(e) {
2932
2934
  };
2933
2935
  }, 600);
2934
2936
  }
2935
- return pe(() => {
2937
+ return Se(() => {
2936
2938
  window.addEventListener("mousemove", ae), window.addEventListener("mouseup", oe), e.pagesViewportRef.value?.addEventListener("scroll", w, { passive: !0 });
2937
- }), fe(() => {
2939
+ }), xe(() => {
2938
2940
  r(), window.removeEventListener("mousemove", ae), window.removeEventListener("mouseup", oe), e.pagesViewportRef.value?.removeEventListener("scroll", w), p && clearTimeout(p);
2939
2941
  }), {
2940
2942
  tableInsertButton: t,
@@ -2956,17 +2958,17 @@ function Zi(e) {
2956
2958
  }
2957
2959
  //#endregion
2958
2960
  //#region src/utils/hostFonts.ts
2959
- function Qi(e) {
2961
+ function pa(e) {
2960
2962
  return typeof e == "string" && e.trim().length > 0;
2961
2963
  }
2962
- function $i(e) {
2963
- return typeof e != "object" || !e ? !1 : Qi(Reflect.get(e, "family")) && Qi(Reflect.get(e, "src"));
2964
+ function ma(e) {
2965
+ return typeof e != "object" || !e ? !1 : pa(Reflect.get(e, "family")) && pa(Reflect.get(e, "src"));
2964
2966
  }
2965
- function ea(e) {
2967
+ function ha(e) {
2966
2968
  if (!e) return [];
2967
2969
  let t = [];
2968
2970
  for (let n of e) {
2969
- if (!$i(n)) continue;
2971
+ if (!ma(n)) continue;
2970
2972
  let e = { display: "swap" };
2971
2973
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
2972
2974
  family: n.family.trim(),
@@ -2976,10 +2978,10 @@ function ea(e) {
2976
2978
  }
2977
2979
  return t;
2978
2980
  }
2979
- function ta() {
2981
+ function ga() {
2980
2982
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
2981
2983
  }
2982
- async function na(e, t, n, r) {
2984
+ async function _a(e, t, n, r) {
2983
2985
  let i;
2984
2986
  try {
2985
2987
  i = new FontFace(t, n, r), e.add(i);
@@ -2988,39 +2990,39 @@ async function na(e, t, n, r) {
2988
2990
  }
2989
2991
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
2990
2992
  }
2991
- async function ra(e) {
2992
- let t = ta();
2993
+ async function va(e) {
2994
+ let t = ga();
2993
2995
  if (!t) return [];
2994
- let n = ea(e);
2996
+ let n = ha(e);
2995
2997
  if (n.length === 0) return [];
2996
2998
  let r = [];
2997
2999
  return await Promise.all(n.map(async ({ family: e, source: n, descriptors: i }) => {
2998
- let a = await na(t, e, n, i);
3000
+ let a = await _a(t, e, n, i);
2999
3001
  a && r.push(a);
3000
3002
  })), r;
3001
3003
  }
3002
- function ia(e) {
3003
- let t = ta();
3004
+ function ya(e) {
3005
+ let t = ga();
3004
3006
  if (t) for (let n of e) t.delete(n);
3005
3007
  }
3006
3008
  //#endregion
3007
3009
  //#region src/components/DocxEditor.vue?vue&type=script&setup=true&lang.ts
3008
- var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3010
+ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3009
3011
  key: 0,
3010
3012
  class: "docx-editor-vue__error"
3011
- }, sa = {
3013
+ }, Sa = {
3012
3014
  key: 1,
3013
3015
  class: "docx-editor-vue__loading"
3014
- }, ca = {
3016
+ }, Ca = {
3015
3017
  key: 2,
3016
3018
  class: "docx-editor-vue__placeholder"
3017
- }, la = { class: "docx-editor-vue__editor-area" }, ua = {
3019
+ }, wa = { class: "docx-editor-vue__editor-area" }, Ta = {
3018
3020
  key: 0,
3019
3021
  class: "docx-editor-vue__ruler-h"
3020
- }, da = {
3022
+ }, Ea = {
3021
3023
  key: 1,
3022
3024
  class: "docx-editor-vue__ruler-v"
3023
- }, fa = {
3025
+ }, Da = {
3024
3026
  class: "docx-editor-vue__editor-content-wrapper",
3025
3027
  style: {
3026
3028
  position: "relative",
@@ -3028,14 +3030,15 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3028
3030
  flexDirection: "column",
3029
3031
  minHeight: "100%"
3030
3032
  }
3031
- }, pa = {
3033
+ }, Oa = {
3032
3034
  "data-testid": "selection-overlay",
3033
3035
  class: "docx-editor-vue__decoration-origin",
3034
3036
  "aria-hidden": "true"
3035
- }, ma = ["aria-label"], ha = /*#__PURE__*/ e(/* @__PURE__ */ N({
3037
+ }, ka = ["aria-label"], Aa = /*#__PURE__*/ t(/* @__PURE__ */ B({
3036
3038
  __name: "DocxEditor",
3037
3039
  props: {
3038
3040
  documentBuffer: { default: null },
3041
+ password: {},
3039
3042
  document: { default: null },
3040
3043
  documentKey: {},
3041
3044
  onSave: {},
@@ -3149,38 +3152,39 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3149
3152
  "mode-change",
3150
3153
  "comments-change"
3151
3154
  ],
3152
- setup(e, { expose: r, emit: i }) {
3153
- let o = e, s = i;
3154
- f(), a(o.components), ir(B(!1));
3155
- let c = B(o.mode), l = D(() => o.readOnly || c.value === "viewing"), u = D(() => o.showReviewControls), d = D(() => Xe(c.value)), p = B("all-markup");
3155
+ setup(t, { expose: n, emit: a }) {
3156
+ let o = t, s = a;
3157
+ e(), i(o.components), yr(W(!1));
3158
+ let l = W(o.mode), u = N(() => o.readOnly || l.value === "viewing"), d = N(() => o.showReviewControls), f = N(() => lt(l.value)), p = W("all-markup");
3156
3159
  function m() {
3157
- dn(Ze(c.value));
3160
+ dn(ut(l.value));
3158
3161
  }
3159
3162
  function g(e) {
3160
3163
  p.value = e;
3161
3164
  }
3162
- let b = D(() => p.value === "all-markup" ? "" : `folio-root--${p.value}`), { t: x } = t(), S = ({ node: e }) => e;
3165
+ let b = N(() => p.value === "all-markup" ? "" : `folio-root--${p.value}`), { t: x } = c(), S = ({ node: e }) => e;
3163
3166
  S.props = ["node"];
3164
- let te = D(() => o.documentBuffer != null || o.document != null), re = B(!1);
3165
- G(te, (e) => {
3167
+ let te = N(() => o.documentBuffer != null || o.document != null), re = W(!1);
3168
+ J(te, (e) => {
3166
3169
  e || (re.value = !1);
3167
3170
  });
3168
- let ie = B(null), E = B(null), se = B(null), le = B(null), N = D(() => o.showRuler ?? !1), P = B(0), F = B(!1), I = B(!1), me = B(!1), V = B(!1), W = B(!1), K = B(!1), q = B(o.showOutline), Y = B(!1), ye = B(null), be = ge([]), Se = ge([]), { zoom: X, zoomPercent: Te, isMinZoom: Ne, isMaxZoom: Pe, setZoom: Fe, zoomIn: Ie, zoomOut: Le, handleWheel: Re, handleKeyDown: ze, ZOOM_PRESETS: Be } = w(o.initialZoom);
3169
- function Ve(e) {
3170
- o.enableWheelZoom !== !1 && Re(e);
3171
+ let ie = W(null), T = W(null), se = W(null), ce = W(null), le = N(() => o.showRuler ?? !1), E = W(0), D = W(!1), ue = W(!1), de = W(!1), fe = W(!1), O = W(!1), k = W(!1), A = W(o.showOutline), j = W(!1), pe = W(null), me = Te([]), ge = Te([]), { zoom: B, zoomPercent: _e, isMinZoom: ve, isMaxZoom: be, setZoom: Ce, zoomIn: G, zoomOut: Ee, handleWheel: Oe, handleKeyDown: ke, ZOOM_PRESETS: Ae } = w(o.initialZoom);
3172
+ function Me(e) {
3173
+ o.enableWheelZoom !== !1 && Oe(e);
3171
3174
  }
3172
- Li({
3173
- showKeyboardShortcuts: me,
3174
- showFindReplace: F,
3175
- showHyperlink: I,
3176
- handleZoomKeyDown: ze
3175
+ Qi({
3176
+ showKeyboardShortcuts: de,
3177
+ showFindReplace: D,
3178
+ showHyperlink: ue,
3179
+ handleZoomKeyDown: ke
3177
3180
  });
3178
- let { editor: He, editorView: Z, editorState: Ue, isReady: We, isDirty: Ge, parseError: Ke, layout: qe, blocks: Je, measures: Ye, loadBuffer: Qe, loadDocument: $e, save: et, getDocument: tt, getCommands: nt, focus: rt, reLayout: it } = ae({
3181
+ let { editor: Ne, editorView: X, editorState: Ie, isReady: Re, isDirty: Ke, parseError: qe, layout: Je, blocks: Ye, measures: Xe, loadBuffer: Ze, loadDocument: Qe, save: $e, getDocument: Z, getCommands: et, focus: tt, reLayout: nt } = ae({
3179
3182
  hiddenContainer: ie,
3180
- pagesContainer: E,
3181
- readOnly: l,
3182
- editorMode: c,
3183
+ pagesContainer: T,
3184
+ readOnly: u,
3185
+ editorMode: l,
3183
3186
  author: () => o.author,
3187
+ password: () => o.password,
3184
3188
  documentKey: () => o.documentKey,
3185
3189
  externalPlugins: [],
3186
3190
  onAnonymizationMatchesChange: (e) => o.onAnonymizationMatchesChange?.(e),
@@ -3194,7 +3198,7 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3194
3198
  o.onError?.(e), s("error", e);
3195
3199
  },
3196
3200
  onSelectionUpdate: (e) => {
3197
- if (o.onSelectionChange?.(ve(e)), o.onSelectionTextChange) {
3201
+ if (o.onSelectionChange?.(je(e)), o.onSelectionTextChange) {
3198
3202
  let { from: t, to: n } = e.selection, r = t === n ? "" : e.doc.textBetween(t, n, " ", " ");
3199
3203
  o.onSelectionTextChange({
3200
3204
  from: t,
@@ -3207,127 +3211,127 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3207
3211
  onReadOnlyEditAttempt: () => o.onReadonlyEditAttempt?.(),
3208
3212
  featureFlags: () => o.featureFlags,
3209
3213
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
3210
- }), at = D(() => !We.value && te.value && !(o.preserveDocumentWhileLoading === !0 && re.value));
3211
- function ot() {
3212
- Z.value && (Ae(), ke(), it());
3214
+ }), rt = N(() => !Re.value && te.value && !(o.preserveDocumentWhileLoading === !0 && re.value));
3215
+ function it() {
3216
+ X.value && (Ue(), He(), nt());
3213
3217
  }
3214
- G(() => o.fonts, (e, t, n) => {
3218
+ J(() => o.fonts, (e, t, n) => {
3215
3219
  if (!e || e.length === 0) return;
3216
3220
  let r = !1, i = [];
3217
- ra(e).then((e) => {
3221
+ va(e).then((e) => {
3218
3222
  if (r) {
3219
- ia(e);
3223
+ ya(e);
3220
3224
  return;
3221
3225
  }
3222
- i = e, e.length !== 0 && ot();
3226
+ i = e, e.length !== 0 && it();
3223
3227
  }), n(() => {
3224
- r = !0, i.length !== 0 && (ia(i), ot());
3228
+ r = !0, i.length !== 0 && (ya(i), it());
3225
3229
  });
3226
3230
  }, { immediate: !0 });
3227
- let { selectedImage: st, imageInteracting: ct, imageToolbarContext: lt, handleToolbarImageWrap: ut, handleImageTransform: dt } = Ii({
3228
- editorView: Z,
3229
- zoom: X,
3230
- stateTick: P,
3231
- getCommands: nt
3232
- }), { hyperlinkPopupData: ft, handleHyperlinkSubmit: pt, handleHyperlinkRemove: mt, handleHyperlinkPopupNavigate: ht, handleHyperlinkPopupEdit: gt, handleHyperlinkPopupRemove: _t } = Fi({
3233
- editorView: Z,
3234
- getCommands: nt
3235
- }), vt = C(), { tableInsertButton: yt, scrollPageInfo: bt, resolvePos: xt, setPmSelection: St, scrollVisiblePositionIntoView: Ct, handlePagesMouseDown: wt, handlePagesMouseMove: Tt, handlePagesClick: Et, handleTableInsertClick: Dt } = Zi({
3236
- editorView: Z,
3237
- pagesRef: E,
3231
+ let { selectedImage: at, imageInteracting: ot, imageToolbarContext: st, handleToolbarImageWrap: ct, handleImageTransform: dt } = Zi({
3232
+ editorView: X,
3233
+ zoom: B,
3234
+ stateTick: E,
3235
+ getCommands: et
3236
+ }), { hyperlinkPopupData: ft, handleHyperlinkSubmit: pt, handleHyperlinkRemove: mt, handleHyperlinkPopupNavigate: ht, handleHyperlinkPopupEdit: gt, handleHyperlinkPopupRemove: _t } = Xi({
3237
+ editorView: X,
3238
+ getCommands: et
3239
+ }), vt = C(), { tableInsertButton: yt, scrollPageInfo: bt, resolvePos: xt, setPmSelection: St, scrollVisiblePositionIntoView: Ct, handlePagesMouseDown: wt, handlePagesMouseMove: Tt, handlePagesClick: Et, handleTableInsertClick: Dt } = fa({
3240
+ editorView: X,
3241
+ pagesRef: T,
3238
3242
  pagesViewportRef: se,
3239
- selectedImage: st,
3240
- imageInteracting: ct,
3243
+ selectedImage: at,
3244
+ imageInteracting: ot,
3241
3245
  hyperlinkPopupData: ft,
3242
- readOnly: l,
3243
- zoom: X,
3244
- layout: qe,
3246
+ readOnly: u,
3247
+ zoom: B,
3248
+ layout: Je,
3245
3249
  tableResize: {
3246
3250
  tryStartResize: vt.tryStartResize,
3247
- isResizing: D(() => vt.isResizing())
3251
+ isResizing: N(() => vt.isResizing())
3248
3252
  },
3249
- getCommands: nt,
3250
- getDocument: tt,
3251
- reLayout: it,
3253
+ getCommands: et,
3254
+ getDocument: Z,
3255
+ reLayout: nt,
3252
3256
  emit: () => {},
3253
3257
  clearOverlay: () => {}
3254
- }), Ot = Ri({
3255
- editorView: Z,
3256
- showOutline: q,
3257
- showSidebar: Y,
3258
- outlineHeadings: Se,
3259
- activeSidebarItem: ye,
3258
+ }), Ot = $i({
3259
+ editorView: X,
3260
+ showOutline: A,
3261
+ showSidebar: j,
3262
+ outlineHeadings: ge,
3263
+ activeSidebarItem: pe,
3260
3264
  extractCommentsAndChanges: () => {},
3261
3265
  scrollToVisiblePosition: Ct
3262
- }), { contextMenu: kt, imageContextMenu: At, imageContextMenuTextActions: jt, customTextMenuItems: Mt, handleContextMenu: Nt, handleSelectedImageContextMenu: Pt, handleImageWrapSelect: Ft, handleContextMenuAction: It } = Di({
3263
- editorView: Z,
3264
- selectedImage: st,
3265
- zoom: X,
3266
- showImageProperties: W,
3267
- getCommands: nt,
3266
+ }), { contextMenu: kt, imageContextMenu: At, imageContextMenuTextActions: jt, customTextMenuItems: Mt, handleContextMenu: Nt, handleSelectedImageContextMenu: Pt, handleImageWrapSelect: Ft, handleContextMenuAction: It } = Hi({
3267
+ editorView: X,
3268
+ selectedImage: at,
3269
+ zoom: B,
3270
+ showImageProperties: O,
3271
+ getCommands: et,
3268
3272
  clearOverlay: () => {},
3269
3273
  setPmSelection: St,
3270
3274
  resolvePos: xt,
3271
- customContextMenuItems: () => l.value ? void 0 : o.customContextMenuItems,
3275
+ customContextMenuItems: () => u.value ? void 0 : o.customContextMenuItems,
3272
3276
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t)
3273
- }), Lt = oe(Z, P), Rt = D(() => Lt.value.entries), Q = hi({
3274
- editorView: Z,
3275
- getDocument: tt,
3277
+ }), Lt = oe(X, E), Rt = N(() => Lt.value.entries), Q = Ai({
3278
+ editorView: X,
3279
+ getDocument: Z,
3276
3280
  author: () => o.author,
3277
3281
  commentsProp: () => o.comments,
3278
3282
  onCommentsChange: (e) => {
3279
3283
  o.onCommentsChange?.(e), s("comments-change", e);
3280
3284
  },
3281
- reLayout: it
3282
- }), zt = Q.comments, $ = mi({
3283
- editorView: Z,
3285
+ reLayout: nt
3286
+ }), zt = Q.comments, $ = ki({
3287
+ editorView: X,
3284
3288
  pagesViewport: se,
3285
- pagesContainer: E,
3286
- readOnly: l,
3289
+ pagesContainer: T,
3290
+ readOnly: u,
3287
3291
  createComment: Q.createComment,
3288
3292
  pushComment: Q.pushComment,
3289
- reLayout: it,
3290
- showSidebar: Y,
3293
+ reLayout: nt,
3294
+ showSidebar: j,
3291
3295
  setActiveSidebarItem: (e) => {
3292
- ye.value = e;
3296
+ pe.value = e;
3293
3297
  }
3294
3298
  });
3295
3299
  function Bt(e) {
3296
3300
  navigator.clipboard?.writeText(e), ft.value = null;
3297
3301
  }
3298
- let Vt = D(() => {
3299
- P.value;
3300
- let e = tt()?.package.document;
3302
+ let Vt = N(() => {
3303
+ E.value;
3304
+ let e = Z()?.package.document;
3301
3305
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
3302
- }), Ht = D(() => {
3303
- P.value;
3306
+ }), Ht = N(() => {
3307
+ E.value;
3304
3308
  let e = {};
3305
3309
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
3306
- let t = tt()?.package.styles?.styles;
3310
+ let t = Z()?.package.styles?.styles;
3307
3311
  return t !== void 0 && (e.documentStyles = t), e;
3308
- }), Ut = D(() => Me(Vt.value?.pageWidth ?? 12240) * X.value), Wt = D(() => {
3312
+ }), Ut = N(() => Ge(Vt.value?.pageWidth ?? 12240) * B.value), Wt = N(() => {
3309
3313
  let e = /* @__PURE__ */ new Set();
3310
3314
  for (let t of zt.value) t.done && e.add(t.id);
3311
3315
  return e;
3312
- }), Gt = D(() => ({
3313
- transform: X.value === 1 ? void 0 : `scale(${X.value})`,
3316
+ }), Gt = N(() => ({
3317
+ transform: B.value === 1 ? void 0 : `scale(${B.value})`,
3314
3318
  transformOrigin: "top center",
3315
3319
  transition: "transform 0.2s ease"
3316
- })), { handleApplyStyle: Kt, handleInsertSymbol: qt, handleInsertSectionBreakNextPage: Jt, handleInsertSectionBreakContinuous: Yt } = Pi({
3317
- editorView: Z,
3318
- getDocument: tt
3320
+ })), { handleApplyStyle: Kt, handleInsertSymbol: qt, handleInsertSectionBreakNextPage: Jt, handleInsertSectionBreakContinuous: Yt } = Yi({
3321
+ editorView: X,
3322
+ getDocument: Z
3319
3323
  });
3320
3324
  function Xt() {
3321
3325
  if (o.onInsertImage) {
3322
3326
  o.onInsertImage();
3323
3327
  return;
3324
3328
  }
3325
- let e = Z.value;
3329
+ let e = X.value;
3326
3330
  if (!e) return;
3327
3331
  let t = document.createElement("input");
3328
3332
  t.type = "file", t.accept = "image/*", t.style.display = "none", t.addEventListener("change", () => {
3329
3333
  let n = t.files?.[0];
3330
- n && xe(e, n, () => e.focus()), t.remove();
3334
+ n && Pe(e, n, () => e.focus()), t.remove();
3331
3335
  }), document.body.appendChild(t), t.click();
3332
3336
  }
3333
3337
  function Zt(e, t) {
@@ -3335,37 +3339,37 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3335
3339
  o.onInsertTable(e, t);
3336
3340
  return;
3337
3341
  }
3338
- let n = Z.value;
3339
- n && (we(n, e, t), n.focus());
3342
+ let n = X.value;
3343
+ n && (Le(n, e, t), n.focus());
3340
3344
  }
3341
3345
  function Qt() {
3342
3346
  if (o.onInsertPageBreak) {
3343
3347
  o.onInsertPageBreak();
3344
3348
  return;
3345
3349
  }
3346
- let e = Z.value;
3347
- e && (Ce(e), e.focus());
3350
+ let e = X.value;
3351
+ e && (Fe(e), e.focus());
3348
3352
  }
3349
3353
  function $t() {
3350
3354
  if (o.onInsertTOC) {
3351
3355
  o.onInsertTOC();
3352
3356
  return;
3353
3357
  }
3354
- let e = Z.value;
3355
- e && (Ee(e), e.focus());
3358
+ let e = X.value;
3359
+ e && (ze(e), e.focus());
3356
3360
  }
3357
- let { handlePageSetupApply: en, handleLeftMarginChange: tn, handleRightMarginChange: nn, handleTopMarginChange: rn, handleBottomMarginChange: an, handleIndentLeftChange: on, handleIndentRightChange: sn, handleFirstLineIndentChange: cn, handleTabStopRemove: ln } = zi({
3358
- editorView: Z,
3359
- getDocument: tt,
3360
- readOnly: l,
3361
- stateTick: P,
3362
- reLayout: it,
3361
+ let { handlePageSetupApply: en, handleLeftMarginChange: tn, handleRightMarginChange: nn, handleTopMarginChange: rn, handleBottomMarginChange: an, handleIndentLeftChange: on, handleIndentRightChange: sn, handleFirstLineIndentChange: cn, handleTabStopRemove: ln } = ea({
3362
+ editorView: X,
3363
+ getDocument: Z,
3364
+ readOnly: u,
3365
+ stateTick: E,
3366
+ reLayout: nt,
3363
3367
  onChange: (e) => {
3364
3368
  o.onChange?.(e), s("change", e), s("update:document", e);
3365
3369
  }
3366
- }), un = D(() => {
3367
- P.value;
3368
- let e = Z.value, t = e ? De(e.state).paragraphFormatting : {};
3370
+ }), un = N(() => {
3371
+ E.value;
3372
+ let e = X.value, t = e ? Be(e.state).paragraphFormatting : {};
3369
3373
  return {
3370
3374
  indentLeft: t.indentLeft ?? 0,
3371
3375
  indentRight: t.indentRight ?? 0,
@@ -3375,28 +3379,28 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3375
3379
  };
3376
3380
  });
3377
3381
  function dn(e) {
3378
- c.value !== e && (c.value = e, o.onModeChange?.(e), s("mode-change", e));
3382
+ l.value !== e && (l.value = e, o.onModeChange?.(e), s("mode-change", e));
3379
3383
  }
3380
3384
  function fn(e) {
3381
3385
  switch (e) {
3382
3386
  case "find":
3383
3387
  case "findReplace":
3384
- F.value = !0;
3388
+ D.value = !0;
3385
3389
  break;
3386
3390
  case "insertSymbol":
3387
- V.value = !0;
3391
+ fe.value = !0;
3388
3392
  break;
3389
3393
  case "insertHyperlink":
3390
- I.value = !0;
3394
+ ue.value = !0;
3391
3395
  break;
3392
3396
  case "pageSetup":
3393
- K.value = !0;
3397
+ k.value = !0;
3394
3398
  break;
3395
3399
  case "toggleOutline":
3396
3400
  Ot.handleToggleOutline();
3397
3401
  break;
3398
3402
  case "toggleSidebar":
3399
- Y.value = !Y.value;
3403
+ j.value = !j.value;
3400
3404
  break;
3401
3405
  case "insertImage":
3402
3406
  Xt();
@@ -3420,19 +3424,19 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3420
3424
  function pn(e, t) {
3421
3425
  Zt(e, t);
3422
3426
  }
3423
- let mn = B(!1);
3424
- Oi({
3427
+ let mn = W(!1);
3428
+ Ui({
3425
3429
  documentBuffer: () => o.documentBuffer ?? null,
3426
3430
  document: () => o.document ?? null,
3427
- loadDocumentBuffer: Qe,
3428
- loadDocument: $e,
3431
+ loadDocumentBuffer: Ze,
3432
+ loadDocument: Qe,
3429
3433
  sidebarAutoOpenedRef: mn
3430
- }), G(() => o.mode, (e) => {
3431
- e && e !== c.value && (c.value = e);
3432
- }), G(() => o.showOutline, (e) => {
3433
- q.value = !!e, Ot.recomputeHeadingsIfOpen();
3434
+ }), J(() => o.mode, (e) => {
3435
+ e && e !== l.value && (l.value = e);
3436
+ }), J(() => o.showOutline, (e) => {
3437
+ A.value = !!e, Ot.recomputeHeadingsIfOpen();
3434
3438
  });
3435
- let hn = B(!1);
3439
+ let hn = W(!1);
3436
3440
  function gn(e) {
3437
3441
  let t = e.currentTarget;
3438
3442
  t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop);
@@ -3442,114 +3446,114 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3442
3446
  hn.value = !0;
3443
3447
  let e = o.initialScrollTop;
3444
3448
  requestAnimationFrame(() => {
3445
- le.value && (le.value.scrollTop = e);
3449
+ ce.value && (ce.value.scrollTop = e);
3446
3450
  });
3447
3451
  }
3448
- G(We, (e) => {
3452
+ J(Re, (e) => {
3449
3453
  if (!e) {
3450
3454
  hn.value = !1;
3451
3455
  return;
3452
3456
  }
3453
3457
  re.value = !0, Ot.recomputeHeadingsIfOpen(), Q.seedFromDocument();
3454
- let t = tt();
3455
- t && o.onCompatibilityChange?.(Oe(t)), o.autoOpenReviewSidebar !== !1 && !mn.value && (zt.value.length > 0 || Rt.value.length > 0) && (mn.value = !0, Y.value = !0), _n(), s("ready");
3456
- }), pe(() => {
3457
- let e = He.on("selectionChange", () => {
3458
- P.value++, $.updateFloatingButton();
3459
- }), t = He.on("docChange", () => {
3460
- P.value++, Ot.recomputeHeadingsIfOpen();
3461
- }), n = He.on("layoutComplete", () => {
3462
- P.value++;
3463
- }), r = vt.install(), i = je(() => o.onFontsLoaded?.());
3464
- fe(() => {
3458
+ let t = Z();
3459
+ t && o.onCompatibilityChange?.(Ve(t)), o.autoOpenReviewSidebar !== !1 && !mn.value && (zt.value.length > 0 || Rt.value.length > 0) && (mn.value = !0, j.value = !0), _n(), s("ready");
3460
+ }), Se(() => {
3461
+ let e = Ne.on("selectionChange", () => {
3462
+ E.value++, $.updateFloatingButton();
3463
+ }), t = Ne.on("docChange", () => {
3464
+ E.value++, Ot.recomputeHeadingsIfOpen();
3465
+ }), n = Ne.on("layoutComplete", () => {
3466
+ E.value++;
3467
+ }), r = vt.install(), i = We(() => o.onFontsLoaded?.());
3468
+ xe(() => {
3465
3469
  e(), t(), n(), r(), i();
3466
3470
  });
3467
3471
  });
3468
- let { exposed: vn } = Ni({
3469
- editor: He,
3470
- editorView: Z,
3471
- isDirty: Ge,
3472
+ let { exposed: vn } = Ji({
3473
+ editor: Ne,
3474
+ editorView: X,
3475
+ isDirty: Ke,
3472
3476
  commentsDirty: Q.commentsDirty,
3473
3477
  clearCommentsDirty: Q.clearCommentsDirty,
3474
- layout: qe,
3475
- pagesRef: E,
3478
+ layout: Je,
3479
+ pagesRef: T,
3476
3480
  pagesViewportRef: se,
3477
- zoom: X,
3481
+ zoom: B,
3478
3482
  scrollVisiblePositionIntoView: Ct,
3479
3483
  author: () => o.author,
3480
3484
  createAIEditComment: (e) => {
3481
3485
  let t = Q.createComment(e);
3482
3486
  return Q.pushComment(t), t.id;
3483
3487
  },
3484
- focus: rt,
3485
- getDocument: tt,
3486
- setZoom: Fe,
3487
- save: et,
3488
- loadDocument: $e,
3489
- loadDocumentBuffer: Qe,
3488
+ focus: tt,
3489
+ getDocument: Z,
3490
+ setZoom: Ce,
3491
+ save: $e,
3492
+ loadDocument: Qe,
3493
+ loadDocumentBuffer: Ze,
3490
3494
  onPrint: o.onPrint,
3491
3495
  onSave: o.onSave
3492
3496
  });
3493
- return r(vn), (t, r) => (z(), A("div", {
3494
- class: L([
3497
+ return n(vn), (e, n) => (U(), I("div", {
3498
+ class: V([
3495
3499
  "docx-editor-vue ep-root paged-editor",
3496
- e.className,
3500
+ t.className,
3497
3501
  b.value,
3498
- { "paged-editor--readonly": l.value }
3502
+ { "paged-editor--readonly": u.value }
3499
3503
  ]),
3500
- style: R(e.style)
3504
+ style: H(t.style)
3501
3505
  }, [
3502
- j("div", aa, [M(nr, {
3506
+ L("div", ba, [z(_r, {
3503
3507
  "show-table-insert": o.showTableInsert !== !1,
3504
- onRename: r[0] ||= (e) => s("rename", e),
3508
+ onRename: n[0] ||= (e) => s("rename", e),
3505
3509
  onMenuAction: fn,
3506
3510
  onInsertTable: pn
3507
3511
  }, {
3508
- "title-bar-left": _e(() => [he(t.$slots, "title-bar-left", {}, void 0, !0)]),
3509
- "title-bar-right": _e(() => [he(t.$slots, "title-bar-right", {}, void 0, !0)]),
3512
+ "title-bar-left": De(() => [we(e.$slots, "title-bar-left", {}, void 0, !0)]),
3513
+ "title-bar-right": De(() => [we(e.$slots, "title-bar-right", {}, void 0, !0)]),
3510
3514
  _: 3
3511
- }, 8, ["show-table-insert"]), e.showToolbar ? (z(), O(v, de({
3515
+ }, 8, ["show-table-insert"]), t.showToolbar ? (U(), P(v, ye({
3512
3516
  key: 0,
3513
- view: U(Z),
3514
- "get-commands": U(nt),
3515
- "state-tick": P.value,
3516
- "zoom-percent": U(Te),
3517
- "is-min-zoom": U(Ne),
3518
- "is-max-zoom": U(Pe),
3519
- "zoom-presets": U(Be),
3520
- "show-zoom-control": e.showZoomControl,
3521
- "editor-mode": c.value,
3522
- "show-review-controls": u.value,
3523
- "track-changes-on": d.value,
3517
+ view: q(X),
3518
+ "get-commands": q(et),
3519
+ "state-tick": E.value,
3520
+ "zoom-percent": q(_e),
3521
+ "is-min-zoom": q(ve),
3522
+ "is-max-zoom": q(be),
3523
+ "zoom-presets": q(Ae),
3524
+ "show-zoom-control": t.showZoomControl,
3525
+ "editor-mode": l.value,
3526
+ "show-review-controls": d.value,
3527
+ "track-changes-on": f.value,
3524
3528
  "display-mode": p.value,
3525
- "read-only": l.value,
3526
- "comments-sidebar-open": Y.value,
3527
- "image-context": U(lt),
3528
- theme: e.theme ?? null
3529
+ "read-only": u.value,
3530
+ "comments-sidebar-open": j.value,
3531
+ "image-context": q(st),
3532
+ theme: t.theme ?? null
3529
3533
  }, Ht.value, {
3530
- onFindReplace: r[1] ||= (e) => F.value = !0,
3531
- onInsertLink: r[2] ||= (e) => I.value = !0,
3532
- onInsertSymbol: r[3] ||= (e) => V.value = !0,
3534
+ onFindReplace: n[1] ||= (e) => D.value = !0,
3535
+ onInsertLink: n[2] ||= (e) => ue.value = !0,
3536
+ onInsertSymbol: n[3] ||= (e) => fe.value = !0,
3533
3537
  onInsertPageBreak: Qt,
3534
- onPageSetup: r[4] ||= (e) => K.value = !0,
3535
- onToggleOutline: U(Ot).handleToggleOutline,
3536
- onApplyStyle: U(Kt),
3537
- onZoomIn: U(Ie),
3538
- onZoomOut: U(Le),
3539
- onZoomSet: U(Fe),
3540
- onToggleSidebar: r[5] ||= (e) => Y.value = !Y.value,
3538
+ onPageSetup: n[4] ||= (e) => k.value = !0,
3539
+ onToggleOutline: q(Ot).handleToggleOutline,
3540
+ onApplyStyle: q(Kt),
3541
+ onZoomIn: q(G),
3542
+ onZoomOut: q(Ee),
3543
+ onZoomSet: q(Ce),
3544
+ onToggleSidebar: n[5] ||= (e) => j.value = !j.value,
3541
3545
  onModeChange: dn,
3542
3546
  onToggleTrackChanges: m,
3543
3547
  "onUpdate:displayMode": g,
3544
- onImageProperties: r[6] ||= (e) => W.value = !0,
3545
- onImageWrapType: U(ut),
3546
- onImageTransform: U(dt)
3547
- }), ce({
3548
- "table-context": _e(() => [M(ee, {
3549
- view: U(Z),
3550
- "get-commands": U(nt),
3551
- "state-tick": P.value,
3552
- theme: e.theme ?? null
3548
+ onImageProperties: n[6] ||= (e) => O.value = !0,
3549
+ onImageWrapType: q(ct),
3550
+ onImageTransform: q(dt)
3551
+ }), he({
3552
+ "table-context": De(() => [z(ee, {
3553
+ view: q(X),
3554
+ "get-commands": q(et),
3555
+ "state-tick": E.value,
3556
+ theme: t.theme ?? null
3553
3557
  }, null, 8, [
3554
3558
  "view",
3555
3559
  "get-commands",
@@ -3557,12 +3561,12 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3557
3561
  "theme"
3558
3562
  ])]),
3559
3563
  _: 2
3560
- }, [t.$slots["toolbar-extra"] || e.toolbarExtra ? {
3564
+ }, [e.$slots["toolbar-extra"] || t.toolbarExtra ? {
3561
3565
  name: "toolbar-extra",
3562
- fn: _e(() => [he(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (z(), O(S, {
3566
+ fn: De(() => [we(e.$slots, "toolbar-extra", {}, () => [t.toolbarExtra ? (U(), P(S, {
3563
3567
  key: 0,
3564
- node: e.toolbarExtra
3565
- }, null, 8, ["node"])) : k("", !0)], !0)]),
3568
+ node: t.toolbarExtra
3569
+ }, null, 8, ["node"])) : F("", !0)], !0)]),
3566
3570
  key: "0"
3567
3571
  } : void 0]), 1040, [
3568
3572
  "view",
@@ -3588,26 +3592,26 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3588
3592
  "onZoomSet",
3589
3593
  "onImageWrapType",
3590
3594
  "onImageTransform"
3591
- ])) : k("", !0)]),
3592
- M(Zn, {
3593
- "show-find-replace": F.value,
3594
- "onUpdate:showFindReplace": r[7] ||= (e) => F.value = e,
3595
- "show-hyperlink": I.value,
3596
- "onUpdate:showHyperlink": r[8] ||= (e) => I.value = e,
3597
- "show-insert-symbol": V.value,
3598
- "onUpdate:showInsertSymbol": r[9] ||= (e) => V.value = e,
3599
- "show-image-properties": W.value,
3600
- "onUpdate:showImageProperties": r[10] ||= (e) => W.value = e,
3601
- "show-page-setup": K.value,
3602
- "onUpdate:showPageSetup": r[11] ||= (e) => K.value = e,
3603
- view: U(Z),
3604
- bookmarks: be.value,
3605
- "selected-image-pm-pos": U(st)?.pmPos ?? null,
3595
+ ])) : F("", !0)]),
3596
+ z(fr, {
3597
+ "show-find-replace": D.value,
3598
+ "onUpdate:showFindReplace": n[7] ||= (e) => D.value = e,
3599
+ "show-hyperlink": ue.value,
3600
+ "onUpdate:showHyperlink": n[8] ||= (e) => ue.value = e,
3601
+ "show-insert-symbol": fe.value,
3602
+ "onUpdate:showInsertSymbol": n[9] ||= (e) => fe.value = e,
3603
+ "show-image-properties": O.value,
3604
+ "onUpdate:showImageProperties": n[10] ||= (e) => O.value = e,
3605
+ "show-page-setup": k.value,
3606
+ "onUpdate:showPageSetup": n[11] ||= (e) => k.value = e,
3607
+ view: q(X),
3608
+ bookmarks: me.value,
3609
+ "selected-image-pm-pos": q(at)?.pmPos ?? null,
3606
3610
  "section-properties": Vt.value,
3607
- onInsertSymbol: U(qt),
3608
- onHyperlinkSubmit: U(pt),
3609
- onHyperlinkRemove: U(mt),
3610
- onPageSetupApply: U(en)
3611
+ onInsertSymbol: q(qt),
3612
+ onHyperlinkSubmit: q(pt),
3613
+ onHyperlinkRemove: q(mt),
3614
+ onPageSetupApply: q(en)
3611
3615
  }, null, 8, [
3612
3616
  "show-find-replace",
3613
3617
  "show-hyperlink",
@@ -3623,41 +3627,41 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3623
3627
  "onHyperlinkRemove",
3624
3628
  "onPageSetupApply"
3625
3629
  ]),
3626
- U(Ke) ? (z(), A("div", oa, H(U(Ke)), 1)) : at.value ? (z(), A("div", sa, [he(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (z(), O(S, {
3630
+ q(qe) ? (U(), I("div", xa, K(q(qe)), 1)) : rt.value ? (U(), I("div", Sa, [we(e.$slots, "loading-indicator", {}, () => [t.loadingIndicator ? (U(), P(S, {
3627
3631
  key: 0,
3628
- node: e.loadingIndicator
3629
- }, null, 8, ["node"])) : (z(), A(T, { key: 1 }, [ue(H(U(x)("loadingDocument")), 1)], 64))], !0)])) : !U(We) && !te.value ? (z(), A("div", ca, [he(t.$slots, "placeholder", {}, () => [e.placeholder ? (z(), O(S, {
3632
+ node: t.loadingIndicator
3633
+ }, null, 8, ["node"])) : (U(), I(M, { key: 1 }, [R(K(q(x)("loadingDocument")), 1)], 64))], !0)])) : !q(Re) && !te.value ? (U(), I("div", Ca, [we(e.$slots, "placeholder", {}, () => [t.placeholder ? (U(), P(S, {
3630
3634
  key: 0,
3631
- node: e.placeholder
3632
- }, null, 8, ["node"])) : (z(), A(T, { key: 1 }, [ue("No document loaded")], 64))], !0)])) : k("", !0),
3633
- j("div", {
3635
+ node: t.placeholder
3636
+ }, null, 8, ["node"])) : (U(), I(M, { key: 1 }, [R("No document loaded")], 64))], !0)])) : F("", !0),
3637
+ L("div", {
3634
3638
  ref_key: "hiddenPmRef",
3635
3639
  ref: ie,
3636
3640
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-pm"
3637
3641
  }, null, 512),
3638
- j("div", {
3642
+ L("div", {
3639
3643
  ref_key: "editorScrollRef",
3640
- ref: le,
3644
+ ref: ce,
3641
3645
  class: "docx-editor-vue__editor-scroll",
3642
3646
  onScroll: gn
3643
- }, [j("div", la, [
3644
- N.value && !l.value ? (z(), A("div", ua, [M(ne, {
3647
+ }, [L("div", wa, [
3648
+ le.value && !u.value ? (U(), I("div", Ta, [z(ne, {
3645
3649
  "section-props": Vt.value,
3646
- zoom: U(X),
3647
- unit: e.rulerUnit ?? "inch",
3648
- editable: !l.value,
3650
+ zoom: q(B),
3651
+ unit: t.rulerUnit ?? "inch",
3652
+ editable: !u.value,
3649
3653
  "indent-left": un.value.indentLeft,
3650
3654
  "indent-right": un.value.indentRight,
3651
3655
  "first-line-indent": un.value.firstLineIndent,
3652
3656
  "hanging-indent": un.value.hangingIndent,
3653
3657
  "show-first-line-indent": !0,
3654
3658
  "tab-stops": un.value.tabs,
3655
- onLeftMarginChange: U(tn),
3656
- onRightMarginChange: U(nn),
3657
- onIndentLeftChange: U(on),
3658
- onIndentRightChange: U(sn),
3659
- onFirstLineIndentChange: U(cn),
3660
- onTabStopRemove: U(ln)
3659
+ onLeftMarginChange: q(tn),
3660
+ onRightMarginChange: q(nn),
3661
+ onIndentLeftChange: q(on),
3662
+ onIndentRightChange: q(sn),
3663
+ onFirstLineIndentChange: q(cn),
3664
+ onTabStopRemove: q(ln)
3661
3665
  }, null, 8, [
3662
3666
  "section-props",
3663
3667
  "zoom",
@@ -3674,14 +3678,14 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3674
3678
  "onIndentRightChange",
3675
3679
  "onFirstLineIndentChange",
3676
3680
  "onTabStopRemove"
3677
- ])])) : k("", !0),
3678
- N.value && !l.value ? (z(), A("div", da, [M(y, {
3681
+ ])])) : F("", !0),
3682
+ le.value && !u.value ? (U(), I("div", Ea, [z(y, {
3679
3683
  "section-props": Vt.value,
3680
- zoom: U(X),
3681
- unit: e.rulerUnit ?? "inch",
3682
- editable: !l.value,
3683
- onTopMarginChange: U(rn),
3684
- onBottomMarginChange: U(an)
3684
+ zoom: q(B),
3685
+ unit: t.rulerUnit ?? "inch",
3686
+ editable: !u.value,
3687
+ onTopMarginChange: q(rn),
3688
+ onBottomMarginChange: q(an)
3685
3689
  }, null, 8, [
3686
3690
  "section-props",
3687
3691
  "zoom",
@@ -3689,30 +3693,30 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3689
3693
  "editable",
3690
3694
  "onTopMarginChange",
3691
3695
  "onBottomMarginChange"
3692
- ])])) : k("", !0),
3693
- j("div", {
3696
+ ])])) : F("", !0),
3697
+ L("div", {
3694
3698
  ref_key: "pagesViewportRef",
3695
3699
  ref: se,
3696
3700
  class: "docx-editor-vue__pages-viewport",
3697
- onWheel: Ve,
3698
- onMousedown: r[20] ||= (...e) => U(wt) && U(wt)(...e),
3699
- onMousemove: r[21] ||= (...e) => U(Tt) && U(Tt)(...e),
3700
- onClick: r[22] ||= (...e) => U(Et) && U(Et)(...e),
3701
- onContextmenu: r[23] ||= J((...e) => U(Nt) && U(Nt)(...e), ["prevent"])
3701
+ onWheel: Me,
3702
+ onMousedown: n[20] ||= (...e) => q(wt) && q(wt)(...e),
3703
+ onMousemove: n[21] ||= (...e) => q(Tt) && q(Tt)(...e),
3704
+ onClick: n[22] ||= (...e) => q(Et) && q(Et)(...e),
3705
+ onContextmenu: n[23] ||= Y((...e) => q(Nt) && q(Nt)(...e), ["prevent"])
3702
3706
  }, [
3703
- j("div", fa, [j("div", {
3707
+ L("div", Da, [L("div", {
3704
3708
  ref_key: "pagesRef",
3705
- ref: E,
3709
+ ref: T,
3706
3710
  class: "docx-editor-vue__pages paged-editor__pages",
3707
- style: R(Gt.value)
3708
- }, null, 4), j("div", pa, [M(Kn, {
3709
- "get-view": () => U(Z),
3710
- "get-pages-container": () => E.value,
3711
- "editor-state": U(Ue),
3712
- zoom: U(X),
3713
- layout: U(qe),
3714
- blocks: U(Je),
3715
- measures: U(Ye),
3711
+ style: H(Gt.value)
3712
+ }, null, 4), L("div", Oa, [z(sr, {
3713
+ "get-view": () => q(X),
3714
+ "get-pages-container": () => T.value,
3715
+ "editor-state": q(Ie),
3716
+ zoom: q(B),
3717
+ layout: q(Je),
3718
+ blocks: q(Ye),
3719
+ measures: q(Xe),
3716
3720
  "on-term-click": o.onAnonymizationTermClick,
3717
3721
  "selected-canonical": o.selectedAnonymizationCanonical,
3718
3722
  "selection-seq": o.anonymizationSelectionSeq
@@ -3727,15 +3731,15 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3727
3731
  "on-term-click",
3728
3732
  "selected-canonical",
3729
3733
  "selection-seq"
3730
- ]), o.showTemplateDirectives ? (z(), O(Zr, {
3734
+ ]), o.showTemplateDirectives ? (U(), P(fi, {
3731
3735
  key: 0,
3732
- "get-view": () => U(Z),
3733
- "get-pages-container": () => E.value,
3734
- "editor-state": U(Ue),
3735
- zoom: U(X),
3736
- layout: U(qe),
3737
- blocks: U(Je),
3738
- measures: U(Ye)
3736
+ "get-view": () => q(X),
3737
+ "get-pages-container": () => T.value,
3738
+ "editor-state": q(Ie),
3739
+ zoom: q(B),
3740
+ layout: q(Je),
3741
+ blocks: q(Ye),
3742
+ measures: q(Xe)
3739
3743
  }, null, 8, [
3740
3744
  "get-view",
3741
3745
  "get-pages-container",
@@ -3744,29 +3748,29 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3744
3748
  "layout",
3745
3749
  "blocks",
3746
3750
  "measures"
3747
- ])) : k("", !0)])]),
3748
- M(Br, {
3749
- "image-info": U(st),
3750
- zoom: U(X),
3751
- view: U(Z),
3752
- onDeselect: r[12] ||= (e) => st.value = null,
3753
- onInteractStart: r[13] ||= (e) => ct.value = !0,
3754
- onInteractEnd: r[14] ||= (e) => ct.value = !1,
3755
- onContextMenu: U(Pt)
3751
+ ])) : F("", !0)])]),
3752
+ z(ti, {
3753
+ "image-info": q(at),
3754
+ zoom: q(B),
3755
+ view: q(X),
3756
+ onDeselect: n[12] ||= (e) => at.value = null,
3757
+ onInteractStart: n[13] ||= (e) => ot.value = !0,
3758
+ onInteractEnd: n[14] ||= (e) => ot.value = !1,
3759
+ onContextMenu: q(Pt)
3756
3760
  }, null, 8, [
3757
3761
  "image-info",
3758
3762
  "zoom",
3759
3763
  "view",
3760
3764
  "onContextMenu"
3761
3765
  ]),
3762
- M(si, {
3763
- data: U(ft),
3764
- "read-only": l.value,
3765
- onNavigate: U(ht),
3766
+ z(Si, {
3767
+ data: q(ft),
3768
+ "read-only": u.value,
3769
+ onNavigate: q(ht),
3766
3770
  onCopy: Bt,
3767
- onEdit: U(gt),
3768
- onRemove: U(_t),
3769
- onClose: r[15] ||= (e) => ft.value = null
3771
+ onEdit: q(gt),
3772
+ onRemove: q(_t),
3773
+ onClose: n[15] ||= (e) => ft.value = null
3770
3774
  }, null, 8, [
3771
3775
  "data",
3772
3776
  "read-only",
@@ -3774,23 +3778,23 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3774
3778
  "onEdit",
3775
3779
  "onRemove"
3776
3780
  ]),
3777
- U(yt) ? (z(), A("button", {
3781
+ q(yt) ? (U(), I("button", {
3778
3782
  key: 0,
3779
3783
  type: "button",
3780
3784
  class: "docx-editor-vue__table-insert-btn",
3781
- style: R({
3782
- left: U(yt).x + "px",
3783
- top: U(yt).y + "px"
3785
+ style: H({
3786
+ left: q(yt).x + "px",
3787
+ top: q(yt).y + "px"
3784
3788
  }),
3785
- "aria-label": U(yt).type === "row" ? "Insert row" : "Insert column",
3786
- onMousedown: r[16] ||= (...e) => U(Dt) && U(Dt)(...e)
3787
- }, " + ", 44, ma)) : k("", !0),
3788
- M(h, {
3789
- comments: U(zt),
3790
- "pages-container": E.value,
3791
- zoom: U(X),
3789
+ "aria-label": q(yt).type === "row" ? "Insert row" : "Insert column",
3790
+ onMousedown: n[16] ||= (...e) => q(Dt) && q(Dt)(...e)
3791
+ }, " + ", 44, ka)) : F("", !0),
3792
+ z(h, {
3793
+ comments: q(zt),
3794
+ "pages-container": T.value,
3795
+ zoom: q(B),
3792
3796
  "page-width-px": Ut.value,
3793
- "sidebar-open": Y.value,
3797
+ "sidebar-open": j.value,
3794
3798
  "resolved-comment-ids": Wt.value,
3795
3799
  onMarkerClick: () => {}
3796
3800
  }, null, 8, [
@@ -3801,30 +3805,30 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3801
3805
  "sidebar-open",
3802
3806
  "resolved-comment-ids"
3803
3807
  ]),
3804
- M(_, {
3805
- "is-open": Y.value,
3806
- comments: U(zt),
3808
+ z(_, {
3809
+ "is-open": j.value,
3810
+ comments: q(zt),
3807
3811
  "tracked-changes": Rt.value,
3808
3812
  "show-resolved": !0,
3809
- "is-adding-comment": U($).isAddingComment.value,
3810
- "add-comment-y-position": U($).addCommentYPosition.value,
3811
- "pages-container": E.value,
3813
+ "is-adding-comment": q($).isAddingComment.value,
3814
+ "add-comment-y-position": q($).addCommentYPosition.value,
3815
+ "pages-container": T.value,
3812
3816
  "page-width-px": Ut.value,
3813
- zoom: U(X),
3814
- "active-item-id": ye.value,
3815
- onClose: r[17] ||= (e) => Y.value = !1,
3816
- "onUpdate:activeItemId": r[18] ||= (e) => ye.value = e,
3817
- onAddComment: U($).handleAddComment,
3818
- onCancelAddComment: U($).handleCancelAddComment,
3819
- onCommentReply: U(Q).handleReply,
3820
- onCommentResolve: U(Q).handleResolve,
3821
- onCommentUnresolve: U(Q).handleUnresolve,
3822
- onCommentDelete: U(Q).handleDelete,
3823
- onAcceptChange: U(Q).handleAcceptChange,
3824
- onRejectChange: U(Q).handleRejectChange,
3825
- onAcceptChangeById: U(Q).handleAcceptChangeById,
3826
- onRejectChangeById: U(Q).handleRejectChangeById,
3827
- onTrackedChangeReply: U(Q).handleTrackedChangeReply
3817
+ zoom: q(B),
3818
+ "active-item-id": pe.value,
3819
+ onClose: n[17] ||= (e) => j.value = !1,
3820
+ "onUpdate:activeItemId": n[18] ||= (e) => pe.value = e,
3821
+ onAddComment: q($).handleAddComment,
3822
+ onCancelAddComment: q($).handleCancelAddComment,
3823
+ onCommentReply: q(Q).handleReply,
3824
+ onCommentResolve: q(Q).handleResolve,
3825
+ onCommentUnresolve: q(Q).handleUnresolve,
3826
+ onCommentDelete: q(Q).handleDelete,
3827
+ onAcceptChange: q(Q).handleAcceptChange,
3828
+ onRejectChange: q(Q).handleRejectChange,
3829
+ onAcceptChangeById: q(Q).handleAcceptChangeById,
3830
+ onRejectChangeById: q(Q).handleRejectChangeById,
3831
+ onTrackedChangeReply: q(Q).handleTrackedChangeReply
3828
3832
  }, null, 8, [
3829
3833
  "is-open",
3830
3834
  "comments",
@@ -3847,43 +3851,43 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3847
3851
  "onRejectChangeById",
3848
3852
  "onTrackedChangeReply"
3849
3853
  ]),
3850
- U($).floatingCommentButton.value && !l.value ? (z(), A("button", {
3854
+ q($).floatingCommentButton.value && !u.value ? (U(), I("button", {
3851
3855
  key: 1,
3852
3856
  type: "button",
3853
3857
  class: "docx-editor-vue__add-comment-btn",
3854
- style: R({
3855
- top: U($).floatingCommentButton.value.top + "px",
3856
- left: U($).floatingCommentButton.value.left + "px"
3858
+ style: H({
3859
+ top: q($).floatingCommentButton.value.top + "px",
3860
+ left: q($).floatingCommentButton.value.left + "px"
3857
3861
  }),
3858
3862
  "aria-label": "Add comment",
3859
3863
  title: "Add comment",
3860
- onMousedown: r[19] ||= J((...e) => U($).startAddComment && U($).startAddComment(...e), ["prevent", "stop"])
3861
- }, [M(n, {
3864
+ onMousedown: n[19] ||= Y((...e) => q($).startAddComment && q($).startAddComment(...e), ["prevent", "stop"])
3865
+ }, [z(r, {
3862
3866
  name: "add_comment",
3863
3867
  size: 18
3864
- })], 36)) : k("", !0)
3868
+ })], 36)) : F("", !0)
3865
3869
  ], 544),
3866
- q.value ? k("", !0) : (z(), O(Hr, {
3870
+ A.value ? F("", !0) : (U(), P(ri, {
3867
3871
  key: 2,
3868
3872
  "left-offset": 12,
3869
- onToggle: U(Ot).handleToggleOutline
3873
+ onToggle: q(Ot).handleToggleOutline
3870
3874
  }, null, 8, ["onToggle"])),
3871
- U(bt).totalPages > 1 ? (z(), O(Ur, {
3875
+ q(bt).totalPages > 1 ? (U(), P(ii, {
3872
3876
  key: 3,
3873
- "current-page": U(bt).currentPage,
3874
- "total-pages": U(bt).totalPages,
3875
- visible: U(bt).visible
3877
+ "current-page": q(bt).currentPage,
3878
+ "total-pages": q(bt).totalPages,
3879
+ visible: q(bt).visible
3876
3880
  }, null, 8, [
3877
3881
  "current-page",
3878
3882
  "total-pages",
3879
3883
  "visible"
3880
- ])) : k("", !0),
3881
- M(Xn, {
3882
- "is-open": q.value,
3883
- headings: Se.value,
3884
- "get-scroll-container": () => E.value,
3885
- onClose: r[24] ||= (e) => q.value = !1,
3886
- onNavigate: U(Ot).handleOutlineNavigate
3884
+ ])) : F("", !0),
3885
+ z(dr, {
3886
+ "is-open": A.value,
3887
+ headings: ge.value,
3888
+ "get-scroll-container": () => T.value,
3889
+ onClose: n[24] ||= (e) => A.value = !1,
3890
+ onNavigate: q(Ot).handleOutlineNavigate
3887
3891
  }, null, 8, [
3888
3892
  "is-open",
3889
3893
  "headings",
@@ -3891,18 +3895,18 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3891
3895
  "onNavigate"
3892
3896
  ])
3893
3897
  ])], 544),
3894
- M(Ar, {
3895
- "read-only": l.value,
3896
- "context-menu": U(kt),
3897
- "image-context-menu": U(At),
3898
- "image-context-menu-text-actions": U(jt),
3899
- "custom-text-menu-items": U(Mt),
3900
- "can-open-image-properties": U(st) !== null,
3901
- onContextMenuAction: U(It),
3902
- onCloseContextMenu: r[25] ||= (e) => U(kt).isOpen = !1,
3903
- onImageWrapSelect: U(Ft),
3904
- onCloseImageContextMenu: r[26] ||= (e) => At.value = null,
3905
- onOpenImageProperties: r[27] ||= (e) => W.value = !0
3898
+ z(Gr, {
3899
+ "read-only": u.value,
3900
+ "context-menu": q(kt),
3901
+ "image-context-menu": q(At),
3902
+ "image-context-menu-text-actions": q(jt),
3903
+ "custom-text-menu-items": q(Mt),
3904
+ "can-open-image-properties": q(at) !== null,
3905
+ onContextMenuAction: q(It),
3906
+ onCloseContextMenu: n[25] ||= (e) => q(kt).isOpen = !1,
3907
+ onImageWrapSelect: q(Ft),
3908
+ onCloseImageContextMenu: n[26] ||= (e) => At.value = null,
3909
+ onOpenImageProperties: n[27] ||= (e) => O.value = !0
3906
3910
  }, null, 8, [
3907
3911
  "read-only",
3908
3912
  "context-menu",
@@ -3915,30 +3919,30 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3915
3919
  ])
3916
3920
  ], 6));
3917
3921
  }
3918
- }), [["__scopeId", "data-v-dbfd4b1b"]]), ga = ["aria-label"], _a = ["aria-label"], va = [
3922
+ }), [["__scopeId", "data-v-1313e086"]]), ja = ["aria-label"], Ma = ["aria-label"], Na = [
3919
3923
  "disabled",
3920
3924
  "title",
3921
3925
  "aria-label"
3922
- ], ya = [
3926
+ ], Pa = [
3923
3927
  "disabled",
3924
3928
  "title",
3925
3929
  "aria-label"
3926
- ], ba = ["aria-label"], xa = [
3930
+ ], Fa = ["aria-label"], Ia = [
3927
3931
  "disabled",
3928
3932
  "title",
3929
3933
  "aria-label",
3930
3934
  "aria-pressed"
3931
- ], Sa = [
3935
+ ], La = [
3932
3936
  "disabled",
3933
3937
  "title",
3934
3938
  "aria-label",
3935
3939
  "aria-pressed"
3936
- ], Ca = [
3940
+ ], Ra = [
3937
3941
  "disabled",
3938
3942
  "title",
3939
3943
  "aria-label",
3940
3944
  "aria-pressed"
3941
- ], wa = /*#__PURE__*/ e(/* @__PURE__ */ N({
3945
+ ], za = /*#__PURE__*/ t(/* @__PURE__ */ B({
3942
3946
  __name: "FormattingBar",
3943
3947
  props: {
3944
3948
  currentFormatting: {},
@@ -3979,113 +3983,113 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
3979
3983
  "undo",
3980
3984
  "redo"
3981
3985
  ],
3982
- setup(e, { emit: r }) {
3983
- let { ColorPicker: i } = d(), a = e, o = r, { t: s } = t(), c = D(() => a.currentFormatting ?? {}), l = D(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = D(() => c.value.listState ?? x()), f = D(() => {
3984
- let e = c.value.color;
3986
+ setup(e, { emit: t }) {
3987
+ let { ColorPicker: n } = p(), i = e, a = t, { t: o } = c(), s = N(() => i.currentFormatting ?? {}), l = N(() => i.documentStyles ? { styles: i.documentStyles } : {}), u = N(() => s.value.listState ?? x()), d = N(() => {
3988
+ let e = s.value.color;
3985
3989
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
3986
- }), p = D(() => {
3990
+ }), f = N(() => {
3987
3991
  let e = u.value;
3988
- return e.isInList && e.level > 0 || (c.value.indentLeft ?? 0) > 0;
3992
+ return e.isInList && e.level > 0 || (s.value.indentLeft ?? 0) > 0;
3989
3993
  });
3990
3994
  function m(e) {
3991
- o("format", {
3995
+ a("format", {
3992
3996
  type: "textColor",
3993
3997
  value: e
3994
3998
  });
3995
3999
  }
3996
- return (t, r) => (z(), A("div", {
3997
- class: L(["docx-formatting-bar", e.className]),
4000
+ return (t, i) => (U(), I("div", {
4001
+ class: V(["docx-formatting-bar", e.className]),
3998
4002
  role: "toolbar",
3999
- "aria-label": U(s)("formattingToolbar"),
4003
+ "aria-label": q(o)("formattingToolbar"),
4000
4004
  "data-folio-toolbar": "true"
4001
4005
  }, [
4002
- j("span", {
4006
+ L("span", {
4003
4007
  class: "docx-formatting-bar__group",
4004
4008
  role: "group",
4005
- "aria-label": U(s)("historyGroup")
4006
- }, [j("button", {
4009
+ "aria-label": q(o)("historyGroup")
4010
+ }, [L("button", {
4007
4011
  type: "button",
4008
4012
  class: "docx-formatting-bar__btn",
4009
4013
  disabled: e.disabled || !e.canUndo,
4010
- title: U(s)("undoShortcut"),
4011
- "aria-label": U(s)("undo"),
4012
- onMousedown: r[0] ||= J((e) => o("undo"), ["prevent"])
4013
- }, [M(n, {
4014
+ title: q(o)("undoShortcut"),
4015
+ "aria-label": q(o)("undo"),
4016
+ onMousedown: i[0] ||= Y((e) => a("undo"), ["prevent"])
4017
+ }, [z(r, {
4014
4018
  name: "undo",
4015
4019
  size: 18
4016
- })], 40, va), j("button", {
4020
+ })], 40, Na), L("button", {
4017
4021
  type: "button",
4018
4022
  class: "docx-formatting-bar__btn",
4019
4023
  disabled: e.disabled || !e.canRedo,
4020
- title: U(s)("redoShortcut"),
4021
- "aria-label": U(s)("redo"),
4022
- onMousedown: r[1] ||= J((e) => o("redo"), ["prevent"])
4023
- }, [M(n, {
4024
+ title: q(o)("redoShortcut"),
4025
+ "aria-label": q(o)("redo"),
4026
+ onMousedown: i[1] ||= Y((e) => a("redo"), ["prevent"])
4027
+ }, [z(r, {
4024
4028
  name: "redo",
4025
4029
  size: 18
4026
- })], 40, ya)], 8, _a),
4027
- r[13] ||= j("span", {
4030
+ })], 40, Pa)], 8, Ma),
4031
+ i[13] ||= L("span", {
4028
4032
  class: "docx-formatting-bar__divider",
4029
4033
  role: "separator"
4030
4034
  }, null, -1),
4031
- e.showStylePicker ? (z(), A(T, { key: 0 }, [M(b, de({ value: c.value.styleId ?? "Normal" }, l.value, {
4035
+ e.showStylePicker ? (U(), I(M, { key: 0 }, [z(b, ye({ value: s.value.styleId ?? "Normal" }, l.value, {
4032
4036
  disabled: e.disabled,
4033
- onChange: r[2] ||= (e) => o("format", {
4037
+ onChange: i[2] ||= (e) => a("format", {
4034
4038
  type: "applyStyle",
4035
4039
  value: e
4036
4040
  })
4037
- }), null, 16, ["value", "disabled"]), r[11] ||= j("span", {
4041
+ }), null, 16, ["value", "disabled"]), i[11] ||= L("span", {
4038
4042
  class: "docx-formatting-bar__divider",
4039
4043
  role: "separator"
4040
- }, null, -1)], 64)) : k("", !0),
4041
- j("span", {
4044
+ }, null, -1)], 64)) : F("", !0),
4045
+ L("span", {
4042
4046
  class: "docx-formatting-bar__group",
4043
4047
  role: "group",
4044
- "aria-label": U(s)("textFormattingGroup")
4048
+ "aria-label": q(o)("textFormattingGroup")
4045
4049
  }, [
4046
- j("button", {
4050
+ L("button", {
4047
4051
  type: "button",
4048
- class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
4052
+ class: V(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": s.value.bold }]),
4049
4053
  disabled: e.disabled,
4050
- title: U(s)("boldShortcut"),
4051
- "aria-label": U(s)("bold"),
4052
- "aria-pressed": !!c.value.bold,
4053
- onMousedown: r[3] ||= J((e) => o("format", "bold"), ["prevent"])
4054
- }, [M(n, {
4054
+ title: q(o)("boldShortcut"),
4055
+ "aria-label": q(o)("bold"),
4056
+ "aria-pressed": !!s.value.bold,
4057
+ onMousedown: i[3] ||= Y((e) => a("format", "bold"), ["prevent"])
4058
+ }, [z(r, {
4055
4059
  name: "format_bold",
4056
4060
  size: 18
4057
- })], 42, xa),
4058
- j("button", {
4061
+ })], 42, Ia),
4062
+ L("button", {
4059
4063
  type: "button",
4060
- class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
4064
+ class: V(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": s.value.italic }]),
4061
4065
  disabled: e.disabled,
4062
- title: U(s)("italicShortcut"),
4063
- "aria-label": U(s)("italic"),
4064
- "aria-pressed": !!c.value.italic,
4065
- onMousedown: r[4] ||= J((e) => o("format", "italic"), ["prevent"])
4066
- }, [M(n, {
4066
+ title: q(o)("italicShortcut"),
4067
+ "aria-label": q(o)("italic"),
4068
+ "aria-pressed": !!s.value.italic,
4069
+ onMousedown: i[4] ||= Y((e) => a("format", "italic"), ["prevent"])
4070
+ }, [z(r, {
4067
4071
  name: "format_italic",
4068
4072
  size: 18
4069
- })], 42, Sa),
4070
- j("button", {
4073
+ })], 42, La),
4074
+ L("button", {
4071
4075
  type: "button",
4072
- class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
4076
+ class: V(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": s.value.underline }]),
4073
4077
  disabled: e.disabled,
4074
- title: U(s)("underlineShortcut"),
4075
- "aria-label": U(s)("underline"),
4076
- "aria-pressed": !!c.value.underline,
4077
- onMousedown: r[5] ||= J((e) => o("format", "underline"), ["prevent"])
4078
- }, [M(n, {
4078
+ title: q(o)("underlineShortcut"),
4079
+ "aria-label": q(o)("underline"),
4080
+ "aria-pressed": !!s.value.underline,
4081
+ onMousedown: i[5] ||= Y((e) => a("format", "underline"), ["prevent"])
4082
+ }, [z(r, {
4079
4083
  name: "format_underlined",
4080
4084
  size: 18
4081
- })], 42, Ca)
4082
- ], 8, ba),
4083
- e.showTextColorPicker ? (z(), A(T, { key: 1 }, [r[12] ||= j("span", {
4085
+ })], 42, Ra)
4086
+ ], 8, Fa),
4087
+ e.showTextColorPicker ? (U(), I(M, { key: 1 }, [i[12] ||= L("span", {
4084
4088
  class: "docx-formatting-bar__divider",
4085
4089
  role: "separator"
4086
- }, null, -1), M(U(i), {
4090
+ }, null, -1), z(q(n), {
4087
4091
  mode: "text",
4088
- value: f.value,
4092
+ value: d.value,
4089
4093
  theme: e.theme ?? null,
4090
4094
  disabled: e.disabled,
4091
4095
  onChange: m
@@ -4093,37 +4097,37 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
4093
4097
  "value",
4094
4098
  "theme",
4095
4099
  "disabled"
4096
- ])], 64)) : k("", !0),
4097
- r[14] ||= j("span", {
4100
+ ])], 64)) : F("", !0),
4101
+ i[14] ||= L("span", {
4098
4102
  class: "docx-formatting-bar__divider",
4099
4103
  role: "separator"
4100
4104
  }, null, -1),
4101
- e.showAlignmentButtons ? (z(), O(S, {
4105
+ e.showAlignmentButtons ? (U(), P(S, {
4102
4106
  key: 2,
4103
- value: c.value.alignment ?? "left",
4107
+ value: s.value.alignment ?? "left",
4104
4108
  disabled: e.disabled,
4105
- onChange: r[6] ||= (e) => o("format", {
4109
+ onChange: i[6] ||= (e) => a("format", {
4106
4110
  type: "alignment",
4107
4111
  value: e
4108
4112
  })
4109
- }, null, 8, ["value", "disabled"])) : k("", !0),
4110
- e.showListButtons ? (z(), O(te, {
4113
+ }, null, 8, ["value", "disabled"])) : F("", !0),
4114
+ e.showListButtons ? (U(), P(te, {
4111
4115
  key: 3,
4112
4116
  "list-state": u.value,
4113
4117
  disabled: e.disabled,
4114
- "can-outdent": p.value,
4115
- onBulletList: r[7] ||= (e) => o("format", "bulletList"),
4116
- onNumberedList: r[8] ||= (e) => o("format", "numberedList"),
4117
- onIndent: r[9] ||= (e) => o("format", "indent"),
4118
- onOutdent: r[10] ||= (e) => o("format", "outdent")
4118
+ "can-outdent": f.value,
4119
+ onBulletList: i[7] ||= (e) => a("format", "bulletList"),
4120
+ onNumberedList: i[8] ||= (e) => a("format", "numberedList"),
4121
+ onIndent: i[9] ||= (e) => a("format", "indent"),
4122
+ onOutdent: i[10] ||= (e) => a("format", "outdent")
4119
4123
  }, null, 8, [
4120
4124
  "list-state",
4121
4125
  "disabled",
4122
4126
  "can-outdent"
4123
- ])) : k("", !0)
4124
- ], 10, ga));
4127
+ ])) : F("", !0)
4128
+ ], 10, ja));
4125
4129
  }
4126
- }), [["__scopeId", "data-v-225f770f"]]), Ta = [
4130
+ }), [["__scopeId", "data-v-225f770f"]]), Ba = [
4127
4131
  {
4128
4132
  value: .5,
4129
4133
  label: "50%"
@@ -4148,7 +4152,7 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
4148
4152
  value: 2,
4149
4153
  label: "200%"
4150
4154
  }
4151
- ], Ea = /*#__PURE__*/ e(/* @__PURE__ */ N({
4155
+ ], Va = /*#__PURE__*/ t(/* @__PURE__ */ B({
4152
4156
  __name: "ZoomControl",
4153
4157
  props: {
4154
4158
  value: { default: 1 },
@@ -4165,7 +4169,7 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
4165
4169
  },
4166
4170
  emits: ["change"],
4167
4171
  setup(e, { emit: t }) {
4168
- let { Select: n } = d(), r = e, i = t, a = D(() => r.levels ?? Ta), o = D(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = D(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = D(() => o.value ? String(o.value.value) : String(r.value)), l = D(() => {
4172
+ let { Select: n } = p(), r = e, i = t, a = N(() => r.levels ?? Ba), o = N(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = N(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = N(() => o.value ? String(o.value.value) : String(r.value)), l = N(() => {
4169
4173
  let e = a.value.map((e) => ({
4170
4174
  value: String(e.value),
4171
4175
  label: e.label
@@ -4179,8 +4183,8 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
4179
4183
  let t = Number.parseFloat(e);
4180
4184
  Number.isNaN(t) || i("change", t);
4181
4185
  }
4182
- return (t, r) => (z(), O(U(n), {
4183
- class: L(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
4186
+ return (t, r) => (U(), P(q(n), {
4187
+ class: V(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
4184
4188
  value: c.value,
4185
4189
  items: l.value,
4186
4190
  disabled: e.disabled,
@@ -4193,45 +4197,45 @@ var aa = { class: "docx-editor-vue__toolbar-shell" }, oa = {
4193
4197
  "disabled"
4194
4198
  ]));
4195
4199
  }
4196
- }), [["__scopeId", "data-v-8079e07f"]]), Da = (e, t, n = {}) => {
4197
- let { locale: r = "en", ...a } = n;
4198
- return new Promise((n, o) => {
4199
- let s = B(null), c = null, l = !1, u = {
4200
+ }), [["__scopeId", "data-v-8079e07f"]]), Ha = (e, t, n = {}) => {
4201
+ let { locale: r = "en", ...i } = n;
4202
+ return new Promise((n, a) => {
4203
+ let o = W(null), s = null, c = !1, u = {
4200
4204
  save: async () => {
4201
- let e = await (s.value?.save() ?? Promise.resolve(null));
4205
+ let e = await (o.value?.save() ?? Promise.resolve(null));
4202
4206
  return e ? new Blob([e], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }) : null;
4203
4207
  },
4204
- getDocument: () => s.value?.getDocument() ?? null,
4208
+ getDocument: () => o.value?.getDocument() ?? null,
4205
4209
  focus: () => {
4206
- s.value?.focus();
4210
+ o.value?.focus();
4207
4211
  },
4208
4212
  setZoom: (e) => {
4209
- s.value?.setZoom(e);
4213
+ o.value?.setZoom(e);
4210
4214
  },
4211
4215
  scrollToPosition: (e) => {
4212
- s.value?.getEditorRef()?.scrollToPosition(e);
4216
+ o.value?.getEditorRef()?.scrollToPosition(e);
4213
4217
  },
4214
4218
  scrollToPage: (e) => {
4215
- s.value?.scrollToPage(e);
4219
+ o.value?.scrollToPage(e);
4216
4220
  },
4217
4221
  destroy: () => {
4218
- l || (l = !0, o(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), c?.unmount(), c = null;
4222
+ c || (c = !0, a(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), s?.unmount(), s = null;
4219
4223
  }
4220
4224
  };
4221
- c = se({ setup() {
4222
- return () => P(ha, {
4223
- ...a,
4225
+ s = me({ setup() {
4226
+ return () => _e(Aa, {
4227
+ ...i,
4224
4228
  documentBuffer: e,
4225
- ref: s,
4229
+ ref: o,
4226
4230
  onReady: () => {
4227
- l || (l = !0, n(u));
4231
+ c || (c = !0, n(u));
4228
4232
  },
4229
4233
  onError: (e) => {
4230
- a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
4234
+ i.onError?.(e), c || (c = !0, s?.unmount(), s = null, a(e));
4231
4235
  }
4232
4236
  });
4233
- } }), c.use(i, r), c.mount(t);
4237
+ } }), s.use(l, r), s.mount(t);
4234
4238
  });
4235
4239
  };
4236
4240
  //#endregion
4237
- export { vn as DEFAULT_AI_SUGGESTION_PRESETS, jn as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, ha as DocxEditor, l as FolioUIProvider, wa as FormattingBar, Ea as ZoomControl, Mn as acceptAutocompleteSuggestion, Nn as acceptAutocompleteWord, Ie as anonymizationDecorationsKey, Pn as appendAutocompleteToken, Ot as applyFolioAIEditOperations, yn as applySuggestions, Fn as autocompleteSuggestionKey, In as autocompleteSuggestionPlugin, Sn as buildPositionalText, Ln as clearAutocompleteSuggestion, Ct as clearTemplateSlashMenu, wt as consumeTemplateSlashQuery, On as createAICitationDecorationsPlugin, _n as createDocx, gn as createEmptyDocument, At as createFolioAIEditSnapshot, p as defaultLocale, qt as deriveBlockId, Mt as diffWordSegments, Rn as finishAutocompleteSuggestion, Hn as fromMarkdown, Le as getAnonymizationMatches, zn as getAutocompleteSuggestion, En as getFolioCaretViewportRect, Jt as getFolioParaIdFromBlockId, Dn as getFolioSelectionViewportRect, ot as getTemplateDirectives, Tt as getTemplateSlashMenu, Ft as hashFolioAIBlockText, i as i18nPlugin, be as insertImageFromFile, Se as insertPageBreakInView, X as insertTableInView, Te as insertTableOfContentsInView, Zt as isFolioBlockId, Qt as isSequentialFolioBlockId, bn as isSuggestionStale, It as normalizeFolioAIBlockText, f as provideLocale, Da as renderAsync, Et as resetTemplateSlashQuery, xn as resolveSuggestionAnchor, ct as scanDirectives, Tn as scrollFolioPositionIntoView, kn as setAICitationsMeta, Cn as setAISuggestionsMeta, An as setActiveCitationMeta, ze as setAnonymizationTermsMeta, wn as setFocusedSuggestionMeta, St as setTemplatePreviewValues, Bn as shouldTriggerAutocomplete, Vn as startAutocompleteSuggestion, Dt as templateSlashMenuKey, Un as toMarkdown, Wn as toMarkdownResult, t as useTranslation, w as useWheelZoom };
4241
+ export { Nn as DEFAULT_AI_SUGGESTION_PRESETS, Kn as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Aa as DocxEditor, T as FindReplaceDialog, s as FolioUIProvider, se as FootnotePropertiesDialog, za as FormattingBar, ce as HyperlinkDialog, le as ImagePositionDialog, E as ImagePropertiesDialog, D as InsertImageDialog, ue as InsertSymbolDialog, de as InsertTableDialog, fe as PageSetupDialog, O as PasteSpecialDialog, k as SplitCellDialog, A as TablePropertiesDialog, j as WatermarkDialog, Va as ZoomControl, qn as acceptAutocompleteSuggestion, Jn as acceptAutocompleteWord, Ye as anonymizationDecorationsKey, Yn as appendAutocompleteToken, $ as applyFolioAIEditOperations, Pn as applySuggestions, Xn as autocompleteSuggestionKey, Zn as autocompleteSuggestionPlugin, Ln as buildPositionalText, Qn as clearAutocompleteSuggestion, It as clearTemplateSlashMenu, Lt as consumeTemplateSlashQuery, Un as createAICitationDecorationsPlugin, Mn as createDocx, jn as createEmptyDocument, Vt as createFolioAIEditSnapshot, n as defaultLocale, sn as deriveBlockId, Ut as diffWordSegments, $n as finishAutocompleteSuggestion, rr as fromMarkdown, Xe as getAnonymizationMatches, er as getAutocompleteSuggestion, kn as getDocumentWatermark, Vn as getFolioCaretViewportRect, cn as getFolioParaIdFromBlockId, Hn as getFolioSelectionViewportRect, yt as getTemplateDirectives, Rt as getTemplateSlashMenu, Kt as hashFolioAIBlockText, l as i18nPlugin, Ne as insertImageFromFile, X as insertPageBreakInView, Ie as insertTableInView, Re as insertTableOfContentsInView, dn as isFolioBlockId, fn as isSequentialFolioBlockId, Fn as isSuggestionStale, qt as normalizeFolioAIBlockText, e as provideLocale, Ha as renderAsync, Q as resetTemplateSlashQuery, In as resolveSuggestionAnchor, xt as scanDirectives, Bn as scrollFolioPositionIntoView, Wn as setAICitationsMeta, Rn as setAISuggestionsMeta, Gn as setActiveCitationMeta, Qe as setAnonymizationTermsMeta, An as setDocumentWatermark, zn as setFocusedSuggestionMeta, Ft as setTemplatePreviewValues, tr as shouldTriggerAutocomplete, nr as startAutocompleteSuggestion, zt as templateSlashMenuKey, ir as toMarkdown, ar as toMarkdownResult, c as useTranslation, w as useWheelZoom };