ooxml-ui 1.49.1 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/chart/format-pane-analysis.d.ts +0 -1
- package/dist/chart/format-pane-axis.d.ts +0 -1
- package/dist/chart/format-pane-fill-kinds.d.ts +0 -1
- package/dist/chart/format-pane-fill-line.d.ts +0 -1
- package/dist/chart/format-pane-locales/index.d.ts +0 -1
- package/dist/chart/format-pane-model.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +0 -1
- package/dist/chart/format-pane-text.d.ts +0 -1
- package/dist/chart/format-pane-types.d.ts +0 -1
- package/dist/chart/format-pane-view.d.ts +0 -1
- package/dist/{chunk-3WJUMM5D.js → chunk-63ELC26U.js} +1 -1
- package/dist/docx/building-blocks-read-aloud.d.ts +24 -0
- package/dist/docx/building-blocks.d.ts +5 -0
- package/dist/docx/editor-core.d.ts +3 -0
- package/dist/docx/element-api.d.ts +7 -0
- package/dist/docx/index.d.ts +2 -0
- package/dist/docx/read-aloud-session.d.ts +39 -0
- package/dist/docx/read-aloud.d.ts +14 -1
- package/dist/docx/view-options.d.ts +3 -0
- package/dist/docx.js +272 -154
- package/dist/embedding/region-host.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/picture-effects.d.ts +0 -1
- package/dist/pptx/{chunk-WBGU7BWD.cjs → chunk-2JR2CHTG.cjs} +31 -1
- package/dist/pptx/{chunk-UFJBHFSD.cjs → chunk-3JGYWDMR.cjs} +5 -0
- package/dist/pptx/{chunk-ZFZNX62I.mjs → chunk-EU7TGRWX.mjs} +1 -1
- package/dist/pptx/{chunk-PJQNDNOH.cjs → chunk-OIEN54CC.cjs} +2800 -615
- package/dist/pptx/{chunk-PTIGQSTY.mjs → chunk-QYBBLVGY.mjs} +31 -1
- package/dist/pptx/{chunk-URAPHGDB.cjs → chunk-U6YDJVNS.cjs} +42 -42
- package/dist/pptx/{chunk-2P6TH4ZE.mjs → chunk-VOBKKF45.mjs} +5 -0
- package/dist/pptx/{chunk-ZZJ7KTSD.mjs → chunk-VR6UAL2A.mjs} +2689 -615
- package/dist/pptx/dom/elements/text-run-content.d.ts.map +1 -1
- package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +404 -376
- package/dist/pptx/dom/index.mjs +37 -9
- package/dist/pptx/dom/slide-stage.d.ts +14 -1
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/dom/types.d.ts +3 -1
- package/dist/pptx/dom/types.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3519 -3075
- package/dist/pptx/index.mjs +3 -3
- package/dist/pptx/render/building-block-actions.d.ts +106 -0
- package/dist/pptx/render/building-block-actions.d.ts.map +1 -0
- package/dist/pptx/render/building-block-custom-shows.d.ts +74 -0
- package/dist/pptx/render/building-block-custom-shows.d.ts.map +1 -0
- package/dist/pptx/render/building-block-document-properties.d.ts +78 -0
- package/dist/pptx/render/building-block-document-properties.d.ts.map +1 -0
- package/dist/pptx/render/building-block-font-embedding.d.ts +42 -0
- package/dist/pptx/render/building-block-font-embedding.d.ts.map +1 -0
- package/dist/pptx/render/building-block-password.d.ts +71 -0
- package/dist/pptx/render/building-block-password.d.ts.map +1 -0
- package/dist/pptx/render/building-block-show-dialogs.d.ts +61 -0
- package/dist/pptx/render/building-block-show-dialogs.d.ts.map +1 -0
- package/dist/pptx/render/building-block-show-settings.d.ts +61 -0
- package/dist/pptx/render/building-block-show-settings.d.ts.map +1 -0
- package/dist/pptx/render/building-block-signatures.d.ts +68 -0
- package/dist/pptx/render/building-block-signatures.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/action-groups.d.ts +61 -0
- package/dist/pptx/render/building-blocks/action-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/actions-types.d.ts +110 -0
- package/dist/pptx/render/building-blocks/actions-types.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/find-bar-controller.d.ts +18 -0
- package/dist/pptx/render/building-blocks/find-bar-controller.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/find-layout.d.ts +50 -0
- package/dist/pptx/render/building-blocks/find-layout.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts +45 -0
- package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/index.d.ts +25 -0
- package/dist/pptx/render/building-blocks/groups/index.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts +79 -0
- package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts +57 -0
- package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/index.d.ts +20 -0
- package/dist/pptx/render/building-blocks/index.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/live-options.d.ts +49 -0
- package/dist/pptx/render/building-blocks/live-options.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/media-element-from-file.d.ts +23 -0
- package/dist/pptx/render/building-blocks/media-element-from-file.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/mode.d.ts +11 -0
- package/dist/pptx/render/building-blocks/mode.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/requests.d.ts +96 -0
- package/dist/pptx/render/building-blocks/requests.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/session.d.ts +84 -0
- package/dist/pptx/render/building-blocks/session.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/shell.d.ts +36 -0
- package/dist/pptx/render/building-blocks/shell.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/toolbar.d.ts +56 -0
- package/dist/pptx/render/building-blocks/toolbar.d.ts.map +1 -0
- package/dist/pptx/render/controller/index.d.ts +4 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/controller/ribbon-display-controller.d.ts +80 -0
- package/dist/pptx/render/controller/ribbon-display-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/save-revision.d.ts +83 -0
- package/dist/pptx/render/controller/save-revision.d.ts.map +1 -0
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts +1 -1
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts.map +1 -1
- package/dist/pptx/render/element-render-error.d.ts +85 -0
- package/dist/pptx/render/element-render-error.d.ts.map +1 -0
- package/dist/pptx/render/find-text-highlight.d.ts +52 -0
- package/dist/pptx/render/find-text-highlight.d.ts.map +1 -0
- package/dist/pptx/render/font-catalog.cjs +3 -3
- package/dist/pptx/render/font-catalog.d.ts +27 -3
- package/dist/pptx/render/font-catalog.d.ts.map +1 -1
- package/dist/pptx/render/font-catalog.mjs +1 -1
- package/dist/pptx/render/index.d.ts +14 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/insert-chart.d.ts +12 -0
- package/dist/pptx/render/insert-chart.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-types.d.ts +6 -0
- package/dist/pptx/render/paragraph-types.d.ts.map +1 -1
- package/dist/pptx/render/read-only-recommendation.d.ts +2 -0
- package/dist/pptx/render/read-only-recommendation.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-display.d.ts +50 -0
- package/dist/pptx/render/ribbon-display.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-home-state-extras.d.ts.map +1 -1
- package/dist/pptx/render/stage-element-ids.d.ts +9 -0
- package/dist/pptx/render/stage-element-ids.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/render/viewer-zoom-store.d.ts.map +1 -1
- package/dist/pptx/render/viewport-navigation.d.ts +93 -0
- package/dist/pptx/render/viewport-navigation.d.ts.map +1 -0
- package/dist/pptx/render/zoom-step.d.ts +9 -2
- package/dist/pptx/render/zoom-step.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-WYVZOCHF.cjs → smartart-insert-preview-4DGDUPAL.cjs} +5 -5
- package/dist/pptx/{smartart-insert-preview-WXVMLDH4.mjs → smartart-insert-preview-QZWYQJRA.mjs} +4 -4
- package/dist/pptx/types.d.ts +20 -0
- package/dist/pptx/types.d.ts.map +1 -1
- package/dist/render-cache.d.ts +0 -1
- package/dist/teams.js +1 -1
- package/dist/visio/controller.d.ts +11 -0
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/text-edit-outcome.d.ts +41 -0
- package/dist/visio/viewer-inline-text.d.ts +7 -0
- package/dist/visio.js +133 -10
- package/dist/xlsx/building-blocks.d.ts +24 -0
- package/dist/xlsx/commands/test-support.d.ts +1 -0
- package/dist/xlsx/component.d.ts +7 -0
- package/dist/xlsx/context-menu/host-api.d.ts +55 -0
- package/dist/xlsx/context-menu/menu.d.ts +9 -0
- package/dist/xlsx/dialogs/find-replace.d.ts +2 -4
- package/dist/xlsx/editor-core.d.ts +2 -0
- package/dist/xlsx/host-find.d.ts +3 -0
- package/dist/xlsx/host-function.d.ts +3 -0
- package/dist/xlsx/host-open.d.ts +10 -0
- package/dist/xlsx/host-workflows.d.ts +9 -0
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/surface-actions.d.ts +20 -4
- package/dist/xlsx/surface-workflows.d.ts +132 -0
- package/dist/xlsx.js +539 -201
- package/package.json +2 -2
- /package/dist/{chunk-XWGWPYG5.js → chunk-BY7X2LNM.js} +0 -0
|
@@ -7,7 +7,7 @@ var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
|
|
|
7
7
|
var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
|
|
8
8
|
var chunkXFQ2RD4I_cjs = require('./chunk-XFQ2RD4I.cjs');
|
|
9
9
|
var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunk2JR2CHTG_cjs = require('./chunk-2JR2CHTG.cjs');
|
|
11
11
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
12
12
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
13
13
|
var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
|
|
@@ -24,7 +24,7 @@ var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
|
24
24
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
25
25
|
var chunkXZSGVMRN_cjs = require('./chunk-XZSGVMRN.cjs');
|
|
26
26
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunk3JGYWDMR_cjs = require('./chunk-3JGYWDMR.cjs');
|
|
28
28
|
var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
|
|
29
29
|
var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
|
|
30
30
|
var pptx = require('ooxml-core/pptx');
|
|
@@ -5099,8 +5099,8 @@ function createGlyphOutlineLookup(cache3) {
|
|
|
5099
5099
|
|
|
5100
5100
|
// src/pptx/render/text-warp-outline-font-cache.ts
|
|
5101
5101
|
function toArrayBuffer(bytes) {
|
|
5102
|
-
const
|
|
5103
|
-
return
|
|
5102
|
+
const copy2 = bytes.slice();
|
|
5103
|
+
return copy2.buffer;
|
|
5104
5104
|
}
|
|
5105
5105
|
function primaryFontFamily(family2) {
|
|
5106
5106
|
const first = family2.split(",")[0] ?? family2;
|
|
@@ -24904,6 +24904,119 @@ function newEquationElement(x = DEFAULT_X, y = EQUATION_DEFAULT_Y) {
|
|
|
24904
24904
|
]
|
|
24905
24905
|
};
|
|
24906
24906
|
}
|
|
24907
|
+
|
|
24908
|
+
// src/pptx/render/ribbon-display.ts
|
|
24909
|
+
var RIBBON_DISPLAY_MODES = ["fullScreen", "tabs", "always"];
|
|
24910
|
+
var DEFAULT_RIBBON_DISPLAY_MODE = "always";
|
|
24911
|
+
var LABEL_KEYS = {
|
|
24912
|
+
fullScreen: "pptx.ribbon.display.fullScreen",
|
|
24913
|
+
tabs: "pptx.ribbon.display.tabs",
|
|
24914
|
+
always: "pptx.ribbon.display.always"
|
|
24915
|
+
};
|
|
24916
|
+
var RIBBON_DISPLAY_OPTIONS_LABEL_KEY = "pptx.ribbon.displayOptions";
|
|
24917
|
+
var RIBBON_DISPLAY_REVEAL_LABEL_KEY = "pptx.ribbon.showRibbon";
|
|
24918
|
+
function normalizeRibbonDisplayMode(value) {
|
|
24919
|
+
return RIBBON_DISPLAY_MODES.includes(value) ? value : DEFAULT_RIBBON_DISPLAY_MODE;
|
|
24920
|
+
}
|
|
24921
|
+
function ribbonDisplayMenu(current) {
|
|
24922
|
+
return RIBBON_DISPLAY_MODES.map((mode) => ({
|
|
24923
|
+
mode,
|
|
24924
|
+
labelKey: LABEL_KEYS[mode],
|
|
24925
|
+
checked: mode === current
|
|
24926
|
+
}));
|
|
24927
|
+
}
|
|
24928
|
+
function toggleRibbonCollapsed(mode) {
|
|
24929
|
+
return mode === "always" ? "tabs" : "always";
|
|
24930
|
+
}
|
|
24931
|
+
function ribbonDisplayLayout(mode, peek) {
|
|
24932
|
+
if (mode === "always") return { titleBar: true, tabs: true, commands: "docked", reveal: false };
|
|
24933
|
+
if (mode === "tabs")
|
|
24934
|
+
return { titleBar: true, tabs: true, commands: peek ? "overlay" : "hidden", reveal: false };
|
|
24935
|
+
return { titleBar: false, tabs: peek, commands: peek ? "overlay" : "hidden", reveal: !peek };
|
|
24936
|
+
}
|
|
24937
|
+
|
|
24938
|
+
// src/pptx/render/controller/ribbon-display-controller.ts
|
|
24939
|
+
var RIBBON_AUTO_COLLAPSE_MEDIA = "(max-height: 500px)";
|
|
24940
|
+
function derive(inputs) {
|
|
24941
|
+
const automatic = inputs.mode === "always" && inputs.autoCollapse && inputs.shortViewport && !inputs.chosen;
|
|
24942
|
+
const effectiveMode = automatic ? "tabs" : inputs.mode;
|
|
24943
|
+
const peek = effectiveMode === "always" ? false : inputs.peek;
|
|
24944
|
+
return {
|
|
24945
|
+
mode: inputs.mode,
|
|
24946
|
+
effectiveMode,
|
|
24947
|
+
peek,
|
|
24948
|
+
menuOpen: inputs.menuOpen,
|
|
24949
|
+
layout: ribbonDisplayLayout(effectiveMode, peek),
|
|
24950
|
+
menu: ribbonDisplayMenu(effectiveMode)
|
|
24951
|
+
};
|
|
24952
|
+
}
|
|
24953
|
+
function createRibbonDisplayController(options = {}) {
|
|
24954
|
+
let inputs = {
|
|
24955
|
+
mode: normalizeRibbonDisplayMode(options.initial),
|
|
24956
|
+
peek: false,
|
|
24957
|
+
menuOpen: false,
|
|
24958
|
+
autoCollapse: false,
|
|
24959
|
+
shortViewport: false,
|
|
24960
|
+
chosen: false
|
|
24961
|
+
};
|
|
24962
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore(derive(inputs));
|
|
24963
|
+
const commit = (patch) => {
|
|
24964
|
+
const next2 = { ...inputs, ...patch };
|
|
24965
|
+
if (Object.keys(next2).every((key) => next2[key] === inputs[key])) {
|
|
24966
|
+
return;
|
|
24967
|
+
}
|
|
24968
|
+
inputs = next2;
|
|
24969
|
+
store.set(derive(inputs));
|
|
24970
|
+
};
|
|
24971
|
+
const choose = (mode) => {
|
|
24972
|
+
const changed = mode !== store.getSnapshot().effectiveMode;
|
|
24973
|
+
commit({ mode, chosen: true, peek: false, menuOpen: false });
|
|
24974
|
+
if (changed) {
|
|
24975
|
+
options.onChange?.(mode);
|
|
24976
|
+
}
|
|
24977
|
+
};
|
|
24978
|
+
const dismiss = () => commit({ peek: false, menuOpen: false });
|
|
24979
|
+
return {
|
|
24980
|
+
getSnapshot: store.getSnapshot,
|
|
24981
|
+
subscribe: store.subscribe,
|
|
24982
|
+
setMode: (mode) => commit({ mode: normalizeRibbonDisplayMode(mode), peek: false, menuOpen: false }),
|
|
24983
|
+
choose,
|
|
24984
|
+
toggleCollapsed: () => choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode)),
|
|
24985
|
+
tabChosen(tab) {
|
|
24986
|
+
if (tab !== "file" && store.getSnapshot().effectiveMode === "tabs") {
|
|
24987
|
+
commit({ peek: true });
|
|
24988
|
+
}
|
|
24989
|
+
},
|
|
24990
|
+
reveal() {
|
|
24991
|
+
if (store.getSnapshot().effectiveMode === "fullScreen") {
|
|
24992
|
+
commit({ peek: true });
|
|
24993
|
+
}
|
|
24994
|
+
},
|
|
24995
|
+
dismiss,
|
|
24996
|
+
setMenuOpen: (open) => commit({ menuOpen: open }),
|
|
24997
|
+
toggleMenu: () => commit({ menuOpen: !inputs.menuOpen }),
|
|
24998
|
+
// Changing the setting is a fresh instruction: it applies again even after the user
|
|
24999
|
+
// picked a mode by hand.
|
|
25000
|
+
setAutoCollapse: (enabled) => commit({
|
|
25001
|
+
autoCollapse: enabled,
|
|
25002
|
+
chosen: enabled === inputs.autoCollapse ? inputs.chosen : false
|
|
25003
|
+
}),
|
|
25004
|
+
setShortViewport: (short) => commit({ shortViewport: short }),
|
|
25005
|
+
handleKeydown(event) {
|
|
25006
|
+
if (event.key === "F1" && event.ctrlKey) {
|
|
25007
|
+
event.preventDefault();
|
|
25008
|
+
choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode));
|
|
25009
|
+
return true;
|
|
25010
|
+
}
|
|
25011
|
+
const { peek, menuOpen } = store.getSnapshot();
|
|
25012
|
+
if (event.key === "Escape" && (peek || menuOpen)) {
|
|
25013
|
+
dismiss();
|
|
25014
|
+
return true;
|
|
25015
|
+
}
|
|
25016
|
+
return false;
|
|
25017
|
+
}
|
|
25018
|
+
};
|
|
25019
|
+
}
|
|
24907
25020
|
function clampDepth(depth) {
|
|
24908
25021
|
const value = depth ?? editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
|
|
24909
25022
|
return Number.isFinite(value) ? Math.max(1, Math.floor(value)) : editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
|
|
@@ -27127,6 +27240,49 @@ function withSaveProgress(storage, controller) {
|
|
|
27127
27240
|
}
|
|
27128
27241
|
});
|
|
27129
27242
|
}
|
|
27243
|
+
|
|
27244
|
+
// src/pptx/render/controller/save-revision.ts
|
|
27245
|
+
function createSaveRevisionController(deps) {
|
|
27246
|
+
let revision = 0;
|
|
27247
|
+
let mark;
|
|
27248
|
+
let savedRevision = 0;
|
|
27249
|
+
const observe = () => {
|
|
27250
|
+
const sources = deps.getSources();
|
|
27251
|
+
if (sources.length === 0 || autosaveSourcesChanged(mark, sources)) {
|
|
27252
|
+
revision += 1;
|
|
27253
|
+
mark = autosaveSnapshotMark("", sources);
|
|
27254
|
+
}
|
|
27255
|
+
return revision;
|
|
27256
|
+
};
|
|
27257
|
+
return {
|
|
27258
|
+
getRevision: observe,
|
|
27259
|
+
getSavedRevision: () => savedRevision,
|
|
27260
|
+
async snapshot() {
|
|
27261
|
+
const at = observe();
|
|
27262
|
+
const content = await deps.serialize();
|
|
27263
|
+
return { revision: at, content };
|
|
27264
|
+
},
|
|
27265
|
+
acknowledge(acknowledged) {
|
|
27266
|
+
const current = observe();
|
|
27267
|
+
if (!Number.isInteger(acknowledged) || acknowledged < 1 || acknowledged > current) {
|
|
27268
|
+
return { status: "unknown", revision: acknowledged };
|
|
27269
|
+
}
|
|
27270
|
+
if (acknowledged < savedRevision) {
|
|
27271
|
+
return { status: "stale", revision: acknowledged, savedRevision };
|
|
27272
|
+
}
|
|
27273
|
+
const repeated = acknowledged === savedRevision;
|
|
27274
|
+
savedRevision = acknowledged;
|
|
27275
|
+
if (acknowledged !== current) {
|
|
27276
|
+
return { status: "pending", revision: acknowledged, currentRevision: current };
|
|
27277
|
+
}
|
|
27278
|
+
deps.markClean();
|
|
27279
|
+
if (!repeated) {
|
|
27280
|
+
deps.discardRecovery();
|
|
27281
|
+
}
|
|
27282
|
+
return { status: "clean", revision: acknowledged };
|
|
27283
|
+
}
|
|
27284
|
+
};
|
|
27285
|
+
}
|
|
27130
27286
|
var TEMPLATE_REF_WIDTH_EMU = 12192e3;
|
|
27131
27287
|
var TEMPLATE_REF_HEIGHT_EMU = 6858e3;
|
|
27132
27288
|
var DEFAULT_SLIDE_WIDTH_PX = 1280;
|
|
@@ -27168,7 +27324,7 @@ function createTemplateContext(options = {}) {
|
|
|
27168
27324
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
27169
27325
|
let counter = 0;
|
|
27170
27326
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
27171
|
-
const dictionary =
|
|
27327
|
+
const dictionary = chunk3JGYWDMR_cjs.translationsEn;
|
|
27172
27328
|
const translate2 = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
27173
27329
|
return {
|
|
27174
27330
|
scheme,
|
|
@@ -37278,10 +37434,10 @@ function buildMorphTextBodyPlan(pairs, context3, durationMs, measure2) {
|
|
|
37278
37434
|
plan.parts.set(outgoingId, part2);
|
|
37279
37435
|
plan.parts.set(incomingId, part2);
|
|
37280
37436
|
const body = part2 === "body";
|
|
37281
|
-
const
|
|
37437
|
+
const copy2 = body ? morphBodyCopy : morphTextCopy;
|
|
37282
37438
|
plan.groups.push({
|
|
37283
|
-
outgoing:
|
|
37284
|
-
incoming:
|
|
37439
|
+
outgoing: copy2(body ? from : upright.from, outgoingId),
|
|
37440
|
+
incoming: copy2(body ? to : upright.to, incomingId)
|
|
37285
37441
|
});
|
|
37286
37442
|
}
|
|
37287
37443
|
}
|
|
@@ -48027,18 +48183,18 @@ function recordLiveColorLeaves(leaves, value, patch) {
|
|
|
48027
48183
|
}
|
|
48028
48184
|
function writeLeaf(container, path, leaf) {
|
|
48029
48185
|
const [head, ...rest] = path;
|
|
48030
|
-
const
|
|
48031
|
-
const record =
|
|
48186
|
+
const copy2 = Array.isArray(container) ? [...container] : { ...isContainer(container) ? container : {} };
|
|
48187
|
+
const record = copy2;
|
|
48032
48188
|
if (rest.length > 0) {
|
|
48033
48189
|
record[head] = writeLeaf(record[head], rest, leaf);
|
|
48034
48190
|
} else if (leaf.present) {
|
|
48035
48191
|
record[head] = leaf.value;
|
|
48036
|
-
} else if (Array.isArray(
|
|
48192
|
+
} else if (Array.isArray(copy2)) {
|
|
48037
48193
|
record[head] = void 0;
|
|
48038
48194
|
} else {
|
|
48039
48195
|
delete record[head];
|
|
48040
48196
|
}
|
|
48041
|
-
return
|
|
48197
|
+
return copy2;
|
|
48042
48198
|
}
|
|
48043
48199
|
function isEmptyContainer(value) {
|
|
48044
48200
|
return isContainer(value) && Object.keys(value).length === 0;
|
|
@@ -49098,9 +49254,9 @@ var mintObjectUrl = (bytes, mime) => {
|
|
|
49098
49254
|
if (!hasObjectUrlSupport()) {
|
|
49099
49255
|
return null;
|
|
49100
49256
|
}
|
|
49101
|
-
const
|
|
49102
|
-
|
|
49103
|
-
return URL.createObjectURL(new Blob([
|
|
49257
|
+
const copy2 = new Uint8Array(bytes.length);
|
|
49258
|
+
copy2.set(bytes);
|
|
49259
|
+
return URL.createObjectURL(new Blob([copy2], { type: mime }));
|
|
49104
49260
|
};
|
|
49105
49261
|
function createEmbeddedFontsSheet(doc, styleId) {
|
|
49106
49262
|
let liveUrls = [];
|
|
@@ -50528,7 +50684,7 @@ function createViewerCommandStore(initial, reduce) {
|
|
|
50528
50684
|
|
|
50529
50685
|
// src/pptx/render/zoom-step.ts
|
|
50530
50686
|
var ZOOM_STEP = 0.1;
|
|
50531
|
-
var MIN_ZOOM_SCALE = 0.
|
|
50687
|
+
var MIN_ZOOM_SCALE = 0.1;
|
|
50532
50688
|
var MAX_ZOOM_SCALE = 5;
|
|
50533
50689
|
function roundZoom(scale3) {
|
|
50534
50690
|
return Math.round(scale3 * 100) / 100;
|
|
@@ -50560,8 +50716,14 @@ var DEFAULT_VIEWER_ZOOM_STATE = {
|
|
|
50560
50716
|
fitScale: 1,
|
|
50561
50717
|
manual: false
|
|
50562
50718
|
};
|
|
50719
|
+
function atFit(state) {
|
|
50720
|
+
return state.zoom === 1 && !state.manual ? state : { ...state, zoom: 1, manual: false };
|
|
50721
|
+
}
|
|
50563
50722
|
function withZoom(state, zoom) {
|
|
50564
50723
|
const clamped = clampZoomScale(zoom);
|
|
50724
|
+
if (clamped === 1) {
|
|
50725
|
+
return atFit(state);
|
|
50726
|
+
}
|
|
50565
50727
|
if (clamped === state.zoom && state.manual) {
|
|
50566
50728
|
return state;
|
|
50567
50729
|
}
|
|
@@ -50576,7 +50738,7 @@ function reduceViewerZoom(state, command2) {
|
|
|
50576
50738
|
case "set-zoom":
|
|
50577
50739
|
return withZoom(state, command2.zoom);
|
|
50578
50740
|
case "zoom-to-fit":
|
|
50579
|
-
return state
|
|
50741
|
+
return atFit(state);
|
|
50580
50742
|
case "set-fit-scale": {
|
|
50581
50743
|
const fitScale = Number.isFinite(command2.fitScale) && command2.fitScale > 0 ? command2.fitScale : 1;
|
|
50582
50744
|
return fitScale === state.fitScale ? state : { ...state, fitScale };
|
|
@@ -50598,6 +50760,344 @@ function viewerZoomPercent(zoom) {
|
|
|
50598
50760
|
return Math.round(zoom * 100);
|
|
50599
50761
|
}
|
|
50600
50762
|
|
|
50763
|
+
// src/pptx/render/viewport-navigation.ts
|
|
50764
|
+
var VIEWPORT_STAGE_SELECTOR = '[aria-roledescription="slide"]';
|
|
50765
|
+
var DRAG_PAN_THRESHOLD_PX = 4;
|
|
50766
|
+
var MAX_LAYOUT_FRAMES = 6;
|
|
50767
|
+
var ANCHOR_REUSE_MS = 400;
|
|
50768
|
+
var ANCHOR_REUSE_DISTANCE_PX = 2;
|
|
50769
|
+
function zoomAnchorAt(stage, clientX, clientY) {
|
|
50770
|
+
if (!(stage.width > 0) || !(stage.height > 0)) {
|
|
50771
|
+
return null;
|
|
50772
|
+
}
|
|
50773
|
+
return {
|
|
50774
|
+
fx: (clientX - stage.left) / stage.width,
|
|
50775
|
+
fy: (clientY - stage.top) / stage.height,
|
|
50776
|
+
clientX,
|
|
50777
|
+
clientY
|
|
50778
|
+
};
|
|
50779
|
+
}
|
|
50780
|
+
function anchoredScrollPosition(scroll, stage, anchor) {
|
|
50781
|
+
return {
|
|
50782
|
+
left: scroll.left + stage.left + anchor.fx * stage.width - anchor.clientX,
|
|
50783
|
+
top: scroll.top + stage.top + anchor.fy * stage.height - anchor.clientY
|
|
50784
|
+
};
|
|
50785
|
+
}
|
|
50786
|
+
function viewportCanPan(viewport) {
|
|
50787
|
+
return viewport.scrollWidth > viewport.clientWidth || viewport.scrollHeight > viewport.clientHeight;
|
|
50788
|
+
}
|
|
50789
|
+
function resetViewportScroll(viewport) {
|
|
50790
|
+
viewport.scrollLeft = 0;
|
|
50791
|
+
viewport.scrollTop = 0;
|
|
50792
|
+
}
|
|
50793
|
+
var SPACE_OWNER_SELECTOR = [
|
|
50794
|
+
"input",
|
|
50795
|
+
"textarea",
|
|
50796
|
+
"select",
|
|
50797
|
+
"button",
|
|
50798
|
+
"a[href]",
|
|
50799
|
+
// Space toggles a disclosure and plays or pauses media with native controls.
|
|
50800
|
+
"summary",
|
|
50801
|
+
"video[controls]",
|
|
50802
|
+
"audio[controls]",
|
|
50803
|
+
'[role="button"]',
|
|
50804
|
+
'[role="checkbox"]',
|
|
50805
|
+
'[role="combobox"]',
|
|
50806
|
+
'[role="menuitem"]',
|
|
50807
|
+
'[role="menuitemcheckbox"]',
|
|
50808
|
+
'[role="menuitemradio"]',
|
|
50809
|
+
'[role="option"]',
|
|
50810
|
+
'[role="radio"]',
|
|
50811
|
+
'[role="searchbox"]',
|
|
50812
|
+
'[role="switch"]',
|
|
50813
|
+
'[role="tab"]',
|
|
50814
|
+
'[role="textbox"]'
|
|
50815
|
+
].join(",");
|
|
50816
|
+
function eventOwnsSpaceKey(event) {
|
|
50817
|
+
return targetOwnsSpaceKey(event.composedPath?.()[0] ?? event.target);
|
|
50818
|
+
}
|
|
50819
|
+
function targetOwnsSpaceKey(target) {
|
|
50820
|
+
const element = target;
|
|
50821
|
+
if (!element || typeof element.closest !== "function") {
|
|
50822
|
+
return false;
|
|
50823
|
+
}
|
|
50824
|
+
return element.isContentEditable === true || element.closest(SPACE_OWNER_SELECTOR) !== null;
|
|
50825
|
+
}
|
|
50826
|
+
var TOUCH_EVENTS = ["touchstart", "touchend", "touchcancel"];
|
|
50827
|
+
function attachViewportNavigation(viewport, options) {
|
|
50828
|
+
const doc = viewport.ownerDocument;
|
|
50829
|
+
const win = doc.defaultView;
|
|
50830
|
+
const requestFrame = options.requestFrame ?? ((callback) => win?.requestAnimationFrame(callback) ?? 0);
|
|
50831
|
+
const cancelFrame = options.cancelFrame ?? ((handle) => win?.cancelAnimationFrame(handle));
|
|
50832
|
+
const now = options.now ?? (() => win?.performance.now() ?? Date.now());
|
|
50833
|
+
const isActive = () => options.isActive?.() ?? true;
|
|
50834
|
+
const wheelBuffer = createWheelStepBuffer();
|
|
50835
|
+
const originalCursor = viewport.style.cursor;
|
|
50836
|
+
let pending3 = null;
|
|
50837
|
+
let gesture = null;
|
|
50838
|
+
let frame = 0;
|
|
50839
|
+
let gestureStartZoom = null;
|
|
50840
|
+
let fingers = 0;
|
|
50841
|
+
let hovering = false;
|
|
50842
|
+
let spaceHeld = false;
|
|
50843
|
+
let pan = null;
|
|
50844
|
+
const findStage = () => viewport.querySelector(VIEWPORT_STAGE_SELECTOR);
|
|
50845
|
+
const applyPending = () => {
|
|
50846
|
+
frame = 0;
|
|
50847
|
+
if (!pending3) {
|
|
50848
|
+
return;
|
|
50849
|
+
}
|
|
50850
|
+
const rect3 = findStage()?.getBoundingClientRect();
|
|
50851
|
+
if (!rect3 || rect3.width === pending3.width) {
|
|
50852
|
+
pending3.frames += 1;
|
|
50853
|
+
if (pending3.frames < MAX_LAYOUT_FRAMES) {
|
|
50854
|
+
frame = requestFrame(applyPending);
|
|
50855
|
+
} else {
|
|
50856
|
+
pending3 = null;
|
|
50857
|
+
}
|
|
50858
|
+
return;
|
|
50859
|
+
}
|
|
50860
|
+
const next2 = anchoredScrollPosition(
|
|
50861
|
+
{ left: viewport.scrollLeft, top: viewport.scrollTop },
|
|
50862
|
+
rect3,
|
|
50863
|
+
pending3.anchor
|
|
50864
|
+
);
|
|
50865
|
+
pending3 = null;
|
|
50866
|
+
viewport.scrollLeft = next2.left;
|
|
50867
|
+
viewport.scrollTop = next2.top;
|
|
50868
|
+
};
|
|
50869
|
+
const gestureAnchor = (rect3, clientX, clientY) => {
|
|
50870
|
+
const time = now();
|
|
50871
|
+
const continues = gesture !== null && time - gesture.time <= ANCHOR_REUSE_MS && Math.abs(clientX - gesture.anchor.clientX) <= ANCHOR_REUSE_DISTANCE_PX && Math.abs(clientY - gesture.anchor.clientY) <= ANCHOR_REUSE_DISTANCE_PX;
|
|
50872
|
+
const anchor = continues ? { ...gesture.anchor, clientX, clientY } : rect3 ? zoomAnchorAt(rect3, clientX, clientY) : null;
|
|
50873
|
+
gesture = anchor ? { anchor, time } : null;
|
|
50874
|
+
return anchor;
|
|
50875
|
+
};
|
|
50876
|
+
const zoomAt = (zoom, clientX, clientY) => {
|
|
50877
|
+
const before = options.getZoom();
|
|
50878
|
+
const rect3 = findStage()?.getBoundingClientRect();
|
|
50879
|
+
const anchor = gestureAnchor(rect3, clientX, clientY);
|
|
50880
|
+
if (rect3 && pending3 && pending3.width === rect3.width) {
|
|
50881
|
+
if (anchor) {
|
|
50882
|
+
pending3.anchor = anchor;
|
|
50883
|
+
}
|
|
50884
|
+
} else {
|
|
50885
|
+
pending3 = rect3 && anchor ? { anchor, width: rect3.width, frames: 0 } : null;
|
|
50886
|
+
}
|
|
50887
|
+
options.setZoom(zoom);
|
|
50888
|
+
if (options.getZoom() === before) {
|
|
50889
|
+
pending3 = null;
|
|
50890
|
+
return;
|
|
50891
|
+
}
|
|
50892
|
+
if (pending3 && frame === 0) {
|
|
50893
|
+
frame = requestFrame(applyPending);
|
|
50894
|
+
}
|
|
50895
|
+
};
|
|
50896
|
+
const onWheel = (event) => {
|
|
50897
|
+
if (!isActive()) {
|
|
50898
|
+
return;
|
|
50899
|
+
}
|
|
50900
|
+
const mapped = mapEditingWheel(event, wheelBuffer, true);
|
|
50901
|
+
if (mapped.intent !== "zoom") {
|
|
50902
|
+
return;
|
|
50903
|
+
}
|
|
50904
|
+
event.preventDefault();
|
|
50905
|
+
zoomAt(options.getZoom() + mapped.deltaScale, event.clientX, event.clientY);
|
|
50906
|
+
};
|
|
50907
|
+
const onTouches = (event) => {
|
|
50908
|
+
fingers = event.touches.length;
|
|
50909
|
+
};
|
|
50910
|
+
const onGestureStart = (event) => {
|
|
50911
|
+
if (!isActive() || fingers > 0) {
|
|
50912
|
+
return;
|
|
50913
|
+
}
|
|
50914
|
+
event.preventDefault();
|
|
50915
|
+
gestureStartZoom = options.getZoom();
|
|
50916
|
+
};
|
|
50917
|
+
const onGestureChange = (event) => {
|
|
50918
|
+
if (gestureStartZoom === null) {
|
|
50919
|
+
return;
|
|
50920
|
+
}
|
|
50921
|
+
event.preventDefault();
|
|
50922
|
+
const gesture2 = event;
|
|
50923
|
+
zoomAt(gestureStartZoom * gesture2.scale, gesture2.clientX, gesture2.clientY);
|
|
50924
|
+
};
|
|
50925
|
+
const onGestureEnd = (event) => {
|
|
50926
|
+
if (gestureStartZoom === null) {
|
|
50927
|
+
return;
|
|
50928
|
+
}
|
|
50929
|
+
event.preventDefault();
|
|
50930
|
+
gestureStartZoom = null;
|
|
50931
|
+
};
|
|
50932
|
+
const updateCursor = () => {
|
|
50933
|
+
if (pan?.started) {
|
|
50934
|
+
viewport.style.cursor = "grabbing";
|
|
50935
|
+
} else if (spaceHeld && hovering) {
|
|
50936
|
+
viewport.style.cursor = "grab";
|
|
50937
|
+
} else {
|
|
50938
|
+
viewport.style.cursor = originalCursor;
|
|
50939
|
+
}
|
|
50940
|
+
};
|
|
50941
|
+
const onPointerEnter = () => {
|
|
50942
|
+
hovering = true;
|
|
50943
|
+
updateCursor();
|
|
50944
|
+
};
|
|
50945
|
+
const onPointerLeave = () => {
|
|
50946
|
+
hovering = false;
|
|
50947
|
+
updateCursor();
|
|
50948
|
+
};
|
|
50949
|
+
const onKeyDown = (event) => {
|
|
50950
|
+
if (event.key !== " " || event.ctrlKey || event.metaKey || event.altKey) {
|
|
50951
|
+
return;
|
|
50952
|
+
}
|
|
50953
|
+
if (spaceHeld) {
|
|
50954
|
+
event.preventDefault();
|
|
50955
|
+
return;
|
|
50956
|
+
}
|
|
50957
|
+
if (!hovering || !isActive() || eventOwnsSpaceKey(event) || !viewportCanPan(viewport)) {
|
|
50958
|
+
return;
|
|
50959
|
+
}
|
|
50960
|
+
event.preventDefault();
|
|
50961
|
+
spaceHeld = true;
|
|
50962
|
+
updateCursor();
|
|
50963
|
+
};
|
|
50964
|
+
const releaseSpace = () => {
|
|
50965
|
+
if (!spaceHeld) {
|
|
50966
|
+
return;
|
|
50967
|
+
}
|
|
50968
|
+
spaceHeld = false;
|
|
50969
|
+
updateCursor();
|
|
50970
|
+
};
|
|
50971
|
+
const onKeyUp = (event) => {
|
|
50972
|
+
if (event.key === " " && spaceHeld) {
|
|
50973
|
+
event.preventDefault();
|
|
50974
|
+
releaseSpace();
|
|
50975
|
+
}
|
|
50976
|
+
};
|
|
50977
|
+
const suppressNextClick = () => {
|
|
50978
|
+
const onClick = (event) => {
|
|
50979
|
+
event.preventDefault();
|
|
50980
|
+
event.stopPropagation();
|
|
50981
|
+
};
|
|
50982
|
+
viewport.addEventListener("click", onClick, { capture: true, once: true });
|
|
50983
|
+
win?.setTimeout(() => viewport.removeEventListener("click", onClick, true), 0);
|
|
50984
|
+
};
|
|
50985
|
+
const startPanning = (event) => {
|
|
50986
|
+
if (!pan) {
|
|
50987
|
+
return;
|
|
50988
|
+
}
|
|
50989
|
+
pan.started = true;
|
|
50990
|
+
try {
|
|
50991
|
+
viewport.setPointerCapture(event.pointerId);
|
|
50992
|
+
} catch {
|
|
50993
|
+
}
|
|
50994
|
+
updateCursor();
|
|
50995
|
+
};
|
|
50996
|
+
const onPointerDown = (event) => {
|
|
50997
|
+
if (pan || !isActive() || !viewportCanPan(viewport)) {
|
|
50998
|
+
return;
|
|
50999
|
+
}
|
|
51000
|
+
const middle = event.button === 1;
|
|
51001
|
+
const spaceDrag = event.button === 0 && spaceHeld;
|
|
51002
|
+
const plainDrag = event.button === 0 && !spaceHeld && event.pointerType !== "touch" && (options.dragPans?.() ?? false);
|
|
51003
|
+
if (!middle && !spaceDrag && !plainDrag) {
|
|
51004
|
+
return;
|
|
51005
|
+
}
|
|
51006
|
+
pan = {
|
|
51007
|
+
pointerId: event.pointerId,
|
|
51008
|
+
startX: event.clientX,
|
|
51009
|
+
startY: event.clientY,
|
|
51010
|
+
left: viewport.scrollLeft,
|
|
51011
|
+
top: viewport.scrollTop,
|
|
51012
|
+
started: false,
|
|
51013
|
+
thresholded: plainDrag
|
|
51014
|
+
};
|
|
51015
|
+
if (!plainDrag) {
|
|
51016
|
+
event.preventDefault();
|
|
51017
|
+
event.stopPropagation();
|
|
51018
|
+
startPanning(event);
|
|
51019
|
+
}
|
|
51020
|
+
};
|
|
51021
|
+
const onPointerMove = (event) => {
|
|
51022
|
+
if (!pan || event.pointerId !== pan.pointerId) {
|
|
51023
|
+
return;
|
|
51024
|
+
}
|
|
51025
|
+
const dx = event.clientX - pan.startX;
|
|
51026
|
+
const dy = event.clientY - pan.startY;
|
|
51027
|
+
if (!pan.started) {
|
|
51028
|
+
if (Math.hypot(dx, dy) < DRAG_PAN_THRESHOLD_PX) {
|
|
51029
|
+
return;
|
|
51030
|
+
}
|
|
51031
|
+
startPanning(event);
|
|
51032
|
+
}
|
|
51033
|
+
event.preventDefault();
|
|
51034
|
+
viewport.scrollLeft = pan.left - dx;
|
|
51035
|
+
viewport.scrollTop = pan.top - dy;
|
|
51036
|
+
};
|
|
51037
|
+
const endPan = (event) => {
|
|
51038
|
+
if (!pan || event.pointerId !== pan.pointerId) {
|
|
51039
|
+
return;
|
|
51040
|
+
}
|
|
51041
|
+
const { started, thresholded } = pan;
|
|
51042
|
+
pan = null;
|
|
51043
|
+
if (started) {
|
|
51044
|
+
try {
|
|
51045
|
+
viewport.releasePointerCapture(event.pointerId);
|
|
51046
|
+
} catch {
|
|
51047
|
+
}
|
|
51048
|
+
if (thresholded && event.type === "pointerup") {
|
|
51049
|
+
suppressNextClick();
|
|
51050
|
+
}
|
|
51051
|
+
}
|
|
51052
|
+
updateCursor();
|
|
51053
|
+
};
|
|
51054
|
+
const onWindowBlur = () => {
|
|
51055
|
+
releaseSpace();
|
|
51056
|
+
};
|
|
51057
|
+
viewport.addEventListener("wheel", onWheel, { passive: false });
|
|
51058
|
+
for (const type of TOUCH_EVENTS) {
|
|
51059
|
+
viewport.addEventListener(type, onTouches, { passive: true });
|
|
51060
|
+
}
|
|
51061
|
+
viewport.addEventListener("gesturestart", onGestureStart);
|
|
51062
|
+
viewport.addEventListener("gesturechange", onGestureChange);
|
|
51063
|
+
viewport.addEventListener("gestureend", onGestureEnd);
|
|
51064
|
+
viewport.addEventListener("pointerenter", onPointerEnter);
|
|
51065
|
+
viewport.addEventListener("pointerleave", onPointerLeave);
|
|
51066
|
+
viewport.addEventListener("pointerdown", onPointerDown, true);
|
|
51067
|
+
viewport.addEventListener("pointermove", onPointerMove, true);
|
|
51068
|
+
viewport.addEventListener("pointerup", endPan, true);
|
|
51069
|
+
viewport.addEventListener("pointercancel", endPan, true);
|
|
51070
|
+
doc.addEventListener("keydown", onKeyDown, true);
|
|
51071
|
+
doc.addEventListener("keyup", onKeyUp, true);
|
|
51072
|
+
win?.addEventListener("blur", onWindowBlur);
|
|
51073
|
+
return () => {
|
|
51074
|
+
if (frame !== 0) {
|
|
51075
|
+
cancelFrame(frame);
|
|
51076
|
+
frame = 0;
|
|
51077
|
+
}
|
|
51078
|
+
pending3 = null;
|
|
51079
|
+
pan = null;
|
|
51080
|
+
spaceHeld = false;
|
|
51081
|
+
viewport.style.cursor = originalCursor;
|
|
51082
|
+
viewport.removeEventListener("wheel", onWheel);
|
|
51083
|
+
for (const type of TOUCH_EVENTS) {
|
|
51084
|
+
viewport.removeEventListener(type, onTouches);
|
|
51085
|
+
}
|
|
51086
|
+
viewport.removeEventListener("gesturestart", onGestureStart);
|
|
51087
|
+
viewport.removeEventListener("gesturechange", onGestureChange);
|
|
51088
|
+
viewport.removeEventListener("gestureend", onGestureEnd);
|
|
51089
|
+
viewport.removeEventListener("pointerenter", onPointerEnter);
|
|
51090
|
+
viewport.removeEventListener("pointerleave", onPointerLeave);
|
|
51091
|
+
viewport.removeEventListener("pointerdown", onPointerDown, true);
|
|
51092
|
+
viewport.removeEventListener("pointermove", onPointerMove, true);
|
|
51093
|
+
viewport.removeEventListener("pointerup", endPan, true);
|
|
51094
|
+
viewport.removeEventListener("pointercancel", endPan, true);
|
|
51095
|
+
doc.removeEventListener("keydown", onKeyDown, true);
|
|
51096
|
+
doc.removeEventListener("keyup", onKeyUp, true);
|
|
51097
|
+
win?.removeEventListener("blur", onWindowBlur);
|
|
51098
|
+
};
|
|
51099
|
+
}
|
|
51100
|
+
|
|
50601
51101
|
// src/pptx/render/audience-content-store.ts
|
|
50602
51102
|
var DB_NAME3 = "pptx-viewer-audience";
|
|
50603
51103
|
var DB_VERSION3 = 1;
|
|
@@ -52708,7 +53208,7 @@ function resolveSlidePaneClick(input) {
|
|
|
52708
53208
|
}
|
|
52709
53209
|
|
|
52710
53210
|
// src/pptx/render/slide-pane-context-menu.ts
|
|
52711
|
-
var
|
|
53211
|
+
var LABEL_KEYS2 = {
|
|
52712
53212
|
"new-slide": "pptx.slidesPane.contextMenu.newSlide",
|
|
52713
53213
|
duplicate: "pptx.slidesPane.contextMenu.duplicate",
|
|
52714
53214
|
delete: "pptx.slidesPane.contextMenu.delete",
|
|
@@ -52721,11 +53221,11 @@ var COUNT_LABEL_KEYS = {
|
|
|
52721
53221
|
delete: "pptx.slidesPane.contextMenu.deleteCount"
|
|
52722
53222
|
};
|
|
52723
53223
|
function slidePaneContextMenuLabelKey(id) {
|
|
52724
|
-
return
|
|
53224
|
+
return LABEL_KEYS2[id];
|
|
52725
53225
|
}
|
|
52726
53226
|
function entry(id, context3, extra = {}) {
|
|
52727
53227
|
const countKey = context3.selectedCount > 1 ? COUNT_LABEL_KEYS[id] : void 0;
|
|
52728
|
-
return { id, labelKey: countKey ??
|
|
53228
|
+
return { id, labelKey: countKey ?? LABEL_KEYS2[id], countLabelKey: countKey, ...extra };
|
|
52729
53229
|
}
|
|
52730
53230
|
function buildSlidePaneContextMenuEntries(context3) {
|
|
52731
53231
|
const showsHide = context3.hasVisibleInSelection || !context3.hasHiddenInSelection;
|
|
@@ -52743,7 +53243,7 @@ function buildSlidePaneContextMenuEntries(context3) {
|
|
|
52743
53243
|
}
|
|
52744
53244
|
|
|
52745
53245
|
// src/pptx/render/section-context-menu.ts
|
|
52746
|
-
var
|
|
53246
|
+
var LABEL_KEYS3 = {
|
|
52747
53247
|
rename: "pptx.sections.rename",
|
|
52748
53248
|
delete: "pptx.sections.delete",
|
|
52749
53249
|
"move-up": "pptx.sections.moveUp",
|
|
@@ -52751,24 +53251,24 @@ var LABEL_KEYS2 = {
|
|
|
52751
53251
|
"add-after": "pptx.sections.addAfter"
|
|
52752
53252
|
};
|
|
52753
53253
|
function sectionContextMenuLabelKey(id) {
|
|
52754
|
-
return
|
|
53254
|
+
return LABEL_KEYS3[id];
|
|
52755
53255
|
}
|
|
52756
53256
|
function buildSectionContextMenuEntries(context3) {
|
|
52757
53257
|
return [
|
|
52758
|
-
{ id: "rename", labelKey:
|
|
52759
|
-
{ id: "delete", labelKey:
|
|
53258
|
+
{ id: "rename", labelKey: LABEL_KEYS3.rename },
|
|
53259
|
+
{ id: "delete", labelKey: LABEL_KEYS3.delete },
|
|
52760
53260
|
{
|
|
52761
53261
|
id: "move-up",
|
|
52762
|
-
labelKey:
|
|
53262
|
+
labelKey: LABEL_KEYS3["move-up"],
|
|
52763
53263
|
separatorBefore: true,
|
|
52764
53264
|
disabled: context3.sectionIndex <= 0
|
|
52765
53265
|
},
|
|
52766
53266
|
{
|
|
52767
53267
|
id: "move-down",
|
|
52768
|
-
labelKey:
|
|
53268
|
+
labelKey: LABEL_KEYS3["move-down"],
|
|
52769
53269
|
disabled: context3.sectionIndex >= context3.totalSections - 1
|
|
52770
53270
|
},
|
|
52771
|
-
{ id: "add-after", labelKey:
|
|
53271
|
+
{ id: "add-after", labelKey: LABEL_KEYS3["add-after"], separatorBefore: true }
|
|
52772
53272
|
];
|
|
52773
53273
|
}
|
|
52774
53274
|
function sectionAddAfterSlideIndex(lastSlideIndexOfSection, totalSlides) {
|
|
@@ -53539,7 +54039,7 @@ function hasMultipleSelectedTableCells(cells, tableData) {
|
|
|
53539
54039
|
}
|
|
53540
54040
|
return false;
|
|
53541
54041
|
}
|
|
53542
|
-
var
|
|
54042
|
+
var LABEL_KEYS4 = {
|
|
53543
54043
|
copy: "pptx.contextMenu.copy",
|
|
53544
54044
|
cut: "pptx.contextMenu.cut",
|
|
53545
54045
|
paste: "pptx.contextMenu.paste",
|
|
@@ -53580,10 +54080,10 @@ var LABEL_KEYS3 = {
|
|
|
53580
54080
|
delete: "pptx.contextMenu.delete"
|
|
53581
54081
|
};
|
|
53582
54082
|
function contextMenuLabelKey(id) {
|
|
53583
|
-
return
|
|
54083
|
+
return LABEL_KEYS4[id];
|
|
53584
54084
|
}
|
|
53585
54085
|
function entry2(id, extra = {}) {
|
|
53586
|
-
return { id, labelKey:
|
|
54086
|
+
return { id, labelKey: LABEL_KEYS4[id], ...extra };
|
|
53587
54087
|
}
|
|
53588
54088
|
function tableEntries(table2) {
|
|
53589
54089
|
if (!table2) {
|
|
@@ -53679,7 +54179,7 @@ function buildContextMenuEntries(context3 = {}) {
|
|
|
53679
54179
|
}
|
|
53680
54180
|
|
|
53681
54181
|
// src/pptx/render/canvas-context-menu-commands.ts
|
|
53682
|
-
var
|
|
54182
|
+
var LABEL_KEYS5 = {
|
|
53683
54183
|
paste: "pptx.contextMenu.paste",
|
|
53684
54184
|
layout: "pptx.canvasContextMenu.layout",
|
|
53685
54185
|
"reset-slide": "pptx.canvasContextMenu.resetSlide",
|
|
@@ -53688,10 +54188,10 @@ var LABEL_KEYS4 = {
|
|
|
53688
54188
|
ruler: "pptx.canvasContextMenu.ruler"
|
|
53689
54189
|
};
|
|
53690
54190
|
function canvasContextMenuLabelKey(id) {
|
|
53691
|
-
return
|
|
54191
|
+
return LABEL_KEYS5[id];
|
|
53692
54192
|
}
|
|
53693
54193
|
function entry3(id, extra = {}) {
|
|
53694
|
-
return { id, labelKey:
|
|
54194
|
+
return { id, labelKey: LABEL_KEYS5[id], ...extra };
|
|
53695
54195
|
}
|
|
53696
54196
|
function buildCanvasContextMenuEntries(context3 = {}) {
|
|
53697
54197
|
const { hasClipboard, showGrid, showRulers } = context3;
|
|
@@ -54304,6 +54804,127 @@ function buildHyperlinkPatch(element, draft) {
|
|
|
54304
54804
|
function buildClearHyperlinkPatch() {
|
|
54305
54805
|
return { actionClick: void 0 };
|
|
54306
54806
|
}
|
|
54807
|
+
|
|
54808
|
+
// src/pptx/render/find-text-highlight.ts
|
|
54809
|
+
var FIND_MATCH_ATTRIBUTE = "data-pptx-find-match";
|
|
54810
|
+
function inShapeText(match) {
|
|
54811
|
+
return !match.notes && !match.tableCell && match.smartArtNodeId === void 0 && match.elementPath === void 0 && !match.chartTitle && match.chartSeriesIndex === void 0 && match.chartCategoryIndex === void 0;
|
|
54812
|
+
}
|
|
54813
|
+
function findTextHighlightsByElement(matches, currentIndex, slideIndex) {
|
|
54814
|
+
const byElement = /* @__PURE__ */ new Map();
|
|
54815
|
+
matches.forEach((match, index) => {
|
|
54816
|
+
if (match.slideIndex !== slideIndex || !inShapeText(match)) {
|
|
54817
|
+
return;
|
|
54818
|
+
}
|
|
54819
|
+
let bySegment = byElement.get(match.elementId);
|
|
54820
|
+
if (!bySegment) {
|
|
54821
|
+
bySegment = /* @__PURE__ */ new Map();
|
|
54822
|
+
byElement.set(match.elementId, bySegment);
|
|
54823
|
+
}
|
|
54824
|
+
let list2 = bySegment.get(match.segmentIndex);
|
|
54825
|
+
if (!list2) {
|
|
54826
|
+
list2 = [];
|
|
54827
|
+
bySegment.set(match.segmentIndex, list2);
|
|
54828
|
+
}
|
|
54829
|
+
list2.push({
|
|
54830
|
+
startOffset: match.startOffset,
|
|
54831
|
+
length: match.length,
|
|
54832
|
+
isCurrent: index === currentIndex
|
|
54833
|
+
});
|
|
54834
|
+
});
|
|
54835
|
+
return byElement;
|
|
54836
|
+
}
|
|
54837
|
+
function splitTextByFindHighlights(text4, highlights) {
|
|
54838
|
+
const sorted = [...highlights ?? []].sort((a, b) => a.startOffset - b.startOffset);
|
|
54839
|
+
const chunks = [];
|
|
54840
|
+
let cursor = 0;
|
|
54841
|
+
for (const highlight of sorted) {
|
|
54842
|
+
const start = Math.max(highlight.startOffset, cursor);
|
|
54843
|
+
const end = Math.min(highlight.startOffset + highlight.length, text4.length);
|
|
54844
|
+
if (end <= start) {
|
|
54845
|
+
continue;
|
|
54846
|
+
}
|
|
54847
|
+
if (start > cursor) {
|
|
54848
|
+
chunks.push({ text: text4.slice(cursor, start) });
|
|
54849
|
+
}
|
|
54850
|
+
chunks.push({ text: text4.slice(start, end), match: highlight.isCurrent ? "current" : "match" });
|
|
54851
|
+
cursor = end;
|
|
54852
|
+
}
|
|
54853
|
+
if (cursor < text4.length || chunks.length === 0) {
|
|
54854
|
+
chunks.push({ text: text4.slice(cursor) });
|
|
54855
|
+
}
|
|
54856
|
+
return chunks;
|
|
54857
|
+
}
|
|
54858
|
+
function findMatchMarkStyle(kind) {
|
|
54859
|
+
return {
|
|
54860
|
+
backgroundColor: kind === "current" ? "#f97316" : "#facc15",
|
|
54861
|
+
color: "inherit",
|
|
54862
|
+
borderRadius: "2px"
|
|
54863
|
+
};
|
|
54864
|
+
}
|
|
54865
|
+
function slicePieces(pieces, from, to) {
|
|
54866
|
+
const out = [];
|
|
54867
|
+
let offset = 0;
|
|
54868
|
+
for (const piece of pieces) {
|
|
54869
|
+
const start = Math.max(from, offset);
|
|
54870
|
+
const end = Math.min(to, offset + piece.text.length);
|
|
54871
|
+
if (end > start) {
|
|
54872
|
+
out.push({ ...piece, text: piece.text.slice(start - offset, end - offset) });
|
|
54873
|
+
}
|
|
54874
|
+
offset += piece.text.length;
|
|
54875
|
+
}
|
|
54876
|
+
return out;
|
|
54877
|
+
}
|
|
54878
|
+
function highlightRun(run2, highlights) {
|
|
54879
|
+
if (run2.equation || run2.segmentIndex === void 0 || !run2.text) {
|
|
54880
|
+
return [run2];
|
|
54881
|
+
}
|
|
54882
|
+
const segment = highlights.get(run2.segmentIndex);
|
|
54883
|
+
if (!segment?.length) {
|
|
54884
|
+
return [run2];
|
|
54885
|
+
}
|
|
54886
|
+
const base2 = run2.charStart ?? 0;
|
|
54887
|
+
const local = segment.map((highlight) => ({
|
|
54888
|
+
...highlight,
|
|
54889
|
+
startOffset: highlight.startOffset - base2
|
|
54890
|
+
}));
|
|
54891
|
+
const chunks = splitTextByFindHighlights(run2.text, local);
|
|
54892
|
+
const marked = chunks.filter((chunk) => chunk.match);
|
|
54893
|
+
if (marked.length === 0) {
|
|
54894
|
+
return [run2];
|
|
54895
|
+
}
|
|
54896
|
+
if (run2.ruby || run2.tabLines) {
|
|
54897
|
+
const current = marked.some((chunk) => chunk.match === "current");
|
|
54898
|
+
return [{ ...run2, findMatch: current ? "current" : "match" }];
|
|
54899
|
+
}
|
|
54900
|
+
const out = [];
|
|
54901
|
+
let offset = 0;
|
|
54902
|
+
for (const chunk of chunks) {
|
|
54903
|
+
const end = offset + chunk.text.length;
|
|
54904
|
+
const piece = { ...run2, text: chunk.text, charStart: base2 + offset };
|
|
54905
|
+
if (run2.scriptRuns) {
|
|
54906
|
+
piece.scriptRuns = slicePieces(run2.scriptRuns, offset, end);
|
|
54907
|
+
}
|
|
54908
|
+
if (run2.underlineWordPieces) {
|
|
54909
|
+
piece.underlineWordPieces = slicePieces(run2.underlineWordPieces, offset, end);
|
|
54910
|
+
}
|
|
54911
|
+
if (chunk.match) {
|
|
54912
|
+
piece.findMatch = chunk.match;
|
|
54913
|
+
}
|
|
54914
|
+
out.push(piece);
|
|
54915
|
+
offset = end;
|
|
54916
|
+
}
|
|
54917
|
+
return out;
|
|
54918
|
+
}
|
|
54919
|
+
function highlightFindMatches(paragraphs2, highlights) {
|
|
54920
|
+
if (!highlights || highlights.size === 0) {
|
|
54921
|
+
return paragraphs2;
|
|
54922
|
+
}
|
|
54923
|
+
return paragraphs2.map((paragraph2) => ({
|
|
54924
|
+
...paragraph2,
|
|
54925
|
+
runs: paragraph2.runs.flatMap((run2) => highlightRun(run2, highlights))
|
|
54926
|
+
}));
|
|
54927
|
+
}
|
|
54307
54928
|
var SEVERITY_ORDER = {
|
|
54308
54929
|
error: 0,
|
|
54309
54930
|
warning: 1,
|
|
@@ -56493,16 +57114,22 @@ var GROUPED_INSERT_CHART_KINDS = [
|
|
|
56493
57114
|
"line",
|
|
56494
57115
|
"area"
|
|
56495
57116
|
];
|
|
57117
|
+
function isValidInsertChartData(data) {
|
|
57118
|
+
return data !== void 0 && data.categories.length > 0 && data.series.length > 0 && data.series.every(
|
|
57119
|
+
(series) => series.values.length === data.categories.length && series.values.every((value) => Number.isFinite(value))
|
|
57120
|
+
);
|
|
57121
|
+
}
|
|
56496
57122
|
function createDefaultChartElement(chartKind = DEFAULT_INSERT_CHART_KIND, position, options = {}) {
|
|
56497
57123
|
const option = INSERT_CHART_TYPES.find((entry6) => entry6.id === chartKind);
|
|
56498
57124
|
const chartType = option?.type ?? chartKind;
|
|
56499
57125
|
const chartExData = buildChartExInsertData(option?.id ?? chartKind);
|
|
57126
|
+
const hostData = isValidInsertChartData(options.data) ? options.data : void 0;
|
|
56500
57127
|
return pptx.createChartElement(
|
|
56501
57128
|
chartType,
|
|
56502
57129
|
{
|
|
56503
|
-
categories: chartExData?.categories ?? [...DEFAULT_CATEGORIES],
|
|
56504
|
-
series: chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
|
|
56505
|
-
|
|
57130
|
+
categories: hostData ? [...hostData.categories] : chartExData?.categories ?? [...DEFAULT_CATEGORIES],
|
|
57131
|
+
series: hostData ? hostData.series.map((s) => ({ name: s.name, values: [...s.values] })) : chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
|
|
57132
|
+
...!hostData && chartExData?.categoryLevels ? { categoryLevels: chartExData.categoryLevels } : {},
|
|
56506
57133
|
...options.title === void 0 ? { title: "Chart Title" } : options.title.trim() ? { title: options.title.trim() } : {},
|
|
56507
57134
|
hasLegend: options.hasLegend ?? true,
|
|
56508
57135
|
...options.grouping !== void 0 && GROUPED_INSERT_CHART_KINDS.includes(option?.id ?? chartKind) ? { grouping: options.grouping } : {},
|
|
@@ -57728,68 +58355,1992 @@ function classifyMediaType(mimeType) {
|
|
|
57728
58355
|
return null;
|
|
57729
58356
|
}
|
|
57730
58357
|
|
|
57731
|
-
// src/pptx/render/
|
|
57732
|
-
|
|
57733
|
-
|
|
57734
|
-
|
|
57735
|
-
|
|
57736
|
-
|
|
57737
|
-
|
|
57738
|
-
|
|
58358
|
+
// src/pptx/render/building-block-actions.ts
|
|
58359
|
+
var BUILDING_BLOCK_OK = { ok: true };
|
|
58360
|
+
function buildingBlockFailure(code) {
|
|
58361
|
+
return { ok: false, code };
|
|
58362
|
+
}
|
|
58363
|
+
var HOST_IMAGE_MAX_BYTES = 25 * 1024 * 1024;
|
|
58364
|
+
var HOST_MEDIA_MAX_BYTES = 100 * 1024 * 1024;
|
|
58365
|
+
function validateHostImageFile(file, maxBytes = HOST_IMAGE_MAX_BYTES) {
|
|
58366
|
+
if (!file) {
|
|
58367
|
+
return buildingBlockFailure("no-file");
|
|
58368
|
+
}
|
|
58369
|
+
if (!file.type.startsWith("image/")) {
|
|
58370
|
+
return buildingBlockFailure("unsupported-type");
|
|
58371
|
+
}
|
|
58372
|
+
if (file.size === 0) {
|
|
58373
|
+
return buildingBlockFailure("empty-file");
|
|
58374
|
+
}
|
|
58375
|
+
return file.size > maxBytes ? buildingBlockFailure("file-too-large") : BUILDING_BLOCK_OK;
|
|
58376
|
+
}
|
|
58377
|
+
function validateHostMediaFile(file, maxBytes = HOST_MEDIA_MAX_BYTES) {
|
|
58378
|
+
if (!file) {
|
|
58379
|
+
return buildingBlockFailure("no-file");
|
|
58380
|
+
}
|
|
58381
|
+
const mediaType = classifyMediaType(file.type);
|
|
58382
|
+
if (!mediaType) {
|
|
58383
|
+
return buildingBlockFailure("unsupported-type");
|
|
58384
|
+
}
|
|
58385
|
+
if (file.size === 0) {
|
|
58386
|
+
return buildingBlockFailure("empty-file");
|
|
58387
|
+
}
|
|
58388
|
+
return file.size > maxBytes ? buildingBlockFailure("file-too-large") : { ok: true, mediaType };
|
|
58389
|
+
}
|
|
58390
|
+
var BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = [
|
|
58391
|
+
// The other dialogs raise host requests now (`actions.passwordProtection`, `.documentProperties`,
|
|
58392
|
+
// `.fontEmbedding`, `.digitalSignatures`, `.setUpSlideShow`, `.customShows`, `.shortcuts`);
|
|
58393
|
+
// Broadcast cannot be completed.
|
|
58394
|
+
"onOpenBroadcastDialog"
|
|
58395
|
+
];
|
|
58396
|
+
function describeBuildingBlockActions(input) {
|
|
58397
|
+
const gate = () => {
|
|
58398
|
+
if (!input.ready) {
|
|
58399
|
+
return "not-ready";
|
|
58400
|
+
}
|
|
58401
|
+
if (!input.canEdit || !input.editing) {
|
|
58402
|
+
return "read-only";
|
|
58403
|
+
}
|
|
58404
|
+
return input.canInsert ? void 0 : "protected";
|
|
58405
|
+
};
|
|
58406
|
+
const state = (needsHostUi, ...conditions) => {
|
|
58407
|
+
const reason = [gate(), ...conditions].find((code) => code !== void 0);
|
|
58408
|
+
return reason === void 0 ? { available: true, needsHostUi } : { available: false, reason, needsHostUi };
|
|
58409
|
+
};
|
|
58410
|
+
const slide = input.hasActiveSlide ? void 0 : "no-slide";
|
|
58411
|
+
const selection = input.hasSelection ? void 0 : "no-selection";
|
|
58412
|
+
return {
|
|
58413
|
+
insertImage: state(true, slide),
|
|
58414
|
+
insertMedia: state(true, slide),
|
|
58415
|
+
hyperlink: state(true, selection),
|
|
58416
|
+
removeHyperlink: state(
|
|
58417
|
+
false,
|
|
58418
|
+
selection,
|
|
58419
|
+
input.selectionHasHyperlink ? void 0 : "no-hyperlink"
|
|
58420
|
+
),
|
|
58421
|
+
insertSmartArt: state(true, slide),
|
|
58422
|
+
insertChart: state(true, slide),
|
|
58423
|
+
insertEquation: state(true, slide),
|
|
58424
|
+
editEquation: state(true, selection, input.selectionHasEquation ? void 0 : "no-equation"),
|
|
58425
|
+
replace: state(false),
|
|
58426
|
+
applyLayout: state(
|
|
58427
|
+
false,
|
|
58428
|
+
slide,
|
|
58429
|
+
input.hasHandler && input.layoutCount > 0 ? void 0 : "no-layout"
|
|
58430
|
+
),
|
|
58431
|
+
resetLayout: state(
|
|
58432
|
+
false,
|
|
58433
|
+
slide,
|
|
58434
|
+
input.hasHandler && input.hasCurrentLayout ? void 0 : "no-layout"
|
|
58435
|
+
),
|
|
58436
|
+
// Apply is gated like an edit; the request itself also fires read-only (see the file dialogs).
|
|
58437
|
+
passwordProtection: state(true),
|
|
58438
|
+
documentProperties: state(true),
|
|
58439
|
+
fontEmbedding: state(true),
|
|
58440
|
+
digitalSignatures: state(true)
|
|
58441
|
+
};
|
|
58442
|
+
}
|
|
58443
|
+
|
|
58444
|
+
// src/pptx/render/building-block-document-properties.ts
|
|
58445
|
+
var EDITABLE_CORE_PROPERTY_KEYS = [
|
|
58446
|
+
"title",
|
|
58447
|
+
"subject",
|
|
58448
|
+
"creator",
|
|
58449
|
+
"keywords",
|
|
58450
|
+
"description",
|
|
58451
|
+
"category"
|
|
58452
|
+
];
|
|
58453
|
+
var EDITABLE_APP_PROPERTY_KEYS = ["company", "manager"];
|
|
58454
|
+
var CUSTOM_PROPERTY_TYPES = ["lpwstr", "i4", "filetime", "bool"];
|
|
58455
|
+
function documentPropertiesChanged(current, draft) {
|
|
58456
|
+
return EDITABLE_CORE_PROPERTY_KEYS.some(
|
|
58457
|
+
(key) => (draft.core[key] ?? "") !== (current.core[key] ?? "")
|
|
58458
|
+
) || appPropertiesChanged(current.app, draft.app) || draft.custom.length !== current.custom.length || draft.custom.some((property, index) => {
|
|
58459
|
+
const existing = current.custom[index];
|
|
58460
|
+
return property.name !== existing?.name || property.value !== existing?.value || property.type !== existing?.type;
|
|
58461
|
+
});
|
|
58462
|
+
}
|
|
58463
|
+
function appPropertiesChanged(current, draft) {
|
|
58464
|
+
return EDITABLE_APP_PROPERTY_KEYS.some((key) => (draft?.[key] ?? "") !== (current?.[key] ?? ""));
|
|
58465
|
+
}
|
|
58466
|
+
function validCustomProperty(property) {
|
|
58467
|
+
if (typeof property.name !== "string" || property.name.trim() === "") {
|
|
58468
|
+
return false;
|
|
58469
|
+
}
|
|
58470
|
+
if (!CUSTOM_PROPERTY_TYPES.includes(property.type)) {
|
|
58471
|
+
return false;
|
|
58472
|
+
}
|
|
58473
|
+
if (typeof property.value !== "string") {
|
|
58474
|
+
return false;
|
|
58475
|
+
}
|
|
58476
|
+
switch (property.type) {
|
|
58477
|
+
case "i4":
|
|
58478
|
+
return /^-?\d+$/u.test(property.value.trim());
|
|
58479
|
+
case "bool":
|
|
58480
|
+
return property.value === "true" || property.value === "false";
|
|
58481
|
+
case "filetime":
|
|
58482
|
+
return !Number.isNaN(Date.parse(property.value));
|
|
58483
|
+
default:
|
|
58484
|
+
return true;
|
|
58485
|
+
}
|
|
58486
|
+
}
|
|
58487
|
+
function planDocumentPropertiesPatch(current, patch) {
|
|
58488
|
+
const invalid = { ok: false, code: "invalid-data" };
|
|
58489
|
+
const coreEntries = Object.entries(patch.core ?? {});
|
|
58490
|
+
const appEntries = Object.entries(patch.app ?? {});
|
|
58491
|
+
for (const [key, value] of coreEntries) {
|
|
58492
|
+
if (!EDITABLE_CORE_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
|
|
58493
|
+
return invalid;
|
|
58494
|
+
}
|
|
58495
|
+
}
|
|
58496
|
+
for (const [key, value] of appEntries) {
|
|
58497
|
+
if (!EDITABLE_APP_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
|
|
58498
|
+
return invalid;
|
|
58499
|
+
}
|
|
58500
|
+
}
|
|
58501
|
+
const set = patch.custom?.set ?? [];
|
|
58502
|
+
if (!set.every(validCustomProperty)) {
|
|
58503
|
+
return invalid;
|
|
58504
|
+
}
|
|
58505
|
+
const core = Object.fromEntries(coreEntries);
|
|
58506
|
+
const app = Object.fromEntries(appEntries);
|
|
58507
|
+
const hasCustom = set.length > 0 || (patch.custom?.remove?.length ?? 0) > 0;
|
|
58508
|
+
let custom = current.custom;
|
|
58509
|
+
if (hasCustom) {
|
|
58510
|
+
const removed = new Set(patch.custom?.remove ?? []);
|
|
58511
|
+
custom = [
|
|
58512
|
+
...current.custom.flatMap((property) => {
|
|
58513
|
+
if (removed.has(property.name)) {
|
|
58514
|
+
return [];
|
|
58515
|
+
}
|
|
58516
|
+
const replacement = set.find((next2) => next2.name === property.name);
|
|
58517
|
+
return [replacement ? { ...replacement } : property];
|
|
58518
|
+
}),
|
|
58519
|
+
...set.filter((next2) => !current.custom.some((property) => property.name === next2.name))
|
|
58520
|
+
];
|
|
58521
|
+
}
|
|
58522
|
+
const changed = documentPropertiesChanged(
|
|
58523
|
+
{ core: current.core, custom: current.custom, app: current.app },
|
|
58524
|
+
{ core: { ...current.core, ...core }, custom, app: { ...current.app, ...app } }
|
|
58525
|
+
);
|
|
58526
|
+
return {
|
|
58527
|
+
ok: true,
|
|
58528
|
+
changed,
|
|
58529
|
+
...coreEntries.length > 0 ? { core } : {},
|
|
58530
|
+
...hasCustom ? { custom } : {},
|
|
58531
|
+
...appPropertiesChanged(current.app, { ...current.app, ...app }) ? { app } : {}
|
|
58532
|
+
};
|
|
58533
|
+
}
|
|
58534
|
+
function copy(snapshot) {
|
|
58535
|
+
return {
|
|
58536
|
+
core: { ...snapshot.core },
|
|
58537
|
+
custom: snapshot.custom.map((property) => ({ ...property })),
|
|
58538
|
+
app: { ...snapshot.app }
|
|
58539
|
+
};
|
|
58540
|
+
}
|
|
58541
|
+
function buildDocumentPropertiesActions(input) {
|
|
58542
|
+
return {
|
|
58543
|
+
current: copy(input.current()),
|
|
58544
|
+
apply: (patch) => {
|
|
58545
|
+
const denied = input.refuse();
|
|
58546
|
+
if (denied) {
|
|
58547
|
+
return denied;
|
|
58548
|
+
}
|
|
58549
|
+
const plan = planDocumentPropertiesPatch(input.current(), patch);
|
|
58550
|
+
if (!plan.ok) {
|
|
58551
|
+
return buildingBlockFailure(plan.code);
|
|
58552
|
+
}
|
|
58553
|
+
if (plan.changed) {
|
|
58554
|
+
input.applyUpdate({
|
|
58555
|
+
...plan.core ? { core: plan.core } : {},
|
|
58556
|
+
...plan.custom ? { custom: plan.custom } : {},
|
|
58557
|
+
...plan.app ? { app: plan.app } : {}
|
|
58558
|
+
});
|
|
58559
|
+
}
|
|
58560
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58561
|
+
}
|
|
58562
|
+
};
|
|
58563
|
+
}
|
|
58564
|
+
|
|
58565
|
+
// src/pptx/render/font-embedding.ts
|
|
58566
|
+
var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
|
|
58567
|
+
function describeFontEmbedding(embeddedFamilies) {
|
|
58568
|
+
const seen = /* @__PURE__ */ new Set();
|
|
58569
|
+
const families = [];
|
|
58570
|
+
for (const raw of embeddedFamilies ?? []) {
|
|
58571
|
+
const family2 = raw?.trim();
|
|
58572
|
+
if (!family2) {
|
|
58573
|
+
continue;
|
|
58574
|
+
}
|
|
58575
|
+
const key = family2.toLowerCase();
|
|
58576
|
+
if (seen.has(key)) {
|
|
58577
|
+
continue;
|
|
58578
|
+
}
|
|
58579
|
+
seen.add(key);
|
|
58580
|
+
families.push(family2);
|
|
58581
|
+
}
|
|
58582
|
+
const hasAny = families.length > 0;
|
|
58583
|
+
return {
|
|
58584
|
+
embeddedFamilies: families,
|
|
58585
|
+
interactive: hasAny,
|
|
58586
|
+
initialEnabled: hasAny,
|
|
58587
|
+
...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
|
|
58588
|
+
};
|
|
58589
|
+
}
|
|
58590
|
+
function embeddedFontSaveOptions(embedFonts) {
|
|
58591
|
+
return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
|
|
58592
|
+
}
|
|
58593
|
+
|
|
58594
|
+
// src/pptx/render/building-block-font-embedding.ts
|
|
58595
|
+
function describeFontEmbeddingState(input) {
|
|
58596
|
+
const descriptor = input.descriptor ?? describeFontEmbedding(input.embeddedFamilies);
|
|
58597
|
+
return {
|
|
58598
|
+
embedFonts: input.embedFonts,
|
|
58599
|
+
embeddedFamilies: descriptor.embeddedFamilies,
|
|
58600
|
+
usedFamilies: [...input.usedFamilies],
|
|
58601
|
+
canEmbed: descriptor.interactive,
|
|
58602
|
+
...descriptor.disabledReasonKey ? { unavailableReasonKey: descriptor.disabledReasonKey } : {}
|
|
58603
|
+
};
|
|
58604
|
+
}
|
|
58605
|
+
function buildFontEmbeddingActions(input) {
|
|
58606
|
+
return {
|
|
58607
|
+
state: input.state,
|
|
58608
|
+
setEmbedFonts: (enabled) => {
|
|
58609
|
+
const denied = input.refuse();
|
|
58610
|
+
if (denied) {
|
|
58611
|
+
return denied;
|
|
58612
|
+
}
|
|
58613
|
+
const latest = input.latest();
|
|
58614
|
+
if (enabled && !latest.canEmbed) {
|
|
58615
|
+
return buildingBlockFailure("unsupported");
|
|
58616
|
+
}
|
|
58617
|
+
if (latest.embedFonts !== enabled) {
|
|
58618
|
+
input.apply(enabled);
|
|
58619
|
+
input.markDirty();
|
|
58620
|
+
}
|
|
58621
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58622
|
+
}
|
|
58623
|
+
};
|
|
58624
|
+
}
|
|
58625
|
+
|
|
58626
|
+
// src/pptx/render/password-protection.ts
|
|
58627
|
+
function getPasswordStrength(password) {
|
|
58628
|
+
if (!password) {
|
|
58629
|
+
return 0;
|
|
58630
|
+
}
|
|
58631
|
+
let score2 = 0;
|
|
58632
|
+
if (password.length >= 8) {
|
|
58633
|
+
score2 += 1;
|
|
58634
|
+
}
|
|
58635
|
+
if (password.length >= 12) {
|
|
58636
|
+
score2 += 1;
|
|
58637
|
+
}
|
|
58638
|
+
if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
|
|
58639
|
+
score2 += 1;
|
|
58640
|
+
}
|
|
58641
|
+
if (/\d/u.test(password)) {
|
|
58642
|
+
score2 += 1;
|
|
58643
|
+
}
|
|
58644
|
+
if (/[^A-Za-z0-9]/u.test(password)) {
|
|
58645
|
+
score2 += 1;
|
|
58646
|
+
}
|
|
58647
|
+
return Math.min(score2, 4);
|
|
58648
|
+
}
|
|
58649
|
+
function validatePasswordPair(password, confirmation) {
|
|
58650
|
+
if (!password) {
|
|
58651
|
+
return "required";
|
|
58652
|
+
}
|
|
58653
|
+
if (password !== confirmation) {
|
|
58654
|
+
return "mismatch";
|
|
58655
|
+
}
|
|
58656
|
+
if (password.length < 4) {
|
|
58657
|
+
return "tooShort";
|
|
58658
|
+
}
|
|
58659
|
+
return null;
|
|
58660
|
+
}
|
|
58661
|
+
var NOT_RECOMMENDED = {
|
|
58662
|
+
kind: null,
|
|
58663
|
+
messageKey: "",
|
|
58664
|
+
defaultReadOnly: false,
|
|
58665
|
+
requiresPassword: false
|
|
58666
|
+
};
|
|
58667
|
+
var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
|
|
58668
|
+
function isTruthyCustomPropertyValue(value) {
|
|
58669
|
+
const normalized = value.trim().toLowerCase();
|
|
58670
|
+
return normalized === "true" || normalized === "1" || normalized === "yes";
|
|
58671
|
+
}
|
|
58672
|
+
function isMarkedAsFinal(customProperties) {
|
|
58673
|
+
if (!customProperties) {
|
|
58674
|
+
return false;
|
|
58675
|
+
}
|
|
58676
|
+
return customProperties.some(
|
|
58677
|
+
(property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
|
|
58678
|
+
);
|
|
58679
|
+
}
|
|
58680
|
+
function readOnlyRecommendation(data) {
|
|
58681
|
+
if (!data) {
|
|
58682
|
+
return NOT_RECOMMENDED;
|
|
58683
|
+
}
|
|
58684
|
+
const verifier = data.modifyVerifier;
|
|
58685
|
+
if (verifier && (verifier.hashData || verifier.algorithmName)) {
|
|
58686
|
+
return {
|
|
58687
|
+
kind: "modifyVerifier",
|
|
58688
|
+
messageKey: "pptx.readOnly.modifyVerifierRecommended",
|
|
58689
|
+
defaultReadOnly: true,
|
|
58690
|
+
// A hash this viewer can actually check requires the password before
|
|
58691
|
+
// "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
|
|
58692
|
+
// of this check (see the field doc comment above): only a missing hash
|
|
58693
|
+
// or an unrecognised algorithm falls back to the plain "Edit anyway"
|
|
58694
|
+
// every other recommendation already has.
|
|
58695
|
+
requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
|
|
57739
58696
|
};
|
|
57740
58697
|
}
|
|
57741
|
-
|
|
57742
|
-
|
|
57743
|
-
|
|
57744
|
-
|
|
57745
|
-
|
|
57746
|
-
|
|
58698
|
+
if (isMarkedAsFinal(data.customProperties)) {
|
|
58699
|
+
return {
|
|
58700
|
+
kind: "markedFinal",
|
|
58701
|
+
messageKey: "pptx.readOnly.markedFinal",
|
|
58702
|
+
defaultReadOnly: true,
|
|
58703
|
+
requiresPassword: false
|
|
57747
58704
|
};
|
|
57748
58705
|
}
|
|
57749
|
-
return
|
|
58706
|
+
return NOT_RECOMMENDED;
|
|
57750
58707
|
}
|
|
57751
58708
|
|
|
57752
|
-
// src/pptx/render/
|
|
57753
|
-
|
|
57754
|
-
|
|
57755
|
-
|
|
58709
|
+
// src/pptx/render/building-block-password.ts
|
|
58710
|
+
var MIN_OPEN_PASSWORD_LENGTH = 4;
|
|
58711
|
+
var PASSWORD_CODES = {
|
|
58712
|
+
required: "password-required",
|
|
58713
|
+
mismatch: "password-mismatch",
|
|
58714
|
+
tooShort: "password-too-short"
|
|
58715
|
+
};
|
|
58716
|
+
var MARK_AS_FINAL_PROPERTY = "_MarkAsFinal";
|
|
58717
|
+
function validateOpenPassword(password, confirmation) {
|
|
58718
|
+
const invalid = validatePasswordPair(password, confirmation);
|
|
58719
|
+
return invalid === null ? BUILDING_BLOCK_OK : buildingBlockFailure(PASSWORD_CODES[invalid]);
|
|
58720
|
+
}
|
|
58721
|
+
function describePasswordProtection(input) {
|
|
58722
|
+
return {
|
|
58723
|
+
openPassword: input.openPasswordSet,
|
|
58724
|
+
modifyPassword: input.hasModifyVerifier,
|
|
58725
|
+
readOnlyRecommended: input.recommendation.kind !== null,
|
|
58726
|
+
markedFinal: isMarkedAsFinal(input.customProperties),
|
|
58727
|
+
supported: {
|
|
58728
|
+
openPassword: true,
|
|
58729
|
+
markedFinal: true,
|
|
58730
|
+
modifyPassword: false,
|
|
58731
|
+
readOnlyRecommended: false
|
|
58732
|
+
}
|
|
58733
|
+
};
|
|
58734
|
+
}
|
|
58735
|
+
function markAsFinalProperties(customProperties, final) {
|
|
58736
|
+
if (isMarkedAsFinal(customProperties) === final) {
|
|
58737
|
+
return void 0;
|
|
58738
|
+
}
|
|
58739
|
+
const others = customProperties.filter((property) => property.name !== MARK_AS_FINAL_PROPERTY);
|
|
58740
|
+
return final ? [...others, { name: MARK_AS_FINAL_PROPERTY, value: "true", type: "bool" }] : others;
|
|
58741
|
+
}
|
|
58742
|
+
function buildPasswordProtectionActions(input) {
|
|
58743
|
+
const guard = (run2) => input.refuse() ?? run2();
|
|
58744
|
+
return {
|
|
58745
|
+
state: input.state,
|
|
58746
|
+
setOpenPassword: (password, confirmation) => guard(() => {
|
|
58747
|
+
const checked = validateOpenPassword(password, confirmation);
|
|
58748
|
+
if (!checked.ok) {
|
|
58749
|
+
return checked;
|
|
58750
|
+
}
|
|
58751
|
+
input.applyOpenPassword(password);
|
|
58752
|
+
input.markDirty();
|
|
58753
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58754
|
+
}),
|
|
58755
|
+
clearOpenPassword: () => guard(() => {
|
|
58756
|
+
input.applyOpenPassword(null);
|
|
58757
|
+
input.markDirty();
|
|
58758
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58759
|
+
}),
|
|
58760
|
+
setMarkedFinal: (final) => guard(() => {
|
|
58761
|
+
const next2 = markAsFinalProperties(input.customProperties(), final);
|
|
58762
|
+
if (next2) {
|
|
58763
|
+
input.applyCustomProperties(next2);
|
|
58764
|
+
}
|
|
58765
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58766
|
+
}),
|
|
58767
|
+
setModifyPassword: () => input.refuse() ?? buildingBlockFailure("unsupported")
|
|
58768
|
+
};
|
|
58769
|
+
}
|
|
58770
|
+
function describeSignaturesState(input) {
|
|
58771
|
+
return {
|
|
58772
|
+
signed: input.signed,
|
|
58773
|
+
count: input.count,
|
|
58774
|
+
removedOnSave: true,
|
|
58775
|
+
supported: { list: true, remove: true, create: false, trust: false }
|
|
58776
|
+
};
|
|
58777
|
+
}
|
|
58778
|
+
function toHostSignatureInfo(signature) {
|
|
58779
|
+
const { certificate } = signature;
|
|
58780
|
+
return {
|
|
58781
|
+
path: signature.signaturePath,
|
|
58782
|
+
...certificate?.subject ? { signer: certificate.subject } : {},
|
|
58783
|
+
...certificate?.issuer ? { issuer: certificate.issuer } : {},
|
|
58784
|
+
...certificate?.validFrom ? { validFrom: certificate.validFrom } : {},
|
|
58785
|
+
...certificate?.validTo ? { validTo: certificate.validTo } : {},
|
|
58786
|
+
expired: signature.status === "expired",
|
|
58787
|
+
integrity: signature.integrity
|
|
58788
|
+
};
|
|
58789
|
+
}
|
|
58790
|
+
async function listPackageSignatures(content) {
|
|
58791
|
+
if (!content) {
|
|
58792
|
+
return [];
|
|
58793
|
+
}
|
|
58794
|
+
return (await pptx.inspectSignaturesFromBuffer(content)).map(toHostSignatureInfo);
|
|
58795
|
+
}
|
|
58796
|
+
function buildSignatureActions(input) {
|
|
58797
|
+
return {
|
|
58798
|
+
state: input.state,
|
|
58799
|
+
list: () => listPackageSignatures(input.content()),
|
|
58800
|
+
remove: () => {
|
|
58801
|
+
const denied = input.refuse();
|
|
58802
|
+
if (denied) {
|
|
58803
|
+
return denied;
|
|
58804
|
+
}
|
|
58805
|
+
if (!input.state.signed) {
|
|
58806
|
+
return buildingBlockFailure("no-signatures");
|
|
58807
|
+
}
|
|
58808
|
+
input.markDirty();
|
|
58809
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58810
|
+
},
|
|
58811
|
+
sign: () => buildingBlockFailure("unsupported")
|
|
58812
|
+
};
|
|
57756
58813
|
}
|
|
57757
58814
|
|
|
57758
|
-
// src/pptx/render/
|
|
57759
|
-
var
|
|
57760
|
-
|
|
57761
|
-
|
|
57762
|
-
|
|
57763
|
-
|
|
57764
|
-
|
|
58815
|
+
// src/pptx/render/building-block-show-settings.ts
|
|
58816
|
+
var SHOW_TYPES = ["presented", "browsed", "kiosk"];
|
|
58817
|
+
var ADVANCE_MODES = ["manual", "useTimings"];
|
|
58818
|
+
var SLIDES_MODES = ["all", "range", "customShow"];
|
|
58819
|
+
function applySlideShowSettingsPatch(current, patch, context3) {
|
|
58820
|
+
const next2 = { ...current, ...patch };
|
|
58821
|
+
if (patch.showType === "kiosk") {
|
|
58822
|
+
next2.loopContinuously = true;
|
|
57765
58823
|
}
|
|
57766
|
-
|
|
58824
|
+
if (patch.showSlidesMode === "range") {
|
|
58825
|
+
next2.showSlidesFrom = patch.showSlidesFrom ?? current.showSlidesFrom ?? 1;
|
|
58826
|
+
next2.showSlidesTo = patch.showSlidesTo ?? current.showSlidesTo ?? context3.slideCount;
|
|
58827
|
+
}
|
|
58828
|
+
if (patch.showSlidesMode === "customShow") {
|
|
58829
|
+
const id = patch.showSlidesCustomShowId ?? current.showSlidesCustomShowId ?? context3.customShows[0]?.id;
|
|
58830
|
+
if (id !== void 0) {
|
|
58831
|
+
next2.showSlidesCustomShowId = id;
|
|
58832
|
+
}
|
|
58833
|
+
}
|
|
58834
|
+
return next2;
|
|
57767
58835
|
}
|
|
57768
|
-
|
|
57769
|
-
|
|
57770
|
-
|
|
57771
|
-
|
|
57772
|
-
|
|
57773
|
-
|
|
58836
|
+
function validateSlideShowSettings(settings, context3) {
|
|
58837
|
+
const known = (value, list2) => value === void 0 || list2.includes(value);
|
|
58838
|
+
if (!known(settings.showType, SHOW_TYPES) || !known(settings.advanceMode, ADVANCE_MODES) || !known(settings.showSlidesMode, SLIDES_MODES)) {
|
|
58839
|
+
return buildingBlockFailure("invalid-data");
|
|
58840
|
+
}
|
|
58841
|
+
if (settings.showSlidesMode === "range") {
|
|
58842
|
+
const from = settings.showSlidesFrom ?? 1;
|
|
58843
|
+
const to = settings.showSlidesTo ?? context3.slideCount;
|
|
58844
|
+
if (!Number.isInteger(from) || !Number.isInteger(to) || from < 1 || to > context3.slideCount || from > to) {
|
|
58845
|
+
return buildingBlockFailure("invalid-range");
|
|
58846
|
+
}
|
|
58847
|
+
}
|
|
58848
|
+
if (settings.showSlidesMode === "customShow" && !context3.customShows.some((show) => show.id === settings.showSlidesCustomShowId)) {
|
|
58849
|
+
return buildingBlockFailure("unknown-show");
|
|
58850
|
+
}
|
|
58851
|
+
if (settings.penColor !== void 0 && !/^#?[0-9a-f]{6}$/i.test(settings.penColor)) {
|
|
58852
|
+
return buildingBlockFailure("invalid-data");
|
|
58853
|
+
}
|
|
58854
|
+
return BUILDING_BLOCK_OK;
|
|
58855
|
+
}
|
|
58856
|
+
function describeSlideShowSettings(settings, context3) {
|
|
58857
|
+
return {
|
|
58858
|
+
showType: settings.showType ?? "presented",
|
|
58859
|
+
loop: Boolean(settings.loopContinuously),
|
|
58860
|
+
playNarration: settings.showWithNarration !== false,
|
|
58861
|
+
playAnimation: settings.showWithAnimation !== false,
|
|
58862
|
+
subtitles: Boolean(settings.showSubtitles),
|
|
58863
|
+
advanceMode: settings.advanceMode ?? "useTimings",
|
|
58864
|
+
slidesMode: settings.showSlidesMode ?? "all",
|
|
58865
|
+
rangeFrom: settings.showSlidesFrom ?? 1,
|
|
58866
|
+
rangeTo: settings.showSlidesTo ?? context3.slideCount,
|
|
58867
|
+
customShowId: settings.showSlidesCustomShowId,
|
|
58868
|
+
penColor: settings.penColor,
|
|
58869
|
+
kioskRestartTime: settings.kioskRestartTime,
|
|
58870
|
+
showScrollbar: settings.showScrollbar ?? true,
|
|
58871
|
+
slideCount: context3.slideCount,
|
|
58872
|
+
customShows: context3.customShows.map(({ id, name }) => ({ id, name }))
|
|
58873
|
+
};
|
|
58874
|
+
}
|
|
58875
|
+
function resolveSlideShowSettings(current, patch, context3) {
|
|
58876
|
+
const settings = applySlideShowSettingsPatch(current, patch, context3);
|
|
58877
|
+
const checked = validateSlideShowSettings(settings, context3);
|
|
58878
|
+
return checked.ok ? { ok: true, settings } : { ok: false, code: checked.code };
|
|
58879
|
+
}
|
|
58880
|
+
function applyCustomShowEdit(shows, slides, edit) {
|
|
58881
|
+
const known = new Set(slides.map((slide) => slide.rId));
|
|
58882
|
+
const fail = (code) => ({ ok: false, code });
|
|
58883
|
+
if ("id" in edit && !shows.some((show) => show.id === edit.id)) {
|
|
58884
|
+
return fail("unknown-show");
|
|
58885
|
+
}
|
|
58886
|
+
if ((edit.kind === "create" || edit.kind === "rename") && edit.name.trim() === "") {
|
|
58887
|
+
return fail("invalid-name");
|
|
58888
|
+
}
|
|
58889
|
+
const rIds = edit.kind === "create" || edit.kind === "setSlides" ? edit.slideRIds : void 0;
|
|
58890
|
+
if (rIds?.some((rId) => !known.has(rId))) {
|
|
58891
|
+
return fail("unknown-slide");
|
|
58892
|
+
}
|
|
58893
|
+
const controller = createCustomShowsController(shows, "id" in edit ? edit.id : null);
|
|
58894
|
+
let showId = "id" in edit ? edit.id : void 0;
|
|
58895
|
+
let next2;
|
|
58896
|
+
if (edit.kind === "setSlides") {
|
|
58897
|
+
next2 = customShowOperations.setCustomShowSlides(shows, edit.id, edit.slideRIds).shows;
|
|
58898
|
+
} else {
|
|
58899
|
+
if (edit.kind === "create") {
|
|
58900
|
+
controller.create(edit.name);
|
|
58901
|
+
} else if (edit.kind === "rename") {
|
|
58902
|
+
controller.rename(edit.name);
|
|
58903
|
+
} else if (edit.kind === "copy") {
|
|
58904
|
+
controller.copySelected(edit.name);
|
|
58905
|
+
} else {
|
|
58906
|
+
controller.removeSelected();
|
|
58907
|
+
}
|
|
58908
|
+
const state = controller.getSnapshot();
|
|
58909
|
+
next2 = state.shows;
|
|
58910
|
+
showId = edit.kind === "remove" ? void 0 : state.selectedId ?? void 0;
|
|
58911
|
+
}
|
|
58912
|
+
if (edit.kind === "create" && rIds && rIds.length > 0 && showId !== void 0) {
|
|
58913
|
+
next2 = customShowOperations.setCustomShowSlides(next2, showId, rIds).shows;
|
|
58914
|
+
}
|
|
58915
|
+
const result = controller.result(slides);
|
|
57774
58916
|
return {
|
|
57775
|
-
|
|
57776
|
-
|
|
57777
|
-
|
|
57778
|
-
|
|
57779
|
-
|
|
57780
|
-
|
|
57781
|
-
|
|
58917
|
+
ok: true,
|
|
58918
|
+
shows: next2.map((show) => ({ ...show, slideRIds: [...show.slideRIds] })),
|
|
58919
|
+
slides: result.slides,
|
|
58920
|
+
showId
|
|
58921
|
+
};
|
|
58922
|
+
}
|
|
58923
|
+
function resolveCustomShowStart(shows, slides, id) {
|
|
58924
|
+
const show = shows.find((candidate) => candidate.id === id);
|
|
58925
|
+
if (!show) {
|
|
58926
|
+
return { ok: false, code: "unknown-show" };
|
|
58927
|
+
}
|
|
58928
|
+
const first = customShowOperations.customShowSlides(show, slides)[0];
|
|
58929
|
+
return first ? { ok: true, firstSlideIndex: slides.indexOf(first) } : { ok: false, code: "no-slide" };
|
|
58930
|
+
}
|
|
58931
|
+
function describeCustomShows(shows, slides) {
|
|
58932
|
+
return {
|
|
58933
|
+
shows: shows.map((show) => ({
|
|
58934
|
+
id: show.id,
|
|
58935
|
+
name: show.name,
|
|
58936
|
+
slideRIds: [...show.slideRIds],
|
|
58937
|
+
slideCount: customShowOperations.customShowSlides(show, slides).length
|
|
58938
|
+
})),
|
|
58939
|
+
slides: slides.map((slide, index) => ({ rId: slide.rId, number: index + 1 }))
|
|
57782
58940
|
};
|
|
57783
58941
|
}
|
|
57784
58942
|
|
|
57785
|
-
// src/pptx/render/
|
|
57786
|
-
var
|
|
58943
|
+
// src/pptx/render/viewer-preferences.ts
|
|
58944
|
+
var DEFAULT_VIEWER_PREFERENCES = {
|
|
58945
|
+
autoSave: true,
|
|
58946
|
+
spellCheck: false,
|
|
58947
|
+
showGrid: false,
|
|
58948
|
+
showRulers: false,
|
|
58949
|
+
snapToGrid: false,
|
|
58950
|
+
reducedMotion: false
|
|
58951
|
+
};
|
|
58952
|
+
var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
|
|
58953
|
+
var VIEWER_SHORTCUT_REFERENCE = [
|
|
58954
|
+
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
|
|
57787
58955
|
{
|
|
57788
|
-
|
|
57789
|
-
|
|
57790
|
-
|
|
57791
|
-
|
|
57792
|
-
|
|
58956
|
+
actionKey: "pptx.toolbar.redo",
|
|
58957
|
+
shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
|
|
58958
|
+
group: "history"
|
|
58959
|
+
},
|
|
58960
|
+
{ actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
|
|
58961
|
+
{ actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
|
|
58962
|
+
{ actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
|
|
58963
|
+
{
|
|
58964
|
+
actionKey: "pptx.shortcuts.action.duplicateElement",
|
|
58965
|
+
shortcut: "Ctrl/Cmd+D",
|
|
58966
|
+
group: "editing"
|
|
58967
|
+
},
|
|
58968
|
+
{
|
|
58969
|
+
actionKey: "pptx.shortcuts.action.deleteElement",
|
|
58970
|
+
shortcut: "Delete / Backspace",
|
|
58971
|
+
group: "editing"
|
|
58972
|
+
},
|
|
58973
|
+
{ actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
|
|
58974
|
+
{ actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
|
|
58975
|
+
{ actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
|
|
58976
|
+
{ actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
|
|
58977
|
+
{
|
|
58978
|
+
actionKey: "pptx.shortcuts.action.nudgeElementLarge",
|
|
58979
|
+
shortcut: "Shift+Arrow keys",
|
|
58980
|
+
group: "editing"
|
|
58981
|
+
},
|
|
58982
|
+
{
|
|
58983
|
+
actionKey: "pptx.shortcuts.action.prevSlide",
|
|
58984
|
+
shortcut: "Left or Up arrow, Page Up",
|
|
58985
|
+
group: "navigation"
|
|
58986
|
+
},
|
|
58987
|
+
{
|
|
58988
|
+
actionKey: "pptx.shortcuts.action.nextSlide",
|
|
58989
|
+
shortcut: "Right or Down arrow, Page Down",
|
|
58990
|
+
group: "navigation"
|
|
58991
|
+
},
|
|
58992
|
+
{
|
|
58993
|
+
actionKey: "pptx.shortcuts.action.zoomCanvas",
|
|
58994
|
+
shortcut: "Ctrl/Cmd+Mouse wheel",
|
|
58995
|
+
group: "navigation"
|
|
58996
|
+
},
|
|
58997
|
+
{
|
|
58998
|
+
actionKey: "pptx.shortcuts.action.commitTextEdit",
|
|
58999
|
+
shortcut: "Ctrl/Cmd+Enter",
|
|
59000
|
+
group: "editing"
|
|
59001
|
+
},
|
|
59002
|
+
{ actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
|
|
59003
|
+
// Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
|
|
59004
|
+
// bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
|
|
59005
|
+
// was advertising neither. The help panel is the keymap's documentation: a
|
|
59006
|
+
// chord missing here is a chord nobody discovers.
|
|
59007
|
+
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
|
|
59008
|
+
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
|
|
59009
|
+
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
|
|
59010
|
+
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
|
|
59011
|
+
];
|
|
59012
|
+
var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
|
|
59013
|
+
history: "pptx.editorToolbar.history",
|
|
59014
|
+
clipboard: "pptx.ribbon.clipboard",
|
|
59015
|
+
editing: "pptx.shortcuts.group.editing",
|
|
59016
|
+
navigation: "pptx.shortcuts.group.navigation",
|
|
59017
|
+
general: "pptx.settings.general"
|
|
59018
|
+
};
|
|
59019
|
+
function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
|
|
59020
|
+
const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
|
|
59021
|
+
return order.map((group) => ({
|
|
59022
|
+
group,
|
|
59023
|
+
labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
|
|
59024
|
+
shortcuts: items.filter((item4) => item4.group === group)
|
|
59025
|
+
})).filter((bucket) => bucket.shortcuts.length > 0);
|
|
59026
|
+
}
|
|
59027
|
+
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
59028
|
+
var VIEWER_PREFERENCE_TOGGLES = [
|
|
59029
|
+
{ key: "autoSave", labelKey: "pptx.settings.autoSave" },
|
|
59030
|
+
{ key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
|
|
59031
|
+
{ key: "showGrid", labelKey: "pptx.settings.showGrid" },
|
|
59032
|
+
{ key: "showRulers", labelKey: "pptx.settings.showRulers" },
|
|
59033
|
+
{ key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
|
|
59034
|
+
{ key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
|
|
59035
|
+
];
|
|
59036
|
+
var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
|
|
59037
|
+
function updateViewerPreference(preferences, key, value) {
|
|
59038
|
+
return { ...preferences, [key]: value };
|
|
59039
|
+
}
|
|
59040
|
+
function viewerPreferencesFromViewProperties(data, defaults) {
|
|
59041
|
+
const slideViewPr = data.viewProperties?.slideViewPr;
|
|
59042
|
+
const gridSpacing = data.viewProperties?.gridSpacing;
|
|
59043
|
+
return {
|
|
59044
|
+
...defaults,
|
|
59045
|
+
snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
|
|
59046
|
+
snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
|
|
59047
|
+
showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
|
|
59048
|
+
gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
|
|
59049
|
+
gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
|
|
59050
|
+
};
|
|
59051
|
+
}
|
|
59052
|
+
function viewPropertiesPatchFromPreferences(preferences) {
|
|
59053
|
+
const patch = {
|
|
59054
|
+
slideViewPr: {
|
|
59055
|
+
snapToGrid: preferences.snapToGrid,
|
|
59056
|
+
snapToObjects: preferences.snapToObjects ?? false,
|
|
59057
|
+
showGuides: preferences.showGuides ?? false
|
|
59058
|
+
}
|
|
59059
|
+
};
|
|
59060
|
+
if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
|
|
59061
|
+
patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
|
|
59062
|
+
}
|
|
59063
|
+
return patch;
|
|
59064
|
+
}
|
|
59065
|
+
|
|
59066
|
+
// src/pptx/render/building-block-show-dialogs.ts
|
|
59067
|
+
function describeShowDialogActions(input) {
|
|
59068
|
+
const gate = describeBuildingBlockActions(input).replace;
|
|
59069
|
+
const edit = () => gate.available ? { available: true, needsHostUi: true } : { available: false, reason: gate.reason ?? "not-ready", needsHostUi: true };
|
|
59070
|
+
return {
|
|
59071
|
+
setUpSlideShow: edit(),
|
|
59072
|
+
customShows: edit(),
|
|
59073
|
+
broadcast: { available: false, reason: "unsupported", needsHostUi: true },
|
|
59074
|
+
shortcuts: { available: true, needsHostUi: true }
|
|
59075
|
+
};
|
|
59076
|
+
}
|
|
59077
|
+
function describeBroadcastSupport() {
|
|
59078
|
+
return { supported: false, reason: "unsupported", requires: "collaboration-service" };
|
|
59079
|
+
}
|
|
59080
|
+
function describeShortcutCatalogue(translate2) {
|
|
59081
|
+
return groupShortcutReference(VIEWER_SHORTCUT_REFERENCE).flatMap(
|
|
59082
|
+
(bucket) => bucket.shortcuts.map((item4) => ({
|
|
59083
|
+
id: item4.actionKey.replace(/^pptx\./, "").replace(/^shortcuts\.action\./, ""),
|
|
59084
|
+
descriptionKey: item4.actionKey,
|
|
59085
|
+
description: translate2(item4.actionKey),
|
|
59086
|
+
keys: item4.shortcut,
|
|
59087
|
+
alternatives: item4.shortcut.split(" or ").map((part2) => part2.trim()),
|
|
59088
|
+
group: item4.group,
|
|
59089
|
+
groupLabel: translate2(bucket.labelKey)
|
|
59090
|
+
}))
|
|
59091
|
+
);
|
|
59092
|
+
}
|
|
59093
|
+
|
|
59094
|
+
// src/pptx/render/building-blocks/action-groups.ts
|
|
59095
|
+
function defineBuildingBlockActionGroup(group) {
|
|
59096
|
+
return group;
|
|
59097
|
+
}
|
|
59098
|
+
function createBuildingBlockGroupContext(requests, refuse, ready) {
|
|
59099
|
+
return {
|
|
59100
|
+
refuse,
|
|
59101
|
+
ready,
|
|
59102
|
+
request: (next2) => requests.request(next2),
|
|
59103
|
+
complete: (kind, result) => requests.complete(kind, result)
|
|
59104
|
+
};
|
|
59105
|
+
}
|
|
59106
|
+
|
|
59107
|
+
// src/pptx/render/find-replace-session.ts
|
|
59108
|
+
var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
|
|
59109
|
+
matchCase: false,
|
|
59110
|
+
includeNotes: false,
|
|
59111
|
+
includeChartTitles: true,
|
|
59112
|
+
includeChartData: false
|
|
59113
|
+
});
|
|
59114
|
+
var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
|
|
59115
|
+
query: "",
|
|
59116
|
+
replacement: "",
|
|
59117
|
+
options: DEFAULT_FIND_REPLACE_OPTIONS,
|
|
59118
|
+
matches: Object.freeze([]),
|
|
59119
|
+
current: -1,
|
|
59120
|
+
pendingRefind: null
|
|
59121
|
+
});
|
|
59122
|
+
function search(slides, session) {
|
|
59123
|
+
return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
|
|
59124
|
+
}
|
|
59125
|
+
function cursorAfterReplace(pending3, count) {
|
|
59126
|
+
if (count === 0) {
|
|
59127
|
+
return -1;
|
|
59128
|
+
}
|
|
59129
|
+
if (pending3.scope === "all") {
|
|
59130
|
+
return 0;
|
|
59131
|
+
}
|
|
59132
|
+
const created = Math.max(0, count - (pending3.count - 1));
|
|
59133
|
+
return (pending3.index + created) % count;
|
|
59134
|
+
}
|
|
59135
|
+
function reduceFindReplaceSession(session, event) {
|
|
59136
|
+
switch (event.type) {
|
|
59137
|
+
case "search": {
|
|
59138
|
+
const next2 = {
|
|
59139
|
+
...session,
|
|
59140
|
+
query: event.query ?? session.query,
|
|
59141
|
+
options: event.options ? { ...session.options, ...event.options } : session.options,
|
|
59142
|
+
pendingRefind: null
|
|
59143
|
+
};
|
|
59144
|
+
const matches = search(event.slides, next2);
|
|
59145
|
+
return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
|
|
59146
|
+
}
|
|
59147
|
+
case "setReplacement":
|
|
59148
|
+
return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
|
|
59149
|
+
case "step": {
|
|
59150
|
+
const count = session.matches.length;
|
|
59151
|
+
if (count === 0) {
|
|
59152
|
+
return session;
|
|
59153
|
+
}
|
|
59154
|
+
const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
|
|
59155
|
+
const current = (from + event.direction + count) % count;
|
|
59156
|
+
return current === session.current ? session : { ...session, current };
|
|
59157
|
+
}
|
|
59158
|
+
case "replaced":
|
|
59159
|
+
return {
|
|
59160
|
+
...session,
|
|
59161
|
+
pendingRefind: {
|
|
59162
|
+
scope: event.plan.scope,
|
|
59163
|
+
index: event.plan.index,
|
|
59164
|
+
count: event.plan.count,
|
|
59165
|
+
base: event.slides
|
|
59166
|
+
}
|
|
59167
|
+
};
|
|
59168
|
+
case "slidesChanged": {
|
|
59169
|
+
const pending3 = session.pendingRefind;
|
|
59170
|
+
if (!pending3 || event.slides === pending3.base) {
|
|
59171
|
+
return session;
|
|
59172
|
+
}
|
|
59173
|
+
const matches = search(event.slides, session);
|
|
59174
|
+
return {
|
|
59175
|
+
...session,
|
|
59176
|
+
matches,
|
|
59177
|
+
current: cursorAfterReplace(pending3, matches.length),
|
|
59178
|
+
pendingRefind: null
|
|
59179
|
+
};
|
|
59180
|
+
}
|
|
59181
|
+
case "close":
|
|
59182
|
+
return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
|
|
59183
|
+
}
|
|
59184
|
+
}
|
|
59185
|
+
function findReplaceStatus(session) {
|
|
59186
|
+
const total = session.matches.length;
|
|
59187
|
+
return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
|
|
59188
|
+
}
|
|
59189
|
+
function findReplaceTarget(session) {
|
|
59190
|
+
const match = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
59191
|
+
if (!match) {
|
|
59192
|
+
return null;
|
|
59193
|
+
}
|
|
59194
|
+
return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
|
|
59195
|
+
}
|
|
59196
|
+
function matchKey(match) {
|
|
59197
|
+
return JSON.stringify([
|
|
59198
|
+
match.slideIndex,
|
|
59199
|
+
match.elementId,
|
|
59200
|
+
match.elementPath ?? null,
|
|
59201
|
+
match.tableCell ?? null,
|
|
59202
|
+
match.smartArtNodeId ?? null,
|
|
59203
|
+
match.notes ?? false,
|
|
59204
|
+
match.chartTitle ?? false,
|
|
59205
|
+
match.chartSeriesIndex ?? null,
|
|
59206
|
+
match.chartCategoryIndex ?? null,
|
|
59207
|
+
match.segmentIndex,
|
|
59208
|
+
match.startOffset,
|
|
59209
|
+
match.length
|
|
59210
|
+
]);
|
|
59211
|
+
}
|
|
59212
|
+
function planFindReplace(session, slides, scope) {
|
|
59213
|
+
const found = search(slides, session);
|
|
59214
|
+
let matches = found;
|
|
59215
|
+
let index = -1;
|
|
59216
|
+
if (scope === "current") {
|
|
59217
|
+
const current = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
59218
|
+
const key = current ? matchKey(current) : null;
|
|
59219
|
+
index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
|
|
59220
|
+
matches = index >= 0 ? [found[index]] : [];
|
|
59221
|
+
}
|
|
59222
|
+
if (matches.length === 0 || matches.some((match) => match.readOnly)) {
|
|
59223
|
+
return null;
|
|
59224
|
+
}
|
|
59225
|
+
return { scope, matches, replacement: session.replacement, count: found.length, index };
|
|
59226
|
+
}
|
|
59227
|
+
|
|
59228
|
+
// src/pptx/render/find-replace-session-actions.ts
|
|
59229
|
+
function findReplaceSessionActions(store, host2) {
|
|
59230
|
+
const apply7 = (event) => {
|
|
59231
|
+
const current = store.get();
|
|
59232
|
+
const next2 = reduceFindReplaceSession(current, event);
|
|
59233
|
+
if (next2 !== current) {
|
|
59234
|
+
store.set(next2);
|
|
59235
|
+
}
|
|
59236
|
+
return next2 !== current;
|
|
59237
|
+
};
|
|
59238
|
+
const show = () => {
|
|
59239
|
+
const target = findReplaceTarget(store.get());
|
|
59240
|
+
if (target) {
|
|
59241
|
+
host2.navigate(target);
|
|
59242
|
+
}
|
|
59243
|
+
};
|
|
59244
|
+
const step2 = (direction) => {
|
|
59245
|
+
apply7({ type: "step", direction });
|
|
59246
|
+
show();
|
|
59247
|
+
};
|
|
59248
|
+
const slidesChanged = () => {
|
|
59249
|
+
if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
|
|
59250
|
+
show();
|
|
59251
|
+
}
|
|
59252
|
+
};
|
|
59253
|
+
const replace = (scope) => {
|
|
59254
|
+
const slides = host2.slides();
|
|
59255
|
+
const plan = planFindReplace(store.get(), slides, scope);
|
|
59256
|
+
if (!plan) {
|
|
59257
|
+
return 0;
|
|
59258
|
+
}
|
|
59259
|
+
const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
|
|
59260
|
+
if (result.replacements === 0) {
|
|
59261
|
+
return 0;
|
|
59262
|
+
}
|
|
59263
|
+
host2.commit(result.slides, scope);
|
|
59264
|
+
apply7({ type: "replaced", plan, slides });
|
|
59265
|
+
slidesChanged();
|
|
59266
|
+
return result.replacements;
|
|
59267
|
+
};
|
|
59268
|
+
return {
|
|
59269
|
+
search: (change = {}) => {
|
|
59270
|
+
apply7({ type: "search", slides: host2.slides(), ...change });
|
|
59271
|
+
show();
|
|
59272
|
+
},
|
|
59273
|
+
setReplacement: (replacement) => {
|
|
59274
|
+
apply7({ type: "setReplacement", replacement });
|
|
59275
|
+
},
|
|
59276
|
+
next: () => step2(1),
|
|
59277
|
+
previous: () => step2(-1),
|
|
59278
|
+
replaceCurrent: () => replace("current"),
|
|
59279
|
+
replaceAll: () => replace("all"),
|
|
59280
|
+
slidesChanged,
|
|
59281
|
+
close: () => {
|
|
59282
|
+
apply7({ type: "close" });
|
|
59283
|
+
}
|
|
59284
|
+
};
|
|
59285
|
+
}
|
|
59286
|
+
|
|
59287
|
+
// src/pptx/render/building-blocks/find-bar-controller.ts
|
|
59288
|
+
function createFindBarController(host2) {
|
|
59289
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore({
|
|
59290
|
+
open: false,
|
|
59291
|
+
session: INITIAL_FIND_REPLACE_SESSION
|
|
59292
|
+
});
|
|
59293
|
+
const actions = findReplaceSessionActions(
|
|
59294
|
+
{
|
|
59295
|
+
get: () => store.getSnapshot().session,
|
|
59296
|
+
set: (session) => store.update((current) => ({ ...current, session }))
|
|
59297
|
+
},
|
|
59298
|
+
host2
|
|
59299
|
+
);
|
|
59300
|
+
const setOpen = (open) => {
|
|
59301
|
+
if (store.getSnapshot().open === open) {
|
|
59302
|
+
return;
|
|
59303
|
+
}
|
|
59304
|
+
if (!open) {
|
|
59305
|
+
actions.close();
|
|
59306
|
+
}
|
|
59307
|
+
store.update((current) => ({ ...current, open }));
|
|
59308
|
+
};
|
|
59309
|
+
return {
|
|
59310
|
+
getSnapshot: store.getSnapshot,
|
|
59311
|
+
subscribe: store.subscribe,
|
|
59312
|
+
setOpen,
|
|
59313
|
+
toggle: () => setOpen(!store.getSnapshot().open),
|
|
59314
|
+
slidesChanged: () => actions.slidesChanged(),
|
|
59315
|
+
port() {
|
|
59316
|
+
const { open, session } = store.getSnapshot();
|
|
59317
|
+
return {
|
|
59318
|
+
open,
|
|
59319
|
+
setOpen,
|
|
59320
|
+
query: session.query,
|
|
59321
|
+
replacement: session.replacement,
|
|
59322
|
+
options: session.options,
|
|
59323
|
+
matches: session.matches,
|
|
59324
|
+
currentIndex: session.current,
|
|
59325
|
+
setQuery: (query) => actions.search({ query }),
|
|
59326
|
+
setReplacement: (replacement) => actions.setReplacement(replacement),
|
|
59327
|
+
setOptions: (change) => actions.search({ options: change }),
|
|
59328
|
+
find: () => actions.search(),
|
|
59329
|
+
navigate: (delta) => delta > 0 ? actions.next() : actions.previous(),
|
|
59330
|
+
replaceCurrent: () => void actions.replaceCurrent(),
|
|
59331
|
+
replaceAll: () => void actions.replaceAll()
|
|
59332
|
+
};
|
|
59333
|
+
}
|
|
59334
|
+
};
|
|
59335
|
+
}
|
|
59336
|
+
|
|
59337
|
+
// src/pptx/render/building-blocks/find-layout.ts
|
|
59338
|
+
function buildFindReplaceActions(port, refuseReplace) {
|
|
59339
|
+
const { matches, currentIndex } = port;
|
|
59340
|
+
return {
|
|
59341
|
+
open: port.open,
|
|
59342
|
+
setOpen: port.setOpen,
|
|
59343
|
+
query: port.query,
|
|
59344
|
+
replacement: port.replacement,
|
|
59345
|
+
options: port.options,
|
|
59346
|
+
matches,
|
|
59347
|
+
currentIndex,
|
|
59348
|
+
currentMatch: matches[currentIndex] ?? null,
|
|
59349
|
+
setQuery: port.setQuery,
|
|
59350
|
+
setReplacement: port.setReplacement,
|
|
59351
|
+
setOptions: port.setOptions,
|
|
59352
|
+
find: port.find,
|
|
59353
|
+
next: () => port.navigate(1),
|
|
59354
|
+
previous: () => port.navigate(-1),
|
|
59355
|
+
replaceCurrent: () => refuseReplace() ?? (matches[currentIndex] === void 0 ? buildingBlockFailure("no-match") : (port.replaceCurrent(), BUILDING_BLOCK_OK)),
|
|
59356
|
+
replaceAll: () => refuseReplace() ?? (matches.length === 0 ? buildingBlockFailure("no-match") : (port.replaceAll(), BUILDING_BLOCK_OK))
|
|
59357
|
+
};
|
|
59358
|
+
}
|
|
59359
|
+
function buildLayoutActions(deps) {
|
|
59360
|
+
const apply7 = async (path, requireListed) => {
|
|
59361
|
+
const denied = deps.refuse("applyLayout");
|
|
59362
|
+
if (denied) {
|
|
59363
|
+
return denied;
|
|
59364
|
+
}
|
|
59365
|
+
if (requireListed && !deps.getScopedLayouts().some((layout) => layout.path === path)) {
|
|
59366
|
+
return buildingBlockFailure("unknown-layout");
|
|
59367
|
+
}
|
|
59368
|
+
try {
|
|
59369
|
+
await deps.applyLayout(path);
|
|
59370
|
+
return BUILDING_BLOCK_OK;
|
|
59371
|
+
} catch {
|
|
59372
|
+
return buildingBlockFailure("unknown-layout");
|
|
59373
|
+
}
|
|
59374
|
+
};
|
|
59375
|
+
const reset = async () => {
|
|
59376
|
+
const path = chunkCWWL7MCL_cjs.resetSlideLayoutPath(deps.getActiveSlide());
|
|
59377
|
+
if (path === void 0) {
|
|
59378
|
+
return buildingBlockFailure("no-layout");
|
|
59379
|
+
}
|
|
59380
|
+
return deps.refuse("resetLayout") ?? apply7(path, false);
|
|
59381
|
+
};
|
|
59382
|
+
return {
|
|
59383
|
+
layout: {
|
|
59384
|
+
current: deps.scopedLayouts.find((layout) => layout.path === deps.activeSlide?.layoutPath),
|
|
59385
|
+
currentPath: deps.activeSlide?.layoutPath,
|
|
59386
|
+
available: deps.scopedLayouts,
|
|
59387
|
+
apply: (path) => apply7(path, true),
|
|
59388
|
+
reset
|
|
59389
|
+
},
|
|
59390
|
+
apply: apply7,
|
|
59391
|
+
reset
|
|
59392
|
+
};
|
|
59393
|
+
}
|
|
59394
|
+
|
|
59395
|
+
// src/pptx/render/building-blocks/groups/file-dialog-groups.ts
|
|
59396
|
+
var passwordProtectionGroup = defineBuildingBlockActionGroup({
|
|
59397
|
+
id: "passwordProtection",
|
|
59398
|
+
create: (context3, port) => buildPasswordProtectionActions({
|
|
59399
|
+
state: describePasswordProtection(port.input()),
|
|
59400
|
+
customProperties: () => port.customProperties(),
|
|
59401
|
+
refuse: () => context3.refuse("passwordProtection"),
|
|
59402
|
+
applyOpenPassword: (password) => port.applyOpenPassword(password),
|
|
59403
|
+
applyCustomProperties: (next2) => port.applyCustomProperties(next2),
|
|
59404
|
+
markDirty: () => port.markDirty(),
|
|
59405
|
+
complete: (result) => context3.complete("passwordProtection", result)
|
|
59406
|
+
})
|
|
59407
|
+
});
|
|
59408
|
+
var documentPropertiesGroup = defineBuildingBlockActionGroup({
|
|
59409
|
+
id: "documentProperties",
|
|
59410
|
+
create: (context3, port) => buildDocumentPropertiesActions({
|
|
59411
|
+
current: () => port.current(),
|
|
59412
|
+
refuse: () => context3.refuse("documentProperties"),
|
|
59413
|
+
applyUpdate: (update) => port.applyUpdate(update),
|
|
59414
|
+
complete: (result) => context3.complete("documentProperties", result)
|
|
59415
|
+
})
|
|
59416
|
+
});
|
|
59417
|
+
var fontEmbeddingGroup = defineBuildingBlockActionGroup({
|
|
59418
|
+
id: "fontEmbedding",
|
|
59419
|
+
create: (context3, port) => buildFontEmbeddingActions({
|
|
59420
|
+
state: describeFontEmbeddingState(port.input()),
|
|
59421
|
+
refuse: () => context3.refuse("fontEmbedding"),
|
|
59422
|
+
latest: () => {
|
|
59423
|
+
const { embedFonts, canEmbed } = describeFontEmbeddingState(port.input());
|
|
59424
|
+
return { embedFonts, canEmbed };
|
|
59425
|
+
},
|
|
59426
|
+
apply: (enabled) => port.apply(enabled),
|
|
59427
|
+
markDirty: () => port.markDirty(),
|
|
59428
|
+
complete: (result) => context3.complete("fontEmbedding", result)
|
|
59429
|
+
})
|
|
59430
|
+
});
|
|
59431
|
+
var digitalSignaturesGroup = defineBuildingBlockActionGroup({
|
|
59432
|
+
id: "digitalSignatures",
|
|
59433
|
+
create: (context3, port) => buildSignatureActions({
|
|
59434
|
+
state: describeSignaturesState({ signed: port.signed(), count: port.count() }),
|
|
59435
|
+
content: () => port.content(),
|
|
59436
|
+
refuse: () => context3.refuse("digitalSignatures"),
|
|
59437
|
+
markDirty: () => port.markDirty(),
|
|
59438
|
+
complete: (result) => context3.complete("digitalSignatures", result)
|
|
59439
|
+
})
|
|
59440
|
+
});
|
|
59441
|
+
|
|
59442
|
+
// src/pptx/render/building-blocks/groups/show-dialog-groups.ts
|
|
59443
|
+
var settingsContext = (port) => ({
|
|
59444
|
+
slideCount: port.slideCount(),
|
|
59445
|
+
customShows: [...port.customShows()]
|
|
59446
|
+
});
|
|
59447
|
+
var setUpSlideShowGroup = defineBuildingBlockActionGroup({
|
|
59448
|
+
id: "setUpSlideShow",
|
|
59449
|
+
create: (context3, port) => ({
|
|
59450
|
+
current: describeSlideShowSettings(port.presentationProperties(), settingsContext(port)),
|
|
59451
|
+
apply: (patch) => {
|
|
59452
|
+
const denied = context3.refuse("setUpSlideShow");
|
|
59453
|
+
if (denied) {
|
|
59454
|
+
return denied;
|
|
59455
|
+
}
|
|
59456
|
+
const resolved2 = resolveSlideShowSettings(
|
|
59457
|
+
port.presentationProperties(),
|
|
59458
|
+
patch,
|
|
59459
|
+
settingsContext(port)
|
|
59460
|
+
);
|
|
59461
|
+
if (!resolved2.ok) {
|
|
59462
|
+
return buildingBlockFailure(resolved2.code);
|
|
59463
|
+
}
|
|
59464
|
+
port.save(resolved2.settings);
|
|
59465
|
+
return context3.complete("setUpSlideShow", BUILDING_BLOCK_OK);
|
|
59466
|
+
}
|
|
59467
|
+
})
|
|
59468
|
+
});
|
|
59469
|
+
var customShowsGroup = defineBuildingBlockActionGroup({
|
|
59470
|
+
id: "customShows",
|
|
59471
|
+
create: (context3, port) => {
|
|
59472
|
+
const edit = (change) => {
|
|
59473
|
+
const denied = context3.refuse("customShows");
|
|
59474
|
+
if (denied) {
|
|
59475
|
+
return denied;
|
|
59476
|
+
}
|
|
59477
|
+
const outcome = applyCustomShowEdit(port.customShows(), port.slides(), change);
|
|
59478
|
+
if (!outcome.ok) {
|
|
59479
|
+
return buildingBlockFailure(outcome.code);
|
|
59480
|
+
}
|
|
59481
|
+
port.commit(outcome.shows, outcome.slides);
|
|
59482
|
+
return BUILDING_BLOCK_OK;
|
|
59483
|
+
};
|
|
59484
|
+
return {
|
|
59485
|
+
...describeCustomShows(port.customShows(), port.slides()),
|
|
59486
|
+
activeId: port.activeId(),
|
|
59487
|
+
create: (name, slideRIds) => edit({ kind: "create", name, ...slideRIds ? { slideRIds } : {} }),
|
|
59488
|
+
rename: (id, name) => edit({ kind: "rename", id, name }),
|
|
59489
|
+
setSlides: (id, slideRIds) => edit({ kind: "setSlides", id, slideRIds }),
|
|
59490
|
+
copy: (id, name) => edit({ kind: "copy", id, ...name === void 0 ? {} : { name } }),
|
|
59491
|
+
remove: (id) => edit({ kind: "remove", id }),
|
|
59492
|
+
start: (id) => {
|
|
59493
|
+
if (!context3.ready()) {
|
|
59494
|
+
return buildingBlockFailure("not-ready");
|
|
59495
|
+
}
|
|
59496
|
+
const target = resolveCustomShowStart(port.customShows(), port.slides(), id);
|
|
59497
|
+
if (!target.ok) {
|
|
59498
|
+
return buildingBlockFailure(target.code);
|
|
59499
|
+
}
|
|
59500
|
+
port.start(id);
|
|
59501
|
+
return context3.complete("customShows", BUILDING_BLOCK_OK);
|
|
59502
|
+
}
|
|
59503
|
+
};
|
|
59504
|
+
}
|
|
59505
|
+
});
|
|
59506
|
+
var broadcastGroup = defineBuildingBlockActionGroup({
|
|
59507
|
+
id: "broadcast",
|
|
59508
|
+
create: (_context, _port) => describeBroadcastSupport()
|
|
59509
|
+
});
|
|
59510
|
+
var shortcutsGroup = defineBuildingBlockActionGroup({
|
|
59511
|
+
id: "shortcuts",
|
|
59512
|
+
create: (_context, port) => ({
|
|
59513
|
+
open: port.open(),
|
|
59514
|
+
setOpen: (open) => port.setOpen(open),
|
|
59515
|
+
toggle: () => port.toggle(),
|
|
59516
|
+
catalogue: describeShortcutCatalogue((key) => port.translate(key))
|
|
59517
|
+
})
|
|
59518
|
+
});
|
|
59519
|
+
|
|
59520
|
+
// src/pptx/render/building-blocks/groups/index.ts
|
|
59521
|
+
var BUILDING_BLOCK_GROUP_IDS = [
|
|
59522
|
+
"passwordProtection",
|
|
59523
|
+
"documentProperties",
|
|
59524
|
+
"fontEmbedding",
|
|
59525
|
+
"digitalSignatures",
|
|
59526
|
+
"setUpSlideShow",
|
|
59527
|
+
"customShows",
|
|
59528
|
+
"broadcast",
|
|
59529
|
+
"shortcuts"
|
|
59530
|
+
];
|
|
59531
|
+
function registerBuildingBlockGroups(session, ports) {
|
|
59532
|
+
const stops = [
|
|
59533
|
+
session.register(passwordProtectionGroup, ports.passwordProtection),
|
|
59534
|
+
session.register(documentPropertiesGroup, ports.documentProperties),
|
|
59535
|
+
session.register(fontEmbeddingGroup, ports.fontEmbedding),
|
|
59536
|
+
session.register(digitalSignaturesGroup, ports.digitalSignatures),
|
|
59537
|
+
session.register(setUpSlideShowGroup, ports.setUpSlideShow),
|
|
59538
|
+
session.register(customShowsGroup, ports.customShows),
|
|
59539
|
+
session.register(broadcastGroup, null),
|
|
59540
|
+
session.register(shortcutsGroup, ports.shortcuts)
|
|
59541
|
+
];
|
|
59542
|
+
return () => {
|
|
59543
|
+
for (const stop of stops) {
|
|
59544
|
+
stop();
|
|
59545
|
+
}
|
|
59546
|
+
};
|
|
59547
|
+
}
|
|
59548
|
+
|
|
59549
|
+
// src/pptx/render/building-blocks/hyperlink-edit-data.ts
|
|
59550
|
+
var HYPERLINK_ACTION_VERB_MAP = {
|
|
59551
|
+
"ppaction://hlinkshowjump?jump=nextslide": "nextSlide",
|
|
59552
|
+
"ppaction://hlinkshowjump?jump=previousslide": "prevSlide",
|
|
59553
|
+
"ppaction://hlinkshowjump?jump=firstslide": "firstSlide",
|
|
59554
|
+
"ppaction://hlinkshowjump?jump=lastslide": "lastSlide",
|
|
59555
|
+
"ppaction://hlinkshowjump?jump=endshow": "endShow"
|
|
59556
|
+
};
|
|
59557
|
+
var HYPERLINK_ACTION_VERB_TO_PPACTION = {
|
|
59558
|
+
nextSlide: "ppaction://hlinkshowjump?jump=nextslide",
|
|
59559
|
+
prevSlide: "ppaction://hlinkshowjump?jump=previousslide",
|
|
59560
|
+
firstSlide: "ppaction://hlinkshowjump?jump=firstslide",
|
|
59561
|
+
lastSlide: "ppaction://hlinkshowjump?jump=lastslide",
|
|
59562
|
+
endShow: "ppaction://hlinkshowjump?jump=endshow"
|
|
59563
|
+
};
|
|
59564
|
+
function detectHyperlinkTargetType(url, action) {
|
|
59565
|
+
if (action && action.startsWith("ppaction://")) {
|
|
59566
|
+
if (action.includes("hlinksldjump")) {
|
|
59567
|
+
return "slide";
|
|
59568
|
+
}
|
|
59569
|
+
return "action";
|
|
59570
|
+
}
|
|
59571
|
+
if (!url) {
|
|
59572
|
+
return "url";
|
|
59573
|
+
}
|
|
59574
|
+
if (url.startsWith("mailto:")) {
|
|
59575
|
+
return "email";
|
|
59576
|
+
}
|
|
59577
|
+
if (/^[a-zA-Z]:\\|^\.\.?[/\\]|^file:/i.test(url)) {
|
|
59578
|
+
return "file";
|
|
59579
|
+
}
|
|
59580
|
+
return "url";
|
|
59581
|
+
}
|
|
59582
|
+
function parseHyperlinkEmailUrl(url) {
|
|
59583
|
+
if (!url.startsWith("mailto:")) {
|
|
59584
|
+
return { address: url, subject: "" };
|
|
59585
|
+
}
|
|
59586
|
+
const withoutScheme = url.slice(7);
|
|
59587
|
+
const qIdx = withoutScheme.indexOf("?");
|
|
59588
|
+
if (qIdx < 0) {
|
|
59589
|
+
return { address: withoutScheme, subject: "" };
|
|
59590
|
+
}
|
|
59591
|
+
const address = withoutScheme.slice(0, qIdx);
|
|
59592
|
+
const params = new URLSearchParams(withoutScheme.slice(qIdx + 1));
|
|
59593
|
+
return { address, subject: params.get("subject") || "" };
|
|
59594
|
+
}
|
|
59595
|
+
function parseHyperlinkSlideNumber(url, action) {
|
|
59596
|
+
if (action === "ppaction://hlinksldjump" && url) {
|
|
59597
|
+
const match = url.match(/slide(\d+)\.xml$/i);
|
|
59598
|
+
if (match?.[1]) {
|
|
59599
|
+
return parseInt(match[1], 10);
|
|
59600
|
+
}
|
|
59601
|
+
}
|
|
59602
|
+
if (url) {
|
|
59603
|
+
const hashMatch = url.match(/#\s*Slide\s+(\d+)/i);
|
|
59604
|
+
if (hashMatch?.[1]) {
|
|
59605
|
+
return parseInt(hashMatch[1], 10);
|
|
59606
|
+
}
|
|
59607
|
+
}
|
|
59608
|
+
return 1;
|
|
59609
|
+
}
|
|
59610
|
+
function resolveHyperlinkEditResult(data) {
|
|
59611
|
+
const tooltip = data.tooltip.trim() || void 0;
|
|
59612
|
+
const withTooltip = (value) => tooltip === void 0 ? value : { ...value, tooltip };
|
|
59613
|
+
switch (data.targetType) {
|
|
59614
|
+
case "email": {
|
|
59615
|
+
const mailto = data.emailSubject ? `mailto:${data.emailAddress}?subject=${encodeURIComponent(data.emailSubject)}` : `mailto:${data.emailAddress}`;
|
|
59616
|
+
return withTooltip({ url: mailto });
|
|
59617
|
+
}
|
|
59618
|
+
case "slide":
|
|
59619
|
+
return withTooltip({
|
|
59620
|
+
url: `slide${data.slideNumber}.xml`,
|
|
59621
|
+
action: "ppaction://hlinksldjump"
|
|
59622
|
+
});
|
|
59623
|
+
case "file":
|
|
59624
|
+
return withTooltip({ url: data.filePath });
|
|
59625
|
+
case "action":
|
|
59626
|
+
return withTooltip({ url: "", action: HYPERLINK_ACTION_VERB_TO_PPACTION[data.actionVerb] });
|
|
59627
|
+
case "url":
|
|
59628
|
+
default:
|
|
59629
|
+
return withTooltip({ url: data.url });
|
|
59630
|
+
}
|
|
59631
|
+
}
|
|
59632
|
+
function hyperlinkEditDataFromAction(actionClick) {
|
|
59633
|
+
if (!actionClick || !actionClick.url && !actionClick.action) {
|
|
59634
|
+
return null;
|
|
59635
|
+
}
|
|
59636
|
+
const { url, action, tooltip } = actionClick;
|
|
59637
|
+
const targetType = detectHyperlinkTargetType(url, action);
|
|
59638
|
+
const email = parseHyperlinkEmailUrl(url ?? "");
|
|
59639
|
+
return {
|
|
59640
|
+
targetType,
|
|
59641
|
+
url: targetType === "url" ? url ?? "" : "",
|
|
59642
|
+
tooltip: tooltip ?? "",
|
|
59643
|
+
emailAddress: targetType === "email" ? email.address : "",
|
|
59644
|
+
emailSubject: targetType === "email" ? email.subject : "",
|
|
59645
|
+
slideNumber: parseHyperlinkSlideNumber(url, action),
|
|
59646
|
+
filePath: targetType === "file" ? url ?? "" : "",
|
|
59647
|
+
actionVerb: action && HYPERLINK_ACTION_VERB_MAP[action.toLowerCase()] || "nextSlide"
|
|
59648
|
+
};
|
|
59649
|
+
}
|
|
59650
|
+
function hyperlinkEditPatch(data) {
|
|
59651
|
+
const resolved2 = resolveHyperlinkEditResult(data);
|
|
59652
|
+
if (resolved2.url && !chunkFFWLDANS_cjs.isUrlSafe(resolved2.url)) {
|
|
59653
|
+
return { ok: false, code: "unsafe-url" };
|
|
59654
|
+
}
|
|
59655
|
+
const actionClick = {};
|
|
59656
|
+
if (resolved2.url) {
|
|
59657
|
+
actionClick.url = resolved2.url;
|
|
59658
|
+
}
|
|
59659
|
+
if (resolved2.action !== void 0) {
|
|
59660
|
+
actionClick.action = resolved2.action;
|
|
59661
|
+
}
|
|
59662
|
+
if (resolved2.tooltip !== void 0) {
|
|
59663
|
+
actionClick.tooltip = resolved2.tooltip;
|
|
59664
|
+
}
|
|
59665
|
+
return { ok: true, actionClick };
|
|
59666
|
+
}
|
|
59667
|
+
|
|
59668
|
+
// src/pptx/render/options/font-download-policy.ts
|
|
59669
|
+
var FONT_DOWNLOAD_SETTING_ID = "trust.allowFontDownloads";
|
|
59670
|
+
function resolveEffectiveGoogleFonts(host2, options) {
|
|
59671
|
+
if (host2 !== void 0) {
|
|
59672
|
+
return host2;
|
|
59673
|
+
}
|
|
59674
|
+
return options.trust.allowFontDownloads ? void 0 : false;
|
|
59675
|
+
}
|
|
59676
|
+
function resolveFontDownloadBase(host2, options) {
|
|
59677
|
+
return text$1.resolveGoogleFontsCss2Base(resolveEffectiveGoogleFonts(host2, options));
|
|
59678
|
+
}
|
|
59679
|
+
function hostFontDownloadLock(host2) {
|
|
59680
|
+
return host2 === void 0 ? void 0 : text$1.resolveGoogleFontsCss2Base(host2) !== null;
|
|
59681
|
+
}
|
|
59682
|
+
function lockFontDownloadSetting(locked, host2) {
|
|
59683
|
+
const value = hostFontDownloadLock(host2);
|
|
59684
|
+
if (value === void 0) {
|
|
59685
|
+
return locked;
|
|
59686
|
+
}
|
|
59687
|
+
return { ...locked, [FONT_DOWNLOAD_SETTING_ID]: value };
|
|
59688
|
+
}
|
|
59689
|
+
|
|
59690
|
+
// src/pptx/render/building-blocks/live-options.ts
|
|
59691
|
+
var BUILDING_BLOCK_LIVE_OPTIONS = [
|
|
59692
|
+
"content",
|
|
59693
|
+
"canEdit",
|
|
59694
|
+
"onRequest",
|
|
59695
|
+
"fileLimits",
|
|
59696
|
+
"hiddenActions",
|
|
59697
|
+
"listConversionScope",
|
|
59698
|
+
"collaboration",
|
|
59699
|
+
"googleFonts",
|
|
59700
|
+
"allowExternalContent"
|
|
59701
|
+
];
|
|
59702
|
+
function collaborationOptionChange(previous, next2) {
|
|
59703
|
+
const before = resolveCollaborationConfig(previous);
|
|
59704
|
+
const after = resolveCollaborationConfig(next2);
|
|
59705
|
+
if (before === after) {
|
|
59706
|
+
return null;
|
|
59707
|
+
}
|
|
59708
|
+
return next2 && after ? { kind: "start", input: next2 } : before ? { kind: "stop" } : null;
|
|
59709
|
+
}
|
|
59710
|
+
function googleFontsOptionChanged(previous, next2) {
|
|
59711
|
+
return hostFontDownloadLock(previous) !== hostFontDownloadLock(next2) || text$1.resolveGoogleFontsCss2Base(previous) !== text$1.resolveGoogleFontsCss2Base(next2);
|
|
59712
|
+
}
|
|
59713
|
+
function applyBuildingBlockLiveOptions(previous, next2, port) {
|
|
59714
|
+
if (next2.allowExternalContent !== previous.allowExternalContent) {
|
|
59715
|
+
port.setAllowExternalContent(next2.allowExternalContent);
|
|
59716
|
+
}
|
|
59717
|
+
if (googleFontsOptionChanged(previous.googleFonts, next2.googleFonts)) {
|
|
59718
|
+
port.setGoogleFonts(next2.googleFonts);
|
|
59719
|
+
}
|
|
59720
|
+
const collaboration = collaborationOptionChange(previous.collaboration, next2.collaboration);
|
|
59721
|
+
if (collaboration?.kind === "start") {
|
|
59722
|
+
void port.startCollaboration(collaboration.input);
|
|
59723
|
+
} else if (collaboration?.kind === "stop") {
|
|
59724
|
+
port.stopCollaboration();
|
|
59725
|
+
}
|
|
59726
|
+
}
|
|
59727
|
+
var MEDIA_AUDIO_SIZE = { width: 420, height: 64 };
|
|
59728
|
+
var MEDIA_VIDEO_MAX_SIZE = { width: 640, height: 360 };
|
|
59729
|
+
function probeVideoSize(doc, dataUrl) {
|
|
59730
|
+
const max = MEDIA_VIDEO_MAX_SIZE;
|
|
59731
|
+
return new Promise((resolve) => {
|
|
59732
|
+
const probe = doc.createElement("video");
|
|
59733
|
+
probe.preload = "metadata";
|
|
59734
|
+
probe.onloadedmetadata = () => {
|
|
59735
|
+
const width = probe.videoWidth || max.width;
|
|
59736
|
+
const height = probe.videoHeight || max.height;
|
|
59737
|
+
if (width > max.width || height > max.height) {
|
|
59738
|
+
const scale3 = Math.min(max.width / width, max.height / height);
|
|
59739
|
+
resolve({ width: Math.round(width * scale3), height: Math.round(height * scale3) });
|
|
59740
|
+
return;
|
|
59741
|
+
}
|
|
59742
|
+
resolve({ width, height });
|
|
59743
|
+
};
|
|
59744
|
+
probe.onerror = () => resolve({ width: max.width, height: max.height });
|
|
59745
|
+
probe.src = dataUrl;
|
|
59746
|
+
});
|
|
59747
|
+
}
|
|
59748
|
+
function mediaElementFromFile(file, canvasSize, doc = document) {
|
|
59749
|
+
const mediaType = classifyMediaType(file.type);
|
|
59750
|
+
if (!mediaType) {
|
|
59751
|
+
return Promise.resolve(null);
|
|
59752
|
+
}
|
|
59753
|
+
return new Promise((resolve) => {
|
|
59754
|
+
const reader = new FileReader();
|
|
59755
|
+
reader.onload = async () => {
|
|
59756
|
+
const dataUrl = typeof reader.result === "string" ? reader.result : "";
|
|
59757
|
+
if (!dataUrl) {
|
|
59758
|
+
resolve(null);
|
|
59759
|
+
return;
|
|
59760
|
+
}
|
|
59761
|
+
const size2 = mediaType === "audio" ? { ...MEDIA_AUDIO_SIZE } : await probeVideoSize(doc, dataUrl);
|
|
59762
|
+
resolve({
|
|
59763
|
+
id: pptx.createEditorId("media"),
|
|
59764
|
+
type: "media",
|
|
59765
|
+
mediaType,
|
|
59766
|
+
mediaMimeType: file.type || void 0,
|
|
59767
|
+
mediaData: dataUrl,
|
|
59768
|
+
x: Math.max(0, Math.round((canvasSize.width - size2.width) / 2)),
|
|
59769
|
+
y: Math.max(0, Math.round((canvasSize.height - size2.height) / 2)),
|
|
59770
|
+
width: size2.width,
|
|
59771
|
+
height: size2.height
|
|
59772
|
+
});
|
|
59773
|
+
};
|
|
59774
|
+
reader.onerror = () => resolve(null);
|
|
59775
|
+
reader.readAsDataURL(file);
|
|
59776
|
+
});
|
|
59777
|
+
}
|
|
59778
|
+
|
|
59779
|
+
// src/pptx/render/building-blocks/mode.ts
|
|
59780
|
+
function resolveBuildingBlockMode(mode, canEdit) {
|
|
59781
|
+
return mode === "edit" && !canEdit ? "preview" : mode;
|
|
59782
|
+
}
|
|
59783
|
+
|
|
59784
|
+
// src/pptx/render/building-blocks/requests.ts
|
|
59785
|
+
var BUILDING_BLOCK_REQUEST_ACTIONS = {
|
|
59786
|
+
image: () => "insertImage",
|
|
59787
|
+
media: () => "insertMedia",
|
|
59788
|
+
hyperlink: () => "hyperlink",
|
|
59789
|
+
smartArt: () => "insertSmartArt",
|
|
59790
|
+
chart: () => "insertChart",
|
|
59791
|
+
equation: (request) => request.existingOmml ? "editEquation" : "insertEquation",
|
|
59792
|
+
passwordProtection: () => "passwordProtection",
|
|
59793
|
+
documentProperties: () => "documentProperties",
|
|
59794
|
+
fontEmbedding: () => "fontEmbedding",
|
|
59795
|
+
digitalSignatures: () => "digitalSignatures",
|
|
59796
|
+
setUpSlideShow: () => "setUpSlideShow",
|
|
59797
|
+
customShows: () => "customShows",
|
|
59798
|
+
shortcuts: () => "shortcuts"
|
|
59799
|
+
};
|
|
59800
|
+
var BUILDING_BLOCK_VIEWABLE_REQUESTS = /* @__PURE__ */ new Set([
|
|
59801
|
+
"passwordProtection",
|
|
59802
|
+
"documentProperties",
|
|
59803
|
+
"fontEmbedding",
|
|
59804
|
+
"digitalSignatures"
|
|
59805
|
+
]);
|
|
59806
|
+
function buildingBlockRequestAction(request) {
|
|
59807
|
+
const resolve = BUILDING_BLOCK_REQUEST_ACTIONS[request.kind];
|
|
59808
|
+
return resolve(request);
|
|
59809
|
+
}
|
|
59810
|
+
function createBuildingBlockRequests(deps) {
|
|
59811
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore(null);
|
|
59812
|
+
return {
|
|
59813
|
+
getSnapshot: store.getSnapshot,
|
|
59814
|
+
subscribe: store.subscribe,
|
|
59815
|
+
request(next2) {
|
|
59816
|
+
const { available, reason } = deps.state(buildingBlockRequestAction(next2));
|
|
59817
|
+
const allowed = BUILDING_BLOCK_VIEWABLE_REQUESTS.has(next2.kind) ? reason !== "not-ready" : available;
|
|
59818
|
+
if (!allowed) {
|
|
59819
|
+
return false;
|
|
59820
|
+
}
|
|
59821
|
+
store.set(next2);
|
|
59822
|
+
deps.onRequest?.(next2);
|
|
59823
|
+
return true;
|
|
59824
|
+
},
|
|
59825
|
+
complete(kind, result) {
|
|
59826
|
+
if (result.ok) {
|
|
59827
|
+
store.update((current) => current?.kind === kind ? null : current);
|
|
59828
|
+
}
|
|
59829
|
+
return result;
|
|
59830
|
+
},
|
|
59831
|
+
cancel: () => store.set(null),
|
|
59832
|
+
announce(next2, open) {
|
|
59833
|
+
if (open) {
|
|
59834
|
+
store.set(next2);
|
|
59835
|
+
} else {
|
|
59836
|
+
store.update((current) => current?.kind === next2.kind ? null : current);
|
|
59837
|
+
}
|
|
59838
|
+
deps.onRequest?.(next2);
|
|
59839
|
+
}
|
|
59840
|
+
};
|
|
59841
|
+
}
|
|
59842
|
+
|
|
59843
|
+
// src/pptx/render/building-blocks/session.ts
|
|
59844
|
+
function describeBuildingBlockAvailability(input) {
|
|
59845
|
+
return { ...describeBuildingBlockActions(input), ...describeShowDialogActions(input) };
|
|
59846
|
+
}
|
|
59847
|
+
function selectionEquation(element) {
|
|
59848
|
+
const segments = element?.textSegments;
|
|
59849
|
+
const found = segments?.find((segment) => segment.equationXml)?.equationXml;
|
|
59850
|
+
return found ? found : null;
|
|
59851
|
+
}
|
|
59852
|
+
function createPptxBuildingBlockSession(port) {
|
|
59853
|
+
const availability = () => describeBuildingBlockAvailability(port.availabilityInput());
|
|
59854
|
+
const refuse = (id) => {
|
|
59855
|
+
const { available, reason } = availability()[id];
|
|
59856
|
+
return available ? void 0 : buildingBlockFailure(reason ?? "not-ready");
|
|
59857
|
+
};
|
|
59858
|
+
const requests = createBuildingBlockRequests({
|
|
59859
|
+
state: (id) => availability()[id],
|
|
59860
|
+
onRequest: (request) => port.onRequest?.(request)
|
|
59861
|
+
});
|
|
59862
|
+
const context3 = createBuildingBlockGroupContext(
|
|
59863
|
+
requests,
|
|
59864
|
+
refuse,
|
|
59865
|
+
() => port.availabilityInput().ready
|
|
59866
|
+
);
|
|
59867
|
+
const groups = /* @__PURE__ */ new Map();
|
|
59868
|
+
const gated = (id, kind, run2) => {
|
|
59869
|
+
const denied = refuse(id);
|
|
59870
|
+
if (denied) {
|
|
59871
|
+
return denied;
|
|
59872
|
+
}
|
|
59873
|
+
run2();
|
|
59874
|
+
return requests.complete(kind, BUILDING_BLOCK_OK);
|
|
59875
|
+
};
|
|
59876
|
+
const insertImage = async (file) => {
|
|
59877
|
+
const denied = refuse("insertImage");
|
|
59878
|
+
if (denied) {
|
|
59879
|
+
return denied;
|
|
59880
|
+
}
|
|
59881
|
+
const checked = validateHostImageFile(file, port.fileLimits()?.imageBytes);
|
|
59882
|
+
if (!checked.ok) {
|
|
59883
|
+
return checked;
|
|
59884
|
+
}
|
|
59885
|
+
const before = port.target();
|
|
59886
|
+
const decode = port.decodeImage ?? chunkZJFN5POF_cjs.createImageElementFromFile;
|
|
59887
|
+
const element = await decode(file, port.canvasSize());
|
|
59888
|
+
if (!element) {
|
|
59889
|
+
return buildingBlockFailure("decode-failed");
|
|
59890
|
+
}
|
|
59891
|
+
const now = port.target();
|
|
59892
|
+
if (now.deck !== before.deck || now.slideId !== before.slideId) {
|
|
59893
|
+
return buildingBlockFailure("stale-target");
|
|
59894
|
+
}
|
|
59895
|
+
const stillDenied = refuse("insertImage");
|
|
59896
|
+
if (stillDenied) {
|
|
59897
|
+
return stillDenied;
|
|
59898
|
+
}
|
|
59899
|
+
port.addElement(element);
|
|
59900
|
+
return requests.complete("image", BUILDING_BLOCK_OK);
|
|
59901
|
+
};
|
|
59902
|
+
const insertMedia = async (file) => {
|
|
59903
|
+
const denied = refuse("insertMedia");
|
|
59904
|
+
if (denied) {
|
|
59905
|
+
return denied;
|
|
59906
|
+
}
|
|
59907
|
+
const checked = validateHostMediaFile(file, port.fileLimits()?.mediaBytes);
|
|
59908
|
+
if (!checked.ok) {
|
|
59909
|
+
return checked;
|
|
59910
|
+
}
|
|
59911
|
+
const before = port.target();
|
|
59912
|
+
const sameTarget = () => {
|
|
59913
|
+
const now = port.target();
|
|
59914
|
+
return now.deck === before.deck && now.slideId === before.slideId && now.slideIndex === before.slideIndex && availability().insertMedia.available;
|
|
59915
|
+
};
|
|
59916
|
+
return requests.complete("media", await port.insertMediaFile(file, sameTarget));
|
|
59917
|
+
};
|
|
59918
|
+
const layoutActions = () => buildLayoutActions({
|
|
59919
|
+
activeSlide: port.activeSlide(),
|
|
59920
|
+
scopedLayouts: port.scopedLayouts(),
|
|
59921
|
+
getScopedLayouts: () => port.scopedLayouts(),
|
|
59922
|
+
getActiveSlide: () => port.activeSlide(),
|
|
59923
|
+
refuse: (id) => refuse(id),
|
|
59924
|
+
applyLayout: (path) => port.applyLayout(path)
|
|
59925
|
+
});
|
|
59926
|
+
const hyperlinkApply = (data) => {
|
|
59927
|
+
const denied = refuse("hyperlink");
|
|
59928
|
+
if (denied) {
|
|
59929
|
+
return denied;
|
|
59930
|
+
}
|
|
59931
|
+
const resolved2 = resolveHyperlinkEditResult(data);
|
|
59932
|
+
if (!resolved2.url && !resolved2.action) {
|
|
59933
|
+
return buildingBlockFailure("invalid-target");
|
|
59934
|
+
}
|
|
59935
|
+
return requests.complete("hyperlink", port.applyHyperlink(data));
|
|
59936
|
+
};
|
|
59937
|
+
const hyperlinkRemove = () => refuse("removeHyperlink") ?? port.removeHyperlink();
|
|
59938
|
+
const smartArtInsert = (layout, items) => gated("insertSmartArt", "smartArt", () => port.insertSmartArt(layout, items));
|
|
59939
|
+
const chartInsert = (kind, options) => {
|
|
59940
|
+
if (options?.data !== void 0 && !isValidInsertChartData(options.data)) {
|
|
59941
|
+
return refuse("insertChart") ?? buildingBlockFailure("invalid-data");
|
|
59942
|
+
}
|
|
59943
|
+
return gated("insertChart", "chart", () => port.insertChart(kind, options));
|
|
59944
|
+
};
|
|
59945
|
+
const equationInsert = (omml) => gated("insertEquation", "equation", () => port.insertEquation(omml));
|
|
59946
|
+
const equationUpdate = (omml) => gated("editEquation", "equation", () => port.updateEquation(omml));
|
|
59947
|
+
const cancel = () => {
|
|
59948
|
+
requests.cancel();
|
|
59949
|
+
port.onCancel?.();
|
|
59950
|
+
};
|
|
59951
|
+
return {
|
|
59952
|
+
requests,
|
|
59953
|
+
context: context3,
|
|
59954
|
+
request: (next2) => requests.request(next2),
|
|
59955
|
+
announce: (next2, open) => requests.announce(next2, open),
|
|
59956
|
+
applyLayout: (path) => layoutActions().apply(path, true),
|
|
59957
|
+
resetSlide: () => layoutActions().reset(),
|
|
59958
|
+
register(group, groupPort) {
|
|
59959
|
+
const create = () => group.create(context3, groupPort);
|
|
59960
|
+
groups.set(group.id, create);
|
|
59961
|
+
return () => {
|
|
59962
|
+
if (groups.get(group.id) === create) {
|
|
59963
|
+
groups.delete(group.id);
|
|
59964
|
+
}
|
|
59965
|
+
};
|
|
59966
|
+
},
|
|
59967
|
+
actions() {
|
|
59968
|
+
const selected = port.selectedElement();
|
|
59969
|
+
const extensions = {};
|
|
59970
|
+
for (const [id, create] of groups) {
|
|
59971
|
+
Reflect.set(extensions, id, create());
|
|
59972
|
+
}
|
|
59973
|
+
return {
|
|
59974
|
+
...extensions,
|
|
59975
|
+
availability: availability(),
|
|
59976
|
+
unmountedDialogActions: BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS,
|
|
59977
|
+
pending: requests.getSnapshot(),
|
|
59978
|
+
cancel,
|
|
59979
|
+
insertImage,
|
|
59980
|
+
insertMedia,
|
|
59981
|
+
hyperlink: {
|
|
59982
|
+
current: hyperlinkEditDataFromAction(selected?.actionClick),
|
|
59983
|
+
slideCount: port.slideCount(),
|
|
59984
|
+
apply: hyperlinkApply,
|
|
59985
|
+
remove: hyperlinkRemove
|
|
59986
|
+
},
|
|
59987
|
+
smartArt: { insert: smartArtInsert },
|
|
59988
|
+
chart: { insert: chartInsert },
|
|
59989
|
+
equation: {
|
|
59990
|
+
current: selectionEquation(selected),
|
|
59991
|
+
insert: equationInsert,
|
|
59992
|
+
update: equationUpdate
|
|
59993
|
+
},
|
|
59994
|
+
findReplace: buildFindReplaceActions(port.findReplace(), () => refuse("replace")),
|
|
59995
|
+
layout: layoutActions().layout
|
|
59996
|
+
};
|
|
59997
|
+
}
|
|
59998
|
+
};
|
|
59999
|
+
}
|
|
60000
|
+
|
|
60001
|
+
// src/pptx/render/collaboration-state.ts
|
|
60002
|
+
function writeBackReport(config, state) {
|
|
60003
|
+
if (!config?.onWriteBack || config.role !== "owner") return void 0;
|
|
60004
|
+
return state ?? { status: "idle" };
|
|
60005
|
+
}
|
|
60006
|
+
var COLLABORATION_OFF = Object.freeze({
|
|
60007
|
+
active: false,
|
|
60008
|
+
roomId: void 0,
|
|
60009
|
+
status: "off",
|
|
60010
|
+
synced: false,
|
|
60011
|
+
people: Object.freeze([])
|
|
60012
|
+
});
|
|
60013
|
+
function buildCollaborationState(input) {
|
|
60014
|
+
if (!input.active) return COLLABORATION_OFF;
|
|
60015
|
+
const name = input.userName ?? "";
|
|
60016
|
+
const people = [];
|
|
60017
|
+
if (input.clientId !== null && input.clientId !== void 0) {
|
|
60018
|
+
people.push({
|
|
60019
|
+
clientId: input.clientId,
|
|
60020
|
+
name,
|
|
60021
|
+
color: input.userColor || assignUserColor(name),
|
|
60022
|
+
self: true
|
|
60023
|
+
});
|
|
60024
|
+
}
|
|
60025
|
+
for (const user of input.remoteUsers) {
|
|
60026
|
+
people.push({
|
|
60027
|
+
clientId: user.clientId,
|
|
60028
|
+
name: user.userName,
|
|
60029
|
+
color: user.userColor,
|
|
60030
|
+
self: false
|
|
60031
|
+
});
|
|
60032
|
+
}
|
|
60033
|
+
return {
|
|
60034
|
+
active: true,
|
|
60035
|
+
roomId: input.roomId || void 0,
|
|
60036
|
+
status: input.status,
|
|
60037
|
+
synced: input.synced,
|
|
60038
|
+
people,
|
|
60039
|
+
...input.writeBack ? { writeBack: input.writeBack } : {}
|
|
60040
|
+
};
|
|
60041
|
+
}
|
|
60042
|
+
function collaborationStatesEqual(a, b) {
|
|
60043
|
+
if (a === b) return true;
|
|
60044
|
+
if (a.active !== b.active || a.roomId !== b.roomId || a.status !== b.status || a.synced !== b.synced || a.people.length !== b.people.length || a.writeBack?.status !== b.writeBack?.status || a.writeBack?.lastSavedAt !== b.writeBack?.lastSavedAt || a.writeBack?.error !== b.writeBack?.error) {
|
|
60045
|
+
return false;
|
|
60046
|
+
}
|
|
60047
|
+
return a.people.every((person, index) => {
|
|
60048
|
+
const other = b.people[index];
|
|
60049
|
+
return other !== void 0 && person.clientId === other.clientId && person.name === other.name && person.color === other.color && person.self === other.self;
|
|
60050
|
+
});
|
|
60051
|
+
}
|
|
60052
|
+
function createCollaborationStateReporter(report) {
|
|
60053
|
+
let last = COLLABORATION_OFF;
|
|
60054
|
+
return {
|
|
60055
|
+
update: (state) => {
|
|
60056
|
+
if (collaborationStatesEqual(last, state)) return;
|
|
60057
|
+
last = state;
|
|
60058
|
+
report(state);
|
|
60059
|
+
},
|
|
60060
|
+
current: () => last
|
|
60061
|
+
};
|
|
60062
|
+
}
|
|
60063
|
+
|
|
60064
|
+
// src/pptx/render/building-blocks/shell.ts
|
|
60065
|
+
var BUILDING_BLOCK_SHELL_IDLE = Object.freeze({
|
|
60066
|
+
shellState: Object.freeze({
|
|
60067
|
+
canEdit: false,
|
|
60068
|
+
status: "disconnected",
|
|
60069
|
+
remoteUsers: Object.freeze([]),
|
|
60070
|
+
connectedCount: 0
|
|
60071
|
+
}),
|
|
60072
|
+
collaborationState: COLLABORATION_OFF
|
|
60073
|
+
});
|
|
60074
|
+
var isState = (value) => "people" in value;
|
|
60075
|
+
function describeBuildingBlockShell(input) {
|
|
60076
|
+
return {
|
|
60077
|
+
shellState: resolveCollaborationShellState(input.shell),
|
|
60078
|
+
collaborationState: isState(input.collaboration) ? input.collaboration : buildCollaborationState(input.collaboration)
|
|
60079
|
+
};
|
|
60080
|
+
}
|
|
60081
|
+
function shellStatesEqual(a, b) {
|
|
60082
|
+
return a.canEdit === b.canEdit && a.status === b.status && a.connectedCount === b.connectedCount && a.remoteUsers.length === b.remoteUsers.length && a.remoteUsers.every((user, index) => {
|
|
60083
|
+
const other = b.remoteUsers[index];
|
|
60084
|
+
return other !== void 0 && user.clientId === other.clientId && user.userName === other.userName && user.userColor === other.userColor && user.role === other.role && user.activeSlideIndex === other.activeSlideIndex && user.selectedElementId === other.selectedElementId;
|
|
60085
|
+
});
|
|
60086
|
+
}
|
|
60087
|
+
function buildingBlockShellsEqual(a, b) {
|
|
60088
|
+
return a === b || shellStatesEqual(a.shellState, b.shellState) && collaborationStatesEqual(a.collaborationState, b.collaborationState);
|
|
60089
|
+
}
|
|
60090
|
+
function createBuildingBlockShell(read) {
|
|
60091
|
+
let last = BUILDING_BLOCK_SHELL_IDLE;
|
|
60092
|
+
return {
|
|
60093
|
+
current() {
|
|
60094
|
+
const input = read();
|
|
60095
|
+
const next2 = input ? describeBuildingBlockShell(input) : BUILDING_BLOCK_SHELL_IDLE;
|
|
60096
|
+
if (!buildingBlockShellsEqual(last, next2)) {
|
|
60097
|
+
last = next2;
|
|
60098
|
+
}
|
|
60099
|
+
return last;
|
|
60100
|
+
}
|
|
60101
|
+
};
|
|
60102
|
+
}
|
|
60103
|
+
|
|
60104
|
+
// src/pptx/render/building-blocks/toolbar.ts
|
|
60105
|
+
var LABELS = {
|
|
60106
|
+
undo: "pptx.toolbar.undo",
|
|
60107
|
+
redo: "pptx.toolbar.redo",
|
|
60108
|
+
insertImage: "pptx.insert.pictures",
|
|
60109
|
+
insertMedia: "pptx.ribbon.media",
|
|
60110
|
+
insertChart: "pptx.ribbon.chart",
|
|
60111
|
+
insertSmartArt: "pptx.ribbon.smartArt",
|
|
60112
|
+
insertEquation: "pptx.ribbon.equation",
|
|
60113
|
+
hyperlink: "pptx.ribbon.link",
|
|
60114
|
+
find: "pptx.toolbar.findAndReplace",
|
|
60115
|
+
resetLayout: "pptx.ribbon.groupReset",
|
|
60116
|
+
zoomOut: "pptx.statusBar.zoomOut",
|
|
60117
|
+
zoomIn: "pptx.statusBar.zoomIn",
|
|
60118
|
+
zoomToFit: "pptx.statusBar.zoomToFit",
|
|
60119
|
+
previousSlide: "pptx.mobileBar.previousSlide",
|
|
60120
|
+
nextSlide: "pptx.mobileBar.nextSlide"
|
|
60121
|
+
};
|
|
60122
|
+
var HIDDEN_BY = {
|
|
60123
|
+
undo: "undo",
|
|
60124
|
+
redo: "redo",
|
|
60125
|
+
insertImage: "insert",
|
|
60126
|
+
insertMedia: "insert",
|
|
60127
|
+
insertChart: "insert",
|
|
60128
|
+
insertSmartArt: "insert",
|
|
60129
|
+
insertEquation: "insert",
|
|
60130
|
+
hyperlink: "insert",
|
|
60131
|
+
zoomOut: "zoom",
|
|
60132
|
+
zoomIn: "zoom",
|
|
60133
|
+
zoomToFit: "zoom",
|
|
60134
|
+
previousSlide: "navigation",
|
|
60135
|
+
nextSlide: "navigation"
|
|
60136
|
+
};
|
|
60137
|
+
function describeBuildingBlockToolbar(input) {
|
|
60138
|
+
const hidden = new Set(input.hiddenActions ?? []);
|
|
60139
|
+
const control4 = (id, disabled, pressed) => {
|
|
60140
|
+
const by = HIDDEN_BY[id];
|
|
60141
|
+
if (by !== void 0 && hidden.has(by)) {
|
|
60142
|
+
return void 0;
|
|
60143
|
+
}
|
|
60144
|
+
const base2 = { id, labelKey: LABELS[id], disabled };
|
|
60145
|
+
return pressed === void 0 ? base2 : { ...base2, pressed };
|
|
60146
|
+
};
|
|
60147
|
+
const action = (id) => control4(id, !input.availability[id].available);
|
|
60148
|
+
const groups = [
|
|
60149
|
+
["history", [control4("undo", !input.canUndo), control4("redo", !input.canRedo)]],
|
|
60150
|
+
[
|
|
60151
|
+
"insert",
|
|
60152
|
+
[
|
|
60153
|
+
action("insertImage"),
|
|
60154
|
+
action("insertMedia"),
|
|
60155
|
+
action("insertChart"),
|
|
60156
|
+
action("insertSmartArt"),
|
|
60157
|
+
action("insertEquation"),
|
|
60158
|
+
action("hyperlink")
|
|
60159
|
+
]
|
|
60160
|
+
],
|
|
60161
|
+
["editing", [control4("find", false, input.findOpen), action("resetLayout")]],
|
|
60162
|
+
["view", [control4("zoomOut", false), control4("zoomIn", false), control4("zoomToFit", false)]],
|
|
60163
|
+
[
|
|
60164
|
+
"navigation",
|
|
60165
|
+
[
|
|
60166
|
+
control4("previousSlide", input.slideIndex <= 0),
|
|
60167
|
+
control4("nextSlide", input.slideIndex >= input.slideCount - 1)
|
|
60168
|
+
]
|
|
60169
|
+
]
|
|
60170
|
+
];
|
|
60171
|
+
return groups.map(([id, controls2]) => ({
|
|
60172
|
+
id,
|
|
60173
|
+
controls: controls2.filter((entry6) => !!entry6)
|
|
60174
|
+
})).filter((group) => group.controls.length > 0);
|
|
60175
|
+
}
|
|
60176
|
+
function runBuildingBlockToolbarControl(id, session, view2) {
|
|
60177
|
+
switch (id) {
|
|
60178
|
+
case "insertImage":
|
|
60179
|
+
session.request({ kind: "image" });
|
|
60180
|
+
return;
|
|
60181
|
+
case "insertMedia":
|
|
60182
|
+
session.request({ kind: "media" });
|
|
60183
|
+
return;
|
|
60184
|
+
case "insertChart":
|
|
60185
|
+
session.request({ kind: "chart" });
|
|
60186
|
+
return;
|
|
60187
|
+
case "insertSmartArt":
|
|
60188
|
+
session.request({ kind: "smartArt" });
|
|
60189
|
+
return;
|
|
60190
|
+
case "insertEquation":
|
|
60191
|
+
session.request({ kind: "equation", existingOmml: null });
|
|
60192
|
+
return;
|
|
60193
|
+
case "hyperlink":
|
|
60194
|
+
session.request({ kind: "hyperlink" });
|
|
60195
|
+
return;
|
|
60196
|
+
case "resetLayout":
|
|
60197
|
+
void session.resetSlide();
|
|
60198
|
+
return;
|
|
60199
|
+
case "find":
|
|
60200
|
+
view2.toggleFind();
|
|
60201
|
+
return;
|
|
60202
|
+
default:
|
|
60203
|
+
view2[id]();
|
|
60204
|
+
}
|
|
60205
|
+
}
|
|
60206
|
+
|
|
60207
|
+
// src/pptx/render/template-background-rows.ts
|
|
60208
|
+
function resolveTemplateBackgroundRows(activeSlide, slideMasters, fallbackLayoutLabel, fallbackMasterLabel) {
|
|
60209
|
+
const result = {};
|
|
60210
|
+
if (activeSlide.layoutPath) {
|
|
60211
|
+
result.layout = {
|
|
60212
|
+
path: activeSlide.layoutPath,
|
|
60213
|
+
label: activeSlide.layoutName ?? fallbackLayoutLabel,
|
|
60214
|
+
title: activeSlide.layoutName ?? activeSlide.layoutPath
|
|
60215
|
+
};
|
|
60216
|
+
}
|
|
60217
|
+
const master = slideMasters?.find((m) => m.layoutPaths?.includes(activeSlide.layoutPath ?? ""));
|
|
60218
|
+
if (master) {
|
|
60219
|
+
result.master = {
|
|
60220
|
+
path: master.path,
|
|
60221
|
+
label: master.name ?? fallbackMasterLabel,
|
|
60222
|
+
title: master.name ?? master.path
|
|
60223
|
+
};
|
|
60224
|
+
}
|
|
60225
|
+
return result;
|
|
60226
|
+
}
|
|
60227
|
+
|
|
60228
|
+
// src/pptx/render/transition-template-elements.ts
|
|
60229
|
+
function transitionTemplateElements(outgoingSlide, incomingSlide, templateElementsBySlideId) {
|
|
60230
|
+
const of = (slide) => slide ? [...templateEditing.visibleTemplateElements(slide, templateElementsBySlideId[slide.id] ?? [])] : [];
|
|
60231
|
+
return { outgoing: of(outgoingSlide), incoming: of(incomingSlide) };
|
|
60232
|
+
}
|
|
60233
|
+
|
|
60234
|
+
// src/pptx/render/preview-elements.ts
|
|
60235
|
+
var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
|
|
60236
|
+
function buildPreviewElements(slide, templateElements = [], options) {
|
|
60237
|
+
const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
60238
|
+
const merged = [...templateEditing.visibleTemplateElements(slide, templateElements), ...slide.elements];
|
|
60239
|
+
if (cap > 0 && merged.length > cap) {
|
|
60240
|
+
return merged.slice(0, cap);
|
|
60241
|
+
}
|
|
60242
|
+
return merged;
|
|
60243
|
+
}
|
|
60244
|
+
var SMARTART_PREVIEW_ELEMENT_WIDTH = 600;
|
|
60245
|
+
var SMARTART_PREVIEW_ELEMENT_HEIGHT = 340;
|
|
60246
|
+
var SMARTART_PREVIEW_FALLBACK_ITEMS = ["1", "2", "3"];
|
|
60247
|
+
function buildSmartArtPreviewElement(layout, defaultItems) {
|
|
60248
|
+
const preset2 = PRESETS.find((p) => p.layout === layout);
|
|
60249
|
+
const items = [...defaultItems ?? preset2?.defaultItems ?? SMARTART_PREVIEW_FALLBACK_ITEMS];
|
|
60250
|
+
return {
|
|
60251
|
+
id: `smartart-preview-${layout}`,
|
|
60252
|
+
type: "smartArt",
|
|
60253
|
+
x: 0,
|
|
60254
|
+
y: 0,
|
|
60255
|
+
width: SMARTART_PREVIEW_ELEMENT_WIDTH,
|
|
60256
|
+
height: SMARTART_PREVIEW_ELEMENT_HEIGHT,
|
|
60257
|
+
smartArtData: buildSmartArtPresetData(layout, items)
|
|
60258
|
+
};
|
|
60259
|
+
}
|
|
60260
|
+
|
|
60261
|
+
// src/pptx/render/element-render-error.ts
|
|
60262
|
+
function elementRenderRetryKey(element) {
|
|
60263
|
+
return { element, id: element.id };
|
|
60264
|
+
}
|
|
60265
|
+
function shouldRetryElementRender(failed, element) {
|
|
60266
|
+
return !failed || failed.element !== element || failed.id !== element.id;
|
|
60267
|
+
}
|
|
60268
|
+
function elementRenderErrorContext(element, slideId) {
|
|
60269
|
+
return {
|
|
60270
|
+
elementId: element.id,
|
|
60271
|
+
elementType: element.type,
|
|
60272
|
+
...slideId === void 0 ? {} : { slideId }
|
|
60273
|
+
};
|
|
60274
|
+
}
|
|
60275
|
+
function toElementRenderError(thrown) {
|
|
60276
|
+
return thrown instanceof Error ? thrown : new Error(String(thrown));
|
|
60277
|
+
}
|
|
60278
|
+
function reportElementRenderError(handler, thrown, context3) {
|
|
60279
|
+
const error = toElementRenderError(thrown);
|
|
60280
|
+
if (handler) {
|
|
60281
|
+
try {
|
|
60282
|
+
handler(error, context3);
|
|
60283
|
+
return;
|
|
60284
|
+
} catch {
|
|
60285
|
+
}
|
|
60286
|
+
}
|
|
60287
|
+
try {
|
|
60288
|
+
console.error(error, context3);
|
|
60289
|
+
} catch {
|
|
60290
|
+
}
|
|
60291
|
+
}
|
|
60292
|
+
function mergeElementRenderErrorScope(inherited, own) {
|
|
60293
|
+
return {
|
|
60294
|
+
slideId: own.slideId ?? inherited?.slideId,
|
|
60295
|
+
onElementRenderError: own.onElementRenderError ?? inherited?.onElementRenderError
|
|
60296
|
+
};
|
|
60297
|
+
}
|
|
60298
|
+
function createElementRenderFailures() {
|
|
60299
|
+
const failed = /* @__PURE__ */ new WeakMap();
|
|
60300
|
+
return {
|
|
60301
|
+
has: (element) => failed.get(element) === element.id,
|
|
60302
|
+
add: (element) => {
|
|
60303
|
+
failed.set(element, element.id);
|
|
60304
|
+
}
|
|
60305
|
+
};
|
|
60306
|
+
}
|
|
60307
|
+
function guardElementRender(element, build7, options = {}) {
|
|
60308
|
+
if (options.failures?.has(element)) {
|
|
60309
|
+
return null;
|
|
60310
|
+
}
|
|
60311
|
+
try {
|
|
60312
|
+
probeElementRenderFault(element);
|
|
60313
|
+
return build7();
|
|
60314
|
+
} catch (thrown) {
|
|
60315
|
+
options.failures?.add(element);
|
|
60316
|
+
try {
|
|
60317
|
+
options.onFailure?.();
|
|
60318
|
+
} catch {
|
|
60319
|
+
}
|
|
60320
|
+
reportElementRenderError(
|
|
60321
|
+
options.onElementRenderError,
|
|
60322
|
+
thrown,
|
|
60323
|
+
elementRenderErrorContext(element, options.slideId)
|
|
60324
|
+
);
|
|
60325
|
+
return null;
|
|
60326
|
+
}
|
|
60327
|
+
}
|
|
60328
|
+
var ELEMENT_RENDER_FAULT_KEY = "ooxml-ui.pptx.element-render-fault";
|
|
60329
|
+
function probeElementRenderFault(element) {
|
|
60330
|
+
const fault = globalThis[Symbol.for(ELEMENT_RENDER_FAULT_KEY)];
|
|
60331
|
+
if (fault !== void 0 && fault === element.id) {
|
|
60332
|
+
throw new Error(`Injected element render fault (${element.id})`);
|
|
60333
|
+
}
|
|
60334
|
+
}
|
|
60335
|
+
|
|
60336
|
+
// src/pptx/render/shape-preset-catalog.ts
|
|
60337
|
+
var SHAPE_PRESET_DEFS = [
|
|
60338
|
+
{
|
|
60339
|
+
type: "rect",
|
|
60340
|
+
label: "Rectangle",
|
|
60341
|
+
i18nKey: "pptx.editorToolbar.shapeRectangle",
|
|
60342
|
+
glyph: "square",
|
|
60343
|
+
glyphClass: ""
|
|
57793
60344
|
},
|
|
57794
60345
|
{
|
|
57795
60346
|
type: "roundRect",
|
|
@@ -58748,35 +61299,6 @@ function homeRow(item4, sectionId, groupKey, group) {
|
|
|
58748
61299
|
};
|
|
58749
61300
|
}
|
|
58750
61301
|
var homeShapeValue = (value) => value.replace(/^recent:/u, "");
|
|
58751
|
-
|
|
58752
|
-
// src/pptx/render/font-embedding.ts
|
|
58753
|
-
var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
|
|
58754
|
-
function describeFontEmbedding(embeddedFamilies) {
|
|
58755
|
-
const seen = /* @__PURE__ */ new Set();
|
|
58756
|
-
const families = [];
|
|
58757
|
-
for (const raw of embeddedFamilies ?? []) {
|
|
58758
|
-
const family2 = raw?.trim();
|
|
58759
|
-
if (!family2) {
|
|
58760
|
-
continue;
|
|
58761
|
-
}
|
|
58762
|
-
const key = family2.toLowerCase();
|
|
58763
|
-
if (seen.has(key)) {
|
|
58764
|
-
continue;
|
|
58765
|
-
}
|
|
58766
|
-
seen.add(key);
|
|
58767
|
-
families.push(family2);
|
|
58768
|
-
}
|
|
58769
|
-
const hasAny = families.length > 0;
|
|
58770
|
-
return {
|
|
58771
|
-
embeddedFamilies: families,
|
|
58772
|
-
interactive: hasAny,
|
|
58773
|
-
initialEnabled: hasAny,
|
|
58774
|
-
...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
|
|
58775
|
-
};
|
|
58776
|
-
}
|
|
58777
|
-
function embeddedFontSaveOptions(embedFonts) {
|
|
58778
|
-
return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
|
|
58779
|
-
}
|
|
58780
61302
|
var OFFICE_COLOR_SWATCHES = [
|
|
58781
61303
|
{ hex: "#000000", label: "Black", labelKey: "pptx.colorPicker.standard.black" },
|
|
58782
61304
|
{ hex: "#ffffff", label: "White", labelKey: "pptx.colorPicker.standard.white" },
|
|
@@ -60791,42 +63313,6 @@ async function scanAvailableFontFamilies(families, source = browserFontSource())
|
|
|
60791
63313
|
}
|
|
60792
63314
|
}
|
|
60793
63315
|
|
|
60794
|
-
// src/pptx/render/password-protection.ts
|
|
60795
|
-
function getPasswordStrength(password) {
|
|
60796
|
-
if (!password) {
|
|
60797
|
-
return 0;
|
|
60798
|
-
}
|
|
60799
|
-
let score2 = 0;
|
|
60800
|
-
if (password.length >= 8) {
|
|
60801
|
-
score2 += 1;
|
|
60802
|
-
}
|
|
60803
|
-
if (password.length >= 12) {
|
|
60804
|
-
score2 += 1;
|
|
60805
|
-
}
|
|
60806
|
-
if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
|
|
60807
|
-
score2 += 1;
|
|
60808
|
-
}
|
|
60809
|
-
if (/\d/u.test(password)) {
|
|
60810
|
-
score2 += 1;
|
|
60811
|
-
}
|
|
60812
|
-
if (/[^A-Za-z0-9]/u.test(password)) {
|
|
60813
|
-
score2 += 1;
|
|
60814
|
-
}
|
|
60815
|
-
return Math.min(score2, 4);
|
|
60816
|
-
}
|
|
60817
|
-
function validatePasswordPair(password, confirmation) {
|
|
60818
|
-
if (!password) {
|
|
60819
|
-
return "required";
|
|
60820
|
-
}
|
|
60821
|
-
if (password !== confirmation) {
|
|
60822
|
-
return "mismatch";
|
|
60823
|
-
}
|
|
60824
|
-
if (password.length < 4) {
|
|
60825
|
-
return "tooShort";
|
|
60826
|
-
}
|
|
60827
|
-
return null;
|
|
60828
|
-
}
|
|
60829
|
-
|
|
60830
63316
|
// src/pptx/render/theme-write-queue.ts
|
|
60831
63317
|
var pendingWrites = /* @__PURE__ */ new WeakMap();
|
|
60832
63318
|
function startWrite(write) {
|
|
@@ -61040,129 +63526,6 @@ function buildDeckSaveOptions(state) {
|
|
|
61040
63526
|
};
|
|
61041
63527
|
}
|
|
61042
63528
|
|
|
61043
|
-
// src/pptx/render/viewer-preferences.ts
|
|
61044
|
-
var DEFAULT_VIEWER_PREFERENCES = {
|
|
61045
|
-
autoSave: true,
|
|
61046
|
-
spellCheck: false,
|
|
61047
|
-
showGrid: false,
|
|
61048
|
-
showRulers: false,
|
|
61049
|
-
snapToGrid: false,
|
|
61050
|
-
reducedMotion: false
|
|
61051
|
-
};
|
|
61052
|
-
var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
|
|
61053
|
-
var VIEWER_SHORTCUT_REFERENCE = [
|
|
61054
|
-
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
|
|
61055
|
-
{
|
|
61056
|
-
actionKey: "pptx.toolbar.redo",
|
|
61057
|
-
shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
|
|
61058
|
-
group: "history"
|
|
61059
|
-
},
|
|
61060
|
-
{ actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
|
|
61061
|
-
{ actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
|
|
61062
|
-
{ actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
|
|
61063
|
-
{
|
|
61064
|
-
actionKey: "pptx.shortcuts.action.duplicateElement",
|
|
61065
|
-
shortcut: "Ctrl/Cmd+D",
|
|
61066
|
-
group: "editing"
|
|
61067
|
-
},
|
|
61068
|
-
{
|
|
61069
|
-
actionKey: "pptx.shortcuts.action.deleteElement",
|
|
61070
|
-
shortcut: "Delete / Backspace",
|
|
61071
|
-
group: "editing"
|
|
61072
|
-
},
|
|
61073
|
-
{ actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
|
|
61074
|
-
{ actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
|
|
61075
|
-
{ actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
|
|
61076
|
-
{ actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
|
|
61077
|
-
{
|
|
61078
|
-
actionKey: "pptx.shortcuts.action.nudgeElementLarge",
|
|
61079
|
-
shortcut: "Shift+Arrow keys",
|
|
61080
|
-
group: "editing"
|
|
61081
|
-
},
|
|
61082
|
-
{
|
|
61083
|
-
actionKey: "pptx.shortcuts.action.prevSlide",
|
|
61084
|
-
shortcut: "Left or Up arrow, Page Up",
|
|
61085
|
-
group: "navigation"
|
|
61086
|
-
},
|
|
61087
|
-
{
|
|
61088
|
-
actionKey: "pptx.shortcuts.action.nextSlide",
|
|
61089
|
-
shortcut: "Right or Down arrow, Page Down",
|
|
61090
|
-
group: "navigation"
|
|
61091
|
-
},
|
|
61092
|
-
{
|
|
61093
|
-
actionKey: "pptx.shortcuts.action.zoomCanvas",
|
|
61094
|
-
shortcut: "Ctrl/Cmd+Mouse wheel",
|
|
61095
|
-
group: "navigation"
|
|
61096
|
-
},
|
|
61097
|
-
{
|
|
61098
|
-
actionKey: "pptx.shortcuts.action.commitTextEdit",
|
|
61099
|
-
shortcut: "Ctrl/Cmd+Enter",
|
|
61100
|
-
group: "editing"
|
|
61101
|
-
},
|
|
61102
|
-
{ actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
|
|
61103
|
-
// Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
|
|
61104
|
-
// bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
|
|
61105
|
-
// was advertising neither. The help panel is the keymap's documentation: a
|
|
61106
|
-
// chord missing here is a chord nobody discovers.
|
|
61107
|
-
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
|
|
61108
|
-
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
|
|
61109
|
-
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
|
|
61110
|
-
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
|
|
61111
|
-
];
|
|
61112
|
-
var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
|
|
61113
|
-
history: "pptx.editorToolbar.history",
|
|
61114
|
-
clipboard: "pptx.ribbon.clipboard",
|
|
61115
|
-
editing: "pptx.shortcuts.group.editing",
|
|
61116
|
-
navigation: "pptx.shortcuts.group.navigation",
|
|
61117
|
-
general: "pptx.settings.general"
|
|
61118
|
-
};
|
|
61119
|
-
function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
|
|
61120
|
-
const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
|
|
61121
|
-
return order.map((group) => ({
|
|
61122
|
-
group,
|
|
61123
|
-
labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
|
|
61124
|
-
shortcuts: items.filter((item4) => item4.group === group)
|
|
61125
|
-
})).filter((bucket) => bucket.shortcuts.length > 0);
|
|
61126
|
-
}
|
|
61127
|
-
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
61128
|
-
var VIEWER_PREFERENCE_TOGGLES = [
|
|
61129
|
-
{ key: "autoSave", labelKey: "pptx.settings.autoSave" },
|
|
61130
|
-
{ key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
|
|
61131
|
-
{ key: "showGrid", labelKey: "pptx.settings.showGrid" },
|
|
61132
|
-
{ key: "showRulers", labelKey: "pptx.settings.showRulers" },
|
|
61133
|
-
{ key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
|
|
61134
|
-
{ key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
|
|
61135
|
-
];
|
|
61136
|
-
var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
|
|
61137
|
-
function updateViewerPreference(preferences, key, value) {
|
|
61138
|
-
return { ...preferences, [key]: value };
|
|
61139
|
-
}
|
|
61140
|
-
function viewerPreferencesFromViewProperties(data, defaults) {
|
|
61141
|
-
const slideViewPr = data.viewProperties?.slideViewPr;
|
|
61142
|
-
const gridSpacing = data.viewProperties?.gridSpacing;
|
|
61143
|
-
return {
|
|
61144
|
-
...defaults,
|
|
61145
|
-
snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
|
|
61146
|
-
snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
|
|
61147
|
-
showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
|
|
61148
|
-
gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
|
|
61149
|
-
gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
|
|
61150
|
-
};
|
|
61151
|
-
}
|
|
61152
|
-
function viewPropertiesPatchFromPreferences(preferences) {
|
|
61153
|
-
const patch = {
|
|
61154
|
-
slideViewPr: {
|
|
61155
|
-
snapToGrid: preferences.snapToGrid,
|
|
61156
|
-
snapToObjects: preferences.snapToObjects ?? false,
|
|
61157
|
-
showGuides: preferences.showGuides ?? false
|
|
61158
|
-
}
|
|
61159
|
-
};
|
|
61160
|
-
if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
|
|
61161
|
-
patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
|
|
61162
|
-
}
|
|
61163
|
-
return patch;
|
|
61164
|
-
}
|
|
61165
|
-
|
|
61166
63529
|
// src/pptx/render/presentation-ole-verb.ts
|
|
61167
63530
|
var SHOW_VERBS = /* @__PURE__ */ new Set([1, -2]);
|
|
61168
63531
|
function resolveOleVerbTarget(slide, elementId, verb) {
|
|
@@ -61693,28 +64056,6 @@ function lockExternalContentSetting(locked, host2) {
|
|
|
61693
64056
|
}
|
|
61694
64057
|
return { ...locked, [EXTERNAL_CONTENT_SETTING_ID]: host2 };
|
|
61695
64058
|
}
|
|
61696
|
-
|
|
61697
|
-
// src/pptx/render/options/font-download-policy.ts
|
|
61698
|
-
var FONT_DOWNLOAD_SETTING_ID = "trust.allowFontDownloads";
|
|
61699
|
-
function resolveEffectiveGoogleFonts(host2, options) {
|
|
61700
|
-
if (host2 !== void 0) {
|
|
61701
|
-
return host2;
|
|
61702
|
-
}
|
|
61703
|
-
return options.trust.allowFontDownloads ? void 0 : false;
|
|
61704
|
-
}
|
|
61705
|
-
function resolveFontDownloadBase(host2, options) {
|
|
61706
|
-
return text$1.resolveGoogleFontsCss2Base(resolveEffectiveGoogleFonts(host2, options));
|
|
61707
|
-
}
|
|
61708
|
-
function hostFontDownloadLock(host2) {
|
|
61709
|
-
return host2 === void 0 ? void 0 : text$1.resolveGoogleFontsCss2Base(host2) !== null;
|
|
61710
|
-
}
|
|
61711
|
-
function lockFontDownloadSetting(locked, host2) {
|
|
61712
|
-
const value = hostFontDownloadLock(host2);
|
|
61713
|
-
if (value === void 0) {
|
|
61714
|
-
return locked;
|
|
61715
|
-
}
|
|
61716
|
-
return { ...locked, [FONT_DOWNLOAD_SETTING_ID]: value };
|
|
61717
|
-
}
|
|
61718
64059
|
var HOST_REGION_ATTRIBUTE = "data-office-region";
|
|
61719
64060
|
var HostRegionHost = class {
|
|
61720
64061
|
#container;
|
|
@@ -72533,53 +74874,6 @@ function placeholderPromptDescriptor(element, mode) {
|
|
|
72533
74874
|
}
|
|
72534
74875
|
return { text: promptText, style: PLACEHOLDER_PROMPT_STYLE };
|
|
72535
74876
|
}
|
|
72536
|
-
var NOT_RECOMMENDED = {
|
|
72537
|
-
kind: null,
|
|
72538
|
-
messageKey: "",
|
|
72539
|
-
defaultReadOnly: false,
|
|
72540
|
-
requiresPassword: false
|
|
72541
|
-
};
|
|
72542
|
-
var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
|
|
72543
|
-
function isTruthyCustomPropertyValue(value) {
|
|
72544
|
-
const normalized = value.trim().toLowerCase();
|
|
72545
|
-
return normalized === "true" || normalized === "1" || normalized === "yes";
|
|
72546
|
-
}
|
|
72547
|
-
function isMarkedAsFinal(customProperties) {
|
|
72548
|
-
if (!customProperties) {
|
|
72549
|
-
return false;
|
|
72550
|
-
}
|
|
72551
|
-
return customProperties.some(
|
|
72552
|
-
(property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
|
|
72553
|
-
);
|
|
72554
|
-
}
|
|
72555
|
-
function readOnlyRecommendation(data) {
|
|
72556
|
-
if (!data) {
|
|
72557
|
-
return NOT_RECOMMENDED;
|
|
72558
|
-
}
|
|
72559
|
-
const verifier = data.modifyVerifier;
|
|
72560
|
-
if (verifier && (verifier.hashData || verifier.algorithmName)) {
|
|
72561
|
-
return {
|
|
72562
|
-
kind: "modifyVerifier",
|
|
72563
|
-
messageKey: "pptx.readOnly.modifyVerifierRecommended",
|
|
72564
|
-
defaultReadOnly: true,
|
|
72565
|
-
// A hash this viewer can actually check requires the password before
|
|
72566
|
-
// "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
|
|
72567
|
-
// of this check (see the field doc comment above): only a missing hash
|
|
72568
|
-
// or an unrecognised algorithm falls back to the plain "Edit anyway"
|
|
72569
|
-
// every other recommendation already has.
|
|
72570
|
-
requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
|
|
72571
|
-
};
|
|
72572
|
-
}
|
|
72573
|
-
if (isMarkedAsFinal(data.customProperties)) {
|
|
72574
|
-
return {
|
|
72575
|
-
kind: "markedFinal",
|
|
72576
|
-
messageKey: "pptx.readOnly.markedFinal",
|
|
72577
|
-
defaultReadOnly: true,
|
|
72578
|
-
requiresPassword: false
|
|
72579
|
-
};
|
|
72580
|
-
}
|
|
72581
|
-
return NOT_RECOMMENDED;
|
|
72582
|
-
}
|
|
72583
74877
|
async function checkModifyPassword(verifier, password) {
|
|
72584
74878
|
if (!verifier?.hashData || !pptx.resolveModifyVerifierAlgorithmName(verifier)) {
|
|
72585
74879
|
return { ok: false, reason: "unsupported-algorithm" };
|
|
@@ -74180,7 +76474,7 @@ var EDIT_POINTS_COMMAND_IDS = [
|
|
|
74180
76474
|
"curved-segment",
|
|
74181
76475
|
"exit"
|
|
74182
76476
|
];
|
|
74183
|
-
var
|
|
76477
|
+
var LABEL_KEYS6 = {
|
|
74184
76478
|
"add-point": "pptx.editPoints.addPoint",
|
|
74185
76479
|
"delete-point": "pptx.editPoints.deletePoint",
|
|
74186
76480
|
"delete-segment": "pptx.editPoints.deleteSegment",
|
|
@@ -74194,10 +76488,10 @@ var LABEL_KEYS5 = {
|
|
|
74194
76488
|
exit: "pptx.editPoints.exit"
|
|
74195
76489
|
};
|
|
74196
76490
|
function editPointsCommandLabelKey(id) {
|
|
74197
|
-
return
|
|
76491
|
+
return LABEL_KEYS6[id];
|
|
74198
76492
|
}
|
|
74199
76493
|
function entry4(id, extra = {}) {
|
|
74200
|
-
return { id, labelKey:
|
|
76494
|
+
return { id, labelKey: LABEL_KEYS6[id], ...extra };
|
|
74201
76495
|
}
|
|
74202
76496
|
function pointCount2(geometry) {
|
|
74203
76497
|
return geometry.subpaths.reduce((sum, sub) => sum + sub.nodes.length, 0);
|
|
@@ -75769,6 +78063,16 @@ var EDITOR_RIBBON_CSS = `
|
|
|
75769
78063
|
background: color-mix(in oklab, var(--pptx-secondary) 50%, transparent);
|
|
75770
78064
|
color: var(--pptx-foreground); border-bottom: 1px solid var(--pptx-border);
|
|
75771
78065
|
}
|
|
78066
|
+
/* Full-screen mode lays the whole ribbon over the slide: the half-transparent fill above
|
|
78067
|
+
would let the slide show through, so the page background goes underneath it. */
|
|
78068
|
+
[data-pptx-editor-chrome] [data-pptx-chrome="ribbon"][data-ribbon-display="fullScreen"][data-ribbon-peek] {
|
|
78069
|
+
background:
|
|
78070
|
+
linear-gradient(
|
|
78071
|
+
color-mix(in oklab, var(--pptx-secondary) 50%, transparent),
|
|
78072
|
+
color-mix(in oklab, var(--pptx-secondary) 50%, transparent)
|
|
78073
|
+
),
|
|
78074
|
+
var(--pptx-background);
|
|
78075
|
+
}
|
|
75772
78076
|
[data-pptx-editor-chrome] [data-pptx-chrome="ribbon-primary"] {
|
|
75773
78077
|
min-height: 32px; height: 32px; padding: 2px 6px; gap: 2px;
|
|
75774
78078
|
border: 0; box-sizing: border-box;
|
|
@@ -78198,14 +80502,27 @@ function homeGalleryApply(family2, controlId, itemId, context3) {
|
|
|
78198
80502
|
return spec5?.gallery ? applyRibbonGalleryItem(spec5.gallery.id, itemId, context3) : void 0;
|
|
78199
80503
|
}
|
|
78200
80504
|
function fontFamilyItems(catalog, t2) {
|
|
78201
|
-
|
|
78202
|
-
|
|
78203
|
-
|
|
78204
|
-
|
|
78205
|
-
|
|
78206
|
-
|
|
78207
|
-
|
|
78208
|
-
|
|
80505
|
+
const groups = chunk2JR2CHTG_cjs.buildFontCatalog({ ...catalog, includeWeightVariants: true });
|
|
80506
|
+
const claimed = new Set(
|
|
80507
|
+
groups.flatMap((group) => group.entries.map((entry6) => entry6.family.toLowerCase()))
|
|
80508
|
+
);
|
|
80509
|
+
return groups.flatMap(
|
|
80510
|
+
(group) => group.entries.flatMap((entry6) => {
|
|
80511
|
+
const row2 = {
|
|
80512
|
+
value: entry6.family,
|
|
80513
|
+
label: entry6.family,
|
|
80514
|
+
group: t2(group.labelKey),
|
|
80515
|
+
fontFamily: entry6.family,
|
|
80516
|
+
...entry6.themeRole && { description: t2(`pptx.font.role.${entry6.themeRole}`) }
|
|
80517
|
+
};
|
|
80518
|
+
const variants = (entry6.variants ?? []).flatMap(({ family: family2 }) => {
|
|
80519
|
+
const key = family2.toLowerCase();
|
|
80520
|
+
if (claimed.has(key)) return [];
|
|
80521
|
+
claimed.add(key);
|
|
80522
|
+
return [{ value: family2, label: family2, group: row2.group, fontFamily: family2 }];
|
|
80523
|
+
});
|
|
80524
|
+
return [row2, ...variants];
|
|
80525
|
+
})
|
|
78209
80526
|
);
|
|
78210
80527
|
}
|
|
78211
80528
|
function fontPickerHomeControls(input, t2) {
|
|
@@ -79299,255 +81616,12 @@ function createSlidePackageClipboard(initialHost) {
|
|
|
79299
81616
|
};
|
|
79300
81617
|
}
|
|
79301
81618
|
|
|
79302
|
-
// src/pptx/render/collaboration-state.ts
|
|
79303
|
-
function writeBackReport(config, state) {
|
|
79304
|
-
if (!config?.onWriteBack || config.role !== "owner") return void 0;
|
|
79305
|
-
return state ?? { status: "idle" };
|
|
79306
|
-
}
|
|
79307
|
-
var COLLABORATION_OFF = Object.freeze({
|
|
79308
|
-
active: false,
|
|
79309
|
-
roomId: void 0,
|
|
79310
|
-
status: "off",
|
|
79311
|
-
synced: false,
|
|
79312
|
-
people: Object.freeze([])
|
|
79313
|
-
});
|
|
79314
|
-
function buildCollaborationState(input) {
|
|
79315
|
-
if (!input.active) return COLLABORATION_OFF;
|
|
79316
|
-
const name = input.userName ?? "";
|
|
79317
|
-
const people = [];
|
|
79318
|
-
if (input.clientId !== null && input.clientId !== void 0) {
|
|
79319
|
-
people.push({
|
|
79320
|
-
clientId: input.clientId,
|
|
79321
|
-
name,
|
|
79322
|
-
color: input.userColor || assignUserColor(name),
|
|
79323
|
-
self: true
|
|
79324
|
-
});
|
|
79325
|
-
}
|
|
79326
|
-
for (const user of input.remoteUsers) {
|
|
79327
|
-
people.push({
|
|
79328
|
-
clientId: user.clientId,
|
|
79329
|
-
name: user.userName,
|
|
79330
|
-
color: user.userColor,
|
|
79331
|
-
self: false
|
|
79332
|
-
});
|
|
79333
|
-
}
|
|
79334
|
-
return {
|
|
79335
|
-
active: true,
|
|
79336
|
-
roomId: input.roomId || void 0,
|
|
79337
|
-
status: input.status,
|
|
79338
|
-
synced: input.synced,
|
|
79339
|
-
people,
|
|
79340
|
-
...input.writeBack ? { writeBack: input.writeBack } : {}
|
|
79341
|
-
};
|
|
79342
|
-
}
|
|
79343
|
-
function collaborationStatesEqual(a, b) {
|
|
79344
|
-
if (a === b) return true;
|
|
79345
|
-
if (a.active !== b.active || a.roomId !== b.roomId || a.status !== b.status || a.synced !== b.synced || a.people.length !== b.people.length || a.writeBack?.status !== b.writeBack?.status || a.writeBack?.lastSavedAt !== b.writeBack?.lastSavedAt || a.writeBack?.error !== b.writeBack?.error) {
|
|
79346
|
-
return false;
|
|
79347
|
-
}
|
|
79348
|
-
return a.people.every((person, index) => {
|
|
79349
|
-
const other = b.people[index];
|
|
79350
|
-
return other !== void 0 && person.clientId === other.clientId && person.name === other.name && person.color === other.color && person.self === other.self;
|
|
79351
|
-
});
|
|
79352
|
-
}
|
|
79353
|
-
function createCollaborationStateReporter(report) {
|
|
79354
|
-
let last = COLLABORATION_OFF;
|
|
79355
|
-
return {
|
|
79356
|
-
update: (state) => {
|
|
79357
|
-
if (collaborationStatesEqual(last, state)) return;
|
|
79358
|
-
last = state;
|
|
79359
|
-
report(state);
|
|
79360
|
-
},
|
|
79361
|
-
current: () => last
|
|
79362
|
-
};
|
|
79363
|
-
}
|
|
79364
|
-
|
|
79365
81619
|
// src/pptx/render/viewer-event-payloads.ts
|
|
79366
81620
|
function autosaveStatusKind(status) {
|
|
79367
81621
|
const state = typeof status === "string" ? status : status.state;
|
|
79368
81622
|
return state === "saving" || state === "saved" || state === "error" ? state : "idle";
|
|
79369
81623
|
}
|
|
79370
81624
|
|
|
79371
|
-
// src/pptx/render/find-replace-session.ts
|
|
79372
|
-
var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
|
|
79373
|
-
matchCase: false,
|
|
79374
|
-
includeNotes: false,
|
|
79375
|
-
includeChartTitles: true,
|
|
79376
|
-
includeChartData: false
|
|
79377
|
-
});
|
|
79378
|
-
var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
|
|
79379
|
-
query: "",
|
|
79380
|
-
replacement: "",
|
|
79381
|
-
options: DEFAULT_FIND_REPLACE_OPTIONS,
|
|
79382
|
-
matches: Object.freeze([]),
|
|
79383
|
-
current: -1,
|
|
79384
|
-
pendingRefind: null
|
|
79385
|
-
});
|
|
79386
|
-
function search(slides, session) {
|
|
79387
|
-
return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
|
|
79388
|
-
}
|
|
79389
|
-
function cursorAfterReplace(pending3, count) {
|
|
79390
|
-
if (count === 0) {
|
|
79391
|
-
return -1;
|
|
79392
|
-
}
|
|
79393
|
-
if (pending3.scope === "all") {
|
|
79394
|
-
return 0;
|
|
79395
|
-
}
|
|
79396
|
-
const created = Math.max(0, count - (pending3.count - 1));
|
|
79397
|
-
return (pending3.index + created) % count;
|
|
79398
|
-
}
|
|
79399
|
-
function reduceFindReplaceSession(session, event) {
|
|
79400
|
-
switch (event.type) {
|
|
79401
|
-
case "search": {
|
|
79402
|
-
const next2 = {
|
|
79403
|
-
...session,
|
|
79404
|
-
query: event.query ?? session.query,
|
|
79405
|
-
options: event.options ? { ...session.options, ...event.options } : session.options,
|
|
79406
|
-
pendingRefind: null
|
|
79407
|
-
};
|
|
79408
|
-
const matches = search(event.slides, next2);
|
|
79409
|
-
return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
|
|
79410
|
-
}
|
|
79411
|
-
case "setReplacement":
|
|
79412
|
-
return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
|
|
79413
|
-
case "step": {
|
|
79414
|
-
const count = session.matches.length;
|
|
79415
|
-
if (count === 0) {
|
|
79416
|
-
return session;
|
|
79417
|
-
}
|
|
79418
|
-
const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
|
|
79419
|
-
const current = (from + event.direction + count) % count;
|
|
79420
|
-
return current === session.current ? session : { ...session, current };
|
|
79421
|
-
}
|
|
79422
|
-
case "replaced":
|
|
79423
|
-
return {
|
|
79424
|
-
...session,
|
|
79425
|
-
pendingRefind: {
|
|
79426
|
-
scope: event.plan.scope,
|
|
79427
|
-
index: event.plan.index,
|
|
79428
|
-
count: event.plan.count,
|
|
79429
|
-
base: event.slides
|
|
79430
|
-
}
|
|
79431
|
-
};
|
|
79432
|
-
case "slidesChanged": {
|
|
79433
|
-
const pending3 = session.pendingRefind;
|
|
79434
|
-
if (!pending3 || event.slides === pending3.base) {
|
|
79435
|
-
return session;
|
|
79436
|
-
}
|
|
79437
|
-
const matches = search(event.slides, session);
|
|
79438
|
-
return {
|
|
79439
|
-
...session,
|
|
79440
|
-
matches,
|
|
79441
|
-
current: cursorAfterReplace(pending3, matches.length),
|
|
79442
|
-
pendingRefind: null
|
|
79443
|
-
};
|
|
79444
|
-
}
|
|
79445
|
-
case "close":
|
|
79446
|
-
return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
|
|
79447
|
-
}
|
|
79448
|
-
}
|
|
79449
|
-
function findReplaceStatus(session) {
|
|
79450
|
-
const total = session.matches.length;
|
|
79451
|
-
return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
|
|
79452
|
-
}
|
|
79453
|
-
function findReplaceTarget(session) {
|
|
79454
|
-
const match = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
79455
|
-
if (!match) {
|
|
79456
|
-
return null;
|
|
79457
|
-
}
|
|
79458
|
-
return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
|
|
79459
|
-
}
|
|
79460
|
-
function matchKey(match) {
|
|
79461
|
-
return JSON.stringify([
|
|
79462
|
-
match.slideIndex,
|
|
79463
|
-
match.elementId,
|
|
79464
|
-
match.elementPath ?? null,
|
|
79465
|
-
match.tableCell ?? null,
|
|
79466
|
-
match.smartArtNodeId ?? null,
|
|
79467
|
-
match.notes ?? false,
|
|
79468
|
-
match.chartTitle ?? false,
|
|
79469
|
-
match.chartSeriesIndex ?? null,
|
|
79470
|
-
match.chartCategoryIndex ?? null,
|
|
79471
|
-
match.segmentIndex,
|
|
79472
|
-
match.startOffset,
|
|
79473
|
-
match.length
|
|
79474
|
-
]);
|
|
79475
|
-
}
|
|
79476
|
-
function planFindReplace(session, slides, scope) {
|
|
79477
|
-
const found = search(slides, session);
|
|
79478
|
-
let matches = found;
|
|
79479
|
-
let index = -1;
|
|
79480
|
-
if (scope === "current") {
|
|
79481
|
-
const current = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
79482
|
-
const key = current ? matchKey(current) : null;
|
|
79483
|
-
index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
|
|
79484
|
-
matches = index >= 0 ? [found[index]] : [];
|
|
79485
|
-
}
|
|
79486
|
-
if (matches.length === 0 || matches.some((match) => match.readOnly)) {
|
|
79487
|
-
return null;
|
|
79488
|
-
}
|
|
79489
|
-
return { scope, matches, replacement: session.replacement, count: found.length, index };
|
|
79490
|
-
}
|
|
79491
|
-
|
|
79492
|
-
// src/pptx/render/find-replace-session-actions.ts
|
|
79493
|
-
function findReplaceSessionActions(store, host2) {
|
|
79494
|
-
const apply7 = (event) => {
|
|
79495
|
-
const current = store.get();
|
|
79496
|
-
const next2 = reduceFindReplaceSession(current, event);
|
|
79497
|
-
if (next2 !== current) {
|
|
79498
|
-
store.set(next2);
|
|
79499
|
-
}
|
|
79500
|
-
return next2 !== current;
|
|
79501
|
-
};
|
|
79502
|
-
const show = () => {
|
|
79503
|
-
const target = findReplaceTarget(store.get());
|
|
79504
|
-
if (target) {
|
|
79505
|
-
host2.navigate(target);
|
|
79506
|
-
}
|
|
79507
|
-
};
|
|
79508
|
-
const step2 = (direction) => {
|
|
79509
|
-
apply7({ type: "step", direction });
|
|
79510
|
-
show();
|
|
79511
|
-
};
|
|
79512
|
-
const slidesChanged = () => {
|
|
79513
|
-
if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
|
|
79514
|
-
show();
|
|
79515
|
-
}
|
|
79516
|
-
};
|
|
79517
|
-
const replace = (scope) => {
|
|
79518
|
-
const slides = host2.slides();
|
|
79519
|
-
const plan = planFindReplace(store.get(), slides, scope);
|
|
79520
|
-
if (!plan) {
|
|
79521
|
-
return 0;
|
|
79522
|
-
}
|
|
79523
|
-
const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
|
|
79524
|
-
if (result.replacements === 0) {
|
|
79525
|
-
return 0;
|
|
79526
|
-
}
|
|
79527
|
-
host2.commit(result.slides, scope);
|
|
79528
|
-
apply7({ type: "replaced", plan, slides });
|
|
79529
|
-
slidesChanged();
|
|
79530
|
-
return result.replacements;
|
|
79531
|
-
};
|
|
79532
|
-
return {
|
|
79533
|
-
search: (change = {}) => {
|
|
79534
|
-
apply7({ type: "search", slides: host2.slides(), ...change });
|
|
79535
|
-
show();
|
|
79536
|
-
},
|
|
79537
|
-
setReplacement: (replacement) => {
|
|
79538
|
-
apply7({ type: "setReplacement", replacement });
|
|
79539
|
-
},
|
|
79540
|
-
next: () => step2(1),
|
|
79541
|
-
previous: () => step2(-1),
|
|
79542
|
-
replaceCurrent: () => replace("current"),
|
|
79543
|
-
replaceAll: () => replace("all"),
|
|
79544
|
-
slidesChanged,
|
|
79545
|
-
close: () => {
|
|
79546
|
-
apply7({ type: "close" });
|
|
79547
|
-
}
|
|
79548
|
-
};
|
|
79549
|
-
}
|
|
79550
|
-
|
|
79551
81625
|
// src/pptx/render/viewer-api-guard.ts
|
|
79552
81626
|
var GATED_VIEWER_EDIT_METHODS = [
|
|
79553
81627
|
"addSlide",
|
|
@@ -79889,7 +81963,7 @@ function createMobileIcon(doc, icon2) {
|
|
|
79889
81963
|
|
|
79890
81964
|
// src/pptx/web-components/mobile-bar.ts
|
|
79891
81965
|
var identity = (key) => key;
|
|
79892
|
-
var
|
|
81966
|
+
var LABEL_KEYS7 = {
|
|
79893
81967
|
slides: "pptx.sections.slides",
|
|
79894
81968
|
insert: "pptx.mobileBar.insert",
|
|
79895
81969
|
inspector: "pptx.field.format",
|
|
@@ -79960,7 +82034,7 @@ function definePptxMobileBar(registry2) {
|
|
|
79960
82034
|
if (id === "notes") {
|
|
79961
82035
|
button.setAttribute("aria-label", t2("pptx.statusBar.toggleNotes"));
|
|
79962
82036
|
}
|
|
79963
|
-
label2.textContent = t2(
|
|
82037
|
+
label2.textContent = t2(LABEL_KEYS7[id]);
|
|
79964
82038
|
const count = id === "comments" ? s.commentCount ?? 0 : 0;
|
|
79965
82039
|
badge.hidden = count <= 0;
|
|
79966
82040
|
badge.textContent = count > 99 ? "99+" : String(count);
|
|
@@ -83211,28 +85285,28 @@ function axisView(axis, advanced = false) {
|
|
|
83211
85285
|
logScale: axis.scaling.logBase !== void 0,
|
|
83212
85286
|
numberFormat: axis.numberFormat && !axis.numberFormat.sourceLinked ? axis.numberFormat.formatCode : ""
|
|
83213
85287
|
};
|
|
83214
|
-
const
|
|
85288
|
+
const copy2 = (key, value) => {
|
|
83215
85289
|
if (value !== void 0) view2[key] = value;
|
|
83216
85290
|
};
|
|
83217
|
-
|
|
83218
|
-
|
|
83219
|
-
|
|
83220
|
-
|
|
83221
|
-
|
|
83222
|
-
|
|
83223
|
-
|
|
83224
|
-
|
|
83225
|
-
|
|
83226
|
-
|
|
83227
|
-
|
|
85291
|
+
copy2("min", axis.scaling.min);
|
|
85292
|
+
copy2("max", axis.scaling.max);
|
|
85293
|
+
copy2("logBase", axis.scaling.logBase);
|
|
85294
|
+
copy2("majorUnit", axis.majorUnit);
|
|
85295
|
+
copy2("minorUnit", axis.minorUnit);
|
|
85296
|
+
copy2("crosses", axis.crosses);
|
|
85297
|
+
copy2("crossesAt", axis.crossesAt);
|
|
85298
|
+
copy2("displayUnits", axis.displayUnits?.builtInUnit);
|
|
85299
|
+
copy2("majorTickMark", axis.majorTickMark);
|
|
85300
|
+
copy2("minorTickMark", axis.minorTickMark);
|
|
85301
|
+
copy2("tickLabelPosition", axis.tickLabelPosition);
|
|
83228
85302
|
if (advanced) {
|
|
83229
85303
|
view2.title = axis.title?.text ?? "";
|
|
83230
85304
|
if (axis.numberFormat) view2.numberFormatSourceLinked = axis.numberFormat.sourceLinked ?? true;
|
|
83231
85305
|
if (axis.kind === "date") {
|
|
83232
85306
|
view2.timeUnitsEditable = true;
|
|
83233
|
-
|
|
83234
|
-
|
|
83235
|
-
|
|
85307
|
+
copy2("baseTimeUnit", axis.baseTimeUnit);
|
|
85308
|
+
copy2("majorTimeUnit", axis.majorTimeUnit);
|
|
85309
|
+
copy2("minorTimeUnit", axis.minorTimeUnit);
|
|
83236
85310
|
}
|
|
83237
85311
|
}
|
|
83238
85312
|
return view2;
|
|
@@ -83358,13 +85432,13 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
83358
85432
|
labelOptions: labels
|
|
83359
85433
|
};
|
|
83360
85434
|
}
|
|
83361
|
-
var chartFormatLocale = (value) => i18n.normalizeLocale(value,
|
|
85435
|
+
var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunk3JGYWDMR_cjs.CHART_FORMAT_LOCALES, "en");
|
|
83362
85436
|
function chartFormatTranslator(locale, override) {
|
|
83363
|
-
const strings =
|
|
85437
|
+
const strings = chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
|
|
83364
85438
|
return (key, params, fallback) => {
|
|
83365
85439
|
const own = override?.(key, params, fallback);
|
|
83366
85440
|
if (own && own !== key) return own;
|
|
83367
|
-
return strings[key] ??
|
|
85441
|
+
return strings[key] ?? chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
|
|
83368
85442
|
};
|
|
83369
85443
|
}
|
|
83370
85444
|
|
|
@@ -88485,7 +90559,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
88485
90559
|
if (this.#live || this.#draw) {
|
|
88486
90560
|
return;
|
|
88487
90561
|
}
|
|
88488
|
-
this.#live = import('./smartart-insert-preview-
|
|
90562
|
+
this.#live = import('./smartart-insert-preview-4DGDUPAL.cjs').then((module) => {
|
|
88489
90563
|
if (this.#draw || !this.#picker) {
|
|
88490
90564
|
return;
|
|
88491
90565
|
}
|
|
@@ -97439,6 +99513,13 @@ exports.BI_LEVEL_THRESHOLDS = BI_LEVEL_THRESHOLDS;
|
|
|
97439
99513
|
exports.BOTTOM_TRIGGER_FRACTION = BOTTOM_TRIGGER_FRACTION;
|
|
97440
99514
|
exports.BRIGHTNESS_CONTRAST_STEPS = BRIGHTNESS_CONTRAST_STEPS;
|
|
97441
99515
|
exports.BROADCAST_THROTTLE_MS = BROADCAST_THROTTLE_MS;
|
|
99516
|
+
exports.BUILDING_BLOCK_GROUP_IDS = BUILDING_BLOCK_GROUP_IDS;
|
|
99517
|
+
exports.BUILDING_BLOCK_LIVE_OPTIONS = BUILDING_BLOCK_LIVE_OPTIONS;
|
|
99518
|
+
exports.BUILDING_BLOCK_OK = BUILDING_BLOCK_OK;
|
|
99519
|
+
exports.BUILDING_BLOCK_REQUEST_ACTIONS = BUILDING_BLOCK_REQUEST_ACTIONS;
|
|
99520
|
+
exports.BUILDING_BLOCK_SHELL_IDLE = BUILDING_BLOCK_SHELL_IDLE;
|
|
99521
|
+
exports.BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS;
|
|
99522
|
+
exports.BUILDING_BLOCK_VIEWABLE_REQUESTS = BUILDING_BLOCK_VIEWABLE_REQUESTS;
|
|
97442
99523
|
exports.CANVAS_CONTEXT_MENU_COMMAND_IDS = CANVAS_CONTEXT_MENU_COMMAND_IDS;
|
|
97443
99524
|
exports.CANVAS_DIMENSION_CANDIDATES = CANVAS_DIMENSION_CANDIDATES;
|
|
97444
99525
|
exports.CATEGORIES = CATEGORIES;
|
|
@@ -97496,6 +99577,7 @@ exports.CROP_HANDLE_THICKNESS_PX = CROP_HANDLE_THICKNESS_PX;
|
|
|
97496
99577
|
exports.CROP_LABEL_KEY = CROP_LABEL_KEY;
|
|
97497
99578
|
exports.CROP_MODE_HINT_KEY = CROP_MODE_HINT_KEY;
|
|
97498
99579
|
exports.CURSOR_PALETTE = CURSOR_PALETTE;
|
|
99580
|
+
exports.CUSTOM_PROPERTY_TYPES = CUSTOM_PROPERTY_TYPES;
|
|
97499
99581
|
exports.DATA_LABEL_CONTENT_OPTIONS = DATA_LABEL_CONTENT_OPTIONS;
|
|
97500
99582
|
exports.DATA_LABEL_POSITION_OPTIONS = DATA_LABEL_POSITION_OPTIONS;
|
|
97501
99583
|
exports.DEBOUNCE_MS = DEBOUNCE_MS;
|
|
@@ -97524,6 +99606,7 @@ exports.DEFAULT_PALETTE = DEFAULT_PALETTE;
|
|
|
97524
99606
|
exports.DEFAULT_POINTER_PRESSURE = DEFAULT_POINTER_PRESSURE;
|
|
97525
99607
|
exports.DEFAULT_PREVIEW_ELEMENT_CAP = DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
97526
99608
|
exports.DEFAULT_QUICK_ACCESS_COMMAND_IDS = DEFAULT_QUICK_ACCESS_COMMAND_IDS;
|
|
99609
|
+
exports.DEFAULT_RIBBON_DISPLAY_MODE = DEFAULT_RIBBON_DISPLAY_MODE;
|
|
97527
99610
|
exports.DEFAULT_RIBBON_TRANSITION_DURATION_SEC = DEFAULT_RIBBON_TRANSITION_DURATION_SEC;
|
|
97528
99611
|
exports.DEFAULT_ROUND_RECT_ADJUSTMENT = DEFAULT_ROUND_RECT_ADJUSTMENT;
|
|
97529
99612
|
exports.DEFAULT_ROW_HEIGHT = DEFAULT_ROW_HEIGHT;
|
|
@@ -97547,7 +99630,9 @@ exports.DRAW_RIBBON_TOOLS = DRAW_RIBBON_TOOLS;
|
|
|
97547
99630
|
exports.DRAW_WIDTH_PRESETS = DRAW_WIDTH_PRESETS;
|
|
97548
99631
|
exports.DUOTONE_PRESETS = DUOTONE_PRESETS;
|
|
97549
99632
|
exports.EASE = EASE;
|
|
99633
|
+
exports.EDITABLE_APP_PROPERTY_KEYS = EDITABLE_APP_PROPERTY_KEYS;
|
|
97550
99634
|
exports.EDITABLE_AXIS_ROWS = EDITABLE_AXIS_ROWS;
|
|
99635
|
+
exports.EDITABLE_CORE_PROPERTY_KEYS = EDITABLE_CORE_PROPERTY_KEYS;
|
|
97551
99636
|
exports.EDITOR_CHROME_CSS = EDITOR_CHROME_CSS;
|
|
97552
99637
|
exports.EDITOR_SHORTCUT_ACTION_IDS = EDITOR_SHORTCUT_ACTION_IDS;
|
|
97553
99638
|
exports.EDITOR_SHORTCUT_DESCRIPTIONS = EDITOR_SHORTCUT_DESCRIPTIONS;
|
|
@@ -97573,6 +99658,7 @@ exports.ELEMENT_CLIPBOARD_VERSION = ELEMENT_CLIPBOARD_VERSION;
|
|
|
97573
99658
|
exports.ELEMENT_CONTEXT_MENU_COMMAND_IDS = ELEMENT_CONTEXT_MENU_COMMAND_IDS;
|
|
97574
99659
|
exports.ELEMENT_GEOMETRY_SECTION = ELEMENT_GEOMETRY_SECTION;
|
|
97575
99660
|
exports.ELEMENT_GEOMETRY_SECTIONS = ELEMENT_GEOMETRY_SECTIONS;
|
|
99661
|
+
exports.ELEMENT_RENDER_FAULT_KEY = ELEMENT_RENDER_FAULT_KEY;
|
|
97576
99662
|
exports.EMPH_FILTER_PRESETS = EMPH_FILTER_PRESETS;
|
|
97577
99663
|
exports.EMPTY_RESOLVED_CUSTOMIZATION = EMPTY_RESOLVED_CUSTOMIZATION;
|
|
97578
99664
|
exports.EMPTY_RIBBON_TRANSITION_DRAFT = EMPTY_RIBBON_TRANSITION_DRAFT;
|
|
@@ -97594,6 +99680,7 @@ exports.EditPointsSession = EditPointsSession;
|
|
|
97594
99680
|
exports.FEATURE_ENTRY_POINTS = FEATURE_ENTRY_POINTS;
|
|
97595
99681
|
exports.FILL_MODE_OPTIONS = FILL_MODE_OPTIONS;
|
|
97596
99682
|
exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
|
|
99683
|
+
exports.FIND_MATCH_ATTRIBUTE = FIND_MATCH_ATTRIBUTE;
|
|
97597
99684
|
exports.FIXED_SPACING_RUN_LINE_HEIGHT = FIXED_SPACING_RUN_LINE_HEIGHT;
|
|
97598
99685
|
exports.FIXED_TAB_GALLERIES = FIXED_TAB_GALLERIES;
|
|
97599
99686
|
exports.FLY_SUBTYPE_TO_EDGE = FLY_SUBTYPE_TO_EDGE;
|
|
@@ -97648,6 +99735,10 @@ exports.HOME_MERGE_ITEMS = HOME_MERGE_ITEMS;
|
|
|
97648
99735
|
exports.HOME_SELECT_ITEMS = HOME_SELECT_ITEMS;
|
|
97649
99736
|
exports.HOME_SHAPE_ITEMS = HOME_SHAPE_ITEMS;
|
|
97650
99737
|
exports.HOME_TEXT_DIRECTION_ITEMS = HOME_TEXT_DIRECTION_ITEMS;
|
|
99738
|
+
exports.HOST_IMAGE_MAX_BYTES = HOST_IMAGE_MAX_BYTES;
|
|
99739
|
+
exports.HOST_MEDIA_MAX_BYTES = HOST_MEDIA_MAX_BYTES;
|
|
99740
|
+
exports.HYPERLINK_ACTION_VERB_MAP = HYPERLINK_ACTION_VERB_MAP;
|
|
99741
|
+
exports.HYPERLINK_ACTION_VERB_TO_PPACTION = HYPERLINK_ACTION_VERB_TO_PPACTION;
|
|
97651
99742
|
exports.INDENT_PX = INDENT_PX;
|
|
97652
99743
|
exports.INITIAL_FIND_REPLACE_SESSION = INITIAL_FIND_REPLACE_SESSION;
|
|
97653
99744
|
exports.INITIAL_READ_ONLY_SESSION = INITIAL_READ_ONLY_SESSION;
|
|
@@ -97694,9 +99785,11 @@ exports.MAX_INDENT_LEVEL = MAX_INDENT_LEVEL;
|
|
|
97694
99785
|
exports.MAX_LABEL_CHARS = MAX_LABEL_CHARS;
|
|
97695
99786
|
exports.MAX_PARAGRAPH_LEVEL = MAX_PARAGRAPH_LEVEL;
|
|
97696
99787
|
exports.MAX_ZOOM_SCALE = MAX_ZOOM_SCALE;
|
|
99788
|
+
exports.MEDIA_AUDIO_SIZE = MEDIA_AUDIO_SIZE;
|
|
97697
99789
|
exports.MEDIA_CHROME_ATTRIBUTE = MEDIA_CHROME_ATTRIBUTE;
|
|
97698
99790
|
exports.MEDIA_FALLBACK_ICONS = MEDIA_FALLBACK_ICONS;
|
|
97699
99791
|
exports.MEDIA_FULLSCREEN_OVERLAY_STYLE = MEDIA_FULLSCREEN_OVERLAY_STYLE;
|
|
99792
|
+
exports.MEDIA_VIDEO_MAX_SIZE = MEDIA_VIDEO_MAX_SIZE;
|
|
97700
99793
|
exports.MERGE_CURVE_SEGMENTS = MERGE_CURVE_SEGMENTS;
|
|
97701
99794
|
exports.MERGE_SHAPES_HINT_KEY = MERGE_SHAPES_HINT_KEY;
|
|
97702
99795
|
exports.MERGE_SHAPES_LABEL_KEY = MERGE_SHAPES_LABEL_KEY;
|
|
@@ -97706,6 +99799,7 @@ exports.MIN_COLUMN_PROPORTION = MIN_COLUMN_PROPORTION;
|
|
|
97706
99799
|
exports.MIN_COLUMN_WIDTH_FRACTION = MIN_COLUMN_WIDTH_FRACTION;
|
|
97707
99800
|
exports.MIN_CROP_FRAME_PX = MIN_CROP_FRAME_PX;
|
|
97708
99801
|
exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE4;
|
|
99802
|
+
exports.MIN_OPEN_PASSWORD_LENGTH = MIN_OPEN_PASSWORD_LENGTH;
|
|
97709
99803
|
exports.MIN_ROW_HEIGHT = MIN_ROW_HEIGHT;
|
|
97710
99804
|
exports.MIN_TOUCH_TARGET_PX = MIN_TOUCH_TARGET_PX;
|
|
97711
99805
|
exports.MIN_ZOOM_SCALE = MIN_ZOOM_SCALE;
|
|
@@ -97847,6 +99941,7 @@ exports.RECORD_COMMAND_GROUPS = RECORD_COMMAND_GROUPS;
|
|
|
97847
99941
|
exports.REVIEW_COMMENT_COMMAND_IDS = REVIEW_COMMENT_COMMAND_IDS;
|
|
97848
99942
|
exports.RGBA_BYTES_PER_PIXEL = RGBA_BYTES_PER_PIXEL;
|
|
97849
99943
|
exports.RIBBON_ADD_IN_TAB_ATTR = RIBBON_ADD_IN_TAB_ATTR;
|
|
99944
|
+
exports.RIBBON_AUTO_COLLAPSE_MEDIA = RIBBON_AUTO_COLLAPSE_MEDIA;
|
|
97850
99945
|
exports.RIBBON_CONTEXTUAL_TABS = RIBBON_CONTEXTUAL_TABS;
|
|
97851
99946
|
exports.RIBBON_CONTEXTUAL_TAB_ATTR = RIBBON_CONTEXTUAL_TAB_ATTR;
|
|
97852
99947
|
exports.RIBBON_CONTROL_ALIASES = RIBBON_CONTROL_ALIASES;
|
|
@@ -97854,6 +99949,9 @@ exports.RIBBON_CONTROL_ATTR = RIBBON_CONTROL_ATTR;
|
|
|
97854
99949
|
exports.RIBBON_CONTROL_CATALOG = RIBBON_CONTROL_CATALOG;
|
|
97855
99950
|
exports.RIBBON_CONTROL_ICONS = RIBBON_CONTROL_ICONS;
|
|
97856
99951
|
exports.RIBBON_CONTROL_IDS = RIBBON_CONTROL_IDS;
|
|
99952
|
+
exports.RIBBON_DISPLAY_MODES = RIBBON_DISPLAY_MODES;
|
|
99953
|
+
exports.RIBBON_DISPLAY_OPTIONS_LABEL_KEY = RIBBON_DISPLAY_OPTIONS_LABEL_KEY;
|
|
99954
|
+
exports.RIBBON_DISPLAY_REVEAL_LABEL_KEY = RIBBON_DISPLAY_REVEAL_LABEL_KEY;
|
|
97857
99955
|
exports.RIBBON_GALLERY_ATTR = RIBBON_GALLERY_ATTR;
|
|
97858
99956
|
exports.RIBBON_GALLERY_IDS = RIBBON_GALLERY_IDS;
|
|
97859
99957
|
exports.RIBBON_GALLERY_ITEM_ATTR = RIBBON_GALLERY_ITEM_ATTR;
|
|
@@ -98047,6 +100145,7 @@ exports.alignPatch = alignPatch;
|
|
|
98047
100145
|
exports.angularAdjustmentKeys = angularAdjustmentKeys;
|
|
98048
100146
|
exports.annotationCapturesPointer = annotationCapturesPointer;
|
|
98049
100147
|
exports.annotationOverlayZIndex = annotationOverlayZIndex;
|
|
100148
|
+
exports.appPropertiesChanged = appPropertiesChanged;
|
|
98050
100149
|
exports.appendPresentationInkPoint = appendPresentationInkPoint;
|
|
98051
100150
|
exports.apply3dEffects = apply3dEffects;
|
|
98052
100151
|
exports.applyAcceptAllSlides = applyAcceptAllSlides;
|
|
@@ -98057,6 +100156,7 @@ exports.applyAnimationOpacity = applyAnimationOpacity;
|
|
|
98057
100156
|
exports.applyAnimationTimelineOrder = applyAnimationTimelineOrder;
|
|
98058
100157
|
exports.applyAutoCorrect = applyAutoCorrect;
|
|
98059
100158
|
exports.applyAutoCorrectToEdit = applyAutoCorrectToEdit;
|
|
100159
|
+
exports.applyBuildingBlockLiveOptions = applyBuildingBlockLiveOptions;
|
|
98060
100160
|
exports.applyChart3DDrag = applyChart3DDrag;
|
|
98061
100161
|
exports.applyChart3DSelect = applyChart3DSelect;
|
|
98062
100162
|
exports.applyChartBuildReveal = applyChartBuildReveal;
|
|
@@ -98066,6 +100166,7 @@ exports.applyChartFormatField = applyChartFormatField;
|
|
|
98066
100166
|
exports.applyChartRevealDescriptor = applyChartRevealDescriptor;
|
|
98067
100167
|
exports.applyChartStylePreset = applyChartStylePreset;
|
|
98068
100168
|
exports.applyColorChange = applyColorChange;
|
|
100169
|
+
exports.applyCustomShowEdit = applyCustomShowEdit;
|
|
98069
100170
|
exports.applyDiagramRevealDescriptor = applyDiagramRevealDescriptor;
|
|
98070
100171
|
exports.applyDrawingColorTransforms = applyDrawingColorTransforms;
|
|
98071
100172
|
exports.applyDuotone = applyDuotone;
|
|
@@ -98096,6 +100197,7 @@ exports.applyRenderedElementAccessibility = applyRenderedElementAccessibility;
|
|
|
98096
100197
|
exports.applyReroutedConnectors = applyReroutedConnectors;
|
|
98097
100198
|
exports.applyRibbonGalleryItem = applyRibbonGalleryItem;
|
|
98098
100199
|
exports.applyRibbonTransitionDraft = applyRibbonTransitionDraft;
|
|
100200
|
+
exports.applySlideShowSettingsPatch = applySlideShowSettingsPatch;
|
|
98099
100201
|
exports.applySlideTransitionSound = applySlideTransitionSound;
|
|
98100
100202
|
exports.applySmartArtTextPaneRequest = applySmartArtTextPaneRequest;
|
|
98101
100203
|
exports.applySorterAction = applySorterAction;
|
|
@@ -98130,6 +100232,7 @@ exports.attachPresentationVisibilityPause = attachPresentationVisibilityPause;
|
|
|
98130
100232
|
exports.attachRibbonOverflow = attachRibbonOverflow;
|
|
98131
100233
|
exports.attachRotateHandlePlacement = attachRotateHandlePlacement;
|
|
98132
100234
|
exports.attachViewerHyperlinks = attachViewerHyperlinks;
|
|
100235
|
+
exports.attachViewportNavigation = attachViewportNavigation;
|
|
98133
100236
|
exports.authorConnectorBetweenSites = authorConnectorBetweenSites;
|
|
98134
100237
|
exports.authoredLetterSpacingPx = authoredLetterSpacingPx;
|
|
98135
100238
|
exports.autoFitModeOf = autoFitModeOf;
|
|
@@ -98165,6 +100268,7 @@ exports.boundsOf = boundsOf;
|
|
|
98165
100268
|
exports.boxForAnimation = boxForAnimation;
|
|
98166
100269
|
exports.boxOverlapRatio = boxOverlapRatio;
|
|
98167
100270
|
exports.boxesOverlap = boxesOverlap;
|
|
100271
|
+
exports.broadcastGroup = broadcastGroup;
|
|
98168
100272
|
exports.build3DExtrusionData = build3DExtrusionData;
|
|
98169
100273
|
exports.buildAbsoluteRotationKeyframe = buildAbsoluteRotationKeyframe;
|
|
98170
100274
|
exports.buildAbsoluteScaleKeyframe = buildAbsoluteScaleKeyframe;
|
|
@@ -98200,6 +100304,7 @@ exports.buildCropOverlay = buildCropOverlay;
|
|
|
98200
100304
|
exports.buildDeckJson = buildDeckJson;
|
|
98201
100305
|
exports.buildDeckSaveOptions = buildDeckSaveOptions;
|
|
98202
100306
|
exports.buildDirectionGrid = buildDirectionGrid;
|
|
100307
|
+
exports.buildDocumentPropertiesActions = buildDocumentPropertiesActions;
|
|
98203
100308
|
exports.buildDuotoneCacheKey = buildDuotoneCacheKey;
|
|
98204
100309
|
exports.buildDynamicKeyframe = buildDynamicKeyframe;
|
|
98205
100310
|
exports.buildDynamicKeyframes = buildDynamicKeyframes;
|
|
@@ -98209,6 +100314,8 @@ exports.buildElementClipboardPayload = buildElementClipboardPayload;
|
|
|
98209
100314
|
exports.buildEmbeddedFontStyles = buildEmbeddedFontStyles;
|
|
98210
100315
|
exports.buildEquationBlockStyle = buildEquationBlockStyle;
|
|
98211
100316
|
exports.buildFieldSubstitutionContext = buildFieldSubstitutionContext;
|
|
100317
|
+
exports.buildFindReplaceActions = buildFindReplaceActions;
|
|
100318
|
+
exports.buildFontEmbeddingActions = buildFontEmbeddingActions;
|
|
98212
100319
|
exports.buildFontFaceRule = buildFontFaceRule;
|
|
98213
100320
|
exports.buildForeignObjectSvgBody = buildForeignObjectSvgBody;
|
|
98214
100321
|
exports.buildFreeformShapeElement = buildFreeformShapeElement;
|
|
@@ -98229,6 +100336,7 @@ exports.buildInlineListStylePatch = buildInlineListStylePatch;
|
|
|
98229
100336
|
exports.buildInlineStyleText = buildInlineStyleText;
|
|
98230
100337
|
exports.buildInlineTextCommitPatch = buildInlineTextCommitPatch;
|
|
98231
100338
|
exports.buildJoinCollaborationConfig = buildJoinCollaborationConfig;
|
|
100339
|
+
exports.buildLayoutActions = buildLayoutActions;
|
|
98232
100340
|
exports.buildLiveInkStrokeView = buildLiveInkStrokeView;
|
|
98233
100341
|
exports.buildMirrorTiledBackground = buildMirrorTiledBackground;
|
|
98234
100342
|
exports.buildMorphAnimationRules = buildMorphAnimationRules;
|
|
@@ -98250,6 +100358,7 @@ exports.buildOptionsBaseline = buildOptionsBaseline;
|
|
|
98250
100358
|
exports.buildOutline = buildOutline;
|
|
98251
100359
|
exports.buildOutlinePrintJobDocument = buildOutlinePrintJobDocument;
|
|
98252
100360
|
exports.buildParagraphs = buildParagraphs;
|
|
100361
|
+
exports.buildPasswordProtectionActions = buildPasswordProtectionActions;
|
|
98253
100362
|
exports.buildPngChunk = buildPngChunk;
|
|
98254
100363
|
exports.buildPptxOptionCategories = buildPptxOptionCategories;
|
|
98255
100364
|
exports.buildPresentationAudienceUrl = buildPresentationAudienceUrl;
|
|
@@ -98272,6 +100381,7 @@ exports.buildRunTabLines = buildRunTabLines;
|
|
|
98272
100381
|
exports.buildSectionContextMenuEntries = buildSectionContextMenuEntries;
|
|
98273
100382
|
exports.buildShareConfig = buildShareConfig;
|
|
98274
100383
|
exports.buildShareUrl = buildShareUrl;
|
|
100384
|
+
exports.buildSignatureActions = buildSignatureActions;
|
|
98275
100385
|
exports.buildSlideOverflowMap = buildSlideOverflowMap;
|
|
98276
100386
|
exports.buildSlidePaneContextMenuEntries = buildSlidePaneContextMenuEntries;
|
|
98277
100387
|
exports.buildSlideSorterContextMenuEntries = buildSlideSorterContextMenuEntries;
|
|
@@ -98320,6 +100430,9 @@ exports.buildWarpPath = buildWarpPath;
|
|
|
98320
100430
|
exports.buildWarpedGlyphOutlinePathD = buildWarpedGlyphOutlinePathD;
|
|
98321
100431
|
exports.buildWrapperStyle = buildWrapperStyle;
|
|
98322
100432
|
exports.buildZoomTransitionOverride = buildZoomTransitionOverride;
|
|
100433
|
+
exports.buildingBlockFailure = buildingBlockFailure;
|
|
100434
|
+
exports.buildingBlockRequestAction = buildingBlockRequestAction;
|
|
100435
|
+
exports.buildingBlockShellsEqual = buildingBlockShellsEqual;
|
|
98323
100436
|
exports.builtinTableStyleMap = builtinTableStyleMap;
|
|
98324
100437
|
exports.calculateContinuationPageMaxLines = calculateContinuationPageMaxLines;
|
|
98325
100438
|
exports.calculateNotesPageLayout = calculateNotesPageLayout;
|
|
@@ -98428,6 +100541,7 @@ exports.closeReadingView = closeReadingView;
|
|
|
98428
100541
|
exports.cloudFilesLabels = cloudFilesLabels;
|
|
98429
100542
|
exports.coerceInspectorFieldValue = coerceInspectorFieldValue;
|
|
98430
100543
|
exports.collaborationHistoryReady = collaborationHistoryReady;
|
|
100544
|
+
exports.collaborationOptionChange = collaborationOptionChange;
|
|
98431
100545
|
exports.collaborationStatesEqual = collaborationStatesEqual;
|
|
98432
100546
|
exports.collectAccessibilityIssues = collectAccessibilityIssues;
|
|
98433
100547
|
exports.collectChartBuildInfo = collectChartBuildInfo;
|
|
@@ -98541,6 +100655,9 @@ exports.createActiveAnimationGroup = createActiveAnimationGroup;
|
|
|
98541
100655
|
exports.createAutosaveController = createAutosaveController;
|
|
98542
100656
|
exports.createAutosaveRecoveryController = createAutosaveRecoveryController;
|
|
98543
100657
|
exports.createBackstagePresentation = createBackstagePresentation;
|
|
100658
|
+
exports.createBuildingBlockGroupContext = createBuildingBlockGroupContext;
|
|
100659
|
+
exports.createBuildingBlockRequests = createBuildingBlockRequests;
|
|
100660
|
+
exports.createBuildingBlockShell = createBuildingBlockShell;
|
|
98544
100661
|
exports.createCloudDocumentController = createCloudDocumentController;
|
|
98545
100662
|
exports.createCollabProvider = createCollabProvider;
|
|
98546
100663
|
exports.createCollaborationHistory = createCollaborationHistory;
|
|
@@ -98554,9 +100671,11 @@ exports.createDeckStyleHost = createDeckStyleHost;
|
|
|
98554
100671
|
exports.createDefaultChartElement = createDefaultChartElement;
|
|
98555
100672
|
exports.createDefaultChartUserShapeGroupChild = createDefaultChartUserShapeGroupChild;
|
|
98556
100673
|
exports.createEditorHistoryController = createEditorHistoryController;
|
|
100674
|
+
exports.createElementRenderFailures = createElementRenderFailures;
|
|
98557
100675
|
exports.createEmbeddedFontsSheet = createEmbeddedFontsSheet;
|
|
98558
100676
|
exports.createEmbeddedOutlineFontsSlot = createEmbeddedOutlineFontsSlot;
|
|
98559
100677
|
exports.createEnvelopeWarp = createEnvelopeWarp;
|
|
100678
|
+
exports.createFindBarController = createFindBarController;
|
|
98560
100679
|
exports.createGalleryPreviewController = createGalleryPreviewController;
|
|
98561
100680
|
exports.createGestureController = createGestureController;
|
|
98562
100681
|
exports.createGlyphOutlineLookup = createGlyphOutlineLookup;
|
|
@@ -98567,6 +100686,7 @@ exports.createInlineListSeed = createInlineListSeed;
|
|
|
98567
100686
|
exports.createInspectorColorFields = createInspectorColorFields;
|
|
98568
100687
|
exports.createLiveColorInput = createLiveColorInput;
|
|
98569
100688
|
exports.createPlainNotesSegments = createPlainNotesSegments;
|
|
100689
|
+
exports.createPptxBuildingBlockSession = createPptxBuildingBlockSession;
|
|
98570
100690
|
exports.createPresenceProjector = createPresenceProjector;
|
|
98571
100691
|
exports.createPresencePublisher = createPresencePublisher;
|
|
98572
100692
|
exports.createPresentationKeyBuffer = createPresentationKeyBuffer;
|
|
@@ -98576,7 +100696,9 @@ exports.createPresenterShowGuard = createPresenterShowGuard;
|
|
|
98576
100696
|
exports.createPresenterTimer = createPresenterTimer;
|
|
98577
100697
|
exports.createPreviewEditGuard = createPreviewEditGuard;
|
|
98578
100698
|
exports.createRibbonControlIcon = createRibbonControlIcon;
|
|
100699
|
+
exports.createRibbonDisplayController = createRibbonDisplayController;
|
|
98579
100700
|
exports.createSaveProgressController = createSaveProgressController;
|
|
100701
|
+
exports.createSaveRevisionController = createSaveRevisionController;
|
|
98580
100702
|
exports.createSheetDismissGesture = createSheetDismissGesture;
|
|
98581
100703
|
exports.createSlidePackageClipboard = createSlidePackageClipboard;
|
|
98582
100704
|
exports.createSlideSorterState = createSlideSorterState;
|
|
@@ -98610,6 +100732,7 @@ exports.cssKeyframeName = cssKeyframeName;
|
|
|
98610
100732
|
exports.cubicBounds = cubicBounds;
|
|
98611
100733
|
exports.cubicPointAt = cubicPointAt;
|
|
98612
100734
|
exports.cursorForTool = cursorForTool;
|
|
100735
|
+
exports.customShowsGroup = customShowsGroup;
|
|
98613
100736
|
exports.customizeBackstageCards = customizeBackstageCards;
|
|
98614
100737
|
exports.customizeBackstageNav = customizeBackstageNav;
|
|
98615
100738
|
exports.customizeCanvasContextMenuEntries = customizeCanvasContextMenuEntries;
|
|
@@ -98623,6 +100746,7 @@ exports.defaultDuration = defaultDuration;
|
|
|
98623
100746
|
exports.defaultGradientState = defaultGradientState;
|
|
98624
100747
|
exports.defaultMentionId = defaultMentionId;
|
|
98625
100748
|
exports.defaultRichEnabled = defaultRichEnabled;
|
|
100749
|
+
exports.defineBuildingBlockActionGroup = defineBuildingBlockActionGroup;
|
|
98626
100750
|
exports.deleteAutosaveSnapshot = deleteAutosaveSnapshot;
|
|
98627
100751
|
exports.deleteEditPoint = deleteEditPoint;
|
|
98628
100752
|
exports.deleteEditSegment = deleteEditSegment;
|
|
@@ -98635,20 +100759,34 @@ exports.derivePresenceList = derivePresenceList;
|
|
|
98635
100759
|
exports.derivePresetAdjustmentHandles = derivePresetAdjustmentHandles;
|
|
98636
100760
|
exports.deriveSlideFieldContext = deriveSlideFieldContext;
|
|
98637
100761
|
exports.deriveViewportBreakpoints = deriveViewportBreakpoints;
|
|
100762
|
+
exports.describeBroadcastSupport = describeBroadcastSupport;
|
|
100763
|
+
exports.describeBuildingBlockActions = describeBuildingBlockActions;
|
|
100764
|
+
exports.describeBuildingBlockAvailability = describeBuildingBlockAvailability;
|
|
100765
|
+
exports.describeBuildingBlockShell = describeBuildingBlockShell;
|
|
100766
|
+
exports.describeBuildingBlockToolbar = describeBuildingBlockToolbar;
|
|
98638
100767
|
exports.describeCollaborationShellState = describeCollaborationShellState;
|
|
100768
|
+
exports.describeCustomShows = describeCustomShows;
|
|
98639
100769
|
exports.describeElementChange = describeElementChange;
|
|
98640
100770
|
exports.describeFontEmbedding = describeFontEmbedding;
|
|
100771
|
+
exports.describeFontEmbeddingState = describeFontEmbeddingState;
|
|
100772
|
+
exports.describePasswordProtection = describePasswordProtection;
|
|
98641
100773
|
exports.describePptxChart = describePptxChart;
|
|
100774
|
+
exports.describeShortcutCatalogue = describeShortcutCatalogue;
|
|
100775
|
+
exports.describeShowDialogActions = describeShowDialogActions;
|
|
100776
|
+
exports.describeSignaturesState = describeSignaturesState;
|
|
100777
|
+
exports.describeSlideShowSettings = describeSlideShowSettings;
|
|
98642
100778
|
exports.describeSmartArtBounds = describeSmartArtBounds;
|
|
98643
100779
|
exports.describeSmartArtDiagram = describeSmartArtDiagram;
|
|
98644
100780
|
exports.deserializeElementClipboard = deserializeElementClipboard;
|
|
98645
100781
|
exports.designCommandState = designCommandState;
|
|
100782
|
+
exports.detectHyperlinkTargetType = detectHyperlinkTargetType;
|
|
98646
100783
|
exports.detectOrientation = detectOrientation;
|
|
98647
100784
|
exports.detectTouchDevice = detectTouchDevice;
|
|
98648
100785
|
exports.diffOptionsAgainstBaseline = diffOptionsAgainstBaseline;
|
|
98649
100786
|
exports.diffSlideElements = diffSlideElements;
|
|
98650
100787
|
exports.diffTokens = diffTokens;
|
|
98651
100788
|
exports.diffViewerOptions = diffViewerOptions;
|
|
100789
|
+
exports.digitalSignaturesGroup = digitalSignaturesGroup;
|
|
98652
100790
|
exports.disableGlowPatch = disableGlowPatch;
|
|
98653
100791
|
exports.disableInnerShadowPatch = disableInnerShadowPatch;
|
|
98654
100792
|
exports.disableOuterShadowPatch = disableOuterShadowPatch;
|
|
@@ -98660,6 +100798,8 @@ exports.dispatchCropRequest = dispatchCropRequest;
|
|
|
98660
100798
|
exports.dispatchEditorKey = dispatchEditorKey;
|
|
98661
100799
|
exports.dispatchReadOnlyBannerIntent = dispatchReadOnlyBannerIntent;
|
|
98662
100800
|
exports.dispatchStatusBarIntent = dispatchStatusBarIntent;
|
|
100801
|
+
exports.documentPropertiesChanged = documentPropertiesChanged;
|
|
100802
|
+
exports.documentPropertiesGroup = documentPropertiesGroup;
|
|
98663
100803
|
exports.dominantDisplacement = dominantDisplacement;
|
|
98664
100804
|
exports.downloadBlob = downloadBlob;
|
|
98665
100805
|
exports.downloadDataUrl = downloadDataUrl;
|
|
@@ -98701,6 +100841,8 @@ exports.elementIdSelector = elementIdSelector;
|
|
|
98701
100841
|
exports.elementInLocalFrame = elementInLocalFrame;
|
|
98702
100842
|
exports.elementOutlineLoops = elementOutlineLoops;
|
|
98703
100843
|
exports.elementPictureFilename = elementPictureFilename;
|
|
100844
|
+
exports.elementRenderErrorContext = elementRenderErrorContext;
|
|
100845
|
+
exports.elementRenderRetryKey = elementRenderRetryKey;
|
|
98704
100846
|
exports.ellipseArcToCubics = ellipseArcToCubics;
|
|
98705
100847
|
exports.embedImagesOnClone = embedImagesOnClone;
|
|
98706
100848
|
exports.embeddedFontSaveOptions = embeddedFontSaveOptions;
|
|
@@ -98764,6 +100906,7 @@ exports.findConnectorSiteNear = findConnectorSiteNear;
|
|
|
98764
100906
|
exports.findEffectSoundCatalogueEntry = findEffectSoundCatalogueEntry;
|
|
98765
100907
|
exports.findEraserHitElementId = findEraserHitElementId;
|
|
98766
100908
|
exports.findHighlightClickTarget = findHighlightClickTarget;
|
|
100909
|
+
exports.findMatchMarkStyle = findMatchMarkStyle;
|
|
98767
100910
|
exports.findMediaBookmarkGatedSteps = findMediaBookmarkGatedSteps;
|
|
98768
100911
|
exports.findMediaElementByElementId = findMediaElementByElementId;
|
|
98769
100912
|
exports.findMediaEndGatedSteps = findMediaEndGatedSteps;
|
|
@@ -98775,6 +100918,7 @@ exports.findReplaceTarget = findReplaceTarget;
|
|
|
98775
100918
|
exports.findRibbonAddIn = findRibbonAddIn;
|
|
98776
100919
|
exports.findSlideStage = findSlideStage;
|
|
98777
100920
|
exports.findSmartArtNodeText = findSmartArtNodeText;
|
|
100921
|
+
exports.findTextHighlightsByElement = findTextHighlightsByElement;
|
|
98778
100922
|
exports.finishAnimationGroupSteps = finishAnimationGroupSteps;
|
|
98779
100923
|
exports.finishCropUpdate = finishCropUpdate;
|
|
98780
100924
|
exports.finishDomAnimationsForGroup = finishDomAnimationsForGroup;
|
|
@@ -98790,6 +100934,7 @@ exports.flattenViewerOptions = flattenViewerOptions;
|
|
|
98790
100934
|
exports.followCommentEdit = followCommentEdit;
|
|
98791
100935
|
exports.followingText = followingText;
|
|
98792
100936
|
exports.fontAlignmentVerticalAlign = fontAlignmentVerticalAlign;
|
|
100937
|
+
exports.fontEmbeddingGroup = fontEmbeddingGroup;
|
|
98793
100938
|
exports.fontFamilyItems = fontFamilyItems;
|
|
98794
100939
|
exports.fontHomeControls = fontHomeControls;
|
|
98795
100940
|
exports.fontMimeForFormat = fontMimeForFormat;
|
|
@@ -98977,6 +101122,7 @@ exports.getWarpPath = getWarpPath;
|
|
|
98977
101122
|
exports.ghostMorphPairsHiddenByGhosts = ghostMorphPairsHiddenByGhosts;
|
|
98978
101123
|
exports.glowStateOf = glowStateOf;
|
|
98979
101124
|
exports.glowStyle = glowStyle;
|
|
101125
|
+
exports.googleFontsOptionChanged = googleFontsOptionChanged;
|
|
98980
101126
|
exports.gradientStateFromStyle = gradientStateFromStyle;
|
|
98981
101127
|
exports.gradientStateOf = gradientStateOf;
|
|
98982
101128
|
exports.gradientStatePatch = gradientStatePatch;
|
|
@@ -98988,6 +101134,7 @@ exports.groupIssuesBySeverity = groupIssuesBySeverity;
|
|
|
98988
101134
|
exports.groupParagraphsByBuildLevel = groupParagraphsByBuildLevel;
|
|
98989
101135
|
exports.groupShortcutReference = groupShortcutReference;
|
|
98990
101136
|
exports.groupTilesByRow = groupTilesByRow;
|
|
101137
|
+
exports.guardElementRender = guardElementRender;
|
|
98991
101138
|
exports.handleEditorAnchorClick = handleEditorAnchorClick;
|
|
98992
101139
|
exports.handleLiveColorEvent = handleLiveColorEvent;
|
|
98993
101140
|
exports.handlePresentationStageClick = handlePresentationStageClick;
|
|
@@ -99014,6 +101161,7 @@ exports.hexToRgb = hexToRgb;
|
|
|
99014
101161
|
exports.hiddenSlideCue = hiddenSlideCue;
|
|
99015
101162
|
exports.hiddenSlideLabelId = hiddenSlideLabelId;
|
|
99016
101163
|
exports.hideChartSeries = hideChartSeries;
|
|
101164
|
+
exports.highlightFindMatches = highlightFindMatches;
|
|
99017
101165
|
exports.historyStepUsesParts = historyStepUsesParts;
|
|
99018
101166
|
exports.historyTheme = historyTheme;
|
|
99019
101167
|
exports.hollowTextFillStyle = hollowTextFillStyle;
|
|
@@ -99031,6 +101179,8 @@ exports.homeSnapshotTranslator = homeSnapshotTranslator;
|
|
|
99031
101179
|
exports.hostFontDownloadLock = hostFontDownloadLock;
|
|
99032
101180
|
exports.hostMenuLabel = hostMenuLabel;
|
|
99033
101181
|
exports.hslToRgb = hslToRgb;
|
|
101182
|
+
exports.hyperlinkEditDataFromAction = hyperlinkEditDataFromAction;
|
|
101183
|
+
exports.hyperlinkEditPatch = hyperlinkEditPatch;
|
|
99034
101184
|
exports.imageAdjustmentsPatch = imageAdjustmentsPatch;
|
|
99035
101185
|
exports.imageAdjustmentsStateOf = imageAdjustmentsStateOf;
|
|
99036
101186
|
exports.imageCropPatch = imageCropPatch;
|
|
@@ -99115,6 +101265,7 @@ exports.isKoreanLanguage = isKoreanLanguage;
|
|
|
99115
101265
|
exports.isLegacyBinaryPresentation = isLegacyBinaryPresentation;
|
|
99116
101266
|
exports.isLinkedTextBox = isLinkedTextBox;
|
|
99117
101267
|
exports.isLinkedTextBoxHead = isLinkedTextBoxHead;
|
|
101268
|
+
exports.isMarkedAsFinal = isMarkedAsFinal;
|
|
99118
101269
|
exports.isMasterViewEditable = isMasterViewEditable;
|
|
99119
101270
|
exports.isMediaCommandAnimation = isMediaCommandAnimation;
|
|
99120
101271
|
exports.isMediaEndGated = isMediaEndGated;
|
|
@@ -99152,6 +101303,7 @@ exports.isSettingLocked = isSettingLocked;
|
|
|
99152
101303
|
exports.isSettingVisible = isSettingVisible;
|
|
99153
101304
|
exports.isSupportedPresentationFile = isSupportedPresentationFile;
|
|
99154
101305
|
exports.isTabletViewport = isTabletViewport;
|
|
101306
|
+
exports.isValidInsertChartData = isValidInsertChartData;
|
|
99155
101307
|
exports.isValidRoomId = isValidRoomId;
|
|
99156
101308
|
exports.isVerticalTextDirection = isVerticalTextDirection;
|
|
99157
101309
|
exports.issueTrackKey = issueTrackKey;
|
|
@@ -99171,6 +101323,7 @@ exports.listChartFormatTargets = listChartFormatTargets;
|
|
|
99171
101323
|
exports.listChartUserShapeRows = listChartUserShapeRows;
|
|
99172
101324
|
exports.listCommentLocations = listCommentLocations;
|
|
99173
101325
|
exports.listMediaBookmarkOptions = listMediaBookmarkOptions;
|
|
101326
|
+
exports.listPackageSignatures = listPackageSignatures;
|
|
99174
101327
|
exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
|
|
99175
101328
|
exports.loadAudienceContent = loadAudienceContent;
|
|
99176
101329
|
exports.loadDeckWebfontOutlines = loadDeckWebfontOutlines;
|
|
@@ -99194,6 +101347,7 @@ exports.mapReadingViewKey = mapReadingViewKey;
|
|
|
99194
101347
|
exports.mapSlideShowStartKey = mapSlideShowStartKey;
|
|
99195
101348
|
exports.mapSlideSorterKey = mapSlideSorterKey;
|
|
99196
101349
|
exports.markAnimationGroupActive = markAnimationGroupActive;
|
|
101350
|
+
exports.markAsFinalProperties = markAsFinalProperties;
|
|
99197
101351
|
exports.markInsertedParagraph = markInsertedParagraph;
|
|
99198
101352
|
exports.maskEdgeDecl = maskEdgeDecl;
|
|
99199
101353
|
exports.maskEdgeInitialStyle = maskEdgeInitialStyle;
|
|
@@ -99227,6 +101381,7 @@ exports.measureViewportClientSize = measureViewportClientSize;
|
|
|
99227
101381
|
exports.measureWarpParagraphWidth = measureWarpParagraphWidth;
|
|
99228
101382
|
exports.mediaControlBarEnabled = mediaControlBarEnabled;
|
|
99229
101383
|
exports.mediaControlBarVisible = mediaControlBarVisible;
|
|
101384
|
+
exports.mediaElementFromFile = mediaElementFromFile;
|
|
99230
101385
|
exports.mediaFallbackIcon = mediaFallbackIcon;
|
|
99231
101386
|
exports.mediaFallbackLabelKey = mediaFallbackLabelKey;
|
|
99232
101387
|
exports.mediaFallbackVisual = mediaFallbackVisual;
|
|
@@ -99246,6 +101401,7 @@ exports.mergeAdditiveSelection = mergeAdditiveSelection;
|
|
|
99246
101401
|
exports.mergeCaptionResults = mergeCaptionResults;
|
|
99247
101402
|
exports.mergeCoincidentHandles = mergeCoincidentHandles;
|
|
99248
101403
|
exports.mergeCustomization = mergeCustomization;
|
|
101404
|
+
exports.mergeElementRenderErrorScope = mergeElementRenderErrorScope;
|
|
99249
101405
|
exports.mergeImageEffects = mergeImageEffects;
|
|
99250
101406
|
exports.mergeOperationForCommand = mergeOperationForCommand;
|
|
99251
101407
|
exports.mergePresentationSnapshot = mergePresentationSnapshot;
|
|
@@ -99304,6 +101460,7 @@ exports.normalizeFontFormat = normalizeFontFormat;
|
|
|
99304
101460
|
exports.normalizeNotesLinkUrl = normalizeNotesLinkUrl;
|
|
99305
101461
|
exports.normalizeOutlinePair = normalizeOutlinePair;
|
|
99306
101462
|
exports.normalizeRegion = normalizeRegion;
|
|
101463
|
+
exports.normalizeRibbonDisplayMode = normalizeRibbonDisplayMode;
|
|
99307
101464
|
exports.normalizeSegments = normalizeSegments;
|
|
99308
101465
|
exports.normalizeSubtitleSettings = normalizeSubtitleSettings;
|
|
99309
101466
|
exports.normalizeWheelDelta = normalizeWheelDelta;
|
|
@@ -99364,6 +101521,8 @@ exports.parseEditPointsTarget = parseEditPointsTarget;
|
|
|
99364
101521
|
exports.parseGradientCssStops = parseGradientCssStops;
|
|
99365
101522
|
exports.parseHexColor = parseHexColor;
|
|
99366
101523
|
exports.parseHexToRgb = parseHexToRgb;
|
|
101524
|
+
exports.parseHyperlinkEmailUrl = parseHyperlinkEmailUrl;
|
|
101525
|
+
exports.parseHyperlinkSlideNumber = parseHyperlinkSlideNumber;
|
|
99367
101526
|
exports.parseMediaCommand = parseMediaCommand;
|
|
99368
101527
|
exports.parseOoxmlBezierCurve = parseOoxmlBezierCurve;
|
|
99369
101528
|
exports.parseOptionValueKey = parseOptionValueKey;
|
|
@@ -99378,6 +101537,7 @@ exports.parseSvgPath = parseSvgPath;
|
|
|
99378
101537
|
exports.parseViewBox = parseViewBox;
|
|
99379
101538
|
exports.partitionMasterViewElements = partitionMasterViewElements;
|
|
99380
101539
|
exports.passesClicksThroughBox = passesClicksThroughBox;
|
|
101540
|
+
exports.passwordProtectionGroup = passwordProtectionGroup;
|
|
99381
101541
|
exports.pasteElementHasText = pasteElementHasText;
|
|
99382
101542
|
exports.patchChartData = patchChartData;
|
|
99383
101543
|
exports.patchHeaderFooterDraft = patchHeaderFooterDraft;
|
|
@@ -99397,6 +101557,7 @@ exports.placeCaretAt = placeCaretAt;
|
|
|
99397
101557
|
exports.placeCaretAtEnd = placeCaretAtEnd;
|
|
99398
101558
|
exports.placeTileOnPage = placeTileOnPage;
|
|
99399
101559
|
exports.placeholderPromptDescriptor = placeholderPromptDescriptor;
|
|
101560
|
+
exports.planDocumentPropertiesPatch = planDocumentPropertiesPatch;
|
|
99400
101561
|
exports.planFindReplace = planFindReplace;
|
|
99401
101562
|
exports.planGifFrames = planGifFrames;
|
|
99402
101563
|
exports.planMergeShapes = planMergeShapes;
|
|
@@ -99447,8 +101608,10 @@ exports.previousShowSlideIndex = previousShowSlideIndex;
|
|
|
99447
101608
|
exports.primaryMasterViewPart = primaryMasterViewPart;
|
|
99448
101609
|
exports.printJobRasterFallback = printJobRasterFallback;
|
|
99449
101610
|
exports.probeAutosaveRecovery = probeAutosaveRecovery;
|
|
101611
|
+
exports.probeElementRenderFault = probeElementRenderFault;
|
|
99450
101612
|
exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
|
|
99451
101613
|
exports.probeNativeImageSize = probeNativeImageSize;
|
|
101614
|
+
exports.probeVideoSize = probeVideoSize;
|
|
99452
101615
|
exports.projectDrawingShapes = projectDrawingShapes;
|
|
99453
101616
|
exports.projectSmartArtViewBoxRect = projectSmartArtViewBoxRect;
|
|
99454
101617
|
exports.promote = promote;
|
|
@@ -99524,6 +101687,7 @@ exports.reflowToDrawingShapes = reflowToDrawingShapes;
|
|
|
99524
101687
|
exports.refreshSilhouetteMorphFilters = refreshSilhouetteMorphFilters;
|
|
99525
101688
|
exports.refreshSmartArtPictureImage = refreshSmartArtPictureImage;
|
|
99526
101689
|
exports.regionArea = regionArea;
|
|
101690
|
+
exports.registerBuildingBlockGroups = registerBuildingBlockGroups;
|
|
99527
101691
|
exports.registerCollaborationTeardown = registerCollaborationTeardown;
|
|
99528
101692
|
exports.registerCrossSlideAudio = registerCrossSlideAudio;
|
|
99529
101693
|
exports.registerInlineListParagraphFormat = registerInlineListParagraphFormat;
|
|
@@ -99546,6 +101710,7 @@ exports.reorderAnimationTimelineRows = reorderAnimationTimelineRows;
|
|
|
99546
101710
|
exports.replaceMasterViewElements = replaceMasterViewElements;
|
|
99547
101711
|
exports.replacePixels = replacePixels;
|
|
99548
101712
|
exports.replyToCommentInList = replyToCommentInList;
|
|
101713
|
+
exports.reportElementRenderError = reportElementRenderError;
|
|
99549
101714
|
exports.reportInlineTextDraft = reportInlineTextDraft;
|
|
99550
101715
|
exports.rerouteConnectorsForMovedElements = rerouteConnectorsForMovedElements;
|
|
99551
101716
|
exports.resamplePolygon = resamplePolygon;
|
|
@@ -99555,6 +101720,7 @@ exports.resetGlyphTraceCache = resetGlyphTraceCache;
|
|
|
99555
101720
|
exports.resetGoogleWebfontSessionCache = resetGoogleWebfontSessionCache;
|
|
99556
101721
|
exports.resetMetricTrackingCache = resetMetricTrackingCache;
|
|
99557
101722
|
exports.resetPresenterTimer = resetPresenterTimer;
|
|
101723
|
+
exports.resetViewportScroll = resetViewportScroll;
|
|
99558
101724
|
exports.resizeSelection = resizeSelection;
|
|
99559
101725
|
exports.resolve3DRenderingFlags = resolve3DRenderingFlags;
|
|
99560
101726
|
exports.resolveAbuttingEdgeBleeds = resolveAbuttingEdgeBleeds;
|
|
@@ -99577,6 +101743,7 @@ exports.resolveAutosaveFileKey = resolveAutosaveFileKey;
|
|
|
99577
101743
|
exports.resolveAutosaveIntervalMs = resolveAutosaveIntervalMs;
|
|
99578
101744
|
exports.resolveAutosaveIntervalSeconds = resolveAutosaveIntervalSeconds;
|
|
99579
101745
|
exports.resolveBlockFont = resolveBlockFont;
|
|
101746
|
+
exports.resolveBuildingBlockMode = resolveBuildingBlockMode;
|
|
99580
101747
|
exports.resolveChartBuildMode = resolveChartBuildMode;
|
|
99581
101748
|
exports.resolveChartFormatTarget = resolveChartFormatTarget;
|
|
99582
101749
|
exports.resolveChartRevealDescriptor = resolveChartRevealDescriptor;
|
|
@@ -99590,6 +101757,7 @@ exports.resolveColorChangedImageSource = resolveColorChangedImageSource;
|
|
|
99590
101757
|
exports.resolveConnectorEndpointUpdate = resolveConnectorEndpointUpdate;
|
|
99591
101758
|
exports.resolveCssProperties = resolveCssProperties;
|
|
99592
101759
|
exports.resolveCssTextAlign = resolveCssTextAlign;
|
|
101760
|
+
exports.resolveCustomShowStart = resolveCustomShowStart;
|
|
99593
101761
|
exports.resolveCustomization = resolveCustomization;
|
|
99594
101762
|
exports.resolveDefaultPrintSettings = resolveDefaultPrintSettings;
|
|
99595
101763
|
exports.resolveDiagramBuildMode = resolveDiagramBuildMode;
|
|
@@ -99627,6 +101795,7 @@ exports.resolveGroupDoubleClickTarget = resolveGroupDoubleClickTarget;
|
|
|
99627
101795
|
exports.resolveGroupPressTarget = resolveGroupPressTarget;
|
|
99628
101796
|
exports.resolveHighlightClickForElementId = resolveHighlightClickForElementId;
|
|
99629
101797
|
exports.resolveHistoryDepth = resolveHistoryDepth;
|
|
101798
|
+
exports.resolveHyperlinkEditResult = resolveHyperlinkEditResult;
|
|
99630
101799
|
exports.resolveHyperlinkTargetAttrs = resolveHyperlinkTargetAttrs;
|
|
99631
101800
|
exports.resolveImageResolutionPpi = resolveImageResolutionPpi;
|
|
99632
101801
|
exports.resolveImageResolutionScale = resolveImageResolutionScale;
|
|
@@ -99689,6 +101858,7 @@ exports.resolveShowForward = resolveShowForward;
|
|
|
99689
101858
|
exports.resolveShowSlideIndexes = resolveShowSlideIndexes;
|
|
99690
101859
|
exports.resolveSlideOutlineElements = resolveSlideOutlineElements;
|
|
99691
101860
|
exports.resolveSlidePaneClick = resolveSlidePaneClick;
|
|
101861
|
+
exports.resolveSlideShowSettings = resolveSlideShowSettings;
|
|
99692
101862
|
exports.resolveSlideSizeSelection = resolveSlideSizeSelection;
|
|
99693
101863
|
exports.resolveSlideTitle = resolveSlideTitle;
|
|
99694
101864
|
exports.resolveSlideTransition = resolveSlideTransition;
|
|
@@ -99750,6 +101920,8 @@ exports.ribbonAddInControlId = ribbonAddInControlId;
|
|
|
99750
101920
|
exports.ribbonAddInGroupViews = ribbonAddInGroupViews;
|
|
99751
101921
|
exports.ribbonControlAttrs = ribbonControlAttrs;
|
|
99752
101922
|
exports.ribbonCustomizationCss = ribbonCustomizationCss;
|
|
101923
|
+
exports.ribbonDisplayLayout = ribbonDisplayLayout;
|
|
101924
|
+
exports.ribbonDisplayMenu = ribbonDisplayMenu;
|
|
99753
101925
|
exports.ribbonGroupAttrs = ribbonGroupAttrs;
|
|
99754
101926
|
exports.ribbonGroupOfControl = ribbonGroupOfControl;
|
|
99755
101927
|
exports.ribbonGroupViews = ribbonGroupViews;
|
|
@@ -99763,6 +101935,7 @@ exports.routeEditLayerPointerToNodes = routeEditLayerPointerToNodes;
|
|
|
99763
101935
|
exports.rowHandleSegments = rowHandleSegments;
|
|
99764
101936
|
exports.rowIndexAtOffset = rowIndexAtOffset;
|
|
99765
101937
|
exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
|
|
101938
|
+
exports.runBuildingBlockToolbarControl = runBuildingBlockToolbarControl;
|
|
99766
101939
|
exports.runEditPointsCommand = runEditPointsCommand;
|
|
99767
101940
|
exports.runEquationMathMl = runEquationMathMl;
|
|
99768
101941
|
exports.runMediaCommand = runMediaCommand;
|
|
@@ -99827,6 +102000,7 @@ exports.selectedBookmarkOptionValue = selectedBookmarkOptionValue;
|
|
|
99827
102000
|
exports.selectedParagraphBulletKind = selectedParagraphBulletKind;
|
|
99828
102001
|
exports.selectionBounds = selectionBounds;
|
|
99829
102002
|
exports.selectionBulletKind = selectionBulletKind;
|
|
102003
|
+
exports.selectionEquation = selectionEquation;
|
|
99830
102004
|
exports.serializeElementClipboard = serializeElementClipboard;
|
|
99831
102005
|
exports.serializeShapeAdjustments = serializeShapeAdjustments;
|
|
99832
102006
|
exports.serializeSvgPath = serializeSvgPath;
|
|
@@ -99846,6 +102020,7 @@ exports.setPendingCaretPoint = setPendingCaretPoint;
|
|
|
99846
102020
|
exports.setPendingSelectionRestore = setPendingSelectionRestore;
|
|
99847
102021
|
exports.setSelectionBullets = setSelectionBullets;
|
|
99848
102022
|
exports.setTriggerBookmark = setTriggerBookmark;
|
|
102023
|
+
exports.setUpSlideShowGroup = setUpSlideShowGroup;
|
|
99849
102024
|
exports.settleBaselines = settleBaselines;
|
|
99850
102025
|
exports.settleThemeWrites = settleThemeWrites;
|
|
99851
102026
|
exports.shapeGalleryItem = shapeGalleryItem;
|
|
@@ -99857,6 +102032,7 @@ exports.shapeStyleWithoutFormatting = shapeStyleWithoutFormatting;
|
|
|
99857
102032
|
exports.shapeThumbnailPath = shapeThumbnailPath;
|
|
99858
102033
|
exports.shapeTileSvg = shapeTileSvg;
|
|
99859
102034
|
exports.sheetAfterNavigate = sheetAfterNavigate;
|
|
102035
|
+
exports.shortcutsGroup = shortcutsGroup;
|
|
99860
102036
|
exports.shortestRotationTarget = shortestRotationTarget;
|
|
99861
102037
|
exports.shouldAutoFollowBroadcaster = shouldAutoFollowBroadcaster;
|
|
99862
102038
|
exports.shouldAutoHide = shouldAutoHide;
|
|
@@ -99869,6 +102045,7 @@ exports.shouldLoopContinuously = shouldLoopContinuously;
|
|
|
99869
102045
|
exports.shouldOpenInProtectedView = shouldOpenInProtectedView;
|
|
99870
102046
|
exports.shouldProbeAutosaveRecovery = shouldProbeAutosaveRecovery;
|
|
99871
102047
|
exports.shouldRenderHitTarget = shouldRenderHitTarget;
|
|
102048
|
+
exports.shouldRetryElementRender = shouldRetryElementRender;
|
|
99872
102049
|
exports.shouldSeekAnimationGroup = shouldSeekAnimationGroup;
|
|
99873
102050
|
exports.shouldShowAccessibilitySection = shouldShowAccessibilitySection;
|
|
99874
102051
|
exports.shouldShowAutosaveRecoveryPrompt = shouldShowAutosaveRecoveryPrompt;
|
|
@@ -99933,6 +102110,7 @@ exports.splitRegionComponents = splitRegionComponents;
|
|
|
99933
102110
|
exports.splitRunByScriptFont = splitRunByScriptFont;
|
|
99934
102111
|
exports.splitRunForMetrics = splitRunForMetrics;
|
|
99935
102112
|
exports.splitStyledRun = splitStyledRun;
|
|
102113
|
+
exports.splitTextByFindHighlights = splitTextByFindHighlights;
|
|
99936
102114
|
exports.splitWordsForUnderline = splitWordsForUnderline;
|
|
99937
102115
|
exports.splitsUnderlineIntoWords = splitsUnderlineIntoWords;
|
|
99938
102116
|
exports.stageKeepsElementIds = stageKeepsElementIds;
|
|
@@ -100011,13 +102189,16 @@ exports.toCssTextOrientation = toCssTextOrientation;
|
|
|
100011
102189
|
exports.toCssVerticalDirection = toCssVerticalDirection;
|
|
100012
102190
|
exports.toCssWritingMode = toCssWritingMode;
|
|
100013
102191
|
exports.toElementAxes = toElementAxes;
|
|
102192
|
+
exports.toElementRenderError = toElementRenderError;
|
|
100014
102193
|
exports.toGestureTransform = toGestureTransform;
|
|
102194
|
+
exports.toHostSignatureInfo = toHostSignatureInfo;
|
|
100015
102195
|
exports.toSlideIndex = toSlideIndex;
|
|
100016
102196
|
exports.toggle = toggle;
|
|
100017
102197
|
exports.toggleBlackboard = toggleBlackboard;
|
|
100018
102198
|
exports.toggleCommentResolvedInList = toggleCommentResolvedInList;
|
|
100019
102199
|
exports.toggleInList = toggleInList;
|
|
100020
102200
|
exports.togglePresenterTimer = togglePresenterTimer;
|
|
102201
|
+
exports.toggleRibbonCollapsed = toggleRibbonCollapsed;
|
|
100021
102202
|
exports.toggleSelectionBullets = toggleSelectionBullets;
|
|
100022
102203
|
exports.toggleSheet = toggleSheet;
|
|
100023
102204
|
exports.toggleStageElementMedia = toggleStageElementMedia;
|
|
@@ -100049,9 +102230,13 @@ exports.updateSubtitleSettings = updateSubtitleSettings;
|
|
|
100049
102230
|
exports.updateTagInCollections = updateTagInCollections;
|
|
100050
102231
|
exports.updateViewerPreference = updateViewerPreference;
|
|
100051
102232
|
exports.vAlignPatch = vAlignPatch;
|
|
102233
|
+
exports.validateHostImageFile = validateHostImageFile;
|
|
102234
|
+
exports.validateHostMediaFile = validateHostMediaFile;
|
|
100052
102235
|
exports.validateMediaTrimRange = validateMediaTrimRange;
|
|
102236
|
+
exports.validateOpenPassword = validateOpenPassword;
|
|
100053
102237
|
exports.validatePasswordPair = validatePasswordPair;
|
|
100054
102238
|
exports.validateRoomId = validateRoomId;
|
|
102239
|
+
exports.validateSlideShowSettings = validateSlideShowSettings;
|
|
100055
102240
|
exports.viewLabel = viewLabel;
|
|
100056
102241
|
exports.viewPropertiesPatchFromPreferences = viewPropertiesPatchFromPreferences;
|
|
100057
102242
|
exports.viewerOptionsToPreferences = viewerOptionsToPreferences;
|