@stll/folio-vue 0.17.0 → 0.17.2

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
@@ -4,90 +4,90 @@ import { t as ae } from "./zIndex-Ei9BbHSW.js";
4
4
  import { a as S, c as oe, i as se, l as C, o as ce, r as le, s as ue, t as de, u as fe } from "./useZoom-CBI44HNj.js";
5
5
  import { FindReplaceDialog as w, FootnotePropertiesDialog as pe, HyperlinkDialog as me, ImagePositionDialog as he, ImagePropertiesDialog as ge, InsertImageDialog as T, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as Se } from "./dialogs.js";
6
6
  import { Fragment as D, Teleport as O, computed as k, createApp as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as Ce, createStaticVNode as we, createTextVNode as Te, createVNode as F, defineComponent as I, h as Ee, inject as De, mergeProps as Oe, nextTick as ke, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as z, onMounted as Ae, onScopeDispose as B, openBlock as V, provide as je, ref as H, renderList as U, renderSlot as Me, shallowRef as Ne, toDisplayString as W, unref as G, vModelText as Pe, vShow as Fe, watch as K, withCtx as Ie, withDirectives as Le, withKeys as Re, withModifiers as q } from "vue";
7
- import { createStyleResolver as ze, extractSelectionState as Be, getSelectedText as Ve, insertImageFromFile as He, insertImageFromFile as Ue, insertPageBreakInView as We, insertPageBreakInView as Ge, insertTableInView as Ke, insertTableInView as qe, insertTableOfContentsInView as Je, insertTableOfContentsInView as Ye, schema as Xe } from "@stll/folio-core/prosemirror";
8
- import { expectTableAttrs as Ze } from "@stll/folio-core/prosemirror/attrs";
9
- import { getTableContext as Qe } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
- import { extractSelectionContext as $e } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
11
- import { inspectDocxCompatibility as et } from "@stll/folio-core/docx/compatibility";
12
- import { resolveActiveEditorStory as tt } from "@stll/folio-core/controller/activeEditorStory";
13
- import { clearAllCaches as nt, resetCanvasContext as rt } from "@stll/folio-core/layout-bridge/engine/measuring";
14
- import { onFontsLoaded as it } from "@stll/folio-core/utils/fontLoader";
15
- import { twipsToPixels as at } from "@stll/folio-core/paged-layout/sectionGeometry";
16
- import { getDocumentWatermark as ot, getDocumentWatermark as st, setDocumentWatermark as J, setDocumentWatermark as ct } from "@stll/folio-core/watermark";
17
- import { createLatestRequestGate as lt } from "@stll/folio-core/controller/latestRequestGate";
18
- import { measureDirectiveGutter as ut, projectRangesToRects as dt } from "@stll/folio-core/paged-layout/rangeProjection";
19
- import { prefersReducedMotionBehavior as ft } from "@stll/folio-core/paged-layout/scrollNavigation";
20
- import { anonymizationDecorationsKey as pt, getAnonymizationMatches as mt, getAnonymizationMatches as ht, setAnonymizationTermsMeta as gt, slugAnonymizationLabel as _t } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
21
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as vt, acceptAutocompleteSuggestion as yt, acceptAutocompleteWord as bt, appendAutocompleteToken as xt, autocompleteSuggestionKey as St, autocompleteSuggestionPlugin as Y, clearAutocompleteSuggestion as Ct, finishAutocompleteSuggestion as wt, getAutocompleteSuggestion as Tt, getAutocompleteSuggestion as Et, shouldTriggerAutocomplete as Dt, startAutocompleteSuggestion as Ot } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
22
- import { createRenderedDomContext as kt } from "@stll/folio-core/render-dom/RenderedDomContext";
23
- import { ContentControlWidgetController as At } from "@stll/folio-core/controller/contentControlWidgetController";
24
- import { NodeSelection as X, Selection as jt, TextSelection as Z } from "prosemirror-state";
25
- import { pixelsToEmu as Mt } from "@stll/folio-core/utils/units";
26
- import { IMAGE_LAYOUT_OPTIONS as Nt, captureInlinePositionEmu as Pt, deriveLayoutChoice as Ft, findImageElement as It, isImageLayoutOptionEnabled as Lt, toolbarValueToLayoutTarget as Rt } from "@stll/folio-core/layout-painter/imageLayout";
27
- import { isTrackChangesMode as zt, toggledTrackChangesMode as Bt } from "@stll/folio-core/managers/EditorModeManager";
28
- import { clickToPositionDom as Vt, getCaretPositionFromDom as Ht } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
29
- import { calculateResizedImageDimensions as Ut, commitImageFloatMove as Wt, commitImageInlineMove as Gt, commitImageResize as Kt, isFloatingImage as qt } from "@stll/folio-core/prosemirror/imageCommit";
30
- import { findBodyPmAnchor as Jt, findBodyPmSpans as Yt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
31
- import { resetImeCaretAnchor as Xt, syncImeCaretAnchor as Zt } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
32
- import { PAINTER_PAINTED_EVENT as Qt } from "@stll/folio-core/layout-painter/renderPage";
33
- import { HeaderFooterSelectionOverlay as $t } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
34
- import { getTemplateDirectives as en, getTemplateDirectives as tn, scanDirectives as nn } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
35
- import { closeHistory as rn, redo as an, undo as on } from "prosemirror-history";
36
- import { clearFormatting as sn } from "@stll/folio-core/prosemirror/commands/formatting";
37
- import { PENDING_COMMENT_ID as cn, createCommentIdAllocator as ln, seedCommentAllocator as un } from "@stll/folio-core/prosemirror/commentIdAllocator";
38
- import { createComment as dn } from "@stll/folio-core/prosemirror/commentOps";
39
- import { acceptAIEditRevision as fn, acceptChange as pn, acceptSuggestion as mn, findAIEditRevisionRange as hn, findSuggestionRange as gn, getSuggestions as _n, rejectAIEditRevision as vn, rejectChange as yn, rejectSuggestion as bn } from "@stll/folio-core/prosemirror/commands/comments";
40
- import { makeRevisionInfo as Q } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
41
- import { findPageIndexContainingPmPos as xn } from "@stll/folio-core/layout-engine";
42
- import { proseDocToBlocks as $ } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
43
- import { setTemplatePreviewValues as Sn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
44
- import { clearTemplateSlashMenu as Cn, consumeTemplateSlashQuery as wn, getTemplateSlashMenu as Tn, resetTemplateSlashQuery as En, templateSlashMenuKey as Dn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
45
- import { createEmptyHeaderFooter as On, pickActiveHeaderFooterRId as kn, removeHeaderFooter as An, resolveHeaderFooterContent as jn, saveHeaderFooterContent as Mn } from "@stll/folio-core/utils/headerFooter";
46
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Nn, applyFolioAIEditOperations as Pn, applyFolioAIEditOperations as Fn, applyFolioDocumentOperations as In, assertSupportedFolioDocumentOperationVersion as Ln, createFolioAIEditSnapshot as Rn, createFolioAIEditSnapshot as zn, diffWordSegments as Bn, getCommentAnchorsFromDoc as Vn, getFolioDocumentOperationIssues as Hn, getTrackedChangesFromDoc as Un, hashFolioAIBlockText as Wn, normalizeFolioAIBlockText as Gn } from "@stll/folio-core/ai-edits";
47
- import { findParagraphFragmentsByParaId as Kn, flashParagraphElements as qn } from "@stll/folio-core/paged-layout/paragraphFlash";
48
- import { onPaintedLayoutChange as Jn, readBlockRects as Yn } from "@stll/folio-core/paged-layout/blockGeometry";
49
- import { blockSdtAttrsToSdtProperties as Xn, findBlockSdtMatch as Zn, findBlockSdtMatches as Qn, removeContentControlTr as $n, setContentControlContentTr as er, setContentControlValueTr as tr } from "@stll/folio-core/prosemirror/commands/contentControls";
50
- import { setContentControlContentBlocksTr as nr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
51
- import { clampRangeToDocSize as rr, resolveFolioAIBlockRange as ir, resolveFolioAITextRange as ar, resolvePassageRange as or } from "@stll/folio-core/ai-edits/blockRange";
52
- import { deriveBlockId as sr, getFolioParaIdFromBlockId as cr, getFolioParaIdFromBlockId as lr, isFolioBlockId as ur, isSequentialFolioBlockId as dr } from "@stll/folio-core/types/block-id";
53
- import { getPageTextFromLayout as fr } from "@stll/folio-core/paged-layout/pageText";
54
- import { applyStyle as pr, removeTabStop as mr, setIndentFirstLine as hr, setIndentLeft as gr, setIndentRight as _r } from "@stll/folio-core/prosemirror/commands/paragraph";
55
- import { getCachedNumberingMap as vr } from "@stll/folio-core/docx";
56
- import { insertPageBreak as yr } from "@stll/folio-core/prosemirror/commands/pageBreak";
57
- import { insertSectionBreakContinuous as br, insertSectionBreakNextPage as xr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
58
- import { setEmbeddedFontFamilyMap as Sr } from "@stll/folio-core/utils/fontResolver";
59
- import { buildEmbeddedFontFamilyMap as Cr, extractEmbeddedFonts as wr } from "@stll/folio-core/fonts/embeddedFonts";
60
- import { editHyperlinkAtCursor as Tr, removeHyperlinkAtCursor as Er } from "@stll/folio-core/prosemirror/commands/hyperlink";
61
- import { sanitizeExternalUrl as Dr } from "@stll/folio-core/utils/urlSecurity";
62
- import { isKeydownInShortcutScope as Or } from "@stll/folio-core/managers/editorShortcuts";
63
- import { collectHeadings as kr } from "@stll/folio-core/utils/headingCollector";
64
- import { clickToPositionInHfSlot as Ar } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
65
- import { findNoteStoryForTarget as jr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
66
- import { TABLE_INSERT_HIDE_DELAY_MS as Mr, detectTableInsertHover as Nr } from "@stll/folio-core/layout-bridge/tableInsertHover";
67
- import { createCellDragTracker as Pr, findCellPosFromPmPos as Fr } from "@stll/folio-core/prosemirror/cellDragSelection";
68
- import { RemoteSelectionOverlay as Ir } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
69
- import { BodySelectionOverlay as Lr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
70
- import { createEmptyDocument as Rr } from "@stll/folio-core/utils/createDocument";
71
- import { extractDocumentStyleSet as zr, extractDocumentStyleSetFromDocx as Br, inspectDocumentStyles as Vr, inspectDocumentStylesFromDocx as Hr } from "@stll/folio-core/style-sets/extract";
72
- import { STELLA_STYLE_SET_NAME as Ur, createStellaStyleDocumentPreset as Wr, createStellaStyleSet as Gr } from "@stll/folio-core/style-sets/stellaStyle";
73
- import { DOCUMENT_PRESET_VERSION as Kr, DOCUMENT_STYLE_SET_VERSION as qr } from "@stll/folio-core/style-sets/types";
74
- import { createDocx as Jr } from "@stll/folio-core/docx/rezip";
75
- import { DEFAULT_AI_SUGGESTION_PRESETS as Yr } from "@stll/folio-core/ai-suggestions/types";
76
- import { applySuggestions as Xr } from "@stll/folio-core/ai-suggestions/apply";
77
- import { isSuggestionStale as Zr, resolveSuggestionAnchor as Qr } from "@stll/folio-core/ai-suggestions/conflict";
78
- import { buildPositionalText as $r } from "@stll/folio-core/ai-suggestions/text-positions";
79
- import { setAISuggestionsMeta as ei, setFocusedSuggestionMeta as ti } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
80
- import { scrollFolioPositionIntoView as ni } from "@stll/folio-core/paged-layout/scrollToPmPosition";
81
- import { getFolioCaretViewportRect as ri, getFolioSelectionViewportRect as ii } from "@stll/folio-core/paged-layout/selectionViewportRect";
82
- import { createAICitationDecorationsPlugin as ai, setAICitationsMeta as oi, setActiveCitationMeta as si } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
83
- import { fromMarkdown as ci, toMarkdown as li, toMarkdownResult as ui } from "@stll/folio-core/markdown";
7
+ import { createStyleResolver as ze, extractSelectionState as Be, getDocumentBuiltInStyles as Ve, getDocumentStyleResolver as He, getSelectedText as Ue, insertImageFromFile as We, insertImageFromFile as Ge, insertPageBreakInView as Ke, insertPageBreakInView as qe, insertTableInView as Je, insertTableInView as Ye, insertTableOfContentsInView as Xe, insertTableOfContentsInView as Ze, schema as J } from "@stll/folio-core/prosemirror";
8
+ import { expectTableAttrs as Qe } from "@stll/folio-core/prosemirror/attrs";
9
+ import { getTableContext as $e } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
+ import { extractSelectionContext as et } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
11
+ import { inspectDocxCompatibility as tt } from "@stll/folio-core/docx/compatibility";
12
+ import { resolveActiveEditorStory as nt } from "@stll/folio-core/controller/activeEditorStory";
13
+ import { clearAllCaches as rt, resetCanvasContext as it } from "@stll/folio-core/layout-bridge/engine/measuring";
14
+ import { onFontsLoaded as at } from "@stll/folio-core/utils/fontLoader";
15
+ import { twipsToPixels as ot } from "@stll/folio-core/paged-layout/sectionGeometry";
16
+ import { getDocumentWatermark as st, getDocumentWatermark as ct, setDocumentWatermark as lt, setDocumentWatermark as ut } from "@stll/folio-core/watermark";
17
+ import { createLatestRequestGate as dt } from "@stll/folio-core/controller/latestRequestGate";
18
+ import { measureDirectiveGutter as ft, projectRangesToRects as pt } from "@stll/folio-core/paged-layout/rangeProjection";
19
+ import { prefersReducedMotionBehavior as mt } from "@stll/folio-core/paged-layout/scrollNavigation";
20
+ import { anonymizationDecorationsKey as ht, getAnonymizationMatches as gt, getAnonymizationMatches as _t, setAnonymizationTermsMeta as vt, slugAnonymizationLabel as yt } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
21
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as bt, acceptAutocompleteSuggestion as xt, acceptAutocompleteWord as St, appendAutocompleteToken as Y, autocompleteSuggestionKey as Ct, autocompleteSuggestionPlugin as wt, clearAutocompleteSuggestion as Tt, finishAutocompleteSuggestion as Et, getAutocompleteSuggestion as Dt, getAutocompleteSuggestion as Ot, shouldTriggerAutocomplete as kt, startAutocompleteSuggestion as At } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
22
+ import { createRenderedDomContext as X } from "@stll/folio-core/render-dom/RenderedDomContext";
23
+ import { ContentControlWidgetController as jt } from "@stll/folio-core/controller/contentControlWidgetController";
24
+ import { NodeSelection as Mt, Selection as Nt, TextSelection as Z } from "prosemirror-state";
25
+ import { pixelsToEmu as Pt } from "@stll/folio-core/utils/units";
26
+ import { IMAGE_LAYOUT_OPTIONS as Ft, captureInlinePositionEmu as It, deriveLayoutChoice as Lt, findImageElement as Rt, isImageLayoutOptionEnabled as zt, toolbarValueToLayoutTarget as Bt } from "@stll/folio-core/layout-painter/imageLayout";
27
+ import { isTrackChangesMode as Vt, toggledTrackChangesMode as Ht } from "@stll/folio-core/managers/EditorModeManager";
28
+ import { clickToPositionDom as Ut, getCaretPositionFromDom as Wt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
29
+ import { calculateResizedImageDimensions as Gt, commitImageFloatMove as Kt, commitImageInlineMove as qt, commitImageResize as Jt, isFloatingImage as Yt } from "@stll/folio-core/prosemirror/imageCommit";
30
+ import { findBodyPmAnchor as Xt, findBodyPmSpans as Zt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
31
+ import { resetImeCaretAnchor as Qt, syncImeCaretAnchor as $t } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
32
+ import { PAINTER_PAINTED_EVENT as en } from "@stll/folio-core/layout-painter/renderPage";
33
+ import { HeaderFooterSelectionOverlay as tn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
34
+ import { getTemplateDirectives as nn, getTemplateDirectives as rn, scanDirectives as an } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
35
+ import { closeHistory as on, redo as sn, undo as cn } from "prosemirror-history";
36
+ import { clearFormatting as ln } from "@stll/folio-core/prosemirror/commands/formatting";
37
+ import { anchorTargetAttrs as un, sanitizeExternalUrl as dn, windowFeaturesFor as fn } from "@stll/folio-core/utils/urlSecurity";
38
+ import { PENDING_COMMENT_ID as pn, createCommentIdAllocator as mn, seedCommentAllocator as hn } from "@stll/folio-core/prosemirror/commentIdAllocator";
39
+ import { createComment as gn } from "@stll/folio-core/prosemirror/commentOps";
40
+ import { acceptAIEditRevision as _n, acceptChange as vn, acceptSuggestion as yn, findAIEditRevisionRange as bn, findSuggestionRange as Q, getSuggestions as xn, rejectAIEditRevision as $, rejectChange as Sn, rejectSuggestion as Cn } from "@stll/folio-core/prosemirror/commands/comments";
41
+ import { makeRevisionInfo as wn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
42
+ import { findPageIndexContainingPmPos as Tn } from "@stll/folio-core/layout-engine";
43
+ import { proseDocToBlocks as En } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
44
+ import { setTemplatePreviewValues as Dn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
45
+ import { clearTemplateSlashMenu as On, consumeTemplateSlashQuery as kn, getTemplateSlashMenu as An, resetTemplateSlashQuery as jn, templateSlashMenuKey as Mn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
46
+ import { createEmptyHeaderFooter as Nn, pickActiveHeaderFooterRId as Pn, removeHeaderFooter as Fn, resolveHeaderFooterContent as In, saveHeaderFooterContent as Ln } from "@stll/folio-core/utils/headerFooter";
47
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Rn, applyFolioAIEditOperations as zn, applyFolioAIEditOperations as Bn, applyFolioDocumentOperations as Vn, assertSupportedFolioDocumentOperationVersion as Hn, createFolioAIEditSnapshot as Un, createFolioAIEditSnapshot as Wn, createFolioAIEditSnapshotWithStyleResolver as Gn, diffWordSegments as Kn, getCommentAnchorsFromDoc as qn, getFolioDocumentOperationIssues as Jn, getTrackedChangesFromDoc as Yn, hashFolioAIBlockText as Xn, normalizeFolioAIBlockText as Zn } from "@stll/folio-core/ai-edits";
48
+ import { findParagraphFragmentsByParaId as Qn, flashParagraphElements as $n } from "@stll/folio-core/paged-layout/paragraphFlash";
49
+ import { onPaintedLayoutChange as er, readBlockRects as tr } from "@stll/folio-core/paged-layout/blockGeometry";
50
+ import { blockSdtAttrsToSdtProperties as nr, findBlockSdtMatch as rr, findBlockSdtMatches as ir, removeContentControlTr as ar, setContentControlContentTr as or, setContentControlValueTr as sr } from "@stll/folio-core/prosemirror/commands/contentControls";
51
+ import { setContentControlContentBlocksTr as cr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
52
+ import { clampRangeToDocSize as lr, resolveFolioAIBlockRange as ur, resolveFolioAITextRange as dr, resolvePassageRange as fr } from "@stll/folio-core/ai-edits/blockRange";
53
+ import { deriveBlockId as pr, getFolioParaIdFromBlockId as mr, getFolioParaIdFromBlockId as hr, isFolioBlockId as gr, isSequentialFolioBlockId as _r } from "@stll/folio-core/types/block-id";
54
+ import { getPageTextFromLayout as vr } from "@stll/folio-core/paged-layout/pageText";
55
+ import { applyStyle as yr, removeTabStop as br, setIndentFirstLine as xr, setIndentLeft as Sr, setIndentRight as Cr } from "@stll/folio-core/prosemirror/commands/paragraph";
56
+ import { getCachedNumberingMap as wr } from "@stll/folio-core/docx";
57
+ import { insertPageBreak as Tr } from "@stll/folio-core/prosemirror/commands/pageBreak";
58
+ import { insertSectionBreakContinuous as Er, insertSectionBreakNextPage as Dr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
59
+ import { setEmbeddedFontFamilyMap as Or } from "@stll/folio-core/utils/fontResolver";
60
+ import { buildEmbeddedFontFamilyMap as kr, extractEmbeddedFonts as Ar } from "@stll/folio-core/fonts/embeddedFonts";
61
+ import { editHyperlinkAtCursor as jr, removeHyperlinkAtCursor as Mr } from "@stll/folio-core/prosemirror/commands/hyperlink";
62
+ import { isKeydownInShortcutScope as Nr } from "@stll/folio-core/managers/editorShortcuts";
63
+ import { collectHeadings as Pr } from "@stll/folio-core/utils/headingCollector";
64
+ import { clickToPositionInHfSlot as Fr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
65
+ import { findNoteStoryForTarget as Ir } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
66
+ import { TABLE_INSERT_HIDE_DELAY_MS as Lr, detectTableInsertHover as Rr } from "@stll/folio-core/layout-bridge/tableInsertHover";
67
+ import { createCellDragTracker as zr, findCellPosFromPmPos as Br } from "@stll/folio-core/prosemirror/cellDragSelection";
68
+ import { RemoteSelectionOverlay as Vr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
69
+ import { BodySelectionOverlay as Hr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
70
+ import { createEmptyDocument as Ur } from "@stll/folio-core/utils/createDocument";
71
+ import { extractDocumentStyleSet as Wr, extractDocumentStyleSetFromDocx as Gr, inspectDocumentStyles as Kr, inspectDocumentStylesFromDocx as qr } from "@stll/folio-core/style-sets/extract";
72
+ import { STELLA_STYLE_SET_NAME as Jr, createStellaStyleDocumentPreset as Yr, createStellaStyleSet as Xr } from "@stll/folio-core/style-sets/stellaStyle";
73
+ import { DOCUMENT_PRESET_VERSION as Zr, DOCUMENT_STYLE_SET_VERSION as Qr } from "@stll/folio-core/style-sets/types";
74
+ import { createDocx as $r } from "@stll/folio-core/docx/rezip";
75
+ import { DEFAULT_AI_SUGGESTION_PRESETS as ei } from "@stll/folio-core/ai-suggestions/types";
76
+ import { applySuggestions as ti } from "@stll/folio-core/ai-suggestions/apply";
77
+ import { isSuggestionStale as ni, resolveSuggestionAnchor as ri } from "@stll/folio-core/ai-suggestions/conflict";
78
+ import { buildPositionalText as ii } from "@stll/folio-core/ai-suggestions/text-positions";
79
+ import { setAISuggestionsMeta as ai, setFocusedSuggestionMeta as oi } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
80
+ import { scrollFolioPositionIntoView as si } from "@stll/folio-core/paged-layout/scrollToPmPosition";
81
+ import { getFolioCaretViewportRect as ci, getFolioSelectionViewportRect as li } from "@stll/folio-core/paged-layout/selectionViewportRect";
82
+ import { createAICitationDecorationsPlugin as ui, setAICitationsMeta as di, setActiveCitationMeta as fi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
83
+ import { fromMarkdown as pi, toMarkdown as mi, toMarkdownResult as hi } from "@stll/folio-core/markdown";
84
84
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
85
- var di = [
85
+ var gi = [
86
86
  "data-folio-anonymization-label",
87
87
  "data-folio-anonymization-canonical",
88
88
  "data-folio-anonymization-selected",
89
89
  "title"
90
- ], fi = /*#__PURE__*/ t(/* @__PURE__ */ I({
90
+ ], _i = /*#__PURE__*/ t(/* @__PURE__ */ I({
91
91
  __name: "AnonymizationRectsOverlay",
92
92
  props: {
93
93
  getView: { type: Function },
@@ -102,7 +102,7 @@ var di = [
102
102
  selectionSeq: {}
103
103
  },
104
104
  setup(e) {
105
- let t = e, n = H(null), r = H([]), i = lt(), a = null;
105
+ let t = e, n = H(null), r = H([]), i = dt(), a = null;
106
106
  function o() {
107
107
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
108
108
  a = null, s();
@@ -114,12 +114,12 @@ var di = [
114
114
  r.value = [];
115
115
  return;
116
116
  }
117
- let s = ht(o);
117
+ let s = _t(o);
118
118
  if (s.length === 0) {
119
119
  r.value = [];
120
120
  return;
121
121
  }
122
- let c = await dt(s, {
122
+ let c = await pt(s, {
123
123
  pagesContainer: a,
124
124
  zoom: t.zoom,
125
125
  layout: t.layout,
@@ -161,7 +161,7 @@ var di = [
161
161
  index: a
162
162
  }, i.item(a)?.scrollIntoView({
163
163
  block: "center",
164
- behavior: ft()
164
+ behavior: mt()
165
165
  });
166
166
  }
167
167
  K(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
@@ -192,7 +192,7 @@ var di = [
192
192
  "data-folio-anonymization-overlay": ""
193
193
  }, [(V(!0), N(D, null, U(r.value, (t) => (V(), N(D, { key: `${t.label}:${t.canonical}` }, [(V(!0), N(D, null, U(t.rects, (n, r) => (V(), N("span", {
194
194
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
195
- class: L(["folio-anonymization-term", `folio-anonymization-term--${G(_t)(t.label)}`]),
195
+ class: L(["folio-anonymization-term", `folio-anonymization-term--${G(yt)(t.label)}`]),
196
196
  "data-folio-anonymization-label": t.label,
197
197
  "data-folio-anonymization-canonical": t.canonical,
198
198
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
@@ -204,12 +204,12 @@ var di = [
204
204
  width: `${n.width}px`,
205
205
  height: `${n.height}px`
206
206
  })
207
- }, null, 14, di))), 128))], 64))), 128))], 512));
207
+ }, null, 14, gi))), 128))], 64))), 128))], 512));
208
208
  }
209
- }), [["__scopeId", "data-v-df8fe7df"]]), pi = {
209
+ }), [["__scopeId", "data-v-df8fe7df"]]), vi = {
210
210
  class: "folio-passage-highlight-overlay",
211
211
  "data-folio-passage-highlight-overlay": ""
212
- }, mi = /*#__PURE__*/ t(/* @__PURE__ */ I({
212
+ }, yi = /*#__PURE__*/ t(/* @__PURE__ */ I({
213
213
  __name: "PassageHighlightOverlay",
214
214
  props: {
215
215
  range: {},
@@ -220,7 +220,7 @@ var di = [
220
220
  measures: {}
221
221
  },
222
222
  setup(e) {
223
- let t = e, n = H([]), r = lt(), i = null;
223
+ let t = e, n = H([]), r = dt(), i = null;
224
224
  function a() {
225
225
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
226
226
  i = null, o();
@@ -232,7 +232,7 @@ var di = [
232
232
  n.value = [];
233
233
  return;
234
234
  }
235
- let o = await dt([i], {
235
+ let o = await pt([i], {
236
236
  pagesContainer: a,
237
237
  zoom: t.zoom,
238
238
  layout: t.layout,
@@ -256,7 +256,7 @@ var di = [
256
256
  t.measures
257
257
  ], () => a(), { immediate: !0 }), z(() => {
258
258
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
259
- }), (e, t) => (V(), N("div", pi, [(V(!0), N(D, null, U(n.value, (e, t) => (V(), N("span", {
259
+ }), (e, t) => (V(), N("div", vi, [(V(!0), N(D, null, U(n.value, (e, t) => (V(), N("span", {
260
260
  key: `${t}:${e.left}:${e.top}`,
261
261
  class: "folio-passage-highlight",
262
262
  style: R({
@@ -268,11 +268,11 @@ var di = [
268
268
  })
269
269
  }, null, 4))), 128))]));
270
270
  }
271
- }), [["__scopeId", "data-v-bde9f41b"]]), hi = {
271
+ }), [["__scopeId", "data-v-bde9f41b"]]), bi = {
272
272
  key: 0,
273
273
  class: "folio-autocomplete-overlay",
274
274
  "data-folio-autocomplete-overlay": ""
275
- }, gi = /*#__PURE__*/ t(/* @__PURE__ */ I({
275
+ }, xi = /*#__PURE__*/ t(/* @__PURE__ */ I({
276
276
  __name: "AutocompleteCaretOverlay",
277
277
  props: {
278
278
  caret: {},
@@ -280,7 +280,7 @@ var di = [
280
280
  isStreaming: { type: Boolean }
281
281
  },
282
282
  setup(e) {
283
- return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", hi, [P("span", {
283
+ return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", bi, [P("span", {
284
284
  class: "folio-autocomplete-ghost",
285
285
  style: R({
286
286
  left: `${e.caret.x}px`,
@@ -293,7 +293,7 @@ var di = [
293
293
  "aria-hidden": "true"
294
294
  }, "stella", 2)], 4)])) : M("", !0);
295
295
  }
296
- }), [["__scopeId", "data-v-00299904"]]), _i = 48, vi = /* @__PURE__ */ I({
296
+ }), [["__scopeId", "data-v-00299904"]]), Si = 48, Ci = /* @__PURE__ */ I({
297
297
  __name: "AutocompleteSuggestionOverlay",
298
298
  props: {
299
299
  getPagesContainer: { type: Function },
@@ -310,7 +310,7 @@ var di = [
310
310
  let c = r.querySelector(".layout-page-content");
311
311
  if (!c) return;
312
312
  let l = (c.getBoundingClientRect().right - a.left) / i;
313
- return Math.max(_i, l - t);
313
+ return Math.max(Si, l - t);
314
314
  }
315
315
  }, s = () => {
316
316
  let e = t.getPagesContainer(), r = t.editorState;
@@ -318,12 +318,12 @@ var di = [
318
318
  n.value = null;
319
319
  return;
320
320
  }
321
- let i = Et(r);
321
+ let i = Ot(r);
322
322
  if (i.status === "idle" || i.text.length === 0) {
323
323
  n.value = null;
324
324
  return;
325
325
  }
326
- let a = kt(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
326
+ let a = X(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
327
327
  if (!s) {
328
328
  n.value = null;
329
329
  return;
@@ -359,7 +359,7 @@ var di = [
359
359
  t.editorState,
360
360
  t.zoom,
361
361
  r.value
362
- ], () => c()), (e, t) => (V(), j(gi, {
362
+ ], () => c()), (e, t) => (V(), j(xi, {
363
363
  caret: n.value?.caret ?? null,
364
364
  text: n.value?.text ?? "",
365
365
  "is-streaming": n.value?.isStreaming ?? !1
@@ -369,33 +369,33 @@ var di = [
369
369
  "is-streaming"
370
370
  ]));
371
371
  }
372
- }), yi = Symbol("docx-portal-class");
373
- function bi(e) {
374
- je(yi, k(() => ({
372
+ }), wi = Symbol("docx-portal-class");
373
+ function Ti(e) {
374
+ je(wi, k(() => ({
375
375
  "ep-root": !0,
376
376
  dark: !!G(e)
377
377
  })));
378
378
  }
379
- function xi() {
380
- return De(yi, k(() => ({ "ep-root": !0 })));
379
+ function Ei() {
380
+ return De(wi, k(() => ({ "ep-root": !0 })));
381
381
  }
382
382
  //#endregion
383
383
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
384
- var Si = ["aria-label"], Ci = {
384
+ var Di = ["aria-label"], Oi = {
385
385
  key: 0,
386
386
  class: "content-control-picker__items",
387
387
  role: "menu"
388
- }, wi = {
388
+ }, ki = {
389
389
  key: 0,
390
390
  class: "content-control-picker__empty"
391
- }, Ti = /*#__PURE__*/ t(/* @__PURE__ */ I({
391
+ }, Ai = /*#__PURE__*/ t(/* @__PURE__ */ I({
392
392
  __name: "ContentControlWidgetsOverlay",
393
393
  props: {
394
394
  eventRoot: {},
395
395
  view: {}
396
396
  },
397
397
  setup(e) {
398
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = xi(), s = new At(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
398
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = Ei(), s = new jt(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
399
399
  c.value = s.getSnapshot();
400
400
  });
401
401
  K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), z(() => {
@@ -414,7 +414,7 @@ var Si = ["aria-label"], Ci = {
414
414
  role: "dialog",
415
415
  "aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
416
416
  onMousedown: t[1] ||= q(() => {}, ["stop"])
417
- }, [c.value.status === "dropdown" ? (V(), N("div", Ci, [c.value.items.length === 0 ? (V(), N("div", wi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
417
+ }, [c.value.status === "dropdown" ? (V(), N("div", Oi, [c.value.items.length === 0 ? (V(), N("div", ki, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
418
418
  key: `${e.value}::${e.displayText}`,
419
419
  "class-name": "content-control-picker__item",
420
420
  type: "button",
@@ -431,9 +431,9 @@ var Si = ["aria-label"], Ci = {
431
431
  value: c.value.currentValue,
432
432
  "default-open": !0,
433
433
  onChange: d
434
- }, null, 8, ["value"])) : M("", !0)], 46, Si))]));
434
+ }, null, 8, ["value"])) : M("", !0)], 46, Di))]));
435
435
  }
436
- }), [["__scopeId", "data-v-19e067b7"]]), Ei = /* @__PURE__ */ I({
436
+ }), [["__scopeId", "data-v-19e067b7"]]), ji = /* @__PURE__ */ I({
437
437
  __name: "DecorationLayer",
438
438
  props: {
439
439
  getView: { type: Function },
@@ -468,7 +468,7 @@ var Si = ["aria-label"], Ci = {
468
468
  n.firstChild && n.replaceChildren();
469
469
  return;
470
470
  }
471
- let a = kt(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
471
+ let a = X(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
472
472
  for (let { decoration: t, from: n, to: r } of i) {
473
473
  if (n === r) {
474
474
  let r = u(t, e);
@@ -545,10 +545,10 @@ var Si = ["aria-label"], Ci = {
545
545
  "aria-hidden": "true"
546
546
  }, null, 512));
547
547
  }
548
- }), Di = { class: "doc-outline__header" }, Oi = { class: "doc-outline__body" }, ki = {
548
+ }), Mi = { class: "doc-outline__header" }, Ni = { class: "doc-outline__body" }, Pi = {
549
549
  key: 0,
550
550
  class: "doc-outline__empty"
551
- }, Ai = /*#__PURE__*/ t(/* @__PURE__ */ I({
551
+ }, Fi = /*#__PURE__*/ t(/* @__PURE__ */ I({
552
552
  __name: "DocumentOutline",
553
553
  props: {
554
554
  isOpen: { type: Boolean },
@@ -577,7 +577,7 @@ var Si = ["aria-label"], Ci = {
577
577
  role: "navigation",
578
578
  "aria-label": "Document outline",
579
579
  onMousedown: n[1] ||= q(() => {}, ["stop"])
580
- }, [P("div", Di, [P("button", {
580
+ }, [P("div", Mi, [P("button", {
581
581
  class: "doc-outline__back",
582
582
  title: "Close outline",
583
583
  "aria-label": "Close outline",
@@ -585,7 +585,7 @@ var Si = ["aria-label"], Ci = {
585
585
  }, [F(i, {
586
586
  name: "arrow_back",
587
587
  size: 20
588
- })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Oi, [e.headings.length === 0 ? (V(), N("div", ki, "No headings found")) : (V(), j(G(r), {
588
+ })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Ni, [e.headings.length === 0 ? (V(), N("div", Pi, "No headings found")) : (V(), j(G(r), {
589
589
  key: 1,
590
590
  items: o.value,
591
591
  "get-scroll-container": e.getScrollContainer ?? (() => null),
@@ -593,7 +593,7 @@ var Si = ["aria-label"], Ci = {
593
593
  "aria-label": "Document outline"
594
594
  }, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
595
595
  }
596
- }), [["__scopeId", "data-v-0797b3b1"]]), ji = /* @__PURE__ */ I({
596
+ }), [["__scopeId", "data-v-0797b3b1"]]), Ii = /* @__PURE__ */ I({
597
597
  __name: "DocxEditorDialogs",
598
598
  props: {
599
599
  view: {},
@@ -686,10 +686,10 @@ var Si = ["aria-label"], Ci = {
686
686
  }, null, 8, ["is-open", "current-watermark"])
687
687
  ], 64));
688
688
  }
689
- }), Mi = {
689
+ }), Li = {
690
690
  key: 0,
691
691
  class: "docx-editor-vue__title-bar"
692
- }, Ni = { class: "docx-editor-vue__title-bar-left" }, Pi = { class: "docx-editor-vue__title-bar-center" }, Fi = { class: "docx-editor-vue__title-bar-right" }, Ii = /* @__PURE__ */ I({
692
+ }, Ri = { class: "docx-editor-vue__title-bar-left" }, zi = { class: "docx-editor-vue__title-bar-center" }, Bi = { class: "docx-editor-vue__title-bar-right" }, Vi = /* @__PURE__ */ I({
693
693
  __name: "DocxEditorMenuBar",
694
694
  props: {
695
695
  showMenuBar: {
@@ -721,9 +721,9 @@ var Si = ["aria-label"], Ci = {
721
721
  ],
722
722
  setup(e, { emit: t }) {
723
723
  let n = t;
724
- return (t, r) => e.showMenuBar ? (V(), N("div", Mi, [
725
- P("div", Ni, [Me(t.$slots, "title-bar-left")]),
726
- P("div", Pi, [F(_, {
724
+ return (t, r) => e.showMenuBar ? (V(), N("div", Li, [
725
+ P("div", Ri, [Me(t.$slots, "title-bar-left")]),
726
+ P("div", zi, [F(_, {
727
727
  "model-value": e.documentName,
728
728
  editable: e.documentNameEditable,
729
729
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -738,28 +738,28 @@ var Si = ["aria-label"], Ci = {
738
738
  "show-help-menu",
739
739
  "show-table-insert"
740
740
  ])]),
741
- P("div", Fi, [Me(t.$slots, "title-bar-right")])
741
+ P("div", Bi, [Me(t.$slots, "title-bar-right")])
742
742
  ])) : M("", !0);
743
743
  }
744
- }), Li = ["aria-label"], Ri = { class: "image-ctx-menu__icon" }, zi = { class: "image-ctx-menu__label" }, Bi = {
744
+ }), Hi = ["aria-label"], Ui = { class: "image-ctx-menu__icon" }, Wi = { class: "image-ctx-menu__label" }, Gi = {
745
745
  key: 1,
746
746
  class: "image-ctx-menu__divider",
747
747
  role: "separator"
748
- }, Vi = [
748
+ }, Ki = [
749
749
  "data-wrap-type",
750
750
  "data-current",
751
751
  "data-disabled",
752
752
  "disabled",
753
753
  "title",
754
754
  "onClick"
755
- ], Hi = { class: "image-ctx-menu__icon" }, Ui = { class: "image-ctx-menu__label" }, Wi = ["aria-label"], Gi = ["disabled", "onClick"], Ki = { class: "image-ctx-menu__label" }, qi = {
755
+ ], qi = { class: "image-ctx-menu__icon" }, Ji = { class: "image-ctx-menu__label" }, Yi = ["aria-label"], Xi = ["disabled", "onClick"], Zi = { class: "image-ctx-menu__label" }, Qi = {
756
756
  key: 0,
757
757
  class: "image-ctx-menu__shortcut"
758
- }, Ji = {
758
+ }, $i = {
759
759
  key: 0,
760
760
  class: "image-ctx-menu__divider",
761
761
  role: "separator"
762
- }, Yi = 18, Xi = 260, Zi = 10, Qi = /*#__PURE__*/ t(/* @__PURE__ */ I({
762
+ }, ea = 18, ta = 260, na = 10, ra = /*#__PURE__*/ t(/* @__PURE__ */ I({
763
763
  __name: "ImageContextMenu",
764
764
  props: {
765
765
  state: {},
@@ -780,7 +780,7 @@ var Si = ["aria-label"], Ci = {
780
780
  function o() {
781
781
  a("open-properties"), a("close");
782
782
  }
783
- let { t: s } = r(), c = xi(), l = Nt, u = k(() => n.state ? Ft(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
783
+ let { t: s } = r(), c = Ei(), l = Ft, u = k(() => n.state ? Lt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
784
784
  inline: "wrap_text",
785
785
  squareLeft: "format_image_left",
786
786
  squareRight: "format_image_right",
@@ -792,17 +792,17 @@ var Si = ["aria-label"], Ci = {
792
792
  }
793
793
  let p = k(() => {
794
794
  if (!n.state) return {};
795
- let e = Nt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
796
- return typeof window < "u" && (t + Xi > window.innerWidth && (t = window.innerWidth - Xi - Zi), r + e > window.innerHeight && (r = window.innerHeight - e - Zi), t < Zi && (t = Zi), r < Zi && (r = Zi)), {
795
+ let e = Ft.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
796
+ return typeof window < "u" && (t + ta > window.innerWidth && (t = window.innerWidth - ta - na), r + e > window.innerHeight && (r = window.innerHeight - e - na), t < na && (t = na), r < na && (r = na)), {
797
797
  position: "fixed",
798
798
  left: `${t}px`,
799
799
  top: `${r}px`,
800
- minWidth: `${Xi}px`,
800
+ minWidth: `${ta}px`,
801
801
  zIndex: 400
802
802
  };
803
803
  });
804
804
  function m(e) {
805
- return n.state ? Lt(e, n.state.currentWrapType) : !1;
805
+ return n.state ? zt(e, n.state.currentWrapType) : !1;
806
806
  }
807
807
  function h(e) {
808
808
  m(e) && (a("select", e.choice), a("close"));
@@ -839,11 +839,11 @@ var Si = ["aria-label"], Ci = {
839
839
  "data-action": "open-properties",
840
840
  onMousedown: n[1] ||= q(() => {}, ["prevent"]),
841
841
  onClick: o
842
- }, [P("span", Ri, [F(i, {
842
+ }, [P("span", Ui, [F(i, {
843
843
  name: "settings",
844
- size: Yi
845
- })]), P("span", zi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
846
- e.canOpenProperties ? (V(), N("div", Bi)) : M("", !0),
844
+ size: ea
845
+ })]), P("span", Wi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
846
+ e.canOpenProperties ? (V(), N("div", Gi)) : M("", !0),
847
847
  (V(!0), N(D, null, U(G(l), (e) => (V(), N("button", {
848
848
  key: e.choice,
849
849
  type: "button",
@@ -857,17 +857,17 @@ var Si = ["aria-label"], Ci = {
857
857
  onMousedown: n[2] ||= q(() => {}, ["prevent"]),
858
858
  onClick: (t) => h(e)
859
859
  }, [
860
- P("span", Hi, [F(i, {
860
+ P("span", qi, [F(i, {
861
861
  name: f(e.iconHint),
862
- size: Yi
862
+ size: ea
863
863
  }, null, 8, ["name"])]),
864
- P("span", Ui, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
864
+ P("span", Ji, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
865
865
  e.choice === u.value ? (V(), N("span", {
866
866
  key: 0,
867
867
  class: "image-ctx-menu__current-dot",
868
868
  "aria-label": G(s)("imageWrap.menu.ariaLabel")
869
- }, "●", 8, Wi)) : M("", !0)
870
- ], 42, Vi))), 128)),
869
+ }, "●", 8, Yi)) : M("", !0)
870
+ ], 42, Ki))), 128)),
871
871
  e.textActions && e.textActions.length > 0 ? (V(), N(D, { key: 2 }, [n[5] ||= P("div", {
872
872
  class: "image-ctx-menu__divider",
873
873
  role: "separator"
@@ -878,16 +878,16 @@ var Si = ["aria-label"], Ci = {
878
878
  disabled: e.disabled,
879
879
  onMousedown: n[3] ||= q(() => {}, ["prevent"]),
880
880
  onClick: (t) => g(e)
881
- }, [P("span", Ki, W(e.label), 1), e.shortcut ? (V(), N("span", qi, W(e.shortcut), 1)) : M("", !0)], 40, Gi), e.dividerAfter ? (V(), N("div", Ji)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
882
- ], 46, Li)) : M("", !0)]));
881
+ }, [P("span", Zi, W(e.label), 1), e.shortcut ? (V(), N("span", Qi, W(e.shortcut), 1)) : M("", !0)], 40, Xi), e.dividerAfter ? (V(), N("div", $i)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
882
+ ], 46, Hi)) : M("", !0)]));
883
883
  }
884
- }), [["__scopeId", "data-v-fc8f35bc"]]), $i = ["disabled", "onMousedown"], ea = {
884
+ }), [["__scopeId", "data-v-fc8f35bc"]]), ia = ["disabled", "onMousedown"], aa = {
885
885
  key: 0,
886
886
  class: "ctx-menu__icon"
887
- }, ta = { class: "ctx-menu__label" }, na = {
887
+ }, oa = { class: "ctx-menu__label" }, sa = {
888
888
  key: 1,
889
889
  class: "ctx-menu__shortcut"
890
- }, ra = 220, ia = 32, aa = 10, oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
890
+ }, ca = 220, la = 32, ua = 10, da = /*#__PURE__*/ t(/* @__PURE__ */ I({
891
891
  __name: "TextContextMenu",
892
892
  props: {
893
893
  isOpen: { type: Boolean },
@@ -904,7 +904,7 @@ var Si = ["aria-label"], Ci = {
904
904
  setup(e, { emit: t }) {
905
905
  let n = e, i = ({ node: e }) => e;
906
906
  i.props = ["node"];
907
- let a = t, { t: o } = r(), s = xi(), c = H(null), l = k(() => {
907
+ let a = t, { t: o } = r(), s = Ei(), c = H(null), l = k(() => {
908
908
  let e = [], t = n.customItems ?? [];
909
909
  for (let [n, r] of t.entries()) e.push({
910
910
  id: `custom-${r.id}`,
@@ -1040,8 +1040,8 @@ var Si = ["aria-label"], Ci = {
1040
1040
  action: "deleteTable"
1041
1041
  }), e;
1042
1042
  }), u = k(() => {
1043
- 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 * ia + i * 9;
1044
- return typeof window < "u" && (e + ra + aa > window.innerWidth && (e = window.innerWidth - ra - aa), t + a + aa > window.innerHeight && (t = window.innerHeight - a - aa)), {
1043
+ 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 * la + i * 9;
1044
+ return typeof window < "u" && (e + ca + ua > window.innerWidth && (e = window.innerWidth - ca - ua), t + a + ua > window.innerHeight && (t = window.innerHeight - a - ua)), {
1045
1045
  position: "fixed",
1046
1046
  left: `${e}px`,
1047
1047
  top: `${t}px`,
@@ -1079,12 +1079,12 @@ var Si = ["aria-label"], Ci = {
1079
1079
  disabled: e.disabled,
1080
1080
  onMousedown: q((t) => d(e.action), ["prevent"])
1081
1081
  }, [
1082
- e.icon ? (V(), N("span", ea, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1083
- P("span", ta, W(e.label), 1),
1084
- e.shortcut ? (V(), N("span", na, W(e.shortcut), 1)) : M("", !0)
1085
- ], 42, $i))), 128))], 38)) : M("", !0)]));
1082
+ e.icon ? (V(), N("span", aa, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1083
+ P("span", oa, W(e.label), 1),
1084
+ e.shortcut ? (V(), N("span", sa, W(e.shortcut), 1)) : M("", !0)
1085
+ ], 42, ia))), 128))], 38)) : M("", !0)]));
1086
1086
  }
1087
- }), [["__scopeId", "data-v-c1416e84"]]), sa = /* @__PURE__ */ I({
1087
+ }), [["__scopeId", "data-v-c1416e84"]]), fa = /* @__PURE__ */ I({
1088
1088
  __name: "DocxEditorOverlays",
1089
1089
  props: {
1090
1090
  readOnly: { type: Boolean },
@@ -1103,7 +1103,7 @@ var Si = ["aria-label"], Ci = {
1103
1103
  ],
1104
1104
  setup(e, { emit: t }) {
1105
1105
  let n = t;
1106
- return (t, r) => (V(), N(D, null, [F(oa, {
1106
+ return (t, r) => (V(), N(D, null, [F(da, {
1107
1107
  "is-open": e.contextMenu.isOpen,
1108
1108
  position: e.contextMenu.position,
1109
1109
  "has-selection": e.contextMenu.hasSelection,
@@ -1125,7 +1125,7 @@ var Si = ["aria-label"], Ci = {
1125
1125
  "can-merge-cells",
1126
1126
  "can-split-cell",
1127
1127
  "custom-items"
1128
- ]), F(Qi, {
1128
+ ]), F(ra, {
1129
1129
  state: e.imageContextMenu,
1130
1130
  "text-actions": e.imageContextMenuTextActions,
1131
1131
  "can-open-properties": e.canOpenImageProperties,
@@ -1142,7 +1142,7 @@ var Si = ["aria-label"], Ci = {
1142
1142
  });
1143
1143
  //#endregion
1144
1144
  //#region src/composables/imageOverlayRect.ts
1145
- function ca(e) {
1145
+ function pa(e) {
1146
1146
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
1147
1147
  return {
1148
1148
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -1153,13 +1153,13 @@ function ca(e) {
1153
1153
  }
1154
1154
  //#endregion
1155
1155
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
1156
- var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1156
+ var ma = ["data-handle", "onMousedown"], ha = ["title"], ga = {
1157
1157
  key: 0,
1158
1158
  class: "image-overlay__dim"
1159
- }, fa = {
1159
+ }, _a = {
1160
1160
  key: 1,
1161
1161
  class: "image-overlay__dim image-overlay__dim--rotate"
1162
- }, pa = 4, ma = 15, ha = 250, ga = 700, _a = /*#__PURE__*/ t(/* @__PURE__ */ I({
1162
+ }, va = 4, ya = 15, ba = 250, xa = 700, Sa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1163
1163
  __name: "ImageSelectionOverlay",
1164
1164
  props: {
1165
1165
  imageInfo: {},
@@ -1197,8 +1197,8 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1197
1197
  if (e.element.isConnected) return e.element;
1198
1198
  let t = re();
1199
1199
  if (!t) return null;
1200
- let n = Jt(t, e.pmPos);
1201
- return n ? It(n) : null;
1200
+ let n = Xt(t, e.pmPos);
1201
+ return n ? Rt(n) : null;
1202
1202
  }
1203
1203
  function S() {
1204
1204
  let e = ie();
@@ -1212,7 +1212,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1212
1212
  return;
1213
1213
  }
1214
1214
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
1215
- p.value = ca({
1215
+ p.value = pa({
1216
1216
  imageRect: r,
1217
1217
  parentRect: n,
1218
1218
  scrollLeft: t.scrollLeft,
@@ -1230,10 +1230,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1230
1230
  let o = a - r;
1231
1231
  S();
1232
1232
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
1233
- n = c === t ? n + 1 : 0, t = c, !(o >= ha && n >= 2) && o < ga && (e = requestAnimationFrame(i));
1233
+ n = c === t ? n + 1 : 0, t = c, !(o >= ba && n >= 2) && o < xa && (e = requestAnimationFrame(i));
1234
1234
  };
1235
1235
  e = requestAnimationFrame(i);
1236
- let a = setTimeout(S, ha);
1236
+ let a = setTimeout(S, ba);
1237
1237
  oe = () => {
1238
1238
  cancelAnimationFrame(e), clearTimeout(a);
1239
1239
  };
@@ -1358,7 +1358,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1358
1358
  !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", fe), document.addEventListener("mouseup", w));
1359
1359
  }
1360
1360
  function fe(e) {
1361
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Ut(m, n, r, _, v, a);
1361
+ let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Gt(m, n, r, _, v, a);
1362
1362
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1363
1363
  let s = y;
1364
1364
  if (s) {
@@ -1378,7 +1378,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1378
1378
  S();
1379
1379
  return;
1380
1380
  }
1381
- let n = Kt(e, t.pmPos, u.value, d.value);
1381
+ let n = Jt(e, t.pmPos, u.value, d.value);
1382
1382
  n !== null && Ce(n), ke(() => S());
1383
1383
  }
1384
1384
  let pe = 0, me = 0, he = 0, ge = 0, T = null, E = null;
@@ -1401,7 +1401,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1401
1401
  }
1402
1402
  function xe(e) {
1403
1403
  let t = ye(e.clientX, e.clientY) - he, n = ge + t;
1404
- e.shiftKey || (n = Math.round(n / ma) * ma), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
1404
+ e.shiftKey || (n = Math.round(n / ya) * ya), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
1405
1405
  }
1406
1406
  function Se() {
1407
1407
  document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Se), l.value = !1, a("interact-end");
@@ -1422,7 +1422,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1422
1422
  if (!i.imageInfo || !p.value) return;
1423
1423
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1424
1424
  let s = e.clientX - t, l = e.clientY - n;
1425
- if (!(!o && Math.sqrt(s * s + l * l) < pa)) {
1425
+ if (!(!o && Math.sqrt(s * s + l * l) < va)) {
1426
1426
  if (!o) {
1427
1427
  o = !0, c.value = !0, a("interact-start"), O = document.createElement("div"), O.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);";
1428
1428
  let e = i.zoom;
@@ -1444,7 +1444,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1444
1444
  let a = te(n, r.pmPos);
1445
1445
  if (!a) return;
1446
1446
  let s;
1447
- if (qt(a)) {
1447
+ if (Yt(a)) {
1448
1448
  let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1449
1449
  if (!a || a.length === 0) return;
1450
1450
  let c = null;
@@ -1460,21 +1460,21 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1460
1460
  c = e ? e.querySelector(".layout-page-content") : null;
1461
1461
  }
1462
1462
  if (!c) return;
1463
- let l = c.getBoundingClientRect(), u = i.zoom, d = Mt((e - l.left) / u), f = Mt((t - l.top) / u);
1464
- s = Wt(n, r.pmPos, d, f);
1463
+ let l = c.getBoundingClientRect(), u = i.zoom, d = Pt((e - l.left) / u), f = Pt((t - l.top) / u);
1464
+ s = Kt(n, r.pmPos, d, f);
1465
1465
  } else {
1466
1466
  let i = re();
1467
1467
  if (!i) return;
1468
- let a = Vt(i, e, t, 1);
1468
+ let a = Ut(i, e, t, 1);
1469
1469
  if (a == null || a < 0) return;
1470
- s = Gt(n, r.pmPos, a);
1470
+ s = qt(n, r.pmPos, a);
1471
1471
  }
1472
1472
  s !== null && Ce(s), ke(() => S());
1473
1473
  }
1474
1474
  function Ce(e) {
1475
1475
  let t = i.view;
1476
1476
  if (t) try {
1477
- let n = X.create(t.state.doc, e);
1477
+ let n = Mt.create(t.state.doc, e);
1478
1478
  t.dispatch(t.state.tr.setSelection(n));
1479
1479
  } catch {}
1480
1480
  }
@@ -1501,19 +1501,19 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1501
1501
  style: R(e.style),
1502
1502
  "data-handle": e.pos,
1503
1503
  onMousedown: q((t) => de(t, e.pos), ["prevent", "stop"])
1504
- }, null, 44, la))), 128)),
1504
+ }, null, 44, ma))), 128)),
1505
1505
  r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
1506
1506
  P("div", {
1507
1507
  class: "image-overlay__rotate-handle",
1508
1508
  style: R({ left: `${C.value / 2 - 7}px` }),
1509
1509
  title: G(n)("imageOverlay.rotate"),
1510
1510
  onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
1511
- }, null, 44, ua),
1512
- s.value ? (V(), N("div", da, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1513
- l.value ? (V(), N("div", fa, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1511
+ }, null, 44, ha),
1512
+ s.value ? (V(), N("div", ga, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1513
+ l.value ? (V(), N("div", _a, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1514
1514
  ], 36)) : M("", !0);
1515
1515
  }
1516
- }), [["__scopeId", "data-v-4c3d1a1d"]]), va = /* @__PURE__ */ I({
1516
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), Ca = /* @__PURE__ */ I({
1517
1517
  __name: "HeaderFooterSelectionOverlay",
1518
1518
  props: {
1519
1519
  pagesContainer: {},
@@ -1523,11 +1523,11 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1523
1523
  zoom: {}
1524
1524
  },
1525
1525
  setup(e) {
1526
- let t = e, n = new $t(), r = () => {
1526
+ let t = e, n = new tn(), r = () => {
1527
1527
  if (!t.pagesContainer) return;
1528
1528
  n.sync(t.pagesContainer, t.selection, t.zoom);
1529
1529
  let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
1530
- Zt({
1530
+ $t({
1531
1531
  hiddenHost: t.hiddenContainer,
1532
1532
  editorView: t.editorView,
1533
1533
  visibleCaret: e ? {
@@ -1537,8 +1537,8 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1537
1537
  });
1538
1538
  };
1539
1539
  K(() => t.pagesContainer, (e, t, i) => {
1540
- e && (e.addEventListener(Qt, r), r(), i(() => {
1541
- e.removeEventListener(Qt, r), n.clear(e);
1540
+ e && (e.addEventListener(en, r), r(), i(() => {
1541
+ e.removeEventListener(en, r), n.clear(e);
1542
1542
  }));
1543
1543
  }, { immediate: !0 }), K(() => [
1544
1544
  t.selection?.rId,
@@ -1560,10 +1560,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1560
1560
  });
1561
1561
  }, o = typeof window > "u" ? null : window;
1562
1562
  return o?.addEventListener("scroll", a, !0), B(() => {
1563
- i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Xt(t.hiddenContainer);
1563
+ i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Qt(t.hiddenContainer);
1564
1564
  }), (e, t) => null;
1565
1565
  }
1566
- }), ya = { class: "hf-editor-label" }, ba = /*#__PURE__*/ t(/* @__PURE__ */ I({
1566
+ }), wa = { class: "hf-editor-label" }, Ta = /*#__PURE__*/ t(/* @__PURE__ */ I({
1567
1567
  __name: "InlineHeaderFooterEditor",
1568
1568
  props: {
1569
1569
  edit: {},
@@ -1581,7 +1581,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1581
1581
  zIndex: 10
1582
1582
  })), u = (e) => {
1583
1583
  s.value = !1;
1584
- let t = n.getView(), r = Xe.nodes.field;
1584
+ let t = n.getView(), r = J.nodes.field;
1585
1585
  if (!t || !r) return;
1586
1586
  let { $from: i, from: a } = t.state.selection, o = t.state.storedMarks ?? i.marks(), c = r.create({
1587
1587
  fieldType: e,
@@ -1606,7 +1606,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1606
1606
  class: "hf-inline-editor",
1607
1607
  style: R(l.value),
1608
1608
  role: "presentation"
1609
- }, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", ya, W(c.value), 1), P("div", {
1609
+ }, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", wa, W(c.value), 1), P("div", {
1610
1610
  class: "hf-options",
1611
1611
  onMousedown: n[5] ||= q(() => {}, ["stop"])
1612
1612
  }, [F(G(a), {
@@ -1656,7 +1656,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1656
1656
  })
1657
1657
  ], 2)) : M("", !0)], 32)], 2)], 4));
1658
1658
  }
1659
- }), [["__scopeId", "data-v-a0bd3730"]]), xa = ["title", "aria-label"], Sa = /* @__PURE__ */ I({
1659
+ }), [["__scopeId", "data-v-a0bd3730"]]), Ea = ["title", "aria-label"], Da = /* @__PURE__ */ I({
1660
1660
  __name: "OutlineToggleButton",
1661
1661
  props: {
1662
1662
  leftOffset: {},
@@ -1679,9 +1679,9 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1679
1679
  }, [F(i, {
1680
1680
  name: "format_list_bulleted",
1681
1681
  size: 20
1682
- })], 44, xa));
1682
+ })], 44, Ea));
1683
1683
  }
1684
- }), Ca = /*#__PURE__*/ t(/* @__PURE__ */ I({
1684
+ }), Oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1685
1685
  __name: "PageIndicator",
1686
1686
  props: {
1687
1687
  currentPage: {},
@@ -1700,7 +1700,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1700
1700
  total: e.totalPages
1701
1701
  })), 5));
1702
1702
  }
1703
- }), [["__scopeId", "data-v-f1904974"]]), wa = ["data-folio-block-id"], Ta = ["data-folio-block-id", "title"], Ea = 2.5, Da = 5, Oa = 6, ka = 2, Aa = 2, ja = /*#__PURE__*/ t(/* @__PURE__ */ I({
1703
+ }), [["__scopeId", "data-v-f1904974"]]), ka = ["data-folio-block-id"], Aa = ["data-folio-block-id", "title"], ja = 2.5, Ma = 5, Na = 6, Pa = 2, Fa = 2, Ia = /*#__PURE__*/ t(/* @__PURE__ */ I({
1704
1704
  __name: "TemplateDirectivesOverlay",
1705
1705
  props: {
1706
1706
  getView: { type: Function },
@@ -1714,19 +1714,19 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1714
1714
  setup(e) {
1715
1715
  let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
1716
1716
  function a(e) {
1717
- let t = e - Oa - Ea - ka;
1718
- return t <= 0 ? 0 : Math.floor(t / Da);
1717
+ let t = e - Na - ja - Pa;
1718
+ return t <= 0 ? 0 : Math.floor(t / Ma);
1719
1719
  }
1720
1720
  function o(e, t, n) {
1721
1721
  let r = a(n), i = Math.min(Math.max(0, e), r);
1722
- return t - Oa - Ea - (r - i) * Da;
1722
+ return t - Na - ja - (r - i) * Ma;
1723
1723
  }
1724
1724
  function s(e, t) {
1725
- if (t.length === 0) return e.bottom - e.top >= Aa ? [e] : [];
1725
+ if (t.length === 0) return e.bottom - e.top >= Fa ? [e] : [];
1726
1726
  let n = [];
1727
1727
  for (let r of t) {
1728
1728
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1729
- i - t >= Aa && n.push({
1729
+ i - t >= Fa && n.push({
1730
1730
  top: t,
1731
1731
  bottom: i
1732
1732
  });
@@ -1791,7 +1791,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1791
1791
  }
1792
1792
  return i;
1793
1793
  }
1794
- let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ = lt(), v = null;
1794
+ let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ = dt(), v = null;
1795
1795
  function y() {
1796
1796
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1797
1797
  v = null, b();
@@ -1803,12 +1803,12 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1803
1803
  f.value = [], p.value = [], m.value = null, h.value = null;
1804
1804
  return;
1805
1805
  }
1806
- let a = tn(i);
1806
+ let a = rn(i);
1807
1807
  if (a.length === 0) {
1808
1808
  f.value = [], p.value = [], m.value = null, h.value = null;
1809
1809
  return;
1810
1810
  }
1811
- let o = ut(r, t.zoom), s = await dt(a, {
1811
+ let o = ft(r, t.zoom), s = await pt(a, {
1812
1812
  pagesContainer: r,
1813
1813
  zoom: t.zoom,
1814
1814
  layout: t.layout,
@@ -1888,10 +1888,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1888
1888
  position: "absolute",
1889
1889
  left: `${t.railX * e.zoom}px`,
1890
1890
  top: `${n.top * e.zoom}px`,
1891
- width: `${Ea * e.zoom}px`,
1891
+ width: `${ja * e.zoom}px`,
1892
1892
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1893
1893
  })
1894
- }, null, 14, wa))), 128))], 64))), 128)), (V(!0), N(D, null, U(p.value, (t, n) => (V(), N(D, { key: `d:${n}` }, [(V(!0), N(D, null, U(t.rects, (r, i) => (V(), N("span", {
1894
+ }, null, 14, ka))), 128))], 64))), 128)), (V(!0), N(D, null, U(p.value, (t, n) => (V(), N(D, { key: `d:${n}` }, [(V(!0), N(D, null, U(t.rects, (r, i) => (V(), N("span", {
1895
1895
  key: `d:${n}:${i}`,
1896
1896
  class: L(se(t.range)),
1897
1897
  "data-folio-block-id": S(t.range),
@@ -1903,9 +1903,14 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1903
1903
  width: `${(r.width + 2) * e.zoom}px`,
1904
1904
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1905
1905
  })
1906
- }, null, 14, Ta))), 128))], 64))), 128))], 32));
1906
+ }, null, 14, Aa))), 128))], 64))), 128))], 32));
1907
1907
  }
1908
- }), [["__scopeId", "data-v-101928bf"]]), Ma = ["href", "title"], Na = ["title"], Pa = ["title"], Fa = ["title"], Ia = { class: "docx-hyperlink-popup__edit-row" }, La = ["placeholder", "onKeydown"], Ra = { class: "docx-hyperlink-popup__edit-row" }, za = ["onKeydown"], Ba = ["disabled"], Va = /*#__PURE__*/ t(/* @__PURE__ */ I({
1908
+ }), [["__scopeId", "data-v-101928bf"]]), La = [
1909
+ "href",
1910
+ "rel",
1911
+ "target",
1912
+ "title"
1913
+ ], Ra = ["title"], za = ["title"], Ba = ["title"], Va = { class: "docx-hyperlink-popup__edit-row" }, Ha = ["placeholder", "onKeydown"], Ua = { class: "docx-hyperlink-popup__edit-row" }, Wa = ["onKeydown"], Ga = ["disabled"], Ka = /*#__PURE__*/ t(/* @__PURE__ */ I({
1909
1914
  __name: "HyperlinkPopup",
1910
1915
  props: {
1911
1916
  data: {},
@@ -1919,68 +1924,70 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1919
1924
  "close"
1920
1925
  ],
1921
1926
  setup(e, { emit: t }) {
1922
- let { t: n } = r(), i = e, a = t, o = H(!1), s = H(""), c = H(""), l = H(null), u = k(() => ({
1923
- left: (i.data?.position.left ?? 0) + "px",
1924
- top: (i.data?.position.top ?? 0) + "px"
1927
+ let { t: n } = r(), i = un(void 0), a = e, o = t, s = H(!1), c = H(""), l = H(""), u = H(null), d = k(() => ({
1928
+ left: (a.data?.position.left ?? 0) + "px",
1929
+ top: (a.data?.position.top ?? 0) + "px"
1925
1930
  }));
1926
- K(() => i.data?.href, () => {
1927
- o.value = !1;
1931
+ K(() => a.data?.href, () => {
1932
+ s.value = !1;
1928
1933
  });
1929
- let d = null, f = null;
1930
- function p() {
1931
- f &&= (clearTimeout(f), null), d &&= (document.removeEventListener("mousedown", d), null);
1932
- }
1933
- K(() => i.data, (e) => {
1934
- p(), e && (d = (e) => {
1935
- let t = l.value, n = e.target;
1936
- t && n instanceof Node && !t.contains(n) && a("close");
1937
- }, f = setTimeout(() => {
1938
- d && document.addEventListener("mousedown", d);
1939
- }, 0));
1940
- }, { immediate: !0 }), z(p);
1934
+ let f = null, p = null;
1941
1935
  function m() {
1942
- i.data && (s.value = i.data.displayText, c.value = i.data.href, o.value = !0);
1936
+ p &&= (clearTimeout(p), null), f &&= (document.removeEventListener("mousedown", f), null);
1943
1937
  }
1938
+ K(() => a.data, (e) => {
1939
+ m(), e && (f = (e) => {
1940
+ let t = u.value, n = e.target;
1941
+ t && n instanceof Node && !t.contains(n) && o("close");
1942
+ }, p = setTimeout(() => {
1943
+ f && document.addEventListener("mousedown", f);
1944
+ }, 0));
1945
+ }, { immediate: !0 }), z(m);
1944
1946
  function h() {
1945
- c.value.trim() && (a("edit", s.value, c.value), o.value = !1);
1947
+ a.data && (c.value = a.data.displayText, l.value = a.data.href, s.value = !0);
1946
1948
  }
1947
1949
  function g() {
1948
- i.data && (a("copy", i.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(i.data.href).catch(() => {}));
1950
+ l.value.trim() && (o("edit", c.value, l.value), s.value = !1);
1951
+ }
1952
+ function _() {
1953
+ a.data && (o("copy", a.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(a.data.href).catch(() => {}));
1949
1954
  }
1950
1955
  return (t, r) => e.data ? (V(), N("div", {
1951
1956
  key: 0,
1952
1957
  ref_key: "popupRef",
1953
- ref: l,
1954
- class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
1955
- style: R(u.value),
1958
+ ref: u,
1959
+ class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
1960
+ style: R(d.value),
1956
1961
  onMousedown: r[6] ||= q(() => {}, ["stop"])
1957
- }, [o.value ? (V(), N(D, { key: 1 }, [P("div", Ia, [Le(P("input", {
1962
+ }, [s.value ? (V(), N(D, { key: 1 }, [P("div", Va, [Le(P("input", {
1958
1963
  class: "docx-hyperlink-popup__input",
1959
1964
  placeholder: G(n)("displayText"),
1960
- "onUpdate:modelValue": r[2] ||= (e) => s.value = e,
1961
- onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
1962
- }, null, 40, La), [[Pe, s.value]])]), P("div", Ra, [Le(P("input", {
1965
+ "onUpdate:modelValue": r[2] ||= (e) => c.value = e,
1966
+ onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
1967
+ }, null, 40, Ha), [[Pe, c.value]])]), P("div", Ua, [Le(P("input", {
1963
1968
  class: "docx-hyperlink-popup__input",
1964
1969
  placeholder: "https://...",
1965
- "onUpdate:modelValue": r[4] ||= (e) => c.value = e,
1966
- onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
1967
- }, null, 40, za), [[Pe, c.value]]), P("button", {
1970
+ "onUpdate:modelValue": r[4] ||= (e) => l.value = e,
1971
+ onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
1972
+ }, null, 40, Wa), [[Pe, l.value]]), P("button", {
1968
1973
  class: "docx-hyperlink-popup__apply",
1969
- disabled: !c.value.trim(),
1970
- onClick: q(h, ["prevent"])
1971
- }, W(G(n)("common.apply")), 9, Ba)])], 64)) : (V(), N(D, { key: 0 }, [
1972
- r[10] ||= we("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-366df18c><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-366df18c><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-366df18c></circle><path d=\"M2 12h20\" data-v-366df18c></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-366df18c></path></svg></span>", 1),
1974
+ disabled: !l.value.trim(),
1975
+ onClick: q(g, ["prevent"])
1976
+ }, W(G(n)("common.apply")), 9, Ga)])], 64)) : (V(), N(D, { key: 0 }, [
1977
+ r[10] ||= we("<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),
1973
1978
  P("a", {
1974
1979
  class: "docx-hyperlink-popup__url",
1975
1980
  href: e.data.href,
1981
+ rel: G(i).rel,
1982
+ target: G(i).target,
1976
1983
  title: e.data.href,
1977
1984
  onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
1978
- }, W(e.data.href), 9, Ma),
1985
+ }, W(e.data.href), 9, La),
1979
1986
  r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1980
1987
  P("button", {
1981
1988
  class: "docx-hyperlink-popup__btn",
1982
1989
  title: G(n)("copyLink"),
1983
- onClick: q(g, ["prevent"])
1990
+ onClick: q(_, ["prevent"])
1984
1991
  }, [...r[7] ||= [P("svg", {
1985
1992
  width: "18",
1986
1993
  height: "18",
@@ -1997,12 +2004,12 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1997
2004
  height: "13",
1998
2005
  rx: "2",
1999
2006
  ry: "2"
2000
- }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Na),
2007
+ }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Ra),
2001
2008
  e.readOnly ? M("", !0) : (V(), N("button", {
2002
2009
  key: 0,
2003
2010
  class: "docx-hyperlink-popup__btn",
2004
2011
  title: G(n)("editLink"),
2005
- onClick: q(m, ["prevent"])
2012
+ onClick: q(h, ["prevent"])
2006
2013
  }, [...r[8] ||= [P("svg", {
2007
2014
  width: "18",
2008
2015
  height: "18",
@@ -2012,43 +2019,43 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
2012
2019
  "stroke-width": "2",
2013
2020
  "stroke-linecap": "round",
2014
2021
  "stroke-linejoin": "round"
2015
- }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, Pa)),
2022
+ }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, za)),
2016
2023
  e.readOnly ? M("", !0) : (V(), N("button", {
2017
2024
  key: 1,
2018
2025
  class: "docx-hyperlink-popup__btn",
2019
2026
  title: G(n)("removeLink"),
2020
2027
  onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
2021
- }, [...r[9] ||= [we("<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-366df18c><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-366df18c></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-366df18c></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-366df18c></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-366df18c></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-366df18c></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-366df18c></line></svg>", 1)]], 8, Fa))
2028
+ }, [...r[9] ||= [we("<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, Ba))
2022
2029
  ], 64))], 38)) : M("", !0);
2023
2030
  }
2024
- }), [["__scopeId", "data-v-366df18c"]]);
2031
+ }), [["__scopeId", "data-v-370ef571"]]);
2025
2032
  //#endregion
2026
2033
  //#region src/composables/commentMarks.ts
2027
- function Ha(e, t) {
2034
+ function qa(e, t) {
2028
2035
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
2029
2036
  return n === r ? null : {
2030
2037
  from: n,
2031
2038
  to: r
2032
2039
  };
2033
2040
  }
2034
- function Ua({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2041
+ function Ja({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2035
2042
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
2036
- return i ? Ha(e, i) : null;
2043
+ return i ? qa(e, i) : null;
2037
2044
  }
2038
- function Wa(e, t, n, r) {
2039
- let i = e.state.schema.marks.comment, a = Ha(e.state.doc.content.size, t);
2045
+ function Ya(e, t, n, r) {
2046
+ let i = e.state.schema.marks.comment, a = qa(e.state.doc.content.size, t);
2040
2047
  if (!i || !a) return !1;
2041
2048
  let o = e.state.tr;
2042
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: cn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(jt.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2049
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: pn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Nt.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2043
2050
  }
2044
- function Ga(e, t) {
2045
- let n = e.state.schema.marks.comment, r = Ha(e.state.doc.content.size, t);
2046
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: cn })));
2051
+ function Xa(e, t) {
2052
+ let n = e.state.schema.marks.comment, r = qa(e.state.doc.content.size, t);
2053
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: pn })));
2047
2054
  }
2048
2055
  //#endregion
2049
2056
  //#region src/composables/useCommentLifecycle.ts
2050
- var Ka = 408, qa = 12;
2051
- function Ja(e) {
2057
+ var Za = 408, Qa = 12;
2058
+ function $a(e) {
2052
2059
  let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
2053
2060
  function o(t) {
2054
2061
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -2081,7 +2088,7 @@ function Ja(e) {
2081
2088
  r.value = null;
2082
2089
  return;
2083
2090
  }
2084
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + qa : l.width / 2 + Ka;
2091
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Qa : l.width / 2 + Za;
2085
2092
  r.value = {
2086
2093
  top: c.top - l.top,
2087
2094
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -2092,7 +2099,7 @@ function Ja(e) {
2092
2099
  function c() {
2093
2100
  let s = e.editorView.value;
2094
2101
  if (!s) return;
2095
- let c = r.value, l = s.state.selection, u = Ua({
2102
+ let c = r.value, l = s.state.selection, u = Ja({
2096
2103
  docSize: s.state.doc.content.size,
2097
2104
  capturedRange: c ? {
2098
2105
  from: c.from,
@@ -2111,7 +2118,7 @@ function Ja(e) {
2111
2118
  r.value = null;
2112
2119
  return;
2113
2120
  }
2114
- if (!Wa(s, u, cn, { selectEnd: !0 })) {
2121
+ if (!Ya(s, u, pn, { selectEnd: !0 })) {
2115
2122
  r.value = null, i.value = null;
2116
2123
  return;
2117
2124
  }
@@ -2124,11 +2131,11 @@ function Ja(e) {
2124
2131
  let n = e.editorView.value, r = i.value;
2125
2132
  if (!n || !r) return !1;
2126
2133
  let a = e.createComment(t);
2127
- return Wa(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2134
+ return Ya(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2128
2135
  }
2129
2136
  function d() {
2130
2137
  let t = e.editorView.value;
2131
- t && i.value && Ga(t, i.value), l();
2138
+ t && i.value && Xa(t, i.value), l();
2132
2139
  }
2133
2140
  return {
2134
2141
  isAddingComment: t,
@@ -2142,8 +2149,8 @@ function Ja(e) {
2142
2149
  }
2143
2150
  //#endregion
2144
2151
  //#region src/composables/useCommentManagement.ts
2145
- function Ya(e) {
2146
- let t = ln(), n = H([]), r = H(!1);
2152
+ function eo(e) {
2153
+ let t = mn(), n = H([]), r = H(!1);
2147
2154
  function i() {
2148
2155
  r.value = !0;
2149
2156
  }
@@ -2158,12 +2165,12 @@ function Ya(e) {
2158
2165
  i(), c([...s.value, e]);
2159
2166
  }
2160
2167
  function u(n, r, i) {
2161
- return un(t, s.value, e.editorView.value), dn(t, n, i ?? e.author(), r);
2168
+ return hn(t, s.value, e.editorView.value), gn(t, n, i ?? e.author(), r);
2162
2169
  }
2163
2170
  function d() {
2164
2171
  if (a(), o.value) return;
2165
2172
  let n = e.getDocument()?.package.document.comments;
2166
- un(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2173
+ hn(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2167
2174
  }
2168
2175
  function f(e, t) {
2169
2176
  l(u(t, e));
@@ -2188,7 +2195,7 @@ function Ya(e) {
2188
2195
  }
2189
2196
  function _(t, n) {
2190
2197
  let r = e.editorView.value;
2191
- r && (n ? fn : vn)(t)(r.state, r.dispatch);
2198
+ r && (n ? _n : $)(t)(r.state, r.dispatch);
2192
2199
  }
2193
2200
  function v(e) {
2194
2201
  _(e, !0);
@@ -2198,11 +2205,11 @@ function Ya(e) {
2198
2205
  }
2199
2206
  function b(t, n) {
2200
2207
  let r = e.editorView.value;
2201
- r && pn(t, n)(r.state, r.dispatch);
2208
+ r && vn(t, n)(r.state, r.dispatch);
2202
2209
  }
2203
2210
  function x(t, n) {
2204
2211
  let r = e.editorView.value;
2205
- r && yn(t, n)(r.state, r.dispatch);
2212
+ r && Sn(t, n)(r.state, r.dispatch);
2206
2213
  }
2207
2214
  return {
2208
2215
  comments: s,
@@ -2225,8 +2232,8 @@ function Ya(e) {
2225
2232
  }
2226
2233
  //#endregion
2227
2234
  //#region src/utils/imageClipboard.ts
2228
- function Xa(e, t, n) {
2229
- let r = Q(e.state), i = e.state.schema.marks.insertion;
2235
+ function to(e, t, n) {
2236
+ let r = wn(e.state), i = e.state.schema.marks.insertion;
2230
2237
  if (!r || !i) return;
2231
2238
  let a = t.selection.from, o = a - n.nodeSize;
2232
2239
  o < 0 || t.addMark(o, a, i.create({
@@ -2235,7 +2242,7 @@ function Xa(e, t, n) {
2235
2242
  date: r.date
2236
2243
  }));
2237
2244
  }
2238
- function Za(e, t) {
2245
+ function no(e, t) {
2239
2246
  let n = e.state.doc.nodeAt(t);
2240
2247
  if (!n || n.type.name !== "image") return;
2241
2248
  let r = n.attrs.src;
@@ -2249,7 +2256,7 @@ function Za(e, t) {
2249
2256
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
2250
2257
  });
2251
2258
  }
2252
- function Qa(e) {
2259
+ function ro(e) {
2253
2260
  return new Promise((t, n) => {
2254
2261
  let r = new FileReader();
2255
2262
  r.onload = () => {
@@ -2257,7 +2264,7 @@ function Qa(e) {
2257
2264
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
2258
2265
  });
2259
2266
  }
2260
- function $a(e) {
2267
+ function io(e) {
2261
2268
  return new Promise((t) => {
2262
2269
  let n = new Image();
2263
2270
  n.onload = () => t({
@@ -2269,7 +2276,7 @@ function $a(e) {
2269
2276
  }), n.src = e;
2270
2277
  });
2271
2278
  }
2272
- function eo(e, t, n, r) {
2279
+ function ao(e, t, n, r) {
2273
2280
  let i = e.state.schema.nodes.image;
2274
2281
  if (!i) return;
2275
2282
  let a = i.create({
@@ -2280,23 +2287,23 @@ function eo(e, t, n, r) {
2280
2287
  wrapType: "inline",
2281
2288
  displayMode: "inline"
2282
2289
  }), o = e.state.tr.replaceSelectionWith(a);
2283
- Xa(e, o, a), e.dispatch(o);
2290
+ to(e, o, a), e.dispatch(o);
2284
2291
  }
2285
- async function to(e) {
2292
+ async function oo(e) {
2286
2293
  try {
2287
2294
  let t = await navigator.clipboard.read();
2288
2295
  for (let n of t) {
2289
2296
  let t = n.types.find((e) => e.startsWith("image/"));
2290
2297
  if (t) {
2291
- let r = await Qa(await n.getType(t)), i = await $a(r), a = i.width, o = i.height;
2292
- a > 612 && (o = Math.round(612 / a * o), a = 612), eo(e, r, a, o);
2298
+ let r = await ro(await n.getType(t)), i = await io(r), a = i.width, o = i.height;
2299
+ a > 612 && (o = Math.round(612 / a * o), a = 612), ao(e, r, a, o);
2293
2300
  return;
2294
2301
  }
2295
2302
  if (n.types.includes("text/html")) {
2296
2303
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
2297
2304
  if (r) {
2298
2305
  let n = /data-width="(?<w>\d+)"/u.exec(t)?.groups?.w, i = /data-height="(?<h>\d+)"/u.exec(t)?.groups?.h, a = n ? Number(n) : 200, o = i ? Number(i) : 200;
2299
- eo(e, r, a || 200, o || 200);
2306
+ ao(e, r, a || 200, o || 200);
2300
2307
  return;
2301
2308
  }
2302
2309
  }
@@ -2317,14 +2324,14 @@ async function to(e) {
2317
2324
  }
2318
2325
  }
2319
2326
  }
2320
- function no(e, t) {
2327
+ function so(e, t) {
2321
2328
  let n = e.state.doc.nodeAt(t);
2322
2329
  if (!n || n.type.name !== "image") return;
2323
2330
  let r = document.createElement("input");
2324
2331
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
2325
2332
  let i = r.files?.[0];
2326
2333
  if (!i) return;
2327
- let a = await Qa(i), o = await $a(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
2334
+ let a = await ro(i), o = await io(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
2328
2335
  try {
2329
2336
  let r = e.state.tr.setNodeMarkup(t, void 0, {
2330
2337
  ...n.attrs,
@@ -2339,7 +2346,7 @@ function no(e, t) {
2339
2346
  }
2340
2347
  //#endregion
2341
2348
  //#region src/composables/useContextMenus.ts
2342
- var ro = /* @__PURE__ */ new Set([
2349
+ var co = /* @__PURE__ */ new Set([
2343
2350
  "inline",
2344
2351
  "square",
2345
2352
  "tight",
@@ -2348,16 +2355,16 @@ var ro = /* @__PURE__ */ new Set([
2348
2355
  "behind",
2349
2356
  "inFront"
2350
2357
  ]);
2351
- function io(e) {
2352
- return typeof e == "string" && ro.has(e);
2358
+ function lo(e) {
2359
+ return typeof e == "string" && co.has(e);
2353
2360
  }
2354
- function ao(e) {
2355
- return io(e) ? e : "inline";
2361
+ function uo(e) {
2362
+ return lo(e) ? e : "inline";
2356
2363
  }
2357
- function oo(e) {
2364
+ function fo(e) {
2358
2365
  return e === "left" || e === "right" || e === "none" ? e : null;
2359
2366
  }
2360
- function so(e) {
2367
+ function po(e) {
2361
2368
  let { t } = r(), n = H({
2362
2369
  isOpen: !1,
2363
2370
  position: {
@@ -2399,7 +2406,7 @@ function so(e) {
2399
2406
  t(e.state, (t) => e.dispatch(t), e);
2400
2407
  }
2401
2408
  function l(t, n, r, i, a) {
2402
- let o = i === "inline" ? Pt(t, e.zoom.value) : void 0;
2409
+ let o = i === "inline" ? It(t, e.zoom.value) : void 0;
2403
2410
  return {
2404
2411
  open: !0,
2405
2412
  position: r,
@@ -2412,12 +2419,12 @@ function so(e) {
2412
2419
  function u(t) {
2413
2420
  let r = e.editorView.value;
2414
2421
  if (!r) return;
2415
- let o = It(t.target);
2422
+ let o = Rt(t.target);
2416
2423
  if (o) {
2417
2424
  let a = Number(o.dataset.pmStart);
2418
2425
  if (!Number.isNaN(a)) {
2419
2426
  try {
2420
- let e = X.create(r.state.doc, a);
2427
+ let e = Mt.create(r.state.doc, a);
2421
2428
  r.dispatch(r.state.tr.setSelection(e));
2422
2429
  } catch {}
2423
2430
  e.selectedImage.value = {
@@ -2431,7 +2438,7 @@ function so(e) {
2431
2438
  i.value = l(o, a, {
2432
2439
  x: t.clientX,
2433
2440
  y: t.clientY
2434
- }, ao(s.attrs.wrapType), oo(s.attrs.cssFloat)), n.value.isOpen = !1;
2441
+ }, uo(s.attrs.wrapType), fo(s.attrs.cssFloat)), n.value.isOpen = !1;
2435
2442
  return;
2436
2443
  }
2437
2444
  }
@@ -2442,7 +2449,7 @@ function so(e) {
2442
2449
  e.setPmSelection(a);
2443
2450
  } catch {}
2444
2451
  }
2445
- let s = Qe(r.state), { empty: c, from: u, to: d } = r.state.selection;
2452
+ let s = $e(r.state), { empty: c, from: u, to: d } = r.state.selection;
2446
2453
  a.value = {
2447
2454
  from: u,
2448
2455
  to: d
@@ -2466,7 +2473,7 @@ function so(e) {
2466
2473
  !o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
2467
2474
  x: t.clientX,
2468
2475
  y: t.clientY
2469
- }, ao(o.attrs.wrapType), oo(o.attrs.cssFloat)), n.value.isOpen = !1);
2476
+ }, uo(o.attrs.wrapType), fo(o.attrs.cssFloat)), n.value.isOpen = !1);
2470
2477
  }
2471
2478
  function f(t) {
2472
2479
  let n = e.editorView.value, r = i.value;
@@ -2490,16 +2497,16 @@ function so(e) {
2490
2497
  case "cut":
2491
2498
  if (e.selectedImage.value) {
2492
2499
  let t = e.selectedImage.value.pmPos;
2493
- Za(n, t);
2500
+ no(n, t);
2494
2501
  let r = n.state.doc.nodeAt(t);
2495
2502
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
2496
2503
  } else n.focus(), document.execCommand("cut");
2497
2504
  break;
2498
2505
  case "copy":
2499
- e.selectedImage.value ? (Za(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2506
+ e.selectedImage.value ? (no(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2500
2507
  break;
2501
2508
  case "paste":
2502
- to(n).then(() => e.onPaste?.()).catch(() => void 0);
2509
+ oo(n).then(() => e.onPaste?.()).catch(() => void 0);
2503
2510
  break;
2504
2511
  case "pasteAsPlainText":
2505
2512
  navigator.clipboard.readText().then((t) => {
@@ -2520,7 +2527,7 @@ function so(e) {
2520
2527
  e.selectedImage.value && (e.showImageProperties.value = !0);
2521
2528
  break;
2522
2529
  case "replaceImage":
2523
- e.selectedImage.value && no(n, e.selectedImage.value.pmPos);
2530
+ e.selectedImage.value && so(n, e.selectedImage.value.pmPos);
2524
2531
  break;
2525
2532
  case "deleteImage":
2526
2533
  if (e.selectedImage.value) {
@@ -2558,7 +2565,7 @@ function so(e) {
2558
2565
  }
2559
2566
  //#endregion
2560
2567
  //#region src/composables/useDocumentLifecycle.ts
2561
- function co(e) {
2568
+ function mo(e) {
2562
2569
  async function t(t) {
2563
2570
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2564
2571
  }
@@ -2577,19 +2584,19 @@ function co(e) {
2577
2584
  }
2578
2585
  //#endregion
2579
2586
  //#region src/composables/useDocxEditorRefApi.ts
2580
- var lo = Date.now(), uo = async (e, t) => {
2587
+ var ho = Date.now(), go = async (e, t) => {
2581
2588
  let n = await e.saveDocument(t);
2582
2589
  if (!n) return null;
2583
2590
  let r = await n.arrayBuffer();
2584
2591
  return e.clearCommentsDirty(), e.onSave?.(r), r;
2585
2592
  };
2586
- function fo(e) {
2593
+ function _o(e) {
2587
2594
  let t = [];
2588
2595
  function n() {
2589
2596
  e.onPrint?.(), window.print();
2590
2597
  }
2591
2598
  function r(t) {
2592
- return uo({
2599
+ return go({
2593
2600
  clearCommentsDirty: e.clearCommentsDirty,
2594
2601
  onSave: e.onSave,
2595
2602
  saveDocument: e.saveDocument
@@ -2598,11 +2605,11 @@ function fo(e) {
2598
2605
  function i(t, n) {
2599
2606
  let r = e.pagesRef.value;
2600
2607
  if (!r) return !1;
2601
- let i = Kn(r, t), a = i.at(0);
2608
+ let i = Qn(r, t), a = i.at(0);
2602
2609
  return a ? (a.scrollIntoView({
2603
2610
  block: "center",
2604
2611
  behavior: "smooth"
2605
- }), n?.highlight && qn(i, n.highlight), !0) : !1;
2612
+ }), n?.highlight && $n(i, n.highlight), !0) : !1;
2606
2613
  }
2607
2614
  function a() {
2608
2615
  return e.zoom.value;
@@ -2610,19 +2617,19 @@ function fo(e) {
2610
2617
  let o = null;
2611
2618
  function s() {
2612
2619
  let t = e.getActiveView();
2613
- return t ? on(t.state, t.dispatch) : !1;
2620
+ return t ? cn(t.state, t.dispatch) : !1;
2614
2621
  }
2615
2622
  function c() {
2616
2623
  let t = e.getActiveView();
2617
- return t ? an(t.state, t.dispatch) : !1;
2624
+ return t ? sn(t.state, t.dispatch) : !1;
2618
2625
  }
2619
2626
  function l() {
2620
2627
  let t = e.getActiveView();
2621
- return t ? on(t.state) : !1;
2628
+ return t ? cn(t.state) : !1;
2622
2629
  }
2623
2630
  function u() {
2624
2631
  let t = e.getActiveView();
2625
- return t ? an(t.state) : !1;
2632
+ return t ? sn(t.state) : !1;
2626
2633
  }
2627
2634
  function d() {
2628
2635
  let t = e.getActiveView();
@@ -2630,9 +2637,9 @@ function fo(e) {
2630
2637
  }
2631
2638
  function f(t) {
2632
2639
  let n = e.editorView.value, r = e.pagesRef.value, i = e.scrollRootRef.value;
2633
- return !n || !r || !i ? /* @__PURE__ */ new Map() : Yn({
2640
+ return !n || !r || !i ? /* @__PURE__ */ new Map() : tr({
2634
2641
  blockIds: t,
2635
- snapshot: zn(n.state.doc),
2642
+ snapshot: Wn(n.state.doc),
2636
2643
  pagesContainer: r,
2637
2644
  scrollRoot: i
2638
2645
  });
@@ -2642,7 +2649,7 @@ function fo(e) {
2642
2649
  }
2643
2650
  function m(t) {
2644
2651
  let n = e.pagesRef.value;
2645
- return n ? Jn(n, t) : () => {};
2652
+ return n ? er(n, t) : () => {};
2646
2653
  }
2647
2654
  function h() {
2648
2655
  return o ??= {
@@ -2672,7 +2679,7 @@ function fo(e) {
2672
2679
  getPageNumberForPmPos: (t) => {
2673
2680
  let n = e.layout.value;
2674
2681
  if (!n) return null;
2675
- let r = xn(n, t);
2682
+ let r = Tn(n, t);
2676
2683
  return r == null ? null : r + 1;
2677
2684
  },
2678
2685
  getBlockRect: p,
@@ -2687,7 +2694,7 @@ function fo(e) {
2687
2694
  function _() {
2688
2695
  let t = e.layout.value, n = e.editorView.value;
2689
2696
  if (!t || !n) return 0;
2690
- let r = xn(t, n.state.selection.from);
2697
+ let r = Tn(t, n.state.selection.from);
2691
2698
  return r == null ? 0 : r + 1;
2692
2699
  }
2693
2700
  function v(t) {
@@ -2722,10 +2729,10 @@ function fo(e) {
2722
2729
  ensureEditorView: () => e.editor.ensureView(),
2723
2730
  createAIEditSnapshot: () => {
2724
2731
  let t = e.editorView.value;
2725
- return t ? zn(t.state.doc) : null;
2732
+ return t ? Gn(t.state.doc, He(t.state)) : null;
2726
2733
  },
2727
2734
  applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
2728
- Ln(r.version);
2735
+ Hn(r.version);
2729
2736
  let a = e.editorView.value;
2730
2737
  if (!a) {
2731
2738
  let e = "committed";
@@ -2735,11 +2742,11 @@ function fo(e) {
2735
2742
  reason: "unsupportedBlock"
2736
2743
  }));
2737
2744
  return {
2738
- version: Nn,
2745
+ version: Rn,
2739
2746
  status: e,
2740
2747
  applied: [],
2741
2748
  skipped: t,
2742
- issues: Hn(r.operations, t),
2749
+ issues: Jn(r.operations, t),
2743
2750
  receipts: [],
2744
2751
  undoHandle: null
2745
2752
  };
@@ -2749,9 +2756,9 @@ function fo(e) {
2749
2756
  let s = e.getComments(), c = {
2750
2757
  state: a.state,
2751
2758
  dispatch: (e) => {
2752
- a.dispatch(rn(e)), c.state = a.state;
2759
+ a.dispatch(on(e)), c.state = a.state;
2753
2760
  }
2754
- }, l = In({
2761
+ }, l = Vn({
2755
2762
  view: c,
2756
2763
  snapshot: n,
2757
2764
  batch: r,
@@ -2759,7 +2766,7 @@ function fo(e) {
2759
2766
  createCommentId: (t) => e.createAIEditComment(t, i),
2760
2767
  createUndoHandle: () => ({
2761
2768
  type: "documentOperationUndo",
2762
- id: `vue-${String(lo++)}`
2769
+ id: `vue-${String(ho++)}`
2763
2770
  })
2764
2771
  });
2765
2772
  return l.undoHandle !== null && t.push({
@@ -2797,7 +2804,7 @@ function fo(e) {
2797
2804
  },
2798
2805
  applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
2799
2806
  let a = e.editorView.value;
2800
- return a ? Fn({
2807
+ return a ? Bn({
2801
2808
  view: a,
2802
2809
  snapshot: t,
2803
2810
  operations: n,
@@ -2814,26 +2821,26 @@ function fo(e) {
2814
2821
  },
2815
2822
  acceptAIEditOperation: (t) => {
2816
2823
  let n = e.editorView.value;
2817
- return n ? fn(t)(n.state, n.dispatch) : !1;
2824
+ return n ? _n(t)(n.state, n.dispatch) : !1;
2818
2825
  },
2819
2826
  rejectAIEditOperation: (t) => {
2820
2827
  let n = e.editorView.value;
2821
- return n ? vn(t)(n.state, n.dispatch) : !1;
2828
+ return n ? $(t)(n.state, n.dispatch) : !1;
2822
2829
  },
2823
2830
  undo: s,
2824
2831
  redo: c,
2825
2832
  scrollToAIEditOperation: (t) => {
2826
2833
  let n = e.editorView.value;
2827
2834
  if (!n) return !1;
2828
- let r = hn(n.state, t);
2835
+ let r = bn(n.state, t);
2829
2836
  if (!r) return !1;
2830
- let { from: i, to: a } = rr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2837
+ let { from: i, to: a } = lr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2831
2838
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2832
2839
  },
2833
2840
  scrollToBlock: (t, n) => {
2834
2841
  let r = e.editorView.value;
2835
2842
  if (!r) return !1;
2836
- let i = ir({
2843
+ let i = ur({
2837
2844
  blockId: t,
2838
2845
  doc: r.state.doc,
2839
2846
  snapshot: n
@@ -2845,7 +2852,7 @@ function fo(e) {
2845
2852
  highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
2846
2853
  let a = e.editorView.value;
2847
2854
  if (!a) return "none";
2848
- let o = or({
2855
+ let o = fr({
2849
2856
  blockId: t,
2850
2857
  text: n,
2851
2858
  doc: a.state.doc,
@@ -2853,13 +2860,13 @@ function fo(e) {
2853
2860
  });
2854
2861
  if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
2855
2862
  e.setPassageHighlight(null);
2856
- let s = ir({
2863
+ let s = ur({
2857
2864
  blockId: t,
2858
2865
  doc: a.state.doc,
2859
2866
  snapshot: r
2860
2867
  });
2861
2868
  if (s === null) return "none";
2862
- let c = lr(t);
2869
+ let c = hr(t);
2863
2870
  if (c !== null && i(c, { highlight: {} })) return "block";
2864
2871
  let { from: l, to: u } = s, d = a.state.doc.resolve(l), f = a.state.doc.resolve(u);
2865
2872
  return a.dispatch(a.state.tr.setSelection(Z.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
@@ -2870,11 +2877,11 @@ function fo(e) {
2870
2877
  showInDocument: (t, n) => {
2871
2878
  let r = e.editorView.value;
2872
2879
  if (!r) return !1;
2873
- let i = t.type === "textRange" ? ar({
2880
+ let i = t.type === "textRange" ? dr({
2874
2881
  range: t,
2875
2882
  doc: r.state.doc,
2876
2883
  snapshot: n
2877
- }) : ir({
2884
+ }) : ur({
2878
2885
  blockId: t.blockId,
2879
2886
  doc: r.state.doc,
2880
2887
  snapshot: n
@@ -2885,7 +2892,7 @@ function fo(e) {
2885
2892
  },
2886
2893
  getSuggestions: () => {
2887
2894
  let t = e.editorView.value;
2888
- return t ? _n(t.state) : [];
2895
+ return t ? xn(t.state) : [];
2889
2896
  },
2890
2897
  acceptSuggestion: (t, n) => {
2891
2898
  let r = e.editorView.value;
@@ -2893,7 +2900,7 @@ function fo(e) {
2893
2900
  accepted: !1,
2894
2901
  appliedAs: null
2895
2902
  };
2896
- let i = _n(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = mn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2903
+ let i = xn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = yn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2897
2904
  return {
2898
2905
  accepted: a,
2899
2906
  appliedAs: a ? i : null
@@ -2901,46 +2908,46 @@ function fo(e) {
2901
2908
  },
2902
2909
  rejectSuggestion: (t) => {
2903
2910
  let n = e.editorView.value;
2904
- return n ? bn(t)(n.state, n.dispatch) : !1;
2911
+ return n ? Cn(t)(n.state, n.dispatch) : !1;
2905
2912
  },
2906
2913
  scrollToSuggestion: (t) => {
2907
2914
  let n = e.editorView.value;
2908
2915
  if (!n) return !1;
2909
- let r = gn(n.state, t);
2916
+ let r = Q(n.state, t);
2910
2917
  if (!r) return !1;
2911
- let { from: i, to: a } = rr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2918
+ let { from: i, to: a } = lr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2912
2919
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2913
2920
  },
2914
2921
  getTrackedChanges: () => {
2915
2922
  let t = e.editorView.value;
2916
- return t ? Un(t.state.doc) : [];
2923
+ return t ? Yn(t.state.doc) : [];
2917
2924
  },
2918
2925
  getCommentAnchors: () => {
2919
2926
  let t = e.editorView.value;
2920
- return t ? Vn(t.state.doc) : [];
2927
+ return t ? qn(t.state.doc) : [];
2921
2928
  },
2922
2929
  getSelectionText: () => {
2923
2930
  let t = e.editorView.value;
2924
- return t ? Ve(t.state) : "";
2931
+ return t ? Ue(t.state) : "";
2925
2932
  },
2926
2933
  getPageText: (t) => {
2927
2934
  let n = e.editorView.value;
2928
- return n ? fr(e.layout.value, n.state.doc, t) : null;
2935
+ return n ? vr(e.layout.value, n.state.doc, t) : null;
2929
2936
  },
2930
2937
  getTargetPage: (t, n) => {
2931
2938
  let r = e.editorView.value, i = e.layout.value;
2932
2939
  if (!r || !i) return null;
2933
- let a = t.type === "textRange" ? ar({
2940
+ let a = t.type === "textRange" ? dr({
2934
2941
  range: t,
2935
2942
  doc: r.state.doc,
2936
2943
  snapshot: n
2937
- }) : ir({
2944
+ }) : ur({
2938
2945
  blockId: t.blockId,
2939
2946
  doc: r.state.doc,
2940
2947
  snapshot: n
2941
2948
  });
2942
2949
  if (a === null) return null;
2943
- let o = xn(i, a.from);
2950
+ let o = Tn(i, a.from);
2944
2951
  return o == null ? null : o + 1;
2945
2952
  },
2946
2953
  getBlockRect: p,
@@ -2949,8 +2956,8 @@ function fo(e) {
2949
2956
  onLayoutChange: m,
2950
2957
  getContentControls: (t = {}) => {
2951
2958
  let n = e.editorView.value;
2952
- return n ? Qn(n.state.doc, t).map((e) => ({
2953
- properties: Xn(e.node),
2959
+ return n ? ir(n.state.doc, t).map((e) => ({
2960
+ properties: nr(e.node),
2954
2961
  path: e.path,
2955
2962
  pmPos: e.pos
2956
2963
  })) : [];
@@ -2958,7 +2965,7 @@ function fo(e) {
2958
2965
  scrollToContentControl: (t) => {
2959
2966
  let n = e.editorView.value;
2960
2967
  if (!n) return !1;
2961
- let r = Zn(n.state.doc, t);
2968
+ let r = rr(n.state.doc, t);
2962
2969
  if (!r) return !1;
2963
2970
  let i = r.pos + 1, a = n.state.doc.resolve(i);
2964
2971
  return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
@@ -2966,54 +2973,54 @@ function fo(e) {
2966
2973
  setContentControlContent: (t, n, r = {}) => {
2967
2974
  let i = e.editorView.value;
2968
2975
  if (!i) return !1;
2969
- let a = typeof n == "string" ? er(i.state, t, n, r) : nr(i.state, t, n, r);
2976
+ let a = typeof n == "string" ? or(i.state, t, n, r) : cr(i.state, t, n, r);
2970
2977
  return a ? (i.dispatch(a), !0) : !1;
2971
2978
  },
2972
2979
  setContentControlValue: (t, n, r = {}) => {
2973
2980
  let i = e.editorView.value;
2974
2981
  if (!i) return !1;
2975
- let a = tr(i.state, t, n, r);
2982
+ let a = sr(i.state, t, n, r);
2976
2983
  return a ? (i.dispatch(a), !0) : !1;
2977
2984
  },
2978
2985
  removeContentControl: (t, n = {}) => {
2979
2986
  let r = e.editorView.value;
2980
2987
  if (!r) return !1;
2981
- let i = $n(r.state, t, n);
2988
+ let i = ar(r.state, t, n);
2982
2989
  return i ? (r.dispatch(i), !0) : !1;
2983
2990
  }
2984
2991
  } };
2985
2992
  }
2986
2993
  //#endregion
2987
2994
  //#region src/composables/useFormattingActions.ts
2988
- function po(e) {
2995
+ function vo(e) {
2989
2996
  let t = () => e.activeView?.value ?? e.editorView.value;
2990
2997
  function n() {
2991
2998
  let e = t();
2992
- e && (sn(e.state, e.dispatch, e), e.focus());
2999
+ e && (ln(e.state, e.dispatch, e), e.focus());
2993
3000
  }
2994
3001
  function r(n) {
2995
3002
  let r = t();
2996
3003
  if (!r) return;
2997
3004
  let i = e.getDocument(), a = i?.package?.styles;
2998
3005
  if (a) {
2999
- let e = ze(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? vr(i.package.numbering) : null };
3006
+ let e = ze(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? wr(i.package.numbering) : null };
3000
3007
  t.paragraphFormatting && (o.paragraphFormatting = t.paragraphFormatting), t.runFormatting && (o.runFormatting = t.runFormatting);
3001
3008
  let s = e.getStyle(n)?.name;
3002
- s && (o.styleName = s), pr(n, o)(r.state, (e) => r.dispatch(e));
3003
- } else pr(n)(r.state, (e) => r.dispatch(e));
3009
+ s && (o.styleName = s), yr(n, o)(r.state, (e) => r.dispatch(e));
3010
+ } else yr(n)(r.state, (e) => r.dispatch(e));
3004
3011
  r.focus();
3005
3012
  }
3006
3013
  function i() {
3007
3014
  let t = e.editorView.value;
3008
- t && (yr(t.state, (e) => t.dispatch(e), t), t.focus());
3015
+ t && (Tr(t.state, (e) => t.dispatch(e), t), t.focus());
3009
3016
  }
3010
3017
  function a() {
3011
3018
  let t = e.editorView.value;
3012
- t && (xr(t.state, (e) => t.dispatch(e), t), t.focus());
3019
+ t && (Dr(t.state, (e) => t.dispatch(e), t), t.focus());
3013
3020
  }
3014
3021
  function o() {
3015
3022
  let t = e.editorView.value;
3016
- t && (br(t.state, (e) => t.dispatch(e), t), t.focus());
3023
+ t && (Er(t.state, (e) => t.dispatch(e), t), t.focus());
3017
3024
  }
3018
3025
  function s(e) {
3019
3026
  let n = t();
@@ -3032,10 +3039,10 @@ function po(e) {
3032
3039
  }
3033
3040
  //#endregion
3034
3041
  //#region src/utils/fontFaces.ts
3035
- function mo() {
3042
+ function yo() {
3036
3043
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
3037
3044
  }
3038
- async function ho(e, t, n, r) {
3045
+ async function bo(e, t, n, r) {
3039
3046
  let i;
3040
3047
  try {
3041
3048
  i = new FontFace(t, n, r), e.add(i);
@@ -3044,46 +3051,46 @@ async function ho(e, t, n, r) {
3044
3051
  }
3045
3052
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
3046
3053
  }
3047
- function go(e) {
3048
- let t = mo();
3054
+ function xo(e) {
3055
+ let t = yo();
3049
3056
  if (t) for (let n of e) t.delete(n);
3050
3057
  }
3051
3058
  //#endregion
3052
3059
  //#region src/utils/embeddedFonts.ts
3053
- var _o = {
3060
+ var So = {
3054
3061
  faces: [],
3055
3062
  familyMap: /* @__PURE__ */ new Map()
3056
3063
  };
3057
- async function vo(e) {
3058
- let t = mo();
3059
- if (!t) return _o;
3064
+ async function Co(e) {
3065
+ let t = yo();
3066
+ if (!t) return So;
3060
3067
  let n;
3061
3068
  try {
3062
- n = await wr(e);
3069
+ n = await Ar(e);
3063
3070
  } catch {
3064
- return _o;
3071
+ return So;
3065
3072
  }
3066
3073
  return {
3067
- faces: (await Promise.all(n.map((e) => ho(t, e.family, e.bytes, {
3074
+ faces: (await Promise.all(n.map((e) => bo(t, e.family, e.bytes, {
3068
3075
  weight: String(e.weight),
3069
3076
  style: e.style
3070
3077
  })))).filter((e) => e !== null),
3071
- familyMap: Cr(n)
3078
+ familyMap: kr(n)
3072
3079
  };
3073
3080
  }
3074
3081
  //#endregion
3075
3082
  //#region src/utils/hostFonts.ts
3076
- function yo(e) {
3083
+ function wo(e) {
3077
3084
  return typeof e == "string" && e.trim().length > 0;
3078
3085
  }
3079
- function bo(e) {
3080
- return typeof e != "object" || !e ? !1 : yo(Reflect.get(e, "family")) && yo(Reflect.get(e, "src"));
3086
+ function To(e) {
3087
+ return typeof e != "object" || !e ? !1 : wo(Reflect.get(e, "family")) && wo(Reflect.get(e, "src"));
3081
3088
  }
3082
- function xo(e) {
3089
+ function Eo(e) {
3083
3090
  if (!e) return [];
3084
3091
  let t = [];
3085
3092
  for (let n of e) {
3086
- if (!bo(n)) continue;
3093
+ if (!To(n)) continue;
3087
3094
  let e = { display: "swap" };
3088
3095
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
3089
3096
  family: n.family.trim(),
@@ -3093,20 +3100,20 @@ function xo(e) {
3093
3100
  }
3094
3101
  return t;
3095
3102
  }
3096
- async function So(e) {
3097
- let t = mo();
3103
+ async function Do(e) {
3104
+ let t = yo();
3098
3105
  if (!t) return [];
3099
- let n = xo(e);
3100
- return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => ho(t, e, n, r)))).filter((e) => e !== null);
3106
+ let n = Eo(e);
3107
+ return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => bo(t, e, n, r)))).filter((e) => e !== null);
3101
3108
  }
3102
3109
  //#endregion
3103
3110
  //#region src/composables/useFontLifecycle.ts
3104
- var Co = {
3105
- loadEmbedded: vo,
3106
- loadHost: So,
3107
- remove: go
3111
+ var Oo = {
3112
+ loadEmbedded: Co,
3113
+ loadHost: Do,
3114
+ remove: xo
3108
3115
  };
3109
- function wo(e, t = Co) {
3116
+ function ko(e, t = Oo) {
3110
3117
  K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3111
3118
  if (!n) return;
3112
3119
  let a = !1, o = [];
@@ -3115,9 +3122,9 @@ function wo(e, t = Co) {
3115
3122
  t.remove(n);
3116
3123
  return;
3117
3124
  }
3118
- o = n, !(n.length === 0 && r.size === 0) && (Sr(r.size > 0 ? r : null), e.remeasure());
3125
+ o = n, !(n.length === 0 && r.size === 0) && (Or(r.size > 0 ? r : null), e.remeasure());
3119
3126
  }), i(() => {
3120
- a = !0, t.remove(o), Sr(null);
3127
+ a = !0, t.remove(o), Or(null);
3121
3128
  });
3122
3129
  }, { immediate: !0 }), K(e.fonts, (n, r, i) => {
3123
3130
  if (!n || n.length === 0) return;
@@ -3135,7 +3142,7 @@ function wo(e, t = Co) {
3135
3142
  }
3136
3143
  //#endregion
3137
3144
  //#region src/composables/useHyperlinkManagement.ts
3138
- function To(e) {
3145
+ function Ao(e) {
3139
3146
  let t = H(null);
3140
3147
  function n(e, t) {
3141
3148
  t(e.state, (t) => e.dispatch(t), e);
@@ -3162,19 +3169,21 @@ function To(e) {
3162
3169
  r && n(t, r()), t.focus();
3163
3170
  }
3164
3171
  function a(e) {
3165
- let n = Dr(e);
3166
- n && (window.open(n, "_blank", "noopener,noreferrer"), t.value = null);
3172
+ let n = dn(e);
3173
+ if (!n) return;
3174
+ let r = un(void 0);
3175
+ window.open(n, r.target, fn(r)), t.value = null;
3167
3176
  }
3168
3177
  function o(n, r) {
3169
3178
  let i = e.editorView.value;
3170
- i && (Tr(i, {
3179
+ i && (jr(i, {
3171
3180
  displayText: n,
3172
3181
  href: r
3173
3182
  }), t.value = null, i.focus());
3174
3183
  }
3175
3184
  function s() {
3176
3185
  let n = e.editorView.value;
3177
- n && (Er(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3186
+ n && (Mr(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3178
3187
  }
3179
3188
  return {
3180
3189
  hyperlinkPopupData: t,
@@ -3187,7 +3196,7 @@ function To(e) {
3187
3196
  }
3188
3197
  //#endregion
3189
3198
  //#region src/composables/useImageActions.ts
3190
- function Eo(e) {
3199
+ function jo(e) {
3191
3200
  let t = Ne(null), n = H(!1), r = k(() => {
3192
3201
  e.stateTick.value;
3193
3202
  let n = e.editorView.value, r = t.value;
@@ -3207,9 +3216,9 @@ function Eo(e) {
3207
3216
  function a(n) {
3208
3217
  let r = e.editorView.value, a = t.value;
3209
3218
  if (!r || !a) return;
3210
- let o = Rt(n);
3219
+ let o = Bt(n);
3211
3220
  if (!o) return;
3212
- let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: Pt(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3221
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: It(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3213
3222
  c && (i(r, c(a.pmPos, o, s)), r.focus());
3214
3223
  }
3215
3224
  function o(n) {
@@ -3237,9 +3246,9 @@ function Eo(e) {
3237
3246
  }
3238
3247
  //#endregion
3239
3248
  //#region src/composables/useKeyboardShortcuts.ts
3240
- function Do(e) {
3249
+ function Mo(e) {
3241
3250
  function t(t) {
3242
- if (Or(t, {
3251
+ if (Nr(t, {
3243
3252
  scope: e.scope(),
3244
3253
  roots: e.roots.map((e) => e.value)
3245
3254
  }) && (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey)) {
@@ -3255,10 +3264,10 @@ function Do(e) {
3255
3264
  }
3256
3265
  //#endregion
3257
3266
  //#region src/composables/useOutlineSidebar.ts
3258
- function Oo(e) {
3267
+ function No(e) {
3259
3268
  function t() {
3260
3269
  let t = e.editorView.value;
3261
- t && (e.outlineHeadings.value = kr(t.state.doc));
3270
+ t && (e.outlineHeadings.value = Pr(t.state.doc, Ve(t.state)));
3262
3271
  }
3263
3272
  function n() {
3264
3273
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3289,7 +3298,7 @@ function Oo(e) {
3289
3298
  }
3290
3299
  //#endregion
3291
3300
  //#region src/composables/usePageSetupControls.ts
3292
- function ko(e) {
3301
+ function Po(e) {
3293
3302
  function t(t) {
3294
3303
  if (e.readOnly.value) return;
3295
3304
  let n = e.getDocument();
@@ -3317,19 +3326,19 @@ function ko(e) {
3317
3326
  }
3318
3327
  function s(t) {
3319
3328
  let n = e.editorView.value;
3320
- n && gr(t)(n.state, n.dispatch);
3329
+ n && Sr(t)(n.state, n.dispatch);
3321
3330
  }
3322
3331
  function c(t) {
3323
3332
  let n = e.editorView.value;
3324
- n && _r(t)(n.state, n.dispatch);
3333
+ n && Cr(t)(n.state, n.dispatch);
3325
3334
  }
3326
3335
  function l(t) {
3327
3336
  let n = e.editorView.value;
3328
- n && (t < 0 ? hr(-t, !0)(n.state, n.dispatch) : hr(t, !1)(n.state, n.dispatch));
3337
+ n && (t < 0 ? xr(-t, !0)(n.state, n.dispatch) : xr(t, !1)(n.state, n.dispatch));
3329
3338
  }
3330
3339
  function u(t) {
3331
3340
  let n = e.editorView.value;
3332
- n && mr(t)(n.state, n.dispatch);
3341
+ n && br(t)(n.state, n.dispatch);
3333
3342
  }
3334
3343
  return {
3335
3344
  handlePageSetupApply: t,
@@ -3345,45 +3354,45 @@ function ko(e) {
3345
3354
  }
3346
3355
  //#endregion
3347
3356
  //#region src/utils/textSelection.ts
3348
- var Ao = /[\p{L}\p{N}\p{M}_''-]/u, jo = /\s/;
3349
- function Mo(e) {
3350
- return !e || e.length === 0 ? !1 : Ao.test(e);
3357
+ var Fo = /[\p{L}\p{N}\p{M}_''-]/u, Io = /\s/;
3358
+ function Lo(e) {
3359
+ return !e || e.length === 0 ? !1 : Fo.test(e);
3351
3360
  }
3352
- function No(e) {
3353
- return !e || e.length === 0 ? !1 : jo.test(e);
3361
+ function Ro(e) {
3362
+ return !e || e.length === 0 ? !1 : Io.test(e);
3354
3363
  }
3355
- function Po(e, t) {
3364
+ function zo(e, t) {
3356
3365
  if (!e || e.length === 0) return [0, 0];
3357
3366
  t = Math.max(0, Math.min(t, e.length - 1));
3358
3367
  let n = e[t];
3359
- if (No(n)) {
3368
+ if (Ro(n)) {
3360
3369
  let n = t, r = t;
3361
- for (; n > 0 && No(e[n - 1]);) n--;
3362
- for (; r < e.length && No(e[r]);) r++;
3370
+ for (; n > 0 && Ro(e[n - 1]);) n--;
3371
+ for (; r < e.length && Ro(e[r]);) r++;
3363
3372
  return [n, r];
3364
3373
  }
3365
- if (Mo(n)) {
3374
+ if (Lo(n)) {
3366
3375
  let n = t, r = t;
3367
- for (; n > 0 && Mo(e[n - 1]);) n--;
3368
- for (; r < e.length && Mo(e[r]);) r++;
3376
+ for (; n > 0 && Lo(e[n - 1]);) n--;
3377
+ for (; r < e.length && Lo(e[r]);) r++;
3369
3378
  return [n, r];
3370
3379
  }
3371
3380
  return [t, t + 1];
3372
3381
  }
3373
3382
  //#endregion
3374
3383
  //#region src/utils/domQueries.ts
3375
- function Fo(e, t, n) {
3376
- let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Yt(e);
3384
+ function Bo(e, t, n) {
3385
+ let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Zt(e);
3377
3386
  for (let e of r) {
3378
3387
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
3379
3388
  if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
3380
3389
  }
3381
3390
  return null;
3382
3391
  }
3383
- function Io(e, t, n) {
3392
+ function Vo(e, t, n) {
3384
3393
  if (!e || !t) return;
3385
- let r = Jt(e, n);
3386
- if (!r) for (let t of Yt(e)) {
3394
+ let r = Xt(e, n);
3395
+ if (!r) for (let t of Zt(e)) {
3387
3396
  let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
3388
3397
  if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
3389
3398
  r = t;
@@ -3397,21 +3406,21 @@ function Io(e, t, n) {
3397
3406
  behavior: "smooth"
3398
3407
  });
3399
3408
  }
3400
- function Lo(e, t, n, r) {
3409
+ function Ho(e, t, n, r) {
3401
3410
  if (!e || !t) return null;
3402
- let i = Vt(e, n, r, 1);
3411
+ let i = Ut(e, n, r, 1);
3403
3412
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3404
3413
  }
3405
- function Ro(e, t, n, r) {
3414
+ function Uo(e, t, n, r) {
3406
3415
  if (!e) return;
3407
- let i = Fo(e, t, r);
3416
+ let i = Bo(e, t, r);
3408
3417
  if (!i) return;
3409
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Po(a, t - o), l = o + s, u = o + c;
3418
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = zo(a, t - o), l = o + s, u = o + c;
3410
3419
  l < u && n(l, u);
3411
3420
  }
3412
- function zo(e, t, n, r) {
3421
+ function Wo(e, t, n, r) {
3413
3422
  if (!e) return;
3414
- let i = Fo(e, t, r);
3423
+ let i = Bo(e, t, r);
3415
3424
  if (!i) return;
3416
3425
  let a = i.closest(".layout-paragraph");
3417
3426
  if (!a) return;
@@ -3420,7 +3429,7 @@ function zo(e, t, n, r) {
3420
3429
  }
3421
3430
  //#endregion
3422
3431
  //#region src/composables/usePagesPointer.ts
3423
- var Bo = 500, Vo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentChange: r, reLayout: i, setDocument: a, syncHfPMs: o }) => {
3432
+ var Go = 500, Ko = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentChange: r, reLayout: i, setDocument: a, syncHfPMs: o }) => {
3424
3433
  let s = e.value, c = t();
3425
3434
  if (!c?.package || !s?.rId) {
3426
3435
  e.value = null;
@@ -3436,21 +3445,21 @@ var Bo = 500, Vo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentCh
3436
3445
  e.value = null;
3437
3446
  return;
3438
3447
  }
3439
- let d = Mn({
3448
+ let d = Ln({
3440
3449
  document: c,
3441
3450
  position: s.position,
3442
3451
  isFirstPage: s.isFirstPage,
3443
3452
  activeRId: s.rId,
3444
- blocks: $(l.state.doc, u.content)
3453
+ blocks: En(l.state.doc, u.content)
3445
3454
  });
3446
3455
  e.value = null, d && (a(d), o(), i(), r(d));
3447
3456
  };
3448
- function Ho(e) {
3457
+ function qo(e) {
3449
3458
  let t = H(null), n = null;
3450
3459
  function r() {
3451
3460
  n !== null && (clearTimeout(n), n = null);
3452
3461
  }
3453
- let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Pr(), d = S({
3462
+ let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = zr(), d = S({
3454
3463
  pagesContainer: e.pagesRef,
3455
3464
  onScrollExtendSelection: (e, t) => {
3456
3465
  if (!c || l === null) return;
@@ -3463,7 +3472,7 @@ function Ho(e) {
3463
3472
  visible: !1
3464
3473
  }), p = null;
3465
3474
  function m(t, n) {
3466
- return Lo(e.pagesRef.value, e.editorView.value, t, n);
3475
+ return Ho(e.pagesRef.value, e.editorView.value, t, n);
3467
3476
  }
3468
3477
  function h() {
3469
3478
  let t = i.value;
@@ -3476,7 +3485,7 @@ function Ho(e) {
3476
3485
  function g(t, n) {
3477
3486
  let r = i.value, a = e.pagesRef.value, o = h();
3478
3487
  if (r?.rId && a && o !== e.editorView.value) {
3479
- let e = Ar(a, r.position, r.rId, t, n);
3488
+ let e = Fr(a, r.position, r.rId, t, n);
3480
3489
  return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
3481
3490
  }
3482
3491
  return m(t, n);
@@ -3489,13 +3498,13 @@ function Ho(e) {
3489
3498
  } catch {}
3490
3499
  }
3491
3500
  function v(t) {
3492
- Io(e.pagesRef.value, e.pagesViewportRef.value, t);
3501
+ Vo(e.pagesRef.value, e.pagesViewportRef.value, t);
3493
3502
  }
3494
3503
  function y(t) {
3495
- Ro(e.pagesRef.value, t, _, i.value?.position);
3504
+ Uo(e.pagesRef.value, t, _, i.value?.position);
3496
3505
  }
3497
3506
  function b(t) {
3498
- zo(e.pagesRef.value, t, _, i.value?.position);
3507
+ Wo(e.pagesRef.value, t, _, i.value?.position);
3499
3508
  }
3500
3509
  function x(t) {
3501
3510
  let n = e.editorView.value;
@@ -3524,7 +3533,7 @@ function Ho(e) {
3524
3533
  if (!o) return;
3525
3534
  let s = e.pagesViewportRef.value;
3526
3535
  if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
3527
- let l = Nr({
3536
+ let l = Rr({
3528
3537
  mouseX: a.clientX,
3529
3538
  mouseY: a.clientY,
3530
3539
  pagesContainer: o,
@@ -3534,7 +3543,7 @@ function Ho(e) {
3534
3543
  if (!l) {
3535
3544
  n === null && (n = setTimeout(() => {
3536
3545
  t.value = null, n = null;
3537
- }, Mr));
3546
+ }, Lr));
3538
3547
  return;
3539
3548
  }
3540
3549
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -3585,7 +3594,7 @@ function Ho(e) {
3585
3594
  if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
3586
3595
  let n = t.target;
3587
3596
  if (n.closest(".docx-editor-vue__note-editor")) return;
3588
- let r = jr(n);
3597
+ let r = Ir(n);
3589
3598
  if (r) {
3590
3599
  t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
3591
3600
  return;
@@ -3595,11 +3604,11 @@ function Ho(e) {
3595
3604
  if (!s) return;
3596
3605
  let c = a ? "header" : "footer", l = e.getDocument();
3597
3606
  if (!l?.package) return;
3598
- let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = jn(l.package), p = f.hasTitlePg && d === 1, m = kn(f, c, p);
3607
+ let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = In(l.package), p = f.hasTitlePg && d === 1, m = Pn(f, c, p);
3599
3608
  if (!m) {
3600
- let t = On(l, c, p);
3609
+ let t = Nn(l, c, p);
3601
3610
  if (!t) return;
3602
- e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = jn(t.package), m = kn(f, c, p);
3611
+ e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = In(t.package), m = Pn(f, c, p);
3603
3612
  }
3604
3613
  if (!m) return;
3605
3614
  let h = m, g = e.pagesViewportRef.value;
@@ -3619,7 +3628,7 @@ function Ho(e) {
3619
3628
  }, requestAnimationFrame(() => {
3620
3629
  let n = e.getHfPmView(h);
3621
3630
  if (!n) return;
3622
- let r = Ar(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3631
+ let r = Fr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3623
3632
  if (r !== null) {
3624
3633
  let e = Math.max(0, Math.min(r, n.state.doc.content.size));
3625
3634
  n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
@@ -3628,7 +3637,7 @@ function Ho(e) {
3628
3637
  });
3629
3638
  }
3630
3639
  function ie() {
3631
- Vo({
3640
+ Ko({
3632
3641
  editState: i,
3633
3642
  getDocument: e.getDocument,
3634
3643
  getHfPmView: e.getHfPmView,
@@ -3644,7 +3653,7 @@ function Ho(e) {
3644
3653
  i.value = null;
3645
3654
  return;
3646
3655
  }
3647
- let r = An({
3656
+ let r = Fn({
3648
3657
  document: t,
3649
3658
  position: n.position,
3650
3659
  activeRId: n.rId
@@ -3680,13 +3689,13 @@ function Ho(e) {
3680
3689
  }
3681
3690
  let f = h() ?? n;
3682
3691
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
3683
- let p = It(r);
3692
+ let p = Rt(r);
3684
3693
  if (p) {
3685
3694
  t.preventDefault(), t.stopPropagation();
3686
3695
  let n = Number(p.dataset.pmStart);
3687
3696
  if (!Number.isNaN(n)) {
3688
3697
  try {
3689
- f.dispatch(f.state.tr.setSelection(X.create(f.state.doc, n)));
3698
+ f.dispatch(f.state.tr.setSelection(Mt.create(f.state.doc, n)));
3690
3699
  } catch {}
3691
3700
  e.selectedImage.value = {
3692
3701
  element: p,
@@ -3705,12 +3714,12 @@ function Ho(e) {
3705
3714
  return;
3706
3715
  }
3707
3716
  let v = Date.now();
3708
- if (v - a < Bo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3717
+ if (v - a < Go && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3709
3718
  else if (s >= 3) b(m), s = 0;
3710
3719
  else if (t.shiftKey) {
3711
3720
  let { from: e } = f.state.selection;
3712
3721
  _(e, m);
3713
- } else _(m), l = m, c = !0, u.begin(Fr(f, m));
3722
+ } else _(m), l = m, c = !0, u.begin(Br(f, m));
3714
3723
  f.focus();
3715
3724
  }
3716
3725
  function se(e) {
@@ -3778,8 +3787,8 @@ function Ho(e) {
3778
3787
  }
3779
3788
  //#endregion
3780
3789
  //#region src/composables/useRemoteSelectionSync.ts
3781
- var Uo = (e) => {
3782
- let t = new Ir(), n = null, r = () => {
3790
+ var Jo = (e) => {
3791
+ let t = new Vr(), n = null, r = () => {
3783
3792
  n !== null && (cancelAnimationFrame(n), n = null);
3784
3793
  let r = e.pagesRef.value;
3785
3794
  r && t.clear(r);
@@ -3802,8 +3811,8 @@ var Uo = (e) => {
3802
3811
  ], i, { flush: "post" }), B(() => {
3803
3812
  a(), r();
3804
3813
  });
3805
- }, Wo = (e) => {
3806
- let t = new Lr(), n = null, r = () => {
3814
+ }, Yo = (e) => {
3815
+ let t = new Hr(), n = null, r = () => {
3807
3816
  n !== null && (cancelAnimationFrame(n), n = null);
3808
3817
  let r = e.pagesRef.value;
3809
3818
  r && t.clear(r);
@@ -3817,8 +3826,8 @@ var Uo = (e) => {
3817
3826
  state: i.state,
3818
3827
  zoom: e.zoom.value,
3819
3828
  zIndex: ae.selectionOverlay
3820
- }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Ht(r, o.head, s) : null;
3821
- if (Zt({
3829
+ }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Wt(r, o.head, s) : null;
3830
+ if ($t({
3822
3831
  hiddenHost: e.hiddenContainer.value,
3823
3832
  editorView: i,
3824
3833
  visibleCaret: c ? {
@@ -3849,27 +3858,27 @@ var Uo = (e) => {
3849
3858
  }, { immediate: !0 });
3850
3859
  let o = typeof window > "u" ? null : window;
3851
3860
  return o?.addEventListener("scroll", i, !0), B(() => {
3852
- a(), r(), o?.removeEventListener("scroll", i, !0), Xt(e.hiddenContainer.value);
3861
+ a(), r(), o?.removeEventListener("scroll", i, !0), Qt(e.hiddenContainer.value);
3853
3862
  }), {
3854
3863
  clearOverlay: r,
3855
3864
  updateSelectionOverlay: i
3856
3865
  };
3857
- }, Go = { class: "docx-editor-vue__toolbar-shell" }, Ko = {
3866
+ }, Xo = { class: "docx-editor-vue__toolbar-shell" }, Zo = {
3858
3867
  key: 0,
3859
3868
  class: "docx-editor-vue__error"
3860
- }, qo = {
3869
+ }, Qo = {
3861
3870
  key: 1,
3862
3871
  class: "docx-editor-vue__loading"
3863
- }, Jo = {
3872
+ }, $o = {
3864
3873
  key: 2,
3865
3874
  class: "docx-editor-vue__placeholder"
3866
- }, Yo = { class: "docx-editor-vue__editor-area" }, Xo = {
3875
+ }, es = { class: "docx-editor-vue__editor-area" }, ts = {
3867
3876
  key: 0,
3868
3877
  class: "docx-editor-vue__ruler-h"
3869
- }, Zo = {
3878
+ }, ns = {
3870
3879
  key: 1,
3871
3880
  class: "docx-editor-vue__ruler-v"
3872
- }, Qo = {
3881
+ }, rs = {
3873
3882
  class: "docx-editor-vue__editor-content-wrapper",
3874
3883
  style: {
3875
3884
  position: "relative",
@@ -3877,11 +3886,11 @@ var Uo = (e) => {
3877
3886
  flexDirection: "column",
3878
3887
  minHeight: "100%"
3879
3888
  }
3880
- }, $o = {
3889
+ }, is = {
3881
3890
  "data-testid": "selection-overlay",
3882
3891
  class: "docx-editor-vue__decoration-origin",
3883
3892
  "aria-hidden": "true"
3884
- }, es = ["aria-label"], ts = { class: "docx-editor-vue__note-editor-header" }, ns = ["aria-label"], rs = ["aria-label"], is = /*#__PURE__*/ t(/* @__PURE__ */ I({
3893
+ }, as = ["aria-label"], os = { class: "docx-editor-vue__note-editor-header" }, ss = ["aria-label"], cs = ["aria-label"], ls = /*#__PURE__*/ t(/* @__PURE__ */ I({
3885
3894
  __name: "DocxEditor",
3886
3895
  props: {
3887
3896
  documentBuffer: { default: null },
@@ -4008,13 +4017,13 @@ var Uo = (e) => {
4008
4017
  let o = e, s = o.plugins ?? [], c = n;
4009
4018
  a(o.components);
4010
4019
  let l = fe();
4011
- bi(l);
4020
+ Ti(l);
4012
4021
  function u(e) {
4013
4022
  o.onChange?.(e), c("change", e), c("update:document", e);
4014
4023
  }
4015
- let d = H(o.mode), f = k(() => o.readOnly || d.value === "viewing"), p = k(() => o.showReviewControls), m = k(() => zt(d.value)), h = H("all-markup");
4024
+ let d = H(o.mode), f = k(() => o.readOnly || d.value === "viewing"), p = k(() => o.showReviewControls), m = k(() => Vt(d.value)), h = H("all-markup");
4016
4025
  function _() {
4017
- Jn(Bt(d.value));
4026
+ Jn(Ht(d.value));
4018
4027
  }
4019
4028
  function x(e) {
4020
4029
  h.value = e;
@@ -4025,18 +4034,18 @@ var Uo = (e) => {
4025
4034
  K(ae, (e) => {
4026
4035
  e || (S.value = !1);
4027
4036
  });
4028
- let oe = H(null), C = H(null), ue = H(null), w = H(null), pe = H(null), me = H(null), he = H(null), ge = k(() => o.showRuler ?? !1), T = H(0), E = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(!1), Se = H(!1), O = H(o.showOutline), A = H(!1), we = H(null), I = H(null), Ee = H(null), De = Ne([]), ke = Ne([]), { zoom: B, zoomPercent: je, isMinZoom: U, isMaxZoom: Pe, setZoom: ze, zoomIn: Ve, zoomOut: He, handleWheel: We, handleKeyDown: Ke, ZOOM_PRESETS: Je } = de(o.initialZoom);
4029
- function Xe(e) {
4030
- o.enableWheelZoom !== !1 && We(e);
4037
+ let oe = H(null), C = H(null), ue = H(null), w = H(null), pe = H(null), me = H(null), he = H(null), ge = k(() => o.showRuler ?? !1), T = H(0), E = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(!1), Se = H(!1), O = H(o.showOutline), A = H(!1), we = H(null), I = H(null), Ee = H(null), De = Ne([]), ke = Ne([]), { zoom: B, zoomPercent: je, isMinZoom: U, isMaxZoom: Pe, setZoom: ze, zoomIn: Ve, zoomOut: He, handleWheel: Ue, handleKeyDown: We, ZOOM_PRESETS: Ke } = de(o.initialZoom);
4038
+ function Je(e) {
4039
+ o.enableWheelZoom !== !1 && Ue(e);
4031
4040
  }
4032
- Do({
4041
+ Mo({
4033
4042
  showFindReplace: E,
4034
4043
  showHyperlink: _e,
4035
- handleZoomKeyDown: Ke,
4044
+ handleZoomKeyDown: We,
4036
4045
  scope: () => o.keyboardShortcuts ?? "document",
4037
4046
  roots: [oe]
4038
4047
  });
4039
- let { editor: ot, editorView: J, editorState: lt, remoteSelections: ut, headerFooterSelection: dt, activeNoteStory: ft, isReady: pt, isDirty: mt, parseError: ht, layout: gt, blocks: _t, measures: vt, syncCoordinator: yt, loadBuffer: bt, loadDocument: xt, save: St, getDocument: Y, setDocument: Ct, getHeaderFooterView: wt, syncHeaderFooterViews: Tt, openNoteStory: Et, closeNoteStory: Dt, getActiveNoteView: Ot, getCommands: kt, reLayout: At } = ce({
4048
+ let { editor: Xe, editorView: J, editorState: st, remoteSelections: lt, headerFooterSelection: dt, activeNoteStory: ft, isReady: pt, isDirty: mt, parseError: ht, layout: gt, blocks: _t, measures: vt, syncCoordinator: yt, loadBuffer: bt, loadDocument: xt, save: St, getDocument: Y, setDocument: Ct, getHeaderFooterView: wt, syncHeaderFooterViews: Tt, openNoteStory: Et, closeNoteStory: Dt, getActiveNoteView: Ot, getCommands: kt, reLayout: At } = ce({
4040
4049
  hiddenContainer: C,
4041
4050
  hiddenHeaderFooterContainer: ue,
4042
4051
  noteEditorContainer: Ee,
@@ -4076,56 +4085,56 @@ var Uo = (e) => {
4076
4085
  featureFlags: () => o.featureFlags,
4077
4086
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
4078
4087
  });
4079
- K(lt, (e, t) => {
4088
+ K(st, (e, t) => {
4080
4089
  he.value !== null && e && t && !e.doc.eq(t.doc) && (he.value = null);
4081
4090
  });
4082
- let X = k(() => tt({
4091
+ let X = k(() => nt({
4083
4092
  bodyView: J.value,
4084
4093
  headerFooterView: I.value ? wt(I.value) : null,
4085
4094
  noteView: Ot()
4086
4095
  }).view), jt = k(() => {
4087
4096
  let e = ft.value;
4088
4097
  return e ? te(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4089
- }), Z = k(() => !pt.value && ae.value && !(o.preserveDocumentWhileLoading === !0 && S.value));
4090
- function Mt() {
4091
- J.value && (rt(), nt(), At());
4098
+ }), Mt = k(() => !pt.value && ae.value && !(o.preserveDocumentWhileLoading === !0 && S.value));
4099
+ function Nt() {
4100
+ J.value && (it(), rt(), At());
4092
4101
  }
4093
- wo({
4102
+ ko({
4094
4103
  isReady: pt,
4095
4104
  getDocument: Y,
4096
4105
  fonts: () => o.fonts,
4097
- remeasure: Mt
4106
+ remeasure: Nt
4098
4107
  });
4099
- let { selectedImage: Nt, imageInteracting: Pt, imageToolbarContext: Ft, handleToolbarImageWrap: It, handleImageTransform: Lt } = Eo({
4108
+ let { selectedImage: Z, imageInteracting: Pt, imageToolbarContext: Ft, handleToolbarImageWrap: It, handleImageTransform: Lt } = jo({
4100
4109
  editorView: X,
4101
4110
  zoom: B,
4102
4111
  stateTick: T,
4103
4112
  getCommands: kt
4104
- }), Rt = Wo({
4113
+ }), Rt = Yo({
4105
4114
  editorView: J,
4106
4115
  hiddenContainer: C,
4107
4116
  pagesRef: w,
4108
4117
  zoom: B,
4109
- selectedImage: Nt,
4118
+ selectedImage: Z,
4110
4119
  syncCoordinator: yt,
4111
4120
  imageInteracting: Pt
4112
4121
  });
4113
- Uo({
4122
+ Jo({
4114
4123
  pagesRef: w,
4115
- remoteSelections: ut,
4124
+ remoteSelections: lt,
4116
4125
  syncCoordinator: yt,
4117
4126
  zoom: B
4118
4127
  });
4119
- let { hyperlinkPopupData: Vt, handleHyperlinkSubmit: Ht, handleHyperlinkRemove: Ut, handleHyperlinkPopupNavigate: Wt, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } = To({
4128
+ let { hyperlinkPopupData: zt, handleHyperlinkSubmit: Bt, handleHyperlinkRemove: Ut, handleHyperlinkPopupNavigate: Wt, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } = Ao({
4120
4129
  editorView: X,
4121
4130
  getCommands: kt
4122
- }), qt = se(), { tableInsertButton: Jt, hfEdit: Yt, scrollPageInfo: Xt, resolvePos: Zt, setPmSelection: Qt, scrollVisiblePositionIntoView: $t, handlePagesMouseDown: en, handlePagesMouseMove: tn, handlePagesClick: nn, handlePagesDoubleClick: rn, handleTableInsertClick: an, handleHfSave: on, handleHfRemove: sn } = Ho({
4131
+ }), qt = se(), { tableInsertButton: Jt, hfEdit: Yt, scrollPageInfo: Xt, resolvePos: Zt, setPmSelection: Qt, scrollVisiblePositionIntoView: $t, handlePagesMouseDown: en, handlePagesMouseMove: tn, handlePagesClick: nn, handlePagesDoubleClick: rn, handleTableInsertClick: an, handleHfSave: on, handleHfRemove: sn } = qo({
4123
4132
  editorView: J,
4124
4133
  pagesRef: w,
4125
4134
  pagesViewportRef: pe,
4126
- selectedImage: Nt,
4135
+ selectedImage: Z,
4127
4136
  imageInteracting: Pt,
4128
- hyperlinkPopupData: Vt,
4137
+ hyperlinkPopupData: zt,
4129
4138
  readOnly: f,
4130
4139
  showHeaderFooterEditing: k(() => o.showHeaderFooterEditing),
4131
4140
  zoom: B,
@@ -4157,7 +4166,7 @@ var Uo = (e) => {
4157
4166
  K(Yt, (e) => {
4158
4167
  I.value = e?.rId ?? null, e && Rt.clearOverlay();
4159
4168
  }, { immediate: !0 });
4160
- let un = Oo({
4169
+ let un = No({
4161
4170
  editorView: J,
4162
4171
  showOutline: O,
4163
4172
  showSidebar: A,
@@ -4165,9 +4174,9 @@ var Uo = (e) => {
4165
4174
  activeSidebarItem: we,
4166
4175
  extractCommentsAndChanges: () => {},
4167
4176
  scrollToVisiblePosition: $t
4168
- }), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } = so({
4177
+ }), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } = po({
4169
4178
  editorView: X,
4170
- selectedImage: Nt,
4179
+ selectedImage: Z,
4171
4180
  zoom: B,
4172
4181
  showImageProperties: ye,
4173
4182
  getCommands: kt,
@@ -4179,7 +4188,7 @@ var Uo = (e) => {
4179
4188
  onCopy: () => o.onCopy?.(),
4180
4189
  onCut: () => o.onCut?.(),
4181
4190
  onPaste: () => o.onPaste?.()
4182
- }), yn = le(J, T), bn = k(() => yn.value.entries), Q = Ya({
4191
+ }), yn = le(J, T), bn = k(() => yn.value.entries), Q = eo({
4183
4192
  editorView: J,
4184
4193
  getDocument: Y,
4185
4194
  author: () => o.author,
@@ -4188,7 +4197,7 @@ var Uo = (e) => {
4188
4197
  o.onCommentsChange?.(e), c("comments-change", e);
4189
4198
  },
4190
4199
  reLayout: At
4191
- }), xn = Q.comments, $ = Ja({
4200
+ }), xn = Q.comments, $ = $a({
4192
4201
  editorView: J,
4193
4202
  pagesViewport: pe,
4194
4203
  pagesContainer: w,
@@ -4202,7 +4211,7 @@ var Uo = (e) => {
4202
4211
  }
4203
4212
  });
4204
4213
  function Sn(e) {
4205
- navigator.clipboard?.writeText(e), Vt.value = null;
4214
+ navigator.clipboard?.writeText(e), zt.value = null;
4206
4215
  }
4207
4216
  let Cn = k(() => {
4208
4217
  T.value;
@@ -4211,20 +4220,20 @@ var Uo = (e) => {
4211
4220
  }), wn = k(() => {
4212
4221
  T.value;
4213
4222
  let e = Y();
4214
- return e ? st(e) : void 0;
4223
+ return e ? ct(e) : void 0;
4215
4224
  }), Tn = k(() => {
4216
4225
  T.value;
4217
4226
  let e = X.value;
4218
4227
  if (!e) return {};
4219
- let t = Qe(e.state).table;
4220
- return t ? Ze(t) : {};
4228
+ let t = $e(e.state).table;
4229
+ return t ? Qe(t) : {};
4221
4230
  }), En = k(() => {
4222
4231
  T.value;
4223
4232
  let e = {};
4224
4233
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4225
4234
  let t = Y()?.package.styles?.styles;
4226
4235
  return t !== void 0 && (e.documentStyles = t), e;
4227
- }), Dn = k(() => at(Cn.value?.pageWidth ?? 12240) * B.value), On = k(() => {
4236
+ }), Dn = k(() => ot(Cn.value?.pageWidth ?? 12240) * B.value), On = k(() => {
4228
4237
  let e = /* @__PURE__ */ new Set();
4229
4238
  for (let t of xn.value) t.done && e.add(t.id);
4230
4239
  return e;
@@ -4232,7 +4241,7 @@ var Uo = (e) => {
4232
4241
  transform: B.value === 1 ? void 0 : `scale(${B.value})`,
4233
4242
  transformOrigin: "top center",
4234
4243
  transition: "transform 0.2s ease"
4235
- })), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } = po({
4244
+ })), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } = vo({
4236
4245
  editorView: X,
4237
4246
  getDocument: Y
4238
4247
  });
@@ -4246,7 +4255,7 @@ var Uo = (e) => {
4246
4255
  let t = document.createElement("input");
4247
4256
  t.type = "file", t.accept = "image/*", t.style.display = "none", t.addEventListener("change", () => {
4248
4257
  let n = t.files?.[0];
4249
- n && Ue(e, n, () => e.focus()), t.remove();
4258
+ n && Ge(e, n, () => e.focus()), t.remove();
4250
4259
  }), document.body.appendChild(t), t.click();
4251
4260
  }
4252
4261
  function Fn(e, t) {
@@ -4255,7 +4264,7 @@ var Uo = (e) => {
4255
4264
  return;
4256
4265
  }
4257
4266
  let n = X.value;
4258
- n && (qe(n, e, t), n.focus());
4267
+ n && (Ye(n, e, t), n.focus());
4259
4268
  }
4260
4269
  function In() {
4261
4270
  if (o.onInsertPageBreak) {
@@ -4263,7 +4272,7 @@ var Uo = (e) => {
4263
4272
  return;
4264
4273
  }
4265
4274
  let e = J.value;
4266
- e && (Ge(e), e.focus());
4275
+ e && (qe(e), e.focus());
4267
4276
  }
4268
4277
  function Ln() {
4269
4278
  if (o.onInsertTOC) {
@@ -4271,9 +4280,9 @@ var Uo = (e) => {
4271
4280
  return;
4272
4281
  }
4273
4282
  let e = J.value;
4274
- e && (Ye(e), e.focus());
4283
+ e && (Ze(e, { title: te("toolbar.tableOfContents") }), e.focus());
4275
4284
  }
4276
- let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } = ko({
4285
+ let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } = Po({
4277
4286
  editorView: J,
4278
4287
  getDocument: Y,
4279
4288
  readOnly: f,
@@ -4282,7 +4291,7 @@ var Uo = (e) => {
4282
4291
  onChange: u
4283
4292
  }), qn = k(() => {
4284
4293
  T.value;
4285
- let e = X.value, t = e ? $e(e.state).paragraphFormatting : {};
4294
+ let e = X.value, t = e ? et(e.state).paragraphFormatting : {};
4286
4295
  return {
4287
4296
  indentLeft: t.indentLeft ?? 0,
4288
4297
  indentRight: t.indentRight ?? 0,
@@ -4341,7 +4350,7 @@ var Uo = (e) => {
4341
4350
  if (f.value) return;
4342
4351
  let t = Y();
4343
4352
  if (!t) return;
4344
- let n = ct(t, e);
4353
+ let n = ut(t, e);
4345
4354
  Ct(n), mt.value = !0, T.value++, At(), u(n);
4346
4355
  }
4347
4356
  function Zn(e, t) {
@@ -4352,7 +4361,7 @@ var Uo = (e) => {
4352
4361
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4353
4362
  }
4354
4363
  let $n = H(!1);
4355
- co({
4364
+ mo({
4356
4365
  documentBuffer: () => o.documentBuffer ?? null,
4357
4366
  document: () => o.document ?? null,
4358
4367
  loadDocumentBuffer: bt,
@@ -4383,21 +4392,21 @@ var Uo = (e) => {
4383
4392
  }
4384
4393
  S.value = !0, un.recomputeHeadingsIfOpen(), Q.seedFromDocument();
4385
4394
  let t = Y();
4386
- t && o.onCompatibilityChange?.(et(t)), o.autoOpenReviewSidebar !== !1 && !$n.value && (xn.value.length > 0 || bn.value.length > 0) && ($n.value = !0, A.value = !0), nr(), c("ready");
4395
+ t && o.onCompatibilityChange?.(tt(t)), o.autoOpenReviewSidebar !== !1 && !$n.value && (xn.value.length > 0 || bn.value.length > 0) && ($n.value = !0, A.value = !0), nr(), c("ready");
4387
4396
  }), Ae(() => {
4388
- let e = ot.on("selectionChange", () => {
4397
+ let e = Xe.on("selectionChange", () => {
4389
4398
  T.value++, $.updateFloatingButton();
4390
- }), t = ot.on("docChange", () => {
4399
+ }), t = Xe.on("docChange", () => {
4391
4400
  T.value++, un.recomputeHeadingsIfOpen();
4392
- }), n = ot.on("layoutComplete", () => {
4401
+ }), n = Xe.on("layoutComplete", () => {
4393
4402
  T.value++;
4394
- }), r = qt.install(), i = it(() => o.onFontsLoaded?.());
4403
+ }), r = qt.install(), i = at(() => o.onFontsLoaded?.());
4395
4404
  z(() => {
4396
4405
  e(), t(), n(), r(), i();
4397
4406
  });
4398
4407
  });
4399
- let { exposed: rr } = fo({
4400
- editor: ot,
4408
+ let { exposed: rr } = _o({
4409
+ editor: Xe,
4401
4410
  editorView: J,
4402
4411
  isDirty: mt,
4403
4412
  commentsDirty: Q.commentsDirty,
@@ -4445,7 +4454,7 @@ var Uo = (e) => {
4445
4454
  ]),
4446
4455
  style: R(e.style)
4447
4456
  }, [
4448
- P("div", Go, [F(Ii, {
4457
+ P("div", Xo, [F(Vi, {
4449
4458
  "show-table-insert": o.showTableInsert !== !1,
4450
4459
  onRename: n[0] ||= (e) => c("rename", e),
4451
4460
  onMenuAction: Yn,
@@ -4462,7 +4471,7 @@ var Uo = (e) => {
4462
4471
  "zoom-percent": G(je),
4463
4472
  "is-min-zoom": G(U),
4464
4473
  "is-max-zoom": G(Pe),
4465
- "zoom-presets": G(Je),
4474
+ "zoom-presets": G(Ke),
4466
4475
  "show-zoom-control": e.showZoomControl,
4467
4476
  "editor-mode": d.value,
4468
4477
  "show-review-controls": p.value,
@@ -4536,7 +4545,7 @@ var Uo = (e) => {
4536
4545
  "onImageWrapType",
4537
4546
  "onImageTransform"
4538
4547
  ])) : M("", !0)]),
4539
- F(ji, {
4548
+ F(Ii, {
4540
4549
  "show-find-replace": E.value,
4541
4550
  "onUpdate:showFindReplace": n[8] ||= (e) => E.value = e,
4542
4551
  "show-hyperlink": _e.value,
@@ -4555,11 +4564,11 @@ var Uo = (e) => {
4555
4564
  "scroll-visible-position-into-view": G($t),
4556
4565
  bookmarks: De.value,
4557
4566
  "current-watermark": wn.value,
4558
- "selected-image-pm-pos": G(Nt)?.pmPos ?? null,
4567
+ "selected-image-pm-pos": G(Z)?.pmPos ?? null,
4559
4568
  "section-properties": Cn.value,
4560
4569
  "table-properties": Tn.value,
4561
4570
  onInsertSymbol: G(jn),
4562
- onHyperlinkSubmit: G(Ht),
4571
+ onHyperlinkSubmit: G(Bt),
4563
4572
  onHyperlinkRemove: G(Ut),
4564
4573
  onPageSetupApply: G(Rn),
4565
4574
  onTablePropertiesApply: Qn,
@@ -4584,10 +4593,10 @@ var Uo = (e) => {
4584
4593
  "onHyperlinkRemove",
4585
4594
  "onPageSetupApply"
4586
4595
  ]),
4587
- G(ht) ? (V(), N("div", Ko, W(G(ht)), 1)) : Z.value ? (V(), N("div", qo, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
4596
+ G(ht) ? (V(), N("div", Zo, W(G(ht)), 1)) : Mt.value ? (V(), N("div", Qo, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
4588
4597
  key: 0,
4589
4598
  node: e.loadingIndicator
4590
- }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", Jo, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
4599
+ }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", $o, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
4591
4600
  key: 0,
4592
4601
  node: e.placeholder
4593
4602
  }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
@@ -4606,8 +4615,8 @@ var Uo = (e) => {
4606
4615
  ref: me,
4607
4616
  class: "docx-editor-vue__editor-scroll",
4608
4617
  onScroll: tr
4609
- }, [P("div", Yo, [
4610
- ge.value && !f.value ? (V(), N("div", Xo, [F(ne, {
4618
+ }, [P("div", es, [
4619
+ ge.value && !f.value ? (V(), N("div", ts, [F(ne, {
4611
4620
  "section-props": Cn.value,
4612
4621
  zoom: G(B),
4613
4622
  unit: e.rulerUnit ?? "inch",
@@ -4641,7 +4650,7 @@ var Uo = (e) => {
4641
4650
  "onFirstLineIndentChange",
4642
4651
  "onTabStopRemove"
4643
4652
  ])])) : M("", !0),
4644
- ge.value && !f.value ? (V(), N("div", Zo, [F(v, {
4653
+ ge.value && !f.value ? (V(), N("div", ns, [F(v, {
4645
4654
  "section-props": Cn.value,
4646
4655
  zoom: G(B),
4647
4656
  unit: e.rulerUnit ?? "inch",
@@ -4660,21 +4669,21 @@ var Uo = (e) => {
4660
4669
  ref_key: "pagesViewportRef",
4661
4670
  ref: pe,
4662
4671
  class: "docx-editor-vue__pages-viewport",
4663
- onWheel: Xe,
4672
+ onWheel: Je,
4664
4673
  onMousedown: n[25] ||= (...e) => G(en) && G(en)(...e),
4665
4674
  onMousemove: n[26] ||= (...e) => G(tn) && G(tn)(...e),
4666
4675
  onClick: n[27] ||= (...e) => G(nn) && G(nn)(...e),
4667
4676
  onDblclick: n[28] ||= (...e) => G(rn) && G(rn)(...e),
4668
4677
  onContextmenu: n[29] ||= q((...e) => G(hn) && G(hn)(...e), ["prevent"])
4669
4678
  }, [
4670
- P("div", Qo, [
4679
+ P("div", rs, [
4671
4680
  P("div", {
4672
4681
  ref_key: "pagesRef",
4673
4682
  ref: w,
4674
4683
  class: L(["docx-editor-vue__pages paged-editor__pages", G(Yt) ? `paged-editor--hf-editing paged-editor--editing-${G(Yt).position}` : ""]),
4675
4684
  style: R(kn.value)
4676
4685
  }, null, 6),
4677
- F(va, {
4686
+ F(Ca, {
4678
4687
  "editor-view": cn(),
4679
4688
  "hidden-container": ue.value,
4680
4689
  "pages-container": w.value,
@@ -4687,11 +4696,11 @@ var Uo = (e) => {
4687
4696
  "selection",
4688
4697
  "zoom"
4689
4698
  ]),
4690
- P("div", $o, [
4691
- F(fi, {
4699
+ P("div", is, [
4700
+ F(_i, {
4692
4701
  "get-view": () => G(J),
4693
4702
  "get-pages-container": () => w.value,
4694
- "editor-state": G(lt),
4703
+ "editor-state": G(st),
4695
4704
  zoom: G(B),
4696
4705
  layout: G(gt),
4697
4706
  blocks: G(_t),
@@ -4711,7 +4720,7 @@ var Uo = (e) => {
4711
4720
  "selected-canonical",
4712
4721
  "selection-seq"
4713
4722
  ]),
4714
- F(mi, {
4723
+ F(yi, {
4715
4724
  range: he.value,
4716
4725
  "get-pages-container": () => w.value,
4717
4726
  zoom: G(B),
@@ -4726,11 +4735,11 @@ var Uo = (e) => {
4726
4735
  "blocks",
4727
4736
  "measures"
4728
4737
  ]),
4729
- o.showTemplateDirectives ? (V(), j(ja, {
4738
+ o.showTemplateDirectives ? (V(), j(Ia, {
4730
4739
  key: 0,
4731
4740
  "get-view": () => G(J),
4732
4741
  "get-pages-container": () => w.value,
4733
- "editor-state": G(lt),
4742
+ "editor-state": G(st),
4734
4743
  zoom: G(B),
4735
4744
  layout: G(gt),
4736
4745
  blocks: G(_t),
@@ -4744,9 +4753,9 @@ var Uo = (e) => {
4744
4753
  "blocks",
4745
4754
  "measures"
4746
4755
  ])) : M("", !0),
4747
- F(vi, {
4756
+ F(Ci, {
4748
4757
  "get-pages-container": () => w.value,
4749
- "editor-state": G(lt),
4758
+ "editor-state": G(st),
4750
4759
  zoom: G(B),
4751
4760
  "sync-coordinator": G(yt)
4752
4761
  }, null, 8, [
@@ -4755,7 +4764,7 @@ var Uo = (e) => {
4755
4764
  "zoom",
4756
4765
  "sync-coordinator"
4757
4766
  ]),
4758
- F(Ei, {
4767
+ F(ji, {
4759
4768
  "get-view": () => G(J),
4760
4769
  "get-pages-container": () => w.value,
4761
4770
  zoom: G(B),
@@ -4770,7 +4779,7 @@ var Uo = (e) => {
4770
4779
  ])
4771
4780
  ])
4772
4781
  ]),
4773
- G(Yt) ? (V(), j(ba, {
4782
+ G(Yt) ? (V(), j(Ta, {
4774
4783
  key: 0,
4775
4784
  edit: G(Yt),
4776
4785
  "get-view": cn,
@@ -4785,20 +4794,20 @@ var Uo = (e) => {
4785
4794
  class: "docx-editor-vue__note-editor",
4786
4795
  "aria-label": jt.value,
4787
4796
  onKeydown: n[16] ||= Re(q((...e) => G(Dt) && G(Dt)(...e), ["stop", "prevent"]), ["esc"])
4788
- }, [P("header", ts, [P("span", null, W(jt.value), 1), P("button", {
4797
+ }, [P("header", os, [P("span", null, W(jt.value), 1), P("button", {
4789
4798
  type: "button",
4790
4799
  "aria-label": G(te)("common.closeDialog"),
4791
4800
  onClick: n[15] ||= (...e) => G(Dt) && G(Dt)(...e)
4792
- }, " × ", 8, ns)]), P("div", {
4801
+ }, " × ", 8, ss)]), P("div", {
4793
4802
  ref_key: "notePmRef",
4794
4803
  ref: Ee,
4795
4804
  class: "docx-editor-vue__note-editor-host"
4796
- }, null, 512)], 40, es), [[Fe, G(ft)]]),
4797
- F(_a, {
4798
- "image-info": G(Nt),
4805
+ }, null, 512)], 40, as), [[Fe, G(ft)]]),
4806
+ F(Sa, {
4807
+ "image-info": G(Z),
4799
4808
  zoom: G(B),
4800
4809
  view: X.value,
4801
- onDeselect: n[17] ||= (e) => Nt.value = null,
4810
+ onDeselect: n[17] ||= (e) => Z.value = null,
4802
4811
  onInteractStart: n[18] ||= (e) => Pt.value = !0,
4803
4812
  onInteractEnd: n[19] ||= (e) => Pt.value = !1,
4804
4813
  onContextMenu: G(gn)
@@ -4808,14 +4817,14 @@ var Uo = (e) => {
4808
4817
  "view",
4809
4818
  "onContextMenu"
4810
4819
  ]),
4811
- F(Va, {
4812
- data: G(Vt),
4820
+ F(Ka, {
4821
+ data: G(zt),
4813
4822
  "read-only": f.value,
4814
4823
  onNavigate: G(Wt),
4815
4824
  onCopy: Sn,
4816
4825
  onEdit: G(Gt),
4817
4826
  onRemove: G(Kt),
4818
- onClose: n[20] ||= (e) => Vt.value = null
4827
+ onClose: n[20] ||= (e) => zt.value = null
4819
4828
  }, null, 8, [
4820
4829
  "data",
4821
4830
  "read-only",
@@ -4833,7 +4842,7 @@ var Uo = (e) => {
4833
4842
  }),
4834
4843
  "aria-label": G(Jt).type === "row" ? "Insert row" : "Insert column",
4835
4844
  onMousedown: n[21] ||= (...e) => G(an) && G(an)(...e)
4836
- }, " + ", 44, rs)) : M("", !0),
4845
+ }, " + ", 44, cs)) : M("", !0),
4837
4846
  F(g, {
4838
4847
  comments: G(xn),
4839
4848
  "pages-container": w.value,
@@ -4912,12 +4921,12 @@ var Uo = (e) => {
4912
4921
  size: 18
4913
4922
  })], 36)) : M("", !0)
4914
4923
  ], 544),
4915
- O.value ? M("", !0) : (V(), j(Sa, {
4924
+ O.value ? M("", !0) : (V(), j(Da, {
4916
4925
  key: 2,
4917
4926
  "left-offset": 12,
4918
4927
  onToggle: G(un).handleToggleOutline
4919
4928
  }, null, 8, ["onToggle"])),
4920
- G(Xt).totalPages > 1 ? (V(), j(Ca, {
4929
+ G(Xt).totalPages > 1 ? (V(), j(Oa, {
4921
4930
  key: 3,
4922
4931
  "current-page": G(Xt).currentPage,
4923
4932
  "total-pages": G(Xt).totalPages,
@@ -4927,7 +4936,7 @@ var Uo = (e) => {
4927
4936
  "total-pages",
4928
4937
  "visible"
4929
4938
  ])) : M("", !0),
4930
- F(Ai, {
4939
+ F(Fi, {
4931
4940
  "is-open": O.value,
4932
4941
  headings: ke.value,
4933
4942
  "get-scroll-container": () => w.value,
@@ -4940,13 +4949,13 @@ var Uo = (e) => {
4940
4949
  "onNavigate"
4941
4950
  ])
4942
4951
  ])], 544),
4943
- F(sa, {
4952
+ F(fa, {
4944
4953
  "read-only": f.value,
4945
4954
  "context-menu": G(dn),
4946
4955
  "image-context-menu": G(fn),
4947
4956
  "image-context-menu-text-actions": G(pn),
4948
4957
  "custom-text-menu-items": G(mn),
4949
- "can-open-image-properties": G(Nt) !== null,
4958
+ "can-open-image-properties": G(Z) !== null,
4950
4959
  onContextMenuAction: G(vn),
4951
4960
  onCloseContextMenu: n[31] ||= (e) => G(dn).isOpen = !1,
4952
4961
  onImageWrapSelect: G(_n),
@@ -4962,16 +4971,16 @@ var Uo = (e) => {
4962
4971
  "onContextMenuAction",
4963
4972
  "onImageWrapSelect"
4964
4973
  ]),
4965
- F(Ti, {
4974
+ F(Ai, {
4966
4975
  "event-root": f.value ? null : w.value,
4967
4976
  view: G(J)
4968
4977
  }, null, 8, ["event-root", "view"])
4969
4978
  ], 6));
4970
4979
  }
4971
- }), [["__scopeId", "data-v-adf3fef8"]]);
4980
+ }), [["__scopeId", "data-v-3a7b54e3"]]);
4972
4981
  //#endregion
4973
4982
  //#region src/utils/listState.ts
4974
- function as() {
4983
+ function us() {
4975
4984
  return {
4976
4985
  type: "none",
4977
4986
  level: 0,
@@ -4980,30 +4989,30 @@ function as() {
4980
4989
  }
4981
4990
  //#endregion
4982
4991
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
4983
- var os = ["aria-label"], ss = ["aria-label"], cs = [
4992
+ var ds = ["aria-label"], fs = ["aria-label"], ps = [
4984
4993
  "disabled",
4985
4994
  "title",
4986
4995
  "aria-label"
4987
- ], ls = [
4996
+ ], ms = [
4988
4997
  "disabled",
4989
4998
  "title",
4990
4999
  "aria-label"
4991
- ], us = ["aria-label"], ds = [
5000
+ ], hs = ["aria-label"], gs = [
4992
5001
  "disabled",
4993
5002
  "title",
4994
5003
  "aria-label",
4995
5004
  "aria-pressed"
4996
- ], fs = [
5005
+ ], _s = [
4997
5006
  "disabled",
4998
5007
  "title",
4999
5008
  "aria-label",
5000
5009
  "aria-pressed"
5001
- ], ps = [
5010
+ ], vs = [
5002
5011
  "disabled",
5003
5012
  "title",
5004
5013
  "aria-label",
5005
5014
  "aria-pressed"
5006
- ], ms = /*#__PURE__*/ t(/* @__PURE__ */ I({
5015
+ ], ys = /*#__PURE__*/ t(/* @__PURE__ */ I({
5007
5016
  __name: "FormattingBar",
5008
5017
  props: {
5009
5018
  currentFormatting: {},
@@ -5045,7 +5054,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5045
5054
  "redo"
5046
5055
  ],
5047
5056
  setup(e, { emit: t }) {
5048
- let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = k(() => a.currentFormatting ?? {}), l = k(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = k(() => c.value.listState ?? as()), d = k(() => {
5057
+ let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = k(() => a.currentFormatting ?? {}), l = k(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = k(() => c.value.listState ?? us()), d = k(() => {
5049
5058
  let e = c.value.color;
5050
5059
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5051
5060
  }), f = k(() => {
@@ -5078,7 +5087,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5078
5087
  }, [F(i, {
5079
5088
  name: "undo",
5080
5089
  size: 18
5081
- })], 40, cs), P("button", {
5090
+ })], 40, ps), P("button", {
5082
5091
  type: "button",
5083
5092
  class: "docx-formatting-bar__btn",
5084
5093
  disabled: e.disabled || !e.canRedo,
@@ -5088,7 +5097,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5088
5097
  }, [F(i, {
5089
5098
  name: "redo",
5090
5099
  size: 18
5091
- })], 40, ls)], 8, ss),
5100
+ })], 40, ms)], 8, fs),
5092
5101
  r[13] ||= P("span", {
5093
5102
  class: "docx-formatting-bar__divider",
5094
5103
  role: "separator"
@@ -5119,7 +5128,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5119
5128
  }, [F(i, {
5120
5129
  name: "format_bold",
5121
5130
  size: 18
5122
- })], 42, ds),
5131
+ })], 42, gs),
5123
5132
  P("button", {
5124
5133
  type: "button",
5125
5134
  class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
@@ -5131,7 +5140,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5131
5140
  }, [F(i, {
5132
5141
  name: "format_italic",
5133
5142
  size: 18
5134
- })], 42, fs),
5143
+ })], 42, _s),
5135
5144
  P("button", {
5136
5145
  type: "button",
5137
5146
  class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
@@ -5143,8 +5152,8 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5143
5152
  }, [F(i, {
5144
5153
  name: "format_underlined",
5145
5154
  size: 18
5146
- })], 42, ps)
5147
- ], 8, us),
5155
+ })], 42, vs)
5156
+ ], 8, hs),
5148
5157
  e.showTextColorPicker ? (V(), N(D, { key: 1 }, [r[12] ||= P("span", {
5149
5158
  class: "docx-formatting-bar__divider",
5150
5159
  role: "separator"
@@ -5186,9 +5195,9 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5186
5195
  "disabled",
5187
5196
  "can-outdent"
5188
5197
  ])) : M("", !0)
5189
- ], 10, os));
5198
+ ], 10, ds));
5190
5199
  }
5191
- }), [["__scopeId", "data-v-fc03de2e"]]), hs = [
5200
+ }), [["__scopeId", "data-v-fc03de2e"]]), bs = [
5192
5201
  {
5193
5202
  value: .5,
5194
5203
  label: "50%"
@@ -5213,7 +5222,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5213
5222
  value: 2,
5214
5223
  label: "200%"
5215
5224
  }
5216
- ], gs = /*#__PURE__*/ t(/* @__PURE__ */ I({
5225
+ ], xs = /*#__PURE__*/ t(/* @__PURE__ */ I({
5217
5226
  __name: "ZoomControl",
5218
5227
  props: {
5219
5228
  value: { default: 1 },
@@ -5230,7 +5239,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5230
5239
  },
5231
5240
  emits: ["change"],
5232
5241
  setup(e, { emit: t }) {
5233
- let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? hs), o = k(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = k(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = k(() => o.value ? String(o.value.value) : String(r.value)), l = k(() => {
5242
+ let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? bs), o = k(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = k(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = k(() => o.value ? String(o.value.value) : String(r.value)), l = k(() => {
5234
5243
  let e = a.value.map((e) => ({
5235
5244
  value: String(e.value),
5236
5245
  label: e.label
@@ -5258,7 +5267,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5258
5267
  "disabled"
5259
5268
  ]));
5260
5269
  }
5261
- }), [["__scopeId", "data-v-8079e07f"]]), _s = (e, t, n = {}) => {
5270
+ }), [["__scopeId", "data-v-8079e07f"]]), Ss = (e, t, n = {}) => {
5262
5271
  let { colorMode: r = oe, locale: i = "en", ...a } = n;
5263
5272
  return new Promise((n, o) => {
5264
5273
  let s = H(null), c = null, l = !1, d = {
@@ -5284,7 +5293,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5284
5293
  }
5285
5294
  };
5286
5295
  c = A({ setup() {
5287
- return () => Ee(is, {
5296
+ return () => Ee(ls, {
5288
5297
  ...a,
5289
5298
  documentBuffer: e,
5290
5299
  ref: s,
@@ -5299,4 +5308,4 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
5299
5308
  });
5300
5309
  };
5301
5310
  //#endregion
5302
- export { gi as AutocompleteCaretOverlay, Yr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Kr as DOCUMENT_PRESET_VERSION, qr as DOCUMENT_STYLE_SET_VERSION, is as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, ms as FormattingBar, me as HyperlinkDialog, he as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Ur as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, gs as ZoomControl, yt as acceptAutocompleteSuggestion, bt as acceptAutocompleteWord, pt as anonymizationDecorationsKey, xt as appendAutocompleteToken, Pn as applyFolioAIEditOperations, Xr as applySuggestions, St as autocompleteSuggestionKey, Y as autocompleteSuggestionPlugin, $r as buildPositionalText, Ct as clearAutocompleteSuggestion, Cn as clearTemplateSlashMenu, ue as colorModePlugin, wn as consumeTemplateSlashQuery, ai as createAICitationDecorationsPlugin, Jr as createDocx, Rr as createEmptyDocument, Rn as createFolioAIEditSnapshot, Wr as createStellaStyleDocumentPreset, Gr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, sr as deriveBlockId, Bn as diffWordSegments, zr as extractDocumentStyleSet, Br as extractDocumentStyleSetFromDocx, wt as finishAutocompleteSuggestion, ci as fromMarkdown, mt as getAnonymizationMatches, Tt as getAutocompleteSuggestion, ot as getDocumentWatermark, ri as getFolioCaretViewportRect, cr as getFolioParaIdFromBlockId, ii as getFolioSelectionViewportRect, en as getTemplateDirectives, Tn as getTemplateSlashMenu, Wn as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Vr as inspectDocumentStyles, Hr as inspectDocumentStylesFromDocx, ur as isFolioBlockId, dr as isSequentialFolioBlockId, Zr as isSuggestionStale, Gn as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, _s as renderAsync, En as resetTemplateSlashQuery, Qr as resolveSuggestionAnchor, nn as scanDirectives, ni as scrollFolioPositionIntoView, oi as setAICitationsMeta, ei as setAISuggestionsMeta, si as setActiveCitationMeta, gt as setAnonymizationTermsMeta, J as setDocumentWatermark, ti as setFocusedSuggestionMeta, Sn as setTemplatePreviewValues, Dt as shouldTriggerAutocomplete, Ot as startAutocompleteSuggestion, Dn as templateSlashMenuKey, li as toMarkdown, ui as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };
5311
+ export { xi as AutocompleteCaretOverlay, ei as DEFAULT_AI_SUGGESTION_PRESETS, bt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Zr as DOCUMENT_PRESET_VERSION, Qr as DOCUMENT_STYLE_SET_VERSION, ls as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, ys as FormattingBar, me as HyperlinkDialog, he as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Jr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, xs as ZoomControl, xt as acceptAutocompleteSuggestion, St as acceptAutocompleteWord, ht as anonymizationDecorationsKey, Y as appendAutocompleteToken, zn as applyFolioAIEditOperations, ti as applySuggestions, Ct as autocompleteSuggestionKey, wt as autocompleteSuggestionPlugin, ii as buildPositionalText, Tt as clearAutocompleteSuggestion, On as clearTemplateSlashMenu, ue as colorModePlugin, kn as consumeTemplateSlashQuery, ui as createAICitationDecorationsPlugin, $r as createDocx, Ur as createEmptyDocument, Un as createFolioAIEditSnapshot, Yr as createStellaStyleDocumentPreset, Xr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, pr as deriveBlockId, Kn as diffWordSegments, Wr as extractDocumentStyleSet, Gr as extractDocumentStyleSetFromDocx, Et as finishAutocompleteSuggestion, pi as fromMarkdown, gt as getAnonymizationMatches, Dt as getAutocompleteSuggestion, st as getDocumentWatermark, ci as getFolioCaretViewportRect, mr as getFolioParaIdFromBlockId, li as getFolioSelectionViewportRect, nn as getTemplateDirectives, An as getTemplateSlashMenu, Xn as hashFolioAIBlockText, u as i18nPlugin, We as insertImageFromFile, Ke as insertPageBreakInView, Je as insertTableInView, Xe as insertTableOfContentsInView, Kr as inspectDocumentStyles, qr as inspectDocumentStylesFromDocx, gr as isFolioBlockId, _r as isSequentialFolioBlockId, ni as isSuggestionStale, Zn as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, Ss as renderAsync, jn as resetTemplateSlashQuery, ri as resolveSuggestionAnchor, an as scanDirectives, si as scrollFolioPositionIntoView, di as setAICitationsMeta, ai as setAISuggestionsMeta, fi as setActiveCitationMeta, vt as setAnonymizationTermsMeta, lt as setDocumentWatermark, oi as setFocusedSuggestionMeta, Dn as setTemplatePreviewValues, kt as shouldTriggerAutocomplete, At as startAutocompleteSuggestion, Mn as templateSlashMenuKey, mi as toMarkdown, hi as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };