ooxml-core 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/{PptxHandler-5YP75BPO.cjs → PptxHandler-OGLITB3F.cjs} +2 -2
  2. package/dist/{PptxHandler-KNBFECUE.mjs → PptxHandler-R5BVKEBW.mjs} +2 -2
  3. package/dist/{PptxHandler-GT5Q66TG.mjs → PptxHandler-UKAA5T5U.mjs} +1 -1
  4. package/dist/{PresentationBuilder-II7C4A3R.cjs → PresentationBuilder-4AF3PZHG.cjs} +4 -4
  5. package/dist/{PresentationBuilder-CVM6LJ7L.mjs → PresentationBuilder-54QGEZ2F.mjs} +1 -1
  6. package/dist/{PresentationBuilder-5DCCFHWJ.mjs → PresentationBuilder-W67DIJBV.mjs} +2 -2
  7. package/dist/automation/index.cjs +372 -669
  8. package/dist/automation/index.mjs +372 -669
  9. package/dist/{chunk-ORH32TO3.mjs → chunk-7ZIZFJXT.mjs} +1509 -754
  10. package/dist/{chunk-XGXIS4PN.mjs → chunk-EMZIHAOH.mjs} +1508 -739
  11. package/dist/{chunk-4WZLFUUA.mjs → chunk-HU36GIYM.mjs} +642 -200
  12. package/dist/{chunk-54ASP65T.mjs → chunk-JFMIPOPV.mjs} +1 -1
  13. package/dist/{chunk-2D4IFQ5M.mjs → chunk-NWAQEXBK.mjs} +1 -1
  14. package/dist/{chunk-TNNXOW2O.mjs → chunk-OPBZBSJF.mjs} +1 -1
  15. package/dist/{chunk-TQE7FFNT.cjs → chunk-ZWI7MTLF.cjs} +1509 -754
  16. package/dist/geometry/index.cjs +259 -0
  17. package/dist/geometry/index.d.ts +1 -0
  18. package/dist/geometry/index.d.ts.map +1 -1
  19. package/dist/geometry/index.mjs +255 -1
  20. package/dist/geometry/shape-gallery-catalog.d.ts +32 -0
  21. package/dist/geometry/shape-gallery-catalog.d.ts.map +1 -0
  22. package/dist/index.cjs +371 -112
  23. package/dist/index.mjs +371 -112
  24. package/dist/pptx/automation/index.cjs +2203 -1415
  25. package/dist/pptx/automation/index.d.ts +4 -4
  26. package/dist/pptx/automation/index.mjs +5 -5
  27. package/dist/pptx/chunks/{elements-tK7xnWeS.d.ts → elements-Cadkqht8.d.ts} +143 -2
  28. package/dist/pptx/chunks/elements-Cadkqht8.d.ts.map +1 -0
  29. package/dist/pptx/chunks/{index-DS9Y4Ne3.d.ts → index-CJI2EugA.d.ts} +5 -3
  30. package/dist/pptx/chunks/{index-DS9Y4Ne3.d.ts.map → index-CJI2EugA.d.ts.map} +1 -1
  31. package/dist/pptx/chunks/{index-BSpNQuvz.d.ts → index-CozqpSPL.d.ts} +112 -5
  32. package/dist/pptx/chunks/index-CozqpSPL.d.ts.map +1 -0
  33. package/dist/pptx/chunks/{text-operations-BdD_UQ11.d.ts → text-operations-C3L9xrqx.d.ts} +2 -2
  34. package/dist/pptx/chunks/{text-operations-BdD_UQ11.d.ts.map → text-operations-C3L9xrqx.d.ts.map} +1 -1
  35. package/dist/pptx/cli/index.cjs +2151 -1363
  36. package/dist/pptx/cli/index.d.ts +1 -1
  37. package/dist/pptx/cli/index.mjs +4 -4
  38. package/dist/pptx/converter/index.cjs +7 -0
  39. package/dist/pptx/converter/index.d.ts +1 -1
  40. package/dist/pptx/converter/index.mjs +2 -2
  41. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  42. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  43. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  44. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  45. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  46. package/dist/pptx/index.cjs +2990 -1726
  47. package/dist/pptx/index.d.ts +5 -5
  48. package/dist/pptx/index.mjs +5 -5
  49. package/dist/teams/ics.d.ts.map +1 -1
  50. package/dist/teams/index.cjs +527 -622
  51. package/dist/teams/index.d.ts +1 -0
  52. package/dist/teams/index.d.ts.map +1 -1
  53. package/dist/teams/index.mjs +512 -623
  54. package/dist/teams/meetings.d.ts +11 -1
  55. package/dist/teams/meetings.d.ts.map +1 -1
  56. package/dist/teams/recurrence-calendar.d.ts +41 -0
  57. package/dist/teams/recurrence-calendar.d.ts.map +1 -0
  58. package/dist/teams/recurrence.d.ts +1 -1
  59. package/dist/teams/recurrence.d.ts.map +1 -1
  60. package/dist/teams/server-session.d.ts +19 -0
  61. package/dist/teams/server-session.d.ts.map +1 -1
  62. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  63. package/dist/xlsx/index.cjs +386 -676
  64. package/dist/xlsx/index.mjs +385 -677
  65. package/dist/xlsx/load/index.cjs +328 -633
  66. package/dist/xlsx/load/index.mjs +328 -633
  67. package/dist/xlsx/model-pivots.d.ts +17 -4
  68. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  69. package/dist/xlsx/pivot/aggregate.d.ts +6 -3
  70. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
  71. package/dist/xlsx/pivot/axes.d.ts +5 -0
  72. package/dist/xlsx/pivot/axes.d.ts.map +1 -1
  73. package/dist/xlsx/pivot/columns.d.ts +9 -3
  74. package/dist/xlsx/pivot/columns.d.ts.map +1 -1
  75. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  76. package/dist/xlsx/pivot/date-axes.d.ts +1 -1
  77. package/dist/xlsx/pivot/date-axes.d.ts.map +1 -1
  78. package/dist/xlsx/pivot/date-group-read.d.ts.map +1 -1
  79. package/dist/xlsx/pivot/date-groups.d.ts +8 -3
  80. package/dist/xlsx/pivot/date-groups.d.ts.map +1 -1
  81. package/dist/xlsx/pivot/index.d.ts +2 -1
  82. package/dist/xlsx/pivot/index.d.ts.map +1 -1
  83. package/dist/xlsx/pivot/measures.d.ts +0 -7
  84. package/dist/xlsx/pivot/measures.d.ts.map +1 -1
  85. package/dist/xlsx/pivot/nested.d.ts +4 -2
  86. package/dist/xlsx/pivot/nested.d.ts.map +1 -1
  87. package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
  88. package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
  89. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  90. package/dist/xlsx/pivot/subtotals.d.ts +6 -1
  91. package/dist/xlsx/pivot/subtotals.d.ts.map +1 -1
  92. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  93. package/dist/xlsx/pivot/values-axis.d.ts +7 -4
  94. package/dist/xlsx/pivot/values-axis.d.ts.map +1 -1
  95. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
  96. package/dist/xlsx/ui/index.cjs +271 -584
  97. package/dist/xlsx/ui/index.mjs +271 -584
  98. package/package.json +1 -1
  99. package/dist/pptx/chunks/elements-tK7xnWeS.d.ts.map +0 -1
  100. package/dist/pptx/chunks/index-BSpNQuvz.d.ts.map +0 -1
  101. package/dist/xlsx/pivot/hierarchy-first.d.ts +0 -21
  102. package/dist/xlsx/pivot/hierarchy-first.d.ts.map +0 -1
  103. package/dist/xlsx/pivot/hierarchy.d.ts +0 -8
  104. package/dist/xlsx/pivot/hierarchy.d.ts.map +0 -1
@@ -1033,9 +1033,9 @@ function scan(xml) {
1033
1033
  };
1034
1034
  return { root, children: [] };
1035
1035
  }
1036
- const children5 = [];
1036
+ const children6 = [];
1037
1037
  let depth = 0;
1038
- let child14;
1038
+ let child16;
1039
1039
  i = openEnd;
1040
1040
  for (; ; ) {
1041
1041
  const lt = xml.indexOf("<", i);
@@ -1050,16 +1050,16 @@ function scan(xml) {
1050
1050
  if (xml[lt + 1] === "/") {
1051
1051
  if (depth === 0) {
1052
1052
  const root = { start: rootStart, openEnd, closeStart: lt, end, selfClosing: false };
1053
- return { root, children: children5 };
1053
+ return { root, children: children6 };
1054
1054
  }
1055
1055
  depth--;
1056
- if (depth === 0 && child14)
1057
- children5.push({ ...child14, closeStart: lt, end, selfClosing: false });
1056
+ if (depth === 0 && child16)
1057
+ children6.push({ ...child16, closeStart: lt, end, selfClosing: false });
1058
1058
  } else if (xml[end - 2] === "/") {
1059
1059
  if (depth === 0)
1060
- children5.push({ start: lt, openEnd: end, closeStart: end, end, selfClosing: true });
1060
+ children6.push({ start: lt, openEnd: end, closeStart: end, end, selfClosing: true });
1061
1061
  } else {
1062
- if (depth === 0) child14 = { start: lt, openEnd: end };
1062
+ if (depth === 0) child16 = { start: lt, openEnd: end };
1063
1063
  depth++;
1064
1064
  }
1065
1065
  }
@@ -1069,10 +1069,10 @@ var qualifiedName = (xml, span) => /^<([^\s/>]+)/.exec(xml.slice(span.start, spa
1069
1069
  var PartPatch = class {
1070
1070
  constructor(xml, rootElement) {
1071
1071
  this.xml = xml;
1072
- const { root, children: children5 } = scan(xml);
1072
+ const { root, children: children6 } = scan(xml);
1073
1073
  const kids = elements(rootElement);
1074
- if (kids.length !== children5.length) throw new Error("Property part markup is not supported");
1075
- kids.forEach((kid, index) => this.spans.set(kid, children5[index]));
1074
+ if (kids.length !== children6.length) throw new Error("Property part markup is not supported");
1075
+ kids.forEach((kid, index) => this.spans.set(kid, children6[index]));
1076
1076
  this.root = root;
1077
1077
  for (const attribute3 of Array.from(rootElement.attributes)) {
1078
1078
  if (attribute3.name === "xmlns") this.defaultNs = attribute3.value;
@@ -1514,9 +1514,9 @@ function booleanAttribute(element, name) {
1514
1514
 
1515
1515
  // diagram/data-model.ts
1516
1516
  var TRANSITION_TYPES = /* @__PURE__ */ new Set(["parTrans", "sibTrans"]);
1517
- function collectTransitionText(points4, describe, text) {
1517
+ function collectTransitionText(points5, describe, text) {
1518
1518
  const byId = /* @__PURE__ */ new Map();
1519
- for (const point of points4) {
1519
+ for (const point of points5) {
1520
1520
  const { type, modelId } = describe(point);
1521
1521
  if (!TRANSITION_TYPES.has((type ?? "").trim())) continue;
1522
1522
  const id = (modelId ?? "").trim();
@@ -1562,9 +1562,9 @@ function parseDrawingColor(element) {
1562
1562
  const color2 = {
1563
1563
  kind,
1564
1564
  value: colorValue(kind, element),
1565
- transforms: elements(element).map((child14) => ({
1566
- name: child14.localName,
1567
- value: child14.getAttribute("val") ?? ""
1565
+ transforms: elements(element).map((child16) => ({
1566
+ name: child16.localName,
1567
+ value: child16.getAttribute("val") ?? ""
1568
1568
  }))
1569
1569
  };
1570
1570
  const fallback = kind === "system" ? element.getAttribute("lastClr") : null;
@@ -1701,9 +1701,9 @@ function parseRun(run) {
1701
1701
  }
1702
1702
  function parseParagraph(paragraph) {
1703
1703
  const runs = [];
1704
- for (const child14 of elements(paragraph))
1705
- if (child14.namespaceURI === NS.a && ["r", "fld", "br"].includes(child14.localName))
1706
- runs.push(parseRun(child14));
1704
+ for (const child16 of elements(paragraph))
1705
+ if (child16.namespaceURI === NS.a && ["r", "fld", "br"].includes(child16.localName))
1706
+ runs.push(parseRun(child16));
1707
1707
  const properties = first(paragraph, "pPr", NS.a);
1708
1708
  const align = properties?.getAttribute("algn");
1709
1709
  const defaults = parseProperties(first(properties, "defRPr", NS.a));
@@ -1841,10 +1841,10 @@ function evaluateGeometryPaths(pathNodes, variables, ensureArray12) {
1841
1841
  }
1842
1842
  const record2 = item;
1843
1843
  if (key2 === "a:moveTo") {
1844
- const pt = record2["a:pt"];
1845
- if (pt) {
1846
- const x = resolveX(pt["@_x"]);
1847
- const y = resolveY(pt["@_y"]);
1844
+ const pt2 = record2["a:pt"];
1845
+ if (pt2) {
1846
+ const x = resolveX(pt2["@_x"]);
1847
+ const y = resolveY(pt2["@_y"]);
1848
1848
  commands.push(`M ${x} ${y}`);
1849
1849
  penX = x;
1850
1850
  penY = y;
@@ -1852,10 +1852,10 @@ function evaluateGeometryPaths(pathNodes, variables, ensureArray12) {
1852
1852
  moveY = y;
1853
1853
  }
1854
1854
  } else if (key2 === "a:lnTo") {
1855
- const pt = record2["a:pt"];
1856
- if (pt) {
1857
- const x = resolveX(pt["@_x"]);
1858
- const y = resolveY(pt["@_y"]);
1855
+ const pt2 = record2["a:pt"];
1856
+ if (pt2) {
1857
+ const x = resolveX(pt2["@_x"]);
1858
+ const y = resolveY(pt2["@_y"]);
1859
1859
  commands.push(`L ${x} ${y}`);
1860
1860
  penX = x;
1861
1861
  penY = y;
@@ -1863,9 +1863,9 @@ function evaluateGeometryPaths(pathNodes, variables, ensureArray12) {
1863
1863
  } else if (key2 === "a:cubicBezTo") {
1864
1864
  const pts = ensureArray12(record2["a:pt"]);
1865
1865
  if (pts.length === 3) {
1866
- const coords = pts.map((pt) => ({
1867
- x: resolveX(pt["@_x"]),
1868
- y: resolveY(pt["@_y"])
1866
+ const coords = pts.map((pt2) => ({
1867
+ x: resolveX(pt2["@_x"]),
1868
+ y: resolveY(pt2["@_y"])
1869
1869
  }));
1870
1870
  commands.push(
1871
1871
  `C ${coords[0].x} ${coords[0].y} ${coords[1].x} ${coords[1].y} ${coords[2].x} ${coords[2].y}`
@@ -1876,9 +1876,9 @@ function evaluateGeometryPaths(pathNodes, variables, ensureArray12) {
1876
1876
  } else if (key2 === "a:quadBezTo") {
1877
1877
  const pts = ensureArray12(record2["a:pt"]);
1878
1878
  if (pts.length === 2) {
1879
- const coords = pts.map((pt) => ({
1880
- x: resolveX(pt["@_x"]),
1881
- y: resolveY(pt["@_y"])
1879
+ const coords = pts.map((pt2) => ({
1880
+ x: resolveX(pt2["@_x"]),
1881
+ y: resolveY(pt2["@_y"])
1882
1882
  }));
1883
1883
  commands.push(`Q ${coords[0].x} ${coords[0].y} ${coords[1].x} ${coords[1].y}`);
1884
1884
  penX = coords[1].x;
@@ -1951,11 +1951,11 @@ function parseSegments(path2, variables, ensureArray12) {
1951
1951
  segments.push({ type: key2 === "a:moveTo" ? "moveTo" : "lineTo", pt: point });
1952
1952
  }
1953
1953
  } else if (key2 === "a:cubicBezTo" || key2 === "a:quadBezTo") {
1954
- const points4 = ensureArray12(command?.["a:pt"]).map((point) => parsePoint(point, variables)).filter((point) => point !== void 0);
1954
+ const points5 = ensureArray12(command?.["a:pt"]).map((point) => parsePoint(point, variables)).filter((point) => point !== void 0);
1955
1955
  const expected = key2 === "a:cubicBezTo" ? 3 : 2;
1956
- if (points4.length === expected) {
1956
+ if (points5.length === expected) {
1957
1957
  segments.push(
1958
- key2 === "a:cubicBezTo" ? { type: "cubicBezTo", pts: [points4[0], points4[1], points4[2]] } : { type: "quadBezTo", pts: [points4[0], points4[1]] }
1958
+ key2 === "a:cubicBezTo" ? { type: "cubicBezTo", pts: [points5[0], points5[1], points5[2]] } : { type: "quadBezTo", pts: [points5[0], points5[1]] }
1959
1959
  );
1960
1960
  }
1961
1961
  } else if (key2 === "a:arcTo" && command) {
@@ -3431,13 +3431,13 @@ var SHARED_RELATIONSHIPS = /* @__PURE__ */ new Set([
3431
3431
  var RAW_XML_KEYS = /* @__PURE__ */ new Set(["rawXml", "rawTiming", "inkPartRawXml", "rawMediaReferenceXml"]);
3432
3432
  function remapPartPaths(value, copies) {
3433
3433
  if (!value || typeof value !== "object") return;
3434
- for (const [key2, child14] of Object.entries(value)) {
3434
+ for (const [key2, child16] of Object.entries(value)) {
3435
3435
  if (RAW_XML_KEYS.has(key2)) continue;
3436
- if (typeof child14 === "string" && /path$/iu.test(key2)) {
3437
- const destination = copies.get(child14);
3436
+ if (typeof child16 === "string" && /path$/iu.test(key2)) {
3437
+ const destination = copies.get(child16);
3438
3438
  if (destination) value[key2] = destination;
3439
3439
  } else {
3440
- remapPartPaths(child14, copies);
3440
+ remapPartPaths(child16, copies);
3441
3441
  }
3442
3442
  }
3443
3443
  }
@@ -4132,8 +4132,8 @@ function invertOffsetAxisEmu(relativeEmu, chOffEmu, chExtEmu, extEmu) {
4132
4132
  }
4133
4133
  return chOffEmu + Math.round(relativeEmu * chExtEmu / extEmu);
4134
4134
  }
4135
- function resolveRotatedChildResizeOffset(child14, owner, emuPerPx) {
4136
- if (!child14.rotation || child14.xEmu === void 0 || child14.yEmu === void 0 || child14.widthEmu === void 0 || child14.heightEmu === void 0) {
4135
+ function resolveRotatedChildResizeOffset(child16, owner, emuPerPx) {
4136
+ if (!child16.rotation || child16.xEmu === void 0 || child16.yEmu === void 0 || child16.widthEmu === void 0 || child16.heightEmu === void 0) {
4137
4137
  return void 0;
4138
4138
  }
4139
4139
  const extCx = owner.widthEmu ?? 0;
@@ -4142,16 +4142,16 @@ function resolveRotatedChildResizeOffset(child14, owner, emuPerPx) {
4142
4142
  const chOffYEmu = owner.chOffYEmu;
4143
4143
  const chExtWidthEmu = owner.chExtWidthEmu;
4144
4144
  const chExtHeightEmu = owner.chExtHeightEmu;
4145
- const oldRenderXEmu = forwardOffsetAxis(child14.xEmu, chOffXEmu, chExtWidthEmu, extCx);
4146
- const oldRenderYEmu = forwardOffsetAxis(child14.yEmu, chOffYEmu, chExtHeightEmu, extCy);
4147
- const oldRenderWidthEmu = forwardExtentAxis(child14.widthEmu, chExtWidthEmu, extCx);
4148
- const oldRenderHeightEmu = forwardExtentAxis(child14.heightEmu, chExtHeightEmu, extCy);
4149
- const naiveRenderXEmu = Math.round(child14.x * emuPerPx);
4150
- const naiveRenderYEmu = Math.round(child14.y * emuPerPx);
4151
- const newRenderWidthEmu = Math.round(child14.width * emuPerPx);
4152
- const newRenderHeightEmu = Math.round(child14.height * emuPerPx);
4145
+ const oldRenderXEmu = forwardOffsetAxis(child16.xEmu, chOffXEmu, chExtWidthEmu, extCx);
4146
+ const oldRenderYEmu = forwardOffsetAxis(child16.yEmu, chOffYEmu, chExtHeightEmu, extCy);
4147
+ const oldRenderWidthEmu = forwardExtentAxis(child16.widthEmu, chExtWidthEmu, extCx);
4148
+ const oldRenderHeightEmu = forwardExtentAxis(child16.heightEmu, chExtHeightEmu, extCy);
4149
+ const naiveRenderXEmu = Math.round(child16.x * emuPerPx);
4150
+ const naiveRenderYEmu = Math.round(child16.y * emuPerPx);
4151
+ const newRenderWidthEmu = Math.round(child16.width * emuPerPx);
4152
+ const newRenderHeightEmu = Math.round(child16.height * emuPerPx);
4153
4153
  const rotatedResize = resolveRotatedResizeOffset({
4154
- rotationDeg: child14.rotation,
4154
+ rotationDeg: child16.rotation,
4155
4155
  oldOffXEmu: oldRenderXEmu,
4156
4156
  oldOffYEmu: oldRenderYEmu,
4157
4157
  oldExtWidthEmu: oldRenderWidthEmu,
@@ -4174,7 +4174,7 @@ function resolveRotatedChildResizeOffset(child14, owner, emuPerPx) {
4174
4174
  function hasCapturedChildSpace(group) {
4175
4175
  return group.chOffXEmu !== void 0 && group.chOffYEmu !== void 0 && group.chExtWidthEmu !== void 0 && group.chExtHeightEmu !== void 0 && group.chExtWidthEmu > 0 && group.chExtHeightEmu > 0;
4176
4176
  }
4177
- function isGroupChildUnchanged(child14, owner, emuPerPx) {
4177
+ function isGroupChildUnchanged(child16, owner, emuPerPx) {
4178
4178
  if (!hasCapturedChildSpace(owner)) {
4179
4179
  return false;
4180
4180
  }
@@ -4189,11 +4189,11 @@ function isGroupChildUnchanged(child14, owner, emuPerPx) {
4189
4189
  if (!Number.isFinite(scaleX) || !Number.isFinite(scaleY) || scaleX <= 0 || scaleY <= 0) {
4190
4190
  return false;
4191
4191
  }
4192
- const childSpaceX = chX + child14.x / scaleX;
4193
- const childSpaceY = chY + child14.y / scaleY;
4194
- const childSpaceWidth = child14.width / scaleX;
4195
- const childSpaceHeight = child14.height / scaleY;
4196
- return isXfrmEmuUnchanged(childSpaceX, child14.xEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceY, child14.yEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceWidth, child14.widthEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceHeight, child14.heightEmu, emuPerPx);
4192
+ const childSpaceX = chX + child16.x / scaleX;
4193
+ const childSpaceY = chY + child16.y / scaleY;
4194
+ const childSpaceWidth = child16.width / scaleX;
4195
+ const childSpaceHeight = child16.height / scaleY;
4196
+ return isXfrmEmuUnchanged(childSpaceX, child16.xEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceY, child16.yEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceWidth, child16.widthEmu, emuPerPx) && isXfrmEmuUnchanged(childSpaceHeight, child16.heightEmu, emuPerPx);
4197
4197
  }
4198
4198
  function invertOffsetAxis(relativePx, chOffEmu, chExtEmu, extEmu, emuPerPx) {
4199
4199
  const relativeEmu = Math.round(relativePx * emuPerPx);
@@ -4209,42 +4209,42 @@ function invertExtentAxis(px, chExtEmu, extEmu, emuPerPx) {
4209
4209
  }
4210
4210
  return Math.round(emu2 * chExtEmu / extEmu);
4211
4211
  }
4212
- function invertChildIntoGroupSpace(child14, owner, emuPerPx) {
4212
+ function invertChildIntoGroupSpace(child16, owner, emuPerPx) {
4213
4213
  if (!hasCapturedChildSpace(owner)) {
4214
4214
  return void 0;
4215
4215
  }
4216
- if (child14.xEmu !== void 0 && child14.yEmu !== void 0 && child14.widthEmu !== void 0 && child14.heightEmu !== void 0 && isGroupChildUnchanged(child14, owner, emuPerPx)) {
4216
+ if (child16.xEmu !== void 0 && child16.yEmu !== void 0 && child16.widthEmu !== void 0 && child16.heightEmu !== void 0 && isGroupChildUnchanged(child16, owner, emuPerPx)) {
4217
4217
  return {
4218
- xEmu: child14.xEmu,
4219
- yEmu: child14.yEmu,
4220
- widthEmu: child14.widthEmu,
4221
- heightEmu: child14.heightEmu
4218
+ xEmu: child16.xEmu,
4219
+ yEmu: child16.yEmu,
4220
+ widthEmu: child16.widthEmu,
4221
+ heightEmu: child16.heightEmu
4222
4222
  };
4223
4223
  }
4224
4224
  const extCx = owner.widthEmu ?? 0;
4225
4225
  const extCy = owner.heightEmu ?? 0;
4226
- const widthEmu = invertExtentAxis(child14.width, owner.chExtWidthEmu, extCx, emuPerPx);
4227
- const heightEmu = invertExtentAxis(child14.height, owner.chExtHeightEmu, extCy, emuPerPx);
4228
- const rotatedResize = resolveRotatedChildResizeOffset(child14, owner, emuPerPx);
4226
+ const widthEmu = invertExtentAxis(child16.width, owner.chExtWidthEmu, extCx, emuPerPx);
4227
+ const heightEmu = invertExtentAxis(child16.height, owner.chExtHeightEmu, extCy, emuPerPx);
4228
+ const rotatedResize = resolveRotatedChildResizeOffset(child16, owner, emuPerPx);
4229
4229
  return {
4230
- xEmu: rotatedResize ? rotatedResize.xEmu : invertOffsetAxis(child14.x, owner.chOffXEmu, owner.chExtWidthEmu, extCx, emuPerPx),
4231
- yEmu: rotatedResize ? rotatedResize.yEmu : invertOffsetAxis(child14.y, owner.chOffYEmu, owner.chExtHeightEmu, extCy, emuPerPx),
4230
+ xEmu: rotatedResize ? rotatedResize.xEmu : invertOffsetAxis(child16.x, owner.chOffXEmu, owner.chExtWidthEmu, extCx, emuPerPx),
4231
+ yEmu: rotatedResize ? rotatedResize.yEmu : invertOffsetAxis(child16.y, owner.chOffYEmu, owner.chExtHeightEmu, extCy, emuPerPx),
4232
4232
  widthEmu,
4233
4233
  heightEmu
4234
4234
  };
4235
4235
  }
4236
4236
 
4237
4237
  // pptx/core/core/runtime/group-tight-rewrap.ts
4238
- function computeTightChildBox(children5) {
4238
+ function computeTightChildBox(children6) {
4239
4239
  let minX = Infinity;
4240
4240
  let minY = Infinity;
4241
4241
  let maxX = -Infinity;
4242
4242
  let maxY = -Infinity;
4243
- for (const child14 of children5) {
4244
- minX = Math.min(minX, child14.xEmu);
4245
- minY = Math.min(minY, child14.yEmu);
4246
- maxX = Math.max(maxX, child14.xEmu + child14.widthEmu);
4247
- maxY = Math.max(maxY, child14.yEmu + child14.heightEmu);
4243
+ for (const child16 of children6) {
4244
+ minX = Math.min(minX, child16.xEmu);
4245
+ minY = Math.min(minY, child16.yEmu);
4246
+ maxX = Math.max(maxX, child16.xEmu + child16.widthEmu);
4247
+ maxY = Math.max(maxY, child16.yEmu + child16.heightEmu);
4248
4248
  }
4249
4249
  return {
4250
4250
  chOffXEmu: minX,
@@ -4253,9 +4253,9 @@ function computeTightChildBox(children5) {
4253
4253
  chExtHeightEmu: maxY - minY
4254
4254
  };
4255
4255
  }
4256
- function resolveGroupChildBoxEmu(child14, owner, emuPerPx) {
4257
- if (child14.type === "group") {
4258
- const nestedRewrap = resolveGroupTightRewrap(child14, emuPerPx);
4256
+ function resolveGroupChildBoxEmu(child16, owner, emuPerPx) {
4257
+ if (child16.type === "group") {
4258
+ const nestedRewrap = resolveGroupTightRewrap(child16, emuPerPx);
4259
4259
  if (nestedRewrap) {
4260
4260
  return {
4261
4261
  xEmu: nestedRewrap.offXEmu,
@@ -4265,7 +4265,7 @@ function resolveGroupChildBoxEmu(child14, owner, emuPerPx) {
4265
4265
  };
4266
4266
  }
4267
4267
  }
4268
- return invertChildIntoGroupSpace(child14, owner, emuPerPx);
4268
+ return invertChildIntoGroupSpace(child16, owner, emuPerPx);
4269
4269
  }
4270
4270
  function resolveGroupTightRewrap(group, emuPerPx) {
4271
4271
  if (!hasCapturedChildSpace(group)) {
@@ -4273,9 +4273,9 @@ function resolveGroupTightRewrap(group, emuPerPx) {
4273
4273
  }
4274
4274
  const childResults = [];
4275
4275
  let anyChanged = false;
4276
- for (const child14 of group.children) {
4277
- const nestedRewrap = child14.type === "group" ? resolveGroupTightRewrap(child14, emuPerPx) : void 0;
4278
- if (nestedRewrap !== void 0 || !isGroupChildUnchanged(child14, group, emuPerPx)) {
4276
+ for (const child16 of group.children) {
4277
+ const nestedRewrap = child16.type === "group" ? resolveGroupTightRewrap(child16, emuPerPx) : void 0;
4278
+ if (nestedRewrap !== void 0 || !isGroupChildUnchanged(child16, group, emuPerPx)) {
4279
4279
  anyChanged = true;
4280
4280
  }
4281
4281
  const emu2 = nestedRewrap ? {
@@ -4283,7 +4283,7 @@ function resolveGroupTightRewrap(group, emuPerPx) {
4283
4283
  yEmu: nestedRewrap.offYEmu,
4284
4284
  widthEmu: nestedRewrap.extWidthEmu,
4285
4285
  heightEmu: nestedRewrap.extHeightEmu
4286
- } : invertChildIntoGroupSpace(child14, group, emuPerPx);
4286
+ } : invertChildIntoGroupSpace(child16, group, emuPerPx);
4287
4287
  if (emu2) {
4288
4288
  childResults.push(emu2);
4289
4289
  }
@@ -4913,9 +4913,9 @@ function drawingChild(node, requestedName) {
4913
4913
  if (key2.split(":").at(-1) !== requestedName) {
4914
4914
  continue;
4915
4915
  }
4916
- const child14 = Array.isArray(value) ? value[0] : value;
4917
- if (child14 && typeof child14 === "object" && !Array.isArray(child14)) {
4918
- return child14;
4916
+ const child16 = Array.isArray(value) ? value[0] : value;
4917
+ if (child16 && typeof child16 === "object" && !Array.isArray(child16)) {
4918
+ return child16;
4919
4919
  }
4920
4920
  }
4921
4921
  return void 0;
@@ -4945,11 +4945,11 @@ function hasEmptyDrawingChild(node, requestedName) {
4945
4945
  if (key2.split(":").at(-1) !== requestedName) {
4946
4946
  continue;
4947
4947
  }
4948
- const child14 = Array.isArray(value) ? value[0] : value;
4949
- if (child14 === "" || child14 === void 0) {
4948
+ const child16 = Array.isArray(value) ? value[0] : value;
4949
+ if (child16 === "" || child16 === void 0) {
4950
4950
  return true;
4951
4951
  }
4952
- return typeof child14 === "object" && !Array.isArray(child14) && Object.keys(child14).every((childKey2) => childKey2.startsWith(ATTRIBUTE_PREFIX));
4952
+ return typeof child16 === "object" && !Array.isArray(child16) && Object.keys(child16).every((childKey2) => childKey2.startsWith(ATTRIBUTE_PREFIX));
4953
4953
  }
4954
4954
  return false;
4955
4955
  }
@@ -4963,7 +4963,7 @@ function drawingChildren(node, requestedName) {
4963
4963
  }
4964
4964
  const values = Array.isArray(value) ? value : [value];
4965
4965
  return values.filter(
4966
- (child14) => Boolean(child14) && typeof child14 === "object" && !Array.isArray(child14)
4966
+ (child16) => Boolean(child16) && typeof child16 === "object" && !Array.isArray(child16)
4967
4967
  );
4968
4968
  }
4969
4969
  return [];
@@ -4973,12 +4973,12 @@ function qualifiedLocalName(key2) {
4973
4973
  }
4974
4974
  function mergeDrawingFillXml(original, generated, modeledChildren, childOrder2) {
4975
4975
  const attributes = [];
4976
- const children5 = /* @__PURE__ */ new Map();
4976
+ const children6 = /* @__PURE__ */ new Map();
4977
4977
  for (const [key2, value] of Object.entries(original ?? {})) {
4978
4978
  if (key2.startsWith(ATTRIBUTE_PREFIX)) {
4979
4979
  attributes.push([key2, value]);
4980
4980
  } else if (!modeledChildren.includes(qualifiedLocalName(key2))) {
4981
- children5.set(key2, value);
4981
+ children6.set(key2, value);
4982
4982
  }
4983
4983
  }
4984
4984
  for (const [key2, value] of Object.entries(generated)) {
@@ -4989,7 +4989,7 @@ function mergeDrawingFillXml(original, generated, modeledChildren, childOrder2)
4989
4989
  }
4990
4990
  attributes.push([key2, value]);
4991
4991
  } else {
4992
- children5.set(key2, value);
4992
+ children6.set(key2, value);
4993
4993
  }
4994
4994
  }
4995
4995
  const result = {};
@@ -4997,14 +4997,14 @@ function mergeDrawingFillXml(original, generated, modeledChildren, childOrder2)
4997
4997
  result[key2] = value;
4998
4998
  }
4999
4999
  for (const name of childOrder2) {
5000
- for (const [key2, value] of children5) {
5000
+ for (const [key2, value] of children6) {
5001
5001
  if (qualifiedLocalName(key2) === name) {
5002
5002
  result[key2] = value;
5003
- children5.delete(key2);
5003
+ children6.delete(key2);
5004
5004
  }
5005
5005
  }
5006
5006
  }
5007
- for (const [key2, value] of children5) {
5007
+ for (const [key2, value] of children6) {
5008
5008
  result[key2] = value;
5009
5009
  }
5010
5010
  return result;
@@ -7066,9 +7066,9 @@ var PptxShapeStyleExtractor = class {
7066
7066
  "a:prstClr"
7067
7067
  ];
7068
7068
  for (const key2 of keys) {
7069
- const child14 = refNode[key2];
7070
- if (child14 !== void 0) {
7071
- return { [key2]: child14 };
7069
+ const child16 = refNode[key2];
7070
+ if (child16 !== void 0) {
7071
+ return { [key2]: child16 };
7072
7072
  }
7073
7073
  }
7074
7074
  return void 0;
@@ -7211,36 +7211,36 @@ function parseBorderSide(side) {
7211
7211
  }
7212
7212
  const ln = typeof side["a:ln"] === "object" ? side["a:ln"] : {};
7213
7213
  const border = {};
7214
- let has = false;
7214
+ let has2 = false;
7215
7215
  if (ln["a:noFill"] !== void 0) {
7216
7216
  border.noFill = true;
7217
- has = true;
7217
+ has2 = true;
7218
7218
  }
7219
7219
  const widthEmu = parseInt(String(ln["@_w"] || "0"), 10);
7220
7220
  if (widthEmu > 0) {
7221
7221
  border.width = Math.max(1, Math.round(widthEmu / EMU_PER_PIXEL2));
7222
- has = true;
7222
+ has2 = true;
7223
7223
  }
7224
7224
  const prstDash = ln["a:prstDash"];
7225
7225
  const dashVal = prstDash ? String(prstDash["@_val"] || "").trim() : "";
7226
7226
  if (dashVal) {
7227
7227
  border.dash = dashVal;
7228
- has = true;
7228
+ has2 = true;
7229
7229
  }
7230
7230
  const solidFill2 = ln["a:solidFill"];
7231
7231
  const fill = parseSolidFillStyle(solidFill2);
7232
7232
  if (fill) {
7233
7233
  border.fill = fill;
7234
- has = true;
7234
+ has2 = true;
7235
7235
  } else {
7236
7236
  const srgb = solidFill2?.["a:srgbClr"];
7237
7237
  const hex3 = srgb ? String(srgb["@_val"] || "").trim() : "";
7238
7238
  if (hex3) {
7239
7239
  border.color = hex3.startsWith("#") ? hex3 : `#${hex3}`;
7240
- has = true;
7240
+ has2 = true;
7241
7241
  }
7242
7242
  }
7243
- return has ? border : void 0;
7243
+ return has2 ? border : void 0;
7244
7244
  }
7245
7245
  function parseTableStyleBorders(tcStyle) {
7246
7246
  const tcBdr = tcStyle?.["a:tcBdr"];
@@ -7248,16 +7248,16 @@ function parseTableStyleBorders(tcStyle) {
7248
7248
  return void 0;
7249
7249
  }
7250
7250
  const result = {};
7251
- let has = false;
7251
+ let has2 = false;
7252
7252
  for (const name of BORDER_SIDES) {
7253
7253
  const node = tcBdr[`a:${name}`] ?? (name === "tr2bl" ? tcBdr["a:bl2tr"] : void 0);
7254
7254
  const border = parseBorderSide(node);
7255
7255
  if (border) {
7256
7256
  result[name] = border;
7257
- has = true;
7257
+ has2 = true;
7258
7258
  }
7259
7259
  }
7260
- return has ? result : void 0;
7260
+ return has2 ? result : void 0;
7261
7261
  }
7262
7262
  function parseTableStyleSectionCell3D(tcStyle) {
7263
7263
  const cell3DNode = tcStyle?.["a:cell3D"];
@@ -7884,7 +7884,7 @@ function nextTag(xml, from) {
7884
7884
  return null;
7885
7885
  }
7886
7886
  function scanDirectChildren(inner) {
7887
- const children5 = [];
7887
+ const children6 = [];
7888
7888
  let depth = 0;
7889
7889
  let open = null;
7890
7890
  let cursor = 0;
@@ -7893,12 +7893,12 @@ function scanDirectChildren(inner) {
7893
7893
  if (tag.closing) {
7894
7894
  depth = Math.max(0, depth - 1);
7895
7895
  if (depth === 0 && open) {
7896
- children5.push({ tag: open.tag, inner: inner.slice(open.innerStart, tag.start) });
7896
+ children6.push({ tag: open.tag, inner: inner.slice(open.innerStart, tag.start) });
7897
7897
  open = null;
7898
7898
  }
7899
7899
  } else if (tag.selfClosing) {
7900
7900
  if (depth === 0) {
7901
- children5.push({ tag: tag.name, inner: "" });
7901
+ children6.push({ tag: tag.name, inner: "" });
7902
7902
  }
7903
7903
  } else {
7904
7904
  if (depth === 0) {
@@ -7909,7 +7909,7 @@ function scanDirectChildren(inner) {
7909
7909
  cursor = tag.end;
7910
7910
  tag = nextTag(inner, cursor);
7911
7911
  }
7912
- return children5;
7912
+ return children6;
7913
7913
  }
7914
7914
  function extractElementInnerXml(xml, wanted) {
7915
7915
  const fragments = [];
@@ -8021,7 +8021,7 @@ function annotateParagraphSiblingOrder(xml, parsed) {
8021
8021
  if (!MIXED_CONTENT_MARKERS.some((marker) => xml.includes(marker))) {
8022
8022
  return;
8023
8023
  }
8024
- const orders = extractElementInnerXml(xml, "p").map((inner) => scanDirectChildren(inner).map((child14) => child14.tag)).filter((order) => order.length > 0);
8024
+ const orders = extractElementInnerXml(xml, "p").map((inner) => scanDirectChildren(inner).map((child16) => child16.tag)).filter((order) => order.length > 0);
8025
8025
  if (orders.length === 0) {
8026
8026
  return;
8027
8027
  }
@@ -8441,9 +8441,9 @@ var PptxTableDataParser = class {
8441
8441
  return parsed;
8442
8442
  }
8443
8443
  }
8444
- const child14 = tableProperties[`a:${key2}`];
8445
- if (child14) {
8446
- const childVal = parseInt(String(child14["@_val"] ?? ""), 10);
8444
+ const child16 = tableProperties[`a:${key2}`];
8445
+ if (child16) {
8446
+ const childVal = parseInt(String(child16["@_val"] ?? ""), 10);
8447
8447
  if (Number.isFinite(childVal) && childVal > 0) {
8448
8448
  return childVal;
8449
8449
  }
@@ -8653,8 +8653,8 @@ function scanForVmlImageDataRelationshipId(node, depth) {
8653
8653
  if (typeof value !== "object") {
8654
8654
  continue;
8655
8655
  }
8656
- for (const child14 of ensureArrayLike2(value)) {
8657
- const relId = scanForVmlImageDataRelationshipId(child14, depth + 1);
8656
+ for (const child16 of ensureArrayLike2(value)) {
8657
+ const relId = scanForVmlImageDataRelationshipId(child16, depth + 1);
8658
8658
  if (relId) {
8659
8659
  return relId;
8660
8660
  }
@@ -10307,9 +10307,9 @@ function collectCnvPrNodes(node, results, ensureArray12) {
10307
10307
  }
10308
10308
  const shapeLists = ["p:sp", "p:pic", "p:cxnSp", "p:graphicFrame", "p:grpSp", "p:contentPart"];
10309
10309
  for (const listKey of shapeLists) {
10310
- const children5 = ensureArray12(node[listKey]);
10311
- for (const child14 of children5) {
10312
- collectCnvPrNodes(child14, results, ensureArray12);
10310
+ const children6 = ensureArray12(node[listKey]);
10311
+ for (const child16 of children6) {
10312
+ collectCnvPrNodes(child16, results, ensureArray12);
10313
10313
  }
10314
10314
  }
10315
10315
  for (const alternate of ensureArray12(node["mc:AlternateContent"])) {
@@ -13784,10 +13784,10 @@ function assertAfterAnimationClearSupported(effectCTn) {
13784
13784
  if (!isXmlObject3(sub)) return;
13785
13785
  const countAfterFlags = (value) => {
13786
13786
  if (Array.isArray(value))
13787
- return value.reduce((count, child14) => count + countAfterFlags(child14), 0);
13787
+ return value.reduce((count, child16) => count + countAfterFlags(child16), 0);
13788
13788
  if (!isXmlObject3(value)) return 0;
13789
13789
  return Object.entries(value).reduce(
13790
- (count, [key2, child14]) => count + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child14)) ? 1 : countAfterFlags(child14)),
13790
+ (count, [key2, child16]) => count + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child16)) ? 1 : countAfterFlags(child16)),
13791
13791
  0
13792
13792
  );
13793
13793
  };
@@ -14199,8 +14199,8 @@ function preservedP14ChildKey(node, transitionType, getXmlLocalName) {
14199
14199
  if (localName15 !== "prism") {
14200
14200
  continue;
14201
14201
  }
14202
- const child14 = value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
14203
- if (prismFamilyTypeOfNode(child14) === prismFamilyTypeForFlags(prismFlags)) {
14202
+ const child16 = value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
14203
+ if (prismFamilyTypeOfNode(child16) === prismFamilyTypeForFlags(prismFlags)) {
14204
14204
  return key2;
14205
14205
  }
14206
14206
  continue;
@@ -15270,17 +15270,17 @@ function collectMediaNodes(node, animations) {
15270
15270
  const childTnList = cTn?.["p:childTnLst"];
15271
15271
  if (childTnList) {
15272
15272
  for (const container of ["p:par", "p:seq", "p:excl"]) {
15273
- const children5 = ensureArray4(childTnList[container]);
15274
- for (const child14 of children5) {
15275
- collectMediaNodes(child14, animations);
15273
+ const children6 = ensureArray4(childTnList[container]);
15274
+ for (const child16 of children6) {
15275
+ collectMediaNodes(child16, animations);
15276
15276
  }
15277
15277
  }
15278
15278
  collectMediaNodes(childTnList, animations);
15279
15279
  }
15280
15280
  for (const container of ["p:par", "p:seq", "p:excl", "p:tnLst"]) {
15281
- const children5 = ensureArray4(node[container]);
15282
- for (const child14 of children5) {
15283
- collectMediaNodes(child14, animations);
15281
+ const children6 = ensureArray4(node[container]);
15282
+ for (const child16 of children6) {
15283
+ collectMediaNodes(child16, animations);
15284
15284
  }
15285
15285
  }
15286
15286
  }
@@ -15566,9 +15566,9 @@ var neutralTiming = (node) => [
15566
15566
  ].every((key2) => node[key2] === void 0) && (node["@_repeatCount"] === void 0 || String(node["@_repeatCount"]) === "1000") && (node["@_autoRev"] === void 0 || ["0", "false"].includes(String(node["@_autoRev"]))) && (node["@_spd"] === void 0 || String(node["@_spd"]) === "100000") && (node["@_accel"] === void 0 || String(node["@_accel"]) === "0") && (node["@_decel"] === void 0 || String(node["@_decel"]) === "0");
15567
15567
  function hasNativeVisibilitySet(node) {
15568
15568
  if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0") return false;
15569
- const children5 = node["p:childTnLst"];
15570
- if (!isXmlObject3(children5)) return false;
15571
- return ensureArray4(children5["p:set"]).some((set) => {
15569
+ const children6 = node["p:childTnLst"];
15570
+ if (!isXmlObject3(children6)) return false;
15571
+ return ensureArray4(children6["p:set"]).some((set) => {
15572
15572
  const common = set["p:cBhvr"];
15573
15573
  const list = isXmlObject3(common) ? common["p:attrNameLst"] : void 0;
15574
15574
  const names = isXmlObject3(list) ? list["p:attrName"] : void 0;
@@ -15596,10 +15596,10 @@ function unsupportedVisibilityContainerTiming(node) {
15596
15596
  function extractVisibilitySetTiming(node) {
15597
15597
  if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0" || String(node["@_presetSubtype"] ?? "0") !== "0" || node["@_dur"] !== void 0 || node["@_fill"] !== "hold" || !neutralTiming(node) || !simpleStarts(node))
15598
15598
  return void 0;
15599
- const children5 = node["p:childTnLst"];
15600
- if (!isXmlObject3(children5) || Object.keys(children5).length !== 1 || !children5["p:set"])
15599
+ const children6 = node["p:childTnLst"];
15600
+ if (!isXmlObject3(children6) || Object.keys(children6).length !== 1 || !children6["p:set"])
15601
15601
  return void 0;
15602
- const sets = ensureArray4(children5["p:set"]);
15602
+ const sets = ensureArray4(children6["p:set"]);
15603
15603
  if (sets.length !== 1) return void 0;
15604
15604
  if (Object.keys(sets[0]).some((key2) => !["p:cBhvr", "p:to"].includes(key2))) return void 0;
15605
15605
  const to = sets[0]["p:to"];
@@ -15613,10 +15613,10 @@ function extractVisibilitySetTiming(node) {
15613
15613
  const target = common["p:tgtEl"];
15614
15614
  if (!isXmlObject3(target) || Object.keys(target).length !== 1 || !isXmlObject3(target["p:spTgt"]) || Object.keys(target["p:spTgt"]).some((key2) => key2 !== "@_spid") || !/^\d+$/u.test(String(target["p:spTgt"]["@_spid"])))
15615
15615
  return void 0;
15616
- const child14 = common["p:cTn"];
15617
- if (!isXmlObject3(child14) || !neutralTiming(child14) || !simpleStarts(child14) || String(child14["@_dur"]) !== "1" || child14["@_fill"] !== "hold")
15616
+ const child16 = common["p:cTn"];
15617
+ if (!isXmlObject3(child16) || !neutralTiming(child16) || !simpleStarts(child16) || String(child16["@_dur"]) !== "1" || child16["@_fill"] !== "hold")
15618
15618
  return void 0;
15619
- const behavior = extractBehaviors(children5)?.[0];
15619
+ const behavior = extractBehaviors(children6)?.[0];
15620
15620
  if (!behavior || behavior.kind !== "set" || behavior.value !== "visible" || behavior.attrNames.length !== 1 || behavior.attrNames[0] !== "style.visibility" || behavior.timing.unsupportedSetTiming)
15621
15621
  return void 0;
15622
15622
  try {
@@ -16298,27 +16298,27 @@ function rawTransitionHasExplicitCutChild(raw, localName15) {
16298
16298
  return Object.keys(raw).some((key2) => !key2.startsWith("@_") && localName15(key2) === "cut");
16299
16299
  }
16300
16300
  function buildStandardTransitionChild(transition) {
16301
- const child14 = {};
16301
+ const child16 = {};
16302
16302
  if (DIR_IS_ORIENTATION_TYPE.has(transition.type) && transition.orient) {
16303
- child14["@_dir"] = transition.orient;
16303
+ child16["@_dir"] = transition.orient;
16304
16304
  } else {
16305
16305
  if (transition.direction) {
16306
- child14["@_dir"] = transition.direction;
16306
+ child16["@_dir"] = transition.direction;
16307
16307
  }
16308
16308
  if (transition.orient) {
16309
- child14["@_orient"] = transition.orient;
16309
+ child16["@_orient"] = transition.orient;
16310
16310
  }
16311
16311
  }
16312
16312
  if (validUnsignedInteger(transition.spokes, 1)) {
16313
- child14["@_spokes"] = String(transition.spokes);
16313
+ child16["@_spokes"] = String(transition.spokes);
16314
16314
  }
16315
16315
  if (transition.pattern) {
16316
- child14["@_pattern"] = transition.pattern;
16316
+ child16["@_pattern"] = transition.pattern;
16317
16317
  }
16318
16318
  if (typeof transition.thruBlk === "boolean") {
16319
- child14["@_thruBlk"] = transition.thruBlk ? "1" : "0";
16319
+ child16["@_thruBlk"] = transition.thruBlk ? "1" : "0";
16320
16320
  }
16321
- return child14;
16321
+ return child16;
16322
16322
  }
16323
16323
  function applyTransitionAttributes(node, transition) {
16324
16324
  if (transition.speed && SPEEDS.has(transition.speed)) {
@@ -16667,7 +16667,7 @@ var PptxSlideTransitionService = class {
16667
16667
  const isExtensionType = isP14Type || isP15Type || isMorphType;
16668
16668
  if (isP14Type) {
16669
16669
  if (!p14ChildKey) {
16670
- const child14 = buildP14DirectChild(
16670
+ const child16 = buildP14DirectChild(
16671
16671
  transitionType,
16672
16672
  {
16673
16673
  direction: transition.direction,
@@ -16677,17 +16677,17 @@ var PptxSlideTransitionService = class {
16677
16677
  },
16678
16678
  extensionContext
16679
16679
  );
16680
- node[child14.key] = child14.node;
16680
+ node[child16.key] = child16.node;
16681
16681
  }
16682
16682
  } else if (isP15Type) {
16683
16683
  if (!p15ChildKey) {
16684
- const child14 = buildP15DirectChild(transitionType, extensionContext, transition.direction);
16685
- node[child14.key] = child14.node;
16684
+ const child16 = buildP15DirectChild(transitionType, extensionContext, transition.direction);
16685
+ node[child16.key] = child16.node;
16686
16686
  }
16687
16687
  } else if (isMorphType) {
16688
16688
  if (!hasDirectMorphChild(node, this.getXmlLocalName)) {
16689
- const child14 = buildMorphDirectChild(transition.morphOption, extensionContext);
16690
- node[child14.key] = child14.node;
16689
+ const child16 = buildMorphDirectChild(transition.morphOption, extensionContext);
16690
+ node[child16.key] = child16.node;
16691
16691
  }
16692
16692
  } else if (transitionType === "cut" && transition.rawTransition && !rawTransitionHasExplicitCutChild(transition.rawTransition, this.getXmlLocalName)) ; else {
16693
16693
  node[`p:${transitionType}`] = buildStandardTransitionChild(transition);
@@ -33495,14 +33495,14 @@ var KIND_ORDER = [
33495
33495
  function isBehaviorKind(value) {
33496
33496
  return KIND_ORDER.includes(value ?? "");
33497
33497
  }
33498
- function groupBehaviorChildren(children5) {
33498
+ function groupBehaviorChildren(children6) {
33499
33499
  const groups = /* @__PURE__ */ new Map();
33500
- for (const child14 of children5) {
33501
- const tag = child14["_type"];
33502
- delete child14["_type"];
33500
+ for (const child16 of children6) {
33501
+ const tag = child16["_type"];
33502
+ delete child16["_type"];
33503
33503
  const kind = isBehaviorKind(tag) ? tag : "animEffect";
33504
33504
  const list = groups.get(kind) ?? [];
33505
- list.push(child14);
33505
+ list.push(child16);
33506
33506
  groups.set(kind, list);
33507
33507
  }
33508
33508
  const childTnLst = {};
@@ -33839,9 +33839,9 @@ function resolveOoxmlPresetMapping(token2, defaultSubtypeFor) {
33839
33839
  const defaultSubtype = presetClass === "emph" ? 0 : defaultSubtypeFor?.(presetClass, presetId) ?? 0;
33840
33840
  return { presetClass, presetId, defaultSubtype };
33841
33841
  }
33842
- function buildReverseLookup(presetClass, canonical) {
33842
+ function buildReverseLookup(presetClass, canonical2) {
33843
33843
  const out = {};
33844
- for (const [id, name] of canonical) {
33844
+ for (const [id, name] of canonical2) {
33845
33845
  out[id] = name;
33846
33846
  }
33847
33847
  for (const [name, mapping] of Object.entries(PRESET_TO_OOXML)) {
@@ -33879,17 +33879,17 @@ function buildEntranceExitChildren(anim, presetClass, presetId, presetSubtype, d
33879
33879
  allocateId
33880
33880
  );
33881
33881
  if (!real) {
33882
- const children5 = [];
33882
+ const children6 = [];
33883
33883
  if (presetClass === "entr") {
33884
- children5.push(buildVisibilitySet(shapeId, durationMs, true, allocateId));
33884
+ children6.push(buildVisibilitySet(shapeId, durationMs, true, allocateId));
33885
33885
  }
33886
- children5.push(
33886
+ children6.push(
33887
33887
  buildAnimEffectNode(shapeId, durationMs, presetClass === "entr" ? "in" : "out", allocateId)
33888
33888
  );
33889
33889
  if (presetClass === "exit") {
33890
- children5.push(buildVisibilitySet(shapeId, durationMs, false, allocateId));
33890
+ children6.push(buildVisibilitySet(shapeId, durationMs, false, allocateId));
33891
33891
  }
33892
- return { children: children5, presetSubtype, ...curve };
33892
+ return { children: children6, presetSubtype, ...curve };
33893
33893
  }
33894
33894
  const useDefaultCurve = anim.timingCurve === void 0;
33895
33895
  return {
@@ -34251,7 +34251,7 @@ function wrapInInteractiveSequence(effectNodes, triggerShapeId, allocateId) {
34251
34251
  }
34252
34252
  };
34253
34253
  }
34254
- function buildMainSequenceNode(mainSeqId, children5) {
34254
+ function buildMainSequenceNode(mainSeqId, children6) {
34255
34255
  const node = {
34256
34256
  "@_concurrent": "1",
34257
34257
  "@_nextAc": "seek",
@@ -34259,9 +34259,9 @@ function buildMainSequenceNode(mainSeqId, children5) {
34259
34259
  "@_id": String(mainSeqId),
34260
34260
  "@_dur": "indefinite",
34261
34261
  "@_nodeType": "mainSeq",
34262
- ...children5.length > 0 ? {
34262
+ ...children6.length > 0 ? {
34263
34263
  "p:childTnLst": {
34264
- "p:par": children5.length === 1 ? children5[0] : children5
34264
+ "p:par": children6.length === 1 ? children6[0] : children6
34265
34265
  }
34266
34266
  } : {}
34267
34267
  },
@@ -34622,7 +34622,7 @@ function refreshEffectBehaviors(cTn, anim, preset, mapping, shapeId, allocateId)
34622
34622
  return;
34623
34623
  }
34624
34624
  if (mapping.presetClass === "emph" && presetChanged) {
34625
- const children5 = buildEmphasisBehaviorNodes(
34625
+ const children6 = buildEmphasisBehaviorNodes(
34626
34626
  shapeId,
34627
34627
  duration,
34628
34628
  preset,
@@ -34630,7 +34630,7 @@ function refreshEffectBehaviors(cTn, anim, preset, mapping, shapeId, allocateId)
34630
34630
  mapping.presetId,
34631
34631
  subtype
34632
34632
  );
34633
- cTn["p:childTnLst"] = groupBehaviorChildren(children5);
34633
+ cTn["p:childTnLst"] = groupBehaviorChildren(children6);
34634
34634
  cTn["@_presetSubtype"] = String(subtype);
34635
34635
  } else {
34636
34636
  cTn["@_presetSubtype"] = String(subtype);
@@ -35151,22 +35151,22 @@ function collectParsedOmathNodes(root) {
35151
35151
  return result;
35152
35152
  }
35153
35153
  function reorderContainer(node, rawInner) {
35154
- const children5 = scanDirectChildren(rawInner);
35155
- if (children5.length === 0) {
35154
+ const children6 = scanDirectChildren(rawInner);
35155
+ if (children6.length === 0) {
35156
35156
  return;
35157
35157
  }
35158
35158
  const occurrence = /* @__PURE__ */ new Map();
35159
35159
  const resolved = [];
35160
- for (const child14 of children5) {
35161
- const index = occurrence.get(child14.tag) ?? 0;
35162
- occurrence.set(child14.tag, index + 1);
35163
- const value = ensureItems(node[child14.tag])[index];
35164
- resolved.push({ tag: child14.tag, value });
35165
- if (isXmlObject(value) && child14.inner) {
35166
- reorderContainer(value, child14.inner);
35160
+ for (const child16 of children6) {
35161
+ const index = occurrence.get(child16.tag) ?? 0;
35162
+ occurrence.set(child16.tag, index + 1);
35163
+ const value = ensureItems(node[child16.tag])[index];
35164
+ resolved.push({ tag: child16.tag, value });
35165
+ if (isXmlObject(value) && child16.inner) {
35166
+ reorderContainer(value, child16.inner);
35167
35167
  }
35168
35168
  }
35169
- if (isGroupedByTag(children5.map((child14) => child14.tag))) {
35169
+ if (isGroupedByTag(children6.map((child16) => child16.tag))) {
35170
35170
  return;
35171
35171
  }
35172
35172
  for (const [tag, count] of occurrence) {
@@ -36292,6 +36292,694 @@ function applyHeaderFooterToMaster(masterRoot, headerFooter) {
36292
36292
  }
36293
36293
  }
36294
36294
 
36295
+ // pptx/core/utils/chart-element-format-keys.ts
36296
+ function parseChartFormatTargetKey(key2) {
36297
+ const [kind, raw] = key2.split(":");
36298
+ const index = raw === void 0 ? void 0 : Number(raw);
36299
+ if (index !== void 0 && (!Number.isInteger(index) || index < 0)) {
36300
+ return void 0;
36301
+ }
36302
+ switch (kind) {
36303
+ case "chartArea":
36304
+ case "plotArea":
36305
+ case "title":
36306
+ case "legend":
36307
+ return index === void 0 ? { kind } : void 0;
36308
+ case "axis":
36309
+ case "majorGridlines":
36310
+ case "minorGridlines":
36311
+ return index === void 0 ? void 0 : { kind, axisIndex: index };
36312
+ case "series":
36313
+ return index === void 0 ? void 0 : { kind, seriesIndex: index };
36314
+ case "dataLabels":
36315
+ return index === void 0 ? { kind } : { kind, seriesIndex: index };
36316
+ default:
36317
+ return void 0;
36318
+ }
36319
+ }
36320
+
36321
+ // pptx/core/utils/chart-element-format-xml.ts
36322
+ var SP_PR_ORDER2 = [
36323
+ "xfrm",
36324
+ "custGeom",
36325
+ "prstGeom",
36326
+ "noFill",
36327
+ "solidFill",
36328
+ "gradFill",
36329
+ "blipFill",
36330
+ "pattFill",
36331
+ "grpFill",
36332
+ "ln",
36333
+ "effectLst",
36334
+ "effectDag",
36335
+ "scene3d",
36336
+ "sp3d",
36337
+ "extLst"
36338
+ ];
36339
+ var FILL_CHOICE = ["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"];
36340
+ var LN_ORDER = [
36341
+ "noFill",
36342
+ "solidFill",
36343
+ "gradFill",
36344
+ "pattFill",
36345
+ "prstDash",
36346
+ "custDash",
36347
+ "round",
36348
+ "bevel",
36349
+ "miter",
36350
+ "headEnd",
36351
+ "tailEnd",
36352
+ "extLst"
36353
+ ];
36354
+ var LN_FILL_CHOICE = ["noFill", "solidFill", "gradFill", "pattFill"];
36355
+ var EFFECT_ORDER = [
36356
+ "blur",
36357
+ "fillOverlay",
36358
+ "glow",
36359
+ "innerShdw",
36360
+ "outerShdw",
36361
+ "prstShdw",
36362
+ "reflection",
36363
+ "softEdge"
36364
+ ];
36365
+ var EMU_PER_POINT2 = 12700;
36366
+ function keyOf(node, name, localName15) {
36367
+ return Object.keys(node).find((key2) => !key2.startsWith("@_") && localName15(key2) === name);
36368
+ }
36369
+ function asObject(value) {
36370
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
36371
+ }
36372
+ function removeChildren(node, names, localName15) {
36373
+ for (const key2 of Object.keys(node)) {
36374
+ if (!key2.startsWith("@_") && names.includes(localName15(key2))) {
36375
+ delete node[key2];
36376
+ }
36377
+ }
36378
+ }
36379
+ function setOrdered(node, name, value, order, localName15) {
36380
+ const existing = keyOf(node, name, localName15);
36381
+ if (existing) {
36382
+ node[existing] = value;
36383
+ return;
36384
+ }
36385
+ const rankOf = (key2) => {
36386
+ if (key2.startsWith("@_")) {
36387
+ return -1;
36388
+ }
36389
+ const r = order.indexOf(localName15(key2));
36390
+ return r < 0 ? order.length : r;
36391
+ };
36392
+ const entries = [...Object.entries(node), [`a:${name}`, value]].map((entry2, index) => ({ entry: entry2, index })).sort((a, b) => rankOf(a.entry[0]) - rankOf(b.entry[0]) || a.index - b.index).map(({ entry: entry2 }) => entry2);
36393
+ for (const key2 of Object.keys(node)) {
36394
+ delete node[key2];
36395
+ }
36396
+ for (const [key2, child16] of entries) {
36397
+ node[key2] = child16;
36398
+ }
36399
+ }
36400
+ function alphaOf(transparency) {
36401
+ if (transparency === void 0 || transparency <= 0) {
36402
+ return void 0;
36403
+ }
36404
+ const clamped = Math.min(100, Math.max(0, transparency));
36405
+ return { "@_val": String(Math.round((100 - clamped) * 1e3)) };
36406
+ }
36407
+ function chartElementColorXml(color2, transparency) {
36408
+ const clr = { "@_val": chartColorHex(color2) };
36409
+ const alpha = alphaOf(transparency);
36410
+ if (alpha) {
36411
+ clr["a:alpha"] = alpha;
36412
+ }
36413
+ return { "a:srgbClr": clr };
36414
+ }
36415
+ function setPaintAlpha(paint2, transparency, localName15) {
36416
+ const choiceKey = Object.keys(paint2).find((key2) => !key2.startsWith("@_"));
36417
+ const choice = choiceKey ? asObject(paint2[choiceKey]) : void 0;
36418
+ if (!choiceKey || !choice) {
36419
+ return;
36420
+ }
36421
+ const next = { ...choice };
36422
+ removeChildren(next, ["alpha"], localName15);
36423
+ const alpha = alphaOf(transparency);
36424
+ if (alpha) {
36425
+ next["a:alpha"] = alpha;
36426
+ }
36427
+ paint2[choiceKey] = next;
36428
+ }
36429
+ function applyPaint(node, paint2, choices, order, localName15) {
36430
+ if (paint2.kind === "automatic") {
36431
+ removeChildren(node, choices, localName15);
36432
+ return;
36433
+ }
36434
+ if (paint2.kind === "none") {
36435
+ removeChildren(node, choices, localName15);
36436
+ setOrdered(node, "noFill", {}, order, localName15);
36437
+ return;
36438
+ }
36439
+ if (paint2.color) {
36440
+ removeChildren(node, choices, localName15);
36441
+ setOrdered(
36442
+ node,
36443
+ "solidFill",
36444
+ chartElementColorXml(paint2.color, paint2.transparency),
36445
+ order,
36446
+ localName15
36447
+ );
36448
+ return;
36449
+ }
36450
+ const solidKey = keyOf(node, "solidFill", localName15);
36451
+ const solid = solidKey ? asObject(node[solidKey]) : void 0;
36452
+ if (solid && solidKey && paint2.transparency !== void 0) {
36453
+ const next = { ...solid };
36454
+ setPaintAlpha(next, paint2.transparency, localName15);
36455
+ node[solidKey] = next;
36456
+ }
36457
+ }
36458
+ function applyLine(spPr, line, localName15) {
36459
+ const lnKey = keyOf(spPr, "ln", localName15);
36460
+ const ln = { ...asObject(lnKey ? spPr[lnKey] : void 0) ?? {} };
36461
+ applyPaint(ln, line, LN_FILL_CHOICE, LN_ORDER, localName15);
36462
+ if (line.width !== void 0) {
36463
+ ln["@_w"] = String(Math.round(Math.max(0, line.width) * EMU_PER_POINT2));
36464
+ }
36465
+ if (line.compound !== void 0) {
36466
+ ln["@_cmpd"] = line.compound;
36467
+ }
36468
+ if (line.cap !== void 0) {
36469
+ ln["@_cap"] = line.cap;
36470
+ }
36471
+ if (line.dash !== void 0) {
36472
+ removeChildren(ln, ["custDash"], localName15);
36473
+ setOrdered(ln, "prstDash", { "@_val": line.dash }, LN_ORDER, localName15);
36474
+ }
36475
+ if (line.join !== void 0) {
36476
+ removeChildren(ln, ["round", "bevel", "miter"], localName15);
36477
+ setOrdered(
36478
+ ln,
36479
+ line.join,
36480
+ line.join === "miter" ? { "@_lim": "800000" } : {},
36481
+ LN_ORDER,
36482
+ localName15
36483
+ );
36484
+ }
36485
+ if (line.beginArrow !== void 0) {
36486
+ setOrdered(ln, "headEnd", { "@_type": line.beginArrow }, LN_ORDER, localName15);
36487
+ }
36488
+ if (line.endArrow !== void 0) {
36489
+ setOrdered(ln, "tailEnd", { "@_type": line.endArrow }, LN_ORDER, localName15);
36490
+ }
36491
+ if (Object.keys(ln).length === 0) {
36492
+ if (lnKey) {
36493
+ delete spPr[lnKey];
36494
+ }
36495
+ return;
36496
+ }
36497
+ setOrdered(spPr, "ln", ln, SP_PR_ORDER2, localName15);
36498
+ }
36499
+ var pt = (value) => String(Math.round(Math.max(0, value) * EMU_PER_POINT2));
36500
+ function applyEffects(spPr, effects, localName15) {
36501
+ const key2 = keyOf(spPr, "effectLst", localName15);
36502
+ const list = { ...asObject(key2 ? spPr[key2] : void 0) ?? {} };
36503
+ if (effects.shadow !== void 0) {
36504
+ removeChildren(list, ["outerShdw"], localName15);
36505
+ if (effects.shadow) {
36506
+ const s = effects.shadow;
36507
+ setOrdered(
36508
+ list,
36509
+ "outerShdw",
36510
+ {
36511
+ "@_blurRad": pt(s.blur),
36512
+ "@_dist": pt(s.distance),
36513
+ "@_dir": String(Math.round((s.angle % 360 + 360) % 360 * 6e4)),
36514
+ "@_algn": "tl",
36515
+ "@_rotWithShape": "0",
36516
+ ...chartElementColorXml(s.color, s.transparency)
36517
+ },
36518
+ EFFECT_ORDER,
36519
+ localName15
36520
+ );
36521
+ }
36522
+ }
36523
+ if (effects.glow !== void 0) {
36524
+ removeChildren(list, ["glow"], localName15);
36525
+ if (effects.glow) {
36526
+ setOrdered(
36527
+ list,
36528
+ "glow",
36529
+ {
36530
+ "@_rad": pt(effects.glow.radius),
36531
+ ...chartElementColorXml(effects.glow.color, effects.glow.transparency)
36532
+ },
36533
+ EFFECT_ORDER,
36534
+ localName15
36535
+ );
36536
+ }
36537
+ }
36538
+ if (effects.softEdge !== void 0) {
36539
+ removeChildren(list, ["softEdge"], localName15);
36540
+ if (effects.softEdge !== null && effects.softEdge > 0) {
36541
+ setOrdered(list, "softEdge", { "@_rad": pt(effects.softEdge) }, EFFECT_ORDER, localName15);
36542
+ }
36543
+ }
36544
+ if (Object.keys(list).length === 0) {
36545
+ if (key2) {
36546
+ delete spPr[key2];
36547
+ }
36548
+ return;
36549
+ }
36550
+ setOrdered(spPr, "effectLst", list, SP_PR_ORDER2, localName15);
36551
+ }
36552
+ function applyChartElementFormatToSpPr(existing, format, localName15) {
36553
+ const spPr = format.reset ? {} : { ...existing ?? {} };
36554
+ if (format.fill) {
36555
+ applyPaint(spPr, format.fill, FILL_CHOICE, SP_PR_ORDER2, localName15);
36556
+ }
36557
+ if (format.line) {
36558
+ applyLine(spPr, format.line, localName15);
36559
+ }
36560
+ if (format.effects) {
36561
+ applyEffects(spPr, format.effects, localName15);
36562
+ }
36563
+ return Object.keys(spPr).length > 0 ? spPr : void 0;
36564
+ }
36565
+
36566
+ // pptx/core/utils/chart-element-format-targets.ts
36567
+ var CHART_SPACE_AFTER_SP_PR = ["txPr", "externalData", "printSettings", "userShapes", "extLst"];
36568
+ var TEXT_OWNER_AFTER_SP_PR = ["txPr", "extLst"];
36569
+ var AXIS_AFTER_SP_PR = [
36570
+ "txPr",
36571
+ "crossAx",
36572
+ "crosses",
36573
+ "crossesAt",
36574
+ "crossBetween",
36575
+ "auto",
36576
+ "lblAlgn",
36577
+ "lblOffset",
36578
+ "majorUnit",
36579
+ "minorUnit",
36580
+ "dispUnits",
36581
+ "tickLblSkip",
36582
+ "tickMarkSkip",
36583
+ "noMultiLvlLbl",
36584
+ "baseTimeUnit",
36585
+ "majorTimeUnit",
36586
+ "minorTimeUnit",
36587
+ "extLst"
36588
+ ];
36589
+ var SERIES_AFTER_SP_PR = [
36590
+ "invertIfNegative",
36591
+ "pictureOptions",
36592
+ "marker",
36593
+ "dPt",
36594
+ "dLbls",
36595
+ "trendline",
36596
+ "errBars",
36597
+ "cat",
36598
+ "val",
36599
+ "xVal",
36600
+ "yVal",
36601
+ "smooth",
36602
+ "shape",
36603
+ "explosion",
36604
+ "bubbleSize",
36605
+ "bubble3D",
36606
+ "extLst"
36607
+ ];
36608
+ var DLBLS_AFTER_SP_PR = [
36609
+ "txPr",
36610
+ "dLblPos",
36611
+ "showLegendKey",
36612
+ "showVal",
36613
+ "showCatName",
36614
+ "showSerName",
36615
+ "showPercent",
36616
+ "showBubbleSize",
36617
+ "separator",
36618
+ "showLeaderLines",
36619
+ "leaderLines",
36620
+ "extLst"
36621
+ ];
36622
+ var AXIS_TAGS = ["catAx", "valAx", "dateAx", "serAx"];
36623
+ function keyOf2(node, name, getLocalName2) {
36624
+ return Object.keys(node).find((key2) => !key2.startsWith("@_") && getLocalName2(key2) === name);
36625
+ }
36626
+ function child3(node, name, getLocalName2) {
36627
+ if (!node) {
36628
+ return void 0;
36629
+ }
36630
+ const key2 = keyOf2(node, name, getLocalName2);
36631
+ const value = key2 ? node[key2] : void 0;
36632
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
36633
+ }
36634
+ function children3(node, name, getLocalName2) {
36635
+ const key2 = keyOf2(node, name, getLocalName2);
36636
+ const value = key2 ? node[key2] : void 0;
36637
+ if (Array.isArray(value)) {
36638
+ return value.filter((v) => Boolean(v) && typeof v === "object");
36639
+ }
36640
+ return value && typeof value === "object" ? [value] : [];
36641
+ }
36642
+ function applyFormatToOwner(owner, format, after, getLocalName2) {
36643
+ const spPrKey = keyOf2(owner, "spPr", getLocalName2);
36644
+ const existing = spPrKey ? owner[spPrKey] : void 0;
36645
+ const next = applyChartElementFormatToSpPr(
36646
+ existing && typeof existing === "object" ? existing : void 0,
36647
+ format,
36648
+ getLocalName2
36649
+ );
36650
+ if (spPrKey) {
36651
+ if (next) {
36652
+ owner[spPrKey] = next;
36653
+ } else {
36654
+ delete owner[spPrKey];
36655
+ }
36656
+ return;
36657
+ }
36658
+ if (!next) {
36659
+ return;
36660
+ }
36661
+ const entries = Object.entries(owner);
36662
+ const at = entries.findIndex(
36663
+ ([key2]) => !key2.startsWith("@_") && after.includes(getLocalName2(key2))
36664
+ );
36665
+ entries.splice(at < 0 ? entries.length : at, 0, ["c:spPr", next]);
36666
+ for (const key2 of Object.keys(owner)) {
36667
+ delete owner[key2];
36668
+ }
36669
+ for (const [key2, value] of entries) {
36670
+ owner[key2] = value;
36671
+ }
36672
+ }
36673
+ function findChartAxisNode(plotArea, chartData, axisIndex, getLocalName2) {
36674
+ const axis = chartData.axes?.[axisIndex];
36675
+ if (!axis) {
36676
+ return void 0;
36677
+ }
36678
+ const nodes = AXIS_TAGS.flatMap(
36679
+ (tag) => children3(plotArea, tag, getLocalName2).map((node) => ({ tag, node }))
36680
+ );
36681
+ if (axis.axisId !== void 0) {
36682
+ const byId = nodes.find(
36683
+ ({ node }) => child3(node, "axId", getLocalName2)?.["@_val"] === String(axis.axisId)
36684
+ );
36685
+ if (byId) {
36686
+ return byId.node;
36687
+ }
36688
+ }
36689
+ const sameType = (chartData.axes ?? []).slice(0, axisIndex).filter((a) => a.axisType === axis.axisType).length;
36690
+ return nodes.filter(({ tag }) => tag === axis.axisType)[sameType]?.node;
36691
+ }
36692
+ function canonical(value) {
36693
+ if (Array.isArray(value)) {
36694
+ return `[${value.map(canonical).join(",")}]`;
36695
+ }
36696
+ if (value && typeof value === "object") {
36697
+ const entries = Object.entries(value).filter(([, v]) => v !== void 0).sort(([a], [b]) => a < b ? -1 : 1);
36698
+ return `{${entries.map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`).join(",")}}`;
36699
+ }
36700
+ return JSON.stringify(value);
36701
+ }
36702
+ function changedSections(record2, authored) {
36703
+ if (record2.reset) {
36704
+ return record2;
36705
+ }
36706
+ const out = {};
36707
+ for (const section of ["fill", "line", "effects"]) {
36708
+ if (record2[section] !== void 0 && canonical(record2[section]) !== canonical(authored?.[section])) {
36709
+ Object.assign(out, { [section]: record2[section] });
36710
+ }
36711
+ }
36712
+ return Object.keys(out).length > 0 ? out : void 0;
36713
+ }
36714
+ function formatEntries(chartData, authored) {
36715
+ return Object.entries(chartData.elementFormats ?? {}).flatMap(([key2, record2]) => {
36716
+ const target = parseChartFormatTargetKey(key2);
36717
+ const format = target ? changedSections(record2, authored?.[key2]) : void 0;
36718
+ return target && format ? [{ target, format }] : [];
36719
+ });
36720
+ }
36721
+ function applySeriesElementFormatsToXml(seriesNodes, chartData, getLocalName2, authored) {
36722
+ for (const { target, format } of formatEntries(chartData, authored)) {
36723
+ if (target.kind !== "series" && !(target.kind === "dataLabels" && target.seriesIndex !== void 0)) {
36724
+ continue;
36725
+ }
36726
+ const node = seriesNodes[target.seriesIndex ?? -1];
36727
+ if (!node) {
36728
+ continue;
36729
+ }
36730
+ if (target.kind === "series") {
36731
+ applyFormatToOwner(node, format, SERIES_AFTER_SP_PR, getLocalName2);
36732
+ } else {
36733
+ const dLbls = child3(node, "dLbls", getLocalName2);
36734
+ if (dLbls) {
36735
+ applyFormatToOwner(dLbls, format, DLBLS_AFTER_SP_PR, getLocalName2);
36736
+ }
36737
+ }
36738
+ }
36739
+ }
36740
+ function allDataLabelNodes(plotArea, getLocalName2) {
36741
+ const out = [];
36742
+ for (const key2 of Object.keys(plotArea)) {
36743
+ if (!getLocalName2(key2).endsWith("Chart")) {
36744
+ continue;
36745
+ }
36746
+ const container = plotArea[key2];
36747
+ if (!container || typeof container !== "object" || Array.isArray(container)) {
36748
+ continue;
36749
+ }
36750
+ const owners = [
36751
+ container,
36752
+ ...children3(container, "ser", getLocalName2)
36753
+ ];
36754
+ for (const owner of owners) {
36755
+ const dLbls = child3(owner, "dLbls", getLocalName2);
36756
+ if (dLbls) {
36757
+ out.push(dLbls);
36758
+ }
36759
+ }
36760
+ }
36761
+ return out;
36762
+ }
36763
+ function applyChromeElementFormatsToXml(chartSpace, chartData, getLocalName2, authored) {
36764
+ const chartRoot = child3(chartSpace, "chart", getLocalName2);
36765
+ const plotArea = child3(chartRoot, "plotArea", getLocalName2);
36766
+ for (const { target, format } of formatEntries(chartData, authored)) {
36767
+ switch (target.kind) {
36768
+ case "chartArea":
36769
+ applyFormatToOwner(chartSpace, format, CHART_SPACE_AFTER_SP_PR, getLocalName2);
36770
+ break;
36771
+ case "plotArea":
36772
+ if (plotArea) {
36773
+ applyFormatToOwner(plotArea, format, ["extLst"], getLocalName2);
36774
+ }
36775
+ break;
36776
+ case "title":
36777
+ case "legend": {
36778
+ const owner = child3(chartRoot, target.kind, getLocalName2);
36779
+ if (owner) {
36780
+ applyFormatToOwner(owner, format, TEXT_OWNER_AFTER_SP_PR, getLocalName2);
36781
+ }
36782
+ break;
36783
+ }
36784
+ case "axis":
36785
+ case "majorGridlines":
36786
+ case "minorGridlines": {
36787
+ const axis = plotArea ? findChartAxisNode(plotArea, chartData, target.axisIndex, getLocalName2) : void 0;
36788
+ if (!axis) {
36789
+ break;
36790
+ }
36791
+ if (target.kind === "axis") {
36792
+ applyFormatToOwner(axis, format, AXIS_AFTER_SP_PR, getLocalName2);
36793
+ } else {
36794
+ const lines = child3(axis, target.kind, getLocalName2);
36795
+ if (lines) {
36796
+ applyFormatToOwner(lines, format, ["extLst"], getLocalName2);
36797
+ }
36798
+ }
36799
+ break;
36800
+ }
36801
+ case "dataLabels":
36802
+ if (plotArea && target.seriesIndex === void 0) {
36803
+ for (const dLbls of allDataLabelNodes(plotArea, getLocalName2)) {
36804
+ applyFormatToOwner(dLbls, format, DLBLS_AFTER_SP_PR, getLocalName2);
36805
+ }
36806
+ }
36807
+ break;
36808
+ }
36809
+ }
36810
+ }
36811
+
36812
+ // pptx/core/utils/chart-element-format-read-xml.ts
36813
+ var EMU_PER_POINT3 = 12700;
36814
+ function child4(node, name, localName15) {
36815
+ if (!node) {
36816
+ return void 0;
36817
+ }
36818
+ const key2 = Object.keys(node).find((k) => !k.startsWith("@_") && localName15(k) === name);
36819
+ if (!key2) {
36820
+ return void 0;
36821
+ }
36822
+ const value = node[key2];
36823
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
36824
+ }
36825
+ function has(node, name, localName15) {
36826
+ return Boolean(
36827
+ node && Object.keys(node).some((k) => !k.startsWith("@_") && localName15(k) === name)
36828
+ );
36829
+ }
36830
+ var round = (value) => Math.round(value * 100) / 100;
36831
+ var points = (emu2) => {
36832
+ const n = Number(emu2);
36833
+ return Number.isFinite(n) ? round(n / EMU_PER_POINT3) : void 0;
36834
+ };
36835
+ function transparencyOf(fill, localName15) {
36836
+ for (const [key2, value] of Object.entries(fill)) {
36837
+ if (key2.startsWith("@_") || !value || typeof value !== "object") {
36838
+ continue;
36839
+ }
36840
+ const alpha = child4(value, "alpha", localName15)?.["@_val"];
36841
+ const n = Number(alpha);
36842
+ if (alpha !== void 0 && Number.isFinite(n)) {
36843
+ const transparency = round(100 - n / 1e3);
36844
+ return transparency > 0 ? transparency : void 0;
36845
+ }
36846
+ }
36847
+ return void 0;
36848
+ }
36849
+ function paint(node, localName15, resolve) {
36850
+ if (has(node, "noFill", localName15)) {
36851
+ return { kind: "none" };
36852
+ }
36853
+ const solid = child4(node, "solidFill", localName15);
36854
+ if (!solid) {
36855
+ return void 0;
36856
+ }
36857
+ const color2 = resolve(solid);
36858
+ const transparency = transparencyOf(solid, localName15);
36859
+ return {
36860
+ kind: "solid",
36861
+ ...color2 ? { color: color2 } : {},
36862
+ ...transparency !== void 0 ? { transparency } : {}
36863
+ };
36864
+ }
36865
+ var LINE_ENDS = /* @__PURE__ */ new Set(["triangle", "stealth", "diamond", "oval", "arrow", "none"]);
36866
+ function readLine(ln, localName15, resolve) {
36867
+ const line = paint(ln, localName15, resolve) ?? { kind: "automatic" };
36868
+ const width = points(ln["@_w"]);
36869
+ if (ln["@_w"] !== void 0 && width !== void 0) line.width = width;
36870
+ const cmpd = ln["@_cmpd"];
36871
+ if (cmpd === "sng" || cmpd === "dbl" || cmpd === "thickThin" || cmpd === "thinThick" || cmpd === "tri") {
36872
+ line.compound = cmpd;
36873
+ }
36874
+ const cap = ln["@_cap"];
36875
+ if (cap === "rnd" || cap === "sq" || cap === "flat") line.cap = cap;
36876
+ const dash = child4(ln, "prstDash", localName15)?.["@_val"];
36877
+ if (typeof dash === "string") line.dash = dash;
36878
+ for (const join of ["round", "bevel", "miter"]) {
36879
+ if (has(ln, join, localName15)) line.join = join;
36880
+ }
36881
+ const head = child4(ln, "headEnd", localName15)?.["@_type"];
36882
+ if (typeof head === "string" && LINE_ENDS.has(head) && head !== "none") {
36883
+ line.beginArrow = head;
36884
+ }
36885
+ const tail = child4(ln, "tailEnd", localName15)?.["@_type"];
36886
+ if (typeof tail === "string" && LINE_ENDS.has(tail) && tail !== "none") {
36887
+ line.endArrow = tail;
36888
+ }
36889
+ return line;
36890
+ }
36891
+ function readEffects(list, localName15, resolve) {
36892
+ const effects = {};
36893
+ const shadow = child4(list, "outerShdw", localName15);
36894
+ if (shadow) {
36895
+ const color2 = resolve(shadow) ?? "#000000";
36896
+ const transparency = transparencyOf(shadow, localName15);
36897
+ effects.shadow = {
36898
+ color: color2,
36899
+ ...transparency !== void 0 ? { transparency } : {},
36900
+ blur: points(shadow["@_blurRad"] ?? 0) ?? 0,
36901
+ distance: points(shadow["@_dist"] ?? 0) ?? 0,
36902
+ angle: round((Number(shadow["@_dir"] ?? 0) || 0) / 6e4)
36903
+ };
36904
+ }
36905
+ const glow = child4(list, "glow", localName15);
36906
+ if (glow) {
36907
+ const transparency = transparencyOf(glow, localName15);
36908
+ effects.glow = {
36909
+ color: resolve(glow) ?? "#FFFFFF",
36910
+ ...transparency !== void 0 ? { transparency } : {},
36911
+ radius: points(glow["@_rad"] ?? 0) ?? 0
36912
+ };
36913
+ }
36914
+ const soft = child4(list, "softEdge", localName15);
36915
+ if (soft) {
36916
+ effects.softEdge = points(soft["@_rad"] ?? 0) ?? 0;
36917
+ }
36918
+ return Object.keys(effects).length > 0 ? effects : void 0;
36919
+ }
36920
+ function readChartElementFormatFromSpPr(spPr, localName15, resolve) {
36921
+ if (!spPr) {
36922
+ return void 0;
36923
+ }
36924
+ const format = {};
36925
+ const fill = paint(spPr, localName15, resolve);
36926
+ if (fill) format.fill = fill;
36927
+ const ln = child4(spPr, "ln", localName15);
36928
+ if (ln) format.line = readLine(ln, localName15, resolve);
36929
+ const effectLst = child4(spPr, "effectLst", localName15);
36930
+ const effects = effectLst ? readEffects(effectLst, localName15, resolve) : void 0;
36931
+ if (effects) format.effects = effects;
36932
+ return Object.keys(format).length > 0 ? format : void 0;
36933
+ }
36934
+ function collectChartSeriesNodes(plotArea, localName15) {
36935
+ const out = [];
36936
+ for (const [key2, value] of Object.entries(plotArea ?? {})) {
36937
+ if (!localName15(key2).endsWith("Chart") || !value || typeof value !== "object") {
36938
+ continue;
36939
+ }
36940
+ for (const [childKey2, ser] of Object.entries(value)) {
36941
+ if (localName15(childKey2) !== "ser") continue;
36942
+ for (const node of Array.isArray(ser) ? ser : [ser]) {
36943
+ if (node && typeof node === "object") out.push(node);
36944
+ }
36945
+ }
36946
+ }
36947
+ return out;
36948
+ }
36949
+ function readChartElementFormatsFromXml(nodes, data, localName15, resolve) {
36950
+ const out = {};
36951
+ const spPrOf = (owner) => readChartElementFormatFromSpPr(child4(owner, "spPr", localName15), localName15, resolve);
36952
+ const put = (key2, format) => {
36953
+ if (format) out[key2] = format;
36954
+ };
36955
+ const chartRoot = child4(nodes.chartSpace, "chart", localName15);
36956
+ const plotArea = child4(chartRoot, "plotArea", localName15);
36957
+ put("chartArea", spPrOf(nodes.chartSpace));
36958
+ put("plotArea", spPrOf(plotArea));
36959
+ put("title", spPrOf(child4(chartRoot, "title", localName15)));
36960
+ put("legend", spPrOf(child4(chartRoot, "legend", localName15)));
36961
+ (data.axes ?? []).forEach((_, axisIndex) => {
36962
+ const axis = plotArea ? findChartAxisNode(plotArea, data, axisIndex, localName15) : void 0;
36963
+ put(`axis:${axisIndex}`, spPrOf(axis));
36964
+ put(`majorGridlines:${axisIndex}`, spPrOf(child4(axis, "majorGridlines", localName15)));
36965
+ put(`minorGridlines:${axisIndex}`, spPrOf(child4(axis, "minorGridlines", localName15)));
36966
+ });
36967
+ nodes.seriesNodes.forEach((ser, index) => put(`series:${index}`, spPrOf(ser)));
36968
+ for (const [key2, value] of Object.entries(plotArea ?? {})) {
36969
+ if (localName15(key2).endsWith("Chart") && value && typeof value === "object") {
36970
+ const own = spPrOf(child4(value, "dLbls", localName15));
36971
+ if (own) {
36972
+ put("dataLabels", own);
36973
+ break;
36974
+ }
36975
+ }
36976
+ }
36977
+ if (!out.dataLabels && nodes.seriesNodes[0]) {
36978
+ put("dataLabels", spPrOf(child4(nodes.seriesNodes[0], "dLbls", localName15)));
36979
+ }
36980
+ return Object.keys(out).length > 0 ? out : void 0;
36981
+ }
36982
+
36295
36983
  // pptx/core/utils/chart-xlsx-write-validation.ts
36296
36984
  function unsupported(reason) {
36297
36985
  throw new Error(`Chart label replacement requires direct literal workbook cells: ${reason}.`);
@@ -36543,7 +37231,7 @@ function formulaCount(value) {
36543
37231
  if (!value || typeof value !== "object") return 0;
36544
37232
  if (Array.isArray(value)) return value.reduce((total, item) => total + formulaCount(item), 0);
36545
37233
  return Object.entries(value).reduce(
36546
- (total, [key2, child14]) => total + (key2 === "f" || key2.endsWith(":f") ? 1 : formulaCount(child14)),
37234
+ (total, [key2, child16]) => total + (key2 === "f" || key2.endsWith(":f") ? 1 : formulaCount(child16)),
36547
37235
  0
36548
37236
  );
36549
37237
  }
@@ -36635,7 +37323,7 @@ function parseChartBandFmts(seriesContainer, xmlLookup, colorParser) {
36635
37323
  return result.length > 0 ? result : void 0;
36636
37324
  }
36637
37325
  var findKey3 = (node, name, localName15) => Object.keys(node).find((key2) => localName15(key2) === name);
36638
- function setOrdered(node, name, value, order, localName15) {
37326
+ function setOrdered2(node, name, value, order, localName15) {
36639
37327
  const key2 = findKey3(node, name, localName15);
36640
37328
  if (key2) {
36641
37329
  node[key2] = value;
@@ -36651,8 +37339,8 @@ function setOrdered(node, name, value, order, localName15) {
36651
37339
  for (const candidate of Object.keys(node)) {
36652
37340
  delete node[candidate];
36653
37341
  }
36654
- for (const [candidate, child14] of entries) {
36655
- node[candidate] = child14;
37342
+ for (const [candidate, child16] of entries) {
37343
+ node[candidate] = child16;
36656
37344
  }
36657
37345
  }
36658
37346
  function applyChartBandFmts(seriesContainer, bandFmts, localName15, resolveColor2) {
@@ -36690,10 +37378,10 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName15, resolveColor
36690
37378
  localName15,
36691
37379
  resolveColor2
36692
37380
  );
36693
- setOrdered(node, "spPr", spPr, ["idx", "spPr", "extLst"], localName15);
37381
+ setOrdered2(node, "spPr", spPr, ["idx", "spPr", "extLst"], localName15);
36694
37382
  }
36695
37383
  }
36696
- setOrdered(
37384
+ setOrdered2(
36697
37385
  seriesContainer,
36698
37386
  "bandFmts",
36699
37387
  { "c:bandFmt": updated },
@@ -36854,10 +37542,10 @@ function readCachedValues(refContainer, xmlLookup) {
36854
37542
  if (!cacheNode) {
36855
37543
  return [];
36856
37544
  }
36857
- const points4 = xmlLookup.getChildrenArrayByLocalName(cacheNode, "pt");
37545
+ const points5 = xmlLookup.getChildrenArrayByLocalName(cacheNode, "pt");
36858
37546
  const byIndex = /* @__PURE__ */ new Map();
36859
37547
  let maxIndex = -1;
36860
- for (const point of points4) {
37548
+ for (const point of points5) {
36861
37549
  const idx = Number.parseInt(String(point["@_idx"] ?? ""), 10);
36862
37550
  if (!Number.isInteger(idx) || idx < 0) {
36863
37551
  continue;
@@ -37082,7 +37770,7 @@ function readChartAppearance(text, properties) {
37082
37770
  }
37083
37771
 
37084
37772
  // chart/read-style.ts
37085
- var child3 = (parent, name) => first(parent, name, CHART_COLOR_STYLE_NS);
37773
+ var child5 = (parent, name) => first(parent, name, CHART_COLOR_STYLE_NS);
37086
37774
  function reference(node) {
37087
37775
  if (!node) return void 0;
37088
37776
  const out = { index: node.getAttribute("idx") ?? "" };
@@ -37093,10 +37781,10 @@ function reference(node) {
37093
37781
  function entry(node) {
37094
37782
  const out = {
37095
37783
  sourceXml: buildXml(node),
37096
- ...readChartAppearance(child3(node, "defRPr"), child3(node, "spPr"))
37784
+ ...readChartAppearance(child5(node, "defRPr"), child5(node, "spPr"))
37097
37785
  };
37098
37786
  for (const key2 of ["fontRef", "lineRef", "fillRef", "effectRef"]) {
37099
- const ref = reference(child3(node, key2 === "lineRef" ? "lnRef" : key2));
37787
+ const ref = reference(child5(node, key2 === "lineRef" ? "lnRef" : key2));
37100
37788
  if (ref) out[key2] = ref;
37101
37789
  }
37102
37790
  return out;
@@ -37187,11 +37875,11 @@ function cEnum(context, parent, local, allowed) {
37187
37875
  return void 0;
37188
37876
  }
37189
37877
  function reportUnmodelled(context, element, handled) {
37190
- for (const child14 of elements(element)) {
37191
- if (handled.has(child14.localName)) continue;
37878
+ for (const child16 of elements(element)) {
37879
+ if (handled.has(child16.localName)) continue;
37192
37880
  context.issues.push({
37193
37881
  code: "CHART_ELEMENT_NOT_MODELLED",
37194
- message: `${path(child14)} is not modelled; it is kept only in the source part.`
37882
+ message: `${path(child16)} is not modelled; it is kept only in the source part.`
37195
37883
  });
37196
37884
  }
37197
37885
  }
@@ -37264,11 +37952,11 @@ function assignDefined(target, values) {
37264
37952
  function parseCache(node) {
37265
37953
  const cache = {
37266
37954
  type: node.localName === "numCache" || node.localName === "numLit" ? "number" : "string",
37267
- points: children(node, "pt", NS.c).map((pt) => {
37268
- const point = { value: cChild(pt, "v")?.textContent ?? "" };
37269
- const index = Number(attribute(pt, "idx") ?? Number.NaN);
37955
+ points: children(node, "pt", NS.c).map((pt2) => {
37956
+ const point = { value: cChild(pt2, "v")?.textContent ?? "" };
37957
+ const index = Number(attribute(pt2, "idx") ?? Number.NaN);
37270
37958
  if (Number.isInteger(index) && index >= 0) point.index = index;
37271
- const formatCode3 = attribute(pt, "formatCode");
37959
+ const formatCode3 = attribute(pt2, "formatCode");
37272
37960
  if (formatCode3 !== void 0) point.formatCode = formatCode3;
37273
37961
  return point;
37274
37962
  })
@@ -37881,15 +38569,15 @@ function parsePlotArea(context, element) {
37881
38569
  return plotArea;
37882
38570
  }
37883
38571
  const handled = new Set(PLOT_AREA);
37884
- for (const child14 of elements(element)) {
37885
- if (CHART_GROUP_ELEMENTS[child14.localName]) {
37886
- plotArea.groups.push(parseGroup(context, child14));
37887
- handled.add(child14.localName);
38572
+ for (const child16 of elements(element)) {
38573
+ if (CHART_GROUP_ELEMENTS[child16.localName]) {
38574
+ plotArea.groups.push(parseGroup(context, child16));
38575
+ handled.add(child16.localName);
37888
38576
  }
37889
- const axis = AXIS_ELEMENTS[child14.localName];
38577
+ const axis = AXIS_ELEMENTS[child16.localName];
37890
38578
  if (axis) {
37891
- plotArea.axes.push(parseAxis(context, child14, axis));
37892
- handled.add(child14.localName);
38579
+ plotArea.axes.push(parseAxis(context, child16, axis));
38580
+ handled.add(child16.localName);
37893
38581
  }
37894
38582
  }
37895
38583
  reportUnmodelled(context, element, handled);
@@ -38180,9 +38868,9 @@ function take(pool, index) {
38180
38868
  const at = pool.findIndex((entry2) => entry2.index === index);
38181
38869
  return at < 0 ? void 0 : pool.splice(at, 1)[0];
38182
38870
  }
38183
- function dataPointsFromNeutral(points4, styled) {
38871
+ function dataPointsFromNeutral(points5, styled) {
38184
38872
  if (!styled) return void 0;
38185
- const pool = [...points4];
38873
+ const pool = [...points5];
38186
38874
  for (const point of styled) {
38187
38875
  const neutral = take(pool, point.idx);
38188
38876
  if (!neutral) continue;
@@ -38968,11 +39656,11 @@ var MARKER_SYMBOLS2 = /* @__PURE__ */ new Set([
38968
39656
  "x",
38969
39657
  "auto"
38970
39658
  ]);
38971
- function keyOf(node, name, localName15) {
39659
+ function keyOf3(node, name, localName15) {
38972
39660
  return node ? Object.keys(node).find((key2) => localName15(key2) === name) : void 0;
38973
39661
  }
38974
39662
  function nodesOf(node, name, localName15) {
38975
- const key2 = keyOf(node, name, localName15);
39663
+ const key2 = keyOf3(node, name, localName15);
38976
39664
  const value = key2 ? node[key2] : void 0;
38977
39665
  const values = Array.isArray(value) ? value : value ? [value] : [];
38978
39666
  return values.filter(
@@ -38996,7 +39684,7 @@ function literalColor(fillNode, localName15, colorParser) {
38996
39684
  return resolved;
38997
39685
  }
38998
39686
  }
38999
- const srgbKey = keyOf(fillNode, "srgbClr", localName15);
39687
+ const srgbKey = keyOf3(fillNode, "srgbClr", localName15);
39000
39688
  const srgb = srgbKey ? fillNode[srgbKey] : void 0;
39001
39689
  const val = srgb?.["@_val"];
39002
39690
  return typeof val === "string" && /^[0-9A-Fa-f]{6}$/u.test(val) ? `#${val.toUpperCase()}` : void 0;
@@ -39006,7 +39694,7 @@ function parseTypedShapeProps(spPrNode, localName15, colorParser) {
39006
39694
  return void 0;
39007
39695
  }
39008
39696
  const result = {};
39009
- const solidFillKey = keyOf(spPrNode, "solidFill", localName15);
39697
+ const solidFillKey = keyOf3(spPrNode, "solidFill", localName15);
39010
39698
  const fillColor = literalColor(
39011
39699
  solidFillKey ? spPrNode[solidFillKey] : void 0,
39012
39700
  localName15,
@@ -39015,10 +39703,10 @@ function parseTypedShapeProps(spPrNode, localName15, colorParser) {
39015
39703
  if (fillColor) {
39016
39704
  result.fillColor = fillColor;
39017
39705
  }
39018
- const lnKey = keyOf(spPrNode, "ln", localName15);
39706
+ const lnKey = keyOf3(spPrNode, "ln", localName15);
39019
39707
  const ln = lnKey ? spPrNode[lnKey] : void 0;
39020
39708
  if (ln) {
39021
- const lnFillKey = keyOf(ln, "solidFill", localName15);
39709
+ const lnFillKey = keyOf3(ln, "solidFill", localName15);
39022
39710
  const strokeColor = literalColor(
39023
39711
  lnFillKey ? ln[lnFillKey] : void 0,
39024
39712
  localName15,
@@ -39031,7 +39719,7 @@ function parseTypedShapeProps(spPrNode, localName15, colorParser) {
39031
39719
  if (w !== void 0) {
39032
39720
  result.strokeWidth = w / 12700;
39033
39721
  }
39034
- const dashKey = keyOf(ln, "prstDash", localName15);
39722
+ const dashKey = keyOf3(ln, "prstDash", localName15);
39035
39723
  const dash = dashKey ? ln[dashKey]?.["@_val"] : void 0;
39036
39724
  if (dash !== void 0 && dash !== null && String(dash).length > 0) {
39037
39725
  result.strokeDashStyle = String(dash);
@@ -39043,20 +39731,20 @@ function parseTypedMarker(markerNode, localName15, colorParser) {
39043
39731
  if (!markerNode) {
39044
39732
  return void 0;
39045
39733
  }
39046
- const symbolKey = keyOf(markerNode, "symbol", localName15);
39734
+ const symbolKey = keyOf3(markerNode, "symbol", localName15);
39047
39735
  const symbolNode = symbolKey ? markerNode[symbolKey] : void 0;
39048
39736
  const rawSymbol = String(symbolNode?.["@_val"] ?? "").trim();
39049
39737
  if (!MARKER_SYMBOLS2.has(rawSymbol)) {
39050
39738
  return void 0;
39051
39739
  }
39052
39740
  const marker = { symbol: rawSymbol };
39053
- const sizeKey = keyOf(markerNode, "size", localName15);
39741
+ const sizeKey = keyOf3(markerNode, "size", localName15);
39054
39742
  const sizeNode = sizeKey ? markerNode[sizeKey] : void 0;
39055
39743
  const size = Number(sizeNode?.["@_val"]);
39056
39744
  if (Number.isInteger(size) && size >= 2 && size <= 72) {
39057
39745
  marker.size = size;
39058
39746
  }
39059
- const spPrKey = keyOf(markerNode, "spPr", localName15);
39747
+ const spPrKey = keyOf3(markerNode, "spPr", localName15);
39060
39748
  const spPr = parseTypedShapeProps(
39061
39749
  spPrKey ? markerNode[spPrKey] : void 0,
39062
39750
  localName15,
@@ -39101,7 +39789,7 @@ function parseTypedTextStyle(txPrNode, localName15, colorParser) {
39101
39789
  return Object.keys(style).length > 0 ? style : void 0;
39102
39790
  }
39103
39791
  function resolveSpPrOverride(node, value, localName15, colorParser) {
39104
- const existingKey = keyOf(node, "spPr", localName15);
39792
+ const existingKey = keyOf3(node, "spPr", localName15);
39105
39793
  const existing = existingKey ? node[existingKey] : void 0;
39106
39794
  if (value.shapeProperties && JSON.stringify(parseTypedShapeProps(existing, localName15, colorParser)) !== JSON.stringify(value.shapeProperties)) {
39107
39795
  return writeChartShapeProps(
@@ -39114,7 +39802,7 @@ function resolveSpPrOverride(node, value, localName15, colorParser) {
39114
39802
  return value.shapePropertiesXml;
39115
39803
  }
39116
39804
  function resolveTxPrOverride(node, value, localName15, colorParser) {
39117
- const existingKey = keyOf(node, "txPr", localName15);
39805
+ const existingKey = keyOf3(node, "txPr", localName15);
39118
39806
  const existing = existingKey ? node[existingKey] : void 0;
39119
39807
  if (value.textStyle && JSON.stringify(parseTypedTextStyle(existing, localName15, colorParser)) !== JSON.stringify(value.textStyle)) {
39120
39808
  const authoredDefRPr = existing ? resolveDefRPr(existing, localName15) : void 0;
@@ -39127,7 +39815,7 @@ function resolveTxPrOverride(node, value, localName15, colorParser) {
39127
39815
  return value.txPrXml;
39128
39816
  }
39129
39817
  function resolveMarkerOverride(node, value, localName15, colorParser) {
39130
- const existingKey = keyOf(node, "marker", localName15);
39818
+ const existingKey = keyOf3(node, "marker", localName15);
39131
39819
  const existing = existingKey ? node[existingKey] : void 0;
39132
39820
  if (value.marker && JSON.stringify(parseTypedMarker(existing, localName15, colorParser)) !== JSON.stringify(value.marker)) {
39133
39821
  return buildChartMarkerXml(
@@ -39148,12 +39836,12 @@ function prefixOf2(key2) {
39148
39836
  return key2?.includes(":") ? key2.slice(0, key2.lastIndexOf(":")) : "";
39149
39837
  }
39150
39838
  function cloneChild(node, name, localName15) {
39151
- const key2 = keyOf(node, name, localName15);
39839
+ const key2 = keyOf3(node, name, localName15);
39152
39840
  const value = key2 ? node[key2] : void 0;
39153
39841
  return value && typeof value === "object" && !Array.isArray(value) ? cloneXmlObject(value) : void 0;
39154
39842
  }
39155
39843
  function parseChartPivotFormats(chart, localName15, colorParser) {
39156
- const rootKey = keyOf(chart, "pivotFmts", localName15);
39844
+ const rootKey = keyOf3(chart, "pivotFmts", localName15);
39157
39845
  const value = rootKey ? chart?.[rootKey] : void 0;
39158
39846
  if (!value || typeof value !== "object" || Array.isArray(value)) {
39159
39847
  return void 0;
@@ -39161,17 +39849,17 @@ function parseChartPivotFormats(chart, localName15, colorParser) {
39161
39849
  const root = value;
39162
39850
  const formats = [];
39163
39851
  for (const node of nodesOf(root, "pivotFmt", localName15)) {
39164
- const idxKey = keyOf(node, "idx", localName15);
39852
+ const idxKey = keyOf3(node, "idx", localName15);
39165
39853
  const idxNode = idxKey ? node[idxKey] : void 0;
39166
39854
  const index = idxNode && typeof idxNode === "object" && !Array.isArray(idxNode) ? unsigned(idxNode["@_val"]) : void 0;
39167
39855
  if (index === void 0) {
39168
39856
  continue;
39169
39857
  }
39170
- const spPrKey = keyOf(node, "spPr", localName15);
39858
+ const spPrKey = keyOf3(node, "spPr", localName15);
39171
39859
  const spPrNode = spPrKey ? node[spPrKey] : void 0;
39172
- const txPrKey = keyOf(node, "txPr", localName15);
39860
+ const txPrKey = keyOf3(node, "txPr", localName15);
39173
39861
  const txPrNode = txPrKey ? node[txPrKey] : void 0;
39174
- const markerKey = keyOf(node, "marker", localName15);
39862
+ const markerKey = keyOf3(node, "marker", localName15);
39175
39863
  const markerNode = markerKey ? node[markerKey] : void 0;
39176
39864
  const shapeProperties2 = parseTypedShapeProps(spPrNode, localName15, colorParser);
39177
39865
  const textStyle = parseTypedTextStyle(txPrNode, localName15, colorParser);
@@ -39195,7 +39883,7 @@ function setChild(node, name, value, prefix, localName15) {
39195
39883
  if (value === void 0) {
39196
39884
  return;
39197
39885
  }
39198
- const key2 = keyOf(node, name, localName15);
39886
+ const key2 = keyOf3(node, name, localName15);
39199
39887
  if (value === null) {
39200
39888
  if (key2) {
39201
39889
  delete node[key2];
@@ -39209,7 +39897,7 @@ function buildFormat(value, prefix, localName15, colorParser) {
39209
39897
  throw new RangeError(`pivotFmt.index must be an integer from 0 through ${MAX_UINT}`);
39210
39898
  }
39211
39899
  const node = cloneXmlObject(value.rawXml) ?? {};
39212
- const idxKey = keyOf(node, "idx", localName15) ?? `${prefix}:idx`;
39900
+ const idxKey = keyOf3(node, "idx", localName15) ?? `${prefix}:idx`;
39213
39901
  const idxValue = node[idxKey];
39214
39902
  const idx = idxValue && typeof idxValue === "object" && !Array.isArray(idxValue) ? idxValue : {};
39215
39903
  idx["@_val"] = String(value.index);
@@ -39242,21 +39930,21 @@ function buildFormat(value, prefix, localName15, colorParser) {
39242
39930
  delete node[key2];
39243
39931
  }
39244
39932
  for (const name of CHILDREN) {
39245
- for (const [key2, child14] of entries) {
39933
+ for (const [key2, child16] of entries) {
39246
39934
  if (localName15(key2) === name) {
39247
- node[key2] = child14;
39935
+ node[key2] = child16;
39248
39936
  }
39249
39937
  }
39250
39938
  }
39251
- for (const [key2, child14] of entries) {
39939
+ for (const [key2, child16] of entries) {
39252
39940
  if (!CHILDREN.includes(localName15(key2))) {
39253
- node[key2] = child14;
39941
+ node[key2] = child16;
39254
39942
  }
39255
39943
  }
39256
39944
  return node;
39257
39945
  }
39258
39946
  function applyChartPivotFormats(chart, value, localName15, colorParser) {
39259
- const rootKey = keyOf(chart, "pivotFmts", localName15);
39947
+ const rootKey = keyOf3(chart, "pivotFmts", localName15);
39260
39948
  if (value === null) {
39261
39949
  if (rootKey) {
39262
39950
  delete chart[rootKey];
@@ -39266,9 +39954,9 @@ function applyChartPivotFormats(chart, value, localName15, colorParser) {
39266
39954
  if (!value.formats.length) {
39267
39955
  throw new RangeError("pivotFormats.formats must not be empty");
39268
39956
  }
39269
- const prefix = prefixOf2(rootKey ?? keyOf(chart, "plotArea", localName15)) || "c";
39957
+ const prefix = prefixOf2(rootKey ?? keyOf3(chart, "plotArea", localName15)) || "c";
39270
39958
  const root = cloneXmlObject(value.rawXml) ?? {};
39271
- const itemKey = keyOf(root, "pivotFmt", localName15) ?? `${prefix}:pivotFmt`;
39959
+ const itemKey = keyOf3(root, "pivotFmt", localName15) ?? `${prefix}:pivotFmt`;
39272
39960
  root[itemKey] = value.formats.map((item) => buildFormat(item, prefix, localName15, colorParser));
39273
39961
  if (rootKey) {
39274
39962
  chart[rootKey] = root;
@@ -39279,12 +39967,12 @@ function applyChartPivotFormats(chart, value, localName15, colorParser) {
39279
39967
  delete chart[key2];
39280
39968
  }
39281
39969
  let inserted = false;
39282
- for (const [key2, child14] of entries) {
39970
+ for (const [key2, child16] of entries) {
39283
39971
  if (!inserted && ROOT_FOLLOWERS.includes(localName15(key2))) {
39284
39972
  chart[`${prefix}:pivotFmts`] = root;
39285
39973
  inserted = true;
39286
39974
  }
39287
- chart[key2] = child14;
39975
+ chart[key2] = child16;
39288
39976
  }
39289
39977
  if (!inserted) {
39290
39978
  chart[`${prefix}:pivotFmts`] = root;
@@ -39301,16 +39989,16 @@ var HEADER_CHILDREN = [
39301
39989
  "firstFooter"
39302
39990
  ];
39303
39991
  var ORIENTATIONS = /* @__PURE__ */ new Set(["default", "portrait", "landscape"]);
39304
- function keyOf2(node, name, localName15) {
39992
+ function keyOf4(node, name, localName15) {
39305
39993
  return node ? Object.keys(node).find((key2) => localName15(key2) === name) : void 0;
39306
39994
  }
39307
- function child4(node, name, localName15) {
39308
- const key2 = keyOf2(node, name, localName15);
39995
+ function child6(node, name, localName15) {
39996
+ const key2 = keyOf4(node, name, localName15);
39309
39997
  const value = key2 ? node?.[key2] : void 0;
39310
39998
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
39311
39999
  }
39312
40000
  function childText(node, name, localName15) {
39313
- const key2 = keyOf2(node, name, localName15);
40001
+ const key2 = keyOf4(node, name, localName15);
39314
40002
  if (!key2) {
39315
40003
  return void 0;
39316
40004
  }
@@ -39416,15 +40104,15 @@ function parsePageSetup(node) {
39416
40104
  return result;
39417
40105
  }
39418
40106
  function parseChartPrintSettings(chartSpace, localName15) {
39419
- const node = child4(chartSpace, "printSettings", localName15);
40107
+ const node = child6(chartSpace, "printSettings", localName15);
39420
40108
  if (!node) {
39421
40109
  return void 0;
39422
40110
  }
39423
- const header = child4(node, "headerFooter", localName15);
39424
- const margins = child4(node, "pageMargins", localName15);
40111
+ const header = child6(node, "headerFooter", localName15);
40112
+ const margins = child6(node, "pageMargins", localName15);
39425
40113
  const parsedMargins = margins ? parseMargins(margins) : void 0;
39426
- const setup = child4(node, "pageSetup", localName15);
39427
- const legacy = child4(node, "legacyDrawingHF", localName15);
40114
+ const setup = child6(node, "pageSetup", localName15);
40115
+ const legacy = child6(node, "legacyDrawingHF", localName15);
39428
40116
  const relationshipId = legacy ? Object.entries(legacy).find(([key2]) => key2.startsWith("@_") && localName15(key2) === "id")?.[1] : void 0;
39429
40117
  return {
39430
40118
  ...header ? { headerFooter: parseHeaderFooter(header, localName15) } : {},
@@ -39446,11 +40134,11 @@ var HEADER_CHILDREN2 = [
39446
40134
  ];
39447
40135
  var PRINT_CHILDREN = ["headerFooter", "pageMargins", "pageSetup", "legacyDrawingHF"];
39448
40136
  var ORIENTATIONS2 = /* @__PURE__ */ new Set(["default", "portrait", "landscape"]);
39449
- function keyOf3(node, name, localName15) {
40137
+ function keyOf5(node, name, localName15) {
39450
40138
  return node ? Object.keys(node).find((key2) => localName15(key2) === name) : void 0;
39451
40139
  }
39452
- function child5(node, name, localName15) {
39453
- const key2 = keyOf3(node, name, localName15);
40140
+ function child7(node, name, localName15) {
40141
+ const key2 = keyOf5(node, name, localName15);
39454
40142
  const value = key2 ? node?.[key2] : void 0;
39455
40143
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
39456
40144
  }
@@ -39489,7 +40177,7 @@ function replaceChildrenInOrder(node, names, localName15) {
39489
40177
  function applyHeaderFooter(existing, value, localName15, prefix) {
39490
40178
  const node = cloneXmlObject(existing) ?? cloneXmlObject(value.rawXml) ?? {};
39491
40179
  for (const name of HEADER_CHILDREN2) {
39492
- const oldKey = keyOf3(node, name, localName15);
40180
+ const oldKey = keyOf5(node, name, localName15);
39493
40181
  if (value[name] === void 0) {
39494
40182
  if (oldKey) {
39495
40183
  delete node[oldKey];
@@ -39544,7 +40232,7 @@ function applyPageSetup(existing, value) {
39544
40232
  return node;
39545
40233
  }
39546
40234
  function setChild2(node, name, value, localName15, prefix) {
39547
- const oldKey = keyOf3(node, name, localName15);
40235
+ const oldKey = keyOf5(node, name, localName15);
39548
40236
  if (value === null) {
39549
40237
  if (oldKey) {
39550
40238
  delete node[oldKey];
@@ -39554,7 +40242,7 @@ function setChild2(node, name, value, localName15, prefix) {
39554
40242
  }
39555
40243
  }
39556
40244
  function applyChartPrintSettings(chartSpace, settings, localName15) {
39557
- const rootKey = keyOf3(chartSpace, "printSettings", localName15);
40245
+ const rootKey = keyOf5(chartSpace, "printSettings", localName15);
39558
40246
  if (settings === null) {
39559
40247
  if (rootKey) {
39560
40248
  delete chartSpace[rootKey];
@@ -39563,13 +40251,13 @@ function applyChartPrintSettings(chartSpace, settings, localName15) {
39563
40251
  }
39564
40252
  const existing = rootKey ? chartSpace[rootKey] : void 0;
39565
40253
  const node = cloneXmlObject(existing) ?? cloneXmlObject(settings.rawXml) ?? {};
39566
- const prefix = prefixOf3(rootKey ?? keyOf3(chartSpace, "chart", localName15)) || "c";
40254
+ const prefix = prefixOf3(rootKey ?? keyOf5(chartSpace, "chart", localName15)) || "c";
39567
40255
  if (settings.headerFooter !== void 0) {
39568
40256
  setChild2(
39569
40257
  node,
39570
40258
  "headerFooter",
39571
40259
  settings.headerFooter === null ? null : applyHeaderFooter(
39572
- child5(node, "headerFooter", localName15),
40260
+ child7(node, "headerFooter", localName15),
39573
40261
  settings.headerFooter,
39574
40262
  localName15,
39575
40263
  prefix
@@ -39582,7 +40270,7 @@ function applyChartPrintSettings(chartSpace, settings, localName15) {
39582
40270
  setChild2(
39583
40271
  node,
39584
40272
  "pageMargins",
39585
- settings.pageMargins === null ? null : applyMargins(child5(node, "pageMargins", localName15), settings.pageMargins),
40273
+ settings.pageMargins === null ? null : applyMargins(child7(node, "pageMargins", localName15), settings.pageMargins),
39586
40274
  localName15,
39587
40275
  prefix
39588
40276
  );
@@ -39591,7 +40279,7 @@ function applyChartPrintSettings(chartSpace, settings, localName15) {
39591
40279
  setChild2(
39592
40280
  node,
39593
40281
  "pageSetup",
39594
- settings.pageSetup === null ? null : applyPageSetup(child5(node, "pageSetup", localName15), settings.pageSetup),
40282
+ settings.pageSetup === null ? null : applyPageSetup(child7(node, "pageSetup", localName15), settings.pageSetup),
39595
40283
  localName15,
39596
40284
  prefix
39597
40285
  );
@@ -39600,7 +40288,7 @@ function applyChartPrintSettings(chartSpace, settings, localName15) {
39600
40288
  if (settings.legacyDrawingHeaderFooterRelationshipId === null) {
39601
40289
  setChild2(node, "legacyDrawingHF", null, localName15, prefix);
39602
40290
  } else {
39603
- const legacy = cloneXmlObject(child5(node, "legacyDrawingHF", localName15)) ?? {};
40291
+ const legacy = cloneXmlObject(child7(node, "legacyDrawingHF", localName15)) ?? {};
39604
40292
  const idKey = Object.keys(legacy).find(
39605
40293
  (key2) => key2.startsWith("@_") && localName15(key2) === "id"
39606
40294
  );
@@ -39636,7 +40324,7 @@ function insertPrintSettings(chartSpace, node, prefix, localName15) {
39636
40324
  // pptx/core/utils/chart-protection.ts
39637
40325
  var CX_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2014/chartex";
39638
40326
  var FIELDS3 = ["chartObject", "data", "formatting", "selection", "userInterface"];
39639
- function keyOf4(node, name, localName15) {
40327
+ function keyOf6(node, name, localName15) {
39640
40328
  return node ? Object.keys(node).find((key2) => localName15(key2) === name) : void 0;
39641
40329
  }
39642
40330
  function prefixOf4(key2) {
@@ -39667,7 +40355,7 @@ function parseChartProtection(chartSpace, localName15) {
39667
40355
  if (chartSpace && isCxChartSpace(chartSpace)) {
39668
40356
  return void 0;
39669
40357
  }
39670
- const protectionKey = keyOf4(chartSpace, "protection", localName15);
40358
+ const protectionKey = keyOf6(chartSpace, "protection", localName15);
39671
40359
  const value = protectionKey ? chartSpace?.[protectionKey] : void 0;
39672
40360
  if (!value || typeof value !== "object" || Array.isArray(value)) {
39673
40361
  return void 0;
@@ -39675,10 +40363,10 @@ function parseChartProtection(chartSpace, localName15) {
39675
40363
  const node = value;
39676
40364
  const result = { rawXml: cloneXmlObject(node) ?? {} };
39677
40365
  for (const field of FIELDS3) {
39678
- const childKey2 = keyOf4(node, field, localName15);
39679
- const child14 = childKey2 ? node[childKey2] : void 0;
39680
- if (child14 && typeof child14 === "object" && !Array.isArray(child14)) {
39681
- const parsed = parseBoolean3(child14);
40366
+ const childKey2 = keyOf6(node, field, localName15);
40367
+ const child16 = childKey2 ? node[childKey2] : void 0;
40368
+ if (child16 && typeof child16 === "object" && !Array.isArray(child16)) {
40369
+ const parsed = parseBoolean3(child16);
39682
40370
  if (parsed !== void 0) {
39683
40371
  result[field] = parsed;
39684
40372
  }
@@ -39692,7 +40380,7 @@ function applyField(node, field, value, prefix, localName15) {
39692
40380
  if (value === void 0) {
39693
40381
  return;
39694
40382
  }
39695
- const existingKey = keyOf4(node, field, localName15);
40383
+ const existingKey = keyOf6(node, field, localName15);
39696
40384
  if (value === null) {
39697
40385
  if (existingKey) {
39698
40386
  delete node[existingKey];
@@ -39707,9 +40395,9 @@ function applyField(node, field, value, prefix, localName15) {
39707
40395
  if (existing && typeof existing === "object" && !Array.isArray(existing) && parseBoolean3(existing) === value) {
39708
40396
  return;
39709
40397
  }
39710
- const child14 = existing && typeof existing === "object" && !Array.isArray(existing) ? existing : {};
39711
- child14["@_val"] = value ? "1" : "0";
39712
- node[key2] = child14;
40398
+ const child16 = existing && typeof existing === "object" && !Array.isArray(existing) ? existing : {};
40399
+ child16["@_val"] = value ? "1" : "0";
40400
+ node[key2] = child16;
39713
40401
  }
39714
40402
  function reorderKnownChildren(node, localName15) {
39715
40403
  const entries = Object.entries(node);
@@ -39729,7 +40417,7 @@ function applyChartProtection(chartSpace, value, localName15) {
39729
40417
  if (isCxChartSpace(chartSpace)) {
39730
40418
  return;
39731
40419
  }
39732
- const protectionKey = keyOf4(chartSpace, "protection", localName15);
40420
+ const protectionKey = keyOf6(chartSpace, "protection", localName15);
39733
40421
  if (value === null) {
39734
40422
  if (protectionKey) {
39735
40423
  delete chartSpace[protectionKey];
@@ -39738,7 +40426,7 @@ function applyChartProtection(chartSpace, value, localName15) {
39738
40426
  }
39739
40427
  const existing = protectionKey ? chartSpace[protectionKey] : void 0;
39740
40428
  const node = value.rawXml !== void 0 ? cloneXmlObject(value.rawXml) ?? {} : existing && typeof existing === "object" && !Array.isArray(existing) ? existing : {};
39741
- const chartKey = keyOf4(chartSpace, "chart", localName15);
40429
+ const chartKey = keyOf6(chartSpace, "chart", localName15);
39742
40430
  const prefix = prefixOf4(protectionKey ?? chartKey) || "c";
39743
40431
  for (const field of FIELDS3) {
39744
40432
  applyField(node, field, value[field], prefix, localName15);
@@ -39753,12 +40441,12 @@ function applyChartProtection(chartSpace, value, localName15) {
39753
40441
  delete chartSpace[key2];
39754
40442
  }
39755
40443
  let inserted = false;
39756
- for (const [key2, child14] of entries) {
40444
+ for (const [key2, child16] of entries) {
39757
40445
  if (!inserted && localName15(key2) === "chart") {
39758
40446
  chartSpace[qualified2(prefix, "protection")] = node;
39759
40447
  inserted = true;
39760
40448
  }
39761
- chartSpace[key2] = child14;
40449
+ chartSpace[key2] = child16;
39762
40450
  }
39763
40451
  if (!inserted) {
39764
40452
  chartSpace[qualified2(prefix, "protection")] = node;
@@ -39841,7 +40529,7 @@ function parseChartStyleDefinition(styleRoot, xmlLookup, resolveSchemeColor, par
39841
40529
  // pptx/core/utils/chart-pivot-source.ts
39842
40530
  var MAX_UINT2 = 4294967295;
39843
40531
  var CHILDREN2 = ["name", "fmtId", "extLst"];
39844
- function keyOf5(node, name, localName15) {
40532
+ function keyOf7(node, name, localName15) {
39845
40533
  return node ? Object.keys(node).find((key2) => localName15(key2) === name) : void 0;
39846
40534
  }
39847
40535
  function prefixOf5(key2) {
@@ -39865,14 +40553,14 @@ function parseUnsigned(value) {
39865
40553
  return Number.isSafeInteger(parsed) && parsed <= MAX_UINT2 ? parsed : void 0;
39866
40554
  }
39867
40555
  function parseChartPivotSource(chartSpace, localName15) {
39868
- const rootKey = keyOf5(chartSpace, "pivotSource", localName15);
40556
+ const rootKey = keyOf7(chartSpace, "pivotSource", localName15);
39869
40557
  const value = rootKey ? chartSpace?.[rootKey] : void 0;
39870
40558
  if (!value || typeof value !== "object" || Array.isArray(value)) {
39871
40559
  return void 0;
39872
40560
  }
39873
40561
  const node = value;
39874
- const nameKey = keyOf5(node, "name", localName15);
39875
- const fmtKey = keyOf5(node, "fmtId", localName15);
40562
+ const nameKey = keyOf7(node, "name", localName15);
40563
+ const fmtKey = keyOf7(node, "fmtId", localName15);
39876
40564
  const name = nameKey ? textOf(node[nameKey]) : void 0;
39877
40565
  const fmtNode = fmtKey ? node[fmtKey] : void 0;
39878
40566
  const formatId = fmtNode && typeof fmtNode === "object" && !Array.isArray(fmtNode) ? parseUnsigned(fmtNode["@_val"]) : void 0;
@@ -39896,7 +40584,7 @@ function reorder(node, localName15) {
39896
40584
  }
39897
40585
  }
39898
40586
  function applyChartPivotSource(chartSpace, value, localName15) {
39899
- const rootKey = keyOf5(chartSpace, "pivotSource", localName15);
40587
+ const rootKey = keyOf7(chartSpace, "pivotSource", localName15);
39900
40588
  if (value === null) {
39901
40589
  if (rootKey) {
39902
40590
  delete chartSpace[rootKey];
@@ -39908,9 +40596,9 @@ function applyChartPivotSource(chartSpace, value, localName15) {
39908
40596
  }
39909
40597
  const existing = rootKey ? chartSpace[rootKey] : void 0;
39910
40598
  const node = value.rawXml ? cloneXmlObject(value.rawXml) ?? {} : existing && typeof existing === "object" && !Array.isArray(existing) ? existing : {};
39911
- const chartKey = keyOf5(chartSpace, "chart", localName15);
40599
+ const chartKey = keyOf7(chartSpace, "chart", localName15);
39912
40600
  const prefix = prefixOf5(rootKey ?? chartKey) || "c";
39913
- const nameKey = keyOf5(node, "name", localName15) ?? `${prefix}:name`;
40601
+ const nameKey = keyOf7(node, "name", localName15) ?? `${prefix}:name`;
39914
40602
  const nameNode = node[nameKey];
39915
40603
  if (textOf(nameNode) !== value.name) {
39916
40604
  if (nameNode && typeof nameNode === "object" && !Array.isArray(nameNode)) {
@@ -39919,7 +40607,7 @@ function applyChartPivotSource(chartSpace, value, localName15) {
39919
40607
  node[nameKey] = { "#text": value.name };
39920
40608
  }
39921
40609
  }
39922
- const fmtKey = keyOf5(node, "fmtId", localName15) ?? `${prefix}:fmtId`;
40610
+ const fmtKey = keyOf7(node, "fmtId", localName15) ?? `${prefix}:fmtId`;
39923
40611
  const fmtValue = node[fmtKey];
39924
40612
  const fmtNode = fmtValue && typeof fmtValue === "object" && !Array.isArray(fmtValue) ? fmtValue : {};
39925
40613
  if (parseUnsigned(fmtNode["@_val"]) !== value.formatId) {
@@ -39936,12 +40624,12 @@ function applyChartPivotSource(chartSpace, value, localName15) {
39936
40624
  delete chartSpace[key2];
39937
40625
  }
39938
40626
  let inserted = false;
39939
- for (const [key2, child14] of entries) {
40627
+ for (const [key2, child16] of entries) {
39940
40628
  if (!inserted && ["protection", "chart"].includes(localName15(key2))) {
39941
40629
  chartSpace[`${prefix}:pivotSource`] = node;
39942
40630
  inserted = true;
39943
40631
  }
39944
- chartSpace[key2] = child14;
40632
+ chartSpace[key2] = child16;
39945
40633
  }
39946
40634
  if (!inserted) {
39947
40635
  chartSpace[`${prefix}:pivotSource`] = node;
@@ -39975,10 +40663,10 @@ function extractMultiLevelCategoryValues(categoryContainer, xmlLookup) {
39975
40663
  };
39976
40664
  }
39977
40665
  function expandCategoryLevel(lvlNode, levelIndex, declaredCount, xmlLookup) {
39978
- const points4 = xmlLookup.getChildrenArrayByLocalName(lvlNode, "pt");
40666
+ const points5 = xmlLookup.getChildrenArrayByLocalName(lvlNode, "pt");
39979
40667
  const byIndex = /* @__PURE__ */ new Map();
39980
40668
  let maxIndex = -1;
39981
- for (const point of points4) {
40669
+ for (const point of points5) {
39982
40670
  const index = Number.parseInt(String(point?.["@_idx"] ?? "0"), 10);
39983
40671
  if (!Number.isFinite(index) || index < 0) {
39984
40672
  continue;
@@ -40010,19 +40698,19 @@ function expandCategoryLevel(lvlNode, levelIndex, declaredCount, xmlLookup) {
40010
40698
  }
40011
40699
 
40012
40700
  // pptx/core/utils/smartart-merged-text-label.ts
40013
- function prSetOf(pt, localName15) {
40014
- const key2 = Object.keys(pt).find((candidate) => localName15(candidate) === "prSet");
40015
- const value = key2 ? pt[key2] : void 0;
40701
+ function prSetOf(pt2, localName15) {
40702
+ const key2 = Object.keys(pt2).find((candidate) => localName15(candidate) === "prSet");
40703
+ const value = key2 ? pt2[key2] : void 0;
40016
40704
  return Array.isArray(value) ? value[0] : value;
40017
40705
  }
40018
- function readPresPoints(points4, localName15) {
40706
+ function readPresPoints(points5, localName15) {
40019
40707
  const byId = /* @__PURE__ */ new Map();
40020
- for (const pt of points4) {
40021
- if (!pt || typeof pt !== "object" || String(pt["@_type"] ?? "").trim() !== "pres") {
40708
+ for (const pt2 of points5) {
40709
+ if (!pt2 || typeof pt2 !== "object" || String(pt2["@_type"] ?? "").trim() !== "pres") {
40022
40710
  continue;
40023
40711
  }
40024
- const id = String(pt["@_modelId"] ?? "").trim();
40025
- const prSet = prSetOf(pt, localName15);
40712
+ const id = String(pt2["@_modelId"] ?? "").trim();
40713
+ const prSet = prSetOf(pt2, localName15);
40026
40714
  if (!id || !prSet) {
40027
40715
  continue;
40028
40716
  }
@@ -40049,10 +40737,10 @@ function algorithmByLayoutNodeName(root) {
40049
40737
  }
40050
40738
  return byName;
40051
40739
  }
40052
- function resolveSmartArtMergedTextLabels(points4, connections, layout, localName15) {
40740
+ function resolveSmartArtMergedTextLabels(points5, connections, layout, localName15) {
40053
40741
  const result = /* @__PURE__ */ new Map();
40054
40742
  const algorithms = algorithmByLayoutNodeName(layout?.rootNode);
40055
- const presPoints = readPresPoints(points4, localName15);
40743
+ const presPoints = readPresPoints(points5, localName15);
40056
40744
  if (algorithms.size === 0 || presPoints.size === 0) {
40057
40745
  return result;
40058
40746
  }
@@ -40068,14 +40756,14 @@ function resolveSmartArtMergedTextLabels(points4, connections, layout, localName
40068
40756
  }
40069
40757
  }
40070
40758
  for (const siblingIds of childrenByParent.values()) {
40071
- const siblings = siblingIds.map((id) => presPoints.get(id)).filter((pt) => Boolean(pt?.styleLabel && presented.has(pt.id)));
40072
- const texts = siblings.filter((pt) => algorithms.get(pt.name) === "tx");
40759
+ const siblings = siblingIds.map((id) => presPoints.get(id)).filter((pt2) => Boolean(pt2?.styleLabel && presented.has(pt2.id)));
40760
+ const texts = siblings.filter((pt2) => algorithms.get(pt2.name) === "tx");
40073
40761
  for (const shape of siblings) {
40074
40762
  if (algorithms.get(shape.name) === "tx" || result.has(shape.id)) {
40075
40763
  continue;
40076
40764
  }
40077
40765
  const text = texts.find(
40078
- (pt) => pt.assocId === shape.assocId && pt.styleLabel !== shape.styleLabel
40766
+ (pt2) => pt2.assocId === shape.assocId && pt2.styleLabel !== shape.styleLabel
40079
40767
  );
40080
40768
  if (text) {
40081
40769
  result.set(shape.id, {
@@ -40095,13 +40783,13 @@ function smartArtMergedTextColor(label, textFillByLabel) {
40095
40783
  }
40096
40784
  return list[label.styleIndex % list.length];
40097
40785
  }
40098
- function resolveSmartArtMergedTextColors(points4, connections, layout, textFillByLabel, localName15) {
40786
+ function resolveSmartArtMergedTextColors(points5, connections, layout, textFillByLabel, localName15) {
40099
40787
  const colors = /* @__PURE__ */ new Map();
40100
40788
  if (!textFillByLabel) {
40101
40789
  return colors;
40102
40790
  }
40103
40791
  for (const [shapeId, label] of resolveSmartArtMergedTextLabels(
40104
- points4,
40792
+ points5,
40105
40793
  connections,
40106
40794
  layout,
40107
40795
  localName15
@@ -40115,7 +40803,7 @@ function resolveSmartArtMergedTextColors(points4, connections, layout, textFillB
40115
40803
  }
40116
40804
 
40117
40805
  // pptx/core/utils/smartart-node-pres-vars.ts
40118
- function children3(node, name, localName15) {
40806
+ function children4(node, name, localName15) {
40119
40807
  if (!node) {
40120
40808
  return [];
40121
40809
  }
@@ -40146,16 +40834,16 @@ function variablesOf(vars, localName15) {
40146
40834
  }
40147
40835
  return out;
40148
40836
  }
40149
- function resolveSmartArtNodePresVars(points4, localName15) {
40837
+ function resolveSmartArtNodePresVars(points5, localName15) {
40150
40838
  const out = /* @__PURE__ */ new Map();
40151
- for (const pt of points4) {
40152
- if (!pt || typeof pt !== "object" || String(pt["@_type"] ?? "").trim() !== "pres") {
40839
+ for (const pt2 of points5) {
40840
+ if (!pt2 || typeof pt2 !== "object" || String(pt2["@_type"] ?? "").trim() !== "pres") {
40153
40841
  continue;
40154
40842
  }
40155
- const prSet = children3(pt, "prSet", localName15)[0];
40843
+ const prSet = children4(pt2, "prSet", localName15)[0];
40156
40844
  const nodeId = String(prSet?.["@_presAssocID"] ?? "").trim();
40157
40845
  const presName = String(prSet?.["@_presName"] ?? "").trim();
40158
- const vars = children3(prSet, "presLayoutVars", localName15)[0];
40846
+ const vars = children4(prSet, "presLayoutVars", localName15)[0];
40159
40847
  if (!nodeId || !presName || !vars) {
40160
40848
  continue;
40161
40849
  }
@@ -40171,10 +40859,10 @@ function resolveSmartArtNodePresVars(points4, localName15) {
40171
40859
  }
40172
40860
 
40173
40861
  // pptx/core/utils/smartart-point-metadata.ts
40174
- function resolveSmartArtPointMetadata(points4, connections, localName15) {
40175
- const styleRoles = resolveSmartArtNodeStyleRoles(points4, connections, localName15);
40176
- const coherent3DOff = resolveSmartArtNodeCoherent3DOff(points4, connections, localName15);
40177
- const presVars = resolveSmartArtNodePresVars(points4, localName15);
40862
+ function resolveSmartArtPointMetadata(points5, connections, localName15) {
40863
+ const styleRoles = resolveSmartArtNodeStyleRoles(points5, connections, localName15);
40864
+ const coherent3DOff = resolveSmartArtNodeCoherent3DOff(points5, connections, localName15);
40865
+ const presVars = resolveSmartArtNodePresVars(points5, localName15);
40178
40866
  return (pointId) => ({
40179
40867
  styleRole: styleRoles.get(pointId),
40180
40868
  coherent3DOff: coherent3DOff.has(pointId) || void 0,
@@ -40223,10 +40911,10 @@ function getLocalName(qualifiedName2) {
40223
40911
  }
40224
40912
 
40225
40913
  // pptx/core/utils/smartart-connector-labels.ts
40226
- function collectSmartArtTransitionText(points4, collectText) {
40914
+ function collectSmartArtTransitionText(points5, collectText) {
40227
40915
  return collectTransitionText(
40228
- points4.filter((pt) => pt && typeof pt === "object"),
40229
- (pt) => ({ type: String(pt["@_type"] ?? ""), modelId: String(pt["@_modelId"] ?? "") }),
40916
+ points5.filter((pt2) => pt2 && typeof pt2 === "object"),
40917
+ (pt2) => ({ type: String(pt2["@_type"] ?? ""), modelId: String(pt2["@_modelId"] ?? "") }),
40230
40918
  collectText
40231
40919
  );
40232
40920
  }
@@ -40237,11 +40925,11 @@ function simpleTextBody(text) {
40237
40925
  "a:p": { "a:r": { "a:rPr": { "@_lang": "en-US" }, "a:t": text } }
40238
40926
  };
40239
40927
  }
40240
- function setPointText(pt, text, localName15) {
40241
- const tKey = Object.keys(pt).find((key2) => localName15(key2) === "t") ?? "dgm:t";
40242
- const body = pt[tKey];
40928
+ function setPointText(pt2, text, localName15) {
40929
+ const tKey = Object.keys(pt2).find((key2) => localName15(key2) === "t") ?? "dgm:t";
40930
+ const body = pt2[tKey];
40243
40931
  if (!body || typeof body !== "object" || Array.isArray(body)) {
40244
- pt[tKey] = simpleTextBody(text);
40932
+ pt2[tKey] = simpleTextBody(text);
40245
40933
  return;
40246
40934
  }
40247
40935
  const bodyObj = body;
@@ -40262,15 +40950,15 @@ function setPointText(pt, text, localName15) {
40262
40950
  const textKey = Object.keys(runObj).find((key2) => localName15(key2) === "t");
40263
40951
  runObj[textKey ?? "a:t"] = text;
40264
40952
  }
40265
- function applySmartArtConnectorLabels(points4, connections, localName15) {
40953
+ function applySmartArtConnectorLabels(points5, connections, localName15) {
40266
40954
  const pointsById = /* @__PURE__ */ new Map();
40267
- for (const pt of points4) {
40268
- if (!pt || typeof pt !== "object") {
40955
+ for (const pt2 of points5) {
40956
+ if (!pt2 || typeof pt2 !== "object") {
40269
40957
  continue;
40270
40958
  }
40271
- const id = String(pt["@_modelId"] ?? "").trim();
40959
+ const id = String(pt2["@_modelId"] ?? "").trim();
40272
40960
  if (id) {
40273
- pointsById.set(id, pt);
40961
+ pointsById.set(id, pt2);
40274
40962
  }
40275
40963
  }
40276
40964
  for (const connection of connections) {
@@ -40555,7 +41243,7 @@ function applyCommentMentions(node, mentions, extension, replace) {
40555
41243
 
40556
41244
  // pptx/core/utils/modern-comment-text-body.ts
40557
41245
  var localName4 = (key2) => key2.split(":").pop() || key2;
40558
- var keyOf6 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
41246
+ var keyOf8 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
40559
41247
  var asNodes = (value) => {
40560
41248
  if (Array.isArray(value)) {
40561
41249
  return value;
@@ -40563,7 +41251,7 @@ var asNodes = (value) => {
40563
41251
  return value && typeof value === "object" ? [value] : [];
40564
41252
  };
40565
41253
  var runText = (run) => {
40566
- const textKey = keyOf6(run, "t");
41254
+ const textKey = keyOf8(run, "t");
40567
41255
  if (!textKey) {
40568
41256
  return void 0;
40569
41257
  }
@@ -40574,7 +41262,7 @@ function flattenBodyText(node) {
40574
41262
  if (!node) {
40575
41263
  return [];
40576
41264
  }
40577
- const paragraphKey = keyOf6(node, "p");
41265
+ const paragraphKey = keyOf8(node, "p");
40578
41266
  const paragraphs = paragraphKey ? asNodes(node[paragraphKey]) : [];
40579
41267
  const collect = (value) => {
40580
41268
  if (typeof value === "string" || typeof value === "number") {
@@ -40582,9 +41270,9 @@ function flattenBodyText(node) {
40582
41270
  }
40583
41271
  let text = "";
40584
41272
  for (const entry2 of asNodes(value)) {
40585
- for (const [key2, child14] of Object.entries(entry2)) {
41273
+ for (const [key2, child16] of Object.entries(entry2)) {
40586
41274
  if (!key2.startsWith("@_")) {
40587
- text += collect(child14);
41275
+ text += collect(child16);
40588
41276
  }
40589
41277
  }
40590
41278
  }
@@ -40608,19 +41296,19 @@ var commonSuffixLength2 = (a, b, limit) => {
40608
41296
  return index;
40609
41297
  };
40610
41298
  var bareRun = (template, text) => {
40611
- const properties = template ? keyOf6(template, "rPr") : void 0;
41299
+ const properties = template ? keyOf8(template, "rPr") : void 0;
40612
41300
  return {
40613
41301
  "a:rPr": properties && template ? template[properties] : {},
40614
41302
  "a:t": text
40615
41303
  };
40616
41304
  };
40617
41305
  var flattenRuns = (paragraph) => {
40618
- const runKey = keyOf6(paragraph, "r");
41306
+ const runKey = keyOf8(paragraph, "r");
40619
41307
  const runs = runKey ? asNodes(paragraph[runKey]) : [];
40620
41308
  return runs.map((run) => runText(run) ?? "").join("");
40621
41309
  };
40622
41310
  function spliceParagraph(paragraph, line) {
40623
- const runKey = keyOf6(paragraph, "r");
41311
+ const runKey = keyOf8(paragraph, "r");
40624
41312
  const runs = runKey ? asNodes(paragraph[runKey]) : [];
40625
41313
  const texts = runs.map(runText);
40626
41314
  if (texts.some((text) => text === void 0)) {
@@ -40660,7 +41348,7 @@ function spliceParagraph(paragraph, line) {
40660
41348
  if (next.length === 0) {
40661
41349
  continue;
40662
41350
  }
40663
- const textKey = keyOf6(runs[index], "t") ?? "a:t";
41351
+ const textKey = keyOf8(runs[index], "t") ?? "a:t";
40664
41352
  const nextRun = { ...runs[index] };
40665
41353
  nextRun[textKey] = next;
40666
41354
  rebuilt.push(nextRun);
@@ -40673,7 +41361,7 @@ function spliceParagraph(paragraph, line) {
40673
41361
  return result;
40674
41362
  }
40675
41363
  var plainParagraph = (template, line) => {
40676
- const runKey = template ? keyOf6(template, "r") : void 0;
41364
+ const runKey = template ? keyOf8(template, "r") : void 0;
40677
41365
  const templateRun = template && runKey ? asNodes(template[runKey])[0] : void 0;
40678
41366
  return { "a:r": bareRun(templateRun, line) };
40679
41367
  };
@@ -40686,7 +41374,7 @@ function applyModernCommentText(original, text) {
40686
41374
  if (!original) {
40687
41375
  return plainBody(text);
40688
41376
  }
40689
- const paragraphKey = keyOf6(original, "p");
41377
+ const paragraphKey = keyOf8(original, "p");
40690
41378
  const paragraphs = paragraphKey ? asNodes(original[paragraphKey]) : [];
40691
41379
  if (paragraphs.length === 0) {
40692
41380
  return plainBody(text);
@@ -40713,7 +41401,7 @@ function applyModernCommentText(original, text) {
40713
41401
 
40714
41402
  // pptx/core/utils/modern-comment-xml.ts
40715
41403
  var localName5 = (key2) => key2.split(":").pop() || key2;
40716
- var child6 = (node, name) => {
41404
+ var child8 = (node, name) => {
40717
41405
  if (!node) {
40718
41406
  return void 0;
40719
41407
  }
@@ -40721,7 +41409,7 @@ var child6 = (node, name) => {
40721
41409
  const value = key2 ? node[key2] : void 0;
40722
41410
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
40723
41411
  };
40724
- var children4 = (node, name) => {
41412
+ var children5 = (node, name) => {
40725
41413
  if (!node) {
40726
41414
  return [];
40727
41415
  }
@@ -40749,11 +41437,11 @@ var textValues = (node) => {
40749
41437
  return result;
40750
41438
  };
40751
41439
  var extractModernCommentText = (node) => {
40752
- const body = child6(node, "txBody");
41440
+ const body = child8(node, "txBody");
40753
41441
  if (!body) {
40754
41442
  return "";
40755
41443
  }
40756
- const paragraphs = children4(body, "p");
41444
+ const paragraphs = children5(body, "p");
40757
41445
  return (paragraphs.length > 0 ? paragraphs : [body]).map((paragraph) => textValues(paragraph).join("")).join("\n");
40758
41446
  };
40759
41447
  var stringList = (value) => {
@@ -40772,8 +41460,8 @@ var parseComment = (node, authorName, emuPerPx) => {
40772
41460
  const authorId = String(node["@_authorId"] || "").trim();
40773
41461
  const rawStatus = String(node["@_status"] || "").trim().toLowerCase();
40774
41462
  const effectiveStatus = rawStatus || "active";
40775
- const position2 = child6(node, "pos");
40776
- const replies = children4(child6(node, "replyLst"), "reply").map(
41463
+ const position2 = child8(node, "pos");
41464
+ const replies = children5(child8(node, "replyLst"), "reply").map(
40777
41465
  (reply) => parseComment(reply, authorName, emuPerPx)
40778
41466
  );
40779
41467
  return {
@@ -40801,17 +41489,17 @@ var parseComment = (node, authorName, emuPerPx) => {
40801
41489
  };
40802
41490
  };
40803
41491
  function parseModernCommentPart(data, part, authorName, emuPerPx) {
40804
- const root = child6(data, "cmLst");
41492
+ const root = child8(data, "cmLst");
40805
41493
  return {
40806
- comments: children4(root, "cm").map((node) => parseComment(node, authorName, emuPerPx)),
41494
+ comments: children5(root, "cm").map((node) => parseComment(node, authorName, emuPerPx)),
40807
41495
  part: { ...part, rawXml: root }
40808
41496
  };
40809
41497
  }
40810
41498
  function parseModernAuthors(data) {
40811
- const root = child6(data, "authorLst");
41499
+ const root = child8(data, "authorLst");
40812
41500
  return {
40813
41501
  root,
40814
- authors: children4(root, "author").map((node) => ({
41502
+ authors: children5(root, "author").map((node) => ({
40815
41503
  id: String(node["@_id"] || "").trim(),
40816
41504
  name: String(node["@_name"] || "").trim(),
40817
41505
  initials: String(node["@_initials"] || "").trim() || void 0,
@@ -40900,11 +41588,11 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
40900
41588
  )
40901
41589
  };
40902
41590
  }
40903
- const originalBody = child6(raw, "txBody");
41591
+ const originalBody = child8(raw, "txBody");
40904
41592
  node["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
40905
41593
  const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
40906
41594
  const mentions = rebaseCommentMentions(comment.mentions, originalText, comment.text);
40907
- const extension = applyCommentMentions(node, mentions, child6(raw, "extLst"), ownsMentions);
41595
+ const extension = applyCommentMentions(node, mentions, child8(raw, "extLst"), ownsMentions);
40908
41596
  if (extension) {
40909
41597
  node["p188:extLst"] = extension;
40910
41598
  }
@@ -41168,7 +41856,7 @@ function parseEmuInt(value) {
41168
41856
  function attr2(node, name) {
41169
41857
  return node && typeof node === "object" ? node[name] : void 0;
41170
41858
  }
41171
- function child7(node, name) {
41859
+ function child9(node, name) {
41172
41860
  return node && typeof node === "object" ? node[name] : void 0;
41173
41861
  }
41174
41862
  function parseBooleanAttr(value) {
@@ -41184,28 +41872,28 @@ function readGroupTransform(xfrm, emuPerPx) {
41184
41872
  let flipHorizontal = false;
41185
41873
  let flipVertical = false;
41186
41874
  if (xfrm) {
41187
- const off = child7(xfrm, "a:off");
41875
+ const off = child9(xfrm, "a:off");
41188
41876
  if (off) {
41189
41877
  parentXEmu = parseEmuInt(attr2(off, "@_x"));
41190
41878
  parentYEmu = parseEmuInt(attr2(off, "@_y"));
41191
41879
  parentX = parentXEmu / emuPerPx;
41192
41880
  parentY = parentYEmu / emuPerPx;
41193
41881
  }
41194
- const ext = child7(xfrm, "a:ext");
41882
+ const ext = child9(xfrm, "a:ext");
41195
41883
  if (ext) {
41196
41884
  parentWEmu = parseEmuInt(attr2(ext, "@_cx"));
41197
41885
  parentHEmu = parseEmuInt(attr2(ext, "@_cy"));
41198
41886
  parentW = parentWEmu / emuPerPx;
41199
41887
  parentH = parentHEmu / emuPerPx;
41200
41888
  }
41201
- const chOff = child7(xfrm, "a:chOff");
41889
+ const chOff = child9(xfrm, "a:chOff");
41202
41890
  if (chOff) {
41203
41891
  chOffXEmu = parseEmuInt(attr2(chOff, "@_x"));
41204
41892
  chOffYEmu = parseEmuInt(attr2(chOff, "@_y"));
41205
41893
  chX = chOffXEmu / emuPerPx;
41206
41894
  chY = chOffYEmu / emuPerPx;
41207
41895
  }
41208
- const chExt = child7(xfrm, "a:chExt");
41896
+ const chExt = child9(xfrm, "a:chExt");
41209
41897
  if (chExt) {
41210
41898
  chExtWEmu = parseEmuInt(attr2(chExt, "@_cx"));
41211
41899
  chExtHEmu = parseEmuInt(attr2(chExt, "@_cy"));
@@ -41309,34 +41997,34 @@ function applyRawChildGeometry(el, childNode, emuPerPx) {
41309
41997
  el.heightEmu = heightEmu;
41310
41998
  }
41311
41999
  }
41312
- function applyAncestorGroupTextTransform(children5, groupTransform) {
41313
- for (const child14 of children5) {
41314
- if (child14.type === "group") {
41315
- applyAncestorGroupTextTransform(child14.children, groupTransform);
42000
+ function applyAncestorGroupTextTransform(children6, groupTransform) {
42001
+ for (const child16 of children6) {
42002
+ if (child16.type === "group") {
42003
+ applyAncestorGroupTextTransform(child16.children, groupTransform);
41316
42004
  continue;
41317
42005
  }
41318
- if (!hasTextProperties(child14)) {
42006
+ if (!hasTextProperties(child16)) {
41319
42007
  continue;
41320
42008
  }
41321
- const existing = child14.textStyle?.ancestorGroupTransform;
42009
+ const existing = child16.textStyle?.ancestorGroupTransform;
41322
42010
  const nestedTransform = isTextOrientationMatrix(existing) ? existing : TEXT_ORIENTATION_IDENTITY;
41323
- child14.textStyle = {
41324
- ...child14.textStyle,
42011
+ child16.textStyle = {
42012
+ ...child16.textStyle,
41325
42013
  ancestorGroupTransform: multiplyTextOrientationMatrices(groupTransform, nestedTransform)
41326
42014
  };
41327
42015
  }
41328
42016
  }
41329
- function applyGroupFillInheritance(children5, fill) {
41330
- for (const child14 of children5) {
41331
- if (child14.type === "group") {
41332
- if (!child14.groupFill || child14.groupFill.fillMode === "group") {
41333
- applyGroupFillInheritance(child14.children, fill);
42017
+ function applyGroupFillInheritance(children6, fill) {
42018
+ for (const child16 of children6) {
42019
+ if (child16.type === "group") {
42020
+ if (!child16.groupFill || child16.groupFill.fillMode === "group") {
42021
+ applyGroupFillInheritance(child16.children, fill);
41334
42022
  }
41335
42023
  continue;
41336
42024
  }
41337
- if (hasShapeProperties(child14) && child14.shapeStyle?.fillMode === "group") {
41338
- child14.shapeStyle = {
41339
- ...child14.shapeStyle,
42025
+ if (hasShapeProperties(child16) && child16.shapeStyle?.fillMode === "group") {
42026
+ child16.shapeStyle = {
42027
+ ...child16.shapeStyle,
41340
42028
  fillMode: fill.fillMode,
41341
42029
  fillColor: fill.fillColor,
41342
42030
  fillOpacity: fill.fillOpacity,
@@ -41453,7 +42141,7 @@ function scanForText(node, depth) {
41453
42141
  return false;
41454
42142
  }
41455
42143
  if (Array.isArray(node)) {
41456
- return node.some((child14) => scanForText(child14, depth + 1));
42144
+ return node.some((child16) => scanForText(child16, depth + 1));
41457
42145
  }
41458
42146
  if (!isXmlObject4(node)) {
41459
42147
  return false;
@@ -41819,7 +42507,7 @@ var LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl",
41819
42507
  // pptx/core/utils/text-body-scene3d.ts
41820
42508
  var localName6 = (key2) => key2.replace(/^@_/, "").split(":").pop() ?? key2;
41821
42509
  var childKey = (node, local) => Object.keys(node).find((key2) => !key2.startsWith("@_") && localName6(key2) === local);
41822
- var child8 = (node, local) => {
42510
+ var child10 = (node, local) => {
41823
42511
  if (!node) {
41824
42512
  return void 0;
41825
42513
  }
@@ -41843,7 +42531,7 @@ var enumToken = (value, allowed) => {
41843
42531
  return allowed.has(token2) ? token2 : void 0;
41844
42532
  };
41845
42533
  var applyRotation = (target, node, prefix) => {
41846
- const rot = child8(node, "rot");
42534
+ const rot = child10(node, "rot");
41847
42535
  const x = finiteInt(rot?.["@_lat"]);
41848
42536
  const y = finiteInt(rot?.["@_lon"]);
41849
42537
  const z = finiteInt(rot?.["@_rev"]);
@@ -41870,13 +42558,13 @@ var applyPoint = (target, node, prefix, attrPrefix = "") => {
41870
42558
  }
41871
42559
  };
41872
42560
  function parseTextBodyScene3d(bodyPr, style) {
41873
- const scene = child8(bodyPr, "scene3d");
42561
+ const scene = child10(bodyPr, "scene3d");
41874
42562
  if (!scene) {
41875
42563
  return;
41876
42564
  }
41877
42565
  style.textBodyScene3dXml = cloneXmlObject(scene);
41878
- const camera = child8(scene, "camera");
41879
- const light = child8(scene, "lightRig");
42566
+ const camera = child10(scene, "camera");
42567
+ const light = child10(scene, "lightRig");
41880
42568
  const typed = {
41881
42569
  cameraPreset: enumToken(camera?.["@_prst"], CAMERA_PRESETS),
41882
42570
  lightRigType: enumToken(light?.["@_rig"], LIGHT_RIGS),
@@ -41892,12 +42580,12 @@ function parseTextBodyScene3d(bodyPr, style) {
41892
42580
  }
41893
42581
  applyRotation(typed, camera, "camera");
41894
42582
  applyRotation(typed, light, "lightRig");
41895
- const backdrop = child8(scene, "backdrop");
42583
+ const backdrop = child10(scene, "backdrop");
41896
42584
  if (backdrop) {
41897
42585
  typed.hasBackdrop = true;
41898
- applyPoint(typed, child8(backdrop, "anchor"), "backdropAnchor");
41899
- applyPoint(typed, child8(backdrop, "norm"), "backdropNormal", "d");
41900
- applyPoint(typed, child8(backdrop, "up"), "backdropUp", "d");
42586
+ applyPoint(typed, child10(backdrop, "anchor"), "backdropAnchor");
42587
+ applyPoint(typed, child10(backdrop, "norm"), "backdropNormal", "d");
42588
+ applyPoint(typed, child10(backdrop, "up"), "backdropUp", "d");
41901
42589
  }
41902
42590
  style.textBodyScene3d = typed;
41903
42591
  }
@@ -41969,7 +42657,7 @@ function applyTextBodyScene3d(bodyPr, style) {
41969
42657
  return;
41970
42658
  }
41971
42659
  const scene = raw ?? {};
41972
- const camera = cloneXmlObject(child8(scene, "camera")) ?? {};
42660
+ const camera = cloneXmlObject(child10(scene, "camera")) ?? {};
41973
42661
  if (cameraPreset) {
41974
42662
  camera["@_prst"] = cameraPreset;
41975
42663
  }
@@ -41984,7 +42672,7 @@ function applyTextBodyScene3d(bodyPr, style) {
41984
42672
  setChild3(camera, "rot", cameraRot);
41985
42673
  }
41986
42674
  setChild3(scene, "camera", ordered(camera, ["rot"]));
41987
- const light = cloneXmlObject(child8(scene, "lightRig")) ?? {};
42675
+ const light = cloneXmlObject(child10(scene, "lightRig")) ?? {};
41988
42676
  if (lightRig) {
41989
42677
  light["@_rig"] = lightRig;
41990
42678
  }
@@ -41997,7 +42685,7 @@ function applyTextBodyScene3d(bodyPr, style) {
41997
42685
  }
41998
42686
  setChild3(scene, "lightRig", ordered(light, ["rot"]));
41999
42687
  if (typed.hasBackdrop) {
42000
- const backdrop = cloneXmlObject(child8(scene, "backdrop")) ?? {};
42688
+ const backdrop = cloneXmlObject(child10(scene, "backdrop")) ?? {};
42001
42689
  const anchor = anchorXml(typed.backdropAnchorX, typed.backdropAnchorY, typed.backdropAnchorZ);
42002
42690
  const norm = vectorXml(typed.backdropNormalX, typed.backdropNormalY, typed.backdropNormalZ);
42003
42691
  const up = vectorXml(typed.backdropUpX, typed.backdropUpY, typed.backdropUpZ);
@@ -42010,7 +42698,7 @@ function applyTextBodyScene3d(bodyPr, style) {
42010
42698
  if (up) {
42011
42699
  setChild3(backdrop, "up", up);
42012
42700
  }
42013
- if (child8(backdrop, "anchor") && child8(backdrop, "norm") && child8(backdrop, "up")) {
42701
+ if (child10(backdrop, "anchor") && child10(backdrop, "norm") && child10(backdrop, "up")) {
42014
42702
  setChild3(scene, "backdrop", ordered(backdrop, ["anchor", "norm", "up", "extLst"]));
42015
42703
  }
42016
42704
  }
@@ -42354,9 +43042,9 @@ function findChildByLocalName2(parent, name) {
42354
43042
  }
42355
43043
  function setPresentationPropertiesChild(root, name, value) {
42356
43044
  const values = /* @__PURE__ */ new Map();
42357
- for (const [key2, child14] of Object.entries(root)) {
43045
+ for (const [key2, child16] of Object.entries(root)) {
42358
43046
  if (!key2.startsWith("@_")) {
42359
- values.set(localName7(key2), [key2, child14]);
43047
+ values.set(localName7(key2), [key2, child16]);
42360
43048
  }
42361
43049
  }
42362
43050
  if (value === null) {
@@ -42365,9 +43053,9 @@ function setPresentationPropertiesChild(root, name, value) {
42365
43053
  values.set(name, [values.get(name)?.[0] ?? `p:${name}`, value]);
42366
43054
  }
42367
43055
  const result = {};
42368
- for (const [key2, child14] of Object.entries(root)) {
43056
+ for (const [key2, child16] of Object.entries(root)) {
42369
43057
  if (key2.startsWith("@_")) {
42370
- result[key2] = child14;
43058
+ result[key2] = child16;
42371
43059
  }
42372
43060
  }
42373
43061
  for (const orderedName of ROOT_ORDER) {
@@ -42377,8 +43065,8 @@ function setPresentationPropertiesChild(root, name, value) {
42377
43065
  }
42378
43066
  values.delete(orderedName);
42379
43067
  }
42380
- for (const [, [key2, child14]] of values) {
42381
- result[key2] = child14;
43068
+ for (const [, [key2, child16]] of values) {
43069
+ result[key2] = child16;
42382
43070
  }
42383
43071
  return result;
42384
43072
  }
@@ -42449,15 +43137,15 @@ function canonicalizePlaceholderTypes(root) {
42449
43137
  }
42450
43138
  const node = value;
42451
43139
  if (tag === "p:ph" && node["@_type"] !== void 0) {
42452
- const canonical = canonicalPlaceholderType(node["@_type"]);
42453
- if (canonical !== void 0 && canonical !== String(node["@_type"])) {
42454
- node["@_type"] = canonical;
43140
+ const canonical2 = canonicalPlaceholderType(node["@_type"]);
43141
+ if (canonical2 !== void 0 && canonical2 !== String(node["@_type"])) {
43142
+ node["@_type"] = canonical2;
42455
43143
  changed += 1;
42456
43144
  }
42457
43145
  }
42458
- for (const [key2, child14] of Object.entries(node)) {
43146
+ for (const [key2, child16] of Object.entries(node)) {
42459
43147
  if (!key2.startsWith("@_")) {
42460
- visit(child14, key2);
43148
+ visit(child16, key2);
42461
43149
  }
42462
43150
  }
42463
43151
  };
@@ -43223,7 +43911,7 @@ function tableToShapeGroup(tableData, bounds) {
43223
43911
  }
43224
43912
  }
43225
43913
  const rowHeightEmu = bounds.h / Math.max(1, tableData.rows.length);
43226
- const children5 = [];
43914
+ const children6 = [];
43227
43915
  const vMergeActive = new Array(colEmuWidths.length).fill(false);
43228
43916
  tableData.rows.forEach((row, rowIndex) => {
43229
43917
  const y = bounds.y + rowIndex * rowHeightEmu;
@@ -43239,7 +43927,7 @@ function tableToShapeGroup(tableData, bounds) {
43239
43927
  if (!cell.hMerge) {
43240
43928
  const x = colStartX[colIndex] ?? bounds.x;
43241
43929
  const w = colEmuWidths.slice(colIndex, colIndex + span).reduce((s, v) => s + v, 0);
43242
- children5.push({
43930
+ children6.push({
43243
43931
  kind: "shape",
43244
43932
  spt: 1,
43245
43933
  isConnector: false,
@@ -43255,7 +43943,7 @@ function tableToShapeGroup(tableData, bounds) {
43255
43943
  colIndex += span;
43256
43944
  }
43257
43945
  });
43258
- return { kind: "group", anchor: bounds, children: children5 };
43946
+ return { kind: "group", anchor: bounds, children: children6 };
43259
43947
  }
43260
43948
 
43261
43949
  // pptx/core/utils/rendered-bullet-marker.ts
@@ -43487,7 +44175,7 @@ function convertGroup(element, ctx) {
43487
44175
  rotationDeg: element.rotation,
43488
44176
  flipH: element.flipHorizontal,
43489
44177
  flipV: element.flipVertical,
43490
- children: element.children.map((child14) => convertElement(withoutEmuGeometry(child14), ctx)),
44178
+ children: element.children.map((child16) => convertElement(withoutEmuGeometry(child16), ctx)),
43491
44179
  hyperlink: resolveHyperlink(element.actionClick, ctx.hyperlinkCtx)
43492
44180
  };
43493
44181
  }
@@ -44460,8 +45148,8 @@ function buildFontEntityAtom(name, index) {
44460
45148
  return record(RT.FontEntityAtom, data, index, false, 0);
44461
45149
  }
44462
45150
  function buildEnvironmentLeadingRecord() {
44463
- const child14 = record(4050, new Uint8Array([1, 0, 0, 0]), 3, false, 0);
44464
- return record(4040, child14, 2, true);
45151
+ const child16 = record(4050, new Uint8Array([1, 0, 0, 0]), 3, false, 0);
45152
+ return record(4040, child16, 2, true);
44465
45153
  }
44466
45154
  function buildEnvironmentTrailingRecords(otherTextStyle) {
44467
45155
  const unknown0fa4 = record(4004, new Uint8Array([128, 0, 64, 0, 0, 0, 0, 0]), 0, false, 0);
@@ -45571,8 +46259,8 @@ function buildAnyShapeContainer(shape, fonts, allocator, hyperlinks, oleEmbeds,
45571
46259
  }
45572
46260
  function buildGroupContainer(group, fonts, allocator, hyperlinks, oleEmbeds, mediaEmbeds, inGroup = false) {
45573
46261
  const data = new ByteWriter().bytes(buildNestedGroupPatriarch(group, allocator, hyperlinks, inGroup));
45574
- for (const child14 of group.children) {
45575
- data.bytes(buildAnyShapeContainer(child14, fonts, allocator, hyperlinks, oleEmbeds, mediaEmbeds, true));
46262
+ for (const child16 of group.children) {
46263
+ data.bytes(buildAnyShapeContainer(child16, fonts, allocator, hyperlinks, oleEmbeds, mediaEmbeds, true));
45576
46264
  }
45577
46265
  return record(OA.SpgrContainer, data.toBytes(), 0, true);
45578
46266
  }
@@ -45710,9 +46398,9 @@ function* iterateChildren(view, container) {
45710
46398
  yield* iterateRecords(view, container.dataOffset, container.dataOffset + container.recLen);
45711
46399
  }
45712
46400
  function findChild2(view, container, recType, recInstance) {
45713
- for (const child14 of iterateChildren(view, container)) {
45714
- if (child14.recType === recType && (recInstance === void 0 || child14.recInstance === recInstance)) {
45715
- return child14;
46401
+ for (const child16 of iterateChildren(view, container)) {
46402
+ if (child16.recType === recType && (recInstance === void 0 || child16.recInstance === recInstance)) {
46403
+ return child16;
45716
46404
  }
45717
46405
  }
45718
46406
  return void 0;
@@ -45725,12 +46413,12 @@ function findDescendant(view, container, recType, recInstance) {
45725
46413
  stack.pop();
45726
46414
  continue;
45727
46415
  }
45728
- const child14 = next.value;
45729
- if (child14.recType === recType && (recInstance === void 0)) {
45730
- return child14;
46416
+ const child16 = next.value;
46417
+ if (child16.recType === recType && (recInstance === void 0)) {
46418
+ return child16;
45731
46419
  }
45732
- if (isContainer(child14))
45733
- stack.push(iterateChildren(view, child14));
46420
+ if (isContainer(child16))
46421
+ stack.push(iterateChildren(view, child16));
45734
46422
  }
45735
46423
  return void 0;
45736
46424
  }
@@ -45774,9 +46462,9 @@ function parseColorSchemeAtom(view, rec) {
45774
46462
  return colors;
45775
46463
  }
45776
46464
  function findSchemeColors(view, container) {
45777
- for (const child14 of iterateChildren(view, container)) {
45778
- if (child14.recType === RT.ColorSchemeAtom && child14.recInstance === 1) {
45779
- return parseColorSchemeAtom(view, child14);
46465
+ for (const child16 of iterateChildren(view, container)) {
46466
+ if (child16.recType === RT.ColorSchemeAtom && child16.recInstance === 1) {
46467
+ return parseColorSchemeAtom(view, child16);
45780
46468
  }
45781
46469
  }
45782
46470
  return void 0;
@@ -46211,7 +46899,7 @@ function relativiseBody(body, styles) {
46211
46899
  }
46212
46900
  function relativiseShape(shape, styles) {
46213
46901
  if (shape.kind === "group") {
46214
- return { ...shape, children: shape.children.map((child14) => relativiseShape(child14, styles)) };
46902
+ return { ...shape, children: shape.children.map((child16) => relativiseShape(child16, styles)) };
46215
46903
  }
46216
46904
  if (shape.kind === "shape" && shape.text) {
46217
46905
  return { ...shape, text: relativiseBody(shape.text, styles) };
@@ -47237,7 +47925,7 @@ var NS_CX = "http://schemas.microsoft.com/office/drawing/2014/chartex";
47237
47925
  var NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
47238
47926
  var NS_R = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
47239
47927
  var NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
47240
- function points(values) {
47928
+ function points2(values) {
47241
47929
  return values.map((value, index) => ({ "@_idx": String(index), "#text": String(value) }));
47242
47930
  }
47243
47931
  function indexedPoints(values, indices) {
@@ -47277,7 +47965,7 @@ function buildChartExData(chartData, series, id) {
47277
47965
  "@_type": "cat",
47278
47966
  "cx:lvl": categoryLevels.map((level) => ({
47279
47967
  "@_ptCount": String(level.length),
47280
- "cx:pt": chartData.chartType === "regionMap" && level === categoryLevels[0] ? indexedPoints(level, regionOptions?.categorySourceIndices) : points(level)
47968
+ "cx:pt": chartData.chartType === "regionMap" && level === categoryLevels[0] ? indexedPoints(level, regionOptions?.categorySourceIndices) : points2(level)
47281
47969
  }))
47282
47970
  }
47283
47971
  ];
@@ -47631,7 +48319,7 @@ var FLAGS = ["showHorzBorder", "showVertBorder", "showOutline", "showKeys"];
47631
48319
  function findKey6(node, name, localName15) {
47632
48320
  return Object.keys(node).find((key2) => localName15(key2) === name);
47633
48321
  }
47634
- function setOrdered2(node, name, value, order, localName15) {
48322
+ function setOrdered3(node, name, value, order, localName15) {
47635
48323
  const existingKey = findKey6(node, name, localName15);
47636
48324
  if (existingKey) {
47637
48325
  node[existingKey] = value;
@@ -47647,8 +48335,8 @@ function setOrdered2(node, name, value, order, localName15) {
47647
48335
  for (const key2 of Object.keys(node)) {
47648
48336
  delete node[key2];
47649
48337
  }
47650
- for (const [key2, child14] of entries) {
47651
- node[key2] = child14;
48338
+ for (const [key2, child16] of entries) {
48339
+ node[key2] = child16;
47652
48340
  }
47653
48341
  }
47654
48342
  function applyChartDataTable(plotArea, dataTable, localName15, resolveColor2) {
@@ -47668,7 +48356,7 @@ function applyChartDataTable(plotArea, dataTable, localName15, resolveColor2) {
47668
48356
  for (const flag of FLAGS) {
47669
48357
  const value = dataTable[flag];
47670
48358
  if (value !== void 0) {
47671
- setOrdered2(table, flag, { "@_val": value ? "1" : "0" }, TABLE_ORDER, localName15);
48359
+ setOrdered3(table, flag, { "@_val": value ? "1" : "0" }, TABLE_ORDER, localName15);
47672
48360
  }
47673
48361
  }
47674
48362
  if (dataTable.spPr) {
@@ -47679,7 +48367,7 @@ function applyChartDataTable(plotArea, dataTable, localName15, resolveColor2) {
47679
48367
  localName15,
47680
48368
  resolveColor2
47681
48369
  );
47682
- setOrdered2(table, "spPr", spPr, TABLE_ORDER, localName15);
48370
+ setOrdered3(table, "spPr", spPr, TABLE_ORDER, localName15);
47683
48371
  }
47684
48372
  if (dataTable.txPr) {
47685
48373
  const txPrKey = findKey6(table, "txPr", localName15);
@@ -47694,13 +48382,13 @@ function applyChartDataTable(plotArea, dataTable, localName15, resolveColor2) {
47694
48382
  });
47695
48383
  const txPr = buildDefRPrTextProperties(dataTable.txPr, authoredDefRPr, resolveColor2);
47696
48384
  if (txPr) {
47697
- setOrdered2(table, "txPr", txPr, TABLE_ORDER, localName15);
48385
+ setOrdered3(table, "txPr", txPr, TABLE_ORDER, localName15);
47698
48386
  }
47699
48387
  }
47700
48388
  if (tableKey) {
47701
48389
  plotArea[tableKey] = table;
47702
48390
  } else {
47703
- setOrdered2(plotArea, "dTable", table, PLOT_AREA_ORDER, localName15);
48391
+ setOrdered3(plotArea, "dTable", table, PLOT_AREA_ORDER, localName15);
47704
48392
  }
47705
48393
  }
47706
48394
 
@@ -47812,19 +48500,19 @@ function firstNode(value) {
47812
48500
  const item = Array.isArray(value) ? value[0] : value;
47813
48501
  return item && typeof item === "object" ? item : void 0;
47814
48502
  }
47815
- function child9(parent, local, getLocalName2) {
48503
+ function child11(parent, local, getLocalName2) {
47816
48504
  const key2 = findKey(parent, local, getLocalName2);
47817
48505
  return key2 ? firstNode(parent[key2]) : void 0;
47818
48506
  }
47819
48507
  function labelRunProperties(paragraph, getLocalName2) {
47820
48508
  for (const local of ["r", "fld"]) {
47821
- const runNode = child9(paragraph, local, getLocalName2);
47822
- const rPr = runNode ? child9(runNode, "rPr", getLocalName2) : void 0;
48509
+ const runNode = child11(paragraph, local, getLocalName2);
48510
+ const rPr = runNode ? child11(runNode, "rPr", getLocalName2) : void 0;
47823
48511
  if (rPr) {
47824
48512
  return rPr;
47825
48513
  }
47826
48514
  }
47827
- return child9(paragraph, "endParaRPr", getLocalName2);
48515
+ return child11(paragraph, "endParaRPr", getLocalName2);
47828
48516
  }
47829
48517
  function buildDataLabelTx(existingTx, text, getLocalName2) {
47830
48518
  const richKey = existingTx ? findKey(existingTx, "rich", getLocalName2) : void 0;
@@ -47841,9 +48529,9 @@ function buildDataLabelTx(existingTx, text, getLocalName2) {
47841
48529
  }
47842
48530
  const pKey = findKey(rich, "p", getLocalName2) ?? "a:p";
47843
48531
  const paragraph = firstNode(rich[pKey]) ?? {};
47844
- const pPr = child9(paragraph, "pPr", getLocalName2);
48532
+ const pPr = child11(paragraph, "pPr", getLocalName2);
47845
48533
  const rPr = labelRunProperties(paragraph, getLocalName2);
47846
- const endParaRPr = child9(paragraph, "endParaRPr", getLocalName2);
48534
+ const endParaRPr = child11(paragraph, "endParaRPr", getLocalName2);
47847
48535
  const run = rPr ? { "a:rPr": rPr, "a:t": text } : { "a:t": text };
47848
48536
  const newParagraph = {};
47849
48537
  if (pPr) {
@@ -48451,13 +49139,13 @@ function applyChartGroupOptionsToXml(container, containerLocal, chartData, getLo
48451
49139
  }
48452
49140
 
48453
49141
  // pptx/core/utils/chart-area-format.ts
48454
- var FILL_CHOICE = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"]);
49142
+ var FILL_CHOICE2 = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"]);
48455
49143
  var AFTER_LN = /* @__PURE__ */ new Set(["effectLst", "effectDag", "scene3d", "sp3d", "extLst"]);
48456
- var LN_FILL_CHOICE = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "pattFill"]);
49144
+ var LN_FILL_CHOICE2 = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "pattFill"]);
48457
49145
  function findKey11(obj, local, getLocalName2) {
48458
49146
  return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
48459
49147
  }
48460
- function asObject(value) {
49148
+ function asObject2(value) {
48461
49149
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
48462
49150
  }
48463
49151
  function parsePaint(node, getLocalName2, resolveColor2) {
@@ -48467,11 +49155,11 @@ function parsePaint(node, getLocalName2, resolveColor2) {
48467
49155
  if (findKey11(node, "noFill", getLocalName2) !== void 0) {
48468
49156
  return "none";
48469
49157
  }
48470
- const solid = asObject(node[findKey11(node, "solidFill", getLocalName2) ?? ""]);
49158
+ const solid = asObject2(node[findKey11(node, "solidFill", getLocalName2) ?? ""]);
48471
49159
  return solid ? resolveColor2(solid) : void 0;
48472
49160
  }
48473
49161
  function parseChartAreaFormat(owner, getLocalName2, resolveColor2, parseGradient) {
48474
- const spPr = owner ? asObject(owner[findKey11(owner, "spPr", getLocalName2) ?? ""]) : void 0;
49162
+ const spPr = owner ? asObject2(owner[findKey11(owner, "spPr", getLocalName2) ?? ""]) : void 0;
48475
49163
  if (!spPr) {
48476
49164
  return {};
48477
49165
  }
@@ -48484,15 +49172,15 @@ function parseChartAreaFormat(owner, getLocalName2, resolveColor2, parseGradient
48484
49172
  if (gradient) {
48485
49173
  format.gradient = gradient;
48486
49174
  }
48487
- const ln = asObject(spPr[findKey11(spPr, "ln", getLocalName2) ?? ""]);
49175
+ const ln = asObject2(spPr[findKey11(spPr, "ln", getLocalName2) ?? ""]);
48488
49176
  const border = parsePaint(ln, getLocalName2, resolveColor2);
48489
49177
  if (border !== void 0) {
48490
49178
  format.border = border;
48491
49179
  }
48492
49180
  return format;
48493
49181
  }
48494
- function paintXml(paint) {
48495
- return paint === "none" ? { "a:noFill": {} } : { "a:solidFill": { "a:srgbClr": { "@_val": chartColorHex(paint) } } };
49182
+ function paintXml(paint2) {
49183
+ return paint2 === "none" ? { "a:noFill": {} } : { "a:solidFill": { "a:srgbClr": { "@_val": chartColorHex(paint2) } } };
48496
49184
  }
48497
49185
  function buildChartAreaSpPr(format) {
48498
49186
  const spPr = {};
@@ -48533,15 +49221,15 @@ function setPaint(node, entry2, choices, after, getLocalName2) {
48533
49221
  node[key2] = value;
48534
49222
  }
48535
49223
  }
48536
- function paintEntry(paint, authored, getLocalName2, resolveColor2) {
48537
- if (paint === void 0) {
49224
+ function paintEntry(paint2, authored, getLocalName2, resolveColor2) {
49225
+ if (paint2 === void 0) {
48538
49226
  return void 0;
48539
49227
  }
48540
- if (paint === "none") {
49228
+ if (paint2 === "none") {
48541
49229
  return ["a:noFill", {}];
48542
49230
  }
48543
- const solid = asObject(authored[findKey11(authored, "solidFill", getLocalName2) ?? ""]);
48544
- return ["a:solidFill", chartColorChoiceValue(solid, paint, resolveColor2)];
49231
+ const solid = asObject2(authored[findKey11(authored, "solidFill", getLocalName2) ?? ""]);
49232
+ return ["a:solidFill", chartColorChoiceValue(solid, paint2, resolveColor2)];
48545
49233
  }
48546
49234
  function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
48547
49235
  const authored = parseChartAreaFormat(
@@ -48555,7 +49243,7 @@ function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
48555
49243
  if (!fillChanged && !borderChanged) {
48556
49244
  return false;
48557
49245
  }
48558
- let spPr = asObject(owner[findKey11(owner, "spPr", getLocalName2) ?? ""]);
49246
+ let spPr = asObject2(owner[findKey11(owner, "spPr", getLocalName2) ?? ""]);
48559
49247
  if (!spPr) {
48560
49248
  spPr = {};
48561
49249
  options.insertSpPr(owner, spPr);
@@ -48565,17 +49253,17 @@ function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
48565
49253
  applyChartGradientToSpPr(spPr, format.gradient, getLocalName2, options);
48566
49254
  } else {
48567
49255
  const entry2 = paintEntry(format.fill, spPr, getLocalName2, options.resolveColor);
48568
- setPaint(spPr, entry2, FILL_CHOICE, /* @__PURE__ */ new Set(["ln", ...AFTER_LN]), getLocalName2);
49256
+ setPaint(spPr, entry2, FILL_CHOICE2, /* @__PURE__ */ new Set(["ln", ...AFTER_LN]), getLocalName2);
48569
49257
  }
48570
49258
  }
48571
49259
  if (borderChanged) {
48572
49260
  const lnKey = findKey11(spPr, "ln", getLocalName2);
48573
- const ln = asObject(lnKey ? spPr[lnKey] : void 0) ?? {};
49261
+ const ln = asObject2(lnKey ? spPr[lnKey] : void 0) ?? {};
48574
49262
  const entry2 = paintEntry(format.border, ln, getLocalName2, options.resolveColor);
48575
49263
  setPaint(
48576
49264
  ln,
48577
49265
  entry2,
48578
- LN_FILL_CHOICE,
49266
+ LN_FILL_CHOICE2,
48579
49267
  /* @__PURE__ */ new Set(["prstDash", "custDash", "round", "bevel", "miter", "headEnd", "tailEnd", "extLst"]),
48580
49268
  getLocalName2
48581
49269
  );
@@ -48630,8 +49318,8 @@ function insertBefore(node, key2, value, after, getLocalName2) {
48630
49318
  for (const candidate of Object.keys(node)) {
48631
49319
  delete node[candidate];
48632
49320
  }
48633
- for (const [candidate, child14] of entries) {
48634
- node[candidate] = child14;
49321
+ for (const [candidate, child16] of entries) {
49322
+ node[candidate] = child16;
48635
49323
  }
48636
49324
  }
48637
49325
  function chartAreaFormatOf(chartData) {
@@ -48930,7 +49618,7 @@ var CAT_AX_ID = 111111111;
48930
49618
  var VAL_AX_ID = 222222222;
48931
49619
  var SER_AX_ID = 333333333;
48932
49620
  var SCATTER_LIKE = /* @__PURE__ */ new Set(["scatter", "bubble"]);
48933
- function points2(values) {
49621
+ function points3(values) {
48934
49622
  return values.map((v, i) => ({ "@_idx": String(i), "c:v": v }));
48935
49623
  }
48936
49624
  function numLit2(values, formatCode2 = "General") {
@@ -48938,7 +49626,7 @@ function numLit2(values, formatCode2 = "General") {
48938
49626
  "c:numLit": {
48939
49627
  "c:formatCode": formatCode2,
48940
49628
  "c:ptCount": { "@_val": String(values.length) },
48941
- "c:pt": points2(values.map(String))
49629
+ "c:pt": points3(values.map(String))
48942
49630
  }
48943
49631
  };
48944
49632
  }
@@ -48946,7 +49634,7 @@ function strLit(values) {
48946
49634
  return {
48947
49635
  "c:strLit": {
48948
49636
  "c:ptCount": { "@_val": String(values.length) },
48949
- "c:pt": points2(values)
49637
+ "c:pt": points3(values)
48950
49638
  }
48951
49639
  };
48952
49640
  }
@@ -50072,7 +50760,7 @@ function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveCo
50072
50760
  }
50073
50761
 
50074
50762
  // pptx/core/utils/chart-color-map-override.ts
50075
- function keyOf7(node, name, localName15) {
50763
+ function keyOf9(node, name, localName15) {
50076
50764
  return Object.keys(node).find((key2) => localName15(key2) === name);
50077
50765
  }
50078
50766
  function prefixOf6(key2) {
@@ -50086,7 +50774,7 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
50086
50774
  if (value === void 0) {
50087
50775
  return;
50088
50776
  }
50089
- const existingKey = keyOf7(chartSpace, "clrMapOvr", localName15);
50777
+ const existingKey = keyOf9(chartSpace, "clrMapOvr", localName15);
50090
50778
  if (value === null || Object.keys(value).length === 0) {
50091
50779
  if (existingKey) {
50092
50780
  delete chartSpace[existingKey];
@@ -50101,19 +50789,19 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
50101
50789
  chartSpace[existingKey] = node;
50102
50790
  return;
50103
50791
  }
50104
- const chartKey = keyOf7(chartSpace, "chart", localName15);
50792
+ const chartKey = keyOf9(chartSpace, "chart", localName15);
50105
50793
  const prefix = prefixOf6(chartKey);
50106
50794
  const entries = Object.entries(chartSpace);
50107
50795
  for (const key2 of Object.keys(chartSpace)) {
50108
50796
  delete chartSpace[key2];
50109
50797
  }
50110
50798
  let inserted = false;
50111
- for (const [key2, child14] of entries) {
50799
+ for (const [key2, child16] of entries) {
50112
50800
  if (!inserted && localName15(key2) === "chart") {
50113
50801
  chartSpace[`${prefix}:clrMapOvr`] = node;
50114
50802
  inserted = true;
50115
50803
  }
50116
- chartSpace[key2] = child14;
50804
+ chartSpace[key2] = child16;
50117
50805
  }
50118
50806
  if (!inserted) {
50119
50807
  chartSpace[`${prefix}:clrMapOvr`] = node;
@@ -50253,7 +50941,7 @@ function applyGroupAxisReferences(container, series, axes, getLocalName2) {
50253
50941
  function findKey15(obj, local, getLocalName2) {
50254
50942
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
50255
50943
  }
50256
- function points3(values) {
50944
+ function points4(values) {
50257
50945
  return values.map((v, i) => ({ "@_idx": String(i), "c:v": v }));
50258
50946
  }
50259
50947
  function wrapperLocalName(containerLocalName) {
@@ -50271,7 +50959,7 @@ function buildFilteredSerNode(entry2, categories) {
50271
50959
  }
50272
50960
  if (cats.length > 0) {
50273
50961
  node["c:cat"] = {
50274
- "c:strLit": { "c:ptCount": { "@_val": String(cats.length) }, "c:pt": points3(cats) }
50962
+ "c:strLit": { "c:ptCount": { "@_val": String(cats.length) }, "c:pt": points4(cats) }
50275
50963
  };
50276
50964
  }
50277
50965
  if (entry2.values) {
@@ -50279,7 +50967,7 @@ function buildFilteredSerNode(entry2, categories) {
50279
50967
  "c:numLit": {
50280
50968
  "c:formatCode": "General",
50281
50969
  "c:ptCount": { "@_val": String(entry2.values.length) },
50282
- "c:pt": points3(entry2.values.map(String))
50970
+ "c:pt": points4(entry2.values.map(String))
50283
50971
  }
50284
50972
  };
50285
50973
  }
@@ -50342,7 +51030,33 @@ function applyFilteredSeriesToXml(container, filteredSeries, categories, contain
50342
51030
  }
50343
51031
 
50344
51032
  // pptx/core/utils/chart-legend-serializer.ts
50345
- function child10(node, name, getLocalName2) {
51033
+ function applyLegendOverlay(legendNode, overlay, getLocalName2) {
51034
+ if (overlay === void 0) {
51035
+ return;
51036
+ }
51037
+ const key2 = Object.keys(legendNode).find((k) => getLocalName2(k) === "overlay");
51038
+ const node = key2 ? legendNode[key2] : void 0;
51039
+ const val = node && typeof node === "object" ? node["@_val"] : void 0;
51040
+ const authored = key2 ? !(val === "0" || val === "false") : true;
51041
+ if (authored === overlay) {
51042
+ return;
51043
+ }
51044
+ const value = { "@_val": overlay ? "1" : "0" };
51045
+ if (key2) {
51046
+ legendNode[key2] = value;
51047
+ return;
51048
+ }
51049
+ const entries = Object.entries(legendNode);
51050
+ const at = entries.findIndex(([k]) => ["spPr", "txPr", "extLst"].includes(getLocalName2(k)));
51051
+ entries.splice(at < 0 ? entries.length : at, 0, ["c:overlay", value]);
51052
+ for (const k of Object.keys(legendNode)) {
51053
+ delete legendNode[k];
51054
+ }
51055
+ for (const [k, v] of entries) {
51056
+ legendNode[k] = v;
51057
+ }
51058
+ }
51059
+ function child12(node, name, getLocalName2) {
50346
51060
  if (!node) {
50347
51061
  return void 0;
50348
51062
  }
@@ -50355,20 +51069,20 @@ function parseChartLegendEntries(legend, getLocalName2, parseColor, resolveTypef
50355
51069
  const nodes = raw ? Array.isArray(raw) ? raw : [raw] : [];
50356
51070
  return nodes.flatMap((value) => {
50357
51071
  const node = value;
50358
- const index = Number.parseInt(String(child10(node, "idx", getLocalName2)?.["@_val"] ?? ""), 10);
51072
+ const index = Number.parseInt(String(child12(node, "idx", getLocalName2)?.["@_val"] ?? ""), 10);
50359
51073
  if (!Number.isFinite(index) || index < 0) {
50360
51074
  return [];
50361
51075
  }
50362
51076
  const entry2 = { index };
50363
- const deleteNode = child10(node, "delete", getLocalName2);
51077
+ const deleteNode = child12(node, "delete", getLocalName2);
50364
51078
  if (deleteNode) {
50365
51079
  const val = deleteNode["@_val"];
50366
51080
  entry2.deleted = val !== "0" && val !== "false";
50367
51081
  }
50368
51082
  const xmlLookup = {
50369
- getChildByLocalName: (parent, name) => child10(parent, name, getLocalName2)
51083
+ getChildByLocalName: (parent, name) => child12(parent, name, getLocalName2)
50370
51084
  };
50371
- const defRPr = resolveTxPrDefRPr(child10(node, "txPr", getLocalName2), xmlLookup);
51085
+ const defRPr = resolveTxPrDefRPr(child12(node, "txPr", getLocalName2), xmlLookup);
50372
51086
  const style = parseDefRPrTextStyle(defRPr, xmlLookup, { parseColor }, resolveTypeface);
50373
51087
  if (style) {
50374
51088
  entry2.textStyle = style;
@@ -50393,9 +51107,9 @@ function setEntryChoice(node, key2, value, getLocalName2) {
50393
51107
  }
50394
51108
  function authoredEntryDefRPr(node, txPrKey, getLocalName2) {
50395
51109
  const txPr = txPrKey ? node[txPrKey] : void 0;
50396
- const paragraph = txPr ? child10(txPr, "p", getLocalName2) : void 0;
50397
- const pPr = paragraph ? child10(paragraph, "pPr", getLocalName2) : void 0;
50398
- return pPr ? child10(pPr, "defRPr", getLocalName2) : void 0;
51110
+ const paragraph = txPr ? child12(txPr, "p", getLocalName2) : void 0;
51111
+ const pPr = paragraph ? child12(paragraph, "pPr", getLocalName2) : void 0;
51112
+ return pPr ? child12(pPr, "defRPr", getLocalName2) : void 0;
50399
51113
  }
50400
51114
  function applyLegendEntries(legend, entries, getLocalName2, resolveColor2) {
50401
51115
  if (!entries) {
@@ -50405,7 +51119,7 @@ function applyLegendEntries(legend, entries, getLocalName2, resolveColor2) {
50405
51119
  const raw = key2 ? legend[key2] : void 0;
50406
51120
  const existing = raw ? Array.isArray(raw) ? raw : [raw] : [];
50407
51121
  const byIndex = new Map(
50408
- existing.map((node) => [Number(child10(node, "idx", getLocalName2)?.["@_val"]), node])
51122
+ existing.map((node) => [Number(child12(node, "idx", getLocalName2)?.["@_val"]), node])
50409
51123
  );
50410
51124
  const updated = [...existing];
50411
51125
  for (const entry2 of entries) {
@@ -50445,13 +51159,13 @@ function applyLegendEntries(legend, entries, getLocalName2, resolveColor2) {
50445
51159
  legend[key2] = updated;
50446
51160
  return;
50447
51161
  }
50448
- const children5 = Object.entries(legend);
50449
- const position2 = children5.findIndex(([candidate]) => getLocalName2(candidate) !== "legendPos");
50450
- children5.splice(position2 < 0 ? children5.length : position2, 0, ["c:legendEntry", updated]);
51162
+ const children6 = Object.entries(legend);
51163
+ const position2 = children6.findIndex(([candidate]) => getLocalName2(candidate) !== "legendPos");
51164
+ children6.splice(position2 < 0 ? children6.length : position2, 0, ["c:legendEntry", updated]);
50451
51165
  for (const candidate of Object.keys(legend)) {
50452
51166
  delete legend[candidate];
50453
51167
  }
50454
- for (const [candidate, value] of children5) {
51168
+ for (const [candidate, value] of children6) {
50455
51169
  legend[candidate] = value;
50456
51170
  }
50457
51171
  }
@@ -50486,7 +51200,7 @@ function applyChartLegendToXml(chartRoot, style, getLocalName2, resolveColor2) {
50486
51200
  "c:legend",
50487
51201
  {
50488
51202
  "c:legendPos": { "@_val": style.legendPosition ?? "r" },
50489
- "c:overlay": { "@_val": "0" }
51203
+ "c:overlay": { "@_val": style.legendOverlay ? "1" : "0" }
50490
51204
  },
50491
51205
  "plotArea",
50492
51206
  getLocalName2
@@ -50510,6 +51224,7 @@ function applyChartLegendToXml(chartRoot, style, getLocalName2, resolveColor2) {
50510
51224
  );
50511
51225
  }
50512
51226
  }
51227
+ applyLegendOverlay(legendNode, style.legendOverlay, getLocalName2);
50513
51228
  applyLegendEntries(legendNode, style.legendEntries, getLocalName2, resolveColor2);
50514
51229
  }
50515
51230
 
@@ -50533,7 +51248,7 @@ var CONTAINER_ORDER = [
50533
51248
  function findKey16(node, name, localName15) {
50534
51249
  return Object.keys(node).find((key2) => localName15(key2) === name);
50535
51250
  }
50536
- function setOrdered3(node, name, value, localName15) {
51251
+ function setOrdered4(node, name, value, localName15) {
50537
51252
  const key2 = findKey16(node, name, localName15);
50538
51253
  if (key2) {
50539
51254
  node[key2] = value;
@@ -50551,8 +51266,8 @@ function setOrdered3(node, name, value, localName15) {
50551
51266
  for (const candidate of Object.keys(node)) {
50552
51267
  delete node[candidate];
50553
51268
  }
50554
- for (const [candidate, child14] of entries) {
50555
- node[candidate] = child14;
51269
+ for (const [candidate, child16] of entries) {
51270
+ node[candidate] = child16;
50556
51271
  }
50557
51272
  }
50558
51273
  function applyChartLineStyle(chartContainer, elementName, style, localName15, resolveColor2) {
@@ -50578,7 +51293,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName15, re
50578
51293
  resolveColor2
50579
51294
  );
50580
51295
  }
50581
- setOrdered3(chartContainer, elementName, node, localName15);
51296
+ setOrdered4(chartContainer, elementName, node, localName15);
50582
51297
  }
50583
51298
 
50584
51299
  // pptx/core/utils/chart-series-color-serializer.ts
@@ -51191,7 +51906,7 @@ function replaceChartExDataDimensions(target, fresh, getLocalName2) {
51191
51906
  function findKey21(node, localName15, getLocalName2) {
51192
51907
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName15);
51193
51908
  }
51194
- function child11(node, localName15, getLocalName2) {
51909
+ function child13(node, localName15, getLocalName2) {
51195
51910
  if (!node) {
51196
51911
  return void 0;
51197
51912
  }
@@ -51233,8 +51948,8 @@ var AFTER_TX = [
51233
51948
  "extLst"
51234
51949
  ];
51235
51950
  function applySeriesName(node, name, getLocalName2) {
51236
- const tx = child11(node, "tx", getLocalName2);
51237
- const txData = child11(tx, "txData", getLocalName2);
51951
+ const tx = child13(node, "tx", getLocalName2);
51952
+ const txData = child13(tx, "txData", getLocalName2);
51238
51953
  if (tx && txData) {
51239
51954
  const vKey = findKey21(txData, "v", getLocalName2) ?? "cx:v";
51240
51955
  txData[vKey] = name;
@@ -51249,8 +51964,8 @@ function applySeriesName(node, name, getLocalName2) {
51249
51964
  var FILL_KINDS = ["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"];
51250
51965
  var AFTER_FILL = ["ln", "effectLst", "effectDag", "scene3d", "sp3d", "extLst"];
51251
51966
  function currentSeriesColor(node, getLocalName2) {
51252
- const srgb = child11(
51253
- child11(child11(node, "spPr", getLocalName2), "solidFill", getLocalName2),
51967
+ const srgb = child13(
51968
+ child13(child13(node, "spPr", getLocalName2), "solidFill", getLocalName2),
51254
51969
  "srgbClr",
51255
51970
  getLocalName2
51256
51971
  );
@@ -51266,7 +51981,7 @@ function applySeriesColor(node, series, getLocalName2) {
51266
51981
  if (wanted === currentSeriesColor(node, getLocalName2)) {
51267
51982
  return;
51268
51983
  }
51269
- const spPr = child11(node, "spPr", getLocalName2);
51984
+ const spPr = child13(node, "spPr", getLocalName2);
51270
51985
  if (!spPr) {
51271
51986
  insertBefore3(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
51272
51987
  return;
@@ -51310,7 +52025,7 @@ function nextDataId(dataNodes) {
51310
52025
  return max + 1;
51311
52026
  }
51312
52027
  function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
51313
- const dataIdNode = child11(node, "dataId", getLocalName2);
52028
+ const dataIdNode = child13(node, "dataId", getLocalName2);
51314
52029
  const dataId = dataIdNode ? String(dataIdNode["@_val"] ?? "") : void 0;
51315
52030
  const referenced = dataId !== void 0 ? dataNodes.find((data) => String(data["@_id"]) === dataId) : void 0;
51316
52031
  if (referenced) {
@@ -51375,8 +52090,8 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
51375
52090
  insertBefore3(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
51376
52091
  }
51377
52092
  function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
51378
- const region = child11(
51379
- child11(child11(chartSpace, "chart", getLocalName2), "plotArea", getLocalName2),
52093
+ const region = child13(
52094
+ child13(child13(chartSpace, "chart", getLocalName2), "plotArea", getLocalName2),
51380
52095
  "plotAreaRegion",
51381
52096
  getLocalName2
51382
52097
  );
@@ -51390,9 +52105,9 @@ function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
51390
52105
  return chartExLayoutId(chartData, series).toLowerCase() !== existing;
51391
52106
  }
51392
52107
  function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
51393
- const chartRoot = child11(chartSpace, "chart", getLocalName2);
51394
- const plotArea = child11(chartRoot, "plotArea", getLocalName2);
51395
- const region = child11(plotArea, "plotAreaRegion", getLocalName2);
52108
+ const chartRoot = child13(chartSpace, "chart", getLocalName2);
52109
+ const plotArea = child13(chartRoot, "plotArea", getLocalName2);
52110
+ const region = child13(plotArea, "plotAreaRegion", getLocalName2);
51396
52111
  if (!chartRoot || !region) {
51397
52112
  return false;
51398
52113
  }
@@ -51419,7 +52134,7 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
51419
52134
  bindSeriesData(node, dataNodes, chartData, series, getLocalName2);
51420
52135
  updated.push(node);
51421
52136
  });
51422
- const referencedId = (node) => String(child11(node, "dataId", getLocalName2)?.["@_val"]);
52137
+ const referencedId = (node) => String(child13(node, "dataId", getLocalName2)?.["@_val"]);
51423
52138
  const liveIds = new Set(updated.map(referencedId));
51424
52139
  const removedIds = new Set(existing.slice(chartData.series.length).map(referencedId));
51425
52140
  const survivingData = dataNodes.filter((data) => {
@@ -51901,8 +52616,8 @@ function buildOffExt(off, ext) {
51901
52616
  "a:ext": { "@_cx": String(Math.round(ext.cx)), "@_cy": String(Math.round(ext.cy)) }
51902
52617
  };
51903
52618
  }
51904
- function buildChildXfrm(child14) {
51905
- return buildOffExt(child14.off, child14.ext);
52619
+ function buildChildXfrm(child16) {
52620
+ return buildOffExt(child16.off, child16.ext);
51906
52621
  }
51907
52622
  function buildGroupTransformXfrm(transform2) {
51908
52623
  const xfrm = {
@@ -51927,29 +52642,29 @@ function buildGroupTransformXfrm(transform2) {
51927
52642
  }
51928
52643
  return xfrm;
51929
52644
  }
51930
- function buildGroupChildNode(child14, id, idState) {
51931
- if (child14.kind === "grpSp") {
51932
- if (child14.rawXml) {
51933
- return { key: "grpSp", node: cloneXmlObject(child14.rawXml) ?? {} };
52645
+ function buildGroupChildNode(child16, id, idState) {
52646
+ if (child16.kind === "grpSp") {
52647
+ if (child16.rawXml) {
52648
+ return { key: "grpSp", node: cloneXmlObject(child16.rawXml) ?? {} };
51934
52649
  }
51935
- return { key: "grpSp", node: buildGroupNode(child14, id, idState) };
52650
+ return { key: "grpSp", node: buildGroupNode(child16, id, idState) };
51936
52651
  }
51937
- const rawShapeKey = (child14.kind === "pic" || child14.kind === "graphicFrame") && child14.rawXml ? child14.kind : void 0;
52652
+ const rawShapeKey = (child16.kind === "pic" || child16.kind === "graphicFrame") && child16.rawXml ? child16.kind : void 0;
51938
52653
  if (rawShapeKey) {
51939
- const rawNode = cloneXmlObject(child14.rawXml) ?? {};
51940
- applyChildXfrmToRawNode(rawNode, child14.off, child14.ext);
51941
- applyRotationFlipToRawNode(rawNode, child14.rotation, child14.flipH, child14.flipV);
52654
+ const rawNode = cloneXmlObject(child16.rawXml) ?? {};
52655
+ applyChildXfrmToRawNode(rawNode, child16.off, child16.ext);
52656
+ applyRotationFlipToRawNode(rawNode, child16.rotation, child16.flipH, child16.flipV);
51942
52657
  if (rawShapeKey === "pic") {
51943
- applyPicAltText(rawNode, child14.altText);
52658
+ applyPicAltText(rawNode, child16.altText);
51944
52659
  }
51945
52660
  return { key: rawShapeKey, node: rawNode };
51946
52661
  }
51947
- if (child14.kind === "cxnSp") {
51948
- return { key: "cxnSp", node: buildCxnSpNode(child14, id, buildChildXfrm(child14)) };
52662
+ if (child16.kind === "cxnSp") {
52663
+ return { key: "cxnSp", node: buildCxnSpNode(child16, id, buildChildXfrm(child16)) };
51949
52664
  }
51950
- return { key: "sp", node: buildSpNode(child14, id, buildChildXfrm(child14)) };
52665
+ return { key: "sp", node: buildSpNode(child16, id, buildChildXfrm(child16)) };
51951
52666
  }
51952
- function appendGroupChildren(node, children5, idState) {
52667
+ function appendGroupChildren(node, children6, idState) {
51953
52668
  const buckets = {
51954
52669
  sp: [],
51955
52670
  cxnSp: [],
@@ -51957,9 +52672,9 @@ function appendGroupChildren(node, children5, idState) {
51957
52672
  grpSp: [],
51958
52673
  graphicFrame: []
51959
52674
  };
51960
- for (const child14 of children5) {
52675
+ for (const child16 of children6) {
51961
52676
  const id = idState.next++;
51962
- const { key: key2, node: childNode } = buildGroupChildNode(child14, id, idState);
52677
+ const { key: key2, node: childNode } = buildGroupChildNode(child16, id, idState);
51963
52678
  buckets[key2].push(childNode);
51964
52679
  }
51965
52680
  for (const key2 of ["sp", "cxnSp", "pic", "grpSp", "graphicFrame"]) {
@@ -52495,14 +53210,14 @@ function a14ArtisticElementName(effect) {
52495
53210
  }
52496
53211
  return GALLERY_TO_A14[trimmed2];
52497
53212
  }
52498
- var round = (value) => String(Math.round(value));
53213
+ var round2 = (value) => String(Math.round(value));
52499
53214
  function buildArtisticNode(effects, elementName) {
52500
53215
  const node = {};
52501
53216
  const params = effects.artisticParams;
52502
53217
  if (params && Object.keys(params).length > 0) {
52503
53218
  for (const [name, value] of Object.entries(params)) {
52504
53219
  if (Number.isFinite(value)) {
52505
- node[`@_${name}`] = round(value);
53220
+ node[`@_${name}`] = round2(value);
52506
53221
  }
52507
53222
  }
52508
53223
  return node;
@@ -52510,16 +53225,16 @@ function buildArtisticNode(effects, elementName) {
52510
53225
  const radius = effects.artisticRadius;
52511
53226
  const primary = ARTISTIC_PRIMARY_ATTRIBUTE[elementName];
52512
53227
  if (primary !== void 0 && typeof radius === "number" && Number.isFinite(radius)) {
52513
- node[`@_${primary}`] = primary === "radius" ? round(radius) : round(radius * 1e3);
53228
+ node[`@_${primary}`] = primary === "radius" ? round2(radius) : round2(radius * 1e3);
52514
53229
  }
52515
53230
  return node;
52516
53231
  }
52517
53232
  function buildMarks(marks) {
52518
53233
  return (marks ?? []).map((mark) => ({
52519
- "@_x1": round(mark.x1 * 1e5),
52520
- "@_y1": round(mark.y1 * 1e5),
52521
- "@_x2": round(mark.x2 * 1e5),
52522
- "@_y2": round(mark.y2 * 1e5)
53234
+ "@_x1": round2(mark.x1 * 1e5),
53235
+ "@_y1": round2(mark.y1 * 1e5),
53236
+ "@_x2": round2(mark.x2 * 1e5),
53237
+ "@_y2": round2(mark.y2 * 1e5)
52523
53238
  }));
52524
53239
  }
52525
53240
  function buildBackgroundRemovalNode(removal) {
@@ -52527,10 +53242,10 @@ function buildBackgroundRemovalNode(removal) {
52527
53242
  return removal.rawXml;
52528
53243
  }
52529
53244
  const node = {
52530
- "@_t": round(removal.top * 1e5),
52531
- "@_b": round(removal.bottom * 1e5),
52532
- "@_l": round(removal.left * 1e5),
52533
- "@_r": round(removal.right * 1e5)
53245
+ "@_t": round2(removal.top * 1e5),
53246
+ "@_b": round2(removal.bottom * 1e5),
53247
+ "@_l": round2(removal.left * 1e5),
53248
+ "@_r": round2(removal.right * 1e5)
52534
53249
  };
52535
53250
  const foreground = buildMarks(removal.foregroundMarks);
52536
53251
  if (foreground.length > 0) {
@@ -52549,26 +53264,26 @@ function buildImgEffects(effects) {
52549
53264
  out.push({ "a14:backgroundRemoval": buildBackgroundRemovalNode(effects.backgroundRemoval) });
52550
53265
  }
52551
53266
  if (finite2(effects.sharpenSoften?.amount)) {
52552
- out.push({ "a14:sharpenSoften": { "@_amount": round(effects.sharpenSoften.amount) } });
53267
+ out.push({ "a14:sharpenSoften": { "@_amount": round2(effects.sharpenSoften.amount) } });
52553
53268
  }
52554
53269
  const bc = effects.brightnessContrast;
52555
53270
  if (bc && (finite2(bc.bright) || finite2(bc.contrast))) {
52556
53271
  const node = {};
52557
53272
  if (finite2(bc.bright)) {
52558
- node["@_bright"] = round(bc.bright);
53273
+ node["@_bright"] = round2(bc.bright);
52559
53274
  }
52560
53275
  if (finite2(bc.contrast)) {
52561
- node["@_contrast"] = round(bc.contrast);
53276
+ node["@_contrast"] = round2(bc.contrast);
52562
53277
  }
52563
53278
  out.push({ "a14:brightnessContrast": node });
52564
53279
  }
52565
53280
  if (finite2(effects.colorTemperature?.colorTemp)) {
52566
53281
  out.push({
52567
- "a14:colorTemperature": { "@_colorTemp": round(effects.colorTemperature.colorTemp) }
53282
+ "a14:colorTemperature": { "@_colorTemp": round2(effects.colorTemperature.colorTemp) }
52568
53283
  });
52569
53284
  }
52570
53285
  if (finite2(effects.colorSaturation?.sat)) {
52571
- out.push({ "a14:saturation": { "@_sat": round(effects.colorSaturation.sat) } });
53286
+ out.push({ "a14:saturation": { "@_sat": round2(effects.colorSaturation.sat) } });
52572
53287
  }
52573
53288
  const artistic = a14ArtisticElementName(effects.artisticEffect);
52574
53289
  if (artistic !== void 0) {
@@ -52620,7 +53335,7 @@ function applyA14ImageExtension(blip, effects) {
52620
53335
 
52621
53336
  // pptx/core/core/runtime/image-alpha-effects.ts
52622
53337
  var localName12 = (key2) => key2.split(":").at(-1) ?? key2;
52623
- function child12(parent, name) {
53338
+ function child14(parent, name) {
52624
53339
  if (!parent) {
52625
53340
  return void 0;
52626
53341
  }
@@ -52681,30 +53396,30 @@ function percentXml(raw, attr4, value, fixed, defaultValue) {
52681
53396
  }
52682
53397
  function parseImageAlphaEffects(blip, parseColor) {
52683
53398
  const effects = {};
52684
- const modFix = child12(blip, "alphaModFix");
53399
+ const modFix = child14(blip, "alphaModFix");
52685
53400
  if (modFix) {
52686
53401
  effects.alphaModFix = parsePercent(modFix["@_amt"], false) ?? 100;
52687
53402
  effects.alphaModFixRawXml = modFix;
52688
53403
  }
52689
- const inverse = child12(blip, "alphaInv");
53404
+ const inverse = child14(blip, "alphaInv");
52690
53405
  if (inverse) {
52691
53406
  const color2 = parseColor(canonicalColor(inverse));
52692
53407
  effects.alphaInv = { ...color2 ? { color: color2 } : {}, rawXml: inverse };
52693
53408
  }
52694
- const ceiling = child12(blip, "alphaCeiling");
53409
+ const ceiling = child14(blip, "alphaCeiling");
52695
53410
  if (ceiling) {
52696
53411
  effects.alphaCeiling = true;
52697
53412
  effects.alphaCeilingRawXml = ceiling;
52698
53413
  }
52699
- const floor = child12(blip, "alphaFloor");
53414
+ const floor = child14(blip, "alphaFloor");
52700
53415
  if (floor) {
52701
53416
  effects.alphaFloor = true;
52702
53417
  effects.alphaFloorRawXml = floor;
52703
53418
  }
52704
- const modulate = child12(blip, "alphaMod");
53419
+ const modulate = child14(blip, "alphaMod");
52705
53420
  if (modulate) {
52706
- const cont = child12(modulate, "cont");
52707
- const nestedFix = child12(cont, "alphaModFix");
53421
+ const cont = child14(modulate, "cont");
53422
+ const nestedFix = child14(cont, "alphaModFix");
52708
53423
  const amt = nestedFix ? parsePercent(nestedFix["@_amt"], false) : void 0;
52709
53424
  effects.alphaMod = {
52710
53425
  ...cont ? { contRawXml: cont } : {},
@@ -52712,7 +53427,7 @@ function parseImageAlphaEffects(blip, parseColor) {
52712
53427
  rawXml: modulate
52713
53428
  };
52714
53429
  }
52715
- const replace = child12(blip, "alphaRepl");
53430
+ const replace = child14(blip, "alphaRepl");
52716
53431
  if (replace) {
52717
53432
  const alpha = parsePercent(replace["@_a"], true);
52718
53433
  if (alpha !== void 0) {
@@ -52720,7 +53435,7 @@ function parseImageAlphaEffects(blip, parseColor) {
52720
53435
  effects.alphaReplRawXml = replace;
52721
53436
  }
52722
53437
  }
52723
- const biLevel = child12(blip, "alphaBiLevel");
53438
+ const biLevel = child14(blip, "alphaBiLevel");
52724
53439
  if (biLevel) {
52725
53440
  const threshold = parsePercent(biLevel["@_thresh"], true);
52726
53441
  if (threshold !== void 0) {
@@ -52765,7 +53480,7 @@ function applyImageAlphaEffects(blip, effects, parseColor) {
52765
53480
  if (effects.alphaMod.contRawXml) {
52766
53481
  setChild4(node, "cont", effects.alphaMod.contRawXml);
52767
53482
  }
52768
- if (child12(node, "cont") || effects.alphaMod.rawXml) {
53483
+ if (child14(node, "cont") || effects.alphaMod.rawXml) {
52769
53484
  setChild4(blip, "alphaMod", node);
52770
53485
  } else {
52771
53486
  setChild4(blip, "alphaMod", void 0);
@@ -52789,7 +53504,7 @@ function applyImageAlphaEffects(blip, effects, parseColor) {
52789
53504
 
52790
53505
  // pptx/core/core/runtime/image-color-effects.ts
52791
53506
  var localName13 = (key2) => key2.split(":").at(-1) ?? key2;
52792
- function child13(parent, name) {
53507
+ function child15(parent, name) {
52793
53508
  if (!parent) {
52794
53509
  return void 0;
52795
53510
  }
@@ -52840,12 +53555,12 @@ function opacity(parent, extractOpacity) {
52840
53555
  }
52841
53556
  function parseImageColorEffects(blip, parseColor, extractOpacity) {
52842
53557
  const result = {};
52843
- const grayscale = child13(blip, "grayscl");
53558
+ const grayscale = child15(blip, "grayscl");
52844
53559
  if (grayscale) {
52845
53560
  result.grayscale = true;
52846
53561
  result.grayscaleRawXml = grayscale;
52847
53562
  }
52848
- const biLevel = child13(blip, "biLevel");
53563
+ const biLevel = child15(blip, "biLevel");
52849
53564
  if (biLevel) {
52850
53565
  const threshold = Number(biLevel["@_thresh"]);
52851
53566
  if (Number.isFinite(threshold)) {
@@ -52853,9 +53568,9 @@ function parseImageColorEffects(blip, parseColor, extractOpacity) {
52853
53568
  }
52854
53569
  result.biLevelRawXml = biLevel;
52855
53570
  }
52856
- const change = child13(blip, "clrChange");
52857
- const from = child13(change, "clrFrom");
52858
- const to = child13(change, "clrTo");
53571
+ const change = child15(blip, "clrChange");
53572
+ const from = child15(change, "clrFrom");
53573
+ const to = child15(change, "clrTo");
52859
53574
  if (change && from && to) {
52860
53575
  result.clrChange = {
52861
53576
  clrFrom: resolveColor(from, parseColor) ?? "#000000",
@@ -52864,12 +53579,12 @@ function parseImageColorEffects(blip, parseColor, extractOpacity) {
52864
53579
  rawXml: change
52865
53580
  };
52866
53581
  }
52867
- const replace = child13(blip, "clrRepl");
53582
+ const replace = child15(blip, "clrRepl");
52868
53583
  const replacement = resolveColor(replace, parseColor);
52869
53584
  if (replace && replacement) {
52870
53585
  result.clrRepl = { color: replacement, rawXml: replace };
52871
53586
  }
52872
- const duotone = child13(blip, "duotone");
53587
+ const duotone = child15(blip, "duotone");
52873
53588
  if (duotone) {
52874
53589
  const colors = colorChoices(duotone).map((color2) => resolveColor(color2, parseColor));
52875
53590
  if (colors[0] && colors[1]) {
@@ -52932,8 +53647,8 @@ function applyImageColorEffects(blip, effects, parseColor, extractOpacity) {
52932
53647
  setChild5(blip, "biLevel", biLevel);
52933
53648
  const change = effects.clrChange;
52934
53649
  if (change) {
52935
- const rawFrom = child13(change.rawXml, "clrFrom");
52936
- const rawTo = child13(change.rawXml, "clrTo");
53650
+ const rawFrom = child15(change.rawXml, "clrFrom");
53651
+ const rawTo = child15(change.rawXml, "clrTo");
52937
53652
  const rawTransparent = rawTo ? (opacity(rawTo, extractOpacity) ?? 1) <= 0 : void 0;
52938
53653
  const unchanged2 = sameRawColor(rawFrom, change.clrFrom, parseColor) && sameRawColor(rawTo, change.clrTo, parseColor) && (rawTransparent === void 0 || change.clrToTransparent === rawTransparent);
52939
53654
  if (unchanged2 && change.rawXml) {
@@ -53106,7 +53821,7 @@ function updateEndParagraphProperties(existing, style, serialize) {
53106
53821
  const baseline = serialize({ ...style, ...style.inheritedRunStyle, ...style.authoredRunStyle });
53107
53822
  const current = serialize(style);
53108
53823
  const attributes = {};
53109
- const children5 = /* @__PURE__ */ new Map();
53824
+ const children6 = /* @__PURE__ */ new Map();
53110
53825
  for (const key2 of /* @__PURE__ */ new Set([...Object.keys(baseline), ...Object.keys(current)])) {
53111
53826
  if (JSON.stringify(baseline[key2]) === JSON.stringify(current[key2])) {
53112
53827
  continue;
@@ -53114,10 +53829,10 @@ function updateEndParagraphProperties(existing, style, serialize) {
53114
53829
  if (key2.startsWith("@_")) {
53115
53830
  attributes[key2.slice(2)] = current[key2] === void 0 ? null : String(current[key2]);
53116
53831
  } else {
53117
- children5.set(key2, current[key2] ?? null);
53832
+ children6.set(key2, current[key2] ?? null);
53118
53833
  }
53119
53834
  }
53120
- if (Object.keys(attributes).length === 0 && children5.size === 0) {
53835
+ if (Object.keys(attributes).length === 0 && children6.size === 0) {
53121
53836
  return existing;
53122
53837
  }
53123
53838
  const fillKeys = [
@@ -53128,15 +53843,15 @@ function updateEndParagraphProperties(existing, style, serialize) {
53128
53843
  "a:pattFill",
53129
53844
  "a:grpFill"
53130
53845
  ];
53131
- const changedFill = fillKeys.find((key2) => children5.get(key2));
53846
+ const changedFill = fillKeys.find((key2) => children6.get(key2));
53132
53847
  if (changedFill) {
53133
53848
  for (const key2 of fillKeys) {
53134
53849
  if (key2 !== changedFill) {
53135
- children5.set(key2, null);
53850
+ children6.set(key2, null);
53136
53851
  }
53137
53852
  }
53138
53853
  }
53139
- return mergeOrderedXml(existing, attributes, children5, DEF_RPR_CHILD_ORDER);
53854
+ return mergeOrderedXml(existing, attributes, children6, DEF_RPR_CHILD_ORDER);
53140
53855
  }
53141
53856
 
53142
53857
  // pptx/core/core/runtime/paragraph-child-assembly.ts
@@ -53173,10 +53888,10 @@ function classifyParagraphChild(run) {
53173
53888
  }
53174
53889
  return { tag: "m:oMath", value: eqXml };
53175
53890
  }
53176
- function isGroupedByTag2(children5) {
53891
+ function isGroupedByTag2(children6) {
53177
53892
  const seen = /* @__PURE__ */ new Set();
53178
53893
  let previous = "";
53179
- for (const { tag } of children5) {
53894
+ for (const { tag } of children6) {
53180
53895
  if (tag !== previous && seen.has(tag)) {
53181
53896
  return false;
53182
53897
  }
@@ -53185,10 +53900,10 @@ function isGroupedByTag2(children5) {
53185
53900
  }
53186
53901
  return true;
53187
53902
  }
53188
- function writeParagraphChildren(paragraph, children5) {
53189
- if (isGroupedByTag2(children5)) {
53903
+ function writeParagraphChildren(paragraph, children6) {
53904
+ if (isGroupedByTag2(children6)) {
53190
53905
  const grouped = /* @__PURE__ */ new Map();
53191
- for (const { tag, value } of children5) {
53906
+ for (const { tag, value } of children6) {
53192
53907
  const bucket = grouped.get(tag);
53193
53908
  if (bucket) {
53194
53909
  bucket.push(value);
@@ -53202,10 +53917,10 @@ function writeParagraphChildren(paragraph, children5) {
53202
53917
  return;
53203
53918
  }
53204
53919
  const totals = /* @__PURE__ */ new Map();
53205
- for (const { tag } of children5) {
53920
+ for (const { tag } of children6) {
53206
53921
  totals.set(tag, (totals.get(tag) ?? 0) + 1);
53207
53922
  }
53208
- for (const [position2, { tag, value }] of children5.entries()) {
53923
+ for (const [position2, { tag, value }] of children6.entries()) {
53209
53924
  paragraph[(totals.get(tag) ?? 0) > 1 ? orderedXmlKey(tag, position2) : tag] = value;
53210
53925
  }
53211
53926
  }
@@ -53411,9 +54126,9 @@ function assembleParagraphXml(runs, paragraphProps, endParaRunProperties, markup
53411
54126
  if (Object.keys(paragraphProps).length > 0 || markup?.emptyParagraphPropertiesAuthored) {
53412
54127
  paragraph["a:pPr"] = paragraphProps;
53413
54128
  }
53414
- const children5 = runs.map((run) => classifyParagraphChild(run)).filter((child14) => child14 !== void 0);
53415
- if (children5.length > 0) {
53416
- writeParagraphChildren(paragraph, children5);
54129
+ const children6 = runs.map((run) => classifyParagraphChild(run)).filter((child16) => child16 !== void 0);
54130
+ if (children6.length > 0) {
54131
+ writeParagraphChildren(paragraph, children6);
53417
54132
  } else {
53418
54133
  paragraph["a:r"] = runs.length > 1 ? runs : runs[0];
53419
54134
  }
@@ -54014,13 +54729,13 @@ function renderFunnelChartSvg(element, x, y, width, height) {
54014
54729
  const bottom = top + Math.max(stageHeight - 1, 0.5);
54015
54730
  const pointColor = series.dataPoints?.find((point) => point.idx === index)?.spPr?.fillColor;
54016
54731
  const fill = pointColor ?? series.color ?? DEFAULT_COLORS[index % DEFAULT_COLORS.length];
54017
- const points4 = [
54732
+ const points5 = [
54018
54733
  `${center - topWidth / 2},${top}`,
54019
54734
  `${center + topWidth / 2},${top}`,
54020
54735
  `${center + bottomWidth / 2},${bottom}`,
54021
54736
  `${center - bottomWidth / 2},${bottom}`
54022
54737
  ].join(" ");
54023
- return `<polygon data-chart-mark="funnel" data-chart-point="${index}" points="${points4}" fill="${esc2(fill)}" />`;
54738
+ return `<polygon data-chart-mark="funnel" data-chart-point="${index}" points="${points5}" fill="${esc2(fill)}" />`;
54024
54739
  }).join("");
54025
54740
  }
54026
54741
 
@@ -54068,8 +54783,8 @@ function renderLines(element, x, y, w, h) {
54068
54783
  const span = max - min || 1;
54069
54784
  return data.series.map((series, seriesIndex) => {
54070
54785
  const denominator = Math.max(series.values.length - 1, 1);
54071
- const points4 = series.values.map((value, index) => `${x + index / denominator * w},${y + (max - value) / span * h}`).join(" ");
54072
- return `<polyline data-chart-mark="line" points="${points4}" fill="none" stroke="${esc3(color(series, seriesIndex))}" stroke-width="2" />`;
54786
+ const points5 = series.values.map((value, index) => `${x + index / denominator * w},${y + (max - value) / span * h}`).join(" ");
54787
+ return `<polyline data-chart-mark="line" points="${points5}" fill="none" stroke="${esc3(color(series, seriesIndex))}" stroke-width="2" />`;
54073
54788
  }).join("");
54074
54789
  }
54075
54790
  function polar(cx, cy, radius, angle) {
@@ -54488,8 +55203,8 @@ function renderGroup(el, defaults, ctx) {
54488
55203
  return "";
54489
55204
  }
54490
55205
  const parts = [];
54491
- for (const child14 of el.children) {
54492
- parts.push(renderElement(child14, defaults, ctx));
55206
+ for (const child16 of el.children) {
55207
+ parts.push(renderElement(child16, defaults, ctx));
54493
55208
  }
54494
55209
  return parts.join("");
54495
55210
  }
@@ -56245,18 +56960,18 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
56245
56960
  const childTnLst = cTn["p:childTnLst"];
56246
56961
  if (childTnLst) {
56247
56962
  for (const container of ["p:par", "p:seq", "p:excl"]) {
56248
- const children5 = this.ensureArray(childTnLst[container]);
56249
- for (const child14 of children5) {
56250
- this.walkMediaTimingTree(child14, result, slidePath);
56963
+ const children6 = this.ensureArray(childTnLst[container]);
56964
+ for (const child16 of children6) {
56965
+ this.walkMediaTimingTree(child16, result, slidePath);
56251
56966
  }
56252
56967
  }
56253
56968
  this.walkMediaTimingTree(childTnLst, result, slidePath);
56254
56969
  }
56255
56970
  }
56256
56971
  for (const container of ["p:par", "p:seq", "p:excl", "p:tnLst"]) {
56257
- const children5 = this.ensureArray(node[container]);
56258
- for (const child14 of children5) {
56259
- this.walkMediaTimingTree(child14, result, slidePath);
56972
+ const children6 = this.ensureArray(node[container]);
56973
+ for (const child16 of children6) {
56974
+ this.walkMediaTimingTree(child16, result, slidePath);
56260
56975
  }
56261
56976
  }
56262
56977
  }
@@ -58595,14 +59310,14 @@ function setOwnXmlProperty(node, key2, value) {
58595
59310
  configurable: true
58596
59311
  });
58597
59312
  }
58598
- function assignOrderedXmlChildren(target, children5) {
59313
+ function assignOrderedXmlChildren(target, children6) {
58599
59314
  const runs = [];
58600
- for (const child14 of children5) {
59315
+ for (const child16 of children6) {
58601
59316
  const last = runs.at(-1);
58602
- if (last && last.tag === child14.tag) {
58603
- last.nodes.push(child14.node);
59317
+ if (last && last.tag === child16.tag) {
59318
+ last.nodes.push(child16.node);
58604
59319
  } else {
58605
- runs.push({ tag: child14.tag, nodes: [child14.node] });
59320
+ runs.push({ tag: child16.tag, nodes: [child16.node] });
58606
59321
  }
58607
59322
  }
58608
59323
  const seen = /* @__PURE__ */ new Set();
@@ -58669,7 +59384,7 @@ function buildGroupTransformXml(group, emuPerPx, ownEmuOverride, rewrap) {
58669
59384
  }
58670
59385
  return xfrm;
58671
59386
  }
58672
- function applyGroupChildTransform(xml, child14, emuPerPx, owner, precomputed) {
59387
+ function applyGroupChildTransform(xml, child16, emuPerPx, owner, precomputed) {
58673
59388
  const spPr = xml["p:spPr"];
58674
59389
  const grpSpPr = xml["p:grpSpPr"];
58675
59390
  const childXfrm = spPr?.["a:xfrm"] ?? xml["p:xfrm"] ?? grpSpPr?.["a:xfrm"];
@@ -58678,18 +59393,18 @@ function applyGroupChildTransform(xml, child14, emuPerPx, owner, precomputed) {
58678
59393
  }
58679
59394
  childXfrm["a:off"] ??= {};
58680
59395
  childXfrm["a:ext"] ??= {};
58681
- const inverted = precomputed ?? (owner ? invertChildIntoGroupSpace(child14, owner, emuPerPx) : void 0);
59396
+ const inverted = precomputed ?? (owner ? invertChildIntoGroupSpace(child16, owner, emuPerPx) : void 0);
58682
59397
  childXfrm["a:off"]["@_x"] = String(
58683
- inverted ? inverted.xEmu : resolveXfrmEmu(child14.x, child14.xEmu, emuPerPx)
59398
+ inverted ? inverted.xEmu : resolveXfrmEmu(child16.x, child16.xEmu, emuPerPx)
58684
59399
  );
58685
59400
  childXfrm["a:off"]["@_y"] = String(
58686
- inverted ? inverted.yEmu : resolveXfrmEmu(child14.y, child14.yEmu, emuPerPx)
59401
+ inverted ? inverted.yEmu : resolveXfrmEmu(child16.y, child16.yEmu, emuPerPx)
58687
59402
  );
58688
59403
  childXfrm["a:ext"]["@_cx"] = String(
58689
- inverted ? inverted.widthEmu : resolveXfrmEmu(child14.width, child14.widthEmu, emuPerPx)
59404
+ inverted ? inverted.widthEmu : resolveXfrmEmu(child16.width, child16.widthEmu, emuPerPx)
58690
59405
  );
58691
59406
  childXfrm["a:ext"]["@_cy"] = String(
58692
- inverted ? inverted.heightEmu : resolveXfrmEmu(child14.height, child14.heightEmu, emuPerPx)
59407
+ inverted ? inverted.heightEmu : resolveXfrmEmu(child16.height, child16.heightEmu, emuPerPx)
58693
59408
  );
58694
59409
  }
58695
59410
 
@@ -58955,14 +59670,14 @@ function buildInkShapeXml(el, emuPerPx) {
58955
59670
  if (!Number.isFinite(x) || !Number.isFinite(y)) {
58956
59671
  continue;
58957
59672
  }
58958
- const pt = {
59673
+ const pt2 = {
58959
59674
  "@_x": String(Math.round(x * emuPerPx)),
58960
59675
  "@_y": String(Math.round(y * emuPerPx))
58961
59676
  };
58962
59677
  if (token2.groups?.cmd?.toUpperCase() === "M") {
58963
- moveToList.push({ "a:pt": pt });
59678
+ moveToList.push({ "a:pt": pt2 });
58964
59679
  } else {
58965
- lnToList.push({ "a:pt": pt });
59680
+ lnToList.push({ "a:pt": pt2 });
58966
59681
  }
58967
59682
  }
58968
59683
  const pathXml = {
@@ -59264,8 +59979,8 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
59264
59979
  preserveGroupChildSpace: childSpace
59265
59980
  } : void 0;
59266
59981
  const entries = [];
59267
- for (const child14 of group.children) {
59268
- const entry2 = childCtx ? this.serializeGroupChildViaElementWriter(child14, childCtx) : this.serializeGroupChildFromRawXml(child14, childSpace);
59982
+ for (const child16 of group.children) {
59983
+ const entry2 = childCtx ? this.serializeGroupChildViaElementWriter(child16, childCtx) : this.serializeGroupChildFromRawXml(child16, childSpace);
59269
59984
  if (entry2) {
59270
59985
  entries.push(entry2);
59271
59986
  }
@@ -59282,18 +59997,18 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
59282
59997
  * Nested groups are recursed here rather than handed to the element writer,
59283
59998
  * so the save context survives to every nesting depth.
59284
59999
  */
59285
- serializeGroupChildViaElementWriter(child14, ctx) {
59286
- if (child14.type === "group") {
59287
- const ownEmuOverride = ctx.preserveGroupChildSpace ? resolveGroupChildBoxEmu(child14, ctx.preserveGroupChildSpace, _PptxHandlerRuntime.EMU_PER_PX) : void 0;
59288
- const xml = this.buildGroupShapeXml(child14, ctx, ownEmuOverride);
60000
+ serializeGroupChildViaElementWriter(child16, ctx) {
60001
+ if (child16.type === "group") {
60002
+ const ownEmuOverride = ctx.preserveGroupChildSpace ? resolveGroupChildBoxEmu(child16, ctx.preserveGroupChildSpace, _PptxHandlerRuntime.EMU_PER_PX) : void 0;
60003
+ const xml = this.buildGroupShapeXml(child16, ctx, ownEmuOverride);
59289
60004
  if (!xml) {
59290
60005
  return null;
59291
60006
  }
59292
- this.serializeShapeLocks(xml, child14);
60007
+ this.serializeShapeLocks(xml, child16);
59293
60008
  return { tag: "p:grpSp", xml };
59294
60009
  }
59295
60010
  const collectors = createGroupChildCollectors();
59296
- this.processSlideElement(child14, collectors, ctx);
60011
+ this.processSlideElement(child16, collectors, ctx);
59297
60012
  return pickGroupChildFromCollectors(collectors);
59298
60013
  }
59299
60014
  /**
@@ -59301,46 +60016,46 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
59301
60016
  * markup through and patch only its transform. Preserves everything, but
59302
60017
  * cannot pick up model-level edits.
59303
60018
  */
59304
- serializeGroupChildFromRawXml(child14, childSpace) {
59305
- const emu2 = childSpace ? resolveGroupChildBoxEmu(child14, childSpace, _PptxHandlerRuntime.EMU_PER_PX) : void 0;
59306
- const ownEmuOverride = child14.type === "group" ? emu2 : void 0;
59307
- const xml = this.buildGroupChildXml(child14, ownEmuOverride);
60019
+ serializeGroupChildFromRawXml(child16, childSpace) {
60020
+ const emu2 = childSpace ? resolveGroupChildBoxEmu(child16, childSpace, _PptxHandlerRuntime.EMU_PER_PX) : void 0;
60021
+ const ownEmuOverride = child16.type === "group" ? emu2 : void 0;
60022
+ const xml = this.buildGroupChildXml(child16, ownEmuOverride);
59308
60023
  if (!xml) {
59309
60024
  return null;
59310
60025
  }
59311
- applyGroupChildTransform(xml, child14, _PptxHandlerRuntime.EMU_PER_PX, childSpace, emu2);
59312
- const tag = classifyGroupChildTag(child14.type, xml);
60026
+ applyGroupChildTransform(xml, child16, _PptxHandlerRuntime.EMU_PER_PX, childSpace, emu2);
60027
+ const tag = classifyGroupChildTag(child16.type, xml);
59313
60028
  if (!tag) {
59314
60029
  this.compatibilityService.reportWarning({
59315
60030
  code: "SAVE_GROUP_CHILD_SKIPPED",
59316
- message: `Group child '${child14.id}' (${child14.type}) has no valid CT_GroupShape slot and was skipped during save.`,
60031
+ message: `Group child '${child16.id}' (${child16.type}) has no valid CT_GroupShape slot and was skipped during save.`,
59317
60032
  scope: "save",
59318
- elementId: child14.id
60033
+ elementId: child16.id
59319
60034
  });
59320
60035
  return null;
59321
60036
  }
59322
60037
  return { tag, xml };
59323
60038
  }
59324
60039
  /** Resolve (or fabricate) the XML node for a single group child. */
59325
- buildGroupChildXml(child14, ownEmuOverride) {
59326
- if (child14.type === "group") {
59327
- return this.buildGroupShapeXml(child14, void 0, ownEmuOverride) ?? void 0;
60040
+ buildGroupChildXml(child16, ownEmuOverride) {
60041
+ if (child16.type === "group") {
60042
+ return this.buildGroupShapeXml(child16, void 0, ownEmuOverride) ?? void 0;
59328
60043
  }
59329
- const xml = child14.rawXml;
60044
+ const xml = child16.rawXml;
59330
60045
  if (xml) {
59331
60046
  return xml;
59332
60047
  }
59333
- if (child14.type === "text" || child14.type === "shape") {
59334
- return this.createElementXml(child14);
60048
+ if (child16.type === "text" || child16.type === "shape") {
60049
+ return this.createElementXml(child16);
59335
60050
  }
59336
- if (child14.type === "connector") {
59337
- return this.createConnectorXml(child14);
60051
+ if (child16.type === "connector") {
60052
+ return this.createConnectorXml(child16);
59338
60053
  }
59339
- if (child14.type === "ink") {
59340
- return this.createInkShapeXml(child14);
60054
+ if (child16.type === "ink") {
60055
+ return this.createInkShapeXml(child16);
59341
60056
  }
59342
- if (child14.type === "table") {
59343
- return this.createTableGraphicFrameXml(child14);
60057
+ if (child16.type === "table") {
60058
+ return this.createTableGraphicFrameXml(child16);
59344
60059
  }
59345
60060
  return void 0;
59346
60061
  }
@@ -60186,8 +60901,8 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
60186
60901
  return style;
60187
60902
  }
60188
60903
  if (runProperties["@_sz"]) {
60189
- const points4 = parseInt(runProperties["@_sz"]) / 100;
60190
- style.fontSize = points4 * (96 / 72);
60904
+ const points5 = parseInt(runProperties["@_sz"]) / 100;
60905
+ style.fontSize = points5 * (96 / 72);
60191
60906
  }
60192
60907
  const bold = this.parseOptionalBooleanAttr(runProperties["@_b"]);
60193
60908
  if (bold !== void 0) {
@@ -62366,6 +63081,22 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
62366
63081
  * Record `chartData` as parsed, straight off `enrichChartData`, as this
62367
63082
  * chart's load-time baseline. See {@link chartDataBaselines}.
62368
63083
  */
63084
+ /** The element formats the original chart part authors (see `chart-element-format-read-xml`). */
63085
+ readAuthoredChartElementFormats(chartXmlStr, chartData) {
63086
+ const localName15 = (key2) => this.compatibilityService.getXmlLocalName(key2);
63087
+ const original = this.parser.parse(chartXmlStr);
63088
+ const chartSpace = this.xmlLookupService.getChildByLocalName(original, "chartSpace");
63089
+ const plotArea = this.xmlLookupService.getChildByLocalName(
63090
+ this.xmlLookupService.getChildByLocalName(chartSpace, "chart"),
63091
+ "plotArea"
63092
+ );
63093
+ return readChartElementFormatsFromXml(
63094
+ { chartSpace, seriesNodes: collectChartSeriesNodes(plotArea, localName15) },
63095
+ chartData,
63096
+ localName15,
63097
+ (node) => this.parseColor(node)
63098
+ );
63099
+ }
62369
63100
  rememberChartDataBaseline(chartData) {
62370
63101
  if (!chartData.chartPartPath) {
62371
63102
  return;
@@ -62438,6 +63169,7 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
62438
63169
  try {
62439
63170
  const chartXmlStr = await chartFile.async("string");
62440
63171
  const chartXmlData = this.parser.parse(chartXmlStr);
63172
+ const authoredFormats = chartData.elementFormats ? this.readAuthoredChartElementFormats(chartXmlStr, chartData) : void 0;
62441
63173
  const workbookWrites = [];
62442
63174
  const chartSpace = this.xmlLookupService.getChildByLocalName(chartXmlData, "chartSpace");
62443
63175
  if (!chartSpace) {
@@ -62687,6 +63419,14 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
62687
63419
  (key2) => this.compatibilityService.getXmlLocalName(key2)
62688
63420
  );
62689
63421
  }
63422
+ if (chartData.elementFormats) {
63423
+ applySeriesElementFormatsToXml(
63424
+ this.xmlLookupService.getChildrenArrayByLocalName(chartTypeContainer, "ser"),
63425
+ chartData,
63426
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
63427
+ authoredFormats
63428
+ );
63429
+ }
62690
63430
  if (chartData.series.some((s) => s.seriesChartType !== void 0)) {
62691
63431
  applyComboSeriesTypesToXml(
62692
63432
  plotArea,
@@ -63010,6 +63750,14 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
63010
63750
  }
63011
63751
  );
63012
63752
  }
63753
+ if (chartData.elementFormats) {
63754
+ applyChromeElementFormatsToXml(
63755
+ chartSpace,
63756
+ chartData,
63757
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
63758
+ authoredFormats
63759
+ );
63760
+ }
63013
63761
  for (const key2 of Object.keys(plotArea)) {
63014
63762
  const local = this.compatibilityService.getXmlLocalName(key2);
63015
63763
  if (!local.endsWith("Chart")) {
@@ -63582,14 +64330,14 @@ function applySmartArtColorStyleLabels(node, labels, localName15) {
63582
64330
  }
63583
64331
 
63584
64332
  // pptx/core/core/runtime/smartart-colors-builder.ts
63585
- function asObject2(value) {
64333
+ function asObject3(value) {
63586
64334
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
63587
64335
  }
63588
64336
  function toArray4(value) {
63589
64337
  if (Array.isArray(value)) {
63590
- return value.filter((entry2) => Boolean(asObject2(entry2)));
64338
+ return value.filter((entry2) => Boolean(asObject3(entry2)));
63591
64339
  }
63592
- const obj = asObject2(value);
64340
+ const obj = asObject3(value);
63593
64341
  return obj ? [obj] : [];
63594
64342
  }
63595
64343
  function findKey23(obj, name, getLocalName2) {
@@ -63615,13 +64363,13 @@ function applyColorToList(list, value, getLocalName2, resolveColor2) {
63615
64363
  }
63616
64364
  const existing = list[colorKey];
63617
64365
  if (resolveColor2) {
63618
- const authored = asObject2(Array.isArray(existing) ? existing[0] : existing);
64366
+ const authored = asObject3(Array.isArray(existing) ? existing[0] : existing);
63619
64367
  const authoredHex = authored ? resolveColor2({ [colorKey]: authored }) : void 0;
63620
64368
  if (authoredHex && colorsEqual(authoredHex, value)) {
63621
64369
  return;
63622
64370
  }
63623
64371
  }
63624
- const rest = Array.isArray(existing) ? existing.slice(1).filter((entry2) => Boolean(asObject2(entry2))) : [];
64372
+ const rest = Array.isArray(existing) ? existing.slice(1).filter((entry2) => Boolean(asObject3(entry2))) : [];
63625
64373
  if (colorKey !== "a:srgbClr") {
63626
64374
  delete list[colorKey];
63627
64375
  }
@@ -63636,7 +64384,7 @@ function applyColorListValues(list, values, getLocalName2, resolveColor2) {
63636
64384
  const existing = Array.isArray(existingRaw) ? existingRaw : existingRaw ? [existingRaw] : [];
63637
64385
  if (resolveColor2 && colorKey && existing.length === values.length) {
63638
64386
  const unchanged2 = existing.every((entryRaw, index) => {
63639
- const entry2 = asObject2(entryRaw);
64387
+ const entry2 = asObject3(entryRaw);
63640
64388
  const authoredHex = entry2 ? resolveColor2({ [colorKey]: entry2 }) : void 0;
63641
64389
  return authoredHex !== void 0 && colorsEqual(authoredHex, values[index]);
63642
64390
  });
@@ -63661,14 +64409,14 @@ function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
63661
64409
  }
63662
64410
  const fillKey = findKey23(label, "fillClrLst", getLocalName2);
63663
64411
  if (fillKey) {
63664
- const list = asObject2(label[fillKey]);
64412
+ const list = asObject3(label[fillKey]);
63665
64413
  if (list && applyColorListValues(list, role.fill, getLocalName2, resolveColor2)) {
63666
64414
  mutated = true;
63667
64415
  }
63668
64416
  }
63669
64417
  const lineKey = findKey23(label, "linClrLst", getLocalName2);
63670
64418
  if (lineKey) {
63671
- const list = asObject2(label[lineKey]);
64419
+ const list = asObject3(label[lineKey]);
63672
64420
  if (list && applyColorListValues(list, role.line, getLocalName2, resolveColor2)) {
63673
64421
  mutated = true;
63674
64422
  }
@@ -63700,7 +64448,7 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
63700
64448
  const fillKey = findKey23(label, "fillClrLst", getLocalName2);
63701
64449
  if (fillKey) {
63702
64450
  const value = transform2.fillColors[fillIndex++];
63703
- const list = asObject2(label[fillKey]);
64451
+ const list = asObject3(label[fillKey]);
63704
64452
  if (list && value) {
63705
64453
  applyColorToList(list, value, getLocalName2, resolveColor2);
63706
64454
  mutated = true;
@@ -63709,7 +64457,7 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
63709
64457
  const lineKey = findKey23(label, "linClrLst", getLocalName2);
63710
64458
  if (lineKey) {
63711
64459
  const value = transform2.lineColors[lineIndex++];
63712
- const list = asObject2(label[lineKey]);
64460
+ const list = asObject3(label[lineKey]);
63713
64461
  if (list && value) {
63714
64462
  applyColorToList(list, value, getLocalName2, resolveColor2);
63715
64463
  mutated = true;
@@ -63720,30 +64468,30 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
63720
64468
  }
63721
64469
 
63722
64470
  // pptx/core/core/runtime/smartart-node-synthesis.ts
63723
- function prSetOf2(pt) {
63724
- const prSet = pt["dgm:prSet"];
64471
+ function prSetOf2(pt2) {
64472
+ const prSet = pt2["dgm:prSet"];
63725
64473
  return prSet && typeof prSet === "object" && !Array.isArray(prSet) ? prSet : {};
63726
64474
  }
63727
64475
  function findPresPointForAssoc(pts, assocId) {
63728
64476
  return pts.find(
63729
- (pt) => pt["@_type"] === "pres" && String(prSetOf2(pt)["@_presAssocID"] || "") === assocId
64477
+ (pt2) => pt2["@_type"] === "pres" && String(prSetOf2(pt2)["@_presAssocID"] || "") === assocId
63730
64478
  );
63731
64479
  }
63732
64480
  function maxPresParOfOrd(cxns, srcId) {
63733
64481
  return cxns.filter((c) => c["@_type"] === "presParOf" && c["@_srcId"] === srcId).reduce((max, c) => Math.max(max, parseInt(String(c["@_srcOrd"] ?? ""), 10) || 0), -1);
63734
64482
  }
63735
64483
  function countNodePresPoints(pts) {
63736
- return pts.filter((pt) => pt["@_type"] === "pres" && prSetOf2(pt)["@_presName"] === "node").length;
64484
+ return pts.filter((pt2) => pt2["@_type"] === "pres" && prSetOf2(pt2)["@_presName"] === "node").length;
63737
64485
  }
63738
64486
  function emptyTextBody() {
63739
64487
  return { "a:bodyPr": {}, "a:lstStyle": {}, "a:p": { "a:endParaRPr": { "@_lang": "en-US" } } };
63740
64488
  }
63741
64489
  function buildContentPoint(node) {
63742
- const pt = { "@_modelId": node.id };
63743
- pt["dgm:prSet"] = node.text ? {} : { "@_phldrT": "[Text]" };
63744
- pt["dgm:spPr"] = {};
63745
- pt["dgm:t"] = shouldRebuildFromParagraphs(node) ? buildPointFromParagraphs(node.paragraphs, node.text) : shouldRebuildFromRuns(node) ? buildPointFromRuns(node.runs) : buildPointText(node.text ?? "");
63746
- return pt;
64490
+ const pt2 = { "@_modelId": node.id };
64491
+ pt2["dgm:prSet"] = node.text ? {} : { "@_phldrT": "[Text]" };
64492
+ pt2["dgm:spPr"] = {};
64493
+ pt2["dgm:t"] = shouldRebuildFromParagraphs(node) ? buildPointFromParagraphs(node.paragraphs, node.text) : shouldRebuildFromRuns(node) ? buildPointFromRuns(node.runs) : buildPointText(node.text ?? "");
64494
+ return pt2;
63747
64495
  }
63748
64496
  function buildTransPoint(id, type) {
63749
64497
  return { "@_modelId": id, "@_type": type, "dgm:prSet": {}, "dgm:t": emptyTextBody() };
@@ -63806,7 +64554,7 @@ function buildPresParOfConnection(srcId, destId, srcOrd, presId) {
63806
64554
  }
63807
64555
  function synthesizeNewSmartArtStructuralPoints(existingPts, existingCxns, nodes, connections) {
63808
64556
  const existingContentIds = new Set(
63809
- existingPts.filter(isContentPoint).map((pt) => String(pt["@_modelId"] || ""))
64557
+ existingPts.filter(isContentPoint).map((pt2) => String(pt2["@_modelId"] || ""))
63810
64558
  );
63811
64559
  const newNodes = nodes.filter((n) => n.id && !existingContentIds.has(n.id));
63812
64560
  if (newNodes.length === 0) {
@@ -63842,9 +64590,9 @@ function synthesizeNewSmartArtStructuralPoints(existingPts, existingCxns, nodes,
63842
64590
  pts.push(buildPresNodePoint(presNodeId, node.id, idx, idx + 1));
63843
64591
  pts.push(buildPresSibTransPoint(presSibTransId, sibTransId));
63844
64592
  const total = idx + 1;
63845
- for (const pt of pts) {
63846
- if (pt["@_type"] === "pres" && prSetOf2(pt)["@_presName"] === "node") {
63847
- prSetOf2(pt)["@_presStyleCnt"] = String(total);
64593
+ for (const pt2 of pts) {
64594
+ if (pt2["@_type"] === "pres" && prSetOf2(pt2)["@_presName"] === "node") {
64595
+ prSetOf2(pt2)["@_presStyleCnt"] = String(total);
63848
64596
  }
63849
64597
  }
63850
64598
  const srcOrd = connectionByChildId.get(node.id)?.srcOrd ?? 0;
@@ -63936,7 +64684,7 @@ function applySmartArtQuickStyle(styleDef, quickStyle, localName15, intensity) {
63936
64684
  }
63937
64685
 
63938
64686
  // pptx/core/core/runtime/smartart-save-chrome.ts
63939
- function asObject3(value) {
64687
+ function asObject4(value) {
63940
64688
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
63941
64689
  }
63942
64690
  function applySmartArtChrome(dataModel, chrome, getLocalName2) {
@@ -63946,14 +64694,14 @@ function applySmartArtChrome(dataModel, chrome, getLocalName2) {
63946
64694
  const findKey24 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
63947
64695
  if (chrome.backgroundFillXml) {
63948
64696
  const bgKey = findKey24(dataModel, "bg") ?? "dgm:bg";
63949
- const bg = asObject3(dataModel[bgKey]);
64697
+ const bg = asObject4(dataModel[bgKey]);
63950
64698
  const fillKey = findKey24(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
63951
64699
  bg[fillKey] = chrome.backgroundFillXml.xml;
63952
64700
  dataModel[bgKey] = bg;
63953
64701
  } else if (chrome.backgroundColor) {
63954
64702
  const hex3 = chrome.backgroundColor.replace("#", "");
63955
64703
  const bgKey = findKey24(dataModel, "bg") ?? "dgm:bg";
63956
- const bg = asObject3(dataModel[bgKey]);
64704
+ const bg = asObject4(dataModel[bgKey]);
63957
64705
  const fillKey = findKey24(bg, "solidFill") ?? "a:solidFill";
63958
64706
  bg[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
63959
64707
  dataModel[bgKey] = bg;
@@ -63961,9 +64709,9 @@ function applySmartArtChrome(dataModel, chrome, getLocalName2) {
63961
64709
  const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
63962
64710
  if (chrome.outlineColor || hasOutlineWidth) {
63963
64711
  const wholeKey = findKey24(dataModel, "whole") ?? "dgm:whole";
63964
- const whole = asObject3(dataModel[wholeKey]);
64712
+ const whole = asObject4(dataModel[wholeKey]);
63965
64713
  const lnKey = findKey24(whole, "ln") ?? "a:ln";
63966
- const ln = asObject3(whole[lnKey]);
64714
+ const ln = asObject4(whole[lnKey]);
63967
64715
  if (hasOutlineWidth) {
63968
64716
  ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
63969
64717
  }
@@ -64145,8 +64893,8 @@ function applySmartArtLayoutIdentity(dataModel, layout, localName15) {
64145
64893
  const pointListKey = Object.keys(dataModel).find((key2) => localName15(key2) === "ptLst");
64146
64894
  const pointList = pointListKey ? dataModel[pointListKey] : void 0;
64147
64895
  const pointKey = pointList ? Object.keys(pointList).find((key2) => localName15(key2) === "pt") : void 0;
64148
- const points4 = pointKey && pointList ? ensureObjects(pointList[pointKey]) : [];
64149
- const docPoint = points4.find((point) => String(point["@_type"] || "") === "doc");
64896
+ const points5 = pointKey && pointList ? ensureObjects(pointList[pointKey]) : [];
64897
+ const docPoint = points5.find((point) => String(point["@_type"] || "") === "doc");
64150
64898
  if (!docPoint) {
64151
64899
  return;
64152
64900
  }
@@ -64157,9 +64905,9 @@ function applySmartArtLayoutIdentity(dataModel, layout, localName15) {
64157
64905
  propertySet["@_loCatId"] = layout.category;
64158
64906
  }
64159
64907
  }
64160
- function presentationIdsFromPoints(points4, localName15) {
64908
+ function presentationIdsFromPoints(points5, localName15) {
64161
64909
  const result = /* @__PURE__ */ new Map();
64162
- for (const point of points4) {
64910
+ for (const point of points5) {
64163
64911
  if (String(point["@_type"] || "") !== "pres") {
64164
64912
  continue;
64165
64913
  }
@@ -68069,8 +68817,8 @@ function prescanStructuralPart(xml) {
68069
68817
  let placeholderCasing = false;
68070
68818
  for (const match of xml.matchAll(PH_TYPE_RE)) {
68071
68819
  const raw = match[1] ?? match[2] ?? "";
68072
- const canonical = canonicalPlaceholderType(raw);
68073
- if (canonical !== void 0 && canonical !== raw) {
68820
+ const canonical2 = canonicalPlaceholderType(raw);
68821
+ if (canonical2 !== void 0 && canonical2 !== raw) {
68074
68822
  placeholderCasing = true;
68075
68823
  break;
68076
68824
  }
@@ -68100,8 +68848,8 @@ function countDeclaredIds(node, counts, ensureArray12) {
68100
68848
  counts.set(id, (counts.get(id) ?? 0) + 1);
68101
68849
  }
68102
68850
  for (const listKey of SHAPE_LISTS) {
68103
- for (const child14 of ensureArray12(node[listKey])) {
68104
- if (!countDeclaredIds(child14, counts, ensureArray12)) {
68851
+ for (const child16 of ensureArray12(node[listKey])) {
68852
+ if (!countDeclaredIds(child16, counts, ensureArray12)) {
68105
68853
  return false;
68106
68854
  }
68107
68855
  }
@@ -69348,8 +70096,8 @@ var PptxHandlerRuntime42 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
69348
70096
  }
69349
70097
  }
69350
70098
  for (const listKey of ["p:sp", "p:pic", "p:cxnSp", "p:graphicFrame", "p:grpSp"]) {
69351
- for (const child14 of this.ensureArray(node[listKey])) {
69352
- visit(child14);
70099
+ for (const child16 of this.ensureArray(node[listKey])) {
70100
+ visit(child16);
69353
70101
  }
69354
70102
  }
69355
70103
  };
@@ -69980,11 +70728,11 @@ function scanSpTreeDocumentOrder(xml) {
69980
70728
  const frame = stack[stack.length - 1];
69981
70729
  const indexInType = frame.counters.get(tag) ?? 0;
69982
70730
  frame.counters.set(tag, indexInType + 1);
69983
- const children5 = [];
69984
- frame.children.push({ tag, indexInType, children: children5 });
70731
+ const children6 = [];
70732
+ frame.children.push({ tag, indexInType, children: children6 });
69985
70733
  if (!selfClosing) {
69986
70734
  if (tag === GROUP_TAG) {
69987
- stack.push({ children: children5, counters: /* @__PURE__ */ new Map() });
70735
+ stack.push({ children: children6, counters: /* @__PURE__ */ new Map() });
69988
70736
  } else {
69989
70737
  inert++;
69990
70738
  }
@@ -73161,8 +73909,8 @@ var PptxHandlerRuntime62 = class extends PptxHandlerRuntime61 {
73161
73909
  textStyle.textWrap = defaults.textWrap;
73162
73910
  }
73163
73911
  }
73164
- pointsToPixels(points4) {
73165
- return points4 * (96 / 72);
73912
+ pointsToPixels(points5) {
73913
+ return points5 * (96 / 72);
73166
73914
  }
73167
73915
  parseParagraphSpacingPx(spacingNode, basisFontSizePx) {
73168
73916
  return parseParagraphSpacingPx(spacingNode, basisFontSizePx);
@@ -75628,11 +76376,11 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
75628
76376
  grpSpPr?.["a:xfrm"],
75629
76377
  _PptxHandlerRuntime.EMU_PER_PX
75630
76378
  );
75631
- const round2 = depth === 0 ? Math.round : (value) => value;
75632
- const parentX = round2(raw.parentX);
75633
- const parentY = round2(raw.parentY);
75634
- const parentW = round2(raw.parentW);
75635
- const parentH = round2(raw.parentH);
76379
+ const round3 = depth === 0 ? Math.round : (value) => value;
76380
+ const parentX = round3(raw.parentX);
76381
+ const parentY = round3(raw.parentY);
76382
+ const parentW = round3(raw.parentW);
76383
+ const parentH = round3(raw.parentH);
75636
76384
  const grpFillStyle = grpSpPr ? this.extractShapeStyle(grpSpPr) : void 0;
75637
76385
  if (grpFillStyle?.fillMode === "image" && grpSpPr) {
75638
76386
  const blipFill = grpSpPr["a:blipFill"];
@@ -75647,16 +76395,16 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
75647
76395
  }
75648
76396
  }
75649
76397
  const hasGroupFill = grpFillStyle && grpFillStyle.fillMode && grpFillStyle.fillMode !== "none";
75650
- const children5 = await this.parseGroupShape(group, baseId, slidePath, rawXmlStr, depth);
75651
- if (children5.length === 0) {
76398
+ const children6 = await this.parseGroupShape(group, baseId, slidePath, rawXmlStr, depth);
76399
+ if (children6.length === 0) {
75652
76400
  return null;
75653
76401
  }
75654
76402
  if (hasGroupFill && grpFillStyle.fillMode !== "group") {
75655
- applyGroupFillInheritance(children5, grpFillStyle);
76403
+ applyGroupFillInheritance(children6, grpFillStyle);
75656
76404
  }
75657
76405
  if (raw.rotation || raw.flipHorizontal || raw.flipVertical) {
75658
76406
  applyAncestorGroupTextTransform(
75659
- children5,
76407
+ children6,
75660
76408
  getElementOrientationMatrix({
75661
76409
  rotation: raw.rotation,
75662
76410
  flipHorizontal: raw.flipHorizontal,
@@ -75664,9 +76412,9 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
75664
76412
  })
75665
76413
  );
75666
76414
  }
75667
- for (const child14 of children5) {
75668
- child14.x -= raw.parentX;
75669
- child14.y -= raw.parentY;
76415
+ for (const child16 of children6) {
76416
+ child16.x -= raw.parentX;
76417
+ child16.y -= raw.parentY;
75670
76418
  }
75671
76419
  const grpCNvPr = group?.["p:nvGrpSpPr"]?.["p:cNvPr"];
75672
76420
  const grpSlideRels = this.slideRelsMap.get(slidePath);
@@ -75686,8 +76434,8 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
75686
76434
  name: grpElementName || void 0,
75687
76435
  x: parentX,
75688
76436
  y: parentY,
75689
- width: parentW || Math.max(...children5.map((c) => c.x + c.width)),
75690
- height: parentH || Math.max(...children5.map((c) => c.y + c.height)),
76437
+ width: parentW || Math.max(...children6.map((c) => c.x + c.width)),
76438
+ height: parentH || Math.max(...children6.map((c) => c.y + c.height)),
75691
76439
  // Exact EMU for `resolveXfrmEmu` (xfrm-emu-resolution.ts) to re-emit
75692
76440
  // byte-identical on save for an unmoved/unresized TOP-LEVEL group.
75693
76441
  // `width`/`height` fall back to a computed bounding box when the
@@ -75723,7 +76471,7 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
75723
76471
  rotation: raw.rotation,
75724
76472
  flipHorizontal: raw.flipHorizontal || void 0,
75725
76473
  flipVertical: raw.flipVertical || void 0,
75726
- children: children5,
76474
+ children: children6,
75727
76475
  rawXml: group,
75728
76476
  actionClick: grpActionClick,
75729
76477
  actionHover: grpActionHover,
@@ -80193,8 +80941,8 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
80193
80941
  const connectionList = this.xmlLookupService.getChildByLocalName(dataModel, "cxnLst");
80194
80942
  const rawConnections = this.xmlLookupService.getChildrenArrayByLocalName(connectionList, "cxn");
80195
80943
  const pointList = this.xmlLookupService.getChildByLocalName(dataModel, "ptLst");
80196
- const points4 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
80197
- const transitionTextById = collectSmartArtTransitionText(points4, (point) => {
80944
+ const points5 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
80945
+ const transitionTextById = collectSmartArtTransitionText(points5, (point) => {
80198
80946
  const values = [];
80199
80947
  this.collectLocalTextValues(point, "t", values);
80200
80948
  return values.join("");
@@ -80569,11 +81317,11 @@ var PptxHandlerRuntime89 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
80569
81317
  }
80570
81318
  const dataModel = this.xmlLookupService.getChildByLocalName(diagramDataPart.xml, "dataModel");
80571
81319
  const pointList = this.xmlLookupService.getChildByLocalName(dataModel, "ptLst");
80572
- const points4 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
81320
+ const points5 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
80573
81321
  const { parsedConnections, parentByNodeId } = this.parseSmartArtConnections(dataModel);
80574
81322
  const localName15 = (key2) => this.compatibilityService.getXmlLocalName(key2);
80575
- const metadataOf = resolveSmartArtPointMetadata(points4, parsedConnections, localName15);
80576
- const nodes = points4.filter(isContentPoint).map((point) => {
81323
+ const metadataOf = resolveSmartArtPointMetadata(points5, parsedConnections, localName15);
81324
+ const nodes = points5.filter(isContentPoint).map((point) => {
80577
81325
  const pointId = String(point?.["@_modelId"] || "").trim();
80578
81326
  if (pointId.length === 0) {
80579
81327
  return null;
@@ -80636,7 +81384,7 @@ var PptxHandlerRuntime89 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
80636
81384
  const drawingShapes = drawingResolution ? await this.parseSmartArtDrawingShapesFromPath(
80637
81385
  drawingResolution.path,
80638
81386
  resolveSmartArtMergedTextColors(
80639
- points4,
81387
+ points5,
80640
81388
  parsedConnections,
80641
81389
  layoutDefinition,
80642
81390
  colorTransform?.roleColors,
@@ -80803,11 +81551,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
80803
81551
  const cacheName = preferNumeric ? "numCache" : "strCache";
80804
81552
  const referenceNode = this.xmlLookupService.getChildByLocalName(seriesContainer, refName) || this.xmlLookupService.getChildByLocalName(seriesContainer, literalName);
80805
81553
  const cacheNode = this.xmlLookupService.getChildByLocalName(referenceNode, cacheName) || referenceNode;
80806
- const points4 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
80807
- if (points4.length === 0) {
81554
+ const points5 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
81555
+ if (points5.length === 0) {
80808
81556
  return [];
80809
81557
  }
80810
- return [...points4].sort((left, right) => {
81558
+ return [...points5].sort((left, right) => {
80811
81559
  const leftIndex = Number.parseInt(String(left?.["@_idx"] || "0"), 10);
80812
81560
  const rightIndex = Number.parseInt(String(right?.["@_idx"] || "0"), 10);
80813
81561
  return leftIndex - rightIndex;
@@ -80842,13 +81590,13 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
80842
81590
  const cacheName = preferNumeric ? "numCache" : "strCache";
80843
81591
  const referenceNode = this.xmlLookupService.getChildByLocalName(categoryContainer, refName) || this.xmlLookupService.getChildByLocalName(categoryContainer, literalName);
80844
81592
  const cacheNode = this.xmlLookupService.getChildByLocalName(referenceNode, cacheName) || referenceNode;
80845
- const points4 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
80846
- if (points4.length === 0) {
81593
+ const points5 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
81594
+ if (points5.length === 0) {
80847
81595
  return [];
80848
81596
  }
80849
81597
  const byIndex = /* @__PURE__ */ new Map();
80850
81598
  let maxIndex = -1;
80851
- for (const point of points4) {
81599
+ for (const point of points5) {
80852
81600
  const index = Number.parseInt(String(point?.["@_idx"] ?? "0"), 10);
80853
81601
  if (!Number.isFinite(index) || index < 0) {
80854
81602
  continue;
@@ -81020,11 +81768,11 @@ var PptxHandlerRuntime91 = class extends PptxHandlerRuntime90 {
81020
81768
  }
81021
81769
  const custSplitNode = this.xmlLookupService.getChildByLocalName(ofPieContainer, "custSplit");
81022
81770
  if (custSplitNode) {
81023
- const points4 = this.xmlLookupService.getChildrenArrayByLocalName(
81771
+ const points5 = this.xmlLookupService.getChildrenArrayByLocalName(
81024
81772
  custSplitNode,
81025
81773
  "secondPiePt"
81026
81774
  );
81027
- const indices = points4.map((p) => parseNumberVal(p)).filter((n) => n !== void 0 && Number.isFinite(n));
81775
+ const indices = points5.map((p) => parseNumberVal(p)).filter((n) => n !== void 0 && Number.isFinite(n));
81028
81776
  if (indices.length > 0) {
81029
81777
  result.custSplit = indices;
81030
81778
  }
@@ -81749,7 +82497,7 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
81749
82497
  */
81750
82498
  readChartLinesAndChrome(neutral, tree, groups, reader) {
81751
82499
  const colorAdapter = { parseColor: reader.parseColor };
81752
- const container = (child14) => (groups.find(({ group }) => chartContainerAllows(group.element, child14)) ?? groups[0])?.node;
82500
+ const container = (child16) => (groups.find(({ group }) => chartContainerAllows(group.element, child16)) ?? groups[0])?.node;
81753
82501
  const dropLines = parseLineStyle(container("dropLines"), "dropLines", reader.xml, colorAdapter);
81754
82502
  const hiLowLines = parseLineStyle(
81755
82503
  container("hiLowLines"),
@@ -81848,6 +82596,12 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
81848
82596
  const view3D = view3DFromNeutral(neutral);
81849
82597
  const chartChrome = chartChromeFromNeutral(neutral);
81850
82598
  const themeAccentColors = this.resolveChartThemeAccents();
82599
+ const elementFormats = readChartElementFormatsFromXml(
82600
+ { chartSpace, seriesNodes: built.seriesNodes },
82601
+ { axes },
82602
+ reader.localName,
82603
+ (node) => reader.parseColor(node)
82604
+ );
81851
82605
  return {
81852
82606
  chartType,
81853
82607
  categories: filled.categories,
@@ -81873,6 +82627,7 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
81873
82627
  chartRelationshipId,
81874
82628
  ...linesAndChrome,
81875
82629
  ...axes.length > 0 ? { axes } : {},
82630
+ ...elementFormats ? { elementFormats } : {},
81876
82631
  ...bandFmts ? { bandFmts } : {},
81877
82632
  ...facts,
81878
82633
  ...neutral.plotVisibleOnly !== void 0 ? { plotVisibleOnly: neutral.plotVisibleOnly } : {},
@@ -83720,16 +84475,16 @@ function parseExHyperlinkContainer(view, container) {
83720
84475
  }
83721
84476
  const id = view.getUint32(atom2.dataOffset, true);
83722
84477
  const strings = {};
83723
- for (const child14 of iterateChildren(view, container)) {
83724
- if (child14.recType !== RT.CString) {
84478
+ for (const child16 of iterateChildren(view, container)) {
84479
+ if (child16.recType !== RT.CString) {
83725
84480
  continue;
83726
84481
  }
83727
- if (child14.recInstance === 0) {
83728
- strings.friendlyName = readCString(view, child14);
83729
- } else if (child14.recInstance === 1) {
83730
- strings.target = readCString(view, child14);
83731
- } else if (child14.recInstance === 3) {
83732
- strings.location = readCString(view, child14);
84482
+ if (child16.recInstance === 0) {
84483
+ strings.friendlyName = readCString(view, child16);
84484
+ } else if (child16.recInstance === 1) {
84485
+ strings.target = readCString(view, child16);
84486
+ } else if (child16.recInstance === 3) {
84487
+ strings.location = readCString(view, child16);
83733
84488
  }
83734
84489
  }
83735
84490
  return { id, strings };
@@ -83740,11 +84495,11 @@ function parseHyperlinkStrings(view, docContainer) {
83740
84495
  if (!exObjList) {
83741
84496
  return result;
83742
84497
  }
83743
- for (const child14 of iterateChildren(view, exObjList)) {
83744
- if (child14.recType !== RT.ExternalHyperlink) {
84498
+ for (const child16 of iterateChildren(view, exObjList)) {
84499
+ if (child16.recType !== RT.ExternalHyperlink) {
83745
84500
  continue;
83746
84501
  }
83747
- const parsed = parseExHyperlinkContainer(view, child14);
84502
+ const parsed = parseExHyperlinkContainer(view, child16);
83748
84503
  if (parsed) {
83749
84504
  result.set(parsed.id, parsed.strings);
83750
84505
  }
@@ -83814,9 +84569,9 @@ function collectTextHyperlinkRanges(view, start, end, hyperlinkStrings) {
83814
84569
  return ranges;
83815
84570
  }
83816
84571
  function resolveShapeInteractiveInfo(view, clientData, hyperlinkStrings) {
83817
- for (const child14 of iterateChildren(view, clientData)) {
83818
- if (child14.recType === RT.InteractiveInfo && child14.recInstance === 0) {
83819
- const atom2 = findChild2(view, child14, RT.InteractiveInfoAtom);
84572
+ for (const child16 of iterateChildren(view, clientData)) {
84573
+ if (child16.recType === RT.InteractiveInfo && child16.recInstance === 0) {
84574
+ const atom2 = findChild2(view, child16, RT.InteractiveInfoAtom);
83820
84575
  if (atom2) {
83821
84576
  return resolveInteractiveInfoTarget(view, atom2, hyperlinkStrings);
83822
84577
  }
@@ -84011,11 +84766,11 @@ function parseOleEmbedRefs(view, docContainer) {
84011
84766
  if (!exObjList) {
84012
84767
  return result;
84013
84768
  }
84014
- for (const child14 of iterateChildren(view, exObjList)) {
84015
- if (child14.recType !== RT.ExternalOleEmbed) {
84769
+ for (const child16 of iterateChildren(view, exObjList)) {
84770
+ if (child16.recType !== RT.ExternalOleEmbed) {
84016
84771
  continue;
84017
84772
  }
84018
- const parsed = parseOleEmbedContainer(view, child14);
84773
+ const parsed = parseOleEmbedContainer(view, child16);
84019
84774
  if (parsed) {
84020
84775
  result.set(parsed.exObjId, parsed.ref);
84021
84776
  }
@@ -84865,22 +85620,22 @@ function parseShape(ctx, container) {
84865
85620
  return shape;
84866
85621
  }
84867
85622
  function parseGroup2(ctx, container) {
84868
- const children5 = [];
85623
+ const children6 = [];
84869
85624
  let groupShape;
84870
85625
  let first2 = true;
84871
- for (const child14 of iterateChildren(ctx.view, container)) {
84872
- if (child14.recType === OA.SpContainer && first2) {
84873
- groupShape = child14;
85626
+ for (const child16 of iterateChildren(ctx.view, container)) {
85627
+ if (child16.recType === OA.SpContainer && first2) {
85628
+ groupShape = child16;
84874
85629
  first2 = false;
84875
- } else if (child14.recType === OA.SpContainer) {
84876
- const shape = parseShape(ctx, child14);
85630
+ } else if (child16.recType === OA.SpContainer) {
85631
+ const shape = parseShape(ctx, child16);
84877
85632
  if (shape) {
84878
- children5.push(shape);
85633
+ children6.push(shape);
84879
85634
  }
84880
- } else if (child14.recType === OA.SpgrContainer) {
84881
- const group = parseGroup2(ctx, child14);
85635
+ } else if (child16.recType === OA.SpgrContainer) {
85636
+ const group = parseGroup2(ctx, child16);
84882
85637
  if (group) {
84883
- children5.push(group);
85638
+ children6.push(group);
84884
85639
  }
84885
85640
  }
84886
85641
  }
@@ -84892,14 +85647,14 @@ function parseGroup2(ctx, container) {
84892
85647
  const childAnchorRec = findChild2(ctx.view, groupShape, OA.ChildAnchor);
84893
85648
  const anchor = anchorRec ? readClientAnchor(ctx.view, anchorRec) : childAnchorRec ? readChildAnchor(ctx.view, childAnchorRec) : void 0;
84894
85649
  const childRect = fspgr && fspgr.recLen >= 16 ? readChildAnchor(ctx.view, fspgr) : void 0;
84895
- if (children5.length === 0) {
85650
+ if (children6.length === 0) {
84896
85651
  return void 0;
84897
85652
  }
84898
85653
  return {
84899
85654
  kind: "group",
84900
85655
  anchor,
84901
85656
  childRect: childRect ?? anchor ?? { x: 0, y: 0, w: 0, h: 0 },
84902
- children: children5
85657
+ children: children6
84903
85658
  };
84904
85659
  }
84905
85660
  function parseDrawing(ctx, dgContainer) {
@@ -84909,31 +85664,31 @@ function parseDrawing(ctx, dgContainer) {
84909
85664
  return result;
84910
85665
  }
84911
85666
  let first2 = true;
84912
- for (const child14 of iterateChildren(ctx.view, topGroup)) {
84913
- if (child14.recType === OA.SpContainer) {
85667
+ for (const child16 of iterateChildren(ctx.view, topGroup)) {
85668
+ if (child16.recType === OA.SpContainer) {
84914
85669
  if (first2) {
84915
85670
  first2 = false;
84916
85671
  continue;
84917
85672
  }
84918
- const backgroundRgb = extractBackground(ctx, child14);
85673
+ const backgroundRgb = extractBackground(ctx, child16);
84919
85674
  if (backgroundRgb !== void 0) {
84920
85675
  result.backgroundRgb = backgroundRgb;
84921
85676
  continue;
84922
85677
  }
84923
- const shape = parseShape(ctx, child14);
85678
+ const shape = parseShape(ctx, child16);
84924
85679
  if (shape) {
84925
85680
  result.shapes.push(shape);
84926
85681
  }
84927
- } else if (child14.recType === OA.SpgrContainer) {
84928
- const group = parseGroup2(ctx, child14);
85682
+ } else if (child16.recType === OA.SpgrContainer) {
85683
+ const group = parseGroup2(ctx, child16);
84929
85684
  if (group) {
84930
85685
  result.shapes.push(group);
84931
85686
  }
84932
- } else if (isContainer(child14)) ;
85687
+ } else if (isContainer(child16)) ;
84933
85688
  }
84934
- for (const child14 of iterateChildren(ctx.view, dgContainer)) {
84935
- if (child14.recType === OA.SpContainer && result.backgroundRgb === void 0) {
84936
- result.backgroundRgb = extractBackground(ctx, child14);
85689
+ for (const child16 of iterateChildren(ctx.view, dgContainer)) {
85690
+ if (child16.recType === OA.SpContainer && result.backgroundRgb === void 0) {
85691
+ result.backgroundRgb = extractBackground(ctx, child16);
84937
85692
  }
84938
85693
  }
84939
85694
  return result;
@@ -85087,14 +85842,14 @@ function parseMasterStyleAtom(view, rec, scheme, fonts) {
85087
85842
  function collectMasterStyles(view, masterContainer, scheme, fonts) {
85088
85843
  let titleStyles = [];
85089
85844
  let bodyStyles = [];
85090
- for (const child14 of iterateChildren(view, masterContainer)) {
85091
- if (child14.recType !== RT.TextMasterStyleAtom) {
85845
+ for (const child16 of iterateChildren(view, masterContainer)) {
85846
+ if (child16.recType !== RT.TextMasterStyleAtom) {
85092
85847
  continue;
85093
85848
  }
85094
- if (child14.recInstance === 0 && titleStyles.length === 0) {
85095
- titleStyles = parseMasterStyleAtom(view, child14, scheme, fonts);
85096
- } else if (child14.recInstance === 1 && bodyStyles.length === 0) {
85097
- bodyStyles = parseMasterStyleAtom(view, child14, scheme, fonts);
85849
+ if (child16.recInstance === 0 && titleStyles.length === 0) {
85850
+ titleStyles = parseMasterStyleAtom(view, child16, scheme, fonts);
85851
+ } else if (child16.recInstance === 1 && bodyStyles.length === 0) {
85852
+ bodyStyles = parseMasterStyleAtom(view, child16, scheme, fonts);
85098
85853
  }
85099
85854
  }
85100
85855
  return { titleStyles, bodyStyles };
@@ -85111,9 +85866,9 @@ function parseFonts(view, docContainer) {
85111
85866
  if (!collection) {
85112
85867
  return fonts;
85113
85868
  }
85114
- for (const child14 of iterateChildren(view, collection)) {
85115
- if (child14.recType === RT.FontEntityAtom) {
85116
- const name = decodeTextChars(view, child14.dataOffset, Math.min(64, child14.recLen));
85869
+ for (const child16 of iterateChildren(view, collection)) {
85870
+ if (child16.recType === RT.FontEntityAtom) {
85871
+ const name = decodeTextChars(view, child16.dataOffset, Math.min(64, child16.recLen));
85117
85872
  const nul = name.indexOf("\0");
85118
85873
  fonts.push(nul >= 0 ? name.slice(0, nul) : name);
85119
85874
  }
@@ -85122,19 +85877,19 @@ function parseFonts(view, docContainer) {
85122
85877
  }
85123
85878
  function readSlidePersistIds(view, slideList) {
85124
85879
  const ids = [];
85125
- for (const child14 of iterateChildren(view, slideList)) {
85126
- if (child14.recType === RT.SlidePersistAtom && child14.recLen >= 4) {
85127
- ids.push(view.getUint32(child14.dataOffset, true));
85880
+ for (const child16 of iterateChildren(view, slideList)) {
85881
+ if (child16.recType === RT.SlidePersistAtom && child16.recLen >= 4) {
85882
+ ids.push(view.getUint32(child16.dataOffset, true));
85128
85883
  }
85129
85884
  }
85130
85885
  return ids;
85131
85886
  }
85132
85887
  function resolveSlideOrder(view, docContainer, directory, scheme) {
85133
- for (const child14 of iterateChildren(view, docContainer)) {
85134
- if (child14.recType === RT.SlideListWithText && child14.recInstance === 0) {
85888
+ for (const child16 of iterateChildren(view, docContainer)) {
85889
+ if (child16.recType === RT.SlideListWithText && child16.recInstance === 0) {
85135
85890
  return {
85136
- persistIds: readSlidePersistIds(view, child14),
85137
- outline: collectOutlineText(view, child14, scheme)
85891
+ persistIds: readSlidePersistIds(view, child16),
85892
+ outline: collectOutlineText(view, child16, scheme)
85138
85893
  };
85139
85894
  }
85140
85895
  }
@@ -85182,9 +85937,9 @@ async function parseDeck(streams) {
85182
85937
  const oleEmbedRefs = parseOleEmbedRefs(view, docContainer);
85183
85938
  const oleExObjIds = new Set(oleEmbedRefs.keys());
85184
85939
  let masterPersistId;
85185
- for (const child14 of iterateChildren(view, docContainer)) {
85186
- if (child14.recType === RT.SlideListWithText && child14.recInstance === 1) {
85187
- const ids = readSlidePersistIds(view, child14);
85940
+ for (const child16 of iterateChildren(view, docContainer)) {
85941
+ if (child16.recType === RT.SlideListWithText && child16.recInstance === 1) {
85942
+ const ids = readSlidePersistIds(view, child16);
85188
85943
  masterPersistId = ids[0];
85189
85944
  break;
85190
85945
  }
@@ -85454,15 +86209,15 @@ function runPropsXml(run, ctx) {
85454
86209
  attrs3.push('u="sng"');
85455
86210
  }
85456
86211
  attrs3.push('dirty="0"');
85457
- let children5 = "";
86212
+ let children6 = "";
85458
86213
  if (run.colorRgb !== void 0) {
85459
- children5 += solidFill(run.colorRgb);
86214
+ children6 += solidFill(run.colorRgb);
85460
86215
  }
85461
86216
  if (run.fontName !== void 0) {
85462
- children5 += `<a:latin typeface="${esc(run.fontName)}"/>`;
86217
+ children6 += `<a:latin typeface="${esc(run.fontName)}"/>`;
85463
86218
  }
85464
- children5 += hyperlinkClickXml(run.hyperlink, ctx.hyperlinkRels, ctx.slideCount);
85465
- return children5.length > 0 ? `<a:rPr ${attrs3.join(" ")}>${children5}</a:rPr>` : `<a:rPr ${attrs3.join(" ")}/>`;
86219
+ children6 += hyperlinkClickXml(run.hyperlink, ctx.hyperlinkRels, ctx.slideCount);
86220
+ return children6.length > 0 ? `<a:rPr ${attrs3.join(" ")}>${children6}</a:rPr>` : `<a:rPr ${attrs3.join(" ")}/>`;
85466
86221
  }
85467
86222
  function runXml(run, ctx) {
85468
86223
  const segments = run.text.split(String.fromCharCode(11));
@@ -85587,8 +86342,8 @@ function picXml(picture, ctx) {
85587
86342
  function grpXml(group, ctx) {
85588
86343
  const id = ctx.nextId();
85589
86344
  const anchor = group.anchor ?? group.childRect;
85590
- const child14 = group.childRect;
85591
- const inner = `<a:chOff x="${emu(child14.x)}" y="${emu(child14.y)}"/><a:chExt cx="${Math.max(0, emu(child14.w))}" cy="${Math.max(0, emu(child14.h))}"/>`;
86345
+ const child16 = group.childRect;
86346
+ const inner = `<a:chOff x="${emu(child16.x)}" y="${emu(child16.y)}"/><a:chExt cx="${Math.max(0, emu(child16.w))}" cy="${Math.max(0, emu(child16.h))}"/>`;
85592
86347
  return `<p:grpSp><p:nvGrpSpPr>${cNvPrXml(id, `Group ${id}`, group.actionClick, ctx)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>${xfrmXml({ ...group, anchor }, inner)}</p:grpSpPr>${group.children.map((c) => shapeXml(c, ctx)).join("")}</p:grpSp>`;
85593
86348
  }
85594
86349
  function shapeXml(shape, ctx) {
@@ -87371,14 +88126,14 @@ function createMediaElement(mediaType, source, options) {
87371
88126
  posterFrameData: options?.posterFrame
87372
88127
  };
87373
88128
  }
87374
- function createGroupElement(children5, options) {
88129
+ function createGroupElement(children6, options) {
87375
88130
  const p = pos("group", options);
87376
88131
  return {
87377
88132
  type: "group",
87378
88133
  id: generateId("grp"),
87379
88134
  ...p,
87380
88135
  rotation: options?.rotation,
87381
- children: children5
88136
+ children: children6
87382
88137
  };
87383
88138
  }
87384
88139
  function createFreeformElement(pathData, options) {
@@ -87465,8 +88220,8 @@ var SlideBuilder = class {
87465
88220
  return this;
87466
88221
  }
87467
88222
  /** Add a group of elements to the slide. */
87468
- addGroup(children5, options) {
87469
- this.slide.elements.push(createGroupElement(children5, options));
88223
+ addGroup(children6, options) {
88224
+ this.slide.elements.push(createGroupElement(children6, options));
87470
88225
  return this;
87471
88226
  }
87472
88227
  /** Add a pre-built element directly. */