ooxml-ui 1.26.0 → 1.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WH3EGA3S.js → chunk-2EFIFIPB.js} +2 -2
- package/dist/{chunk-P4FRKIPE.js → chunk-W2JD75LX.js} +1 -0
- package/dist/docx/print-picture.d.ts +1 -0
- package/dist/docx.js +3 -2
- package/dist/index.js +3 -3
- package/dist/pptx/{chunk-LUDEAPHZ.cjs → chunk-4PYBBOIK.cjs} +43 -43
- package/dist/pptx/{chunk-CWHK7HF4.mjs → chunk-HF2YJASV.mjs} +1 -1
- package/dist/pptx/{chunk-HAO5PKWK.cjs → chunk-NFP4PCTP.cjs} +606 -314
- package/dist/pptx/{chunk-IWUIGVWT.mjs → chunk-R5GKUSHI.mjs} +607 -317
- package/dist/pptx/dom/index.cjs +385 -385
- package/dist/pptx/dom/index.mjs +5 -5
- package/dist/pptx/index.cjs +2996 -2988
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/morph-animation.d.ts +11 -2
- package/dist/pptx/render/morph-animation.d.ts.map +1 -1
- package/dist/pptx/render/morph-geometry-keyframes.d.ts.map +1 -1
- package/dist/pptx/render/morph-matching.d.ts +1 -0
- package/dist/pptx/render/morph-matching.d.ts.map +1 -1
- package/dist/pptx/render/morph-stacked-copies.d.ts +20 -0
- package/dist/pptx/render/morph-stacked-copies.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-flow.d.ts +48 -0
- package/dist/pptx/render/morph-text-flow.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/themes-gallery.d.ts.map +1 -1
- package/dist/pptx/render/shape-geometry-cascade.d.ts.map +1 -1
- package/dist/pptx/render/stroke-clip-edge.d.ts +27 -0
- package/dist/pptx/render/stroke-clip-edge.d.ts.map +1 -0
- package/dist/pptx/render/stroke-clip-outset.d.ts +11 -1
- package/dist/pptx/render/stroke-clip-outset.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts +13 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/stroke-style.d.ts +10 -1
- package/dist/pptx/render/stroke-style.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-5ZTZYAZR.cjs → smartart-insert-preview-CTBWMXNX.cjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-HMSNUWDO.mjs → smartart-insert-preview-QJBRDU4C.mjs} +2 -2
- package/dist/smartart.js +1 -1
- package/dist/teams.js +1 -1
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx.js +5 -5
- package/package.json +2 -2
- /package/dist/{chunk-HGLCXNCT.js → chunk-WBE2Q5DC.js} +0 -0
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk4PYBBOIK_cjs = require('../chunk-4PYBBOIK.cjs');
|
|
4
|
+
var chunkNFP4PCTP_cjs = require('../chunk-NFP4PCTP.cjs');
|
|
5
5
|
require('../chunk-WSTWYZFM.cjs');
|
|
6
6
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
7
7
|
require('../chunk-IOR4KOGN.cjs');
|
|
@@ -43,14 +43,14 @@ 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 = chunk4PYBBOIK_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 = chunkNFP4PCTP_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 = chunk4PYBBOIK_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 = chunk4PYBBOIK_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 = chunk4PYBBOIK_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 = chunkNFP4PCTP_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 = chunk4PYBBOIK_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 - chunkNFP4PCTP_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
99
|
+
top: `${marker.y - chunkNFP4PCTP_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
100
|
+
width: `${chunkNFP4PCTP_cjs.COMMENT_MARKER_SIZE}px`,
|
|
101
|
+
height: `${chunkNFP4PCTP_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 = chunkNFP4PCTP_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 = chunkNFP4PCTP_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 = chunkNFP4PCTP_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, chunkNFP4PCTP_cjs.getComputed3dStyle(el));
|
|
221
|
+
if (chunkNFP4PCTP_cjs.isHollowShapeElement(el)) {
|
|
222
222
|
style["pointerEvents"] = "none";
|
|
223
223
|
}
|
|
224
|
-
const geometry =
|
|
224
|
+
const geometry = chunkNFP4PCTP_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 = chunkNFP4PCTP_cjs.buildTextBlockStyle(el, {
|
|
259
259
|
fallbackColor: chunk6KLPQQYP_cjs.DEFAULT_TEXT_COLOR,
|
|
260
260
|
bodyLayout: true,
|
|
261
261
|
pxLengths: true
|
|
262
262
|
});
|
|
263
|
-
const scene3d =
|
|
263
|
+
const scene3d = chunkNFP4PCTP_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 = chunk4PYBBOIK_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 = chunk4PYBBOIK_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
|
...chunkFM4C4MBJ_cjs.deviceStrokeStageStyle(scale),
|
|
373
|
-
...
|
|
373
|
+
...chunkNFP4PCTP_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
374
374
|
});
|
|
375
375
|
if (interactive || options.reading) {
|
|
376
376
|
stage.setAttribute("role", "region");
|
|
@@ -413,22 +413,22 @@ function renderSlideStage(options) {
|
|
|
413
413
|
selectedElementIds: options.selectedElementIds,
|
|
414
414
|
registry,
|
|
415
415
|
renderElement(element, zIndex) {
|
|
416
|
-
if (!
|
|
416
|
+
if (!chunkNFP4PCTP_cjs.isElementRendered(element)) {
|
|
417
417
|
return null;
|
|
418
418
|
}
|
|
419
419
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
420
420
|
if (node) renderedNodes?.push(node);
|
|
421
421
|
if (node && interactive && "setAttribute" in node) {
|
|
422
|
-
const templateLocked =
|
|
422
|
+
const templateLocked = chunkNFP4PCTP_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
423
423
|
if (templateLocked) {
|
|
424
424
|
node.style.pointerEvents = "none";
|
|
425
425
|
}
|
|
426
426
|
node.setAttribute("data-pptx-element", "true");
|
|
427
427
|
}
|
|
428
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
429
|
-
const hitTargetStyle =
|
|
428
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkNFP4PCTP_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
429
|
+
const hitTargetStyle = chunkNFP4PCTP_cjs.elementHitTargetStyle(element);
|
|
430
430
|
if (hitTargetStyle) {
|
|
431
|
-
const hitTarget =
|
|
431
|
+
const hitTarget = chunk4PYBBOIK_cjs.createEl(doc, "div", void 0, hitTargetStyle);
|
|
432
432
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
433
433
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
434
434
|
node.appendChild(hitTarget);
|
|
@@ -446,20 +446,20 @@ function renderSlideStage(options) {
|
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
if (interactive || options.reading) {
|
|
449
|
-
|
|
449
|
+
chunkNFP4PCTP_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
450
450
|
presenting: options.presenting ?? false
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
if (interactive) {
|
|
454
|
-
|
|
454
|
+
chunkNFP4PCTP_cjs.applyElementActionAffordances(
|
|
455
455
|
stage,
|
|
456
456
|
slide.elements.filter(
|
|
457
|
-
(element) => options.templateEditing || !
|
|
457
|
+
(element) => options.templateEditing || !chunkNFP4PCTP_cjs.isTemplateElementId(element.id)
|
|
458
458
|
),
|
|
459
459
|
{
|
|
460
460
|
canInteract: true,
|
|
461
461
|
presenting: options.presenting ?? false,
|
|
462
|
-
labels:
|
|
462
|
+
labels: chunkNFP4PCTP_cjs.actionAffordanceLabels((key) => t(key))
|
|
463
463
|
}
|
|
464
464
|
);
|
|
465
465
|
}
|
|
@@ -526,7 +526,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
526
526
|
// src/pptx/dom/elements/chart-editable.ts
|
|
527
527
|
var CHART_FORMAT_REQUEST_EVENT = "pptx-chart-format-request";
|
|
528
528
|
function attachChartEditing(container, element, context, repaint) {
|
|
529
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
529
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkNFP4PCTP_cjs.canDrillDown(element)) {
|
|
530
530
|
return;
|
|
531
531
|
}
|
|
532
532
|
const chart = element;
|
|
@@ -566,7 +566,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
566
566
|
if (!rect) {
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
|
-
const step2 =
|
|
569
|
+
const step2 = chunkNFP4PCTP_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
570
570
|
if (!step2) {
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
@@ -625,7 +625,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
625
625
|
bubbles: true,
|
|
626
626
|
detail: {
|
|
627
627
|
elementId: element.id,
|
|
628
|
-
target:
|
|
628
|
+
target: chunkNFP4PCTP_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
629
629
|
open
|
|
630
630
|
}
|
|
631
631
|
})
|
|
@@ -668,7 +668,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
668
668
|
seriesIndex: part.seriesIndex,
|
|
669
669
|
pointIndex: part.pointIndex
|
|
670
670
|
});
|
|
671
|
-
const startedMark =
|
|
671
|
+
const startedMark = chunkNFP4PCTP_cjs.beginChartMarkDrag({
|
|
672
672
|
part,
|
|
673
673
|
geometry: markGeometry,
|
|
674
674
|
chartData: chart.chartData,
|
|
@@ -712,17 +712,17 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
712
712
|
// src/pptx/dom/elements/chart.ts
|
|
713
713
|
var renderChartElement = (element, zIndex, context) => {
|
|
714
714
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
715
|
-
const spec = wrapper ?
|
|
715
|
+
const spec = wrapper ? chunkNFP4PCTP_cjs.resolveChartThreeViewSpec(element, chunk4PYBBOIK_cjs.rendering3DFlagsOf(context)) : null;
|
|
716
716
|
if (!wrapper || !spec) {
|
|
717
717
|
return wrapper;
|
|
718
718
|
}
|
|
719
|
-
const view =
|
|
719
|
+
const view = chunk4PYBBOIK_cjs.mountThreeViewInto(context.document, wrapper, {
|
|
720
720
|
spec,
|
|
721
|
-
interactive:
|
|
722
|
-
selectedPart:
|
|
721
|
+
interactive: chunk4PYBBOIK_cjs.isChart3DEditable(element, context),
|
|
722
|
+
selectedPart: chunk4PYBBOIK_cjs.selectedChartPartOf(element, context),
|
|
723
723
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
724
724
|
});
|
|
725
|
-
|
|
725
|
+
chunk4PYBBOIK_cjs.wireChartThreeViewEvents(view, element, context, wrapper);
|
|
726
726
|
return wrapper;
|
|
727
727
|
};
|
|
728
728
|
var renderChartSvgElement = (element, zIndex, context) => {
|
|
@@ -730,16 +730,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
730
730
|
return null;
|
|
731
731
|
}
|
|
732
732
|
const doc = context.document;
|
|
733
|
-
const container =
|
|
733
|
+
const container = chunk4PYBBOIK_cjs.createEl(
|
|
734
734
|
doc,
|
|
735
735
|
"div",
|
|
736
736
|
"pptxv-element pptxv-chart",
|
|
737
737
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
738
|
-
{ ...
|
|
738
|
+
{ ...chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex), ...chunkNFP4PCTP_cjs.getFrameEffectStyle(element) }
|
|
739
739
|
);
|
|
740
740
|
container.dataset.elementId = element.id;
|
|
741
741
|
const animationState = context.presentationStates?.get(element.id);
|
|
742
|
-
const chartData = element.chartData ?
|
|
742
|
+
const chartData = element.chartData ? chunkNFP4PCTP_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
743
743
|
if (!chartData || chartData.series.length === 0) {
|
|
744
744
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
745
745
|
return container;
|
|
@@ -774,7 +774,7 @@ function resolveChartPalette2(chartData) {
|
|
|
774
774
|
return chunk6KLPQQYP_cjs.resolveChartPalette(chartData);
|
|
775
775
|
}
|
|
776
776
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
777
|
-
const placeholder =
|
|
777
|
+
const placeholder = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
778
778
|
display: "flex",
|
|
779
779
|
alignItems: "center",
|
|
780
780
|
justifyContent: "center",
|
|
@@ -786,7 +786,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
786
786
|
border: "1px dashed #cbd5e1",
|
|
787
787
|
boxSizing: "border-box"
|
|
788
788
|
});
|
|
789
|
-
placeholder.textContent =
|
|
789
|
+
placeholder.textContent = chunkNFP4PCTP_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
790
790
|
return placeholder;
|
|
791
791
|
}
|
|
792
792
|
|
|
@@ -805,19 +805,19 @@ function appendRunContent(doc, host, run) {
|
|
|
805
805
|
}
|
|
806
806
|
function appendTabLines(doc, host, lines) {
|
|
807
807
|
lines.forEach((line, li) => {
|
|
808
|
-
const lineHost =
|
|
808
|
+
const lineHost = chunk4PYBBOIK_cjs.createEl(doc, "span", void 0, {
|
|
809
809
|
display: "inline-block",
|
|
810
810
|
whiteSpace: "nowrap"
|
|
811
811
|
});
|
|
812
812
|
for (const piece of line.pieces) {
|
|
813
813
|
if (piece.leaderStyle) {
|
|
814
|
-
const leader =
|
|
814
|
+
const leader = chunk4PYBBOIK_cjs.createEl(doc, "span", void 0, piece.leaderStyle);
|
|
815
815
|
leader.setAttribute("aria-hidden", "true");
|
|
816
816
|
leader.textContent = piece.leaderText ?? "";
|
|
817
817
|
lineHost.appendChild(leader);
|
|
818
818
|
}
|
|
819
819
|
for (const word of piece.words ?? [piece]) {
|
|
820
|
-
const textSpan =
|
|
820
|
+
const textSpan = chunk4PYBBOIK_cjs.createEl(doc, "span", void 0, word.style);
|
|
821
821
|
textSpan.textContent = word.text;
|
|
822
822
|
lineHost.appendChild(textSpan);
|
|
823
823
|
}
|
|
@@ -831,7 +831,7 @@ function appendTabLines(doc, host, lines) {
|
|
|
831
831
|
function appendStyledPieces(doc, host, pieces) {
|
|
832
832
|
for (const piece of pieces) {
|
|
833
833
|
if (piece.style) {
|
|
834
|
-
const span =
|
|
834
|
+
const span = chunk4PYBBOIK_cjs.createEl(doc, "span", void 0, piece.style);
|
|
835
835
|
span.textContent = piece.text;
|
|
836
836
|
host.appendChild(span);
|
|
837
837
|
} else {
|
|
@@ -844,16 +844,16 @@ function appendStyledPieces(doc, host, pieces) {
|
|
|
844
844
|
var NEWLINE_RUN = "\n";
|
|
845
845
|
function createRunBaseNode(doc, run) {
|
|
846
846
|
if (run.equation) {
|
|
847
|
-
const host =
|
|
848
|
-
const math =
|
|
847
|
+
const host = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-inline-equation", run.style);
|
|
848
|
+
const math = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-equation-math", {
|
|
849
849
|
display: "inline-block",
|
|
850
850
|
verticalAlign: "middle",
|
|
851
851
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
852
852
|
});
|
|
853
|
-
math.innerHTML =
|
|
853
|
+
math.innerHTML = chunkNFP4PCTP_cjs.runEquationMathMl(run.equation);
|
|
854
854
|
host.appendChild(math);
|
|
855
855
|
if (run.equation.number) {
|
|
856
|
-
const number =
|
|
856
|
+
const number = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-equation-number", {
|
|
857
857
|
whiteSpace: "nowrap",
|
|
858
858
|
marginInlineStart: "0.5em"
|
|
859
859
|
});
|
|
@@ -862,8 +862,8 @@ function createRunBaseNode(doc, run) {
|
|
|
862
862
|
}
|
|
863
863
|
return host;
|
|
864
864
|
}
|
|
865
|
-
if (run.hyperlink &&
|
|
866
|
-
const link =
|
|
865
|
+
if (run.hyperlink && chunkNFP4PCTP_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
866
|
+
const link = chunk4PYBBOIK_cjs.createEl(doc, "a", "pptxv-link", run.style);
|
|
867
867
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
868
868
|
link.setAttribute("role", "link");
|
|
869
869
|
link.tabIndex = 0;
|
|
@@ -879,13 +879,13 @@ function createRunBaseNode(doc, run) {
|
|
|
879
879
|
}
|
|
880
880
|
if (run.ruby) {
|
|
881
881
|
const ruby = doc.createElement("ruby");
|
|
882
|
-
|
|
882
|
+
chunk4PYBBOIK_cjs.applyStyleMap(ruby, run.style);
|
|
883
883
|
appendRunContent(doc, ruby, run);
|
|
884
884
|
const openParen = doc.createElement("rp");
|
|
885
885
|
openParen.textContent = "(";
|
|
886
886
|
ruby.appendChild(openParen);
|
|
887
887
|
const annotation = doc.createElement("rt");
|
|
888
|
-
|
|
888
|
+
chunk4PYBBOIK_cjs.applyStyleMap(annotation, run.ruby.style);
|
|
889
889
|
annotation.textContent = run.ruby.text;
|
|
890
890
|
ruby.appendChild(annotation);
|
|
891
891
|
const closeParen = doc.createElement("rp");
|
|
@@ -893,8 +893,8 @@ function createRunBaseNode(doc, run) {
|
|
|
893
893
|
ruby.appendChild(closeParen);
|
|
894
894
|
return ruby;
|
|
895
895
|
}
|
|
896
|
-
const span =
|
|
897
|
-
|
|
896
|
+
const span = chunk4PYBBOIK_cjs.createEl(doc, "span");
|
|
897
|
+
chunk4PYBBOIK_cjs.applyStyleMap(span, run.style);
|
|
898
898
|
appendRunContent(doc, span, run);
|
|
899
899
|
return span;
|
|
900
900
|
}
|
|
@@ -903,22 +903,22 @@ function createRunNode(doc, run) {
|
|
|
903
903
|
if (!run.reflection) {
|
|
904
904
|
return base;
|
|
905
905
|
}
|
|
906
|
-
const wrapper =
|
|
906
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(doc, "span", void 0, {
|
|
907
907
|
position: "relative",
|
|
908
908
|
display: "inline-block"
|
|
909
909
|
});
|
|
910
910
|
wrapper.appendChild(base);
|
|
911
|
-
const mirror =
|
|
911
|
+
const mirror = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-text-reflection", { ...run.reflection });
|
|
912
912
|
mirror.setAttribute("aria-hidden", "true");
|
|
913
|
-
const mirrorInner =
|
|
914
|
-
|
|
913
|
+
const mirrorInner = chunk4PYBBOIK_cjs.createEl(doc, "span");
|
|
914
|
+
chunk4PYBBOIK_cjs.applyStyleMap(mirrorInner, run.style);
|
|
915
915
|
appendRunContent(doc, mirrorInner, run);
|
|
916
916
|
mirror.appendChild(mirrorInner);
|
|
917
917
|
wrapper.appendChild(mirror);
|
|
918
918
|
return wrapper;
|
|
919
919
|
}
|
|
920
920
|
function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
921
|
-
const block =
|
|
921
|
+
const block = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-text", textStyle);
|
|
922
922
|
for (const para of paragraphs) {
|
|
923
923
|
const paraStyle = {
|
|
924
924
|
// This paragraph's own `text-align` / BiDi `direction` / kinsoku rules,
|
|
@@ -940,13 +940,13 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
940
940
|
if (para.strutFontSizePx !== void 0) {
|
|
941
941
|
paraStyle.fontSize = `${para.strutFontSizePx}px`;
|
|
942
942
|
}
|
|
943
|
-
const p =
|
|
943
|
+
const p = chunk4PYBBOIK_cjs.createEl(doc, "p", "pptxv-para", paraStyle);
|
|
944
944
|
if (para.textIndentPx !== void 0) {
|
|
945
945
|
p.style.textIndent = `${para.textIndentPx}px`;
|
|
946
946
|
}
|
|
947
947
|
const picture = para.bulletPicture;
|
|
948
948
|
if (picture?.src) {
|
|
949
|
-
const image =
|
|
949
|
+
const image = chunk4PYBBOIK_cjs.createEl(doc, "img", "pptxv-bullet-image", {
|
|
950
950
|
width: `${picture.sizePx}px`,
|
|
951
951
|
height: `${picture.sizePx}px`,
|
|
952
952
|
display: "inline-block",
|
|
@@ -959,15 +959,15 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
959
959
|
image.setAttribute("draggable", "false");
|
|
960
960
|
p.appendChild(image);
|
|
961
961
|
} else if (para.bulletMarker !== void 0) {
|
|
962
|
-
const bullet =
|
|
963
|
-
|
|
962
|
+
const bullet = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-bullet");
|
|
963
|
+
chunk4PYBBOIK_cjs.applyStyleMap(bullet, para.bulletStyle);
|
|
964
964
|
if (para.bulletPicture) {
|
|
965
965
|
bullet.setAttribute("aria-label", para.bulletPicture.accessibleLabel);
|
|
966
966
|
}
|
|
967
967
|
bullet.textContent = para.bulletMarker;
|
|
968
968
|
p.appendChild(bullet);
|
|
969
969
|
}
|
|
970
|
-
const spec = build ?
|
|
970
|
+
const spec = build ? chunkNFP4PCTP_cjs.buildTextBuildSpec(
|
|
971
971
|
build.elementId,
|
|
972
972
|
paragraphs.indexOf(para),
|
|
973
973
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -975,8 +975,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
975
975
|
) : void 0;
|
|
976
976
|
if (spec && spec.granularity !== "paragraph") {
|
|
977
977
|
for (const span of spec.spans ?? []) {
|
|
978
|
-
const node =
|
|
979
|
-
|
|
978
|
+
const node = chunk4PYBBOIK_cjs.createEl(doc, "span");
|
|
979
|
+
chunk4PYBBOIK_cjs.applyStyleMap(node, { ...span.style ?? {}, ...chunkNFP4PCTP_cjs.textBuildSpanStyle(span) });
|
|
980
980
|
if (span.animId) {
|
|
981
981
|
node.setAttribute("data-anim-id", span.animId);
|
|
982
982
|
}
|
|
@@ -988,8 +988,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
988
988
|
}
|
|
989
989
|
let runHost = p;
|
|
990
990
|
if (spec) {
|
|
991
|
-
const wrapper =
|
|
992
|
-
|
|
991
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(doc, "span");
|
|
992
|
+
chunk4PYBBOIK_cjs.applyStyleMap(wrapper, chunkNFP4PCTP_cjs.textBuildSpanStyle(spec));
|
|
993
993
|
if (spec.animId) {
|
|
994
994
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
995
995
|
}
|
|
@@ -1021,7 +1021,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1021
1021
|
const dashArray = chunk6KLPQQYP_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
1022
1022
|
const w = Math.max(element.width, 1);
|
|
1023
1023
|
const h = Math.max(element.height, 1);
|
|
1024
|
-
const wrapper =
|
|
1024
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
1025
1025
|
position: "absolute",
|
|
1026
1026
|
left: `${element.x}px`,
|
|
1027
1027
|
top: `${element.y}px`,
|
|
@@ -1045,18 +1045,18 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1045
1045
|
if (element.hidden) {
|
|
1046
1046
|
wrapper.style.display = "none";
|
|
1047
1047
|
}
|
|
1048
|
-
const lineGlow =
|
|
1048
|
+
const lineGlow = chunkNFP4PCTP_cjs.getLineGlowFilterCss(ss);
|
|
1049
1049
|
if (lineGlow) {
|
|
1050
1050
|
wrapper.style.filter = lineGlow;
|
|
1051
1051
|
}
|
|
1052
|
-
const svg =
|
|
1052
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}` });
|
|
1053
1053
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1054
1054
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1055
|
-
const defs =
|
|
1056
|
-
const lineShadow =
|
|
1055
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(doc, "defs");
|
|
1056
|
+
const lineShadow = chunkNFP4PCTP_cjs.getLineShadowParams(ss);
|
|
1057
1057
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1058
1058
|
if (lineShadow && shadowId) {
|
|
1059
|
-
const filter =
|
|
1059
|
+
const filter = chunk4PYBBOIK_cjs.createSvgEl(doc, "filter", {
|
|
1060
1060
|
id: shadowId,
|
|
1061
1061
|
x: "-50%",
|
|
1062
1062
|
y: "-50%",
|
|
@@ -1064,7 +1064,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1064
1064
|
height: "200%"
|
|
1065
1065
|
});
|
|
1066
1066
|
filter.appendChild(
|
|
1067
|
-
|
|
1067
|
+
chunk4PYBBOIK_cjs.createSvgEl(doc, "feDropShadow", {
|
|
1068
1068
|
dx: lineShadow.offsetX,
|
|
1069
1069
|
dy: lineShadow.offsetY,
|
|
1070
1070
|
stdDeviation: lineShadow.blur / 2,
|
|
@@ -1074,8 +1074,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1074
1074
|
);
|
|
1075
1075
|
defs.appendChild(filter);
|
|
1076
1076
|
}
|
|
1077
|
-
const startArrow =
|
|
1078
|
-
const endArrow =
|
|
1077
|
+
const startArrow = chunkNFP4PCTP_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1078
|
+
const endArrow = chunkNFP4PCTP_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1079
1079
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1080
1080
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1081
1081
|
if (startArrow && startMarkerId) {
|
|
@@ -1098,21 +1098,21 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1098
1098
|
svg.appendChild(defs);
|
|
1099
1099
|
}
|
|
1100
1100
|
const compound = ss?.compoundLine;
|
|
1101
|
-
const offsets =
|
|
1102
|
-
const widths =
|
|
1101
|
+
const offsets = chunkNFP4PCTP_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1102
|
+
const widths = chunkNFP4PCTP_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1103
1103
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1104
|
-
const usePath =
|
|
1104
|
+
const usePath = chunkNFP4PCTP_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1105
1105
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1106
1106
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1107
1107
|
const y1 = element.flipVertical ? h : 0;
|
|
1108
1108
|
const x2 = element.flipHorizontal ? 0 : w;
|
|
1109
1109
|
const y2 = element.flipVertical ? 0 : h;
|
|
1110
|
-
const hit =
|
|
1110
|
+
const hit = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
1111
1111
|
class: "pptxv-connector-hit",
|
|
1112
1112
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1113
1113
|
fill: "none",
|
|
1114
1114
|
stroke: "transparent",
|
|
1115
|
-
"stroke-width":
|
|
1115
|
+
"stroke-width": chunkNFP4PCTP_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1116
1116
|
"stroke-linecap": "round",
|
|
1117
1117
|
"stroke-linejoin": "round"
|
|
1118
1118
|
});
|
|
@@ -1133,7 +1133,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
let node;
|
|
1135
1135
|
if (pathData !== void 0) {
|
|
1136
|
-
node =
|
|
1136
|
+
node = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
1137
1137
|
d: pathData,
|
|
1138
1138
|
fill: "none",
|
|
1139
1139
|
"stroke-linejoin": "round",
|
|
@@ -1143,7 +1143,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1143
1143
|
node.style.transform = `translate(0, ${offset}px)`;
|
|
1144
1144
|
}
|
|
1145
1145
|
} else {
|
|
1146
|
-
node =
|
|
1146
|
+
node = chunk4PYBBOIK_cjs.createSvgEl(doc, "line", {
|
|
1147
1147
|
x1,
|
|
1148
1148
|
y1: y1 + offset,
|
|
1149
1149
|
x2,
|
|
@@ -1162,7 +1162,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1162
1162
|
if (!pptx.hasTextProperties(element)) {
|
|
1163
1163
|
return;
|
|
1164
1164
|
}
|
|
1165
|
-
const paragraphs =
|
|
1165
|
+
const paragraphs = chunkNFP4PCTP_cjs.buildParagraphs(element, context.fieldContext);
|
|
1166
1166
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1167
1167
|
return;
|
|
1168
1168
|
}
|
|
@@ -1182,8 +1182,8 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1184
1184
|
const doc = context.document;
|
|
1185
|
-
const shape =
|
|
1186
|
-
const marker =
|
|
1185
|
+
const shape = chunkNFP4PCTP_cjs.markerPath(arrow, size.width, size.length);
|
|
1186
|
+
const marker = chunk4PYBBOIK_cjs.createSvgEl(doc, "marker", {
|
|
1187
1187
|
id,
|
|
1188
1188
|
viewBox: "0 0 10 10",
|
|
1189
1189
|
refX: shape.refX,
|
|
@@ -1195,11 +1195,11 @@ function buildMarker(context, id, arrow, strokeColor, size) {
|
|
|
1195
1195
|
preserveAspectRatio: "none"
|
|
1196
1196
|
});
|
|
1197
1197
|
if (shape.shape === "circle") {
|
|
1198
|
-
marker.appendChild(
|
|
1198
|
+
marker.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "circle", { cx: 5, cy: 5, r: 4, fill: strokeColor }));
|
|
1199
1199
|
} else if (shape.strokeOnly) {
|
|
1200
|
-
marker.appendChild(
|
|
1200
|
+
marker.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "path", { d: shape.d, fill: "none", stroke: strokeColor }));
|
|
1201
1201
|
} else {
|
|
1202
|
-
marker.appendChild(
|
|
1202
|
+
marker.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "path", { d: shape.d, fill: strokeColor }));
|
|
1203
1203
|
}
|
|
1204
1204
|
return marker;
|
|
1205
1205
|
}
|
|
@@ -1207,13 +1207,13 @@ function buildMarker(context, id, arrow, strokeColor, size) {
|
|
|
1207
1207
|
// src/pptx/dom/elements/ink-stroke-svg.ts
|
|
1208
1208
|
function buildStrokeSvg(doc, view, replay) {
|
|
1209
1209
|
if (view.nibMarks) {
|
|
1210
|
-
const g =
|
|
1210
|
+
const g = chunk4PYBBOIK_cjs.createSvgEl(doc, "g", {
|
|
1211
1211
|
opacity: view.opacity,
|
|
1212
1212
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1213
1213
|
});
|
|
1214
1214
|
for (const m of view.nibMarks) {
|
|
1215
1215
|
g.appendChild(
|
|
1216
|
-
|
|
1216
|
+
chunk4PYBBOIK_cjs.createSvgEl(doc, "ellipse", {
|
|
1217
1217
|
cx: m.cx,
|
|
1218
1218
|
cy: m.cy,
|
|
1219
1219
|
rx: m.rPerp,
|
|
@@ -1226,16 +1226,16 @@ function buildStrokeSvg(doc, view, replay) {
|
|
|
1226
1226
|
return g;
|
|
1227
1227
|
}
|
|
1228
1228
|
if (view.circles) {
|
|
1229
|
-
const g =
|
|
1229
|
+
const g = chunk4PYBBOIK_cjs.createSvgEl(doc, "g", {
|
|
1230
1230
|
opacity: view.opacity,
|
|
1231
1231
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1232
1232
|
});
|
|
1233
1233
|
for (const c of view.circles) {
|
|
1234
|
-
g.appendChild(
|
|
1234
|
+
g.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "circle", { cx: c.cx, cy: c.cy, r: c.r, fill: view.color }));
|
|
1235
1235
|
}
|
|
1236
1236
|
return g;
|
|
1237
1237
|
}
|
|
1238
|
-
const path =
|
|
1238
|
+
const path = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
1239
1239
|
d: view.d,
|
|
1240
1240
|
fill: "none",
|
|
1241
1241
|
stroke: view.color,
|
|
@@ -1263,24 +1263,24 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1263
1263
|
return null;
|
|
1264
1264
|
}
|
|
1265
1265
|
const doc = context.document;
|
|
1266
|
-
const el =
|
|
1266
|
+
const el = chunk4PYBBOIK_cjs.createEl(
|
|
1267
1267
|
doc,
|
|
1268
1268
|
"div",
|
|
1269
1269
|
"pptxv-element pptxv-contentpart",
|
|
1270
|
-
|
|
1270
|
+
chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex)
|
|
1271
1271
|
);
|
|
1272
1272
|
el.dataset.elementId = element.id;
|
|
1273
1273
|
const strokes = element.inkStrokes;
|
|
1274
1274
|
if (!strokes || strokes.length === 0) {
|
|
1275
1275
|
el.classList.add("pptxv-placeholder");
|
|
1276
|
-
const label =
|
|
1276
|
+
const label = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
1277
1277
|
label.textContent = context.t("pptx.ink.contentPartFallback");
|
|
1278
1278
|
el.appendChild(label);
|
|
1279
1279
|
return el;
|
|
1280
1280
|
}
|
|
1281
1281
|
const w = Math.max(element.width, 1);
|
|
1282
1282
|
const h = Math.max(element.height, 1);
|
|
1283
|
-
const svg =
|
|
1283
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1284
1284
|
viewBox: `0 0 ${w} ${h}`,
|
|
1285
1285
|
preserveAspectRatio: "none"
|
|
1286
1286
|
});
|
|
@@ -1288,7 +1288,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1288
1288
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1289
1289
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getContentPartReplayStyles(strokes) : [];
|
|
1290
1290
|
if (context.presenting) {
|
|
1291
|
-
const keyframes =
|
|
1291
|
+
const keyframes = chunk4PYBBOIK_cjs.createSvgEl(doc, "style");
|
|
1292
1292
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1293
1293
|
svg.appendChild(keyframes);
|
|
1294
1294
|
}
|
|
@@ -1300,38 +1300,38 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1300
1300
|
return el;
|
|
1301
1301
|
};
|
|
1302
1302
|
function renderEquations(element, context) {
|
|
1303
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1303
|
+
if (!pptx.hasTextProperties(element) || !chunkNFP4PCTP_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1304
1304
|
return null;
|
|
1305
1305
|
}
|
|
1306
1306
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
1307
1307
|
if (equations.length === 0) {
|
|
1308
1308
|
return null;
|
|
1309
1309
|
}
|
|
1310
|
-
const wrapper =
|
|
1310
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-equations", {
|
|
1311
1311
|
...getTextBlockStyle(element),
|
|
1312
1312
|
alignItems: "center",
|
|
1313
1313
|
gap: "0.25em",
|
|
1314
1314
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1315
1315
|
});
|
|
1316
1316
|
for (const segment of equations) {
|
|
1317
|
-
const mathml =
|
|
1317
|
+
const mathml = chunkNFP4PCTP_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1318
1318
|
if (!mathml) {
|
|
1319
1319
|
continue;
|
|
1320
1320
|
}
|
|
1321
|
-
const row =
|
|
1321
|
+
const row = chunk4PYBBOIK_cjs.createEl(context.document, "span", "pptxv-equation", {
|
|
1322
1322
|
display: "flex",
|
|
1323
1323
|
alignItems: "center",
|
|
1324
1324
|
justifyContent: "center",
|
|
1325
1325
|
width: "100%"
|
|
1326
1326
|
});
|
|
1327
|
-
const math =
|
|
1327
|
+
const math = chunk4PYBBOIK_cjs.createEl(context.document, "span", "pptxv-equation-math", {
|
|
1328
1328
|
flex: 1,
|
|
1329
1329
|
textAlign: "center"
|
|
1330
1330
|
});
|
|
1331
|
-
math.innerHTML =
|
|
1331
|
+
math.innerHTML = chunkNFP4PCTP_cjs.sanitizeMathMl(mathml);
|
|
1332
1332
|
row.appendChild(math);
|
|
1333
1333
|
if (segment.equationNumber) {
|
|
1334
|
-
const number =
|
|
1334
|
+
const number = chunk4PYBBOIK_cjs.createEl(context.document, "span", "pptxv-equation-number", {
|
|
1335
1335
|
whiteSpace: "nowrap"
|
|
1336
1336
|
});
|
|
1337
1337
|
number.textContent = `(${segment.equationNumber})`;
|
|
@@ -1346,7 +1346,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1346
1346
|
return null;
|
|
1347
1347
|
}
|
|
1348
1348
|
const fill = chunk6KLPQQYP_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1349
|
-
const data =
|
|
1349
|
+
const data = chunkNFP4PCTP_cjs.build3DExtrusionData(
|
|
1350
1350
|
element.shapeStyle?.shape3d,
|
|
1351
1351
|
element.shapeStyle?.scene3d,
|
|
1352
1352
|
fill,
|
|
@@ -1356,11 +1356,11 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1356
1356
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
1357
1357
|
return null;
|
|
1358
1358
|
}
|
|
1359
|
-
const wrapper =
|
|
1359
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-extrusion-3d", toCss(data.wrapperStyle));
|
|
1360
1360
|
wrapper.setAttribute("aria-hidden", "true");
|
|
1361
1361
|
for (const panel of data.panels) {
|
|
1362
1362
|
wrapper.appendChild(
|
|
1363
|
-
|
|
1363
|
+
chunk4PYBBOIK_cjs.createEl(
|
|
1364
1364
|
doc,
|
|
1365
1365
|
"div",
|
|
1366
1366
|
`pptxv-extrusion-3d-panel pptxv-extrusion-3d-panel--${panel.side}`,
|
|
@@ -1370,7 +1370,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
if (data.materialOverlay) {
|
|
1372
1372
|
wrapper.appendChild(
|
|
1373
|
-
|
|
1373
|
+
chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-extrusion-3d-material", {
|
|
1374
1374
|
position: "absolute",
|
|
1375
1375
|
inset: 0,
|
|
1376
1376
|
backgroundImage: data.materialOverlay,
|
|
@@ -1408,18 +1408,18 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1408
1408
|
if (suppressOwnReflection) {
|
|
1409
1409
|
return;
|
|
1410
1410
|
}
|
|
1411
|
-
const wrapperStyle =
|
|
1411
|
+
const wrapperStyle = chunkNFP4PCTP_cjs.getComputedEffectStyle(element).reflection;
|
|
1412
1412
|
if (!wrapperStyle) {
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
|
-
const layer =
|
|
1415
|
+
const layer = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1416
1416
|
layer.setAttribute("aria-hidden", "true");
|
|
1417
1417
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1418
1418
|
host.appendChild(layer);
|
|
1419
1419
|
}
|
|
1420
1420
|
function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFill, suppressOwnReflection = false) {
|
|
1421
1421
|
if (element.type === "group") {
|
|
1422
|
-
const wrap =
|
|
1422
|
+
const wrap = chunk4PYBBOIK_cjs.createEl(doc, "div", void 0, {
|
|
1423
1423
|
position: "relative",
|
|
1424
1424
|
width: "100%",
|
|
1425
1425
|
height: "100%",
|
|
@@ -1432,9 +1432,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1432
1432
|
if (groupFilterDefs) {
|
|
1433
1433
|
wrap.appendChild(groupFilterDefs);
|
|
1434
1434
|
}
|
|
1435
|
-
const childParentFill =
|
|
1435
|
+
const childParentFill = chunkNFP4PCTP_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1436
1436
|
for (const child of element.children ?? []) {
|
|
1437
|
-
const childWrap =
|
|
1437
|
+
const childWrap = chunk4PYBBOIK_cjs.createEl(doc, "div", void 0, chunkNFP4PCTP_cjs.getContainerStyle(child, 0));
|
|
1438
1438
|
childWrap.appendChild(
|
|
1439
1439
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1440
1440
|
);
|
|
@@ -1443,12 +1443,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1443
1443
|
appendOwnReflection(doc, wrap, element, mediaDataUrls, suppressOwnReflection);
|
|
1444
1444
|
return wrap;
|
|
1445
1445
|
}
|
|
1446
|
-
const box =
|
|
1446
|
+
const box = chunk4PYBBOIK_cjs.createEl(doc, "div", void 0, {
|
|
1447
1447
|
width: "100%",
|
|
1448
1448
|
height: "100%",
|
|
1449
1449
|
...getShapeFillStrokeStyle(element)
|
|
1450
1450
|
});
|
|
1451
|
-
const inheritedFill =
|
|
1451
|
+
const inheritedFill = chunkNFP4PCTP_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1452
1452
|
if (inheritedFill) {
|
|
1453
1453
|
applyInheritedFill(box, inheritedFill);
|
|
1454
1454
|
}
|
|
@@ -1469,12 +1469,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1469
1469
|
box.appendChild(gradientOutline);
|
|
1470
1470
|
}
|
|
1471
1471
|
if (pptx.isImageLikeElement(element)) {
|
|
1472
|
-
const src =
|
|
1472
|
+
const src = chunkNFP4PCTP_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1473
1473
|
if (src) {
|
|
1474
|
-
const img =
|
|
1474
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", void 0, {
|
|
1475
1475
|
width: "100%",
|
|
1476
1476
|
height: "100%",
|
|
1477
|
-
...
|
|
1477
|
+
...chunkNFP4PCTP_cjs.getImageFitStyle(element)
|
|
1478
1478
|
});
|
|
1479
1479
|
img.setAttribute("src", src);
|
|
1480
1480
|
img.setAttribute("alt", "");
|
|
@@ -1484,7 +1484,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1484
1484
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1485
1485
|
return box;
|
|
1486
1486
|
}
|
|
1487
|
-
const paragraphs =
|
|
1487
|
+
const paragraphs = chunkNFP4PCTP_cjs.buildParagraphs(element);
|
|
1488
1488
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1489
1489
|
if (hasText) {
|
|
1490
1490
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1496,29 +1496,29 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1496
1496
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1497
1497
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1498
1498
|
function renderShapeFilterDefs(doc, element) {
|
|
1499
|
-
const style =
|
|
1499
|
+
const style = chunkNFP4PCTP_cjs.getEffectStyleSource(element);
|
|
1500
1500
|
if (!style) {
|
|
1501
1501
|
return null;
|
|
1502
1502
|
}
|
|
1503
1503
|
const markups = [];
|
|
1504
|
-
const duotone =
|
|
1504
|
+
const duotone = chunkNFP4PCTP_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1505
1505
|
if (duotone) {
|
|
1506
1506
|
markups.push(duotone.filterMarkup);
|
|
1507
1507
|
}
|
|
1508
|
-
const softEdge =
|
|
1508
|
+
const softEdge = chunkNFP4PCTP_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1509
1509
|
if (softEdge) {
|
|
1510
1510
|
markups.push(softEdge.filterMarkup);
|
|
1511
1511
|
}
|
|
1512
|
-
const bevelLighting =
|
|
1512
|
+
const bevelLighting = chunkNFP4PCTP_cjs.getBevelLightingSvgFilter(element);
|
|
1513
1513
|
if (bevelLighting) {
|
|
1514
1514
|
markups.push(bevelLighting.filterMarkup);
|
|
1515
1515
|
}
|
|
1516
1516
|
if (markups.length === 0) {
|
|
1517
1517
|
return null;
|
|
1518
1518
|
}
|
|
1519
|
-
const svg =
|
|
1519
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1520
1520
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1521
|
-
const defs =
|
|
1521
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(doc, "defs");
|
|
1522
1522
|
defs.innerHTML = markups.join("");
|
|
1523
1523
|
svg.appendChild(defs);
|
|
1524
1524
|
return svg;
|
|
@@ -1527,11 +1527,11 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1527
1527
|
if (!pptx.hasShapeProperties(element)) {
|
|
1528
1528
|
return null;
|
|
1529
1529
|
}
|
|
1530
|
-
const overlay =
|
|
1530
|
+
const overlay = chunkNFP4PCTP_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1531
1531
|
if (!overlay) {
|
|
1532
1532
|
return null;
|
|
1533
1533
|
}
|
|
1534
|
-
const layer =
|
|
1534
|
+
const layer = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-fill-overlay", {
|
|
1535
1535
|
position: "absolute",
|
|
1536
1536
|
inset: 0,
|
|
1537
1537
|
background: overlay.color,
|
|
@@ -1542,27 +1542,27 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1542
1542
|
return layer;
|
|
1543
1543
|
}
|
|
1544
1544
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1545
|
-
const wrapperStyle =
|
|
1545
|
+
const wrapperStyle = chunkNFP4PCTP_cjs.getComputedEffectStyle(element).reflection;
|
|
1546
1546
|
if (!wrapperStyle) {
|
|
1547
1547
|
return null;
|
|
1548
1548
|
}
|
|
1549
|
-
const layer =
|
|
1549
|
+
const layer = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1550
1550
|
layer.setAttribute("aria-hidden", "true");
|
|
1551
1551
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1552
1552
|
return layer;
|
|
1553
1553
|
}
|
|
1554
1554
|
function renderHollowHitOutline(doc, element) {
|
|
1555
|
-
const hit =
|
|
1555
|
+
const hit = chunkNFP4PCTP_cjs.buildHollowHitOutline(element);
|
|
1556
1556
|
if (!hit) {
|
|
1557
1557
|
return null;
|
|
1558
1558
|
}
|
|
1559
|
-
const svg =
|
|
1559
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1560
1560
|
"aria-hidden": "true",
|
|
1561
|
-
viewBox:
|
|
1561
|
+
viewBox: chunkNFP4PCTP_cjs.strokeOutlineViewBox(element),
|
|
1562
1562
|
preserveAspectRatio: "none"
|
|
1563
1563
|
});
|
|
1564
1564
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1565
|
-
const path =
|
|
1565
|
+
const path = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
1566
1566
|
d: hit.d,
|
|
1567
1567
|
fill: "none",
|
|
1568
1568
|
stroke: "transparent",
|
|
@@ -1577,7 +1577,7 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1577
1577
|
if (!overlay) {
|
|
1578
1578
|
return null;
|
|
1579
1579
|
}
|
|
1580
|
-
const svg =
|
|
1580
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1581
1581
|
class: "pptx-vanilla-subpath-fill",
|
|
1582
1582
|
"aria-hidden": "true",
|
|
1583
1583
|
viewBox: `0 0 ${overlay.viewBoxWidth} ${overlay.viewBoxHeight}`,
|
|
@@ -1585,33 +1585,33 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1585
1585
|
});
|
|
1586
1586
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%");
|
|
1587
1587
|
for (const paint of overlay.paints) {
|
|
1588
|
-
const path =
|
|
1588
|
+
const path = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", { d: paint.d, fill: paint.fill, stroke: "none" });
|
|
1589
1589
|
svg.appendChild(path);
|
|
1590
1590
|
}
|
|
1591
1591
|
return svg;
|
|
1592
1592
|
}
|
|
1593
1593
|
function renderStrokeOutline(doc, element) {
|
|
1594
|
-
const outline =
|
|
1594
|
+
const outline = chunkNFP4PCTP_cjs.buildStrokeOutline(element);
|
|
1595
1595
|
if (!outline) {
|
|
1596
1596
|
return null;
|
|
1597
1597
|
}
|
|
1598
|
-
const svg =
|
|
1598
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1599
1599
|
class: "pptx-vanilla-gradient-outline",
|
|
1600
1600
|
"aria-hidden": "true",
|
|
1601
|
-
viewBox:
|
|
1601
|
+
viewBox: chunkNFP4PCTP_cjs.strokeOutlineViewBox(element),
|
|
1602
1602
|
preserveAspectRatio: "none"
|
|
1603
1603
|
});
|
|
1604
1604
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1605
1605
|
if (outline.paint) {
|
|
1606
|
-
const defs =
|
|
1607
|
-
if (
|
|
1608
|
-
const pattern =
|
|
1606
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(doc, "defs");
|
|
1607
|
+
if (chunkNFP4PCTP_cjs.isPatternPaint(outline.paint)) {
|
|
1608
|
+
const pattern = chunk4PYBBOIK_cjs.createSvgEl(doc, "pattern", {
|
|
1609
1609
|
id: outline.paint.id,
|
|
1610
1610
|
width: outline.paint.width,
|
|
1611
1611
|
height: outline.paint.height,
|
|
1612
1612
|
patternUnits: "userSpaceOnUse"
|
|
1613
1613
|
});
|
|
1614
|
-
const image =
|
|
1614
|
+
const image = chunk4PYBBOIK_cjs.createSvgEl(doc, "image", {
|
|
1615
1615
|
href: outline.paint.href,
|
|
1616
1616
|
width: outline.paint.width,
|
|
1617
1617
|
height: outline.paint.height
|
|
@@ -1619,13 +1619,13 @@ function renderStrokeOutline(doc, element) {
|
|
|
1619
1619
|
pattern.appendChild(image);
|
|
1620
1620
|
defs.appendChild(pattern);
|
|
1621
1621
|
} else {
|
|
1622
|
-
defs.innerHTML =
|
|
1622
|
+
defs.innerHTML = chunkNFP4PCTP_cjs.svgGradientMarkup(outline.paint);
|
|
1623
1623
|
}
|
|
1624
1624
|
svg.appendChild(defs);
|
|
1625
1625
|
}
|
|
1626
1626
|
for (const strand of outline.strands) {
|
|
1627
|
-
const path =
|
|
1628
|
-
d: outline.d,
|
|
1627
|
+
const path = chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
1628
|
+
d: strand.d ?? outline.d,
|
|
1629
1629
|
fill: "none",
|
|
1630
1630
|
stroke: outline.stroke,
|
|
1631
1631
|
"stroke-width": strand.strokeWidth,
|
|
@@ -1642,7 +1642,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1642
1642
|
svg.appendChild(path);
|
|
1643
1643
|
}
|
|
1644
1644
|
if (outline.markers) {
|
|
1645
|
-
const defs =
|
|
1645
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(doc, "defs");
|
|
1646
1646
|
defs.innerHTML = outline.markers.markup;
|
|
1647
1647
|
svg.prepend(defs);
|
|
1648
1648
|
const path = svg.querySelector(":scope > path");
|
|
@@ -1678,14 +1678,14 @@ function indexRenderedNodes(root) {
|
|
|
1678
1678
|
return byId;
|
|
1679
1679
|
}
|
|
1680
1680
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1681
|
-
const inherited =
|
|
1681
|
+
const inherited = chunkNFP4PCTP_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1682
1682
|
if (inherited) {
|
|
1683
1683
|
applyGroupChildFill(node, inherited);
|
|
1684
1684
|
}
|
|
1685
1685
|
if (element.type !== "group") {
|
|
1686
1686
|
return;
|
|
1687
1687
|
}
|
|
1688
|
-
const childFill =
|
|
1688
|
+
const childFill = chunkNFP4PCTP_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1689
1689
|
if (!childFill) {
|
|
1690
1690
|
return;
|
|
1691
1691
|
}
|
|
@@ -1698,8 +1698,8 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
1700
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1701
|
-
const el =
|
|
1702
|
-
...
|
|
1701
|
+
const el = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1702
|
+
...chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex),
|
|
1703
1703
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1704
1704
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1705
1705
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1716,7 +1716,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1716
1716
|
el.appendChild(reflection);
|
|
1717
1717
|
}
|
|
1718
1718
|
if (element.type === "group" && element.children?.length) {
|
|
1719
|
-
const parentGroupFill =
|
|
1719
|
+
const parentGroupFill = chunkNFP4PCTP_cjs.getGroupChildParentFill(element);
|
|
1720
1720
|
element.children.forEach((child, index) => {
|
|
1721
1721
|
const childEl = context.renderElement(child, index);
|
|
1722
1722
|
if (childEl) {
|
|
@@ -1731,20 +1731,20 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1731
1731
|
// src/pptx/dom/elements/image.ts
|
|
1732
1732
|
var renderImageElement = (element, zIndex, context) => {
|
|
1733
1733
|
const doc = context.document;
|
|
1734
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1734
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkNFP4PCTP_cjs.resolveShapeGeometry(element) : void 0;
|
|
1735
1735
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1736
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1737
|
-
const layers =
|
|
1738
|
-
overflow:
|
|
1736
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkNFP4PCTP_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1737
|
+
const layers = chunkNFP4PCTP_cjs.getPictureFrameLayers(element, {
|
|
1738
|
+
overflow: chunkNFP4PCTP_cjs.getImageOverflow(element),
|
|
1739
1739
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1740
1740
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1741
1741
|
});
|
|
1742
|
-
const el =
|
|
1743
|
-
...
|
|
1742
|
+
const el = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1743
|
+
...chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex),
|
|
1744
1744
|
...layers.box
|
|
1745
1745
|
});
|
|
1746
1746
|
el.dataset.elementId = element.id;
|
|
1747
|
-
const surface = layers.surface ?
|
|
1747
|
+
const surface = layers.surface ? chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-image-surface", layers.surface) : el;
|
|
1748
1748
|
if (surface !== el) {
|
|
1749
1749
|
el.appendChild(surface);
|
|
1750
1750
|
const outline = renderStrokeOutline(doc, element);
|
|
@@ -1752,36 +1752,36 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1752
1752
|
el.appendChild(outline);
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
const src =
|
|
1755
|
+
const src = chunkNFP4PCTP_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1756
1756
|
if (!src) {
|
|
1757
1757
|
return el;
|
|
1758
1758
|
}
|
|
1759
|
-
const fx =
|
|
1759
|
+
const fx = chunkNFP4PCTP_cjs.getComputedImageStyle(element);
|
|
1760
1760
|
for (const f of fx.svgFilters) {
|
|
1761
|
-
const svg =
|
|
1761
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1762
1762
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1763
|
-
const defs =
|
|
1764
|
-
const filter =
|
|
1765
|
-
|
|
1763
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(doc, "defs");
|
|
1764
|
+
const filter = chunk4PYBBOIK_cjs.createSvgEl(doc, "filter");
|
|
1765
|
+
chunk4PYBBOIK_cjs.setSvgAttrs(filter, { id: f.id, "color-interpolation-filters": "sRGB" });
|
|
1766
1766
|
filter.innerHTML = f.markup;
|
|
1767
1767
|
defs.appendChild(filter);
|
|
1768
1768
|
svg.appendChild(defs);
|
|
1769
1769
|
surface.appendChild(svg);
|
|
1770
1770
|
}
|
|
1771
1771
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1772
|
-
const tiling =
|
|
1772
|
+
const tiling = chunkNFP4PCTP_cjs.getImageTilingStyle(element, chunkNFP4PCTP_cjs.getCachedNativeImageSize(src));
|
|
1773
1773
|
if (tiling) {
|
|
1774
|
-
const tile =
|
|
1774
|
+
const tile = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1775
1775
|
if (fx.filter) {
|
|
1776
1776
|
tile.style.filter = fx.filter;
|
|
1777
1777
|
}
|
|
1778
1778
|
if (fx.opacity !== void 0) {
|
|
1779
1779
|
tile.style.opacity = String(fx.opacity);
|
|
1780
1780
|
}
|
|
1781
|
-
if (!
|
|
1782
|
-
void
|
|
1781
|
+
if (!chunkNFP4PCTP_cjs.getCachedNativeImageSize(src)) {
|
|
1782
|
+
void chunkNFP4PCTP_cjs.probeNativeImageSize(src).then((size) => {
|
|
1783
1783
|
if (size) {
|
|
1784
|
-
|
|
1784
|
+
chunk4PYBBOIK_cjs.applyStyleMap(tile, chunkNFP4PCTP_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1785
1785
|
}
|
|
1786
1786
|
return void 0;
|
|
1787
1787
|
});
|
|
@@ -1792,9 +1792,9 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return el;
|
|
1794
1794
|
}
|
|
1795
|
-
const fit =
|
|
1796
|
-
const fillCounterTransform =
|
|
1797
|
-
const img =
|
|
1795
|
+
const fit = chunkNFP4PCTP_cjs.getImageFitStyle(element);
|
|
1796
|
+
const fillCounterTransform = chunkNFP4PCTP_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1797
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", void 0, {
|
|
1798
1798
|
...fit,
|
|
1799
1799
|
display: "block",
|
|
1800
1800
|
...fillCounterTransform ? { transform: fillCounterTransform, transformOrigin: "center" } : {}
|
|
@@ -1812,17 +1812,17 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1812
1812
|
if (element.type === "image" || element.type === "picture") {
|
|
1813
1813
|
const clrChange = element.imageEffects?.clrChange;
|
|
1814
1814
|
if (clrChange) {
|
|
1815
|
-
void
|
|
1815
|
+
void chunkNFP4PCTP_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1816
1816
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1817
1817
|
img.src = resolved;
|
|
1818
1818
|
}
|
|
1819
1819
|
return void 0;
|
|
1820
1820
|
});
|
|
1821
1821
|
}
|
|
1822
|
-
const wash =
|
|
1822
|
+
const wash = chunkNFP4PCTP_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1823
1823
|
if (wash) {
|
|
1824
1824
|
surface.appendChild(
|
|
1825
|
-
|
|
1825
|
+
chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-image-color-wash", {
|
|
1826
1826
|
position: "absolute",
|
|
1827
1827
|
inset: "0",
|
|
1828
1828
|
pointerEvents: "none",
|
|
@@ -1844,11 +1844,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1844
1844
|
return null;
|
|
1845
1845
|
}
|
|
1846
1846
|
const doc = context.document;
|
|
1847
|
-
const wrapper =
|
|
1847
|
+
const wrapper = chunk4PYBBOIK_cjs.createEl(
|
|
1848
1848
|
doc,
|
|
1849
1849
|
"div",
|
|
1850
1850
|
"pptxv-element pptxv-ink",
|
|
1851
|
-
|
|
1851
|
+
chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex)
|
|
1852
1852
|
);
|
|
1853
1853
|
wrapper.dataset.elementId = element.id;
|
|
1854
1854
|
const paths = element.inkPaths;
|
|
@@ -1857,7 +1857,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
const w = Math.max(element.width, 1);
|
|
1859
1859
|
const h = Math.max(element.height, 1);
|
|
1860
|
-
const svg =
|
|
1860
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1861
1861
|
viewBox: `0 0 ${w} ${h}`,
|
|
1862
1862
|
preserveAspectRatio: "none"
|
|
1863
1863
|
});
|
|
@@ -1865,11 +1865,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1865
1865
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1866
1866
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getInkReplayStyles(element) : [];
|
|
1867
1867
|
if (context.presenting) {
|
|
1868
|
-
const keyframes =
|
|
1868
|
+
const keyframes = chunk4PYBBOIK_cjs.createSvgEl(doc, "style");
|
|
1869
1869
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1870
1870
|
svg.appendChild(keyframes);
|
|
1871
1871
|
}
|
|
1872
|
-
const views =
|
|
1872
|
+
const views = chunkNFP4PCTP_cjs.buildInkGroupStrokes(element, { color: chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1873
1873
|
for (const [i, view] of views.entries()) {
|
|
1874
1874
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1875
1875
|
}
|
|
@@ -1892,7 +1892,7 @@ function mediaFullscreenResetStyle(baseStyle) {
|
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
1894
1894
|
function buildFullscreenStopButton(doc, label, onStop) {
|
|
1895
|
-
const button =
|
|
1895
|
+
const button = chunk4PYBBOIK_cjs.createEl(doc, "button", "pptxv-media-fullscreen-stop", {
|
|
1896
1896
|
position: "absolute",
|
|
1897
1897
|
bottom: "12px",
|
|
1898
1898
|
right: "12px",
|
|
@@ -1908,14 +1908,14 @@ function buildFullscreenStopButton(doc, label, onStop) {
|
|
|
1908
1908
|
button.type = "button";
|
|
1909
1909
|
button.setAttribute("aria-label", label);
|
|
1910
1910
|
button.addEventListener("click", onStop);
|
|
1911
|
-
const icon =
|
|
1911
|
+
const icon = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
1912
1912
|
width: 18,
|
|
1913
1913
|
height: 18,
|
|
1914
1914
|
viewBox: "0 0 24 24",
|
|
1915
1915
|
fill: "currentColor",
|
|
1916
1916
|
stroke: "none"
|
|
1917
1917
|
});
|
|
1918
|
-
icon.appendChild(
|
|
1918
|
+
icon.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "rect", { x: 6, y: 6, width: 12, height: 12, rx: 1 }));
|
|
1919
1919
|
button.appendChild(icon);
|
|
1920
1920
|
return button;
|
|
1921
1921
|
}
|
|
@@ -1923,12 +1923,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1923
1923
|
let stopButton = null;
|
|
1924
1924
|
const update = (playing) => {
|
|
1925
1925
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
1926
|
-
const active =
|
|
1927
|
-
|
|
1926
|
+
const active = chunkNFP4PCTP_cjs.isMediaFullscreenActive(input);
|
|
1927
|
+
chunk4PYBBOIK_cjs.applyStyleMap(
|
|
1928
1928
|
container,
|
|
1929
|
-
active ?
|
|
1929
|
+
active ? chunkNFP4PCTP_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
1930
1930
|
);
|
|
1931
|
-
if (
|
|
1931
|
+
if (chunkNFP4PCTP_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
1932
1932
|
if (!stopButton) {
|
|
1933
1933
|
stopButton = buildFullscreenStopButton(
|
|
1934
1934
|
doc,
|
|
@@ -1953,12 +1953,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1953
1953
|
|
|
1954
1954
|
// src/pptx/dom/elements/media.ts
|
|
1955
1955
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
1956
|
-
|
|
1956
|
+
chunkNFP4PCTP_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
1957
1957
|
if (presenting) {
|
|
1958
|
-
|
|
1959
|
-
|
|
1958
|
+
chunkNFP4PCTP_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
1959
|
+
chunkNFP4PCTP_cjs.scheduleMediaTrimAndFade(el, {
|
|
1960
1960
|
...playback,
|
|
1961
|
-
volume:
|
|
1961
|
+
volume: chunkNFP4PCTP_cjs.mediaPlaybackAttributes(playback).volume
|
|
1962
1962
|
});
|
|
1963
1963
|
} else if (!el.paused) {
|
|
1964
1964
|
el.pause();
|
|
@@ -1968,20 +1968,20 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
1968
1968
|
if (element.type !== "media") {
|
|
1969
1969
|
return null;
|
|
1970
1970
|
}
|
|
1971
|
-
const surface =
|
|
1971
|
+
const surface = chunkNFP4PCTP_cjs.mediaSurfaceOf({
|
|
1972
1972
|
interactive: context.interactive === true || context.reading === true,
|
|
1973
1973
|
presenting: context.presenting
|
|
1974
1974
|
});
|
|
1975
|
-
const showTransport =
|
|
1975
|
+
const showTransport = chunkNFP4PCTP_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
1976
1976
|
const doc = context.document;
|
|
1977
|
-
const baseStyle =
|
|
1978
|
-
const el =
|
|
1977
|
+
const baseStyle = chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex);
|
|
1978
|
+
const el = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
1979
1979
|
el.dataset.elementId = element.id;
|
|
1980
1980
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
1981
|
-
const posterSrc =
|
|
1982
|
-
const onlineVideoEmbedUrl =
|
|
1981
|
+
const posterSrc = chunkNFP4PCTP_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1982
|
+
const onlineVideoEmbedUrl = chunkNFP4PCTP_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
1983
1983
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
1984
|
-
const iframe =
|
|
1984
|
+
const iframe = chunk4PYBBOIK_cjs.createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
1985
1985
|
width: "100%",
|
|
1986
1986
|
height: "100%",
|
|
1987
1987
|
border: "0",
|
|
@@ -1989,14 +1989,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
1989
1989
|
});
|
|
1990
1990
|
iframe.src = onlineVideoEmbedUrl;
|
|
1991
1991
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
1992
|
-
iframe.allow =
|
|
1993
|
-
iframe.sandbox.value =
|
|
1992
|
+
iframe.allow = chunkNFP4PCTP_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
1993
|
+
iframe.sandbox.value = chunkNFP4PCTP_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
1994
1994
|
iframe.allowFullscreen = true;
|
|
1995
1995
|
el.appendChild(iframe);
|
|
1996
1996
|
return el;
|
|
1997
1997
|
}
|
|
1998
1998
|
if (mediaSrc && element.mediaType === "video") {
|
|
1999
|
-
const video =
|
|
1999
|
+
const video = chunk4PYBBOIK_cjs.createEl(doc, "video", "pptxv-media-video", {
|
|
2000
2000
|
width: "100%",
|
|
2001
2001
|
height: "100%",
|
|
2002
2002
|
objectFit: "contain",
|
|
@@ -2015,27 +2015,27 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2015
2015
|
return el;
|
|
2016
2016
|
}
|
|
2017
2017
|
if (mediaSrc && element.mediaType === "audio") {
|
|
2018
|
-
const audio =
|
|
2018
|
+
const audio = chunk4PYBBOIK_cjs.createEl(doc, "audio", "pptxv-media-audio", { width: "100%" });
|
|
2019
2019
|
audio.src = mediaSrc;
|
|
2020
2020
|
audio.controls = showTransport;
|
|
2021
2021
|
el.appendChild(audio);
|
|
2022
|
-
if (context.presenting &&
|
|
2022
|
+
if (context.presenting && chunkNFP4PCTP_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2023
2023
|
audio.muted = true;
|
|
2024
|
-
|
|
2024
|
+
chunkNFP4PCTP_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2025
2025
|
return el;
|
|
2026
2026
|
}
|
|
2027
2027
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2028
2028
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2029
2029
|
return el;
|
|
2030
2030
|
}
|
|
2031
|
-
const fallback =
|
|
2031
|
+
const fallback = chunkNFP4PCTP_cjs.mediaFallbackVisual(surface, {
|
|
2032
2032
|
hasPoster: Boolean(posterSrc),
|
|
2033
2033
|
missing: element.mediaMissing === true
|
|
2034
2034
|
});
|
|
2035
|
-
const icon =
|
|
2036
|
-
const labelKey =
|
|
2035
|
+
const icon = chunkNFP4PCTP_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2036
|
+
const labelKey = chunkNFP4PCTP_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2037
2037
|
if (fallback.poster && posterSrc) {
|
|
2038
|
-
const img =
|
|
2038
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", "pptxv-media-poster", {
|
|
2039
2039
|
width: "100%",
|
|
2040
2040
|
height: "100%",
|
|
2041
2041
|
objectFit: "contain",
|
|
@@ -2047,14 +2047,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2047
2047
|
img.setAttribute("draggable", "false");
|
|
2048
2048
|
el.appendChild(img);
|
|
2049
2049
|
if (fallback.badge !== "none") {
|
|
2050
|
-
const badge =
|
|
2050
|
+
const badge = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-media-badge");
|
|
2051
2051
|
if (fallback.badge === "missing") {
|
|
2052
2052
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2053
2053
|
}
|
|
2054
|
-
badge.setAttribute(
|
|
2054
|
+
badge.setAttribute(chunkNFP4PCTP_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2055
2055
|
badge.appendChild(buildIcon(doc, icon));
|
|
2056
2056
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2057
|
-
const text =
|
|
2057
|
+
const text = chunk4PYBBOIK_cjs.createEl(doc, "span");
|
|
2058
2058
|
text.textContent = context.t(labelKey);
|
|
2059
2059
|
badge.appendChild(text);
|
|
2060
2060
|
}
|
|
@@ -2064,12 +2064,12 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
if (fallback.placeholder !== "none") {
|
|
2066
2066
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2067
|
-
el.setAttribute(
|
|
2067
|
+
el.setAttribute(chunkNFP4PCTP_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2068
2068
|
if (icon.length > 0) {
|
|
2069
2069
|
el.appendChild(buildIcon(doc, icon));
|
|
2070
2070
|
}
|
|
2071
2071
|
if (labelKey !== void 0) {
|
|
2072
|
-
const label =
|
|
2072
|
+
const label = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
2073
2073
|
label.textContent = context.t(labelKey);
|
|
2074
2074
|
el.appendChild(label);
|
|
2075
2075
|
}
|
|
@@ -2096,11 +2096,11 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2096
2096
|
return null;
|
|
2097
2097
|
}
|
|
2098
2098
|
const doc = context.document;
|
|
2099
|
-
const el =
|
|
2099
|
+
const el = chunk4PYBBOIK_cjs.createEl(
|
|
2100
2100
|
doc,
|
|
2101
2101
|
"div",
|
|
2102
2102
|
"pptxv-element pptxv-model3d",
|
|
2103
|
-
|
|
2103
|
+
chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex)
|
|
2104
2104
|
);
|
|
2105
2105
|
el.dataset.elementId = element.id;
|
|
2106
2106
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2113,7 +2113,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2113
2113
|
return el;
|
|
2114
2114
|
};
|
|
2115
2115
|
function buildPoster(doc, src, alt) {
|
|
2116
|
-
const img =
|
|
2116
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", "pptxv-model3d-poster", {
|
|
2117
2117
|
width: "100%",
|
|
2118
2118
|
height: "100%",
|
|
2119
2119
|
objectFit: "contain",
|
|
@@ -2127,7 +2127,7 @@ function buildPoster(doc, src, alt) {
|
|
|
2127
2127
|
return img;
|
|
2128
2128
|
}
|
|
2129
2129
|
function buildPlaceholder(doc, label) {
|
|
2130
|
-
const box =
|
|
2130
|
+
const box = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-model3d-placeholder", {
|
|
2131
2131
|
width: "100%",
|
|
2132
2132
|
height: "100%",
|
|
2133
2133
|
display: "flex",
|
|
@@ -2141,7 +2141,7 @@ function buildPlaceholder(doc, label) {
|
|
|
2141
2141
|
borderRadius: "4px",
|
|
2142
2142
|
boxSizing: "border-box"
|
|
2143
2143
|
});
|
|
2144
|
-
const icon =
|
|
2144
|
+
const icon = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
2145
2145
|
width: 24,
|
|
2146
2146
|
height: 24,
|
|
2147
2147
|
viewBox: "0 0 24 24",
|
|
@@ -2154,20 +2154,20 @@ function buildPlaceholder(doc, label) {
|
|
|
2154
2154
|
icon.setAttribute("class", "pptxv-model3d-icon");
|
|
2155
2155
|
icon.setAttribute("style", "margin-bottom:4px;color:#d1d5db");
|
|
2156
2156
|
icon.appendChild(
|
|
2157
|
-
|
|
2157
|
+
chunk4PYBBOIK_cjs.createSvgEl(doc, "path", {
|
|
2158
2158
|
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"
|
|
2159
2159
|
})
|
|
2160
2160
|
);
|
|
2161
|
-
icon.appendChild(
|
|
2162
|
-
icon.appendChild(
|
|
2161
|
+
icon.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "polyline", { points: "3.27 6.96 12 12.01 20.73 6.96" }));
|
|
2162
|
+
icon.appendChild(chunk4PYBBOIK_cjs.createSvgEl(doc, "line", { x1: 12, y1: 22.08, x2: 12, y2: 12 }));
|
|
2163
2163
|
box.appendChild(icon);
|
|
2164
|
-
const text =
|
|
2164
|
+
const text = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-model3d-label");
|
|
2165
2165
|
text.textContent = label;
|
|
2166
2166
|
box.appendChild(text);
|
|
2167
2167
|
return box;
|
|
2168
2168
|
}
|
|
2169
2169
|
function buildViewButton(doc, root, poster, element, context) {
|
|
2170
|
-
const button =
|
|
2170
|
+
const button = chunk4PYBBOIK_cjs.createEl(doc, "button", "pptxv-model3d-view", {
|
|
2171
2171
|
position: "absolute",
|
|
2172
2172
|
bottom: "4px",
|
|
2173
2173
|
right: "4px",
|
|
@@ -2202,7 +2202,7 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2202
2202
|
button.remove();
|
|
2203
2203
|
return;
|
|
2204
2204
|
}
|
|
2205
|
-
const sceneHost =
|
|
2205
|
+
const sceneHost = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-model3d-scene", {
|
|
2206
2206
|
position: "absolute",
|
|
2207
2207
|
inset: 0,
|
|
2208
2208
|
willChange: "transform"
|
|
@@ -2230,15 +2230,15 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2230
2230
|
|
|
2231
2231
|
// src/pptx/dom/elements/ole-icons.ts
|
|
2232
2232
|
function buildOleIcon(doc, type, color) {
|
|
2233
|
-
const svg =
|
|
2233
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
2234
2234
|
width: 36,
|
|
2235
2235
|
height: 36,
|
|
2236
2236
|
viewBox: "0 0 24 24",
|
|
2237
2237
|
fill: "none",
|
|
2238
2238
|
"aria-hidden": "true"
|
|
2239
2239
|
});
|
|
2240
|
-
for (const shape of
|
|
2241
|
-
const node =
|
|
2240
|
+
for (const shape of chunkNFP4PCTP_cjs.getOleIconShapes(type)) {
|
|
2241
|
+
const node = chunk4PYBBOIK_cjs.createSvgEl(doc, shape.tag, shape.attrs);
|
|
2242
2242
|
if (shape.tag === "text") {
|
|
2243
2243
|
node.setAttribute("fill", color);
|
|
2244
2244
|
node.textContent = shape.text ?? "";
|
|
@@ -2256,21 +2256,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2256
2256
|
return null;
|
|
2257
2257
|
}
|
|
2258
2258
|
const doc = context.document;
|
|
2259
|
-
const oleType =
|
|
2260
|
-
const typeColor =
|
|
2261
|
-
const typeLabel =
|
|
2262
|
-
const el =
|
|
2259
|
+
const oleType = chunkNFP4PCTP_cjs.resolveOleType(element);
|
|
2260
|
+
const typeColor = chunkNFP4PCTP_cjs.getOleTypeColor(oleType);
|
|
2261
|
+
const typeLabel = chunkNFP4PCTP_cjs.getOleTypeLabel(oleType);
|
|
2262
|
+
const el = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-ole", chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex));
|
|
2263
2263
|
el.dataset.elementId = element.id;
|
|
2264
2264
|
el.setAttribute("role", "group");
|
|
2265
|
-
el.setAttribute("aria-label",
|
|
2265
|
+
el.setAttribute("aria-label", chunkNFP4PCTP_cjs.getOleAriaLabel(element));
|
|
2266
2266
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2267
2267
|
if (element.previewImageData) {
|
|
2268
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2268
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkNFP4PCTP_cjs.getOleBadgeLabel(oleType)));
|
|
2269
2269
|
} else {
|
|
2270
2270
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2271
2271
|
}
|
|
2272
|
-
const showActions =
|
|
2273
|
-
|
|
2272
|
+
const showActions = chunkNFP4PCTP_cjs.oleActionsVisible(
|
|
2273
|
+
chunkNFP4PCTP_cjs.mediaSurfaceOf({
|
|
2274
2274
|
interactive: context.interactive === true,
|
|
2275
2275
|
presenting: context.presenting
|
|
2276
2276
|
})
|
|
@@ -2286,7 +2286,7 @@ function infoLines(el, typeLabel) {
|
|
|
2286
2286
|
if (name) {
|
|
2287
2287
|
lines.push(name);
|
|
2288
2288
|
}
|
|
2289
|
-
const size =
|
|
2289
|
+
const size = chunkNFP4PCTP_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2290
2290
|
if (size) {
|
|
2291
2291
|
lines.push(size);
|
|
2292
2292
|
}
|
|
@@ -2296,12 +2296,12 @@ function infoLines(el, typeLabel) {
|
|
|
2296
2296
|
return lines;
|
|
2297
2297
|
}
|
|
2298
2298
|
function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
2299
|
-
const preview =
|
|
2299
|
+
const preview = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-ole-preview", {
|
|
2300
2300
|
position: "relative",
|
|
2301
2301
|
width: "100%",
|
|
2302
2302
|
height: "100%"
|
|
2303
2303
|
});
|
|
2304
|
-
const img =
|
|
2304
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", "pptxv-ole-img", {
|
|
2305
2305
|
width: "100%",
|
|
2306
2306
|
height: "100%",
|
|
2307
2307
|
objectFit: "contain",
|
|
@@ -2310,19 +2310,19 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2310
2310
|
display: "block"
|
|
2311
2311
|
});
|
|
2312
2312
|
img.src = el.previewImageData ?? "";
|
|
2313
|
-
img.alt =
|
|
2313
|
+
img.alt = chunkNFP4PCTP_cjs.getOleAriaLabel(el);
|
|
2314
2314
|
img.draggable = false;
|
|
2315
2315
|
preview.appendChild(img);
|
|
2316
|
-
const badge =
|
|
2316
|
+
const badge = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
2317
2317
|
badge.setAttribute("class", "pptxv-ole-badge");
|
|
2318
2318
|
badge.setAttribute(
|
|
2319
2319
|
"style",
|
|
2320
2320
|
"position:absolute;bottom:4px;right:4px;z-index:10;pointer-events:none"
|
|
2321
2321
|
);
|
|
2322
2322
|
badge.appendChild(
|
|
2323
|
-
|
|
2323
|
+
chunk4PYBBOIK_cjs.createSvgEl(doc, "rect", { x: 2, y: 2, width: 20, height: 20, rx: 3, fill: typeColor })
|
|
2324
2324
|
);
|
|
2325
|
-
const badgeText =
|
|
2325
|
+
const badgeText = chunk4PYBBOIK_cjs.createSvgEl(doc, "text", {
|
|
2326
2326
|
x: 12,
|
|
2327
2327
|
y: 16,
|
|
2328
2328
|
"text-anchor": "middle",
|
|
@@ -2336,8 +2336,8 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2336
2336
|
return preview;
|
|
2337
2337
|
}
|
|
2338
2338
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2339
|
-
const box =
|
|
2340
|
-
...
|
|
2339
|
+
const box = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2340
|
+
...chunkNFP4PCTP_cjs.getPlaceholderStyle(oleType),
|
|
2341
2341
|
width: "100%",
|
|
2342
2342
|
height: "100%",
|
|
2343
2343
|
display: "flex",
|
|
@@ -2348,7 +2348,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2348
2348
|
boxSizing: "border-box"
|
|
2349
2349
|
});
|
|
2350
2350
|
box.appendChild(buildOleIcon(doc, oleType, typeColor));
|
|
2351
|
-
const name =
|
|
2351
|
+
const name = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-ole-name", {
|
|
2352
2352
|
marginTop: "8px",
|
|
2353
2353
|
fontSize: "12px",
|
|
2354
2354
|
fontWeight: 500,
|
|
@@ -2358,10 +2358,10 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2358
2358
|
whiteSpace: "nowrap",
|
|
2359
2359
|
color: typeColor
|
|
2360
2360
|
});
|
|
2361
|
-
name.textContent =
|
|
2361
|
+
name.textContent = chunkNFP4PCTP_cjs.getOleDisplayName(el);
|
|
2362
2362
|
box.appendChild(name);
|
|
2363
2363
|
if (el.fileName) {
|
|
2364
|
-
const sublabel =
|
|
2364
|
+
const sublabel = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
2365
2365
|
marginTop: "2px",
|
|
2366
2366
|
fontSize: "10px",
|
|
2367
2367
|
color: "rgba(0,0,0,0.45)",
|
|
@@ -2391,7 +2391,7 @@ var ACTION_STYLE = {
|
|
|
2391
2391
|
function buildActionBar(doc, el, typeLabel, context) {
|
|
2392
2392
|
const data = el.oleEmbeddedData ?? "";
|
|
2393
2393
|
const downloadName = el.oleEmbeddedFileName ?? el.fileName ?? typeLabel;
|
|
2394
|
-
const bar =
|
|
2394
|
+
const bar = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-ole-actions", {
|
|
2395
2395
|
position: "absolute",
|
|
2396
2396
|
left: 0,
|
|
2397
2397
|
right: 0,
|
|
@@ -2410,9 +2410,9 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2410
2410
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2411
2411
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2412
2412
|
}
|
|
2413
|
-
const size =
|
|
2413
|
+
const size = chunkNFP4PCTP_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2414
2414
|
if (size) {
|
|
2415
|
-
const meta =
|
|
2415
|
+
const meta = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-ole-meta", {
|
|
2416
2416
|
marginRight: "auto",
|
|
2417
2417
|
color: "rgba(0,0,0,0.55)",
|
|
2418
2418
|
overflow: "hidden",
|
|
@@ -2422,7 +2422,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2422
2422
|
meta.textContent = size;
|
|
2423
2423
|
bar.appendChild(meta);
|
|
2424
2424
|
}
|
|
2425
|
-
const download =
|
|
2425
|
+
const download = chunk4PYBBOIK_cjs.createEl(doc, "a", "pptxv-ole-action", ACTION_STYLE);
|
|
2426
2426
|
download.href = data;
|
|
2427
2427
|
download.download = downloadName;
|
|
2428
2428
|
const downloadTitle = context.t("pptx.ole.downloadName", { name: downloadName });
|
|
@@ -2430,14 +2430,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2430
2430
|
download.title = downloadTitle;
|
|
2431
2431
|
download.textContent = context.t("pptx.ole.download");
|
|
2432
2432
|
bar.appendChild(download);
|
|
2433
|
-
if (
|
|
2434
|
-
const open =
|
|
2433
|
+
if (chunkNFP4PCTP_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2434
|
+
const open = chunk4PYBBOIK_cjs.createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2435
2435
|
open.type = "button";
|
|
2436
2436
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2437
2437
|
open.setAttribute("aria-label", openTitle);
|
|
2438
2438
|
open.title = openTitle;
|
|
2439
2439
|
open.textContent = context.t("pptx.ole.open");
|
|
2440
|
-
open.addEventListener("click", () =>
|
|
2440
|
+
open.addEventListener("click", () => chunkNFP4PCTP_cjs.openUrlInNewTab(data));
|
|
2441
2441
|
bar.appendChild(open);
|
|
2442
2442
|
}
|
|
2443
2443
|
return bar;
|
|
@@ -2445,15 +2445,15 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2445
2445
|
|
|
2446
2446
|
// src/pptx/dom/elements/placeholder.ts
|
|
2447
2447
|
var renderPlaceholderElement = (element, zIndex, context) => {
|
|
2448
|
-
const el =
|
|
2448
|
+
const el = chunk4PYBBOIK_cjs.createEl(
|
|
2449
2449
|
context.document,
|
|
2450
2450
|
"div",
|
|
2451
2451
|
"pptxv-element pptxv-placeholder",
|
|
2452
|
-
|
|
2452
|
+
chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex)
|
|
2453
2453
|
);
|
|
2454
2454
|
el.dataset.elementId = element.id;
|
|
2455
2455
|
el.dataset.elementType = element.type;
|
|
2456
|
-
const label =
|
|
2456
|
+
const label = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-placeholder-label");
|
|
2457
2457
|
label.textContent = chunkOOQMIQT3_cjs.keyToLabel(element.type);
|
|
2458
2458
|
el.appendChild(label);
|
|
2459
2459
|
return el;
|
|
@@ -2465,7 +2465,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2465
2465
|
return null;
|
|
2466
2466
|
}
|
|
2467
2467
|
const doc = context.document;
|
|
2468
|
-
const summaryView =
|
|
2468
|
+
const summaryView = chunkNFP4PCTP_cjs.buildSummaryZoomView(
|
|
2469
2469
|
element,
|
|
2470
2470
|
(index) => {
|
|
2471
2471
|
const slide = context.slides?.[index];
|
|
@@ -2481,19 +2481,19 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2481
2481
|
(key, params) => context.t(key, params)
|
|
2482
2482
|
);
|
|
2483
2483
|
if (summaryView) {
|
|
2484
|
-
const root =
|
|
2484
|
+
const root = chunk4PYBBOIK_cjs.createEl(
|
|
2485
2485
|
doc,
|
|
2486
2486
|
"div",
|
|
2487
2487
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2488
|
-
|
|
2488
|
+
chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex)
|
|
2489
2489
|
);
|
|
2490
|
-
const content =
|
|
2490
|
+
const content = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2491
2491
|
root.dataset.elementId = element.id;
|
|
2492
2492
|
root.dataset.zoomType = "summary";
|
|
2493
2493
|
root.setAttribute("role", "group");
|
|
2494
2494
|
root.setAttribute("aria-label", summaryView.ariaLabel);
|
|
2495
2495
|
for (const tile2 of summaryView.tiles) {
|
|
2496
|
-
const tileElement =
|
|
2496
|
+
const tileElement = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-summary-zoom-tile", {
|
|
2497
2497
|
...tile2.style,
|
|
2498
2498
|
backgroundColor: tile2.backgroundColor,
|
|
2499
2499
|
overflow: "hidden",
|
|
@@ -2527,22 +2527,22 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2527
2527
|
});
|
|
2528
2528
|
}
|
|
2529
2529
|
if (tile2.imageSrc) {
|
|
2530
|
-
const image =
|
|
2530
|
+
const image = chunk4PYBBOIK_cjs.createEl(doc, "img");
|
|
2531
2531
|
image.src = tile2.imageSrc;
|
|
2532
2532
|
image.alt = tile2.ariaLabel;
|
|
2533
2533
|
image.setAttribute("draggable", "false");
|
|
2534
2534
|
image.style.cssText = "width:100%;height:100%;object-fit:contain";
|
|
2535
2535
|
tileElement.appendChild(image);
|
|
2536
2536
|
} else {
|
|
2537
|
-
const label =
|
|
2537
|
+
const label = chunk4PYBBOIK_cjs.createEl(doc, "div");
|
|
2538
2538
|
label.textContent = tile2.label;
|
|
2539
|
-
const slideLabel =
|
|
2539
|
+
const slideLabel = chunk4PYBBOIK_cjs.createEl(doc, "div");
|
|
2540
2540
|
slideLabel.textContent = tile2.slideLabel;
|
|
2541
2541
|
tileElement.append(label, slideLabel);
|
|
2542
2542
|
}
|
|
2543
2543
|
content.appendChild(tileElement);
|
|
2544
2544
|
}
|
|
2545
|
-
const badge2 =
|
|
2545
|
+
const badge2 = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-badge");
|
|
2546
2546
|
badge2.textContent = context.t("pptx.zoom.summaryZoom");
|
|
2547
2547
|
content.appendChild(badge2);
|
|
2548
2548
|
root.appendChild(content);
|
|
@@ -2552,7 +2552,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2552
2552
|
const target = element.targetSlideIndex ?? 0;
|
|
2553
2553
|
const targetSlide = context.slides?.[target];
|
|
2554
2554
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2555
|
-
const el =
|
|
2555
|
+
const el = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-zoom", chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex));
|
|
2556
2556
|
el.dataset.elementId = element.id;
|
|
2557
2557
|
el.dataset.zoomType = zoomType;
|
|
2558
2558
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2562,7 +2562,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2562
2562
|
el.tabIndex = 0;
|
|
2563
2563
|
el.style.cursor = "pointer";
|
|
2564
2564
|
const activate = () => {
|
|
2565
|
-
const zoomTarget =
|
|
2565
|
+
const zoomTarget = chunkNFP4PCTP_cjs.resolveZoomNavigationTarget(element);
|
|
2566
2566
|
if (zoomTarget) {
|
|
2567
2567
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2568
2568
|
}
|
|
@@ -2587,7 +2587,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2587
2587
|
section: element.targetSectionId
|
|
2588
2588
|
}) : context.t("pptx.zoom.ariaLabel", { number: target + 1 })
|
|
2589
2589
|
);
|
|
2590
|
-
const tile =
|
|
2590
|
+
const tile = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-tile", {
|
|
2591
2591
|
position: "relative",
|
|
2592
2592
|
width: "100%",
|
|
2593
2593
|
height: "100%",
|
|
@@ -2596,7 +2596,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2596
2596
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
2597
2597
|
});
|
|
2598
2598
|
if (element.imageData) {
|
|
2599
|
-
const img =
|
|
2599
|
+
const img = chunk4PYBBOIK_cjs.createEl(doc, "img", "pptxv-zoom-img", {
|
|
2600
2600
|
width: "100%",
|
|
2601
2601
|
height: "100%",
|
|
2602
2602
|
objectFit: "contain",
|
|
@@ -2619,7 +2619,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2619
2619
|
)
|
|
2620
2620
|
);
|
|
2621
2621
|
}
|
|
2622
|
-
const badge =
|
|
2622
|
+
const badge = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-badge", {
|
|
2623
2623
|
position: "absolute",
|
|
2624
2624
|
bottom: "4px",
|
|
2625
2625
|
right: "4px",
|
|
@@ -2637,7 +2637,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2637
2637
|
return el;
|
|
2638
2638
|
};
|
|
2639
2639
|
function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
2640
|
-
const box =
|
|
2640
|
+
const box = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-thumbnail", {
|
|
2641
2641
|
width: "100%",
|
|
2642
2642
|
height: "100%",
|
|
2643
2643
|
display: "flex",
|
|
@@ -2648,7 +2648,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2648
2648
|
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
2649
2649
|
boxSizing: "border-box"
|
|
2650
2650
|
});
|
|
2651
|
-
const slideLabel =
|
|
2651
|
+
const slideLabel = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-slide-label", {
|
|
2652
2652
|
fontSize: "14px",
|
|
2653
2653
|
fontWeight: 600,
|
|
2654
2654
|
color: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2657,7 +2657,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2657
2657
|
slideLabel.textContent = t("pptx.notes.slideN", { n: slideNumber });
|
|
2658
2658
|
box.appendChild(slideLabel);
|
|
2659
2659
|
if (sectionText) {
|
|
2660
|
-
const sectionLabel =
|
|
2660
|
+
const sectionLabel = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-zoom-section-label", {
|
|
2661
2661
|
fontSize: "10px",
|
|
2662
2662
|
color: "rgba(0, 0, 0, 0.4)"
|
|
2663
2663
|
});
|
|
@@ -2676,7 +2676,7 @@ function registerExtraRenderers(registry) {
|
|
|
2676
2676
|
|
|
2677
2677
|
// src/pptx/dom/elements/register-rich-media.ts
|
|
2678
2678
|
function registerRichMediaRenderers(registry) {
|
|
2679
|
-
registry.register("smartArt",
|
|
2679
|
+
registry.register("smartArt", chunk4PYBBOIK_cjs.renderSmartArtElement);
|
|
2680
2680
|
registry.register("media", renderMediaElement);
|
|
2681
2681
|
registry.register("ink", renderInkElement);
|
|
2682
2682
|
registry.register("ole", renderOleElement);
|
|
@@ -2712,10 +2712,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2712
2712
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
2713
2713
|
handle.remove();
|
|
2714
2714
|
}
|
|
2715
|
-
const crossings =
|
|
2715
|
+
const crossings = chunkNFP4PCTP_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2716
2716
|
const rowBounds = measureRowBoundaries(table);
|
|
2717
|
-
colHandles =
|
|
2718
|
-
const handle =
|
|
2717
|
+
colHandles = chunkNFP4PCTP_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
2718
|
+
const handle = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-resize-col", {
|
|
2719
2719
|
position: "absolute",
|
|
2720
2720
|
top: "0",
|
|
2721
2721
|
bottom: "0",
|
|
@@ -2724,14 +2724,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2724
2724
|
zIndex: "10",
|
|
2725
2725
|
pointerEvents: "none"
|
|
2726
2726
|
});
|
|
2727
|
-
const segments =
|
|
2727
|
+
const segments = chunkNFP4PCTP_cjs.columnHandleSegments(
|
|
2728
2728
|
crossings.columns[i] ?? [],
|
|
2729
2729
|
rowBounds,
|
|
2730
2730
|
table.offsetHeight
|
|
2731
2731
|
);
|
|
2732
2732
|
for (const { top, height } of segments) {
|
|
2733
2733
|
handle.appendChild(
|
|
2734
|
-
|
|
2734
|
+
chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2735
2735
|
position: "absolute",
|
|
2736
2736
|
left: "0",
|
|
2737
2737
|
right: "0",
|
|
@@ -2745,7 +2745,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2745
2745
|
return handle;
|
|
2746
2746
|
});
|
|
2747
2747
|
rowHandles = rowBounds.map((topPx, i) => {
|
|
2748
|
-
const handle =
|
|
2748
|
+
const handle = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-resize-row", {
|
|
2749
2749
|
position: "absolute",
|
|
2750
2750
|
left: "0",
|
|
2751
2751
|
right: "0",
|
|
@@ -2754,10 +2754,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2754
2754
|
zIndex: "10",
|
|
2755
2755
|
pointerEvents: "none"
|
|
2756
2756
|
});
|
|
2757
|
-
const segments =
|
|
2757
|
+
const segments = chunkNFP4PCTP_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
2758
2758
|
for (const { leftPct, widthPct } of segments) {
|
|
2759
2759
|
handle.appendChild(
|
|
2760
|
-
|
|
2760
|
+
chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2761
2761
|
position: "absolute",
|
|
2762
2762
|
top: "0",
|
|
2763
2763
|
bottom: "0",
|
|
@@ -2798,14 +2798,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2798
2798
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
2799
2799
|
context.onTableResizeColumns?.(
|
|
2800
2800
|
element,
|
|
2801
|
-
|
|
2801
|
+
chunkNFP4PCTP_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
2802
2802
|
);
|
|
2803
2803
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
2804
2804
|
const deltaY = event.clientY - active.startPos;
|
|
2805
2805
|
context.onTableResizeRow?.(
|
|
2806
2806
|
element,
|
|
2807
2807
|
active.index,
|
|
2808
|
-
|
|
2808
|
+
chunkNFP4PCTP_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkNFP4PCTP_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
2809
2809
|
);
|
|
2810
2810
|
}
|
|
2811
2811
|
drawHandles();
|
|
@@ -2814,13 +2814,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
2814
2814
|
const rect = container.getBoundingClientRect();
|
|
2815
2815
|
const localX = event.clientX - rect.left;
|
|
2816
2816
|
const localY = event.clientY - rect.top;
|
|
2817
|
-
const scaleY =
|
|
2818
|
-
const crossings =
|
|
2817
|
+
const scaleY = chunkNFP4PCTP_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
2818
|
+
const crossings = chunkNFP4PCTP_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2819
2819
|
const rowBounds = measureRowBoundaries(table);
|
|
2820
|
-
const colBoundaries =
|
|
2820
|
+
const colBoundaries = chunkNFP4PCTP_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
2821
2821
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
2822
2822
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
2823
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
2823
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkNFP4PCTP_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
2824
2824
|
event.preventDefault();
|
|
2825
2825
|
event.stopPropagation();
|
|
2826
2826
|
doc.body.style.cursor = "col-resize";
|
|
@@ -2838,7 +2838,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
2840
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
2841
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
2841
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkNFP4PCTP_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
2842
2842
|
event.preventDefault();
|
|
2843
2843
|
event.stopPropagation();
|
|
2844
2844
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -2849,7 +2849,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2849
2849
|
index: i,
|
|
2850
2850
|
startPos: event.clientY,
|
|
2851
2851
|
handleEl: rowHandles[i] ?? container,
|
|
2852
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
2852
|
+
initialRowHeight: tr?.offsetHeight ?? chunkNFP4PCTP_cjs.DEFAULT_ROW_HEIGHT
|
|
2853
2853
|
};
|
|
2854
2854
|
win.addEventListener("mousemove", onMouseMove);
|
|
2855
2855
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -2869,12 +2869,12 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2869
2869
|
return null;
|
|
2870
2870
|
}
|
|
2871
2871
|
const doc = context.document;
|
|
2872
|
-
const container =
|
|
2873
|
-
...
|
|
2872
|
+
const container = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
2873
|
+
...chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex),
|
|
2874
2874
|
overflow: "hidden"
|
|
2875
2875
|
});
|
|
2876
2876
|
container.dataset.elementId = element.id;
|
|
2877
|
-
const table =
|
|
2877
|
+
const table = chunk4PYBBOIK_cjs.createEl(doc, "table", "pptxv-table-grid", {
|
|
2878
2878
|
width: "100%",
|
|
2879
2879
|
height: "100%",
|
|
2880
2880
|
borderCollapse: "collapse",
|
|
@@ -2883,7 +2883,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2883
2883
|
// font stack; all five bindings declare the same shared default here.
|
|
2884
2884
|
fontFamily: chunk6KLPQQYP_cjs.DEFAULT_FONT_FAMILY,
|
|
2885
2885
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
2886
|
-
...
|
|
2886
|
+
...chunkNFP4PCTP_cjs.tableContainerCss(tableData)
|
|
2887
2887
|
});
|
|
2888
2888
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
2889
2889
|
const tbody = doc.createElement("tbody");
|
|
@@ -2945,13 +2945,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
2945
2945
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
2946
2946
|
td.rowSpan = cell.rowSpan;
|
|
2947
2947
|
}
|
|
2948
|
-
const style =
|
|
2948
|
+
const style = chunkNFP4PCTP_cjs.tableCellCss(
|
|
2949
2949
|
tableData,
|
|
2950
2950
|
cell,
|
|
2951
2951
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
2952
2952
|
styleContext
|
|
2953
2953
|
);
|
|
2954
|
-
const patternFill = cell.style ?
|
|
2954
|
+
const patternFill = cell.style ? chunkNFP4PCTP_cjs.cellPatternFillCss(cell.style) : null;
|
|
2955
2955
|
if (patternFill) {
|
|
2956
2956
|
delete style["backgroundColor"];
|
|
2957
2957
|
delete style["background"];
|
|
@@ -2962,9 +2962,9 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
2962
2962
|
style["backgroundColor"] = patternFill.backgroundColor;
|
|
2963
2963
|
}
|
|
2964
2964
|
}
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
const diagonals =
|
|
2965
|
+
chunk4PYBBOIK_cjs.applyStyleMap(td, CELL_BASE_STYLE);
|
|
2966
|
+
chunk4PYBBOIK_cjs.applyStyleMap(td, style);
|
|
2967
|
+
const diagonals = chunkNFP4PCTP_cjs.getCellDiagonalBorders(
|
|
2968
2968
|
cell.style,
|
|
2969
2969
|
tableData,
|
|
2970
2970
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -2977,17 +2977,17 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
2977
2977
|
return td;
|
|
2978
2978
|
}
|
|
2979
2979
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
2980
|
-
const line =
|
|
2980
|
+
const line = chunk4PYBBOIK_cjs.createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
2981
2981
|
line.style.setProperty("stroke-width", chunkFM4C4MBJ_cjs.screenStrokeWidth(width));
|
|
2982
2982
|
return line;
|
|
2983
2983
|
}
|
|
2984
2984
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
2985
|
-
const svg =
|
|
2985
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(doc, "svg", {
|
|
2986
2986
|
class: "pptxv-table-diag",
|
|
2987
2987
|
"aria-hidden": "true",
|
|
2988
2988
|
preserveAspectRatio: "none"
|
|
2989
2989
|
});
|
|
2990
|
-
|
|
2990
|
+
chunk4PYBBOIK_cjs.applyStyleMap(svg, {
|
|
2991
2991
|
position: "absolute",
|
|
2992
2992
|
inset: 0,
|
|
2993
2993
|
width: "100%",
|
|
@@ -3008,10 +3008,10 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3008
3008
|
return svg;
|
|
3009
3009
|
}
|
|
3010
3010
|
function appendCellText(doc, td, cell, cellCss) {
|
|
3011
|
-
const blocks =
|
|
3011
|
+
const blocks = chunkNFP4PCTP_cjs.cellParagraphBlocks(cell);
|
|
3012
3012
|
if (blocks) {
|
|
3013
3013
|
for (const block of blocks) {
|
|
3014
|
-
const div =
|
|
3014
|
+
const div = chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
3015
3015
|
appendRuns(doc, div, block.runs, cellCss);
|
|
3016
3016
|
td.appendChild(div);
|
|
3017
3017
|
}
|
|
@@ -3020,7 +3020,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3020
3020
|
const richCell = cell;
|
|
3021
3021
|
const textRuns = richCell.textRuns && richCell.textRuns.length > 0 ? richCell.textRuns : null;
|
|
3022
3022
|
if (!textRuns) {
|
|
3023
|
-
const span =
|
|
3023
|
+
const span = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-table-text", { position: "relative" });
|
|
3024
3024
|
span.textContent = cell.text || " ";
|
|
3025
3025
|
td.appendChild(span);
|
|
3026
3026
|
return;
|
|
@@ -3028,7 +3028,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3028
3028
|
for (const run of textRuns) {
|
|
3029
3029
|
if (run.isParagraphBreak) {
|
|
3030
3030
|
td.appendChild(
|
|
3031
|
-
|
|
3031
|
+
chunk4PYBBOIK_cjs.createEl(doc, "div", "pptxv-table-para-break", { display: "block", height: 0 })
|
|
3032
3032
|
);
|
|
3033
3033
|
continue;
|
|
3034
3034
|
}
|
|
@@ -3041,9 +3041,9 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3041
3041
|
parent.appendChild(doc.createElement("br"));
|
|
3042
3042
|
continue;
|
|
3043
3043
|
}
|
|
3044
|
-
const span =
|
|
3044
|
+
const span = chunk4PYBBOIK_cjs.createEl(doc, "span", "pptxv-table-run", {
|
|
3045
3045
|
position: "relative",
|
|
3046
|
-
...
|
|
3046
|
+
...chunkNFP4PCTP_cjs.cellRunStyle(run, cellCss)
|
|
3047
3047
|
});
|
|
3048
3048
|
span.textContent = run.text;
|
|
3049
3049
|
parent.appendChild(span);
|
|
@@ -3057,8 +3057,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
|
|
3059
3059
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3060
|
-
var glyphOutlineFontCache = new
|
|
3061
|
-
var getGlyphOutline =
|
|
3060
|
+
var glyphOutlineFontCache = new chunkNFP4PCTP_cjs.GlyphOutlineFontCache();
|
|
3061
|
+
var getGlyphOutline = chunkNFP4PCTP_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3062
3062
|
|
|
3063
3063
|
// src/pptx/dom/elements/text-warp.ts
|
|
3064
3064
|
function renderWarpedText(element, context) {
|
|
@@ -3070,16 +3070,16 @@ function renderWarpedText(element, context) {
|
|
|
3070
3070
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3071
3071
|
return null;
|
|
3072
3072
|
}
|
|
3073
|
-
const paragraphs =
|
|
3073
|
+
const paragraphs = chunkNFP4PCTP_cjs.groupIntoParagraphs(element);
|
|
3074
3074
|
if (paragraphs.length === 0) {
|
|
3075
3075
|
return null;
|
|
3076
3076
|
}
|
|
3077
|
-
if (!
|
|
3078
|
-
const transform =
|
|
3077
|
+
if (!chunkNFP4PCTP_cjs.shouldUseSvgWarp(preset)) {
|
|
3078
|
+
const transform = chunkNFP4PCTP_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3079
3079
|
if (!transform) {
|
|
3080
3080
|
return null;
|
|
3081
3081
|
}
|
|
3082
|
-
const text =
|
|
3082
|
+
const text = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-wordart", {
|
|
3083
3083
|
width: "100%",
|
|
3084
3084
|
height: "100%",
|
|
3085
3085
|
display: "flex",
|
|
@@ -3097,14 +3097,14 @@ function renderWarpedText(element, context) {
|
|
|
3097
3097
|
if (style?.fontSize) {
|
|
3098
3098
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3099
3099
|
}
|
|
3100
|
-
const fontWeight =
|
|
3100
|
+
const fontWeight = chunkNFP4PCTP_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3101
3101
|
if (fontWeight) {
|
|
3102
3102
|
text.style.fontWeight = fontWeight;
|
|
3103
3103
|
}
|
|
3104
3104
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3105
3105
|
return text;
|
|
3106
3106
|
}
|
|
3107
|
-
if (
|
|
3107
|
+
if (chunkNFP4PCTP_cjs.hasGlyphEnvelope(preset)) {
|
|
3108
3108
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3109
3109
|
}
|
|
3110
3110
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3124,13 +3124,13 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3124
3124
|
const preset = style.textWarpPreset;
|
|
3125
3125
|
const width = Math.max(element.width, 1);
|
|
3126
3126
|
const height = Math.max(element.height, 1);
|
|
3127
|
-
const svg =
|
|
3127
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(context.document, "svg", {
|
|
3128
3128
|
viewBox: `0 0 ${width} ${height}`,
|
|
3129
3129
|
"aria-hidden": "true"
|
|
3130
3130
|
});
|
|
3131
3131
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3132
3132
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3133
|
-
const perLine =
|
|
3133
|
+
const perLine = chunkNFP4PCTP_cjs.buildGlyphEnvelopeBlock(
|
|
3134
3134
|
preset,
|
|
3135
3135
|
paragraphs.map(
|
|
3136
3136
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3157,16 +3157,16 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3157
3157
|
fill,
|
|
3158
3158
|
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunk6KLPQQYP_cjs.DEFAULT_FONT_FAMILY,
|
|
3159
3159
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3160
|
-
"font-weight":
|
|
3161
|
-
"font-style":
|
|
3160
|
+
"font-weight": chunkNFP4PCTP_cjs.fontWeightAttribute(renderedFamily, s.bold ?? style.bold),
|
|
3161
|
+
"font-style": chunkNFP4PCTP_cjs.resolveFontItalic(renderedFamily, s.italic ?? style.italic) ? "italic" : void 0
|
|
3162
3162
|
};
|
|
3163
3163
|
if (g.outlinePath) {
|
|
3164
|
-
const path =
|
|
3164
|
+
const path = chunk4PYBBOIK_cjs.createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
3165
3165
|
svg.appendChild(path);
|
|
3166
3166
|
return;
|
|
3167
3167
|
}
|
|
3168
3168
|
if (!g.slices || g.slices.length <= 1) {
|
|
3169
|
-
const text =
|
|
3169
|
+
const text = chunk4PYBBOIK_cjs.createSvgEl(context.document, "text", {
|
|
3170
3170
|
x: g.x,
|
|
3171
3171
|
y: g.y,
|
|
3172
3172
|
transform: g.transform,
|
|
@@ -3176,17 +3176,17 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3176
3176
|
svg.appendChild(text);
|
|
3177
3177
|
return;
|
|
3178
3178
|
}
|
|
3179
|
-
const group =
|
|
3179
|
+
const group = chunk4PYBBOIK_cjs.createSvgEl(context.document, "g", {
|
|
3180
3180
|
"data-glyph-slices": g.slices.length
|
|
3181
3181
|
});
|
|
3182
3182
|
g.slices.forEach((slice, sliceIndex) => {
|
|
3183
3183
|
const clipId = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-l${lineIndex}-g${glyphIndex}-s${sliceIndex}`;
|
|
3184
|
-
const clipPath =
|
|
3184
|
+
const clipPath = chunk4PYBBOIK_cjs.createSvgEl(context.document, "clipPath", {
|
|
3185
3185
|
id: clipId,
|
|
3186
3186
|
clipPathUnits: "userSpaceOnUse"
|
|
3187
3187
|
});
|
|
3188
3188
|
clipPath.appendChild(
|
|
3189
|
-
|
|
3189
|
+
chunk4PYBBOIK_cjs.createSvgEl(context.document, "rect", {
|
|
3190
3190
|
x: slice.clipX0,
|
|
3191
3191
|
y: -1e5,
|
|
3192
3192
|
width: slice.clipX1 - slice.clipX0,
|
|
@@ -3194,7 +3194,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3194
3194
|
})
|
|
3195
3195
|
);
|
|
3196
3196
|
group.appendChild(clipPath);
|
|
3197
|
-
const text =
|
|
3197
|
+
const text = chunk4PYBBOIK_cjs.createSvgEl(context.document, "text", {
|
|
3198
3198
|
x: g.x,
|
|
3199
3199
|
y: g.y,
|
|
3200
3200
|
transform: slice.transform,
|
|
@@ -3212,20 +3212,20 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3212
3212
|
function renderPathWarp(element, paragraphs, context) {
|
|
3213
3213
|
const style = element.textStyle;
|
|
3214
3214
|
const preset = style.textWarpPreset;
|
|
3215
|
-
const svg =
|
|
3215
|
+
const svg = chunk4PYBBOIK_cjs.createSvgEl(context.document, "svg", {
|
|
3216
3216
|
viewBox: `0 0 ${Math.max(element.width, 1)} ${Math.max(element.height, 1)}`,
|
|
3217
3217
|
preserveAspectRatio: "none",
|
|
3218
3218
|
"aria-hidden": "true"
|
|
3219
3219
|
});
|
|
3220
3220
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3221
3221
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3222
|
-
const defs =
|
|
3222
|
+
const defs = chunk4PYBBOIK_cjs.createSvgEl(context.document, "defs");
|
|
3223
3223
|
paragraphs.forEach((paragraph, index) => {
|
|
3224
3224
|
const id = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-${index}`;
|
|
3225
3225
|
defs.appendChild(
|
|
3226
|
-
|
|
3226
|
+
chunk4PYBBOIK_cjs.createSvgEl(context.document, "path", {
|
|
3227
3227
|
id,
|
|
3228
|
-
d:
|
|
3228
|
+
d: chunkNFP4PCTP_cjs.buildWarpPath(
|
|
3229
3229
|
preset,
|
|
3230
3230
|
element.width,
|
|
3231
3231
|
element.height,
|
|
@@ -3236,14 +3236,14 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3236
3236
|
)
|
|
3237
3237
|
})
|
|
3238
3238
|
);
|
|
3239
|
-
const text =
|
|
3239
|
+
const text = chunk4PYBBOIK_cjs.createSvgEl(context.document, "text", {
|
|
3240
3240
|
fill: style.color ?? "#000000",
|
|
3241
3241
|
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunk6KLPQQYP_cjs.DEFAULT_FONT_FAMILY,
|
|
3242
3242
|
"font-size": style.fontSize ?? 18,
|
|
3243
|
-
"font-weight":
|
|
3244
|
-
"font-style":
|
|
3243
|
+
"font-weight": chunkNFP4PCTP_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3244
|
+
"font-style": chunkNFP4PCTP_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3245
3245
|
});
|
|
3246
|
-
const textPath =
|
|
3246
|
+
const textPath = chunk4PYBBOIK_cjs.createSvgEl(context.document, "textPath", {
|
|
3247
3247
|
href: `#${id}`,
|
|
3248
3248
|
startOffset: "50%",
|
|
3249
3249
|
"text-anchor": "middle"
|
|
@@ -3258,9 +3258,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3258
3258
|
|
|
3259
3259
|
// src/pptx/dom/elements/text-shape.ts
|
|
3260
3260
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3261
|
-
const container =
|
|
3261
|
+
const container = chunkNFP4PCTP_cjs.getContainerStyle(element, zIndex);
|
|
3262
3262
|
const animState = context.presentationStates?.get(element.id);
|
|
3263
|
-
const background =
|
|
3263
|
+
const background = chunkNFP4PCTP_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3264
3264
|
const visualState = background ?? animState;
|
|
3265
3265
|
const shape = getShapeFillStrokeStyle(
|
|
3266
3266
|
element,
|
|
@@ -3268,23 +3268,23 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3268
3268
|
visualState?.animatesStroke
|
|
3269
3269
|
);
|
|
3270
3270
|
const merged = { ...container, ...shape };
|
|
3271
|
-
const transform =
|
|
3271
|
+
const transform = chunk4PYBBOIK_cjs.composeTransforms(container["transform"], shape["transform"]);
|
|
3272
3272
|
if (transform !== void 0) {
|
|
3273
3273
|
merged["transform"] = transform;
|
|
3274
3274
|
}
|
|
3275
|
-
const layers =
|
|
3276
|
-
const el =
|
|
3275
|
+
const layers = chunkNFP4PCTP_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3276
|
+
const el = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3277
3277
|
el.dataset.elementId = element.id;
|
|
3278
|
-
const paint = layers.paint ?
|
|
3278
|
+
const paint = layers.paint ? chunk4PYBBOIK_cjs.createEl(context.document, "div", void 0, layers.paint) : el;
|
|
3279
3279
|
if (paint !== el) {
|
|
3280
3280
|
paint.dataset.animId = layers.targetId;
|
|
3281
3281
|
paint.dataset.pptxAnimationLayer = "background";
|
|
3282
3282
|
el.appendChild(paint);
|
|
3283
3283
|
}
|
|
3284
3284
|
if (context.interactive && !context.presenting) {
|
|
3285
|
-
const hitTargetStyle =
|
|
3285
|
+
const hitTargetStyle = chunkNFP4PCTP_cjs.elementHitTargetStyle(element);
|
|
3286
3286
|
if (hitTargetStyle) {
|
|
3287
|
-
const hitTarget =
|
|
3287
|
+
const hitTarget = chunk4PYBBOIK_cjs.createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3288
3288
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
3289
3289
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
3290
3290
|
el.appendChild(hitTarget);
|
|
@@ -3325,8 +3325,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3325
3325
|
} else if (warped) {
|
|
3326
3326
|
el.appendChild(warped);
|
|
3327
3327
|
} else {
|
|
3328
|
-
const linkedSegments =
|
|
3329
|
-
const paragraphs =
|
|
3328
|
+
const linkedSegments = chunkNFP4PCTP_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3329
|
+
const paragraphs = chunkNFP4PCTP_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3330
3330
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3331
3331
|
if (hasText) {
|
|
3332
3332
|
el.appendChild(
|
|
@@ -3337,9 +3337,9 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3337
3337
|
);
|
|
3338
3338
|
} else {
|
|
3339
3339
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3340
|
-
const prompt =
|
|
3340
|
+
const prompt = chunkNFP4PCTP_cjs.placeholderPromptDescriptor(element, mode);
|
|
3341
3341
|
if (prompt) {
|
|
3342
|
-
const hint =
|
|
3342
|
+
const hint = chunk4PYBBOIK_cjs.createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3343
3343
|
...getTextBlockStyle(element),
|
|
3344
3344
|
...prompt.style
|
|
3345
3345
|
});
|
|
@@ -3353,7 +3353,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3353
3353
|
|
|
3354
3354
|
// src/pptx/dom/elements/index.ts
|
|
3355
3355
|
function createDefaultRegistry() {
|
|
3356
|
-
const registry =
|
|
3356
|
+
const registry = chunk4PYBBOIK_cjs.createElementRendererRegistry();
|
|
3357
3357
|
registry.register("text", renderTextShapeElement);
|
|
3358
3358
|
registry.register("shape", renderTextShapeElement);
|
|
3359
3359
|
registry.register("image", renderImageElement);
|
|
@@ -3504,111 +3504,111 @@ async function resolveImageUrls(handler, slides) {
|
|
|
3504
3504
|
|
|
3505
3505
|
Object.defineProperty(exports, "SMARTART_SVG_STYLE", {
|
|
3506
3506
|
enumerable: true,
|
|
3507
|
-
get: function () { return
|
|
3507
|
+
get: function () { return chunk4PYBBOIK_cjs.SMARTART_SVG_STYLE; }
|
|
3508
3508
|
});
|
|
3509
3509
|
Object.defineProperty(exports, "appendSvgTextLines", {
|
|
3510
3510
|
enumerable: true,
|
|
3511
|
-
get: function () { return
|
|
3511
|
+
get: function () { return chunk4PYBBOIK_cjs.appendSvgTextLines; }
|
|
3512
3512
|
});
|
|
3513
3513
|
Object.defineProperty(exports, "applyStyleMap", {
|
|
3514
3514
|
enumerable: true,
|
|
3515
|
-
get: function () { return
|
|
3515
|
+
get: function () { return chunk4PYBBOIK_cjs.applyStyleMap; }
|
|
3516
3516
|
});
|
|
3517
3517
|
Object.defineProperty(exports, "applyThreeViewTextStyle", {
|
|
3518
3518
|
enumerable: true,
|
|
3519
|
-
get: function () { return
|
|
3519
|
+
get: function () { return chunk4PYBBOIK_cjs.applyThreeViewTextStyle; }
|
|
3520
3520
|
});
|
|
3521
3521
|
Object.defineProperty(exports, "buildSmartArtFallbackSvg", {
|
|
3522
3522
|
enumerable: true,
|
|
3523
|
-
get: function () { return
|
|
3523
|
+
get: function () { return chunk4PYBBOIK_cjs.buildSmartArtFallbackSvg; }
|
|
3524
3524
|
});
|
|
3525
3525
|
Object.defineProperty(exports, "buildSmartArtInsertPreview", {
|
|
3526
3526
|
enumerable: true,
|
|
3527
|
-
get: function () { return
|
|
3527
|
+
get: function () { return chunk4PYBBOIK_cjs.buildSmartArtInsertPreview; }
|
|
3528
3528
|
});
|
|
3529
3529
|
Object.defineProperty(exports, "buildSvgGradientDefs", {
|
|
3530
3530
|
enumerable: true,
|
|
3531
|
-
get: function () { return
|
|
3531
|
+
get: function () { return chunk4PYBBOIK_cjs.buildSvgGradientDefs; }
|
|
3532
3532
|
});
|
|
3533
3533
|
Object.defineProperty(exports, "collectThreeViews", {
|
|
3534
3534
|
enumerable: true,
|
|
3535
|
-
get: function () { return
|
|
3535
|
+
get: function () { return chunk4PYBBOIK_cjs.collectThreeViews; }
|
|
3536
3536
|
});
|
|
3537
3537
|
Object.defineProperty(exports, "composeTransforms", {
|
|
3538
3538
|
enumerable: true,
|
|
3539
|
-
get: function () { return
|
|
3539
|
+
get: function () { return chunk4PYBBOIK_cjs.composeTransforms; }
|
|
3540
3540
|
});
|
|
3541
3541
|
Object.defineProperty(exports, "createEl", {
|
|
3542
3542
|
enumerable: true,
|
|
3543
|
-
get: function () { return
|
|
3543
|
+
get: function () { return chunk4PYBBOIK_cjs.createEl; }
|
|
3544
3544
|
});
|
|
3545
3545
|
Object.defineProperty(exports, "createElementRendererRegistry", {
|
|
3546
3546
|
enumerable: true,
|
|
3547
|
-
get: function () { return
|
|
3547
|
+
get: function () { return chunk4PYBBOIK_cjs.createElementRendererRegistry; }
|
|
3548
3548
|
});
|
|
3549
3549
|
Object.defineProperty(exports, "createSvgEl", {
|
|
3550
3550
|
enumerable: true,
|
|
3551
|
-
get: function () { return
|
|
3551
|
+
get: function () { return chunk4PYBBOIK_cjs.createSvgEl; }
|
|
3552
3552
|
});
|
|
3553
3553
|
Object.defineProperty(exports, "enableSmartArtEditing", {
|
|
3554
3554
|
enumerable: true,
|
|
3555
|
-
get: function () { return
|
|
3555
|
+
get: function () { return chunk4PYBBOIK_cjs.enableSmartArtEditing; }
|
|
3556
3556
|
});
|
|
3557
3557
|
Object.defineProperty(exports, "isChart3DEditable", {
|
|
3558
3558
|
enumerable: true,
|
|
3559
|
-
get: function () { return
|
|
3559
|
+
get: function () { return chunk4PYBBOIK_cjs.isChart3DEditable; }
|
|
3560
3560
|
});
|
|
3561
3561
|
Object.defineProperty(exports, "mountThreeViewInto", {
|
|
3562
3562
|
enumerable: true,
|
|
3563
|
-
get: function () { return
|
|
3563
|
+
get: function () { return chunk4PYBBOIK_cjs.mountThreeViewInto; }
|
|
3564
3564
|
});
|
|
3565
3565
|
Object.defineProperty(exports, "renderSmartArt3DElement", {
|
|
3566
3566
|
enumerable: true,
|
|
3567
|
-
get: function () { return
|
|
3567
|
+
get: function () { return chunk4PYBBOIK_cjs.renderSmartArt3DElement; }
|
|
3568
3568
|
});
|
|
3569
3569
|
Object.defineProperty(exports, "renderSmartArtElement", {
|
|
3570
3570
|
enumerable: true,
|
|
3571
|
-
get: function () { return
|
|
3571
|
+
get: function () { return chunk4PYBBOIK_cjs.renderSmartArtElement; }
|
|
3572
3572
|
});
|
|
3573
3573
|
Object.defineProperty(exports, "renderSmartArtSvg", {
|
|
3574
3574
|
enumerable: true,
|
|
3575
|
-
get: function () { return
|
|
3575
|
+
get: function () { return chunk4PYBBOIK_cjs.renderSmartArtSvg; }
|
|
3576
3576
|
});
|
|
3577
3577
|
Object.defineProperty(exports, "rendering3DFlagsOf", {
|
|
3578
3578
|
enumerable: true,
|
|
3579
|
-
get: function () { return
|
|
3579
|
+
get: function () { return chunk4PYBBOIK_cjs.rendering3DFlagsOf; }
|
|
3580
3580
|
});
|
|
3581
3581
|
Object.defineProperty(exports, "selectedChartPartOf", {
|
|
3582
3582
|
enumerable: true,
|
|
3583
|
-
get: function () { return
|
|
3583
|
+
get: function () { return chunk4PYBBOIK_cjs.selectedChartPartOf; }
|
|
3584
3584
|
});
|
|
3585
3585
|
Object.defineProperty(exports, "setSvgAttrs", {
|
|
3586
3586
|
enumerable: true,
|
|
3587
|
-
get: function () { return
|
|
3587
|
+
get: function () { return chunk4PYBBOIK_cjs.setSvgAttrs; }
|
|
3588
3588
|
});
|
|
3589
3589
|
Object.defineProperty(exports, "takeReusableThreeView", {
|
|
3590
3590
|
enumerable: true,
|
|
3591
|
-
get: function () { return
|
|
3591
|
+
get: function () { return chunk4PYBBOIK_cjs.takeReusableThreeView; }
|
|
3592
3592
|
});
|
|
3593
3593
|
Object.defineProperty(exports, "wireChartThreeViewEvents", {
|
|
3594
3594
|
enumerable: true,
|
|
3595
|
-
get: function () { return
|
|
3595
|
+
get: function () { return chunk4PYBBOIK_cjs.wireChartThreeViewEvents; }
|
|
3596
3596
|
});
|
|
3597
3597
|
Object.defineProperty(exports, "withReusableThreeViews", {
|
|
3598
3598
|
enumerable: true,
|
|
3599
|
-
get: function () { return
|
|
3599
|
+
get: function () { return chunk4PYBBOIK_cjs.withReusableThreeViews; }
|
|
3600
3600
|
});
|
|
3601
3601
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
3602
3602
|
enumerable: true,
|
|
3603
|
-
get: function () { return
|
|
3603
|
+
get: function () { return chunkNFP4PCTP_cjs.buildEmbeddedFontStyles; }
|
|
3604
3604
|
});
|
|
3605
3605
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
3606
3606
|
enumerable: true,
|
|
3607
|
-
get: function () { return
|
|
3607
|
+
get: function () { return chunkNFP4PCTP_cjs.buildFieldSubstitutionContext; }
|
|
3608
3608
|
});
|
|
3609
3609
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
3610
3610
|
enumerable: true,
|
|
3611
|
-
get: function () { return
|
|
3611
|
+
get: function () { return chunkNFP4PCTP_cjs.releasePptxRenderCaches; }
|
|
3612
3612
|
});
|
|
3613
3613
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
3614
3614
|
enumerable: true,
|