ooxml-ui 1.42.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart/design-galleries.d.ts +1 -0
- package/dist/chart/format-pane-types.d.ts +1 -0
- package/dist/chart/format-pane-view.d.ts +1 -0
- package/dist/chrome/status-bar.d.ts +2 -0
- package/dist/chrome/status-bar.d.ts.map +1 -1
- package/dist/{chunk-4RFFOPBU.js → chunk-2ZYRZANE.js} +1 -1
- package/dist/{chunk-Y6KY34VD.js → chunk-I57TCM2Q.js} +57 -11
- package/dist/{chunk-TTT5IQBU.js → chunk-JWBWLGEY.js} +2 -2
- package/dist/{chunk-LBIABP4I.js → chunk-M4ARYL3L.js} +1 -1
- package/dist/{chunk-7L4NP4HN.js → chunk-NH5ZSZMI.js} +1 -1
- package/dist/controls.d.ts +1 -0
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/dialog/message-dialogs.d.ts.map +1 -1
- package/dist/docx/locales/en-app.d.ts +5 -0
- package/dist/docx/locales/en.d.ts +5 -0
- package/dist/docx/localization-strings.d.ts +5 -0
- package/dist/docx/title-bar.d.ts +2 -1
- package/dist/docx.js +40 -11
- package/dist/files/save-progress-label.d.ts +23 -0
- package/dist/files/save-progress-label.d.ts.map +1 -0
- package/dist/index.js +4 -4
- package/dist/picture-effects.d.ts +1 -0
- package/dist/picture-view.d.ts +1 -0
- package/dist/pptx/{chunk-C7G2CSU2.mjs → chunk-5BINBXFV.mjs} +1 -1
- package/dist/pptx/{chunk-OPLK7GPB.mjs → chunk-7FTP7OOA.mjs} +714 -414
- package/dist/pptx/{chunk-RI4YZ4AG.cjs → chunk-P4NVINSK.cjs} +721 -416
- package/dist/pptx/{chunk-XTYRGVT5.cjs → chunk-UGSMMZU6.cjs} +42 -42
- package/dist/pptx/{chunk-SF3MYUTD.mjs → chunk-W2QJX2ON.mjs} +5 -0
- package/dist/pptx/{chunk-WNDGU3GQ.cjs → chunk-ZHVKGGLQ.cjs} +5 -0
- package/dist/pptx/dom/index.cjs +388 -388
- package/dist/pptx/dom/index.mjs +6 -6
- 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 +3108 -3088
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/controller/index.d.ts +2 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/controller/save-progress-controller.d.ts +56 -0
- package/dist/pptx/render/controller/save-progress-controller.d.ts.map +1 -0
- package/dist/pptx/render/embedded-fonts-sheet.d.ts +25 -0
- package/dist/pptx/render/embedded-fonts-sheet.d.ts.map +1 -0
- package/dist/pptx/render/font-line-gap.d.ts +21 -0
- package/dist/pptx/render/font-line-gap.d.ts.map +1 -0
- package/dist/pptx/render/font-settled.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/morph-plan-carry.d.ts +41 -0
- package/dist/pptx/render/morph-plan-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-channels.d.ts +30 -0
- package/dist/pptx/render/morph-plan-channels.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-crossfade.d.ts +23 -0
- package/dist/pptx/render/morph-plan-crossfade.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-css.d.ts +62 -0
- package/dist/pptx/render/morph-plan-css.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-lift.d.ts +44 -0
- package/dist/pptx/render/morph-plan-lift.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-overlay.d.ts +62 -0
- package/dist/pptx/render/morph-plan-overlay.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan-types.d.ts +208 -0
- package/dist/pptx/render/morph-plan-types.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan.d.ts +4 -252
- package/dist/pptx/render/morph-plan.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-baseline.d.ts +6 -0
- package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
- package/dist/pptx/render/status-bar-state.d.ts +7 -1
- package/dist/pptx/render/status-bar-state.d.ts.map +1 -1
- package/dist/pptx/render/text-field-substitution.d.ts +13 -14
- package/dist/pptx/render/text-field-substitution.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-AE7D4I7L.mjs → smartart-insert-preview-DXFDFDSC.mjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-P4NV2FRD.cjs → smartart-insert-preview-UP6DYY42.cjs} +4 -4
- package/dist/pptx/web-components/status-bar.d.ts.map +1 -1
- package/dist/teams.js +2 -2
- package/dist/theme-bridge.d.ts +1 -0
- package/dist/theme.d.ts +1 -0
- package/dist/visio/title-bar.d.ts +3 -1
- package/dist/visio/viewer-backstage.d.ts +2 -0
- package/dist/visio/viewer-file-commands.d.ts +2 -2
- package/dist/visio.js +75 -20
- package/dist/xlsx/editor-files.d.ts +1 -1
- package/dist/xlsx/title-bar.d.ts +2 -1
- package/dist/xlsx.js +21 -12
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkUGSMMZU6_cjs = require('../chunk-UGSMMZU6.cjs');
|
|
4
|
+
var chunkP4NVINSK_cjs = require('../chunk-P4NVINSK.cjs');
|
|
5
5
|
var chunkJP26TA3Q_cjs = require('../chunk-JP26TA3Q.cjs');
|
|
6
6
|
require('../chunk-XOAXPD2W.cjs');
|
|
7
7
|
require('../chunk-W3X2UVYQ.cjs');
|
|
@@ -36,21 +36,21 @@ require('../chunk-UPN5FFKP.cjs');
|
|
|
36
36
|
require('../chunk-FQUX6AUU.cjs');
|
|
37
37
|
require('../chunk-XZSGVMRN.cjs');
|
|
38
38
|
var chunkU47LRWDT_cjs = require('../chunk-U47LRWDT.cjs');
|
|
39
|
-
var
|
|
39
|
+
var chunkZHVKGGLQ_cjs = require('../chunk-ZHVKGGLQ.cjs');
|
|
40
40
|
require('../chunk-3RIGT7H6.cjs');
|
|
41
41
|
require('../chunk-PBZWDEXQ.cjs');
|
|
42
42
|
var pptx = require('ooxml-core/pptx');
|
|
43
43
|
|
|
44
44
|
// src/pptx/dom/activex-controls-overlay.ts
|
|
45
45
|
function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
46
|
-
const overlay =
|
|
46
|
+
const overlay = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-activex-overlay", {
|
|
47
47
|
position: "absolute",
|
|
48
48
|
inset: "0",
|
|
49
49
|
pointerEvents: "none",
|
|
50
50
|
zIndex: "40"
|
|
51
51
|
});
|
|
52
52
|
controls.forEach((control, index) => {
|
|
53
|
-
const view =
|
|
53
|
+
const view = chunkP4NVINSK_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
54
54
|
const style = {
|
|
55
55
|
position: "absolute",
|
|
56
56
|
left: `${view.left}px`,
|
|
@@ -59,7 +59,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
59
59
|
height: `${view.height}px`
|
|
60
60
|
};
|
|
61
61
|
if (view.className === "image" && view.imageUrl) {
|
|
62
|
-
const img =
|
|
62
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-activex-overlay-image", style);
|
|
63
63
|
img.src = view.imageUrl;
|
|
64
64
|
img.alt = view.label;
|
|
65
65
|
img.setAttribute("draggable", "false");
|
|
@@ -67,7 +67,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
67
67
|
overlay.appendChild(img);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
const badge =
|
|
70
|
+
const badge = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-activex-overlay-placeholder", style);
|
|
71
71
|
badge.title = `ActiveX control: ${view.label} (interactive controls are not supported in the viewer)`;
|
|
72
72
|
badge.textContent = view.label;
|
|
73
73
|
overlay.appendChild(badge);
|
|
@@ -80,25 +80,25 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
80
80
|
if (comments.length === 0) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const overlay =
|
|
83
|
+
const overlay = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-comment-markers", {
|
|
84
84
|
position: "absolute",
|
|
85
85
|
inset: "0",
|
|
86
86
|
pointerEvents: "none",
|
|
87
87
|
zIndex: "45"
|
|
88
88
|
});
|
|
89
|
-
const markers =
|
|
89
|
+
const markers = chunkP4NVINSK_cjs.buildCommentMarkers(
|
|
90
90
|
comments,
|
|
91
91
|
canvasSize.width,
|
|
92
92
|
canvasSize.height,
|
|
93
93
|
t("pptx.comments.unknownAuthor")
|
|
94
94
|
);
|
|
95
95
|
for (const marker of markers) {
|
|
96
|
-
const dot =
|
|
96
|
+
const dot = chunkUGSMMZU6_cjs.createEl(doc, "button", "pptxv-comment-marker", {
|
|
97
97
|
position: "absolute",
|
|
98
|
-
left: `${marker.x -
|
|
99
|
-
top: `${marker.y -
|
|
100
|
-
width: `${
|
|
101
|
-
height: `${
|
|
98
|
+
left: `${marker.x - chunkP4NVINSK_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
99
|
+
top: `${marker.y - chunkP4NVINSK_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
100
|
+
width: `${chunkP4NVINSK_cjs.COMMENT_MARKER_SIZE}px`,
|
|
101
|
+
height: `${chunkP4NVINSK_cjs.COMMENT_MARKER_SIZE}px`,
|
|
102
102
|
display: "flex",
|
|
103
103
|
alignItems: "center",
|
|
104
104
|
justifyContent: "center",
|
|
@@ -165,7 +165,7 @@ function merge3dStyle(base, computed) {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
168
|
-
const frame =
|
|
168
|
+
const frame = chunkP4NVINSK_cjs.getFrameEffectStyle(el);
|
|
169
169
|
if (frame) {
|
|
170
170
|
return { ...frame };
|
|
171
171
|
}
|
|
@@ -181,7 +181,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
181
181
|
style[key] = value;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
const stroke =
|
|
184
|
+
const stroke = chunkP4NVINSK_cjs.getComputedStrokeStyle(el);
|
|
185
185
|
if (stroke.borderWidth > 0) {
|
|
186
186
|
if (animatesStroke) {
|
|
187
187
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -200,7 +200,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
200
200
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
const fx =
|
|
203
|
+
const fx = chunkP4NVINSK_cjs.getComputedEffectStyle(el);
|
|
204
204
|
if (fx.boxShadow) {
|
|
205
205
|
style["boxShadow"] = fx.boxShadow;
|
|
206
206
|
}
|
|
@@ -217,11 +217,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
217
217
|
if (fx.overflowVisible) {
|
|
218
218
|
style["overflow"] = "visible";
|
|
219
219
|
}
|
|
220
|
-
merge3dStyle(style,
|
|
221
|
-
if (
|
|
220
|
+
merge3dStyle(style, chunkP4NVINSK_cjs.getComputed3dStyle(el));
|
|
221
|
+
if (chunkP4NVINSK_cjs.isHollowShapeElement(el)) {
|
|
222
222
|
style["pointerEvents"] = "none";
|
|
223
223
|
}
|
|
224
|
-
const geometry =
|
|
224
|
+
const geometry = chunkP4NVINSK_cjs.resolveShapeGeometry(el);
|
|
225
225
|
switch (geometry.kind) {
|
|
226
226
|
case "bare":
|
|
227
227
|
style["backgroundColor"] = "transparent";
|
|
@@ -255,17 +255,17 @@ function getTextBlockStyle(el) {
|
|
|
255
255
|
if (!pptx.hasTextProperties(el)) {
|
|
256
256
|
return {};
|
|
257
257
|
}
|
|
258
|
-
const base =
|
|
258
|
+
const base = chunkP4NVINSK_cjs.buildTextBlockStyle(el, {
|
|
259
259
|
fallbackColor: chunkYZWKNFPU_cjs.DEFAULT_TEXT_COLOR,
|
|
260
260
|
bodyLayout: true,
|
|
261
261
|
pxLengths: true
|
|
262
262
|
});
|
|
263
|
-
const scene3d =
|
|
263
|
+
const scene3d = chunkP4NVINSK_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
264
264
|
if (!scene3d) {
|
|
265
265
|
return base;
|
|
266
266
|
}
|
|
267
267
|
const merged = { ...base, ...scene3d };
|
|
268
|
-
const transform =
|
|
268
|
+
const transform = chunkUGSMMZU6_cjs.composeTransforms(base.transform, scene3d.transform);
|
|
269
269
|
if (transform !== void 0) {
|
|
270
270
|
merged.transform = transform;
|
|
271
271
|
}
|
|
@@ -353,7 +353,7 @@ function renderSlideStage(options) {
|
|
|
353
353
|
const { document: doc, slide, canvasSize, mediaDataUrls, registry, t } = options;
|
|
354
354
|
const scale = options.scale ?? 1;
|
|
355
355
|
const interactive = options.interactive ?? false;
|
|
356
|
-
const stage =
|
|
356
|
+
const stage = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-stage", {
|
|
357
357
|
width: `${canvasSize.width}px`,
|
|
358
358
|
height: `${canvasSize.height}px`,
|
|
359
359
|
transform: `scale(${scale})`,
|
|
@@ -370,7 +370,7 @@ function renderSlideStage(options) {
|
|
|
370
370
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
371
371
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
372
372
|
...chunkCK6RYGB4_cjs.deviceStrokeStageStyle(scale),
|
|
373
|
-
...
|
|
373
|
+
...chunkP4NVINSK_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
374
374
|
});
|
|
375
375
|
if (interactive || options.reading) {
|
|
376
376
|
stage.setAttribute("role", "region");
|
|
@@ -411,10 +411,10 @@ function renderSlideStage(options) {
|
|
|
411
411
|
chartPartSelection: options.chartPartSelection,
|
|
412
412
|
onChartPartSelect: options.onChartPartSelect,
|
|
413
413
|
selectedElementIds: options.selectedElementIds,
|
|
414
|
-
edgeBleeds:
|
|
414
|
+
edgeBleeds: chunkP4NVINSK_cjs.resolveStageEdgeBleeds(void 0, slide, options.selectedElementIds),
|
|
415
415
|
registry,
|
|
416
416
|
renderElement(element, zIndex) {
|
|
417
|
-
if (!
|
|
417
|
+
if (!chunkP4NVINSK_cjs.isElementRendered(element)) {
|
|
418
418
|
return null;
|
|
419
419
|
}
|
|
420
420
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
@@ -426,10 +426,10 @@ function renderSlideStage(options) {
|
|
|
426
426
|
}
|
|
427
427
|
node.setAttribute("data-pptx-element", "true");
|
|
428
428
|
}
|
|
429
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
430
|
-
const hitTargetStyle =
|
|
429
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkP4NVINSK_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
430
|
+
const hitTargetStyle = chunkP4NVINSK_cjs.elementHitTargetStyle(element);
|
|
431
431
|
if (hitTargetStyle) {
|
|
432
|
-
const hitTarget =
|
|
432
|
+
const hitTarget = chunkUGSMMZU6_cjs.createEl(doc, "div", void 0, hitTargetStyle);
|
|
433
433
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
434
434
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
435
435
|
node.appendChild(hitTarget);
|
|
@@ -447,12 +447,12 @@ function renderSlideStage(options) {
|
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
449
|
if (interactive || options.reading) {
|
|
450
|
-
|
|
450
|
+
chunkP4NVINSK_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
451
451
|
presenting: options.presenting ?? false
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
454
|
if (interactive) {
|
|
455
|
-
|
|
455
|
+
chunkP4NVINSK_cjs.applyElementActionAffordances(
|
|
456
456
|
stage,
|
|
457
457
|
slide.elements.filter(
|
|
458
458
|
(element) => options.templateEditing || !chunk3CYWRMYZ_cjs.isTemplateElementId(element.id)
|
|
@@ -460,7 +460,7 @@ function renderSlideStage(options) {
|
|
|
460
460
|
{
|
|
461
461
|
canInteract: true,
|
|
462
462
|
presenting: options.presenting ?? false,
|
|
463
|
-
labels:
|
|
463
|
+
labels: chunkP4NVINSK_cjs.actionAffordanceLabels((key) => t(key))
|
|
464
464
|
}
|
|
465
465
|
);
|
|
466
466
|
}
|
|
@@ -567,7 +567,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
567
567
|
if (!rect) {
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
|
-
const step2 =
|
|
570
|
+
const step2 = chunkP4NVINSK_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
571
571
|
if (!step2) {
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
@@ -626,7 +626,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
626
626
|
bubbles: true,
|
|
627
627
|
detail: {
|
|
628
628
|
elementId: element.id,
|
|
629
|
-
target:
|
|
629
|
+
target: chunkP4NVINSK_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
630
630
|
open
|
|
631
631
|
}
|
|
632
632
|
})
|
|
@@ -669,7 +669,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
669
669
|
seriesIndex: part.seriesIndex,
|
|
670
670
|
pointIndex: part.pointIndex
|
|
671
671
|
});
|
|
672
|
-
const startedMark =
|
|
672
|
+
const startedMark = chunkP4NVINSK_cjs.beginChartMarkDrag({
|
|
673
673
|
part,
|
|
674
674
|
geometry: markGeometry,
|
|
675
675
|
chartData: chart.chartData,
|
|
@@ -713,17 +713,17 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
713
713
|
// src/pptx/dom/elements/chart.ts
|
|
714
714
|
var renderChartElement = (element, zIndex, context) => {
|
|
715
715
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
716
|
-
const spec = wrapper ?
|
|
716
|
+
const spec = wrapper ? chunkP4NVINSK_cjs.resolveChartThreeViewSpec(element, chunkUGSMMZU6_cjs.rendering3DFlagsOf(context)) : null;
|
|
717
717
|
if (!wrapper || !spec) {
|
|
718
718
|
return wrapper;
|
|
719
719
|
}
|
|
720
|
-
const view =
|
|
720
|
+
const view = chunkUGSMMZU6_cjs.mountThreeViewInto(context.document, wrapper, {
|
|
721
721
|
spec,
|
|
722
|
-
interactive:
|
|
723
|
-
selectedPart:
|
|
722
|
+
interactive: chunkUGSMMZU6_cjs.isChart3DEditable(element, context),
|
|
723
|
+
selectedPart: chunkUGSMMZU6_cjs.selectedChartPartOf(element, context),
|
|
724
724
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
725
725
|
});
|
|
726
|
-
|
|
726
|
+
chunkUGSMMZU6_cjs.wireChartThreeViewEvents(view, element, context, wrapper);
|
|
727
727
|
return wrapper;
|
|
728
728
|
};
|
|
729
729
|
var renderChartSvgElement = (element, zIndex, context) => {
|
|
@@ -731,16 +731,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
731
731
|
return null;
|
|
732
732
|
}
|
|
733
733
|
const doc = context.document;
|
|
734
|
-
const container =
|
|
734
|
+
const container = chunkUGSMMZU6_cjs.createEl(
|
|
735
735
|
doc,
|
|
736
736
|
"div",
|
|
737
737
|
"pptxv-element pptxv-chart",
|
|
738
738
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
739
|
-
{ ...
|
|
739
|
+
{ ...chunkP4NVINSK_cjs.getContainerStyle(element, zIndex), ...chunkP4NVINSK_cjs.getFrameEffectStyle(element) }
|
|
740
740
|
);
|
|
741
741
|
container.dataset.elementId = element.id;
|
|
742
742
|
const animationState = context.presentationStates?.get(element.id);
|
|
743
|
-
const chartData = element.chartData ?
|
|
743
|
+
const chartData = element.chartData ? chunkP4NVINSK_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
744
744
|
if (!chartData || chartData.series.length === 0) {
|
|
745
745
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
746
746
|
return container;
|
|
@@ -775,7 +775,7 @@ function resolveChartPalette2(chartData) {
|
|
|
775
775
|
return chunkYZWKNFPU_cjs.resolveChartPalette(chartData);
|
|
776
776
|
}
|
|
777
777
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
778
|
-
const placeholder =
|
|
778
|
+
const placeholder = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
779
779
|
display: "flex",
|
|
780
780
|
alignItems: "center",
|
|
781
781
|
justifyContent: "center",
|
|
@@ -787,7 +787,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
787
787
|
border: "1px dashed #cbd5e1",
|
|
788
788
|
boxSizing: "border-box"
|
|
789
789
|
});
|
|
790
|
-
placeholder.textContent =
|
|
790
|
+
placeholder.textContent = chunkP4NVINSK_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
791
791
|
return placeholder;
|
|
792
792
|
}
|
|
793
793
|
|
|
@@ -806,19 +806,19 @@ function appendRunContent(doc, host, run) {
|
|
|
806
806
|
}
|
|
807
807
|
function appendTabLines(doc, host, lines) {
|
|
808
808
|
lines.forEach((line, li) => {
|
|
809
|
-
const lineHost =
|
|
809
|
+
const lineHost = chunkUGSMMZU6_cjs.createEl(doc, "span", void 0, {
|
|
810
810
|
display: "inline-block",
|
|
811
811
|
whiteSpace: "nowrap"
|
|
812
812
|
});
|
|
813
813
|
for (const piece of line.pieces) {
|
|
814
814
|
if (piece.leaderStyle) {
|
|
815
|
-
const leader =
|
|
815
|
+
const leader = chunkUGSMMZU6_cjs.createEl(doc, "span", void 0, piece.leaderStyle);
|
|
816
816
|
leader.setAttribute("aria-hidden", "true");
|
|
817
817
|
leader.textContent = piece.leaderText ?? "";
|
|
818
818
|
lineHost.appendChild(leader);
|
|
819
819
|
}
|
|
820
820
|
for (const word of piece.words ?? [piece]) {
|
|
821
|
-
const textSpan =
|
|
821
|
+
const textSpan = chunkUGSMMZU6_cjs.createEl(doc, "span", void 0, word.style);
|
|
822
822
|
textSpan.textContent = word.text;
|
|
823
823
|
lineHost.appendChild(textSpan);
|
|
824
824
|
}
|
|
@@ -832,7 +832,7 @@ function appendTabLines(doc, host, lines) {
|
|
|
832
832
|
function appendStyledPieces(doc, host, pieces) {
|
|
833
833
|
for (const piece of pieces) {
|
|
834
834
|
if (piece.style) {
|
|
835
|
-
const span =
|
|
835
|
+
const span = chunkUGSMMZU6_cjs.createEl(doc, "span", void 0, piece.style);
|
|
836
836
|
span.textContent = piece.text;
|
|
837
837
|
host.appendChild(span);
|
|
838
838
|
} else {
|
|
@@ -845,16 +845,16 @@ function appendStyledPieces(doc, host, pieces) {
|
|
|
845
845
|
var NEWLINE_RUN = "\n";
|
|
846
846
|
function createRunBaseNode(doc, run) {
|
|
847
847
|
if (run.equation) {
|
|
848
|
-
const host =
|
|
849
|
-
const math =
|
|
848
|
+
const host = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-inline-equation", run.style);
|
|
849
|
+
const math = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-equation-math", {
|
|
850
850
|
display: "inline-block",
|
|
851
851
|
verticalAlign: "middle",
|
|
852
852
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
853
853
|
});
|
|
854
|
-
math.innerHTML =
|
|
854
|
+
math.innerHTML = chunkP4NVINSK_cjs.runEquationMathMl(run.equation);
|
|
855
855
|
host.appendChild(math);
|
|
856
856
|
if (run.equation.number) {
|
|
857
|
-
const number =
|
|
857
|
+
const number = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-equation-number", {
|
|
858
858
|
whiteSpace: "nowrap",
|
|
859
859
|
marginInlineStart: "0.5em"
|
|
860
860
|
});
|
|
@@ -863,8 +863,8 @@ function createRunBaseNode(doc, run) {
|
|
|
863
863
|
}
|
|
864
864
|
return host;
|
|
865
865
|
}
|
|
866
|
-
if (run.hyperlink &&
|
|
867
|
-
const link =
|
|
866
|
+
if (run.hyperlink && chunkP4NVINSK_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
867
|
+
const link = chunkUGSMMZU6_cjs.createEl(doc, "a", "pptxv-link", run.style);
|
|
868
868
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
869
869
|
link.setAttribute("role", "link");
|
|
870
870
|
link.tabIndex = 0;
|
|
@@ -880,13 +880,13 @@ function createRunBaseNode(doc, run) {
|
|
|
880
880
|
}
|
|
881
881
|
if (run.ruby) {
|
|
882
882
|
const ruby = doc.createElement("ruby");
|
|
883
|
-
|
|
883
|
+
chunkUGSMMZU6_cjs.applyStyleMap(ruby, run.style);
|
|
884
884
|
appendRunContent(doc, ruby, run);
|
|
885
885
|
const openParen = doc.createElement("rp");
|
|
886
886
|
openParen.textContent = "(";
|
|
887
887
|
ruby.appendChild(openParen);
|
|
888
888
|
const annotation = doc.createElement("rt");
|
|
889
|
-
|
|
889
|
+
chunkUGSMMZU6_cjs.applyStyleMap(annotation, run.ruby.style);
|
|
890
890
|
annotation.textContent = run.ruby.text;
|
|
891
891
|
ruby.appendChild(annotation);
|
|
892
892
|
const closeParen = doc.createElement("rp");
|
|
@@ -894,8 +894,8 @@ function createRunBaseNode(doc, run) {
|
|
|
894
894
|
ruby.appendChild(closeParen);
|
|
895
895
|
return ruby;
|
|
896
896
|
}
|
|
897
|
-
const span =
|
|
898
|
-
|
|
897
|
+
const span = chunkUGSMMZU6_cjs.createEl(doc, "span");
|
|
898
|
+
chunkUGSMMZU6_cjs.applyStyleMap(span, run.style);
|
|
899
899
|
appendRunContent(doc, span, run);
|
|
900
900
|
return span;
|
|
901
901
|
}
|
|
@@ -904,22 +904,22 @@ function createRunNode(doc, run) {
|
|
|
904
904
|
if (!run.reflection) {
|
|
905
905
|
return base;
|
|
906
906
|
}
|
|
907
|
-
const wrapper =
|
|
907
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(doc, "span", void 0, {
|
|
908
908
|
position: "relative",
|
|
909
909
|
display: "inline-block"
|
|
910
910
|
});
|
|
911
911
|
wrapper.appendChild(base);
|
|
912
|
-
const mirror =
|
|
912
|
+
const mirror = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-text-reflection", { ...run.reflection });
|
|
913
913
|
mirror.setAttribute("aria-hidden", "true");
|
|
914
|
-
const mirrorInner =
|
|
915
|
-
|
|
914
|
+
const mirrorInner = chunkUGSMMZU6_cjs.createEl(doc, "span");
|
|
915
|
+
chunkUGSMMZU6_cjs.applyStyleMap(mirrorInner, run.style);
|
|
916
916
|
appendRunContent(doc, mirrorInner, run);
|
|
917
917
|
mirror.appendChild(mirrorInner);
|
|
918
918
|
wrapper.appendChild(mirror);
|
|
919
919
|
return wrapper;
|
|
920
920
|
}
|
|
921
921
|
function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
922
|
-
const block =
|
|
922
|
+
const block = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-text", textStyle);
|
|
923
923
|
for (const para of paragraphs) {
|
|
924
924
|
const paraStyle = {
|
|
925
925
|
// This paragraph's own `text-align` / BiDi `direction` / kinsoku rules,
|
|
@@ -941,13 +941,13 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
941
941
|
if (para.strutFontSizePx !== void 0) {
|
|
942
942
|
paraStyle.fontSize = `${para.strutFontSizePx}px`;
|
|
943
943
|
}
|
|
944
|
-
const p =
|
|
944
|
+
const p = chunkUGSMMZU6_cjs.createEl(doc, "p", "pptxv-para", paraStyle);
|
|
945
945
|
if (para.textIndentPx !== void 0) {
|
|
946
946
|
p.style.textIndent = `${para.textIndentPx}px`;
|
|
947
947
|
}
|
|
948
948
|
const picture = para.bulletPicture;
|
|
949
949
|
if (picture?.src) {
|
|
950
|
-
const image =
|
|
950
|
+
const image = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-bullet-image", {
|
|
951
951
|
width: `${picture.sizePx}px`,
|
|
952
952
|
height: `${picture.sizePx}px`,
|
|
953
953
|
display: "inline-block",
|
|
@@ -960,15 +960,15 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
960
960
|
image.setAttribute("draggable", "false");
|
|
961
961
|
p.appendChild(image);
|
|
962
962
|
} else if (para.bulletMarker !== void 0) {
|
|
963
|
-
const bullet =
|
|
964
|
-
|
|
963
|
+
const bullet = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-bullet");
|
|
964
|
+
chunkUGSMMZU6_cjs.applyStyleMap(bullet, para.bulletStyle);
|
|
965
965
|
if (para.bulletPicture) {
|
|
966
966
|
bullet.setAttribute("aria-label", para.bulletPicture.accessibleLabel);
|
|
967
967
|
}
|
|
968
968
|
bullet.textContent = para.bulletMarker;
|
|
969
969
|
p.appendChild(bullet);
|
|
970
970
|
}
|
|
971
|
-
const spec = build ?
|
|
971
|
+
const spec = build ? chunkP4NVINSK_cjs.buildTextBuildSpec(
|
|
972
972
|
build.elementId,
|
|
973
973
|
paragraphs.indexOf(para),
|
|
974
974
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -976,8 +976,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
976
976
|
) : void 0;
|
|
977
977
|
if (spec && spec.granularity !== "paragraph") {
|
|
978
978
|
for (const span of spec.spans ?? []) {
|
|
979
|
-
const node =
|
|
980
|
-
|
|
979
|
+
const node = chunkUGSMMZU6_cjs.createEl(doc, "span");
|
|
980
|
+
chunkUGSMMZU6_cjs.applyStyleMap(node, { ...span.style ?? {}, ...chunkP4NVINSK_cjs.textBuildSpanStyle(span) });
|
|
981
981
|
if (span.animId) {
|
|
982
982
|
node.setAttribute("data-anim-id", span.animId);
|
|
983
983
|
}
|
|
@@ -989,8 +989,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
989
989
|
}
|
|
990
990
|
let runHost = p;
|
|
991
991
|
if (spec) {
|
|
992
|
-
const wrapper =
|
|
993
|
-
|
|
992
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(doc, "span");
|
|
993
|
+
chunkUGSMMZU6_cjs.applyStyleMap(wrapper, chunkP4NVINSK_cjs.textBuildSpanStyle(spec));
|
|
994
994
|
if (spec.animId) {
|
|
995
995
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
996
996
|
}
|
|
@@ -1022,7 +1022,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1022
1022
|
const dashArray = chunkYZWKNFPU_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
1023
1023
|
const w = Math.max(element.width, 1);
|
|
1024
1024
|
const h = Math.max(element.height, 1);
|
|
1025
|
-
const wrapper =
|
|
1025
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
1026
1026
|
position: "absolute",
|
|
1027
1027
|
left: `${element.x}px`,
|
|
1028
1028
|
top: `${element.y}px`,
|
|
@@ -1046,18 +1046,18 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1046
1046
|
if (element.hidden) {
|
|
1047
1047
|
wrapper.style.display = "none";
|
|
1048
1048
|
}
|
|
1049
|
-
const lineGlow =
|
|
1049
|
+
const lineGlow = chunkP4NVINSK_cjs.getLineGlowFilterCss(ss);
|
|
1050
1050
|
if (lineGlow) {
|
|
1051
1051
|
wrapper.style.filter = lineGlow;
|
|
1052
1052
|
}
|
|
1053
|
-
const svg =
|
|
1053
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}` });
|
|
1054
1054
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1055
1055
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1056
|
-
const defs =
|
|
1057
|
-
const lineShadow =
|
|
1056
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(doc, "defs");
|
|
1057
|
+
const lineShadow = chunkP4NVINSK_cjs.getLineShadowParams(ss);
|
|
1058
1058
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1059
1059
|
if (lineShadow && shadowId) {
|
|
1060
|
-
const filter =
|
|
1060
|
+
const filter = chunkUGSMMZU6_cjs.createSvgEl(doc, "filter", {
|
|
1061
1061
|
id: shadowId,
|
|
1062
1062
|
x: "-50%",
|
|
1063
1063
|
y: "-50%",
|
|
@@ -1065,7 +1065,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1065
1065
|
height: "200%"
|
|
1066
1066
|
});
|
|
1067
1067
|
filter.appendChild(
|
|
1068
|
-
|
|
1068
|
+
chunkUGSMMZU6_cjs.createSvgEl(doc, "feDropShadow", {
|
|
1069
1069
|
dx: lineShadow.offsetX,
|
|
1070
1070
|
dy: lineShadow.offsetY,
|
|
1071
1071
|
stdDeviation: lineShadow.blur / 2,
|
|
@@ -1075,8 +1075,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1075
1075
|
);
|
|
1076
1076
|
defs.appendChild(filter);
|
|
1077
1077
|
}
|
|
1078
|
-
const startArrow =
|
|
1079
|
-
const endArrow =
|
|
1078
|
+
const startArrow = chunkP4NVINSK_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1079
|
+
const endArrow = chunkP4NVINSK_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1080
1080
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1081
1081
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1082
1082
|
if (startArrow && startMarkerId) {
|
|
@@ -1099,10 +1099,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1099
1099
|
svg.appendChild(defs);
|
|
1100
1100
|
}
|
|
1101
1101
|
const compound = ss?.compoundLine;
|
|
1102
|
-
const offsets =
|
|
1103
|
-
const widths =
|
|
1102
|
+
const offsets = chunkP4NVINSK_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1103
|
+
const widths = chunkP4NVINSK_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1104
1104
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1105
|
-
const usePath =
|
|
1105
|
+
const usePath = chunkP4NVINSK_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1106
1106
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1107
1107
|
const rw = Math.max(element.width, 0);
|
|
1108
1108
|
const rh = Math.max(element.height, 0);
|
|
@@ -1110,13 +1110,13 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1110
1110
|
const y1 = element.flipVertical ? rh : 0;
|
|
1111
1111
|
const x2 = element.flipHorizontal ? 0 : rw;
|
|
1112
1112
|
const y2 = element.flipVertical ? 0 : rh;
|
|
1113
|
-
const snapTransform =
|
|
1114
|
-
const hit =
|
|
1113
|
+
const snapTransform = chunkP4NVINSK_cjs.connectorSnapTransform(element, !usePath, offsets.length, strokeWidth);
|
|
1114
|
+
const hit = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
1115
1115
|
class: "pptxv-connector-hit",
|
|
1116
1116
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1117
1117
|
fill: "none",
|
|
1118
1118
|
stroke: "transparent",
|
|
1119
|
-
"stroke-width":
|
|
1119
|
+
"stroke-width": chunkP4NVINSK_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1120
1120
|
"stroke-linecap": "round",
|
|
1121
1121
|
"stroke-linejoin": "round"
|
|
1122
1122
|
});
|
|
@@ -1137,7 +1137,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1137
1137
|
};
|
|
1138
1138
|
let node;
|
|
1139
1139
|
if (pathData !== void 0) {
|
|
1140
|
-
node =
|
|
1140
|
+
node = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
1141
1141
|
d: pathData,
|
|
1142
1142
|
fill: "none",
|
|
1143
1143
|
"stroke-linejoin": "round",
|
|
@@ -1147,7 +1147,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1147
1147
|
node.style.transform = `translate(0, ${offset}px)`;
|
|
1148
1148
|
}
|
|
1149
1149
|
} else {
|
|
1150
|
-
node =
|
|
1150
|
+
node = chunkUGSMMZU6_cjs.createSvgEl(doc, "line", {
|
|
1151
1151
|
x1,
|
|
1152
1152
|
y1: y1 + offset,
|
|
1153
1153
|
x2,
|
|
@@ -1156,7 +1156,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
1158
|
node.setAttribute("data-pptx-line", "");
|
|
1159
|
-
node.style.setProperty("stroke-width",
|
|
1159
|
+
node.style.setProperty("stroke-width", chunkP4NVINSK_cjs.connectorStrandScreenWidth(widths, strokeWidth, idx));
|
|
1160
1160
|
if (snapTransform) {
|
|
1161
1161
|
node.style.transform = snapTransform;
|
|
1162
1162
|
}
|
|
@@ -1170,7 +1170,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1170
1170
|
if (!pptx.hasTextProperties(element)) {
|
|
1171
1171
|
return;
|
|
1172
1172
|
}
|
|
1173
|
-
const paragraphs =
|
|
1173
|
+
const paragraphs = chunkP4NVINSK_cjs.buildParagraphs(element, context.fieldContext);
|
|
1174
1174
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1175
1175
|
return;
|
|
1176
1176
|
}
|
|
@@ -1190,8 +1190,8 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1192
1192
|
const doc = context.document;
|
|
1193
|
-
const shape =
|
|
1194
|
-
const marker =
|
|
1193
|
+
const shape = chunkP4NVINSK_cjs.markerPath(arrow, size.width, size.length);
|
|
1194
|
+
const marker = chunkUGSMMZU6_cjs.createSvgEl(doc, "marker", {
|
|
1195
1195
|
id,
|
|
1196
1196
|
viewBox: "0 0 10 10",
|
|
1197
1197
|
refX: shape.refX,
|
|
@@ -1203,11 +1203,11 @@ function buildMarker(context, id, arrow, strokeColor, size) {
|
|
|
1203
1203
|
preserveAspectRatio: "none"
|
|
1204
1204
|
});
|
|
1205
1205
|
if (shape.shape === "circle") {
|
|
1206
|
-
marker.appendChild(
|
|
1206
|
+
marker.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "circle", { cx: 5, cy: 5, r: 4, fill: strokeColor }));
|
|
1207
1207
|
} else if (shape.strokeOnly) {
|
|
1208
|
-
marker.appendChild(
|
|
1208
|
+
marker.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "path", { d: shape.d, fill: "none", stroke: strokeColor }));
|
|
1209
1209
|
} else {
|
|
1210
|
-
marker.appendChild(
|
|
1210
|
+
marker.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "path", { d: shape.d, fill: strokeColor }));
|
|
1211
1211
|
}
|
|
1212
1212
|
return marker;
|
|
1213
1213
|
}
|
|
@@ -1246,13 +1246,13 @@ function stripAbuttingEdgeBleeds(root) {
|
|
|
1246
1246
|
// src/pptx/dom/elements/ink-stroke-svg.ts
|
|
1247
1247
|
function buildStrokeSvg(doc, view, replay) {
|
|
1248
1248
|
if (view.nibMarks) {
|
|
1249
|
-
const g =
|
|
1249
|
+
const g = chunkUGSMMZU6_cjs.createSvgEl(doc, "g", {
|
|
1250
1250
|
opacity: view.opacity,
|
|
1251
1251
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1252
1252
|
});
|
|
1253
1253
|
for (const m of view.nibMarks) {
|
|
1254
1254
|
g.appendChild(
|
|
1255
|
-
|
|
1255
|
+
chunkUGSMMZU6_cjs.createSvgEl(doc, "ellipse", {
|
|
1256
1256
|
cx: m.cx,
|
|
1257
1257
|
cy: m.cy,
|
|
1258
1258
|
rx: m.rPerp,
|
|
@@ -1265,16 +1265,16 @@ function buildStrokeSvg(doc, view, replay) {
|
|
|
1265
1265
|
return g;
|
|
1266
1266
|
}
|
|
1267
1267
|
if (view.circles) {
|
|
1268
|
-
const g =
|
|
1268
|
+
const g = chunkUGSMMZU6_cjs.createSvgEl(doc, "g", {
|
|
1269
1269
|
opacity: view.opacity,
|
|
1270
1270
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1271
1271
|
});
|
|
1272
1272
|
for (const c of view.circles) {
|
|
1273
|
-
g.appendChild(
|
|
1273
|
+
g.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "circle", { cx: c.cx, cy: c.cy, r: c.r, fill: view.color }));
|
|
1274
1274
|
}
|
|
1275
1275
|
return g;
|
|
1276
1276
|
}
|
|
1277
|
-
const path =
|
|
1277
|
+
const path = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
1278
1278
|
d: view.d,
|
|
1279
1279
|
fill: "none",
|
|
1280
1280
|
stroke: view.color,
|
|
@@ -1302,24 +1302,24 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1302
1302
|
return null;
|
|
1303
1303
|
}
|
|
1304
1304
|
const doc = context.document;
|
|
1305
|
-
const el =
|
|
1305
|
+
const el = chunkUGSMMZU6_cjs.createEl(
|
|
1306
1306
|
doc,
|
|
1307
1307
|
"div",
|
|
1308
1308
|
"pptxv-element pptxv-contentpart",
|
|
1309
|
-
|
|
1309
|
+
chunkP4NVINSK_cjs.getContainerStyle(element, zIndex)
|
|
1310
1310
|
);
|
|
1311
1311
|
el.dataset.elementId = element.id;
|
|
1312
1312
|
const strokes = element.inkStrokes;
|
|
1313
1313
|
if (!strokes || strokes.length === 0) {
|
|
1314
1314
|
el.classList.add("pptxv-placeholder");
|
|
1315
|
-
const label =
|
|
1315
|
+
const label = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
1316
1316
|
label.textContent = context.t("pptx.ink.contentPartFallback");
|
|
1317
1317
|
el.appendChild(label);
|
|
1318
1318
|
return el;
|
|
1319
1319
|
}
|
|
1320
1320
|
const w = Math.max(element.width, 1);
|
|
1321
1321
|
const h = Math.max(element.height, 1);
|
|
1322
|
-
const svg =
|
|
1322
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1323
1323
|
viewBox: `0 0 ${w} ${h}`,
|
|
1324
1324
|
preserveAspectRatio: "none"
|
|
1325
1325
|
});
|
|
@@ -1327,7 +1327,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1327
1327
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1328
1328
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getContentPartReplayStyles(strokes) : [];
|
|
1329
1329
|
if (context.presenting) {
|
|
1330
|
-
const keyframes =
|
|
1330
|
+
const keyframes = chunkUGSMMZU6_cjs.createSvgEl(doc, "style");
|
|
1331
1331
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1332
1332
|
svg.appendChild(keyframes);
|
|
1333
1333
|
}
|
|
@@ -1339,38 +1339,38 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1339
1339
|
return el;
|
|
1340
1340
|
};
|
|
1341
1341
|
function renderEquations(element, context) {
|
|
1342
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1342
|
+
if (!pptx.hasTextProperties(element) || !chunkP4NVINSK_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1343
1343
|
return null;
|
|
1344
1344
|
}
|
|
1345
1345
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
1346
1346
|
if (equations.length === 0) {
|
|
1347
1347
|
return null;
|
|
1348
1348
|
}
|
|
1349
|
-
const wrapper =
|
|
1349
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-equations", {
|
|
1350
1350
|
...getTextBlockStyle(element),
|
|
1351
1351
|
alignItems: "center",
|
|
1352
1352
|
gap: "0.25em",
|
|
1353
1353
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1354
1354
|
});
|
|
1355
1355
|
for (const segment of equations) {
|
|
1356
|
-
const mathml =
|
|
1356
|
+
const mathml = chunkP4NVINSK_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1357
1357
|
if (!mathml) {
|
|
1358
1358
|
continue;
|
|
1359
1359
|
}
|
|
1360
|
-
const row =
|
|
1360
|
+
const row = chunkUGSMMZU6_cjs.createEl(context.document, "span", "pptxv-equation", {
|
|
1361
1361
|
display: "flex",
|
|
1362
1362
|
alignItems: "center",
|
|
1363
1363
|
justifyContent: "center",
|
|
1364
1364
|
width: "100%"
|
|
1365
1365
|
});
|
|
1366
|
-
const math =
|
|
1366
|
+
const math = chunkUGSMMZU6_cjs.createEl(context.document, "span", "pptxv-equation-math", {
|
|
1367
1367
|
flex: 1,
|
|
1368
1368
|
textAlign: "center"
|
|
1369
1369
|
});
|
|
1370
|
-
math.innerHTML =
|
|
1370
|
+
math.innerHTML = chunkP4NVINSK_cjs.sanitizeMathMl(mathml);
|
|
1371
1371
|
row.appendChild(math);
|
|
1372
1372
|
if (segment.equationNumber) {
|
|
1373
|
-
const number =
|
|
1373
|
+
const number = chunkUGSMMZU6_cjs.createEl(context.document, "span", "pptxv-equation-number", {
|
|
1374
1374
|
whiteSpace: "nowrap"
|
|
1375
1375
|
});
|
|
1376
1376
|
number.textContent = `(${segment.equationNumber})`;
|
|
@@ -1385,7 +1385,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1385
1385
|
return null;
|
|
1386
1386
|
}
|
|
1387
1387
|
const fill = chunkYZWKNFPU_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1388
|
-
const data =
|
|
1388
|
+
const data = chunkP4NVINSK_cjs.build3DExtrusionData(
|
|
1389
1389
|
element.shapeStyle?.shape3d,
|
|
1390
1390
|
element.shapeStyle?.scene3d,
|
|
1391
1391
|
fill,
|
|
@@ -1395,11 +1395,11 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1395
1395
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
1396
1396
|
return null;
|
|
1397
1397
|
}
|
|
1398
|
-
const wrapper =
|
|
1398
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-extrusion-3d", toCss(data.wrapperStyle));
|
|
1399
1399
|
wrapper.setAttribute("aria-hidden", "true");
|
|
1400
1400
|
for (const panel of data.panels) {
|
|
1401
1401
|
wrapper.appendChild(
|
|
1402
|
-
|
|
1402
|
+
chunkUGSMMZU6_cjs.createEl(
|
|
1403
1403
|
doc,
|
|
1404
1404
|
"div",
|
|
1405
1405
|
`pptxv-extrusion-3d-panel pptxv-extrusion-3d-panel--${panel.side}`,
|
|
@@ -1409,7 +1409,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
if (data.materialOverlay) {
|
|
1411
1411
|
wrapper.appendChild(
|
|
1412
|
-
|
|
1412
|
+
chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-extrusion-3d-material", {
|
|
1413
1413
|
position: "absolute",
|
|
1414
1414
|
inset: 0,
|
|
1415
1415
|
backgroundImage: data.materialOverlay,
|
|
@@ -1447,18 +1447,18 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1447
1447
|
if (suppressOwnReflection) {
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
|
-
const wrapperStyle =
|
|
1450
|
+
const wrapperStyle = chunkP4NVINSK_cjs.getComputedEffectStyle(element).reflection;
|
|
1451
1451
|
if (!wrapperStyle) {
|
|
1452
1452
|
return;
|
|
1453
1453
|
}
|
|
1454
|
-
const layer =
|
|
1454
|
+
const layer = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1455
1455
|
layer.setAttribute("aria-hidden", "true");
|
|
1456
1456
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1457
1457
|
host.appendChild(layer);
|
|
1458
1458
|
}
|
|
1459
1459
|
function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFill, suppressOwnReflection = false) {
|
|
1460
1460
|
if (element.type === "group") {
|
|
1461
|
-
const wrap =
|
|
1461
|
+
const wrap = chunkUGSMMZU6_cjs.createEl(doc, "div", void 0, {
|
|
1462
1462
|
position: "relative",
|
|
1463
1463
|
width: "100%",
|
|
1464
1464
|
height: "100%",
|
|
@@ -1471,9 +1471,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1471
1471
|
if (groupFilterDefs) {
|
|
1472
1472
|
wrap.appendChild(groupFilterDefs);
|
|
1473
1473
|
}
|
|
1474
|
-
const childParentFill =
|
|
1474
|
+
const childParentFill = chunkP4NVINSK_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1475
1475
|
for (const child of element.children ?? []) {
|
|
1476
|
-
const childWrap =
|
|
1476
|
+
const childWrap = chunkUGSMMZU6_cjs.createEl(doc, "div", void 0, chunkP4NVINSK_cjs.getContainerStyle(child, 0));
|
|
1477
1477
|
childWrap.appendChild(
|
|
1478
1478
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1479
1479
|
);
|
|
@@ -1482,12 +1482,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1482
1482
|
appendOwnReflection(doc, wrap, element, mediaDataUrls, suppressOwnReflection);
|
|
1483
1483
|
return wrap;
|
|
1484
1484
|
}
|
|
1485
|
-
const box =
|
|
1485
|
+
const box = chunkUGSMMZU6_cjs.createEl(doc, "div", void 0, {
|
|
1486
1486
|
width: "100%",
|
|
1487
1487
|
height: "100%",
|
|
1488
1488
|
...getShapeFillStrokeStyle(element)
|
|
1489
1489
|
});
|
|
1490
|
-
const inheritedFill =
|
|
1490
|
+
const inheritedFill = chunkP4NVINSK_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1491
1491
|
if (inheritedFill) {
|
|
1492
1492
|
applyInheritedFill(box, inheritedFill);
|
|
1493
1493
|
}
|
|
@@ -1508,12 +1508,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1508
1508
|
box.appendChild(gradientOutline);
|
|
1509
1509
|
}
|
|
1510
1510
|
if (pptx.isImageLikeElement(element)) {
|
|
1511
|
-
const src =
|
|
1511
|
+
const src = chunkP4NVINSK_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1512
1512
|
if (src) {
|
|
1513
|
-
const img =
|
|
1513
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", void 0, {
|
|
1514
1514
|
width: "100%",
|
|
1515
1515
|
height: "100%",
|
|
1516
|
-
...
|
|
1516
|
+
...chunkP4NVINSK_cjs.getImageFitStyle(element)
|
|
1517
1517
|
});
|
|
1518
1518
|
img.setAttribute("src", src);
|
|
1519
1519
|
img.setAttribute("alt", "");
|
|
@@ -1523,7 +1523,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1523
1523
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1524
1524
|
return box;
|
|
1525
1525
|
}
|
|
1526
|
-
const paragraphs =
|
|
1526
|
+
const paragraphs = chunkP4NVINSK_cjs.buildParagraphs(element);
|
|
1527
1527
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1528
1528
|
if (hasText) {
|
|
1529
1529
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1535,29 +1535,29 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1535
1535
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1536
1536
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1537
1537
|
function renderShapeFilterDefs(doc, element) {
|
|
1538
|
-
const style =
|
|
1538
|
+
const style = chunkP4NVINSK_cjs.getEffectStyleSource(element);
|
|
1539
1539
|
if (!style) {
|
|
1540
1540
|
return null;
|
|
1541
1541
|
}
|
|
1542
1542
|
const markups = [];
|
|
1543
|
-
const duotone =
|
|
1543
|
+
const duotone = chunkP4NVINSK_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1544
1544
|
if (duotone) {
|
|
1545
1545
|
markups.push(duotone.filterMarkup);
|
|
1546
1546
|
}
|
|
1547
|
-
const softEdge =
|
|
1547
|
+
const softEdge = chunkP4NVINSK_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1548
1548
|
if (softEdge) {
|
|
1549
1549
|
markups.push(softEdge.filterMarkup);
|
|
1550
1550
|
}
|
|
1551
|
-
const bevelLighting =
|
|
1551
|
+
const bevelLighting = chunkP4NVINSK_cjs.getBevelLightingSvgFilter(element);
|
|
1552
1552
|
if (bevelLighting) {
|
|
1553
1553
|
markups.push(bevelLighting.filterMarkup);
|
|
1554
1554
|
}
|
|
1555
1555
|
if (markups.length === 0) {
|
|
1556
1556
|
return null;
|
|
1557
1557
|
}
|
|
1558
|
-
const svg =
|
|
1558
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1559
1559
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1560
|
-
const defs =
|
|
1560
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(doc, "defs");
|
|
1561
1561
|
defs.innerHTML = markups.join("");
|
|
1562
1562
|
svg.appendChild(defs);
|
|
1563
1563
|
return svg;
|
|
@@ -1566,11 +1566,11 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1566
1566
|
if (!pptx.hasShapeProperties(element)) {
|
|
1567
1567
|
return null;
|
|
1568
1568
|
}
|
|
1569
|
-
const overlay =
|
|
1569
|
+
const overlay = chunkP4NVINSK_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1570
1570
|
if (!overlay) {
|
|
1571
1571
|
return null;
|
|
1572
1572
|
}
|
|
1573
|
-
const layer =
|
|
1573
|
+
const layer = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-fill-overlay", {
|
|
1574
1574
|
position: "absolute",
|
|
1575
1575
|
inset: 0,
|
|
1576
1576
|
background: overlay.color,
|
|
@@ -1581,27 +1581,27 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1581
1581
|
return layer;
|
|
1582
1582
|
}
|
|
1583
1583
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1584
|
-
const wrapperStyle =
|
|
1584
|
+
const wrapperStyle = chunkP4NVINSK_cjs.getComputedEffectStyle(element).reflection;
|
|
1585
1585
|
if (!wrapperStyle) {
|
|
1586
1586
|
return null;
|
|
1587
1587
|
}
|
|
1588
|
-
const layer =
|
|
1588
|
+
const layer = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1589
1589
|
layer.setAttribute("aria-hidden", "true");
|
|
1590
1590
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1591
1591
|
return layer;
|
|
1592
1592
|
}
|
|
1593
1593
|
function renderHollowHitOutline(doc, element) {
|
|
1594
|
-
const hit =
|
|
1594
|
+
const hit = chunkP4NVINSK_cjs.buildHollowHitOutline(element);
|
|
1595
1595
|
if (!hit) {
|
|
1596
1596
|
return null;
|
|
1597
1597
|
}
|
|
1598
|
-
const svg =
|
|
1598
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1599
1599
|
"aria-hidden": "true",
|
|
1600
|
-
viewBox:
|
|
1600
|
+
viewBox: chunkP4NVINSK_cjs.strokeOutlineViewBox(element),
|
|
1601
1601
|
preserveAspectRatio: "none"
|
|
1602
1602
|
});
|
|
1603
1603
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1604
|
-
const path =
|
|
1604
|
+
const path = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
1605
1605
|
d: hit.d,
|
|
1606
1606
|
fill: "none",
|
|
1607
1607
|
stroke: "transparent",
|
|
@@ -1616,7 +1616,7 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1616
1616
|
if (!overlay) {
|
|
1617
1617
|
return null;
|
|
1618
1618
|
}
|
|
1619
|
-
const svg =
|
|
1619
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1620
1620
|
class: "pptx-vanilla-subpath-fill",
|
|
1621
1621
|
"aria-hidden": "true",
|
|
1622
1622
|
viewBox: `0 0 ${overlay.viewBoxWidth} ${overlay.viewBoxHeight}`,
|
|
@@ -1624,34 +1624,34 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1624
1624
|
});
|
|
1625
1625
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%");
|
|
1626
1626
|
for (const paint of overlay.paints) {
|
|
1627
|
-
const path =
|
|
1627
|
+
const path = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", { d: paint.d, fill: paint.fill, stroke: "none" });
|
|
1628
1628
|
svg.appendChild(path);
|
|
1629
1629
|
}
|
|
1630
1630
|
return svg;
|
|
1631
1631
|
}
|
|
1632
1632
|
function renderStrokeOutline(doc, element) {
|
|
1633
|
-
const outline =
|
|
1633
|
+
const outline = chunkP4NVINSK_cjs.buildStrokeOutline(element);
|
|
1634
1634
|
if (!outline) {
|
|
1635
1635
|
return null;
|
|
1636
1636
|
}
|
|
1637
|
-
const svg =
|
|
1637
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1638
1638
|
class: "pptx-vanilla-gradient-outline",
|
|
1639
1639
|
"data-pptx-outline": "",
|
|
1640
1640
|
"aria-hidden": "true",
|
|
1641
|
-
viewBox:
|
|
1641
|
+
viewBox: chunkP4NVINSK_cjs.strokeOutlineViewBox(element),
|
|
1642
1642
|
preserveAspectRatio: "none"
|
|
1643
1643
|
});
|
|
1644
1644
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1645
1645
|
if (outline.paint) {
|
|
1646
|
-
const defs =
|
|
1647
|
-
if (
|
|
1648
|
-
const pattern =
|
|
1646
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(doc, "defs");
|
|
1647
|
+
if (chunkP4NVINSK_cjs.isPatternPaint(outline.paint)) {
|
|
1648
|
+
const pattern = chunkUGSMMZU6_cjs.createSvgEl(doc, "pattern", {
|
|
1649
1649
|
id: outline.paint.id,
|
|
1650
1650
|
width: outline.paint.width,
|
|
1651
1651
|
height: outline.paint.height,
|
|
1652
1652
|
patternUnits: "userSpaceOnUse"
|
|
1653
1653
|
});
|
|
1654
|
-
const image =
|
|
1654
|
+
const image = chunkUGSMMZU6_cjs.createSvgEl(doc, "image", {
|
|
1655
1655
|
href: outline.paint.href,
|
|
1656
1656
|
width: outline.paint.width,
|
|
1657
1657
|
height: outline.paint.height
|
|
@@ -1659,12 +1659,12 @@ function renderStrokeOutline(doc, element) {
|
|
|
1659
1659
|
pattern.appendChild(image);
|
|
1660
1660
|
defs.appendChild(pattern);
|
|
1661
1661
|
} else {
|
|
1662
|
-
defs.innerHTML =
|
|
1662
|
+
defs.innerHTML = chunkP4NVINSK_cjs.svgGradientMarkup(outline.paint);
|
|
1663
1663
|
}
|
|
1664
1664
|
svg.appendChild(defs);
|
|
1665
1665
|
}
|
|
1666
1666
|
for (const strand of outline.strands) {
|
|
1667
|
-
const path =
|
|
1667
|
+
const path = chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
1668
1668
|
d: strand.d ?? outline.d,
|
|
1669
1669
|
fill: "none",
|
|
1670
1670
|
stroke: outline.stroke,
|
|
@@ -1685,7 +1685,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1685
1685
|
svg.appendChild(path);
|
|
1686
1686
|
}
|
|
1687
1687
|
if (outline.markers) {
|
|
1688
|
-
const defs =
|
|
1688
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(doc, "defs");
|
|
1689
1689
|
defs.innerHTML = outline.markers.markup;
|
|
1690
1690
|
svg.prepend(defs);
|
|
1691
1691
|
const path = svg.querySelector(":scope > path");
|
|
@@ -1721,14 +1721,14 @@ function indexRenderedNodes(root) {
|
|
|
1721
1721
|
return byId;
|
|
1722
1722
|
}
|
|
1723
1723
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1724
|
-
const inherited =
|
|
1724
|
+
const inherited = chunkP4NVINSK_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1725
1725
|
if (inherited) {
|
|
1726
1726
|
applyGroupChildFill(node, inherited);
|
|
1727
1727
|
}
|
|
1728
1728
|
if (element.type !== "group") {
|
|
1729
1729
|
return;
|
|
1730
1730
|
}
|
|
1731
|
-
const childFill =
|
|
1731
|
+
const childFill = chunkP4NVINSK_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1732
1732
|
if (!childFill) {
|
|
1733
1733
|
return;
|
|
1734
1734
|
}
|
|
@@ -1741,8 +1741,8 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1744
|
-
const el =
|
|
1745
|
-
...
|
|
1744
|
+
const el = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1745
|
+
...chunkP4NVINSK_cjs.getContainerStyle(element, zIndex),
|
|
1746
1746
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1747
1747
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1748
1748
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1759,7 +1759,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1759
1759
|
el.appendChild(reflection);
|
|
1760
1760
|
}
|
|
1761
1761
|
if (element.type === "group" && element.children?.length) {
|
|
1762
|
-
const parentGroupFill =
|
|
1762
|
+
const parentGroupFill = chunkP4NVINSK_cjs.getGroupChildParentFill(element);
|
|
1763
1763
|
element.children.forEach((child, index) => {
|
|
1764
1764
|
const childEl = context.renderElement(child, index);
|
|
1765
1765
|
if (childEl) {
|
|
@@ -1774,20 +1774,20 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1774
1774
|
// src/pptx/dom/elements/image.ts
|
|
1775
1775
|
var renderImageElement = (element, zIndex, context) => {
|
|
1776
1776
|
const doc = context.document;
|
|
1777
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1777
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkP4NVINSK_cjs.resolveShapeGeometry(element) : void 0;
|
|
1778
1778
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1779
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1780
|
-
const layers =
|
|
1781
|
-
overflow:
|
|
1779
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkP4NVINSK_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1780
|
+
const layers = chunkP4NVINSK_cjs.getPictureFrameLayers(element, {
|
|
1781
|
+
overflow: chunkP4NVINSK_cjs.getImageOverflow(element),
|
|
1782
1782
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1783
1783
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1784
1784
|
});
|
|
1785
|
-
const el =
|
|
1786
|
-
...
|
|
1785
|
+
const el = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1786
|
+
...chunkP4NVINSK_cjs.getContainerStyle(element, zIndex),
|
|
1787
1787
|
...layers.box
|
|
1788
1788
|
});
|
|
1789
1789
|
el.dataset.elementId = element.id;
|
|
1790
|
-
const surface = layers.surface ?
|
|
1790
|
+
const surface = layers.surface ? chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-image-surface", layers.surface) : el;
|
|
1791
1791
|
if (surface !== el) {
|
|
1792
1792
|
el.appendChild(surface);
|
|
1793
1793
|
const outline = renderStrokeOutline(doc, element);
|
|
@@ -1795,36 +1795,36 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1795
1795
|
el.appendChild(outline);
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
|
-
const src =
|
|
1798
|
+
const src = chunkP4NVINSK_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1799
1799
|
if (!src) {
|
|
1800
1800
|
return el;
|
|
1801
1801
|
}
|
|
1802
|
-
const fx =
|
|
1802
|
+
const fx = chunkP4NVINSK_cjs.getComputedImageStyle(element);
|
|
1803
1803
|
for (const f of fx.svgFilters) {
|
|
1804
|
-
const svg =
|
|
1804
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1805
1805
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1806
|
-
const defs =
|
|
1807
|
-
const filter =
|
|
1808
|
-
|
|
1806
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(doc, "defs");
|
|
1807
|
+
const filter = chunkUGSMMZU6_cjs.createSvgEl(doc, "filter");
|
|
1808
|
+
chunkUGSMMZU6_cjs.setSvgAttrs(filter, { id: f.id, "color-interpolation-filters": "sRGB" });
|
|
1809
1809
|
filter.innerHTML = f.markup;
|
|
1810
1810
|
defs.appendChild(filter);
|
|
1811
1811
|
svg.appendChild(defs);
|
|
1812
1812
|
surface.appendChild(svg);
|
|
1813
1813
|
}
|
|
1814
1814
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1815
|
-
const tiling =
|
|
1815
|
+
const tiling = chunkP4NVINSK_cjs.getImageTilingStyle(element, chunkP4NVINSK_cjs.getCachedNativeImageSize(src));
|
|
1816
1816
|
if (tiling) {
|
|
1817
|
-
const tile =
|
|
1817
|
+
const tile = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1818
1818
|
if (fx.filter) {
|
|
1819
1819
|
tile.style.filter = fx.filter;
|
|
1820
1820
|
}
|
|
1821
1821
|
if (fx.opacity !== void 0) {
|
|
1822
1822
|
tile.style.opacity = String(fx.opacity);
|
|
1823
1823
|
}
|
|
1824
|
-
if (!
|
|
1825
|
-
void
|
|
1824
|
+
if (!chunkP4NVINSK_cjs.getCachedNativeImageSize(src)) {
|
|
1825
|
+
void chunkP4NVINSK_cjs.probeNativeImageSize(src).then((size) => {
|
|
1826
1826
|
if (size) {
|
|
1827
|
-
|
|
1827
|
+
chunkUGSMMZU6_cjs.applyStyleMap(tile, chunkP4NVINSK_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1828
1828
|
}
|
|
1829
1829
|
return void 0;
|
|
1830
1830
|
});
|
|
@@ -1835,9 +1835,9 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
return el;
|
|
1837
1837
|
}
|
|
1838
|
-
const fit =
|
|
1839
|
-
const fillCounterTransform =
|
|
1840
|
-
const img =
|
|
1838
|
+
const fit = chunkP4NVINSK_cjs.getImageFitStyle(element);
|
|
1839
|
+
const fillCounterTransform = chunkP4NVINSK_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1840
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", void 0, {
|
|
1841
1841
|
...fit,
|
|
1842
1842
|
display: "block",
|
|
1843
1843
|
...fillCounterTransform ? { transform: fillCounterTransform, transformOrigin: "center" } : {}
|
|
@@ -1855,17 +1855,17 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1855
1855
|
if (element.type === "image" || element.type === "picture") {
|
|
1856
1856
|
const clrChange = element.imageEffects?.clrChange;
|
|
1857
1857
|
if (clrChange) {
|
|
1858
|
-
void
|
|
1858
|
+
void chunkP4NVINSK_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1859
1859
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1860
1860
|
img.src = resolved;
|
|
1861
1861
|
}
|
|
1862
1862
|
return void 0;
|
|
1863
1863
|
});
|
|
1864
1864
|
}
|
|
1865
|
-
const wash =
|
|
1865
|
+
const wash = chunkP4NVINSK_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1866
1866
|
if (wash) {
|
|
1867
1867
|
surface.appendChild(
|
|
1868
|
-
|
|
1868
|
+
chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-image-color-wash", {
|
|
1869
1869
|
position: "absolute",
|
|
1870
1870
|
inset: "0",
|
|
1871
1871
|
pointerEvents: "none",
|
|
@@ -1887,11 +1887,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1887
1887
|
return null;
|
|
1888
1888
|
}
|
|
1889
1889
|
const doc = context.document;
|
|
1890
|
-
const wrapper =
|
|
1890
|
+
const wrapper = chunkUGSMMZU6_cjs.createEl(
|
|
1891
1891
|
doc,
|
|
1892
1892
|
"div",
|
|
1893
1893
|
"pptxv-element pptxv-ink",
|
|
1894
|
-
|
|
1894
|
+
chunkP4NVINSK_cjs.getContainerStyle(element, zIndex)
|
|
1895
1895
|
);
|
|
1896
1896
|
wrapper.dataset.elementId = element.id;
|
|
1897
1897
|
const paths = element.inkPaths;
|
|
@@ -1900,7 +1900,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
const w = Math.max(element.width, 1);
|
|
1902
1902
|
const h = Math.max(element.height, 1);
|
|
1903
|
-
const svg =
|
|
1903
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1904
1904
|
viewBox: `0 0 ${w} ${h}`,
|
|
1905
1905
|
preserveAspectRatio: "none"
|
|
1906
1906
|
});
|
|
@@ -1908,11 +1908,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1908
1908
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1909
1909
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getInkReplayStyles(element) : [];
|
|
1910
1910
|
if (context.presenting) {
|
|
1911
|
-
const keyframes =
|
|
1911
|
+
const keyframes = chunkUGSMMZU6_cjs.createSvgEl(doc, "style");
|
|
1912
1912
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1913
1913
|
svg.appendChild(keyframes);
|
|
1914
1914
|
}
|
|
1915
|
-
const views =
|
|
1915
|
+
const views = chunkP4NVINSK_cjs.buildInkGroupStrokes(element, { color: chunkYZWKNFPU_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1916
1916
|
for (const [i, view] of views.entries()) {
|
|
1917
1917
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1918
1918
|
}
|
|
@@ -1935,7 +1935,7 @@ function mediaFullscreenResetStyle(baseStyle) {
|
|
|
1935
1935
|
};
|
|
1936
1936
|
}
|
|
1937
1937
|
function buildFullscreenStopButton(doc, label, onStop) {
|
|
1938
|
-
const button =
|
|
1938
|
+
const button = chunkUGSMMZU6_cjs.createEl(doc, "button", "pptxv-media-fullscreen-stop", {
|
|
1939
1939
|
position: "absolute",
|
|
1940
1940
|
bottom: "12px",
|
|
1941
1941
|
right: "12px",
|
|
@@ -1951,14 +1951,14 @@ function buildFullscreenStopButton(doc, label, onStop) {
|
|
|
1951
1951
|
button.type = "button";
|
|
1952
1952
|
button.setAttribute("aria-label", label);
|
|
1953
1953
|
button.addEventListener("click", onStop);
|
|
1954
|
-
const icon =
|
|
1954
|
+
const icon = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
1955
1955
|
width: 18,
|
|
1956
1956
|
height: 18,
|
|
1957
1957
|
viewBox: "0 0 24 24",
|
|
1958
1958
|
fill: "currentColor",
|
|
1959
1959
|
stroke: "none"
|
|
1960
1960
|
});
|
|
1961
|
-
icon.appendChild(
|
|
1961
|
+
icon.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "rect", { x: 6, y: 6, width: 12, height: 12, rx: 1 }));
|
|
1962
1962
|
button.appendChild(icon);
|
|
1963
1963
|
return button;
|
|
1964
1964
|
}
|
|
@@ -1966,12 +1966,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1966
1966
|
let stopButton = null;
|
|
1967
1967
|
const update = (playing) => {
|
|
1968
1968
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
1969
|
-
const active =
|
|
1970
|
-
|
|
1969
|
+
const active = chunkP4NVINSK_cjs.isMediaFullscreenActive(input);
|
|
1970
|
+
chunkUGSMMZU6_cjs.applyStyleMap(
|
|
1971
1971
|
container,
|
|
1972
|
-
active ?
|
|
1972
|
+
active ? chunkP4NVINSK_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
1973
1973
|
);
|
|
1974
|
-
if (
|
|
1974
|
+
if (chunkP4NVINSK_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
1975
1975
|
if (!stopButton) {
|
|
1976
1976
|
stopButton = buildFullscreenStopButton(
|
|
1977
1977
|
doc,
|
|
@@ -1996,12 +1996,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1996
1996
|
|
|
1997
1997
|
// src/pptx/dom/elements/media.ts
|
|
1998
1998
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
1999
|
-
|
|
1999
|
+
chunkP4NVINSK_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2000
2000
|
if (presenting) {
|
|
2001
|
-
|
|
2002
|
-
|
|
2001
|
+
chunkP4NVINSK_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2002
|
+
chunkP4NVINSK_cjs.scheduleMediaTrimAndFade(el, {
|
|
2003
2003
|
...playback,
|
|
2004
|
-
volume:
|
|
2004
|
+
volume: chunkP4NVINSK_cjs.mediaPlaybackAttributes(playback).volume
|
|
2005
2005
|
});
|
|
2006
2006
|
} else if (!el.paused) {
|
|
2007
2007
|
el.pause();
|
|
@@ -2011,20 +2011,20 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2011
2011
|
if (element.type !== "media") {
|
|
2012
2012
|
return null;
|
|
2013
2013
|
}
|
|
2014
|
-
const surface =
|
|
2014
|
+
const surface = chunkP4NVINSK_cjs.mediaSurfaceOf({
|
|
2015
2015
|
interactive: context.interactive === true || context.reading === true,
|
|
2016
2016
|
presenting: context.presenting
|
|
2017
2017
|
});
|
|
2018
|
-
const showTransport =
|
|
2018
|
+
const showTransport = chunkP4NVINSK_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2019
2019
|
const doc = context.document;
|
|
2020
|
-
const baseStyle =
|
|
2021
|
-
const el =
|
|
2020
|
+
const baseStyle = chunkP4NVINSK_cjs.getContainerStyle(element, zIndex);
|
|
2021
|
+
const el = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2022
2022
|
el.dataset.elementId = element.id;
|
|
2023
2023
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2024
|
-
const posterSrc =
|
|
2025
|
-
const onlineVideoEmbedUrl =
|
|
2024
|
+
const posterSrc = chunkP4NVINSK_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2025
|
+
const onlineVideoEmbedUrl = chunkP4NVINSK_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2026
2026
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2027
|
-
const iframe =
|
|
2027
|
+
const iframe = chunkUGSMMZU6_cjs.createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2028
2028
|
width: "100%",
|
|
2029
2029
|
height: "100%",
|
|
2030
2030
|
border: "0",
|
|
@@ -2032,14 +2032,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2032
2032
|
});
|
|
2033
2033
|
iframe.src = onlineVideoEmbedUrl;
|
|
2034
2034
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2035
|
-
iframe.allow =
|
|
2036
|
-
iframe.sandbox.value =
|
|
2035
|
+
iframe.allow = chunkP4NVINSK_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2036
|
+
iframe.sandbox.value = chunkP4NVINSK_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2037
2037
|
iframe.allowFullscreen = true;
|
|
2038
2038
|
el.appendChild(iframe);
|
|
2039
2039
|
return el;
|
|
2040
2040
|
}
|
|
2041
2041
|
if (mediaSrc && element.mediaType === "video") {
|
|
2042
|
-
const video =
|
|
2042
|
+
const video = chunkUGSMMZU6_cjs.createEl(doc, "video", "pptxv-media-video", {
|
|
2043
2043
|
width: "100%",
|
|
2044
2044
|
height: "100%",
|
|
2045
2045
|
objectFit: "contain",
|
|
@@ -2058,27 +2058,27 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2058
2058
|
return el;
|
|
2059
2059
|
}
|
|
2060
2060
|
if (mediaSrc && element.mediaType === "audio") {
|
|
2061
|
-
const audio =
|
|
2061
|
+
const audio = chunkUGSMMZU6_cjs.createEl(doc, "audio", "pptxv-media-audio", { width: "100%" });
|
|
2062
2062
|
audio.src = mediaSrc;
|
|
2063
2063
|
audio.controls = showTransport;
|
|
2064
2064
|
el.appendChild(audio);
|
|
2065
|
-
if (context.presenting &&
|
|
2065
|
+
if (context.presenting && chunkP4NVINSK_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2066
2066
|
audio.muted = true;
|
|
2067
|
-
|
|
2067
|
+
chunkP4NVINSK_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2068
2068
|
return el;
|
|
2069
2069
|
}
|
|
2070
2070
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2071
2071
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2072
2072
|
return el;
|
|
2073
2073
|
}
|
|
2074
|
-
const fallback =
|
|
2074
|
+
const fallback = chunkP4NVINSK_cjs.mediaFallbackVisual(surface, {
|
|
2075
2075
|
hasPoster: Boolean(posterSrc),
|
|
2076
2076
|
missing: element.mediaMissing === true
|
|
2077
2077
|
});
|
|
2078
|
-
const icon =
|
|
2079
|
-
const labelKey =
|
|
2078
|
+
const icon = chunkP4NVINSK_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2079
|
+
const labelKey = chunkP4NVINSK_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2080
2080
|
if (fallback.poster && posterSrc) {
|
|
2081
|
-
const img =
|
|
2081
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-media-poster", {
|
|
2082
2082
|
width: "100%",
|
|
2083
2083
|
height: "100%",
|
|
2084
2084
|
objectFit: "contain",
|
|
@@ -2090,14 +2090,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2090
2090
|
img.setAttribute("draggable", "false");
|
|
2091
2091
|
el.appendChild(img);
|
|
2092
2092
|
if (fallback.badge !== "none") {
|
|
2093
|
-
const badge =
|
|
2093
|
+
const badge = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-media-badge");
|
|
2094
2094
|
if (fallback.badge === "missing") {
|
|
2095
2095
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2096
2096
|
}
|
|
2097
|
-
badge.setAttribute(
|
|
2097
|
+
badge.setAttribute(chunkP4NVINSK_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2098
2098
|
badge.appendChild(buildIcon(doc, icon));
|
|
2099
2099
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2100
|
-
const text =
|
|
2100
|
+
const text = chunkUGSMMZU6_cjs.createEl(doc, "span");
|
|
2101
2101
|
text.textContent = context.t(labelKey);
|
|
2102
2102
|
badge.appendChild(text);
|
|
2103
2103
|
}
|
|
@@ -2107,12 +2107,12 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
if (fallback.placeholder !== "none") {
|
|
2109
2109
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2110
|
-
el.setAttribute(
|
|
2110
|
+
el.setAttribute(chunkP4NVINSK_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2111
2111
|
if (icon.length > 0) {
|
|
2112
2112
|
el.appendChild(buildIcon(doc, icon));
|
|
2113
2113
|
}
|
|
2114
2114
|
if (labelKey !== void 0) {
|
|
2115
|
-
const label =
|
|
2115
|
+
const label = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
2116
2116
|
label.textContent = context.t(labelKey);
|
|
2117
2117
|
el.appendChild(label);
|
|
2118
2118
|
}
|
|
@@ -2139,11 +2139,11 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2139
2139
|
return null;
|
|
2140
2140
|
}
|
|
2141
2141
|
const doc = context.document;
|
|
2142
|
-
const el =
|
|
2142
|
+
const el = chunkUGSMMZU6_cjs.createEl(
|
|
2143
2143
|
doc,
|
|
2144
2144
|
"div",
|
|
2145
2145
|
"pptxv-element pptxv-model3d",
|
|
2146
|
-
|
|
2146
|
+
chunkP4NVINSK_cjs.getContainerStyle(element, zIndex)
|
|
2147
2147
|
);
|
|
2148
2148
|
el.dataset.elementId = element.id;
|
|
2149
2149
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2156,7 +2156,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2156
2156
|
return el;
|
|
2157
2157
|
};
|
|
2158
2158
|
function buildPoster(doc, src, alt) {
|
|
2159
|
-
const img =
|
|
2159
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-model3d-poster", {
|
|
2160
2160
|
width: "100%",
|
|
2161
2161
|
height: "100%",
|
|
2162
2162
|
objectFit: "contain",
|
|
@@ -2170,7 +2170,7 @@ function buildPoster(doc, src, alt) {
|
|
|
2170
2170
|
return img;
|
|
2171
2171
|
}
|
|
2172
2172
|
function buildPlaceholder(doc, label) {
|
|
2173
|
-
const box =
|
|
2173
|
+
const box = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-model3d-placeholder", {
|
|
2174
2174
|
width: "100%",
|
|
2175
2175
|
height: "100%",
|
|
2176
2176
|
display: "flex",
|
|
@@ -2184,7 +2184,7 @@ function buildPlaceholder(doc, label) {
|
|
|
2184
2184
|
borderRadius: "4px",
|
|
2185
2185
|
boxSizing: "border-box"
|
|
2186
2186
|
});
|
|
2187
|
-
const icon =
|
|
2187
|
+
const icon = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
2188
2188
|
width: 24,
|
|
2189
2189
|
height: 24,
|
|
2190
2190
|
viewBox: "0 0 24 24",
|
|
@@ -2197,20 +2197,20 @@ function buildPlaceholder(doc, label) {
|
|
|
2197
2197
|
icon.setAttribute("class", "pptxv-model3d-icon");
|
|
2198
2198
|
icon.setAttribute("style", "margin-bottom:4px;color:#d1d5db");
|
|
2199
2199
|
icon.appendChild(
|
|
2200
|
-
|
|
2200
|
+
chunkUGSMMZU6_cjs.createSvgEl(doc, "path", {
|
|
2201
2201
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
|
|
2202
2202
|
})
|
|
2203
2203
|
);
|
|
2204
|
-
icon.appendChild(
|
|
2205
|
-
icon.appendChild(
|
|
2204
|
+
icon.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "polyline", { points: "3.27 6.96 12 12.01 20.73 6.96" }));
|
|
2205
|
+
icon.appendChild(chunkUGSMMZU6_cjs.createSvgEl(doc, "line", { x1: 12, y1: 22.08, x2: 12, y2: 12 }));
|
|
2206
2206
|
box.appendChild(icon);
|
|
2207
|
-
const text =
|
|
2207
|
+
const text = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-model3d-label");
|
|
2208
2208
|
text.textContent = label;
|
|
2209
2209
|
box.appendChild(text);
|
|
2210
2210
|
return box;
|
|
2211
2211
|
}
|
|
2212
2212
|
function buildViewButton(doc, root, poster, element, context) {
|
|
2213
|
-
const button =
|
|
2213
|
+
const button = chunkUGSMMZU6_cjs.createEl(doc, "button", "pptxv-model3d-view", {
|
|
2214
2214
|
position: "absolute",
|
|
2215
2215
|
bottom: "4px",
|
|
2216
2216
|
right: "4px",
|
|
@@ -2245,7 +2245,7 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2245
2245
|
button.remove();
|
|
2246
2246
|
return;
|
|
2247
2247
|
}
|
|
2248
|
-
const sceneHost =
|
|
2248
|
+
const sceneHost = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-model3d-scene", {
|
|
2249
2249
|
position: "absolute",
|
|
2250
2250
|
inset: 0,
|
|
2251
2251
|
willChange: "transform"
|
|
@@ -2273,15 +2273,15 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2273
2273
|
|
|
2274
2274
|
// src/pptx/dom/elements/ole-icons.ts
|
|
2275
2275
|
function buildOleIcon(doc, type, color) {
|
|
2276
|
-
const svg =
|
|
2276
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
2277
2277
|
width: 36,
|
|
2278
2278
|
height: 36,
|
|
2279
2279
|
viewBox: "0 0 24 24",
|
|
2280
2280
|
fill: "none",
|
|
2281
2281
|
"aria-hidden": "true"
|
|
2282
2282
|
});
|
|
2283
|
-
for (const shape of
|
|
2284
|
-
const node =
|
|
2283
|
+
for (const shape of chunkP4NVINSK_cjs.getOleIconShapes(type)) {
|
|
2284
|
+
const node = chunkUGSMMZU6_cjs.createSvgEl(doc, shape.tag, shape.attrs);
|
|
2285
2285
|
if (shape.tag === "text") {
|
|
2286
2286
|
node.setAttribute("fill", color);
|
|
2287
2287
|
node.textContent = shape.text ?? "";
|
|
@@ -2299,21 +2299,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2299
2299
|
return null;
|
|
2300
2300
|
}
|
|
2301
2301
|
const doc = context.document;
|
|
2302
|
-
const oleType =
|
|
2303
|
-
const typeColor =
|
|
2304
|
-
const typeLabel =
|
|
2305
|
-
const el =
|
|
2302
|
+
const oleType = chunkP4NVINSK_cjs.resolveOleType(element);
|
|
2303
|
+
const typeColor = chunkP4NVINSK_cjs.getOleTypeColor(oleType);
|
|
2304
|
+
const typeLabel = chunkP4NVINSK_cjs.getOleTypeLabel(oleType);
|
|
2305
|
+
const el = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-ole", chunkP4NVINSK_cjs.getContainerStyle(element, zIndex));
|
|
2306
2306
|
el.dataset.elementId = element.id;
|
|
2307
2307
|
el.setAttribute("role", "group");
|
|
2308
|
-
el.setAttribute("aria-label",
|
|
2308
|
+
el.setAttribute("aria-label", chunkP4NVINSK_cjs.getOleAriaLabel(element));
|
|
2309
2309
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2310
2310
|
if (element.previewImageData) {
|
|
2311
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2311
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkP4NVINSK_cjs.getOleBadgeLabel(oleType)));
|
|
2312
2312
|
} else {
|
|
2313
2313
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2314
2314
|
}
|
|
2315
|
-
const showActions =
|
|
2316
|
-
|
|
2315
|
+
const showActions = chunkP4NVINSK_cjs.oleActionsVisible(
|
|
2316
|
+
chunkP4NVINSK_cjs.mediaSurfaceOf({
|
|
2317
2317
|
interactive: context.interactive === true,
|
|
2318
2318
|
presenting: context.presenting
|
|
2319
2319
|
})
|
|
@@ -2329,7 +2329,7 @@ function infoLines(el, typeLabel) {
|
|
|
2329
2329
|
if (name) {
|
|
2330
2330
|
lines.push(name);
|
|
2331
2331
|
}
|
|
2332
|
-
const size =
|
|
2332
|
+
const size = chunkP4NVINSK_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2333
2333
|
if (size) {
|
|
2334
2334
|
lines.push(size);
|
|
2335
2335
|
}
|
|
@@ -2339,12 +2339,12 @@ function infoLines(el, typeLabel) {
|
|
|
2339
2339
|
return lines;
|
|
2340
2340
|
}
|
|
2341
2341
|
function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
2342
|
-
const preview =
|
|
2342
|
+
const preview = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-ole-preview", {
|
|
2343
2343
|
position: "relative",
|
|
2344
2344
|
width: "100%",
|
|
2345
2345
|
height: "100%"
|
|
2346
2346
|
});
|
|
2347
|
-
const img =
|
|
2347
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-ole-img", {
|
|
2348
2348
|
width: "100%",
|
|
2349
2349
|
height: "100%",
|
|
2350
2350
|
objectFit: "contain",
|
|
@@ -2353,19 +2353,19 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2353
2353
|
display: "block"
|
|
2354
2354
|
});
|
|
2355
2355
|
img.src = el.previewImageData ?? "";
|
|
2356
|
-
img.alt =
|
|
2356
|
+
img.alt = chunkP4NVINSK_cjs.getOleAriaLabel(el);
|
|
2357
2357
|
img.draggable = false;
|
|
2358
2358
|
preview.appendChild(img);
|
|
2359
|
-
const badge =
|
|
2359
|
+
const badge = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
2360
2360
|
badge.setAttribute("class", "pptxv-ole-badge");
|
|
2361
2361
|
badge.setAttribute(
|
|
2362
2362
|
"style",
|
|
2363
2363
|
"position:absolute;bottom:4px;right:4px;z-index:10;pointer-events:none"
|
|
2364
2364
|
);
|
|
2365
2365
|
badge.appendChild(
|
|
2366
|
-
|
|
2366
|
+
chunkUGSMMZU6_cjs.createSvgEl(doc, "rect", { x: 2, y: 2, width: 20, height: 20, rx: 3, fill: typeColor })
|
|
2367
2367
|
);
|
|
2368
|
-
const badgeText =
|
|
2368
|
+
const badgeText = chunkUGSMMZU6_cjs.createSvgEl(doc, "text", {
|
|
2369
2369
|
x: 12,
|
|
2370
2370
|
y: 16,
|
|
2371
2371
|
"text-anchor": "middle",
|
|
@@ -2379,8 +2379,8 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2379
2379
|
return preview;
|
|
2380
2380
|
}
|
|
2381
2381
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2382
|
-
const box =
|
|
2383
|
-
...
|
|
2382
|
+
const box = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2383
|
+
...chunkP4NVINSK_cjs.getPlaceholderStyle(oleType),
|
|
2384
2384
|
width: "100%",
|
|
2385
2385
|
height: "100%",
|
|
2386
2386
|
display: "flex",
|
|
@@ -2391,7 +2391,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2391
2391
|
boxSizing: "border-box"
|
|
2392
2392
|
});
|
|
2393
2393
|
box.appendChild(buildOleIcon(doc, oleType, typeColor));
|
|
2394
|
-
const name =
|
|
2394
|
+
const name = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-ole-name", {
|
|
2395
2395
|
marginTop: "8px",
|
|
2396
2396
|
fontSize: "12px",
|
|
2397
2397
|
fontWeight: 500,
|
|
@@ -2401,10 +2401,10 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2401
2401
|
whiteSpace: "nowrap",
|
|
2402
2402
|
color: typeColor
|
|
2403
2403
|
});
|
|
2404
|
-
name.textContent =
|
|
2404
|
+
name.textContent = chunkP4NVINSK_cjs.getOleDisplayName(el);
|
|
2405
2405
|
box.appendChild(name);
|
|
2406
2406
|
if (el.fileName) {
|
|
2407
|
-
const sublabel =
|
|
2407
|
+
const sublabel = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
2408
2408
|
marginTop: "2px",
|
|
2409
2409
|
fontSize: "10px",
|
|
2410
2410
|
color: "rgba(0,0,0,0.45)",
|
|
@@ -2434,7 +2434,7 @@ var ACTION_STYLE = {
|
|
|
2434
2434
|
function buildActionBar(doc, el, typeLabel, context) {
|
|
2435
2435
|
const data = el.oleEmbeddedData ?? "";
|
|
2436
2436
|
const downloadName = el.oleEmbeddedFileName ?? el.fileName ?? typeLabel;
|
|
2437
|
-
const bar =
|
|
2437
|
+
const bar = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-ole-actions", {
|
|
2438
2438
|
position: "absolute",
|
|
2439
2439
|
left: 0,
|
|
2440
2440
|
right: 0,
|
|
@@ -2453,9 +2453,9 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2453
2453
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2454
2454
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2455
2455
|
}
|
|
2456
|
-
const size =
|
|
2456
|
+
const size = chunkP4NVINSK_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2457
2457
|
if (size) {
|
|
2458
|
-
const meta =
|
|
2458
|
+
const meta = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-ole-meta", {
|
|
2459
2459
|
marginRight: "auto",
|
|
2460
2460
|
color: "rgba(0,0,0,0.55)",
|
|
2461
2461
|
overflow: "hidden",
|
|
@@ -2465,7 +2465,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2465
2465
|
meta.textContent = size;
|
|
2466
2466
|
bar.appendChild(meta);
|
|
2467
2467
|
}
|
|
2468
|
-
const download =
|
|
2468
|
+
const download = chunkUGSMMZU6_cjs.createEl(doc, "a", "pptxv-ole-action", ACTION_STYLE);
|
|
2469
2469
|
download.href = data;
|
|
2470
2470
|
download.download = downloadName;
|
|
2471
2471
|
const downloadTitle = context.t("pptx.ole.downloadName", { name: downloadName });
|
|
@@ -2473,14 +2473,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2473
2473
|
download.title = downloadTitle;
|
|
2474
2474
|
download.textContent = context.t("pptx.ole.download");
|
|
2475
2475
|
bar.appendChild(download);
|
|
2476
|
-
if (
|
|
2477
|
-
const open =
|
|
2476
|
+
if (chunkP4NVINSK_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2477
|
+
const open = chunkUGSMMZU6_cjs.createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2478
2478
|
open.type = "button";
|
|
2479
2479
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2480
2480
|
open.setAttribute("aria-label", openTitle);
|
|
2481
2481
|
open.title = openTitle;
|
|
2482
2482
|
open.textContent = context.t("pptx.ole.open");
|
|
2483
|
-
open.addEventListener("click", () =>
|
|
2483
|
+
open.addEventListener("click", () => chunkP4NVINSK_cjs.openUrlInNewTab(data));
|
|
2484
2484
|
bar.appendChild(open);
|
|
2485
2485
|
}
|
|
2486
2486
|
return bar;
|
|
@@ -2488,16 +2488,16 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2488
2488
|
|
|
2489
2489
|
// src/pptx/dom/elements/placeholder.ts
|
|
2490
2490
|
var renderPlaceholderElement = (element, zIndex, context) => {
|
|
2491
|
-
const el =
|
|
2491
|
+
const el = chunkUGSMMZU6_cjs.createEl(
|
|
2492
2492
|
context.document,
|
|
2493
2493
|
"div",
|
|
2494
2494
|
"pptxv-element pptxv-placeholder",
|
|
2495
|
-
|
|
2495
|
+
chunkP4NVINSK_cjs.getContainerStyle(element, zIndex)
|
|
2496
2496
|
);
|
|
2497
2497
|
el.dataset.elementId = element.id;
|
|
2498
2498
|
el.dataset.elementType = element.type;
|
|
2499
|
-
const label =
|
|
2500
|
-
label.textContent =
|
|
2499
|
+
const label = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-placeholder-label");
|
|
2500
|
+
label.textContent = chunkZHVKGGLQ_cjs.keyToLabel(element.type);
|
|
2501
2501
|
el.appendChild(label);
|
|
2502
2502
|
return el;
|
|
2503
2503
|
};
|
|
@@ -2508,7 +2508,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2508
2508
|
return null;
|
|
2509
2509
|
}
|
|
2510
2510
|
const doc = context.document;
|
|
2511
|
-
const summaryView =
|
|
2511
|
+
const summaryView = chunkP4NVINSK_cjs.buildSummaryZoomView(
|
|
2512
2512
|
element,
|
|
2513
2513
|
(index) => {
|
|
2514
2514
|
const slide = context.slides?.[index];
|
|
@@ -2524,19 +2524,19 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2524
2524
|
(key, params) => context.t(key, params)
|
|
2525
2525
|
);
|
|
2526
2526
|
if (summaryView) {
|
|
2527
|
-
const root =
|
|
2527
|
+
const root = chunkUGSMMZU6_cjs.createEl(
|
|
2528
2528
|
doc,
|
|
2529
2529
|
"div",
|
|
2530
2530
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2531
|
-
|
|
2531
|
+
chunkP4NVINSK_cjs.getContainerStyle(element, zIndex)
|
|
2532
2532
|
);
|
|
2533
|
-
const content =
|
|
2533
|
+
const content = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2534
2534
|
root.dataset.elementId = element.id;
|
|
2535
2535
|
root.dataset.zoomType = "summary";
|
|
2536
2536
|
root.setAttribute("role", "group");
|
|
2537
2537
|
root.setAttribute("aria-label", summaryView.ariaLabel);
|
|
2538
2538
|
for (const tile2 of summaryView.tiles) {
|
|
2539
|
-
const tileElement =
|
|
2539
|
+
const tileElement = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-summary-zoom-tile", {
|
|
2540
2540
|
...tile2.style,
|
|
2541
2541
|
backgroundColor: tile2.backgroundColor,
|
|
2542
2542
|
overflow: "hidden",
|
|
@@ -2570,22 +2570,22 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2570
2570
|
});
|
|
2571
2571
|
}
|
|
2572
2572
|
if (tile2.imageSrc) {
|
|
2573
|
-
const image =
|
|
2573
|
+
const image = chunkUGSMMZU6_cjs.createEl(doc, "img");
|
|
2574
2574
|
image.src = tile2.imageSrc;
|
|
2575
2575
|
image.alt = tile2.ariaLabel;
|
|
2576
2576
|
image.setAttribute("draggable", "false");
|
|
2577
2577
|
image.style.cssText = "width:100%;height:100%;object-fit:contain";
|
|
2578
2578
|
tileElement.appendChild(image);
|
|
2579
2579
|
} else {
|
|
2580
|
-
const label =
|
|
2580
|
+
const label = chunkUGSMMZU6_cjs.createEl(doc, "div");
|
|
2581
2581
|
label.textContent = tile2.label;
|
|
2582
|
-
const slideLabel =
|
|
2582
|
+
const slideLabel = chunkUGSMMZU6_cjs.createEl(doc, "div");
|
|
2583
2583
|
slideLabel.textContent = tile2.slideLabel;
|
|
2584
2584
|
tileElement.append(label, slideLabel);
|
|
2585
2585
|
}
|
|
2586
2586
|
content.appendChild(tileElement);
|
|
2587
2587
|
}
|
|
2588
|
-
const badge2 =
|
|
2588
|
+
const badge2 = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-badge");
|
|
2589
2589
|
badge2.textContent = context.t("pptx.zoom.summaryZoom");
|
|
2590
2590
|
content.appendChild(badge2);
|
|
2591
2591
|
root.appendChild(content);
|
|
@@ -2595,7 +2595,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2595
2595
|
const target = element.targetSlideIndex ?? 0;
|
|
2596
2596
|
const targetSlide = context.slides?.[target];
|
|
2597
2597
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2598
|
-
const el =
|
|
2598
|
+
const el = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-zoom", chunkP4NVINSK_cjs.getContainerStyle(element, zIndex));
|
|
2599
2599
|
el.dataset.elementId = element.id;
|
|
2600
2600
|
el.dataset.zoomType = zoomType;
|
|
2601
2601
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2605,7 +2605,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2605
2605
|
el.tabIndex = 0;
|
|
2606
2606
|
el.style.cursor = "pointer";
|
|
2607
2607
|
const activate = () => {
|
|
2608
|
-
const zoomTarget =
|
|
2608
|
+
const zoomTarget = chunkP4NVINSK_cjs.resolveZoomNavigationTarget(element);
|
|
2609
2609
|
if (zoomTarget) {
|
|
2610
2610
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2611
2611
|
}
|
|
@@ -2630,7 +2630,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2630
2630
|
section: element.targetSectionId
|
|
2631
2631
|
}) : context.t("pptx.zoom.ariaLabel", { number: target + 1 })
|
|
2632
2632
|
);
|
|
2633
|
-
const tile =
|
|
2633
|
+
const tile = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-tile", {
|
|
2634
2634
|
position: "relative",
|
|
2635
2635
|
width: "100%",
|
|
2636
2636
|
height: "100%",
|
|
@@ -2639,7 +2639,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2639
2639
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
2640
2640
|
});
|
|
2641
2641
|
if (element.imageData) {
|
|
2642
|
-
const img =
|
|
2642
|
+
const img = chunkUGSMMZU6_cjs.createEl(doc, "img", "pptxv-zoom-img", {
|
|
2643
2643
|
width: "100%",
|
|
2644
2644
|
height: "100%",
|
|
2645
2645
|
objectFit: "contain",
|
|
@@ -2662,7 +2662,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2662
2662
|
)
|
|
2663
2663
|
);
|
|
2664
2664
|
}
|
|
2665
|
-
const badge =
|
|
2665
|
+
const badge = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-badge", {
|
|
2666
2666
|
position: "absolute",
|
|
2667
2667
|
bottom: "4px",
|
|
2668
2668
|
right: "4px",
|
|
@@ -2680,7 +2680,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2680
2680
|
return el;
|
|
2681
2681
|
};
|
|
2682
2682
|
function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
2683
|
-
const box =
|
|
2683
|
+
const box = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-thumbnail", {
|
|
2684
2684
|
width: "100%",
|
|
2685
2685
|
height: "100%",
|
|
2686
2686
|
display: "flex",
|
|
@@ -2691,7 +2691,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2691
2691
|
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
2692
2692
|
boxSizing: "border-box"
|
|
2693
2693
|
});
|
|
2694
|
-
const slideLabel =
|
|
2694
|
+
const slideLabel = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-slide-label", {
|
|
2695
2695
|
fontSize: "14px",
|
|
2696
2696
|
fontWeight: 600,
|
|
2697
2697
|
color: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2700,7 +2700,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2700
2700
|
slideLabel.textContent = t("pptx.notes.slideN", { n: slideNumber });
|
|
2701
2701
|
box.appendChild(slideLabel);
|
|
2702
2702
|
if (sectionText) {
|
|
2703
|
-
const sectionLabel =
|
|
2703
|
+
const sectionLabel = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-zoom-section-label", {
|
|
2704
2704
|
fontSize: "10px",
|
|
2705
2705
|
color: "rgba(0, 0, 0, 0.4)"
|
|
2706
2706
|
});
|
|
@@ -2719,7 +2719,7 @@ function registerExtraRenderers(registry) {
|
|
|
2719
2719
|
|
|
2720
2720
|
// src/pptx/dom/elements/register-rich-media.ts
|
|
2721
2721
|
function registerRichMediaRenderers(registry) {
|
|
2722
|
-
registry.register("smartArt",
|
|
2722
|
+
registry.register("smartArt", chunkUGSMMZU6_cjs.renderSmartArtElement);
|
|
2723
2723
|
registry.register("media", renderMediaElement);
|
|
2724
2724
|
registry.register("ink", renderInkElement);
|
|
2725
2725
|
registry.register("ole", renderOleElement);
|
|
@@ -2755,10 +2755,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2755
2755
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
2756
2756
|
handle.remove();
|
|
2757
2757
|
}
|
|
2758
|
-
const crossings =
|
|
2758
|
+
const crossings = chunkP4NVINSK_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2759
2759
|
const rowBounds = measureRowBoundaries(table);
|
|
2760
|
-
colHandles =
|
|
2761
|
-
const handle =
|
|
2760
|
+
colHandles = chunkP4NVINSK_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
2761
|
+
const handle = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-resize-col", {
|
|
2762
2762
|
position: "absolute",
|
|
2763
2763
|
top: "0",
|
|
2764
2764
|
bottom: "0",
|
|
@@ -2767,14 +2767,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2767
2767
|
zIndex: "10",
|
|
2768
2768
|
pointerEvents: "none"
|
|
2769
2769
|
});
|
|
2770
|
-
const segments =
|
|
2770
|
+
const segments = chunkP4NVINSK_cjs.columnHandleSegments(
|
|
2771
2771
|
crossings.columns[i] ?? [],
|
|
2772
2772
|
rowBounds,
|
|
2773
2773
|
table.offsetHeight
|
|
2774
2774
|
);
|
|
2775
2775
|
for (const { top, height } of segments) {
|
|
2776
2776
|
handle.appendChild(
|
|
2777
|
-
|
|
2777
|
+
chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2778
2778
|
position: "absolute",
|
|
2779
2779
|
left: "0",
|
|
2780
2780
|
right: "0",
|
|
@@ -2788,7 +2788,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2788
2788
|
return handle;
|
|
2789
2789
|
});
|
|
2790
2790
|
rowHandles = rowBounds.map((topPx, i) => {
|
|
2791
|
-
const handle =
|
|
2791
|
+
const handle = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-resize-row", {
|
|
2792
2792
|
position: "absolute",
|
|
2793
2793
|
left: "0",
|
|
2794
2794
|
right: "0",
|
|
@@ -2797,10 +2797,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2797
2797
|
zIndex: "10",
|
|
2798
2798
|
pointerEvents: "none"
|
|
2799
2799
|
});
|
|
2800
|
-
const segments =
|
|
2800
|
+
const segments = chunkP4NVINSK_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
2801
2801
|
for (const { leftPct, widthPct } of segments) {
|
|
2802
2802
|
handle.appendChild(
|
|
2803
|
-
|
|
2803
|
+
chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2804
2804
|
position: "absolute",
|
|
2805
2805
|
top: "0",
|
|
2806
2806
|
bottom: "0",
|
|
@@ -2841,14 +2841,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2841
2841
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
2842
2842
|
context.onTableResizeColumns?.(
|
|
2843
2843
|
element,
|
|
2844
|
-
|
|
2844
|
+
chunkP4NVINSK_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
2845
2845
|
);
|
|
2846
2846
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
2847
2847
|
const deltaY = event.clientY - active.startPos;
|
|
2848
2848
|
context.onTableResizeRow?.(
|
|
2849
2849
|
element,
|
|
2850
2850
|
active.index,
|
|
2851
|
-
|
|
2851
|
+
chunkP4NVINSK_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkP4NVINSK_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
2852
2852
|
);
|
|
2853
2853
|
}
|
|
2854
2854
|
drawHandles();
|
|
@@ -2857,13 +2857,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
2857
2857
|
const rect = container.getBoundingClientRect();
|
|
2858
2858
|
const localX = event.clientX - rect.left;
|
|
2859
2859
|
const localY = event.clientY - rect.top;
|
|
2860
|
-
const scaleY =
|
|
2861
|
-
const crossings =
|
|
2860
|
+
const scaleY = chunkP4NVINSK_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
2861
|
+
const crossings = chunkP4NVINSK_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2862
2862
|
const rowBounds = measureRowBoundaries(table);
|
|
2863
|
-
const colBoundaries =
|
|
2863
|
+
const colBoundaries = chunkP4NVINSK_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
2864
2864
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
2865
2865
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
2866
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
2866
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkP4NVINSK_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
2867
2867
|
event.preventDefault();
|
|
2868
2868
|
event.stopPropagation();
|
|
2869
2869
|
doc.body.style.cursor = "col-resize";
|
|
@@ -2881,7 +2881,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
2884
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
2884
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkP4NVINSK_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
2885
2885
|
event.preventDefault();
|
|
2886
2886
|
event.stopPropagation();
|
|
2887
2887
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -2892,7 +2892,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2892
2892
|
index: i,
|
|
2893
2893
|
startPos: event.clientY,
|
|
2894
2894
|
handleEl: rowHandles[i] ?? container,
|
|
2895
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
2895
|
+
initialRowHeight: tr?.offsetHeight ?? chunkP4NVINSK_cjs.DEFAULT_ROW_HEIGHT
|
|
2896
2896
|
};
|
|
2897
2897
|
win.addEventListener("mousemove", onMouseMove);
|
|
2898
2898
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -2912,12 +2912,12 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2912
2912
|
return null;
|
|
2913
2913
|
}
|
|
2914
2914
|
const doc = context.document;
|
|
2915
|
-
const container =
|
|
2916
|
-
...
|
|
2915
|
+
const container = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
2916
|
+
...chunkP4NVINSK_cjs.getContainerStyle(element, zIndex),
|
|
2917
2917
|
overflow: "hidden"
|
|
2918
2918
|
});
|
|
2919
2919
|
container.dataset.elementId = element.id;
|
|
2920
|
-
const table =
|
|
2920
|
+
const table = chunkUGSMMZU6_cjs.createEl(doc, "table", "pptxv-table-grid", {
|
|
2921
2921
|
width: "100%",
|
|
2922
2922
|
height: "100%",
|
|
2923
2923
|
borderCollapse: "collapse",
|
|
@@ -2926,7 +2926,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2926
2926
|
// font stack; all five bindings declare the same shared default here.
|
|
2927
2927
|
fontFamily: chunkYZWKNFPU_cjs.DEFAULT_FONT_FAMILY,
|
|
2928
2928
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
2929
|
-
...
|
|
2929
|
+
...chunkP4NVINSK_cjs.tableContainerCss(tableData)
|
|
2930
2930
|
});
|
|
2931
2931
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
2932
2932
|
const tbody = doc.createElement("tbody");
|
|
@@ -2988,13 +2988,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
2988
2988
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
2989
2989
|
td.rowSpan = cell.rowSpan;
|
|
2990
2990
|
}
|
|
2991
|
-
const style =
|
|
2991
|
+
const style = chunkP4NVINSK_cjs.tableCellCss(
|
|
2992
2992
|
tableData,
|
|
2993
2993
|
cell,
|
|
2994
2994
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
2995
2995
|
styleContext
|
|
2996
2996
|
);
|
|
2997
|
-
const patternFill = cell.style ?
|
|
2997
|
+
const patternFill = cell.style ? chunkP4NVINSK_cjs.cellPatternFillCss(cell.style) : null;
|
|
2998
2998
|
if (patternFill) {
|
|
2999
2999
|
delete style["backgroundColor"];
|
|
3000
3000
|
delete style["background"];
|
|
@@ -3005,9 +3005,9 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3005
3005
|
style["backgroundColor"] = patternFill.backgroundColor;
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
const diagonals =
|
|
3008
|
+
chunkUGSMMZU6_cjs.applyStyleMap(td, CELL_BASE_STYLE);
|
|
3009
|
+
chunkUGSMMZU6_cjs.applyStyleMap(td, style);
|
|
3010
|
+
const diagonals = chunkP4NVINSK_cjs.getCellDiagonalBorders(
|
|
3011
3011
|
cell.style,
|
|
3012
3012
|
tableData,
|
|
3013
3013
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3020,17 +3020,17 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3020
3020
|
return td;
|
|
3021
3021
|
}
|
|
3022
3022
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3023
|
-
const line =
|
|
3023
|
+
const line = chunkUGSMMZU6_cjs.createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3024
3024
|
line.style.setProperty("stroke-width", chunkCK6RYGB4_cjs.screenStrokeWidth(width));
|
|
3025
3025
|
return line;
|
|
3026
3026
|
}
|
|
3027
3027
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
3028
|
-
const svg =
|
|
3028
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(doc, "svg", {
|
|
3029
3029
|
class: "pptxv-table-diag",
|
|
3030
3030
|
"aria-hidden": "true",
|
|
3031
3031
|
preserveAspectRatio: "none"
|
|
3032
3032
|
});
|
|
3033
|
-
|
|
3033
|
+
chunkUGSMMZU6_cjs.applyStyleMap(svg, {
|
|
3034
3034
|
position: "absolute",
|
|
3035
3035
|
inset: 0,
|
|
3036
3036
|
width: "100%",
|
|
@@ -3051,10 +3051,10 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3051
3051
|
return svg;
|
|
3052
3052
|
}
|
|
3053
3053
|
function appendCellText(doc, td, cell, cellCss) {
|
|
3054
|
-
const blocks =
|
|
3054
|
+
const blocks = chunkP4NVINSK_cjs.cellParagraphBlocks(cell);
|
|
3055
3055
|
if (blocks) {
|
|
3056
3056
|
for (const block of blocks) {
|
|
3057
|
-
const div =
|
|
3057
|
+
const div = chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
3058
3058
|
appendRuns(doc, div, block.runs, cellCss);
|
|
3059
3059
|
td.appendChild(div);
|
|
3060
3060
|
}
|
|
@@ -3063,7 +3063,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3063
3063
|
const richCell = cell;
|
|
3064
3064
|
const textRuns = richCell.textRuns && richCell.textRuns.length > 0 ? richCell.textRuns : null;
|
|
3065
3065
|
if (!textRuns) {
|
|
3066
|
-
const span =
|
|
3066
|
+
const span = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-table-text", { position: "relative" });
|
|
3067
3067
|
span.textContent = cell.text || " ";
|
|
3068
3068
|
td.appendChild(span);
|
|
3069
3069
|
return;
|
|
@@ -3071,7 +3071,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3071
3071
|
for (const run of textRuns) {
|
|
3072
3072
|
if (run.isParagraphBreak) {
|
|
3073
3073
|
td.appendChild(
|
|
3074
|
-
|
|
3074
|
+
chunkUGSMMZU6_cjs.createEl(doc, "div", "pptxv-table-para-break", { display: "block", height: 0 })
|
|
3075
3075
|
);
|
|
3076
3076
|
continue;
|
|
3077
3077
|
}
|
|
@@ -3084,9 +3084,9 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3084
3084
|
parent.appendChild(doc.createElement("br"));
|
|
3085
3085
|
continue;
|
|
3086
3086
|
}
|
|
3087
|
-
const span =
|
|
3087
|
+
const span = chunkUGSMMZU6_cjs.createEl(doc, "span", "pptxv-table-run", {
|
|
3088
3088
|
position: "relative",
|
|
3089
|
-
...
|
|
3089
|
+
...chunkP4NVINSK_cjs.cellRunStyle(run, cellCss)
|
|
3090
3090
|
});
|
|
3091
3091
|
span.textContent = run.text;
|
|
3092
3092
|
parent.appendChild(span);
|
|
@@ -3100,8 +3100,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3100
3100
|
}
|
|
3101
3101
|
|
|
3102
3102
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3103
|
-
var glyphOutlineFontCache = new
|
|
3104
|
-
var getGlyphOutline =
|
|
3103
|
+
var glyphOutlineFontCache = new chunkP4NVINSK_cjs.GlyphOutlineFontCache();
|
|
3104
|
+
var getGlyphOutline = chunkP4NVINSK_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3105
3105
|
|
|
3106
3106
|
// src/pptx/dom/elements/text-warp.ts
|
|
3107
3107
|
function renderWarpedText(element, context) {
|
|
@@ -3113,16 +3113,16 @@ function renderWarpedText(element, context) {
|
|
|
3113
3113
|
if (!preset || preset === "textNoShape") {
|
|
3114
3114
|
return null;
|
|
3115
3115
|
}
|
|
3116
|
-
const paragraphs =
|
|
3116
|
+
const paragraphs = chunkP4NVINSK_cjs.groupIntoParagraphs(element);
|
|
3117
3117
|
if (paragraphs.length === 0) {
|
|
3118
3118
|
return null;
|
|
3119
3119
|
}
|
|
3120
|
-
if (!
|
|
3121
|
-
const transform =
|
|
3120
|
+
if (!chunkP4NVINSK_cjs.shouldUseSvgWarp(preset)) {
|
|
3121
|
+
const transform = chunkP4NVINSK_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3122
3122
|
if (!transform) {
|
|
3123
3123
|
return null;
|
|
3124
3124
|
}
|
|
3125
|
-
const text =
|
|
3125
|
+
const text = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-wordart", {
|
|
3126
3126
|
width: "100%",
|
|
3127
3127
|
height: "100%",
|
|
3128
3128
|
display: "flex",
|
|
@@ -3140,14 +3140,14 @@ function renderWarpedText(element, context) {
|
|
|
3140
3140
|
if (style?.fontSize) {
|
|
3141
3141
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3142
3142
|
}
|
|
3143
|
-
const fontWeight =
|
|
3143
|
+
const fontWeight = chunkP4NVINSK_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3144
3144
|
if (fontWeight) {
|
|
3145
3145
|
text.style.fontWeight = fontWeight;
|
|
3146
3146
|
}
|
|
3147
3147
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3148
3148
|
return text;
|
|
3149
3149
|
}
|
|
3150
|
-
if (
|
|
3150
|
+
if (chunkP4NVINSK_cjs.hasGlyphEnvelope(preset)) {
|
|
3151
3151
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3152
3152
|
}
|
|
3153
3153
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3167,13 +3167,13 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3167
3167
|
const preset = style.textWarpPreset;
|
|
3168
3168
|
const width = Math.max(element.width, 1);
|
|
3169
3169
|
const height = Math.max(element.height, 1);
|
|
3170
|
-
const svg =
|
|
3170
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(context.document, "svg", {
|
|
3171
3171
|
viewBox: `0 0 ${width} ${height}`,
|
|
3172
3172
|
"aria-hidden": "true"
|
|
3173
3173
|
});
|
|
3174
3174
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3175
3175
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3176
|
-
const perLine =
|
|
3176
|
+
const perLine = chunkP4NVINSK_cjs.buildGlyphEnvelopeBlock(
|
|
3177
3177
|
preset,
|
|
3178
3178
|
paragraphs.map(
|
|
3179
3179
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3201,16 +3201,16 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3201
3201
|
fill,
|
|
3202
3202
|
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkYZWKNFPU_cjs.DEFAULT_FONT_FAMILY,
|
|
3203
3203
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3204
|
-
"font-weight":
|
|
3205
|
-
"font-style":
|
|
3204
|
+
"font-weight": chunkP4NVINSK_cjs.fontWeightAttribute(renderedFamily, s.bold ?? style.bold),
|
|
3205
|
+
"font-style": chunkP4NVINSK_cjs.resolveFontItalic(renderedFamily, s.italic ?? style.italic) ? "italic" : void 0
|
|
3206
3206
|
};
|
|
3207
3207
|
if (g.outlinePath) {
|
|
3208
|
-
const path =
|
|
3208
|
+
const path = chunkUGSMMZU6_cjs.createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
3209
3209
|
svg.appendChild(path);
|
|
3210
3210
|
return;
|
|
3211
3211
|
}
|
|
3212
3212
|
if (!g.slices || g.slices.length <= 1) {
|
|
3213
|
-
const text =
|
|
3213
|
+
const text = chunkUGSMMZU6_cjs.createSvgEl(context.document, "text", {
|
|
3214
3214
|
x: g.x,
|
|
3215
3215
|
y: g.y,
|
|
3216
3216
|
transform: g.transform,
|
|
@@ -3220,17 +3220,17 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3220
3220
|
svg.appendChild(text);
|
|
3221
3221
|
return;
|
|
3222
3222
|
}
|
|
3223
|
-
const group =
|
|
3223
|
+
const group = chunkUGSMMZU6_cjs.createSvgEl(context.document, "g", {
|
|
3224
3224
|
"data-glyph-slices": g.slices.length
|
|
3225
3225
|
});
|
|
3226
3226
|
g.slices.forEach((slice, sliceIndex) => {
|
|
3227
3227
|
const clipId = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-l${lineIndex}-g${glyphIndex}-s${sliceIndex}`;
|
|
3228
|
-
const clipPath =
|
|
3228
|
+
const clipPath = chunkUGSMMZU6_cjs.createSvgEl(context.document, "clipPath", {
|
|
3229
3229
|
id: clipId,
|
|
3230
3230
|
clipPathUnits: "userSpaceOnUse"
|
|
3231
3231
|
});
|
|
3232
3232
|
clipPath.appendChild(
|
|
3233
|
-
|
|
3233
|
+
chunkUGSMMZU6_cjs.createSvgEl(context.document, "rect", {
|
|
3234
3234
|
x: slice.clipX0,
|
|
3235
3235
|
y: -1e5,
|
|
3236
3236
|
width: slice.clipX1 - slice.clipX0,
|
|
@@ -3238,7 +3238,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3238
3238
|
})
|
|
3239
3239
|
);
|
|
3240
3240
|
group.appendChild(clipPath);
|
|
3241
|
-
const text =
|
|
3241
|
+
const text = chunkUGSMMZU6_cjs.createSvgEl(context.document, "text", {
|
|
3242
3242
|
x: g.x,
|
|
3243
3243
|
y: g.y,
|
|
3244
3244
|
transform: slice.transform,
|
|
@@ -3256,20 +3256,20 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3256
3256
|
function renderPathWarp(element, paragraphs, context) {
|
|
3257
3257
|
const style = element.textStyle;
|
|
3258
3258
|
const preset = style.textWarpPreset;
|
|
3259
|
-
const svg =
|
|
3259
|
+
const svg = chunkUGSMMZU6_cjs.createSvgEl(context.document, "svg", {
|
|
3260
3260
|
viewBox: `0 0 ${Math.max(element.width, 1)} ${Math.max(element.height, 1)}`,
|
|
3261
3261
|
preserveAspectRatio: "none",
|
|
3262
3262
|
"aria-hidden": "true"
|
|
3263
3263
|
});
|
|
3264
3264
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3265
3265
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3266
|
-
const defs =
|
|
3266
|
+
const defs = chunkUGSMMZU6_cjs.createSvgEl(context.document, "defs");
|
|
3267
3267
|
paragraphs.forEach((paragraph, index) => {
|
|
3268
3268
|
const id = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-${index}`;
|
|
3269
3269
|
defs.appendChild(
|
|
3270
|
-
|
|
3270
|
+
chunkUGSMMZU6_cjs.createSvgEl(context.document, "path", {
|
|
3271
3271
|
id,
|
|
3272
|
-
d:
|
|
3272
|
+
d: chunkP4NVINSK_cjs.buildWarpPath(
|
|
3273
3273
|
preset,
|
|
3274
3274
|
element.width,
|
|
3275
3275
|
element.height,
|
|
@@ -3280,14 +3280,14 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3280
3280
|
)
|
|
3281
3281
|
})
|
|
3282
3282
|
);
|
|
3283
|
-
const text =
|
|
3283
|
+
const text = chunkUGSMMZU6_cjs.createSvgEl(context.document, "text", {
|
|
3284
3284
|
fill: style.color ?? "#000000",
|
|
3285
3285
|
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkYZWKNFPU_cjs.DEFAULT_FONT_FAMILY,
|
|
3286
3286
|
"font-size": style.fontSize ?? 18,
|
|
3287
|
-
"font-weight":
|
|
3288
|
-
"font-style":
|
|
3287
|
+
"font-weight": chunkP4NVINSK_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3288
|
+
"font-style": chunkP4NVINSK_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3289
3289
|
});
|
|
3290
|
-
const textPath =
|
|
3290
|
+
const textPath = chunkUGSMMZU6_cjs.createSvgEl(context.document, "textPath", {
|
|
3291
3291
|
href: `#${id}`,
|
|
3292
3292
|
startOffset: "50%",
|
|
3293
3293
|
"text-anchor": "middle"
|
|
@@ -3302,9 +3302,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3302
3302
|
|
|
3303
3303
|
// src/pptx/dom/elements/text-shape.ts
|
|
3304
3304
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3305
|
-
const container =
|
|
3305
|
+
const container = chunkP4NVINSK_cjs.getContainerStyle(element, zIndex);
|
|
3306
3306
|
const animState = context.presentationStates?.get(element.id);
|
|
3307
|
-
const background =
|
|
3307
|
+
const background = chunkP4NVINSK_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3308
3308
|
const visualState = background ?? animState;
|
|
3309
3309
|
const shape = getShapeFillStrokeStyle(
|
|
3310
3310
|
element,
|
|
@@ -3312,27 +3312,27 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3312
3312
|
visualState?.animatesStroke
|
|
3313
3313
|
);
|
|
3314
3314
|
const merged = { ...container, ...shape };
|
|
3315
|
-
const bleedPatch =
|
|
3315
|
+
const bleedPatch = chunkP4NVINSK_cjs.abuttingEdgeBleedStyle(element, context.edgeBleeds?.get(element.id), merged);
|
|
3316
3316
|
const beforeBleed = { ...merged };
|
|
3317
3317
|
Object.assign(merged, bleedPatch);
|
|
3318
|
-
const transform =
|
|
3318
|
+
const transform = chunkUGSMMZU6_cjs.composeTransforms(container["transform"], shape["transform"]);
|
|
3319
3319
|
if (transform !== void 0) {
|
|
3320
3320
|
merged["transform"] = transform;
|
|
3321
3321
|
}
|
|
3322
|
-
const layers =
|
|
3323
|
-
const el =
|
|
3322
|
+
const layers = chunkP4NVINSK_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3323
|
+
const el = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3324
3324
|
el.dataset.elementId = element.id;
|
|
3325
3325
|
markAbuttingEdgeBleed(el, bleedPatch, beforeBleed);
|
|
3326
|
-
const paint = layers.paint ?
|
|
3326
|
+
const paint = layers.paint ? chunkUGSMMZU6_cjs.createEl(context.document, "div", void 0, layers.paint) : el;
|
|
3327
3327
|
if (paint !== el) {
|
|
3328
3328
|
paint.dataset.animId = layers.targetId;
|
|
3329
3329
|
paint.dataset.pptxAnimationLayer = "background";
|
|
3330
3330
|
el.appendChild(paint);
|
|
3331
3331
|
}
|
|
3332
3332
|
if (context.interactive && !context.presenting) {
|
|
3333
|
-
const hitTargetStyle =
|
|
3333
|
+
const hitTargetStyle = chunkP4NVINSK_cjs.elementHitTargetStyle(element);
|
|
3334
3334
|
if (hitTargetStyle) {
|
|
3335
|
-
const hitTarget =
|
|
3335
|
+
const hitTarget = chunkUGSMMZU6_cjs.createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3336
3336
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
3337
3337
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
3338
3338
|
el.appendChild(hitTarget);
|
|
@@ -3373,8 +3373,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3373
3373
|
} else if (warped) {
|
|
3374
3374
|
el.appendChild(warped);
|
|
3375
3375
|
} else {
|
|
3376
|
-
const linkedSegments =
|
|
3377
|
-
const paragraphs =
|
|
3376
|
+
const linkedSegments = chunkP4NVINSK_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3377
|
+
const paragraphs = chunkP4NVINSK_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3378
3378
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3379
3379
|
if (hasText) {
|
|
3380
3380
|
el.appendChild(
|
|
@@ -3385,9 +3385,9 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3385
3385
|
);
|
|
3386
3386
|
} else {
|
|
3387
3387
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3388
|
-
const prompt =
|
|
3388
|
+
const prompt = chunkP4NVINSK_cjs.placeholderPromptDescriptor(element, mode);
|
|
3389
3389
|
if (prompt) {
|
|
3390
|
-
const hint =
|
|
3390
|
+
const hint = chunkUGSMMZU6_cjs.createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3391
3391
|
...getTextBlockStyle(element),
|
|
3392
3392
|
...prompt.style
|
|
3393
3393
|
});
|
|
@@ -3401,7 +3401,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3401
3401
|
|
|
3402
3402
|
// src/pptx/dom/elements/index.ts
|
|
3403
3403
|
function createDefaultRegistry() {
|
|
3404
|
-
const registry =
|
|
3404
|
+
const registry = chunkUGSMMZU6_cjs.createElementRendererRegistry();
|
|
3405
3405
|
registry.register("text", renderTextShapeElement);
|
|
3406
3406
|
registry.register("shape", renderTextShapeElement);
|
|
3407
3407
|
registry.register("image", renderImageElement);
|
|
@@ -3553,111 +3553,111 @@ async function resolveImageUrls(handler, slides) {
|
|
|
3553
3553
|
|
|
3554
3554
|
Object.defineProperty(exports, "SMARTART_SVG_STYLE", {
|
|
3555
3555
|
enumerable: true,
|
|
3556
|
-
get: function () { return
|
|
3556
|
+
get: function () { return chunkUGSMMZU6_cjs.SMARTART_SVG_STYLE; }
|
|
3557
3557
|
});
|
|
3558
3558
|
Object.defineProperty(exports, "appendSvgTextLines", {
|
|
3559
3559
|
enumerable: true,
|
|
3560
|
-
get: function () { return
|
|
3560
|
+
get: function () { return chunkUGSMMZU6_cjs.appendSvgTextLines; }
|
|
3561
3561
|
});
|
|
3562
3562
|
Object.defineProperty(exports, "applyStyleMap", {
|
|
3563
3563
|
enumerable: true,
|
|
3564
|
-
get: function () { return
|
|
3564
|
+
get: function () { return chunkUGSMMZU6_cjs.applyStyleMap; }
|
|
3565
3565
|
});
|
|
3566
3566
|
Object.defineProperty(exports, "applyThreeViewTextStyle", {
|
|
3567
3567
|
enumerable: true,
|
|
3568
|
-
get: function () { return
|
|
3568
|
+
get: function () { return chunkUGSMMZU6_cjs.applyThreeViewTextStyle; }
|
|
3569
3569
|
});
|
|
3570
3570
|
Object.defineProperty(exports, "buildSmartArtFallbackSvg", {
|
|
3571
3571
|
enumerable: true,
|
|
3572
|
-
get: function () { return
|
|
3572
|
+
get: function () { return chunkUGSMMZU6_cjs.buildSmartArtFallbackSvg; }
|
|
3573
3573
|
});
|
|
3574
3574
|
Object.defineProperty(exports, "buildSmartArtInsertPreview", {
|
|
3575
3575
|
enumerable: true,
|
|
3576
|
-
get: function () { return
|
|
3576
|
+
get: function () { return chunkUGSMMZU6_cjs.buildSmartArtInsertPreview; }
|
|
3577
3577
|
});
|
|
3578
3578
|
Object.defineProperty(exports, "buildSvgGradientDefs", {
|
|
3579
3579
|
enumerable: true,
|
|
3580
|
-
get: function () { return
|
|
3580
|
+
get: function () { return chunkUGSMMZU6_cjs.buildSvgGradientDefs; }
|
|
3581
3581
|
});
|
|
3582
3582
|
Object.defineProperty(exports, "collectThreeViews", {
|
|
3583
3583
|
enumerable: true,
|
|
3584
|
-
get: function () { return
|
|
3584
|
+
get: function () { return chunkUGSMMZU6_cjs.collectThreeViews; }
|
|
3585
3585
|
});
|
|
3586
3586
|
Object.defineProperty(exports, "composeTransforms", {
|
|
3587
3587
|
enumerable: true,
|
|
3588
|
-
get: function () { return
|
|
3588
|
+
get: function () { return chunkUGSMMZU6_cjs.composeTransforms; }
|
|
3589
3589
|
});
|
|
3590
3590
|
Object.defineProperty(exports, "createEl", {
|
|
3591
3591
|
enumerable: true,
|
|
3592
|
-
get: function () { return
|
|
3592
|
+
get: function () { return chunkUGSMMZU6_cjs.createEl; }
|
|
3593
3593
|
});
|
|
3594
3594
|
Object.defineProperty(exports, "createElementRendererRegistry", {
|
|
3595
3595
|
enumerable: true,
|
|
3596
|
-
get: function () { return
|
|
3596
|
+
get: function () { return chunkUGSMMZU6_cjs.createElementRendererRegistry; }
|
|
3597
3597
|
});
|
|
3598
3598
|
Object.defineProperty(exports, "createSvgEl", {
|
|
3599
3599
|
enumerable: true,
|
|
3600
|
-
get: function () { return
|
|
3600
|
+
get: function () { return chunkUGSMMZU6_cjs.createSvgEl; }
|
|
3601
3601
|
});
|
|
3602
3602
|
Object.defineProperty(exports, "enableSmartArtEditing", {
|
|
3603
3603
|
enumerable: true,
|
|
3604
|
-
get: function () { return
|
|
3604
|
+
get: function () { return chunkUGSMMZU6_cjs.enableSmartArtEditing; }
|
|
3605
3605
|
});
|
|
3606
3606
|
Object.defineProperty(exports, "isChart3DEditable", {
|
|
3607
3607
|
enumerable: true,
|
|
3608
|
-
get: function () { return
|
|
3608
|
+
get: function () { return chunkUGSMMZU6_cjs.isChart3DEditable; }
|
|
3609
3609
|
});
|
|
3610
3610
|
Object.defineProperty(exports, "mountThreeViewInto", {
|
|
3611
3611
|
enumerable: true,
|
|
3612
|
-
get: function () { return
|
|
3612
|
+
get: function () { return chunkUGSMMZU6_cjs.mountThreeViewInto; }
|
|
3613
3613
|
});
|
|
3614
3614
|
Object.defineProperty(exports, "renderSmartArt3DElement", {
|
|
3615
3615
|
enumerable: true,
|
|
3616
|
-
get: function () { return
|
|
3616
|
+
get: function () { return chunkUGSMMZU6_cjs.renderSmartArt3DElement; }
|
|
3617
3617
|
});
|
|
3618
3618
|
Object.defineProperty(exports, "renderSmartArtElement", {
|
|
3619
3619
|
enumerable: true,
|
|
3620
|
-
get: function () { return
|
|
3620
|
+
get: function () { return chunkUGSMMZU6_cjs.renderSmartArtElement; }
|
|
3621
3621
|
});
|
|
3622
3622
|
Object.defineProperty(exports, "renderSmartArtSvg", {
|
|
3623
3623
|
enumerable: true,
|
|
3624
|
-
get: function () { return
|
|
3624
|
+
get: function () { return chunkUGSMMZU6_cjs.renderSmartArtSvg; }
|
|
3625
3625
|
});
|
|
3626
3626
|
Object.defineProperty(exports, "rendering3DFlagsOf", {
|
|
3627
3627
|
enumerable: true,
|
|
3628
|
-
get: function () { return
|
|
3628
|
+
get: function () { return chunkUGSMMZU6_cjs.rendering3DFlagsOf; }
|
|
3629
3629
|
});
|
|
3630
3630
|
Object.defineProperty(exports, "selectedChartPartOf", {
|
|
3631
3631
|
enumerable: true,
|
|
3632
|
-
get: function () { return
|
|
3632
|
+
get: function () { return chunkUGSMMZU6_cjs.selectedChartPartOf; }
|
|
3633
3633
|
});
|
|
3634
3634
|
Object.defineProperty(exports, "setSvgAttrs", {
|
|
3635
3635
|
enumerable: true,
|
|
3636
|
-
get: function () { return
|
|
3636
|
+
get: function () { return chunkUGSMMZU6_cjs.setSvgAttrs; }
|
|
3637
3637
|
});
|
|
3638
3638
|
Object.defineProperty(exports, "takeReusableThreeView", {
|
|
3639
3639
|
enumerable: true,
|
|
3640
|
-
get: function () { return
|
|
3640
|
+
get: function () { return chunkUGSMMZU6_cjs.takeReusableThreeView; }
|
|
3641
3641
|
});
|
|
3642
3642
|
Object.defineProperty(exports, "wireChartThreeViewEvents", {
|
|
3643
3643
|
enumerable: true,
|
|
3644
|
-
get: function () { return
|
|
3644
|
+
get: function () { return chunkUGSMMZU6_cjs.wireChartThreeViewEvents; }
|
|
3645
3645
|
});
|
|
3646
3646
|
Object.defineProperty(exports, "withReusableThreeViews", {
|
|
3647
3647
|
enumerable: true,
|
|
3648
|
-
get: function () { return
|
|
3648
|
+
get: function () { return chunkUGSMMZU6_cjs.withReusableThreeViews; }
|
|
3649
3649
|
});
|
|
3650
3650
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
3651
3651
|
enumerable: true,
|
|
3652
|
-
get: function () { return
|
|
3652
|
+
get: function () { return chunkP4NVINSK_cjs.buildEmbeddedFontStyles; }
|
|
3653
3653
|
});
|
|
3654
3654
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
3655
3655
|
enumerable: true,
|
|
3656
|
-
get: function () { return
|
|
3656
|
+
get: function () { return chunkP4NVINSK_cjs.buildFieldSubstitutionContext; }
|
|
3657
3657
|
});
|
|
3658
3658
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
3659
3659
|
enumerable: true,
|
|
3660
|
-
get: function () { return
|
|
3660
|
+
get: function () { return chunkP4NVINSK_cjs.releasePptxRenderCaches; }
|
|
3661
3661
|
});
|
|
3662
3662
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
3663
3663
|
enumerable: true,
|
|
@@ -3665,7 +3665,7 @@ Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
|
3665
3665
|
});
|
|
3666
3666
|
Object.defineProperty(exports, "createTranslator", {
|
|
3667
3667
|
enumerable: true,
|
|
3668
|
-
get: function () { return
|
|
3668
|
+
get: function () { return chunkZHVKGGLQ_cjs.createTranslator; }
|
|
3669
3669
|
});
|
|
3670
3670
|
exports.CHART_FORMAT_REQUEST_EVENT = CHART_FORMAT_REQUEST_EVENT;
|
|
3671
3671
|
exports.appendCommentMarkers = appendCommentMarkers;
|