pptx-react-viewer 3.16.3 → 3.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-G33WODR7.js → AiChatPanel-QJKB2BL3.js} +24 -24
- package/dist/AiChatPanel-QJKB2BL3.js.br +0 -0
- package/dist/AiChatPanel-QJKB2BL3.js.gz +0 -0
- package/dist/{AiChatPanel-X7NUNEJO.mjs → AiChatPanel-YWYME2RM.mjs} +3 -3
- package/dist/AiChatPanel-YWYME2RM.mjs.br +0 -0
- package/dist/AiChatPanel-YWYME2RM.mjs.gz +0 -0
- package/dist/{Area3DChartScene-HBTW5EQP.mjs → Area3DChartScene-47SQRQTD.mjs} +1 -1
- package/dist/Area3DChartScene-47SQRQTD.mjs.br +0 -0
- package/dist/Area3DChartScene-47SQRQTD.mjs.gz +0 -0
- package/dist/{Area3DChartScene-R3P4NSR5.js → Area3DChartScene-DEWKUQUS.js} +2 -2
- package/dist/{Area3DChartScene-R3P4NSR5.js.br → Area3DChartScene-DEWKUQUS.js.br} +0 -0
- package/dist/Area3DChartScene-DEWKUQUS.js.gz +0 -0
- package/dist/{Bar3DChartScene-6IKIGGD7.js → Bar3DChartScene-HRCZHDNT.js} +2 -2
- package/dist/Bar3DChartScene-HRCZHDNT.js.br +0 -0
- package/dist/Bar3DChartScene-HRCZHDNT.js.gz +0 -0
- package/dist/{Bar3DChartScene-RTHG6TVC.mjs → Bar3DChartScene-JXXBIKLB.mjs} +1 -1
- package/dist/{Bar3DChartScene-RTHG6TVC.mjs.br → Bar3DChartScene-JXXBIKLB.mjs.br} +0 -0
- package/dist/Bar3DChartScene-JXXBIKLB.mjs.gz +0 -0
- package/dist/{Line3DChartScene-HNNC2O66.js → Line3DChartScene-JPHU2WGC.js} +2 -2
- package/dist/{Line3DChartScene-HNNC2O66.js.br → Line3DChartScene-JPHU2WGC.js.br} +0 -0
- package/dist/Line3DChartScene-JPHU2WGC.js.gz +0 -0
- package/dist/{Line3DChartScene-WQIUFVLB.mjs → Line3DChartScene-S2SV5HCH.mjs} +1 -1
- package/dist/{Line3DChartScene-WQIUFVLB.mjs.br → Line3DChartScene-S2SV5HCH.mjs.br} +0 -0
- package/dist/Line3DChartScene-S2SV5HCH.mjs.gz +0 -0
- package/dist/{Model3DScene-BPHGVJQG.mjs → Model3DScene-4MOLASW6.mjs} +1 -1
- package/dist/Model3DScene-4MOLASW6.mjs.br +0 -0
- package/dist/Model3DScene-4MOLASW6.mjs.gz +0 -0
- package/dist/{Model3DScene-AAMDGTRI.js → Model3DScene-JP4ICMLY.js} +2 -2
- package/dist/Model3DScene-JP4ICMLY.js.br +0 -0
- package/dist/Model3DScene-JP4ICMLY.js.gz +0 -0
- package/dist/{PieChart3DScene-S5OWDFJN.mjs → PieChart3DScene-PV7BN7MS.mjs} +1 -1
- package/dist/{PieChart3DScene-S5OWDFJN.mjs.br → PieChart3DScene-PV7BN7MS.mjs.br} +0 -0
- package/dist/PieChart3DScene-PV7BN7MS.mjs.gz +0 -0
- package/dist/{PieChart3DScene-LO6IJAWY.js → PieChart3DScene-QYWGHJGG.js} +2 -2
- package/dist/{PieChart3DScene-LO6IJAWY.js.br → PieChart3DScene-QYWGHJGG.js.br} +0 -0
- package/dist/PieChart3DScene-QYWGHJGG.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-7CKYX5HW.mjs → SurfaceChart3DScene-7ONY7OIY.mjs} +1 -1
- package/dist/SurfaceChart3DScene-7ONY7OIY.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-7ONY7OIY.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-FLQRXC6F.js → SurfaceChart3DScene-KAD2GVBY.js} +2 -2
- package/dist/{SurfaceChart3DScene-FLQRXC6F.js.br → SurfaceChart3DScene-KAD2GVBY.js.br} +0 -0
- package/dist/SurfaceChart3DScene-KAD2GVBY.js.gz +0 -0
- package/dist/{chunk-CVS2CHLU.js → chunk-4WGGCKLD.js} +5 -5
- package/dist/chunk-4WGGCKLD.js.br +0 -0
- package/dist/chunk-4WGGCKLD.js.gz +0 -0
- package/dist/{chunk-VA2JFII4.mjs → chunk-6TGJ5RGQ.mjs} +1 -1
- package/dist/chunk-6TGJ5RGQ.mjs.br +0 -0
- package/dist/{chunk-VA2JFII4.mjs.gz → chunk-6TGJ5RGQ.mjs.gz} +0 -0
- package/dist/{chunk-QMLJFL7G.js → chunk-EDCU5EK5.js} +451 -451
- package/dist/chunk-EDCU5EK5.js.br +0 -0
- package/dist/chunk-EDCU5EK5.js.gz +0 -0
- package/dist/{chunk-WTPGQ3K7.mjs → chunk-IKQY2ZU2.mjs} +1 -1
- package/dist/chunk-IKQY2ZU2.mjs.br +0 -0
- package/dist/chunk-IKQY2ZU2.mjs.gz +0 -0
- package/dist/{chunk-VVAXSNG5.mjs → chunk-ISXUHV3L.mjs} +2 -2
- package/dist/chunk-ISXUHV3L.mjs.br +0 -0
- package/dist/chunk-ISXUHV3L.mjs.gz +0 -0
- package/dist/{chunk-4CLG3TRU.js → chunk-NMSZ3NSG.js} +169 -169
- package/dist/chunk-NMSZ3NSG.js.br +0 -0
- package/dist/chunk-NMSZ3NSG.js.gz +0 -0
- package/dist/{chunk-3TPQY6WR.js → chunk-PABSSYRA.js} +134 -103
- package/dist/chunk-PABSSYRA.js.br +0 -0
- package/dist/chunk-PABSSYRA.js.gz +0 -0
- package/dist/{chunk-4U3OI6J3.mjs → chunk-R5CW64K4.mjs} +134 -103
- package/dist/chunk-R5CW64K4.mjs.br +0 -0
- package/dist/chunk-R5CW64K4.mjs.gz +0 -0
- package/dist/{chunk-2G2MMJRA.mjs → chunk-USQGKC4A.mjs} +12 -12
- package/dist/chunk-USQGKC4A.mjs.br +0 -0
- package/dist/chunk-USQGKC4A.mjs.gz +0 -0
- package/dist/{chunk-AAVKRMQA.js → chunk-ZWZGKJ4E.js} +1290 -1290
- package/dist/chunk-ZWZGKJ4E.js.br +0 -0
- package/dist/chunk-ZWZGKJ4E.js.gz +0 -0
- package/dist/index.js +45 -45
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-G33WODR7.js.br +0 -0
- package/dist/AiChatPanel-G33WODR7.js.gz +0 -0
- package/dist/AiChatPanel-X7NUNEJO.mjs.br +0 -0
- package/dist/AiChatPanel-X7NUNEJO.mjs.gz +0 -0
- package/dist/Area3DChartScene-HBTW5EQP.mjs.br +0 -0
- package/dist/Area3DChartScene-HBTW5EQP.mjs.gz +0 -0
- package/dist/Area3DChartScene-R3P4NSR5.js.gz +0 -0
- package/dist/Bar3DChartScene-6IKIGGD7.js.br +0 -0
- package/dist/Bar3DChartScene-6IKIGGD7.js.gz +0 -0
- package/dist/Bar3DChartScene-RTHG6TVC.mjs.gz +0 -0
- package/dist/Line3DChartScene-HNNC2O66.js.gz +0 -0
- package/dist/Line3DChartScene-WQIUFVLB.mjs.gz +0 -0
- package/dist/Model3DScene-AAMDGTRI.js.br +0 -0
- package/dist/Model3DScene-AAMDGTRI.js.gz +0 -0
- package/dist/Model3DScene-BPHGVJQG.mjs.br +0 -0
- package/dist/Model3DScene-BPHGVJQG.mjs.gz +0 -0
- package/dist/PieChart3DScene-LO6IJAWY.js.gz +0 -0
- package/dist/PieChart3DScene-S5OWDFJN.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-7CKYX5HW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-7CKYX5HW.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-FLQRXC6F.js.gz +0 -0
- package/dist/chunk-2G2MMJRA.mjs.br +0 -0
- package/dist/chunk-2G2MMJRA.mjs.gz +0 -0
- package/dist/chunk-3TPQY6WR.js.br +0 -0
- package/dist/chunk-3TPQY6WR.js.gz +0 -0
- package/dist/chunk-4CLG3TRU.js.br +0 -0
- package/dist/chunk-4CLG3TRU.js.gz +0 -0
- package/dist/chunk-4U3OI6J3.mjs.br +0 -0
- package/dist/chunk-4U3OI6J3.mjs.gz +0 -0
- package/dist/chunk-AAVKRMQA.js.br +0 -0
- package/dist/chunk-AAVKRMQA.js.gz +0 -0
- package/dist/chunk-CVS2CHLU.js.br +0 -0
- package/dist/chunk-CVS2CHLU.js.gz +0 -0
- package/dist/chunk-QMLJFL7G.js.br +0 -0
- package/dist/chunk-QMLJFL7G.js.gz +0 -0
- package/dist/chunk-VA2JFII4.mjs.br +0 -0
- package/dist/chunk-VVAXSNG5.mjs.br +0 -0
- package/dist/chunk-VVAXSNG5.mjs.gz +0 -0
- package/dist/chunk-WTPGQ3K7.mjs.br +0 -0
- package/dist/chunk-WTPGQ3K7.mjs.gz +0 -0
|
@@ -88452,33 +88452,61 @@ var init_tag_package = __esm({
|
|
|
88452
88452
|
TAG_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.tags+xml";
|
|
88453
88453
|
}
|
|
88454
88454
|
});
|
|
88455
|
-
function
|
|
88456
|
-
|
|
88457
|
-
|
|
88458
|
-
|
|
88459
|
-
if (!node || typeof node !== "object") {
|
|
88460
|
-
return false;
|
|
88461
|
-
}
|
|
88462
|
-
const obj = node;
|
|
88463
|
-
for (const key2 of Object.keys(obj)) {
|
|
88464
|
-
if (getLocalName2(key2) === "t") {
|
|
88465
|
-
const value = obj[key2];
|
|
88466
|
-
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
88467
|
-
value["#text"] = text22;
|
|
88468
|
-
} else {
|
|
88469
|
-
obj[key2] = text22;
|
|
88470
|
-
}
|
|
88471
|
-
return true;
|
|
88455
|
+
function firstTextRun(paragraph, getLocalName2) {
|
|
88456
|
+
for (const [key2, value] of Object.entries(paragraph)) {
|
|
88457
|
+
if (!["r", "fld"].includes(getLocalName2(key2))) {
|
|
88458
|
+
continue;
|
|
88472
88459
|
}
|
|
88473
|
-
const
|
|
88474
|
-
|
|
88475
|
-
|
|
88476
|
-
if (setFirstText(c, text22, getLocalName2)) {
|
|
88477
|
-
return true;
|
|
88460
|
+
for (const run of Array.isArray(value) ? value : [value]) {
|
|
88461
|
+
if (run && typeof run === "object" && !Array.isArray(run) && findKey6(run, "t", getLocalName2)) {
|
|
88462
|
+
return [key2, run];
|
|
88478
88463
|
}
|
|
88479
88464
|
}
|
|
88480
88465
|
}
|
|
88481
|
-
return
|
|
88466
|
+
return void 0;
|
|
88467
|
+
}
|
|
88468
|
+
function setTitleText(title, text22, getLocalName2) {
|
|
88469
|
+
const txKey = findKey6(title, "tx", getLocalName2) ?? "c:tx";
|
|
88470
|
+
const tx = title[txKey];
|
|
88471
|
+
const texts = [];
|
|
88472
|
+
if (tx && typeof tx === "object") {
|
|
88473
|
+
collectAllText(tx, getLocalName2, texts);
|
|
88474
|
+
}
|
|
88475
|
+
if (texts.join("") === text22) {
|
|
88476
|
+
return;
|
|
88477
|
+
}
|
|
88478
|
+
const richKey = tx && typeof tx === "object" ? findKey6(tx, "rich", getLocalName2) : void 0;
|
|
88479
|
+
const rich = richKey ? tx[richKey] : void 0;
|
|
88480
|
+
if (!rich || typeof rich !== "object" || Array.isArray(rich)) {
|
|
88481
|
+
const textNode = buildTitle(text22)["c:tx"];
|
|
88482
|
+
if (txKey in title) {
|
|
88483
|
+
title[txKey] = textNode;
|
|
88484
|
+
} else {
|
|
88485
|
+
insertAt2(title, 0, txKey, textNode);
|
|
88486
|
+
}
|
|
88487
|
+
return;
|
|
88488
|
+
}
|
|
88489
|
+
const pKey = findKey6(rich, "p", getLocalName2) ?? "a:p";
|
|
88490
|
+
const value = rich[pKey];
|
|
88491
|
+
const paragraphs = (Array.isArray(value) ? value : [value]).filter(
|
|
88492
|
+
(entry2) => Boolean(entry2) && typeof entry2 === "object" && !Array.isArray(entry2)
|
|
88493
|
+
);
|
|
88494
|
+
const paragraph = paragraphs.find((p) => firstTextRun(p, getLocalName2)) ?? paragraphs[0] ?? {};
|
|
88495
|
+
const carrier = firstTextRun(paragraph, getLocalName2);
|
|
88496
|
+
const original = carrier?.[1] ?? {};
|
|
88497
|
+
const runKey = carrier ? carrier[0].replace(/[^:]+$/u, "r") : "a:r";
|
|
88498
|
+
const rPrKey = findKey6(original, "rPr", getLocalName2);
|
|
88499
|
+
const run = carrier && getLocalName2(carrier[0]) === "r" ? { ...original } : rPrKey ? { [rPrKey]: original[rPrKey] } : {};
|
|
88500
|
+
const textKey = findKey6(original, "t", getLocalName2) ?? "a:t";
|
|
88501
|
+
const oldText = original[textKey];
|
|
88502
|
+
const attributes = oldText && typeof oldText === "object" && !Array.isArray(oldText) ? oldText : void 0;
|
|
88503
|
+
run[textKey] = attributes ? { ...attributes, "#text": text22 } : text22;
|
|
88504
|
+
const entries = Object.entries(paragraph);
|
|
88505
|
+
rich[pKey] = Object.fromEntries([
|
|
88506
|
+
...entries.filter(([key2]) => key2.startsWith("@_") || getLocalName2(key2) === "pPr"),
|
|
88507
|
+
[runKey, run],
|
|
88508
|
+
...entries.filter(([key2]) => getLocalName2(key2) === "endParaRPr")
|
|
88509
|
+
]);
|
|
88482
88510
|
}
|
|
88483
88511
|
function buildTitle(text22) {
|
|
88484
88512
|
return {
|
|
@@ -88509,7 +88537,7 @@ function applyChartAxisTitleToXml(axisNode, titleText, getLocalName2) {
|
|
|
88509
88537
|
if (titleText === void 0) {
|
|
88510
88538
|
return;
|
|
88511
88539
|
}
|
|
88512
|
-
const titleKey =
|
|
88540
|
+
const titleKey = findKey6(axisNode, "title", getLocalName2);
|
|
88513
88541
|
if (titleText === "") {
|
|
88514
88542
|
if (titleKey) {
|
|
88515
88543
|
delete axisNode[titleKey];
|
|
@@ -88517,8 +88545,10 @@ function applyChartAxisTitleToXml(axisNode, titleText, getLocalName2) {
|
|
|
88517
88545
|
return;
|
|
88518
88546
|
}
|
|
88519
88547
|
if (titleKey) {
|
|
88520
|
-
const
|
|
88521
|
-
if (!
|
|
88548
|
+
const title = axisNode[titleKey];
|
|
88549
|
+
if (title && typeof title === "object" && !Array.isArray(title)) {
|
|
88550
|
+
setTitleText(title, titleText, getLocalName2);
|
|
88551
|
+
} else {
|
|
88522
88552
|
axisNode[titleKey] = buildTitle(titleText);
|
|
88523
88553
|
}
|
|
88524
88554
|
return;
|
|
@@ -88547,27 +88577,27 @@ function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveCo
|
|
|
88547
88577
|
if (!hasAny) {
|
|
88548
88578
|
return;
|
|
88549
88579
|
}
|
|
88550
|
-
const titleKey =
|
|
88580
|
+
const titleKey = findKey6(axisNode, "title", getLocalName2);
|
|
88551
88581
|
if (!titleKey) {
|
|
88552
88582
|
return;
|
|
88553
88583
|
}
|
|
88554
88584
|
const title = { ...axisNode[titleKey] ?? {} };
|
|
88555
|
-
const txPrKey =
|
|
88585
|
+
const txPrKey = findKey6(title, "txPr", getLocalName2) ?? "c:txPr";
|
|
88556
88586
|
const txPr = { ...title[txPrKey] ?? {} };
|
|
88557
|
-
if (!txPr[
|
|
88587
|
+
if (!txPr[findKey6(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
|
|
88558
88588
|
txPr["a:bodyPr"] = {};
|
|
88559
88589
|
}
|
|
88560
|
-
if (!txPr[
|
|
88590
|
+
if (!txPr[findKey6(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
|
|
88561
88591
|
txPr["a:lstStyle"] = {};
|
|
88562
88592
|
}
|
|
88563
|
-
const pKey =
|
|
88593
|
+
const pKey = findKey6(txPr, "p", getLocalName2) ?? "a:p";
|
|
88564
88594
|
const existingP = txPr[pKey];
|
|
88565
88595
|
const para = {
|
|
88566
88596
|
...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
|
|
88567
88597
|
};
|
|
88568
|
-
const pPrKey =
|
|
88598
|
+
const pPrKey = findKey6(para, "pPr", getLocalName2) ?? "a:pPr";
|
|
88569
88599
|
const pPr = { ...para[pPrKey] ?? {} };
|
|
88570
|
-
const defRPrKey =
|
|
88600
|
+
const defRPrKey = findKey6(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
88571
88601
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
88572
88602
|
pPr[defRPrKey] = { ...existingDefRPr, ...buildDefRPr(style, existingDefRPr, resolveColor2) };
|
|
88573
88603
|
para[pPrKey] = pPr;
|
|
@@ -88579,6 +88609,7 @@ var AFTER_TITLE;
|
|
|
88579
88609
|
var init_chart_axis_title_serializer = __esm({
|
|
88580
88610
|
"src/core/utils/chart-axis-title-serializer.ts"() {
|
|
88581
88611
|
init_chart_color_choice();
|
|
88612
|
+
init_chart_title_xml_ops();
|
|
88582
88613
|
AFTER_TITLE = /* @__PURE__ */ new Set([
|
|
88583
88614
|
"numFmt",
|
|
88584
88615
|
"majorTickMark",
|
|
@@ -88922,7 +88953,7 @@ var init_chart_container_schema = __esm({
|
|
|
88922
88953
|
init_chart_container_content_model();
|
|
88923
88954
|
}
|
|
88924
88955
|
});
|
|
88925
|
-
function
|
|
88956
|
+
function findKey20(obj, local, getLocalName2) {
|
|
88926
88957
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
88927
88958
|
}
|
|
88928
88959
|
function nonSeriesEntries(container, getLocalName2) {
|
|
@@ -88954,14 +88985,14 @@ function consolidateComboContainersInXml(plotArea, getLocalName2) {
|
|
|
88954
88985
|
if (!primary) {
|
|
88955
88986
|
return { primaryKey, containerChildren };
|
|
88956
88987
|
}
|
|
88957
|
-
const serKey =
|
|
88988
|
+
const serKey = findKey20(primary, "ser", getLocalName2) ?? "c:ser";
|
|
88958
88989
|
const allSeries = [];
|
|
88959
88990
|
for (const key2 of containerKeys) {
|
|
88960
88991
|
const container = plotArea[key2];
|
|
88961
88992
|
if (!container) {
|
|
88962
88993
|
continue;
|
|
88963
88994
|
}
|
|
88964
|
-
const containerSerKey =
|
|
88995
|
+
const containerSerKey = findKey20(container, "ser", getLocalName2);
|
|
88965
88996
|
if (containerSerKey) {
|
|
88966
88997
|
allSeries.push(...ensureArray18(container[containerSerKey]));
|
|
88967
88998
|
}
|
|
@@ -88989,7 +89020,7 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
|
|
|
88989
89020
|
if (!original) {
|
|
88990
89021
|
return false;
|
|
88991
89022
|
}
|
|
88992
|
-
const serKey =
|
|
89023
|
+
const serKey = findKey20(original, "ser", getLocalName2) ?? "c:ser";
|
|
88993
89024
|
const serNodes = ensureArray18(original[serKey]);
|
|
88994
89025
|
if (serNodes.length !== series.length) {
|
|
88995
89026
|
return false;
|
|
@@ -89046,7 +89077,7 @@ function applyGroupAxisReferences(container, series, axes, getLocalName2) {
|
|
|
89046
89077
|
if (valueAxisId === void 0 || categoryAxisId === void 0) {
|
|
89047
89078
|
return;
|
|
89048
89079
|
}
|
|
89049
|
-
const key2 =
|
|
89080
|
+
const key2 = findKey20(container, "axId", getLocalName2) ?? "c:axId";
|
|
89050
89081
|
container[key2] = [{ "@_val": String(categoryAxisId) }, { "@_val": String(valueAxisId) }];
|
|
89051
89082
|
}
|
|
89052
89083
|
var init_chart_combo_serializer = __esm({
|
|
@@ -89054,7 +89085,7 @@ var init_chart_combo_serializer = __esm({
|
|
|
89054
89085
|
init_chart_container_schema();
|
|
89055
89086
|
}
|
|
89056
89087
|
});
|
|
89057
|
-
function
|
|
89088
|
+
function findKey21(obj, local, getLocalName2) {
|
|
89058
89089
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
89059
89090
|
}
|
|
89060
89091
|
function points3(values) {
|
|
@@ -89112,9 +89143,9 @@ function filteredSeriesUnchanged(container, filteredSeries, xmlLookup) {
|
|
|
89112
89143
|
});
|
|
89113
89144
|
}
|
|
89114
89145
|
function applyFilteredSeriesToXml(container, filteredSeries, categories, containerLocalName, getLocalName2) {
|
|
89115
|
-
const extLstKey =
|
|
89146
|
+
const extLstKey = findKey21(container, "extLst", getLocalName2) ?? "c:extLst";
|
|
89116
89147
|
const extLst = { ...container[extLstKey] ?? {} };
|
|
89117
|
-
const extKey =
|
|
89148
|
+
const extKey = findKey21(extLst, "ext", getLocalName2);
|
|
89118
89149
|
const exts = extKey ? Array.isArray(extLst[extKey]) ? [...extLst[extKey]] : [extLst[extKey]] : [];
|
|
89119
89150
|
const otherExts = exts.filter((ext) => ext["@_uri"] !== CHART_FILTERED_SERIES_EXT_URI);
|
|
89120
89151
|
const ownExt = {
|
|
@@ -89324,11 +89355,11 @@ var init_chart_legend_serializer = __esm({
|
|
|
89324
89355
|
init_chart_def_rpr_style();
|
|
89325
89356
|
}
|
|
89326
89357
|
});
|
|
89327
|
-
function
|
|
89358
|
+
function findKey22(node, name, localName28) {
|
|
89328
89359
|
return Object.keys(node).find((key2) => localName28(key2) === name);
|
|
89329
89360
|
}
|
|
89330
89361
|
function setOrdered5(node, name, value, localName28) {
|
|
89331
|
-
const key2 =
|
|
89362
|
+
const key2 = findKey22(node, name, localName28);
|
|
89332
89363
|
if (key2) {
|
|
89333
89364
|
node[key2] = value;
|
|
89334
89365
|
return;
|
|
@@ -89353,7 +89384,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
|
|
|
89353
89384
|
if (style === void 0) {
|
|
89354
89385
|
return;
|
|
89355
89386
|
}
|
|
89356
|
-
const key2 =
|
|
89387
|
+
const key2 = findKey22(chartContainer, elementName, localName28);
|
|
89357
89388
|
if (style === null) {
|
|
89358
89389
|
if (key2) {
|
|
89359
89390
|
delete chartContainer[key2];
|
|
@@ -89364,7 +89395,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
|
|
|
89364
89395
|
const node = { ...existing };
|
|
89365
89396
|
const hasLineProps = style.color || style.width !== void 0 || style.dashStyle;
|
|
89366
89397
|
if (hasLineProps) {
|
|
89367
|
-
const spPrKey =
|
|
89398
|
+
const spPrKey = findKey22(node, "spPr", localName28) ?? "c:spPr";
|
|
89368
89399
|
node[spPrKey] = writeChartShapeProps(
|
|
89369
89400
|
node[spPrKey],
|
|
89370
89401
|
{ strokeColor: style.color, strokeWidth: style.width, strokeDashStyle: style.dashStyle },
|
|
@@ -89396,7 +89427,7 @@ var init_chart_line_style_serializer = __esm({
|
|
|
89396
89427
|
];
|
|
89397
89428
|
}
|
|
89398
89429
|
});
|
|
89399
|
-
function
|
|
89430
|
+
function findKey23(obj, local, getLocalName2) {
|
|
89400
89431
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
89401
89432
|
}
|
|
89402
89433
|
function insertBeforeLn(obj, key2, value, getLocalName2) {
|
|
@@ -89426,14 +89457,14 @@ function insertFirst(obj, key2, value) {
|
|
|
89426
89457
|
function writeSeriesColorToSpPr(spPr, hex4, isLineFamily, getLocalName2, resolveColor2) {
|
|
89427
89458
|
const normalizedHex = hex4.replace(/^#/u, "");
|
|
89428
89459
|
if (isLineFamily) {
|
|
89429
|
-
const lnKey =
|
|
89460
|
+
const lnKey = findKey23(spPr, "ln", getLocalName2) ?? "a:ln";
|
|
89430
89461
|
const ln = spPr[lnKey] ?? {};
|
|
89431
89462
|
const hadLn = Boolean(spPr[lnKey]);
|
|
89432
|
-
const noFillKey2 =
|
|
89463
|
+
const noFillKey2 = findKey23(ln, "noFill", getLocalName2);
|
|
89433
89464
|
if (noFillKey2) {
|
|
89434
89465
|
delete ln[noFillKey2];
|
|
89435
89466
|
}
|
|
89436
|
-
const lnFillKey =
|
|
89467
|
+
const lnFillKey = findKey23(ln, "solidFill", getLocalName2) ?? "a:solidFill";
|
|
89437
89468
|
const authoredFill2 = ln[lnFillKey];
|
|
89438
89469
|
const fillNode2 = serializeColorChoice(
|
|
89439
89470
|
authoredFill2,
|
|
@@ -89450,11 +89481,11 @@ function writeSeriesColorToSpPr(spPr, hex4, isLineFamily, getLocalName2, resolve
|
|
|
89450
89481
|
}
|
|
89451
89482
|
return;
|
|
89452
89483
|
}
|
|
89453
|
-
const noFillKey =
|
|
89484
|
+
const noFillKey = findKey23(spPr, "noFill", getLocalName2);
|
|
89454
89485
|
if (noFillKey) {
|
|
89455
89486
|
delete spPr[noFillKey];
|
|
89456
89487
|
}
|
|
89457
|
-
const fillKey =
|
|
89488
|
+
const fillKey = findKey23(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
|
|
89458
89489
|
const authoredFill = spPr[fillKey];
|
|
89459
89490
|
const fillNode = serializeColorChoice(
|
|
89460
89491
|
authoredFill,
|
|
@@ -89472,11 +89503,11 @@ var init_chart_series_color_serializer = __esm({
|
|
|
89472
89503
|
init_color_xml_preservation();
|
|
89473
89504
|
}
|
|
89474
89505
|
});
|
|
89475
|
-
function
|
|
89506
|
+
function findKey24(obj, local, getLocalName2) {
|
|
89476
89507
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
89477
89508
|
}
|
|
89478
89509
|
function upsertValChild(parent, localName28, value, getLocalName2) {
|
|
89479
|
-
const existingKey =
|
|
89510
|
+
const existingKey = findKey24(parent, localName28, getLocalName2);
|
|
89480
89511
|
if (value === void 0) {
|
|
89481
89512
|
if (existingKey) {
|
|
89482
89513
|
delete parent[existingKey];
|
|
@@ -89516,7 +89547,7 @@ function applySurfaceWireframeToXml(chartTypeContainer, containerLocalName, wire
|
|
|
89516
89547
|
orderChartContainerChildren(chartTypeContainer, containerLocalName, getLocalName2);
|
|
89517
89548
|
}
|
|
89518
89549
|
function applySeriesBar3DShapeToXml(seriesNode, shape, getLocalName2) {
|
|
89519
|
-
const existingKey =
|
|
89550
|
+
const existingKey = findKey24(seriesNode, "shape", getLocalName2);
|
|
89520
89551
|
if (shape === void 0) {
|
|
89521
89552
|
if (existingKey) {
|
|
89522
89553
|
delete seriesNode[existingKey];
|
|
@@ -89719,7 +89750,7 @@ var init_chart_title_serializer = __esm({
|
|
|
89719
89750
|
init_chart_title_xml_ops();
|
|
89720
89751
|
}
|
|
89721
89752
|
});
|
|
89722
|
-
function
|
|
89753
|
+
function findKey25(node, localName28, getLocalName2) {
|
|
89723
89754
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
|
|
89724
89755
|
}
|
|
89725
89756
|
function setChildOrdered(node, key2, existingKey, value, laterNames, getLocalName2) {
|
|
@@ -89762,9 +89793,9 @@ function asArray3(value) {
|
|
|
89762
89793
|
return value && typeof value === "object" ? [value] : [];
|
|
89763
89794
|
}
|
|
89764
89795
|
function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
|
|
89765
|
-
const txKey =
|
|
89796
|
+
const txKey = findKey25(title, "tx", getLocalName2);
|
|
89766
89797
|
const tx = txKey ? title[txKey] : void 0;
|
|
89767
|
-
const richKey = tx ?
|
|
89798
|
+
const richKey = tx ? findKey25(tx, "rich", getLocalName2) : void 0;
|
|
89768
89799
|
const rich = richKey && tx ? tx[richKey] : void 0;
|
|
89769
89800
|
if (!tx || !rich || !txKey || !richKey) {
|
|
89770
89801
|
return void 0;
|
|
@@ -89773,22 +89804,22 @@ function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
|
|
|
89773
89804
|
if (!hasFont) {
|
|
89774
89805
|
return txKey;
|
|
89775
89806
|
}
|
|
89776
|
-
const pKey =
|
|
89807
|
+
const pKey = findKey25(rich, "p", getLocalName2) ?? "a:p";
|
|
89777
89808
|
const paragraphs = asArray3(rich[pKey]).map((para) => {
|
|
89778
89809
|
const next = { ...para };
|
|
89779
|
-
const pPrKey =
|
|
89810
|
+
const pPrKey = findKey25(next, "pPr", getLocalName2) ?? "a:pPr";
|
|
89780
89811
|
const pPr = { ...next[pPrKey] ?? {} };
|
|
89781
|
-
const defRPrKey =
|
|
89812
|
+
const defRPrKey = findKey25(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
89782
89813
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
89783
89814
|
pPr[defRPrKey] = {
|
|
89784
89815
|
...existingDefRPr,
|
|
89785
89816
|
...buildTitleDefRPr(style, existingDefRPr, resolveColor2)
|
|
89786
89817
|
};
|
|
89787
89818
|
next[pPrKey] = pPr;
|
|
89788
|
-
const rKey =
|
|
89819
|
+
const rKey = findKey25(next, "r", getLocalName2);
|
|
89789
89820
|
if (rKey) {
|
|
89790
89821
|
const runs = asArray3(next[rKey]).map((run) => {
|
|
89791
|
-
const rPrKey =
|
|
89822
|
+
const rPrKey = findKey25(run, "rPr", getLocalName2) ?? "a:rPr";
|
|
89792
89823
|
const existingRPr = run[rPrKey] ?? {};
|
|
89793
89824
|
const nextRun = { ...run };
|
|
89794
89825
|
nextRun[rPrKey] = { ...existingRPr, ...buildTitleDefRPr(style, existingRPr, resolveColor2) };
|
|
@@ -89811,13 +89842,13 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
|
|
|
89811
89842
|
return;
|
|
89812
89843
|
}
|
|
89813
89844
|
const { prefix } = options;
|
|
89814
|
-
const titleKey =
|
|
89845
|
+
const titleKey = findKey25(chartRoot, "title", getLocalName2);
|
|
89815
89846
|
if (!titleKey) {
|
|
89816
89847
|
return;
|
|
89817
89848
|
}
|
|
89818
89849
|
const title = { ...chartRoot[titleKey] ?? {} };
|
|
89819
89850
|
if (style.spPr !== void 0) {
|
|
89820
|
-
const spPrKey =
|
|
89851
|
+
const spPrKey = findKey25(title, "spPr", getLocalName2);
|
|
89821
89852
|
if (style.spPr === null) {
|
|
89822
89853
|
if (spPrKey) {
|
|
89823
89854
|
delete title[spPrKey];
|
|
@@ -89834,23 +89865,23 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
|
|
|
89834
89865
|
}
|
|
89835
89866
|
const richKey = applyRichTitleFont(title, style, getLocalName2, resolveColor2);
|
|
89836
89867
|
if (hasFont && richKey === void 0) {
|
|
89837
|
-
const existingTxPrKey =
|
|
89868
|
+
const existingTxPrKey = findKey25(title, "txPr", getLocalName2);
|
|
89838
89869
|
const txPrKey = existingTxPrKey ?? `${prefix}:txPr`;
|
|
89839
89870
|
const txPr = { ...title[txPrKey] ?? {} };
|
|
89840
|
-
if (!txPr[
|
|
89871
|
+
if (!txPr[findKey25(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
|
|
89841
89872
|
txPr["a:bodyPr"] = {};
|
|
89842
89873
|
}
|
|
89843
|
-
if (!txPr[
|
|
89874
|
+
if (!txPr[findKey25(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
|
|
89844
89875
|
txPr["a:lstStyle"] = {};
|
|
89845
89876
|
}
|
|
89846
|
-
const pKey =
|
|
89877
|
+
const pKey = findKey25(txPr, "p", getLocalName2) ?? "a:p";
|
|
89847
89878
|
const existingP = txPr[pKey];
|
|
89848
89879
|
const para = {
|
|
89849
89880
|
...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
|
|
89850
89881
|
};
|
|
89851
|
-
const pPrKey =
|
|
89882
|
+
const pPrKey = findKey25(para, "pPr", getLocalName2) ?? "a:pPr";
|
|
89852
89883
|
const pPr = { ...para[pPrKey] ?? {} };
|
|
89853
|
-
const defRPrKey =
|
|
89884
|
+
const defRPrKey = findKey25(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
89854
89885
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
89855
89886
|
pPr[defRPrKey] = {
|
|
89856
89887
|
...existingDefRPr,
|
|
@@ -89998,7 +90029,7 @@ var init_chart_xlsx_writer = __esm({
|
|
|
89998
90029
|
init_xml_whitespace();
|
|
89999
90030
|
}
|
|
90000
90031
|
});
|
|
90001
|
-
function
|
|
90032
|
+
function findKey26(node, localName28, getLocalName2) {
|
|
90002
90033
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
|
|
90003
90034
|
}
|
|
90004
90035
|
function asArray4(value) {
|
|
@@ -90013,8 +90044,8 @@ function dimensionType(node) {
|
|
|
90013
90044
|
return String(node["@_type"] ?? "");
|
|
90014
90045
|
}
|
|
90015
90046
|
function replaceLevels(target, source, getLocalName2) {
|
|
90016
|
-
const targetKey =
|
|
90017
|
-
const sourceKey =
|
|
90047
|
+
const targetKey = findKey26(target, "lvl", getLocalName2) ?? "cx:lvl";
|
|
90048
|
+
const sourceKey = findKey26(source, "lvl", getLocalName2);
|
|
90018
90049
|
const oldLevels = asArray4(target[targetKey]);
|
|
90019
90050
|
const newLevels = asArray4(sourceKey ? source[sourceKey] : void 0).map((level, index) => {
|
|
90020
90051
|
const old = oldLevels[index];
|
|
@@ -90033,8 +90064,8 @@ function replaceLevels(target, source, getLocalName2) {
|
|
|
90033
90064
|
}
|
|
90034
90065
|
function replaceChartExDataDimensions(target, fresh, getLocalName2) {
|
|
90035
90066
|
for (const kind of ["strDim", "numDim"]) {
|
|
90036
|
-
const targetKey =
|
|
90037
|
-
const freshKey =
|
|
90067
|
+
const targetKey = findKey26(target, kind, getLocalName2) ?? `cx:${kind}`;
|
|
90068
|
+
const freshKey = findKey26(fresh, kind, getLocalName2);
|
|
90038
90069
|
const existing = asArray4(target[targetKey]);
|
|
90039
90070
|
const incoming = asArray4(freshKey ? fresh[freshKey] : void 0);
|
|
90040
90071
|
for (const dimension of incoming) {
|
|
@@ -90061,14 +90092,14 @@ var init_chart_cx_update_data = __esm({
|
|
|
90061
90092
|
"src/core/core/runtime/chart-cx-update-data.ts"() {
|
|
90062
90093
|
}
|
|
90063
90094
|
});
|
|
90064
|
-
function
|
|
90095
|
+
function findKey27(node, localName28, getLocalName2) {
|
|
90065
90096
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
|
|
90066
90097
|
}
|
|
90067
90098
|
function child23(node, localName28, getLocalName2) {
|
|
90068
90099
|
if (!node) {
|
|
90069
90100
|
return void 0;
|
|
90070
90101
|
}
|
|
90071
|
-
const key2 =
|
|
90102
|
+
const key2 = findKey27(node, localName28, getLocalName2);
|
|
90072
90103
|
const value = key2 ? node[key2] : void 0;
|
|
90073
90104
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
90074
90105
|
}
|
|
@@ -90098,11 +90129,11 @@ function applySeriesName(node, name, getLocalName2) {
|
|
|
90098
90129
|
const tx = child23(node, "tx", getLocalName2);
|
|
90099
90130
|
const txData = child23(tx, "txData", getLocalName2);
|
|
90100
90131
|
if (tx && txData) {
|
|
90101
|
-
const vKey =
|
|
90132
|
+
const vKey = findKey27(txData, "v", getLocalName2) ?? "cx:v";
|
|
90102
90133
|
txData[vKey] = name;
|
|
90103
90134
|
return;
|
|
90104
90135
|
}
|
|
90105
|
-
const txKey =
|
|
90136
|
+
const txKey = findKey27(node, "tx", getLocalName2);
|
|
90106
90137
|
if (txKey) {
|
|
90107
90138
|
delete node[txKey];
|
|
90108
90139
|
}
|
|
@@ -90142,7 +90173,7 @@ function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
|
|
|
90142
90173
|
if (hasDataLabels === void 0) {
|
|
90143
90174
|
return;
|
|
90144
90175
|
}
|
|
90145
|
-
const key2 =
|
|
90176
|
+
const key2 = findKey27(node, "dataLabels", getLocalName2);
|
|
90146
90177
|
if (!hasDataLabels) {
|
|
90147
90178
|
if (key2) {
|
|
90148
90179
|
delete node[key2];
|
|
@@ -90181,7 +90212,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
|
|
|
90181
90212
|
);
|
|
90182
90213
|
return;
|
|
90183
90214
|
}
|
|
90184
|
-
const inlineKey =
|
|
90215
|
+
const inlineKey = findKey27(node, "data", getLocalName2);
|
|
90185
90216
|
if (inlineKey && !dataIdNode) {
|
|
90186
90217
|
const inline = node[inlineKey];
|
|
90187
90218
|
if (inline && typeof inline === "object" && !Array.isArray(inline)) {
|
|
@@ -90234,7 +90265,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
|
|
|
90234
90265
|
if (!style || style.hasLegend === void 0) {
|
|
90235
90266
|
return;
|
|
90236
90267
|
}
|
|
90237
|
-
const key2 =
|
|
90268
|
+
const key2 = findKey27(chartRoot, "legend", getLocalName2);
|
|
90238
90269
|
if (!style.hasLegend) {
|
|
90239
90270
|
if (key2) {
|
|
90240
90271
|
delete chartRoot[key2];
|
|
@@ -90260,7 +90291,7 @@ function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
|
|
|
90260
90291
|
"plotAreaRegion",
|
|
90261
90292
|
getLocalName2
|
|
90262
90293
|
);
|
|
90263
|
-
const seriesKey = region ?
|
|
90294
|
+
const seriesKey = region ? findKey27(region, "series", getLocalName2) : void 0;
|
|
90264
90295
|
const first = region && seriesKey ? asArray5(region[seriesKey])[0] : void 0;
|
|
90265
90296
|
const existing = String(first?.["@_layoutId"] ?? "").toLowerCase();
|
|
90266
90297
|
const series = chartData.series[0];
|
|
@@ -90276,11 +90307,11 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
|
|
|
90276
90307
|
if (!chartRoot || !region) {
|
|
90277
90308
|
return false;
|
|
90278
90309
|
}
|
|
90279
|
-
const chartDataKey =
|
|
90310
|
+
const chartDataKey = findKey27(chartSpace, "chartData", getLocalName2);
|
|
90280
90311
|
const chartDataNode = (chartDataKey ? chartSpace[chartDataKey] : void 0) ?? {};
|
|
90281
|
-
const dataKey =
|
|
90312
|
+
const dataKey = findKey27(chartDataNode, "data", getLocalName2) ?? "cx:data";
|
|
90282
90313
|
const dataNodes = asArray5(chartDataNode[dataKey]);
|
|
90283
|
-
const seriesKey =
|
|
90314
|
+
const seriesKey = findKey27(region, "series", getLocalName2) ?? "cx:series";
|
|
90284
90315
|
const existing = asArray5(region[seriesKey]);
|
|
90285
90316
|
const updated = [];
|
|
90286
90317
|
chartData.series.forEach((series, index) => {
|
|
@@ -102346,7 +102377,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
102346
102377
|
};
|
|
102347
102378
|
}
|
|
102348
102379
|
});
|
|
102349
|
-
function
|
|
102380
|
+
function findKey28(node, name, localName28) {
|
|
102350
102381
|
return Object.keys(node).find((key2) => localName28(key2) === name);
|
|
102351
102382
|
}
|
|
102352
102383
|
function prefixFor2(node) {
|
|
@@ -102365,7 +102396,7 @@ function setChildren(node, name, values, localName28) {
|
|
|
102365
102396
|
if (values === void 0) {
|
|
102366
102397
|
return false;
|
|
102367
102398
|
}
|
|
102368
|
-
const existing =
|
|
102399
|
+
const existing = findKey28(node, name, localName28);
|
|
102369
102400
|
if (values.length === 0) {
|
|
102370
102401
|
if (existing) {
|
|
102371
102402
|
delete node[existing];
|
|
@@ -102392,7 +102423,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
|
|
|
102392
102423
|
changed = setChildren(node, "title", textNodes(metadata.titles), localName28) || changed;
|
|
102393
102424
|
changed = setChildren(node, "desc", textNodes(metadata.descriptions), localName28) || changed;
|
|
102394
102425
|
if (metadata.categories !== void 0) {
|
|
102395
|
-
const key2 =
|
|
102426
|
+
const key2 = findKey28(node, "catLst", localName28);
|
|
102396
102427
|
if (metadata.categories.length === 0) {
|
|
102397
102428
|
if (key2) {
|
|
102398
102429
|
delete node[key2];
|
|
@@ -102416,7 +102447,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
|
|
|
102416
102447
|
return changed;
|
|
102417
102448
|
}
|
|
102418
102449
|
function ensureLabels(node, localName28) {
|
|
102419
|
-
const key2 =
|
|
102450
|
+
const key2 = findKey28(node, "styleLbl", localName28) ?? `${prefixFor2(node)}styleLbl`;
|
|
102420
102451
|
return { key: key2, labels: objects2(node[key2]) };
|
|
102421
102452
|
}
|
|
102422
102453
|
function applySmartArtQuickStyleLabels(node, labels, localName28) {
|
|
@@ -102431,7 +102462,7 @@ function applySmartArtQuickStyleLabels(node, labels, localName28) {
|
|
|
102431
102462
|
return true;
|
|
102432
102463
|
}
|
|
102433
102464
|
function applyColorList(label, name, metadata, localName28) {
|
|
102434
|
-
const key2 =
|
|
102465
|
+
const key2 = findKey28(label, name, localName28) ?? `${prefixFor2(label)}${name}`;
|
|
102435
102466
|
const list = objects2(label[key2])[0] ?? {};
|
|
102436
102467
|
if (metadata.method !== void 0) {
|
|
102437
102468
|
list["@_meth"] = metadata.method;
|
|
@@ -102482,7 +102513,7 @@ function toArray4(value) {
|
|
|
102482
102513
|
const obj = asObject(value);
|
|
102483
102514
|
return obj ? [obj] : [];
|
|
102484
102515
|
}
|
|
102485
|
-
function
|
|
102516
|
+
function findKey29(obj, name, getLocalName2) {
|
|
102486
102517
|
return Object.keys(obj).find((k) => getLocalName2(k) === name);
|
|
102487
102518
|
}
|
|
102488
102519
|
function hex3(value) {
|
|
@@ -102516,7 +102547,7 @@ function applySmartArtColorTransform(colorsDef, transform6, getLocalName2, resol
|
|
|
102516
102547
|
let mutated = false;
|
|
102517
102548
|
mutated = applySmartArtDefinitionMetadata(colorsDef, transform6, getLocalName2) || mutated;
|
|
102518
102549
|
mutated = applySmartArtColorStyleLabels(colorsDef, transform6.labels, getLocalName2) || mutated;
|
|
102519
|
-
const styleLblKey =
|
|
102550
|
+
const styleLblKey = findKey29(colorsDef, "styleLbl", getLocalName2);
|
|
102520
102551
|
if (!styleLblKey) {
|
|
102521
102552
|
return mutated;
|
|
102522
102553
|
}
|
|
@@ -102527,7 +102558,7 @@ function applySmartArtColorTransform(colorsDef, transform6, getLocalName2, resol
|
|
|
102527
102558
|
let fillIndex = 0;
|
|
102528
102559
|
let lineIndex = 0;
|
|
102529
102560
|
for (const label of labels) {
|
|
102530
|
-
const fillKey =
|
|
102561
|
+
const fillKey = findKey29(label, "fillClrLst", getLocalName2);
|
|
102531
102562
|
if (fillKey) {
|
|
102532
102563
|
const value = transform6.fillColors[fillIndex++];
|
|
102533
102564
|
const list = asObject(label[fillKey]);
|
|
@@ -102536,7 +102567,7 @@ function applySmartArtColorTransform(colorsDef, transform6, getLocalName2, resol
|
|
|
102536
102567
|
mutated = true;
|
|
102537
102568
|
}
|
|
102538
102569
|
}
|
|
102539
|
-
const lineKey =
|
|
102570
|
+
const lineKey = findKey29(label, "linClrLst", getLocalName2);
|
|
102540
102571
|
if (lineKey) {
|
|
102541
102572
|
const value = transform6.lineColors[lineIndex++];
|
|
102542
102573
|
const list = asObject(label[lineKey]);
|
|
@@ -102748,33 +102779,33 @@ function applySmartArtChrome(dataModel, chrome, getLocalName2) {
|
|
|
102748
102779
|
if (!chrome || !chrome.backgroundColor && !chrome.backgroundFillXml && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
|
|
102749
102780
|
return;
|
|
102750
102781
|
}
|
|
102751
|
-
const
|
|
102782
|
+
const findKey30 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
|
|
102752
102783
|
if (chrome.backgroundFillXml) {
|
|
102753
|
-
const bgKey =
|
|
102784
|
+
const bgKey = findKey30(dataModel, "bg") ?? "dgm:bg";
|
|
102754
102785
|
const bg = asObject2(dataModel[bgKey]);
|
|
102755
|
-
const fillKey =
|
|
102786
|
+
const fillKey = findKey30(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
|
|
102756
102787
|
bg[fillKey] = chrome.backgroundFillXml.xml;
|
|
102757
102788
|
dataModel[bgKey] = bg;
|
|
102758
102789
|
} else if (chrome.backgroundColor) {
|
|
102759
102790
|
const hex4 = chrome.backgroundColor.replace("#", "");
|
|
102760
|
-
const bgKey =
|
|
102791
|
+
const bgKey = findKey30(dataModel, "bg") ?? "dgm:bg";
|
|
102761
102792
|
const bg = asObject2(dataModel[bgKey]);
|
|
102762
|
-
const fillKey =
|
|
102793
|
+
const fillKey = findKey30(bg, "solidFill") ?? "a:solidFill";
|
|
102763
102794
|
bg[fillKey] = { "a:srgbClr": { "@_val": hex4 } };
|
|
102764
102795
|
dataModel[bgKey] = bg;
|
|
102765
102796
|
}
|
|
102766
102797
|
const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
|
|
102767
102798
|
if (chrome.outlineColor || hasOutlineWidth) {
|
|
102768
|
-
const wholeKey =
|
|
102799
|
+
const wholeKey = findKey30(dataModel, "whole") ?? "dgm:whole";
|
|
102769
102800
|
const whole = asObject2(dataModel[wholeKey]);
|
|
102770
|
-
const lnKey =
|
|
102801
|
+
const lnKey = findKey30(whole, "ln") ?? "a:ln";
|
|
102771
102802
|
const ln = asObject2(whole[lnKey]);
|
|
102772
102803
|
if (hasOutlineWidth) {
|
|
102773
102804
|
ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
|
|
102774
102805
|
}
|
|
102775
102806
|
if (chrome.outlineColor) {
|
|
102776
102807
|
const hex4 = chrome.outlineColor.replace("#", "");
|
|
102777
|
-
const fillKey =
|
|
102808
|
+
const fillKey = findKey30(ln, "solidFill") ?? "a:solidFill";
|
|
102778
102809
|
ln[fillKey] = { "a:srgbClr": { "@_val": hex4 } };
|
|
102779
102810
|
}
|
|
102780
102811
|
whole[lnKey] = ln;
|
|
Binary file
|
|
Binary file
|