@stll/folio-vue 0.23.0 → 0.24.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,19 +1,19 @@
1
1
  import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-Id6nLwrR.js";
2
2
  import { D as g, E as _, d as v, f as ee, i as y, n as b, r as te, t as ne, v as re, w as x, y as ie } from "./ListButtons-DjLPhg8p.js";
3
3
  import { t as ae } from "./zIndex-Ei9BbHSW.js";
4
- import { a as oe, c as se, i as ce, l as le, o as ue, r as de, s as fe, t as pe, u as me } from "./useZoom-D8Wi1XkB.js";
5
- import { FindReplaceDialog as he, FootnotePropertiesDialog as ge, HyperlinkDialog as _e, ImagePositionDialog as ve, ImagePropertiesDialog as ye, InsertImageDialog as S, InsertSymbolDialog as be, InsertTableDialog as C, PageSetupDialog as xe, PasteSpecialDialog as Se, SplitCellDialog as Ce, TablePropertiesDialog as we, WatermarkDialog as w } from "./dialogs.js";
6
- import { Fragment as T, Teleport as E, computed as D, createApp as Te, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as Ee, createStaticVNode as De, createTextVNode as Oe, createVNode as M, defineComponent as N, h as ke, inject as Ae, mergeProps as je, nextTick as Me, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as Ne, onScopeDispose as Pe, openBlock as L, provide as Fe, ref as R, renderList as z, renderSlot as Ie, shallowRef as Le, toDisplayString as B, toRaw as Re, toValue as ze, unref as V, vModelText as H, vShow as Be, watch as U, withCtx as Ve, withDirectives as He, withKeys as Ue, withModifiers as W } from "vue";
7
- import { CANONICAL_GAP as We, canonicalRefusalMessage as Ge, usesCanonicalSession as Ke } from "@stll/folio-core/types/canonicalCapabilities";
8
- import { NO_LIST_NUMBERING_MENU as G, NO_LIST_STATE as qe, createStyleResolver as Je, extractSelectionState as Ye, getDocumentBuiltInStyles as Xe, getDocumentStyleResolver as Ze, getSelectedText as Qe, insertImageFromFile as $e, insertImageFromFile as et, insertPageBreakInView as K, insertPageBreakInView as tt, insertTableInView as nt, insertTableInView as rt, insertTableOfContentsInView as it, insertTableOfContentsInView as at, listNumberingMenuState as ot, listStateLevel as st, schema as ct } from "@stll/folio-core/prosemirror";
9
- import { expectTableAttrs as lt } from "@stll/folio-core/prosemirror/attrs";
10
- import { getTableContext as ut } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
11
- import { extractSelectionContext as dt } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
12
- import { inspectDocxCompatibility as ft } from "@stll/folio-core/docx/compatibility";
13
- import { browserClock as pt } from "@stll/folio-core/controller/layoutScheduler";
14
- import { CanonicalSessionRefusalError as mt } from "@stll/folio-core/controller/hiddenEditorManager";
15
- import { cloneDocumentWithParagraphPropertySources as ht } from "@stll/folio-core/docx/document-clone";
16
- import { historyShortcutOwner as gt, isKeydownInShortcutScope as _t } from "@stll/folio-core/managers/editorShortcuts";
4
+ import { a as oe, c as se, i as ce, l as S, o as le, r as ue, s as de, t as fe, u as pe } from "./useZoom-BA92aWwm.js";
5
+ import { FindReplaceDialog as me, FootnotePropertiesDialog as he, HyperlinkDialog as ge, ImagePositionDialog as _e, ImagePropertiesDialog as ve, InsertImageDialog as C, InsertSymbolDialog as ye, InsertTableDialog as w, PageSetupDialog as be, PasteSpecialDialog as xe, SplitCellDialog as Se, TablePropertiesDialog as Ce, WatermarkDialog as T } from "./dialogs.js";
6
+ import { Fragment as E, Teleport as D, computed as O, createApp as we, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as Te, createStaticVNode as Ee, createTextVNode as De, createVNode as N, defineComponent as P, h as Oe, inject as ke, mergeProps as Ae, nextTick as je, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as L, onMounted as Me, onScopeDispose as Ne, openBlock as R, provide as Pe, ref as z, renderList as B, renderSlot as Fe, shallowRef as Ie, toDisplayString as V, toRaw as Le, toValue as Re, unref as H, vModelText as U, vShow as ze, watch as W, withCtx as Be, withDirectives as Ve, withKeys as He, withModifiers as G } from "vue";
7
+ import { CANONICAL_GAP as Ue, canonicalRefusalMessage as We, usesCanonicalSession as Ge } from "@stll/folio-core/types/canonicalCapabilities";
8
+ import { NO_LIST_NUMBERING_MENU as K, NO_LIST_STATE as Ke, createStyleResolver as qe, extractSelectionState as Je, getDocumentBuiltInStyles as Ye, getDocumentStyleResolver as Xe, getSelectedText as Ze, insertImageFromFile as Qe, insertImageFromFile as $e, insertPageBreakInView as q, insertPageBreakInView as et, insertTableInView as tt, insertTableInView as nt, insertTableOfContentsInView as rt, insertTableOfContentsInView as it, listNumberingMenuState as at, listStateLevel as ot, schema as st } from "@stll/folio-core/prosemirror";
9
+ import { expectTableAttrs as ct } from "@stll/folio-core/prosemirror/attrs";
10
+ import { getTableContext as lt } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
11
+ import { extractSelectionContext as ut } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
12
+ import { inspectDocxCompatibility as dt } from "@stll/folio-core/docx/compatibility";
13
+ import { browserClock as ft } from "@stll/folio-core/controller/layoutScheduler";
14
+ import { CanonicalSessionRefusalError as pt } from "@stll/folio-core/controller/hiddenEditorManager";
15
+ import { cloneDocumentWithParagraphPropertySources as mt } from "@stll/folio-core/docx/document-clone";
16
+ import { DEFAULT_KEYBOARD_SHORTCUT_SCOPE as ht, historyShortcutOwner as gt, isKeydownInShortcutScope as _t } from "@stll/folio-core/managers/editorShortcuts";
17
17
  import { resolveActiveEditorStory as vt } from "@stll/folio-core/controller/activeEditorStory";
18
18
  import { clearAllCaches as yt, resetCanvasContext as bt } from "@stll/folio-core/layout-bridge/engine/measuring";
19
19
  import { onFontsLoaded as xt } from "@stll/folio-core/utils/fontLoader";
@@ -22,52 +22,51 @@ import { getEditorScrollRoot as Ct, scrollEditorElementIntoView as wt, scrollEdi
22
22
  import { findBodyPmAnchor as Et, findBodyPmAnchors as Dt, findBodyPmSpans as Ot } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
23
23
  import { PANEL_METRICS as kt, computePanelLayout as At } from "@stll/folio-core/panel-layout";
24
24
  import { DEFAULT_OUTLINE_DEPTH as jt, filterHeadingsByDepth as Mt } from "@stll/folio-core/utils/outlineDepth";
25
- import { getDocumentWatermark as q, getDocumentWatermark as Nt, setDocumentWatermark as Pt, setDocumentWatermark as Ft } from "@stll/folio-core/watermark";
25
+ import { getDocumentWatermark as J, getDocumentWatermark as Nt, setDocumentWatermark as Pt, setDocumentWatermark as Ft } from "@stll/folio-core/watermark";
26
26
  import { createLatestRequestGate as It } from "@stll/folio-core/controller/latestRequestGate";
27
27
  import { measureDirectiveGutter as Lt, projectRangesToRects as Rt } from "@stll/folio-core/paged-layout/rangeProjection";
28
28
  import { anonymizationDecorationsKey as zt, getAnonymizationMatches as Bt, getAnonymizationMatches as Vt, setAnonymizationTermsMeta as Ht, slugAnonymizationLabel as Ut } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
29
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Wt, acceptAutocompleteSuggestion as Gt, acceptAutocompleteWord as Kt, appendAutocompleteToken as qt, autocompleteSuggestionKey as Jt, autocompleteSuggestionPlugin as J, clearAutocompleteSuggestion as Yt, finishAutocompleteSuggestion as Xt, getAutocompleteSuggestion as Zt, getAutocompleteSuggestion as Qt, shouldTriggerAutocomplete as $t, startAutocompleteSuggestion as en } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
30
- import { createRenderedDomContext as tn } from "@stll/folio-core/render-dom/RenderedDomContext";
31
- import { ContentControlWidgetController as nn } from "@stll/folio-core/controller/contentControlWidgetController";
32
- import { NodeSelection as Y, Selection as rn, TextSelection as X } from "prosemirror-state";
33
- import { pixelsToEmu as an } from "@stll/folio-core/utils/units";
34
- import { IMAGE_LAYOUT_OPTIONS as on, captureInlinePositionEmu as sn, deriveLayoutChoice as cn, findImageElement as ln, isImageLayoutOptionEnabled as un, toolbarValueToLayoutTarget as dn } from "@stll/folio-core/layout-painter/imageLayout";
35
- import { isTrackChangesMode as fn, toggledTrackChangesMode as pn } from "@stll/folio-core/managers/EditorModeManager";
36
- import { clickToPositionDom as mn, getCaretPositionFromDom as hn } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
37
- import { calculateResizedImageDimensions as gn, commitImageFloatMove as _n, commitImageInlineMove as vn, commitImageResize as yn, isFloatingImage as bn } from "@stll/folio-core/prosemirror/imageCommit";
38
- import { resetImeCaretAnchor as xn, syncImeCaretAnchor as Sn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
39
- import { PAINTER_PAINTED_EVENT as Cn } from "@stll/folio-core/layout-painter/renderPage";
40
- import { HeaderFooterSelectionOverlay as wn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
41
- import { getTemplateDirectives as Tn, getTemplateDirectives as En, scanDirectives as Dn } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
42
- import { closeHistory as On, redo as kn, undo as An } from "prosemirror-history";
43
- import { clearFormatting as jn } from "@stll/folio-core/prosemirror/commands/formatting";
44
- import { executeEditorCommand as Mn } from "@stll/folio-core/prosemirror/executeEditorCommand";
45
- import { anchorTargetAttrs as Nn, sanitizeExternalUrl as Pn, windowFeaturesFor as Fn } from "@stll/folio-core/utils/urlSecurity";
46
- import { PENDING_COMMENT_ID as In, createCommentIdAllocator as Ln, seedCommentAllocator as Rn } from "@stll/folio-core/prosemirror/commentIdAllocator";
47
- import { resolveCanonicalReviewRange as zn } from "@stll/folio-core/controller/canonicalReview";
48
- import { afterCanonicalCompositionSettles as Bn } from "@stll/folio-core/controller/canonicalInputTimer";
49
- import { createComment as Vn } from "@stll/folio-core/prosemirror/commentOps";
50
- import { acceptAIEditRevision as Hn, acceptChange as Un, acceptSuggestion as Wn, findAIEditRevisionRange as Gn, findSuggestionRange as Kn, getSuggestions as Z, rejectAIEditRevision as qn, rejectChange as Q, rejectSuggestion as Jn } from "@stll/folio-core/prosemirror/commands/comments";
51
- import { makeRevisionInfo as Yn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
52
- import { findPageIndexContainingPmPos as Xn } from "@stll/folio-core/layout-engine";
53
- import { proseDocToBlocks as Zn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
54
- import { setTemplatePreviewValues as Qn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
55
- import { clearTemplateSlashMenu as $n, consumeTemplateSlashQuery as er, getTemplateSlashMenu as tr, resetTemplateSlashQuery as nr, templateSlashMenuKey as rr } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
56
- import { createEmptyHeaderFooter as ir, pickActiveHeaderFooterRId as ar, removeHeaderFooter as or, resolveHeaderFooterContent as sr, saveHeaderFooterContent as $ } from "@stll/folio-core/utils/headerFooter";
57
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as cr, FolioPendingSuggestionRegistry as lr, applyFolioAIEditOperations as ur, applyFolioDocumentOperations as dr, assertSupportedFolioDocumentOperationVersion as fr, createFolioAIEditSnapshot as pr, createFolioAIEditSnapshot as mr, createFolioAIEditSnapshotWithStyleResolver as hr, createPendingSuggestionSourceSnapshot as gr, diffWordSegments as _r, getCommentAnchorsFromDoc as vr, getFolioDocumentOperationIssues as yr, getTrackedChangesFromDoc as br, hashFolioAIBlockText as xr, normalizeFolioAIBlockText as Sr } from "@stll/folio-core/ai-edits";
58
- import { getPageScrollTarget as Cr } from "@stll/folio-core/paged-layout/scrollNavigation";
59
- import { findParagraphFragmentsByParaId as wr, flashParagraphElements as Tr } from "@stll/folio-core/paged-layout/paragraphFlash";
60
- import { onPaintedLayoutChange as Er, readBlockRects as Dr } from "@stll/folio-core/paged-layout/blockGeometry";
61
- import { blockSdtAttrsToSdtProperties as Or, findBlockSdtMatch as kr, findBlockSdtMatches as Ar, removeContentControlTr as jr, setContentControlContentTr as Mr, setContentControlValueTr as Nr } from "@stll/folio-core/prosemirror/commands/contentControls";
62
- import { setContentControlContentBlocksTr as Pr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
63
- import { clampRangeToDocSize as Fr, resolveFolioAIBlockRange as Ir, resolveFolioAITextRange as Lr, resolvePassageRange as Rr } from "@stll/folio-core/ai-edits/blockRange";
64
- import { deriveBlockId as zr, getFolioParaIdFromBlockId as Br, getFolioParaIdFromBlockId as Vr, isFolioBlockId as Hr, isSequentialFolioBlockId as Ur } from "@stll/folio-core/types/block-id";
65
- import { getPageTextFromLayout as Wr } from "@stll/folio-core/paged-layout/pageText";
66
- import { applyStyle as Gr, removeTabStop as Kr, setIndentFirstLine as qr, setIndentLeft as Jr, setIndentRight as Yr } from "@stll/folio-core/prosemirror/commands/paragraph";
67
- import { getCachedNumberingMap as Xr } from "@stll/folio-core/docx";
68
- import { insertPageBreak as Zr } from "@stll/folio-core/prosemirror/commands/pageBreak";
69
- import { insertSectionBreakContinuous as Qr, insertSectionBreakNextPage as $r } from "@stll/folio-core/prosemirror/commands/sectionBreak";
70
- import { setEmbeddedFontFamilyMap as ei } from "@stll/folio-core/utils/fontResolver";
29
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Wt, acceptAutocompleteSuggestion as Gt, acceptAutocompleteWord as Kt, appendAutocompleteToken as qt, autocompleteSuggestionKey as Jt, autocompleteSuggestionPlugin as Yt, clearAutocompleteSuggestion as Xt, finishAutocompleteSuggestion as Zt, getAutocompleteSuggestion as Qt, getAutocompleteSuggestion as $t, shouldTriggerAutocomplete as en, startAutocompleteSuggestion as tn } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
30
+ import { createRenderedDomContext as nn } from "@stll/folio-core/render-dom/RenderedDomContext";
31
+ import { ContentControlWidgetController as rn } from "@stll/folio-core/controller/contentControlWidgetController";
32
+ import { NodeSelection as an, Selection as Y, TextSelection as X } from "prosemirror-state";
33
+ import { pixelsToEmu as on } from "@stll/folio-core/utils/units";
34
+ import { IMAGE_LAYOUT_OPTIONS as sn, captureInlinePositionEmu as cn, deriveLayoutChoice as ln, findImageElement as un, isImageLayoutOptionEnabled as dn, toolbarValueToLayoutTarget as fn } from "@stll/folio-core/layout-painter/imageLayout";
35
+ import { isTrackChangesMode as pn, toggledTrackChangesMode as mn } from "@stll/folio-core/managers/EditorModeManager";
36
+ import { clickToPositionDom as hn, getCaretPositionFromDom as gn } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
37
+ import { calculateResizedImageDimensions as _n, commitImageFloatMove as vn, commitImageInlineMove as yn, commitImageResize as bn, isFloatingImage as xn } from "@stll/folio-core/prosemirror/imageCommit";
38
+ import { resetImeCaretAnchor as Sn, syncImeCaretAnchor as Cn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
39
+ import { PAINTER_PAINTED_EVENT as wn } from "@stll/folio-core/layout-painter/renderPage";
40
+ import { HeaderFooterSelectionOverlay as Tn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
41
+ import { getTemplateDirectives as En, getTemplateDirectives as Dn, scanDirectives as On } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
42
+ import { closeHistory as kn, redo as An, undo as jn } from "prosemirror-history";
43
+ import { clearFormatting as Mn } from "@stll/folio-core/prosemirror/commands/formatting";
44
+ import { executeEditorCommand as Nn } from "@stll/folio-core/prosemirror/executeEditorCommand";
45
+ import { anchorTargetAttrs as Pn, sanitizeExternalUrl as Fn, windowFeaturesFor as In } from "@stll/folio-core/utils/urlSecurity";
46
+ import { PENDING_COMMENT_ID as Ln, createCommentIdAllocator as Rn, seedCommentAllocator as zn } from "@stll/folio-core/prosemirror/commentIdAllocator";
47
+ import { resolveCanonicalReviewRange as Bn } from "@stll/folio-core/controller/canonicalReview";
48
+ import { afterCanonicalCompositionSettles as Vn } from "@stll/folio-core/controller/canonicalInputTimer";
49
+ import { createComment as Hn } from "@stll/folio-core/prosemirror/commentOps";
50
+ import { acceptAIEditRevision as Un, acceptChange as Wn, acceptSuggestion as Gn, findAIEditRevisionRange as Kn, findSuggestionRange as qn, getSuggestions as Jn, rejectAIEditRevision as Z, rejectChange as Yn, rejectSuggestion as Q } from "@stll/folio-core/prosemirror/commands/comments";
51
+ import { makeRevisionInfo as Xn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
52
+ import { findPageIndexContainingPmPos as Zn } from "@stll/folio-core/layout-engine";
53
+ import { proseDocToBlocks as Qn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
54
+ import { setTemplatePreviewValues as $n } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
55
+ import { clearTemplateSlashMenu as er, consumeTemplateSlashQuery as tr, getTemplateSlashMenu as nr, resetTemplateSlashQuery as rr, templateSlashMenuKey as ir } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
56
+ import { createEmptyHeaderFooter as ar, pickActiveHeaderFooterRId as or, removeHeaderFooter as sr, resolveHeaderFooterContent as cr, saveHeaderFooterContent as lr } from "@stll/folio-core/utils/headerFooter";
57
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as $, FolioPendingSuggestionRegistry as ur, applyFolioAIEditOperations as dr, applyFolioDocumentOperations as fr, assertSupportedFolioDocumentOperationVersion as pr, createFolioAIEditSnapshot as mr, createFolioAIEditSnapshot as hr, createFolioAIEditSnapshotWithStyleResolver as gr, createPendingSuggestionSourceSnapshot as _r, diffWordSegments as vr, getCommentAnchorsFromDoc as yr, getFolioDocumentOperationIssues as br, getTrackedChangesFromDoc as xr, hashFolioAIBlockText as Sr, normalizeFolioAIBlockText as Cr } from "@stll/folio-core/ai-edits";
58
+ import { getPageScrollTarget as wr } from "@stll/folio-core/paged-layout/scrollNavigation";
59
+ import { findParagraphFragmentsByParaId as Tr, flashParagraphElements as Er } from "@stll/folio-core/paged-layout/paragraphFlash";
60
+ import { onPaintedLayoutChange as Dr, readBlockRects as Or } from "@stll/folio-core/paged-layout/blockGeometry";
61
+ import { blockSdtAttrsToSdtProperties as kr, findBlockSdtMatch as Ar, findBlockSdtMatches as jr, removeContentControlTr as Mr, setContentControlContentTr as Nr, setContentControlValueTr as Pr } from "@stll/folio-core/prosemirror/commands/contentControls";
62
+ import { setContentControlContentBlocksTr as Fr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
63
+ import { clampRangeToDocSize as Ir, resolveFolioAIBlockRange as Lr, resolveFolioAITextRange as Rr, resolvePassageRange as zr } from "@stll/folio-core/ai-edits/blockRange";
64
+ import { deriveBlockId as Br, getFolioParaIdFromBlockId as Vr, getFolioParaIdFromBlockId as Hr, isFolioBlockId as Ur, isSequentialFolioBlockId as Wr } from "@stll/folio-core/types/block-id";
65
+ import { getPageTextFromLayout as Gr } from "@stll/folio-core/paged-layout/pageText";
66
+ import { applyStyle as Kr, removeTabStop as qr, setIndentFirstLine as Jr, setIndentLeft as Yr, setIndentRight as Xr } from "@stll/folio-core/prosemirror/commands/paragraph";
67
+ import { getCachedNumberingMap as Zr } from "@stll/folio-core/docx";
68
+ import { insertPageBreak as Qr } from "@stll/folio-core/prosemirror/commands/pageBreak";
69
+ import { insertSectionBreakContinuous as $r, insertSectionBreakNextPage as ei } from "@stll/folio-core/prosemirror/commands/sectionBreak";
71
70
  import { buildEmbeddedFontFamilyMap as ti, extractEmbeddedFonts as ni } from "@stll/folio-core/fonts/embeddedFonts";
72
71
  import { editHyperlinkAtCursor as ri, removeHyperlinkAtCursor as ii } from "@stll/folio-core/prosemirror/commands/hyperlink";
73
72
  import { collectHeadings as ai } from "@stll/folio-core/utils/headingCollector";
@@ -94,11 +93,11 @@ import { getFolioCaretViewportRect as Ri, getFolioSelectionViewportRect as zi }
94
93
  import { createAICitationDecorationsPlugin as Bi, setAICitationsMeta as Vi, setActiveCitationMeta as Hi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
95
94
  import { fromMarkdown as Ui, toMarkdown as Wi, toMarkdownResult as Gi } from "@stll/folio-core/markdown";
96
95
  //#region src/composables/useTransientNotice.ts
97
- var Ki = 3e3, qi = (e = pt) => {
98
- let t = R(null), n = null, r = () => {
96
+ var Ki = 3e3, qi = (e = ft) => {
97
+ let t = z(null), n = null, r = () => {
99
98
  n !== null && e.clearTimer(n), n = null, t.value = null;
100
99
  };
101
- return Pe(r), {
100
+ return Ne(r), {
102
101
  message: t,
103
102
  show: (i) => {
104
103
  r(), t.value = i, n = e.setTimer(r, Ki);
@@ -109,7 +108,7 @@ var Ki = 3e3, qi = (e = pt) => {
109
108
  "data-folio-anonymization-canonical",
110
109
  "data-folio-anonymization-selected",
111
110
  "title"
112
- ], Yi = /*#__PURE__*/ t(/* @__PURE__ */ N({
111
+ ], Yi = /*#__PURE__*/ t(/* @__PURE__ */ P({
113
112
  __name: "AnonymizationRectsOverlay",
114
113
  props: {
115
114
  getView: { type: Function },
@@ -124,7 +123,7 @@ var Ki = 3e3, qi = (e = pt) => {
124
123
  selectionSeq: {}
125
124
  },
126
125
  setup(e) {
127
- let t = e, n = R(null), r = R([]), i = It(), a = null;
126
+ let t = e, n = z(null), r = z([]), i = It(), a = null;
128
127
  function o() {
129
128
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
130
129
  a = null, s();
@@ -161,7 +160,7 @@ var Ki = 3e3, qi = (e = pt) => {
161
160
  }))
162
161
  }));
163
162
  }
164
- U(() => [
163
+ W(() => [
165
164
  t.editorState,
166
165
  t.zoom,
167
166
  t.layout,
@@ -183,7 +182,7 @@ var Ki = 3e3, qi = (e = pt) => {
183
182
  index: a
184
183
  }, wt(i.item(a));
185
184
  }
186
- U(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
185
+ W(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
187
186
  function u(e) {
188
187
  if (e.button !== 0 || !t.onTermClick) return;
189
188
  let r = n.value;
@@ -200,23 +199,23 @@ var Ki = 3e3, qi = (e = pt) => {
200
199
  }
201
200
  }
202
201
  }
203
- return Ne(() => {
202
+ return Me(() => {
204
203
  document.addEventListener("click", u), o();
205
- }), I(() => {
204
+ }), L(() => {
206
205
  i.invalidate(), document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
207
- }), (t, i) => (L(), A("div", {
206
+ }), (t, i) => (R(), j("div", {
208
207
  ref_key: "rootRef",
209
208
  ref: n,
210
209
  class: "folio-anonymization-overlay",
211
210
  "data-folio-anonymization-overlay": ""
212
- }, [(L(!0), A(T, null, z(r.value, (t) => (L(), A(T, { key: `${t.label}:${t.canonical}` }, [(L(!0), A(T, null, z(t.rects, (n, r) => (L(), A("span", {
211
+ }, [(R(!0), j(E, null, B(r.value, (t) => (R(), j(E, { key: `${t.label}:${t.canonical}` }, [(R(!0), j(E, null, B(t.rects, (n, r) => (R(), j("span", {
213
212
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
214
- class: P(["folio-anonymization-term", `folio-anonymization-term--${V(Ut)(t.label)}`]),
213
+ class: F(["folio-anonymization-term", `folio-anonymization-term--${H(Ut)(t.label)}`]),
215
214
  "data-folio-anonymization-label": t.label,
216
215
  "data-folio-anonymization-canonical": t.canonical,
217
216
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
218
217
  title: `Anonymized: ${t.canonical}`,
219
- style: F({
218
+ style: I({
220
219
  position: "absolute",
221
220
  left: `${n.left}px`,
222
221
  top: `${n.top}px`,
@@ -228,7 +227,7 @@ var Ki = 3e3, qi = (e = pt) => {
228
227
  }), [["__scopeId", "data-v-94cc11a3"]]), Xi = {
229
228
  class: "folio-passage-highlight-overlay",
230
229
  "data-folio-passage-highlight-overlay": ""
231
- }, Zi = /*#__PURE__*/ t(/* @__PURE__ */ N({
230
+ }, Zi = /*#__PURE__*/ t(/* @__PURE__ */ P({
232
231
  __name: "PassageHighlightOverlay",
233
232
  props: {
234
233
  range: {},
@@ -239,7 +238,7 @@ var Ki = 3e3, qi = (e = pt) => {
239
238
  measures: {}
240
239
  },
241
240
  setup(e) {
242
- let t = e, n = R([]), r = It(), i = null;
241
+ let t = e, n = z([]), r = It(), i = null;
243
242
  function a() {
244
243
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
245
244
  i = null, o();
@@ -267,18 +266,18 @@ var Ki = 3e3, qi = (e = pt) => {
267
266
  height: e.height * s
268
267
  }));
269
268
  }
270
- return U(() => [
269
+ return W(() => [
271
270
  t.range,
272
271
  t.zoom,
273
272
  t.layout,
274
273
  t.blocks,
275
274
  t.measures
276
- ], () => a(), { immediate: !0 }), I(() => {
275
+ ], () => a(), { immediate: !0 }), L(() => {
277
276
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
278
- }), (e, t) => (L(), A("div", Xi, [(L(!0), A(T, null, z(n.value, (e, t) => (L(), A("span", {
277
+ }), (e, t) => (R(), j("div", Xi, [(R(!0), j(E, null, B(n.value, (e, t) => (R(), j("span", {
279
278
  key: `${t}:${e.left}:${e.top}`,
280
279
  class: "folio-passage-highlight",
281
- style: F({
280
+ style: I({
282
281
  position: "absolute",
283
282
  left: `${e.left}px`,
284
283
  top: `${e.top}px`,
@@ -291,7 +290,7 @@ var Ki = 3e3, qi = (e = pt) => {
291
290
  key: 0,
292
291
  class: "folio-autocomplete-overlay",
293
292
  "data-folio-autocomplete-overlay": ""
294
- }, $i = /*#__PURE__*/ t(/* @__PURE__ */ N({
293
+ }, $i = /*#__PURE__*/ t(/* @__PURE__ */ P({
295
294
  __name: "AutocompleteCaretOverlay",
296
295
  props: {
297
296
  caret: {},
@@ -299,20 +298,20 @@ var Ki = 3e3, qi = (e = pt) => {
299
298
  isStreaming: { type: Boolean }
300
299
  },
301
300
  setup(e) {
302
- return (t, n) => e.caret && e.text.length > 0 ? (L(), A("div", Qi, [j("span", {
301
+ return (t, n) => e.caret && e.text.length > 0 ? (R(), j("div", Qi, [M("span", {
303
302
  class: "folio-autocomplete-ghost",
304
- style: F({
303
+ style: I({
305
304
  left: `${e.caret.x}px`,
306
305
  top: `${e.caret.y}px`,
307
306
  lineHeight: `${e.caret.lineHeight}px`,
308
307
  maxWidth: e.caret.maxWidth === void 0 ? void 0 : `${e.caret.maxWidth}px`
309
308
  })
310
- }, [Oe(B(e.text), 1), j("span", {
311
- class: P(["folio-autocomplete-caret", { "folio-autocomplete-caret--streaming": e.isStreaming }]),
309
+ }, [De(V(e.text), 1), M("span", {
310
+ class: F(["folio-autocomplete-caret", { "folio-autocomplete-caret--streaming": e.isStreaming }]),
312
311
  "aria-hidden": "true"
313
- }, "stella", 2)], 4)])) : k("", !0);
312
+ }, "stella", 2)], 4)])) : A("", !0);
314
313
  }
315
- }), [["__scopeId", "data-v-00299904"]]), ea = 48, ta = /* @__PURE__ */ N({
314
+ }), [["__scopeId", "data-v-00299904"]]), ea = 48, ta = /* @__PURE__ */ P({
316
315
  __name: "AutocompleteSuggestionOverlay",
317
316
  props: {
318
317
  getPagesContainer: { type: Function },
@@ -321,7 +320,7 @@ var Ki = 3e3, qi = (e = pt) => {
321
320
  syncCoordinator: {}
322
321
  },
323
322
  setup(e) {
324
- let t = e, n = R(null), r = R(0), i = null, a = null, o = ({ pagesContainer: e, x: t, y: n, zoom: r }) => {
323
+ let t = e, n = z(null), r = z(0), i = null, a = null, o = ({ pagesContainer: e, x: t, y: n, zoom: r }) => {
325
324
  let i = r > 0 ? r : 1, a = e.getBoundingClientRect();
326
325
  for (let r of e.querySelectorAll(".layout-page")) {
327
326
  let e = r.getBoundingClientRect(), o = (e.top - a.top) / i, s = (e.bottom - a.top) / i;
@@ -337,12 +336,12 @@ var Ki = 3e3, qi = (e = pt) => {
337
336
  n.value = null;
338
337
  return;
339
338
  }
340
- let i = Qt(r);
339
+ let i = $t(r);
341
340
  if (i.status === "idle" || i.text.length === 0) {
342
341
  n.value = null;
343
342
  return;
344
343
  }
345
- let a = tn(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
344
+ let a = nn(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
346
345
  if (!s) {
347
346
  n.value = null;
348
347
  return;
@@ -368,17 +367,17 @@ var Ki = 3e3, qi = (e = pt) => {
368
367
  i = null, s();
369
368
  });
370
369
  };
371
- return Ne(() => {
370
+ return Me(() => {
372
371
  a = t.syncCoordinator.onRender(() => {
373
372
  r.value += 1;
374
373
  }), c();
375
- }), I(() => {
374
+ }), L(() => {
376
375
  i !== null && (cancelAnimationFrame(i), i = null), a?.();
377
- }), U(() => [
376
+ }), W(() => [
378
377
  t.editorState,
379
378
  t.zoom,
380
379
  r.value
381
- ], () => c()), (e, t) => (L(), O($i, {
380
+ ], () => c()), (e, t) => (R(), k($i, {
382
381
  caret: n.value?.caret ?? null,
383
382
  text: n.value?.text ?? "",
384
383
  "is-streaming": n.value?.isStreaming ?? !1
@@ -390,13 +389,13 @@ var Ki = 3e3, qi = (e = pt) => {
390
389
  }
391
390
  }), na = Symbol("docx-portal-class");
392
391
  function ra(e) {
393
- Fe(na, D(() => ({
392
+ Pe(na, O(() => ({
394
393
  "ep-root": !0,
395
- dark: !!V(e)
394
+ dark: !!H(e)
396
395
  })));
397
396
  }
398
397
  function ia() {
399
- return Ae(na, D(() => ({ "ep-root": !0 })));
398
+ return ke(na, O(() => ({ "ep-root": !0 })));
400
399
  }
401
400
  //#endregion
402
401
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
@@ -407,53 +406,53 @@ var aa = ["aria-label"], oa = {
407
406
  }, sa = {
408
407
  key: 0,
409
408
  class: "content-control-picker__empty"
410
- }, ca = /*#__PURE__*/ t(/* @__PURE__ */ N({
409
+ }, ca = /*#__PURE__*/ t(/* @__PURE__ */ P({
411
410
  __name: "ContentControlWidgetsOverlay",
412
411
  props: {
413
412
  eventRoot: {},
414
413
  view: {}
415
414
  },
416
415
  setup(e) {
417
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = ia(), s = new nn(), c = Le(s.getSnapshot()), l = s.subscribe(() => {
416
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = ia(), s = new rn(), c = Ie(s.getSnapshot()), l = s.subscribe(() => {
418
417
  c.value = s.getSnapshot();
419
418
  });
420
- U([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), I(() => {
419
+ W([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), L(() => {
421
420
  l(), s.destroy();
422
421
  });
423
- let u = D(() => c.value.status === "closed" ? {} : {
422
+ let u = O(() => c.value.status === "closed" ? {} : {
424
423
  insetInlineStart: `${c.value.position.x}px`,
425
424
  top: `${c.value.position.y}px`
426
425
  }), d = (e) => {
427
426
  e && s.pickDate(e);
428
427
  };
429
- return (e, t) => (L(), O(E, { to: "body" }, [c.value.status === "closed" ? k("", !0) : (L(), A("div", {
428
+ return (e, t) => (R(), k(D, { to: "body" }, [c.value.status === "closed" ? A("", !0) : (R(), j("div", {
430
429
  key: 0,
431
- class: P(["content-control-picker", V(o)]),
432
- style: F(u.value),
430
+ class: F(["content-control-picker", H(o)]),
431
+ style: I(u.value),
433
432
  role: "dialog",
434
- "aria-label": c.value.status === "dropdown" ? V(n)("contentControlDropdownAriaLabel") : V(n)("contentControlDateAriaLabel"),
435
- onMousedown: t[1] ||= W(() => {}, ["stop"]),
436
- onPointerdown: t[2] ||= W(() => {}, ["stop"])
437
- }, [c.value.status === "dropdown" ? (L(), A("div", oa, [c.value.items.length === 0 ? (L(), A("div", sa, B(V(n)("contentControlDropdownNoOptions")), 1)) : (L(!0), A(T, { key: 1 }, z(c.value.items, (e) => (L(), O(V(i), {
433
+ "aria-label": c.value.status === "dropdown" ? H(n)("contentControlDropdownAriaLabel") : H(n)("contentControlDateAriaLabel"),
434
+ onMousedown: t[1] ||= G(() => {}, ["stop"]),
435
+ onPointerdown: t[2] ||= G(() => {}, ["stop"])
436
+ }, [c.value.status === "dropdown" ? (R(), j("div", oa, [c.value.items.length === 0 ? (R(), j("div", sa, V(H(n)("contentControlDropdownNoOptions")), 1)) : (R(!0), j(E, { key: 1 }, B(c.value.items, (e) => (R(), k(H(i), {
438
437
  key: `${e.value}::${e.displayText}`,
439
438
  "class-name": "content-control-picker__item",
440
439
  type: "button",
441
440
  role: "menuitem",
442
441
  variant: "ghost",
443
442
  size: "sm",
444
- onMousedown: t[0] ||= W(() => {}, ["prevent"]),
445
- onClick: (t) => V(s).pickDropdown(e.value)
443
+ onMousedown: t[0] ||= G(() => {}, ["prevent"]),
444
+ onClick: (t) => H(s).pickDropdown(e.value)
446
445
  }, {
447
- default: Ve(() => [Oe(B(e.displayText), 1)]),
446
+ default: Be(() => [De(V(e.displayText), 1)]),
448
447
  _: 2
449
- }, 1032, ["onClick"]))), 128))])) : c.value.status === "date" ? (L(), O(V(a), {
448
+ }, 1032, ["onClick"]))), 128))])) : c.value.status === "date" ? (R(), k(H(a), {
450
449
  key: 1,
451
450
  value: c.value.currentValue,
452
451
  "default-open": !0,
453
452
  onChange: d
454
- }, null, 8, ["value"])) : k("", !0)], 46, aa))]));
453
+ }, null, 8, ["value"])) : A("", !0)], 46, aa))]));
455
454
  }
456
- }), [["__scopeId", "data-v-f88b41c9"]]), la = /* @__PURE__ */ N({
455
+ }), [["__scopeId", "data-v-f88b41c9"]]), la = /* @__PURE__ */ P({
457
456
  __name: "DecorationLayer",
458
457
  props: {
459
458
  getView: { type: Function },
@@ -463,7 +462,7 @@ var aa = ["aria-label"], oa = {
463
462
  syncCoordinator: {}
464
463
  },
465
464
  setup(e) {
466
- let t = e, n = R(null), r = R(0), i = null, a = null;
465
+ let t = e, n = z(null), r = z(0), i = null, a = null;
467
466
  function o() {
468
467
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
469
468
  i = null;
@@ -471,13 +470,13 @@ var aa = ["aria-label"], oa = {
471
470
  !e || !r || !a || t.syncCoordinator.isSafeToRender() && s(e, r, a, t.zoom);
472
471
  });
473
472
  }
474
- Ne(() => {
473
+ Me(() => {
475
474
  a = t.syncCoordinator.onRender(() => {
476
475
  r.value++;
477
476
  }), o();
478
- }), I(() => {
477
+ }), L(() => {
479
478
  i !== null && (cancelAnimationFrame(i), i = null), a?.();
480
- }), U(() => [
479
+ }), W(() => [
481
480
  t.zoom,
482
481
  t.transactionVersion,
483
482
  r.value
@@ -488,7 +487,7 @@ var aa = ["aria-label"], oa = {
488
487
  n.firstChild && n.replaceChildren();
489
488
  return;
490
489
  }
491
- let a = tn(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
490
+ let a = nn(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
492
491
  for (let { decoration: t, from: n, to: r } of i) {
493
492
  if (n === r) {
494
493
  let r = u(t, e);
@@ -558,7 +557,7 @@ var aa = ["aria-label"], oa = {
558
557
  for (let [e, t] of Object.entries(n)) typeof t == "string" && (r[e] = t);
559
558
  return r;
560
559
  }
561
- return (e, t) => (L(), A("div", {
560
+ return (e, t) => (R(), j("div", {
562
561
  ref_key: "overlayRef",
563
562
  ref: n,
564
563
  class: "paged-editor__decoration-overlay",
@@ -566,14 +565,14 @@ var aa = ["aria-label"], oa = {
566
565
  }, null, 512));
567
566
  }
568
567
  }), ua = ({ surface: e, available: t, navRef: n, onClose: r }) => {
569
- U(D(() => ze(e) === "drawer" && ze(t)), async (e, t, i) => {
568
+ W(O(() => Re(e) === "drawer" && Re(t)), async (e, t, i) => {
570
569
  if (!e || typeof document > "u") return;
571
570
  let a = document.activeElement instanceof HTMLElement ? document.activeElement : null, o = !0, s = (e) => {
572
571
  e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), r());
573
572
  };
574
573
  if (i(() => {
575
574
  o = !1, document.removeEventListener("keydown", s), a?.isConnected && a.focus({ preventScroll: !0 });
576
- }), await Me(), !o) return;
575
+ }), await je(), !o) return;
577
576
  let c = n.value;
578
577
  (c?.querySelector("[aria-current=\"true\"]") ?? c?.querySelector("ol button:not([tabindex=\"-1\"])") ?? c?.querySelector("button") ?? c)?.focus({ preventScroll: !0 }), document.addEventListener("keydown", s);
579
578
  }, {
@@ -591,7 +590,7 @@ var aa = ["aria-label"], oa = {
591
590
  ], pa = {
592
591
  key: 1,
593
592
  class: "folio-outline-header"
594
- }, ma = { class: "folio-outline-heading-row" }, ha = { class: "folio-outline-title" }, ga = ["aria-label", "title"], _a = { class: "folio-outline-depth-control" }, va = ["aria-label", "value"], ya = { value: 2 }, ba = { value: 3 }, xa = { value: "all" }, Sa = /*#__PURE__*/ t(/* @__PURE__ */ N({
593
+ }, ma = { class: "folio-outline-heading-row" }, ha = { class: "folio-outline-title" }, ga = ["aria-label", "title"], _a = { class: "folio-outline-depth-control" }, va = ["aria-label", "value"], ya = { value: 2 }, ba = { value: 3 }, xa = { value: "all" }, Sa = /*#__PURE__*/ t(/* @__PURE__ */ P({
595
594
  __name: "DocumentOutline",
596
595
  props: {
597
596
  headings: {},
@@ -617,14 +616,14 @@ var aa = ["aria-label"], oa = {
617
616
  column: kt.outlineColumnWidth,
618
617
  rail: kt.outlineRailWidth,
619
618
  drawer: kt.drawerWidth
620
- }, a = e, o = t, { t: s } = r(), { OutlineRail: c } = h(), l = R(null);
619
+ }, a = e, o = t, { t: s } = r(), { OutlineRail: c } = h(), l = z(null);
621
620
  ua({
622
621
  surface: () => a.surface,
623
622
  available: () => a.available,
624
623
  navRef: l,
625
624
  onClose: () => o("close")
626
625
  });
627
- let u = D(() => s("editor.showDocumentOutline")), d = (e) => {
626
+ let u = O(() => s("editor.showDocumentOutline")), d = (e) => {
628
627
  if (!(e.currentTarget instanceof HTMLSelectElement)) return;
629
628
  let t = e.currentTarget.value;
630
629
  if (t === "all") {
@@ -632,29 +631,29 @@ var aa = ["aria-label"], oa = {
632
631
  return;
633
632
  }
634
633
  o("outlineDepthChange", t === "3" ? 3 : 2);
635
- }, f = D(() => n[a.surface]), p = D(() => a.headings.map((e) => ({
634
+ }, f = O(() => n[a.surface]), p = O(() => a.headings.map((e) => ({
636
635
  id: String(e.pmPos),
637
636
  label: e.text,
638
637
  level: e.level,
639
638
  ...typeof e.pageNumber == "number" ? { meta: String(e.pageNumber) } : {}
640
- }))), m = D(() => {
639
+ }))), m = O(() => {
641
640
  let e = /* @__PURE__ */ new Map();
642
641
  if (a.docSize > 0) for (let t of a.headings) e.set(String(t.pmPos), Math.min(99, Math.max(1, t.pmPos / a.docSize * 100)));
643
642
  return e;
644
643
  }), g = (e) => m.value.get(e) ?? null, _ = (e) => {
645
644
  o("navigate", Number(e)), a.surface === "drawer" && o("close");
646
645
  };
647
- return (t, n) => e.available ? (L(), A("nav", {
646
+ return (t, n) => e.available ? (R(), j("nav", {
648
647
  key: 0,
649
648
  ref_key: "navRef",
650
649
  ref: l,
651
650
  "aria-label": u.value,
652
- class: P(["folio-outline", "folio-outline--" + e.surface]),
651
+ class: F(["folio-outline", "folio-outline--" + e.surface]),
653
652
  "data-folio-outline-surface": e.surface,
654
653
  "data-testid": "folio-outline",
655
- style: F({ width: f.value + "px" }),
654
+ style: I({ width: f.value + "px" }),
656
655
  tabindex: e.surface === "drawer" ? -1 : void 0
657
- }, [e.surface === "rail" ? (L(), A("button", {
656
+ }, [e.surface === "rail" ? (R(), j("button", {
658
657
  key: 0,
659
658
  type: "button",
660
659
  class: "folio-outline-icon-button",
@@ -663,30 +662,30 @@ var aa = ["aria-label"], oa = {
663
662
  "aria-expanded": e.expanded,
664
663
  title: u.value,
665
664
  onClick: n[0] ||= (e) => o("expand")
666
- }, [M(i, {
665
+ }, [N(i, {
667
666
  name: "view_column",
668
667
  size: 16,
669
668
  "aria-hidden": "true"
670
- })], 8, fa)) : (L(), A("div", pa, [j("div", ma, [j("span", ha, B(V(s)("editor.outlineTitle")), 1), e.surface === "drawer" ? (L(), A("button", {
669
+ })], 8, fa)) : (R(), j("div", pa, [M("div", ma, [M("span", ha, V(H(s)("editor.outlineTitle")), 1), e.surface === "drawer" ? (R(), j("button", {
671
670
  key: 0,
672
671
  type: "button",
673
672
  class: "folio-outline-icon-button",
674
- "aria-label": V(s)("common.closeDialog"),
675
- title: V(s)("common.closeDialog"),
673
+ "aria-label": H(s)("common.closeDialog"),
674
+ title: H(s)("common.closeDialog"),
676
675
  onClick: n[1] ||= (e) => o("close")
677
- }, [M(i, {
676
+ }, [N(i, {
678
677
  name: "close",
679
678
  size: 16,
680
679
  "aria-hidden": "true"
681
- })], 8, ga)) : k("", !0)]), j("label", _a, [j("span", null, B(V(s)("editor.outlineDepthLabel")), 1), j("select", {
682
- "aria-label": V(s)("editor.outlineDepthLabel"),
680
+ })], 8, ga)) : A("", !0)]), M("label", _a, [M("span", null, V(H(s)("editor.outlineDepthLabel")), 1), M("select", {
681
+ "aria-label": H(s)("editor.outlineDepthLabel"),
683
682
  value: e.outlineDepth,
684
683
  onChange: d
685
684
  }, [
686
- j("option", ya, B(V(s)("editor.outlineDepthTwo")), 1),
687
- j("option", ba, B(V(s)("editor.outlineDepthThree")), 1),
688
- j("option", xa, B(V(s)("editor.outlineDepthAll")), 1)
689
- ], 40, va)])])), M(V(c), {
685
+ M("option", ya, V(H(s)("editor.outlineDepthTwo")), 1),
686
+ M("option", ba, V(H(s)("editor.outlineDepthThree")), 1),
687
+ M("option", xa, V(H(s)("editor.outlineDepthAll")), 1)
688
+ ], 40, va)])])), N(H(c), {
690
689
  items: p.value,
691
690
  "get-scroll-container": e.getScrollContainer,
692
691
  "resolve-pct": g,
@@ -703,58 +702,58 @@ var aa = ["aria-label"], oa = {
703
702
  "presentation",
704
703
  "panel-width",
705
704
  "aria-label"
706
- ])], 14, da)) : k("", !0);
705
+ ])], 14, da)) : A("", !0);
707
706
  }
708
- }), [["__scopeId", "data-v-6e4b3f17"]]), Ca = { class: "dialog__header" }, wa = { class: "dialog__body" }, Ta = { class: "field" }, Ea = { class: "field__label" }, Da = { class: "dialog__footer" }, Oa = 0, ka = 32767, Aa = 1, ja = /*#__PURE__*/ t(/* @__PURE__ */ N({
707
+ }), [["__scopeId", "data-v-6e4b3f17"]]), Ca = { class: "dialog__header" }, wa = { class: "dialog__body" }, Ta = { class: "field" }, Ea = { class: "field__label" }, Da = { class: "dialog__footer" }, Oa = 0, ka = 32767, Aa = 1, ja = /*#__PURE__*/ t(/* @__PURE__ */ P({
709
708
  __name: "SetNumberingValueDialog",
710
709
  props: { isOpen: { type: Boolean } },
711
710
  emits: ["close", "apply"],
712
711
  setup(e, { emit: t }) {
713
- let { Dialog: n } = h(), { t: i } = r(), a = e, o = t, s = R(Aa);
714
- U(() => a.isOpen, (e) => {
712
+ let { Dialog: n } = h(), { t: i } = r(), a = e, o = t, s = z(Aa);
713
+ W(() => a.isOpen, (e) => {
715
714
  e && (s.value = Aa);
716
715
  });
717
716
  function c() {
718
717
  let e = Number.isFinite(s.value) ? Math.trunc(s.value) : Oa;
719
718
  o("apply", Math.min(ka, Math.max(Oa, e))), o("close");
720
719
  }
721
- return (t, r) => (L(), O(V(n), {
720
+ return (t, r) => (R(), k(H(n), {
722
721
  open: e.isOpen,
723
- "aria-label": V(i)("dialogs.setNumberingValue.title"),
722
+ "aria-label": H(i)("dialogs.setNumberingValue.title"),
724
723
  style: {
725
724
  minWidth: "320px",
726
725
  maxWidth: "420px",
727
726
  width: "100%"
728
727
  },
729
728
  onClose: r[2] ||= (e) => t.$emit("close"),
730
- onKeydown: Ue(c, ["enter"])
729
+ onKeydown: He(c, ["enter"])
731
730
  }, {
732
- default: Ve(() => [
733
- j("div", Ca, B(V(i)("dialogs.setNumberingValue.title")), 1),
734
- j("div", wa, [j("label", Ta, [j("span", Ea, B(V(i)("dialogs.setNumberingValue.valueLabel")), 1), He(j("input", {
731
+ default: Be(() => [
732
+ M("div", Ca, V(H(i)("dialogs.setNumberingValue.title")), 1),
733
+ M("div", wa, [M("label", Ta, [M("span", Ea, V(H(i)("dialogs.setNumberingValue.valueLabel")), 1), Ve(M("input", {
735
734
  "onUpdate:modelValue": r[0] ||= (e) => s.value = e,
736
735
  class: "field__input",
737
736
  max: ka,
738
737
  min: Oa,
739
738
  type: "number"
740
739
  }, null, 512), [[
741
- H,
740
+ U,
742
741
  s.value,
743
742
  void 0,
744
743
  { number: !0 }
745
744
  ]])])]),
746
- j("div", Da, [j("button", {
745
+ M("div", Da, [M("button", {
747
746
  class: "dialog__btn",
748
747
  onClick: r[1] ||= (e) => t.$emit("close")
749
- }, B(V(i)("common.cancel")), 1), j("button", {
748
+ }, V(H(i)("common.cancel")), 1), M("button", {
750
749
  class: "dialog__btn dialog__btn--primary",
751
750
  onClick: c
752
- }, B(V(i)("common.apply")), 1)])
751
+ }, V(H(i)("common.apply")), 1)])
753
752
  ]),
754
753
  _: 1
755
754
  }, 8, ["open", "aria-label"]));
756
755
  }
757
- }), [["__scopeId", "data-v-b1446f71"]]), Ma = /* @__PURE__ */ N({
756
+ }), [["__scopeId", "data-v-b1446f71"]]), Ma = /* @__PURE__ */ P({
758
757
  __name: "DocxEditorDialogs",
759
758
  props: {
760
759
  view: {},
@@ -792,8 +791,8 @@ var aa = ["aria-label"], oa = {
792
791
  ],
793
792
  setup(e, { emit: t }) {
794
793
  let n = t;
795
- return (t, r) => (L(), A(T, null, [
796
- M(f, {
794
+ return (t, r) => (R(), j(E, null, [
795
+ N(f, {
797
796
  "is-open": e.showFindReplace,
798
797
  view: e.view,
799
798
  "scroll-visible-position-into-view": e.scrollVisiblePositionIntoView,
@@ -803,7 +802,7 @@ var aa = ["aria-label"], oa = {
803
802
  "view",
804
803
  "scroll-visible-position-into-view"
805
804
  ]),
806
- M(p, {
805
+ N(p, {
807
806
  "is-open": e.showHyperlink,
808
807
  view: e.view,
809
808
  bookmarks: e.bookmarks,
@@ -815,12 +814,12 @@ var aa = ["aria-label"], oa = {
815
814
  "view",
816
815
  "bookmarks"
817
816
  ]),
818
- M(s, {
817
+ N(s, {
819
818
  "is-open": e.showInsertSymbol,
820
819
  onClose: r[4] ||= (e) => n("update:showInsertSymbol", !1),
821
820
  onInsert: r[5] ||= (e) => n("insert-symbol", e)
822
821
  }, null, 8, ["is-open"]),
823
- M(c, {
822
+ N(c, {
824
823
  "is-open": e.showImageProperties,
825
824
  view: e.view,
826
825
  "pm-pos": e.selectedImagePmPos,
@@ -830,24 +829,24 @@ var aa = ["aria-label"], oa = {
830
829
  "view",
831
830
  "pm-pos"
832
831
  ]),
833
- M(m, {
832
+ N(m, {
834
833
  "is-open": e.showPageSetup,
835
834
  "section-properties": e.sectionProperties,
836
835
  onClose: r[7] ||= (e) => n("update:showPageSetup", !1),
837
836
  onApply: r[8] ||= (e) => n("page-setup-apply", e)
838
837
  }, null, 8, ["is-open", "section-properties"]),
839
- M(d, {
838
+ N(d, {
840
839
  "is-open": e.showTableProperties,
841
840
  "current-props": e.tableProperties,
842
841
  onClose: r[9] ||= (e) => n("update:showTableProperties", !1),
843
842
  onApply: r[10] ||= (e) => n("table-properties-apply", e)
844
843
  }, null, 8, ["is-open", "current-props"]),
845
- M(ja, {
844
+ N(ja, {
846
845
  "is-open": e.showNumberingValue,
847
846
  onClose: r[11] ||= (e) => n("update:showNumberingValue", !1),
848
847
  onApply: r[12] ||= (e) => n("numbering-value-apply", e)
849
848
  }, null, 8, ["is-open"]),
850
- M(o, {
849
+ N(o, {
851
850
  "is-open": e.showWatermark,
852
851
  "current-watermark": e.currentWatermark,
853
852
  onClose: r[13] ||= (e) => n("update:showWatermark", !1),
@@ -858,7 +857,7 @@ var aa = ["aria-label"], oa = {
858
857
  }), Na = {
859
858
  key: 0,
860
859
  class: "docx-editor-vue__title-bar"
861
- }, Pa = { class: "docx-editor-vue__title-bar-left" }, Fa = { class: "docx-editor-vue__title-bar-center" }, Ia = { class: "docx-editor-vue__title-bar-right" }, La = /* @__PURE__ */ N({
860
+ }, Pa = { class: "docx-editor-vue__title-bar-left" }, Fa = { class: "docx-editor-vue__title-bar-center" }, Ia = { class: "docx-editor-vue__title-bar-right" }, La = /* @__PURE__ */ P({
862
861
  __name: "DocxEditorMenuBar",
863
862
  props: {
864
863
  showMenuBar: {
@@ -890,13 +889,13 @@ var aa = ["aria-label"], oa = {
890
889
  ],
891
890
  setup(e, { emit: t }) {
892
891
  let n = t;
893
- return (t, r) => e.showMenuBar ? (L(), A("div", Na, [
894
- j("div", Pa, [Ie(t.$slots, "title-bar-left")]),
895
- j("div", Fa, [M(_, {
892
+ return (t, r) => e.showMenuBar ? (R(), j("div", Na, [
893
+ M("div", Pa, [Fe(t.$slots, "title-bar-left")]),
894
+ M("div", Fa, [N(_, {
896
895
  "model-value": e.documentName,
897
896
  editable: e.documentNameEditable,
898
897
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
899
- }, null, 8, ["model-value", "editable"]), M(x, {
898
+ }, null, 8, ["model-value", "editable"]), N(x, {
900
899
  "show-file-open": e.showFileOpen,
901
900
  "show-help-menu": e.showHelpMenu,
902
901
  "show-table-insert": e.showTableInsert,
@@ -907,8 +906,8 @@ var aa = ["aria-label"], oa = {
907
906
  "show-help-menu",
908
907
  "show-table-insert"
909
908
  ])]),
910
- j("div", Ia, [Ie(t.$slots, "title-bar-right")])
911
- ])) : k("", !0);
909
+ M("div", Ia, [Fe(t.$slots, "title-bar-right")])
910
+ ])) : A("", !0);
912
911
  }
913
912
  }), Ra = ["aria-label"], za = { class: "image-ctx-menu__icon" }, Ba = { class: "image-ctx-menu__label" }, Va = {
914
913
  key: 1,
@@ -928,7 +927,7 @@ var aa = ["aria-label"], oa = {
928
927
  key: 0,
929
928
  class: "image-ctx-menu__divider",
930
929
  role: "separator"
931
- }, Xa = 18, Za = 260, Qa = 10, $a = /*#__PURE__*/ t(/* @__PURE__ */ N({
930
+ }, Xa = 18, Za = 260, Qa = 10, $a = /*#__PURE__*/ t(/* @__PURE__ */ P({
932
931
  __name: "ImageContextMenu",
933
932
  props: {
934
933
  state: {},
@@ -949,7 +948,7 @@ var aa = ["aria-label"], oa = {
949
948
  function o() {
950
949
  a("open-properties"), a("close");
951
950
  }
952
- let { t: s } = r(), c = ia(), l = on, u = D(() => n.state ? cn(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
951
+ let { t: s } = r(), c = ia(), l = sn, u = O(() => n.state ? ln(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
953
952
  inline: "wrap_text",
954
953
  squareLeft: "format_image_left",
955
954
  squareRight: "format_image_right",
@@ -959,9 +958,9 @@ var aa = ["aria-label"], oa = {
959
958
  function f(e) {
960
959
  return d[e];
961
960
  }
962
- let p = D(() => {
961
+ let p = O(() => {
963
962
  if (!n.state) return {};
964
- let e = on.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
963
+ let e = sn.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
965
964
  return typeof window < "u" && (t + Za > window.innerWidth && (t = window.innerWidth - Za - Qa), r + e > window.innerHeight && (r = window.innerHeight - e - Qa), t < Qa && (t = Qa), r < Qa && (r = Qa)), {
966
965
  position: "fixed",
967
966
  left: `${t}px`,
@@ -971,7 +970,7 @@ var aa = ["aria-label"], oa = {
971
970
  };
972
971
  });
973
972
  function m(e) {
974
- return n.state ? un(e, n.state.currentWrapType) : !1;
973
+ return n.state ? dn(e, n.state.currentWrapType) : !1;
975
974
  }
976
975
  function h(e) {
977
976
  m(e) && (a("select", e.choice), a("close"));
@@ -985,70 +984,70 @@ var aa = ["aria-label"], oa = {
985
984
  function v(e) {
986
985
  e.key === "Escape" && (e.preventDefault(), a("close"));
987
986
  }
988
- return (t, n) => (L(), O(E, { to: "body" }, [e.state && e.state.open ? (L(), A("div", {
987
+ return (t, n) => (R(), k(D, { to: "body" }, [e.state && e.state.open ? (R(), j("div", {
989
988
  key: 0,
990
989
  class: "image-ctx-menu-backdrop",
991
990
  onMousedown: _,
992
- onContextmenu: n[0] ||= W((e) => t.$emit("close"), ["prevent"])
993
- }, null, 32)) : k("", !0), e.state && e.state.open ? (L(), A("div", {
991
+ onContextmenu: n[0] ||= G((e) => t.$emit("close"), ["prevent"])
992
+ }, null, 32)) : A("", !0), e.state && e.state.open ? (R(), j("div", {
994
993
  key: 1,
995
- class: P(["image-ctx-menu", V(c)]),
994
+ class: F(["image-ctx-menu", H(c)]),
996
995
  role: "menu",
997
- "aria-label": V(s)("imageWrap.menu.ariaLabel"),
996
+ "aria-label": H(s)("imageWrap.menu.ariaLabel"),
998
997
  "data-testid": "image-context-menu",
999
- style: F(p.value),
1000
- onContextmenu: n[4] ||= W(() => {}, ["prevent"]),
998
+ style: I(p.value),
999
+ onContextmenu: n[4] ||= G(() => {}, ["prevent"]),
1001
1000
  onKeydown: v
1002
1001
  }, [
1003
- e.canOpenProperties ? (L(), A("button", {
1002
+ e.canOpenProperties ? (R(), j("button", {
1004
1003
  key: 0,
1005
1004
  type: "button",
1006
1005
  role: "menuitem",
1007
1006
  class: "image-ctx-menu__item",
1008
1007
  "data-action": "open-properties",
1009
- onMousedown: n[1] ||= W(() => {}, ["prevent"]),
1008
+ onMousedown: n[1] ||= G(() => {}, ["prevent"]),
1010
1009
  onClick: o
1011
- }, [j("span", za, [M(i, {
1010
+ }, [M("span", za, [N(i, {
1012
1011
  name: "settings",
1013
1012
  size: Xa
1014
- })]), j("span", Ba, B(V(s)("imageWrap.menu.imageProperties")), 1)], 32)) : k("", !0),
1015
- e.canOpenProperties ? (L(), A("div", Va)) : k("", !0),
1016
- (L(!0), A(T, null, z(V(l), (e) => (L(), A("button", {
1013
+ })]), M("span", Ba, V(H(s)("imageWrap.menu.imageProperties")), 1)], 32)) : A("", !0),
1014
+ e.canOpenProperties ? (R(), j("div", Va)) : A("", !0),
1015
+ (R(!0), j(E, null, B(H(l), (e) => (R(), j("button", {
1017
1016
  key: e.choice,
1018
1017
  type: "button",
1019
1018
  role: "menuitem",
1020
- class: P(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
1019
+ class: F(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
1021
1020
  "data-wrap-type": e.choice,
1022
1021
  "data-current": e.choice === u.value ? "true" : "false",
1023
1022
  "data-disabled": m(e) ? "false" : "true",
1024
1023
  disabled: !m(e),
1025
- title: V(s)(`imageWrap.menuDesc.${e.i18nDescKey}`),
1026
- onMousedown: n[2] ||= W(() => {}, ["prevent"]),
1024
+ title: H(s)(`imageWrap.menuDesc.${e.i18nDescKey}`),
1025
+ onMousedown: n[2] ||= G(() => {}, ["prevent"]),
1027
1026
  onClick: (t) => h(e)
1028
1027
  }, [
1029
- j("span", Ua, [M(i, {
1028
+ M("span", Ua, [N(i, {
1030
1029
  name: f(e.iconHint),
1031
1030
  size: Xa
1032
1031
  }, null, 8, ["name"])]),
1033
- j("span", Wa, B(V(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1034
- e.choice === u.value ? (L(), A("span", {
1032
+ M("span", Wa, V(H(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1033
+ e.choice === u.value ? (R(), j("span", {
1035
1034
  key: 0,
1036
1035
  class: "image-ctx-menu__current-dot",
1037
- "aria-label": V(s)("imageWrap.menu.ariaLabel")
1038
- }, "●", 8, Ga)) : k("", !0)
1036
+ "aria-label": H(s)("imageWrap.menu.ariaLabel")
1037
+ }, "●", 8, Ga)) : A("", !0)
1039
1038
  ], 42, Ha))), 128)),
1040
- e.textActions && e.textActions.length > 0 ? (L(), A(T, { key: 2 }, [n[5] ||= j("div", {
1039
+ e.textActions && e.textActions.length > 0 ? (R(), j(E, { key: 2 }, [n[5] ||= M("div", {
1041
1040
  class: "image-ctx-menu__divider",
1042
1041
  role: "separator"
1043
- }, null, -1), (L(!0), A(T, null, z(e.textActions, (e, t) => (L(), A(T, { key: `${e.action}-${t}` }, [j("button", {
1042
+ }, null, -1), (R(!0), j(E, null, B(e.textActions, (e, t) => (R(), j(E, { key: `${e.action}-${t}` }, [M("button", {
1044
1043
  type: "button",
1045
1044
  role: "menuitem",
1046
1045
  class: "image-ctx-menu__item image-ctx-menu__item--text",
1047
1046
  disabled: e.disabled,
1048
- onMousedown: n[3] ||= W(() => {}, ["prevent"]),
1047
+ onMousedown: n[3] ||= G(() => {}, ["prevent"]),
1049
1048
  onClick: (t) => g(e)
1050
- }, [j("span", qa, B(e.label), 1), e.shortcut ? (L(), A("span", Ja, B(e.shortcut), 1)) : k("", !0)], 40, Ka), e.dividerAfter ? (L(), A("div", Ya)) : k("", !0)], 64))), 128))], 64)) : k("", !0)
1051
- ], 46, Ra)) : k("", !0)]));
1049
+ }, [M("span", qa, V(e.label), 1), e.shortcut ? (R(), j("span", Ja, V(e.shortcut), 1)) : A("", !0)], 40, Ka), e.dividerAfter ? (R(), j("div", Ya)) : A("", !0)], 64))), 128))], 64)) : A("", !0)
1050
+ ], 46, Ra)) : A("", !0)]));
1052
1051
  }
1053
1052
  }), [["__scopeId", "data-v-fc8f35bc"]]), eo = ["disabled", "onMousedown"], to = {
1054
1053
  key: 0,
@@ -1056,7 +1055,7 @@ var aa = ["aria-label"], oa = {
1056
1055
  }, no = { class: "ctx-menu__label" }, ro = {
1057
1056
  key: 1,
1058
1057
  class: "ctx-menu__shortcut"
1059
- }, io = 220, ao = 32, oo = 10, so = /*#__PURE__*/ t(/* @__PURE__ */ N({
1058
+ }, io = 220, ao = 32, oo = 10, so = /*#__PURE__*/ t(/* @__PURE__ */ P({
1060
1059
  __name: "TextContextMenu",
1061
1060
  props: {
1062
1061
  isOpen: { type: Boolean },
@@ -1074,7 +1073,7 @@ var aa = ["aria-label"], oa = {
1074
1073
  setup(e, { emit: t }) {
1075
1074
  let n = e, i = ({ node: e }) => e;
1076
1075
  i.props = ["node"];
1077
- let a = t, { t: o } = r(), s = ia(), c = R(null), l = D(() => {
1076
+ let a = t, { t: o } = r(), s = ia(), c = z(null), l = O(() => {
1078
1077
  let e = [], t = n.customItems ?? [];
1079
1078
  for (let [n, r] of t.entries()) e.push({
1080
1079
  id: `custom-${r.id}`,
@@ -1227,7 +1226,7 @@ var aa = ["aria-label"], oa = {
1227
1226
  label: o("contextMenu.setNumberingValue"),
1228
1227
  action: "setNumberingValue"
1229
1228
  }), e;
1230
- }), u = D(() => {
1229
+ }), u = O(() => {
1231
1230
  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 * ao + i * 9;
1232
1231
  return typeof window < "u" && (e + io + oo > window.innerWidth && (e = window.innerWidth - io - oo), t + a + oo > window.innerHeight && (t = window.innerHeight - a - oo)), {
1233
1232
  position: "fixed",
@@ -1242,37 +1241,37 @@ var aa = ["aria-label"], oa = {
1242
1241
  function f(e) {
1243
1242
  e.key === "Escape" && a("close");
1244
1243
  }
1245
- return U(() => n.isOpen, (e) => {
1246
- e && Me(() => c.value?.focus());
1247
- }), (t, n) => (L(), O(E, { to: "body" }, [e.isOpen ? (L(), A("div", {
1244
+ return W(() => n.isOpen, (e) => {
1245
+ e && je(() => c.value?.focus());
1246
+ }), (t, n) => (R(), k(D, { to: "body" }, [e.isOpen ? (R(), j("div", {
1248
1247
  key: 0,
1249
1248
  class: "ctx-menu-backdrop",
1250
1249
  onMousedown: n[0] ||= (e) => t.$emit("close"),
1251
- onContextmenu: n[1] ||= W((e) => t.$emit("close"), ["prevent"])
1252
- }, null, 32)) : k("", !0), e.isOpen ? (L(), A("div", {
1250
+ onContextmenu: n[1] ||= G((e) => t.$emit("close"), ["prevent"])
1251
+ }, null, 32)) : A("", !0), e.isOpen ? (R(), j("div", {
1253
1252
  key: 1,
1254
1253
  ref_key: "menuRef",
1255
1254
  ref: c,
1256
- class: P(["ctx-menu", V(s)]),
1257
- style: F(u.value),
1258
- onContextmenu: n[2] ||= W(() => {}, ["prevent"]),
1255
+ class: F(["ctx-menu", H(s)]),
1256
+ style: I(u.value),
1257
+ onContextmenu: n[2] ||= G(() => {}, ["prevent"]),
1259
1258
  onKeydown: f
1260
- }, [(L(!0), A(T, null, z(l.value, (e, t) => (L(), A("button", {
1259
+ }, [(R(!0), j(E, null, B(l.value, (e, t) => (R(), j("button", {
1261
1260
  key: e.id || t,
1262
- class: P(["ctx-menu__item", {
1261
+ class: F(["ctx-menu__item", {
1263
1262
  "ctx-menu__item--disabled": e.disabled,
1264
1263
  "ctx-menu__item--divider": e.divider,
1265
1264
  "ctx-menu__item--emphasis": e.emphasis
1266
1265
  }]),
1267
1266
  disabled: e.disabled,
1268
- onMousedown: W((t) => d(e.action), ["prevent"])
1267
+ onMousedown: G((t) => d(e.action), ["prevent"])
1269
1268
  }, [
1270
- e.icon ? (L(), A("span", to, [M(i, { node: e.icon }, null, 8, ["node"])])) : k("", !0),
1271
- j("span", no, B(e.label), 1),
1272
- e.shortcut ? (L(), A("span", ro, B(e.shortcut), 1)) : k("", !0)
1273
- ], 42, eo))), 128))], 38)) : k("", !0)]));
1269
+ e.icon ? (R(), j("span", to, [N(i, { node: e.icon }, null, 8, ["node"])])) : A("", !0),
1270
+ M("span", no, V(e.label), 1),
1271
+ e.shortcut ? (R(), j("span", ro, V(e.shortcut), 1)) : A("", !0)
1272
+ ], 42, eo))), 128))], 38)) : A("", !0)]));
1274
1273
  }
1275
- }), [["__scopeId", "data-v-7af86709"]]), co = /* @__PURE__ */ N({
1274
+ }), [["__scopeId", "data-v-7af86709"]]), co = /* @__PURE__ */ P({
1276
1275
  __name: "DocxEditorOverlays",
1277
1276
  props: {
1278
1277
  readOnly: { type: Boolean },
@@ -1291,7 +1290,7 @@ var aa = ["aria-label"], oa = {
1291
1290
  ],
1292
1291
  setup(e, { emit: t }) {
1293
1292
  let n = t;
1294
- return (t, r) => (L(), A(T, null, [M(so, {
1293
+ return (t, r) => (R(), j(E, null, [N(so, {
1295
1294
  "is-open": e.contextMenu.isOpen,
1296
1295
  position: e.contextMenu.position,
1297
1296
  "has-selection": e.contextMenu.hasSelection,
@@ -1315,7 +1314,7 @@ var aa = ["aria-label"], oa = {
1315
1314
  "can-split-cell",
1316
1315
  "list-numbering",
1317
1316
  "custom-items"
1318
- ]), M($a, {
1317
+ ]), N($a, {
1319
1318
  state: e.imageContextMenu,
1320
1319
  "text-actions": e.imageContextMenuTextActions,
1321
1320
  "can-open-properties": e.canOpenImageProperties,
@@ -1349,7 +1348,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1349
1348
  }, mo = {
1350
1349
  key: 1,
1351
1350
  class: "image-overlay__dim image-overlay__dim--rotate"
1352
- }, ho = 4, go = 15, _o = 250, vo = 700, yo = /*#__PURE__*/ t(/* @__PURE__ */ N({
1351
+ }, ho = 4, go = 15, _o = 250, vo = 700, yo = /*#__PURE__*/ t(/* @__PURE__ */ P({
1353
1352
  __name: "ImageSelectionOverlay",
1354
1353
  props: {
1355
1354
  imageInfo: {},
@@ -1363,7 +1362,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1363
1362
  "context-menu"
1364
1363
  ],
1365
1364
  setup(e, { emit: t }) {
1366
- let { t: n } = r(), i = e, a = t, o = R(null), s = R(!1), c = R(!1), l = R(!1), u = R(0), d = R(0), f = R(0), p = R(null), m = "se", h = 0, g = 0, _ = 0, v = 0, ee = null, y = null, b = null, te = null;
1365
+ let { t: n } = r(), i = e, a = t, o = z(null), s = z(!1), c = z(!1), l = z(!1), u = z(0), d = z(0), f = z(0), p = z(null), m = "se", h = 0, g = 0, _ = 0, v = 0, ee = null, y = null, b = null, te = null;
1367
1366
  function ne(e, t) {
1368
1367
  if (!e) return null;
1369
1368
  try {
@@ -1388,7 +1387,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1388
1387
  let t = x();
1389
1388
  if (!t) return null;
1390
1389
  let n = Et(t, e.pmPos);
1391
- return n ? ln(n) : null;
1390
+ return n ? un(n) : null;
1392
1391
  }
1393
1392
  function oe() {
1394
1393
  let e = ie();
@@ -1428,22 +1427,22 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1428
1427
  cancelAnimationFrame(e), clearTimeout(a);
1429
1428
  };
1430
1429
  }
1431
- U(() => i.imageInfo, (e, t, n) => {
1430
+ W(() => i.imageInfo, (e, t, n) => {
1432
1431
  if (!i.imageInfo) {
1433
1432
  p.value = null;
1434
1433
  return;
1435
1434
  }
1436
1435
  ce(), n(() => se?.());
1437
- }, { immediate: !0 }), U(() => i.zoom, () => {
1436
+ }, { immediate: !0 }), W(() => i.zoom, () => {
1438
1437
  i.imageInfo && ce();
1439
- }), U(() => i.imageInfo, (e, t, n) => {
1438
+ }), W(() => i.imageInfo, (e, t, n) => {
1440
1439
  if (!i.imageInfo) return;
1441
1440
  let r = () => {
1442
1441
  y && cancelAnimationFrame(y), y = requestAnimationFrame(oe);
1443
1442
  }, a = o.value?.closest(".docx-editor-vue__pages-viewport");
1444
1443
  a?.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r, { passive: !0 });
1445
1444
  let s = null, c = !1;
1446
- Me(() => {
1445
+ je(() => {
1447
1446
  if (c || !i.imageInfo) return;
1448
1447
  let e = x();
1449
1448
  e && (s = new MutationObserver(() => ce()), s.observe(e, {
@@ -1454,7 +1453,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1454
1453
  c = !0, a?.removeEventListener("scroll", r), window.removeEventListener("resize", r), s?.disconnect(), y && cancelAnimationFrame(y);
1455
1454
  });
1456
1455
  }, { immediate: !0 });
1457
- let le = D(() => s.value ? u.value : p.value?.width || 0), ue = D(() => s.value ? d.value : p.value?.height || 0), de = D(() => {
1456
+ let S = O(() => s.value ? u.value : p.value?.width || 0), le = O(() => s.value ? d.value : p.value?.height || 0), ue = O(() => {
1458
1457
  let e = p.value;
1459
1458
  if (!e) return {
1460
1459
  position: "absolute",
@@ -1475,8 +1474,8 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1475
1474
  zIndex: ae.imageOverlay,
1476
1475
  pointerEvents: "auto"
1477
1476
  };
1478
- }), fe = D(() => {
1479
- let e = le.value, t = ue.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1477
+ }), de = O(() => {
1478
+ let e = S.value, t = le.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1480
1479
  return [
1481
1480
  {
1482
1481
  pos: "nw",
@@ -1544,11 +1543,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1544
1543
  }
1545
1544
  ];
1546
1545
  });
1547
- function pe(e, t) {
1548
- !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, ee = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", me), document.addEventListener("mouseup", he));
1546
+ function fe(e, t) {
1547
+ !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, ee = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", pe), document.addEventListener("mouseup", me));
1549
1548
  }
1550
- function me(e) {
1551
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = gn(m, n, r, _, v, a);
1549
+ function pe(e) {
1550
+ let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = _n(m, n, r, _, v, a);
1552
1551
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1553
1552
  let s = ee;
1554
1553
  if (s) {
@@ -1561,80 +1560,80 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1561
1560
  };
1562
1561
  }
1563
1562
  }
1564
- function he() {
1565
- document.removeEventListener("mousemove", me), document.removeEventListener("mouseup", he), s.value = !1, ee = null, a("interact-end");
1563
+ function me() {
1564
+ document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", me), s.value = !1, ee = null, a("interact-end");
1566
1565
  let e = i.view, t = i.imageInfo;
1567
1566
  if (!e || !t) {
1568
1567
  oe();
1569
1568
  return;
1570
1569
  }
1571
- let n = yn(e, t.pmPos, u.value, d.value);
1572
- n !== null && Ee(n), Me(() => oe());
1570
+ let n = bn(e, t.pmPos, u.value, d.value);
1571
+ n !== null && Te(n), je(() => oe());
1573
1572
  }
1574
- let ge = 0, _e = 0, ve = 0, ye = 0, S = null, be = null;
1575
- function C(e) {
1573
+ let he = 0, ge = 0, _e = 0, ve = 0, C = null, ye = null;
1574
+ function w(e) {
1576
1575
  if (!e) return 0;
1577
1576
  let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
1578
1577
  return t ? parseFloat(t) : 0;
1579
1578
  }
1580
- function xe(e, t) {
1579
+ function be(e, t) {
1581
1580
  let n = /scaleX\(-1\)/.test(e || ""), r = /scaleY\(-1\)/.test(e || ""), i = [], a = (t % 360 + 360) % 360;
1582
1581
  return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
1583
1582
  }
1584
- function Se(e, t) {
1585
- return Math.atan2(e - ge, -(t - _e)) * 180 / Math.PI;
1583
+ function xe(e, t) {
1584
+ return Math.atan2(e - he, -(t - ge)) * 180 / Math.PI;
1586
1585
  }
1587
- function Ce(e) {
1586
+ function Se(e) {
1588
1587
  if (!i.imageInfo) return;
1589
1588
  let t = i.imageInfo.element.getBoundingClientRect();
1590
- ge = t.left + t.width / 2, _e = t.top + t.height / 2, S = re(ne(i.view, i.imageInfo.pmPos)), ye = C(S), be = i.imageInfo.element.querySelector("img"), ve = Se(e.clientX, e.clientY), f.value = ye, l.value = !0, a("interact-start"), document.addEventListener("mousemove", we), document.addEventListener("mouseup", w);
1589
+ he = t.left + t.width / 2, ge = t.top + t.height / 2, C = re(ne(i.view, i.imageInfo.pmPos)), ve = w(C), ye = i.imageInfo.element.querySelector("img"), _e = xe(e.clientX, e.clientY), f.value = ve, l.value = !0, a("interact-start"), document.addEventListener("mousemove", Ce), document.addEventListener("mouseup", T);
1591
1590
  }
1592
- function we(e) {
1593
- let t = Se(e.clientX, e.clientY) - ve, n = ye + t;
1594
- e.shiftKey || (n = Math.round(n / go) * go), f.value = (n % 360 + 360) % 360, be && (be.style.transform = xe(S, f.value) || "");
1591
+ function Ce(e) {
1592
+ let t = xe(e.clientX, e.clientY) - _e, n = ve + t;
1593
+ e.shiftKey || (n = Math.round(n / go) * go), f.value = (n % 360 + 360) % 360, ye && (ye.style.transform = be(C, f.value) || "");
1595
1594
  }
1596
- function w() {
1597
- document.removeEventListener("mousemove", we), document.removeEventListener("mouseup", w), l.value = !1, a("interact-end");
1595
+ function T() {
1596
+ document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", T), l.value = !1, a("interact-end");
1598
1597
  let e = i.view, t = i.imageInfo;
1599
1598
  try {
1600
1599
  let n = e && t ? ne(e, t.pmPos) : null;
1601
1600
  e && t && n && (e.dispatch(e.state.tr.setNodeMarkup(t.pmPos, void 0, {
1602
1601
  ...n.attrs,
1603
- transform: xe(re(n), f.value)
1604
- })), Ee(t.pmPos));
1602
+ transform: be(re(n), f.value)
1603
+ })), Te(t.pmPos));
1605
1604
  } catch {} finally {
1606
- be && (be.style.transform = ""), be = null, S = null;
1605
+ ye && (ye.style.transform = ""), ye = null, C = null;
1607
1606
  }
1608
- Me(() => oe());
1607
+ je(() => oe());
1609
1608
  }
1610
- let E = null;
1611
- function Te(e) {
1609
+ let D = null;
1610
+ function we(e) {
1612
1611
  if (!i.imageInfo || !p.value) return;
1613
1612
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1614
1613
  let s = e.clientX - t, l = e.clientY - n;
1615
1614
  if (!(!o && Math.sqrt(s * s + l * l) < ho)) {
1616
1615
  if (!o) {
1617
- o = !0, c.value = !0, a("interact-start"), E = document.createElement("div"), E.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);";
1616
+ o = !0, c.value = !0, a("interact-start"), D = document.createElement("div"), D.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);";
1618
1617
  let e = i.zoom;
1619
- E.style.width = `${r.width * e}px`, E.style.height = `${r.height * e}px`, document.body.appendChild(E);
1618
+ D.style.width = `${r.width * e}px`, D.style.height = `${r.height * e}px`, document.body.appendChild(D);
1620
1619
  }
1621
- if (E) {
1620
+ if (D) {
1622
1621
  let t = i.zoom;
1623
- E.style.left = `${e.clientX - r.width * t / 2}px`, E.style.top = `${e.clientY - r.height * t / 2}px`;
1622
+ D.style.left = `${e.clientX - r.width * t / 2}px`, D.style.top = `${e.clientY - r.height * t / 2}px`;
1624
1623
  }
1625
1624
  }
1626
1625
  }, l = (e) => {
1627
- document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), b = null, te = null, E &&= (E.remove(), null), c.value = !1, o && (a("interact-end"), O(e.clientX, e.clientY));
1626
+ document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), b = null, te = null, D &&= (D.remove(), null), c.value = !1, o && (a("interact-end"), k(e.clientX, e.clientY));
1628
1627
  };
1629
1628
  b = s, te = l, document.addEventListener("mousemove", s), document.addEventListener("mouseup", l);
1630
1629
  }
1631
- function O(e, t) {
1630
+ function k(e, t) {
1632
1631
  let n = i.view, r = i.imageInfo;
1633
1632
  if (!n || !r) return;
1634
1633
  let a = ne(n, r.pmPos);
1635
1634
  if (!a) return;
1636
1635
  let s;
1637
- if (bn(a)) {
1636
+ if (xn(a)) {
1638
1637
  let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1639
1638
  if (!a || a.length === 0) return;
1640
1639
  let c = null;
@@ -1650,60 +1649,60 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1650
1649
  c = e ? e.querySelector(".layout-page-content") : null;
1651
1650
  }
1652
1651
  if (!c) return;
1653
- let l = c.getBoundingClientRect(), u = i.zoom, d = an((e - l.left) / u), f = an((t - l.top) / u);
1654
- s = _n(n, r.pmPos, d, f);
1652
+ let l = c.getBoundingClientRect(), u = i.zoom, d = on((e - l.left) / u), f = on((t - l.top) / u);
1653
+ s = vn(n, r.pmPos, d, f);
1655
1654
  } else {
1656
1655
  let i = x();
1657
1656
  if (!i) return;
1658
- let a = mn(i, e, t, 1);
1657
+ let a = hn(i, e, t, 1);
1659
1658
  if (a == null || a < 0) return;
1660
- s = vn(n, r.pmPos, a);
1659
+ s = yn(n, r.pmPos, a);
1661
1660
  }
1662
- s !== null && Ee(s), Me(() => oe());
1661
+ s !== null && Te(s), je(() => oe());
1663
1662
  }
1664
- function Ee(e) {
1663
+ function Te(e) {
1665
1664
  let t = i.view;
1666
1665
  if (t) try {
1667
- let n = Y.create(t.state.doc, e);
1666
+ let n = an.create(t.state.doc, e);
1668
1667
  t.dispatch(t.state.tr.setSelection(n));
1669
1668
  } catch {}
1670
1669
  }
1671
- return I(() => {
1672
- document.removeEventListener("mousemove", me), document.removeEventListener("mouseup", he), document.removeEventListener("mousemove", we), document.removeEventListener("mouseup", w), b && document.removeEventListener("mousemove", b), te && document.removeEventListener("mouseup", te), E &&= (E.remove(), null), y && cancelAnimationFrame(y), se?.();
1673
- }), (t, r) => e.imageInfo ? (L(), A("div", {
1670
+ return L(() => {
1671
+ document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", me), document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", T), b && document.removeEventListener("mousemove", b), te && document.removeEventListener("mouseup", te), D &&= (D.remove(), null), y && cancelAnimationFrame(y), se?.();
1672
+ }), (t, r) => e.imageInfo ? (R(), j("div", {
1674
1673
  key: 0,
1675
1674
  ref_key: "overlayRootRef",
1676
1675
  ref: o,
1677
1676
  class: "image-overlay",
1678
- style: F(de.value),
1679
- onMousedown: r[3] ||= W(() => {}, ["stop"])
1677
+ style: I(ue.value),
1678
+ onMousedown: r[3] ||= G(() => {}, ["stop"])
1680
1679
  }, [
1681
- r[4] ||= j("div", { class: "image-overlay__border" }, null, -1),
1682
- j("div", {
1680
+ r[4] ||= M("div", { class: "image-overlay__border" }, null, -1),
1681
+ M("div", {
1683
1682
  class: "image-overlay__body",
1684
- style: F({ cursor: c.value ? "grabbing" : "grab" }),
1685
- onMousedown: r[0] ||= W((e) => Te(e), ["prevent", "stop"]),
1686
- onContextmenu: r[1] ||= W((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1683
+ style: I({ cursor: c.value ? "grabbing" : "grab" }),
1684
+ onMousedown: r[0] ||= G((e) => we(e), ["prevent", "stop"]),
1685
+ onContextmenu: r[1] ||= G((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1687
1686
  }, null, 36),
1688
- (L(!0), A(T, null, z(fe.value, (e) => (L(), A("div", {
1687
+ (R(!0), j(E, null, B(de.value, (e) => (R(), j("div", {
1689
1688
  key: e.pos,
1690
1689
  class: "image-overlay__handle",
1691
- style: F(e.style),
1690
+ style: I(e.style),
1692
1691
  "data-handle": e.pos,
1693
- onMousedown: W((t) => pe(t, e.pos), ["prevent", "stop"])
1692
+ onMousedown: G((t) => fe(t, e.pos), ["prevent", "stop"])
1694
1693
  }, null, 44, uo))), 128)),
1695
- r[5] ||= j("div", { class: "image-overlay__rotate-line" }, null, -1),
1696
- j("div", {
1694
+ r[5] ||= M("div", { class: "image-overlay__rotate-line" }, null, -1),
1695
+ M("div", {
1697
1696
  class: "image-overlay__rotate-handle",
1698
- style: F({ left: `${le.value / 2 - 7}px` }),
1699
- title: V(n)("imageOverlay.rotate"),
1700
- onMousedown: r[2] ||= W((e) => Ce(e), ["prevent", "stop"])
1697
+ style: I({ left: `${S.value / 2 - 7}px` }),
1698
+ title: H(n)("imageOverlay.rotate"),
1699
+ onMousedown: r[2] ||= G((e) => Se(e), ["prevent", "stop"])
1701
1700
  }, null, 44, fo),
1702
- s.value ? (L(), A("div", po, B(Math.round(u.value)) + " × " + B(Math.round(d.value)), 1)) : k("", !0),
1703
- l.value ? (L(), A("div", mo, B(Math.round(f.value)) + "° ", 1)) : k("", !0)
1704
- ], 36)) : k("", !0);
1701
+ s.value ? (R(), j("div", po, V(Math.round(u.value)) + " × " + V(Math.round(d.value)), 1)) : A("", !0),
1702
+ l.value ? (R(), j("div", mo, V(Math.round(f.value)) + "° ", 1)) : A("", !0)
1703
+ ], 36)) : A("", !0);
1705
1704
  }
1706
- }), [["__scopeId", "data-v-4c3d1a1d"]]), bo = /* @__PURE__ */ N({
1705
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), bo = /* @__PURE__ */ P({
1707
1706
  __name: "HeaderFooterSelectionOverlay",
1708
1707
  props: {
1709
1708
  pagesContainer: {},
@@ -1713,11 +1712,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1713
1712
  zoom: {}
1714
1713
  },
1715
1714
  setup(e) {
1716
- let t = e, n = new wn(), r = () => {
1715
+ let t = e, n = new Tn(), r = () => {
1717
1716
  if (!t.pagesContainer) return;
1718
1717
  n.sync(t.pagesContainer, t.selection, t.zoom);
1719
1718
  let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
1720
- Sn({
1719
+ Cn({
1721
1720
  hiddenHost: t.hiddenContainer,
1722
1721
  editorView: t.editorView,
1723
1722
  visibleCaret: e ? {
@@ -1726,11 +1725,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1726
1725
  } : null
1727
1726
  });
1728
1727
  };
1729
- U(() => t.pagesContainer, (e, t, i) => {
1730
- e && (e.addEventListener(Cn, r), r(), i(() => {
1731
- e.removeEventListener(Cn, r), n.clear(e);
1728
+ W(() => t.pagesContainer, (e, t, i) => {
1729
+ e && (e.addEventListener(wn, r), r(), i(() => {
1730
+ e.removeEventListener(wn, r), n.clear(e);
1732
1731
  }));
1733
- }, { immediate: !0 }), U(() => [
1732
+ }, { immediate: !0 }), W(() => [
1734
1733
  t.selection?.rId,
1735
1734
  t.selection?.kind,
1736
1735
  t.selection?.from,
@@ -1739,7 +1738,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1739
1738
  t.hiddenContainer,
1740
1739
  t.editorView,
1741
1740
  t.zoom
1742
- ], r), U(() => t.hiddenContainer, (e, t, n) => {
1741
+ ], r), W(() => t.hiddenContainer, (e, t, n) => {
1743
1742
  e && (e.addEventListener("focusin", r), e.addEventListener("compositionend", r), n(() => {
1744
1743
  e.removeEventListener("focusin", r), e.removeEventListener("compositionend", r);
1745
1744
  }));
@@ -1749,11 +1748,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1749
1748
  i = null, r();
1750
1749
  });
1751
1750
  }, o = typeof window > "u" ? null : window;
1752
- return o?.addEventListener("scroll", a, !0), Pe(() => {
1753
- i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), xn(t.hiddenContainer);
1751
+ return o?.addEventListener("scroll", a, !0), Ne(() => {
1752
+ i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Sn(t.hiddenContainer);
1754
1753
  }), (e, t) => null;
1755
1754
  }
1756
- }), xo = { class: "hf-editor-label" }, So = /*#__PURE__*/ t(/* @__PURE__ */ N({
1755
+ }), xo = { class: "hf-editor-label" }, So = /*#__PURE__*/ t(/* @__PURE__ */ P({
1757
1756
  __name: "InlineHeaderFooterEditor",
1758
1757
  props: {
1759
1758
  edit: {},
@@ -1761,7 +1760,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1761
1760
  },
1762
1761
  emits: ["close", "remove"],
1763
1762
  setup(e, { emit: t }) {
1764
- let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = R(!1), c = D(() => n.edit.position === "header" ? o("headerFooter.header") : o("headerFooter.footer")), l = D(() => ({
1763
+ let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = z(!1), c = O(() => n.edit.position === "header" ? o("headerFooter.header") : o("headerFooter.footer")), l = O(() => ({
1765
1764
  position: "absolute",
1766
1765
  top: `${n.edit.targetRect?.top ?? 0}px`,
1767
1766
  left: `${n.edit.targetRect?.left ?? 0}px`,
@@ -1771,7 +1770,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1771
1770
  zIndex: 10
1772
1771
  })), u = (e) => {
1773
1772
  s.value = !1;
1774
- let t = n.getView(), r = ct.nodes.field;
1773
+ let t = n.getView(), r = st.nodes.field;
1775
1774
  if (!t || !r) return;
1776
1775
  let { $from: i, from: a } = t.state.selection, o = t.state.storedMarks ?? i.marks(), c = r.create({
1777
1776
  fieldType: e,
@@ -1783,70 +1782,70 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1783
1782
  }, d = (e) => {
1784
1783
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), i("close"));
1785
1784
  }, f = null;
1786
- return Ne(() => {
1785
+ return Me(() => {
1787
1786
  document.addEventListener("keydown", d, !0);
1788
1787
  let e = 0, t = () => {
1789
1788
  let r = n.getView();
1790
1789
  r && !r.hasFocus() && r.focus(), e++, e < 30 && (f = requestAnimationFrame(t));
1791
1790
  };
1792
1791
  f = requestAnimationFrame(t);
1793
- }), I(() => {
1792
+ }), L(() => {
1794
1793
  document.removeEventListener("keydown", d, !0), f !== null && cancelAnimationFrame(f);
1795
- }), (t, n) => (L(), A("div", {
1794
+ }), (t, n) => (R(), j("div", {
1796
1795
  class: "hf-inline-editor",
1797
- style: F(l.value),
1796
+ style: I(l.value),
1798
1797
  role: "presentation"
1799
- }, [j("div", { class: P(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [j("span", xo, B(c.value), 1), j("div", {
1798
+ }, [M("div", { class: F(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [M("span", xo, V(c.value), 1), M("div", {
1800
1799
  class: "hf-options",
1801
- onMousedown: n[5] ||= W(() => {}, ["stop"])
1802
- }, [M(V(a), {
1800
+ onMousedown: n[5] ||= G(() => {}, ["stop"])
1801
+ }, [N(H(a), {
1803
1802
  variant: "ghost",
1804
1803
  size: "xs",
1805
1804
  "class-name": "hf-options-button",
1806
- onClick: n[0] ||= W((e) => s.value = !s.value, ["stop"])
1805
+ onClick: n[0] ||= G((e) => s.value = !s.value, ["stop"])
1807
1806
  }, {
1808
- default: Ve(() => [Oe(B(V(o)("headerFooter.options")) + " ▾ ", 1)]),
1807
+ default: Be(() => [De(V(H(o)("headerFooter.options")) + " ▾ ", 1)]),
1809
1808
  _: 1
1810
- }), s.value ? (L(), A("div", {
1809
+ }), s.value ? (R(), j("div", {
1811
1810
  key: 0,
1812
- class: P(["hf-options-dropdown", { "hf-options-dropdown--up": e.edit.position === "footer" }])
1811
+ class: F(["hf-options-dropdown", { "hf-options-dropdown--up": e.edit.position === "footer" }])
1813
1812
  }, [
1814
- M(V(a), {
1813
+ N(H(a), {
1815
1814
  variant: "ghost",
1816
1815
  size: "xs",
1817
1816
  onClick: n[1] ||= (e) => u("PAGE")
1818
1817
  }, {
1819
- default: Ve(() => [Oe(B(V(o)("headerFooter.insertPageNumber")), 1)]),
1818
+ default: Be(() => [De(V(H(o)("headerFooter.insertPageNumber")), 1)]),
1820
1819
  _: 1
1821
1820
  }),
1822
- M(V(a), {
1821
+ N(H(a), {
1823
1822
  variant: "ghost",
1824
1823
  size: "xs",
1825
1824
  onClick: n[2] ||= (e) => u("NUMPAGES")
1826
1825
  }, {
1827
- default: Ve(() => [Oe(B(V(o)("headerFooter.insertPageCount")), 1)]),
1826
+ default: Be(() => [De(V(H(o)("headerFooter.insertPageCount")), 1)]),
1828
1827
  _: 1
1829
1828
  }),
1830
- n[6] ||= j("div", { class: "hf-options-divider" }, null, -1),
1831
- M(V(a), {
1829
+ n[6] ||= M("div", { class: "hf-options-divider" }, null, -1),
1830
+ N(H(a), {
1832
1831
  variant: "ghost",
1833
1832
  size: "xs",
1834
1833
  onClick: n[3] ||= (e) => i("remove")
1835
1834
  }, {
1836
- default: Ve(() => [Oe(B(e.edit.position === "header" ? V(o)("headerFooter.removeHeader") : V(o)("headerFooter.removeFooter")), 1)]),
1835
+ default: Be(() => [De(V(e.edit.position === "header" ? H(o)("headerFooter.removeHeader") : H(o)("headerFooter.removeFooter")), 1)]),
1837
1836
  _: 1
1838
1837
  }),
1839
- M(V(a), {
1838
+ N(H(a), {
1840
1839
  variant: "ghost",
1841
1840
  size: "xs",
1842
1841
  onClick: n[4] ||= (e) => i("close")
1843
1842
  }, {
1844
- default: Ve(() => [Oe(B(e.edit.position === "header" ? V(o)("headerFooter.closeHeaderEditing") : V(o)("headerFooter.closeFooterEditing")), 1)]),
1843
+ default: Be(() => [De(V(e.edit.position === "header" ? H(o)("headerFooter.closeHeaderEditing") : H(o)("headerFooter.closeFooterEditing")), 1)]),
1845
1844
  _: 1
1846
1845
  })
1847
- ], 2)) : k("", !0)], 32)], 2)], 4));
1846
+ ], 2)) : A("", !0)], 32)], 2)], 4));
1848
1847
  }
1849
- }), [["__scopeId", "data-v-a0bd3730"]]), Co = /*#__PURE__*/ t(/* @__PURE__ */ N({
1848
+ }), [["__scopeId", "data-v-a0bd3730"]]), Co = /*#__PURE__*/ t(/* @__PURE__ */ P({
1850
1849
  __name: "PageIndicator",
1851
1850
  props: {
1852
1851
  currentPage: {},
@@ -1855,17 +1854,17 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1855
1854
  },
1856
1855
  setup(e) {
1857
1856
  let { t } = r();
1858
- return (n, r) => (L(), A("div", {
1857
+ return (n, r) => (R(), j("div", {
1859
1858
  class: "docx-editor-vue__page-indicator",
1860
- style: F({ opacity: +!!e.visible }),
1859
+ style: I({ opacity: +!!e.visible }),
1861
1860
  "aria-live": "polite",
1862
1861
  role: "status"
1863
- }, B(V(t)("viewer.pageIndicator", {
1862
+ }, V(H(t)("viewer.pageIndicator", {
1864
1863
  current: e.currentPage,
1865
1864
  total: e.totalPages
1866
1865
  })), 5));
1867
1866
  }
1868
- }), [["__scopeId", "data-v-f1904974"]]), wo = ["data-folio-block-id"], To = ["data-folio-block-id", "title"], Eo = 2.5, Do = 5, Oo = 6, ko = 2, Ao = 2, jo = /*#__PURE__*/ t(/* @__PURE__ */ N({
1867
+ }), [["__scopeId", "data-v-f1904974"]]), wo = ["data-folio-block-id"], To = ["data-folio-block-id", "title"], Eo = 2.5, Do = 5, Oo = 6, ko = 2, Ao = 2, jo = /*#__PURE__*/ t(/* @__PURE__ */ P({
1869
1868
  __name: "TemplateDirectivesOverlay",
1870
1869
  props: {
1871
1870
  getView: { type: Function },
@@ -1956,7 +1955,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1956
1955
  }
1957
1956
  return i;
1958
1957
  }
1959
- let f = R([]), p = R([]), m = R(null), h = R(null), g = R(null), _ = It(), v = null;
1958
+ let f = z([]), p = z([]), m = z(null), h = z(null), g = z(null), _ = It(), v = null;
1960
1959
  function ee() {
1961
1960
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1962
1961
  v = null, y();
@@ -1968,7 +1967,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1968
1967
  f.value = [], p.value = [], m.value = null, h.value = null;
1969
1968
  return;
1970
1969
  }
1971
- let a = En(i);
1970
+ let a = Dn(i);
1972
1971
  if (a.length === 0) {
1973
1972
  f.value = [], p.value = [], m.value = null, h.value = null;
1974
1973
  return;
@@ -1982,22 +1981,22 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1982
1981
  });
1983
1982
  e() && (f.value = a, h.value = i.selection.head, m.value = o, p.value = s);
1984
1983
  }
1985
- U(() => [
1984
+ W(() => [
1986
1985
  t.editorState,
1987
1986
  t.zoom,
1988
1987
  t.layout,
1989
1988
  t.blocks,
1990
1989
  t.measures
1991
1990
  ], () => ee());
1992
- let b = D(() => c(f.value)), te = D(() => m.value ? d(b.value, p.value, m.value) : []), ne = D(() => {
1991
+ let b = O(() => c(f.value)), te = O(() => m.value ? d(b.value, p.value, m.value) : []), ne = O(() => {
1993
1992
  let e = /* @__PURE__ */ new Map();
1994
1993
  for (let t of b.value) e.set(t.openerFrom, t.blockId), e.set(t.closerFrom, t.blockId);
1995
1994
  return e;
1996
- }), re = D(() => {
1995
+ }), re = O(() => {
1997
1996
  let e = /* @__PURE__ */ new Map();
1998
1997
  for (let t of b.value) e.set(t.closerFrom, l(t.kind, t.openerExpr));
1999
1998
  return e;
2000
- }), x = D(() => u(b.value, h.value));
1999
+ }), x = O(() => u(b.value, h.value));
2001
2000
  function ie(e) {
2002
2001
  return e === g.value || e === x.value;
2003
2002
  }
@@ -2019,49 +2018,49 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2019
2018
  { "folio-template-directive--active": n }
2020
2019
  ];
2021
2020
  }
2022
- function le(e) {
2021
+ function S(e) {
2023
2022
  if (!(e instanceof HTMLElement)) return null;
2024
2023
  let t = e.dataset.folioBlockId;
2025
2024
  return t === void 0 ? null : Number(t);
2026
2025
  }
2027
- function ue(e) {
2028
- let t = le(e.target);
2026
+ function le(e) {
2027
+ let t = S(e.target);
2029
2028
  t !== null && (g.value = t);
2030
2029
  }
2031
- function de(e) {
2032
- let t = le(e.target);
2030
+ function ue(e) {
2031
+ let t = S(e.target);
2033
2032
  if (t === null) return;
2034
- let n = le(e.relatedTarget);
2033
+ let n = S(e.relatedTarget);
2035
2034
  n !== t && g.value === t && (g.value = n);
2036
2035
  }
2037
- return Ne(() => ee()), I(() => {
2036
+ return Me(() => ee()), L(() => {
2038
2037
  _.invalidate(), v !== null && (cancelAnimationFrame(v), v = null);
2039
- }), (t, n) => (L(), A("div", {
2038
+ }), (t, n) => (R(), j("div", {
2040
2039
  class: "folio-template-directives-overlay",
2041
2040
  "data-folio-template-directives-overlay": "",
2042
- onPointerover: ue,
2043
- onPointerout: de
2044
- }, [(L(!0), A(T, null, z(te.value, (t) => (L(), A(T, { key: `rail:${t.blockId}` }, [(L(!0), A(T, null, z(t.segments, (n, r) => (L(), A("div", {
2041
+ onPointerover: le,
2042
+ onPointerout: ue
2043
+ }, [(R(!0), j(E, null, B(te.value, (t) => (R(), j(E, { key: `rail:${t.blockId}` }, [(R(!0), j(E, null, B(t.segments, (n, r) => (R(), j("div", {
2045
2044
  key: `rail:${t.blockId}:${r}`,
2046
- class: P([
2045
+ class: F([
2047
2046
  "folio-template-band-rail",
2048
2047
  `folio-template-band-rail--${t.kind}`,
2049
2048
  { "folio-template-band-rail--active": ie(t.blockId) }
2050
2049
  ]),
2051
2050
  "data-folio-block-id": t.blockId,
2052
- style: F({
2051
+ style: I({
2053
2052
  position: "absolute",
2054
2053
  left: `${t.railX * e.zoom}px`,
2055
2054
  top: `${n.top * e.zoom}px`,
2056
2055
  width: `${Eo * e.zoom}px`,
2057
2056
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
2058
2057
  })
2059
- }, null, 14, wo))), 128))], 64))), 128)), (L(!0), A(T, null, z(p.value, (t, n) => (L(), A(T, { key: `d:${n}` }, [(L(!0), A(T, null, z(t.rects, (r, i) => (L(), A("span", {
2058
+ }, null, 14, wo))), 128))], 64))), 128)), (R(!0), j(E, null, B(p.value, (t, n) => (R(), j(E, { key: `d:${n}` }, [(R(!0), j(E, null, B(t.rects, (r, i) => (R(), j("span", {
2060
2059
  key: `d:${n}:${i}`,
2061
- class: P(ce(t.range)),
2060
+ class: F(ce(t.range)),
2062
2061
  "data-folio-block-id": oe(t.range),
2063
2062
  title: se(t.range),
2064
- style: F({
2063
+ style: I({
2065
2064
  position: "absolute",
2066
2065
  left: `${(r.x - 1) * e.zoom}px`,
2067
2066
  top: `${(r.y + 1) * e.zoom}px`,
@@ -2075,7 +2074,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2075
2074
  "rel",
2076
2075
  "target",
2077
2076
  "title"
2078
- ], No = ["title"], Po = ["title"], Fo = ["title"], Io = { class: "docx-hyperlink-popup__edit-row" }, Lo = ["placeholder", "onKeydown"], Ro = { class: "docx-hyperlink-popup__edit-row" }, zo = ["onKeydown"], Bo = ["disabled"], Vo = /*#__PURE__*/ t(/* @__PURE__ */ N({
2077
+ ], No = ["title"], Po = ["title"], Fo = ["title"], Io = { class: "docx-hyperlink-popup__edit-row" }, Lo = ["placeholder", "onKeydown"], Ro = { class: "docx-hyperlink-popup__edit-row" }, zo = ["onKeydown"], Bo = ["disabled"], Vo = /*#__PURE__*/ t(/* @__PURE__ */ P({
2079
2078
  __name: "HyperlinkPopup",
2080
2079
  props: {
2081
2080
  data: {},
@@ -2089,25 +2088,25 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2089
2088
  "close"
2090
2089
  ],
2091
2090
  setup(e, { emit: t }) {
2092
- let { t: n } = r(), i = Nn(void 0), a = e, o = t, s = R(!1), c = R(""), l = R(""), u = R(null), d = D(() => ({
2091
+ let { t: n } = r(), i = Pn(void 0), a = e, o = t, s = z(!1), c = z(""), l = z(""), u = z(null), d = O(() => ({
2093
2092
  left: (a.data?.position.left ?? 0) + "px",
2094
2093
  top: (a.data?.position.top ?? 0) + "px"
2095
2094
  }));
2096
- U(() => a.data?.href, () => {
2095
+ W(() => a.data?.href, () => {
2097
2096
  s.value = !1;
2098
2097
  });
2099
2098
  let f = null, p = null;
2100
2099
  function m() {
2101
2100
  p &&= (clearTimeout(p), null), f &&= (document.removeEventListener("mousedown", f), null);
2102
2101
  }
2103
- U(() => a.data, (e) => {
2102
+ W(() => a.data, (e) => {
2104
2103
  m(), e && (f = (e) => {
2105
2104
  let t = u.value, n = e.target;
2106
2105
  t && n instanceof Node && !t.contains(n) && o("close");
2107
2106
  }, p = setTimeout(() => {
2108
2107
  f && document.addEventListener("mousedown", f);
2109
2108
  }, 0));
2110
- }, { immediate: !0 }), I(m);
2109
+ }, { immediate: !0 }), L(m);
2111
2110
  function h() {
2112
2111
  a.data && (c.value = a.data.displayText, l.value = a.data.href, s.value = !0);
2113
2112
  }
@@ -2117,43 +2116,43 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2117
2116
  function _() {
2118
2117
  a.data && (o("copy", a.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(a.data.href).catch(() => {}));
2119
2118
  }
2120
- return (t, r) => e.data ? (L(), A("div", {
2119
+ return (t, r) => e.data ? (R(), j("div", {
2121
2120
  key: 0,
2122
2121
  ref_key: "popupRef",
2123
2122
  ref: u,
2124
- class: P(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
2125
- style: F(d.value),
2126
- onMousedown: r[6] ||= W(() => {}, ["stop"])
2127
- }, [s.value ? (L(), A(T, { key: 1 }, [j("div", Io, [He(j("input", {
2123
+ class: F(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
2124
+ style: I(d.value),
2125
+ onMousedown: r[6] ||= G(() => {}, ["stop"])
2126
+ }, [s.value ? (R(), j(E, { key: 1 }, [M("div", Io, [Ve(M("input", {
2128
2127
  class: "docx-hyperlink-popup__input",
2129
- placeholder: V(n)("displayText"),
2128
+ placeholder: H(n)("displayText"),
2130
2129
  "onUpdate:modelValue": r[2] ||= (e) => c.value = e,
2131
- onKeydown: [Ue(W(g, ["prevent"]), ["enter"]), r[3] ||= Ue((e) => t.$emit("close"), ["esc"])]
2132
- }, null, 40, Lo), [[H, c.value]])]), j("div", Ro, [He(j("input", {
2130
+ onKeydown: [He(G(g, ["prevent"]), ["enter"]), r[3] ||= He((e) => t.$emit("close"), ["esc"])]
2131
+ }, null, 40, Lo), [[U, c.value]])]), M("div", Ro, [Ve(M("input", {
2133
2132
  class: "docx-hyperlink-popup__input",
2134
2133
  placeholder: "https://...",
2135
2134
  "onUpdate:modelValue": r[4] ||= (e) => l.value = e,
2136
- onKeydown: [Ue(W(g, ["prevent"]), ["enter"]), r[5] ||= Ue((e) => t.$emit("close"), ["esc"])]
2137
- }, null, 40, zo), [[H, l.value]]), j("button", {
2135
+ onKeydown: [He(G(g, ["prevent"]), ["enter"]), r[5] ||= He((e) => t.$emit("close"), ["esc"])]
2136
+ }, null, 40, zo), [[U, l.value]]), M("button", {
2138
2137
  class: "docx-hyperlink-popup__apply",
2139
2138
  disabled: !l.value.trim(),
2140
- onClick: W(g, ["prevent"])
2141
- }, B(V(n)("common.apply")), 9, Bo)])], 64)) : (L(), A(T, { key: 0 }, [
2142
- r[10] ||= De("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-370ef571><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-370ef571><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-370ef571></circle><path d=\"M2 12h20\" data-v-370ef571></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-370ef571></path></svg></span>", 1),
2143
- j("a", {
2139
+ onClick: G(g, ["prevent"])
2140
+ }, V(H(n)("common.apply")), 9, Bo)])], 64)) : (R(), j(E, { key: 0 }, [
2141
+ r[10] ||= Ee("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-370ef571><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-370ef571><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-370ef571></circle><path d=\"M2 12h20\" data-v-370ef571></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-370ef571></path></svg></span>", 1),
2142
+ M("a", {
2144
2143
  class: "docx-hyperlink-popup__url",
2145
2144
  href: e.data.href,
2146
- rel: V(i).rel,
2147
- target: V(i).target,
2145
+ rel: H(i).rel,
2146
+ target: H(i).target,
2148
2147
  title: e.data.href,
2149
- onClick: r[0] ||= W((n) => t.$emit("navigate", e.data.href), ["prevent"])
2150
- }, B(e.data.href), 9, Mo),
2151
- r[11] ||= j("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
2152
- j("button", {
2148
+ onClick: r[0] ||= G((n) => t.$emit("navigate", e.data.href), ["prevent"])
2149
+ }, V(e.data.href), 9, Mo),
2150
+ r[11] ||= M("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
2151
+ M("button", {
2153
2152
  class: "docx-hyperlink-popup__btn",
2154
- title: V(n)("copyLink"),
2155
- onClick: W(_, ["prevent"])
2156
- }, [...r[7] ||= [j("svg", {
2153
+ title: H(n)("copyLink"),
2154
+ onClick: G(_, ["prevent"])
2155
+ }, [...r[7] ||= [M("svg", {
2157
2156
  width: "18",
2158
2157
  height: "18",
2159
2158
  viewBox: "0 0 24 24",
@@ -2162,20 +2161,20 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2162
2161
  "stroke-width": "2",
2163
2162
  "stroke-linecap": "round",
2164
2163
  "stroke-linejoin": "round"
2165
- }, [j("rect", {
2164
+ }, [M("rect", {
2166
2165
  x: "9",
2167
2166
  y: "9",
2168
2167
  width: "13",
2169
2168
  height: "13",
2170
2169
  rx: "2",
2171
2170
  ry: "2"
2172
- }), 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, No),
2173
- e.readOnly ? k("", !0) : (L(), A("button", {
2171
+ }), M("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, No),
2172
+ e.readOnly ? A("", !0) : (R(), j("button", {
2174
2173
  key: 0,
2175
2174
  class: "docx-hyperlink-popup__btn",
2176
- title: V(n)("editLink"),
2177
- onClick: W(h, ["prevent"])
2178
- }, [...r[8] ||= [j("svg", {
2175
+ title: H(n)("editLink"),
2176
+ onClick: G(h, ["prevent"])
2177
+ }, [...r[8] ||= [M("svg", {
2179
2178
  width: "18",
2180
2179
  height: "18",
2181
2180
  viewBox: "0 0 24 24",
@@ -2184,14 +2183,14 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2184
2183
  "stroke-width": "2",
2185
2184
  "stroke-linecap": "round",
2186
2185
  "stroke-linejoin": "round"
2187
- }, [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, Po)),
2188
- e.readOnly ? k("", !0) : (L(), A("button", {
2186
+ }, [M("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), M("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, Po)),
2187
+ e.readOnly ? A("", !0) : (R(), j("button", {
2189
2188
  key: 1,
2190
2189
  class: "docx-hyperlink-popup__btn",
2191
- title: V(n)("removeLink"),
2192
- onClick: r[1] ||= W((e) => t.$emit("remove"), ["prevent"])
2193
- }, [...r[9] ||= [De("<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-370ef571><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-370ef571></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-370ef571></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-370ef571></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-370ef571></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-370ef571></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-370ef571></line></svg>", 1)]], 8, Fo))
2194
- ], 64))], 38)) : k("", !0);
2190
+ title: H(n)("removeLink"),
2191
+ onClick: r[1] ||= G((e) => t.$emit("remove"), ["prevent"])
2192
+ }, [...r[9] ||= [Ee("<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-370ef571><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-370ef571></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-370ef571></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-370ef571></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-370ef571></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-370ef571></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-370ef571></line></svg>", 1)]], 8, Fo))
2193
+ ], 64))], 38)) : A("", !0);
2195
2194
  }
2196
2195
  }), [["__scopeId", "data-v-370ef571"]]);
2197
2196
  //#endregion
@@ -2211,17 +2210,17 @@ function Wo(e, t, n, r) {
2211
2210
  let i = e.state.schema.marks.comment, a = Ho(e.state.doc.content.size, t);
2212
2211
  if (!i || !a) return !1;
2213
2212
  let o = e.state.tr;
2214
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: In }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(rn.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2213
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: Ln }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Y.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2215
2214
  }
2216
2215
  function Go(e, t) {
2217
2216
  let n = e.state.schema.marks.comment, r = Ho(e.state.doc.content.size, t);
2218
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: In })));
2217
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: Ln })));
2219
2218
  }
2220
2219
  //#endregion
2221
2220
  //#region src/composables/useCommentLifecycle.ts
2222
2221
  var Ko = 408, qo = 12;
2223
2222
  function Jo(e) {
2224
- let t = R(!1), n = R(null), r = R(null), i = R(null), a = R(null);
2223
+ let t = z(!1), n = z(null), r = z(null), i = z(null), a = z(null);
2225
2224
  function o(t) {
2226
2225
  let n = e.editorView.value, r = e.pagesContainer.value;
2227
2226
  if (!n || !r) return null;
@@ -2283,7 +2282,7 @@ function Jo(e) {
2283
2282
  r.value = null;
2284
2283
  return;
2285
2284
  }
2286
- if (e.sessionKind() === "prosemirror" && !Wo(s, u, In, { selectEnd: !0 })) {
2285
+ if (e.sessionKind() === "prosemirror" && !Wo(s, u, Ln, { selectEnd: !0 })) {
2287
2286
  r.value = null, i.value = null;
2288
2287
  return;
2289
2288
  }
@@ -2317,15 +2316,15 @@ function Jo(e) {
2317
2316
  //#endregion
2318
2317
  //#region src/composables/useCommentManagement.ts
2319
2318
  function Yo(e) {
2320
- let t = Ln(), n = R([]), r = R(!1);
2319
+ let t = Rn(), n = z([]), r = z(!1);
2321
2320
  function i() {
2322
2321
  r.value = !0;
2323
2322
  }
2324
2323
  function a() {
2325
2324
  r.value = !1;
2326
2325
  }
2327
- let o = D(() => e.commentsProp() !== void 0), s = D(() => (e.canonicalTick?.value, e.editor?.getCanonicalComments() ?? null)), c = D(() => s.value ?? (o.value ? e.commentsProp() ?? [] : n.value)), l = R(null);
2328
- U(s, (t) => {
2326
+ let o = O(() => e.commentsProp() !== void 0), s = O(() => (e.canonicalTick?.value, e.editor?.getCanonicalComments() ?? null)), c = O(() => s.value ?? (o.value ? e.commentsProp() ?? [] : n.value)), l = z(null);
2327
+ W(s, (t) => {
2329
2328
  if (t === null) {
2330
2329
  l.value = null;
2331
2330
  return;
@@ -2333,8 +2332,8 @@ function Yo(e) {
2333
2332
  let n = JSON.stringify(t);
2334
2333
  l.value !== null && l.value !== n && e.onCommentsChange(t), l.value = n;
2335
2334
  }, { flush: "sync" });
2336
- let u, d = R(0);
2337
- U([
2335
+ let u, d = z(0);
2336
+ W([
2338
2337
  () => s.value !== null,
2339
2338
  () => {
2340
2339
  let t = e.commentsProp();
@@ -2354,7 +2353,7 @@ function Yo(e) {
2354
2353
  }
2355
2354
  let o = e.commentsProp() ?? [], c = e.editor?.applyCanonicalComment({
2356
2355
  type: "replace",
2357
- comments: Re(o)
2356
+ comments: Le(o)
2358
2357
  });
2359
2358
  if (c?.status === "applied") {
2360
2359
  u = n;
@@ -2362,12 +2361,12 @@ function Yo(e) {
2362
2361
  }
2363
2362
  if (c?.status !== "refused" || c.retry !== "afterComposition") return;
2364
2363
  let l = e.editor?.getView();
2365
- l && i(Bn(l, () => d.value += 1));
2364
+ l && i(Vn(l, () => d.value += 1));
2366
2365
  }, { flush: "post" });
2367
2366
  function f(t) {
2368
2367
  return e.editor?.applyCanonicalComment({
2369
2368
  type: "replace",
2370
- comments: Re(t)
2369
+ comments: Le(t)
2371
2370
  }) == null ? (o.value || (n.value = t), e.onCommentsChange(t), !1) : !0;
2372
2371
  }
2373
2372
  function p(e) {
@@ -2377,12 +2376,12 @@ function Yo(e) {
2377
2376
  p([e]);
2378
2377
  }
2379
2378
  function h(n, r, i) {
2380
- return Rn(t, c.value, e.editorView.value), Vn(t, n, i ?? e.author(), r);
2379
+ return zn(t, c.value, e.editorView.value), Hn(t, n, i ?? e.author(), r);
2381
2380
  }
2382
2381
  function g() {
2383
2382
  if (a(), s.value !== null || o.value) return;
2384
2383
  let n = e.getDocument()?.package.document.comments;
2385
- Rn(t, n, e.editorView.value), f(n && n.length > 0 ? n : []);
2384
+ zn(t, n, e.editorView.value), f(n && n.length > 0 ? n : []);
2386
2385
  }
2387
2386
  function _(t, n) {
2388
2387
  e.editor?.applyCanonicalComment({
@@ -2440,7 +2439,7 @@ function Yo(e) {
2440
2439
  e.editor.resolveCanonicalRevisions([t], n ? "accept" : "reject");
2441
2440
  return;
2442
2441
  }
2443
- (n ? Hn : qn)(t)(r.state, r.dispatch);
2442
+ (n ? Un : Z)(t)(r.state, r.dispatch);
2444
2443
  }
2445
2444
  }
2446
2445
  function ne(e) {
@@ -2451,25 +2450,25 @@ function Yo(e) {
2451
2450
  }
2452
2451
  function x(t, n) {
2453
2452
  let r = e.editorView.value;
2454
- r && zn({
2453
+ r && Bn({
2455
2454
  editor: e.editor,
2456
2455
  from: t,
2457
2456
  to: n,
2458
2457
  resolution: "accept"
2459
- }) === null && Un(t, n)(r.state, r.dispatch);
2458
+ }) === null && Wn(t, n)(r.state, r.dispatch);
2460
2459
  }
2461
2460
  function ie(t, n) {
2462
2461
  let r = e.editorView.value;
2463
- r && zn({
2462
+ r && Bn({
2464
2463
  editor: e.editor,
2465
2464
  from: t,
2466
2465
  to: n,
2467
2466
  resolution: "reject"
2468
- }) === null && Q(t, n)(r.state, r.dispatch);
2467
+ }) === null && Yn(t, n)(r.state, r.dispatch);
2469
2468
  }
2470
2469
  return {
2471
2470
  comments: c,
2472
- commentsDirty: D(() => r.value),
2471
+ commentsDirty: O(() => r.value),
2473
2472
  clearCommentsDirty: a,
2474
2473
  createComment: h,
2475
2474
  pushComment: m,
@@ -2490,7 +2489,7 @@ function Yo(e) {
2490
2489
  //#endregion
2491
2490
  //#region src/utils/imageClipboard.ts
2492
2491
  function Xo(e, t, n) {
2493
- let r = Yn(e.state), i = e.state.schema.marks.insertion;
2492
+ let r = Xn(e.state), i = e.state.schema.marks.insertion;
2494
2493
  if (!r || !i) return;
2495
2494
  let a = t.selection.from, o = a - n.nodeSize;
2496
2495
  o < 0 || t.addMark(o, a, i.create({
@@ -2622,7 +2621,7 @@ function os(e) {
2622
2621
  return e === "left" || e === "right" || e === "none" ? e : null;
2623
2622
  }
2624
2623
  function ss(e) {
2625
- let { t } = r(), n = R({
2624
+ let { t } = r(), n = z({
2626
2625
  isOpen: !1,
2627
2626
  position: {
2628
2627
  x: 0,
@@ -2633,11 +2632,11 @@ function ss(e) {
2633
2632
  onImage: !1,
2634
2633
  canMergeCells: !1,
2635
2634
  canSplitCell: !1,
2636
- listNumbering: G
2637
- }), i = R(null), a = R({
2635
+ listNumbering: K
2636
+ }), i = z(null), a = z({
2638
2637
  from: 0,
2639
2638
  to: 0
2640
- }), o = D(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), s = D(() => [
2639
+ }), o = O(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), s = O(() => [
2641
2640
  {
2642
2641
  action: "cut",
2643
2642
  label: t("contextMenu.cut"),
@@ -2664,7 +2663,7 @@ function ss(e) {
2664
2663
  t(e.state, (t) => e.dispatch(t), e);
2665
2664
  }
2666
2665
  function l(t, n, r, i, a) {
2667
- let o = i === "inline" ? sn(t, e.zoom.value) : void 0;
2666
+ let o = i === "inline" ? cn(t, e.zoom.value) : void 0;
2668
2667
  return {
2669
2668
  open: !0,
2670
2669
  position: r,
@@ -2677,12 +2676,12 @@ function ss(e) {
2677
2676
  function u(t) {
2678
2677
  let r = e.editorView.value;
2679
2678
  if (!r) return;
2680
- let o = ln(t.target);
2679
+ let o = un(t.target);
2681
2680
  if (o) {
2682
2681
  let a = Number(o.dataset.pmStart);
2683
2682
  if (!Number.isNaN(a)) {
2684
2683
  try {
2685
- let e = Y.create(r.state.doc, a);
2684
+ let e = an.create(r.state.doc, a);
2686
2685
  r.dispatch(r.state.tr.setSelection(e));
2687
2686
  } catch {}
2688
2687
  e.selectedImage.value = {
@@ -2707,7 +2706,7 @@ function ss(e) {
2707
2706
  e.setPmSelection(a);
2708
2707
  } catch {}
2709
2708
  }
2710
- let s = ut(r.state), { empty: c, from: u, to: d } = r.state.selection;
2709
+ let s = lt(r.state), { empty: c, from: u, to: d } = r.state.selection;
2711
2710
  a.value = {
2712
2711
  from: u,
2713
2712
  to: d
@@ -2722,7 +2721,7 @@ function ss(e) {
2722
2721
  onImage: !!o,
2723
2722
  canMergeCells: !!s.hasMultiCellSelection,
2724
2723
  canSplitCell: !!s.canSplitCell,
2725
- listNumbering: ot(r.state)
2724
+ listNumbering: at(r.state)
2726
2725
  };
2727
2726
  }
2728
2727
  function d(t) {
@@ -2836,12 +2835,12 @@ function cs(e) {
2836
2835
  function n(t) {
2837
2836
  e.sidebarAutoOpenedRef.value = !1, e.loadDocument(t);
2838
2837
  }
2839
- U(e.documentBuffer, (e) => {
2838
+ W(e.documentBuffer, (e) => {
2840
2839
  e && t(e);
2841
- }), U(e.document, (e) => {
2840
+ }), W(e.document, (e) => {
2842
2841
  e && n(e);
2843
- }), Ne(async () => {
2844
- await Me();
2842
+ }), Me(async () => {
2843
+ await je();
2845
2844
  let r = e.documentBuffer(), i = e.document();
2846
2845
  r ? await t(r) : i && n(i);
2847
2846
  });
@@ -2861,7 +2860,7 @@ var ls = Date.now(), us = ({ createComment: e, publishComments: t, apply: n }) =
2861
2860
  return e.clearCommentsDirty(), e.onSave?.(r), r;
2862
2861
  };
2863
2862
  function fs(e) {
2864
- let t = [], n = new lr();
2863
+ let t = [], n = new ur();
2865
2864
  function r() {
2866
2865
  e.onPrint?.(), window.print();
2867
2866
  }
@@ -2875,8 +2874,8 @@ function fs(e) {
2875
2874
  function a(t, n) {
2876
2875
  let r = e.pagesRef.value;
2877
2876
  if (!r) return !1;
2878
- let i = wr(r, t), a = i.at(0);
2879
- return a ? (wt(a), n?.highlight && Tr(i, n.highlight), !0) : !1;
2877
+ let i = Tr(r, t), a = i.at(0);
2878
+ return a ? (wt(a), n?.highlight && Er(i, n.highlight), !0) : !1;
2880
2879
  }
2881
2880
  function o() {
2882
2881
  return e.zoom.value;
@@ -2884,7 +2883,7 @@ function fs(e) {
2884
2883
  let s = null;
2885
2884
  function c() {
2886
2885
  let t = e.getActiveView();
2887
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
2886
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
2888
2887
  let n = e.getActiveCanonicalStory?.() ?? "main";
2889
2888
  return t && n !== "main" ? e.editor.applyCanonicalStoryHistory({
2890
2889
  view: t,
@@ -2892,11 +2891,11 @@ function fs(e) {
2892
2891
  direction: "undo"
2893
2892
  }) : e.editor.undo();
2894
2893
  }
2895
- return t === e.editorView.value ? e.editor.undo() : t ? An(t.state, t.dispatch) : !1;
2894
+ return t === e.editorView.value ? e.editor.undo() : t ? jn(t.state, t.dispatch) : !1;
2896
2895
  }
2897
2896
  function l() {
2898
2897
  let t = e.getActiveView();
2899
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
2898
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
2900
2899
  let n = e.getActiveCanonicalStory?.() ?? "main";
2901
2900
  return t && n !== "main" ? e.editor.applyCanonicalStoryHistory({
2902
2901
  view: t,
@@ -2904,17 +2903,17 @@ function fs(e) {
2904
2903
  direction: "redo"
2905
2904
  }) : e.editor.redo();
2906
2905
  }
2907
- return t === e.editorView.value ? e.editor.redo() : t ? kn(t.state, t.dispatch) : !1;
2906
+ return t === e.editorView.value ? e.editor.redo() : t ? An(t.state, t.dispatch) : !1;
2908
2907
  }
2909
2908
  function u() {
2910
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) return e.editor.canUndo();
2909
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) return e.editor.canUndo();
2911
2910
  let t = e.getActiveView();
2912
- return t === e.editorView.value ? e.editor.canUndo() : t ? An(t.state) : !1;
2911
+ return t === e.editorView.value ? e.editor.canUndo() : t ? jn(t.state) : !1;
2913
2912
  }
2914
2913
  function d() {
2915
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) return e.editor.canRedo();
2914
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) return e.editor.canRedo();
2916
2915
  let t = e.getActiveView();
2917
- return t === e.editorView.value ? e.editor.canRedo() : t ? kn(t.state) : !1;
2916
+ return t === e.editorView.value ? e.editor.canRedo() : t ? An(t.state) : !1;
2918
2917
  }
2919
2918
  function f() {
2920
2919
  let t = e.getActiveView();
@@ -2922,9 +2921,9 @@ function fs(e) {
2922
2921
  }
2923
2922
  function p(t) {
2924
2923
  let n = e.editorView.value, r = e.pagesRef.value, i = e.scrollRootRef.value;
2925
- return !n || !r || !i ? /* @__PURE__ */ new Map() : Dr({
2924
+ return !n || !r || !i ? /* @__PURE__ */ new Map() : Or({
2926
2925
  blockIds: t,
2927
- snapshot: mr(n.state.doc),
2926
+ snapshot: hr(n.state.doc),
2928
2927
  pagesContainer: r,
2929
2928
  scrollRoot: i
2930
2929
  });
@@ -2934,7 +2933,7 @@ function fs(e) {
2934
2933
  }
2935
2934
  function h(t) {
2936
2935
  let n = e.pagesRef.value;
2937
- return n ? Er(n, t) : () => {};
2936
+ return n ? Dr(n, t) : () => {};
2938
2937
  }
2939
2938
  function g() {
2940
2939
  return s ??= {
@@ -2964,7 +2963,7 @@ function fs(e) {
2964
2963
  getPageNumberForPmPos: (t) => {
2965
2964
  let n = e.layout.value;
2966
2965
  if (!n) return null;
2967
- let r = Xn(n, t);
2966
+ let r = Zn(n, t);
2968
2967
  return r == null ? null : r + 1;
2969
2968
  },
2970
2969
  getBlockRect: m,
@@ -2979,11 +2978,11 @@ function fs(e) {
2979
2978
  function v() {
2980
2979
  let t = e.layout.value, n = e.editorView.value;
2981
2980
  if (!t || !n) return 0;
2982
- let r = Xn(t, n.state.selection.from);
2981
+ let r = Zn(t, n.state.selection.from);
2983
2982
  return r == null ? 0 : r + 1;
2984
2983
  }
2985
2984
  function ee(t) {
2986
- let n = Cr(e.layout.value, t);
2985
+ let n = wr(e.layout.value, t);
2987
2986
  if (!n) return;
2988
2987
  if (n.type === "position") {
2989
2988
  e.scrollVisiblePositionIntoView(n.pmPos);
@@ -3005,22 +3004,22 @@ function fs(e) {
3005
3004
  undefinedReferences: t,
3006
3005
  snapshot: r,
3007
3006
  batch: {
3008
- version: cr,
3007
+ version: $,
3009
3008
  operations: i,
3010
3009
  mode: a
3011
3010
  },
3012
3011
  author: o
3013
3012
  });
3014
3013
  if (c) return c;
3015
- let l = new Set(Z(s.state).map((e) => e.suggestionId)), { applied: u, skipped: d } = us({
3014
+ let l = new Set(Jn(s.state).map((e) => e.suggestionId)), { applied: u, skipped: d } = us({
3016
3015
  createComment: (t) => e.createAIEditComment(t, o),
3017
3016
  publishComments: e.publishAIEditComments,
3018
- apply: (e) => dr({
3017
+ apply: (e) => fr({
3019
3018
  undefinedReferences: t,
3020
3019
  view: s,
3021
3020
  snapshot: r,
3022
3021
  batch: {
3023
- version: cr,
3022
+ version: $,
3024
3023
  operations: i,
3025
3024
  mode: a
3026
3025
  },
@@ -3064,10 +3063,10 @@ function fs(e) {
3064
3063
  ensureEditorView: () => e.editor.ensureView(),
3065
3064
  createAIEditSnapshot: () => {
3066
3065
  let t = e.editorView.value;
3067
- return t ? hr(t.state.doc, Ze(t.state)) : null;
3066
+ return t ? gr(t.state.doc, Xe(t.state)) : null;
3068
3067
  },
3069
3068
  applyDocumentOperations: ({ undefinedReferences: r, snapshot: i, batch: a, author: o = e.author() }) => {
3070
- fr(a.version);
3069
+ pr(a.version);
3071
3070
  let s = e.editorView.value;
3072
3071
  if (!s) {
3073
3072
  let e = "committed";
@@ -3077,11 +3076,11 @@ function fs(e) {
3077
3076
  reason: "unsupportedBlock"
3078
3077
  }));
3079
3078
  return {
3080
- version: cr,
3079
+ version: $,
3081
3080
  status: e,
3082
3081
  applied: [],
3083
3082
  skipped: t,
3084
- issues: yr(a.operations, t),
3083
+ issues: br(a.operations, t),
3085
3084
  receipts: [],
3086
3085
  undoHandle: null
3087
3086
  };
@@ -3098,12 +3097,12 @@ function fs(e) {
3098
3097
  let u = e.getComments(), d = {
3099
3098
  state: s.state,
3100
3099
  dispatch: (e) => {
3101
- s.dispatch(On(e)), d.state = s.state;
3100
+ s.dispatch(kn(e)), d.state = s.state;
3102
3101
  }
3103
- }, f = new Set(Z(s.state).map((e) => e.suggestionId)), p = us({
3102
+ }, f = new Set(Jn(s.state).map((e) => e.suggestionId)), p = us({
3104
3103
  createComment: (t) => e.createAIEditComment(t, o),
3105
3104
  publishComments: e.publishAIEditComments,
3106
- apply: (e) => dr({
3105
+ apply: (e) => fr({
3107
3106
  undefinedReferences: r,
3108
3107
  view: d,
3109
3108
  snapshot: i,
@@ -3161,26 +3160,26 @@ function fs(e) {
3161
3160
  applyAIEditOperations: y,
3162
3161
  acceptAIEditOperation: (t) => {
3163
3162
  let n = e.editorView.value;
3164
- return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "accept") : Hn(t)(n.state, n.dispatch) : !1;
3163
+ return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "accept") : Un(t)(n.state, n.dispatch) : !1;
3165
3164
  },
3166
3165
  rejectAIEditOperation: (t) => {
3167
3166
  let n = e.editorView.value;
3168
- return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "reject") : qn(t)(n.state, n.dispatch) : !1;
3167
+ return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "reject") : Z(t)(n.state, n.dispatch) : !1;
3169
3168
  },
3170
3169
  undo: c,
3171
3170
  redo: l,
3172
3171
  scrollToAIEditOperation: (t) => {
3173
3172
  let n = e.editorView.value;
3174
3173
  if (!n) return !1;
3175
- let r = Gn(n.state, t);
3174
+ let r = Kn(n.state, t);
3176
3175
  if (!r) return !1;
3177
- let { from: i, to: a } = Fr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3176
+ let { from: i, to: a } = Ir(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3178
3177
  return n.dispatch(n.state.tr.setSelection(X.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
3179
3178
  },
3180
3179
  scrollToBlock: (t, n) => {
3181
3180
  let r = e.editorView.value;
3182
3181
  if (!r) return !1;
3183
- let i = Ir({
3182
+ let i = Lr({
3184
3183
  blockId: t,
3185
3184
  doc: r.state.doc,
3186
3185
  snapshot: n
@@ -3192,7 +3191,7 @@ function fs(e) {
3192
3191
  highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
3193
3192
  let i = e.editorView.value;
3194
3193
  if (!i) return "none";
3195
- let o = Rr({
3194
+ let o = zr({
3196
3195
  blockId: t,
3197
3196
  text: n,
3198
3197
  doc: i.state.doc,
@@ -3200,13 +3199,13 @@ function fs(e) {
3200
3199
  });
3201
3200
  if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
3202
3201
  e.setPassageHighlight(null);
3203
- let s = Ir({
3202
+ let s = Lr({
3204
3203
  blockId: t,
3205
3204
  doc: i.state.doc,
3206
3205
  snapshot: r
3207
3206
  });
3208
3207
  if (s === null) return "none";
3209
- let c = Vr(t);
3208
+ let c = Hr(t);
3210
3209
  if (c !== null && a(c, { highlight: {} })) return "block";
3211
3210
  let { from: l, to: u } = s, d = i.state.doc.resolve(l), f = i.state.doc.resolve(u);
3212
3211
  return i.dispatch(i.state.tr.setSelection(X.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
@@ -3217,11 +3216,11 @@ function fs(e) {
3217
3216
  showInDocument: (t, n) => {
3218
3217
  let r = e.editorView.value;
3219
3218
  if (!r) return !1;
3220
- let i = t.type === "textRange" ? Lr({
3219
+ let i = t.type === "textRange" ? Rr({
3221
3220
  range: t,
3222
3221
  doc: r.state.doc,
3223
3222
  snapshot: n
3224
- }) : Ir({
3223
+ }) : Lr({
3225
3224
  blockId: t.blockId,
3226
3225
  doc: r.state.doc,
3227
3226
  snapshot: n
@@ -3232,24 +3231,24 @@ function fs(e) {
3232
3231
  },
3233
3232
  getSuggestions: () => {
3234
3233
  let t = e.editorView.value;
3235
- return t ? Z(t.state) : [];
3234
+ return t ? Jn(t.state) : [];
3236
3235
  },
3237
3236
  exportPendingSuggestions: () => {
3238
- let t = e.editorView.value, r = new Set(t ? Z(t.state).map((e) => e.suggestionId) : []);
3237
+ let t = e.editorView.value, r = new Set(t ? Jn(t.state).map((e) => e.suggestionId) : []);
3239
3238
  return n.exportPendingSuggestions({
3240
3239
  activeSuggestionIds: r,
3241
- snapshotForStory: (e, n) => e.type === "main" && t ? gr(t.state, n) : null
3240
+ snapshotForStory: (e, n) => e.type === "main" && t ? _r(t.state, n) : null
3242
3241
  });
3243
3242
  },
3244
3243
  loadPendingSuggestions: (t) => n.loadPendingSuggestions({
3245
3244
  records: t,
3246
3245
  snapshotForStory: (t) => {
3247
3246
  let n = e.editorView.value;
3248
- return t.type === "main" && n ? mr(n.state.doc) : null;
3247
+ return t.type === "main" && n ? hr(n.state.doc) : null;
3249
3248
  },
3250
3249
  sourceSnapshotForStory: (t, n) => {
3251
3250
  let r = e.editorView.value;
3252
- return t.type === "main" && r ? gr(r.state, n) : null;
3251
+ return t.type === "main" && r ? _r(r.state, n) : null;
3253
3252
  },
3254
3253
  apply: (e, t) => y({
3255
3254
  undefinedReferences: "refuse",
@@ -3260,7 +3259,7 @@ function fs(e) {
3260
3259
  }),
3261
3260
  activeSuggestionIds: () => {
3262
3261
  let t = e.editorView.value;
3263
- return new Set(t ? Z(t.state).map((e) => e.suggestionId) : []);
3262
+ return new Set(t ? Jn(t.state).map((e) => e.suggestionId) : []);
3264
3263
  }
3265
3264
  }),
3266
3265
  acceptSuggestion: (t, n) => {
@@ -3269,7 +3268,7 @@ function fs(e) {
3269
3268
  accepted: !1,
3270
3269
  appliedAs: null
3271
3270
  };
3272
- let i = Z(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Wn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
3271
+ let i = Jn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Gn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
3273
3272
  return {
3274
3273
  accepted: a,
3275
3274
  appliedAs: a ? i : null
@@ -3277,46 +3276,46 @@ function fs(e) {
3277
3276
  },
3278
3277
  rejectSuggestion: (t) => {
3279
3278
  let n = e.editorView.value;
3280
- return n ? Jn(t)(n.state, n.dispatch) : !1;
3279
+ return n ? Q(t)(n.state, n.dispatch) : !1;
3281
3280
  },
3282
3281
  scrollToSuggestion: (t) => {
3283
3282
  let n = e.editorView.value;
3284
3283
  if (!n) return !1;
3285
- let r = Kn(n.state, t);
3284
+ let r = qn(n.state, t);
3286
3285
  if (!r) return !1;
3287
- let { from: i, to: a } = Fr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3286
+ let { from: i, to: a } = Ir(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3288
3287
  return n.dispatch(n.state.tr.setSelection(X.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
3289
3288
  },
3290
3289
  getTrackedChanges: () => {
3291
3290
  let t = e.editorView.value;
3292
- return t ? br(t.state.doc) : [];
3291
+ return t ? xr(t.state.doc) : [];
3293
3292
  },
3294
3293
  getCommentAnchors: () => {
3295
3294
  let t = e.editorView.value;
3296
- return t ? vr(t.state.doc) : [];
3295
+ return t ? yr(t.state.doc) : [];
3297
3296
  },
3298
3297
  getSelectionText: () => {
3299
3298
  let t = e.editorView.value;
3300
- return t ? Qe(t.state) : "";
3299
+ return t ? Ze(t.state) : "";
3301
3300
  },
3302
3301
  getPageText: (t) => {
3303
3302
  let n = e.editorView.value;
3304
- return n ? Wr(e.layout.value, n.state.doc, t) : null;
3303
+ return n ? Gr(e.layout.value, n.state.doc, t) : null;
3305
3304
  },
3306
3305
  getTargetPage: (t, n) => {
3307
3306
  let r = e.editorView.value, i = e.layout.value;
3308
3307
  if (!r || !i) return null;
3309
- let a = t.type === "textRange" ? Lr({
3308
+ let a = t.type === "textRange" ? Rr({
3310
3309
  range: t,
3311
3310
  doc: r.state.doc,
3312
3311
  snapshot: n
3313
- }) : Ir({
3312
+ }) : Lr({
3314
3313
  blockId: t.blockId,
3315
3314
  doc: r.state.doc,
3316
3315
  snapshot: n
3317
3316
  });
3318
3317
  if (a === null) return null;
3319
- let o = Xn(i, a.from);
3318
+ let o = Zn(i, a.from);
3320
3319
  return o == null ? null : o + 1;
3321
3320
  },
3322
3321
  getBlockRect: m,
@@ -3325,8 +3324,8 @@ function fs(e) {
3325
3324
  onLayoutChange: h,
3326
3325
  getContentControls: (t = {}) => {
3327
3326
  let n = e.editorView.value;
3328
- return n ? Ar(n.state.doc, t).map((e) => ({
3329
- properties: Or(e.node),
3327
+ return n ? jr(n.state.doc, t).map((e) => ({
3328
+ properties: kr(e.node),
3330
3329
  path: e.path,
3331
3330
  pmPos: e.pos
3332
3331
  })) : [];
@@ -3334,7 +3333,7 @@ function fs(e) {
3334
3333
  scrollToContentControl: (t) => {
3335
3334
  let n = e.editorView.value;
3336
3335
  if (!n) return !1;
3337
- let r = kr(n.state.doc, t);
3336
+ let r = Ar(n.state.doc, t);
3338
3337
  if (!r) return !1;
3339
3338
  let i = r.pos + 1, a = n.state.doc.resolve(i);
3340
3339
  return n.dispatch(n.state.tr.setSelection(X.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
@@ -3342,19 +3341,19 @@ function fs(e) {
3342
3341
  setContentControlContent: (t, n, r = {}) => {
3343
3342
  let i = e.editorView.value;
3344
3343
  if (!i) return !1;
3345
- let a = typeof n == "string" ? Mr(i.state, t, n, r) : Pr(i.state, t, n, r);
3344
+ let a = typeof n == "string" ? Nr(i.state, t, n, r) : Fr(i.state, t, n, r);
3346
3345
  return a ? (i.dispatch(a), !0) : !1;
3347
3346
  },
3348
3347
  setContentControlValue: (t, n, r = {}) => {
3349
3348
  let i = e.editorView.value;
3350
3349
  if (!i) return !1;
3351
- let a = Nr(i.state, t, n, r);
3350
+ let a = Pr(i.state, t, n, r);
3352
3351
  return a ? (i.dispatch(a), !0) : !1;
3353
3352
  },
3354
3353
  removeContentControl: (t, n = {}) => {
3355
3354
  let r = e.editorView.value;
3356
3355
  if (!r) return !1;
3357
- let i = jr(r.state, t, n);
3356
+ let i = Mr(r.state, t, n);
3358
3357
  return i ? (r.dispatch(i), !0) : !1;
3359
3358
  }
3360
3359
  } };
@@ -3365,31 +3364,31 @@ function ps(e) {
3365
3364
  let t = () => e.activeView?.value ?? e.editorView.value;
3366
3365
  function n() {
3367
3366
  let e = t();
3368
- e && (Mn(e, jn), e.focus());
3367
+ e && (Nn(e, Mn), e.focus());
3369
3368
  }
3370
3369
  function r(n) {
3371
3370
  let r = t();
3372
3371
  if (!r) return;
3373
3372
  let i = e.getDocument(), a = i?.package?.styles;
3374
3373
  if (a) {
3375
- let e = Je(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Xr(i.package.numbering) : null };
3374
+ let e = qe(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Zr(i.package.numbering) : null };
3376
3375
  t.paragraphFormatting && (o.paragraphFormatting = t.paragraphFormatting), t.runFormatting && (o.runFormatting = t.runFormatting);
3377
3376
  let s = e.getStyle(n)?.name;
3378
- s && (o.styleName = s), Mn(r, Gr(n, o));
3379
- } else Mn(r, Gr(n));
3377
+ s && (o.styleName = s), Nn(r, Kr(n, o));
3378
+ } else Nn(r, Kr(n));
3380
3379
  r.focus();
3381
3380
  }
3382
3381
  function i() {
3383
3382
  let t = e.editorView.value;
3384
- t && (Mn(t, Zr), t.focus());
3383
+ t && (Nn(t, Qr), t.focus());
3385
3384
  }
3386
3385
  function a() {
3387
3386
  let t = e.editorView.value;
3388
- t && (Mn(t, $r), t.focus());
3387
+ t && (Nn(t, ei), t.focus());
3389
3388
  }
3390
3389
  function o() {
3391
3390
  let t = e.editorView.value;
3392
- t && (Mn(t, Qr), t.focus());
3391
+ t && (Nn(t, $r), t.focus());
3393
3392
  }
3394
3393
  function s(e) {
3395
3394
  let n = t();
@@ -3483,7 +3482,7 @@ var Cs = {
3483
3482
  remove: gs
3484
3483
  };
3485
3484
  function ws(e, t = Cs) {
3486
- U(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3485
+ W(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3487
3486
  if (!n) return;
3488
3487
  let a = !1, o = [];
3489
3488
  t.loadEmbedded(n).then(({ faces: n, familyMap: r }) => {
@@ -3491,11 +3490,11 @@ function ws(e, t = Cs) {
3491
3490
  t.remove(n);
3492
3491
  return;
3493
3492
  }
3494
- o = n, !(n.length === 0 && r.size === 0) && (ei(r.size > 0 ? r : null), e.remeasure());
3493
+ o = n, !(n.length === 0 && r.size === 0) && (e.setEmbeddedFontFamilies(new Map(r)), e.remeasure());
3495
3494
  }), i(() => {
3496
- a = !0, t.remove(o), ei(null);
3495
+ a = !0, t.remove(o), e.setEmbeddedFontFamilies(null);
3497
3496
  });
3498
- }, { immediate: !0 }), U(e.fonts, (n, r, i) => {
3497
+ }, { immediate: !0 }), W(e.fonts, (n, r, i) => {
3499
3498
  if (!n || n.length === 0) return;
3500
3499
  let a = !1, o = [];
3501
3500
  t.loadHost(n).then((n) => {
@@ -3512,7 +3511,7 @@ function ws(e, t = Cs) {
3512
3511
  //#endregion
3513
3512
  //#region src/composables/useHyperlinkManagement.ts
3514
3513
  function Ts(e) {
3515
- let t = R(null);
3514
+ let t = z(null);
3516
3515
  function n(e, t) {
3517
3516
  t(e.state, (t) => e.dispatch(t), e);
3518
3517
  }
@@ -3538,10 +3537,10 @@ function Ts(e) {
3538
3537
  r && n(t, r()), t.focus();
3539
3538
  }
3540
3539
  function a(e) {
3541
- let n = Pn(e);
3540
+ let n = Fn(e);
3542
3541
  if (!n) return;
3543
- let r = Nn(void 0);
3544
- window.open(n, r.target, Fn(r)), t.value = null;
3542
+ let r = Pn(void 0);
3543
+ window.open(n, r.target, In(r)), t.value = null;
3545
3544
  }
3546
3545
  function o(n, r) {
3547
3546
  let i = e.editorView.value;
@@ -3566,7 +3565,7 @@ function Ts(e) {
3566
3565
  //#endregion
3567
3566
  //#region src/composables/useImageActions.ts
3568
3567
  function Es(e) {
3569
- let t = Le(null), n = R(!1), r = D(() => {
3568
+ let t = Ie(null), n = z(!1), r = O(() => {
3570
3569
  e.stateTick.value;
3571
3570
  let n = e.editorView.value, r = t.value;
3572
3571
  if (!n || !r) return null;
@@ -3585,9 +3584,9 @@ function Es(e) {
3585
3584
  function a(n) {
3586
3585
  let r = e.editorView.value, a = t.value;
3587
3586
  if (!r || !a) return;
3588
- let o = dn(n);
3587
+ let o = fn(n);
3589
3588
  if (!o) return;
3590
- let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: sn(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3589
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: cn(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3591
3590
  c && (i(r, c(a.pmPos, o, s)), r.focus());
3592
3591
  }
3593
3592
  function o(n) {
@@ -3629,14 +3628,14 @@ function Ds(e) {
3629
3628
  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));
3630
3629
  }
3631
3630
  }
3632
- return Ne(() => window.addEventListener("keydown", t)), I(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
3631
+ return Me(() => window.addEventListener("keydown", t)), L(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
3633
3632
  }
3634
3633
  //#endregion
3635
3634
  //#region src/composables/useOutlineSidebar.ts
3636
3635
  function Os(e) {
3637
3636
  function t() {
3638
3637
  let t = e.editorView.value;
3639
- t && (e.outlineHeadings.value = ai(t.state.doc, Xe(t.state)));
3638
+ t && (e.outlineHeadings.value = ai(t.state.doc, Ye(t.state)));
3640
3639
  }
3641
3640
  function n() {
3642
3641
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3697,19 +3696,19 @@ function ks(e) {
3697
3696
  }
3698
3697
  function s(t) {
3699
3698
  let n = e.editorView.value;
3700
- n && Jr(t)(n.state, n.dispatch);
3699
+ n && Yr(t)(n.state, n.dispatch);
3701
3700
  }
3702
3701
  function c(t) {
3703
3702
  let n = e.editorView.value;
3704
- n && Yr(t)(n.state, n.dispatch);
3703
+ n && Xr(t)(n.state, n.dispatch);
3705
3704
  }
3706
3705
  function l(t) {
3707
3706
  let n = e.editorView.value;
3708
- n && (t < 0 ? qr(-t, !0)(n.state, n.dispatch) : qr(t, !1)(n.state, n.dispatch));
3707
+ n && (t < 0 ? Jr(-t, !0)(n.state, n.dispatch) : Jr(t, !1)(n.state, n.dispatch));
3709
3708
  }
3710
3709
  function u(t) {
3711
3710
  let n = e.editorView.value;
3712
- n && Kr(t)(n.state, n.dispatch);
3711
+ n && qr(t)(n.state, n.dispatch);
3713
3712
  }
3714
3713
  return {
3715
3714
  handlePageSetupApply: t,
@@ -3765,7 +3764,7 @@ function Is(e, t) {
3765
3764
  }
3766
3765
  function Ls(e, t, n, r) {
3767
3766
  if (!e || !t) return null;
3768
- let i = mn(e, n, r, 1);
3767
+ let i = hn(e, n, r, 1);
3769
3768
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3770
3769
  }
3771
3770
  function Rs(e, t, n, r) {
@@ -3805,28 +3804,28 @@ var Bs = ({ clientX: e, clientY: t, viewport: n }) => ({
3805
3804
  e.value = null;
3806
3805
  return;
3807
3806
  }
3808
- let d = $({
3807
+ let d = lr({
3809
3808
  document: c,
3810
3809
  position: s.position,
3811
3810
  isFirstPage: s.isFirstPage,
3812
3811
  activeRId: s.rId,
3813
- blocks: Zn(l.state.doc, u.content)
3812
+ blocks: Qn(l.state.doc, u.content)
3814
3813
  });
3815
3814
  e.value = null, d && (a(d), o(), i(), r(d));
3816
3815
  };
3817
3816
  function Us(e) {
3818
- let t = R(null), n = null;
3817
+ let t = z(null), n = null;
3819
3818
  function r() {
3820
3819
  n !== null && (clearTimeout(n), n = null);
3821
3820
  }
3822
- let i = Le(null), a = 0, o = null, s = 0, c = !1, l = null, u = ui(), d = oe({
3821
+ let i = Ie(null), a = 0, o = null, s = 0, c = !1, l = null, u = ui(), d = oe({
3823
3822
  pagesContainer: e.pagesRef,
3824
3823
  onScrollExtendSelection: (e, t) => {
3825
3824
  if (!c || l === null) return;
3826
3825
  let n = m(e, t);
3827
3826
  n !== null && n !== l && _(l, n);
3828
3827
  }
3829
- }), f = R({
3828
+ }), f = z({
3830
3829
  currentPage: 1,
3831
3830
  totalPages: 1,
3832
3831
  visible: !1
@@ -3972,10 +3971,10 @@ function Us(e) {
3972
3971
  if (!s || !e.showHeaderFooterEditing.value) return;
3973
3972
  let c = a ? "header" : "footer", l = e.getDocument();
3974
3973
  if (!l?.package) return;
3975
- let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = sr(l.package), p = f.hasTitlePg && d === 1, m = ar(f, c, p);
3974
+ let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = cr(l.package), p = f.hasTitlePg && d === 1, m = or(f, c, p);
3976
3975
  if (!m) {
3977
3976
  let t;
3978
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
3977
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
3979
3978
  let n = e.layout.value?.pages.at(d - 1)?.sectionIndex, r = mi({
3980
3979
  document: l,
3981
3980
  position: c,
@@ -3984,9 +3983,9 @@ function Us(e) {
3984
3983
  });
3985
3984
  if (!e.applyCanonicalOperations?.([r])) return;
3986
3985
  t = e.getDocument(), m = r.story.rId;
3987
- } else t = ir(l, c, p), t && e.setDocument(t);
3986
+ } else t = ar(l, c, p), t && e.setDocument(t);
3988
3987
  if (!t) return;
3989
- e.syncHfPMs(), e.reLayout(), Ke(e.getExperimentalSession?.(), We.authorityRouting) || e.onDocumentChange(t), f = sr(t.package), m ??= ar(f, c, p);
3988
+ e.syncHfPMs(), e.reLayout(), Ge(e.getExperimentalSession?.(), Ue.authorityRouting) || e.onDocumentChange(t), f = cr(t.package), m ??= or(f, c, p);
3990
3989
  }
3991
3990
  if (!m) return;
3992
3991
  let h = m, g = e.pagesViewportRef.value;
@@ -4018,7 +4017,7 @@ function Us(e) {
4018
4017
  });
4019
4018
  }
4020
4019
  function ie() {
4021
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
4020
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
4022
4021
  i.value = null, e.syncHfPMs();
4023
4022
  return;
4024
4023
  }
@@ -4038,7 +4037,7 @@ function Us(e) {
4038
4037
  i.value = null;
4039
4038
  return;
4040
4039
  }
4041
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
4040
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
4042
4041
  let r = hi({
4043
4042
  document: t,
4044
4043
  position: n.position,
@@ -4048,7 +4047,7 @@ function Us(e) {
4048
4047
  i.value = null, e.syncHfPMs(), e.reLayout();
4049
4048
  return;
4050
4049
  }
4051
- let r = or({
4050
+ let r = sr({
4052
4051
  document: t,
4053
4052
  position: n.position,
4054
4053
  activeRId: n.rId
@@ -4087,13 +4086,13 @@ function Us(e) {
4087
4086
  }
4088
4087
  let f = h() ?? n;
4089
4088
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
4090
- let p = ln(r);
4089
+ let p = un(r);
4091
4090
  if (p) {
4092
4091
  t.preventDefault(), t.stopPropagation();
4093
4092
  let n = Number(p.dataset.pmStart);
4094
4093
  if (!Number.isNaN(n)) {
4095
4094
  try {
4096
- f.dispatch(f.state.tr.setSelection(Y.create(f.state.doc, n)));
4095
+ f.dispatch(f.state.tr.setSelection(an.create(f.state.doc, n)));
4097
4096
  } catch {}
4098
4097
  e.selectedImage.value = {
4099
4098
  element: p,
@@ -4133,10 +4132,10 @@ function Us(e) {
4133
4132
  }
4134
4133
  d.updateMousePosition(e.clientX, e.clientY);
4135
4134
  }
4136
- function le() {
4135
+ function S() {
4137
4136
  c = !1, u.end(), d.stopAutoScroll();
4138
4137
  }
4139
- function ue() {
4138
+ function le() {
4140
4139
  let t = e.scrollRootRef.value, n = e.layout.value;
4141
4140
  if (!t || !n || n.pages.length === 0) return;
4142
4141
  let r = t.scrollTop, i = n.pages.length, a = r + t.clientHeight / 2, o = 24, s = 1;
@@ -4161,10 +4160,10 @@ function Us(e) {
4161
4160
  };
4162
4161
  }, 600);
4163
4162
  }
4164
- return Ne(() => {
4165
- window.addEventListener("mousemove", ce), window.addEventListener("mouseup", le), e.scrollRootRef.value?.addEventListener("scroll", ue, { passive: !0 });
4166
- }), I(() => {
4167
- r(), window.removeEventListener("mousemove", ce), window.removeEventListener("mouseup", le), e.scrollRootRef.value?.removeEventListener("scroll", ue), p && clearTimeout(p);
4163
+ return Me(() => {
4164
+ window.addEventListener("mousemove", ce), window.addEventListener("mouseup", S), e.scrollRootRef.value?.addEventListener("scroll", le, { passive: !0 });
4165
+ }), L(() => {
4166
+ r(), window.removeEventListener("mousemove", ce), window.removeEventListener("mouseup", S), e.scrollRootRef.value?.removeEventListener("scroll", le), p && clearTimeout(p);
4168
4167
  }), {
4169
4168
  tableInsertButton: t,
4170
4169
  hfEdit: i,
@@ -4202,11 +4201,11 @@ var Ws = (e) => {
4202
4201
  });
4203
4202
  });
4204
4203
  }, a = e.syncCoordinator.onRender(i);
4205
- U([
4204
+ W([
4206
4205
  e.pagesRef,
4207
4206
  e.remoteSelections,
4208
4207
  e.zoom
4209
- ], i, { flush: "post" }), Pe(() => {
4208
+ ], i, { flush: "post" }), Ne(() => {
4210
4209
  a(), r();
4211
4210
  });
4212
4211
  }, Gs = (e) => {
@@ -4225,8 +4224,8 @@ var Ws = (e) => {
4225
4224
  markupView: e.markupView.value,
4226
4225
  zoom: e.zoom.value,
4227
4226
  zIndex: ae.selectionOverlay
4228
- }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? hn(r, yi(vi(i.state, e.markupView.value), o.head), s) : null;
4229
- if (Sn({
4227
+ }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? gn(r, yi(vi(i.state, e.markupView.value), o.head), s) : null;
4228
+ if (Cn({
4230
4229
  hiddenHost: e.hiddenContainer.value,
4231
4230
  editorView: i,
4232
4231
  visibleCaret: c ? {
@@ -4246,18 +4245,18 @@ var Ws = (e) => {
4246
4245
  e.imageInteracting?.value || (e.selectedImage.value = null);
4247
4246
  });
4248
4247
  }, a = e.syncCoordinator.onRender(i);
4249
- U([
4248
+ W([
4250
4249
  e.zoom,
4251
4250
  e.editorView,
4252
4251
  e.pagesRef
4253
- ], i, { flush: "post" }), U(e.hiddenContainer, (e, t, n) => {
4252
+ ], i, { flush: "post" }), W(e.hiddenContainer, (e, t, n) => {
4254
4253
  e && (e.addEventListener("focusin", i), e.addEventListener("compositionend", i), n(() => {
4255
4254
  e.removeEventListener("focusin", i), e.removeEventListener("compositionend", i);
4256
4255
  }));
4257
4256
  }, { immediate: !0 });
4258
4257
  let o = typeof window > "u" ? null : window;
4259
- return o?.addEventListener("scroll", i, !0), Pe(() => {
4260
- a(), r(), o?.removeEventListener("scroll", i, !0), xn(e.hiddenContainer.value);
4258
+ return o?.addEventListener("scroll", i, !0), Ne(() => {
4259
+ a(), r(), o?.removeEventListener("scroll", i, !0), Sn(e.hiddenContainer.value);
4261
4260
  }), {
4262
4261
  clearOverlay: r,
4263
4262
  updateSelectionOverlay: i
@@ -4294,7 +4293,7 @@ var Ws = (e) => {
4294
4293
  "data-testid": "selection-overlay",
4295
4294
  class: "docx-editor-vue__decoration-origin",
4296
4295
  "aria-hidden": "true"
4297
- }, tc = ["aria-label"], nc = { class: "docx-editor-vue__note-editor-header" }, rc = ["aria-label"], ic = ["aria-label"], ac = /*#__PURE__*/ t(/* @__PURE__ */ N({
4296
+ }, tc = ["aria-label"], nc = { class: "docx-editor-vue__note-editor-header" }, rc = ["aria-label"], ic = ["aria-label"], ac = /*#__PURE__*/ t(/* @__PURE__ */ P({
4298
4297
  __name: "DocxEditor",
4299
4298
  props: {
4300
4299
  documentBuffer: { default: null },
@@ -4427,57 +4426,57 @@ var Ws = (e) => {
4427
4426
  setup(e, { expose: t, emit: n }) {
4428
4427
  let o = e, s = o.plugins ?? [], c = n;
4429
4428
  a(o.components);
4430
- let l = me();
4429
+ let l = pe();
4431
4430
  ra(l);
4432
- let u = D(() => Ke(o.experimentalSession, We.authorityRouting));
4431
+ let u = O(() => Ge(o.experimentalSession, Ue.authorityRouting));
4433
4432
  function d(e) {
4434
4433
  if (!u.value) {
4435
4434
  o.onChange?.(e), c("change", e), c("update:document", e);
4436
4435
  return;
4437
4436
  }
4438
- o.onChange?.(ht(e)), c("change", ht(e)), c("update:document", ht(e));
4437
+ o.onChange?.(mt(e)), c("change", mt(e)), c("update:document", mt(e));
4439
4438
  }
4440
4439
  let { message: f, show: p } = qi();
4441
4440
  function m(e) {
4442
- mt.is(e) && p(e.message), o.onError?.(e), c("error", e);
4441
+ pt.is(e) && p(e.message), o.onError?.(e), c("error", e);
4443
4442
  }
4444
4443
  function h(e, t) {
4445
- return Ke(o.experimentalSession, We.authorityRouting) ? (m(new mt({
4444
+ return Ge(o.experimentalSession, Ue.authorityRouting) ? (m(new pt({
4446
4445
  gap: e,
4447
- message: Ge(e, t)
4446
+ message: We(e, t)
4448
4447
  })), !0) : !1;
4449
4448
  }
4450
- let _ = R(o.mode), b = D(() => o.readOnly || _.value === "viewing"), te = D(() => o.showReviewControls), ne = D(() => fn(_.value)), x = R("all-markup");
4449
+ let _ = z(o.mode), b = O(() => o.readOnly || _.value === "viewing"), te = O(() => o.showReviewControls), ne = O(() => pn(_.value)), x = z("all-markup");
4451
4450
  function ae() {
4452
- Br(pn(_.value));
4451
+ Hr(mn(_.value));
4453
4452
  }
4454
4453
  function oe(e) {
4455
4454
  x.value = e;
4456
4455
  }
4457
- let se = D(() => x.value === "all-markup" ? "" : `folio-root--${x.value}`), { t: le } = r(), fe = ({ node: e }) => e;
4458
- fe.props = ["node"];
4459
- let he = D(() => o.documentBuffer != null || o.document != null), ge = R(!1);
4460
- U(he, (e) => {
4461
- e || (ge.value = !1);
4456
+ let se = O(() => x.value === "all-markup" ? "" : `folio-root--${x.value}`), { t: S } = r(), de = ({ node: e }) => e;
4457
+ de.props = ["node"];
4458
+ let me = O(() => o.documentBuffer != null || o.document != null), he = z(!1);
4459
+ W(me, (e) => {
4460
+ e || (he.value = !1);
4462
4461
  });
4463
- let _e = R(null), ve = R(null), ye = R(null), S = R(null), be = R(null), C = R(null), xe = R(null), Se = R(Infinity), Ce = R(null), we = D(() => o.showRuler ?? !1), w = R(0), E = R(!1), Te = R(!1), De = R(!1), N = R(!1), ke = R(!1), Ae = R(!1), Me = R(!1), Pe = R(!1), Fe = R(o.showOutline), z = R(jt), Re = D(() => o.outlineDepth ?? z.value), ze = (e) => {
4464
- o.outlineDepth === void 0 && (z.value = e), o.onOutlineDepthChange?.(e);
4465
- }, H = R(!1), G = R("none"), qe = R(null), Je = R(null), Xe = R(null), Ze = Le([]), Qe = Le([]), $e = D(() => Mt(Qe.value, Re.value)), { zoom: K, zoomPercent: nt, isMinZoom: it, isMaxZoom: ot, setZoom: st, zoomIn: ct, zoomOut: pt, handleWheel: _t, handleKeyDown: Ct, ZOOM_PRESETS: wt } = pe(o.initialZoom);
4462
+ let ge = z(null), _e = z(null), ve = z(null), C = z(null), ye = z(null), w = z(null), be = z(null), xe = z(Infinity), Se = z(null), Ce = O(() => o.showRuler ?? !1), T = z(0), D = z(!1), we = z(!1), Ee = z(!1), P = z(!1), Oe = z(!1), ke = z(!1), je = z(!1), Ne = z(!1), Pe = z(o.showOutline), B = z(jt), Le = O(() => o.outlineDepth ?? B.value), Re = (e) => {
4463
+ o.outlineDepth === void 0 && (B.value = e), o.onOutlineDepthChange?.(e);
4464
+ }, U = z(!1), K = z("none"), Ke = z(null), qe = z(null), Ye = z(null), Xe = Ie([]), Ze = Ie([]), Qe = O(() => Mt(Ze.value, Le.value)), { zoom: q, zoomPercent: tt, isMinZoom: rt, isMaxZoom: at, setZoom: ot, zoomIn: st, zoomOut: ft, handleWheel: _t, handleKeyDown: Ct, ZOOM_PRESETS: wt } = fe(o.initialZoom);
4466
4465
  function Et(e) {
4467
4466
  o.enableWheelZoom !== !1 && _t(e);
4468
4467
  }
4469
4468
  Ds({
4470
- showFindReplace: E,
4471
- showHyperlink: Te,
4469
+ showFindReplace: D,
4470
+ showHyperlink: we,
4472
4471
  handleZoomKeyDown: Ct,
4473
- scope: () => o.keyboardShortcuts ?? "document",
4474
- roots: [_e]
4472
+ scope: () => o.keyboardShortcuts ?? ht,
4473
+ roots: [ge]
4475
4474
  });
4476
- let { editor: Ot, editorView: q, editorState: Pt, remoteSelections: It, headerFooterSelection: Lt, activeNoteStory: Rt, isReady: zt, isDirty: Bt, parseError: Vt, layout: Ht, blocks: Ut, measures: Wt, syncCoordinator: Gt, loadBuffer: Kt, loadDocument: qt, save: Jt, getDocument: J, setDocument: Yt, getHeaderFooterView: Xt, syncHeaderFooterViews: Zt, openNoteStory: Qt, closeNoteStory: $t, getActiveNoteView: en, getCommands: tn, reLayout: nn } = ue({
4477
- hiddenContainer: ve,
4478
- hiddenHeaderFooterContainer: ye,
4479
- noteEditorContainer: Xe,
4480
- pagesContainer: S,
4475
+ let { editor: Ot, editorView: J, editorState: Pt, remoteSelections: It, headerFooterSelection: Lt, activeNoteStory: Rt, isReady: zt, isDirty: Bt, parseError: Vt, layout: Ht, blocks: Ut, measures: Wt, syncCoordinator: Gt, loadBuffer: Kt, loadDocument: qt, save: Jt, getDocument: Yt, setDocument: Xt, getHeaderFooterView: Zt, syncHeaderFooterViews: Qt, openNoteStory: $t, closeNoteStory: en, getActiveNoteView: tn, getCommands: nn, reLayout: rn, setEmbeddedFontFamilies: an } = le({
4476
+ hiddenContainer: _e,
4477
+ hiddenHeaderFooterContainer: ve,
4478
+ noteEditorContainer: Ye,
4479
+ pagesContainer: C,
4481
4480
  readOnly: b,
4482
4481
  experimentalSession: () => o.experimentalSession,
4483
4482
  editorMode: _,
@@ -4497,7 +4496,7 @@ var Ws = (e) => {
4497
4496
  onChange: d,
4498
4497
  onError: m,
4499
4498
  onSelectionUpdate: (e) => {
4500
- if (o.onSelectionChange?.(Ye(e)), o.onSelectionTextChange) {
4499
+ if (o.onSelectionChange?.(Je(e)), o.onSelectionTextChange) {
4501
4500
  let { from: t, to: n } = e.selection, r = t === n ? "" : e.doc.textBetween(t, n, " ", " ");
4502
4501
  o.onSelectionTextChange({
4503
4502
  from: t,
@@ -4514,129 +4513,130 @@ var Ws = (e) => {
4514
4513
  featureFlags: () => o.featureFlags,
4515
4514
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
4516
4515
  });
4517
- U(Pt, (e, t) => {
4518
- Ce.value !== null && e && t && !e.doc.eq(t.doc) && (Ce.value = null);
4516
+ W(Pt, (e, t) => {
4517
+ Se.value !== null && e && t && !e.doc.eq(t.doc) && (Se.value = null);
4519
4518
  });
4520
- let Y = D(() => vt({
4521
- bodyView: q.value,
4522
- headerFooterView: Je.value ? Xt(Je.value) : null,
4523
- noteView: en()
4524
- }).view), rn = D(() => {
4519
+ let Y = O(() => vt({
4520
+ bodyView: J.value,
4521
+ headerFooterView: qe.value ? Zt(qe.value) : null,
4522
+ noteView: tn()
4523
+ }).view), X = O(() => {
4525
4524
  let e = Rt.value;
4526
- return e ? le(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4527
- }), X = D(() => !zt.value && he.value && !(o.preserveDocumentWhileLoading === !0 && ge.value));
4528
- function an() {
4529
- q.value && (bt(), yt(), nn());
4525
+ return e ? S(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4526
+ }), on = O(() => !zt.value && me.value && !(o.preserveDocumentWhileLoading === !0 && he.value));
4527
+ function sn() {
4528
+ J.value && (bt(), yt(), rn());
4530
4529
  }
4531
4530
  ws({
4532
4531
  isReady: zt,
4533
- getDocument: J,
4532
+ getDocument: Yt,
4534
4533
  fonts: () => o.fonts,
4535
- remeasure: an
4534
+ remeasure: sn,
4535
+ setEmbeddedFontFamilies: an
4536
4536
  });
4537
- let { selectedImage: on, imageInteracting: sn, imageToolbarContext: cn, handleToolbarImageWrap: ln, handleImageTransform: un } = Es({
4537
+ let { selectedImage: cn, imageInteracting: ln, imageToolbarContext: un, handleToolbarImageWrap: dn, handleImageTransform: fn } = Es({
4538
4538
  editorView: Y,
4539
- zoom: K,
4540
- stateTick: w,
4541
- getCommands: tn
4542
- }), dn = Gs({
4543
- editorView: q,
4544
- hiddenContainer: ve,
4545
- pagesRef: S,
4546
- zoom: K,
4539
+ zoom: q,
4540
+ stateTick: T,
4541
+ getCommands: nn
4542
+ }), hn = Gs({
4543
+ editorView: J,
4544
+ hiddenContainer: _e,
4545
+ pagesRef: C,
4546
+ zoom: q,
4547
4547
  markupView: x,
4548
- selectedImage: on,
4548
+ selectedImage: cn,
4549
4549
  syncCoordinator: Gt,
4550
- imageInteracting: sn
4550
+ imageInteracting: ln
4551
4551
  });
4552
4552
  Ws({
4553
- pagesRef: S,
4553
+ pagesRef: C,
4554
4554
  remoteSelections: It,
4555
4555
  syncCoordinator: Gt,
4556
- zoom: K
4556
+ zoom: q
4557
4557
  });
4558
- let { hyperlinkPopupData: mn, handleHyperlinkSubmit: hn, handleHyperlinkRemove: gn, handleHyperlinkPopupNavigate: _n, handleHyperlinkPopupEdit: vn, handleHyperlinkPopupRemove: yn } = Ts({
4558
+ let { hyperlinkPopupData: gn, handleHyperlinkSubmit: _n, handleHyperlinkRemove: vn, handleHyperlinkPopupNavigate: yn, handleHyperlinkPopupEdit: bn, handleHyperlinkPopupRemove: xn } = Ts({
4559
4559
  editorView: Y,
4560
- getCommands: tn
4561
- }), bn = ce(), { tableInsertButton: xn, hfEdit: Sn, scrollPageInfo: Cn, resolvePos: wn, setPmSelection: Tn, scrollVisiblePositionIntoView: En, handlePagesMouseDown: Dn, handlePagesMouseMove: On, handlePagesClick: kn, handlePagesDoubleClick: An, handleTableInsertClick: jn, handleHfSave: Mn, handleHfRemove: Nn } = Us({
4562
- editorView: q,
4563
- pagesRef: S,
4564
- pagesViewportRef: be,
4565
- scrollRootRef: C,
4566
- selectedImage: on,
4567
- imageInteracting: sn,
4568
- hyperlinkPopupData: mn,
4560
+ getCommands: nn
4561
+ }), Sn = ce(), { tableInsertButton: Cn, hfEdit: wn, scrollPageInfo: Tn, resolvePos: En, setPmSelection: Dn, scrollVisiblePositionIntoView: On, handlePagesMouseDown: kn, handlePagesMouseMove: An, handlePagesClick: jn, handlePagesDoubleClick: Mn, handleTableInsertClick: Nn, handleHfSave: Pn, handleHfRemove: Fn } = Us({
4562
+ editorView: J,
4563
+ pagesRef: C,
4564
+ pagesViewportRef: ye,
4565
+ scrollRootRef: w,
4566
+ selectedImage: cn,
4567
+ imageInteracting: ln,
4568
+ hyperlinkPopupData: gn,
4569
4569
  readOnly: b,
4570
- showHeaderFooterEditing: D(() => o.showHeaderFooterEditing),
4570
+ showHeaderFooterEditing: O(() => o.showHeaderFooterEditing),
4571
4571
  getExperimentalSession: () => o.experimentalSession,
4572
4572
  applyCanonicalOperations: (e) => Ot.applyCanonicalOperations(e),
4573
- zoom: K,
4573
+ zoom: q,
4574
4574
  layout: Ht,
4575
4575
  tableResize: {
4576
- tryStartResize: bn.tryStartResize,
4577
- isResizing: D(() => bn.isResizing())
4576
+ tryStartResize: Sn.tryStartResize,
4577
+ isResizing: O(() => Sn.isResizing())
4578
4578
  },
4579
- getCommands: tn,
4580
- getDocument: J,
4581
- getHfPmView: Xt,
4582
- syncHfPMs: Zt,
4583
- setDocument: Yt,
4579
+ getCommands: nn,
4580
+ getDocument: Yt,
4581
+ getHfPmView: Zt,
4582
+ syncHfPMs: Qt,
4583
+ setDocument: Xt,
4584
4584
  openNoteStory: (e) => {
4585
- Qt(e), dn.clearOverlay();
4585
+ $t(e), hn.clearOverlay();
4586
4586
  },
4587
- closeNoteStory: $t,
4588
- getActiveNoteView: en,
4589
- reLayout: nn,
4587
+ closeNoteStory: en,
4588
+ getActiveNoteView: tn,
4589
+ reLayout: rn,
4590
4590
  onDocumentChange: d,
4591
- clearOverlay: dn.clearOverlay
4592
- }), Pn = () => Sn.value?.rId ? Xt(Sn.value.rId) : null, Fn = D(() => {
4593
- let e = Sn.value, t = Lt.value;
4591
+ clearOverlay: hn.clearOverlay
4592
+ }), In = () => wn.value?.rId ? Zt(wn.value.rId) : null, Ln = O(() => {
4593
+ let e = wn.value, t = Lt.value;
4594
4594
  return !e?.rId || !t || t.rId !== e.rId ? null : {
4595
4595
  ...t,
4596
4596
  pageNumber: e.pageNumber
4597
4597
  };
4598
4598
  });
4599
- U(Sn, (e) => {
4600
- Je.value = e?.rId ?? null, e && dn.clearOverlay();
4599
+ W(wn, (e) => {
4600
+ qe.value = e?.rId ?? null, e && hn.clearOverlay();
4601
4601
  }, { immediate: !0 });
4602
- let In = Os({
4603
- editorView: q,
4604
- showOutline: Fe,
4605
- showSidebar: H,
4606
- outlineHeadings: Qe,
4607
- activeSidebarItem: qe,
4602
+ let Rn = Os({
4603
+ editorView: J,
4604
+ showOutline: Pe,
4605
+ showSidebar: U,
4606
+ outlineHeadings: Ze,
4607
+ activeSidebarItem: Ke,
4608
4608
  extractCommentsAndChanges: () => {},
4609
- scrollToVisiblePosition: En
4610
- }), { contextMenu: Ln, imageContextMenu: Rn, imageContextMenuTextActions: zn, customTextMenuItems: Bn, handleContextMenu: Vn, handleSelectedImageContextMenu: Hn, handleImageWrapSelect: Un, handleContextMenuAction: Wn } = ss({
4609
+ scrollToVisiblePosition: On
4610
+ }), { contextMenu: zn, imageContextMenu: Bn, imageContextMenuTextActions: Vn, customTextMenuItems: Hn, handleContextMenu: Un, handleSelectedImageContextMenu: Wn, handleImageWrapSelect: Gn, handleContextMenuAction: Kn } = ss({
4611
4611
  editorView: Y,
4612
- selectedImage: on,
4613
- zoom: K,
4614
- showImageProperties: N,
4615
- showNumberingValue: ke,
4616
- getCommands: tn,
4617
- clearOverlay: dn.clearOverlay,
4618
- setPmSelection: Tn,
4619
- resolvePos: wn,
4612
+ selectedImage: cn,
4613
+ zoom: q,
4614
+ showImageProperties: P,
4615
+ showNumberingValue: Oe,
4616
+ getCommands: nn,
4617
+ clearOverlay: hn.clearOverlay,
4618
+ setPmSelection: Dn,
4619
+ resolvePos: En,
4620
4620
  customContextMenuItems: () => b.value ? void 0 : o.customContextMenuItems,
4621
4621
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
4622
4622
  onCopy: () => o.onCopy?.(),
4623
4623
  onCut: () => o.onCut?.(),
4624
4624
  onPaste: () => o.onPaste?.()
4625
- }), Gn = de(q, w), Kn = D(() => Gn.value.entries), Z = Yo({
4625
+ }), qn = ue(J, T), Jn = O(() => qn.value.entries), Z = Yo({
4626
4626
  editor: Ot,
4627
- editorView: q,
4628
- getDocument: J,
4627
+ editorView: J,
4628
+ getDocument: Yt,
4629
4629
  author: () => o.author,
4630
4630
  commentsProp: () => o.comments,
4631
- canonicalTick: w,
4631
+ canonicalTick: T,
4632
4632
  onCommentsChange: (e) => {
4633
4633
  o.onCommentsChange?.(e), c("comments-change", e);
4634
4634
  },
4635
- reLayout: nn
4636
- }), qn = Z.comments, Q = Jo({
4637
- editorView: q,
4638
- pagesViewport: be,
4639
- pagesContainer: S,
4635
+ reLayout: rn
4636
+ }), Yn = Z.comments, Q = Jo({
4637
+ editorView: J,
4638
+ pagesViewport: ye,
4639
+ pagesContainer: C,
4640
4640
  readOnly: b,
4641
4641
  createComment: Z.createComment,
4642
4642
  pushComment: Z.pushComment,
@@ -4654,131 +4654,131 @@ var Ws = (e) => {
4654
4654
  });
4655
4655
  return n === null ? null : n.status === "applied" ? n.commentId ?? !1 : !1;
4656
4656
  },
4657
- reLayout: nn,
4658
- showSidebar: H,
4657
+ reLayout: rn,
4658
+ showSidebar: U,
4659
4659
  setActiveSidebarItem: (e) => {
4660
- qe.value = e;
4660
+ Ke.value = e;
4661
4661
  }
4662
4662
  });
4663
- function Jn() {
4663
+ function Xn() {
4664
4664
  Q.startAddComment();
4665
4665
  }
4666
- function Yn(e) {
4666
+ function Zn(e) {
4667
4667
  return Q.handleAddComment(e);
4668
4668
  }
4669
- function Xn(e, t) {
4669
+ function Qn(e, t) {
4670
4670
  Z.handleReply(e, t);
4671
4671
  }
4672
- function Zn(e) {
4672
+ function $n(e) {
4673
4673
  Z.handleResolve(e);
4674
4674
  }
4675
- function Qn(e) {
4675
+ function er(e) {
4676
4676
  Z.handleUnresolve(e);
4677
4677
  }
4678
- function $n(e) {
4678
+ function tr(e) {
4679
4679
  Z.handleDelete(e);
4680
4680
  }
4681
- function er(e, t) {
4681
+ function nr(e, t) {
4682
4682
  Z.handleTrackedChangeReply(e, t);
4683
4683
  }
4684
- function tr(e) {
4685
- navigator.clipboard?.writeText(e), mn.value = null;
4684
+ function rr(e) {
4685
+ navigator.clipboard?.writeText(e), gn.value = null;
4686
4686
  }
4687
- let nr = D(() => {
4688
- w.value;
4689
- let e = J()?.package.document;
4687
+ let ir = O(() => {
4688
+ T.value;
4689
+ let e = Yt()?.package.document;
4690
4690
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
4691
- }), rr = D(() => {
4692
- w.value;
4693
- let e = J();
4691
+ }), ar = O(() => {
4692
+ T.value;
4693
+ let e = Yt();
4694
4694
  return e ? Nt(e) : void 0;
4695
- }), ir = D(() => {
4696
- w.value;
4695
+ }), or = O(() => {
4696
+ T.value;
4697
4697
  let e = Y.value;
4698
4698
  if (!e) return {};
4699
- let t = ut(e.state).table;
4700
- return t ? lt(t) : {};
4701
- }), ar = D(() => {
4702
- w.value;
4699
+ let t = lt(e.state).table;
4700
+ return t ? ct(t) : {};
4701
+ }), sr = O(() => {
4702
+ T.value;
4703
4703
  let e = {};
4704
4704
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4705
- let t = J()?.package.styles?.styles;
4705
+ let t = Yt()?.package.styles?.styles;
4706
4706
  return t !== void 0 && (e.documentStyles = t), e;
4707
- }), or = D(() => St(nr.value?.pageWidth ?? 12240) * K.value), sr = D(() => {
4707
+ }), cr = O(() => St(ir.value?.pageWidth ?? 12240) * q.value), lr = O(() => {
4708
4708
  let e = Ht.value?.pages;
4709
- if (!e || e.length === 0) return or.value;
4709
+ if (!e || e.length === 0) return cr.value;
4710
4710
  let t = 0;
4711
4711
  for (let n of e) t = Math.max(t, n.size.w);
4712
- return t * K.value;
4713
- }), $ = D(() => At({
4714
- availableWidth: Se.value,
4715
- pageWidth: sr.value,
4716
- outline: Fe.value && Qe.value.length > 1 ? "available" : "absent",
4717
- comments: H.value ? "open" : "closed"
4718
- })), cr = D(() => $.value.comments === "column" ? "column" : $.value.comments === "drawer" && G.value === "comments" ? "drawer" : null), lr = D(() => qn.value.filter((e) => !e.done && e.parentId == null).length), ur = D(() => ({ minWidth: sr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px" })), dr = D(() => ({
4712
+ return t * q.value;
4713
+ }), $ = O(() => At({
4714
+ availableWidth: xe.value,
4715
+ pageWidth: lr.value,
4716
+ outline: Pe.value && Ze.value.length > 1 ? "available" : "absent",
4717
+ comments: U.value ? "open" : "closed"
4718
+ })), ur = O(() => $.value.comments === "column" ? "column" : $.value.comments === "drawer" && K.value === "comments" ? "drawer" : null), dr = O(() => Yn.value.filter((e) => !e.done && e.parentId == null).length), fr = O(() => ({ minWidth: lr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px" })), pr = O(() => ({
4719
4719
  paddingLeft: kt.pageMargin + "px",
4720
4720
  paddingRight: kt.pageMargin + $.value.commentsGutter + "px"
4721
- })), fr = D(() => ({
4721
+ })), mr = O(() => ({
4722
4722
  paddingLeft: kt.pageMargin + "px",
4723
4723
  paddingRight: kt.pageMargin + $.value.commentsGutter + "px",
4724
- minWidth: sr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px"
4725
- })), pr = R(null), mr = 0;
4726
- function hr() {
4727
- let e = C.value;
4728
- if (!e || Date.now() < mr) return;
4724
+ minWidth: lr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px"
4725
+ })), hr = z(null), gr = 0;
4726
+ function _r() {
4727
+ let e = w.value;
4728
+ if (!e || Date.now() < gr) return;
4729
4729
  let t = Dt(e), n = e.getBoundingClientRect().top, r = e.scrollTop + e.clientHeight / 2, i = t.map((t) => ({
4730
4730
  pm: Number(t.dataset.pmStart),
4731
4731
  top: t.getBoundingClientRect().top - n + e.scrollTop
4732
4732
  })).filter(({ pm: e }) => Number.isFinite(e)).sort((e, t) => e.pm - t.pm), a = null;
4733
- for (let e of $e.value) {
4733
+ for (let e of Qe.value) {
4734
4734
  let t = i.find(({ pm: t }) => t >= e.pmPos);
4735
4735
  t && t.top <= r && (a = String(e.pmPos));
4736
4736
  }
4737
- pr.value = a;
4737
+ hr.value = a;
4738
4738
  }
4739
- function gr() {
4740
- Q.isAddingComment.value && Q.handleCancelAddComment(), H.value = !1, qe.value = null, G.value = "none";
4739
+ function vr() {
4740
+ Q.isAddingComment.value && Q.handleCancelAddComment(), U.value = !1, Ke.value = null, K.value = "none";
4741
4741
  }
4742
- function _r() {
4743
- if (cr.value === "drawer") {
4744
- gr();
4742
+ function yr() {
4743
+ if (ur.value === "drawer") {
4744
+ vr();
4745
4745
  return;
4746
4746
  }
4747
- if (cr.value === "column") {
4748
- H.value = !1, qe.value = null;
4747
+ if (ur.value === "column") {
4748
+ U.value = !1, Ke.value = null;
4749
4749
  return;
4750
4750
  }
4751
- H.value = !0, At({
4752
- availableWidth: Se.value,
4753
- pageWidth: sr.value,
4754
- outline: Fe.value && Qe.value.length > 1 ? "available" : "absent",
4751
+ U.value = !0, At({
4752
+ availableWidth: xe.value,
4753
+ pageWidth: lr.value,
4754
+ outline: Pe.value && Ze.value.length > 1 ? "available" : "absent",
4755
4755
  comments: "open"
4756
- }).comments === "drawer" && (G.value = "comments");
4756
+ }).comments === "drawer" && (K.value = "comments");
4757
4757
  }
4758
- function vr() {
4759
- G.value = G.value === "outline" ? "none" : "outline";
4758
+ function br() {
4759
+ K.value = K.value === "outline" ? "none" : "outline";
4760
4760
  }
4761
- function yr(e) {
4762
- pr.value = String(e), mr = Date.now() + 900, In.handleOutlineNavigate(e);
4761
+ function xr(e) {
4762
+ hr.value = String(e), gr = Date.now() + 900, Rn.handleOutlineNavigate(e);
4763
4763
  }
4764
- U($, (e) => {
4765
- G.value === "outline" && e.outline !== "rail" && e.outline !== "drawer" && (G.value = "none"), G.value === "comments" && e.comments !== "drawer" && (G.value = "none");
4766
- }), U([() => Q.isAddingComment.value, $], ([e, t]) => {
4767
- e && t.comments === "drawer" && (G.value = "comments");
4764
+ W($, (e) => {
4765
+ K.value === "outline" && e.outline !== "rail" && e.outline !== "drawer" && (K.value = "none"), K.value === "comments" && e.comments !== "drawer" && (K.value = "none");
4766
+ }), W([() => Q.isAddingComment.value, $], ([e, t]) => {
4767
+ e && t.comments === "drawer" && (K.value = "comments");
4768
4768
  });
4769
- let br = D(() => {
4769
+ let Sr = O(() => {
4770
4770
  let e = /* @__PURE__ */ new Set();
4771
- for (let t of qn.value) t.done && e.add(t.id);
4771
+ for (let t of Yn.value) t.done && e.add(t.id);
4772
4772
  return e;
4773
- }), xr = D(() => ({
4774
- transform: K.value === 1 ? void 0 : `scale(${K.value})`,
4773
+ }), Cr = O(() => ({
4774
+ transform: q.value === 1 ? void 0 : `scale(${q.value})`,
4775
4775
  transformOrigin: "top center",
4776
4776
  transition: "transform 0.2s ease"
4777
- })), { handleApplyStyle: Sr, handleInsertSymbol: Cr, handleInsertSectionBreakNextPage: wr, handleInsertSectionBreakContinuous: Tr } = ps({
4777
+ })), { handleApplyStyle: wr, handleInsertSymbol: Tr, handleInsertSectionBreakNextPage: Er, handleInsertSectionBreakContinuous: Dr } = ps({
4778
4778
  editorView: Y,
4779
- getDocument: J
4779
+ getDocument: Yt
4780
4780
  });
4781
- function Er() {
4781
+ function Or() {
4782
4782
  if (o.onInsertImage) {
4783
4783
  o.onInsertImage();
4784
4784
  return;
@@ -4788,47 +4788,47 @@ var Ws = (e) => {
4788
4788
  let t = document.createElement("input");
4789
4789
  t.type = "file", t.accept = "image/*", t.style.display = "none", t.addEventListener("change", () => {
4790
4790
  let n = t.files?.[0];
4791
- n && et(e, n, () => e.focus()), t.remove();
4791
+ n && $e(e, n, () => e.focus()), t.remove();
4792
4792
  }), document.body.appendChild(t), t.click();
4793
4793
  }
4794
- function Dr(e, t) {
4794
+ function kr(e, t) {
4795
4795
  if (o.onInsertTable) {
4796
4796
  o.onInsertTable(e, t);
4797
4797
  return;
4798
4798
  }
4799
4799
  let n = Y.value;
4800
- n && (rt(n, e, t), n.focus());
4800
+ n && (nt(n, e, t), n.focus());
4801
4801
  }
4802
- function Or() {
4802
+ function Ar() {
4803
4803
  if (o.onInsertPageBreak) {
4804
4804
  o.onInsertPageBreak();
4805
4805
  return;
4806
4806
  }
4807
- let e = q.value;
4808
- e && (tt(e), e.focus());
4807
+ let e = J.value;
4808
+ e && (et(e), e.focus());
4809
4809
  }
4810
- function kr() {
4810
+ function jr() {
4811
4811
  if (o.onInsertTOC) {
4812
4812
  o.onInsertTOC();
4813
4813
  return;
4814
4814
  }
4815
- let e = q.value;
4816
- e && (at(e, { title: le("toolbar.tableOfContents") }), e.focus());
4815
+ let e = J.value;
4816
+ e && (it(e, { title: S("toolbar.tableOfContents") }), e.focus());
4817
4817
  }
4818
- let { handlePageSetupApply: Ar, handleLeftMarginChange: jr, handleRightMarginChange: Mr, handleTopMarginChange: Nr, handleBottomMarginChange: Pr, handleIndentLeftChange: Fr, handleIndentRightChange: Ir, handleFirstLineIndentChange: Lr, handleTabStopRemove: Rr } = ks({
4819
- editorView: q,
4820
- getDocument: J,
4818
+ let { handlePageSetupApply: Mr, handleLeftMarginChange: Nr, handleRightMarginChange: Pr, handleTopMarginChange: Fr, handleBottomMarginChange: Ir, handleIndentLeftChange: Lr, handleIndentRightChange: Rr, handleFirstLineIndentChange: zr, handleTabStopRemove: Br } = ks({
4819
+ editorView: J,
4820
+ getDocument: Yt,
4821
4821
  readOnly: b,
4822
- stateTick: w,
4823
- reLayout: nn,
4822
+ stateTick: T,
4823
+ reLayout: rn,
4824
4824
  onChange: d,
4825
4825
  applySectionProperties: (e) => {
4826
4826
  let t = Ot.applyCanonicalSectionProperties(e);
4827
4827
  return t === null ? "unhandled" : t.status;
4828
4828
  }
4829
- }), zr = D(() => {
4830
- w.value;
4831
- let e = Y.value, t = e ? dt(e.state).paragraphFormatting : {};
4829
+ }), Vr = O(() => {
4830
+ T.value;
4831
+ let e = Y.value, t = e ? ut(e.state).paragraphFormatting : {};
4832
4832
  return {
4833
4833
  indentLeft: t.indentLeft ?? 0,
4834
4834
  indentRight: t.indentRight ?? 0,
@@ -4837,156 +4837,156 @@ var Ws = (e) => {
4837
4837
  tabs: t.tabs ?? null
4838
4838
  };
4839
4839
  });
4840
- function Br(e) {
4840
+ function Hr(e) {
4841
4841
  _.value !== e && (_.value = e, o.onModeChange?.(e), c("mode-change", e));
4842
4842
  }
4843
- function Vr(e) {
4843
+ function Ur(e) {
4844
4844
  switch (e) {
4845
4845
  case "find":
4846
4846
  case "findReplace":
4847
- E.value = !0;
4847
+ D.value = !0;
4848
4848
  break;
4849
4849
  case "insertSymbol":
4850
- De.value = !0;
4850
+ Ee.value = !0;
4851
4851
  break;
4852
4852
  case "insertHyperlink":
4853
- Te.value = !0;
4853
+ we.value = !0;
4854
4854
  break;
4855
4855
  case "pageSetup":
4856
- Ae.value = !0;
4856
+ ke.value = !0;
4857
4857
  break;
4858
4858
  case "watermark":
4859
- b.value || (Pe.value = !0);
4859
+ b.value || (Ne.value = !0);
4860
4860
  break;
4861
4861
  case "toggleOutline":
4862
- In.handleToggleOutline();
4862
+ Rn.handleToggleOutline();
4863
4863
  break;
4864
4864
  case "toggleSidebar":
4865
- H.value = !H.value;
4865
+ U.value = !U.value;
4866
4866
  break;
4867
4867
  case "insertImage":
4868
- Er();
4868
+ Or();
4869
4869
  break;
4870
4870
  case "insertPageBreak":
4871
- Or();
4871
+ Ar();
4872
4872
  break;
4873
4873
  case "insertSectionBreakNextPage":
4874
- wr();
4874
+ Er();
4875
4875
  break;
4876
4876
  case "insertSectionBreakContinuous":
4877
- Tr();
4877
+ Dr();
4878
4878
  break;
4879
4879
  case "insertTOC":
4880
- kr();
4880
+ jr();
4881
4881
  break;
4882
4882
  default: break;
4883
4883
  }
4884
4884
  c("menu-action", e);
4885
4885
  }
4886
- function Hr(e) {
4887
- if (h(We.watermark, "Watermark changes are unavailable in this session.") || b.value) return;
4888
- let t = J();
4886
+ function Wr(e) {
4887
+ if (h(Ue.watermark, "Watermark changes are unavailable in this session.") || b.value) return;
4888
+ let t = Yt();
4889
4889
  if (!t) return;
4890
4890
  let n = Ft(t, e);
4891
- Yt(n), Bt.value = !0, w.value++, nn(), d(n);
4891
+ Xt(n), Bt.value = !0, T.value++, rn(), d(n);
4892
4892
  }
4893
- function Ur(e, t) {
4894
- Dr(e, t);
4893
+ function Gr(e, t) {
4894
+ kr(e, t);
4895
4895
  }
4896
- function Wr(e) {
4897
- let t = Y.value, n = tn().setNumberingValue;
4896
+ function Kr(e) {
4897
+ let t = Y.value, n = nn().setNumberingValue;
4898
4898
  b.value || !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4899
4899
  }
4900
- function Gr(e) {
4901
- let t = Y.value, n = tn().setTableProperties;
4900
+ function qr(e) {
4901
+ let t = Y.value, n = nn().setTableProperties;
4902
4902
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4903
4903
  }
4904
- let Kr = R(!1);
4904
+ let Jr = z(!1);
4905
4905
  cs({
4906
4906
  documentBuffer: () => o.documentBuffer ?? null,
4907
4907
  document: () => o.document ?? null,
4908
4908
  loadDocumentBuffer: Kt,
4909
4909
  loadDocument: qt,
4910
- sidebarAutoOpenedRef: Kr
4911
- }), U(() => o.mode, (e) => {
4910
+ sidebarAutoOpenedRef: Jr
4911
+ }), W(() => o.mode, (e) => {
4912
4912
  e && e !== _.value && (_.value = e);
4913
- }), U(() => o.showOutline, (e) => {
4914
- Fe.value = !!e, In.recomputeHeadingsIfOpen();
4913
+ }), W(() => o.showOutline, (e) => {
4914
+ Pe.value = !!e, Rn.recomputeHeadingsIfOpen();
4915
4915
  });
4916
- let qr = R(!1);
4917
- function Jr(e) {
4916
+ let Yr = z(!1);
4917
+ function Xr(e) {
4918
4918
  let t = e.currentTarget;
4919
- t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop), hr();
4919
+ t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop), _r();
4920
4920
  }
4921
- function Yr() {
4922
- if (o.initialScrollTop === void 0 || qr.value) return;
4923
- qr.value = !0;
4921
+ function Zr() {
4922
+ if (o.initialScrollTop === void 0 || Yr.value) return;
4923
+ Yr.value = !0;
4924
4924
  let e = o.initialScrollTop;
4925
4925
  requestAnimationFrame(() => {
4926
- C.value && Tt(C.value, {
4926
+ w.value && Tt(w.value, {
4927
4927
  top: e,
4928
4928
  behavior: "instant"
4929
4929
  });
4930
4930
  });
4931
4931
  }
4932
- U(zt, (e) => {
4933
- e || (qr.value = !1, Tt(C.value, {
4932
+ W(zt, (e) => {
4933
+ e || (Yr.value = !1, Tt(w.value, {
4934
4934
  top: 0,
4935
4935
  left: 0,
4936
4936
  behavior: "instant"
4937
4937
  }));
4938
- }, { flush: "sync" }), U(zt, (e) => {
4938
+ }, { flush: "sync" }), W(zt, (e) => {
4939
4939
  if (!e) return;
4940
- ge.value = !0, In.recomputeHeadingsIfOpen(), Z.seedFromDocument();
4941
- let t = J();
4942
- t && o.onCompatibilityChange?.(ft(t)), Yr(), c("ready");
4943
- }), U([zt, lr], ([e, t]) => {
4944
- !e || t === 0 || o.autoOpenReviewSidebar === !1 || Kr.value || (Kr.value = !0, H.value = !0);
4945
- }), Ne(() => {
4940
+ he.value = !0, Rn.recomputeHeadingsIfOpen(), Z.seedFromDocument();
4941
+ let t = Yt();
4942
+ t && o.onCompatibilityChange?.(dt(t)), Zr(), c("ready");
4943
+ }), W([zt, dr], ([e, t]) => {
4944
+ !e || t === 0 || o.autoOpenReviewSidebar === !1 || Jr.value || (Jr.value = !0, U.value = !0);
4945
+ }), Me(() => {
4946
4946
  let e = () => {
4947
- let e = xe.value, t = C.value;
4947
+ let e = be.value, t = w.value;
4948
4948
  if (!e) return;
4949
4949
  let n = t ? t.offsetWidth - t.clientWidth : 0;
4950
- Se.value = Math.max(0, e.clientWidth - n);
4950
+ xe.value = Math.max(0, e.clientWidth - n);
4951
4951
  }, t = new ResizeObserver(e);
4952
- xe.value && t.observe(xe.value), C.value && t.observe(C.value), e();
4952
+ be.value && t.observe(be.value), w.value && t.observe(w.value), e();
4953
4953
  let n = Ot.on("selectionChange", () => {
4954
- w.value++, Q.updateFloatingButton();
4954
+ T.value++, Q.updateFloatingButton();
4955
4955
  }), r = Ot.on("docChange", () => {
4956
- w.value++, In.recomputeHeadingsIfOpen();
4956
+ T.value++, Rn.recomputeHeadingsIfOpen();
4957
4957
  }), i = Ot.on("layoutComplete", () => {
4958
- w.value++, requestAnimationFrame(hr);
4959
- }), a = bn.install(), s = xt(() => o.onFontsLoaded?.());
4960
- I(() => {
4958
+ T.value++, requestAnimationFrame(_r);
4959
+ }), a = Sn.install(), s = xt(() => o.onFontsLoaded?.());
4960
+ L(() => {
4961
4961
  t.disconnect(), n(), r(), i(), a(), s();
4962
4962
  });
4963
4963
  });
4964
- let { exposed: Xr } = fs({
4964
+ let { exposed: Qr } = fs({
4965
4965
  editor: Ot,
4966
- editorView: q,
4966
+ editorView: J,
4967
4967
  isDirty: Bt,
4968
4968
  commentsDirty: Z.commentsDirty,
4969
4969
  clearCommentsDirty: Z.clearCommentsDirty,
4970
4970
  saveDocument: Jt,
4971
4971
  layout: Ht,
4972
- pagesRef: S,
4973
- scrollRootRef: C,
4974
- zoom: K,
4975
- scrollVisiblePositionIntoView: En,
4972
+ pagesRef: C,
4973
+ scrollRootRef: w,
4974
+ zoom: q,
4975
+ scrollVisiblePositionIntoView: On,
4976
4976
  setPassageHighlight: (e) => {
4977
- Ce.value = e;
4977
+ Se.value = e;
4978
4978
  },
4979
4979
  author: () => o.author,
4980
4980
  createAIEditComment: (e, t) => Z.createComment(e, void 0, t),
4981
4981
  publishAIEditComments: (e) => {
4982
4982
  Z.appendComments(e);
4983
4983
  },
4984
- getComments: () => Ke(o.experimentalSession, We.authorityRouting) ? Z.comments.value.map((e) => structuredClone(e)) : Z.comments.value,
4984
+ getComments: () => Ge(o.experimentalSession, Ue.authorityRouting) ? Z.comments.value.map((e) => structuredClone(e)) : Z.comments.value,
4985
4985
  setComments: (e) => {
4986
4986
  Z.setComments(e);
4987
4987
  },
4988
4988
  focus: () => Y.value?.focus(),
4989
- getDocument: J,
4989
+ getDocument: Yt,
4990
4990
  getActiveView: () => Y.value,
4991
4991
  getExperimentalSession: () => o.experimentalSession,
4992
4992
  getActiveCanonicalStory: () => {
@@ -4995,107 +4995,107 @@ var Ws = (e) => {
4995
4995
  kind: e.kind,
4996
4996
  id: e.noteId
4997
4997
  };
4998
- let t = Sn.value;
4998
+ let t = wn.value;
4999
4999
  return t?.rId ? {
5000
5000
  kind: t.position,
5001
5001
  rId: t.rId
5002
5002
  } : "main";
5003
5003
  },
5004
- closeNoteStory: $t,
5005
- getHeaderFooterView: Xt,
5006
- setZoom: st,
5004
+ closeNoteStory: en,
5005
+ getHeaderFooterView: Zt,
5006
+ setZoom: ot,
5007
5007
  openFindReplace: () => {
5008
- E.value = !0;
5008
+ D.value = !0;
5009
5009
  },
5010
5010
  onPrint: o.onPrint,
5011
5011
  onSave: o.onSave
5012
- }), Zr = D(() => {
5013
- w.value;
5014
- let e = Xr.getEditorRef();
5012
+ }), $r = O(() => {
5013
+ T.value;
5014
+ let e = Qr.getEditorRef();
5015
5015
  return {
5016
5016
  canUndo: e?.canUndo() ?? !1,
5017
5017
  canRedo: e?.canRedo() ?? !1
5018
5018
  };
5019
5019
  });
5020
- function Qr() {
5021
- Xr.undo(), Y.value?.focus();
5020
+ function ei() {
5021
+ Qr.undo(), Y.value?.focus();
5022
5022
  }
5023
- function $r() {
5024
- Xr.redo(), Y.value?.focus();
5023
+ function ti() {
5024
+ Qr.redo(), Y.value?.focus();
5025
5025
  }
5026
- return t(Xr), (t, n) => (L(), A("div", {
5026
+ return t(Qr), (t, n) => (R(), j("div", {
5027
5027
  ref_key: "rootRef",
5028
- ref: _e,
5029
- class: P([
5028
+ ref: ge,
5029
+ class: F([
5030
5030
  "docx-editor-vue ep-root paged-editor",
5031
5031
  e.className,
5032
5032
  se.value,
5033
5033
  {
5034
- dark: V(l),
5034
+ dark: H(l),
5035
5035
  "paged-editor--readonly": b.value
5036
5036
  }
5037
5037
  ]),
5038
- style: F(e.style)
5038
+ style: I(e.style)
5039
5039
  }, [
5040
- j("div", Ks, [M(La, {
5040
+ M("div", Ks, [N(La, {
5041
5041
  "show-table-insert": o.showTableInsert !== !1,
5042
5042
  onRename: n[0] ||= (e) => c("rename", e),
5043
- onMenuAction: Vr,
5044
- onInsertTable: Ur
5043
+ onMenuAction: Ur,
5044
+ onInsertTable: Gr
5045
5045
  }, {
5046
- "title-bar-left": Ve(() => [Ie(t.$slots, "title-bar-left", {}, void 0, !0)]),
5047
- "title-bar-right": Ve(() => [Ie(t.$slots, "title-bar-right", {}, void 0, !0)]),
5046
+ "title-bar-left": Be(() => [Fe(t.$slots, "title-bar-left", {}, void 0, !0)]),
5047
+ "title-bar-right": Be(() => [Fe(t.$slots, "title-bar-right", {}, void 0, !0)]),
5048
5048
  _: 3
5049
- }, 8, ["show-table-insert"]), e.showToolbar ? (L(), O(ie, je({
5049
+ }, 8, ["show-table-insert"]), e.showToolbar ? (R(), k(ie, Ae({
5050
5050
  key: 0,
5051
5051
  view: Y.value,
5052
- "get-commands": V(tn),
5053
- "state-tick": w.value,
5054
- "can-undo": Zr.value.canUndo,
5055
- "can-redo": Zr.value.canRedo,
5056
- "on-undo": Qr,
5057
- "on-redo": $r,
5058
- "zoom-percent": V(nt),
5059
- "is-min-zoom": V(it),
5060
- "is-max-zoom": V(ot),
5061
- "zoom-presets": V(wt),
5052
+ "get-commands": H(nn),
5053
+ "state-tick": T.value,
5054
+ "can-undo": $r.value.canUndo,
5055
+ "can-redo": $r.value.canRedo,
5056
+ "on-undo": ei,
5057
+ "on-redo": ti,
5058
+ "zoom-percent": H(tt),
5059
+ "is-min-zoom": H(rt),
5060
+ "is-max-zoom": H(at),
5061
+ "zoom-presets": H(wt),
5062
5062
  "show-zoom-control": e.showZoomControl,
5063
5063
  "editor-mode": _.value,
5064
5064
  "show-review-controls": te.value,
5065
5065
  "track-changes-on": ne.value,
5066
5066
  "display-mode": x.value,
5067
5067
  "read-only": b.value,
5068
- "comments-sidebar-open": cr.value !== null,
5068
+ "comments-sidebar-open": ur.value !== null,
5069
5069
  "outline-drawer": $.value.outline === "drawer",
5070
- "outline-drawer-open": G.value === "outline",
5071
- "comment-count": lr.value,
5072
- "image-context": V(cn),
5070
+ "outline-drawer-open": K.value === "outline",
5071
+ "comment-count": dr.value,
5072
+ "image-context": H(un),
5073
5073
  theme: e.theme ?? null
5074
- }, ar.value, {
5075
- onFindReplace: n[2] ||= (e) => E.value = !0,
5076
- onInsertLink: n[3] ||= (e) => Te.value = !0,
5077
- onInsertSymbol: n[4] ||= (e) => De.value = !0,
5078
- onInsertPageBreak: Or,
5079
- onPageSetup: n[5] ||= (e) => Ae.value = !0,
5080
- onToggleOutline: vr,
5081
- onApplyStyle: V(Sr),
5082
- onZoomIn: V(ct),
5083
- onZoomOut: V(pt),
5084
- onZoomSet: V(st),
5085
- onToggleSidebar: _r,
5086
- onModeChange: Br,
5074
+ }, sr.value, {
5075
+ onFindReplace: n[2] ||= (e) => D.value = !0,
5076
+ onInsertLink: n[3] ||= (e) => we.value = !0,
5077
+ onInsertSymbol: n[4] ||= (e) => Ee.value = !0,
5078
+ onInsertPageBreak: Ar,
5079
+ onPageSetup: n[5] ||= (e) => ke.value = !0,
5080
+ onToggleOutline: br,
5081
+ onApplyStyle: H(wr),
5082
+ onZoomIn: H(st),
5083
+ onZoomOut: H(ft),
5084
+ onZoomSet: H(ot),
5085
+ onToggleSidebar: yr,
5086
+ onModeChange: Hr,
5087
5087
  onToggleTrackChanges: ae,
5088
5088
  "onUpdate:displayMode": oe,
5089
- onImageProperties: n[6] ||= (e) => N.value = !0,
5090
- onImageWrapType: V(ln),
5091
- onImageTransform: V(un)
5092
- }), Ee({
5093
- "table-context": Ve(() => [M(ee, {
5089
+ onImageProperties: n[6] ||= (e) => P.value = !0,
5090
+ onImageWrapType: H(dn),
5091
+ onImageTransform: H(fn)
5092
+ }), Te({
5093
+ "table-context": Be(() => [N(ee, {
5094
5094
  view: Y.value,
5095
- "get-commands": V(tn),
5096
- "state-tick": w.value,
5095
+ "get-commands": H(nn),
5096
+ "state-tick": T.value,
5097
5097
  theme: e.theme ?? null,
5098
- onOpenTableProperties: n[1] ||= (e) => Me.value = !0
5098
+ onOpenTableProperties: n[1] ||= (e) => je.value = !0
5099
5099
  }, null, 8, [
5100
5100
  "view",
5101
5101
  "get-commands",
@@ -5105,43 +5105,43 @@ var Ws = (e) => {
5105
5105
  _: 2
5106
5106
  }, [t.$slots["toolbar-extra"] || e.toolbarExtra ? {
5107
5107
  name: "toolbar-extra",
5108
- fn: Ve(() => [Ie(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (L(), O(fe, {
5108
+ fn: Be(() => [Fe(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (R(), k(de, {
5109
5109
  key: 0,
5110
5110
  node: e.toolbarExtra
5111
- }, null, 8, ["node"])) : k("", !0)], !0)]),
5111
+ }, null, 8, ["node"])) : A("", !0)], !0)]),
5112
5112
  key: "0"
5113
- } : void 0]), 1040, /* @__PURE__ */ "view.get-commands.state-tick.can-undo.can-redo.zoom-percent.is-min-zoom.is-max-zoom.zoom-presets.show-zoom-control.editor-mode.show-review-controls.track-changes-on.display-mode.read-only.comments-sidebar-open.outline-drawer.outline-drawer-open.comment-count.image-context.theme.onApplyStyle.onZoomIn.onZoomOut.onZoomSet.onImageWrapType.onImageTransform".split("."))) : k("", !0)]),
5114
- M(Ma, {
5115
- "show-find-replace": E.value,
5116
- "onUpdate:showFindReplace": n[7] ||= (e) => E.value = e,
5117
- "show-hyperlink": Te.value,
5118
- "onUpdate:showHyperlink": n[8] ||= (e) => Te.value = e,
5119
- "show-insert-symbol": De.value,
5120
- "onUpdate:showInsertSymbol": n[9] ||= (e) => De.value = e,
5121
- "show-image-properties": N.value,
5122
- "onUpdate:showImageProperties": n[10] ||= (e) => N.value = e,
5123
- "show-page-setup": Ae.value,
5124
- "onUpdate:showPageSetup": n[11] ||= (e) => Ae.value = e,
5125
- "show-table-properties": Me.value,
5126
- "onUpdate:showTableProperties": n[12] ||= (e) => Me.value = e,
5127
- "show-watermark": Pe.value,
5128
- "onUpdate:showWatermark": n[13] ||= (e) => Pe.value = e,
5129
- "show-numbering-value": ke.value,
5130
- "onUpdate:showNumberingValue": n[14] ||= (e) => ke.value = e,
5113
+ } : void 0]), 1040, /* @__PURE__ */ "view.get-commands.state-tick.can-undo.can-redo.zoom-percent.is-min-zoom.is-max-zoom.zoom-presets.show-zoom-control.editor-mode.show-review-controls.track-changes-on.display-mode.read-only.comments-sidebar-open.outline-drawer.outline-drawer-open.comment-count.image-context.theme.onApplyStyle.onZoomIn.onZoomOut.onZoomSet.onImageWrapType.onImageTransform".split("."))) : A("", !0)]),
5114
+ N(Ma, {
5115
+ "show-find-replace": D.value,
5116
+ "onUpdate:showFindReplace": n[7] ||= (e) => D.value = e,
5117
+ "show-hyperlink": we.value,
5118
+ "onUpdate:showHyperlink": n[8] ||= (e) => we.value = e,
5119
+ "show-insert-symbol": Ee.value,
5120
+ "onUpdate:showInsertSymbol": n[9] ||= (e) => Ee.value = e,
5121
+ "show-image-properties": P.value,
5122
+ "onUpdate:showImageProperties": n[10] ||= (e) => P.value = e,
5123
+ "show-page-setup": ke.value,
5124
+ "onUpdate:showPageSetup": n[11] ||= (e) => ke.value = e,
5125
+ "show-table-properties": je.value,
5126
+ "onUpdate:showTableProperties": n[12] ||= (e) => je.value = e,
5127
+ "show-watermark": Ne.value,
5128
+ "onUpdate:showWatermark": n[13] ||= (e) => Ne.value = e,
5129
+ "show-numbering-value": Oe.value,
5130
+ "onUpdate:showNumberingValue": n[14] ||= (e) => Oe.value = e,
5131
5131
  view: Y.value,
5132
- "scroll-visible-position-into-view": V(En),
5133
- bookmarks: Ze.value,
5134
- "current-watermark": rr.value,
5135
- "selected-image-pm-pos": V(on)?.pmPos ?? null,
5136
- "section-properties": nr.value,
5137
- "table-properties": ir.value,
5138
- onInsertSymbol: V(Cr),
5139
- onHyperlinkSubmit: V(hn),
5140
- onHyperlinkRemove: V(gn),
5141
- onPageSetupApply: V(Ar),
5142
- onTablePropertiesApply: Gr,
5143
- onWatermarkApply: Hr,
5144
- onNumberingValueApply: Wr
5132
+ "scroll-visible-position-into-view": H(On),
5133
+ bookmarks: Xe.value,
5134
+ "current-watermark": ar.value,
5135
+ "selected-image-pm-pos": H(cn)?.pmPos ?? null,
5136
+ "section-properties": ir.value,
5137
+ "table-properties": or.value,
5138
+ onInsertSymbol: H(Tr),
5139
+ onHyperlinkSubmit: H(_n),
5140
+ onHyperlinkRemove: H(vn),
5141
+ onPageSetupApply: H(Mr),
5142
+ onTablePropertiesApply: qr,
5143
+ onWatermarkApply: Wr,
5144
+ onNumberingValueApply: Kr
5145
5145
  }, null, 8, [
5146
5146
  "show-find-replace",
5147
5147
  "show-hyperlink",
@@ -5163,45 +5163,45 @@ var Ws = (e) => {
5163
5163
  "onHyperlinkRemove",
5164
5164
  "onPageSetupApply"
5165
5165
  ]),
5166
- V(Vt) ? (L(), A("div", qs, B(V(Vt)), 1)) : X.value ? (L(), A("div", Js, [Ie(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (L(), O(fe, {
5166
+ H(Vt) ? (R(), j("div", qs, V(H(Vt)), 1)) : on.value ? (R(), j("div", Js, [Fe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (R(), k(de, {
5167
5167
  key: 0,
5168
5168
  node: e.loadingIndicator
5169
- }, null, 8, ["node"])) : (L(), A(T, { key: 1 }, [Oe(B(V(le)("loadingDocument")), 1)], 64))], !0)])) : !V(zt) && !he.value ? (L(), A("div", Ys, [Ie(t.$slots, "placeholder", {}, () => [e.placeholder ? (L(), O(fe, {
5169
+ }, null, 8, ["node"])) : (R(), j(E, { key: 1 }, [De(V(H(S)("loadingDocument")), 1)], 64))], !0)])) : !H(zt) && !me.value ? (R(), j("div", Ys, [Fe(t.$slots, "placeholder", {}, () => [e.placeholder ? (R(), k(de, {
5170
5170
  key: 0,
5171
5171
  node: e.placeholder
5172
- }, null, 8, ["node"])) : (L(), A(T, { key: 1 }, [Oe("No document loaded")], 64))], !0)])) : k("", !0),
5173
- V(f) ? (L(), A("div", Xs, B(V(f)), 1)) : k("", !0),
5174
- j("div", {
5172
+ }, null, 8, ["node"])) : (R(), j(E, { key: 1 }, [De("No document loaded")], 64))], !0)])) : A("", !0),
5173
+ H(f) ? (R(), j("div", Xs, V(H(f)), 1)) : A("", !0),
5174
+ M("div", {
5175
5175
  ref_key: "hiddenPmRef",
5176
- ref: ve,
5176
+ ref: _e,
5177
5177
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-pm"
5178
5178
  }, null, 512),
5179
- j("div", {
5179
+ M("div", {
5180
5180
  ref_key: "hiddenHfPmRef",
5181
- ref: ye,
5181
+ ref: ve,
5182
5182
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-hf-pm"
5183
5183
  }, null, 512),
5184
- j("div", {
5184
+ M("div", {
5185
5185
  ref_key: "panelsRowRef",
5186
- ref: xe,
5186
+ ref: be,
5187
5187
  class: "docx-editor-vue__panels-row",
5188
5188
  "data-folio-panel-tier": $.value.tier,
5189
5189
  "data-folio-outline": $.value.outline,
5190
5190
  "data-folio-comments": $.value.comments
5191
5191
  }, [
5192
- $.value.outline === "column" || $.value.outline === "rail" ? (L(), O(Sa, {
5192
+ $.value.outline === "column" || $.value.outline === "rail" ? (R(), k(Sa, {
5193
5193
  key: 0,
5194
- headings: $e.value,
5195
- available: Qe.value.length > 1,
5196
- "outline-depth": Re.value,
5197
- onOutlineDepthChange: ze,
5198
- "get-scroll-container": () => C.value,
5199
- "doc-size": V(q)?.state.doc.content.size ?? 0,
5200
- "active-id": pr.value,
5194
+ headings: Qe.value,
5195
+ available: Ze.value.length > 1,
5196
+ "outline-depth": Le.value,
5197
+ onOutlineDepthChange: Re,
5198
+ "get-scroll-container": () => w.value,
5199
+ "doc-size": H(J)?.state.doc.content.size ?? 0,
5200
+ "active-id": hr.value,
5201
5201
  surface: $.value.outline,
5202
- expanded: G.value === "outline",
5203
- onExpand: vr,
5204
- onNavigate: yr
5202
+ expanded: K.value === "outline",
5203
+ onExpand: br,
5204
+ onNavigate: xr
5205
5205
  }, null, 8, [
5206
5206
  "headings",
5207
5207
  "available",
@@ -5211,39 +5211,39 @@ var Ws = (e) => {
5211
5211
  "active-id",
5212
5212
  "surface",
5213
5213
  "expanded"
5214
- ])) : k("", !0),
5215
- j("div", {
5214
+ ])) : A("", !0),
5215
+ M("div", {
5216
5216
  ref_key: "editorScrollRef",
5217
- ref: C,
5217
+ ref: w,
5218
5218
  class: "docx-editor-vue__editor-scroll",
5219
5219
  "data-folio-scroll": "",
5220
- onScroll: Jr
5221
- }, [j("div", {
5220
+ onScroll: Xr
5221
+ }, [M("div", {
5222
5222
  class: "docx-editor-vue__editor-area",
5223
- style: F(ur.value)
5223
+ style: I(fr.value)
5224
5224
  }, [
5225
- we.value && !b.value ? (L(), A("div", {
5225
+ Ce.value && !b.value ? (R(), j("div", {
5226
5226
  key: 0,
5227
5227
  class: "docx-editor-vue__ruler-h",
5228
5228
  "data-testid": "folio-horizontal-ruler",
5229
- style: F(fr.value)
5230
- }, [M(re, {
5231
- "section-props": nr.value,
5232
- zoom: V(K),
5229
+ style: I(mr.value)
5230
+ }, [N(re, {
5231
+ "section-props": ir.value,
5232
+ zoom: H(q),
5233
5233
  unit: e.rulerUnit ?? "inch",
5234
5234
  editable: !b.value,
5235
- "indent-left": zr.value.indentLeft,
5236
- "indent-right": zr.value.indentRight,
5237
- "first-line-indent": zr.value.firstLineIndent,
5238
- "hanging-indent": zr.value.hangingIndent,
5235
+ "indent-left": Vr.value.indentLeft,
5236
+ "indent-right": Vr.value.indentRight,
5237
+ "first-line-indent": Vr.value.firstLineIndent,
5238
+ "hanging-indent": Vr.value.hangingIndent,
5239
5239
  "show-first-line-indent": !0,
5240
- "tab-stops": zr.value.tabs,
5241
- onLeftMarginChange: V(jr),
5242
- onRightMarginChange: V(Mr),
5243
- onIndentLeftChange: V(Fr),
5244
- onIndentRightChange: V(Ir),
5245
- onFirstLineIndentChange: V(Lr),
5246
- onTabStopRemove: V(Rr)
5240
+ "tab-stops": Vr.value.tabs,
5241
+ onLeftMarginChange: H(Nr),
5242
+ onRightMarginChange: H(Pr),
5243
+ onIndentLeftChange: H(Lr),
5244
+ onIndentRightChange: H(Rr),
5245
+ onFirstLineIndentChange: H(zr),
5246
+ onTabStopRemove: H(Br)
5247
5247
  }, null, 8, [
5248
5248
  "section-props",
5249
5249
  "zoom",
@@ -5260,14 +5260,14 @@ var Ws = (e) => {
5260
5260
  "onIndentRightChange",
5261
5261
  "onFirstLineIndentChange",
5262
5262
  "onTabStopRemove"
5263
- ])], 4)) : k("", !0),
5264
- we.value && !b.value ? (L(), A("div", Qs, [M(v, {
5265
- "section-props": nr.value,
5266
- zoom: V(K),
5263
+ ])], 4)) : A("", !0),
5264
+ Ce.value && !b.value ? (R(), j("div", Qs, [N(v, {
5265
+ "section-props": ir.value,
5266
+ zoom: H(q),
5267
5267
  unit: e.rulerUnit ?? "inch",
5268
5268
  editable: !b.value,
5269
- onTopMarginChange: V(Nr),
5270
- onBottomMarginChange: V(Pr)
5269
+ onTopMarginChange: H(Fr),
5270
+ onBottomMarginChange: H(Ir)
5271
5271
  }, null, 8, [
5272
5272
  "section-props",
5273
5273
  "zoom",
@@ -5275,32 +5275,32 @@ var Ws = (e) => {
5275
5275
  "editable",
5276
5276
  "onTopMarginChange",
5277
5277
  "onBottomMarginChange"
5278
- ])])) : k("", !0),
5279
- j("div", {
5278
+ ])])) : A("", !0),
5279
+ M("div", {
5280
5280
  ref_key: "pagesViewportRef",
5281
- ref: be,
5281
+ ref: ye,
5282
5282
  class: "docx-editor-vue__pages-viewport",
5283
- style: F(dr.value),
5283
+ style: I(pr.value),
5284
5284
  onWheel: Et,
5285
- onMousedown: n[23] ||= (...e) => V(Dn) && V(Dn)(...e),
5286
- onMousemove: n[24] ||= (...e) => V(On) && V(On)(...e),
5287
- onClick: n[25] ||= (...e) => V(kn) && V(kn)(...e),
5288
- onDblclick: n[26] ||= (...e) => V(An) && V(An)(...e),
5289
- onContextmenu: n[27] ||= W((...e) => V(Vn) && V(Vn)(...e), ["prevent"])
5285
+ onMousedown: n[23] ||= (...e) => H(kn) && H(kn)(...e),
5286
+ onMousemove: n[24] ||= (...e) => H(An) && H(An)(...e),
5287
+ onClick: n[25] ||= (...e) => H(jn) && H(jn)(...e),
5288
+ onDblclick: n[26] ||= (...e) => H(Mn) && H(Mn)(...e),
5289
+ onContextmenu: n[27] ||= G((...e) => H(Un) && H(Un)(...e), ["prevent"])
5290
5290
  }, [
5291
- j("div", $s, [
5292
- j("div", {
5291
+ M("div", $s, [
5292
+ M("div", {
5293
5293
  ref_key: "pagesRef",
5294
- ref: S,
5295
- class: P(["docx-editor-vue__pages paged-editor__pages", V(Sn) ? `paged-editor--hf-editing paged-editor--editing-${V(Sn).position}` : ""]),
5296
- style: F(xr.value)
5294
+ ref: C,
5295
+ class: F(["docx-editor-vue__pages paged-editor__pages", H(wn) ? `paged-editor--hf-editing paged-editor--editing-${H(wn).position}` : ""]),
5296
+ style: I(Cr.value)
5297
5297
  }, null, 6),
5298
- M(bo, {
5299
- "editor-view": Pn(),
5300
- "hidden-container": ye.value,
5301
- "pages-container": S.value,
5302
- selection: Fn.value,
5303
- zoom: V(K)
5298
+ N(bo, {
5299
+ "editor-view": In(),
5300
+ "hidden-container": ve.value,
5301
+ "pages-container": C.value,
5302
+ selection: Ln.value,
5303
+ zoom: H(q)
5304
5304
  }, null, 8, [
5305
5305
  "editor-view",
5306
5306
  "hidden-container",
@@ -5308,15 +5308,15 @@ var Ws = (e) => {
5308
5308
  "selection",
5309
5309
  "zoom"
5310
5310
  ]),
5311
- j("div", ec, [
5312
- M(Yi, {
5313
- "get-view": () => V(q),
5314
- "get-pages-container": () => S.value,
5315
- "editor-state": V(Pt),
5316
- zoom: V(K),
5317
- layout: V(Ht),
5318
- blocks: V(Ut),
5319
- measures: V(Wt),
5311
+ M("div", ec, [
5312
+ N(Yi, {
5313
+ "get-view": () => H(J),
5314
+ "get-pages-container": () => C.value,
5315
+ "editor-state": H(Pt),
5316
+ zoom: H(q),
5317
+ layout: H(Ht),
5318
+ blocks: H(Ut),
5319
+ measures: H(Wt),
5320
5320
  "on-term-click": o.onAnonymizationTermClick,
5321
5321
  "selected-canonical": o.selectedAnonymizationCanonical,
5322
5322
  "selection-seq": o.anonymizationSelectionSeq
@@ -5332,13 +5332,13 @@ var Ws = (e) => {
5332
5332
  "selected-canonical",
5333
5333
  "selection-seq"
5334
5334
  ]),
5335
- M(Zi, {
5336
- range: Ce.value,
5337
- "get-pages-container": () => S.value,
5338
- zoom: V(K),
5339
- layout: V(Ht),
5340
- blocks: V(Ut),
5341
- measures: V(Wt)
5335
+ N(Zi, {
5336
+ range: Se.value,
5337
+ "get-pages-container": () => C.value,
5338
+ zoom: H(q),
5339
+ layout: H(Ht),
5340
+ blocks: H(Ut),
5341
+ measures: H(Wt)
5342
5342
  }, null, 8, [
5343
5343
  "range",
5344
5344
  "get-pages-container",
@@ -5347,15 +5347,15 @@ var Ws = (e) => {
5347
5347
  "blocks",
5348
5348
  "measures"
5349
5349
  ]),
5350
- o.showTemplateDirectives ? (L(), O(jo, {
5350
+ o.showTemplateDirectives ? (R(), k(jo, {
5351
5351
  key: 0,
5352
- "get-view": () => V(q),
5353
- "get-pages-container": () => S.value,
5354
- "editor-state": V(Pt),
5355
- zoom: V(K),
5356
- layout: V(Ht),
5357
- blocks: V(Ut),
5358
- measures: V(Wt)
5352
+ "get-view": () => H(J),
5353
+ "get-pages-container": () => C.value,
5354
+ "editor-state": H(Pt),
5355
+ zoom: H(q),
5356
+ layout: H(Ht),
5357
+ blocks: H(Ut),
5358
+ measures: H(Wt)
5359
5359
  }, null, 8, [
5360
5360
  "get-view",
5361
5361
  "get-pages-container",
@@ -5364,24 +5364,24 @@ var Ws = (e) => {
5364
5364
  "layout",
5365
5365
  "blocks",
5366
5366
  "measures"
5367
- ])) : k("", !0),
5368
- M(ta, {
5369
- "get-pages-container": () => S.value,
5370
- "editor-state": V(Pt),
5371
- zoom: V(K),
5372
- "sync-coordinator": V(Gt)
5367
+ ])) : A("", !0),
5368
+ N(ta, {
5369
+ "get-pages-container": () => C.value,
5370
+ "editor-state": H(Pt),
5371
+ zoom: H(q),
5372
+ "sync-coordinator": H(Gt)
5373
5373
  }, null, 8, [
5374
5374
  "get-pages-container",
5375
5375
  "editor-state",
5376
5376
  "zoom",
5377
5377
  "sync-coordinator"
5378
5378
  ]),
5379
- M(la, {
5380
- "get-view": () => V(q),
5381
- "get-pages-container": () => S.value,
5382
- zoom: V(K),
5383
- "transaction-version": w.value,
5384
- "sync-coordinator": V(Gt)
5379
+ N(la, {
5380
+ "get-view": () => H(J),
5381
+ "get-pages-container": () => C.value,
5382
+ zoom: H(q),
5383
+ "transaction-version": T.value,
5384
+ "sync-coordinator": H(Gt)
5385
5385
  }, null, 8, [
5386
5386
  "get-view",
5387
5387
  "get-pages-container",
@@ -5391,52 +5391,52 @@ var Ws = (e) => {
5391
5391
  ])
5392
5392
  ])
5393
5393
  ]),
5394
- V(Sn) ? (L(), O(So, {
5394
+ H(wn) ? (R(), k(So, {
5395
5395
  key: 0,
5396
- edit: V(Sn),
5397
- "get-view": Pn,
5398
- onClose: V(Mn),
5399
- onRemove: V(Nn)
5396
+ edit: H(wn),
5397
+ "get-view": In,
5398
+ onClose: H(Pn),
5399
+ onRemove: H(Fn)
5400
5400
  }, null, 8, [
5401
5401
  "edit",
5402
5402
  "onClose",
5403
5403
  "onRemove"
5404
- ])) : k("", !0),
5405
- He(j("aside", {
5404
+ ])) : A("", !0),
5405
+ Ve(M("aside", {
5406
5406
  class: "docx-editor-vue__note-editor",
5407
- "aria-label": rn.value,
5408
- onKeydown: n[16] ||= Ue(W((...e) => V($t) && V($t)(...e), ["stop", "prevent"]), ["esc"])
5409
- }, [j("header", nc, [j("span", null, B(rn.value), 1), j("button", {
5407
+ "aria-label": X.value,
5408
+ onKeydown: n[16] ||= He(G((...e) => H(en) && H(en)(...e), ["stop", "prevent"]), ["esc"])
5409
+ }, [M("header", nc, [M("span", null, V(X.value), 1), M("button", {
5410
5410
  type: "button",
5411
- "aria-label": V(le)("common.closeDialog"),
5412
- onClick: n[15] ||= (...e) => V($t) && V($t)(...e)
5413
- }, " × ", 8, rc)]), j("div", {
5411
+ "aria-label": H(S)("common.closeDialog"),
5412
+ onClick: n[15] ||= (...e) => H(en) && H(en)(...e)
5413
+ }, " × ", 8, rc)]), M("div", {
5414
5414
  ref_key: "notePmRef",
5415
- ref: Xe,
5415
+ ref: Ye,
5416
5416
  class: "docx-editor-vue__note-editor-host"
5417
- }, null, 512)], 40, tc), [[Be, V(Rt)]]),
5418
- M(yo, {
5419
- "image-info": V(on),
5420
- zoom: V(K),
5417
+ }, null, 512)], 40, tc), [[ze, H(Rt)]]),
5418
+ N(yo, {
5419
+ "image-info": H(cn),
5420
+ zoom: H(q),
5421
5421
  view: Y.value,
5422
- onDeselect: n[17] ||= (e) => on.value = null,
5423
- onInteractStart: n[18] ||= (e) => sn.value = !0,
5424
- onInteractEnd: n[19] ||= (e) => sn.value = !1,
5425
- onContextMenu: V(Hn)
5422
+ onDeselect: n[17] ||= (e) => cn.value = null,
5423
+ onInteractStart: n[18] ||= (e) => ln.value = !0,
5424
+ onInteractEnd: n[19] ||= (e) => ln.value = !1,
5425
+ onContextMenu: H(Wn)
5426
5426
  }, null, 8, [
5427
5427
  "image-info",
5428
5428
  "zoom",
5429
5429
  "view",
5430
5430
  "onContextMenu"
5431
5431
  ]),
5432
- M(Vo, {
5433
- data: V(mn),
5432
+ N(Vo, {
5433
+ data: H(gn),
5434
5434
  "read-only": b.value,
5435
- onNavigate: V(_n),
5436
- onCopy: tr,
5437
- onEdit: V(vn),
5438
- onRemove: V(yn),
5439
- onClose: n[20] ||= (e) => mn.value = null
5435
+ onNavigate: H(yn),
5436
+ onCopy: rr,
5437
+ onEdit: H(bn),
5438
+ onRemove: H(xn),
5439
+ onClose: n[20] ||= (e) => gn.value = null
5440
5440
  }, null, 8, [
5441
5441
  "data",
5442
5442
  "read-only",
@@ -5444,24 +5444,24 @@ var Ws = (e) => {
5444
5444
  "onEdit",
5445
5445
  "onRemove"
5446
5446
  ]),
5447
- V(xn) ? (L(), A("button", {
5447
+ H(Cn) ? (R(), j("button", {
5448
5448
  key: 1,
5449
5449
  type: "button",
5450
5450
  class: "docx-editor-vue__table-insert-btn",
5451
- style: F({
5452
- left: V(xn).x + "px",
5453
- top: V(xn).y + "px"
5451
+ style: I({
5452
+ left: H(Cn).x + "px",
5453
+ top: H(Cn).y + "px"
5454
5454
  }),
5455
- "aria-label": V(xn).type === "row" ? "Insert row" : "Insert column",
5456
- onMousedown: n[21] ||= (...e) => V(jn) && V(jn)(...e)
5457
- }, " + ", 44, ic)) : k("", !0),
5458
- M(g, {
5459
- comments: V(qn),
5460
- "pages-container": S.value,
5461
- zoom: V(K),
5462
- "page-width-px": or.value,
5463
- "sidebar-open": H.value,
5464
- "resolved-comment-ids": br.value,
5455
+ "aria-label": H(Cn).type === "row" ? "Insert row" : "Insert column",
5456
+ onMousedown: n[21] ||= (...e) => H(Nn) && H(Nn)(...e)
5457
+ }, " + ", 44, ic)) : A("", !0),
5458
+ N(g, {
5459
+ comments: H(Yn),
5460
+ "pages-container": C.value,
5461
+ zoom: H(q),
5462
+ "page-width-px": cr.value,
5463
+ "sidebar-open": U.value,
5464
+ "resolved-comment-ids": Sr.value,
5465
5465
  onMarkerClick: () => {}
5466
5466
  }, null, 8, [
5467
5467
  "comments",
@@ -5471,32 +5471,32 @@ var Ws = (e) => {
5471
5471
  "sidebar-open",
5472
5472
  "resolved-comment-ids"
5473
5473
  ]),
5474
- M(y, {
5475
- "is-open": cr.value !== null,
5476
- surface: cr.value ?? "column",
5477
- comments: V(qn),
5478
- "tracked-changes": Kn.value,
5474
+ N(y, {
5475
+ "is-open": ur.value !== null,
5476
+ surface: ur.value ?? "column",
5477
+ comments: H(Yn),
5478
+ "tracked-changes": Jn.value,
5479
5479
  "show-resolved": !0,
5480
- "is-adding-comment": V(Q).isAddingComment.value,
5481
- "add-comment-y-position": V(Q).addCommentYPosition.value,
5482
- "pages-container": S.value,
5483
- "page-width-px": or.value,
5484
- zoom: V(K),
5485
- "active-item-id": qe.value,
5486
- onClose: gr,
5487
- onDismiss: gr,
5488
- "onUpdate:activeItemId": n[22] ||= (e) => qe.value = e,
5489
- onAddComment: Yn,
5490
- onCancelAddComment: V(Q).handleCancelAddComment,
5491
- onCommentReply: Xn,
5492
- onCommentResolve: Zn,
5493
- onCommentUnresolve: Qn,
5494
- onCommentDelete: $n,
5495
- onAcceptChange: V(Z).handleAcceptChange,
5496
- onRejectChange: V(Z).handleRejectChange,
5497
- onAcceptChangeById: V(Z).handleAcceptChangeById,
5498
- onRejectChangeById: V(Z).handleRejectChangeById,
5499
- onTrackedChangeReply: er
5480
+ "is-adding-comment": H(Q).isAddingComment.value,
5481
+ "add-comment-y-position": H(Q).addCommentYPosition.value,
5482
+ "pages-container": C.value,
5483
+ "page-width-px": cr.value,
5484
+ zoom: H(q),
5485
+ "active-item-id": Ke.value,
5486
+ onClose: vr,
5487
+ onDismiss: vr,
5488
+ "onUpdate:activeItemId": n[22] ||= (e) => Ke.value = e,
5489
+ onAddComment: Zn,
5490
+ onCancelAddComment: H(Q).handleCancelAddComment,
5491
+ onCommentReply: Qn,
5492
+ onCommentResolve: $n,
5493
+ onCommentUnresolve: er,
5494
+ onCommentDelete: tr,
5495
+ onAcceptChange: H(Z).handleAcceptChange,
5496
+ onRejectChange: H(Z).handleRejectChange,
5497
+ onAcceptChangeById: H(Z).handleAcceptChangeById,
5498
+ onRejectChangeById: H(Z).handleRejectChangeById,
5499
+ onTrackedChangeReply: nr
5500
5500
  }, null, 8, [
5501
5501
  "is-open",
5502
5502
  "surface",
@@ -5514,49 +5514,49 @@ var Ws = (e) => {
5514
5514
  "onAcceptChangeById",
5515
5515
  "onRejectChangeById"
5516
5516
  ]),
5517
- V(Q).floatingCommentButton.value && !b.value ? (L(), A("button", {
5517
+ H(Q).floatingCommentButton.value && !b.value ? (R(), j("button", {
5518
5518
  key: 2,
5519
5519
  type: "button",
5520
5520
  class: "docx-editor-vue__add-comment-btn",
5521
- style: F({
5522
- top: V(Q).floatingCommentButton.value.top + "px",
5523
- left: V(Q).floatingCommentButton.value.left + "px"
5521
+ style: I({
5522
+ top: H(Q).floatingCommentButton.value.top + "px",
5523
+ left: H(Q).floatingCommentButton.value.left + "px"
5524
5524
  }),
5525
5525
  "aria-label": "Add comment",
5526
5526
  title: "Add comment",
5527
- onMousedown: W(Jn, ["prevent", "stop"])
5528
- }, [M(i, {
5527
+ onMousedown: G(Xn, ["prevent", "stop"])
5528
+ }, [N(i, {
5529
5529
  name: "add_comment",
5530
5530
  size: 18
5531
- })], 36)) : k("", !0)
5531
+ })], 36)) : A("", !0)
5532
5532
  ], 36),
5533
- V(Cn).totalPages > 1 ? (L(), O(Co, {
5533
+ H(Tn).totalPages > 1 ? (R(), k(Co, {
5534
5534
  key: 2,
5535
- "current-page": V(Cn).currentPage,
5536
- "total-pages": V(Cn).totalPages,
5537
- visible: V(Cn).visible
5535
+ "current-page": H(Tn).currentPage,
5536
+ "total-pages": H(Tn).totalPages,
5537
+ visible: H(Tn).visible
5538
5538
  }, null, 8, [
5539
5539
  "current-page",
5540
5540
  "total-pages",
5541
5541
  "visible"
5542
- ])) : k("", !0)
5542
+ ])) : A("", !0)
5543
5543
  ], 4)], 544),
5544
- G.value === "outline" ? (L(), A(T, { key: 1 }, [j("div", {
5544
+ K.value === "outline" ? (R(), j(E, { key: 1 }, [M("div", {
5545
5545
  class: "docx-editor-vue__panel-scrim",
5546
5546
  "data-testid": "folio-panel-scrim",
5547
5547
  "aria-hidden": "true",
5548
- onMousedown: n[28] ||= W((e) => G.value = "none", ["prevent"])
5549
- }, null, 32), M(Sa, {
5550
- headings: $e.value,
5551
- available: Qe.value.length > 1,
5552
- "outline-depth": Re.value,
5553
- onOutlineDepthChange: ze,
5554
- "get-scroll-container": () => C.value,
5555
- "doc-size": V(q)?.state.doc.content.size ?? 0,
5556
- "active-id": pr.value,
5548
+ onMousedown: n[28] ||= G((e) => K.value = "none", ["prevent"])
5549
+ }, null, 32), N(Sa, {
5550
+ headings: Qe.value,
5551
+ available: Ze.value.length > 1,
5552
+ "outline-depth": Le.value,
5553
+ onOutlineDepthChange: Re,
5554
+ "get-scroll-container": () => w.value,
5555
+ "doc-size": H(J)?.state.doc.content.size ?? 0,
5556
+ "active-id": hr.value,
5557
5557
  surface: "drawer",
5558
- onClose: n[29] ||= (e) => G.value = "none",
5559
- onNavigate: yr
5558
+ onClose: n[29] ||= (e) => K.value = "none",
5559
+ onNavigate: xr
5560
5560
  }, null, 8, [
5561
5561
  "headings",
5562
5562
  "available",
@@ -5564,27 +5564,27 @@ var Ws = (e) => {
5564
5564
  "get-scroll-container",
5565
5565
  "doc-size",
5566
5566
  "active-id"
5567
- ])], 64)) : k("", !0),
5568
- cr.value === "drawer" ? (L(), A("div", {
5567
+ ])], 64)) : A("", !0),
5568
+ ur.value === "drawer" ? (R(), j("div", {
5569
5569
  key: 2,
5570
5570
  class: "docx-editor-vue__panel-scrim",
5571
5571
  "data-testid": "folio-panel-scrim",
5572
5572
  "aria-hidden": "true",
5573
- onMousedown: W(gr, ["prevent"])
5574
- }, null, 32)) : k("", !0)
5573
+ onMousedown: G(vr, ["prevent"])
5574
+ }, null, 32)) : A("", !0)
5575
5575
  ], 8, Zs),
5576
- M(co, {
5576
+ N(co, {
5577
5577
  "read-only": b.value,
5578
- "context-menu": V(Ln),
5579
- "image-context-menu": V(Rn),
5580
- "image-context-menu-text-actions": V(zn),
5581
- "custom-text-menu-items": V(Bn),
5582
- "can-open-image-properties": V(on) !== null,
5583
- onContextMenuAction: V(Wn),
5584
- onCloseContextMenu: n[30] ||= (e) => V(Ln).isOpen = !1,
5585
- onImageWrapSelect: V(Un),
5586
- onCloseImageContextMenu: n[31] ||= (e) => Rn.value = null,
5587
- onOpenImageProperties: n[32] ||= (e) => N.value = !0
5578
+ "context-menu": H(zn),
5579
+ "image-context-menu": H(Bn),
5580
+ "image-context-menu-text-actions": H(Vn),
5581
+ "custom-text-menu-items": H(Hn),
5582
+ "can-open-image-properties": H(cn) !== null,
5583
+ onContextMenuAction: H(Kn),
5584
+ onCloseContextMenu: n[30] ||= (e) => H(zn).isOpen = !1,
5585
+ onImageWrapSelect: H(Gn),
5586
+ onCloseImageContextMenu: n[31] ||= (e) => Bn.value = null,
5587
+ onOpenImageProperties: n[32] ||= (e) => P.value = !0
5588
5588
  }, null, 8, [
5589
5589
  "read-only",
5590
5590
  "context-menu",
@@ -5595,17 +5595,17 @@ var Ws = (e) => {
5595
5595
  "onContextMenuAction",
5596
5596
  "onImageWrapSelect"
5597
5597
  ]),
5598
- M(ca, {
5599
- "event-root": b.value ? null : S.value,
5600
- view: V(q)
5598
+ N(ca, {
5599
+ "event-root": b.value ? null : C.value,
5600
+ view: H(J)
5601
5601
  }, null, 8, ["event-root", "view"])
5602
5602
  ], 6));
5603
5603
  }
5604
- }), [["__scopeId", "data-v-e3bb8c9a"]]);
5604
+ }), [["__scopeId", "data-v-1f7b50f6"]]);
5605
5605
  //#endregion
5606
5606
  //#region src/utils/listState.ts
5607
5607
  function oc() {
5608
- return qe;
5608
+ return Ke;
5609
5609
  }
5610
5610
  //#endregion
5611
5611
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
@@ -5632,7 +5632,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5632
5632
  "title",
5633
5633
  "aria-label",
5634
5634
  "aria-pressed"
5635
- ], hc = /*#__PURE__*/ t(/* @__PURE__ */ N({
5635
+ ], hc = /*#__PURE__*/ t(/* @__PURE__ */ P({
5636
5636
  __name: "FormattingBar",
5637
5637
  props: {
5638
5638
  currentFormatting: {},
@@ -5674,107 +5674,107 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5674
5674
  "redo"
5675
5675
  ],
5676
5676
  setup(e, { emit: t }) {
5677
- let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = D(() => a.currentFormatting ?? {}), l = D(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = D(() => c.value.listState ?? oc()), d = D(() => {
5677
+ let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = O(() => a.currentFormatting ?? {}), l = O(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = O(() => c.value.listState ?? oc()), d = O(() => {
5678
5678
  let e = c.value.color;
5679
5679
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5680
- }), f = D(() => st(u.value) > 0 || (c.value.indentLeft ?? 0) > 0);
5680
+ }), f = O(() => ot(u.value) > 0 || (c.value.indentLeft ?? 0) > 0);
5681
5681
  function p(e) {
5682
5682
  o("format", {
5683
5683
  type: "textColor",
5684
5684
  value: e
5685
5685
  });
5686
5686
  }
5687
- return (t, r) => (L(), A("div", {
5688
- class: P(["docx-formatting-bar", e.className]),
5687
+ return (t, r) => (R(), j("div", {
5688
+ class: F(["docx-formatting-bar", e.className]),
5689
5689
  role: "toolbar",
5690
- "aria-label": V(s)("formattingToolbar"),
5690
+ "aria-label": H(s)("formattingToolbar"),
5691
5691
  "data-folio-toolbar": "true"
5692
5692
  }, [
5693
- j("span", {
5693
+ M("span", {
5694
5694
  class: "docx-formatting-bar__group",
5695
5695
  role: "group",
5696
- "aria-label": V(s)("historyGroup")
5697
- }, [j("button", {
5696
+ "aria-label": H(s)("historyGroup")
5697
+ }, [M("button", {
5698
5698
  type: "button",
5699
5699
  class: "docx-formatting-bar__btn",
5700
5700
  disabled: e.disabled || !e.canUndo,
5701
- title: V(s)("undoShortcut"),
5702
- "aria-label": V(s)("undo"),
5703
- onMousedown: r[0] ||= W((e) => o("undo"), ["prevent"])
5704
- }, [M(i, {
5701
+ title: H(s)("undoShortcut"),
5702
+ "aria-label": H(s)("undo"),
5703
+ onMousedown: r[0] ||= G((e) => o("undo"), ["prevent"])
5704
+ }, [N(i, {
5705
5705
  name: "undo",
5706
5706
  size: 18
5707
- })], 40, lc), j("button", {
5707
+ })], 40, lc), M("button", {
5708
5708
  type: "button",
5709
5709
  class: "docx-formatting-bar__btn",
5710
5710
  disabled: e.disabled || !e.canRedo,
5711
- title: V(s)("redoShortcut"),
5712
- "aria-label": V(s)("redo"),
5713
- onMousedown: r[1] ||= W((e) => o("redo"), ["prevent"])
5714
- }, [M(i, {
5711
+ title: H(s)("redoShortcut"),
5712
+ "aria-label": H(s)("redo"),
5713
+ onMousedown: r[1] ||= G((e) => o("redo"), ["prevent"])
5714
+ }, [N(i, {
5715
5715
  name: "redo",
5716
5716
  size: 18
5717
5717
  })], 40, uc)], 8, cc),
5718
- r[13] ||= j("span", {
5718
+ r[13] ||= M("span", {
5719
5719
  class: "docx-formatting-bar__divider",
5720
5720
  role: "separator"
5721
5721
  }, null, -1),
5722
- e.showStylePicker ? (L(), A(T, { key: 0 }, [M(te, je({ value: c.value.styleId ?? "Normal" }, l.value, {
5722
+ e.showStylePicker ? (R(), j(E, { key: 0 }, [N(te, Ae({ value: c.value.styleId ?? "Normal" }, l.value, {
5723
5723
  disabled: e.disabled,
5724
5724
  onChange: r[2] ||= (e) => o("format", {
5725
5725
  type: "applyStyle",
5726
5726
  value: e
5727
5727
  })
5728
- }), null, 16, ["value", "disabled"]), r[11] ||= j("span", {
5728
+ }), null, 16, ["value", "disabled"]), r[11] ||= M("span", {
5729
5729
  class: "docx-formatting-bar__divider",
5730
5730
  role: "separator"
5731
- }, null, -1)], 64)) : k("", !0),
5732
- j("span", {
5731
+ }, null, -1)], 64)) : A("", !0),
5732
+ M("span", {
5733
5733
  class: "docx-formatting-bar__group",
5734
5734
  role: "group",
5735
- "aria-label": V(s)("textFormattingGroup")
5735
+ "aria-label": H(s)("textFormattingGroup")
5736
5736
  }, [
5737
- j("button", {
5737
+ M("button", {
5738
5738
  type: "button",
5739
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
5739
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
5740
5740
  disabled: e.disabled,
5741
- title: V(s)("boldShortcut"),
5742
- "aria-label": V(s)("bold"),
5741
+ title: H(s)("boldShortcut"),
5742
+ "aria-label": H(s)("bold"),
5743
5743
  "aria-pressed": !!c.value.bold,
5744
- onMousedown: r[3] ||= W((e) => o("format", "bold"), ["prevent"])
5745
- }, [M(i, {
5744
+ onMousedown: r[3] ||= G((e) => o("format", "bold"), ["prevent"])
5745
+ }, [N(i, {
5746
5746
  name: "format_bold",
5747
5747
  size: 18
5748
5748
  })], 42, fc),
5749
- j("button", {
5749
+ M("button", {
5750
5750
  type: "button",
5751
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
5751
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
5752
5752
  disabled: e.disabled,
5753
- title: V(s)("italicShortcut"),
5754
- "aria-label": V(s)("italic"),
5753
+ title: H(s)("italicShortcut"),
5754
+ "aria-label": H(s)("italic"),
5755
5755
  "aria-pressed": !!c.value.italic,
5756
- onMousedown: r[4] ||= W((e) => o("format", "italic"), ["prevent"])
5757
- }, [M(i, {
5756
+ onMousedown: r[4] ||= G((e) => o("format", "italic"), ["prevent"])
5757
+ }, [N(i, {
5758
5758
  name: "format_italic",
5759
5759
  size: 18
5760
5760
  })], 42, pc),
5761
- j("button", {
5761
+ M("button", {
5762
5762
  type: "button",
5763
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
5763
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
5764
5764
  disabled: e.disabled,
5765
- title: V(s)("underlineShortcut"),
5766
- "aria-label": V(s)("underline"),
5765
+ title: H(s)("underlineShortcut"),
5766
+ "aria-label": H(s)("underline"),
5767
5767
  "aria-pressed": !!c.value.underline,
5768
- onMousedown: r[5] ||= W((e) => o("format", "underline"), ["prevent"])
5769
- }, [M(i, {
5768
+ onMousedown: r[5] ||= G((e) => o("format", "underline"), ["prevent"])
5769
+ }, [N(i, {
5770
5770
  name: "format_underlined",
5771
5771
  size: 18
5772
5772
  })], 42, mc)
5773
5773
  ], 8, dc),
5774
- e.showTextColorPicker ? (L(), A(T, { key: 1 }, [r[12] ||= j("span", {
5774
+ e.showTextColorPicker ? (R(), j(E, { key: 1 }, [r[12] ||= M("span", {
5775
5775
  class: "docx-formatting-bar__divider",
5776
5776
  role: "separator"
5777
- }, null, -1), M(V(n), {
5777
+ }, null, -1), N(H(n), {
5778
5778
  mode: "text",
5779
5779
  value: d.value,
5780
5780
  theme: e.theme ?? null,
@@ -5784,12 +5784,12 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5784
5784
  "value",
5785
5785
  "theme",
5786
5786
  "disabled"
5787
- ])], 64)) : k("", !0),
5788
- r[14] ||= j("span", {
5787
+ ])], 64)) : A("", !0),
5788
+ r[14] ||= M("span", {
5789
5789
  class: "docx-formatting-bar__divider",
5790
5790
  role: "separator"
5791
5791
  }, null, -1),
5792
- e.showAlignmentButtons ? (L(), O(b, {
5792
+ e.showAlignmentButtons ? (R(), k(b, {
5793
5793
  key: 2,
5794
5794
  value: c.value.alignment ?? "left",
5795
5795
  disabled: e.disabled,
@@ -5797,8 +5797,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5797
5797
  type: "alignment",
5798
5798
  value: e
5799
5799
  })
5800
- }, null, 8, ["value", "disabled"])) : k("", !0),
5801
- e.showListButtons ? (L(), O(ne, {
5800
+ }, null, 8, ["value", "disabled"])) : A("", !0),
5801
+ e.showListButtons ? (R(), k(ne, {
5802
5802
  key: 3,
5803
5803
  "list-state": u.value,
5804
5804
  disabled: e.disabled,
@@ -5811,7 +5811,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5811
5811
  "list-state",
5812
5812
  "disabled",
5813
5813
  "can-outdent"
5814
- ])) : k("", !0)
5814
+ ])) : A("", !0)
5815
5815
  ], 10, sc));
5816
5816
  }
5817
5817
  }), [["__scopeId", "data-v-d8fef805"]]), gc = [
@@ -5839,7 +5839,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5839
5839
  value: 2,
5840
5840
  label: "200%"
5841
5841
  }
5842
- ], _c = /*#__PURE__*/ t(/* @__PURE__ */ N({
5842
+ ], _c = /*#__PURE__*/ t(/* @__PURE__ */ P({
5843
5843
  __name: "ZoomControl",
5844
5844
  props: {
5845
5845
  value: { default: 1 },
@@ -5856,7 +5856,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5856
5856
  },
5857
5857
  emits: ["change"],
5858
5858
  setup(e, { emit: t }) {
5859
- let { Select: n } = h(), r = e, i = t, a = D(() => r.levels ?? gc), 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(() => {
5859
+ let { Select: n } = h(), r = e, i = t, a = O(() => r.levels ?? gc), o = O(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = O(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = O(() => o.value ? String(o.value.value) : String(r.value)), l = O(() => {
5860
5860
  let e = a.value.map((e) => ({
5861
5861
  value: String(e.value),
5862
5862
  label: e.label
@@ -5870,8 +5870,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5870
5870
  let t = Number.parseFloat(e);
5871
5871
  Number.isNaN(t) || i("change", t);
5872
5872
  }
5873
- return (t, r) => (L(), O(V(n), {
5874
- class: P(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
5873
+ return (t, r) => (R(), k(H(n), {
5874
+ class: F(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
5875
5875
  value: c.value,
5876
5876
  items: l.value,
5877
5877
  disabled: e.disabled,
@@ -5887,7 +5887,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5887
5887
  }), [["__scopeId", "data-v-8079e07f"]]), vc = (e, t, n = {}) => {
5888
5888
  let { colorMode: r = se, locale: i = "en", ...a } = n;
5889
5889
  return new Promise((n, o) => {
5890
- let s = R(null), c = null, l = !1, d = {
5890
+ let s = z(null), c = null, l = !1, d = {
5891
5891
  save: async () => {
5892
5892
  let e = await (s.value?.save() ?? Promise.resolve(null));
5893
5893
  return e ? new Blob([e], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }) : null;
@@ -5909,8 +5909,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5909
5909
  l || (l = !0, o(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), c?.unmount(), c = null;
5910
5910
  }
5911
5911
  };
5912
- c = Te({ setup() {
5913
- return () => ke(ac, {
5912
+ c = we({ setup() {
5913
+ return () => Oe(ac, {
5914
5914
  ...a,
5915
5915
  documentBuffer: e,
5916
5916
  ref: s,
@@ -5921,8 +5921,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5921
5921
  a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
5922
5922
  }
5923
5923
  });
5924
- } }), c.use(u, i), c.use(fe, r), c.mount(t);
5924
+ } }), c.use(u, i), c.use(de, r), c.mount(t);
5925
5925
  });
5926
5926
  };
5927
5927
  //#endregion
5928
- export { $i as AutocompleteCaretOverlay, ji as DEFAULT_AI_SUGGESTION_PRESETS, Wt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Oi as DOCUMENT_PRESET_VERSION, ki as DOCUMENT_STYLE_SET_VERSION, ac as DocxEditor, he as FindReplaceDialog, l as FolioUIProvider, ge as FootnotePropertiesDialog, hc as FormattingBar, _e as HyperlinkDialog, ve as ImagePositionDialog, ye as ImagePropertiesDialog, S as InsertImageDialog, be as InsertSymbolDialog, C as InsertTableDialog, xe as PageSetupDialog, Se as PasteSpecialDialog, Ti as STELLA_STYLE_SET_NAME, Ce as SplitCellDialog, we as TablePropertiesDialog, w as WatermarkDialog, _c as ZoomControl, Gt as acceptAutocompleteSuggestion, Kt as acceptAutocompleteWord, zt as anonymizationDecorationsKey, qt as appendAutocompleteToken, ur as applyFolioAIEditOperations, Mi as applySuggestions, Jt as autocompleteSuggestionKey, J as autocompleteSuggestionPlugin, Fi as buildPositionalText, Yt as clearAutocompleteSuggestion, $n as clearTemplateSlashMenu, fe as colorModePlugin, er as consumeTemplateSlashQuery, Bi as createAICitationDecorationsPlugin, Ai as createDocx, bi as createEmptyDocument, pr as createFolioAIEditSnapshot, Ei as createStellaStyleDocumentPreset, Di as createStellaStyleSet, se as defaultColorMode, e as defaultLocale, zr as deriveBlockId, _r as diffWordSegments, xi as extractDocumentStyleSet, Si as extractDocumentStyleSetFromDocx, Xt as finishAutocompleteSuggestion, Ui as fromMarkdown, Bt as getAnonymizationMatches, Zt as getAutocompleteSuggestion, q as getDocumentWatermark, Ri as getFolioCaretViewportRect, Br as getFolioParaIdFromBlockId, zi as getFolioSelectionViewportRect, Tn as getTemplateDirectives, tr as getTemplateSlashMenu, xr as hashFolioAIBlockText, u as i18nPlugin, $e as insertImageFromFile, K as insertPageBreakInView, nt as insertTableInView, it as insertTableOfContentsInView, Ci as inspectDocumentStyles, wi as inspectDocumentStylesFromDocx, Hr as isFolioBlockId, Ur as isSequentialFolioBlockId, Ni as isSuggestionStale, Sr as normalizeFolioAIBlockText, le as provideColorMode, n as provideLocale, vc as renderAsync, nr as resetTemplateSlashQuery, Pi as resolveSuggestionAnchor, Dn as scanDirectives, fi as scrollFolioPositionIntoView, Vi as setAICitationsMeta, Ii as setAISuggestionsMeta, Hi as setActiveCitationMeta, Ht as setAnonymizationTermsMeta, Pt as setDocumentWatermark, Li as setFocusedSuggestionMeta, Qn as setTemplatePreviewValues, $t as shouldTriggerAutocomplete, en as startAutocompleteSuggestion, rr as templateSlashMenuKey, Wi as toMarkdown, Gi as toMarkdownResult, me as useColorMode, r as useTranslation, pe as useWheelZoom };
5928
+ export { $i as AutocompleteCaretOverlay, ji as DEFAULT_AI_SUGGESTION_PRESETS, Wt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Oi as DOCUMENT_PRESET_VERSION, ki as DOCUMENT_STYLE_SET_VERSION, ac as DocxEditor, me as FindReplaceDialog, l as FolioUIProvider, he as FootnotePropertiesDialog, hc as FormattingBar, ge as HyperlinkDialog, _e as ImagePositionDialog, ve as ImagePropertiesDialog, C as InsertImageDialog, ye as InsertSymbolDialog, w as InsertTableDialog, be as PageSetupDialog, xe as PasteSpecialDialog, Ti as STELLA_STYLE_SET_NAME, Se as SplitCellDialog, Ce as TablePropertiesDialog, T as WatermarkDialog, _c as ZoomControl, Gt as acceptAutocompleteSuggestion, Kt as acceptAutocompleteWord, zt as anonymizationDecorationsKey, qt as appendAutocompleteToken, dr as applyFolioAIEditOperations, Mi as applySuggestions, Jt as autocompleteSuggestionKey, Yt as autocompleteSuggestionPlugin, Fi as buildPositionalText, Xt as clearAutocompleteSuggestion, er as clearTemplateSlashMenu, de as colorModePlugin, tr as consumeTemplateSlashQuery, Bi as createAICitationDecorationsPlugin, Ai as createDocx, bi as createEmptyDocument, mr as createFolioAIEditSnapshot, Ei as createStellaStyleDocumentPreset, Di as createStellaStyleSet, se as defaultColorMode, e as defaultLocale, Br as deriveBlockId, vr as diffWordSegments, xi as extractDocumentStyleSet, Si as extractDocumentStyleSetFromDocx, Zt as finishAutocompleteSuggestion, Ui as fromMarkdown, Bt as getAnonymizationMatches, Qt as getAutocompleteSuggestion, J as getDocumentWatermark, Ri as getFolioCaretViewportRect, Vr as getFolioParaIdFromBlockId, zi as getFolioSelectionViewportRect, En as getTemplateDirectives, nr as getTemplateSlashMenu, Sr as hashFolioAIBlockText, u as i18nPlugin, Qe as insertImageFromFile, q as insertPageBreakInView, tt as insertTableInView, rt as insertTableOfContentsInView, Ci as inspectDocumentStyles, wi as inspectDocumentStylesFromDocx, Ur as isFolioBlockId, Wr as isSequentialFolioBlockId, Ni as isSuggestionStale, Cr as normalizeFolioAIBlockText, S as provideColorMode, n as provideLocale, vc as renderAsync, rr as resetTemplateSlashQuery, Pi as resolveSuggestionAnchor, On as scanDirectives, fi as scrollFolioPositionIntoView, Vi as setAICitationsMeta, Ii as setAISuggestionsMeta, Hi as setActiveCitationMeta, Ht as setAnonymizationTermsMeta, Pt as setDocumentWatermark, Li as setFocusedSuggestionMeta, $n as setTemplatePreviewValues, en as shouldTriggerAutocomplete, tn as startAutocompleteSuggestion, ir as templateSlashMenuKey, Wi as toMarkdown, Gi as toMarkdownResult, pe as useColorMode, r as useTranslation, fe as useWheelZoom };