pptx-viewer-core 1.1.32 → 1.1.34
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/{SvgExporter-BkkVdcN7.d.mts → SvgExporter-CGO8Tx9z.d.mts} +1 -1
- package/dist/{SvgExporter-MDf-1CNQ.d.ts → SvgExporter-DpupBlmk.d.ts} +1 -1
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +0 -0
- package/dist/cli/index.mjs +0 -0
- package/dist/converter/index.d.mts +3 -3
- package/dist/converter/index.d.ts +3 -3
- package/dist/index.d.mts +193 -7
- package/dist/index.d.ts +193 -7
- package/dist/index.js +1073 -312
- package/dist/index.mjs +1068 -313
- package/dist/{presentation-BWchOWpy.d.mts → presentation-CyttD6sq.d.mts} +50 -1
- package/dist/{presentation-BWchOWpy.d.ts → presentation-CyttD6sq.d.ts} +50 -1
- package/dist/{text-operations-Dld03ITU.d.mts → text-operations-D5GfkYT5.d.mts} +1 -1
- package/dist/{text-operations-DTlmk6ap.d.ts → text-operations-DXebUVQp.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1584,8 +1584,8 @@ var DEFAULT_COLORS = {
|
|
|
1584
1584
|
};
|
|
1585
1585
|
var DEFAULT_MAJOR_FONT = "Calibri Light";
|
|
1586
1586
|
var DEFAULT_MINOR_FONT = "Calibri";
|
|
1587
|
-
function hexToRgb(
|
|
1588
|
-
return
|
|
1587
|
+
function hexToRgb(hex8) {
|
|
1588
|
+
return hex8.replace(/^#/, "").toUpperCase();
|
|
1589
1589
|
}
|
|
1590
1590
|
function isoNow() {
|
|
1591
1591
|
return (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z");
|
|
@@ -4258,8 +4258,8 @@ var PptxColorTransformCodec = class {
|
|
|
4258
4258
|
clampUnitInterval(value) {
|
|
4259
4259
|
return Math.min(1, Math.max(0, value));
|
|
4260
4260
|
}
|
|
4261
|
-
hexToRgb(
|
|
4262
|
-
const normalized =
|
|
4261
|
+
hexToRgb(hex8) {
|
|
4262
|
+
const normalized = hex8.replace("#", "");
|
|
4263
4263
|
if (!/^[0-9a-fA-F]{6}$/.test(normalized)) {
|
|
4264
4264
|
return void 0;
|
|
4265
4265
|
}
|
|
@@ -5769,7 +5769,7 @@ var PptxColorStyleCodec = class {
|
|
|
5769
5769
|
parseColor: (colorNode, placeholderColor) => this.parseColor(colorNode, placeholderColor),
|
|
5770
5770
|
extractColorOpacity: (colorNode) => this.extractColorOpacity(colorNode),
|
|
5771
5771
|
clampUnitInterval: (value) => this.clampUnitInterval(value),
|
|
5772
|
-
hexToRgb: (
|
|
5772
|
+
hexToRgb: (hex8) => this.hexToRgb(hex8),
|
|
5773
5773
|
rgbToHex: (r, g, b) => this.rgbToHex(r, g, b)
|
|
5774
5774
|
});
|
|
5775
5775
|
this.shapeEffectXmlCodec = new PptxShapeEffectXmlCodec({
|
|
@@ -5792,8 +5792,8 @@ var PptxColorStyleCodec = class {
|
|
|
5792
5792
|
clampUnitInterval(value) {
|
|
5793
5793
|
return this.colorTransformCodec.clampUnitInterval(value);
|
|
5794
5794
|
}
|
|
5795
|
-
hexToRgb(
|
|
5796
|
-
return this.colorTransformCodec.hexToRgb(
|
|
5795
|
+
hexToRgb(hex8) {
|
|
5796
|
+
return this.colorTransformCodec.hexToRgb(hex8);
|
|
5797
5797
|
}
|
|
5798
5798
|
rgbToHex(r, g, b) {
|
|
5799
5799
|
return this.colorTransformCodec.rgbToHex(r, g, b);
|
|
@@ -5964,9 +5964,9 @@ function normalizeHex(value) {
|
|
|
5964
5964
|
if (raw.length === 0) {
|
|
5965
5965
|
return "";
|
|
5966
5966
|
}
|
|
5967
|
-
const
|
|
5968
|
-
if (/^[0-9a-fA-F]{6}$/.test(
|
|
5969
|
-
return
|
|
5967
|
+
const hex8 = raw.replace(/^#/, "");
|
|
5968
|
+
if (/^[0-9a-fA-F]{6}$/.test(hex8)) {
|
|
5969
|
+
return hex8.toUpperCase();
|
|
5970
5970
|
}
|
|
5971
5971
|
return raw.toLowerCase();
|
|
5972
5972
|
}
|
|
@@ -5976,8 +5976,8 @@ function colorsEqual(left, right) {
|
|
|
5976
5976
|
}
|
|
5977
5977
|
return normalizeHex(left) === normalizeHex(right);
|
|
5978
5978
|
}
|
|
5979
|
-
function buildSrgbColorChoice(
|
|
5980
|
-
const normalized = String(
|
|
5979
|
+
function buildSrgbColorChoice(hex8, opacity) {
|
|
5980
|
+
const normalized = String(hex8 || "").replace(/^#/, "");
|
|
5981
5981
|
const srgb = { "@_val": normalized };
|
|
5982
5982
|
if (typeof opacity === "number" && Number.isFinite(opacity) && opacity >= 0 && opacity < 1) {
|
|
5983
5983
|
const alphaPct = Math.round(Math.max(0, Math.min(1, opacity)) * 1e5);
|
|
@@ -6984,15 +6984,15 @@ var PptxMediaDataParser = class {
|
|
|
6984
6984
|
|
|
6985
6985
|
// src/core/utils/ole-utils.ts
|
|
6986
6986
|
var PROG_ID_MAP = [
|
|
6987
|
-
{ pattern: /^Excel\./
|
|
6988
|
-
{ pattern: /^Word\./
|
|
6989
|
-
{ pattern: /^PowerPoint\./
|
|
6990
|
-
{ pattern: /^Visio\./
|
|
6991
|
-
{ pattern: /^Equation\./
|
|
6992
|
-
{ pattern: /^MathType/
|
|
6993
|
-
{ pattern: /^AcroExch\./
|
|
6994
|
-
{ pattern: /^Acrobat\./
|
|
6995
|
-
{ pattern: /^Package$/
|
|
6987
|
+
{ pattern: /^Excel\./iu, type: "excel", extension: "xlsx" },
|
|
6988
|
+
{ pattern: /^Word\./iu, type: "word", extension: "docx" },
|
|
6989
|
+
{ pattern: /^PowerPoint\./iu, type: "excel", extension: "pptx" },
|
|
6990
|
+
{ pattern: /^Visio\./iu, type: "visio", extension: "vsdx" },
|
|
6991
|
+
{ pattern: /^Equation\./iu, type: "mathtype", extension: "wmf" },
|
|
6992
|
+
{ pattern: /^MathType/iu, type: "mathtype", extension: "wmf" },
|
|
6993
|
+
{ pattern: /^AcroExch\./iu, type: "pdf", extension: "pdf" },
|
|
6994
|
+
{ pattern: /^Acrobat\./iu, type: "pdf", extension: "pdf" },
|
|
6995
|
+
{ pattern: /^Package$/iu, type: "package", extension: "bin" }
|
|
6996
6996
|
];
|
|
6997
6997
|
var CLSID_MAP = /* @__PURE__ */ new Map([
|
|
6998
6998
|
// Excel Workbook
|
|
@@ -7019,7 +7019,7 @@ function detectOleObjectType(progId, clsId) {
|
|
|
7019
7019
|
}
|
|
7020
7020
|
}
|
|
7021
7021
|
if (clsId) {
|
|
7022
|
-
const normalised = clsId.replace(/[{}]/
|
|
7022
|
+
const normalised = clsId.replace(/[{}]/gu, "").toUpperCase().trim();
|
|
7023
7023
|
const match = CLSID_MAP.get(normalised);
|
|
7024
7024
|
if (match) {
|
|
7025
7025
|
return { oleObjectType: match.type, oleFileExtension: match.extension };
|
|
@@ -7041,6 +7041,38 @@ function inferOleExtensionFromTarget(oleTarget) {
|
|
|
7041
7041
|
}
|
|
7042
7042
|
return void 0;
|
|
7043
7043
|
}
|
|
7044
|
+
var OLE_EXTENSION_MIME_MAP = /* @__PURE__ */ new Map([
|
|
7045
|
+
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
7046
|
+
["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
|
|
7047
|
+
["xls", "application/vnd.ms-excel"],
|
|
7048
|
+
["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
7049
|
+
["docm", "application/vnd.ms-word.document.macroEnabled.12"],
|
|
7050
|
+
["doc", "application/msword"],
|
|
7051
|
+
["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
7052
|
+
["ppt", "application/vnd.ms-powerpoint"],
|
|
7053
|
+
["vsdx", "application/vnd.ms-visio.drawing"],
|
|
7054
|
+
["vsd", "application/vnd.visio"],
|
|
7055
|
+
["pdf", "application/pdf"],
|
|
7056
|
+
["rtf", "application/rtf"],
|
|
7057
|
+
["txt", "text/plain"],
|
|
7058
|
+
["csv", "text/csv"],
|
|
7059
|
+
["png", "image/png"],
|
|
7060
|
+
["jpg", "image/jpeg"],
|
|
7061
|
+
["jpeg", "image/jpeg"],
|
|
7062
|
+
["gif", "image/gif"],
|
|
7063
|
+
["wmf", "image/wmf"],
|
|
7064
|
+
["emf", "image/emf"],
|
|
7065
|
+
["zip", "application/zip"]
|
|
7066
|
+
]);
|
|
7067
|
+
function mimeTypeForOleFile(fileNameOrExtension) {
|
|
7068
|
+
const fallback = "application/octet-stream";
|
|
7069
|
+
if (!fileNameOrExtension) {
|
|
7070
|
+
return fallback;
|
|
7071
|
+
}
|
|
7072
|
+
const lastDot = fileNameOrExtension.lastIndexOf(".");
|
|
7073
|
+
const ext = (lastDot === -1 ? fileNameOrExtension : fileNameOrExtension.slice(lastDot + 1)).toLowerCase().trim();
|
|
7074
|
+
return OLE_EXTENSION_MIME_MAP.get(ext) ?? fallback;
|
|
7075
|
+
}
|
|
7044
7076
|
function getOleObjectTypeLabel(oleObjectType) {
|
|
7045
7077
|
switch (oleObjectType) {
|
|
7046
7078
|
case "excel":
|
|
@@ -8767,6 +8799,7 @@ var PptxSlideLoaderService = class {
|
|
|
8767
8799
|
if (mediaTimingMap.size > 0) {
|
|
8768
8800
|
await params.enrichMediaElementsWithTiming(slideElements, mediaTimingMap);
|
|
8769
8801
|
}
|
|
8802
|
+
await params.enrichOleElementsWithEmbeddedData(slideElements, path);
|
|
8770
8803
|
const elements = [...layoutElements, ...slideElements];
|
|
8771
8804
|
const backgroundColor = params.extractBackgroundColor(slideXmlObj) || await params.getLayoutBackgroundColor(path);
|
|
8772
8805
|
const backgroundGradient = params.extractBackgroundGradient(slideXmlObj) || await params.getLayoutBackgroundGradient(path);
|
|
@@ -9489,9 +9522,9 @@ function decodeKeyframeValue(valNode) {
|
|
|
9489
9522
|
if (strVal && strVal["@_val"] !== void 0) {
|
|
9490
9523
|
return { value: String(strVal["@_val"]), valueType: "str" };
|
|
9491
9524
|
}
|
|
9492
|
-
const
|
|
9493
|
-
if (
|
|
9494
|
-
const raw =
|
|
9525
|
+
const boolVal3 = valNode["p:boolVal"];
|
|
9526
|
+
if (boolVal3 && boolVal3["@_val"] !== void 0) {
|
|
9527
|
+
const raw = boolVal3["@_val"];
|
|
9495
9528
|
const value = raw === "1" || raw === "true";
|
|
9496
9529
|
return { value, valueType: "bool" };
|
|
9497
9530
|
}
|
|
@@ -12348,6 +12381,321 @@ function resolveLayoutDisplayName(input) {
|
|
|
12348
12381
|
return fallbackFromPath(input.path);
|
|
12349
12382
|
}
|
|
12350
12383
|
|
|
12384
|
+
// src/core/utils/ole2-parser-types.ts
|
|
12385
|
+
var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
|
|
12386
|
+
var ENDOFCHAIN = 4294967294;
|
|
12387
|
+
var FREESECT = 4294967295;
|
|
12388
|
+
var FATSECT = 4294967293;
|
|
12389
|
+
var MAXREGSECT = 4294967290;
|
|
12390
|
+
var ENTRY_TYPE_EMPTY = 0;
|
|
12391
|
+
var ENTRY_TYPE_STREAM = 2;
|
|
12392
|
+
var ENTRY_TYPE_ROOT = 5;
|
|
12393
|
+
var DIR_ENTRY_SIZE = 128;
|
|
12394
|
+
var Ole2ParseError = class extends Error {
|
|
12395
|
+
constructor(message) {
|
|
12396
|
+
super(message);
|
|
12397
|
+
this.name = "Ole2ParseError";
|
|
12398
|
+
}
|
|
12399
|
+
};
|
|
12400
|
+
|
|
12401
|
+
// src/core/utils/ole2-parser-read.ts
|
|
12402
|
+
function parseOle2(buffer) {
|
|
12403
|
+
const data = new Uint8Array(buffer);
|
|
12404
|
+
const view = new DataView(buffer);
|
|
12405
|
+
for (let i = 0; i < OLE_MAGIC.length; i++) {
|
|
12406
|
+
if (data[i] !== OLE_MAGIC[i]) {
|
|
12407
|
+
throw new Ole2ParseError("Not a valid OLE2 compound file");
|
|
12408
|
+
}
|
|
12409
|
+
}
|
|
12410
|
+
view.getUint16(24, true);
|
|
12411
|
+
const majorVersion = view.getUint16(26, true);
|
|
12412
|
+
const byteOrder = view.getUint16(28, true);
|
|
12413
|
+
if (byteOrder !== 65534) {
|
|
12414
|
+
throw new Ole2ParseError("Invalid byte order mark");
|
|
12415
|
+
}
|
|
12416
|
+
const sectorSizePower = view.getUint16(30, true);
|
|
12417
|
+
const miniSectorSizePower = view.getUint16(32, true);
|
|
12418
|
+
const sectorSize = 1 << sectorSizePower;
|
|
12419
|
+
const miniSectorSize = 1 << miniSectorSizePower;
|
|
12420
|
+
const totalFATSectors = view.getUint32(44, true);
|
|
12421
|
+
const firstDirectorySector = view.getUint32(48, true);
|
|
12422
|
+
const miniStreamCutoff = view.getUint32(56, true);
|
|
12423
|
+
const firstMiniFATSector = view.getUint32(60, true);
|
|
12424
|
+
const totalMiniFATSectors = view.getUint32(64, true);
|
|
12425
|
+
const firstDIFATSector = view.getUint32(68, true);
|
|
12426
|
+
const totalDIFATSectors = view.getUint32(72, true);
|
|
12427
|
+
function sectorOffset(sector) {
|
|
12428
|
+
return (sector + 1) * sectorSize;
|
|
12429
|
+
}
|
|
12430
|
+
function readSector(sector) {
|
|
12431
|
+
const offset = sectorOffset(sector);
|
|
12432
|
+
if (offset + sectorSize > data.length) {
|
|
12433
|
+
throw new Ole2ParseError(
|
|
12434
|
+
`Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
|
|
12435
|
+
);
|
|
12436
|
+
}
|
|
12437
|
+
return data.subarray(offset, offset + sectorSize);
|
|
12438
|
+
}
|
|
12439
|
+
const fatSectors = [];
|
|
12440
|
+
for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
|
|
12441
|
+
const sector = view.getUint32(76 + i * 4, true);
|
|
12442
|
+
if (sector <= MAXREGSECT) {
|
|
12443
|
+
fatSectors.push(sector);
|
|
12444
|
+
}
|
|
12445
|
+
}
|
|
12446
|
+
let difatSector = firstDIFATSector;
|
|
12447
|
+
for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
|
|
12448
|
+
const difatData = readSector(difatSector);
|
|
12449
|
+
const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
|
|
12450
|
+
const entriesPerSector = (sectorSize - 4) / 4;
|
|
12451
|
+
for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
|
|
12452
|
+
const sector = difatView.getUint32(i * 4, true);
|
|
12453
|
+
if (sector <= MAXREGSECT) {
|
|
12454
|
+
fatSectors.push(sector);
|
|
12455
|
+
}
|
|
12456
|
+
}
|
|
12457
|
+
difatSector = difatView.getUint32(sectorSize - 4, true);
|
|
12458
|
+
}
|
|
12459
|
+
const fatEntries = [];
|
|
12460
|
+
for (const fatSector of fatSectors) {
|
|
12461
|
+
const fatData = readSector(fatSector);
|
|
12462
|
+
const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
|
|
12463
|
+
for (let i = 0; i < sectorSize / 4; i++) {
|
|
12464
|
+
fatEntries.push(fatView.getUint32(i * 4, true));
|
|
12465
|
+
}
|
|
12466
|
+
}
|
|
12467
|
+
function readSectorChain(startSector) {
|
|
12468
|
+
const sectors = [];
|
|
12469
|
+
let current = startSector;
|
|
12470
|
+
const visited = /* @__PURE__ */ new Set();
|
|
12471
|
+
while (current <= MAXREGSECT) {
|
|
12472
|
+
if (visited.has(current)) {
|
|
12473
|
+
throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
|
|
12474
|
+
}
|
|
12475
|
+
visited.add(current);
|
|
12476
|
+
sectors.push(readSector(current));
|
|
12477
|
+
current = fatEntries[current] ?? ENDOFCHAIN;
|
|
12478
|
+
}
|
|
12479
|
+
const totalLength = sectors.length * sectorSize;
|
|
12480
|
+
const result = new Uint8Array(totalLength);
|
|
12481
|
+
let offset = 0;
|
|
12482
|
+
for (const sector of sectors) {
|
|
12483
|
+
result.set(sector, offset);
|
|
12484
|
+
offset += sectorSize;
|
|
12485
|
+
}
|
|
12486
|
+
return result;
|
|
12487
|
+
}
|
|
12488
|
+
function readStream(startSector, size) {
|
|
12489
|
+
const raw = readSectorChain(startSector);
|
|
12490
|
+
return raw.subarray(0, Math.min(size, raw.length));
|
|
12491
|
+
}
|
|
12492
|
+
const miniFatEntries = [];
|
|
12493
|
+
if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
|
|
12494
|
+
const miniFatRaw = readSectorChain(firstMiniFATSector);
|
|
12495
|
+
const miniFatView = new DataView(
|
|
12496
|
+
miniFatRaw.buffer,
|
|
12497
|
+
miniFatRaw.byteOffset,
|
|
12498
|
+
miniFatRaw.byteLength
|
|
12499
|
+
);
|
|
12500
|
+
for (let i = 0; i < miniFatRaw.length / 4; i++) {
|
|
12501
|
+
miniFatEntries.push(miniFatView.getUint32(i * 4, true));
|
|
12502
|
+
}
|
|
12503
|
+
}
|
|
12504
|
+
const dirRaw = readSectorChain(firstDirectorySector);
|
|
12505
|
+
const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
|
|
12506
|
+
const entries = [];
|
|
12507
|
+
for (let i = 0; i < numEntries; i++) {
|
|
12508
|
+
const entryOffset = i * DIR_ENTRY_SIZE;
|
|
12509
|
+
const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
|
|
12510
|
+
const nameLen = entryView.getUint16(64, true);
|
|
12511
|
+
const objectType = entryView.getUint8(66);
|
|
12512
|
+
if (objectType === ENTRY_TYPE_EMPTY) {
|
|
12513
|
+
continue;
|
|
12514
|
+
}
|
|
12515
|
+
const nameBytes = Math.max(0, nameLen - 2);
|
|
12516
|
+
let name = "";
|
|
12517
|
+
for (let j = 0; j < nameBytes; j += 2) {
|
|
12518
|
+
name += String.fromCharCode(entryView.getUint16(j, true));
|
|
12519
|
+
}
|
|
12520
|
+
const leftSiblingId = entryView.getUint32(68, true);
|
|
12521
|
+
const rightSiblingId = entryView.getUint32(72, true);
|
|
12522
|
+
const childId = entryView.getUint32(76, true);
|
|
12523
|
+
const startSector = entryView.getUint32(116, true);
|
|
12524
|
+
const sizeLow = entryView.getUint32(120, true);
|
|
12525
|
+
let size = sizeLow;
|
|
12526
|
+
if (majorVersion === 4) {
|
|
12527
|
+
entryView.getUint32(124, true);
|
|
12528
|
+
size = sizeLow;
|
|
12529
|
+
}
|
|
12530
|
+
entries.push({
|
|
12531
|
+
name,
|
|
12532
|
+
type: objectType,
|
|
12533
|
+
startSector,
|
|
12534
|
+
size,
|
|
12535
|
+
childId: childId === 4294967295 ? -1 : childId,
|
|
12536
|
+
leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
|
|
12537
|
+
rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
|
|
12538
|
+
});
|
|
12539
|
+
}
|
|
12540
|
+
const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
|
|
12541
|
+
let miniStreamData;
|
|
12542
|
+
if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
|
|
12543
|
+
miniStreamData = readSectorChain(rootEntry.startSector);
|
|
12544
|
+
}
|
|
12545
|
+
function readMiniStream(startSector, size) {
|
|
12546
|
+
if (!miniStreamData) {
|
|
12547
|
+
throw new Ole2ParseError("Mini stream container not found");
|
|
12548
|
+
}
|
|
12549
|
+
const sectors = [];
|
|
12550
|
+
let current = startSector;
|
|
12551
|
+
const visited = /* @__PURE__ */ new Set();
|
|
12552
|
+
while (current <= MAXREGSECT) {
|
|
12553
|
+
if (visited.has(current)) {
|
|
12554
|
+
throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
|
|
12555
|
+
}
|
|
12556
|
+
visited.add(current);
|
|
12557
|
+
const offset2 = current * miniSectorSize;
|
|
12558
|
+
sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
|
|
12559
|
+
current = miniFatEntries[current] ?? ENDOFCHAIN;
|
|
12560
|
+
}
|
|
12561
|
+
const totalLength = sectors.length * miniSectorSize;
|
|
12562
|
+
const result = new Uint8Array(totalLength);
|
|
12563
|
+
let offset = 0;
|
|
12564
|
+
for (const sector of sectors) {
|
|
12565
|
+
result.set(sector, offset);
|
|
12566
|
+
offset += miniSectorSize;
|
|
12567
|
+
}
|
|
12568
|
+
return result.subarray(0, Math.min(size, result.length));
|
|
12569
|
+
}
|
|
12570
|
+
function getStream(name) {
|
|
12571
|
+
const entry = entries.find(
|
|
12572
|
+
(e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
|
|
12573
|
+
);
|
|
12574
|
+
if (!entry) {
|
|
12575
|
+
return void 0;
|
|
12576
|
+
}
|
|
12577
|
+
if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
|
|
12578
|
+
return readMiniStream(entry.startSector, entry.size);
|
|
12579
|
+
}
|
|
12580
|
+
return readStream(entry.startSector, entry.size);
|
|
12581
|
+
}
|
|
12582
|
+
return { entries, getStream };
|
|
12583
|
+
}
|
|
12584
|
+
|
|
12585
|
+
// src/core/utils/ole-embedded-extract.ts
|
|
12586
|
+
function oleBytesToDataUrl(bytes, mimeType) {
|
|
12587
|
+
let binary = "";
|
|
12588
|
+
const chunkSize = 32768;
|
|
12589
|
+
for (let i = 0; i < bytes.length; i += chunkSize) {
|
|
12590
|
+
const chunk = bytes.subarray(i, i + chunkSize);
|
|
12591
|
+
binary += String.fromCharCode.apply(null, Array.from(chunk));
|
|
12592
|
+
}
|
|
12593
|
+
return `data:${mimeType};base64,${btoa(binary)}`;
|
|
12594
|
+
}
|
|
12595
|
+
var OLE10_NATIVE_STREAM_NAMES = [`${String.fromCharCode(1)}Ole10Native`, "Ole10Native"];
|
|
12596
|
+
var CONTENTS_STREAM = "CONTENTS";
|
|
12597
|
+
function isOle2CompoundFile(bytes) {
|
|
12598
|
+
if (bytes.length < OLE_MAGIC.length) {
|
|
12599
|
+
return false;
|
|
12600
|
+
}
|
|
12601
|
+
for (let i = 0; i < OLE_MAGIC.length; i++) {
|
|
12602
|
+
if (bytes[i] !== OLE_MAGIC[i]) {
|
|
12603
|
+
return false;
|
|
12604
|
+
}
|
|
12605
|
+
}
|
|
12606
|
+
return true;
|
|
12607
|
+
}
|
|
12608
|
+
function baseNameFromPath(raw) {
|
|
12609
|
+
const trimmed = raw.trim();
|
|
12610
|
+
if (trimmed.length === 0) {
|
|
12611
|
+
return void 0;
|
|
12612
|
+
}
|
|
12613
|
+
const lastSlash = Math.max(trimmed.lastIndexOf("\\"), trimmed.lastIndexOf("/"));
|
|
12614
|
+
const base = lastSlash === -1 ? trimmed : trimmed.slice(lastSlash + 1);
|
|
12615
|
+
return base.length > 0 ? base : void 0;
|
|
12616
|
+
}
|
|
12617
|
+
function readAsciiZ(bytes, offset) {
|
|
12618
|
+
let end = offset;
|
|
12619
|
+
while (end < bytes.length && bytes[end] !== 0) {
|
|
12620
|
+
end++;
|
|
12621
|
+
}
|
|
12622
|
+
let value = "";
|
|
12623
|
+
for (let i = offset; i < end; i++) {
|
|
12624
|
+
value += String.fromCharCode(bytes[i]);
|
|
12625
|
+
}
|
|
12626
|
+
return { value, next: end < bytes.length ? end + 1 : end };
|
|
12627
|
+
}
|
|
12628
|
+
function decodeOle10Native(stream) {
|
|
12629
|
+
if (stream.length < 6) {
|
|
12630
|
+
return void 0;
|
|
12631
|
+
}
|
|
12632
|
+
const view = new DataView(stream.buffer, stream.byteOffset, stream.byteLength);
|
|
12633
|
+
const declaredSize = view.getUint32(0, true);
|
|
12634
|
+
const bodyEnd = Math.min(stream.length, 4 + declaredSize);
|
|
12635
|
+
if (bodyEnd <= 4) {
|
|
12636
|
+
return void 0;
|
|
12637
|
+
}
|
|
12638
|
+
let cursor = 6;
|
|
12639
|
+
const label = readAsciiZ(stream, cursor);
|
|
12640
|
+
cursor = label.next;
|
|
12641
|
+
const sourcePath = readAsciiZ(stream, cursor);
|
|
12642
|
+
cursor = sourcePath.next;
|
|
12643
|
+
if (cursor + 8 > stream.length) {
|
|
12644
|
+
return void 0;
|
|
12645
|
+
}
|
|
12646
|
+
cursor += 4;
|
|
12647
|
+
const tempLen = view.getUint32(cursor, true);
|
|
12648
|
+
cursor += 4;
|
|
12649
|
+
if (tempLen > stream.length) {
|
|
12650
|
+
return void 0;
|
|
12651
|
+
}
|
|
12652
|
+
cursor += tempLen;
|
|
12653
|
+
if (cursor + 4 > stream.length) {
|
|
12654
|
+
return void 0;
|
|
12655
|
+
}
|
|
12656
|
+
const nativeSize = view.getUint32(cursor, true);
|
|
12657
|
+
cursor += 4;
|
|
12658
|
+
const dataEnd = Math.min(stream.length, cursor + nativeSize);
|
|
12659
|
+
if (dataEnd <= cursor) {
|
|
12660
|
+
return void 0;
|
|
12661
|
+
}
|
|
12662
|
+
const data = stream.subarray(cursor, dataEnd);
|
|
12663
|
+
const fileName = baseNameFromPath(sourcePath.value) ?? baseNameFromPath(label.value) ?? void 0;
|
|
12664
|
+
return { fileName, data };
|
|
12665
|
+
}
|
|
12666
|
+
function unwrapOleEmbedding(bytes) {
|
|
12667
|
+
if (bytes.length === 0) {
|
|
12668
|
+
return { data: bytes };
|
|
12669
|
+
}
|
|
12670
|
+
if (!isOle2CompoundFile(bytes)) {
|
|
12671
|
+
return { data: bytes };
|
|
12672
|
+
}
|
|
12673
|
+
try {
|
|
12674
|
+
const buffer = bytes.buffer.slice(
|
|
12675
|
+
bytes.byteOffset,
|
|
12676
|
+
bytes.byteOffset + bytes.byteLength
|
|
12677
|
+
);
|
|
12678
|
+
const ole = parseOle2(buffer);
|
|
12679
|
+
for (const name of OLE10_NATIVE_STREAM_NAMES) {
|
|
12680
|
+
const ole10 = ole.getStream(name);
|
|
12681
|
+
if (!ole10) {
|
|
12682
|
+
continue;
|
|
12683
|
+
}
|
|
12684
|
+
const decoded = decodeOle10Native(ole10);
|
|
12685
|
+
if (decoded && decoded.data.length > 0) {
|
|
12686
|
+
return decoded;
|
|
12687
|
+
}
|
|
12688
|
+
return { data: ole10 };
|
|
12689
|
+
}
|
|
12690
|
+
const contents = ole.getStream(CONTENTS_STREAM);
|
|
12691
|
+
if (contents && contents.length > 0) {
|
|
12692
|
+
return { data: contents };
|
|
12693
|
+
}
|
|
12694
|
+
} catch {
|
|
12695
|
+
}
|
|
12696
|
+
return { data: bytes };
|
|
12697
|
+
}
|
|
12698
|
+
|
|
12351
12699
|
// src/core/utils/signature-constants.ts
|
|
12352
12700
|
var DIGITAL_SIGNATURE_ORIGIN_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
|
|
12353
12701
|
var DIGITAL_SIGNATURE_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature";
|
|
@@ -12737,13 +13085,13 @@ function generateFontGuid() {
|
|
|
12737
13085
|
bytes[i] = Math.floor(Math.random() * 256);
|
|
12738
13086
|
}
|
|
12739
13087
|
}
|
|
12740
|
-
const
|
|
13088
|
+
const hex8 = Array.from(bytes).map((b) => b.toString(16).padStart(2, "0").toUpperCase()).join("");
|
|
12741
13089
|
return [
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
13090
|
+
hex8.substring(0, 8),
|
|
13091
|
+
hex8.substring(8, 12),
|
|
13092
|
+
hex8.substring(12, 16),
|
|
13093
|
+
hex8.substring(16, 20),
|
|
13094
|
+
hex8.substring(20, 32)
|
|
12747
13095
|
].join("-");
|
|
12748
13096
|
}
|
|
12749
13097
|
function detectFontFormat(data) {
|
|
@@ -13064,7 +13412,8 @@ function parseSeriesDataPoints(seriesNode, xmlLookup, colorParser) {
|
|
|
13064
13412
|
}).filter((dp) => dp !== void 0);
|
|
13065
13413
|
}
|
|
13066
13414
|
function parseSeriesDataLabels(seriesNode, xmlLookup) {
|
|
13067
|
-
const
|
|
13415
|
+
const dLblsNode = xmlLookup.getChildByLocalName(seriesNode, "dLbls");
|
|
13416
|
+
const dLblNodes = dLblsNode ? xmlLookup.getChildrenArrayByLocalName(dLblsNode, "dLbl") : xmlLookup.getChildrenArrayByLocalName(seriesNode, "dLbl");
|
|
13068
13417
|
if (dLblNodes.length === 0) {
|
|
13069
13418
|
return [];
|
|
13070
13419
|
}
|
|
@@ -13074,6 +13423,10 @@ function parseSeriesDataLabels(seriesNode, xmlLookup) {
|
|
|
13074
13423
|
if (idx === void 0) {
|
|
13075
13424
|
return void 0;
|
|
13076
13425
|
}
|
|
13426
|
+
const deleteNode = xmlLookup.getChildByLocalName(node, "delete");
|
|
13427
|
+
if (deleteNode?.["@_val"] === "1" || deleteNode?.["@_val"] === "true") {
|
|
13428
|
+
return { idx };
|
|
13429
|
+
}
|
|
13077
13430
|
const result = { idx };
|
|
13078
13431
|
const boolFields = [
|
|
13079
13432
|
["showVal", "showVal"],
|
|
@@ -13421,6 +13774,29 @@ function collectAxisTextValues(node, results) {
|
|
|
13421
13774
|
}
|
|
13422
13775
|
}
|
|
13423
13776
|
|
|
13777
|
+
// src/core/utils/chart-container-type-map.ts
|
|
13778
|
+
var CONTAINER_LOCAL_NAME_TO_TYPE = {
|
|
13779
|
+
barChart: "bar",
|
|
13780
|
+
bar3DChart: "bar3D",
|
|
13781
|
+
lineChart: "line",
|
|
13782
|
+
line3DChart: "line3D",
|
|
13783
|
+
pieChart: "pie",
|
|
13784
|
+
pie3DChart: "pie3D",
|
|
13785
|
+
ofPieChart: "ofPie",
|
|
13786
|
+
doughnutChart: "doughnut",
|
|
13787
|
+
areaChart: "area",
|
|
13788
|
+
area3DChart: "area3D",
|
|
13789
|
+
scatterChart: "scatter",
|
|
13790
|
+
bubbleChart: "bubble",
|
|
13791
|
+
radarChart: "radar",
|
|
13792
|
+
stockChart: "stock",
|
|
13793
|
+
surfaceChart: "surface",
|
|
13794
|
+
surface3DChart: "surface"
|
|
13795
|
+
};
|
|
13796
|
+
function chartContainerLocalNameToType(localName) {
|
|
13797
|
+
return CONTAINER_LOCAL_NAME_TO_TYPE[localName];
|
|
13798
|
+
}
|
|
13799
|
+
|
|
13424
13800
|
// src/core/utils/chart-cx-parser.ts
|
|
13425
13801
|
function extractCxSeriesColor(ser, xmlLookup) {
|
|
13426
13802
|
const spPr = xmlLookup.getChildByLocalName(ser, "spPr");
|
|
@@ -15176,10 +15552,10 @@ function applyBackgroundColorToCSld(cSld, backgroundColor) {
|
|
|
15176
15552
|
delete cSld["p:bg"];
|
|
15177
15553
|
return;
|
|
15178
15554
|
}
|
|
15179
|
-
const
|
|
15555
|
+
const hex8 = backgroundColor.replace(/^#/, "").toUpperCase();
|
|
15180
15556
|
cSld["p:bg"] = {
|
|
15181
15557
|
"p:bgPr": {
|
|
15182
|
-
"a:solidFill": { "a:srgbClr": { "@_val":
|
|
15558
|
+
"a:solidFill": { "a:srgbClr": { "@_val": hex8 } },
|
|
15183
15559
|
"a:effectLst": {}
|
|
15184
15560
|
}
|
|
15185
15561
|
};
|
|
@@ -15802,8 +16178,8 @@ function accentColor(index, themeColorMap) {
|
|
|
15802
16178
|
}
|
|
15803
16179
|
return DEFAULT_ACCENT_COLORS[index % DEFAULT_ACCENT_COLORS.length];
|
|
15804
16180
|
}
|
|
15805
|
-
function lighten(
|
|
15806
|
-
const parsed =
|
|
16181
|
+
function lighten(hex8, amount) {
|
|
16182
|
+
const parsed = hex8.replace("#", "");
|
|
15807
16183
|
const r = parseInt(parsed.substring(0, 2), 16);
|
|
15808
16184
|
const g = parseInt(parsed.substring(2, 4), 16);
|
|
15809
16185
|
const b = parseInt(parsed.substring(4, 6), 16);
|
|
@@ -18286,14 +18662,14 @@ function resolveLayoutCategory(layoutType) {
|
|
|
18286
18662
|
}
|
|
18287
18663
|
|
|
18288
18664
|
// src/core/utils/encryption-detection.ts
|
|
18289
|
-
var
|
|
18665
|
+
var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
|
|
18290
18666
|
var ZIP_MAGIC = new Uint8Array([80, 75]);
|
|
18291
18667
|
function detectFileFormat(data) {
|
|
18292
18668
|
if (data.byteLength < 8) {
|
|
18293
18669
|
return { format: "unknown", encrypted: false };
|
|
18294
18670
|
}
|
|
18295
18671
|
const header = new Uint8Array(data, 0, 8);
|
|
18296
|
-
if (
|
|
18672
|
+
if (OLE_MAGIC2.every((byte, i) => header[i] === byte)) {
|
|
18297
18673
|
return { format: "ole", encrypted: true };
|
|
18298
18674
|
}
|
|
18299
18675
|
if (header[0] === ZIP_MAGIC[0] && header[1] === ZIP_MAGIC[1]) {
|
|
@@ -18309,207 +18685,6 @@ var EncryptedFileError = class extends Error {
|
|
|
18309
18685
|
}
|
|
18310
18686
|
};
|
|
18311
18687
|
|
|
18312
|
-
// src/core/utils/ole2-parser-types.ts
|
|
18313
|
-
var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
|
|
18314
|
-
var ENDOFCHAIN = 4294967294;
|
|
18315
|
-
var FREESECT = 4294967295;
|
|
18316
|
-
var FATSECT = 4294967293;
|
|
18317
|
-
var MAXREGSECT = 4294967290;
|
|
18318
|
-
var ENTRY_TYPE_EMPTY = 0;
|
|
18319
|
-
var ENTRY_TYPE_STREAM = 2;
|
|
18320
|
-
var ENTRY_TYPE_ROOT = 5;
|
|
18321
|
-
var DIR_ENTRY_SIZE = 128;
|
|
18322
|
-
var Ole2ParseError = class extends Error {
|
|
18323
|
-
constructor(message) {
|
|
18324
|
-
super(message);
|
|
18325
|
-
this.name = "Ole2ParseError";
|
|
18326
|
-
}
|
|
18327
|
-
};
|
|
18328
|
-
|
|
18329
|
-
// src/core/utils/ole2-parser-read.ts
|
|
18330
|
-
function parseOle2(buffer) {
|
|
18331
|
-
const data = new Uint8Array(buffer);
|
|
18332
|
-
const view = new DataView(buffer);
|
|
18333
|
-
for (let i = 0; i < OLE_MAGIC2.length; i++) {
|
|
18334
|
-
if (data[i] !== OLE_MAGIC2[i]) {
|
|
18335
|
-
throw new Ole2ParseError("Not a valid OLE2 compound file");
|
|
18336
|
-
}
|
|
18337
|
-
}
|
|
18338
|
-
view.getUint16(24, true);
|
|
18339
|
-
const majorVersion = view.getUint16(26, true);
|
|
18340
|
-
const byteOrder = view.getUint16(28, true);
|
|
18341
|
-
if (byteOrder !== 65534) {
|
|
18342
|
-
throw new Ole2ParseError("Invalid byte order mark");
|
|
18343
|
-
}
|
|
18344
|
-
const sectorSizePower = view.getUint16(30, true);
|
|
18345
|
-
const miniSectorSizePower = view.getUint16(32, true);
|
|
18346
|
-
const sectorSize = 1 << sectorSizePower;
|
|
18347
|
-
const miniSectorSize = 1 << miniSectorSizePower;
|
|
18348
|
-
const totalFATSectors = view.getUint32(44, true);
|
|
18349
|
-
const firstDirectorySector = view.getUint32(48, true);
|
|
18350
|
-
const miniStreamCutoff = view.getUint32(56, true);
|
|
18351
|
-
const firstMiniFATSector = view.getUint32(60, true);
|
|
18352
|
-
const totalMiniFATSectors = view.getUint32(64, true);
|
|
18353
|
-
const firstDIFATSector = view.getUint32(68, true);
|
|
18354
|
-
const totalDIFATSectors = view.getUint32(72, true);
|
|
18355
|
-
function sectorOffset(sector) {
|
|
18356
|
-
return (sector + 1) * sectorSize;
|
|
18357
|
-
}
|
|
18358
|
-
function readSector(sector) {
|
|
18359
|
-
const offset = sectorOffset(sector);
|
|
18360
|
-
if (offset + sectorSize > data.length) {
|
|
18361
|
-
throw new Ole2ParseError(
|
|
18362
|
-
`Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
|
|
18363
|
-
);
|
|
18364
|
-
}
|
|
18365
|
-
return data.subarray(offset, offset + sectorSize);
|
|
18366
|
-
}
|
|
18367
|
-
const fatSectors = [];
|
|
18368
|
-
for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
|
|
18369
|
-
const sector = view.getUint32(76 + i * 4, true);
|
|
18370
|
-
if (sector <= MAXREGSECT) {
|
|
18371
|
-
fatSectors.push(sector);
|
|
18372
|
-
}
|
|
18373
|
-
}
|
|
18374
|
-
let difatSector = firstDIFATSector;
|
|
18375
|
-
for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
|
|
18376
|
-
const difatData = readSector(difatSector);
|
|
18377
|
-
const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
|
|
18378
|
-
const entriesPerSector = (sectorSize - 4) / 4;
|
|
18379
|
-
for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
|
|
18380
|
-
const sector = difatView.getUint32(i * 4, true);
|
|
18381
|
-
if (sector <= MAXREGSECT) {
|
|
18382
|
-
fatSectors.push(sector);
|
|
18383
|
-
}
|
|
18384
|
-
}
|
|
18385
|
-
difatSector = difatView.getUint32(sectorSize - 4, true);
|
|
18386
|
-
}
|
|
18387
|
-
const fatEntries = [];
|
|
18388
|
-
for (const fatSector of fatSectors) {
|
|
18389
|
-
const fatData = readSector(fatSector);
|
|
18390
|
-
const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
|
|
18391
|
-
for (let i = 0; i < sectorSize / 4; i++) {
|
|
18392
|
-
fatEntries.push(fatView.getUint32(i * 4, true));
|
|
18393
|
-
}
|
|
18394
|
-
}
|
|
18395
|
-
function readSectorChain(startSector) {
|
|
18396
|
-
const sectors = [];
|
|
18397
|
-
let current = startSector;
|
|
18398
|
-
const visited = /* @__PURE__ */ new Set();
|
|
18399
|
-
while (current <= MAXREGSECT) {
|
|
18400
|
-
if (visited.has(current)) {
|
|
18401
|
-
throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
|
|
18402
|
-
}
|
|
18403
|
-
visited.add(current);
|
|
18404
|
-
sectors.push(readSector(current));
|
|
18405
|
-
current = fatEntries[current] ?? ENDOFCHAIN;
|
|
18406
|
-
}
|
|
18407
|
-
const totalLength = sectors.length * sectorSize;
|
|
18408
|
-
const result = new Uint8Array(totalLength);
|
|
18409
|
-
let offset = 0;
|
|
18410
|
-
for (const sector of sectors) {
|
|
18411
|
-
result.set(sector, offset);
|
|
18412
|
-
offset += sectorSize;
|
|
18413
|
-
}
|
|
18414
|
-
return result;
|
|
18415
|
-
}
|
|
18416
|
-
function readStream(startSector, size) {
|
|
18417
|
-
const raw = readSectorChain(startSector);
|
|
18418
|
-
return raw.subarray(0, Math.min(size, raw.length));
|
|
18419
|
-
}
|
|
18420
|
-
const miniFatEntries = [];
|
|
18421
|
-
if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
|
|
18422
|
-
const miniFatRaw = readSectorChain(firstMiniFATSector);
|
|
18423
|
-
const miniFatView = new DataView(
|
|
18424
|
-
miniFatRaw.buffer,
|
|
18425
|
-
miniFatRaw.byteOffset,
|
|
18426
|
-
miniFatRaw.byteLength
|
|
18427
|
-
);
|
|
18428
|
-
for (let i = 0; i < miniFatRaw.length / 4; i++) {
|
|
18429
|
-
miniFatEntries.push(miniFatView.getUint32(i * 4, true));
|
|
18430
|
-
}
|
|
18431
|
-
}
|
|
18432
|
-
const dirRaw = readSectorChain(firstDirectorySector);
|
|
18433
|
-
const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
|
|
18434
|
-
const entries = [];
|
|
18435
|
-
for (let i = 0; i < numEntries; i++) {
|
|
18436
|
-
const entryOffset = i * DIR_ENTRY_SIZE;
|
|
18437
|
-
const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
|
|
18438
|
-
const nameLen = entryView.getUint16(64, true);
|
|
18439
|
-
const objectType = entryView.getUint8(66);
|
|
18440
|
-
if (objectType === ENTRY_TYPE_EMPTY) {
|
|
18441
|
-
continue;
|
|
18442
|
-
}
|
|
18443
|
-
const nameBytes = Math.max(0, nameLen - 2);
|
|
18444
|
-
let name = "";
|
|
18445
|
-
for (let j = 0; j < nameBytes; j += 2) {
|
|
18446
|
-
name += String.fromCharCode(entryView.getUint16(j, true));
|
|
18447
|
-
}
|
|
18448
|
-
const leftSiblingId = entryView.getUint32(68, true);
|
|
18449
|
-
const rightSiblingId = entryView.getUint32(72, true);
|
|
18450
|
-
const childId = entryView.getUint32(76, true);
|
|
18451
|
-
const startSector = entryView.getUint32(116, true);
|
|
18452
|
-
const sizeLow = entryView.getUint32(120, true);
|
|
18453
|
-
let size = sizeLow;
|
|
18454
|
-
if (majorVersion === 4) {
|
|
18455
|
-
entryView.getUint32(124, true);
|
|
18456
|
-
size = sizeLow;
|
|
18457
|
-
}
|
|
18458
|
-
entries.push({
|
|
18459
|
-
name,
|
|
18460
|
-
type: objectType,
|
|
18461
|
-
startSector,
|
|
18462
|
-
size,
|
|
18463
|
-
childId: childId === 4294967295 ? -1 : childId,
|
|
18464
|
-
leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
|
|
18465
|
-
rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
|
|
18466
|
-
});
|
|
18467
|
-
}
|
|
18468
|
-
const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
|
|
18469
|
-
let miniStreamData;
|
|
18470
|
-
if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
|
|
18471
|
-
miniStreamData = readSectorChain(rootEntry.startSector);
|
|
18472
|
-
}
|
|
18473
|
-
function readMiniStream(startSector, size) {
|
|
18474
|
-
if (!miniStreamData) {
|
|
18475
|
-
throw new Ole2ParseError("Mini stream container not found");
|
|
18476
|
-
}
|
|
18477
|
-
const sectors = [];
|
|
18478
|
-
let current = startSector;
|
|
18479
|
-
const visited = /* @__PURE__ */ new Set();
|
|
18480
|
-
while (current <= MAXREGSECT) {
|
|
18481
|
-
if (visited.has(current)) {
|
|
18482
|
-
throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
|
|
18483
|
-
}
|
|
18484
|
-
visited.add(current);
|
|
18485
|
-
const offset2 = current * miniSectorSize;
|
|
18486
|
-
sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
|
|
18487
|
-
current = miniFatEntries[current] ?? ENDOFCHAIN;
|
|
18488
|
-
}
|
|
18489
|
-
const totalLength = sectors.length * miniSectorSize;
|
|
18490
|
-
const result = new Uint8Array(totalLength);
|
|
18491
|
-
let offset = 0;
|
|
18492
|
-
for (const sector of sectors) {
|
|
18493
|
-
result.set(sector, offset);
|
|
18494
|
-
offset += miniSectorSize;
|
|
18495
|
-
}
|
|
18496
|
-
return result.subarray(0, Math.min(size, result.length));
|
|
18497
|
-
}
|
|
18498
|
-
function getStream(name) {
|
|
18499
|
-
const entry = entries.find(
|
|
18500
|
-
(e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
|
|
18501
|
-
);
|
|
18502
|
-
if (!entry) {
|
|
18503
|
-
return void 0;
|
|
18504
|
-
}
|
|
18505
|
-
if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
|
|
18506
|
-
return readMiniStream(entry.startSector, entry.size);
|
|
18507
|
-
}
|
|
18508
|
-
return readStream(entry.startSector, entry.size);
|
|
18509
|
-
}
|
|
18510
|
-
return { entries, getStream };
|
|
18511
|
-
}
|
|
18512
|
-
|
|
18513
18688
|
// src/core/utils/ole2-parser-write.ts
|
|
18514
18689
|
function compareDirEntryNames(a, b) {
|
|
18515
18690
|
if (a.length !== b.length) {
|
|
@@ -18556,7 +18731,7 @@ function writeInt32Sectors(outBytes, int32Data, firstSector, numSectors, sectorS
|
|
|
18556
18731
|
}
|
|
18557
18732
|
}
|
|
18558
18733
|
function writeHeader(outView, outBytes, params) {
|
|
18559
|
-
outBytes.set(
|
|
18734
|
+
outBytes.set(OLE_MAGIC, 0);
|
|
18560
18735
|
outView.setUint16(24, 62, true);
|
|
18561
18736
|
outView.setUint16(26, 3, true);
|
|
18562
18737
|
outView.setUint16(28, 65534, true);
|
|
@@ -21418,11 +21593,11 @@ async function repairPptx(buffer) {
|
|
|
21418
21593
|
}
|
|
21419
21594
|
|
|
21420
21595
|
// src/core/utils/theme-switching.ts
|
|
21421
|
-
function normalizeHex2(
|
|
21422
|
-
if (!
|
|
21596
|
+
function normalizeHex2(hex8) {
|
|
21597
|
+
if (!hex8) {
|
|
21423
21598
|
return "";
|
|
21424
21599
|
}
|
|
21425
|
-
return
|
|
21600
|
+
return hex8.replace(/^#/, "").toUpperCase().slice(0, 6);
|
|
21426
21601
|
}
|
|
21427
21602
|
function buildColorRemapTable(oldColorMap, newColorMap) {
|
|
21428
21603
|
const remap = /* @__PURE__ */ new Map();
|
|
@@ -21616,8 +21791,8 @@ function applyThemeToData(data, newColorScheme, newFontScheme, themeName) {
|
|
|
21616
21791
|
}
|
|
21617
21792
|
|
|
21618
21793
|
// src/core/utils/accessibility-checker.ts
|
|
21619
|
-
function parseHexColor(
|
|
21620
|
-
const cleaned =
|
|
21794
|
+
function parseHexColor(hex8) {
|
|
21795
|
+
const cleaned = hex8.replace(/^#/, "");
|
|
21621
21796
|
if (!/^[\da-fA-F]+$/.test(cleaned)) {
|
|
21622
21797
|
return null;
|
|
21623
21798
|
}
|
|
@@ -24917,6 +25092,37 @@ function ensureArray6(v) {
|
|
|
24917
25092
|
}
|
|
24918
25093
|
return Array.isArray(v) ? v : [v];
|
|
24919
25094
|
}
|
|
25095
|
+
function consolidateComboContainersInXml(plotArea, getLocalName) {
|
|
25096
|
+
const containerKeys = Object.keys(plotArea).filter((k) => getLocalName(k).endsWith("Chart"));
|
|
25097
|
+
if (containerKeys.length === 0) {
|
|
25098
|
+
return void 0;
|
|
25099
|
+
}
|
|
25100
|
+
const primaryKey = containerKeys[0];
|
|
25101
|
+
if (containerKeys.length === 1) {
|
|
25102
|
+
return primaryKey;
|
|
25103
|
+
}
|
|
25104
|
+
const primary = plotArea[primaryKey];
|
|
25105
|
+
if (!primary) {
|
|
25106
|
+
return primaryKey;
|
|
25107
|
+
}
|
|
25108
|
+
const serKey = findKey4(primary, "ser", getLocalName) ?? "c:ser";
|
|
25109
|
+
const allSeries = [];
|
|
25110
|
+
for (const key of containerKeys) {
|
|
25111
|
+
const container = plotArea[key];
|
|
25112
|
+
if (!container) {
|
|
25113
|
+
continue;
|
|
25114
|
+
}
|
|
25115
|
+
const containerSerKey = findKey4(container, "ser", getLocalName);
|
|
25116
|
+
if (containerSerKey) {
|
|
25117
|
+
allSeries.push(...ensureArray6(container[containerSerKey]));
|
|
25118
|
+
}
|
|
25119
|
+
if (key !== primaryKey) {
|
|
25120
|
+
delete plotArea[key];
|
|
25121
|
+
}
|
|
25122
|
+
}
|
|
25123
|
+
primary[serKey] = allSeries.length === 1 ? allSeries[0] : allSeries;
|
|
25124
|
+
return primaryKey;
|
|
25125
|
+
}
|
|
24920
25126
|
function effectiveContainers(series, chartLevelType) {
|
|
24921
25127
|
return series.map((s) => {
|
|
24922
25128
|
const t = s.seriesChartType ?? chartLevelType;
|
|
@@ -25368,6 +25574,146 @@ function applySeriesMarkerToXml(seriesNode, marker, getLocalName) {
|
|
|
25368
25574
|
insertOrdered2(seriesNode, "c:marker", built, getLocalName);
|
|
25369
25575
|
}
|
|
25370
25576
|
|
|
25577
|
+
// src/core/utils/chart-series-datalabel-serializer.ts
|
|
25578
|
+
function findKey9(obj, local, getLocalName) {
|
|
25579
|
+
return Object.keys(obj).find((k) => getLocalName(k) === local);
|
|
25580
|
+
}
|
|
25581
|
+
function boolVal2(on) {
|
|
25582
|
+
return { "@_val": on ? "1" : "0" };
|
|
25583
|
+
}
|
|
25584
|
+
var AFTER_DLBLS = /* @__PURE__ */ new Set(["cat", "val", "xVal", "yVal", "bubbleSize", "smooth", "extLst"]);
|
|
25585
|
+
var DLBLS_GROUP_ORDER = [
|
|
25586
|
+
"numFmt",
|
|
25587
|
+
"spPr",
|
|
25588
|
+
"txPr",
|
|
25589
|
+
"dLblPos",
|
|
25590
|
+
"showLegendKey",
|
|
25591
|
+
"showVal",
|
|
25592
|
+
"showCatName",
|
|
25593
|
+
"showSerName",
|
|
25594
|
+
"showPercent",
|
|
25595
|
+
"showBubbleSize",
|
|
25596
|
+
"separator",
|
|
25597
|
+
"showLeaderLines",
|
|
25598
|
+
"leaderLines"
|
|
25599
|
+
];
|
|
25600
|
+
function buildDLbl(existing, label, getLocalName) {
|
|
25601
|
+
const node = {};
|
|
25602
|
+
node["c:idx"] = { "@_val": String(label.idx) };
|
|
25603
|
+
const hasShow = label.showVal !== void 0 || label.showCatName !== void 0 || label.showSerName !== void 0 || label.showPercent !== void 0 || label.showLegendKey !== void 0 || label.showBubbleSize !== void 0;
|
|
25604
|
+
const hasContent = hasShow || label.position !== void 0 || label.text !== void 0;
|
|
25605
|
+
if (!hasContent) {
|
|
25606
|
+
node["c:delete"] = { "@_val": "1" };
|
|
25607
|
+
return node;
|
|
25608
|
+
}
|
|
25609
|
+
if (existing) {
|
|
25610
|
+
const layoutKey = findKey9(existing, "layout", getLocalName);
|
|
25611
|
+
if (layoutKey) {
|
|
25612
|
+
node[layoutKey] = existing[layoutKey];
|
|
25613
|
+
}
|
|
25614
|
+
}
|
|
25615
|
+
if (label.text !== void 0) {
|
|
25616
|
+
node["c:tx"] = {
|
|
25617
|
+
"c:rich": {
|
|
25618
|
+
"a:bodyPr": {},
|
|
25619
|
+
"a:lstStyle": {},
|
|
25620
|
+
"a:p": { "a:r": { "a:t": label.text } }
|
|
25621
|
+
}
|
|
25622
|
+
};
|
|
25623
|
+
} else if (existing) {
|
|
25624
|
+
const txKey = findKey9(existing, "tx", getLocalName);
|
|
25625
|
+
if (txKey) {
|
|
25626
|
+
node[txKey] = existing[txKey];
|
|
25627
|
+
}
|
|
25628
|
+
}
|
|
25629
|
+
if (existing) {
|
|
25630
|
+
for (const local of ["numFmt", "spPr", "txPr"]) {
|
|
25631
|
+
const k = findKey9(existing, local, getLocalName);
|
|
25632
|
+
if (k) {
|
|
25633
|
+
node[k] = existing[k];
|
|
25634
|
+
}
|
|
25635
|
+
}
|
|
25636
|
+
}
|
|
25637
|
+
if (label.position !== void 0) {
|
|
25638
|
+
node["c:dLblPos"] = { "@_val": label.position };
|
|
25639
|
+
}
|
|
25640
|
+
if (label.showLegendKey !== void 0) {
|
|
25641
|
+
node["c:showLegendKey"] = boolVal2(label.showLegendKey);
|
|
25642
|
+
}
|
|
25643
|
+
if (label.showVal !== void 0) {
|
|
25644
|
+
node["c:showVal"] = boolVal2(label.showVal);
|
|
25645
|
+
}
|
|
25646
|
+
if (label.showCatName !== void 0) {
|
|
25647
|
+
node["c:showCatName"] = boolVal2(label.showCatName);
|
|
25648
|
+
}
|
|
25649
|
+
if (label.showSerName !== void 0) {
|
|
25650
|
+
node["c:showSerName"] = boolVal2(label.showSerName);
|
|
25651
|
+
}
|
|
25652
|
+
if (label.showPercent !== void 0) {
|
|
25653
|
+
node["c:showPercent"] = boolVal2(label.showPercent);
|
|
25654
|
+
}
|
|
25655
|
+
if (label.showBubbleSize !== void 0) {
|
|
25656
|
+
node["c:showBubbleSize"] = boolVal2(label.showBubbleSize);
|
|
25657
|
+
}
|
|
25658
|
+
return node;
|
|
25659
|
+
}
|
|
25660
|
+
function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName) {
|
|
25661
|
+
const dLblsKey = findKey9(seriesNode, "dLbls", getLocalName);
|
|
25662
|
+
const labels = dataLabels ?? [];
|
|
25663
|
+
const existingByIdx = /* @__PURE__ */ new Map();
|
|
25664
|
+
let groupChildren = [];
|
|
25665
|
+
if (dLblsKey) {
|
|
25666
|
+
const dLbls = seriesNode[dLblsKey];
|
|
25667
|
+
const dLblKey = findKey9(dLbls, "dLbl", getLocalName);
|
|
25668
|
+
if (dLblKey) {
|
|
25669
|
+
const nodes = Array.isArray(dLbls[dLblKey]) ? dLbls[dLblKey] : [dLbls[dLblKey]];
|
|
25670
|
+
for (const node of nodes) {
|
|
25671
|
+
const idxKey = findKey9(node, "idx", getLocalName);
|
|
25672
|
+
const idxNode = idxKey ? node[idxKey] : void 0;
|
|
25673
|
+
const idx = idxNode ? Number.parseInt(String(idxNode["@_val"]), 10) : NaN;
|
|
25674
|
+
if (Number.isFinite(idx)) {
|
|
25675
|
+
existingByIdx.set(idx, node);
|
|
25676
|
+
}
|
|
25677
|
+
}
|
|
25678
|
+
}
|
|
25679
|
+
groupChildren = Object.keys(dLbls).filter((k) => getLocalName(k) !== "dLbl").map((k) => [k, dLbls[k]]);
|
|
25680
|
+
}
|
|
25681
|
+
if (labels.length === 0 && groupChildren.length === 0) {
|
|
25682
|
+
if (dLblsKey) {
|
|
25683
|
+
delete seriesNode[dLblsKey];
|
|
25684
|
+
}
|
|
25685
|
+
return;
|
|
25686
|
+
}
|
|
25687
|
+
const built = [...labels].sort((a, b) => a.idx - b.idx).map((label) => buildDLbl(existingByIdx.get(label.idx), label, getLocalName));
|
|
25688
|
+
const newDLbls = {};
|
|
25689
|
+
if (built.length > 0) {
|
|
25690
|
+
newDLbls["c:dLbl"] = built.length === 1 ? built[0] : built;
|
|
25691
|
+
}
|
|
25692
|
+
const ordered = [...groupChildren].sort((a, b) => {
|
|
25693
|
+
const ai = DLBLS_GROUP_ORDER.indexOf(getLocalName(a[0]));
|
|
25694
|
+
const bi = DLBLS_GROUP_ORDER.indexOf(getLocalName(b[0]));
|
|
25695
|
+
return (ai === -1 ? DLBLS_GROUP_ORDER.length : ai) - (bi === -1 ? DLBLS_GROUP_ORDER.length : bi);
|
|
25696
|
+
});
|
|
25697
|
+
for (const [k, v] of ordered) {
|
|
25698
|
+
newDLbls[k] = v;
|
|
25699
|
+
}
|
|
25700
|
+
if (dLblsKey) {
|
|
25701
|
+
seriesNode[dLblsKey] = newDLbls;
|
|
25702
|
+
return;
|
|
25703
|
+
}
|
|
25704
|
+
const keys = Object.keys(seriesNode);
|
|
25705
|
+
const beforeIdx = keys.findIndex((k) => AFTER_DLBLS.has(getLocalName(k)));
|
|
25706
|
+
const entries = keys.map((k) => [k, seriesNode[k]]);
|
|
25707
|
+
const at = beforeIdx === -1 ? entries.length : beforeIdx;
|
|
25708
|
+
entries.splice(at, 0, ["c:dLbls", newDLbls]);
|
|
25709
|
+
for (const k of keys) {
|
|
25710
|
+
delete seriesNode[k];
|
|
25711
|
+
}
|
|
25712
|
+
for (const [k, v] of entries) {
|
|
25713
|
+
seriesNode[k] = v;
|
|
25714
|
+
}
|
|
25715
|
+
}
|
|
25716
|
+
|
|
25371
25717
|
// src/core/utils/chart-trendline-serializer.ts
|
|
25372
25718
|
var TYPE_TO_OOXML = {
|
|
25373
25719
|
linear: "linear",
|
|
@@ -25377,7 +25723,7 @@ var TYPE_TO_OOXML = {
|
|
|
25377
25723
|
power: "power",
|
|
25378
25724
|
movingAvg: "movingAvg"
|
|
25379
25725
|
};
|
|
25380
|
-
function
|
|
25726
|
+
function findKey10(obj, local, getLocalName) {
|
|
25381
25727
|
return Object.keys(obj).find((k) => getLocalName(k) === local);
|
|
25382
25728
|
}
|
|
25383
25729
|
function ensureArray9(v) {
|
|
@@ -25394,10 +25740,10 @@ function buildSpPr(existing, color, getLocalName) {
|
|
|
25394
25740
|
return existing;
|
|
25395
25741
|
}
|
|
25396
25742
|
const spPr = existing ? { ...existing } : {};
|
|
25397
|
-
const lnKey =
|
|
25743
|
+
const lnKey = findKey10(spPr, "ln", getLocalName) ?? "a:ln";
|
|
25398
25744
|
const existingLn = spPr[lnKey] ?? {};
|
|
25399
|
-
const fillKey =
|
|
25400
|
-
const noFillKey =
|
|
25745
|
+
const fillKey = findKey10(existingLn, "solidFill", getLocalName) ?? "a:solidFill";
|
|
25746
|
+
const noFillKey = findKey10(existingLn, "noFill", getLocalName);
|
|
25401
25747
|
const ln = { ...existingLn };
|
|
25402
25748
|
if (noFillKey) {
|
|
25403
25749
|
delete ln[noFillKey];
|
|
@@ -25409,13 +25755,13 @@ function buildSpPr(existing, color, getLocalName) {
|
|
|
25409
25755
|
function buildTrendline(existing, t, getLocalName) {
|
|
25410
25756
|
const node = {};
|
|
25411
25757
|
if (existing) {
|
|
25412
|
-
const nameKey =
|
|
25758
|
+
const nameKey = findKey10(existing, "name", getLocalName);
|
|
25413
25759
|
if (nameKey) {
|
|
25414
25760
|
node["c:name"] = existing[nameKey];
|
|
25415
25761
|
}
|
|
25416
25762
|
}
|
|
25417
25763
|
const spPr = buildSpPr(
|
|
25418
|
-
existing ? existing[
|
|
25764
|
+
existing ? existing[findKey10(existing, "spPr", getLocalName) ?? ""] : void 0,
|
|
25419
25765
|
t.color,
|
|
25420
25766
|
getLocalName
|
|
25421
25767
|
);
|
|
@@ -25445,7 +25791,7 @@ function buildTrendline(existing, t, getLocalName) {
|
|
|
25445
25791
|
node["c:dispEq"] = { "@_val": "1" };
|
|
25446
25792
|
}
|
|
25447
25793
|
if (existing) {
|
|
25448
|
-
const lblKey =
|
|
25794
|
+
const lblKey = findKey10(existing, "trendlineLbl", getLocalName);
|
|
25449
25795
|
if (lblKey) {
|
|
25450
25796
|
node["c:trendlineLbl"] = existing[lblKey];
|
|
25451
25797
|
}
|
|
@@ -25453,7 +25799,7 @@ function buildTrendline(existing, t, getLocalName) {
|
|
|
25453
25799
|
return node;
|
|
25454
25800
|
}
|
|
25455
25801
|
function applySeriesTrendlinesToXml(seriesNode, trendlines, getLocalName) {
|
|
25456
|
-
const existingKey =
|
|
25802
|
+
const existingKey = findKey10(seriesNode, "trendline", getLocalName);
|
|
25457
25803
|
const existingNodes = existingKey ? ensureArray9(seriesNode[existingKey]) : [];
|
|
25458
25804
|
const built = trendlines.map((t, i) => buildTrendline(existingNodes[i], t, getLocalName));
|
|
25459
25805
|
if (existingKey) {
|
|
@@ -28663,8 +29009,8 @@ function buildTextRunEffectListXml(style) {
|
|
|
28663
29009
|
}
|
|
28664
29010
|
return effectLst;
|
|
28665
29011
|
}
|
|
28666
|
-
function buildShadowColorNode(
|
|
28667
|
-
const clr =
|
|
29012
|
+
function buildShadowColorNode(hex8, opacity) {
|
|
29013
|
+
const clr = hex8.replace("#", "");
|
|
28668
29014
|
const alpha = typeof opacity === "number" ? Math.round(opacity * 1e5) : void 0;
|
|
28669
29015
|
return {
|
|
28670
29016
|
"@_val": clr,
|
|
@@ -31907,8 +32253,8 @@ function updateCellTextStyleInRawXml(element, rowIndex, colIndex, styleUpdates)
|
|
|
31907
32253
|
}
|
|
31908
32254
|
}
|
|
31909
32255
|
if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
|
|
31910
|
-
const
|
|
31911
|
-
rPr["a:solidFill"] = { "a:srgbClr": { "@_val":
|
|
32256
|
+
const hex8 = styleUpdates.color.replace("#", "");
|
|
32257
|
+
rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex8 } };
|
|
31912
32258
|
}
|
|
31913
32259
|
if ("align" in styleUpdates) {
|
|
31914
32260
|
const pPr = paragraph["a:pPr"] ?? {};
|
|
@@ -31948,8 +32294,8 @@ function updateCellTextStyleInRawXml(element, rowIndex, colIndex, styleUpdates)
|
|
|
31948
32294
|
}
|
|
31949
32295
|
}
|
|
31950
32296
|
if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
|
|
31951
|
-
const
|
|
31952
|
-
endRPr["a:solidFill"] = { "a:srgbClr": { "@_val":
|
|
32297
|
+
const hex8 = styleUpdates.color.replace("#", "");
|
|
32298
|
+
endRPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex8 } };
|
|
31953
32299
|
}
|
|
31954
32300
|
}
|
|
31955
32301
|
}
|
|
@@ -32228,6 +32574,10 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
32228
32574
|
if (!plotArea) {
|
|
32229
32575
|
continue;
|
|
32230
32576
|
}
|
|
32577
|
+
consolidateComboContainersInXml(
|
|
32578
|
+
plotArea,
|
|
32579
|
+
(key) => this.compatibilityService.getXmlLocalName(key)
|
|
32580
|
+
);
|
|
32231
32581
|
let chartTypeKey = Object.keys(plotArea).find(
|
|
32232
32582
|
(key) => this.compatibilityService.getXmlLocalName(key).endsWith("Chart")
|
|
32233
32583
|
);
|
|
@@ -32290,19 +32640,19 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
32290
32640
|
this.updateChartCacheValues(valNode, true, seriesData.values.map(String));
|
|
32291
32641
|
}
|
|
32292
32642
|
if (seriesData.color) {
|
|
32293
|
-
const
|
|
32643
|
+
const hex8 = seriesData.color.replace("#", "");
|
|
32294
32644
|
const spPr = this.xmlLookupService.getChildByLocalName(seriesNode, "spPr");
|
|
32295
32645
|
if (spPr) {
|
|
32296
32646
|
const solidFillKey = Object.keys(spPr).find(
|
|
32297
32647
|
(k) => this.compatibilityService.getXmlLocalName(k) === "solidFill"
|
|
32298
32648
|
) ?? "a:solidFill";
|
|
32299
|
-
spPr[solidFillKey] = { "a:srgbClr": { "@_val":
|
|
32649
|
+
spPr[solidFillKey] = { "a:srgbClr": { "@_val": hex8 } };
|
|
32300
32650
|
} else {
|
|
32301
32651
|
const spPrKey = Object.keys(seriesNode).find(
|
|
32302
32652
|
(k) => this.compatibilityService.getXmlLocalName(k) === "spPr"
|
|
32303
32653
|
) ?? "c:spPr";
|
|
32304
32654
|
seriesNode[spPrKey] = {
|
|
32305
|
-
"a:solidFill": { "a:srgbClr": { "@_val":
|
|
32655
|
+
"a:solidFill": { "a:srgbClr": { "@_val": hex8 } }
|
|
32306
32656
|
};
|
|
32307
32657
|
}
|
|
32308
32658
|
}
|
|
@@ -32334,6 +32684,13 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
32334
32684
|
(key) => this.compatibilityService.getXmlLocalName(key)
|
|
32335
32685
|
);
|
|
32336
32686
|
}
|
|
32687
|
+
if (seriesData.dataLabels !== void 0) {
|
|
32688
|
+
applySeriesDataLabelsToXml(
|
|
32689
|
+
seriesNode,
|
|
32690
|
+
seriesData.dataLabels,
|
|
32691
|
+
(key) => this.compatibilityService.getXmlLocalName(key)
|
|
32692
|
+
);
|
|
32693
|
+
}
|
|
32337
32694
|
}
|
|
32338
32695
|
if (chartData.series.length > seriesNodes.length) {
|
|
32339
32696
|
const templateSeries = seriesNodes.length > 0 ? seriesNodes[seriesNodes.length - 1] : void 0;
|
|
@@ -32863,36 +33220,131 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
32863
33220
|
}
|
|
32864
33221
|
};
|
|
32865
33222
|
|
|
32866
|
-
// src/core/core/runtime/smartart-
|
|
33223
|
+
// src/core/core/runtime/smartart-colors-builder.ts
|
|
32867
33224
|
function asObject(value) {
|
|
33225
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
33226
|
+
}
|
|
33227
|
+
function toArray(value) {
|
|
33228
|
+
if (Array.isArray(value)) {
|
|
33229
|
+
return value.filter((entry) => Boolean(asObject(entry)));
|
|
33230
|
+
}
|
|
33231
|
+
const obj = asObject(value);
|
|
33232
|
+
return obj ? [obj] : [];
|
|
33233
|
+
}
|
|
33234
|
+
function findKey11(obj, name, getLocalName) {
|
|
33235
|
+
return Object.keys(obj).find((k) => getLocalName(k) === name);
|
|
33236
|
+
}
|
|
33237
|
+
function hex7(value) {
|
|
33238
|
+
return value.replace("#", "");
|
|
33239
|
+
}
|
|
33240
|
+
var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
|
|
33241
|
+
"srgbClr",
|
|
33242
|
+
"schemeClr",
|
|
33243
|
+
"sysClr",
|
|
33244
|
+
"prstClr",
|
|
33245
|
+
"scrgbClr",
|
|
33246
|
+
"hslClr"
|
|
33247
|
+
]);
|
|
33248
|
+
function applyColorToList(list, value, getLocalName) {
|
|
33249
|
+
const colorKey = Object.keys(list).find((k) => COLOR_LOCAL_NAMES.has(getLocalName(k)));
|
|
33250
|
+
const srgb = { "@_val": hex7(value) };
|
|
33251
|
+
if (!colorKey) {
|
|
33252
|
+
list["a:srgbClr"] = srgb;
|
|
33253
|
+
return;
|
|
33254
|
+
}
|
|
33255
|
+
const existing = list[colorKey];
|
|
33256
|
+
const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject(entry))) : [];
|
|
33257
|
+
if (colorKey !== "a:srgbClr") {
|
|
33258
|
+
delete list[colorKey];
|
|
33259
|
+
}
|
|
33260
|
+
list["a:srgbClr"] = rest.length > 0 ? [srgb, ...rest] : srgb;
|
|
33261
|
+
}
|
|
33262
|
+
function applySmartArtColorTransform(colorsDef, transform, getLocalName) {
|
|
33263
|
+
if (!transform) {
|
|
33264
|
+
return false;
|
|
33265
|
+
}
|
|
33266
|
+
let mutated = false;
|
|
33267
|
+
if (transform.name && transform.name.length > 0) {
|
|
33268
|
+
if (colorsDef["@_title"] !== transform.name) {
|
|
33269
|
+
colorsDef["@_title"] = transform.name;
|
|
33270
|
+
mutated = true;
|
|
33271
|
+
}
|
|
33272
|
+
}
|
|
33273
|
+
const styleLblKey = findKey11(colorsDef, "styleLbl", getLocalName);
|
|
33274
|
+
if (!styleLblKey) {
|
|
33275
|
+
return mutated;
|
|
33276
|
+
}
|
|
33277
|
+
const labels = toArray(colorsDef[styleLblKey]);
|
|
33278
|
+
if (labels.length === 0) {
|
|
33279
|
+
return mutated;
|
|
33280
|
+
}
|
|
33281
|
+
let fillIndex = 0;
|
|
33282
|
+
let lineIndex = 0;
|
|
33283
|
+
for (const label of labels) {
|
|
33284
|
+
const fillKey = findKey11(label, "fillClrLst", getLocalName);
|
|
33285
|
+
if (fillKey) {
|
|
33286
|
+
const value = transform.fillColors[fillIndex++];
|
|
33287
|
+
const list = asObject(label[fillKey]);
|
|
33288
|
+
if (list && value) {
|
|
33289
|
+
applyColorToList(list, value, getLocalName);
|
|
33290
|
+
mutated = true;
|
|
33291
|
+
}
|
|
33292
|
+
}
|
|
33293
|
+
const lineKey = findKey11(label, "linClrLst", getLocalName);
|
|
33294
|
+
if (lineKey) {
|
|
33295
|
+
const value = transform.lineColors[lineIndex++];
|
|
33296
|
+
const list = asObject(label[lineKey]);
|
|
33297
|
+
if (list && value) {
|
|
33298
|
+
applyColorToList(list, value, getLocalName);
|
|
33299
|
+
mutated = true;
|
|
33300
|
+
}
|
|
33301
|
+
}
|
|
33302
|
+
}
|
|
33303
|
+
return mutated;
|
|
33304
|
+
}
|
|
33305
|
+
|
|
33306
|
+
// src/core/core/runtime/smartart-quickstyle-builder.ts
|
|
33307
|
+
function applySmartArtQuickStyle(styleDef, quickStyle) {
|
|
33308
|
+
if (!quickStyle || !quickStyle.name || quickStyle.name.length === 0) {
|
|
33309
|
+
return false;
|
|
33310
|
+
}
|
|
33311
|
+
if (styleDef["@_title"] === quickStyle.name) {
|
|
33312
|
+
return false;
|
|
33313
|
+
}
|
|
33314
|
+
styleDef["@_title"] = quickStyle.name;
|
|
33315
|
+
return true;
|
|
33316
|
+
}
|
|
33317
|
+
|
|
33318
|
+
// src/core/core/runtime/smartart-save-chrome.ts
|
|
33319
|
+
function asObject2(value) {
|
|
32868
33320
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
32869
33321
|
}
|
|
32870
33322
|
function applySmartArtChrome(dataModel, chrome, getLocalName) {
|
|
32871
33323
|
if (!chrome || !chrome.backgroundColor && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
|
|
32872
33324
|
return;
|
|
32873
33325
|
}
|
|
32874
|
-
const
|
|
33326
|
+
const findKey12 = (obj, name) => Object.keys(obj).find((k) => getLocalName(k) === name);
|
|
32875
33327
|
if (chrome.backgroundColor) {
|
|
32876
|
-
const
|
|
32877
|
-
const bgKey =
|
|
32878
|
-
const bg =
|
|
32879
|
-
const fillKey =
|
|
32880
|
-
bg[fillKey] = { "a:srgbClr": { "@_val":
|
|
33328
|
+
const hex8 = chrome.backgroundColor.replace("#", "");
|
|
33329
|
+
const bgKey = findKey12(dataModel, "bg") ?? "dgm:bg";
|
|
33330
|
+
const bg = asObject2(dataModel[bgKey]);
|
|
33331
|
+
const fillKey = findKey12(bg, "solidFill") ?? "a:solidFill";
|
|
33332
|
+
bg[fillKey] = { "a:srgbClr": { "@_val": hex8 } };
|
|
32881
33333
|
dataModel[bgKey] = bg;
|
|
32882
33334
|
}
|
|
32883
33335
|
const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
|
|
32884
33336
|
if (chrome.outlineColor || hasOutlineWidth) {
|
|
32885
|
-
const wholeKey =
|
|
32886
|
-
const whole =
|
|
32887
|
-
const lnKey =
|
|
32888
|
-
const ln =
|
|
33337
|
+
const wholeKey = findKey12(dataModel, "whole") ?? "dgm:whole";
|
|
33338
|
+
const whole = asObject2(dataModel[wholeKey]);
|
|
33339
|
+
const lnKey = findKey12(whole, "ln") ?? "a:ln";
|
|
33340
|
+
const ln = asObject2(whole[lnKey]);
|
|
32889
33341
|
if (hasOutlineWidth) {
|
|
32890
33342
|
ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
|
|
32891
33343
|
}
|
|
32892
33344
|
if (chrome.outlineColor) {
|
|
32893
|
-
const
|
|
32894
|
-
const fillKey =
|
|
32895
|
-
ln[fillKey] = { "a:srgbClr": { "@_val":
|
|
33345
|
+
const hex8 = chrome.outlineColor.replace("#", "");
|
|
33346
|
+
const fillKey = findKey12(ln, "solidFill") ?? "a:solidFill";
|
|
33347
|
+
ln[fillKey] = { "a:srgbClr": { "@_val": hex8 } };
|
|
32896
33348
|
}
|
|
32897
33349
|
whole[lnKey] = ln;
|
|
32898
33350
|
dataModel[wholeKey] = whole;
|
|
@@ -32927,10 +33379,56 @@ function buildPointText(text) {
|
|
|
32927
33379
|
}
|
|
32928
33380
|
};
|
|
32929
33381
|
}
|
|
32930
|
-
function
|
|
33382
|
+
function joinRunText(runs) {
|
|
33383
|
+
return (runs ?? []).map((run) => run.text).join("");
|
|
33384
|
+
}
|
|
33385
|
+
function buildMultiRunParagraph(runs) {
|
|
33386
|
+
const runObjects = runs.map((run) => {
|
|
33387
|
+
const rObj = {};
|
|
33388
|
+
rObj["a:rPr"] = run.rPr ?? { "@_lang": "en-US", "@_dirty": "0" };
|
|
33389
|
+
rObj["a:t"] = run.text;
|
|
33390
|
+
return rObj;
|
|
33391
|
+
});
|
|
33392
|
+
return { "a:r": runObjects.length === 1 ? runObjects[0] : runObjects };
|
|
33393
|
+
}
|
|
33394
|
+
function shouldRebuildFromRuns(node) {
|
|
33395
|
+
const runs = node.runs;
|
|
33396
|
+
if (!runs || runs.length === 0) {
|
|
33397
|
+
return false;
|
|
33398
|
+
}
|
|
33399
|
+
const hasRichRun = runs.length > 1 || Boolean(runs[0]?.rPr);
|
|
33400
|
+
if (!hasRichRun) {
|
|
33401
|
+
return false;
|
|
33402
|
+
}
|
|
33403
|
+
return joinRunText(runs) === node.text;
|
|
33404
|
+
}
|
|
33405
|
+
function buildPointFromRuns(runs) {
|
|
33406
|
+
return {
|
|
33407
|
+
"a:bodyPr": {},
|
|
33408
|
+
"a:lstStyle": {},
|
|
33409
|
+
"a:p": buildMultiRunParagraph(runs)
|
|
33410
|
+
};
|
|
33411
|
+
}
|
|
33412
|
+
function applyRunsToExistingBody(pt2, tKey, runs) {
|
|
33413
|
+
const body = pt2[tKey];
|
|
33414
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
33415
|
+
pt2[tKey] = buildPointFromRuns(runs);
|
|
33416
|
+
return;
|
|
33417
|
+
}
|
|
33418
|
+
const bodyObj = body;
|
|
33419
|
+
const pKey = Object.keys(bodyObj).find((k) => stripPrefix(k) === "p");
|
|
33420
|
+
bodyObj[pKey ?? "a:p"] = buildMultiRunParagraph(runs);
|
|
33421
|
+
}
|
|
33422
|
+
function applyTextToExistingPoint(pt2, node) {
|
|
33423
|
+
const text = node.text;
|
|
33424
|
+
const rebuildFromRuns = shouldRebuildFromRuns(node);
|
|
32931
33425
|
const tKey = Object.keys(pt2).find((k) => stripPrefix(k) === "t");
|
|
32932
33426
|
if (!tKey) {
|
|
32933
|
-
pt2["dgm:t"] = buildPointText(text);
|
|
33427
|
+
pt2["dgm:t"] = rebuildFromRuns ? buildPointFromRuns(node.runs) : buildPointText(text);
|
|
33428
|
+
return;
|
|
33429
|
+
}
|
|
33430
|
+
if (rebuildFromRuns) {
|
|
33431
|
+
applyRunsToExistingBody(pt2, tKey, node.runs);
|
|
32934
33432
|
return;
|
|
32935
33433
|
}
|
|
32936
33434
|
const body = pt2[tKey];
|
|
@@ -32991,7 +33489,7 @@ function mergeSmartArtPointXml(existingPts, nodes) {
|
|
|
32991
33489
|
if (!desired) {
|
|
32992
33490
|
continue;
|
|
32993
33491
|
}
|
|
32994
|
-
applyTextToExistingPoint(pt2, desired
|
|
33492
|
+
applyTextToExistingPoint(pt2, desired);
|
|
32995
33493
|
seenContentIds.add(modelId);
|
|
32996
33494
|
merged.push(pt2);
|
|
32997
33495
|
}
|
|
@@ -33004,7 +33502,7 @@ function mergeSmartArtPointXml(existingPts, nodes) {
|
|
|
33004
33502
|
if (node.nodeType && !NON_CONTENT_POINT_TYPES.has(node.nodeType)) {
|
|
33005
33503
|
ptNode["@_type"] = node.nodeType;
|
|
33006
33504
|
}
|
|
33007
|
-
ptNode["dgm:t"] = buildPointText(node.text);
|
|
33505
|
+
ptNode["dgm:t"] = shouldRebuildFromRuns(node) ? buildPointFromRuns(node.runs) : buildPointText(node.text);
|
|
33008
33506
|
merged.push(ptNode);
|
|
33009
33507
|
}
|
|
33010
33508
|
return merged;
|
|
@@ -33113,9 +33611,83 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
33113
33611
|
} catch (e) {
|
|
33114
33612
|
console.warn(`Failed to save SmartArt data at ${dataPartPath}:`, e);
|
|
33115
33613
|
}
|
|
33614
|
+
await this.regenerateSmartArtColorPart(slidePath, smartArtData);
|
|
33615
|
+
await this.regenerateSmartArtQuickStylePart(slidePath, smartArtData);
|
|
33116
33616
|
}
|
|
33117
33617
|
this.pendingSmartArtUpdates = void 0;
|
|
33118
33618
|
}
|
|
33619
|
+
/**
|
|
33620
|
+
* Merge the in-memory colour transform back into `ppt/diagrams/colors*.xml`.
|
|
33621
|
+
*
|
|
33622
|
+
* Resolves the part via the SmartArt `colorsRelId` relationship alongside
|
|
33623
|
+
* the data part, merges surgically (preserving unknown content), and skips
|
|
33624
|
+
* gracefully when the rel or part is absent. No-op when the in-memory data
|
|
33625
|
+
* carries no colour transform.
|
|
33626
|
+
*/
|
|
33627
|
+
async regenerateSmartArtColorPart(slidePath, smartArtData) {
|
|
33628
|
+
const transform = smartArtData?.colorTransform;
|
|
33629
|
+
if (!smartArtData?.colorsRelId || !transform) {
|
|
33630
|
+
return;
|
|
33631
|
+
}
|
|
33632
|
+
await this.mergeSmartArtDiagramPart(
|
|
33633
|
+
slidePath,
|
|
33634
|
+
smartArtData.colorsRelId,
|
|
33635
|
+
"colorsDef",
|
|
33636
|
+
"colours",
|
|
33637
|
+
(colorsDef) => applySmartArtColorTransform(
|
|
33638
|
+
colorsDef,
|
|
33639
|
+
transform,
|
|
33640
|
+
(k) => this.compatibilityService.getXmlLocalName(k)
|
|
33641
|
+
)
|
|
33642
|
+
);
|
|
33643
|
+
}
|
|
33644
|
+
/**
|
|
33645
|
+
* Merge the in-memory quick style back into `ppt/diagrams/quickStyles*.xml`.
|
|
33646
|
+
*
|
|
33647
|
+
* Resolves the part via the SmartArt `styleRelId` relationship, merges
|
|
33648
|
+
* surgically, and skips gracefully when the rel or part is absent. No-op
|
|
33649
|
+
* when the in-memory data carries no quick style.
|
|
33650
|
+
*/
|
|
33651
|
+
async regenerateSmartArtQuickStylePart(slidePath, smartArtData) {
|
|
33652
|
+
const quickStyle = smartArtData?.quickStyle;
|
|
33653
|
+
if (!smartArtData?.styleRelId || !quickStyle) {
|
|
33654
|
+
return;
|
|
33655
|
+
}
|
|
33656
|
+
await this.mergeSmartArtDiagramPart(
|
|
33657
|
+
slidePath,
|
|
33658
|
+
smartArtData.styleRelId,
|
|
33659
|
+
"styleDef",
|
|
33660
|
+
"quick style",
|
|
33661
|
+
(styleDef) => applySmartArtQuickStyle(styleDef, quickStyle)
|
|
33662
|
+
);
|
|
33663
|
+
}
|
|
33664
|
+
/**
|
|
33665
|
+
* Read a SmartArt diagram part by slide relationship id, locate its root
|
|
33666
|
+
* definition element by local name, apply a surgical merge callback, and
|
|
33667
|
+
* write the part back only when the callback reports a change. Skips
|
|
33668
|
+
* gracefully when the rel, part, or root element is absent.
|
|
33669
|
+
*/
|
|
33670
|
+
async mergeSmartArtDiagramPart(slidePath, relId, defLocalName, label, merge) {
|
|
33671
|
+
const relationships = this.slideRelsMap.get(slidePath);
|
|
33672
|
+
const target = relationships?.get(relId);
|
|
33673
|
+
if (!target) {
|
|
33674
|
+
return;
|
|
33675
|
+
}
|
|
33676
|
+
const partPath = this.resolveImagePath(slidePath, target);
|
|
33677
|
+
const existingXml = await this.zip.file(partPath)?.async("string");
|
|
33678
|
+
if (!existingXml) {
|
|
33679
|
+
return;
|
|
33680
|
+
}
|
|
33681
|
+
try {
|
|
33682
|
+
const parsed = this.parser.parse(existingXml);
|
|
33683
|
+
const def = this.xmlLookupService.getChildByLocalName(parsed, defLocalName);
|
|
33684
|
+
if (def && merge(def)) {
|
|
33685
|
+
this.zip.file(partPath, this.builder.build(parsed));
|
|
33686
|
+
}
|
|
33687
|
+
} catch (e) {
|
|
33688
|
+
console.warn(`Failed to save SmartArt ${label} at ${partPath}:`, e);
|
|
33689
|
+
}
|
|
33690
|
+
}
|
|
33119
33691
|
/**
|
|
33120
33692
|
* Find the slide path for an element by scanning the slideMap.
|
|
33121
33693
|
*/
|
|
@@ -33147,10 +33719,10 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
33147
33719
|
}
|
|
33148
33720
|
const cSld = root["p:cSld"] || {};
|
|
33149
33721
|
if (notesMaster.backgroundColor) {
|
|
33150
|
-
const
|
|
33722
|
+
const hex8 = notesMaster.backgroundColor.replace("#", "");
|
|
33151
33723
|
cSld["p:bg"] = {
|
|
33152
33724
|
"p:bgPr": {
|
|
33153
|
-
"a:solidFill": { "a:srgbClr": { "@_val":
|
|
33725
|
+
"a:solidFill": { "a:srgbClr": { "@_val": hex8 } },
|
|
33154
33726
|
"a:effectLst": {}
|
|
33155
33727
|
}
|
|
33156
33728
|
};
|
|
@@ -33183,10 +33755,10 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
33183
33755
|
}
|
|
33184
33756
|
const cSld = root["p:cSld"] || {};
|
|
33185
33757
|
if (handoutMaster.backgroundColor) {
|
|
33186
|
-
const
|
|
33758
|
+
const hex8 = handoutMaster.backgroundColor.replace("#", "");
|
|
33187
33759
|
cSld["p:bg"] = {
|
|
33188
33760
|
"p:bgPr": {
|
|
33189
|
-
"a:solidFill": { "a:srgbClr": { "@_val":
|
|
33761
|
+
"a:solidFill": { "a:srgbClr": { "@_val": hex8 } },
|
|
33190
33762
|
"a:effectLst": {}
|
|
33191
33763
|
}
|
|
33192
33764
|
};
|
|
@@ -35636,8 +36208,8 @@ var PptxHandlerRuntime34 = class extends PptxHandlerRuntime33 {
|
|
|
35636
36208
|
*/
|
|
35637
36209
|
buildClrSchemeObject(schemeName, colorMap) {
|
|
35638
36210
|
const slot = (key) => {
|
|
35639
|
-
const
|
|
35640
|
-
const srgb =
|
|
36211
|
+
const hex8 = String(colorMap[key] || "").replace(/^#/, "");
|
|
36212
|
+
const srgb = hex8.length === 6 ? hex8.toUpperCase() : "000000";
|
|
35641
36213
|
return { "a:srgbClr": { "@_val": srgb } };
|
|
35642
36214
|
};
|
|
35643
36215
|
return {
|
|
@@ -42416,8 +42988,8 @@ var PptxHandlerRuntime66 = class extends PptxHandlerRuntime65 {
|
|
|
42416
42988
|
/**
|
|
42417
42989
|
* Build an OOXML colour node (`a:srgbClr`) from a hex string.
|
|
42418
42990
|
*/
|
|
42419
|
-
buildSrgbClrNode(
|
|
42420
|
-
const clean =
|
|
42991
|
+
buildSrgbClrNode(hex8) {
|
|
42992
|
+
const clean = hex8.replace(/^#/, "").toUpperCase();
|
|
42421
42993
|
return { "a:srgbClr": { "@_val": clean } };
|
|
42422
42994
|
}
|
|
42423
42995
|
/**
|
|
@@ -42840,6 +43412,45 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
|
|
|
42840
43412
|
}
|
|
42841
43413
|
}
|
|
42842
43414
|
}
|
|
43415
|
+
/**
|
|
43416
|
+
* Extract the per-run text + run-properties of a SmartArt content point's
|
|
43417
|
+
* first paragraph (`dgm:t/a:p/a:r`).
|
|
43418
|
+
*
|
|
43419
|
+
* Each `a:r` yields one {@link PptxSmartArtTextRun} carrying its joined
|
|
43420
|
+
* `a:t` text and a verbatim copy of its `a:rPr` properties (when present).
|
|
43421
|
+
* Only the first paragraph is captured: SmartArt content points are
|
|
43422
|
+
* single-paragraph in practice, and the round-trip save path rebuilds a
|
|
43423
|
+
* single paragraph from these runs. Returns undefined when there is fewer
|
|
43424
|
+
* than one run worth preserving (a single run is still returned so per-run
|
|
43425
|
+
* formatting like a bold sole run survives).
|
|
43426
|
+
*/
|
|
43427
|
+
extractSmartArtNodeRuns(point) {
|
|
43428
|
+
const tBody = this.xmlLookupService.getChildByLocalName(point, "t");
|
|
43429
|
+
if (!tBody) {
|
|
43430
|
+
return void 0;
|
|
43431
|
+
}
|
|
43432
|
+
const paragraph = this.xmlLookupService.getChildrenArrayByLocalName(tBody, "p")[0];
|
|
43433
|
+
if (!paragraph) {
|
|
43434
|
+
return void 0;
|
|
43435
|
+
}
|
|
43436
|
+
const runNodes = this.xmlLookupService.getChildrenArrayByLocalName(paragraph, "r");
|
|
43437
|
+
if (runNodes.length === 0) {
|
|
43438
|
+
return void 0;
|
|
43439
|
+
}
|
|
43440
|
+
const runs = [];
|
|
43441
|
+
for (const run of runNodes) {
|
|
43442
|
+
const textValues = [];
|
|
43443
|
+
this.collectLocalTextValues(run, "t", textValues);
|
|
43444
|
+
const text = textValues.join("");
|
|
43445
|
+
const rPrNode = this.xmlLookupService.getChildByLocalName(run, "rPr");
|
|
43446
|
+
const entry = { text };
|
|
43447
|
+
if (rPrNode) {
|
|
43448
|
+
entry.rPr = JSON.parse(JSON.stringify(rPrNode));
|
|
43449
|
+
}
|
|
43450
|
+
runs.push(entry);
|
|
43451
|
+
}
|
|
43452
|
+
return runs.length > 0 ? runs : void 0;
|
|
43453
|
+
}
|
|
42843
43454
|
/**
|
|
42844
43455
|
* Parse background and outline chrome from `dgm:bg` and `dgm:whole`.
|
|
42845
43456
|
*/
|
|
@@ -43143,11 +43754,13 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
43143
43754
|
if (!resolvedText) {
|
|
43144
43755
|
return null;
|
|
43145
43756
|
}
|
|
43757
|
+
const runs = this.extractSmartArtNodeRuns(point);
|
|
43146
43758
|
return {
|
|
43147
43759
|
id: pointId,
|
|
43148
43760
|
text: resolvedText.trim(),
|
|
43149
43761
|
parentId: parentByNodeId.get(pointId),
|
|
43150
|
-
nodeType
|
|
43762
|
+
nodeType,
|
|
43763
|
+
runs
|
|
43151
43764
|
};
|
|
43152
43765
|
}).filter((entry) => Boolean(entry)).slice(0, MAX_SMARTART_NODES);
|
|
43153
43766
|
if (nodes.length === 0) {
|
|
@@ -43865,11 +44478,11 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
43865
44478
|
} else if (localName === "srgbClr") {
|
|
43866
44479
|
const items = Array.isArray(value) ? value : [value];
|
|
43867
44480
|
for (const item of items) {
|
|
43868
|
-
const
|
|
44481
|
+
const hex8 = String(
|
|
43869
44482
|
typeof item === "object" && item !== null ? item["@_val"] : item ?? ""
|
|
43870
44483
|
).trim();
|
|
43871
|
-
if (
|
|
43872
|
-
output.push(
|
|
44484
|
+
if (hex8.length > 0) {
|
|
44485
|
+
output.push(hex8.startsWith("#") ? hex8 : `#${hex8}`);
|
|
43873
44486
|
}
|
|
43874
44487
|
}
|
|
43875
44488
|
}
|
|
@@ -43937,9 +44550,10 @@ var PptxHandlerRuntime75 = class extends PptxHandlerRuntime74 {
|
|
|
43937
44550
|
return void 0;
|
|
43938
44551
|
}
|
|
43939
44552
|
const chartType = this.detectChartType(plotArea);
|
|
43940
|
-
const
|
|
44553
|
+
const chartContainerKeys = Object.keys(plotArea).filter(
|
|
43941
44554
|
(key) => this.compatibilityService.getXmlLocalName(key).endsWith("Chart")
|
|
43942
44555
|
);
|
|
44556
|
+
const seriesContainerKey = chartContainerKeys[0];
|
|
43943
44557
|
if (!seriesContainerKey) {
|
|
43944
44558
|
return this.parseCxChart(
|
|
43945
44559
|
plotArea,
|
|
@@ -43951,19 +44565,14 @@ var PptxHandlerRuntime75 = class extends PptxHandlerRuntime74 {
|
|
|
43951
44565
|
);
|
|
43952
44566
|
}
|
|
43953
44567
|
const seriesContainer = plotArea[seriesContainerKey];
|
|
43954
|
-
const
|
|
43955
|
-
|
|
44568
|
+
const { categories, series } = this.parseAllChartContainers(
|
|
44569
|
+
plotArea,
|
|
44570
|
+
chartContainerKeys,
|
|
44571
|
+
chartType
|
|
44572
|
+
);
|
|
44573
|
+
if (series.length === 0) {
|
|
43956
44574
|
return void 0;
|
|
43957
44575
|
}
|
|
43958
|
-
const categoriesFromFirstSeries = this.extractChartPointValues(
|
|
43959
|
-
this.xmlLookupService.getChildByLocalName(seriesList[0], "cat"),
|
|
43960
|
-
false
|
|
43961
|
-
);
|
|
43962
|
-
const categories = categoriesFromFirstSeries.length ? categoriesFromFirstSeries : this.extractChartPointValues(
|
|
43963
|
-
this.xmlLookupService.getChildByLocalName(seriesList[0], "xVal"),
|
|
43964
|
-
false
|
|
43965
|
-
);
|
|
43966
|
-
const series = this.buildChartSeries(seriesList, categories);
|
|
43967
44576
|
const titleNode = this.xmlLookupService.getChildByLocalName(chartRoot, "title");
|
|
43968
44577
|
const titleTextValues = [];
|
|
43969
44578
|
this.collectLocalTextValues(titleNode, "t", titleTextValues);
|
|
@@ -44062,6 +44671,49 @@ var PptxHandlerRuntime75 = class extends PptxHandlerRuntime74 {
|
|
|
44062
44671
|
...clrMapOvr ? { clrMapOvr } : {}
|
|
44063
44672
|
};
|
|
44064
44673
|
}
|
|
44674
|
+
/**
|
|
44675
|
+
* Parse every chart-type container in the plot area into a single flat
|
|
44676
|
+
* series list plus a shared category list.
|
|
44677
|
+
*
|
|
44678
|
+
* For a single-type chart this parses the one container exactly as before.
|
|
44679
|
+
* For a combo chart (multiple `c:*Chart` siblings) each container's series
|
|
44680
|
+
* are parsed and tagged with the container's chart type via
|
|
44681
|
+
* {@link PptxChartSeries.seriesChartType}, so the combo serializer can
|
|
44682
|
+
* re-emit each series under the correct container on save. Series keep the
|
|
44683
|
+
* document order of their containers.
|
|
44684
|
+
*
|
|
44685
|
+
* @param plotArea - The `c:plotArea` XML object.
|
|
44686
|
+
* @param containerKeys - All chart-type container keys, in document order.
|
|
44687
|
+
* @param chartLevelType - The detected chart-level type. When this is
|
|
44688
|
+
* `combo`, each series is tagged with its own container type; otherwise no
|
|
44689
|
+
* per-series type is set (the chart-level type applies to every series).
|
|
44690
|
+
* @returns The merged categories and series.
|
|
44691
|
+
*/
|
|
44692
|
+
parseAllChartContainers(plotArea, containerKeys, chartLevelType) {
|
|
44693
|
+
const isCombo = chartLevelType === "combo";
|
|
44694
|
+
let categories = [];
|
|
44695
|
+
const series = [];
|
|
44696
|
+
for (const containerKey of containerKeys) {
|
|
44697
|
+
const container = plotArea[containerKey];
|
|
44698
|
+
const seriesList = this.xmlLookupService.getChildrenArrayByLocalName(container, "ser");
|
|
44699
|
+
if (seriesList.length === 0) {
|
|
44700
|
+
continue;
|
|
44701
|
+
}
|
|
44702
|
+
if (categories.length === 0) {
|
|
44703
|
+
const fromCat = this.extractChartPointValues(
|
|
44704
|
+
this.xmlLookupService.getChildByLocalName(seriesList[0], "cat"),
|
|
44705
|
+
false
|
|
44706
|
+
);
|
|
44707
|
+
categories = fromCat.length ? fromCat : this.extractChartPointValues(
|
|
44708
|
+
this.xmlLookupService.getChildByLocalName(seriesList[0], "xVal"),
|
|
44709
|
+
false
|
|
44710
|
+
);
|
|
44711
|
+
}
|
|
44712
|
+
const containerType = isCombo ? chartContainerLocalNameToType(this.compatibilityService.getXmlLocalName(containerKey)) : void 0;
|
|
44713
|
+
series.push(...this.buildChartSeries(seriesList, categories, containerType));
|
|
44714
|
+
}
|
|
44715
|
+
return { categories, series };
|
|
44716
|
+
}
|
|
44065
44717
|
/**
|
|
44066
44718
|
* Build the series array from raw OOXML `c:ser` nodes.
|
|
44067
44719
|
*
|
|
@@ -44071,9 +44723,11 @@ var PptxHandlerRuntime75 = class extends PptxHandlerRuntime74 {
|
|
|
44071
44723
|
*
|
|
44072
44724
|
* @param seriesList - Array of `c:ser` XML objects from the chart container.
|
|
44073
44725
|
* @param categories - Pre-parsed category labels (used for fallback values).
|
|
44726
|
+
* @param seriesChartType - When set (combo charts), tags every series in this
|
|
44727
|
+
* container with its source chart type for round-trip.
|
|
44074
44728
|
* @returns The series array matching `PptxChartData["series"]`.
|
|
44075
44729
|
*/
|
|
44076
|
-
buildChartSeries(seriesList, categories) {
|
|
44730
|
+
buildChartSeries(seriesList, categories, seriesChartType) {
|
|
44077
44731
|
return seriesList.map((seriesNode, seriesIndex) => {
|
|
44078
44732
|
const seriesName = this.extractChartSeriesName(seriesNode);
|
|
44079
44733
|
const values = this.extractChartPointValues(
|
|
@@ -44111,7 +44765,8 @@ var PptxHandlerRuntime75 = class extends PptxHandlerRuntime74 {
|
|
|
44111
44765
|
...dataPoints.length > 0 ? { dataPoints } : {},
|
|
44112
44766
|
...seriesMarker ? { marker: seriesMarker } : {},
|
|
44113
44767
|
...dataLabels.length > 0 ? { dataLabels } : {},
|
|
44114
|
-
...explosion !== void 0 ? { explosion } : {}
|
|
44768
|
+
...explosion !== void 0 ? { explosion } : {},
|
|
44769
|
+
...seriesChartType ? { seriesChartType } : {}
|
|
44115
44770
|
};
|
|
44116
44771
|
});
|
|
44117
44772
|
}
|
|
@@ -44623,6 +45278,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
44623
45278
|
};
|
|
44624
45279
|
|
|
44625
45280
|
// src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts
|
|
45281
|
+
var MAX_OLE_EMBEDDING_BYTES = 25 * 1024 * 1024;
|
|
44626
45282
|
var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime77 {
|
|
44627
45283
|
isZipContainer(data) {
|
|
44628
45284
|
const bytes = new Uint8Array(data);
|
|
@@ -44842,6 +45498,59 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
|
|
|
44842
45498
|
orderedSections
|
|
44843
45499
|
};
|
|
44844
45500
|
}
|
|
45501
|
+
/**
|
|
45502
|
+
* Recover and attach the real embedded binary for each OLE element on a
|
|
45503
|
+
* slide so callers can download / open the inner file.
|
|
45504
|
+
*
|
|
45505
|
+
* For each embedded (non-linked) OLE object: resolve its relationship
|
|
45506
|
+
* target to a zip path (same resolution as images), read the bytes, unwrap
|
|
45507
|
+
* a generic "Package" wrapper (recovering the original file name) when
|
|
45508
|
+
* present, derive a MIME type, and expose the payload as a data-URL on the
|
|
45509
|
+
* element. Linked objects, missing targets, oversized payloads, and parse
|
|
45510
|
+
* failures are skipped silently so existing behaviour is preserved.
|
|
45511
|
+
*/
|
|
45512
|
+
async enrichOleElementsWithEmbeddedData(elements, slidePath, depth = 0) {
|
|
45513
|
+
const MAX_OLE_DEPTH = 32;
|
|
45514
|
+
if (depth > MAX_OLE_DEPTH) {
|
|
45515
|
+
return;
|
|
45516
|
+
}
|
|
45517
|
+
for (const el of elements) {
|
|
45518
|
+
if (el.type === "group" && el.children) {
|
|
45519
|
+
await this.enrichOleElementsWithEmbeddedData(el.children, slidePath, depth + 1);
|
|
45520
|
+
continue;
|
|
45521
|
+
}
|
|
45522
|
+
if (el.type !== "ole" || el.isLinked || !el.oleTarget) {
|
|
45523
|
+
continue;
|
|
45524
|
+
}
|
|
45525
|
+
try {
|
|
45526
|
+
const embeddingPath = this.resolveImagePath(slidePath, el.oleTarget);
|
|
45527
|
+
if (!embeddingPath) {
|
|
45528
|
+
continue;
|
|
45529
|
+
}
|
|
45530
|
+
const file = this.zip.file(embeddingPath);
|
|
45531
|
+
if (!file) {
|
|
45532
|
+
continue;
|
|
45533
|
+
}
|
|
45534
|
+
const buffer = await file.async("arraybuffer");
|
|
45535
|
+
if (buffer.byteLength === 0 || buffer.byteLength > MAX_OLE_EMBEDDING_BYTES) {
|
|
45536
|
+
continue;
|
|
45537
|
+
}
|
|
45538
|
+
const unwrapped = unwrapOleEmbedding(new Uint8Array(buffer));
|
|
45539
|
+
if (unwrapped.data.length === 0) {
|
|
45540
|
+
continue;
|
|
45541
|
+
}
|
|
45542
|
+
const fileName = unwrapped.fileName ?? el.fileName ?? (el.oleName && el.oleFileExtension ? `${el.oleName}.${el.oleFileExtension}` : void 0);
|
|
45543
|
+
const mimeType = mimeTypeForOleFile(fileName ?? `x.${el.oleFileExtension ?? "bin"}`);
|
|
45544
|
+
el.oleEmbeddedData = oleBytesToDataUrl(unwrapped.data, mimeType);
|
|
45545
|
+
el.oleEmbeddedByteSize = unwrapped.data.length;
|
|
45546
|
+
el.oleEmbeddedMimeType = mimeType;
|
|
45547
|
+
if (fileName) {
|
|
45548
|
+
el.oleEmbeddedFileName = fileName;
|
|
45549
|
+
}
|
|
45550
|
+
} catch {
|
|
45551
|
+
}
|
|
45552
|
+
}
|
|
45553
|
+
}
|
|
44845
45554
|
async loadSlidesForPresentation(sectionBySlideId) {
|
|
44846
45555
|
if (!this.presentationData) {
|
|
44847
45556
|
return [];
|
|
@@ -44869,6 +45578,7 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
|
|
|
44869
45578
|
parseSlide: (slideXml2, slidePath) => this.parseSlide(slideXml2, slidePath),
|
|
44870
45579
|
extractMediaTimingMap: (slideXml2, slidePath) => this.extractMediaTimingMap(slideXml2, slidePath),
|
|
44871
45580
|
enrichMediaElementsWithTiming: (elements, timingMap) => this.enrichMediaElementsWithTiming(elements, timingMap),
|
|
45581
|
+
enrichOleElementsWithEmbeddedData: (elements, slidePath) => this.enrichOleElementsWithEmbeddedData(elements, slidePath),
|
|
44872
45582
|
extractBackgroundColor: (slideXml2) => this.extractBackgroundColor(slideXml2),
|
|
44873
45583
|
getLayoutBackgroundColor: (slidePath) => this.getLayoutBackgroundColor(slidePath),
|
|
44874
45584
|
extractBackgroundGradient: (slideXml2) => this.extractBackgroundGradient(slideXml2),
|
|
@@ -57098,6 +57808,51 @@ function setChartDataPointExplosion(element, seriesIndex, pointIndex, explosion)
|
|
|
57098
57808
|
const dp = ensureDataPoint(series, pointIndex);
|
|
57099
57809
|
dp.explosion = explosion;
|
|
57100
57810
|
}
|
|
57811
|
+
function applyLabelEdit(label, edit) {
|
|
57812
|
+
if (edit.showValue !== void 0) {
|
|
57813
|
+
label.showVal = edit.showValue;
|
|
57814
|
+
}
|
|
57815
|
+
if (edit.showCategory !== void 0) {
|
|
57816
|
+
label.showCatName = edit.showCategory;
|
|
57817
|
+
}
|
|
57818
|
+
if (edit.showSeriesName !== void 0) {
|
|
57819
|
+
label.showSerName = edit.showSeriesName;
|
|
57820
|
+
}
|
|
57821
|
+
if (edit.showPercent !== void 0) {
|
|
57822
|
+
label.showPercent = edit.showPercent;
|
|
57823
|
+
}
|
|
57824
|
+
if (edit.showLegendKey !== void 0) {
|
|
57825
|
+
label.showLegendKey = edit.showLegendKey;
|
|
57826
|
+
}
|
|
57827
|
+
if (edit.position !== void 0) {
|
|
57828
|
+
label.position = edit.position;
|
|
57829
|
+
}
|
|
57830
|
+
if (edit.text !== void 0) {
|
|
57831
|
+
label.text = edit.text === "" ? void 0 : edit.text;
|
|
57832
|
+
}
|
|
57833
|
+
}
|
|
57834
|
+
function setChartDataPointLabel(element, seriesIndex, pointIndex, edit) {
|
|
57835
|
+
validateSeriesIndex(element, seriesIndex);
|
|
57836
|
+
const series = element.chartData.series[seriesIndex];
|
|
57837
|
+
if (edit === null) {
|
|
57838
|
+
if (!series.dataLabels) {
|
|
57839
|
+
return;
|
|
57840
|
+
}
|
|
57841
|
+
series.dataLabels = series.dataLabels.filter((l) => l.idx !== pointIndex);
|
|
57842
|
+
if (series.dataLabels.length === 0) {
|
|
57843
|
+
series.dataLabels = void 0;
|
|
57844
|
+
}
|
|
57845
|
+
return;
|
|
57846
|
+
}
|
|
57847
|
+
const labels = series.dataLabels ??= [];
|
|
57848
|
+
let label = labels.find((l) => l.idx === pointIndex);
|
|
57849
|
+
if (!label) {
|
|
57850
|
+
label = { idx: pointIndex };
|
|
57851
|
+
labels.push(label);
|
|
57852
|
+
labels.sort((a, b) => a.idx - b.idx);
|
|
57853
|
+
}
|
|
57854
|
+
applyLabelEdit(label, edit);
|
|
57855
|
+
}
|
|
57101
57856
|
function removeEmptyDataPoint(series, pointIndex) {
|
|
57102
57857
|
if (!series.dataPoints) {
|
|
57103
57858
|
return;
|
|
@@ -57147,8 +57902,8 @@ function generateLayoutXml(definition) {
|
|
|
57147
57902
|
const phShapes = placeholders.map((ph, i) => placeholderSpXml(ph, i + 2)).join("\n");
|
|
57148
57903
|
let bgXml = "";
|
|
57149
57904
|
if (definition.backgroundColor) {
|
|
57150
|
-
const
|
|
57151
|
-
bgXml = ` <p:bg><p:bgPr><a:solidFill><a:srgbClr val="${
|
|
57905
|
+
const hex8 = definition.backgroundColor.replace(/^#/, "").toUpperCase();
|
|
57906
|
+
bgXml = ` <p:bg><p:bgPr><a:solidFill><a:srgbClr val="${hex8}"/></a:solidFill><a:effectLst/></p:bgPr></p:bg>
|
|
57152
57907
|
`;
|
|
57153
57908
|
}
|
|
57154
57909
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@@ -57624,8 +58379,8 @@ var TextBuilder = class _TextBuilder {
|
|
|
57624
58379
|
*
|
|
57625
58380
|
* @param hex - Color as a hex string (e.g. "#FF0000").
|
|
57626
58381
|
*/
|
|
57627
|
-
color(
|
|
57628
|
-
this._options.color =
|
|
58382
|
+
color(hex8) {
|
|
58383
|
+
this._options.color = hex8;
|
|
57629
58384
|
return this;
|
|
57630
58385
|
}
|
|
57631
58386
|
/**
|
|
@@ -62401,8 +63156,8 @@ function stepTable10(t) {
|
|
|
62401
63156
|
}
|
|
62402
63157
|
return out.join(" ");
|
|
62403
63158
|
}
|
|
62404
|
-
function parseHexRgb(
|
|
62405
|
-
const m = /^#?([0-9a-f]{6})/i.exec(
|
|
63159
|
+
function parseHexRgb(hex8) {
|
|
63160
|
+
const m = /^#?([0-9a-f]{6})/i.exec(hex8.trim());
|
|
62406
63161
|
if (!m) {
|
|
62407
63162
|
return { r: 0, g: 0, b: 0 };
|
|
62408
63163
|
}
|
|
@@ -63154,6 +63909,7 @@ exports.createTemplateShapeRawXml = createTemplateShapeRawXml;
|
|
|
63154
63909
|
exports.createTextElement = createTextElement;
|
|
63155
63910
|
exports.createUniformTextSegments = createUniformTextSegments;
|
|
63156
63911
|
exports.dataUrlToMediaBytes = dataUrlToMediaBytes;
|
|
63912
|
+
exports.decodeOle10Native = decodeOle10Native;
|
|
63157
63913
|
exports.decomposeSmartArt = decomposeSmartArt;
|
|
63158
63914
|
exports.decryptPptx = decryptPptx;
|
|
63159
63915
|
exports.demoteSmartArtNode = demoteSmartArtNode;
|
|
@@ -63261,6 +64017,7 @@ exports.isEditableTextElement = isEditableTextElement;
|
|
|
63261
64017
|
exports.isImageLikeElement = isImageLikeElement;
|
|
63262
64018
|
exports.isInkElement = isInkElement;
|
|
63263
64019
|
exports.isNamespaceSupported = isNamespaceSupported;
|
|
64020
|
+
exports.isOle2CompoundFile = isOle2CompoundFile;
|
|
63264
64021
|
exports.isShapeElement = isShapeElement;
|
|
63265
64022
|
exports.isStrictNamespaceUri = isStrictNamespaceUri;
|
|
63266
64023
|
exports.isSummaryZoomSlide = isSummaryZoomSlide;
|
|
@@ -63279,6 +64036,7 @@ exports.mergePresentation = mergePresentation;
|
|
|
63279
64036
|
exports.mergeShapes = mergeShapes;
|
|
63280
64037
|
exports.mergeStyleParts = mergeStyleParts;
|
|
63281
64038
|
exports.mergeThemeColorOverride = mergeThemeColorOverride;
|
|
64039
|
+
exports.mimeTypeForOleFile = mimeTypeForOleFile;
|
|
63282
64040
|
exports.mm = mm;
|
|
63283
64041
|
exports.moveSlidesToSection = moveSlidesToSection;
|
|
63284
64042
|
exports.navigateCustomShow = navigateCustomShow;
|
|
@@ -63289,6 +64047,7 @@ exports.normalizePath = normalizePath;
|
|
|
63289
64047
|
exports.normalizeStrictXml = normalizeStrictXml;
|
|
63290
64048
|
exports.normalizeStrokeDashType = normalizeStrokeDashType;
|
|
63291
64049
|
exports.obfuscateFont = obfuscateFont;
|
|
64050
|
+
exports.oleBytesToDataUrl = oleBytesToDataUrl;
|
|
63292
64051
|
exports.ooxmlArcToSvg = ooxmlArcToSvg;
|
|
63293
64052
|
exports.ooxmlToPresetName = ooxmlToPresetName;
|
|
63294
64053
|
exports.parseActiveXControlsFromSlide = parseActiveXControlsFromSlide;
|
|
@@ -63378,6 +64137,7 @@ exports.setChartCategories = setChartCategories;
|
|
|
63378
64137
|
exports.setChartDataLabels = setChartDataLabels;
|
|
63379
64138
|
exports.setChartDataPointExplosion = setChartDataPointExplosion;
|
|
63380
64139
|
exports.setChartDataPointFill = setChartDataPointFill;
|
|
64140
|
+
exports.setChartDataPointLabel = setChartDataPointLabel;
|
|
63381
64141
|
exports.setChartGrouping = setChartGrouping;
|
|
63382
64142
|
exports.setChartLegend = setChartLegend;
|
|
63383
64143
|
exports.setChartSeriesChartType = setChartSeriesChartType;
|
|
@@ -63400,6 +64160,7 @@ exports.unionPolygons = unionPolygons;
|
|
|
63400
64160
|
exports.unionShapes = unionShapes;
|
|
63401
64161
|
exports.unionSvgPaths = unionSvgPaths;
|
|
63402
64162
|
exports.unwrapAlternateContent = unwrapAlternateContent;
|
|
64163
|
+
exports.unwrapOleEmbedding = unwrapOleEmbedding;
|
|
63403
64164
|
exports.updateCellTextInRawXml = updateCellTextInRawXml;
|
|
63404
64165
|
exports.updateCellTextStyleInRawXml = updateCellTextStyleInRawXml;
|
|
63405
64166
|
exports.updateChartDataPoint = updateChartDataPoint;
|