@stll/folio-vue 0.12.3 → 0.12.4
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/{ListButtons-E4otfmrH.js → ListButtons-BlOX6_s_.js} +1 -1
- package/dist/{ListButtons-BtkdZBmB.cjs → ListButtons-R-0VECMy.cjs} +1 -1
- package/dist/{SplitCellDialog-DOPbnhHK.js → SplitCellDialog-D2wgbGwH.js} +24 -18
- package/dist/{SplitCellDialog-f2q91_OF.cjs → SplitCellDialog-Ds7yb_gS.cjs} +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +683 -684
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,90 +1,91 @@
|
|
|
1
|
-
import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-
|
|
2
|
-
import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-
|
|
1
|
+
import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-D2wgbGwH.js";
|
|
2
|
+
import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-BlOX6_s_.js";
|
|
3
3
|
import { t as ae } from "./zIndex-Ei9BbHSW.js";
|
|
4
4
|
import { a as S, c as C, i as oe, l as w, o as se, r as ce, s as le, t as ue, u as de } from "./useZoom-CbTb1bPs.js";
|
|
5
5
|
import { FindReplaceDialog as fe, FootnotePropertiesDialog as pe, HyperlinkDialog as me, ImagePositionDialog as T, ImagePropertiesDialog as he, InsertImageDialog as ge, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as D } from "./dialogs.js";
|
|
6
6
|
import { Fragment as O, Teleport as k, computed as A, createApp as Se, 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 L, mergeProps as De, nextTick as Oe, normalizeClass as R, normalizeStyle as z, onBeforeUnmount as B, onMounted as ke, onScopeDispose as Ae, 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
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 J } from "@stll/folio-core/prosemirror";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
8
|
+
import { expectTableAttrs as Xe } from "@stll/folio-core/prosemirror/attrs";
|
|
9
|
+
import { getTableContext as Ze } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
10
|
+
import { extractSelectionContext as Qe } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
|
|
11
|
+
import { inspectDocxCompatibility as $e } from "@stll/folio-core/docx/compatibility";
|
|
12
|
+
import { resolveActiveEditorStory as et } from "@stll/folio-core/controller/activeEditorStory";
|
|
13
|
+
import { clearAllCaches as tt, resetCanvasContext as nt } from "@stll/folio-core/layout-bridge/engine/measuring";
|
|
14
|
+
import { onFontsLoaded as rt } from "@stll/folio-core/utils/fontLoader";
|
|
15
|
+
import { twipsToPixels as it } from "@stll/folio-core/paged-layout/sectionGeometry";
|
|
16
|
+
import { getDocumentWatermark as at, getDocumentWatermark as ot, setDocumentWatermark as st, 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 Y, autocompleteSuggestionKey as xt, autocompleteSuggestionPlugin as St, 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";
|
|
21
22
|
import { createRenderedDomContext as X } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
22
|
-
import { ContentControlWidgetController as
|
|
23
|
-
import { NodeSelection as
|
|
24
|
-
import { pixelsToEmu as
|
|
25
|
-
import { IMAGE_LAYOUT_OPTIONS as
|
|
26
|
-
import { isTrackChangesMode as
|
|
27
|
-
import { clickToPositionDom as
|
|
28
|
-
import { calculateResizedImageDimensions as
|
|
29
|
-
import { findBodyPmAnchor as
|
|
30
|
-
import { resetImeCaretAnchor as
|
|
31
|
-
import { PAINTER_PAINTED_EVENT as
|
|
32
|
-
import { HeaderFooterSelectionOverlay as
|
|
33
|
-
import { getTemplateDirectives as
|
|
34
|
-
import { closeHistory as
|
|
35
|
-
import { clearFormatting as
|
|
36
|
-
import { PENDING_COMMENT_ID as
|
|
37
|
-
import { createComment as
|
|
38
|
-
import { acceptAIEditRevision as
|
|
23
|
+
import { ContentControlWidgetController as kt } from "@stll/folio-core/controller/contentControlWidgetController";
|
|
24
|
+
import { NodeSelection as At, 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 Q, rejectSuggestion as yn } from "@stll/folio-core/prosemirror/commands/comments";
|
|
39
40
|
import { makeRevisionInfo as $ } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
|
|
40
|
-
import { findPageIndexContainingPmPos as
|
|
41
|
-
import { proseDocToBlocks as
|
|
42
|
-
import { setTemplatePreviewValues as
|
|
43
|
-
import { clearTemplateSlashMenu as
|
|
44
|
-
import { createEmptyHeaderFooter as
|
|
45
|
-
import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as
|
|
46
|
-
import { findParagraphFragmentsByParaId as
|
|
47
|
-
import { blockSdtAttrsToSdtProperties as
|
|
48
|
-
import { setContentControlContentBlocksTr as
|
|
49
|
-
import { clampRangeToDocSize as
|
|
50
|
-
import { deriveBlockId as
|
|
51
|
-
import { getPageTextFromLayout as
|
|
52
|
-
import { applyStyle as
|
|
53
|
-
import { getCachedNumberingMap as
|
|
54
|
-
import { insertPageBreak as
|
|
55
|
-
import { insertSectionBreakContinuous as
|
|
56
|
-
import { setEmbeddedFontFamilyMap as
|
|
57
|
-
import { buildEmbeddedFontFamilyMap as
|
|
58
|
-
import { editHyperlinkAtCursor as
|
|
59
|
-
import { sanitizeExternalUrl as
|
|
60
|
-
import { collectHeadings as
|
|
61
|
-
import { clickToPositionInHfSlot as
|
|
62
|
-
import { findNoteStoryForTarget as
|
|
63
|
-
import { TABLE_INSERT_HIDE_DELAY_MS as
|
|
64
|
-
import { createCellDragTracker as
|
|
65
|
-
import { RemoteSelectionOverlay as
|
|
66
|
-
import { BodySelectionOverlay as
|
|
67
|
-
import { createEmptyDocument as
|
|
68
|
-
import { extractDocumentStyleSet as
|
|
69
|
-
import { STELLA_STYLE_SET_NAME as
|
|
70
|
-
import { DOCUMENT_PRESET_VERSION as
|
|
71
|
-
import { createDocx as
|
|
72
|
-
import { DEFAULT_AI_SUGGESTION_PRESETS as
|
|
73
|
-
import { applySuggestions as
|
|
74
|
-
import { isSuggestionStale as
|
|
75
|
-
import { buildPositionalText as
|
|
76
|
-
import { setAISuggestionsMeta as
|
|
77
|
-
import { scrollFolioPositionIntoView as
|
|
78
|
-
import { getFolioCaretViewportRect as
|
|
79
|
-
import { createAICitationDecorationsPlugin as
|
|
80
|
-
import { fromMarkdown as
|
|
41
|
+
import { findPageIndexContainingPmPos as bn } from "@stll/folio-core/layout-engine";
|
|
42
|
+
import { proseDocToBlocks as xn } 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 { blockSdtAttrsToSdtProperties as Jn, findBlockSdtMatch as Yn, findBlockSdtMatches as Xn, removeContentControlTr as Zn, setContentControlContentTr as Qn, setContentControlValueTr as $n } from "@stll/folio-core/prosemirror/commands/contentControls";
|
|
49
|
+
import { setContentControlContentBlocksTr as er } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
|
|
50
|
+
import { clampRangeToDocSize as tr, resolveFolioAIBlockRange as nr, resolveFolioAITextRange as rr, resolvePassageRange as ir } from "@stll/folio-core/ai-edits/blockRange";
|
|
51
|
+
import { deriveBlockId as ar, getFolioParaIdFromBlockId as or, getFolioParaIdFromBlockId as sr, isFolioBlockId as cr, isSequentialFolioBlockId as lr } from "@stll/folio-core/types/block-id";
|
|
52
|
+
import { getPageTextFromLayout as ur } from "@stll/folio-core/paged-layout/pageText";
|
|
53
|
+
import { applyStyle as dr, removeTabStop as fr, setIndentFirstLine as pr, setIndentLeft as mr, setIndentRight as hr } from "@stll/folio-core/prosemirror/commands/paragraph";
|
|
54
|
+
import { getCachedNumberingMap as gr } from "@stll/folio-core/docx";
|
|
55
|
+
import { insertPageBreak as _r } from "@stll/folio-core/prosemirror/commands/pageBreak";
|
|
56
|
+
import { insertSectionBreakContinuous as vr, insertSectionBreakNextPage as yr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
|
|
57
|
+
import { setEmbeddedFontFamilyMap as br } from "@stll/folio-core/utils/fontResolver";
|
|
58
|
+
import { buildEmbeddedFontFamilyMap as xr, extractEmbeddedFonts as Sr } from "@stll/folio-core/fonts/embeddedFonts";
|
|
59
|
+
import { editHyperlinkAtCursor as Cr, removeHyperlinkAtCursor as wr } from "@stll/folio-core/prosemirror/commands/hyperlink";
|
|
60
|
+
import { sanitizeExternalUrl as Tr } from "@stll/folio-core/utils/urlSecurity";
|
|
61
|
+
import { collectHeadings as Er } from "@stll/folio-core/utils/headingCollector";
|
|
62
|
+
import { clickToPositionInHfSlot as Dr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
|
|
63
|
+
import { findNoteStoryForTarget as Or } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
|
|
64
|
+
import { TABLE_INSERT_HIDE_DELAY_MS as kr, detectTableInsertHover as Ar } from "@stll/folio-core/layout-bridge/tableInsertHover";
|
|
65
|
+
import { createCellDragTracker as jr, findCellPosFromPmPos as Mr } from "@stll/folio-core/prosemirror/cellDragSelection";
|
|
66
|
+
import { RemoteSelectionOverlay as Nr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
|
|
67
|
+
import { BodySelectionOverlay as Pr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
|
|
68
|
+
import { createEmptyDocument as Fr } from "@stll/folio-core/utils/createDocument";
|
|
69
|
+
import { extractDocumentStyleSet as Ir, extractDocumentStyleSetFromDocx as Lr, inspectDocumentStyles as Rr, inspectDocumentStylesFromDocx as zr } from "@stll/folio-core/style-sets/extract";
|
|
70
|
+
import { STELLA_STYLE_SET_NAME as Br, createStellaStyleDocumentPreset as Vr, createStellaStyleSet as Hr } from "@stll/folio-core/style-sets/stellaStyle";
|
|
71
|
+
import { DOCUMENT_PRESET_VERSION as Ur, DOCUMENT_STYLE_SET_VERSION as Wr } from "@stll/folio-core/style-sets/types";
|
|
72
|
+
import { createDocx as Gr } from "@stll/folio-core/docx/rezip";
|
|
73
|
+
import { DEFAULT_AI_SUGGESTION_PRESETS as Kr } from "@stll/folio-core/ai-suggestions/types";
|
|
74
|
+
import { applySuggestions as qr } from "@stll/folio-core/ai-suggestions/apply";
|
|
75
|
+
import { isSuggestionStale as Jr, resolveSuggestionAnchor as Yr } from "@stll/folio-core/ai-suggestions/conflict";
|
|
76
|
+
import { buildPositionalText as Xr } from "@stll/folio-core/ai-suggestions/text-positions";
|
|
77
|
+
import { setAISuggestionsMeta as Zr, setFocusedSuggestionMeta as Qr } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
|
|
78
|
+
import { scrollFolioPositionIntoView as $r } from "@stll/folio-core/paged-layout/scrollToPmPosition";
|
|
79
|
+
import { getFolioCaretViewportRect as ei, getFolioSelectionViewportRect as ti } from "@stll/folio-core/paged-layout/selectionViewportRect";
|
|
80
|
+
import { createAICitationDecorationsPlugin as ni, setAICitationsMeta as ri, setActiveCitationMeta as ii } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
81
|
+
import { fromMarkdown as ai, toMarkdown as oi, toMarkdownResult as si } from "@stll/folio-core/markdown";
|
|
81
82
|
//#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
82
|
-
var
|
|
83
|
+
var ci = [
|
|
83
84
|
"data-folio-anonymization-label",
|
|
84
85
|
"data-folio-anonymization-canonical",
|
|
85
86
|
"data-folio-anonymization-selected",
|
|
86
87
|
"title"
|
|
87
|
-
],
|
|
88
|
+
], li = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
88
89
|
__name: "AnonymizationRectsOverlay",
|
|
89
90
|
props: {
|
|
90
91
|
getView: { type: Function },
|
|
@@ -99,7 +100,7 @@ var si = [
|
|
|
99
100
|
selectionSeq: {}
|
|
100
101
|
},
|
|
101
102
|
setup(e) {
|
|
102
|
-
let t = e, n = H(null), r = H([]), i =
|
|
103
|
+
let t = e, n = H(null), r = H([]), i = lt(), a = null;
|
|
103
104
|
function o() {
|
|
104
105
|
a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
|
|
105
106
|
a = null, s();
|
|
@@ -111,12 +112,12 @@ var si = [
|
|
|
111
112
|
r.value = [];
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
|
-
let s =
|
|
115
|
+
let s = ht(o);
|
|
115
116
|
if (s.length === 0) {
|
|
116
117
|
r.value = [];
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
|
-
let c = await
|
|
120
|
+
let c = await dt(s, {
|
|
120
121
|
pagesContainer: a,
|
|
121
122
|
zoom: t.zoom,
|
|
122
123
|
layout: t.layout,
|
|
@@ -158,7 +159,7 @@ var si = [
|
|
|
158
159
|
index: a
|
|
159
160
|
}, i.item(a)?.scrollIntoView({
|
|
160
161
|
block: "center",
|
|
161
|
-
behavior:
|
|
162
|
+
behavior: ft()
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
K(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
|
|
@@ -189,7 +190,7 @@ var si = [
|
|
|
189
190
|
"data-folio-anonymization-overlay": ""
|
|
190
191
|
}, [(V(!0), N(O, null, U(r.value, (t) => (V(), N(O, { key: `${t.label}:${t.canonical}` }, [(V(!0), N(O, null, U(t.rects, (n, r) => (V(), N("span", {
|
|
191
192
|
key: `${t.canonical}:${r}:${n.left}:${n.top}`,
|
|
192
|
-
class: R(["folio-anonymization-term", `folio-anonymization-term--${G(
|
|
193
|
+
class: R(["folio-anonymization-term", `folio-anonymization-term--${G(_t)(t.label)}`]),
|
|
193
194
|
"data-folio-anonymization-label": t.label,
|
|
194
195
|
"data-folio-anonymization-canonical": t.canonical,
|
|
195
196
|
"data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
|
|
@@ -201,12 +202,12 @@ var si = [
|
|
|
201
202
|
width: `${n.width}px`,
|
|
202
203
|
height: `${n.height}px`
|
|
203
204
|
})
|
|
204
|
-
}, null, 14,
|
|
205
|
+
}, null, 14, ci))), 128))], 64))), 128))], 512));
|
|
205
206
|
}
|
|
206
|
-
}), [["__scopeId", "data-v-df8fe7df"]]),
|
|
207
|
+
}), [["__scopeId", "data-v-df8fe7df"]]), ui = {
|
|
207
208
|
class: "folio-passage-highlight-overlay",
|
|
208
209
|
"data-folio-passage-highlight-overlay": ""
|
|
209
|
-
},
|
|
210
|
+
}, di = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
210
211
|
__name: "PassageHighlightOverlay",
|
|
211
212
|
props: {
|
|
212
213
|
range: {},
|
|
@@ -217,7 +218,7 @@ var si = [
|
|
|
217
218
|
measures: {}
|
|
218
219
|
},
|
|
219
220
|
setup(e) {
|
|
220
|
-
let t = e, n = H([]), r =
|
|
221
|
+
let t = e, n = H([]), r = lt(), i = null;
|
|
221
222
|
function a() {
|
|
222
223
|
i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
223
224
|
i = null, o();
|
|
@@ -229,7 +230,7 @@ var si = [
|
|
|
229
230
|
n.value = [];
|
|
230
231
|
return;
|
|
231
232
|
}
|
|
232
|
-
let o = await
|
|
233
|
+
let o = await dt([i], {
|
|
233
234
|
pagesContainer: a,
|
|
234
235
|
zoom: t.zoom,
|
|
235
236
|
layout: t.layout,
|
|
@@ -253,7 +254,7 @@ var si = [
|
|
|
253
254
|
t.measures
|
|
254
255
|
], () => a(), { immediate: !0 }), B(() => {
|
|
255
256
|
r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
|
|
256
|
-
}), (e, t) => (V(), N("div",
|
|
257
|
+
}), (e, t) => (V(), N("div", ui, [(V(!0), N(O, null, U(n.value, (e, t) => (V(), N("span", {
|
|
257
258
|
key: `${t}:${e.left}:${e.top}`,
|
|
258
259
|
class: "folio-passage-highlight",
|
|
259
260
|
style: z({
|
|
@@ -265,11 +266,11 @@ var si = [
|
|
|
265
266
|
})
|
|
266
267
|
}, null, 4))), 128))]));
|
|
267
268
|
}
|
|
268
|
-
}), [["__scopeId", "data-v-bde9f41b"]]),
|
|
269
|
+
}), [["__scopeId", "data-v-bde9f41b"]]), fi = {
|
|
269
270
|
key: 0,
|
|
270
271
|
class: "folio-autocomplete-overlay",
|
|
271
272
|
"data-folio-autocomplete-overlay": ""
|
|
272
|
-
},
|
|
273
|
+
}, pi = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
273
274
|
__name: "AutocompleteCaretOverlay",
|
|
274
275
|
props: {
|
|
275
276
|
caret: {},
|
|
@@ -277,7 +278,7 @@ var si = [
|
|
|
277
278
|
isStreaming: { type: Boolean }
|
|
278
279
|
},
|
|
279
280
|
setup(e) {
|
|
280
|
-
return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div",
|
|
281
|
+
return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", fi, [P("span", {
|
|
281
282
|
class: "folio-autocomplete-ghost",
|
|
282
283
|
style: z({
|
|
283
284
|
left: `${e.caret.x}px`,
|
|
@@ -290,7 +291,7 @@ var si = [
|
|
|
290
291
|
"aria-hidden": "true"
|
|
291
292
|
}, "stella", 2)], 4)])) : M("", !0);
|
|
292
293
|
}
|
|
293
|
-
}), [["__scopeId", "data-v-00299904"]]),
|
|
294
|
+
}), [["__scopeId", "data-v-00299904"]]), mi = 48, hi = /* @__PURE__ */ I({
|
|
294
295
|
__name: "AutocompleteSuggestionOverlay",
|
|
295
296
|
props: {
|
|
296
297
|
getPagesContainer: { type: Function },
|
|
@@ -307,7 +308,7 @@ var si = [
|
|
|
307
308
|
let c = r.querySelector(".layout-page-content");
|
|
308
309
|
if (!c) return;
|
|
309
310
|
let l = (c.getBoundingClientRect().right - a.left) / i;
|
|
310
|
-
return Math.max(
|
|
311
|
+
return Math.max(mi, l - t);
|
|
311
312
|
}
|
|
312
313
|
}, s = () => {
|
|
313
314
|
let e = t.getPagesContainer(), r = t.editorState;
|
|
@@ -315,7 +316,7 @@ var si = [
|
|
|
315
316
|
n.value = null;
|
|
316
317
|
return;
|
|
317
318
|
}
|
|
318
|
-
let i =
|
|
319
|
+
let i = Et(r);
|
|
319
320
|
if (i.status === "idle" || i.text.length === 0) {
|
|
320
321
|
n.value = null;
|
|
321
322
|
return;
|
|
@@ -356,7 +357,7 @@ var si = [
|
|
|
356
357
|
t.editorState,
|
|
357
358
|
t.zoom,
|
|
358
359
|
r.value
|
|
359
|
-
], () => c()), (e, t) => (V(), j(
|
|
360
|
+
], () => c()), (e, t) => (V(), j(pi, {
|
|
360
361
|
caret: n.value?.caret ?? null,
|
|
361
362
|
text: n.value?.text ?? "",
|
|
362
363
|
"is-streaming": n.value?.isStreaming ?? !1
|
|
@@ -366,33 +367,33 @@ var si = [
|
|
|
366
367
|
"is-streaming"
|
|
367
368
|
]));
|
|
368
369
|
}
|
|
369
|
-
}),
|
|
370
|
-
function
|
|
371
|
-
je(
|
|
370
|
+
}), gi = Symbol("docx-portal-class");
|
|
371
|
+
function _i(e) {
|
|
372
|
+
je(gi, A(() => ({
|
|
372
373
|
"ep-root": !0,
|
|
373
374
|
dark: !!G(e)
|
|
374
375
|
})));
|
|
375
376
|
}
|
|
376
|
-
function
|
|
377
|
-
return L(
|
|
377
|
+
function vi() {
|
|
378
|
+
return L(gi, A(() => ({ "ep-root": !0 })));
|
|
378
379
|
}
|
|
379
380
|
//#endregion
|
|
380
381
|
//#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
381
|
-
var
|
|
382
|
+
var yi = ["aria-label"], bi = {
|
|
382
383
|
key: 0,
|
|
383
384
|
class: "content-control-picker__items",
|
|
384
385
|
role: "menu"
|
|
385
|
-
},
|
|
386
|
+
}, xi = {
|
|
386
387
|
key: 0,
|
|
387
388
|
class: "content-control-picker__empty"
|
|
388
|
-
},
|
|
389
|
+
}, Si = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
389
390
|
__name: "ContentControlWidgetsOverlay",
|
|
390
391
|
props: {
|
|
391
392
|
eventRoot: {},
|
|
392
393
|
view: {}
|
|
393
394
|
},
|
|
394
395
|
setup(e) {
|
|
395
|
-
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o =
|
|
396
|
+
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = vi(), s = new kt(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
|
|
396
397
|
c.value = s.getSnapshot();
|
|
397
398
|
});
|
|
398
399
|
K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), B(() => {
|
|
@@ -411,7 +412,7 @@ var vi = ["aria-label"], yi = {
|
|
|
411
412
|
role: "dialog",
|
|
412
413
|
"aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
|
|
413
414
|
onMousedown: t[1] ||= q(() => {}, ["stop"])
|
|
414
|
-
}, [c.value.status === "dropdown" ? (V(), N("div",
|
|
415
|
+
}, [c.value.status === "dropdown" ? (V(), N("div", bi, [c.value.items.length === 0 ? (V(), N("div", xi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(O, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
|
|
415
416
|
key: `${e.value}::${e.displayText}`,
|
|
416
417
|
"class-name": "content-control-picker__item",
|
|
417
418
|
type: "button",
|
|
@@ -428,9 +429,9 @@ var vi = ["aria-label"], yi = {
|
|
|
428
429
|
value: c.value.currentValue,
|
|
429
430
|
"default-open": !0,
|
|
430
431
|
onChange: d
|
|
431
|
-
}, null, 8, ["value"])) : M("", !0)], 46,
|
|
432
|
+
}, null, 8, ["value"])) : M("", !0)], 46, yi))]));
|
|
432
433
|
}
|
|
433
|
-
}), [["__scopeId", "data-v-19e067b7"]]),
|
|
434
|
+
}), [["__scopeId", "data-v-19e067b7"]]), Ci = /* @__PURE__ */ I({
|
|
434
435
|
__name: "DecorationLayer",
|
|
435
436
|
props: {
|
|
436
437
|
getView: { type: Function },
|
|
@@ -542,10 +543,10 @@ var vi = ["aria-label"], yi = {
|
|
|
542
543
|
"aria-hidden": "true"
|
|
543
544
|
}, null, 512));
|
|
544
545
|
}
|
|
545
|
-
}),
|
|
546
|
+
}), wi = { class: "doc-outline__header" }, Ti = { class: "doc-outline__body" }, Ei = {
|
|
546
547
|
key: 0,
|
|
547
548
|
class: "doc-outline__empty"
|
|
548
|
-
},
|
|
549
|
+
}, Di = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
549
550
|
__name: "DocumentOutline",
|
|
550
551
|
props: {
|
|
551
552
|
isOpen: { type: Boolean },
|
|
@@ -574,7 +575,7 @@ var vi = ["aria-label"], yi = {
|
|
|
574
575
|
role: "navigation",
|
|
575
576
|
"aria-label": "Document outline",
|
|
576
577
|
onMousedown: n[1] ||= q(() => {}, ["stop"])
|
|
577
|
-
}, [P("div",
|
|
578
|
+
}, [P("div", wi, [P("button", {
|
|
578
579
|
class: "doc-outline__back",
|
|
579
580
|
title: "Close outline",
|
|
580
581
|
"aria-label": "Close outline",
|
|
@@ -582,7 +583,7 @@ var vi = ["aria-label"], yi = {
|
|
|
582
583
|
}, [F(i, {
|
|
583
584
|
name: "arrow_back",
|
|
584
585
|
size: 20
|
|
585
|
-
})]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div",
|
|
586
|
+
})]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Ti, [e.headings.length === 0 ? (V(), N("div", Ei, "No headings found")) : (V(), j(G(r), {
|
|
586
587
|
key: 1,
|
|
587
588
|
items: o.value,
|
|
588
589
|
"get-scroll-container": e.getScrollContainer ?? (() => null),
|
|
@@ -590,7 +591,7 @@ var vi = ["aria-label"], yi = {
|
|
|
590
591
|
"aria-label": "Document outline"
|
|
591
592
|
}, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
|
|
592
593
|
}
|
|
593
|
-
}), [["__scopeId", "data-v-0797b3b1"]]),
|
|
594
|
+
}), [["__scopeId", "data-v-0797b3b1"]]), Oi = /* @__PURE__ */ I({
|
|
594
595
|
__name: "DocxEditorDialogs",
|
|
595
596
|
props: {
|
|
596
597
|
view: {},
|
|
@@ -683,10 +684,10 @@ var vi = ["aria-label"], yi = {
|
|
|
683
684
|
}, null, 8, ["is-open", "current-watermark"])
|
|
684
685
|
], 64));
|
|
685
686
|
}
|
|
686
|
-
}),
|
|
687
|
+
}), ki = {
|
|
687
688
|
key: 0,
|
|
688
689
|
class: "docx-editor-vue__title-bar"
|
|
689
|
-
},
|
|
690
|
+
}, Ai = { class: "docx-editor-vue__title-bar-left" }, ji = { class: "docx-editor-vue__title-bar-center" }, Mi = { class: "docx-editor-vue__title-bar-right" }, Ni = /* @__PURE__ */ I({
|
|
690
691
|
__name: "DocxEditorMenuBar",
|
|
691
692
|
props: {
|
|
692
693
|
showMenuBar: {
|
|
@@ -718,9 +719,9 @@ var vi = ["aria-label"], yi = {
|
|
|
718
719
|
],
|
|
719
720
|
setup(e, { emit: t }) {
|
|
720
721
|
let n = t;
|
|
721
|
-
return (t, r) => e.showMenuBar ? (V(), N("div",
|
|
722
|
-
P("div",
|
|
723
|
-
P("div",
|
|
722
|
+
return (t, r) => e.showMenuBar ? (V(), N("div", ki, [
|
|
723
|
+
P("div", Ai, [Me(t.$slots, "title-bar-left")]),
|
|
724
|
+
P("div", ji, [F(_, {
|
|
724
725
|
"model-value": e.documentName,
|
|
725
726
|
editable: e.documentNameEditable,
|
|
726
727
|
"onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
|
|
@@ -735,28 +736,28 @@ var vi = ["aria-label"], yi = {
|
|
|
735
736
|
"show-help-menu",
|
|
736
737
|
"show-table-insert"
|
|
737
738
|
])]),
|
|
738
|
-
P("div",
|
|
739
|
+
P("div", Mi, [Me(t.$slots, "title-bar-right")])
|
|
739
740
|
])) : M("", !0);
|
|
740
741
|
}
|
|
741
|
-
}),
|
|
742
|
+
}), Pi = ["aria-label"], Fi = { class: "image-ctx-menu__icon" }, Ii = { class: "image-ctx-menu__label" }, Li = {
|
|
742
743
|
key: 1,
|
|
743
744
|
class: "image-ctx-menu__divider",
|
|
744
745
|
role: "separator"
|
|
745
|
-
},
|
|
746
|
+
}, Ri = [
|
|
746
747
|
"data-wrap-type",
|
|
747
748
|
"data-current",
|
|
748
749
|
"data-disabled",
|
|
749
750
|
"disabled",
|
|
750
751
|
"title",
|
|
751
752
|
"onClick"
|
|
752
|
-
],
|
|
753
|
+
], zi = { class: "image-ctx-menu__icon" }, Bi = { class: "image-ctx-menu__label" }, Vi = ["aria-label"], Hi = ["disabled", "onClick"], Ui = { class: "image-ctx-menu__label" }, Wi = {
|
|
753
754
|
key: 0,
|
|
754
755
|
class: "image-ctx-menu__shortcut"
|
|
755
|
-
},
|
|
756
|
+
}, Gi = {
|
|
756
757
|
key: 0,
|
|
757
758
|
class: "image-ctx-menu__divider",
|
|
758
759
|
role: "separator"
|
|
759
|
-
},
|
|
760
|
+
}, Ki = 18, qi = 260, Ji = 10, Yi = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
760
761
|
__name: "ImageContextMenu",
|
|
761
762
|
props: {
|
|
762
763
|
state: {},
|
|
@@ -777,7 +778,7 @@ var vi = ["aria-label"], yi = {
|
|
|
777
778
|
function o() {
|
|
778
779
|
a("open-properties"), a("close");
|
|
779
780
|
}
|
|
780
|
-
let { t: s } = r(), c =
|
|
781
|
+
let { t: s } = r(), c = vi(), l = Nt, u = A(() => n.state ? Ft(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
|
|
781
782
|
inline: "wrap_text",
|
|
782
783
|
squareLeft: "format_image_left",
|
|
783
784
|
squareRight: "format_image_right",
|
|
@@ -789,17 +790,17 @@ var vi = ["aria-label"], yi = {
|
|
|
789
790
|
}
|
|
790
791
|
let p = A(() => {
|
|
791
792
|
if (!n.state) return {};
|
|
792
|
-
let e =
|
|
793
|
-
return typeof window < "u" && (t +
|
|
793
|
+
let e = Nt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
794
|
+
return typeof window < "u" && (t + qi > window.innerWidth && (t = window.innerWidth - qi - Ji), r + e > window.innerHeight && (r = window.innerHeight - e - Ji), t < Ji && (t = Ji), r < Ji && (r = Ji)), {
|
|
794
795
|
position: "fixed",
|
|
795
796
|
left: `${t}px`,
|
|
796
797
|
top: `${r}px`,
|
|
797
|
-
minWidth: `${
|
|
798
|
+
minWidth: `${qi}px`,
|
|
798
799
|
zIndex: 400
|
|
799
800
|
};
|
|
800
801
|
});
|
|
801
802
|
function m(e) {
|
|
802
|
-
return n.state ?
|
|
803
|
+
return n.state ? Lt(e, n.state.currentWrapType) : !1;
|
|
803
804
|
}
|
|
804
805
|
function h(e) {
|
|
805
806
|
m(e) && (a("select", e.choice), a("close"));
|
|
@@ -836,11 +837,11 @@ var vi = ["aria-label"], yi = {
|
|
|
836
837
|
"data-action": "open-properties",
|
|
837
838
|
onMousedown: n[1] ||= q(() => {}, ["prevent"]),
|
|
838
839
|
onClick: o
|
|
839
|
-
}, [P("span",
|
|
840
|
+
}, [P("span", Fi, [F(i, {
|
|
840
841
|
name: "settings",
|
|
841
|
-
size:
|
|
842
|
-
})]), P("span",
|
|
843
|
-
e.canOpenProperties ? (V(), N("div",
|
|
842
|
+
size: Ki
|
|
843
|
+
})]), P("span", Ii, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
|
|
844
|
+
e.canOpenProperties ? (V(), N("div", Li)) : M("", !0),
|
|
844
845
|
(V(!0), N(O, null, U(G(l), (e) => (V(), N("button", {
|
|
845
846
|
key: e.choice,
|
|
846
847
|
type: "button",
|
|
@@ -854,17 +855,17 @@ var vi = ["aria-label"], yi = {
|
|
|
854
855
|
onMousedown: n[2] ||= q(() => {}, ["prevent"]),
|
|
855
856
|
onClick: (t) => h(e)
|
|
856
857
|
}, [
|
|
857
|
-
P("span",
|
|
858
|
+
P("span", zi, [F(i, {
|
|
858
859
|
name: f(e.iconHint),
|
|
859
|
-
size:
|
|
860
|
+
size: Ki
|
|
860
861
|
}, null, 8, ["name"])]),
|
|
861
|
-
P("span",
|
|
862
|
+
P("span", Bi, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
|
|
862
863
|
e.choice === u.value ? (V(), N("span", {
|
|
863
864
|
key: 0,
|
|
864
865
|
class: "image-ctx-menu__current-dot",
|
|
865
866
|
"aria-label": G(s)("imageWrap.menu.ariaLabel")
|
|
866
|
-
}, "●", 8,
|
|
867
|
-
], 42,
|
|
867
|
+
}, "●", 8, Vi)) : M("", !0)
|
|
868
|
+
], 42, Ri))), 128)),
|
|
868
869
|
e.textActions && e.textActions.length > 0 ? (V(), N(O, { key: 2 }, [n[5] ||= P("div", {
|
|
869
870
|
class: "image-ctx-menu__divider",
|
|
870
871
|
role: "separator"
|
|
@@ -875,16 +876,16 @@ var vi = ["aria-label"], yi = {
|
|
|
875
876
|
disabled: e.disabled,
|
|
876
877
|
onMousedown: n[3] ||= q(() => {}, ["prevent"]),
|
|
877
878
|
onClick: (t) => g(e)
|
|
878
|
-
}, [P("span",
|
|
879
|
-
], 46,
|
|
879
|
+
}, [P("span", Ui, W(e.label), 1), e.shortcut ? (V(), N("span", Wi, W(e.shortcut), 1)) : M("", !0)], 40, Hi), e.dividerAfter ? (V(), N("div", Gi)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
|
|
880
|
+
], 46, Pi)) : M("", !0)]));
|
|
880
881
|
}
|
|
881
|
-
}), [["__scopeId", "data-v-fc8f35bc"]]),
|
|
882
|
+
}), [["__scopeId", "data-v-fc8f35bc"]]), Xi = ["disabled", "onMousedown"], Zi = {
|
|
882
883
|
key: 0,
|
|
883
884
|
class: "ctx-menu__icon"
|
|
884
|
-
},
|
|
885
|
+
}, Qi = { class: "ctx-menu__label" }, $i = {
|
|
885
886
|
key: 1,
|
|
886
887
|
class: "ctx-menu__shortcut"
|
|
887
|
-
},
|
|
888
|
+
}, ea = 220, ta = 32, na = 10, ra = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
888
889
|
__name: "TextContextMenu",
|
|
889
890
|
props: {
|
|
890
891
|
isOpen: { type: Boolean },
|
|
@@ -901,7 +902,7 @@ var vi = ["aria-label"], yi = {
|
|
|
901
902
|
setup(e, { emit: t }) {
|
|
902
903
|
let n = e, i = ({ node: e }) => e;
|
|
903
904
|
i.props = ["node"];
|
|
904
|
-
let a = t, { t: o } = r(), s =
|
|
905
|
+
let a = t, { t: o } = r(), s = vi(), c = H(null), l = A(() => {
|
|
905
906
|
let e = [], t = n.customItems ?? [];
|
|
906
907
|
for (let [n, r] of t.entries()) e.push({
|
|
907
908
|
id: `custom-${r.id}`,
|
|
@@ -1037,8 +1038,8 @@ var vi = ["aria-label"], yi = {
|
|
|
1037
1038
|
action: "deleteTable"
|
|
1038
1039
|
}), e;
|
|
1039
1040
|
}), u = A(() => {
|
|
1040
|
-
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 *
|
|
1041
|
-
return typeof window < "u" && (e +
|
|
1041
|
+
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 * ta + i * 9;
|
|
1042
|
+
return typeof window < "u" && (e + ea + na > window.innerWidth && (e = window.innerWidth - ea - na), t + a + na > window.innerHeight && (t = window.innerHeight - a - na)), {
|
|
1042
1043
|
position: "fixed",
|
|
1043
1044
|
left: `${e}px`,
|
|
1044
1045
|
top: `${t}px`,
|
|
@@ -1076,12 +1077,12 @@ var vi = ["aria-label"], yi = {
|
|
|
1076
1077
|
disabled: e.disabled,
|
|
1077
1078
|
onMousedown: q((t) => d(e.action), ["prevent"])
|
|
1078
1079
|
}, [
|
|
1079
|
-
e.icon ? (V(), N("span",
|
|
1080
|
-
P("span",
|
|
1081
|
-
e.shortcut ? (V(), N("span",
|
|
1082
|
-
], 42,
|
|
1080
|
+
e.icon ? (V(), N("span", Zi, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
|
|
1081
|
+
P("span", Qi, W(e.label), 1),
|
|
1082
|
+
e.shortcut ? (V(), N("span", $i, W(e.shortcut), 1)) : M("", !0)
|
|
1083
|
+
], 42, Xi))), 128))], 38)) : M("", !0)]));
|
|
1083
1084
|
}
|
|
1084
|
-
}), [["__scopeId", "data-v-c1416e84"]]),
|
|
1085
|
+
}), [["__scopeId", "data-v-c1416e84"]]), ia = /* @__PURE__ */ I({
|
|
1085
1086
|
__name: "DocxEditorOverlays",
|
|
1086
1087
|
props: {
|
|
1087
1088
|
readOnly: { type: Boolean },
|
|
@@ -1100,7 +1101,7 @@ var vi = ["aria-label"], yi = {
|
|
|
1100
1101
|
],
|
|
1101
1102
|
setup(e, { emit: t }) {
|
|
1102
1103
|
let n = t;
|
|
1103
|
-
return (t, r) => (V(), N(O, null, [F(
|
|
1104
|
+
return (t, r) => (V(), N(O, null, [F(ra, {
|
|
1104
1105
|
"is-open": e.contextMenu.isOpen,
|
|
1105
1106
|
position: e.contextMenu.position,
|
|
1106
1107
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -1122,7 +1123,7 @@ var vi = ["aria-label"], yi = {
|
|
|
1122
1123
|
"can-merge-cells",
|
|
1123
1124
|
"can-split-cell",
|
|
1124
1125
|
"custom-items"
|
|
1125
|
-
]), F(
|
|
1126
|
+
]), F(Yi, {
|
|
1126
1127
|
state: e.imageContextMenu,
|
|
1127
1128
|
"text-actions": e.imageContextMenuTextActions,
|
|
1128
1129
|
"can-open-properties": e.canOpenImageProperties,
|
|
@@ -1139,7 +1140,7 @@ var vi = ["aria-label"], yi = {
|
|
|
1139
1140
|
});
|
|
1140
1141
|
//#endregion
|
|
1141
1142
|
//#region src/composables/imageOverlayRect.ts
|
|
1142
|
-
function
|
|
1143
|
+
function aa(e) {
|
|
1143
1144
|
let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
|
|
1144
1145
|
return {
|
|
1145
1146
|
left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
|
|
@@ -1150,13 +1151,13 @@ function ia(e) {
|
|
|
1150
1151
|
}
|
|
1151
1152
|
//#endregion
|
|
1152
1153
|
//#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
1153
|
-
var
|
|
1154
|
+
var oa = ["data-handle", "onMousedown"], sa = ["title"], ca = {
|
|
1154
1155
|
key: 0,
|
|
1155
1156
|
class: "image-overlay__dim"
|
|
1156
|
-
},
|
|
1157
|
+
}, la = {
|
|
1157
1158
|
key: 1,
|
|
1158
1159
|
class: "image-overlay__dim image-overlay__dim--rotate"
|
|
1159
|
-
},
|
|
1160
|
+
}, ua = 4, da = 15, fa = 250, pa = 700, ma = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1160
1161
|
__name: "ImageSelectionOverlay",
|
|
1161
1162
|
props: {
|
|
1162
1163
|
imageInfo: {},
|
|
@@ -1194,8 +1195,8 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1194
1195
|
if (e.element.isConnected) return e.element;
|
|
1195
1196
|
let t = re();
|
|
1196
1197
|
if (!t) return null;
|
|
1197
|
-
let n =
|
|
1198
|
-
return n ?
|
|
1198
|
+
let n = Jt(t, e.pmPos);
|
|
1199
|
+
return n ? It(n) : null;
|
|
1199
1200
|
}
|
|
1200
1201
|
function S() {
|
|
1201
1202
|
let e = ie();
|
|
@@ -1209,7 +1210,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1209
1210
|
return;
|
|
1210
1211
|
}
|
|
1211
1212
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
1212
|
-
p.value =
|
|
1213
|
+
p.value = aa({
|
|
1213
1214
|
imageRect: r,
|
|
1214
1215
|
parentRect: n,
|
|
1215
1216
|
scrollLeft: t.scrollLeft,
|
|
@@ -1227,10 +1228,10 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1227
1228
|
let o = a - r;
|
|
1228
1229
|
S();
|
|
1229
1230
|
let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
|
|
1230
|
-
n = c === t ? n + 1 : 0, t = c, !(o >=
|
|
1231
|
+
n = c === t ? n + 1 : 0, t = c, !(o >= fa && n >= 2) && o < pa && (e = requestAnimationFrame(i));
|
|
1231
1232
|
};
|
|
1232
1233
|
e = requestAnimationFrame(i);
|
|
1233
|
-
let a = setTimeout(S,
|
|
1234
|
+
let a = setTimeout(S, fa);
|
|
1234
1235
|
C = () => {
|
|
1235
1236
|
cancelAnimationFrame(e), clearTimeout(a);
|
|
1236
1237
|
};
|
|
@@ -1355,7 +1356,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1355
1356
|
!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", de), document.addEventListener("mouseup", fe));
|
|
1356
1357
|
}
|
|
1357
1358
|
function de(e) {
|
|
1358
|
-
let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o =
|
|
1359
|
+
let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Ut(m, n, r, _, v, a);
|
|
1359
1360
|
u.value = Math.round(o.width), d.value = Math.round(o.height);
|
|
1360
1361
|
let s = y;
|
|
1361
1362
|
if (s) {
|
|
@@ -1375,7 +1376,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1375
1376
|
S();
|
|
1376
1377
|
return;
|
|
1377
1378
|
}
|
|
1378
|
-
let n =
|
|
1379
|
+
let n = Kt(e, t.pmPos, u.value, d.value);
|
|
1379
1380
|
n !== null && Ce(n), Oe(() => S());
|
|
1380
1381
|
}
|
|
1381
1382
|
let pe = 0, me = 0, T = 0, he = 0, ge = null, E = null;
|
|
@@ -1398,7 +1399,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1398
1399
|
}
|
|
1399
1400
|
function xe(e) {
|
|
1400
1401
|
let t = ye(e.clientX, e.clientY) - T, n = he + t;
|
|
1401
|
-
e.shiftKey || (n = Math.round(n /
|
|
1402
|
+
e.shiftKey || (n = Math.round(n / da) * da), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(ge, f.value) || "");
|
|
1402
1403
|
}
|
|
1403
1404
|
function D() {
|
|
1404
1405
|
document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", D), l.value = !1, a("interact-end");
|
|
@@ -1419,7 +1420,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1419
1420
|
if (!i.imageInfo || !p.value) return;
|
|
1420
1421
|
let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
|
|
1421
1422
|
let s = e.clientX - t, l = e.clientY - n;
|
|
1422
|
-
if (!(!o && Math.sqrt(s * s + l * l) <
|
|
1423
|
+
if (!(!o && Math.sqrt(s * s + l * l) < ua)) {
|
|
1423
1424
|
if (!o) {
|
|
1424
1425
|
o = !0, c.value = !0, a("interact-start"), k = document.createElement("div"), k.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
|
|
1425
1426
|
let e = i.zoom;
|
|
@@ -1441,7 +1442,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1441
1442
|
let a = te(n, r.pmPos);
|
|
1442
1443
|
if (!a) return;
|
|
1443
1444
|
let s;
|
|
1444
|
-
if (
|
|
1445
|
+
if (qt(a)) {
|
|
1445
1446
|
let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
|
|
1446
1447
|
if (!a || a.length === 0) return;
|
|
1447
1448
|
let c = null;
|
|
@@ -1457,21 +1458,21 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1457
1458
|
c = e ? e.querySelector(".layout-page-content") : null;
|
|
1458
1459
|
}
|
|
1459
1460
|
if (!c) return;
|
|
1460
|
-
let l = c.getBoundingClientRect(), u = i.zoom, d =
|
|
1461
|
-
s =
|
|
1461
|
+
let l = c.getBoundingClientRect(), u = i.zoom, d = Mt((e - l.left) / u), f = Mt((t - l.top) / u);
|
|
1462
|
+
s = Wt(n, r.pmPos, d, f);
|
|
1462
1463
|
} else {
|
|
1463
1464
|
let i = re();
|
|
1464
1465
|
if (!i) return;
|
|
1465
|
-
let a =
|
|
1466
|
+
let a = Vt(i, e, t, 1);
|
|
1466
1467
|
if (a == null || a < 0) return;
|
|
1467
|
-
s =
|
|
1468
|
+
s = Gt(n, r.pmPos, a);
|
|
1468
1469
|
}
|
|
1469
1470
|
s !== null && Ce(s), Oe(() => S());
|
|
1470
1471
|
}
|
|
1471
1472
|
function Ce(e) {
|
|
1472
1473
|
let t = i.view;
|
|
1473
1474
|
if (t) try {
|
|
1474
|
-
let n =
|
|
1475
|
+
let n = At.create(t.state.doc, e);
|
|
1475
1476
|
t.dispatch(t.state.tr.setSelection(n));
|
|
1476
1477
|
} catch {}
|
|
1477
1478
|
}
|
|
@@ -1498,19 +1499,19 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1498
1499
|
style: z(e.style),
|
|
1499
1500
|
"data-handle": e.pos,
|
|
1500
1501
|
onMousedown: q((t) => ue(t, e.pos), ["prevent", "stop"])
|
|
1501
|
-
}, null, 44,
|
|
1502
|
+
}, null, 44, oa))), 128)),
|
|
1502
1503
|
r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
|
|
1503
1504
|
P("div", {
|
|
1504
1505
|
class: "image-overlay__rotate-handle",
|
|
1505
1506
|
style: z({ left: `${w.value / 2 - 7}px` }),
|
|
1506
1507
|
title: G(n)("imageOverlay.rotate"),
|
|
1507
1508
|
onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
|
|
1508
|
-
}, null, 44,
|
|
1509
|
-
s.value ? (V(), N("div",
|
|
1510
|
-
l.value ? (V(), N("div",
|
|
1509
|
+
}, null, 44, sa),
|
|
1510
|
+
s.value ? (V(), N("div", ca, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
|
|
1511
|
+
l.value ? (V(), N("div", la, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
|
|
1511
1512
|
], 36)) : M("", !0);
|
|
1512
1513
|
}
|
|
1513
|
-
}), [["__scopeId", "data-v-4c3d1a1d"]]),
|
|
1514
|
+
}), [["__scopeId", "data-v-4c3d1a1d"]]), ha = /* @__PURE__ */ I({
|
|
1514
1515
|
__name: "HeaderFooterSelectionOverlay",
|
|
1515
1516
|
props: {
|
|
1516
1517
|
pagesContainer: {},
|
|
@@ -1520,11 +1521,11 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1520
1521
|
zoom: {}
|
|
1521
1522
|
},
|
|
1522
1523
|
setup(e) {
|
|
1523
|
-
let t = e, n = new
|
|
1524
|
+
let t = e, n = new $t(), r = () => {
|
|
1524
1525
|
if (!t.pagesContainer) return;
|
|
1525
1526
|
n.sync(t.pagesContainer, t.selection, t.zoom);
|
|
1526
1527
|
let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
|
|
1527
|
-
|
|
1528
|
+
Zt({
|
|
1528
1529
|
hiddenHost: t.hiddenContainer,
|
|
1529
1530
|
editorView: t.editorView,
|
|
1530
1531
|
visibleCaret: e ? {
|
|
@@ -1534,8 +1535,8 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1534
1535
|
});
|
|
1535
1536
|
};
|
|
1536
1537
|
K(() => t.pagesContainer, (e, t, i) => {
|
|
1537
|
-
e && (e.addEventListener(
|
|
1538
|
-
e.removeEventListener(
|
|
1538
|
+
e && (e.addEventListener(Qt, r), r(), i(() => {
|
|
1539
|
+
e.removeEventListener(Qt, r), n.clear(e);
|
|
1539
1540
|
}));
|
|
1540
1541
|
}, { immediate: !0 }), K(() => [
|
|
1541
1542
|
t.selection?.rId,
|
|
@@ -1557,10 +1558,10 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1557
1558
|
});
|
|
1558
1559
|
}, o = typeof window > "u" ? null : window;
|
|
1559
1560
|
return o?.addEventListener("scroll", a, !0), Ae(() => {
|
|
1560
|
-
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0),
|
|
1561
|
+
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Xt(t.hiddenContainer);
|
|
1561
1562
|
}), (e, t) => null;
|
|
1562
1563
|
}
|
|
1563
|
-
}),
|
|
1564
|
+
}), ga = { class: "hf-editor-label" }, _a = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1564
1565
|
__name: "InlineHeaderFooterEditor",
|
|
1565
1566
|
props: {
|
|
1566
1567
|
edit: {},
|
|
@@ -1603,7 +1604,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1603
1604
|
class: "hf-inline-editor",
|
|
1604
1605
|
style: z(l.value),
|
|
1605
1606
|
role: "presentation"
|
|
1606
|
-
}, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span",
|
|
1607
|
+
}, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", ga, W(c.value), 1), P("div", {
|
|
1607
1608
|
class: "hf-options",
|
|
1608
1609
|
onMousedown: n[5] ||= q(() => {}, ["stop"])
|
|
1609
1610
|
}, [F(G(a), {
|
|
@@ -1653,7 +1654,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1653
1654
|
})
|
|
1654
1655
|
], 2)) : M("", !0)], 32)], 2)], 4));
|
|
1655
1656
|
}
|
|
1656
|
-
}), [["__scopeId", "data-v-a0bd3730"]]),
|
|
1657
|
+
}), [["__scopeId", "data-v-a0bd3730"]]), va = ["title", "aria-label"], ya = /* @__PURE__ */ I({
|
|
1657
1658
|
__name: "OutlineToggleButton",
|
|
1658
1659
|
props: {
|
|
1659
1660
|
leftOffset: {},
|
|
@@ -1676,9 +1677,9 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1676
1677
|
}, [F(i, {
|
|
1677
1678
|
name: "format_list_bulleted",
|
|
1678
1679
|
size: 20
|
|
1679
|
-
})], 44,
|
|
1680
|
+
})], 44, va));
|
|
1680
1681
|
}
|
|
1681
|
-
}),
|
|
1682
|
+
}), ba = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1682
1683
|
__name: "PageIndicator",
|
|
1683
1684
|
props: {
|
|
1684
1685
|
currentPage: {},
|
|
@@ -1697,7 +1698,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1697
1698
|
total: e.totalPages
|
|
1698
1699
|
})), 5));
|
|
1699
1700
|
}
|
|
1700
|
-
}), [["__scopeId", "data-v-f1904974"]]),
|
|
1701
|
+
}), [["__scopeId", "data-v-f1904974"]]), xa = ["data-folio-block-id"], Sa = ["data-folio-block-id", "title"], Ca = 2.5, wa = 5, Ta = 6, Ea = 2, Da = 2, Oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1701
1702
|
__name: "TemplateDirectivesOverlay",
|
|
1702
1703
|
props: {
|
|
1703
1704
|
getView: { type: Function },
|
|
@@ -1711,19 +1712,19 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1711
1712
|
setup(e) {
|
|
1712
1713
|
let t = e, n = /* @__PURE__ */ new Set(["if", "each"]), r = /* @__PURE__ */ new Set(["endif", "endeach"]), i = (e) => e === "each" ? "each" : "if";
|
|
1713
1714
|
function a(e) {
|
|
1714
|
-
let t = e -
|
|
1715
|
-
return t <= 0 ? 0 : Math.floor(t /
|
|
1715
|
+
let t = e - Ta - Ca - Ea;
|
|
1716
|
+
return t <= 0 ? 0 : Math.floor(t / wa);
|
|
1716
1717
|
}
|
|
1717
1718
|
function o(e, t, n) {
|
|
1718
1719
|
let r = a(n), i = Math.min(Math.max(0, e), r);
|
|
1719
|
-
return t -
|
|
1720
|
+
return t - Ta - Ca - (r - i) * wa;
|
|
1720
1721
|
}
|
|
1721
1722
|
function s(e, t) {
|
|
1722
|
-
if (t.length === 0) return e.bottom - e.top >=
|
|
1723
|
+
if (t.length === 0) return e.bottom - e.top >= Da ? [e] : [];
|
|
1723
1724
|
let n = [];
|
|
1724
1725
|
for (let r of t) {
|
|
1725
1726
|
let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
|
|
1726
|
-
i - t >=
|
|
1727
|
+
i - t >= Da && n.push({
|
|
1727
1728
|
top: t,
|
|
1728
1729
|
bottom: i
|
|
1729
1730
|
});
|
|
@@ -1788,7 +1789,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1788
1789
|
}
|
|
1789
1790
|
return i;
|
|
1790
1791
|
}
|
|
1791
|
-
let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ =
|
|
1792
|
+
let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ = lt(), v = null;
|
|
1792
1793
|
function y() {
|
|
1793
1794
|
v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
1794
1795
|
v = null, b();
|
|
@@ -1800,12 +1801,12 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1800
1801
|
f.value = [], p.value = [], m.value = null, h.value = null;
|
|
1801
1802
|
return;
|
|
1802
1803
|
}
|
|
1803
|
-
let a =
|
|
1804
|
+
let a = tn(i);
|
|
1804
1805
|
if (a.length === 0) {
|
|
1805
1806
|
f.value = [], p.value = [], m.value = null, h.value = null;
|
|
1806
1807
|
return;
|
|
1807
1808
|
}
|
|
1808
|
-
let o =
|
|
1809
|
+
let o = ut(r, t.zoom), s = await dt(a, {
|
|
1809
1810
|
pagesContainer: r,
|
|
1810
1811
|
zoom: t.zoom,
|
|
1811
1812
|
layout: t.layout,
|
|
@@ -1885,10 +1886,10 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1885
1886
|
position: "absolute",
|
|
1886
1887
|
left: `${t.railX * e.zoom}px`,
|
|
1887
1888
|
top: `${n.top * e.zoom}px`,
|
|
1888
|
-
width: `${
|
|
1889
|
+
width: `${Ca * e.zoom}px`,
|
|
1889
1890
|
height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
|
|
1890
1891
|
})
|
|
1891
|
-
}, null, 14,
|
|
1892
|
+
}, null, 14, xa))), 128))], 64))), 128)), (V(!0), N(O, null, U(p.value, (t, n) => (V(), N(O, { key: `d:${n}` }, [(V(!0), N(O, null, U(t.rects, (r, i) => (V(), N("span", {
|
|
1892
1893
|
key: `d:${n}:${i}`,
|
|
1893
1894
|
class: R(oe(t.range)),
|
|
1894
1895
|
"data-folio-block-id": S(t.range),
|
|
@@ -1900,9 +1901,9 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1900
1901
|
width: `${(r.width + 2) * e.zoom}px`,
|
|
1901
1902
|
height: `${Math.max(0, r.height - 2) * e.zoom}px`
|
|
1902
1903
|
})
|
|
1903
|
-
}, null, 14,
|
|
1904
|
+
}, null, 14, Sa))), 128))], 64))), 128))], 32));
|
|
1904
1905
|
}
|
|
1905
|
-
}), [["__scopeId", "data-v-c72dfa21"]]),
|
|
1906
|
+
}), [["__scopeId", "data-v-c72dfa21"]]), ka = ["href", "title"], Aa = ["title"], ja = ["title"], Ma = ["title"], Na = { class: "docx-hyperlink-popup__edit-row" }, Pa = ["placeholder", "onKeydown"], Fa = { class: "docx-hyperlink-popup__edit-row" }, Ia = ["onKeydown"], La = ["disabled"], Ra = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1906
1907
|
__name: "HyperlinkPopup",
|
|
1907
1908
|
props: {
|
|
1908
1909
|
data: {},
|
|
@@ -1951,28 +1952,28 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1951
1952
|
class: R(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
|
|
1952
1953
|
style: z(u.value),
|
|
1953
1954
|
onMousedown: r[6] ||= q(() => {}, ["stop"])
|
|
1954
|
-
}, [o.value ? (V(), N(O, { key: 1 }, [P("div",
|
|
1955
|
+
}, [o.value ? (V(), N(O, { key: 1 }, [P("div", Na, [Le(P("input", {
|
|
1955
1956
|
class: "docx-hyperlink-popup__input",
|
|
1956
1957
|
placeholder: G(n)("displayText"),
|
|
1957
1958
|
"onUpdate:modelValue": r[2] ||= (e) => s.value = e,
|
|
1958
1959
|
onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
|
|
1959
|
-
}, null, 40,
|
|
1960
|
+
}, null, 40, Pa), [[Pe, s.value]])]), P("div", Fa, [Le(P("input", {
|
|
1960
1961
|
class: "docx-hyperlink-popup__input",
|
|
1961
1962
|
placeholder: "https://...",
|
|
1962
1963
|
"onUpdate:modelValue": r[4] ||= (e) => c.value = e,
|
|
1963
1964
|
onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
|
|
1964
|
-
}, null, 40,
|
|
1965
|
+
}, null, 40, Ia), [[Pe, c.value]]), P("button", {
|
|
1965
1966
|
class: "docx-hyperlink-popup__apply",
|
|
1966
1967
|
disabled: !c.value.trim(),
|
|
1967
1968
|
onClick: q(h, ["prevent"])
|
|
1968
|
-
}, W(G(n)("common.apply")), 9,
|
|
1969
|
+
}, W(G(n)("common.apply")), 9, La)])], 64)) : (V(), N(O, { key: 0 }, [
|
|
1969
1970
|
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),
|
|
1970
1971
|
P("a", {
|
|
1971
1972
|
class: "docx-hyperlink-popup__url",
|
|
1972
1973
|
href: e.data.href,
|
|
1973
1974
|
title: e.data.href,
|
|
1974
1975
|
onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
|
|
1975
|
-
}, W(e.data.href), 9,
|
|
1976
|
+
}, W(e.data.href), 9, ka),
|
|
1976
1977
|
r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
|
|
1977
1978
|
P("button", {
|
|
1978
1979
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -1994,7 +1995,7 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
1994
1995
|
height: "13",
|
|
1995
1996
|
rx: "2",
|
|
1996
1997
|
ry: "2"
|
|
1997
|
-
}), 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,
|
|
1998
|
+
}), 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, Aa),
|
|
1998
1999
|
e.readOnly ? M("", !0) : (V(), N("button", {
|
|
1999
2000
|
key: 0,
|
|
2000
2001
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -2009,43 +2010,43 @@ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
|
|
|
2009
2010
|
"stroke-width": "2",
|
|
2010
2011
|
"stroke-linecap": "round",
|
|
2011
2012
|
"stroke-linejoin": "round"
|
|
2012
|
-
}, [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,
|
|
2013
|
+
}, [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, ja)),
|
|
2013
2014
|
e.readOnly ? M("", !0) : (V(), N("button", {
|
|
2014
2015
|
key: 1,
|
|
2015
2016
|
class: "docx-hyperlink-popup__btn",
|
|
2016
2017
|
title: G(n)("removeLink"),
|
|
2017
2018
|
onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
|
|
2018
|
-
}, [...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,
|
|
2019
|
+
}, [...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, Ma))
|
|
2019
2020
|
], 64))], 38)) : M("", !0);
|
|
2020
2021
|
}
|
|
2021
2022
|
}), [["__scopeId", "data-v-366df18c"]]);
|
|
2022
2023
|
//#endregion
|
|
2023
2024
|
//#region src/composables/commentMarks.ts
|
|
2024
|
-
function
|
|
2025
|
+
function za(e, t) {
|
|
2025
2026
|
let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
|
|
2026
2027
|
return n === r ? null : {
|
|
2027
2028
|
from: n,
|
|
2028
2029
|
to: r
|
|
2029
2030
|
};
|
|
2030
2031
|
}
|
|
2031
|
-
function
|
|
2032
|
+
function Ba({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
|
|
2032
2033
|
let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
|
|
2033
|
-
return i ?
|
|
2034
|
+
return i ? za(e, i) : null;
|
|
2034
2035
|
}
|
|
2035
|
-
function
|
|
2036
|
-
let i = e.state.schema.marks.comment, a =
|
|
2036
|
+
function Va(e, t, n, r) {
|
|
2037
|
+
let i = e.state.schema.marks.comment, a = za(e.state.doc.content.size, t);
|
|
2037
2038
|
if (!i || !a) return !1;
|
|
2038
2039
|
let o = e.state.tr;
|
|
2039
|
-
return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId:
|
|
2040
|
+
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;
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
-
let n = e.state.schema.marks.comment, r =
|
|
2043
|
-
!n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId:
|
|
2042
|
+
function Ha(e, t) {
|
|
2043
|
+
let n = e.state.schema.marks.comment, r = za(e.state.doc.content.size, t);
|
|
2044
|
+
!n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: cn })));
|
|
2044
2045
|
}
|
|
2045
2046
|
//#endregion
|
|
2046
2047
|
//#region src/composables/useCommentLifecycle.ts
|
|
2047
|
-
var
|
|
2048
|
-
function
|
|
2048
|
+
var Ua = 408, Wa = 12;
|
|
2049
|
+
function Ga(e) {
|
|
2049
2050
|
let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
|
|
2050
2051
|
function o(t) {
|
|
2051
2052
|
let n = e.editorView.value, r = e.pagesContainer.value;
|
|
@@ -2078,7 +2079,7 @@ function Wa(e) {
|
|
|
2078
2079
|
r.value = null;
|
|
2079
2080
|
return;
|
|
2080
2081
|
}
|
|
2081
|
-
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left +
|
|
2082
|
+
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Wa : l.width / 2 + Ua;
|
|
2082
2083
|
r.value = {
|
|
2083
2084
|
top: c.top - l.top,
|
|
2084
2085
|
left: Math.max(16, Math.min(d, l.width - 16)),
|
|
@@ -2089,7 +2090,7 @@ function Wa(e) {
|
|
|
2089
2090
|
function c() {
|
|
2090
2091
|
let s = e.editorView.value;
|
|
2091
2092
|
if (!s) return;
|
|
2092
|
-
let c = r.value, l = s.state.selection, u =
|
|
2093
|
+
let c = r.value, l = s.state.selection, u = Ba({
|
|
2093
2094
|
docSize: s.state.doc.content.size,
|
|
2094
2095
|
capturedRange: c ? {
|
|
2095
2096
|
from: c.from,
|
|
@@ -2108,7 +2109,7 @@ function Wa(e) {
|
|
|
2108
2109
|
r.value = null;
|
|
2109
2110
|
return;
|
|
2110
2111
|
}
|
|
2111
|
-
if (!
|
|
2112
|
+
if (!Va(s, u, cn, { selectEnd: !0 })) {
|
|
2112
2113
|
r.value = null, i.value = null;
|
|
2113
2114
|
return;
|
|
2114
2115
|
}
|
|
@@ -2121,11 +2122,11 @@ function Wa(e) {
|
|
|
2121
2122
|
let n = e.editorView.value, r = i.value;
|
|
2122
2123
|
if (!n || !r) return !1;
|
|
2123
2124
|
let a = e.createComment(t);
|
|
2124
|
-
return
|
|
2125
|
+
return Va(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
|
|
2125
2126
|
}
|
|
2126
2127
|
function d() {
|
|
2127
2128
|
let t = e.editorView.value;
|
|
2128
|
-
t && i.value &&
|
|
2129
|
+
t && i.value && Ha(t, i.value), l();
|
|
2129
2130
|
}
|
|
2130
2131
|
return {
|
|
2131
2132
|
isAddingComment: t,
|
|
@@ -2139,8 +2140,8 @@ function Wa(e) {
|
|
|
2139
2140
|
}
|
|
2140
2141
|
//#endregion
|
|
2141
2142
|
//#region src/composables/useCommentManagement.ts
|
|
2142
|
-
function
|
|
2143
|
-
let t =
|
|
2143
|
+
function Ka(e) {
|
|
2144
|
+
let t = ln(), n = H([]), r = H(!1);
|
|
2144
2145
|
function i() {
|
|
2145
2146
|
r.value = !0;
|
|
2146
2147
|
}
|
|
@@ -2155,12 +2156,12 @@ function Ga(e) {
|
|
|
2155
2156
|
i(), c([...s.value, e]);
|
|
2156
2157
|
}
|
|
2157
2158
|
function u(n, r, i) {
|
|
2158
|
-
return
|
|
2159
|
+
return un(t, s.value, e.editorView.value), dn(t, n, i ?? e.author(), r);
|
|
2159
2160
|
}
|
|
2160
2161
|
function d() {
|
|
2161
2162
|
if (a(), o.value) return;
|
|
2162
2163
|
let n = e.getDocument()?.package.document.comments;
|
|
2163
|
-
|
|
2164
|
+
un(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
|
|
2164
2165
|
}
|
|
2165
2166
|
function f(e, t) {
|
|
2166
2167
|
l(u(t, e));
|
|
@@ -2185,7 +2186,7 @@ function Ga(e) {
|
|
|
2185
2186
|
}
|
|
2186
2187
|
function _(t, n) {
|
|
2187
2188
|
let r = e.editorView.value;
|
|
2188
|
-
r && (n ?
|
|
2189
|
+
r && (n ? fn : vn)(t)(r.state, r.dispatch);
|
|
2189
2190
|
}
|
|
2190
2191
|
function v(e) {
|
|
2191
2192
|
_(e, !0);
|
|
@@ -2195,7 +2196,7 @@ function Ga(e) {
|
|
|
2195
2196
|
}
|
|
2196
2197
|
function b(t, n) {
|
|
2197
2198
|
let r = e.editorView.value;
|
|
2198
|
-
r &&
|
|
2199
|
+
r && pn(t, n)(r.state, r.dispatch);
|
|
2199
2200
|
}
|
|
2200
2201
|
function x(t, n) {
|
|
2201
2202
|
let r = e.editorView.value;
|
|
@@ -2222,7 +2223,7 @@ function Ga(e) {
|
|
|
2222
2223
|
}
|
|
2223
2224
|
//#endregion
|
|
2224
2225
|
//#region src/utils/imageClipboard.ts
|
|
2225
|
-
function
|
|
2226
|
+
function qa(e, t, n) {
|
|
2226
2227
|
let r = $(e.state), i = e.state.schema.marks.insertion;
|
|
2227
2228
|
if (!r || !i) return;
|
|
2228
2229
|
let a = t.selection.from, o = a - n.nodeSize;
|
|
@@ -2232,7 +2233,7 @@ function Ka(e, t, n) {
|
|
|
2232
2233
|
date: r.date
|
|
2233
2234
|
}));
|
|
2234
2235
|
}
|
|
2235
|
-
function
|
|
2236
|
+
function Ja(e, t) {
|
|
2236
2237
|
let n = e.state.doc.nodeAt(t);
|
|
2237
2238
|
if (!n || n.type.name !== "image") return;
|
|
2238
2239
|
let r = n.attrs.src;
|
|
@@ -2246,7 +2247,7 @@ function qa(e, t) {
|
|
|
2246
2247
|
e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
2247
2248
|
});
|
|
2248
2249
|
}
|
|
2249
|
-
function
|
|
2250
|
+
function Ya(e) {
|
|
2250
2251
|
return new Promise((t, n) => {
|
|
2251
2252
|
let r = new FileReader();
|
|
2252
2253
|
r.onload = () => {
|
|
@@ -2254,7 +2255,7 @@ function Ja(e) {
|
|
|
2254
2255
|
}, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
|
|
2255
2256
|
});
|
|
2256
2257
|
}
|
|
2257
|
-
function
|
|
2258
|
+
function Xa(e) {
|
|
2258
2259
|
return new Promise((t) => {
|
|
2259
2260
|
let n = new Image();
|
|
2260
2261
|
n.onload = () => t({
|
|
@@ -2266,7 +2267,7 @@ function Ya(e) {
|
|
|
2266
2267
|
}), n.src = e;
|
|
2267
2268
|
});
|
|
2268
2269
|
}
|
|
2269
|
-
function
|
|
2270
|
+
function Za(e, t, n, r) {
|
|
2270
2271
|
let i = e.state.schema.nodes.image;
|
|
2271
2272
|
if (!i) return;
|
|
2272
2273
|
let a = i.create({
|
|
@@ -2277,23 +2278,23 @@ function Xa(e, t, n, r) {
|
|
|
2277
2278
|
wrapType: "inline",
|
|
2278
2279
|
displayMode: "inline"
|
|
2279
2280
|
}), o = e.state.tr.replaceSelectionWith(a);
|
|
2280
|
-
|
|
2281
|
+
qa(e, o, a), e.dispatch(o);
|
|
2281
2282
|
}
|
|
2282
|
-
async function
|
|
2283
|
+
async function Qa(e) {
|
|
2283
2284
|
try {
|
|
2284
2285
|
let t = await navigator.clipboard.read();
|
|
2285
2286
|
for (let n of t) {
|
|
2286
2287
|
let t = n.types.find((e) => e.startsWith("image/"));
|
|
2287
2288
|
if (t) {
|
|
2288
|
-
let r = await
|
|
2289
|
-
a > 612 && (o = Math.round(612 / a * o), a = 612),
|
|
2289
|
+
let r = await Ya(await n.getType(t)), i = await Xa(r), a = i.width, o = i.height;
|
|
2290
|
+
a > 612 && (o = Math.round(612 / a * o), a = 612), Za(e, r, a, o);
|
|
2290
2291
|
return;
|
|
2291
2292
|
}
|
|
2292
2293
|
if (n.types.includes("text/html")) {
|
|
2293
2294
|
let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
|
|
2294
2295
|
if (r) {
|
|
2295
2296
|
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;
|
|
2296
|
-
|
|
2297
|
+
Za(e, r, a || 200, o || 200);
|
|
2297
2298
|
return;
|
|
2298
2299
|
}
|
|
2299
2300
|
}
|
|
@@ -2314,14 +2315,14 @@ async function Za(e) {
|
|
|
2314
2315
|
}
|
|
2315
2316
|
}
|
|
2316
2317
|
}
|
|
2317
|
-
function
|
|
2318
|
+
function $a(e, t) {
|
|
2318
2319
|
let n = e.state.doc.nodeAt(t);
|
|
2319
2320
|
if (!n || n.type.name !== "image") return;
|
|
2320
2321
|
let r = document.createElement("input");
|
|
2321
2322
|
r.type = "file", r.accept = "image/*", r.onchange = async () => {
|
|
2322
2323
|
let i = r.files?.[0];
|
|
2323
2324
|
if (!i) return;
|
|
2324
|
-
let a = await
|
|
2325
|
+
let a = await Ya(i), o = await Xa(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);
|
|
2325
2326
|
try {
|
|
2326
2327
|
let r = e.state.tr.setNodeMarkup(t, void 0, {
|
|
2327
2328
|
...n.attrs,
|
|
@@ -2336,7 +2337,7 @@ function Qa(e, t) {
|
|
|
2336
2337
|
}
|
|
2337
2338
|
//#endregion
|
|
2338
2339
|
//#region src/composables/useContextMenus.ts
|
|
2339
|
-
var
|
|
2340
|
+
var eo = /* @__PURE__ */ new Set([
|
|
2340
2341
|
"inline",
|
|
2341
2342
|
"square",
|
|
2342
2343
|
"tight",
|
|
@@ -2345,16 +2346,16 @@ var $a = /* @__PURE__ */ new Set([
|
|
|
2345
2346
|
"behind",
|
|
2346
2347
|
"inFront"
|
|
2347
2348
|
]);
|
|
2348
|
-
function eo(e) {
|
|
2349
|
-
return typeof e == "string" && $a.has(e);
|
|
2350
|
-
}
|
|
2351
2349
|
function to(e) {
|
|
2352
|
-
return
|
|
2350
|
+
return typeof e == "string" && eo.has(e);
|
|
2353
2351
|
}
|
|
2354
2352
|
function no(e) {
|
|
2355
|
-
return e
|
|
2353
|
+
return to(e) ? e : "inline";
|
|
2356
2354
|
}
|
|
2357
2355
|
function ro(e) {
|
|
2356
|
+
return e === "left" || e === "right" || e === "none" ? e : null;
|
|
2357
|
+
}
|
|
2358
|
+
function io(e) {
|
|
2358
2359
|
let { t } = r(), n = H({
|
|
2359
2360
|
isOpen: !1,
|
|
2360
2361
|
position: {
|
|
@@ -2396,7 +2397,7 @@ function ro(e) {
|
|
|
2396
2397
|
t(e.state, (t) => e.dispatch(t), e);
|
|
2397
2398
|
}
|
|
2398
2399
|
function l(t, n, r, i, a) {
|
|
2399
|
-
let o = i === "inline" ?
|
|
2400
|
+
let o = i === "inline" ? Pt(t, e.zoom.value) : void 0;
|
|
2400
2401
|
return {
|
|
2401
2402
|
open: !0,
|
|
2402
2403
|
position: r,
|
|
@@ -2409,12 +2410,12 @@ function ro(e) {
|
|
|
2409
2410
|
function u(t) {
|
|
2410
2411
|
let r = e.editorView.value;
|
|
2411
2412
|
if (!r) return;
|
|
2412
|
-
let o =
|
|
2413
|
+
let o = It(t.target);
|
|
2413
2414
|
if (o) {
|
|
2414
2415
|
let a = Number(o.dataset.pmStart);
|
|
2415
2416
|
if (!Number.isNaN(a)) {
|
|
2416
2417
|
try {
|
|
2417
|
-
let e =
|
|
2418
|
+
let e = At.create(r.state.doc, a);
|
|
2418
2419
|
r.dispatch(r.state.tr.setSelection(e));
|
|
2419
2420
|
} catch {}
|
|
2420
2421
|
e.selectedImage.value = {
|
|
@@ -2428,7 +2429,7 @@ function ro(e) {
|
|
|
2428
2429
|
i.value = l(o, a, {
|
|
2429
2430
|
x: t.clientX,
|
|
2430
2431
|
y: t.clientY
|
|
2431
|
-
},
|
|
2432
|
+
}, no(s.attrs.wrapType), ro(s.attrs.cssFloat)), n.value.isOpen = !1;
|
|
2432
2433
|
return;
|
|
2433
2434
|
}
|
|
2434
2435
|
}
|
|
@@ -2439,7 +2440,7 @@ function ro(e) {
|
|
|
2439
2440
|
e.setPmSelection(a);
|
|
2440
2441
|
} catch {}
|
|
2441
2442
|
}
|
|
2442
|
-
let s =
|
|
2443
|
+
let s = Ze(r.state), { empty: c, from: u, to: d } = r.state.selection;
|
|
2443
2444
|
a.value = {
|
|
2444
2445
|
from: u,
|
|
2445
2446
|
to: d
|
|
@@ -2463,7 +2464,7 @@ function ro(e) {
|
|
|
2463
2464
|
!o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
|
|
2464
2465
|
x: t.clientX,
|
|
2465
2466
|
y: t.clientY
|
|
2466
|
-
},
|
|
2467
|
+
}, no(o.attrs.wrapType), ro(o.attrs.cssFloat)), n.value.isOpen = !1);
|
|
2467
2468
|
}
|
|
2468
2469
|
function f(t) {
|
|
2469
2470
|
let n = e.editorView.value, r = i.value;
|
|
@@ -2487,16 +2488,16 @@ function ro(e) {
|
|
|
2487
2488
|
case "cut":
|
|
2488
2489
|
if (e.selectedImage.value) {
|
|
2489
2490
|
let t = e.selectedImage.value.pmPos;
|
|
2490
|
-
|
|
2491
|
+
Ja(n, t);
|
|
2491
2492
|
let r = n.state.doc.nodeAt(t);
|
|
2492
2493
|
r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
|
|
2493
2494
|
} else n.focus(), document.execCommand("cut");
|
|
2494
2495
|
break;
|
|
2495
2496
|
case "copy":
|
|
2496
|
-
e.selectedImage.value ? (
|
|
2497
|
+
e.selectedImage.value ? (Ja(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
|
|
2497
2498
|
break;
|
|
2498
2499
|
case "paste":
|
|
2499
|
-
|
|
2500
|
+
Qa(n).then(() => e.onPaste?.()).catch(() => void 0);
|
|
2500
2501
|
break;
|
|
2501
2502
|
case "pasteAsPlainText":
|
|
2502
2503
|
navigator.clipboard.readText().then((t) => {
|
|
@@ -2517,7 +2518,7 @@ function ro(e) {
|
|
|
2517
2518
|
e.selectedImage.value && (e.showImageProperties.value = !0);
|
|
2518
2519
|
break;
|
|
2519
2520
|
case "replaceImage":
|
|
2520
|
-
e.selectedImage.value &&
|
|
2521
|
+
e.selectedImage.value && $a(n, e.selectedImage.value.pmPos);
|
|
2521
2522
|
break;
|
|
2522
2523
|
case "deleteImage":
|
|
2523
2524
|
if (e.selectedImage.value) {
|
|
@@ -2555,7 +2556,7 @@ function ro(e) {
|
|
|
2555
2556
|
}
|
|
2556
2557
|
//#endregion
|
|
2557
2558
|
//#region src/composables/useDocumentLifecycle.ts
|
|
2558
|
-
function
|
|
2559
|
+
function ao(e) {
|
|
2559
2560
|
async function t(t) {
|
|
2560
2561
|
e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
|
|
2561
2562
|
}
|
|
@@ -2574,8 +2575,8 @@ function io(e) {
|
|
|
2574
2575
|
}
|
|
2575
2576
|
//#endregion
|
|
2576
2577
|
//#region src/composables/useDocxEditorRefApi.ts
|
|
2577
|
-
var
|
|
2578
|
-
function
|
|
2578
|
+
var oo = Date.now();
|
|
2579
|
+
function so(e) {
|
|
2579
2580
|
let t = [];
|
|
2580
2581
|
function n() {
|
|
2581
2582
|
e.onPrint?.(), window.print();
|
|
@@ -2589,11 +2590,11 @@ function oo(e) {
|
|
|
2589
2590
|
function i(t, n) {
|
|
2590
2591
|
let r = e.pagesRef.value;
|
|
2591
2592
|
if (!r) return !1;
|
|
2592
|
-
let i =
|
|
2593
|
+
let i = Kn(r, t), a = i.at(0);
|
|
2593
2594
|
return a ? (a.scrollIntoView({
|
|
2594
2595
|
block: "center",
|
|
2595
2596
|
behavior: "smooth"
|
|
2596
|
-
}), n?.highlight &&
|
|
2597
|
+
}), n?.highlight && qn(i, n.highlight), !0) : !1;
|
|
2597
2598
|
}
|
|
2598
2599
|
function a() {
|
|
2599
2600
|
return e.zoom.value;
|
|
@@ -2601,19 +2602,19 @@ function oo(e) {
|
|
|
2601
2602
|
let o = null;
|
|
2602
2603
|
function s() {
|
|
2603
2604
|
let t = e.getActiveView();
|
|
2604
|
-
return t ?
|
|
2605
|
+
return t ? on(t.state, t.dispatch) : !1;
|
|
2605
2606
|
}
|
|
2606
2607
|
function c() {
|
|
2607
2608
|
let t = e.getActiveView();
|
|
2608
|
-
return t ?
|
|
2609
|
+
return t ? an(t.state, t.dispatch) : !1;
|
|
2609
2610
|
}
|
|
2610
2611
|
function l() {
|
|
2611
2612
|
let t = e.getActiveView();
|
|
2612
|
-
return t ?
|
|
2613
|
+
return t ? on(t.state) : !1;
|
|
2613
2614
|
}
|
|
2614
2615
|
function u() {
|
|
2615
2616
|
let t = e.getActiveView();
|
|
2616
|
-
return t ?
|
|
2617
|
+
return t ? an(t.state) : !1;
|
|
2617
2618
|
}
|
|
2618
2619
|
function d() {
|
|
2619
2620
|
let t = e.getActiveView();
|
|
@@ -2647,7 +2648,7 @@ function oo(e) {
|
|
|
2647
2648
|
getPageNumberForPmPos: (t) => {
|
|
2648
2649
|
let n = e.layout.value;
|
|
2649
2650
|
if (!n) return null;
|
|
2650
|
-
let r =
|
|
2651
|
+
let r = bn(n, t);
|
|
2651
2652
|
return r == null ? null : r + 1;
|
|
2652
2653
|
}
|
|
2653
2654
|
}, o;
|
|
@@ -2658,7 +2659,7 @@ function oo(e) {
|
|
|
2658
2659
|
function m() {
|
|
2659
2660
|
let t = e.layout.value, n = e.editorView.value;
|
|
2660
2661
|
if (!t || !n) return 0;
|
|
2661
|
-
let r =
|
|
2662
|
+
let r = bn(t, n.state.selection.from);
|
|
2662
2663
|
return r == null ? 0 : r + 1;
|
|
2663
2664
|
}
|
|
2664
2665
|
function h(t) {
|
|
@@ -2691,10 +2692,10 @@ function oo(e) {
|
|
|
2691
2692
|
ensureEditorView: () => e.editor.ensureView(),
|
|
2692
2693
|
createAIEditSnapshot: () => {
|
|
2693
2694
|
let t = e.editorView.value;
|
|
2694
|
-
return t ?
|
|
2695
|
+
return t ? zn(t.state.doc) : null;
|
|
2695
2696
|
},
|
|
2696
2697
|
applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
|
|
2697
|
-
|
|
2698
|
+
Ln(r.version);
|
|
2698
2699
|
let a = e.editorView.value;
|
|
2699
2700
|
if (!a) {
|
|
2700
2701
|
let e = "committed";
|
|
@@ -2704,11 +2705,11 @@ function oo(e) {
|
|
|
2704
2705
|
reason: "unsupportedBlock"
|
|
2705
2706
|
}));
|
|
2706
2707
|
return {
|
|
2707
|
-
version:
|
|
2708
|
+
version: Nn,
|
|
2708
2709
|
status: e,
|
|
2709
2710
|
applied: [],
|
|
2710
2711
|
skipped: t,
|
|
2711
|
-
issues:
|
|
2712
|
+
issues: Hn(r.operations, t),
|
|
2712
2713
|
receipts: [],
|
|
2713
2714
|
undoHandle: null
|
|
2714
2715
|
};
|
|
@@ -2718,9 +2719,9 @@ function oo(e) {
|
|
|
2718
2719
|
let s = e.getComments(), c = {
|
|
2719
2720
|
state: a.state,
|
|
2720
2721
|
dispatch: (e) => {
|
|
2721
|
-
a.dispatch(
|
|
2722
|
+
a.dispatch(rn(e)), c.state = a.state;
|
|
2722
2723
|
}
|
|
2723
|
-
}, l =
|
|
2724
|
+
}, l = In({
|
|
2724
2725
|
view: c,
|
|
2725
2726
|
snapshot: n,
|
|
2726
2727
|
batch: r,
|
|
@@ -2728,7 +2729,7 @@ function oo(e) {
|
|
|
2728
2729
|
createCommentId: (t) => e.createAIEditComment(t, i),
|
|
2729
2730
|
createUndoHandle: () => ({
|
|
2730
2731
|
type: "documentOperationUndo",
|
|
2731
|
-
id: `vue-${String(
|
|
2732
|
+
id: `vue-${String(oo++)}`
|
|
2732
2733
|
})
|
|
2733
2734
|
});
|
|
2734
2735
|
return l.undoHandle !== null && t.push({
|
|
@@ -2766,7 +2767,7 @@ function oo(e) {
|
|
|
2766
2767
|
},
|
|
2767
2768
|
applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
|
|
2768
2769
|
let a = e.editorView.value;
|
|
2769
|
-
return a ?
|
|
2770
|
+
return a ? Fn({
|
|
2770
2771
|
view: a,
|
|
2771
2772
|
snapshot: t,
|
|
2772
2773
|
operations: n,
|
|
@@ -2783,26 +2784,26 @@ function oo(e) {
|
|
|
2783
2784
|
},
|
|
2784
2785
|
acceptAIEditOperation: (t) => {
|
|
2785
2786
|
let n = e.editorView.value;
|
|
2786
|
-
return n ?
|
|
2787
|
+
return n ? fn(t)(n.state, n.dispatch) : !1;
|
|
2787
2788
|
},
|
|
2788
2789
|
rejectAIEditOperation: (t) => {
|
|
2789
2790
|
let n = e.editorView.value;
|
|
2790
|
-
return n ?
|
|
2791
|
+
return n ? vn(t)(n.state, n.dispatch) : !1;
|
|
2791
2792
|
},
|
|
2792
2793
|
undo: s,
|
|
2793
2794
|
redo: c,
|
|
2794
2795
|
scrollToAIEditOperation: (t) => {
|
|
2795
2796
|
let n = e.editorView.value;
|
|
2796
2797
|
if (!n) return !1;
|
|
2797
|
-
let r =
|
|
2798
|
+
let r = hn(n.state, t);
|
|
2798
2799
|
if (!r) return !1;
|
|
2799
|
-
let { from: i, to: a } =
|
|
2800
|
+
let { from: i, to: a } = tr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
|
|
2800
2801
|
return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
2801
2802
|
},
|
|
2802
2803
|
scrollToBlock: (t, n) => {
|
|
2803
2804
|
let r = e.editorView.value;
|
|
2804
2805
|
if (!r) return !1;
|
|
2805
|
-
let i =
|
|
2806
|
+
let i = nr({
|
|
2806
2807
|
blockId: t,
|
|
2807
2808
|
doc: r.state.doc,
|
|
2808
2809
|
snapshot: n
|
|
@@ -2814,7 +2815,7 @@ function oo(e) {
|
|
|
2814
2815
|
highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
|
|
2815
2816
|
let a = e.editorView.value;
|
|
2816
2817
|
if (!a) return "none";
|
|
2817
|
-
let o =
|
|
2818
|
+
let o = ir({
|
|
2818
2819
|
blockId: t,
|
|
2819
2820
|
text: n,
|
|
2820
2821
|
doc: a.state.doc,
|
|
@@ -2822,13 +2823,13 @@ function oo(e) {
|
|
|
2822
2823
|
});
|
|
2823
2824
|
if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
|
|
2824
2825
|
e.setPassageHighlight(null);
|
|
2825
|
-
let s =
|
|
2826
|
+
let s = nr({
|
|
2826
2827
|
blockId: t,
|
|
2827
2828
|
doc: a.state.doc,
|
|
2828
2829
|
snapshot: r
|
|
2829
2830
|
});
|
|
2830
2831
|
if (s === null) return "none";
|
|
2831
|
-
let c =
|
|
2832
|
+
let c = sr(t);
|
|
2832
2833
|
if (c !== null && i(c, { highlight: {} })) return "block";
|
|
2833
2834
|
let { from: l, to: u } = s, d = a.state.doc.resolve(l), f = a.state.doc.resolve(u);
|
|
2834
2835
|
return a.dispatch(a.state.tr.setSelection(Z.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
|
|
@@ -2839,11 +2840,11 @@ function oo(e) {
|
|
|
2839
2840
|
showInDocument: (t, n) => {
|
|
2840
2841
|
let r = e.editorView.value;
|
|
2841
2842
|
if (!r) return !1;
|
|
2842
|
-
let i = t.type === "textRange" ?
|
|
2843
|
+
let i = t.type === "textRange" ? rr({
|
|
2843
2844
|
range: t,
|
|
2844
2845
|
doc: r.state.doc,
|
|
2845
2846
|
snapshot: n
|
|
2846
|
-
}) :
|
|
2847
|
+
}) : nr({
|
|
2847
2848
|
blockId: t.blockId,
|
|
2848
2849
|
doc: r.state.doc,
|
|
2849
2850
|
snapshot: n
|
|
@@ -2854,7 +2855,7 @@ function oo(e) {
|
|
|
2854
2855
|
},
|
|
2855
2856
|
getSuggestions: () => {
|
|
2856
2857
|
let t = e.editorView.value;
|
|
2857
|
-
return t ?
|
|
2858
|
+
return t ? _n(t.state) : [];
|
|
2858
2859
|
},
|
|
2859
2860
|
acceptSuggestion: (t, n) => {
|
|
2860
2861
|
let r = e.editorView.value;
|
|
@@ -2862,7 +2863,7 @@ function oo(e) {
|
|
|
2862
2863
|
accepted: !1,
|
|
2863
2864
|
appliedAs: null
|
|
2864
2865
|
};
|
|
2865
|
-
let i =
|
|
2866
|
+
let i = _n(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = mn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
|
|
2866
2867
|
return {
|
|
2867
2868
|
accepted: a,
|
|
2868
2869
|
appliedAs: a ? i : null
|
|
@@ -2870,23 +2871,23 @@ function oo(e) {
|
|
|
2870
2871
|
},
|
|
2871
2872
|
rejectSuggestion: (t) => {
|
|
2872
2873
|
let n = e.editorView.value;
|
|
2873
|
-
return n ?
|
|
2874
|
+
return n ? yn(t)(n.state, n.dispatch) : !1;
|
|
2874
2875
|
},
|
|
2875
2876
|
scrollToSuggestion: (t) => {
|
|
2876
2877
|
let n = e.editorView.value;
|
|
2877
2878
|
if (!n) return !1;
|
|
2878
|
-
let r =
|
|
2879
|
+
let r = gn(n.state, t);
|
|
2879
2880
|
if (!r) return !1;
|
|
2880
|
-
let { from: i, to: a } =
|
|
2881
|
+
let { from: i, to: a } = tr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
|
|
2881
2882
|
return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
2882
2883
|
},
|
|
2883
2884
|
getTrackedChanges: () => {
|
|
2884
2885
|
let t = e.editorView.value;
|
|
2885
|
-
return t ?
|
|
2886
|
+
return t ? Un(t.state.doc) : [];
|
|
2886
2887
|
},
|
|
2887
2888
|
getCommentAnchors: () => {
|
|
2888
2889
|
let t = e.editorView.value;
|
|
2889
|
-
return t ?
|
|
2890
|
+
return t ? Vn(t.state.doc) : [];
|
|
2890
2891
|
},
|
|
2891
2892
|
getSelectionText: () => {
|
|
2892
2893
|
let t = e.editorView.value;
|
|
@@ -2894,28 +2895,28 @@ function oo(e) {
|
|
|
2894
2895
|
},
|
|
2895
2896
|
getPageText: (t) => {
|
|
2896
2897
|
let n = e.editorView.value;
|
|
2897
|
-
return n ?
|
|
2898
|
+
return n ? ur(e.layout.value, n.state.doc, t) : null;
|
|
2898
2899
|
},
|
|
2899
2900
|
getTargetPage: (t, n) => {
|
|
2900
2901
|
let r = e.editorView.value, i = e.layout.value;
|
|
2901
2902
|
if (!r || !i) return null;
|
|
2902
|
-
let a = t.type === "textRange" ?
|
|
2903
|
+
let a = t.type === "textRange" ? rr({
|
|
2903
2904
|
range: t,
|
|
2904
2905
|
doc: r.state.doc,
|
|
2905
2906
|
snapshot: n
|
|
2906
|
-
}) :
|
|
2907
|
+
}) : nr({
|
|
2907
2908
|
blockId: t.blockId,
|
|
2908
2909
|
doc: r.state.doc,
|
|
2909
2910
|
snapshot: n
|
|
2910
2911
|
});
|
|
2911
2912
|
if (a === null) return null;
|
|
2912
|
-
let o =
|
|
2913
|
+
let o = bn(i, a.from);
|
|
2913
2914
|
return o == null ? null : o + 1;
|
|
2914
2915
|
},
|
|
2915
2916
|
getContentControls: (t = {}) => {
|
|
2916
2917
|
let n = e.editorView.value;
|
|
2917
|
-
return n ?
|
|
2918
|
-
properties:
|
|
2918
|
+
return n ? Xn(n.state.doc, t).map((e) => ({
|
|
2919
|
+
properties: Jn(e.node),
|
|
2919
2920
|
path: e.path,
|
|
2920
2921
|
pmPos: e.pos
|
|
2921
2922
|
})) : [];
|
|
@@ -2923,7 +2924,7 @@ function oo(e) {
|
|
|
2923
2924
|
scrollToContentControl: (t) => {
|
|
2924
2925
|
let n = e.editorView.value;
|
|
2925
2926
|
if (!n) return !1;
|
|
2926
|
-
let r =
|
|
2927
|
+
let r = Yn(n.state.doc, t);
|
|
2927
2928
|
if (!r) return !1;
|
|
2928
2929
|
let i = r.pos + 1, a = n.state.doc.resolve(i);
|
|
2929
2930
|
return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
@@ -2931,52 +2932,52 @@ function oo(e) {
|
|
|
2931
2932
|
setContentControlContent: (t, n, r = {}) => {
|
|
2932
2933
|
let i = e.editorView.value;
|
|
2933
2934
|
if (!i) return !1;
|
|
2934
|
-
let a = typeof n == "string" ?
|
|
2935
|
+
let a = typeof n == "string" ? Qn(i.state, t, n, r) : er(i.state, t, n, r);
|
|
2935
2936
|
return a ? (i.dispatch(a), !0) : !1;
|
|
2936
2937
|
},
|
|
2937
2938
|
setContentControlValue: (t, n, r = {}) => {
|
|
2938
2939
|
let i = e.editorView.value;
|
|
2939
2940
|
if (!i) return !1;
|
|
2940
|
-
let a =
|
|
2941
|
+
let a = $n(i.state, t, n, r);
|
|
2941
2942
|
return a ? (i.dispatch(a), !0) : !1;
|
|
2942
2943
|
},
|
|
2943
2944
|
removeContentControl: (t, n = {}) => {
|
|
2944
2945
|
let r = e.editorView.value;
|
|
2945
2946
|
if (!r) return !1;
|
|
2946
|
-
let i =
|
|
2947
|
+
let i = Zn(r.state, t, n);
|
|
2947
2948
|
return i ? (r.dispatch(i), !0) : !1;
|
|
2948
2949
|
}
|
|
2949
2950
|
} };
|
|
2950
2951
|
}
|
|
2951
2952
|
//#endregion
|
|
2952
2953
|
//#region src/composables/useFormattingActions.ts
|
|
2953
|
-
function
|
|
2954
|
+
function co(e) {
|
|
2954
2955
|
let t = () => e.activeView?.value ?? e.editorView.value;
|
|
2955
2956
|
function n() {
|
|
2956
2957
|
let e = t();
|
|
2957
|
-
e && (
|
|
2958
|
+
e && (sn(e.state, e.dispatch, e), e.focus());
|
|
2958
2959
|
}
|
|
2959
2960
|
function r(n) {
|
|
2960
2961
|
let r = t();
|
|
2961
2962
|
if (!r) return;
|
|
2962
2963
|
let i = e.getDocument(), a = i?.package?.styles;
|
|
2963
2964
|
if (a) {
|
|
2964
|
-
let e = ze(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ?
|
|
2965
|
-
e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting),
|
|
2966
|
-
} else
|
|
2965
|
+
let e = ze(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? gr(i.package.numbering) : null };
|
|
2966
|
+
e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), dr(n, t)(r.state, (e) => r.dispatch(e));
|
|
2967
|
+
} else dr(n)(r.state, (e) => r.dispatch(e));
|
|
2967
2968
|
r.focus();
|
|
2968
2969
|
}
|
|
2969
2970
|
function i() {
|
|
2970
2971
|
let t = e.editorView.value;
|
|
2971
|
-
t && (
|
|
2972
|
+
t && (_r(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
2972
2973
|
}
|
|
2973
2974
|
function a() {
|
|
2974
2975
|
let t = e.editorView.value;
|
|
2975
|
-
t && (
|
|
2976
|
+
t && (yr(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
2976
2977
|
}
|
|
2977
2978
|
function o() {
|
|
2978
2979
|
let t = e.editorView.value;
|
|
2979
|
-
t && (
|
|
2980
|
+
t && (vr(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
2980
2981
|
}
|
|
2981
2982
|
function s(e) {
|
|
2982
2983
|
let n = t();
|
|
@@ -2995,10 +2996,10 @@ function so(e) {
|
|
|
2995
2996
|
}
|
|
2996
2997
|
//#endregion
|
|
2997
2998
|
//#region src/utils/fontFaces.ts
|
|
2998
|
-
function
|
|
2999
|
+
function lo() {
|
|
2999
3000
|
return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
|
|
3000
3001
|
}
|
|
3001
|
-
async function
|
|
3002
|
+
async function uo(e, t, n, r) {
|
|
3002
3003
|
let i;
|
|
3003
3004
|
try {
|
|
3004
3005
|
i = new FontFace(t, n, r), e.add(i);
|
|
@@ -3007,46 +3008,46 @@ async function lo(e, t, n, r) {
|
|
|
3007
3008
|
}
|
|
3008
3009
|
return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
|
|
3009
3010
|
}
|
|
3010
|
-
function
|
|
3011
|
-
let t =
|
|
3011
|
+
function fo(e) {
|
|
3012
|
+
let t = lo();
|
|
3012
3013
|
if (t) for (let n of e) t.delete(n);
|
|
3013
3014
|
}
|
|
3014
3015
|
//#endregion
|
|
3015
3016
|
//#region src/utils/embeddedFonts.ts
|
|
3016
|
-
var
|
|
3017
|
+
var po = {
|
|
3017
3018
|
faces: [],
|
|
3018
3019
|
familyMap: /* @__PURE__ */ new Map()
|
|
3019
3020
|
};
|
|
3020
|
-
async function
|
|
3021
|
-
let t =
|
|
3022
|
-
if (!t) return
|
|
3021
|
+
async function mo(e) {
|
|
3022
|
+
let t = lo();
|
|
3023
|
+
if (!t) return po;
|
|
3023
3024
|
let n;
|
|
3024
3025
|
try {
|
|
3025
|
-
n = await
|
|
3026
|
+
n = await Sr(e);
|
|
3026
3027
|
} catch {
|
|
3027
|
-
return
|
|
3028
|
+
return po;
|
|
3028
3029
|
}
|
|
3029
3030
|
return {
|
|
3030
|
-
faces: (await Promise.all(n.map((e) =>
|
|
3031
|
+
faces: (await Promise.all(n.map((e) => uo(t, e.family, e.bytes, {
|
|
3031
3032
|
weight: String(e.weight),
|
|
3032
3033
|
style: e.style
|
|
3033
3034
|
})))).filter((e) => e !== null),
|
|
3034
|
-
familyMap:
|
|
3035
|
+
familyMap: xr(n)
|
|
3035
3036
|
};
|
|
3036
3037
|
}
|
|
3037
3038
|
//#endregion
|
|
3038
3039
|
//#region src/utils/hostFonts.ts
|
|
3039
|
-
function mo(e) {
|
|
3040
|
-
return typeof e == "string" && e.trim().length > 0;
|
|
3041
|
-
}
|
|
3042
3040
|
function ho(e) {
|
|
3043
|
-
return typeof e
|
|
3041
|
+
return typeof e == "string" && e.trim().length > 0;
|
|
3044
3042
|
}
|
|
3045
3043
|
function go(e) {
|
|
3044
|
+
return typeof e != "object" || !e ? !1 : ho(Reflect.get(e, "family")) && ho(Reflect.get(e, "src"));
|
|
3045
|
+
}
|
|
3046
|
+
function _o(e) {
|
|
3046
3047
|
if (!e) return [];
|
|
3047
3048
|
let t = [];
|
|
3048
3049
|
for (let n of e) {
|
|
3049
|
-
if (!
|
|
3050
|
+
if (!go(n)) continue;
|
|
3050
3051
|
let e = { display: "swap" };
|
|
3051
3052
|
(typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
|
|
3052
3053
|
family: n.family.trim(),
|
|
@@ -3056,20 +3057,20 @@ function go(e) {
|
|
|
3056
3057
|
}
|
|
3057
3058
|
return t;
|
|
3058
3059
|
}
|
|
3059
|
-
async function
|
|
3060
|
-
let t =
|
|
3060
|
+
async function vo(e) {
|
|
3061
|
+
let t = lo();
|
|
3061
3062
|
if (!t) return [];
|
|
3062
|
-
let n =
|
|
3063
|
-
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) =>
|
|
3063
|
+
let n = _o(e);
|
|
3064
|
+
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => uo(t, e, n, r)))).filter((e) => e !== null);
|
|
3064
3065
|
}
|
|
3065
3066
|
//#endregion
|
|
3066
3067
|
//#region src/composables/useFontLifecycle.ts
|
|
3067
|
-
var
|
|
3068
|
-
loadEmbedded:
|
|
3069
|
-
loadHost:
|
|
3070
|
-
remove:
|
|
3068
|
+
var yo = {
|
|
3069
|
+
loadEmbedded: mo,
|
|
3070
|
+
loadHost: vo,
|
|
3071
|
+
remove: fo
|
|
3071
3072
|
};
|
|
3072
|
-
function
|
|
3073
|
+
function bo(e, t = yo) {
|
|
3073
3074
|
K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
|
|
3074
3075
|
if (!n) return;
|
|
3075
3076
|
let a = !1, o = [];
|
|
@@ -3078,9 +3079,9 @@ function yo(e, t = vo) {
|
|
|
3078
3079
|
t.remove(n);
|
|
3079
3080
|
return;
|
|
3080
3081
|
}
|
|
3081
|
-
o = n, !(n.length === 0 && r.size === 0) && (
|
|
3082
|
+
o = n, !(n.length === 0 && r.size === 0) && (br(r.size > 0 ? r : null), e.remeasure());
|
|
3082
3083
|
}), i(() => {
|
|
3083
|
-
a = !0, t.remove(o),
|
|
3084
|
+
a = !0, t.remove(o), br(null);
|
|
3084
3085
|
});
|
|
3085
3086
|
}, { immediate: !0 }), K(e.fonts, (n, r, i) => {
|
|
3086
3087
|
if (!n || n.length === 0) return;
|
|
@@ -3098,7 +3099,7 @@ function yo(e, t = vo) {
|
|
|
3098
3099
|
}
|
|
3099
3100
|
//#endregion
|
|
3100
3101
|
//#region src/composables/useHyperlinkManagement.ts
|
|
3101
|
-
function
|
|
3102
|
+
function xo(e) {
|
|
3102
3103
|
let t = H(null);
|
|
3103
3104
|
function n(e, t) {
|
|
3104
3105
|
t(e.state, (t) => e.dispatch(t), e);
|
|
@@ -3125,19 +3126,19 @@ function bo(e) {
|
|
|
3125
3126
|
r && n(t, r()), t.focus();
|
|
3126
3127
|
}
|
|
3127
3128
|
function a(e) {
|
|
3128
|
-
let n =
|
|
3129
|
+
let n = Tr(e);
|
|
3129
3130
|
n && (window.open(n, "_blank", "noopener,noreferrer"), t.value = null);
|
|
3130
3131
|
}
|
|
3131
3132
|
function o(n, r) {
|
|
3132
3133
|
let i = e.editorView.value;
|
|
3133
|
-
i && (
|
|
3134
|
+
i && (Cr(i, {
|
|
3134
3135
|
displayText: n,
|
|
3135
3136
|
href: r
|
|
3136
3137
|
}), t.value = null, i.focus());
|
|
3137
3138
|
}
|
|
3138
3139
|
function s() {
|
|
3139
3140
|
let n = e.editorView.value;
|
|
3140
|
-
n && (
|
|
3141
|
+
n && (wr(n, { popupHref: t.value?.href }), t.value = null, n.focus());
|
|
3141
3142
|
}
|
|
3142
3143
|
return {
|
|
3143
3144
|
hyperlinkPopupData: t,
|
|
@@ -3150,7 +3151,7 @@ function bo(e) {
|
|
|
3150
3151
|
}
|
|
3151
3152
|
//#endregion
|
|
3152
3153
|
//#region src/composables/useImageActions.ts
|
|
3153
|
-
function
|
|
3154
|
+
function So(e) {
|
|
3154
3155
|
let t = Ne(null), n = H(!1), r = A(() => {
|
|
3155
3156
|
e.stateTick.value;
|
|
3156
3157
|
let n = e.editorView.value, r = t.value;
|
|
@@ -3170,9 +3171,9 @@ function xo(e) {
|
|
|
3170
3171
|
function a(n) {
|
|
3171
3172
|
let r = e.editorView.value, a = t.value;
|
|
3172
3173
|
if (!r || !a) return;
|
|
3173
|
-
let o =
|
|
3174
|
+
let o = Rt(n);
|
|
3174
3175
|
if (!o) return;
|
|
3175
|
-
let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu:
|
|
3176
|
+
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;
|
|
3176
3177
|
c && (i(r, c(a.pmPos, o, s)), r.focus());
|
|
3177
3178
|
}
|
|
3178
3179
|
function o(n) {
|
|
@@ -3200,7 +3201,7 @@ function xo(e) {
|
|
|
3200
3201
|
}
|
|
3201
3202
|
//#endregion
|
|
3202
3203
|
//#region src/composables/useKeyboardShortcuts.ts
|
|
3203
|
-
function
|
|
3204
|
+
function Co(e) {
|
|
3204
3205
|
function t(t) {
|
|
3205
3206
|
if (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey) {
|
|
3206
3207
|
if (t.key === "o") {
|
|
@@ -3215,10 +3216,10 @@ function So(e) {
|
|
|
3215
3216
|
}
|
|
3216
3217
|
//#endregion
|
|
3217
3218
|
//#region src/composables/useOutlineSidebar.ts
|
|
3218
|
-
function
|
|
3219
|
+
function wo(e) {
|
|
3219
3220
|
function t() {
|
|
3220
3221
|
let t = e.editorView.value;
|
|
3221
|
-
t && (e.outlineHeadings.value =
|
|
3222
|
+
t && (e.outlineHeadings.value = Er(t.state.doc));
|
|
3222
3223
|
}
|
|
3223
3224
|
function n() {
|
|
3224
3225
|
e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
|
|
@@ -3249,7 +3250,7 @@ function Co(e) {
|
|
|
3249
3250
|
}
|
|
3250
3251
|
//#endregion
|
|
3251
3252
|
//#region src/composables/usePageSetupControls.ts
|
|
3252
|
-
function
|
|
3253
|
+
function To(e) {
|
|
3253
3254
|
function t(t) {
|
|
3254
3255
|
if (e.readOnly.value) return;
|
|
3255
3256
|
let n = e.getDocument();
|
|
@@ -3277,19 +3278,19 @@ function wo(e) {
|
|
|
3277
3278
|
}
|
|
3278
3279
|
function s(t) {
|
|
3279
3280
|
let n = e.editorView.value;
|
|
3280
|
-
n &&
|
|
3281
|
+
n && mr(t)(n.state, n.dispatch);
|
|
3281
3282
|
}
|
|
3282
3283
|
function c(t) {
|
|
3283
3284
|
let n = e.editorView.value;
|
|
3284
|
-
n &&
|
|
3285
|
+
n && hr(t)(n.state, n.dispatch);
|
|
3285
3286
|
}
|
|
3286
3287
|
function l(t) {
|
|
3287
3288
|
let n = e.editorView.value;
|
|
3288
|
-
n && (t < 0 ?
|
|
3289
|
+
n && (t < 0 ? pr(-t, !0)(n.state, n.dispatch) : pr(t, !1)(n.state, n.dispatch));
|
|
3289
3290
|
}
|
|
3290
3291
|
function u(t) {
|
|
3291
3292
|
let n = e.editorView.value;
|
|
3292
|
-
n &&
|
|
3293
|
+
n && fr(t)(n.state, n.dispatch);
|
|
3293
3294
|
}
|
|
3294
3295
|
return {
|
|
3295
3296
|
handlePageSetupApply: t,
|
|
@@ -3305,45 +3306,45 @@ function wo(e) {
|
|
|
3305
3306
|
}
|
|
3306
3307
|
//#endregion
|
|
3307
3308
|
//#region src/utils/textSelection.ts
|
|
3308
|
-
var
|
|
3309
|
-
function Do(e) {
|
|
3310
|
-
return !e || e.length === 0 ? !1 : To.test(e);
|
|
3311
|
-
}
|
|
3309
|
+
var Eo = /[\p{L}\p{N}\p{M}_''-]/u, Do = /\s/;
|
|
3312
3310
|
function Oo(e) {
|
|
3313
3311
|
return !e || e.length === 0 ? !1 : Eo.test(e);
|
|
3314
3312
|
}
|
|
3315
|
-
function ko(e
|
|
3313
|
+
function ko(e) {
|
|
3314
|
+
return !e || e.length === 0 ? !1 : Do.test(e);
|
|
3315
|
+
}
|
|
3316
|
+
function Ao(e, t) {
|
|
3316
3317
|
if (!e || e.length === 0) return [0, 0];
|
|
3317
3318
|
t = Math.max(0, Math.min(t, e.length - 1));
|
|
3318
3319
|
let n = e[t];
|
|
3319
|
-
if (
|
|
3320
|
+
if (ko(n)) {
|
|
3320
3321
|
let n = t, r = t;
|
|
3321
|
-
for (; n > 0 &&
|
|
3322
|
-
for (; r < e.length &&
|
|
3322
|
+
for (; n > 0 && ko(e[n - 1]);) n--;
|
|
3323
|
+
for (; r < e.length && ko(e[r]);) r++;
|
|
3323
3324
|
return [n, r];
|
|
3324
3325
|
}
|
|
3325
|
-
if (
|
|
3326
|
+
if (Oo(n)) {
|
|
3326
3327
|
let n = t, r = t;
|
|
3327
|
-
for (; n > 0 &&
|
|
3328
|
-
for (; r < e.length &&
|
|
3328
|
+
for (; n > 0 && Oo(e[n - 1]);) n--;
|
|
3329
|
+
for (; r < e.length && Oo(e[r]);) r++;
|
|
3329
3330
|
return [n, r];
|
|
3330
3331
|
}
|
|
3331
3332
|
return [t, t + 1];
|
|
3332
3333
|
}
|
|
3333
3334
|
//#endregion
|
|
3334
3335
|
//#region src/utils/domQueries.ts
|
|
3335
|
-
function
|
|
3336
|
-
let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) :
|
|
3336
|
+
function jo(e, t, n) {
|
|
3337
|
+
let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Yt(e);
|
|
3337
3338
|
for (let e of r) {
|
|
3338
3339
|
let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
|
|
3339
3340
|
if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
|
|
3340
3341
|
}
|
|
3341
3342
|
return null;
|
|
3342
3343
|
}
|
|
3343
|
-
function
|
|
3344
|
+
function Mo(e, t, n) {
|
|
3344
3345
|
if (!e || !t) return;
|
|
3345
|
-
let r =
|
|
3346
|
-
if (!r) for (let t of
|
|
3346
|
+
let r = Jt(e, n);
|
|
3347
|
+
if (!r) for (let t of Yt(e)) {
|
|
3347
3348
|
let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
|
|
3348
3349
|
if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
|
|
3349
3350
|
r = t;
|
|
@@ -3357,21 +3358,21 @@ function jo(e, t, n) {
|
|
|
3357
3358
|
behavior: "smooth"
|
|
3358
3359
|
});
|
|
3359
3360
|
}
|
|
3360
|
-
function
|
|
3361
|
+
function No(e, t, n, r) {
|
|
3361
3362
|
if (!e || !t) return null;
|
|
3362
|
-
let i =
|
|
3363
|
+
let i = Vt(e, n, r, 1);
|
|
3363
3364
|
return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
|
|
3364
3365
|
}
|
|
3365
|
-
function
|
|
3366
|
+
function Po(e, t, n, r) {
|
|
3366
3367
|
if (!e) return;
|
|
3367
|
-
let i =
|
|
3368
|
+
let i = jo(e, t, r);
|
|
3368
3369
|
if (!i) return;
|
|
3369
|
-
let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] =
|
|
3370
|
+
let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Ao(a, t - o), l = o + s, u = o + c;
|
|
3370
3371
|
l < u && n(l, u);
|
|
3371
3372
|
}
|
|
3372
|
-
function
|
|
3373
|
+
function Fo(e, t, n, r) {
|
|
3373
3374
|
if (!e) return;
|
|
3374
|
-
let i =
|
|
3375
|
+
let i = jo(e, t, r);
|
|
3375
3376
|
if (!i) return;
|
|
3376
3377
|
let a = i.closest(".layout-paragraph");
|
|
3377
3378
|
if (!a) return;
|
|
@@ -3380,13 +3381,13 @@ function Po(e, t, n, r) {
|
|
|
3380
3381
|
}
|
|
3381
3382
|
//#endregion
|
|
3382
3383
|
//#region src/composables/usePagesPointer.ts
|
|
3383
|
-
var
|
|
3384
|
-
function
|
|
3384
|
+
var Io = 500;
|
|
3385
|
+
function Lo(e) {
|
|
3385
3386
|
let t = H(null), n = null;
|
|
3386
3387
|
function r() {
|
|
3387
3388
|
n !== null && (clearTimeout(n), n = null);
|
|
3388
3389
|
}
|
|
3389
|
-
let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u =
|
|
3390
|
+
let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = jr(), d = S({
|
|
3390
3391
|
pagesContainer: e.pagesRef,
|
|
3391
3392
|
onScrollExtendSelection: (e, t) => {
|
|
3392
3393
|
if (!c || l === null) return;
|
|
@@ -3399,7 +3400,7 @@ function Io(e) {
|
|
|
3399
3400
|
visible: !1
|
|
3400
3401
|
}), p = null;
|
|
3401
3402
|
function m(t, n) {
|
|
3402
|
-
return
|
|
3403
|
+
return No(e.pagesRef.value, e.editorView.value, t, n);
|
|
3403
3404
|
}
|
|
3404
3405
|
function h() {
|
|
3405
3406
|
let t = i.value;
|
|
@@ -3412,7 +3413,7 @@ function Io(e) {
|
|
|
3412
3413
|
function g(t, n) {
|
|
3413
3414
|
let r = i.value, a = e.pagesRef.value, o = h();
|
|
3414
3415
|
if (r?.rId && a && o !== e.editorView.value) {
|
|
3415
|
-
let e =
|
|
3416
|
+
let e = Dr(a, r.position, r.rId, t, n);
|
|
3416
3417
|
return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
|
|
3417
3418
|
}
|
|
3418
3419
|
return m(t, n);
|
|
@@ -3425,13 +3426,13 @@ function Io(e) {
|
|
|
3425
3426
|
} catch {}
|
|
3426
3427
|
}
|
|
3427
3428
|
function v(t) {
|
|
3428
|
-
|
|
3429
|
+
Mo(e.pagesRef.value, e.pagesViewportRef.value, t);
|
|
3429
3430
|
}
|
|
3430
3431
|
function y(t) {
|
|
3431
|
-
|
|
3432
|
+
Po(e.pagesRef.value, t, _, i.value?.position);
|
|
3432
3433
|
}
|
|
3433
3434
|
function b(t) {
|
|
3434
|
-
|
|
3435
|
+
Fo(e.pagesRef.value, t, _, i.value?.position);
|
|
3435
3436
|
}
|
|
3436
3437
|
function x(t) {
|
|
3437
3438
|
let n = e.editorView.value;
|
|
@@ -3460,7 +3461,7 @@ function Io(e) {
|
|
|
3460
3461
|
if (!o) return;
|
|
3461
3462
|
let s = e.pagesViewportRef.value;
|
|
3462
3463
|
if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
|
|
3463
|
-
let l =
|
|
3464
|
+
let l = Ar({
|
|
3464
3465
|
mouseX: a.clientX,
|
|
3465
3466
|
mouseY: a.clientY,
|
|
3466
3467
|
pagesContainer: o,
|
|
@@ -3470,7 +3471,7 @@ function Io(e) {
|
|
|
3470
3471
|
if (!l) {
|
|
3471
3472
|
n === null && (n = setTimeout(() => {
|
|
3472
3473
|
t.value = null, n = null;
|
|
3473
|
-
},
|
|
3474
|
+
}, kr));
|
|
3474
3475
|
return;
|
|
3475
3476
|
}
|
|
3476
3477
|
let u = e.zoom.value || 1, d = s.getBoundingClientRect();
|
|
@@ -3521,7 +3522,7 @@ function Io(e) {
|
|
|
3521
3522
|
if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
|
|
3522
3523
|
let n = t.target;
|
|
3523
3524
|
if (n.closest(".docx-editor-vue__note-editor")) return;
|
|
3524
|
-
let r =
|
|
3525
|
+
let r = Or(n);
|
|
3525
3526
|
if (r) {
|
|
3526
3527
|
t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
|
|
3527
3528
|
return;
|
|
@@ -3531,11 +3532,11 @@ function Io(e) {
|
|
|
3531
3532
|
if (!s) return;
|
|
3532
3533
|
let c = a ? "header" : "footer", l = e.getDocument();
|
|
3533
3534
|
if (!l?.package) return;
|
|
3534
|
-
let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f =
|
|
3535
|
+
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);
|
|
3535
3536
|
if (!m) {
|
|
3536
|
-
let t =
|
|
3537
|
+
let t = On(l, c, p);
|
|
3537
3538
|
if (!t) return;
|
|
3538
|
-
e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f =
|
|
3539
|
+
e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = jn(t.package), m = kn(f, c, p);
|
|
3539
3540
|
}
|
|
3540
3541
|
if (!m) return;
|
|
3541
3542
|
let h = m, g = e.pagesViewportRef.value;
|
|
@@ -3555,7 +3556,7 @@ function Io(e) {
|
|
|
3555
3556
|
}, requestAnimationFrame(() => {
|
|
3556
3557
|
let n = e.getHfPmView(h);
|
|
3557
3558
|
if (!n) return;
|
|
3558
|
-
let r =
|
|
3559
|
+
let r = Dr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
|
|
3559
3560
|
if (r !== null) {
|
|
3560
3561
|
let e = Math.max(0, Math.min(r, n.state.doc.content.size));
|
|
3561
3562
|
n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
|
|
@@ -3568,12 +3569,12 @@ function Io(e) {
|
|
|
3568
3569
|
if (!t?.package || !n?.rId) return;
|
|
3569
3570
|
let r = e.getHfPmView(n.rId);
|
|
3570
3571
|
if (!r) return;
|
|
3571
|
-
let a =
|
|
3572
|
+
let a = Mn({
|
|
3572
3573
|
document: t,
|
|
3573
3574
|
position: n.position,
|
|
3574
3575
|
isFirstPage: n.isFirstPage,
|
|
3575
3576
|
activeRId: n.rId,
|
|
3576
|
-
blocks:
|
|
3577
|
+
blocks: xn(r.state.doc)
|
|
3577
3578
|
});
|
|
3578
3579
|
a && (i.value = null, e.setDocument(a), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(a));
|
|
3579
3580
|
}
|
|
@@ -3583,7 +3584,7 @@ function Io(e) {
|
|
|
3583
3584
|
i.value = null;
|
|
3584
3585
|
return;
|
|
3585
3586
|
}
|
|
3586
|
-
let r =
|
|
3587
|
+
let r = An({
|
|
3587
3588
|
document: t,
|
|
3588
3589
|
position: n.position,
|
|
3589
3590
|
activeRId: n.rId
|
|
@@ -3619,13 +3620,13 @@ function Io(e) {
|
|
|
3619
3620
|
}
|
|
3620
3621
|
let f = h() ?? n;
|
|
3621
3622
|
if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
|
|
3622
|
-
let p =
|
|
3623
|
+
let p = It(r);
|
|
3623
3624
|
if (p) {
|
|
3624
3625
|
t.preventDefault(), t.stopPropagation();
|
|
3625
3626
|
let n = Number(p.dataset.pmStart);
|
|
3626
3627
|
if (!Number.isNaN(n)) {
|
|
3627
3628
|
try {
|
|
3628
|
-
f.dispatch(f.state.tr.setSelection(
|
|
3629
|
+
f.dispatch(f.state.tr.setSelection(At.create(f.state.doc, n)));
|
|
3629
3630
|
} catch {}
|
|
3630
3631
|
e.selectedImage.value = {
|
|
3631
3632
|
element: p,
|
|
@@ -3644,12 +3645,12 @@ function Io(e) {
|
|
|
3644
3645
|
return;
|
|
3645
3646
|
}
|
|
3646
3647
|
let v = Date.now();
|
|
3647
|
-
if (v - a <
|
|
3648
|
+
if (v - a < Io && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
|
|
3648
3649
|
else if (s >= 3) b(m), s = 0;
|
|
3649
3650
|
else if (t.shiftKey) {
|
|
3650
3651
|
let { from: e } = f.state.selection;
|
|
3651
3652
|
_(e, m);
|
|
3652
|
-
} else _(m), l = m, c = !0, u.begin(
|
|
3653
|
+
} else _(m), l = m, c = !0, u.begin(Mr(f, m));
|
|
3653
3654
|
f.focus();
|
|
3654
3655
|
}
|
|
3655
3656
|
function oe(e) {
|
|
@@ -3717,8 +3718,8 @@ function Io(e) {
|
|
|
3717
3718
|
}
|
|
3718
3719
|
//#endregion
|
|
3719
3720
|
//#region src/composables/useRemoteSelectionSync.ts
|
|
3720
|
-
var
|
|
3721
|
-
let t = new
|
|
3721
|
+
var Ro = (e) => {
|
|
3722
|
+
let t = new Nr(), n = null, r = () => {
|
|
3722
3723
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
3723
3724
|
let r = e.pagesRef.value;
|
|
3724
3725
|
r && t.clear(r);
|
|
@@ -3741,8 +3742,8 @@ var Lo = (e) => {
|
|
|
3741
3742
|
], i, { flush: "post" }), Ae(() => {
|
|
3742
3743
|
a(), r();
|
|
3743
3744
|
});
|
|
3744
|
-
},
|
|
3745
|
-
let t = new
|
|
3745
|
+
}, zo = (e) => {
|
|
3746
|
+
let t = new Pr(), n = null, r = () => {
|
|
3746
3747
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
3747
3748
|
let r = e.pagesRef.value;
|
|
3748
3749
|
r && t.clear(r);
|
|
@@ -3756,8 +3757,8 @@ var Lo = (e) => {
|
|
|
3756
3757
|
state: i.state,
|
|
3757
3758
|
zoom: e.zoom.value,
|
|
3758
3759
|
zIndex: ae.selectionOverlay
|
|
3759
|
-
}), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ?
|
|
3760
|
-
if (
|
|
3760
|
+
}), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Ht(r, o.head, s) : null;
|
|
3761
|
+
if (Zt({
|
|
3761
3762
|
hiddenHost: e.hiddenContainer.value,
|
|
3762
3763
|
editorView: i,
|
|
3763
3764
|
visibleCaret: c ? {
|
|
@@ -3788,27 +3789,27 @@ var Lo = (e) => {
|
|
|
3788
3789
|
}, { immediate: !0 });
|
|
3789
3790
|
let o = typeof window > "u" ? null : window;
|
|
3790
3791
|
return o?.addEventListener("scroll", i, !0), Ae(() => {
|
|
3791
|
-
a(), r(), o?.removeEventListener("scroll", i, !0),
|
|
3792
|
+
a(), r(), o?.removeEventListener("scroll", i, !0), Xt(e.hiddenContainer.value);
|
|
3792
3793
|
}), {
|
|
3793
3794
|
clearOverlay: r,
|
|
3794
3795
|
updateSelectionOverlay: i
|
|
3795
3796
|
};
|
|
3796
|
-
},
|
|
3797
|
+
}, Bo = { class: "docx-editor-vue__toolbar-shell" }, Vo = {
|
|
3797
3798
|
key: 0,
|
|
3798
3799
|
class: "docx-editor-vue__error"
|
|
3799
|
-
},
|
|
3800
|
+
}, Ho = {
|
|
3800
3801
|
key: 1,
|
|
3801
3802
|
class: "docx-editor-vue__loading"
|
|
3802
|
-
},
|
|
3803
|
+
}, Uo = {
|
|
3803
3804
|
key: 2,
|
|
3804
3805
|
class: "docx-editor-vue__placeholder"
|
|
3805
|
-
},
|
|
3806
|
+
}, Wo = { class: "docx-editor-vue__editor-area" }, Go = {
|
|
3806
3807
|
key: 0,
|
|
3807
3808
|
class: "docx-editor-vue__ruler-h"
|
|
3808
|
-
},
|
|
3809
|
+
}, Ko = {
|
|
3809
3810
|
key: 1,
|
|
3810
3811
|
class: "docx-editor-vue__ruler-v"
|
|
3811
|
-
},
|
|
3812
|
+
}, qo = {
|
|
3812
3813
|
class: "docx-editor-vue__editor-content-wrapper",
|
|
3813
3814
|
style: {
|
|
3814
3815
|
position: "relative",
|
|
@@ -3816,11 +3817,11 @@ var Lo = (e) => {
|
|
|
3816
3817
|
flexDirection: "column",
|
|
3817
3818
|
minHeight: "100%"
|
|
3818
3819
|
}
|
|
3819
|
-
},
|
|
3820
|
+
}, Jo = {
|
|
3820
3821
|
"data-testid": "selection-overlay",
|
|
3821
3822
|
class: "docx-editor-vue__decoration-origin",
|
|
3822
3823
|
"aria-hidden": "true"
|
|
3823
|
-
},
|
|
3824
|
+
}, Yo = ["aria-label"], Xo = { class: "docx-editor-vue__note-editor-header" }, Zo = ["aria-label"], Qo = ["aria-label"], $o = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
3824
3825
|
__name: "DocxEditor",
|
|
3825
3826
|
props: {
|
|
3826
3827
|
documentBuffer: { default: null },
|
|
@@ -3944,13 +3945,13 @@ var Lo = (e) => {
|
|
|
3944
3945
|
let o = e, s = n;
|
|
3945
3946
|
a(o.components);
|
|
3946
3947
|
let c = de();
|
|
3947
|
-
|
|
3948
|
+
_i(c);
|
|
3948
3949
|
function l(e) {
|
|
3949
3950
|
o.onChange?.(e), s("change", e), s("update:document", e);
|
|
3950
3951
|
}
|
|
3951
|
-
let u = H(o.mode), d = A(() => o.readOnly || u.value === "viewing"), f = A(() => o.showReviewControls), p = A(() =>
|
|
3952
|
+
let u = H(o.mode), d = A(() => o.readOnly || u.value === "viewing"), f = A(() => o.showReviewControls), p = A(() => zt(u.value)), m = H("all-markup");
|
|
3952
3953
|
function h() {
|
|
3953
|
-
|
|
3954
|
+
Kn(Bt(u.value));
|
|
3954
3955
|
}
|
|
3955
3956
|
function _(e) {
|
|
3956
3957
|
m.value = e;
|
|
@@ -3965,12 +3966,12 @@ var Lo = (e) => {
|
|
|
3965
3966
|
function Ke(e) {
|
|
3966
3967
|
o.enableWheelZoom !== !1 && Ve(e);
|
|
3967
3968
|
}
|
|
3968
|
-
|
|
3969
|
+
Co({
|
|
3969
3970
|
showFindReplace: he,
|
|
3970
3971
|
showHyperlink: ge,
|
|
3971
3972
|
handleZoomKeyDown: He
|
|
3972
3973
|
});
|
|
3973
|
-
let { editor: Je, editorView: J, editorState:
|
|
3974
|
+
let { editor: Je, editorView: J, editorState: at, remoteSelections: st, headerFooterSelection: lt, activeNoteStory: ut, isReady: dt, isDirty: ft, parseError: pt, layout: mt, blocks: ht, measures: gt, syncCoordinator: _t, loadBuffer: vt, loadDocument: yt, save: bt, getDocument: Y, setDocument: xt, getHeaderFooterView: St, syncHeaderFooterViews: Ct, openNoteStory: wt, closeNoteStory: Tt, getActiveNoteView: Et, getCommands: Dt, reLayout: Ot } = se({
|
|
3974
3975
|
hiddenContainer: S,
|
|
3975
3976
|
hiddenHeaderFooterContainer: C,
|
|
3976
3977
|
noteEditorContainer: we,
|
|
@@ -4009,110 +4010,110 @@ var Lo = (e) => {
|
|
|
4009
4010
|
featureFlags: () => o.featureFlags,
|
|
4010
4011
|
onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
|
|
4011
4012
|
});
|
|
4012
|
-
K(
|
|
4013
|
+
K(at, (e, t) => {
|
|
4013
4014
|
pe.value !== null && e && t && !e.doc.eq(t.doc) && (pe.value = null);
|
|
4014
4015
|
});
|
|
4015
|
-
let X = A(() =>
|
|
4016
|
+
let X = A(() => et({
|
|
4016
4017
|
bodyView: J.value,
|
|
4017
|
-
headerFooterView: Se.value ?
|
|
4018
|
-
noteView:
|
|
4019
|
-
}).view),
|
|
4020
|
-
let e =
|
|
4018
|
+
headerFooterView: Se.value ? St(Se.value) : null,
|
|
4019
|
+
noteView: Et()
|
|
4020
|
+
}).view), kt = A(() => {
|
|
4021
|
+
let e = ut.value;
|
|
4021
4022
|
return e ? ee(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
|
|
4022
|
-
}),
|
|
4023
|
-
function
|
|
4024
|
-
J.value && (
|
|
4023
|
+
}), At = A(() => !dt.value && re.value && !(o.preserveDocumentWhileLoading === !0 && ae.value));
|
|
4024
|
+
function jt() {
|
|
4025
|
+
J.value && (nt(), tt(), Ot());
|
|
4025
4026
|
}
|
|
4026
|
-
|
|
4027
|
-
isReady:
|
|
4027
|
+
bo({
|
|
4028
|
+
isReady: dt,
|
|
4028
4029
|
getDocument: Y,
|
|
4029
4030
|
fonts: () => o.fonts,
|
|
4030
|
-
remeasure:
|
|
4031
|
+
remeasure: jt
|
|
4031
4032
|
});
|
|
4032
|
-
let { selectedImage: Z, imageInteracting:
|
|
4033
|
+
let { selectedImage: Z, imageInteracting: Mt, imageToolbarContext: Nt, handleToolbarImageWrap: Pt, handleImageTransform: Ft } = So({
|
|
4033
4034
|
editorView: X,
|
|
4034
4035
|
zoom: L,
|
|
4035
4036
|
stateTick: T,
|
|
4036
|
-
getCommands:
|
|
4037
|
-
}),
|
|
4037
|
+
getCommands: Dt
|
|
4038
|
+
}), It = zo({
|
|
4038
4039
|
editorView: J,
|
|
4039
4040
|
hiddenContainer: S,
|
|
4040
4041
|
pagesRef: w,
|
|
4041
4042
|
zoom: L,
|
|
4042
4043
|
selectedImage: Z,
|
|
4043
|
-
syncCoordinator:
|
|
4044
|
-
imageInteracting:
|
|
4044
|
+
syncCoordinator: _t,
|
|
4045
|
+
imageInteracting: Mt
|
|
4045
4046
|
});
|
|
4046
|
-
|
|
4047
|
+
Ro({
|
|
4047
4048
|
pagesRef: w,
|
|
4048
|
-
remoteSelections:
|
|
4049
|
-
syncCoordinator:
|
|
4049
|
+
remoteSelections: st,
|
|
4050
|
+
syncCoordinator: _t,
|
|
4050
4051
|
zoom: L
|
|
4051
4052
|
});
|
|
4052
|
-
let { hyperlinkPopupData:
|
|
4053
|
+
let { hyperlinkPopupData: Lt, handleHyperlinkSubmit: Rt, handleHyperlinkRemove: Vt, handleHyperlinkPopupNavigate: Ht, handleHyperlinkPopupEdit: Ut, handleHyperlinkPopupRemove: Wt } = xo({
|
|
4053
4054
|
editorView: X,
|
|
4054
|
-
getCommands:
|
|
4055
|
-
}),
|
|
4055
|
+
getCommands: Dt
|
|
4056
|
+
}), Gt = oe(), { tableInsertButton: Kt, hfEdit: qt, scrollPageInfo: Jt, resolvePos: Yt, setPmSelection: Xt, scrollVisiblePositionIntoView: Zt, handlePagesMouseDown: Qt, handlePagesMouseMove: $t, handlePagesClick: en, handlePagesDoubleClick: tn, handleTableInsertClick: nn, handleHfSave: rn, handleHfRemove: an } = Lo({
|
|
4056
4057
|
editorView: J,
|
|
4057
4058
|
pagesRef: w,
|
|
4058
4059
|
pagesViewportRef: le,
|
|
4059
4060
|
selectedImage: Z,
|
|
4060
|
-
imageInteracting:
|
|
4061
|
-
hyperlinkPopupData:
|
|
4061
|
+
imageInteracting: Mt,
|
|
4062
|
+
hyperlinkPopupData: Lt,
|
|
4062
4063
|
readOnly: d,
|
|
4063
4064
|
showHeaderFooterEditing: A(() => o.showHeaderFooterEditing),
|
|
4064
4065
|
zoom: L,
|
|
4065
|
-
layout:
|
|
4066
|
+
layout: mt,
|
|
4066
4067
|
tableResize: {
|
|
4067
|
-
tryStartResize:
|
|
4068
|
-
isResizing: A(() =>
|
|
4068
|
+
tryStartResize: Gt.tryStartResize,
|
|
4069
|
+
isResizing: A(() => Gt.isResizing())
|
|
4069
4070
|
},
|
|
4070
|
-
getCommands:
|
|
4071
|
+
getCommands: Dt,
|
|
4071
4072
|
getDocument: Y,
|
|
4072
|
-
getHfPmView:
|
|
4073
|
-
syncHfPMs:
|
|
4074
|
-
setDocument:
|
|
4073
|
+
getHfPmView: St,
|
|
4074
|
+
syncHfPMs: Ct,
|
|
4075
|
+
setDocument: xt,
|
|
4075
4076
|
openNoteStory: (e) => {
|
|
4076
|
-
|
|
4077
|
+
wt(e), It.clearOverlay();
|
|
4077
4078
|
},
|
|
4078
|
-
closeNoteStory:
|
|
4079
|
-
getActiveNoteView:
|
|
4080
|
-
reLayout:
|
|
4079
|
+
closeNoteStory: Tt,
|
|
4080
|
+
getActiveNoteView: Et,
|
|
4081
|
+
reLayout: Ot,
|
|
4081
4082
|
onDocumentChange: l,
|
|
4082
|
-
clearOverlay:
|
|
4083
|
-
}),
|
|
4084
|
-
let e =
|
|
4083
|
+
clearOverlay: It.clearOverlay
|
|
4084
|
+
}), on = () => qt.value?.rId ? St(qt.value.rId) : null, sn = A(() => {
|
|
4085
|
+
let e = qt.value, t = lt.value;
|
|
4085
4086
|
return !e?.rId || !t || t.rId !== e.rId ? null : {
|
|
4086
4087
|
...t,
|
|
4087
4088
|
pageNumber: e.pageNumber
|
|
4088
4089
|
};
|
|
4089
4090
|
});
|
|
4090
|
-
K(
|
|
4091
|
-
Se.value = e?.rId ?? null, e &&
|
|
4091
|
+
K(qt, (e) => {
|
|
4092
|
+
Se.value = e?.rId ?? null, e && It.clearOverlay();
|
|
4092
4093
|
}, { immediate: !0 });
|
|
4093
|
-
let
|
|
4094
|
+
let cn = wo({
|
|
4094
4095
|
editorView: J,
|
|
4095
4096
|
showOutline: xe,
|
|
4096
4097
|
showSidebar: D,
|
|
4097
4098
|
outlineHeadings: Ee,
|
|
4098
4099
|
activeSidebarItem: k,
|
|
4099
4100
|
extractCommentsAndChanges: () => {},
|
|
4100
|
-
scrollToVisiblePosition:
|
|
4101
|
-
}), { contextMenu:
|
|
4101
|
+
scrollToVisiblePosition: Zt
|
|
4102
|
+
}), { contextMenu: ln, imageContextMenu: un, imageContextMenuTextActions: dn, customTextMenuItems: fn, handleContextMenu: pn, handleSelectedImageContextMenu: mn, handleImageWrapSelect: hn, handleContextMenuAction: gn } = io({
|
|
4102
4103
|
editorView: X,
|
|
4103
4104
|
selectedImage: Z,
|
|
4104
4105
|
zoom: L,
|
|
4105
4106
|
showImageProperties: _e,
|
|
4106
|
-
getCommands:
|
|
4107
|
-
clearOverlay:
|
|
4108
|
-
setPmSelection:
|
|
4109
|
-
resolvePos:
|
|
4107
|
+
getCommands: Dt,
|
|
4108
|
+
clearOverlay: It.clearOverlay,
|
|
4109
|
+
setPmSelection: Xt,
|
|
4110
|
+
resolvePos: Yt,
|
|
4110
4111
|
customContextMenuItems: () => d.value ? void 0 : o.customContextMenuItems,
|
|
4111
4112
|
onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
|
|
4112
4113
|
onCopy: () => o.onCopy?.(),
|
|
4113
4114
|
onCut: () => o.onCut?.(),
|
|
4114
4115
|
onPaste: () => o.onPaste?.()
|
|
4115
|
-
}),
|
|
4116
|
+
}), _n = ce(J, T), vn = A(() => _n.value.entries), Q = Ka({
|
|
4116
4117
|
editorView: J,
|
|
4117
4118
|
getDocument: Y,
|
|
4118
4119
|
author: () => o.author,
|
|
@@ -4120,58 +4121,56 @@ var Lo = (e) => {
|
|
|
4120
4121
|
onCommentsChange: (e) => {
|
|
4121
4122
|
o.onCommentsChange?.(e), s("comments-change", e);
|
|
4122
4123
|
},
|
|
4123
|
-
reLayout:
|
|
4124
|
-
}),
|
|
4124
|
+
reLayout: Ot
|
|
4125
|
+
}), yn = Q.comments, $ = Ga({
|
|
4125
4126
|
editorView: J,
|
|
4126
4127
|
pagesViewport: le,
|
|
4127
4128
|
pagesContainer: w,
|
|
4128
4129
|
readOnly: d,
|
|
4129
4130
|
createComment: Q.createComment,
|
|
4130
4131
|
pushComment: Q.pushComment,
|
|
4131
|
-
reLayout:
|
|
4132
|
+
reLayout: Ot,
|
|
4132
4133
|
showSidebar: D,
|
|
4133
4134
|
setActiveSidebarItem: (e) => {
|
|
4134
4135
|
k.value = e;
|
|
4135
4136
|
}
|
|
4136
4137
|
});
|
|
4137
|
-
function
|
|
4138
|
-
navigator.clipboard?.writeText(e),
|
|
4138
|
+
function bn(e) {
|
|
4139
|
+
navigator.clipboard?.writeText(e), Lt.value = null;
|
|
4139
4140
|
}
|
|
4140
|
-
let
|
|
4141
|
+
let xn = A(() => {
|
|
4141
4142
|
T.value;
|
|
4142
4143
|
let e = Y()?.package.document;
|
|
4143
4144
|
return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
|
|
4144
|
-
}),
|
|
4145
|
+
}), Sn = A(() => {
|
|
4145
4146
|
T.value;
|
|
4146
4147
|
let e = Y();
|
|
4147
|
-
return e ?
|
|
4148
|
-
}),
|
|
4148
|
+
return e ? ot(e) : void 0;
|
|
4149
|
+
}), Cn = A(() => {
|
|
4149
4150
|
T.value;
|
|
4150
4151
|
let e = X.value;
|
|
4151
4152
|
if (!e) return {};
|
|
4152
|
-
let t =
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
return typeof r == "number" && (n.width = r), typeof i == "string" && (n.widthType = i), typeof a == "string" && (n.justification = a), n;
|
|
4156
|
-
}), Cn = A(() => {
|
|
4153
|
+
let t = Ze(e.state).table;
|
|
4154
|
+
return t ? Xe(t) : {};
|
|
4155
|
+
}), wn = A(() => {
|
|
4157
4156
|
T.value;
|
|
4158
4157
|
let e = {};
|
|
4159
4158
|
o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
|
|
4160
4159
|
let t = Y()?.package.styles?.styles;
|
|
4161
4160
|
return t !== void 0 && (e.documentStyles = t), e;
|
|
4162
|
-
}),
|
|
4161
|
+
}), Tn = A(() => it(xn.value?.pageWidth ?? 12240) * L.value), En = A(() => {
|
|
4163
4162
|
let e = /* @__PURE__ */ new Set();
|
|
4164
|
-
for (let t of
|
|
4163
|
+
for (let t of yn.value) t.done && e.add(t.id);
|
|
4165
4164
|
return e;
|
|
4166
|
-
}),
|
|
4165
|
+
}), Dn = A(() => ({
|
|
4167
4166
|
transform: L.value === 1 ? void 0 : `scale(${L.value})`,
|
|
4168
4167
|
transformOrigin: "top center",
|
|
4169
4168
|
transition: "transform 0.2s ease"
|
|
4170
|
-
})), { handleApplyStyle:
|
|
4169
|
+
})), { handleApplyStyle: On, handleInsertSymbol: kn, handleInsertSectionBreakNextPage: An, handleInsertSectionBreakContinuous: jn } = co({
|
|
4171
4170
|
editorView: X,
|
|
4172
4171
|
getDocument: Y
|
|
4173
4172
|
});
|
|
4174
|
-
function
|
|
4173
|
+
function Mn() {
|
|
4175
4174
|
if (o.onInsertImage) {
|
|
4176
4175
|
o.onInsertImage();
|
|
4177
4176
|
return;
|
|
@@ -4184,7 +4183,7 @@ var Lo = (e) => {
|
|
|
4184
4183
|
n && Ue(e, n, () => e.focus()), t.remove();
|
|
4185
4184
|
}), document.body.appendChild(t), t.click();
|
|
4186
4185
|
}
|
|
4187
|
-
function
|
|
4186
|
+
function Nn(e, t) {
|
|
4188
4187
|
if (o.onInsertTable) {
|
|
4189
4188
|
o.onInsertTable(e, t);
|
|
4190
4189
|
return;
|
|
@@ -4192,7 +4191,7 @@ var Lo = (e) => {
|
|
|
4192
4191
|
let n = X.value;
|
|
4193
4192
|
n && (qe(n, e, t), n.focus());
|
|
4194
4193
|
}
|
|
4195
|
-
function
|
|
4194
|
+
function Pn() {
|
|
4196
4195
|
if (o.onInsertPageBreak) {
|
|
4197
4196
|
o.onInsertPageBreak();
|
|
4198
4197
|
return;
|
|
@@ -4200,7 +4199,7 @@ var Lo = (e) => {
|
|
|
4200
4199
|
let e = J.value;
|
|
4201
4200
|
e && (Ge(e), e.focus());
|
|
4202
4201
|
}
|
|
4203
|
-
function
|
|
4202
|
+
function Fn() {
|
|
4204
4203
|
if (o.onInsertTOC) {
|
|
4205
4204
|
o.onInsertTOC();
|
|
4206
4205
|
return;
|
|
@@ -4208,16 +4207,16 @@ var Lo = (e) => {
|
|
|
4208
4207
|
let e = J.value;
|
|
4209
4208
|
e && (Ye(e), e.focus());
|
|
4210
4209
|
}
|
|
4211
|
-
let { handlePageSetupApply:
|
|
4210
|
+
let { handlePageSetupApply: In, handleLeftMarginChange: Ln, handleRightMarginChange: Rn, handleTopMarginChange: zn, handleBottomMarginChange: Bn, handleIndentLeftChange: Vn, handleIndentRightChange: Hn, handleFirstLineIndentChange: Un, handleTabStopRemove: Wn } = To({
|
|
4212
4211
|
editorView: J,
|
|
4213
4212
|
getDocument: Y,
|
|
4214
4213
|
readOnly: d,
|
|
4215
4214
|
stateTick: T,
|
|
4216
|
-
reLayout:
|
|
4215
|
+
reLayout: Ot,
|
|
4217
4216
|
onChange: l
|
|
4218
|
-
}),
|
|
4217
|
+
}), Gn = A(() => {
|
|
4219
4218
|
T.value;
|
|
4220
|
-
let e = X.value, t = e ?
|
|
4219
|
+
let e = X.value, t = e ? Qe(e.state).paragraphFormatting : {};
|
|
4221
4220
|
return {
|
|
4222
4221
|
indentLeft: t.indentLeft ?? 0,
|
|
4223
4222
|
indentRight: t.indentRight ?? 0,
|
|
@@ -4226,10 +4225,10 @@ var Lo = (e) => {
|
|
|
4226
4225
|
tabs: t.tabs ?? null
|
|
4227
4226
|
};
|
|
4228
4227
|
});
|
|
4229
|
-
function
|
|
4228
|
+
function Kn(e) {
|
|
4230
4229
|
u.value !== e && (u.value = e, o.onModeChange?.(e), s("mode-change", e));
|
|
4231
4230
|
}
|
|
4232
|
-
function
|
|
4231
|
+
function qn(e) {
|
|
4233
4232
|
switch (e) {
|
|
4234
4233
|
case "find":
|
|
4235
4234
|
case "findReplace":
|
|
@@ -4248,100 +4247,100 @@ var Lo = (e) => {
|
|
|
4248
4247
|
d.value || (be.value = !0);
|
|
4249
4248
|
break;
|
|
4250
4249
|
case "toggleOutline":
|
|
4251
|
-
|
|
4250
|
+
cn.handleToggleOutline();
|
|
4252
4251
|
break;
|
|
4253
4252
|
case "toggleSidebar":
|
|
4254
4253
|
D.value = !D.value;
|
|
4255
4254
|
break;
|
|
4256
4255
|
case "insertImage":
|
|
4257
|
-
|
|
4256
|
+
Mn();
|
|
4258
4257
|
break;
|
|
4259
4258
|
case "insertPageBreak":
|
|
4260
|
-
|
|
4259
|
+
Pn();
|
|
4261
4260
|
break;
|
|
4262
4261
|
case "insertSectionBreakNextPage":
|
|
4263
|
-
|
|
4262
|
+
An();
|
|
4264
4263
|
break;
|
|
4265
4264
|
case "insertSectionBreakContinuous":
|
|
4266
|
-
|
|
4265
|
+
jn();
|
|
4267
4266
|
break;
|
|
4268
4267
|
case "insertTOC":
|
|
4269
|
-
|
|
4268
|
+
Fn();
|
|
4270
4269
|
break;
|
|
4271
4270
|
default: break;
|
|
4272
4271
|
}
|
|
4273
4272
|
s("menu-action", e);
|
|
4274
4273
|
}
|
|
4275
|
-
function
|
|
4274
|
+
function Jn(e) {
|
|
4276
4275
|
if (d.value) return;
|
|
4277
4276
|
let t = Y();
|
|
4278
4277
|
if (!t) return;
|
|
4279
|
-
let n =
|
|
4280
|
-
|
|
4278
|
+
let n = ct(t, e);
|
|
4279
|
+
xt(n), ft.value = !0, T.value++, Ot(), l(n);
|
|
4281
4280
|
}
|
|
4282
|
-
function
|
|
4283
|
-
|
|
4281
|
+
function Yn(e, t) {
|
|
4282
|
+
Nn(e, t);
|
|
4284
4283
|
}
|
|
4285
|
-
function
|
|
4286
|
-
let t = X.value, n =
|
|
4284
|
+
function Xn(e) {
|
|
4285
|
+
let t = X.value, n = Dt().setTableProperties;
|
|
4287
4286
|
!t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
4288
4287
|
}
|
|
4289
|
-
let
|
|
4290
|
-
|
|
4288
|
+
let Zn = H(!1);
|
|
4289
|
+
ao({
|
|
4291
4290
|
documentBuffer: () => o.documentBuffer ?? null,
|
|
4292
4291
|
document: () => o.document ?? null,
|
|
4293
|
-
loadDocumentBuffer:
|
|
4294
|
-
loadDocument:
|
|
4295
|
-
sidebarAutoOpenedRef:
|
|
4292
|
+
loadDocumentBuffer: vt,
|
|
4293
|
+
loadDocument: yt,
|
|
4294
|
+
sidebarAutoOpenedRef: Zn
|
|
4296
4295
|
}), K(() => o.mode, (e) => {
|
|
4297
4296
|
e && e !== u.value && (u.value = e);
|
|
4298
4297
|
}), K(() => o.showOutline, (e) => {
|
|
4299
|
-
xe.value = !!e,
|
|
4298
|
+
xe.value = !!e, cn.recomputeHeadingsIfOpen();
|
|
4300
4299
|
});
|
|
4301
|
-
let
|
|
4302
|
-
function
|
|
4300
|
+
let Qn = H(!1);
|
|
4301
|
+
function $n(e) {
|
|
4303
4302
|
let t = e.currentTarget;
|
|
4304
4303
|
t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop);
|
|
4305
4304
|
}
|
|
4306
|
-
function
|
|
4307
|
-
if (o.initialScrollTop === void 0 ||
|
|
4308
|
-
|
|
4305
|
+
function er() {
|
|
4306
|
+
if (o.initialScrollTop === void 0 || Qn.value) return;
|
|
4307
|
+
Qn.value = !0;
|
|
4309
4308
|
let e = o.initialScrollTop;
|
|
4310
4309
|
requestAnimationFrame(() => {
|
|
4311
4310
|
fe.value && (fe.value.scrollTop = e);
|
|
4312
4311
|
});
|
|
4313
4312
|
}
|
|
4314
|
-
K(
|
|
4313
|
+
K(dt, (e) => {
|
|
4315
4314
|
if (!e) {
|
|
4316
|
-
|
|
4315
|
+
Qn.value = !1;
|
|
4317
4316
|
return;
|
|
4318
4317
|
}
|
|
4319
|
-
ae.value = !0,
|
|
4318
|
+
ae.value = !0, cn.recomputeHeadingsIfOpen(), Q.seedFromDocument();
|
|
4320
4319
|
let t = Y();
|
|
4321
|
-
t && o.onCompatibilityChange?.(
|
|
4320
|
+
t && o.onCompatibilityChange?.($e(t)), o.autoOpenReviewSidebar !== !1 && !Zn.value && (yn.value.length > 0 || vn.value.length > 0) && (Zn.value = !0, D.value = !0), er(), s("ready");
|
|
4322
4321
|
}), ke(() => {
|
|
4323
4322
|
let e = Je.on("selectionChange", () => {
|
|
4324
4323
|
T.value++, $.updateFloatingButton();
|
|
4325
4324
|
}), t = Je.on("docChange", () => {
|
|
4326
|
-
T.value++,
|
|
4325
|
+
T.value++, cn.recomputeHeadingsIfOpen();
|
|
4327
4326
|
}), n = Je.on("layoutComplete", () => {
|
|
4328
4327
|
T.value++;
|
|
4329
|
-
}), r =
|
|
4328
|
+
}), r = Gt.install(), i = rt(() => o.onFontsLoaded?.());
|
|
4330
4329
|
B(() => {
|
|
4331
4330
|
e(), t(), n(), r(), i();
|
|
4332
4331
|
});
|
|
4333
4332
|
});
|
|
4334
|
-
let { exposed:
|
|
4333
|
+
let { exposed: tr } = so({
|
|
4335
4334
|
editor: Je,
|
|
4336
4335
|
editorView: J,
|
|
4337
|
-
isDirty:
|
|
4336
|
+
isDirty: ft,
|
|
4338
4337
|
commentsDirty: Q.commentsDirty,
|
|
4339
4338
|
clearCommentsDirty: Q.clearCommentsDirty,
|
|
4340
|
-
layout:
|
|
4339
|
+
layout: mt,
|
|
4341
4340
|
pagesRef: w,
|
|
4342
4341
|
pagesViewportRef: le,
|
|
4343
4342
|
zoom: L,
|
|
4344
|
-
scrollVisiblePositionIntoView:
|
|
4343
|
+
scrollVisiblePositionIntoView: Zt,
|
|
4345
4344
|
setPassageHighlight: (e) => {
|
|
4346
4345
|
pe.value = e;
|
|
4347
4346
|
},
|
|
@@ -4355,16 +4354,16 @@ var Lo = (e) => {
|
|
|
4355
4354
|
focus: () => X.value?.focus(),
|
|
4356
4355
|
getDocument: Y,
|
|
4357
4356
|
getActiveView: () => X.value,
|
|
4358
|
-
closeNoteStory:
|
|
4359
|
-
getHeaderFooterView:
|
|
4357
|
+
closeNoteStory: Tt,
|
|
4358
|
+
getHeaderFooterView: St,
|
|
4360
4359
|
setZoom: U,
|
|
4361
|
-
save:
|
|
4362
|
-
loadDocument:
|
|
4363
|
-
loadDocumentBuffer:
|
|
4360
|
+
save: bt,
|
|
4361
|
+
loadDocument: yt,
|
|
4362
|
+
loadDocumentBuffer: vt,
|
|
4364
4363
|
onPrint: o.onPrint,
|
|
4365
4364
|
onSave: o.onSave
|
|
4366
4365
|
});
|
|
4367
|
-
return t(
|
|
4366
|
+
return t(tr), (t, n) => (V(), N("div", {
|
|
4368
4367
|
class: R([
|
|
4369
4368
|
"docx-editor-vue ep-root paged-editor",
|
|
4370
4369
|
e.className,
|
|
@@ -4376,11 +4375,11 @@ var Lo = (e) => {
|
|
|
4376
4375
|
]),
|
|
4377
4376
|
style: z(e.style)
|
|
4378
4377
|
}, [
|
|
4379
|
-
P("div",
|
|
4378
|
+
P("div", Bo, [F(Ni, {
|
|
4380
4379
|
"show-table-insert": o.showTableInsert !== !1,
|
|
4381
4380
|
onRename: n[0] ||= (e) => s("rename", e),
|
|
4382
|
-
onMenuAction:
|
|
4383
|
-
onInsertTable:
|
|
4381
|
+
onMenuAction: qn,
|
|
4382
|
+
onInsertTable: Yn
|
|
4384
4383
|
}, {
|
|
4385
4384
|
"title-bar-left": Ie(() => [Me(t.$slots, "title-bar-left", {}, void 0, !0)]),
|
|
4386
4385
|
"title-bar-right": Ie(() => [Me(t.$slots, "title-bar-right", {}, void 0, !0)]),
|
|
@@ -4388,7 +4387,7 @@ var Lo = (e) => {
|
|
|
4388
4387
|
}, 8, ["show-table-insert"]), e.showToolbar ? (V(), j(ie, De({
|
|
4389
4388
|
key: 0,
|
|
4390
4389
|
view: X.value,
|
|
4391
|
-
"get-commands": G(
|
|
4390
|
+
"get-commands": G(Dt),
|
|
4392
4391
|
"state-tick": T.value,
|
|
4393
4392
|
"zoom-percent": G(Oe),
|
|
4394
4393
|
"is-min-zoom": G(Ae),
|
|
@@ -4401,30 +4400,30 @@ var Lo = (e) => {
|
|
|
4401
4400
|
"display-mode": m.value,
|
|
4402
4401
|
"read-only": d.value,
|
|
4403
4402
|
"comments-sidebar-open": D.value,
|
|
4404
|
-
"image-context": G(
|
|
4403
|
+
"image-context": G(Nt),
|
|
4405
4404
|
theme: e.theme ?? null
|
|
4406
|
-
},
|
|
4405
|
+
}, wn.value, {
|
|
4407
4406
|
onFindReplace: n[2] ||= (e) => he.value = !0,
|
|
4408
4407
|
onInsertLink: n[3] ||= (e) => ge.value = !0,
|
|
4409
4408
|
onInsertSymbol: n[4] ||= (e) => E.value = !0,
|
|
4410
|
-
onInsertPageBreak:
|
|
4409
|
+
onInsertPageBreak: Pn,
|
|
4411
4410
|
onPageSetup: n[5] ||= (e) => ve.value = !0,
|
|
4412
|
-
onToggleOutline: G(
|
|
4413
|
-
onApplyStyle: G(
|
|
4411
|
+
onToggleOutline: G(cn).handleToggleOutline,
|
|
4412
|
+
onApplyStyle: G(On),
|
|
4414
4413
|
onZoomIn: G(Pe),
|
|
4415
4414
|
onZoomOut: G(ze),
|
|
4416
4415
|
onZoomSet: G(U),
|
|
4417
4416
|
onToggleSidebar: n[6] ||= (e) => D.value = !D.value,
|
|
4418
|
-
onModeChange:
|
|
4417
|
+
onModeChange: Kn,
|
|
4419
4418
|
onToggleTrackChanges: h,
|
|
4420
4419
|
"onUpdate:displayMode": _,
|
|
4421
4420
|
onImageProperties: n[7] ||= (e) => _e.value = !0,
|
|
4422
|
-
onImageWrapType: G(
|
|
4423
|
-
onImageTransform: G(
|
|
4421
|
+
onImageWrapType: G(Pt),
|
|
4422
|
+
onImageTransform: G(Ft)
|
|
4424
4423
|
}), Ce({
|
|
4425
4424
|
"table-context": Ie(() => [F(y, {
|
|
4426
4425
|
view: X.value,
|
|
4427
|
-
"get-commands": G(
|
|
4426
|
+
"get-commands": G(Dt),
|
|
4428
4427
|
"state-tick": T.value,
|
|
4429
4428
|
theme: e.theme ?? null,
|
|
4430
4429
|
onOpenTableProperties: n[1] ||= (e) => ye.value = !0
|
|
@@ -4467,7 +4466,7 @@ var Lo = (e) => {
|
|
|
4467
4466
|
"onImageWrapType",
|
|
4468
4467
|
"onImageTransform"
|
|
4469
4468
|
])) : M("", !0)]),
|
|
4470
|
-
F(
|
|
4469
|
+
F(Oi, {
|
|
4471
4470
|
"show-find-replace": he.value,
|
|
4472
4471
|
"onUpdate:showFindReplace": n[8] ||= (e) => he.value = e,
|
|
4473
4472
|
"show-hyperlink": ge.value,
|
|
@@ -4483,18 +4482,18 @@ var Lo = (e) => {
|
|
|
4483
4482
|
"show-watermark": be.value,
|
|
4484
4483
|
"onUpdate:showWatermark": n[14] ||= (e) => be.value = e,
|
|
4485
4484
|
view: X.value,
|
|
4486
|
-
"scroll-visible-position-into-view": G(
|
|
4485
|
+
"scroll-visible-position-into-view": G(Zt),
|
|
4487
4486
|
bookmarks: I.value,
|
|
4488
|
-
"current-watermark":
|
|
4487
|
+
"current-watermark": Sn.value,
|
|
4489
4488
|
"selected-image-pm-pos": G(Z)?.pmPos ?? null,
|
|
4490
|
-
"section-properties":
|
|
4491
|
-
"table-properties":
|
|
4492
|
-
onInsertSymbol: G(
|
|
4493
|
-
onHyperlinkSubmit: G(
|
|
4494
|
-
onHyperlinkRemove: G(
|
|
4495
|
-
onPageSetupApply: G(
|
|
4496
|
-
onTablePropertiesApply:
|
|
4497
|
-
onWatermarkApply:
|
|
4489
|
+
"section-properties": xn.value,
|
|
4490
|
+
"table-properties": Cn.value,
|
|
4491
|
+
onInsertSymbol: G(kn),
|
|
4492
|
+
onHyperlinkSubmit: G(Rt),
|
|
4493
|
+
onHyperlinkRemove: G(Vt),
|
|
4494
|
+
onPageSetupApply: G(In),
|
|
4495
|
+
onTablePropertiesApply: Xn,
|
|
4496
|
+
onWatermarkApply: Jn
|
|
4498
4497
|
}, null, 8, [
|
|
4499
4498
|
"show-find-replace",
|
|
4500
4499
|
"show-hyperlink",
|
|
@@ -4515,10 +4514,10 @@ var Lo = (e) => {
|
|
|
4515
4514
|
"onHyperlinkRemove",
|
|
4516
4515
|
"onPageSetupApply"
|
|
4517
4516
|
]),
|
|
4518
|
-
G(
|
|
4517
|
+
G(pt) ? (V(), N("div", Vo, W(G(pt)), 1)) : At.value ? (V(), N("div", Ho, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(te, {
|
|
4519
4518
|
key: 0,
|
|
4520
4519
|
node: e.loadingIndicator
|
|
4521
|
-
}, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(
|
|
4520
|
+
}, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(dt) && !re.value ? (V(), N("div", Uo, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(te, {
|
|
4522
4521
|
key: 0,
|
|
4523
4522
|
node: e.placeholder
|
|
4524
4523
|
}, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
|
|
@@ -4536,25 +4535,25 @@ var Lo = (e) => {
|
|
|
4536
4535
|
ref_key: "editorScrollRef",
|
|
4537
4536
|
ref: fe,
|
|
4538
4537
|
class: "docx-editor-vue__editor-scroll",
|
|
4539
|
-
onScroll:
|
|
4540
|
-
}, [P("div",
|
|
4541
|
-
me.value && !d.value ? (V(), N("div",
|
|
4542
|
-
"section-props":
|
|
4538
|
+
onScroll: $n
|
|
4539
|
+
}, [P("div", Wo, [
|
|
4540
|
+
me.value && !d.value ? (V(), N("div", Go, [F(ne, {
|
|
4541
|
+
"section-props": xn.value,
|
|
4543
4542
|
zoom: G(L),
|
|
4544
4543
|
unit: e.rulerUnit ?? "inch",
|
|
4545
4544
|
editable: !d.value,
|
|
4546
|
-
"indent-left":
|
|
4547
|
-
"indent-right":
|
|
4548
|
-
"first-line-indent":
|
|
4549
|
-
"hanging-indent":
|
|
4545
|
+
"indent-left": Gn.value.indentLeft,
|
|
4546
|
+
"indent-right": Gn.value.indentRight,
|
|
4547
|
+
"first-line-indent": Gn.value.firstLineIndent,
|
|
4548
|
+
"hanging-indent": Gn.value.hangingIndent,
|
|
4550
4549
|
"show-first-line-indent": !0,
|
|
4551
|
-
"tab-stops":
|
|
4552
|
-
onLeftMarginChange: G(
|
|
4553
|
-
onRightMarginChange: G(
|
|
4554
|
-
onIndentLeftChange: G(
|
|
4555
|
-
onIndentRightChange: G(
|
|
4556
|
-
onFirstLineIndentChange: G(
|
|
4557
|
-
onTabStopRemove: G(
|
|
4550
|
+
"tab-stops": Gn.value.tabs,
|
|
4551
|
+
onLeftMarginChange: G(Ln),
|
|
4552
|
+
onRightMarginChange: G(Rn),
|
|
4553
|
+
onIndentLeftChange: G(Vn),
|
|
4554
|
+
onIndentRightChange: G(Hn),
|
|
4555
|
+
onFirstLineIndentChange: G(Un),
|
|
4556
|
+
onTabStopRemove: G(Wn)
|
|
4558
4557
|
}, null, 8, [
|
|
4559
4558
|
"section-props",
|
|
4560
4559
|
"zoom",
|
|
@@ -4572,13 +4571,13 @@ var Lo = (e) => {
|
|
|
4572
4571
|
"onFirstLineIndentChange",
|
|
4573
4572
|
"onTabStopRemove"
|
|
4574
4573
|
])])) : M("", !0),
|
|
4575
|
-
me.value && !d.value ? (V(), N("div",
|
|
4576
|
-
"section-props":
|
|
4574
|
+
me.value && !d.value ? (V(), N("div", Ko, [F(v, {
|
|
4575
|
+
"section-props": xn.value,
|
|
4577
4576
|
zoom: G(L),
|
|
4578
4577
|
unit: e.rulerUnit ?? "inch",
|
|
4579
4578
|
editable: !d.value,
|
|
4580
|
-
onTopMarginChange: G(
|
|
4581
|
-
onBottomMarginChange: G(
|
|
4579
|
+
onTopMarginChange: G(zn),
|
|
4580
|
+
onBottomMarginChange: G(Bn)
|
|
4582
4581
|
}, null, 8, [
|
|
4583
4582
|
"section-props",
|
|
4584
4583
|
"zoom",
|
|
@@ -4592,24 +4591,24 @@ var Lo = (e) => {
|
|
|
4592
4591
|
ref: le,
|
|
4593
4592
|
class: "docx-editor-vue__pages-viewport",
|
|
4594
4593
|
onWheel: Ke,
|
|
4595
|
-
onMousedown: n[25] ||= (...e) => G(
|
|
4596
|
-
onMousemove: n[26] ||= (...e) => G(
|
|
4597
|
-
onClick: n[27] ||= (...e) => G(
|
|
4598
|
-
onDblclick: n[28] ||= (...e) => G(
|
|
4599
|
-
onContextmenu: n[29] ||= q((...e) => G(
|
|
4594
|
+
onMousedown: n[25] ||= (...e) => G(Qt) && G(Qt)(...e),
|
|
4595
|
+
onMousemove: n[26] ||= (...e) => G($t) && G($t)(...e),
|
|
4596
|
+
onClick: n[27] ||= (...e) => G(en) && G(en)(...e),
|
|
4597
|
+
onDblclick: n[28] ||= (...e) => G(tn) && G(tn)(...e),
|
|
4598
|
+
onContextmenu: n[29] ||= q((...e) => G(pn) && G(pn)(...e), ["prevent"])
|
|
4600
4599
|
}, [
|
|
4601
|
-
P("div",
|
|
4600
|
+
P("div", qo, [
|
|
4602
4601
|
P("div", {
|
|
4603
4602
|
ref_key: "pagesRef",
|
|
4604
4603
|
ref: w,
|
|
4605
|
-
class: R(["docx-editor-vue__pages paged-editor__pages", G(
|
|
4606
|
-
style: z(
|
|
4604
|
+
class: R(["docx-editor-vue__pages paged-editor__pages", G(qt) ? `paged-editor--hf-editing paged-editor--editing-${G(qt).position}` : ""]),
|
|
4605
|
+
style: z(Dn.value)
|
|
4607
4606
|
}, null, 6),
|
|
4608
|
-
F(
|
|
4609
|
-
"editor-view":
|
|
4607
|
+
F(ha, {
|
|
4608
|
+
"editor-view": on(),
|
|
4610
4609
|
"hidden-container": C.value,
|
|
4611
4610
|
"pages-container": w.value,
|
|
4612
|
-
selection:
|
|
4611
|
+
selection: sn.value,
|
|
4613
4612
|
zoom: G(L)
|
|
4614
4613
|
}, null, 8, [
|
|
4615
4614
|
"editor-view",
|
|
@@ -4618,15 +4617,15 @@ var Lo = (e) => {
|
|
|
4618
4617
|
"selection",
|
|
4619
4618
|
"zoom"
|
|
4620
4619
|
]),
|
|
4621
|
-
P("div",
|
|
4622
|
-
F(
|
|
4620
|
+
P("div", Jo, [
|
|
4621
|
+
F(li, {
|
|
4623
4622
|
"get-view": () => G(J),
|
|
4624
4623
|
"get-pages-container": () => w.value,
|
|
4625
|
-
"editor-state": G(
|
|
4624
|
+
"editor-state": G(at),
|
|
4626
4625
|
zoom: G(L),
|
|
4627
|
-
layout: G(
|
|
4628
|
-
blocks: G(
|
|
4629
|
-
measures: G(
|
|
4626
|
+
layout: G(mt),
|
|
4627
|
+
blocks: G(ht),
|
|
4628
|
+
measures: G(gt),
|
|
4630
4629
|
"on-term-click": o.onAnonymizationTermClick,
|
|
4631
4630
|
"selected-canonical": o.selectedAnonymizationCanonical,
|
|
4632
4631
|
"selection-seq": o.anonymizationSelectionSeq
|
|
@@ -4642,13 +4641,13 @@ var Lo = (e) => {
|
|
|
4642
4641
|
"selected-canonical",
|
|
4643
4642
|
"selection-seq"
|
|
4644
4643
|
]),
|
|
4645
|
-
F(
|
|
4644
|
+
F(di, {
|
|
4646
4645
|
range: pe.value,
|
|
4647
4646
|
"get-pages-container": () => w.value,
|
|
4648
4647
|
zoom: G(L),
|
|
4649
|
-
layout: G(
|
|
4650
|
-
blocks: G(
|
|
4651
|
-
measures: G(
|
|
4648
|
+
layout: G(mt),
|
|
4649
|
+
blocks: G(ht),
|
|
4650
|
+
measures: G(gt)
|
|
4652
4651
|
}, null, 8, [
|
|
4653
4652
|
"range",
|
|
4654
4653
|
"get-pages-container",
|
|
@@ -4657,15 +4656,15 @@ var Lo = (e) => {
|
|
|
4657
4656
|
"blocks",
|
|
4658
4657
|
"measures"
|
|
4659
4658
|
]),
|
|
4660
|
-
o.showTemplateDirectives ? (V(), j(
|
|
4659
|
+
o.showTemplateDirectives ? (V(), j(Oa, {
|
|
4661
4660
|
key: 0,
|
|
4662
4661
|
"get-view": () => G(J),
|
|
4663
4662
|
"get-pages-container": () => w.value,
|
|
4664
|
-
"editor-state": G(
|
|
4663
|
+
"editor-state": G(at),
|
|
4665
4664
|
zoom: G(L),
|
|
4666
|
-
layout: G(
|
|
4667
|
-
blocks: G(
|
|
4668
|
-
measures: G(
|
|
4665
|
+
layout: G(mt),
|
|
4666
|
+
blocks: G(ht),
|
|
4667
|
+
measures: G(gt)
|
|
4669
4668
|
}, null, 8, [
|
|
4670
4669
|
"get-view",
|
|
4671
4670
|
"get-pages-container",
|
|
@@ -4675,23 +4674,23 @@ var Lo = (e) => {
|
|
|
4675
4674
|
"blocks",
|
|
4676
4675
|
"measures"
|
|
4677
4676
|
])) : M("", !0),
|
|
4678
|
-
F(
|
|
4677
|
+
F(hi, {
|
|
4679
4678
|
"get-pages-container": () => w.value,
|
|
4680
|
-
"editor-state": G(
|
|
4679
|
+
"editor-state": G(at),
|
|
4681
4680
|
zoom: G(L),
|
|
4682
|
-
"sync-coordinator": G(
|
|
4681
|
+
"sync-coordinator": G(_t)
|
|
4683
4682
|
}, null, 8, [
|
|
4684
4683
|
"get-pages-container",
|
|
4685
4684
|
"editor-state",
|
|
4686
4685
|
"zoom",
|
|
4687
4686
|
"sync-coordinator"
|
|
4688
4687
|
]),
|
|
4689
|
-
F(
|
|
4688
|
+
F(Ci, {
|
|
4690
4689
|
"get-view": () => G(J),
|
|
4691
4690
|
"get-pages-container": () => w.value,
|
|
4692
4691
|
zoom: G(L),
|
|
4693
4692
|
"transaction-version": T.value,
|
|
4694
|
-
"sync-coordinator": G(
|
|
4693
|
+
"sync-coordinator": G(_t)
|
|
4695
4694
|
}, null, 8, [
|
|
4696
4695
|
"get-view",
|
|
4697
4696
|
"get-pages-container",
|
|
@@ -4701,12 +4700,12 @@ var Lo = (e) => {
|
|
|
4701
4700
|
])
|
|
4702
4701
|
])
|
|
4703
4702
|
]),
|
|
4704
|
-
G(
|
|
4703
|
+
G(qt) ? (V(), j(_a, {
|
|
4705
4704
|
key: 0,
|
|
4706
|
-
edit: G(
|
|
4707
|
-
"get-view":
|
|
4708
|
-
onClose: G(
|
|
4709
|
-
onRemove: G(
|
|
4705
|
+
edit: G(qt),
|
|
4706
|
+
"get-view": on,
|
|
4707
|
+
onClose: G(rn),
|
|
4708
|
+
onRemove: G(an)
|
|
4710
4709
|
}, null, 8, [
|
|
4711
4710
|
"edit",
|
|
4712
4711
|
"onClose",
|
|
@@ -4714,39 +4713,39 @@ var Lo = (e) => {
|
|
|
4714
4713
|
])) : M("", !0),
|
|
4715
4714
|
Le(P("aside", {
|
|
4716
4715
|
class: "docx-editor-vue__note-editor",
|
|
4717
|
-
"aria-label":
|
|
4718
|
-
onKeydown: n[16] ||= Re(q((...e) => G(
|
|
4719
|
-
}, [P("header",
|
|
4716
|
+
"aria-label": kt.value,
|
|
4717
|
+
onKeydown: n[16] ||= Re(q((...e) => G(Tt) && G(Tt)(...e), ["stop", "prevent"]), ["esc"])
|
|
4718
|
+
}, [P("header", Xo, [P("span", null, W(kt.value), 1), P("button", {
|
|
4720
4719
|
type: "button",
|
|
4721
4720
|
"aria-label": G(ee)("common.closeDialog"),
|
|
4722
|
-
onClick: n[15] ||= (...e) => G(
|
|
4723
|
-
}, " × ", 8,
|
|
4721
|
+
onClick: n[15] ||= (...e) => G(Tt) && G(Tt)(...e)
|
|
4722
|
+
}, " × ", 8, Zo)]), P("div", {
|
|
4724
4723
|
ref_key: "notePmRef",
|
|
4725
4724
|
ref: we,
|
|
4726
4725
|
class: "docx-editor-vue__note-editor-host"
|
|
4727
|
-
}, null, 512)], 40,
|
|
4728
|
-
F(
|
|
4726
|
+
}, null, 512)], 40, Yo), [[Fe, G(ut)]]),
|
|
4727
|
+
F(ma, {
|
|
4729
4728
|
"image-info": G(Z),
|
|
4730
4729
|
zoom: G(L),
|
|
4731
4730
|
view: X.value,
|
|
4732
4731
|
onDeselect: n[17] ||= (e) => Z.value = null,
|
|
4733
|
-
onInteractStart: n[18] ||= (e) =>
|
|
4734
|
-
onInteractEnd: n[19] ||= (e) =>
|
|
4735
|
-
onContextMenu: G(
|
|
4732
|
+
onInteractStart: n[18] ||= (e) => Mt.value = !0,
|
|
4733
|
+
onInteractEnd: n[19] ||= (e) => Mt.value = !1,
|
|
4734
|
+
onContextMenu: G(mn)
|
|
4736
4735
|
}, null, 8, [
|
|
4737
4736
|
"image-info",
|
|
4738
4737
|
"zoom",
|
|
4739
4738
|
"view",
|
|
4740
4739
|
"onContextMenu"
|
|
4741
4740
|
]),
|
|
4742
|
-
F(
|
|
4743
|
-
data: G(
|
|
4741
|
+
F(Ra, {
|
|
4742
|
+
data: G(Lt),
|
|
4744
4743
|
"read-only": d.value,
|
|
4745
|
-
onNavigate: G(
|
|
4746
|
-
onCopy:
|
|
4747
|
-
onEdit: G(
|
|
4748
|
-
onRemove: G(
|
|
4749
|
-
onClose: n[20] ||= (e) =>
|
|
4744
|
+
onNavigate: G(Ht),
|
|
4745
|
+
onCopy: bn,
|
|
4746
|
+
onEdit: G(Ut),
|
|
4747
|
+
onRemove: G(Wt),
|
|
4748
|
+
onClose: n[20] ||= (e) => Lt.value = null
|
|
4750
4749
|
}, null, 8, [
|
|
4751
4750
|
"data",
|
|
4752
4751
|
"read-only",
|
|
@@ -4754,24 +4753,24 @@ var Lo = (e) => {
|
|
|
4754
4753
|
"onEdit",
|
|
4755
4754
|
"onRemove"
|
|
4756
4755
|
]),
|
|
4757
|
-
G(
|
|
4756
|
+
G(Kt) ? (V(), N("button", {
|
|
4758
4757
|
key: 1,
|
|
4759
4758
|
type: "button",
|
|
4760
4759
|
class: "docx-editor-vue__table-insert-btn",
|
|
4761
4760
|
style: z({
|
|
4762
|
-
left: G(
|
|
4763
|
-
top: G(
|
|
4761
|
+
left: G(Kt).x + "px",
|
|
4762
|
+
top: G(Kt).y + "px"
|
|
4764
4763
|
}),
|
|
4765
|
-
"aria-label": G(
|
|
4766
|
-
onMousedown: n[21] ||= (...e) => G(
|
|
4767
|
-
}, " + ", 44,
|
|
4764
|
+
"aria-label": G(Kt).type === "row" ? "Insert row" : "Insert column",
|
|
4765
|
+
onMousedown: n[21] ||= (...e) => G(nn) && G(nn)(...e)
|
|
4766
|
+
}, " + ", 44, Qo)) : M("", !0),
|
|
4768
4767
|
F(g, {
|
|
4769
|
-
comments: G(
|
|
4768
|
+
comments: G(yn),
|
|
4770
4769
|
"pages-container": w.value,
|
|
4771
4770
|
zoom: G(L),
|
|
4772
|
-
"page-width-px":
|
|
4771
|
+
"page-width-px": Tn.value,
|
|
4773
4772
|
"sidebar-open": D.value,
|
|
4774
|
-
"resolved-comment-ids":
|
|
4773
|
+
"resolved-comment-ids": En.value,
|
|
4775
4774
|
onMarkerClick: () => {}
|
|
4776
4775
|
}, null, 8, [
|
|
4777
4776
|
"comments",
|
|
@@ -4783,13 +4782,13 @@ var Lo = (e) => {
|
|
|
4783
4782
|
]),
|
|
4784
4783
|
F(b, {
|
|
4785
4784
|
"is-open": D.value,
|
|
4786
|
-
comments: G(
|
|
4787
|
-
"tracked-changes":
|
|
4785
|
+
comments: G(yn),
|
|
4786
|
+
"tracked-changes": vn.value,
|
|
4788
4787
|
"show-resolved": !0,
|
|
4789
4788
|
"is-adding-comment": G($).isAddingComment.value,
|
|
4790
4789
|
"add-comment-y-position": G($).addCommentYPosition.value,
|
|
4791
4790
|
"pages-container": w.value,
|
|
4792
|
-
"page-width-px":
|
|
4791
|
+
"page-width-px": Tn.value,
|
|
4793
4792
|
zoom: G(L),
|
|
4794
4793
|
"active-item-id": k.value,
|
|
4795
4794
|
onClose: n[22] ||= (e) => D.value = !1,
|
|
@@ -4843,27 +4842,27 @@ var Lo = (e) => {
|
|
|
4843
4842
|
size: 18
|
|
4844
4843
|
})], 36)) : M("", !0)
|
|
4845
4844
|
], 544),
|
|
4846
|
-
xe.value ? M("", !0) : (V(), j(
|
|
4845
|
+
xe.value ? M("", !0) : (V(), j(ya, {
|
|
4847
4846
|
key: 2,
|
|
4848
4847
|
"left-offset": 12,
|
|
4849
|
-
onToggle: G(
|
|
4848
|
+
onToggle: G(cn).handleToggleOutline
|
|
4850
4849
|
}, null, 8, ["onToggle"])),
|
|
4851
|
-
G(
|
|
4850
|
+
G(Jt).totalPages > 1 ? (V(), j(ba, {
|
|
4852
4851
|
key: 3,
|
|
4853
|
-
"current-page": G(
|
|
4854
|
-
"total-pages": G(
|
|
4855
|
-
visible: G(
|
|
4852
|
+
"current-page": G(Jt).currentPage,
|
|
4853
|
+
"total-pages": G(Jt).totalPages,
|
|
4854
|
+
visible: G(Jt).visible
|
|
4856
4855
|
}, null, 8, [
|
|
4857
4856
|
"current-page",
|
|
4858
4857
|
"total-pages",
|
|
4859
4858
|
"visible"
|
|
4860
4859
|
])) : M("", !0),
|
|
4861
|
-
F(
|
|
4860
|
+
F(Di, {
|
|
4862
4861
|
"is-open": xe.value,
|
|
4863
4862
|
headings: Ee.value,
|
|
4864
4863
|
"get-scroll-container": () => w.value,
|
|
4865
4864
|
onClose: n[30] ||= (e) => xe.value = !1,
|
|
4866
|
-
onNavigate: G(
|
|
4865
|
+
onNavigate: G(cn).handleOutlineNavigate
|
|
4867
4866
|
}, null, 8, [
|
|
4868
4867
|
"is-open",
|
|
4869
4868
|
"headings",
|
|
@@ -4871,17 +4870,17 @@ var Lo = (e) => {
|
|
|
4871
4870
|
"onNavigate"
|
|
4872
4871
|
])
|
|
4873
4872
|
])], 544),
|
|
4874
|
-
F(
|
|
4873
|
+
F(ia, {
|
|
4875
4874
|
"read-only": d.value,
|
|
4876
|
-
"context-menu": G(
|
|
4877
|
-
"image-context-menu": G(
|
|
4878
|
-
"image-context-menu-text-actions": G(
|
|
4879
|
-
"custom-text-menu-items": G(
|
|
4875
|
+
"context-menu": G(ln),
|
|
4876
|
+
"image-context-menu": G(un),
|
|
4877
|
+
"image-context-menu-text-actions": G(dn),
|
|
4878
|
+
"custom-text-menu-items": G(fn),
|
|
4880
4879
|
"can-open-image-properties": G(Z) !== null,
|
|
4881
|
-
onContextMenuAction: G(
|
|
4882
|
-
onCloseContextMenu: n[31] ||= (e) => G(
|
|
4883
|
-
onImageWrapSelect: G(
|
|
4884
|
-
onCloseImageContextMenu: n[32] ||= (e) =>
|
|
4880
|
+
onContextMenuAction: G(gn),
|
|
4881
|
+
onCloseContextMenu: n[31] ||= (e) => G(ln).isOpen = !1,
|
|
4882
|
+
onImageWrapSelect: G(hn),
|
|
4883
|
+
onCloseImageContextMenu: n[32] ||= (e) => un.value = null,
|
|
4885
4884
|
onOpenImageProperties: n[33] ||= (e) => _e.value = !0
|
|
4886
4885
|
}, null, 8, [
|
|
4887
4886
|
"read-only",
|
|
@@ -4893,16 +4892,16 @@ var Lo = (e) => {
|
|
|
4893
4892
|
"onContextMenuAction",
|
|
4894
4893
|
"onImageWrapSelect"
|
|
4895
4894
|
]),
|
|
4896
|
-
F(
|
|
4895
|
+
F(Si, {
|
|
4897
4896
|
"event-root": d.value ? null : w.value,
|
|
4898
4897
|
view: G(J)
|
|
4899
4898
|
}, null, 8, ["event-root", "view"])
|
|
4900
4899
|
], 6));
|
|
4901
4900
|
}
|
|
4902
|
-
}), [["__scopeId", "data-v-
|
|
4901
|
+
}), [["__scopeId", "data-v-878a39af"]]);
|
|
4903
4902
|
//#endregion
|
|
4904
4903
|
//#region src/utils/listState.ts
|
|
4905
|
-
function
|
|
4904
|
+
function es() {
|
|
4906
4905
|
return {
|
|
4907
4906
|
type: "none",
|
|
4908
4907
|
level: 0,
|
|
@@ -4911,30 +4910,30 @@ function $o() {
|
|
|
4911
4910
|
}
|
|
4912
4911
|
//#endregion
|
|
4913
4912
|
//#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
|
|
4914
|
-
var
|
|
4913
|
+
var ts = ["aria-label"], ns = ["aria-label"], rs = [
|
|
4915
4914
|
"disabled",
|
|
4916
4915
|
"title",
|
|
4917
4916
|
"aria-label"
|
|
4918
|
-
],
|
|
4917
|
+
], is = [
|
|
4919
4918
|
"disabled",
|
|
4920
4919
|
"title",
|
|
4921
4920
|
"aria-label"
|
|
4922
|
-
],
|
|
4921
|
+
], as = ["aria-label"], os = [
|
|
4923
4922
|
"disabled",
|
|
4924
4923
|
"title",
|
|
4925
4924
|
"aria-label",
|
|
4926
4925
|
"aria-pressed"
|
|
4927
|
-
],
|
|
4926
|
+
], ss = [
|
|
4928
4927
|
"disabled",
|
|
4929
4928
|
"title",
|
|
4930
4929
|
"aria-label",
|
|
4931
4930
|
"aria-pressed"
|
|
4932
|
-
],
|
|
4931
|
+
], cs = [
|
|
4933
4932
|
"disabled",
|
|
4934
4933
|
"title",
|
|
4935
4934
|
"aria-label",
|
|
4936
4935
|
"aria-pressed"
|
|
4937
|
-
],
|
|
4936
|
+
], ls = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
4938
4937
|
__name: "FormattingBar",
|
|
4939
4938
|
props: {
|
|
4940
4939
|
currentFormatting: {},
|
|
@@ -4976,7 +4975,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
4976
4975
|
"redo"
|
|
4977
4976
|
],
|
|
4978
4977
|
setup(e, { emit: t }) {
|
|
4979
|
-
let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = A(() => a.currentFormatting ?? {}), l = A(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = A(() => c.value.listState ??
|
|
4978
|
+
let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = A(() => a.currentFormatting ?? {}), l = A(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = A(() => c.value.listState ?? es()), d = A(() => {
|
|
4980
4979
|
let e = c.value.color;
|
|
4981
4980
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
4982
4981
|
}), f = A(() => {
|
|
@@ -5009,7 +5008,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5009
5008
|
}, [F(i, {
|
|
5010
5009
|
name: "undo",
|
|
5011
5010
|
size: 18
|
|
5012
|
-
})], 40,
|
|
5011
|
+
})], 40, rs), P("button", {
|
|
5013
5012
|
type: "button",
|
|
5014
5013
|
class: "docx-formatting-bar__btn",
|
|
5015
5014
|
disabled: e.disabled || !e.canRedo,
|
|
@@ -5019,7 +5018,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5019
5018
|
}, [F(i, {
|
|
5020
5019
|
name: "redo",
|
|
5021
5020
|
size: 18
|
|
5022
|
-
})], 40,
|
|
5021
|
+
})], 40, is)], 8, ns),
|
|
5023
5022
|
r[13] ||= P("span", {
|
|
5024
5023
|
class: "docx-formatting-bar__divider",
|
|
5025
5024
|
role: "separator"
|
|
@@ -5050,7 +5049,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5050
5049
|
}, [F(i, {
|
|
5051
5050
|
name: "format_bold",
|
|
5052
5051
|
size: 18
|
|
5053
|
-
})], 42,
|
|
5052
|
+
})], 42, os),
|
|
5054
5053
|
P("button", {
|
|
5055
5054
|
type: "button",
|
|
5056
5055
|
class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
|
|
@@ -5062,7 +5061,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5062
5061
|
}, [F(i, {
|
|
5063
5062
|
name: "format_italic",
|
|
5064
5063
|
size: 18
|
|
5065
|
-
})], 42,
|
|
5064
|
+
})], 42, ss),
|
|
5066
5065
|
P("button", {
|
|
5067
5066
|
type: "button",
|
|
5068
5067
|
class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
|
|
@@ -5074,8 +5073,8 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5074
5073
|
}, [F(i, {
|
|
5075
5074
|
name: "format_underlined",
|
|
5076
5075
|
size: 18
|
|
5077
|
-
})], 42,
|
|
5078
|
-
], 8,
|
|
5076
|
+
})], 42, cs)
|
|
5077
|
+
], 8, as),
|
|
5079
5078
|
e.showTextColorPicker ? (V(), N(O, { key: 1 }, [r[12] ||= P("span", {
|
|
5080
5079
|
class: "docx-formatting-bar__divider",
|
|
5081
5080
|
role: "separator"
|
|
@@ -5117,9 +5116,9 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5117
5116
|
"disabled",
|
|
5118
5117
|
"can-outdent"
|
|
5119
5118
|
])) : M("", !0)
|
|
5120
|
-
], 10,
|
|
5119
|
+
], 10, ts));
|
|
5121
5120
|
}
|
|
5122
|
-
}), [["__scopeId", "data-v-fc03de2e"]]),
|
|
5121
|
+
}), [["__scopeId", "data-v-fc03de2e"]]), us = [
|
|
5123
5122
|
{
|
|
5124
5123
|
value: .5,
|
|
5125
5124
|
label: "50%"
|
|
@@ -5144,7 +5143,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5144
5143
|
value: 2,
|
|
5145
5144
|
label: "200%"
|
|
5146
5145
|
}
|
|
5147
|
-
],
|
|
5146
|
+
], ds = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
5148
5147
|
__name: "ZoomControl",
|
|
5149
5148
|
props: {
|
|
5150
5149
|
value: { default: 1 },
|
|
@@ -5161,7 +5160,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5161
5160
|
},
|
|
5162
5161
|
emits: ["change"],
|
|
5163
5162
|
setup(e, { emit: t }) {
|
|
5164
|
-
let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ??
|
|
5163
|
+
let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ?? us), o = A(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = A(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = A(() => o.value ? String(o.value.value) : String(r.value)), l = A(() => {
|
|
5165
5164
|
let e = a.value.map((e) => ({
|
|
5166
5165
|
value: String(e.value),
|
|
5167
5166
|
label: e.label
|
|
@@ -5189,7 +5188,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5189
5188
|
"disabled"
|
|
5190
5189
|
]));
|
|
5191
5190
|
}
|
|
5192
|
-
}), [["__scopeId", "data-v-8079e07f"]]),
|
|
5191
|
+
}), [["__scopeId", "data-v-8079e07f"]]), fs = (e, t, n = {}) => {
|
|
5193
5192
|
let { colorMode: r = C, locale: i = "en", ...a } = n;
|
|
5194
5193
|
return new Promise((n, o) => {
|
|
5195
5194
|
let s = H(null), c = null, l = !1, d = {
|
|
@@ -5215,7 +5214,7 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5215
5214
|
}
|
|
5216
5215
|
};
|
|
5217
5216
|
c = Se({ setup() {
|
|
5218
|
-
return () => Ee(
|
|
5217
|
+
return () => Ee($o, {
|
|
5219
5218
|
...a,
|
|
5220
5219
|
documentBuffer: e,
|
|
5221
5220
|
ref: s,
|
|
@@ -5230,4 +5229,4 @@ var es = ["aria-label"], ts = ["aria-label"], ns = [
|
|
|
5230
5229
|
});
|
|
5231
5230
|
};
|
|
5232
5231
|
//#endregion
|
|
5233
|
-
export {
|
|
5232
|
+
export { pi as AutocompleteCaretOverlay, Kr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Ur as DOCUMENT_PRESET_VERSION, Wr as DOCUMENT_STYLE_SET_VERSION, $o as DocxEditor, fe as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, ls as FormattingBar, me as HyperlinkDialog, T as ImagePositionDialog, he as ImagePropertiesDialog, ge as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Br as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, D as WatermarkDialog, ds as ZoomControl, yt as acceptAutocompleteSuggestion, bt as acceptAutocompleteWord, pt as anonymizationDecorationsKey, Y as appendAutocompleteToken, Pn as applyFolioAIEditOperations, qr as applySuggestions, xt as autocompleteSuggestionKey, St as autocompleteSuggestionPlugin, Xr as buildPositionalText, Ct as clearAutocompleteSuggestion, Cn as clearTemplateSlashMenu, le as colorModePlugin, wn as consumeTemplateSlashQuery, ni as createAICitationDecorationsPlugin, Gr as createDocx, Fr as createEmptyDocument, Rn as createFolioAIEditSnapshot, Vr as createStellaStyleDocumentPreset, Hr as createStellaStyleSet, C as defaultColorMode, e as defaultLocale, ar as deriveBlockId, Bn as diffWordSegments, Ir as extractDocumentStyleSet, Lr as extractDocumentStyleSetFromDocx, wt as finishAutocompleteSuggestion, ai as fromMarkdown, mt as getAnonymizationMatches, Tt as getAutocompleteSuggestion, at as getDocumentWatermark, ei as getFolioCaretViewportRect, or as getFolioParaIdFromBlockId, ti 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, Rr as inspectDocumentStyles, zr as inspectDocumentStylesFromDocx, cr as isFolioBlockId, lr as isSequentialFolioBlockId, Jr as isSuggestionStale, Gn as normalizeFolioAIBlockText, w as provideColorMode, n as provideLocale, fs as renderAsync, En as resetTemplateSlashQuery, Yr as resolveSuggestionAnchor, nn as scanDirectives, $r as scrollFolioPositionIntoView, ri as setAICitationsMeta, Zr as setAISuggestionsMeta, ii as setActiveCitationMeta, gt as setAnonymizationTermsMeta, st as setDocumentWatermark, Qr as setFocusedSuggestionMeta, Sn as setTemplatePreviewValues, Dt as shouldTriggerAutocomplete, Ot as startAutocompleteSuggestion, Dn as templateSlashMenuKey, oi as toMarkdown, si as toMarkdownResult, de as useColorMode, r as useTranslation, ue as useWheelZoom };
|