pptx-react-viewer 1.25.4 → 1.25.5

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 (98) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{Model3DScene-DZFYJPUH.mjs → Model3DScene-XVYOISVJ.mjs} +2 -2
  3. package/dist/Model3DScene-XVYOISVJ.mjs.br +0 -0
  4. package/dist/Model3DScene-XVYOISVJ.mjs.gz +0 -0
  5. package/dist/{Model3DScene-SP6WOKSX.js → Model3DScene-Y5ABLO7K.js} +3 -3
  6. package/dist/Model3DScene-Y5ABLO7K.js.br +0 -0
  7. package/dist/Model3DScene-Y5ABLO7K.js.gz +0 -0
  8. package/dist/{SurfaceChart3DScene-54BRNPQ5.mjs → SurfaceChart3DScene-RXZADECL.mjs} +2 -2
  9. package/dist/SurfaceChart3DScene-RXZADECL.mjs.br +0 -0
  10. package/dist/SurfaceChart3DScene-RXZADECL.mjs.gz +0 -0
  11. package/dist/{SurfaceChart3DScene-GISPZ4C2.js → SurfaceChart3DScene-WMY5JTW4.js} +3 -3
  12. package/dist/SurfaceChart3DScene-WMY5JTW4.js.br +0 -0
  13. package/dist/SurfaceChart3DScene-WMY5JTW4.js.gz +0 -0
  14. package/dist/{chunk-5VYVKFMS.js → chunk-7CSBUYRN.js} +808 -808
  15. package/dist/chunk-7CSBUYRN.js.br +0 -0
  16. package/dist/chunk-7CSBUYRN.js.gz +0 -0
  17. package/dist/{chunk-7FE27DDH.js → chunk-E55Q4AC7.js} +556 -476
  18. package/dist/chunk-E55Q4AC7.js.br +0 -0
  19. package/dist/chunk-E55Q4AC7.js.gz +0 -0
  20. package/dist/{chunk-P72VQ7WE.mjs → chunk-F4WPQRZU.mjs} +96 -16
  21. package/dist/chunk-F4WPQRZU.mjs.br +0 -0
  22. package/dist/chunk-F4WPQRZU.mjs.gz +0 -0
  23. package/dist/{chunk-UYNOPUSG.mjs → chunk-FOMF7POV.mjs} +1658 -353
  24. package/dist/chunk-FOMF7POV.mjs.br +0 -0
  25. package/dist/chunk-FOMF7POV.mjs.gz +0 -0
  26. package/dist/{chunk-VUC3UPLM.mjs → chunk-FVQDRA5N.mjs} +1044 -108
  27. package/dist/chunk-FVQDRA5N.mjs.br +0 -0
  28. package/dist/chunk-FVQDRA5N.mjs.gz +0 -0
  29. package/dist/{chunk-FWF2SP6N.js → chunk-IPYAN574.js} +1660 -352
  30. package/dist/chunk-IPYAN574.js.br +0 -0
  31. package/dist/chunk-IPYAN574.js.gz +0 -0
  32. package/dist/{chunk-TPG2WKHQ.mjs → chunk-L4ZADJOM.mjs} +6 -6
  33. package/dist/chunk-L4ZADJOM.mjs.br +0 -0
  34. package/dist/chunk-L4ZADJOM.mjs.gz +0 -0
  35. package/dist/{chunk-6F4WVHS3.js → chunk-TEN35NUX.js} +1077 -141
  36. package/dist/chunk-TEN35NUX.js.br +0 -0
  37. package/dist/chunk-TEN35NUX.js.gz +0 -0
  38. package/dist/{dist-QU6JIDAF.js → dist-755SJ3ZH.js} +574 -562
  39. package/dist/dist-755SJ3ZH.js.br +0 -0
  40. package/dist/dist-755SJ3ZH.js.gz +0 -0
  41. package/dist/dist-FFWP5NQZ.mjs +2 -0
  42. package/dist/dist-FFWP5NQZ.mjs.br +0 -0
  43. package/dist/dist-FFWP5NQZ.mjs.gz +0 -0
  44. package/dist/hooks-unstable.d.ts +243 -4
  45. package/dist/hooks-unstable.d.ts.map +1 -1
  46. package/dist/hooks-unstable.js +78 -78
  47. package/dist/hooks-unstable.js.br +0 -0
  48. package/dist/hooks-unstable.js.gz +0 -0
  49. package/dist/hooks-unstable.mjs +3 -3
  50. package/dist/hooks-unstable.mjs.br +0 -0
  51. package/dist/hooks-unstable.mjs.gz +0 -0
  52. package/dist/{index-DWvM1PBB.d.ts → index-J6IuHQ2_.d.ts} +21 -4
  53. package/dist/index-J6IuHQ2_.d.ts.map +1 -0
  54. package/dist/index.d.ts +223 -1
  55. package/dist/index.js +33 -33
  56. package/dist/index.js.br +0 -0
  57. package/dist/index.js.gz +0 -0
  58. package/dist/index.mjs +4 -4
  59. package/dist/index.mjs.br +0 -0
  60. package/dist/index.mjs.gz +0 -0
  61. package/dist/viewer/index.d.ts +223 -1
  62. package/dist/viewer/index.js +20 -20
  63. package/dist/viewer/index.js.br +0 -0
  64. package/dist/viewer/index.js.gz +0 -0
  65. package/dist/viewer/index.mjs +4 -4
  66. package/dist/viewer/index.mjs.br +0 -0
  67. package/dist/viewer/index.mjs.gz +0 -0
  68. package/package.json +1 -1
  69. package/dist/Model3DScene-DZFYJPUH.mjs.br +0 -0
  70. package/dist/Model3DScene-DZFYJPUH.mjs.gz +0 -0
  71. package/dist/Model3DScene-SP6WOKSX.js.br +0 -0
  72. package/dist/Model3DScene-SP6WOKSX.js.gz +0 -0
  73. package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.br +0 -0
  74. package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.gz +0 -0
  75. package/dist/SurfaceChart3DScene-GISPZ4C2.js.br +0 -0
  76. package/dist/SurfaceChart3DScene-GISPZ4C2.js.gz +0 -0
  77. package/dist/chunk-5VYVKFMS.js.br +0 -0
  78. package/dist/chunk-5VYVKFMS.js.gz +0 -0
  79. package/dist/chunk-6F4WVHS3.js.br +0 -0
  80. package/dist/chunk-6F4WVHS3.js.gz +0 -0
  81. package/dist/chunk-7FE27DDH.js.br +0 -0
  82. package/dist/chunk-7FE27DDH.js.gz +0 -0
  83. package/dist/chunk-FWF2SP6N.js.br +0 -0
  84. package/dist/chunk-FWF2SP6N.js.gz +0 -0
  85. package/dist/chunk-P72VQ7WE.mjs.br +0 -0
  86. package/dist/chunk-P72VQ7WE.mjs.gz +0 -0
  87. package/dist/chunk-TPG2WKHQ.mjs.br +0 -0
  88. package/dist/chunk-TPG2WKHQ.mjs.gz +0 -0
  89. package/dist/chunk-UYNOPUSG.mjs.br +0 -0
  90. package/dist/chunk-UYNOPUSG.mjs.gz +0 -0
  91. package/dist/chunk-VUC3UPLM.mjs.br +0 -0
  92. package/dist/chunk-VUC3UPLM.mjs.gz +0 -0
  93. package/dist/dist-QNYKM7YS.mjs +0 -2
  94. package/dist/dist-QNYKM7YS.mjs.br +0 -0
  95. package/dist/dist-QNYKM7YS.mjs.gz +0 -0
  96. package/dist/dist-QU6JIDAF.js.br +0 -0
  97. package/dist/dist-QU6JIDAF.js.gz +0 -0
  98. package/dist/index-DWvM1PBB.d.ts.map +0 -1
@@ -1628,8 +1628,8 @@ function decompressEotFont(fontData, compressed, encrypted) {
1628
1628
 
1629
1629
  // ../../node_modules/.bun/emf-converter@1.6.0/node_modules/emf-converter/dist/index.mjs
1630
1630
  function colorRefToHex(r, g, b) {
1631
- const toHex3 = (v) => v.toString(16).padStart(2, "0");
1632
- return `#${toHex3(r & 255)}${toHex3(g & 255)}${toHex3(b & 255)}`;
1631
+ const toHex4 = (v) => v.toString(16).padStart(2, "0");
1632
+ return `#${toHex4(r & 255)}${toHex4(g & 255)}${toHex4(b & 255)}`;
1633
1633
  }
1634
1634
  function readColorRef(view, offset) {
1635
1635
  const r = view.getUint8(offset);
@@ -1665,8 +1665,8 @@ function invertCssColor(color2) {
1665
1665
  const shortHex = /^#([0-9a-f]{3})$/i.exec(color2);
1666
1666
  if (shortHex) {
1667
1667
  const [r, g, b] = shortHex[1].split("").map((c) => parseInt(c + c, 16));
1668
- const toHex3 = (v) => (255 - v).toString(16).padStart(2, "0");
1669
- return `#${toHex3(r)}${toHex3(g)}${toHex3(b)}`;
1668
+ const toHex4 = (v) => (255 - v).toString(16).padStart(2, "0");
1669
+ return `#${toHex4(r)}${toHex4(g)}${toHex4(b)}`;
1670
1670
  }
1671
1671
  const rgba = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i.exec(color2);
1672
1672
  if (rgba) {
@@ -9171,6 +9171,7 @@ var TextShapeXmlFactory = class {
9171
9171
  createXmlElement(init) {
9172
9172
  const { element } = init;
9173
9173
  const isText = element.type === "text";
9174
+ const isTextBox = element.locks?.txBox ?? isText;
9174
9175
  const name = isText ? "TextBox" : "Rectangle";
9175
9176
  const geometry = this.context.normalizePresetGeometry(element.shapeType);
9176
9177
  const adjustmentEntries = Object.entries(element.shapeAdjustments || {}).filter(
@@ -9190,7 +9191,7 @@ var TextShapeXmlFactory = class {
9190
9191
  "@_name": `${name} ${elementId}`
9191
9192
  },
9192
9193
  "p:cNvSpPr": {
9193
- "@_txBox": isText ? "1" : "0"
9194
+ "@_txBox": isTextBox ? "1" : "0"
9194
9195
  },
9195
9196
  "p:nvPr": {}
9196
9197
  },
@@ -9804,6 +9805,21 @@ function cloneXmlObject(value) {
9804
9805
  }
9805
9806
  }
9806
9807
  var SECTION_EXTENSION_URI = "{521415D9-36F7-43E2-AB2F-B90AF26B5E84}";
9808
+ function remapReferenceList(references, mapping, removed) {
9809
+ const result = [];
9810
+ for (const reference of references) {
9811
+ const mapped = mapping.get(reference);
9812
+ if (mapped !== void 0) {
9813
+ result.push(mapped);
9814
+ continue;
9815
+ }
9816
+ if (removed.has(reference)) {
9817
+ continue;
9818
+ }
9819
+ result.push(reference);
9820
+ }
9821
+ return result;
9822
+ }
9807
9823
  function localName4(key) {
9808
9824
  return key.split(":").pop() ?? key;
9809
9825
  }
@@ -9870,7 +9886,7 @@ function updateCustomShow(show, existing) {
9870
9886
  replaceChildren(node, "sldLst", slideList, "p:sldLst");
9871
9887
  return node;
9872
9888
  }
9873
- function applyCustomShows(presentation, shows, lookup) {
9889
+ function applyCustomShows(presentation, shows, lookup, remap) {
9874
9890
  if (shows === void 0) {
9875
9891
  return;
9876
9892
  }
@@ -9884,14 +9900,18 @@ function applyCustomShows(presentation, shows, lookup) {
9884
9900
  const oldList = key ? presentation[key] : void 0;
9885
9901
  const list = cloneXmlObject(oldList) ?? {};
9886
9902
  const oldShows = lookup.getChildrenArrayByLocalName(oldList, "custShow");
9887
- const updated = shows.map(
9888
- (show) => updateCustomShow(
9889
- show,
9903
+ const updated = shows.map((show) => {
9904
+ const effective = remap && remap.changed ? {
9905
+ ...show,
9906
+ slideRIds: remapReferenceList(show.slideRIds, remap.rIdByOldRId, remap.removedRIds)
9907
+ } : show;
9908
+ return updateCustomShow(
9909
+ effective,
9890
9910
  oldShows.find(
9891
9911
  (node) => String(node[attributeKey(node, "id") ?? ""]) === show.id || String(node[attributeKey(node, "name") ?? ""]) === show.name
9892
9912
  )
9893
- )
9894
- );
9913
+ );
9914
+ });
9895
9915
  replaceChildren(list, "custShow", updated, "p:custShow");
9896
9916
  presentation[key ?? "p:custShowLst"] = list;
9897
9917
  }
@@ -9940,7 +9960,7 @@ function updateSection(section) {
9940
9960
  }
9941
9961
  return node;
9942
9962
  }
9943
- function applySections(presentation, sections, lookup) {
9963
+ function applySections(presentation, sections, lookup, remap) {
9944
9964
  if (sections === void 0) {
9945
9965
  return;
9946
9966
  }
@@ -9962,7 +9982,15 @@ function applySections(presentation, sections, lookup) {
9962
9982
  location = { parent: ext, key: "p14:sectionLst", list: ext["p14:sectionLst"] };
9963
9983
  }
9964
9984
  const list = cloneXmlObject(location.list) ?? {};
9965
- replaceChildren(list, "section", sections.map(updateSection), "p14:section");
9985
+ const effectiveSections = remap && remap.changed ? sections.map((section) => ({
9986
+ ...section,
9987
+ slideIds: remapReferenceList(
9988
+ section.slideIds,
9989
+ remap.sldIdByOldSldId,
9990
+ remap.removedSldIds
9991
+ )
9992
+ })) : sections;
9993
+ replaceChildren(list, "section", effectiveSections.map(updateSection), "p14:section");
9966
9994
  location.parent[location.key] = list;
9967
9995
  }
9968
9996
  var PptxPresentationSaveBuilder = class {
@@ -9981,8 +10009,18 @@ var PptxPresentationSaveBuilder = class {
9981
10009
  init.rawSlideHeightEmu,
9982
10010
  init.rawSlideSizeType
9983
10011
  );
9984
- applyCustomShows(presentation, init.options?.customShows, init.xmlLookupService);
9985
- applySections(presentation, init.options?.sections, init.xmlLookupService);
10012
+ applyCustomShows(
10013
+ presentation,
10014
+ init.options?.customShows,
10015
+ init.xmlLookupService,
10016
+ init.slideReferenceRemap
10017
+ );
10018
+ applySections(
10019
+ presentation,
10020
+ init.options?.sections,
10021
+ init.xmlLookupService,
10022
+ init.slideReferenceRemap
10023
+ );
9986
10024
  this.applyPhotoAlbum(presentation, init.options?.photoAlbum);
9987
10025
  presentation = this.applyKinsoku(presentation, init.options?.kinsoku);
9988
10026
  this.applyModifyVerifier(presentation, init.options?.modifyVerifier);
@@ -10076,6 +10114,51 @@ var PptxPresentationSaveBuilder = class {
10076
10114
  presentation["p:modifyVerifier"] = mv;
10077
10115
  }
10078
10116
  };
10117
+ function buildSlideReferenceRemap(init) {
10118
+ const pathToNewRId = /* @__PURE__ */ new Map();
10119
+ for (const slide of init.slides) {
10120
+ pathToNewRId.set(slide.id, slide.rId);
10121
+ }
10122
+ const newRIdToNumeric = /* @__PURE__ */ new Map();
10123
+ for (const entry of init.rebuiltSlideIds) {
10124
+ const relationshipId2 = String(entry?.["@_r:id"] ?? "");
10125
+ const numericSlideId = String(entry?.["@_id"] ?? "");
10126
+ if (relationshipId2.length > 0 && numericSlideId.length > 0) {
10127
+ newRIdToNumeric.set(relationshipId2, numericSlideId);
10128
+ }
10129
+ }
10130
+ const rIdByOldRId = /* @__PURE__ */ new Map();
10131
+ const removedRIds = /* @__PURE__ */ new Set();
10132
+ let changed = false;
10133
+ for (const [oldRId, path] of init.originalRIdToPath.entries()) {
10134
+ const newRId = pathToNewRId.get(path);
10135
+ if (newRId === void 0) {
10136
+ removedRIds.add(oldRId);
10137
+ changed = true;
10138
+ continue;
10139
+ }
10140
+ rIdByOldRId.set(oldRId, newRId);
10141
+ if (newRId !== oldRId) {
10142
+ changed = true;
10143
+ }
10144
+ }
10145
+ const sldIdByOldSldId = /* @__PURE__ */ new Map();
10146
+ const removedSldIds = /* @__PURE__ */ new Set();
10147
+ for (const [oldSldId, path] of init.originalSldIdToPath.entries()) {
10148
+ const newRId = pathToNewRId.get(path);
10149
+ const newSldId = newRId === void 0 ? void 0 : newRIdToNumeric.get(newRId);
10150
+ if (newSldId === void 0) {
10151
+ removedSldIds.add(oldSldId);
10152
+ changed = true;
10153
+ continue;
10154
+ }
10155
+ sldIdByOldSldId.set(oldSldId, newSldId);
10156
+ if (newSldId !== oldSldId) {
10157
+ changed = true;
10158
+ }
10159
+ }
10160
+ return { rIdByOldRId, sldIdByOldSldId, removedRIds, removedSldIds, changed };
10161
+ }
10079
10162
  var PptxPresentationSlidesReconciler = class {
10080
10163
  async reconcile(input) {
10081
10164
  const presentationRelsXml2 = await input.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");
@@ -10120,6 +10203,10 @@ var PptxPresentationSlidesReconciler = class {
10120
10203
  const existingSlideIds = slideIdList ? this.ensureArray(slideIdList["p:sldId"]) : [];
10121
10204
  const slideIdByRid = /* @__PURE__ */ new Map();
10122
10205
  let maxNumericSlideId = 255;
10206
+ const originalRIdToPath = /* @__PURE__ */ new Map();
10207
+ for (const [relationshipId2, target] of slideTargetByRid.entries()) {
10208
+ originalRIdToPath.set(relationshipId2, input.toSlidePathFromTarget(target));
10209
+ }
10123
10210
  for (const slideIdEntry of existingSlideIds) {
10124
10211
  const relationshipId2 = slideIdEntry?.["@_r:id"];
10125
10212
  if (typeof relationshipId2 === "string" && relationshipId2.length > 0) {
@@ -10130,6 +10217,15 @@ var PptxPresentationSlidesReconciler = class {
10130
10217
  maxNumericSlideId = Math.max(maxNumericSlideId, numericSlideId);
10131
10218
  }
10132
10219
  }
10220
+ const originalSldIdToPath = /* @__PURE__ */ new Map();
10221
+ for (const slideIdEntry of existingSlideIds) {
10222
+ const relationshipId2 = String(slideIdEntry?.["@_r:id"] ?? "");
10223
+ const numericSlideId = String(slideIdEntry?.["@_id"] ?? "");
10224
+ const slidePath = originalRIdToPath.get(relationshipId2);
10225
+ if (numericSlideId.length > 0 && slidePath !== void 0) {
10226
+ originalSldIdToPath.set(numericSlideId, slidePath);
10227
+ }
10228
+ }
10133
10229
  for (let index = 0; index < input.slides.length; index++) {
10134
10230
  const slide = input.slides[index];
10135
10231
  slide.slideNumber = index + 1;
@@ -10166,6 +10262,7 @@ var PptxPresentationSlidesReconciler = class {
10166
10262
  ];
10167
10263
  presentationRelsData["Relationships"] = relRoot;
10168
10264
  input.zip.file("ppt/_rels/presentation.xml.rels", input.xmlBuilder.build(presentationRelsData));
10265
+ const rebuiltSlideIds = [];
10169
10266
  if (presentation && slideIdList && input.presentationData) {
10170
10267
  slideIdList["p:sldId"] = input.slides.map((slide) => {
10171
10268
  const existing = slideIdByRid.get(slide.rId);
@@ -10178,11 +10275,18 @@ var PptxPresentationSlidesReconciler = class {
10178
10275
  "@_r:id": slide.rId
10179
10276
  };
10180
10277
  });
10278
+ rebuiltSlideIds.push(...slideIdList["p:sldId"]);
10181
10279
  input.presentationData["p:presentation"] = this.insertSlideIdListInOrder(
10182
10280
  presentation,
10183
10281
  slideIdList
10184
10282
  );
10185
10283
  }
10284
+ return buildSlideReferenceRemap({
10285
+ slides: input.slides,
10286
+ originalRIdToPath,
10287
+ originalSldIdToPath,
10288
+ rebuiltSlideIds
10289
+ });
10186
10290
  }
10187
10291
  /**
10188
10292
  * Return a new presentation XML object whose `p:sldIdLst` child sits in the
@@ -10830,7 +10934,7 @@ var SHAPE_STYLE_ORDER = [
10830
10934
  "a:fontRef"
10831
10935
  ];
10832
10936
  var PptxSlideBackgroundBuilder = class {
10833
- applyBackground(init) {
10937
+ async applyBackground(init) {
10834
10938
  const hasBackgroundColor = typeof init.slide.backgroundColor === "string" && init.slide.backgroundColor.length > 0 && init.slide.backgroundColor !== "transparent";
10835
10939
  const rawBackgroundImage = typeof init.slide.backgroundImage === "string" ? init.slide.backgroundImage : "";
10836
10940
  const hasBackgroundImage = rawBackgroundImage.length > 0;
@@ -10851,8 +10955,8 @@ var PptxSlideBackgroundBuilder = class {
10851
10955
  return;
10852
10956
  }
10853
10957
  const backgroundProperties = {};
10854
- if (hasDataUrlBackgroundImage) {
10855
- const parsedBackgroundImage = init.parseDataUrlToBytes(rawBackgroundImage);
10958
+ if (hasBackgroundImage) {
10959
+ const parsedBackgroundImage = await init.resolveImageToBytes(rawBackgroundImage);
10856
10960
  if (parsedBackgroundImage) {
10857
10961
  const backgroundImagePath = init.saveState.nextMediaPath(parsedBackgroundImage.extension);
10858
10962
  init.zip.file(backgroundImagePath, parsedBackgroundImage.bytes);
@@ -10870,8 +10974,11 @@ var PptxSlideBackgroundBuilder = class {
10870
10974
  },
10871
10975
  BLIP_FILL_ORDER
10872
10976
  );
10977
+ } else {
10978
+ init.reportUnsupportedBackground?.(rawBackgroundImage);
10873
10979
  }
10874
- } else if (hasBackgroundColor && init.slide.backgroundColor) {
10980
+ }
10981
+ if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
10875
10982
  backgroundProperties["a:solidFill"] = {
10876
10983
  "a:srgbClr": {
10877
10984
  "@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
@@ -10888,6 +10995,11 @@ var PptxSlideBackgroundBuilder = class {
10888
10995
  backgroundProperties["@_shadeToTitle"] = "0";
10889
10996
  }
10890
10997
  if (!hasFillChild) {
10998
+ if (existingBg !== void 0) {
10999
+ this.reorderCSldBgFirst(cSld, existingBg);
11000
+ init.slideNode["p:cSld"] = cSld;
11001
+ return;
11002
+ }
10891
11003
  delete cSld["p:bg"];
10892
11004
  init.slideNode["p:cSld"] = cSld;
10893
11005
  return;
@@ -10959,6 +11071,11 @@ function parseDrawingPercent(value) {
10959
11071
  }
10960
11072
  return clampUnitInterval(parsed / 1e5);
10961
11073
  }
11074
+ function scrgbLinearToSrgb8(linear) {
11075
+ const l = Math.min(1, Math.max(0, linear));
11076
+ const companded = l <= 31308e-7 ? 12.92 * l : 1.055 * l ** (1 / 2.4) - 0.055;
11077
+ return Math.min(255, Math.max(0, Math.round(companded * 255)));
11078
+ }
10962
11079
  function toHex(value) {
10963
11080
  return Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
10964
11081
  }
@@ -11504,11 +11621,15 @@ var PptxColorTransformCodec = class {
11504
11621
  }
11505
11622
  if (colorChoice["a:scrgbClr"]) {
11506
11623
  const scrgb = colorChoice["a:scrgbClr"];
11507
- const red = this.percentAttrToUnit(scrgb["@_r"]);
11508
- const green = this.percentAttrToUnit(scrgb["@_g"]);
11509
- const blue = this.percentAttrToUnit(scrgb["@_b"]);
11624
+ const red = parseDrawingFraction(scrgb["@_r"]);
11625
+ const green = parseDrawingFraction(scrgb["@_g"]);
11626
+ const blue = parseDrawingFraction(scrgb["@_b"]);
11510
11627
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
11511
- const base = this.rgbToHex(red * 255, green * 255, blue * 255);
11628
+ const base = this.rgbToHex(
11629
+ scrgbLinearToSrgb8(red),
11630
+ scrgbLinearToSrgb8(green),
11631
+ scrgbLinearToSrgb8(blue)
11632
+ );
11512
11633
  return this.applyColorTransforms(base, scrgb);
11513
11634
  }
11514
11635
  }
@@ -11599,8 +11720,8 @@ var PptxColorTransformCodec = class {
11599
11720
  };
11600
11721
  }
11601
11722
  rgbToHex(r, g, b) {
11602
- const toHex3 = (channelValue) => this.clampColorChannel(channelValue).toString(16).padStart(2, "0").toUpperCase();
11603
- return `#${toHex3(r)}${toHex3(g)}${toHex3(b)}`;
11723
+ const toHex4 = (channelValue) => this.clampColorChannel(channelValue).toString(16).padStart(2, "0").toUpperCase();
11724
+ return `#${toHex4(r)}${toHex4(g)}${toHex4(b)}`;
11604
11725
  }
11605
11726
  applyColorTransforms(baseColor, colorNode) {
11606
11727
  return applyDrawingColorTransforms(baseColor, colorNode);
@@ -11684,6 +11805,22 @@ function mergeDrawingFillXml(original, generated, modeledChildren, childOrder2)
11684
11805
  }
11685
11806
  return result;
11686
11807
  }
11808
+ function extractGradientTileRect(gradFill) {
11809
+ const tileRect = drawingChild(gradFill, "tileRect");
11810
+ if (!tileRect) {
11811
+ return void 0;
11812
+ }
11813
+ const toFraction = (raw) => {
11814
+ const parsed = Number.parseInt(String(raw ?? "0"), 10);
11815
+ return Number.isFinite(parsed) ? parsed / 1e5 : 0;
11816
+ };
11817
+ return {
11818
+ l: toFraction(tileRect["@_l"]),
11819
+ t: toFraction(tileRect["@_t"]),
11820
+ r: toFraction(tileRect["@_r"]),
11821
+ b: toFraction(tileRect["@_b"])
11822
+ };
11823
+ }
11687
11824
  var PptxGradientStyleCodec = class {
11688
11825
  context;
11689
11826
  constructor(context) {
@@ -11794,6 +11931,9 @@ var PptxGradientStyleCodec = class {
11794
11931
  b: Number.isFinite(b) ? this.context.clampUnitInterval(b / 1e5) : 0
11795
11932
  };
11796
11933
  }
11934
+ extractGradientTileRect(gradFill) {
11935
+ return extractGradientTileRect(gradFill);
11936
+ }
11797
11937
  extractGradientFlip(gradFill) {
11798
11938
  const flipRaw = String(gradFill["@_flip"] || "").trim().toLowerCase();
11799
11939
  if (flipRaw === "x" || flipRaw === "y" || flipRaw === "xy" || flipRaw === "none") {
@@ -11965,6 +12105,15 @@ var PptxGradientStyleCodec = class {
11965
12105
  }
11966
12106
  gradientXml["a:lin"] = linNode;
11967
12107
  }
12108
+ if (shapeStyle.fillGradientTileRect) {
12109
+ const tr = shapeStyle.fillGradientTileRect;
12110
+ gradientXml["a:tileRect"] = {
12111
+ "@_l": String(Math.round(tr.l * 1e5)),
12112
+ "@_t": String(Math.round(tr.t * 1e5)),
12113
+ "@_r": String(Math.round(tr.r * 1e5)),
12114
+ "@_b": String(Math.round(tr.b * 1e5))
12115
+ };
12116
+ }
11968
12117
  return mergeDrawingFillXml(
11969
12118
  shapeStyle.fillGradientXml,
11970
12119
  gradientXml,
@@ -13470,7 +13619,7 @@ var PptxColorStyleCodec = class {
13470
13619
  const alphaMod = this.percentAttrToUnit(
13471
13620
  choiceNode["a:alphaMod"]?.["@_val"]
13472
13621
  );
13473
- const alphaOff = this.percentAttrToUnit(
13622
+ const alphaOff = this.signedPercentToUnit(
13474
13623
  choiceNode["a:alphaOff"]?.["@_val"]
13475
13624
  );
13476
13625
  if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
@@ -13485,6 +13634,18 @@ var PptxColorStyleCodec = class {
13485
13634
  }
13486
13635
  return this.clampUnitInterval(opacity2);
13487
13636
  }
13637
+ /**
13638
+ * Parse an OOXML percentage (thousandths, `100000` = 100%) into a fraction
13639
+ * WITHOUT clamping to [0, 1]. Used for additive offsets like `a:alphaOff`
13640
+ * that legitimately carry negative values.
13641
+ */
13642
+ signedPercentToUnit(value) {
13643
+ const parsed = Number.parseFloat(String(value ?? "").trim());
13644
+ if (!Number.isFinite(parsed)) {
13645
+ return void 0;
13646
+ }
13647
+ return parsed / 1e5;
13648
+ }
13488
13649
  colorWithOpacity(color2, opacity2) {
13489
13650
  if (opacity2 === void 0) {
13490
13651
  return color2;
@@ -13664,10 +13825,12 @@ function applyLineProperties(lineNode, shapeProps, style, context, resolveHidden
13664
13825
  }
13665
13826
  const hiddenLineFill = hiddenLineProps["a:solidFill"];
13666
13827
  if (hiddenLineFill) {
13828
+ style.strokeFillMode = "solid";
13667
13829
  style.strokeColor = context.parseColor(hiddenLineFill);
13668
13830
  style.strokeOpacity = context.extractColorOpacity(hiddenLineFill);
13669
13831
  }
13670
13832
  } else {
13833
+ style.strokeFillMode = "none";
13671
13834
  style.strokeWidth = 0;
13672
13835
  style.strokeColor = "transparent";
13673
13836
  }
@@ -13685,6 +13848,7 @@ function applyLineProperties(lineNode, shapeProps, style, context, resolveHidden
13685
13848
  }
13686
13849
  function applyStrokeColor(lineNode, style, context) {
13687
13850
  if (lineNode["a:solidFill"]) {
13851
+ style.strokeFillMode = "solid";
13688
13852
  const lineFill = lineNode["a:solidFill"];
13689
13853
  style.strokeColor = context.parseColor(lineFill);
13690
13854
  style.strokeOpacity = context.extractColorOpacity(lineFill);
@@ -13693,10 +13857,15 @@ function applyStrokeColor(lineNode, style, context) {
13693
13857
  style.strokeColorXml = strokeColorXml;
13694
13858
  }
13695
13859
  } else if (lineNode["a:gradFill"]) {
13696
- style.strokeColor = context.extractGradientFillColor(lineNode["a:gradFill"]);
13697
- style.strokeOpacity = context.extractGradientOpacity(lineNode["a:gradFill"]);
13860
+ style.strokeFillMode = "gradient";
13861
+ const lineGradFill = lineNode["a:gradFill"];
13862
+ style.strokeGradientXml = lineGradFill;
13863
+ style.strokeColor = context.extractGradientFillColor(lineGradFill);
13864
+ style.strokeOpacity = context.extractGradientOpacity(lineGradFill);
13698
13865
  } else if (lineNode["a:pattFill"]) {
13866
+ style.strokeFillMode = "pattern";
13699
13867
  const linePatternFill = lineNode["a:pattFill"];
13868
+ style.strokePatternXml = linePatternFill;
13700
13869
  style.strokeColor = context.parseColor(linePatternFill["a:fgClr"]) || context.parseColor(linePatternFill["a:bgClr"]);
13701
13870
  style.strokeOpacity = context.extractColorOpacity(linePatternFill["a:fgClr"]) || context.extractColorOpacity(linePatternFill["a:bgClr"]);
13702
13871
  }
@@ -13823,6 +13992,10 @@ var PptxShapeStyleExtractor = class {
13823
13992
  style.fillGradientPathType = this.context.extractGradientPathType(gradFill);
13824
13993
  style.fillGradientFocalPoint = this.context.extractGradientFocalPoint(gradFill);
13825
13994
  style.fillGradientFillToRect = this.context.extractGradientFillToRect(gradFill);
13995
+ const gradTileRect = extractGradientTileRect(gradFill);
13996
+ if (gradTileRect) {
13997
+ style.fillGradientTileRect = gradTileRect;
13998
+ }
13826
13999
  const gradFlip = this.context.extractGradientFlip(gradFill);
13827
14000
  if (gradFlip) {
13828
14001
  style.fillGradientFlip = gradFlip;
@@ -15257,6 +15430,7 @@ var PptxLoadDataBuilder = class {
15257
15430
  layoutOptions = [];
15258
15431
  headerFooter;
15259
15432
  presentationProperties;
15433
+ viewProperties;
15260
15434
  customShows;
15261
15435
  sections;
15262
15436
  warnings = [];
@@ -15316,6 +15490,10 @@ var PptxLoadDataBuilder = class {
15316
15490
  this.presentationProperties = presentationProperties;
15317
15491
  return this;
15318
15492
  }
15493
+ withViewProperties(viewProperties) {
15494
+ this.viewProperties = viewProperties;
15495
+ return this;
15496
+ }
15319
15497
  withCustomShows(customShows) {
15320
15498
  this.customShows = customShows;
15321
15499
  return this;
@@ -15453,6 +15631,7 @@ var PptxLoadDataBuilder = class {
15453
15631
  layoutOptions: this.layoutOptions,
15454
15632
  headerFooter: this.headerFooter,
15455
15633
  presentationProperties: this.presentationProperties,
15634
+ viewProperties: this.viewProperties,
15456
15635
  customShows: this.customShows,
15457
15636
  sections: this.sections,
15458
15637
  warnings: this.warnings,
@@ -15827,7 +16006,7 @@ var PptxSlideCommentsXmlFactory = class {
15827
16006
  const createdAtIso = this.resolveCreatedAt(comment.createdAt);
15828
16007
  const x = init.saveState.toEmu(comment.x, 0);
15829
16008
  const y = init.saveState.toEmu(comment.y, 0);
15830
- return {
16009
+ const node = {
15831
16010
  ...withoutChildrenByLocalName(comment.rawXml ?? {}, /* @__PURE__ */ new Set(["pos", "text"])),
15832
16011
  "@_authorId": authorId,
15833
16012
  "@_dt": createdAtIso,
@@ -15838,6 +16017,28 @@ var PptxSlideCommentsXmlFactory = class {
15838
16017
  },
15839
16018
  "p:text": String(comment.text || "")
15840
16019
  };
16020
+ this.applyResolvedState(node, comment);
16021
+ return node;
16022
+ }
16023
+ /**
16024
+ * Reflect the (possibly edited) `resolved` flag onto the legacy comment
16025
+ * node. PowerPoint's legacy comment schema has no standard resolved marker,
16026
+ * but the parser reads a non-standard `@_done` / `@_resolved` attribute, so
16027
+ * we re-emit the current state rather than leaving the stale value carried
16028
+ * over from `rawXml`. The original attribute name is preserved when present.
16029
+ */
16030
+ applyResolvedState(node, comment) {
16031
+ const raw = comment.rawXml;
16032
+ const hadResolvedAttr = raw?.["@_resolved"] !== void 0;
16033
+ const hadDoneAttr = raw?.["@_done"] !== void 0;
16034
+ const key = hadResolvedAttr && !hadDoneAttr ? "@_resolved" : "@_done";
16035
+ delete node["@_done"];
16036
+ delete node["@_resolved"];
16037
+ if (comment.resolved === true) {
16038
+ node[key] = "1";
16039
+ } else if (hadResolvedAttr || hadDoneAttr) {
16040
+ node[key] = "0";
16041
+ }
15841
16042
  }
15842
16043
  resolveCreatedAt(createdAt) {
15843
16044
  const candidate = String(createdAt || "").trim();
@@ -17121,6 +17322,220 @@ var PptxCompatibilityService = class {
17121
17322
  ].join("|");
17122
17323
  }
17123
17324
  };
17325
+ var ATTR_PREFIX = "@_";
17326
+ var TEXT_KEY = "#text";
17327
+ function isXmlObject(value) {
17328
+ return typeof value === "object" && value !== null && !Array.isArray(value);
17329
+ }
17330
+ function coerceString(value) {
17331
+ if (typeof value === "string") {
17332
+ return value;
17333
+ }
17334
+ if (typeof value === "number" || typeof value === "boolean") {
17335
+ return String(value);
17336
+ }
17337
+ return void 0;
17338
+ }
17339
+ function xmlChild(node, key) {
17340
+ if (!isXmlObject(node)) {
17341
+ return void 0;
17342
+ }
17343
+ const value = node[key];
17344
+ if (Array.isArray(value)) {
17345
+ const first = value[0];
17346
+ return isXmlObject(first) ? first : void 0;
17347
+ }
17348
+ return isXmlObject(value) ? value : void 0;
17349
+ }
17350
+ function xmlChildren(node, key) {
17351
+ if (!isXmlObject(node)) {
17352
+ return [];
17353
+ }
17354
+ const value = node[key];
17355
+ if (value === void 0 || value === null) {
17356
+ return [];
17357
+ }
17358
+ if (Array.isArray(value)) {
17359
+ return value.filter(isXmlObject);
17360
+ }
17361
+ return isXmlObject(value) ? [value] : [];
17362
+ }
17363
+ function xmlHasChild(node, key) {
17364
+ return isXmlObject(node) && Object.hasOwn(node, key);
17365
+ }
17366
+ function xmlAttr(node, name) {
17367
+ if (!isXmlObject(node)) {
17368
+ return void 0;
17369
+ }
17370
+ return coerceString(node[ATTR_PREFIX + name]);
17371
+ }
17372
+ function xmlAttrNumber(node, name) {
17373
+ const raw = xmlAttr(node, name);
17374
+ if (raw === void 0) {
17375
+ return void 0;
17376
+ }
17377
+ const parsed = Number(raw);
17378
+ return Number.isFinite(parsed) ? parsed : void 0;
17379
+ }
17380
+ function xmlAttrBool(node, name) {
17381
+ const raw = xmlAttr(node, name);
17382
+ if (raw === void 0) {
17383
+ return void 0;
17384
+ }
17385
+ const normalized = raw.trim().toLowerCase();
17386
+ if (normalized === "1" || normalized === "true") {
17387
+ return true;
17388
+ }
17389
+ if (normalized === "0" || normalized === "false") {
17390
+ return false;
17391
+ }
17392
+ return void 0;
17393
+ }
17394
+ function xmlText(node) {
17395
+ if (typeof node === "string") {
17396
+ return node;
17397
+ }
17398
+ if (!isXmlObject(node)) {
17399
+ return void 0;
17400
+ }
17401
+ return coerceString(node[TEXT_KEY]);
17402
+ }
17403
+ function xmlPath(node, ...keys) {
17404
+ let current = isXmlObject(node) ? node : void 0;
17405
+ for (const key of keys) {
17406
+ if (!current) {
17407
+ return void 0;
17408
+ }
17409
+ current = xmlChild(current, key);
17410
+ }
17411
+ return current;
17412
+ }
17413
+ function isXmlNode(value) {
17414
+ return isXmlObject(value);
17415
+ }
17416
+ var SLIDE_TITLES_NAME = "Slide Titles";
17417
+ function coerceText(value) {
17418
+ if (typeof value === "string") {
17419
+ return value;
17420
+ }
17421
+ if (typeof value === "number" || typeof value === "boolean") {
17422
+ return String(value);
17423
+ }
17424
+ if (isXmlNode(value)) {
17425
+ const text2 = value["#text"];
17426
+ return text2 === void 0 || text2 === null ? "" : String(text2);
17427
+ }
17428
+ return "";
17429
+ }
17430
+ function coerceCount(value) {
17431
+ const parsed = Number.parseInt(coerceText(value), 10);
17432
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
17433
+ }
17434
+ function readLpstrList(vector) {
17435
+ if (!vector) {
17436
+ return [];
17437
+ }
17438
+ const raw = vector["vt:lpstr"];
17439
+ if (raw === void 0 || raw === null) {
17440
+ return [];
17441
+ }
17442
+ return (Array.isArray(raw) ? raw : [raw]).map(coerceText);
17443
+ }
17444
+ function isSlideTitlesCategory(name) {
17445
+ const normalized = name.trim().toLowerCase();
17446
+ return normalized === "slide titles" || normalized.includes("slide") && normalized.includes("title");
17447
+ }
17448
+ function readCategories(headingPairs, titlesOfParts) {
17449
+ const variants = xmlChildren(xmlChild(headingPairs, "vt:vector"), "vt:variant");
17450
+ const entries = readLpstrList(xmlChild(titlesOfParts, "vt:vector"));
17451
+ const categories = [];
17452
+ let offset = 0;
17453
+ for (let i = 0; i + 1 < variants.length; i += 2) {
17454
+ const name = coerceText(variants[i]["vt:lpstr"]);
17455
+ const count = coerceCount(variants[i + 1]["vt:i4"]);
17456
+ categories.push({ name, entries: entries.slice(offset, offset + count) });
17457
+ offset += count;
17458
+ }
17459
+ return categories;
17460
+ }
17461
+ function writeHeadingPairs(appProps, categories) {
17462
+ const variants = [];
17463
+ for (const category of categories) {
17464
+ variants.push({ "vt:lpstr": category.name });
17465
+ variants.push({ "vt:i4": String(category.entries.length) });
17466
+ }
17467
+ appProps["HeadingPairs"] = {
17468
+ "vt:vector": {
17469
+ "@_size": String(variants.length),
17470
+ "@_baseType": "variant",
17471
+ "vt:variant": variants
17472
+ }
17473
+ };
17474
+ }
17475
+ function writeTitlesOfParts(appProps, categories) {
17476
+ const allEntries = categories.flatMap((category) => category.entries);
17477
+ const lpstr = allEntries.map((entry) => ({ "#text": entry }));
17478
+ appProps["TitlesOfParts"] = {
17479
+ "vt:vector": {
17480
+ "@_size": String(allEntries.length),
17481
+ "@_baseType": "lpstr",
17482
+ "vt:lpstr": lpstr
17483
+ }
17484
+ };
17485
+ }
17486
+ function applySlideTitlesToAppProps(appProps, titles) {
17487
+ const headingPairs = xmlChild(appProps, "HeadingPairs");
17488
+ if (!headingPairs) {
17489
+ return;
17490
+ }
17491
+ const titlesOfParts = xmlChild(appProps, "TitlesOfParts");
17492
+ const categories = readCategories(headingPairs, titlesOfParts);
17493
+ const slideCategory = categories.find((category) => isSlideTitlesCategory(category.name));
17494
+ if (slideCategory) {
17495
+ slideCategory.entries = titles;
17496
+ } else {
17497
+ categories.push({ name: SLIDE_TITLES_NAME, entries: titles });
17498
+ }
17499
+ writeHeadingPairs(appProps, categories);
17500
+ writeTitlesOfParts(appProps, categories);
17501
+ }
17502
+ var TITLE_PLACEHOLDER_TYPES = /* @__PURE__ */ new Set(["title", "ctrtitle"]);
17503
+ function getElementPlaceholderType(element) {
17504
+ const explicit = element.placeholderType;
17505
+ if (typeof explicit === "string" && explicit.trim().length > 0) {
17506
+ return explicit.trim().toLowerCase();
17507
+ }
17508
+ const ph = xmlPath(element.rawXml, "p:nvSpPr", "p:nvPr", "p:ph");
17509
+ const type = xmlAttr(ph, "type");
17510
+ return type ? type.trim().toLowerCase() : void 0;
17511
+ }
17512
+ function getElementPlainText(element) {
17513
+ const maybe = element;
17514
+ if (typeof maybe.text === "string" && maybe.text.trim().length > 0) {
17515
+ return maybe.text.trim();
17516
+ }
17517
+ if (Array.isArray(maybe.textSegments)) {
17518
+ const joined = maybe.textSegments.map((segment) => typeof segment?.text === "string" ? segment.text : "").join("");
17519
+ return joined.trim();
17520
+ }
17521
+ return "";
17522
+ }
17523
+ function deriveSlideTitle(slide) {
17524
+ const elements2 = slide.elements ?? [];
17525
+ for (const element of elements2) {
17526
+ const phType = getElementPlaceholderType(element);
17527
+ if (phType && TITLE_PLACEHOLDER_TYPES.has(phType)) {
17528
+ const text2 = getElementPlainText(element);
17529
+ if (text2) {
17530
+ return text2;
17531
+ }
17532
+ }
17533
+ }
17534
+ return "";
17535
+ }
17536
+ function deriveSlideTitles(slides) {
17537
+ return slides.map((slide) => deriveSlideTitle(slide));
17538
+ }
17124
17539
  var PptxDocumentPropertiesUpdater = class {
17125
17540
  context;
17126
17541
  constructor(context) {
@@ -17183,6 +17598,7 @@ var PptxDocumentPropertiesUpdater = class {
17183
17598
  appProps["Slides"] = String(slides.length);
17184
17599
  appProps["HiddenSlides"] = String(hiddenSlidesCount);
17185
17600
  appProps["Notes"] = String(notesCount);
17601
+ this.updateSlideTitleProperties(appProps, slides);
17186
17602
  appData["Properties"] = appProps;
17187
17603
  this.context.zip.file("docProps/app.xml", this.context.builder.build(appData));
17188
17604
  } catch (error) {
@@ -17225,6 +17641,15 @@ var PptxDocumentPropertiesUpdater = class {
17225
17641
  }
17226
17642
  }
17227
17643
  }
17644
+ /**
17645
+ * Recompute `TitlesOfParts` / `HeadingPairs` from the current slide set so
17646
+ * the per-slide title list in `app.xml` stays consistent after slides are
17647
+ * added, removed, or retitled. Delegates the vector rebuild to a pure
17648
+ * helper; here we only derive the ordered titles.
17649
+ */
17650
+ updateSlideTitleProperties(appProps, slides) {
17651
+ applySlideTitlesToAppProps(appProps, deriveSlideTitles(slides));
17652
+ }
17228
17653
  applyAppPropertiesOverrides(appProps, overrides10) {
17229
17654
  if (!overrides10) {
17230
17655
  return;
@@ -19031,6 +19456,16 @@ function extractChildKeyframes(childTnList) {
19031
19456
  }
19032
19457
  return void 0;
19033
19458
  }
19459
+ function parseTimingPercentFraction(raw) {
19460
+ if (raw === void 0 || raw === null) {
19461
+ return void 0;
19462
+ }
19463
+ const parsed = Number.parseInt(String(raw), 10);
19464
+ if (!Number.isFinite(parsed) || parsed <= 0) {
19465
+ return void 0;
19466
+ }
19467
+ return Math.min(1, parsed / 1e5);
19468
+ }
19034
19469
  function extractRepeatInfo(cTn) {
19035
19470
  let repeatCount;
19036
19471
  let autoReverse;
@@ -19174,11 +19609,11 @@ function ensureArray4(value) {
19174
19609
  return [];
19175
19610
  }
19176
19611
  if (!Array.isArray(value)) {
19177
- return isXmlObject(value) ? [value] : [];
19612
+ return isXmlObject2(value) ? [value] : [];
19178
19613
  }
19179
- return value.filter((entry) => isXmlObject(entry));
19614
+ return value.filter((entry) => isXmlObject2(entry));
19180
19615
  }
19181
- function isXmlObject(value) {
19616
+ function isXmlObject2(value) {
19182
19617
  return typeof value === "object" && value !== null && !Array.isArray(value);
19183
19618
  }
19184
19619
  var VALID_CONDITION_EVENTS = /* @__PURE__ */ new Set([
@@ -19542,6 +19977,8 @@ var PptxNativeAnimationService = class {
19542
19977
  const presetSubtype = cTn["@_presetSubtype"] !== void 0 ? Number.parseInt(String(cTn["@_presetSubtype"]), 10) : void 0;
19543
19978
  const durationMs = cTn["@_dur"] ? Number.parseInt(String(cTn["@_dur"]), 10) : void 0;
19544
19979
  const delayMs = cTn["@_delay"] ? Number.parseInt(String(cTn["@_delay"]), 10) : void 0;
19980
+ const accel = parseTimingPercentFraction(cTn["@_accel"]);
19981
+ const decel = parseTimingPercentFraction(cTn["@_decel"]);
19545
19982
  let trigger = currentTrigger;
19546
19983
  if (nodeType === "afterPrevious" || nodeType === "afterPrev") {
19547
19984
  trigger = "afterPrevious";
@@ -19594,6 +20031,8 @@ var PptxNativeAnimationService = class {
19594
20031
  presetSubtype,
19595
20032
  durationMs,
19596
20033
  delayMs,
20034
+ accel,
20035
+ decel,
19597
20036
  triggerDelayMs: trigger === "afterDelay" ? delayMs : void 0,
19598
20037
  motionPath: childMotion.motionPath,
19599
20038
  motionOrigin: childMotion.motionOrigin,
@@ -20822,7 +21261,7 @@ function updateEffectNodeAttributes(cTn, anim, currentPresetClass) {
20822
21261
  if (stCondList && anim.delayMs !== void 0) {
20823
21262
  const conditions = ensureArray4(stCondList["p:cond"]);
20824
21263
  for (const cond of conditions) {
20825
- if (isXmlObject(cond)) {
21264
+ if (isXmlObject2(cond)) {
20826
21265
  cond["@_delay"] = String(anim.delayMs);
20827
21266
  }
20828
21267
  }
@@ -30840,7 +31279,7 @@ function getCalloutViewBoxBounds(width, height, geometry, padding = 2) {
30840
31279
  viewHeight: maxY - minY + padding * 2
30841
31280
  };
30842
31281
  }
30843
- function isXmlObject2(value) {
31282
+ function isXmlObject3(value) {
30844
31283
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
30845
31284
  }
30846
31285
  function ensureItems(value) {
@@ -30943,7 +31382,7 @@ function collectParsedOmathNodes(root) {
30943
31382
  }
30944
31383
  if (localName9(key) === "oMath") {
30945
31384
  for (const item of ensureItems(value)) {
30946
- if (isXmlObject2(item)) {
31385
+ if (isXmlObject3(item)) {
30947
31386
  result.push(item);
30948
31387
  }
30949
31388
  }
@@ -31006,7 +31445,7 @@ function reorderContainer(node, rawInner) {
31006
31445
  occurrence.set(child20.tag, index + 1);
31007
31446
  const value = ensureItems(node[child20.tag])[index];
31008
31447
  resolved.push({ tag: child20.tag, value });
31009
- if (isXmlObject2(value) && child20.inner) {
31448
+ if (isXmlObject3(value) && child20.inner) {
31010
31449
  reorderContainer(value, child20.inner);
31011
31450
  }
31012
31451
  }
@@ -31048,7 +31487,7 @@ function localName10(name) {
31048
31487
  const colon = name.indexOf(":");
31049
31488
  return colon >= 0 ? name.slice(colon + 1) : name;
31050
31489
  }
31051
- function isXmlObject3(value) {
31490
+ function isXmlObject4(value) {
31052
31491
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
31053
31492
  }
31054
31493
  function collectParsedParagraphs(root) {
@@ -31073,7 +31512,7 @@ function collectParsedParagraphs(root) {
31073
31512
  continue;
31074
31513
  }
31075
31514
  paragraphs.push(
31076
- ...(Array.isArray(childValue) ? childValue : [childValue]).filter(isXmlObject3)
31515
+ ...(Array.isArray(childValue) ? childValue : [childValue]).filter(isXmlObject4)
31077
31516
  );
31078
31517
  }
31079
31518
  } else {
@@ -31120,7 +31559,7 @@ function directChildrenByLocalName(paragraphs, name) {
31120
31559
  return [];
31121
31560
  }
31122
31561
  const values = Array.isArray(value) ? value : [value];
31123
- return values.filter(isXmlObject3);
31562
+ return values.filter(isXmlObject4);
31124
31563
  })
31125
31564
  );
31126
31565
  }
@@ -32508,97 +32947,6 @@ function detectFontFormat(data) {
32508
32947
  }
32509
32948
  return "truetype";
32510
32949
  }
32511
- var ATTR_PREFIX = "@_";
32512
- var TEXT_KEY = "#text";
32513
- function isXmlObject4(value) {
32514
- return typeof value === "object" && value !== null && !Array.isArray(value);
32515
- }
32516
- function coerceString(value) {
32517
- if (typeof value === "string") {
32518
- return value;
32519
- }
32520
- if (typeof value === "number" || typeof value === "boolean") {
32521
- return String(value);
32522
- }
32523
- return void 0;
32524
- }
32525
- function xmlChild(node, key) {
32526
- if (!isXmlObject4(node)) {
32527
- return void 0;
32528
- }
32529
- const value = node[key];
32530
- if (Array.isArray(value)) {
32531
- const first = value[0];
32532
- return isXmlObject4(first) ? first : void 0;
32533
- }
32534
- return isXmlObject4(value) ? value : void 0;
32535
- }
32536
- function xmlChildren(node, key) {
32537
- if (!isXmlObject4(node)) {
32538
- return [];
32539
- }
32540
- const value = node[key];
32541
- if (value === void 0 || value === null) {
32542
- return [];
32543
- }
32544
- if (Array.isArray(value)) {
32545
- return value.filter(isXmlObject4);
32546
- }
32547
- return isXmlObject4(value) ? [value] : [];
32548
- }
32549
- function xmlHasChild(node, key) {
32550
- return isXmlObject4(node) && Object.hasOwn(node, key);
32551
- }
32552
- function xmlAttr(node, name) {
32553
- if (!isXmlObject4(node)) {
32554
- return void 0;
32555
- }
32556
- return coerceString(node[ATTR_PREFIX + name]);
32557
- }
32558
- function xmlAttrNumber(node, name) {
32559
- const raw = xmlAttr(node, name);
32560
- if (raw === void 0) {
32561
- return void 0;
32562
- }
32563
- const parsed = Number(raw);
32564
- return Number.isFinite(parsed) ? parsed : void 0;
32565
- }
32566
- function xmlAttrBool(node, name) {
32567
- const raw = xmlAttr(node, name);
32568
- if (raw === void 0) {
32569
- return void 0;
32570
- }
32571
- const normalized = raw.trim().toLowerCase();
32572
- if (normalized === "1" || normalized === "true") {
32573
- return true;
32574
- }
32575
- if (normalized === "0" || normalized === "false") {
32576
- return false;
32577
- }
32578
- return void 0;
32579
- }
32580
- function xmlText(node) {
32581
- if (typeof node === "string") {
32582
- return node;
32583
- }
32584
- if (!isXmlObject4(node)) {
32585
- return void 0;
32586
- }
32587
- return coerceString(node[TEXT_KEY]);
32588
- }
32589
- function xmlPath(node, ...keys) {
32590
- let current = isXmlObject4(node) ? node : void 0;
32591
- for (const key of keys) {
32592
- if (!current) {
32593
- return void 0;
32594
- }
32595
- current = xmlChild(current, key);
32596
- }
32597
- return current;
32598
- }
32599
- function isXmlNode(value) {
32600
- return isXmlObject4(value);
32601
- }
32602
32950
  function findSectionList2(presentation, lookup) {
32603
32951
  const direct = lookup.getChildByLocalName(presentation, "sectionLst");
32604
32952
  if (direct) {
@@ -35875,6 +36223,7 @@ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
35875
36223
  }
35876
36224
  function createTemplateShapeRawXml(element) {
35877
36225
  const isText = element.type === "text";
36226
+ const isTextBox = element.locks?.txBox ?? isText;
35878
36227
  const name = isText ? "TextBox" : "Rectangle";
35879
36228
  const geometry = element.shapeType === "cylinder" ? "can" : element.shapeType || "rect";
35880
36229
  const adjustmentEntries = Object.entries(element.shapeAdjustments || {}).filter(
@@ -35893,7 +36242,7 @@ function createTemplateShapeRawXml(element) {
35893
36242
  "@_name": `${name} ${Math.floor(Math.random() * 100)}`
35894
36243
  },
35895
36244
  "p:cNvSpPr": {
35896
- "@_txBox": isText ? "1" : "0"
36245
+ "@_txBox": isTextBox ? "1" : "0"
35897
36246
  },
35898
36247
  "p:nvPr": {}
35899
36248
  },
@@ -39045,6 +39394,120 @@ function applyNodeStylesToElements(elements2, nodes) {
39045
39394
  };
39046
39395
  });
39047
39396
  }
39397
+ var CONTAINER_LOCAL_NAMES = /* @__PURE__ */ new Set(["presLayoutVars", "varLst"]);
39398
+ function localNameOf2(key) {
39399
+ const idx = key.indexOf(":");
39400
+ return idx >= 0 ? key.slice(idx + 1) : key;
39401
+ }
39402
+ function findVarsContainer(node) {
39403
+ if (!node || typeof node !== "object") {
39404
+ return void 0;
39405
+ }
39406
+ if (Array.isArray(node)) {
39407
+ for (const entry of node) {
39408
+ const found = findVarsContainer(entry);
39409
+ if (found) {
39410
+ return found;
39411
+ }
39412
+ }
39413
+ return void 0;
39414
+ }
39415
+ for (const [key, value] of Object.entries(node)) {
39416
+ if (key.startsWith("@_")) {
39417
+ continue;
39418
+ }
39419
+ if (CONTAINER_LOCAL_NAMES.has(localNameOf2(key))) {
39420
+ const container = Array.isArray(value) ? value[0] : value;
39421
+ if (container && typeof container === "object") {
39422
+ return container;
39423
+ }
39424
+ }
39425
+ const nested = findVarsContainer(value);
39426
+ if (nested) {
39427
+ return nested;
39428
+ }
39429
+ }
39430
+ return void 0;
39431
+ }
39432
+ function varValue(container, name) {
39433
+ for (const [key, value] of Object.entries(container)) {
39434
+ if (key.startsWith("@_") || localNameOf2(key) !== name) {
39435
+ continue;
39436
+ }
39437
+ const node = Array.isArray(value) ? value[0] : value;
39438
+ if (node && typeof node === "object") {
39439
+ const raw = node["@_val"];
39440
+ const str = String(raw ?? "").trim();
39441
+ return str.length > 0 ? str : void 0;
39442
+ }
39443
+ }
39444
+ return void 0;
39445
+ }
39446
+ function boolValue2(container, name) {
39447
+ const raw = varValue(container, name);
39448
+ if (raw === void 0) {
39449
+ return void 0;
39450
+ }
39451
+ const lower = raw.toLowerCase();
39452
+ return lower === "1" || lower === "true" || lower === "on";
39453
+ }
39454
+ function intValue(container, name) {
39455
+ const raw = varValue(container, name);
39456
+ if (raw === void 0) {
39457
+ return void 0;
39458
+ }
39459
+ const parsed = Number.parseInt(raw, 10);
39460
+ return Number.isFinite(parsed) ? parsed : void 0;
39461
+ }
39462
+ var DIRECTIONS = /* @__PURE__ */ new Set(["norm", "rev"]);
39463
+ var HIER_BRANCHES = /* @__PURE__ */ new Set(["std", "init", "l", "r", "hang"]);
39464
+ function parseSmartArtPresLayoutVars(container) {
39465
+ if (!container) {
39466
+ return void 0;
39467
+ }
39468
+ const vars = findVarsContainer(container);
39469
+ if (!vars) {
39470
+ return void 0;
39471
+ }
39472
+ const result = {};
39473
+ const direction = varValue(vars, "dir");
39474
+ if (direction && DIRECTIONS.has(direction)) {
39475
+ result.direction = direction;
39476
+ }
39477
+ const hierBranch = varValue(vars, "hierBranch");
39478
+ if (hierBranch && HIER_BRANCHES.has(hierBranch)) {
39479
+ result.hierarchyBranch = hierBranch;
39480
+ }
39481
+ const orgChart = boolValue2(vars, "orgChart");
39482
+ if (orgChart !== void 0) {
39483
+ result.orgChart = orgChart;
39484
+ }
39485
+ const chMax = intValue(vars, "chMax");
39486
+ if (chMax !== void 0) {
39487
+ result.childMax = chMax;
39488
+ }
39489
+ const chPref = intValue(vars, "chPref");
39490
+ if (chPref !== void 0) {
39491
+ result.childPreferred = chPref;
39492
+ }
39493
+ const bulletEnabled = boolValue2(vars, "bulletEnabled");
39494
+ if (bulletEnabled !== void 0) {
39495
+ result.bulletEnabled = bulletEnabled;
39496
+ }
39497
+ const animLvl = varValue(vars, "animLvl");
39498
+ if (animLvl !== void 0) {
39499
+ result.animationLevel = animLvl;
39500
+ }
39501
+ const animOne = varValue(vars, "animOne");
39502
+ if (animOne !== void 0) {
39503
+ result.animateOne = animOne;
39504
+ }
39505
+ const resizeHandles = varValue(vars, "resizeHandles");
39506
+ if (resizeHandles !== void 0) {
39507
+ result.resizeHandles = resizeHandles;
39508
+ }
39509
+ return Object.keys(result).length > 0 ? result : void 0;
39510
+ }
39048
39511
  function quickStyleStrokeScale(quickStyle) {
39049
39512
  if (!quickStyle?.effectIntensity) {
39050
39513
  return 1;
@@ -39149,15 +39612,27 @@ function decomposeSmartArt(smartArtData, containerBounds, themeColorMap, layoutD
39149
39612
  smartArtData.colorTransform?.fillColors
39150
39613
  );
39151
39614
  const layoutType = resolveEffectiveLayoutType(smartArtData);
39615
+ const layoutVars = smartArtData.presLayoutVars ?? parseSmartArtPresLayoutVars(smartArtData.layoutDefinition?.rawXml);
39616
+ const orderedNodes = layoutVars?.direction === "rev" ? [...nodes].reverse() : nodes;
39152
39617
  const namedLayout = smartArtData.layout;
39153
39618
  if (namedLayout) {
39154
- const namedResult = dispatchNamedLayout(namedLayout, nodes, containerBounds, effectiveThemeMap);
39619
+ const namedResult = dispatchNamedLayout(
39620
+ namedLayout,
39621
+ orderedNodes,
39622
+ containerBounds,
39623
+ effectiveThemeMap
39624
+ );
39155
39625
  if (namedResult) {
39156
- return applyNodeStylesToElements(namedResult, nodes);
39626
+ return applyNodeStylesToElements(namedResult, orderedNodes);
39157
39627
  }
39158
39628
  }
39159
- const algorithmic = dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap);
39160
- return algorithmic ? applyNodeStylesToElements(algorithmic, nodes) : algorithmic;
39629
+ const algorithmic = dispatchLayoutByType(
39630
+ layoutType,
39631
+ orderedNodes,
39632
+ containerBounds,
39633
+ effectiveThemeMap
39634
+ );
39635
+ return algorithmic ? applyNodeStylesToElements(algorithmic, orderedNodes) : algorithmic;
39161
39636
  }
39162
39637
  function dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap) {
39163
39638
  switch (layoutType) {
@@ -48815,6 +49290,126 @@ function applySmartArtConnectionAttributes(xml, connection, fallbackModelId) {
48815
49290
  applyNullableAttribute(xml, "@_sibTransId", connection.siblingTransitionId);
48816
49291
  applyNullableAttribute(xml, "@_presId", connection.presentationId);
48817
49292
  }
49293
+ var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
49294
+ "srgbClr",
49295
+ "schemeClr",
49296
+ "scrgbClr",
49297
+ "sysClr",
49298
+ "prstClr",
49299
+ "hslClr"
49300
+ ]);
49301
+ var COLOR_METHODS2 = /* @__PURE__ */ new Set(["span", "cycle", "repeat"]);
49302
+ var HUE_DIRECTIONS2 = /* @__PURE__ */ new Set(["cw", "ccw"]);
49303
+ var PRIMARY_LABEL_PRIORITY = ["node0", "node1", "node2", "node3", "node4", "node"];
49304
+ function localNameOf3(key) {
49305
+ const idx = key.indexOf(":");
49306
+ return idx >= 0 ? key.slice(idx + 1) : key;
49307
+ }
49308
+ function parseSmartArtColorListHexes(list, deps) {
49309
+ if (!list) {
49310
+ return [];
49311
+ }
49312
+ const out = [];
49313
+ for (const [key, value] of Object.entries(list)) {
49314
+ if (key.startsWith("@_")) {
49315
+ continue;
49316
+ }
49317
+ const local = localNameOf3(key);
49318
+ if (!COLOR_LOCAL_NAMES.has(local)) {
49319
+ continue;
49320
+ }
49321
+ const nodes = Array.isArray(value) ? value : [value];
49322
+ for (const node of nodes) {
49323
+ if (!node || typeof node !== "object") {
49324
+ continue;
49325
+ }
49326
+ const wrapper = { [`a:${local}`]: node };
49327
+ const hex10 = deps.parseColorChoice(wrapper) ?? deps.resolveScheme(node);
49328
+ if (hex10) {
49329
+ out.push(hex10);
49330
+ }
49331
+ }
49332
+ }
49333
+ return out;
49334
+ }
49335
+ function listInterpolation(list) {
49336
+ if (!list) {
49337
+ return void 0;
49338
+ }
49339
+ const method = String(list["@_meth"] ?? "").trim();
49340
+ const hueDir = String(list["@_hueDir"] ?? "").trim();
49341
+ const meta = {};
49342
+ if (COLOR_METHODS2.has(method)) {
49343
+ meta.method = method;
49344
+ }
49345
+ if (HUE_DIRECTIONS2.has(hueDir)) {
49346
+ meta.hueDirection = hueDir;
49347
+ }
49348
+ return meta.method || meta.hueDirection ? meta : void 0;
49349
+ }
49350
+ function parseLabel(lbl, deps) {
49351
+ const fillList = deps.getChild(lbl, "fillClrLst");
49352
+ const lineList = deps.getChild(lbl, "linClrLst");
49353
+ return {
49354
+ name: String(lbl["@_name"] ?? "").trim(),
49355
+ fill: parseSmartArtColorListHexes(fillList, deps),
49356
+ line: parseSmartArtColorListHexes(lineList, deps),
49357
+ textFill: parseSmartArtColorListHexes(deps.getChild(lbl, "txFillClrLst"), deps),
49358
+ textLine: parseSmartArtColorListHexes(deps.getChild(lbl, "txLinClrLst"), deps),
49359
+ effect: parseSmartArtColorListHexes(deps.getChild(lbl, "effectClrLst"), deps),
49360
+ textEffect: parseSmartArtColorListHexes(deps.getChild(lbl, "txEffectClrLst"), deps),
49361
+ fillInterpolation: listInterpolation(fillList),
49362
+ lineInterpolation: listInterpolation(lineList)
49363
+ };
49364
+ }
49365
+ function selectPrimary(parsed) {
49366
+ const byName = new Map(parsed.map((p) => [p.name, p]));
49367
+ for (const name of PRIMARY_LABEL_PRIORITY) {
49368
+ const candidate = byName.get(name);
49369
+ if (candidate && candidate.fill.length > 0) {
49370
+ return candidate;
49371
+ }
49372
+ }
49373
+ for (const name of PRIMARY_LABEL_PRIORITY) {
49374
+ const candidate = byName.get(name);
49375
+ if (candidate && (candidate.line.length > 0 || candidate.fill.length > 0)) {
49376
+ return candidate;
49377
+ }
49378
+ }
49379
+ return parsed.find((p) => p.fill.length > 0) ?? parsed.find((p) => p.line.length > 0);
49380
+ }
49381
+ function buildSmartArtColorLists(styleLbls, deps) {
49382
+ const parsed = styleLbls.map((lbl) => parseLabel(lbl, deps));
49383
+ const primary = selectPrimary(parsed);
49384
+ let fillColors = primary?.fill ?? [];
49385
+ let lineColors = primary?.line ?? [];
49386
+ if (fillColors.length === 0) {
49387
+ fillColors = parsed.map((p) => p.fill[0]).filter((c) => Boolean(c));
49388
+ }
49389
+ if (lineColors.length === 0) {
49390
+ lineColors = parsed.map((p) => p.line[0]).filter((c) => Boolean(c));
49391
+ }
49392
+ const result = { fillColors, lineColors };
49393
+ if (primary?.textFill.length) {
49394
+ result.textFillColors = primary.textFill;
49395
+ }
49396
+ if (primary?.textLine.length) {
49397
+ result.textLineColors = primary.textLine;
49398
+ }
49399
+ if (primary?.effect.length) {
49400
+ result.effectColors = primary.effect;
49401
+ }
49402
+ if (primary?.textEffect.length) {
49403
+ result.textEffectColors = primary.textEffect;
49404
+ }
49405
+ if (primary?.fillInterpolation) {
49406
+ result.fillInterpolation = primary.fillInterpolation;
49407
+ }
49408
+ if (primary?.lineInterpolation) {
49409
+ result.lineInterpolation = primary.lineInterpolation;
49410
+ }
49411
+ return result;
49412
+ }
48818
49413
  var MODERN_COMMENT_NAMESPACE = "http://schemas.microsoft.com/office/powerpoint/2018/8/main";
48819
49414
  var MODERN_COMMENT_RELATIONSHIP = "http://schemas.microsoft.com/office/2018/10/relationships/comments";
48820
49415
  var MODERN_AUTHOR_RELATIONSHIP = "http://schemas.microsoft.com/office/2018/10/relationships/authors";
@@ -51081,6 +51676,26 @@ function buildGeneratedChartAxis(axId, crossId, pos2, formatting) {
51081
51676
  }
51082
51677
  return axis;
51083
51678
  }
51679
+ var CONTAINER_MAP = {
51680
+ pie: { tag: "c:pieChart", family: "pie" },
51681
+ pie3D: { tag: "c:pie3DChart", family: "pie" },
51682
+ ofPie: { tag: "c:ofPieChart", family: "ofPie" },
51683
+ doughnut: { tag: "c:doughnutChart", family: "doughnut" },
51684
+ scatter: { tag: "c:scatterChart", family: "scatter" },
51685
+ bubble: { tag: "c:bubbleChart", family: "bubble" },
51686
+ line: { tag: "c:lineChart", family: "line" },
51687
+ line3D: { tag: "c:line3DChart", family: "line" },
51688
+ area: { tag: "c:areaChart", family: "area" },
51689
+ area3D: { tag: "c:area3DChart", family: "area" },
51690
+ radar: { tag: "c:radarChart", family: "radar" },
51691
+ stock: { tag: "c:stockChart", family: "stock" },
51692
+ surface: { tag: "c:surfaceChart", family: "surface" },
51693
+ bar: { tag: "c:barChart", family: "bar" },
51694
+ bar3D: { tag: "c:bar3DChart", family: "bar" }
51695
+ };
51696
+ function resolveChartContainerType(type) {
51697
+ return CONTAINER_MAP[type] ?? { tag: "c:barChart", family: "bar" };
51698
+ }
51084
51699
  var NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
51085
51700
  var NS_A2 = "http://schemas.openxmlformats.org/drawingml/2006/main";
51086
51701
  var NS_R2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
@@ -51110,29 +51725,6 @@ function strLit(values) {
51110
51725
  }
51111
51726
  };
51112
51727
  }
51113
- function resolveType(type) {
51114
- switch (type) {
51115
- case "pie":
51116
- case "pie3D":
51117
- return { tag: "c:pieChart", family: "pie" };
51118
- case "doughnut":
51119
- return { tag: "c:doughnutChart", family: "doughnut" };
51120
- case "scatter":
51121
- return { tag: "c:scatterChart", family: "scatter" };
51122
- case "bubble":
51123
- return { tag: "c:bubbleChart", family: "bubble" };
51124
- case "line":
51125
- case "line3D":
51126
- return { tag: "c:lineChart", family: "line" };
51127
- case "area":
51128
- case "area3D":
51129
- return { tag: "c:areaChart", family: "area" };
51130
- case "radar":
51131
- return { tag: "c:radarChart", family: "radar" };
51132
- default:
51133
- return { tag: "c:barChart", family: "bar" };
51134
- }
51135
- }
51136
51728
  function fillSpPr(color2, asLine) {
51137
51729
  const h = hex6(color2);
51138
51730
  if (!h) {
@@ -51200,7 +51792,11 @@ function buildChartTypeContainer(chartData, family) {
51200
51792
  } else if (family === "scatter") {
51201
51793
  container["c:scatterStyle"] = { "@_val": "lineMarker" };
51202
51794
  container["c:varyColors"] = { "@_val": "0" };
51203
- } else {
51795
+ } else if (family === "ofPie") {
51796
+ container["c:ofPieType"] = { "@_val": "pie" };
51797
+ container["c:varyColors"] = { "@_val": "1" };
51798
+ } else if (family === "stock" || family === "surface") ;
51799
+ else {
51204
51800
  container["c:varyColors"] = { "@_val": family === "bubble" ? "0" : "1" };
51205
51801
  }
51206
51802
  container["c:ser"] = chartData.series.map(
@@ -51212,12 +51808,13 @@ function buildChartTypeContainer(chartData, family) {
51212
51808
  if (family === "line" && chartData.upDownBars !== void 0) {
51213
51809
  applyChartUpDownBars(container, chartData.upDownBars, (key) => key.replace(/^.*:/u, ""));
51214
51810
  }
51215
- if (family === "bar") {
51811
+ if (family === "bar" || family === "ofPie") {
51216
51812
  container["c:gapWidth"] = { "@_val": "150" };
51217
- container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
51218
- } else if (family === "line" || family === "area" || family === "radar") {
51219
- container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
51220
- } else if (family === "scatter" || family === "bubble") {
51813
+ }
51814
+ if (family === "stock") {
51815
+ container["c:hiLowLines"] = {};
51816
+ }
51817
+ if (family === "bar" || family === "line" || family === "area" || family === "radar" || family === "scatter" || family === "bubble" || family === "stock" || family === "surface") {
51221
51818
  container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
51222
51819
  } else if (family === "doughnut") {
51223
51820
  container["c:holeSize"] = { "@_val": "50" };
@@ -51230,7 +51827,8 @@ function buildPlotArea(chartData, tag, family) {
51230
51827
  if (chartData.style) {
51231
51828
  applyChartDataLabelsToXml(plotArea, chartData.style, (key) => key.replace(/^.*:/u, ""));
51232
51829
  }
51233
- if (family !== "pie" && family !== "doughnut" && SCATTER_LIKE.has(chartData.chartType)) {
51830
+ const hasAxes = family !== "pie" && family !== "doughnut" && family !== "ofPie";
51831
+ if (hasAxes && SCATTER_LIKE.has(chartData.chartType)) {
51234
51832
  plotArea["c:valAx"] = [
51235
51833
  buildGeneratedChartAxis(
51236
51834
  CAT_AX_ID,
@@ -51245,7 +51843,7 @@ function buildPlotArea(chartData, tag, family) {
51245
51843
  axisFormatting(chartData, "valAx", VAL_AX_ID, 1)
51246
51844
  )
51247
51845
  ];
51248
- } else if (family !== "pie" && family !== "doughnut") {
51846
+ } else if (hasAxes) {
51249
51847
  const dateAxis = chartData.dateCategories ? axisFormatting(chartData, "dateAx", CAT_AX_ID) : void 0;
51250
51848
  plotArea[dateAxis ? "c:dateAx" : "c:catAx"] = buildGeneratedChartAxis(
51251
51849
  CAT_AX_ID,
@@ -51264,7 +51862,7 @@ function buildPlotArea(chartData, tag, family) {
51264
51862
  return plotArea;
51265
51863
  }
51266
51864
  function buildChartSpaceXml(chartData) {
51267
- const { tag, family } = resolveType(chartData.chartType);
51865
+ const { tag, family } = resolveChartContainerType(chartData.chartType);
51268
51866
  const chart = {};
51269
51867
  if (chartData.title) {
51270
51868
  chart["c:title"] = {
@@ -53170,6 +53768,7 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
53170
53768
  let playbackSpeed;
53171
53769
  let trimStartMs;
53172
53770
  let trimEndMs;
53771
+ let embedRId;
53173
53772
  const bookmarks = [];
53174
53773
  const extLst = mediaNode["p:extLst"] ?? cMediaNode["p:extLst"];
53175
53774
  if (extLst) {
@@ -53177,6 +53776,13 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
53177
53776
  for (const ext of exts) {
53178
53777
  const p14Media = ext["p14:media"];
53179
53778
  if (p14Media) {
53779
+ if (embedRId === void 0) {
53780
+ const embedRaw = p14Media["@_r:embed"] ?? p14Media["@_embed"];
53781
+ const embedStr = embedRaw === void 0 ? "" : String(embedRaw).trim();
53782
+ if (embedStr.length > 0) {
53783
+ embedRId = embedStr;
53784
+ }
53785
+ }
53180
53786
  const p14Trim = p14Media["p14:trim"];
53181
53787
  if (p14Trim) {
53182
53788
  const st = p14Trim["@_st"];
@@ -53246,7 +53852,8 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
53246
53852
  fadeInDuration,
53247
53853
  fadeOutDuration,
53248
53854
  playbackSpeed,
53249
- bookmarks
53855
+ bookmarks,
53856
+ embedRId
53250
53857
  };
53251
53858
  }
53252
53859
  var PptxHandlerRuntime = class {
@@ -53474,6 +54081,12 @@ var PptxHandlerRuntime = class {
53474
54081
  loadedEmbeddedFonts = [];
53475
54082
  /** Typed source metadata for lossless embedded-font list round trips. */
53476
54083
  loadedEmbeddedFontList;
54084
+ /**
54085
+ * View properties parsed from `ppt/viewProps.xml` during load, preserved so
54086
+ * an unmodified load -> save round-trips the typed model and callers that do
54087
+ * not override `saveOptions.viewProperties` still persist the loaded state.
54088
+ */
54089
+ loadedViewProperties;
53477
54090
  /** Map of comment author IDs to display names (from `ppt/commentAuthors.xml`). */
53478
54091
  commentAuthorMap = /* @__PURE__ */ new Map();
53479
54092
  /** Full comment author details keyed by author ID, preserving initials/lastIdx/clrIdx for round-trip. */
@@ -53697,18 +54310,176 @@ function parseTableStyleBorders(tcStyle) {
53697
54310
  }
53698
54311
  return has ? result : void 0;
53699
54312
  }
54313
+ function toHex3(raw) {
54314
+ const hex10 = String(raw ?? "").trim();
54315
+ if (!hex10) {
54316
+ return void 0;
54317
+ }
54318
+ return hex10.startsWith("#") ? hex10 : `#${hex10}`;
54319
+ }
54320
+ function parseColorChoiceFill(node) {
54321
+ if (!node) {
54322
+ return void 0;
54323
+ }
54324
+ const scheme = parseSolidFillStyle(node);
54325
+ if (scheme) {
54326
+ return scheme;
54327
+ }
54328
+ const srgb = node["a:srgbClr"];
54329
+ const color2 = toHex3(srgb?.["@_val"]);
54330
+ if (!color2) {
54331
+ return void 0;
54332
+ }
54333
+ const fill = { schemeColor: "", color: color2 };
54334
+ const tintRaw = srgb?.["a:tint"];
54335
+ const tint = tintRaw ? parseInt(String(tintRaw["@_val"] || "0"), 10) || void 0 : void 0;
54336
+ if (tint !== void 0) {
54337
+ fill.tint = tint;
54338
+ }
54339
+ const shadeRaw = srgb?.["a:shade"];
54340
+ const shade = shadeRaw ? parseInt(String(shadeRaw["@_val"] || "0"), 10) || void 0 : void 0;
54341
+ if (shade !== void 0) {
54342
+ fill.shade = shade;
54343
+ }
54344
+ return fill;
54345
+ }
54346
+ function parseGradientFill(gradFill) {
54347
+ const gsLst = gradFill["a:gsLst"];
54348
+ const rawStops = gsLst?.["a:gs"];
54349
+ const gsNodes = Array.isArray(rawStops) ? rawStops : rawStops ? [rawStops] : [];
54350
+ const stops = [];
54351
+ for (const gs of gsNodes) {
54352
+ const fill = parseColorChoiceFill(gs);
54353
+ if (!fill) {
54354
+ continue;
54355
+ }
54356
+ const position2 = (parseInt(String(gs["@_pos"] || "0"), 10) || 0) / 1e3;
54357
+ stops.push({ position: position2, fill });
54358
+ }
54359
+ if (stops.length === 0) {
54360
+ return void 0;
54361
+ }
54362
+ const lin = gradFill["a:lin"];
54363
+ if (lin) {
54364
+ const angRaw = parseInt(String(lin["@_ang"] || "0"), 10) || 0;
54365
+ const angle = (angRaw / 6e4 % 360 + 360) % 360;
54366
+ return { stops, angle, type: "linear" };
54367
+ }
54368
+ if (gradFill["a:path"] !== void 0) {
54369
+ return { stops, type: "radial" };
54370
+ }
54371
+ return { stops, type: "linear" };
54372
+ }
54373
+ function parsePatternFill(pattFill) {
54374
+ const preset = String(pattFill["@_prst"] || "").trim();
54375
+ if (!preset) {
54376
+ return void 0;
54377
+ }
54378
+ const pattern = { preset };
54379
+ const foreground = parseColorChoiceFill(pattFill["a:fgClr"]);
54380
+ if (foreground) {
54381
+ pattern.foreground = foreground;
54382
+ }
54383
+ const background = parseColorChoiceFill(pattFill["a:bgClr"]);
54384
+ if (background) {
54385
+ pattern.background = background;
54386
+ }
54387
+ return pattern;
54388
+ }
54389
+ function parseTableStyleSectionFill(section) {
54390
+ if (!section) {
54391
+ return void 0;
54392
+ }
54393
+ const tcStyle = section["a:tcStyle"];
54394
+ const fillWrap = tcStyle?.["a:fill"];
54395
+ if (!fillWrap) {
54396
+ return void 0;
54397
+ }
54398
+ if (fillWrap["a:noFill"] !== void 0) {
54399
+ return { schemeColor: "", noFill: true };
54400
+ }
54401
+ const solid = fillWrap["a:solidFill"];
54402
+ if (solid) {
54403
+ return parseColorChoiceFill(solid);
54404
+ }
54405
+ const grad = fillWrap["a:gradFill"];
54406
+ if (grad) {
54407
+ const gradient = parseGradientFill(grad);
54408
+ if (gradient) {
54409
+ return { schemeColor: "", gradient };
54410
+ }
54411
+ }
54412
+ const patt = fillWrap["a:pattFill"];
54413
+ if (patt) {
54414
+ const pattern = parsePatternFill(patt);
54415
+ if (pattern) {
54416
+ return { schemeColor: "", pattern };
54417
+ }
54418
+ }
54419
+ return void 0;
54420
+ }
54421
+ function parseTableStyleSectionText(section) {
54422
+ const tcTxStyle = section?.["a:tcTxStyle"];
54423
+ if (!tcTxStyle) {
54424
+ return void 0;
54425
+ }
54426
+ const result = {};
54427
+ let hasProps = false;
54428
+ if (tcTxStyle["@_b"] === "on") {
54429
+ result.bold = true;
54430
+ hasProps = true;
54431
+ }
54432
+ if (tcTxStyle["@_i"] === "on") {
54433
+ result.italic = true;
54434
+ hasProps = true;
54435
+ }
54436
+ const underline = String(tcTxStyle["@_u"] || "").trim();
54437
+ if (underline && underline !== "none") {
54438
+ result.underline = true;
54439
+ hasProps = true;
54440
+ }
54441
+ const font = tcTxStyle["a:font"];
54442
+ const face = font ? String(font["@_typeface"] || "").trim() : "";
54443
+ if (face) {
54444
+ result.fontFace = face;
54445
+ hasProps = true;
54446
+ }
54447
+ const fontRef = tcTxStyle["a:fontRef"];
54448
+ const idx = fontRef ? String(fontRef["@_idx"] || "").trim() : "";
54449
+ if (idx) {
54450
+ result.fontRefIdx = idx;
54451
+ hasProps = true;
54452
+ }
54453
+ const schemeClr = fontRef?.["a:schemeClr"] ?? tcTxStyle["a:schemeClr"];
54454
+ if (schemeClr) {
54455
+ const val = String(schemeClr["@_val"] || "").trim();
54456
+ if (val) {
54457
+ result.fontSchemeColor = val;
54458
+ hasProps = true;
54459
+ const tintNode = schemeClr["a:tint"];
54460
+ if (tintNode) {
54461
+ result.fontTint = parseInt(String(tintNode["@_val"] || "0"), 10) || void 0;
54462
+ }
54463
+ const shadeNode = schemeClr["a:shade"];
54464
+ if (shadeNode) {
54465
+ result.fontShade = parseInt(String(shadeNode["@_val"] || "0"), 10) || void 0;
54466
+ }
54467
+ }
54468
+ } else {
54469
+ const srgb = fontRef?.["a:srgbClr"] ?? tcTxStyle["a:srgbClr"];
54470
+ const hex10 = toHex3(srgb?.["@_val"]);
54471
+ if (hex10) {
54472
+ result.fontColor = hex10;
54473
+ hasProps = true;
54474
+ }
54475
+ }
54476
+ return hasProps ? result : void 0;
54477
+ }
53700
54478
  var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53701
54479
  /**
53702
- * Export slides to a raster/vector format.
53703
- *
53704
- * This is a stub that signals export intent. Actual rendering requires a
53705
- * platform-specific canvas or PDF library (e.g. Puppeteer, node-canvas,
53706
- * pdfkit). Host applications should override or extend this method with
53707
- * their own rendering pipeline.
53708
- *
53709
- * @param _slides The slides to export.
53710
- * @param _options Export options (format, DPI, slide indices, etc.).
53711
- * @returns A map of slide index → exported binary data.
54480
+ * Export slides to a raster/vector format. This is a stub that signals
54481
+ * export intent; actual rendering requires a platform-specific canvas or
54482
+ * PDF backend that host applications wire in by overriding this method.
53712
54483
  */
53713
54484
  async exportSlides(slides, options) {
53714
54485
  this.compatibilityService.reportWarning({
@@ -53773,15 +54544,11 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53773
54544
  }
53774
54545
  /**
53775
54546
  * Extract fill information from a table style section element
53776
- * (e.g. `a:wholeTbl`, `a:band1H`, `a:firstRow`).
54547
+ * (e.g. `a:wholeTbl`, `a:band1H`, `a:firstRow`). Handles scheme + sRGB
54548
+ * solids, gradients, preset patterns, and `a:noFill` (issue #95).
53777
54549
  */
53778
54550
  extractTableStyleSectionFill(section) {
53779
- if (!section) {
53780
- return void 0;
53781
- }
53782
- const tcStyle = section["a:tcStyle"];
53783
- const fill = tcStyle?.["a:fill"];
53784
- return parseSolidFillStyle(fill?.["a:solidFill"]);
54551
+ return parseTableStyleSectionFill(section);
53785
54552
  }
53786
54553
  /**
53787
54554
  * Extract border styling from a table style section's
@@ -53791,44 +54558,12 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53791
54558
  return parseTableStyleBorders(section?.["a:tcStyle"]);
53792
54559
  }
53793
54560
  /**
53794
- * Extract text properties from a:tcTxStyle in a table style section.
54561
+ * Extract text properties from `a:tcTxStyle` in a table style section.
54562
+ * Captures bold/italic/underline, typeface, font-collection index, and the
54563
+ * font colour (scheme or sRGB) (issue #95).
53795
54564
  */
53796
54565
  extractTableStyleSectionText(section) {
53797
- if (!section) {
53798
- return void 0;
53799
- }
53800
- const tcTxStyle = section["a:tcTxStyle"];
53801
- if (!tcTxStyle) {
53802
- return void 0;
53803
- }
53804
- const result = {};
53805
- let hasProps = false;
53806
- if (tcTxStyle["@_b"] === "on") {
53807
- result.bold = true;
53808
- hasProps = true;
53809
- }
53810
- if (tcTxStyle["@_i"] === "on") {
53811
- result.italic = true;
53812
- hasProps = true;
53813
- }
53814
- const fontClr = tcTxStyle["a:fontRef"];
53815
- const schemeClr = fontClr?.["a:schemeClr"] ?? tcTxStyle["a:schemeClr"];
53816
- if (schemeClr) {
53817
- const val = String(schemeClr["@_val"] || "").trim();
53818
- if (val) {
53819
- result.fontSchemeColor = val;
53820
- hasProps = true;
53821
- const tintNode = schemeClr["a:tint"];
53822
- if (tintNode) {
53823
- result.fontTint = parseInt(String(tintNode["@_val"] || "0"), 10) || void 0;
53824
- }
53825
- const shadeNode = schemeClr["a:shade"];
53826
- if (shadeNode) {
53827
- result.fontShade = parseInt(String(shadeNode["@_val"] || "0"), 10) || void 0;
53828
- }
53829
- }
53830
- }
53831
- return hasProps ? result : void 0;
54566
+ return parseTableStyleSectionText(section);
53832
54567
  }
53833
54568
  ensureArray(val) {
53834
54569
  if (!val) {
@@ -54500,6 +55235,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
54500
55235
  );
54501
55236
  const trimStartMs = timing.trimStartMs ?? extData.trimStartMs;
54502
55237
  const trimEndMs = timing.trimEndMs ?? extData.trimEndMs;
55238
+ const mediaEmbedPath = extData.embedRId ? this.resolveRelationshipTarget(slidePath, extData.embedRId) : void 0;
54503
55239
  result.set(shapeId, {
54504
55240
  trimStartMs: trimStartMs !== void 0 && !isNaN(trimStartMs) ? trimStartMs : void 0,
54505
55241
  trimEndMs: trimEndMs !== void 0 && !isNaN(trimEndMs) ? trimEndMs : void 0,
@@ -54513,7 +55249,8 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
54513
55249
  playAcrossSlides: timing.playAcrossSlides || void 0,
54514
55250
  hideWhenNotPlaying: hideWhenNotPlaying || void 0,
54515
55251
  bookmarks: extData.bookmarks.length > 0 ? extData.bookmarks : void 0,
54516
- playbackSpeed: extData.playbackSpeed
55252
+ playbackSpeed: extData.playbackSpeed,
55253
+ mediaEmbedPath
54517
55254
  });
54518
55255
  }
54519
55256
  }
@@ -54687,6 +55424,10 @@ var PptxHandlerRuntime7 = class extends PptxHandlerRuntime6 {
54687
55424
  if (!timing) {
54688
55425
  continue;
54689
55426
  }
55427
+ if (timing.mediaEmbedPath && (typeof el.mediaPath !== "string" || el.mediaPath.length === 0)) {
55428
+ el.mediaPath = timing.mediaEmbedPath;
55429
+ el.mediaMimeType = this.getImageMimeType(timing.mediaEmbedPath);
55430
+ }
54690
55431
  if (timing.trimStartMs !== void 0) {
54691
55432
  el.trimStartMs = timing.trimStartMs;
54692
55433
  }
@@ -55685,7 +56426,7 @@ var PptxHandlerRuntime11 = class extends PptxHandlerRuntime10 {
55685
56426
  }
55686
56427
  }
55687
56428
  async reconcilePresentationSlidesForSave(params) {
55688
- await this.presentationSlidesReconciler.reconcile({
56429
+ return await this.presentationSlidesReconciler.reconcile({
55689
56430
  ...params,
55690
56431
  zip: this.zip,
55691
56432
  parser: this.parser,
@@ -55974,6 +56715,31 @@ function applyFontMetadata(fontNode, panose, pitchFamily, charset) {
55974
56715
  }
55975
56716
  return fontNode;
55976
56717
  }
56718
+ function buildUnderlineLineXml(line2) {
56719
+ const uln = {};
56720
+ if (typeof line2.widthEmu === "number" && Number.isFinite(line2.widthEmu)) {
56721
+ uln["@_w"] = String(Math.round(line2.widthEmu));
56722
+ }
56723
+ if (line2.compound) {
56724
+ uln["@_cmpd"] = line2.compound;
56725
+ }
56726
+ if (line2.cap) {
56727
+ uln["@_cap"] = line2.cap;
56728
+ }
56729
+ if (line2.algn) {
56730
+ uln["@_algn"] = line2.algn;
56731
+ }
56732
+ if (line2.prstDash) {
56733
+ uln["a:prstDash"] = { "@_val": line2.prstDash };
56734
+ }
56735
+ if (line2.headEndXml) {
56736
+ uln["a:headEnd"] = line2.headEndXml;
56737
+ }
56738
+ if (line2.tailEndXml) {
56739
+ uln["a:tailEnd"] = line2.tailEndXml;
56740
+ }
56741
+ return uln;
56742
+ }
55977
56743
  var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime11 {
55978
56744
  createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId) {
55979
56745
  const runProps = {
@@ -55994,6 +56760,8 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55994
56760
  }
55995
56761
  if (style.underline) {
55996
56762
  runProps["@_u"] = style.underlineStyle || "sng";
56763
+ } else if (style.underlineExplicitNone) {
56764
+ runProps["@_u"] = "none";
55997
56765
  }
55998
56766
  if (style.strikethrough !== void 0) {
55999
56767
  runProps["@_strike"] = style.strikethrough ? style.strikeType || "sngStrike" : "noStrike";
@@ -56009,6 +56777,8 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
56009
56777
  }
56010
56778
  if (style.textCaps && style.textCaps !== "none") {
56011
56779
  runProps["@_cap"] = style.textCaps;
56780
+ } else if (style.textCapsExplicitNone) {
56781
+ runProps["@_cap"] = "none";
56012
56782
  }
56013
56783
  if (style.kumimoji !== void 0) {
56014
56784
  runProps["@_kumimoji"] = style.kumimoji ? "1" : "0";
@@ -56117,13 +56887,21 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
56117
56887
  runProps["a:effectDag"] = style.textEffectDagXml;
56118
56888
  }
56119
56889
  if (style.highlightColor) {
56120
- runProps["a:highlight"] = {
56121
- "a:srgbClr": {
56122
- "@_val": style.highlightColor.replace("#", "")
56123
- }
56124
- };
56890
+ const resolvedHighlight = style.highlightColorXml ? this.parseColor(style.highlightColorXml) : void 0;
56891
+ runProps["a:highlight"] = serializeColorChoice(
56892
+ style.highlightColorXml,
56893
+ resolvedHighlight,
56894
+ style.highlightColor
56895
+ );
56896
+ }
56897
+ if (style.underlineLineFollowsText) {
56898
+ runProps["a:uLnTx"] = {};
56899
+ } else if (style.underlineLine) {
56900
+ runProps["a:uLn"] = buildUnderlineLineXml(style.underlineLine);
56125
56901
  }
56126
- if (style.underline && style.underlineColor) {
56902
+ if (style.underlineFillFollowsText) {
56903
+ runProps["a:uFillTx"] = {};
56904
+ } else if (style.underline && style.underlineColor) {
56127
56905
  runProps["a:uFill"] = {
56128
56906
  "a:solidFill": {
56129
56907
  "a:srgbClr": {
@@ -56132,21 +56910,28 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
56132
56910
  }
56133
56911
  };
56134
56912
  }
56135
- if (style.fontFamily) {
56913
+ const latinFace = style.latinFontThemeToken ?? style.fontFamily;
56914
+ if (latinFace) {
56136
56915
  runProps["a:latin"] = applyFontMetadata(
56137
- { "@_typeface": style.fontFamily },
56916
+ { "@_typeface": latinFace },
56138
56917
  style.latinFontPanose,
56139
56918
  style.latinFontPitchFamily,
56140
56919
  style.latinFontCharset
56141
56920
  );
56921
+ }
56922
+ const eastAsiaFace = style.eastAsiaFontThemeToken ?? style.eastAsiaFont;
56923
+ if (eastAsiaFace) {
56142
56924
  runProps["a:ea"] = applyFontMetadata(
56143
- { "@_typeface": style.eastAsiaFont || style.fontFamily },
56925
+ { "@_typeface": eastAsiaFace },
56144
56926
  style.eastAsiaFontPanose,
56145
56927
  style.eastAsiaFontPitchFamily,
56146
56928
  style.eastAsiaFontCharset
56147
56929
  );
56930
+ }
56931
+ const complexScriptFace = style.complexScriptFontThemeToken ?? style.complexScriptFont;
56932
+ if (complexScriptFace) {
56148
56933
  runProps["a:cs"] = applyFontMetadata(
56149
- { "@_typeface": style.complexScriptFont || style.fontFamily },
56934
+ { "@_typeface": complexScriptFace },
56150
56935
  style.complexScriptFontPanose,
56151
56936
  style.complexScriptFontPitchFamily,
56152
56937
  style.complexScriptFontCharset
@@ -56196,12 +56981,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
56196
56981
  if (mouseOverTarget.length > 0) {
56197
56982
  const mouseOverRelId = resolveHyperlinkRelationshipId(mouseOverTarget);
56198
56983
  if (mouseOverRelId) {
56199
- runProps["a:hlinkMouseOver"] = {
56200
- "@_r:id": mouseOverRelId
56201
- };
56984
+ const mouseOverNode = { "@_r:id": mouseOverRelId };
56985
+ if (style.hyperlinkMouseOverSoundXml && typeof style.hyperlinkMouseOverSoundXml === "object") {
56986
+ mouseOverNode["a:snd"] = style.hyperlinkMouseOverSoundXml;
56987
+ }
56988
+ runProps["a:hlinkMouseOver"] = mouseOverNode;
56202
56989
  }
56203
56990
  }
56204
56991
  }
56992
+ if (style.runPropertiesExtLstXml && typeof style.runPropertiesExtLstXml === "object") {
56993
+ runProps["a:extLst"] = style.runPropertiesExtLstXml;
56994
+ }
56205
56995
  return runProps;
56206
56996
  }
56207
56997
  applyHyperlinkExtraAttrs(hlinkNode, style) {
@@ -56220,20 +57010,24 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
56220
57010
  if (style.hyperlinkEndSound !== void 0) {
56221
57011
  hlinkNode["@_endSnd"] = style.hyperlinkEndSound ? "1" : "0";
56222
57012
  }
57013
+ if (style.hyperlinkSoundXml && typeof style.hyperlinkSoundXml === "object") {
57014
+ hlinkNode["a:snd"] = style.hyperlinkSoundXml;
57015
+ }
56223
57016
  }
56224
57017
  };
56225
57018
  var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56226
57019
  createParagraphsFromTextContent(text2, textStyle, textSegments, resolveHyperlinkRelationshipId) {
56227
- const paragraphAlign = this.textAlignToDrawingValue(textStyle?.align);
56228
- const spacing = {
56229
- spacingBefore: this.createParagraphSpacingXmlFromPx(textStyle?.paragraphSpacingBefore),
56230
- spacingAfter: this.createParagraphSpacingXmlFromPx(textStyle?.paragraphSpacingAfter),
56231
- lineSpacing: this.createLineSpacingXmlFromMultiplier(textStyle?.lineSpacing),
56232
- lineSpacingExactPt: textStyle?.lineSpacingExactPt
56233
- };
56234
- const createParagraph = (runs, bulletInfo, level, endParaRunProperties) => {
57020
+ const createParagraph = (runs, bulletInfo, level, endParaRunProperties, paragraphProperties2) => {
57021
+ const effectiveStyle = paragraphProperties2 ? { ...textStyle, ...paragraphProperties2 } : textStyle;
57022
+ const paragraphAlign = this.textAlignToDrawingValue(effectiveStyle?.align);
57023
+ const spacing = {
57024
+ spacingBefore: this.createParagraphSpacingXmlFromPx(effectiveStyle?.paragraphSpacingBefore),
57025
+ spacingAfter: this.createParagraphSpacingXmlFromPx(effectiveStyle?.paragraphSpacingAfter),
57026
+ lineSpacing: this.createLineSpacingXmlFromMultiplier(effectiveStyle?.lineSpacing),
57027
+ lineSpacingExactPt: effectiveStyle?.lineSpacingExactPt
57028
+ };
56235
57029
  const paragraphProps = buildParagraphPropertiesXml(
56236
- textStyle,
57030
+ effectiveStyle,
56237
57031
  paragraphAlign,
56238
57032
  bulletInfo,
56239
57033
  spacing,
@@ -56245,12 +57039,22 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56245
57039
  "a:rPr": this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId),
56246
57040
  "a:t": runText
56247
57041
  });
56248
- const createFieldRun = (runText, style, fieldType, fieldGuid) => ({
56249
- "@_type": fieldType,
56250
- ...fieldGuid ? { "@_id": fieldGuid } : {},
56251
- "a:rPr": this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId),
56252
- "a:t": runText
56253
- });
57042
+ const createFieldRun = (runText, style, fieldType, fieldGuid, fieldGuidAttr, fieldParagraphPropertiesXml) => {
57043
+ const fld = { "@_type": fieldType };
57044
+ if (fieldGuid) {
57045
+ if (fieldGuidAttr === "uuid") {
57046
+ fld["@_uuid"] = fieldGuid;
57047
+ } else {
57048
+ fld["@_id"] = fieldGuid;
57049
+ }
57050
+ }
57051
+ fld["a:rPr"] = this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId);
57052
+ if (fieldParagraphPropertiesXml && typeof fieldParagraphPropertiesXml === "object") {
57053
+ fld["a:pPr"] = fieldParagraphPropertiesXml;
57054
+ }
57055
+ fld["a:t"] = runText;
57056
+ return fld;
57057
+ };
56254
57058
  const createRubyRun = (segment, style) => {
56255
57059
  const rubyPr = {};
56256
57060
  if (segment.rubyAlignment) {
@@ -56289,17 +57093,27 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56289
57093
  let currentBulletInfo;
56290
57094
  let currentLevel;
56291
57095
  let currentEndParaRunProperties;
57096
+ let currentParagraphProperties;
57097
+ let capturedParagraphMeta = false;
56292
57098
  const pushParagraph = () => {
56293
57099
  if (currentRuns.length === 0) {
56294
57100
  currentRuns.push(createRun("", textStyle));
56295
57101
  }
56296
57102
  paragraphs.push(
56297
- createParagraph(currentRuns, currentBulletInfo, currentLevel, currentEndParaRunProperties)
57103
+ createParagraph(
57104
+ currentRuns,
57105
+ currentBulletInfo,
57106
+ currentLevel,
57107
+ currentEndParaRunProperties,
57108
+ currentParagraphProperties
57109
+ )
56298
57110
  );
56299
57111
  currentRuns = [];
56300
57112
  currentBulletInfo = void 0;
56301
57113
  currentLevel = void 0;
56302
57114
  currentEndParaRunProperties = void 0;
57115
+ currentParagraphProperties = void 0;
57116
+ capturedParagraphMeta = false;
56303
57117
  };
56304
57118
  if (textSegments && textSegments.length > 0) {
56305
57119
  const uniformSegmentOverrides = computeUniformSegmentOverrides(textStyle, textSegments);
@@ -56309,7 +57123,7 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56309
57123
  ...segment.style,
56310
57124
  ...uniformSegmentOverrides
56311
57125
  };
56312
- if (currentRuns.length === 0) {
57126
+ if (!capturedParagraphMeta) {
56313
57127
  if (segment.bulletInfo) {
56314
57128
  currentBulletInfo = segment.bulletInfo;
56315
57129
  }
@@ -56319,6 +57133,10 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56319
57133
  if (segment.endParaRunProperties) {
56320
57134
  currentEndParaRunProperties = segment.endParaRunProperties;
56321
57135
  }
57136
+ if (segment.paragraphProperties) {
57137
+ currentParagraphProperties = segment.paragraphProperties;
57138
+ }
57139
+ capturedParagraphMeta = true;
56322
57140
  }
56323
57141
  if (segment.isLineBreak) {
56324
57142
  const brNode = {};
@@ -56353,7 +57171,9 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56353
57171
  linePart,
56354
57172
  segmentStyle,
56355
57173
  segment.fieldType,
56356
- segment.fieldGuid
57174
+ segment.fieldGuid,
57175
+ segment.fieldGuidAttr,
57176
+ segment.fieldParagraphPropertiesXml
56357
57177
  );
56358
57178
  fieldRun.__isField = true;
56359
57179
  currentRuns.push(fieldRun);
@@ -57110,7 +57930,95 @@ var PptxHandlerRuntime16 = class extends PptxHandlerRuntime15 {
57110
57930
  );
57111
57931
  }
57112
57932
  };
57933
+ var SCRIPT_CANDIDATES = {
57934
+ cjk: ["Hans", "Hant", "Jpan", "Hang"],
57935
+ kana: ["Jpan", "Hans", "Hant"],
57936
+ hangul: ["Hang"],
57937
+ arabic: ["Arab"],
57938
+ hebrew: ["Hebr"],
57939
+ thai: ["Thai"]
57940
+ };
57941
+ function aggregateFontScriptOverrides(perPathMap) {
57942
+ const aggregate = {};
57943
+ for (const overrides10 of perPathMap.values()) {
57944
+ for (const [script, typeface] of Object.entries(overrides10)) {
57945
+ if (!(script in aggregate)) {
57946
+ aggregate[script] = typeface;
57947
+ }
57948
+ }
57949
+ }
57950
+ return aggregate;
57951
+ }
57952
+ function detectDominantScript(text2) {
57953
+ const counts = {};
57954
+ for (const ch of text2) {
57955
+ const code = ch.codePointAt(0) ?? 0;
57956
+ let cat;
57957
+ if (code >= 4352 && code <= 4607) {
57958
+ cat = "hangul";
57959
+ } else if (code >= 44032 && code <= 55215) {
57960
+ cat = "hangul";
57961
+ } else if (code >= 12352 && code <= 12543) {
57962
+ cat = "kana";
57963
+ } else if (code >= 19968 && code <= 40959 || code >= 13312 && code <= 19903 || code >= 63744 && code <= 64255) {
57964
+ cat = "cjk";
57965
+ } else if (code >= 1536 && code <= 1791) {
57966
+ cat = "arabic";
57967
+ } else if (code >= 1424 && code <= 1535) {
57968
+ cat = "hebrew";
57969
+ } else if (code >= 3584 && code <= 3711) {
57970
+ cat = "thai";
57971
+ }
57972
+ if (cat) {
57973
+ counts[cat] = (counts[cat] ?? 0) + 1;
57974
+ }
57975
+ }
57976
+ let best;
57977
+ let bestCount = 0;
57978
+ for (const [cat, count] of Object.entries(counts)) {
57979
+ if (count > bestCount) {
57980
+ best = cat;
57981
+ bestCount = count;
57982
+ }
57983
+ }
57984
+ return best;
57985
+ }
57113
57986
  var PptxHandlerRuntime17 = class extends PptxHandlerRuntime16 {
57987
+ /**
57988
+ * Resolve the automatic per-script fallback face for a run's text from the
57989
+ * theme's `<a:font script="...">` overrides (#83). Body (minor) fonts win
57990
+ * over heading (major) fonts. Returns `undefined` when the deck declares no
57991
+ * script overrides or the text needs no fallback.
57992
+ */
57993
+ resolveScriptFallbackFont(text2) {
57994
+ if (!text2) {
57995
+ return void 0;
57996
+ }
57997
+ if (this.masterThemeMinorFontScripts.size === 0 && this.masterThemeMajorFontScripts.size === 0) {
57998
+ return void 0;
57999
+ }
58000
+ const category = detectDominantScript(text2);
58001
+ if (!category) {
58002
+ return void 0;
58003
+ }
58004
+ const candidates = SCRIPT_CANDIDATES[category];
58005
+ if (!candidates) {
58006
+ return void 0;
58007
+ }
58008
+ const minor = aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);
58009
+ for (const key of candidates) {
58010
+ if (minor[key]) {
58011
+ return minor[key];
58012
+ }
58013
+ }
58014
+ const major = aggregateFontScriptOverrides(this.masterThemeMajorFontScripts);
58015
+ for (const key of candidates) {
58016
+ if (major[key]) {
58017
+ return major[key];
58018
+ }
58019
+ }
58020
+ return void 0;
58021
+ }
57114
58022
  textStylesEqual(left, right) {
57115
58023
  const keys = [
57116
58024
  "fontFamily",
@@ -57269,6 +58177,10 @@ var PptxHandlerRuntime18 = class extends PptxHandlerRuntime17 {
57269
58177
  const esVal = String(endSnd).trim().toLowerCase();
57270
58178
  style.hyperlinkEndSound = esVal === "1" || esVal === "true";
57271
58179
  }
58180
+ const clickSnd = hyperlinkNode["a:snd"];
58181
+ if (clickSnd && typeof clickSnd === "object") {
58182
+ style.hyperlinkSoundXml = clickSnd;
58183
+ }
57272
58184
  }
57273
58185
  const actionStr = String(hyperlinkNode?.["@_action"] || "").trim();
57274
58186
  if (actionStr) {
@@ -57298,6 +58210,10 @@ var PptxHandlerRuntime18 = class extends PptxHandlerRuntime17 {
57298
58210
  } else {
57299
58211
  style.hyperlinkMouseOver = mouseOverRelId;
57300
58212
  }
58213
+ const mouseOverSnd = hlinkMouseOver["a:snd"];
58214
+ if (mouseOverSnd && typeof mouseOverSnd === "object") {
58215
+ style.hyperlinkMouseOverSoundXml = mouseOverSnd;
58216
+ }
57301
58217
  }
57302
58218
  }
57303
58219
  }
@@ -57522,6 +58438,8 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57522
58438
  if (rawU.length > 0 && rawU !== "none") {
57523
58439
  style.underlineStyle = rawU;
57524
58440
  }
58441
+ } else if (underlineToken === "none") {
58442
+ style.underlineExplicitNone = true;
57525
58443
  }
57526
58444
  }
57527
58445
  const uFill = runProperties2["a:uFill"];
@@ -57533,6 +58451,46 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57533
58451
  style.underlineColor = underlineColor;
57534
58452
  }
57535
58453
  }
58454
+ if (uLn) {
58455
+ const line2 = {};
58456
+ const widthEmu = Number.parseInt(String(uLn["@_w"] ?? ""), 10);
58457
+ if (Number.isFinite(widthEmu)) {
58458
+ line2.widthEmu = widthEmu;
58459
+ }
58460
+ const compound = String(uLn["@_cmpd"] ?? "").trim();
58461
+ if (compound) {
58462
+ line2.compound = compound;
58463
+ }
58464
+ const cap = String(uLn["@_cap"] ?? "").trim();
58465
+ if (cap) {
58466
+ line2.cap = cap;
58467
+ }
58468
+ const algn = String(uLn["@_algn"] ?? "").trim();
58469
+ if (algn) {
58470
+ line2.algn = algn;
58471
+ }
58472
+ const prstDash = String(uLn["a:prstDash"]?.["@_val"] ?? "").trim();
58473
+ if (prstDash) {
58474
+ line2.prstDash = prstDash;
58475
+ }
58476
+ const headEnd = uLn["a:headEnd"];
58477
+ if (headEnd && typeof headEnd === "object") {
58478
+ line2.headEndXml = headEnd;
58479
+ }
58480
+ const tailEnd = uLn["a:tailEnd"];
58481
+ if (tailEnd && typeof tailEnd === "object") {
58482
+ line2.tailEndXml = tailEnd;
58483
+ }
58484
+ if (Object.keys(line2).length > 0) {
58485
+ style.underlineLine = line2;
58486
+ }
58487
+ }
58488
+ if (runProperties2["a:uLnTx"] !== void 0) {
58489
+ style.underlineLineFollowsText = true;
58490
+ }
58491
+ if (runProperties2["a:uFillTx"] !== void 0) {
58492
+ style.underlineFillFollowsText = true;
58493
+ }
57536
58494
  if (runProperties2["@_strike"] !== void 0) {
57537
58495
  const strikeToken = String(runProperties2["@_strike"] || "").trim().toLowerCase();
57538
58496
  style.strikethrough = strikeToken.length > 0 && strikeToken !== "nostrike" && strikeToken !== "none" && strikeToken !== "0" && strikeToken !== "false";
@@ -57576,10 +58534,15 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57576
58534
  }
57577
58535
  }
57578
58536
  if (runProperties2["a:highlight"]) {
57579
- const highlightHex = this.parseColor(xmlChild(runProperties2, "a:highlight"));
58537
+ const highlightNode = xmlChild(runProperties2, "a:highlight");
58538
+ const highlightHex = this.parseColor(highlightNode);
57580
58539
  if (highlightHex) {
57581
58540
  style.highlightColor = highlightHex;
57582
58541
  }
58542
+ const highlightXml = extractColorChoiceXml(highlightNode);
58543
+ if (highlightXml) {
58544
+ style.highlightColorXml = highlightXml;
58545
+ }
57583
58546
  }
57584
58547
  const textFillVariants = this.extractTextFillVariants(runProperties2);
57585
58548
  if (textFillVariants.textFillGradient) {
@@ -57600,16 +58563,28 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57600
58563
  const latin = xmlChild(runProperties2, "a:latin");
57601
58564
  const eastAsian = xmlChild(runProperties2, "a:ea");
57602
58565
  const complexScript = xmlChild(runProperties2, "a:cs");
57603
- const chosenTypeface = xmlAttr(latin, "typeface") || xmlAttr(eastAsian, "typeface") || xmlAttr(complexScript, "typeface");
58566
+ const latinTypefaceToken = xmlAttr(latin, "typeface");
58567
+ const eaTypefaceToken = xmlAttr(eastAsian, "typeface");
58568
+ const csTypefaceToken = xmlAttr(complexScript, "typeface");
58569
+ const chosenTypeface = latinTypefaceToken || eaTypefaceToken || csTypefaceToken;
57604
58570
  const resolvedTypeface = this.resolveThemeTypeface(chosenTypeface);
57605
58571
  if (resolvedTypeface) {
57606
58572
  style.fontFamily = resolvedTypeface;
57607
58573
  }
57608
- const eaTypeface = this.resolveThemeTypeface(xmlAttr(eastAsian, "typeface"));
58574
+ if (latinTypefaceToken && latinTypefaceToken.startsWith("+")) {
58575
+ style.latinFontThemeToken = latinTypefaceToken;
58576
+ }
58577
+ if (eaTypefaceToken && eaTypefaceToken.startsWith("+")) {
58578
+ style.eastAsiaFontThemeToken = eaTypefaceToken;
58579
+ }
58580
+ if (csTypefaceToken && csTypefaceToken.startsWith("+")) {
58581
+ style.complexScriptFontThemeToken = csTypefaceToken;
58582
+ }
58583
+ const eaTypeface = this.resolveThemeTypeface(eaTypefaceToken);
57609
58584
  if (eaTypeface) {
57610
58585
  style.eastAsiaFont = eaTypeface;
57611
58586
  }
57612
- const csTypeface = this.resolveThemeTypeface(xmlAttr(complexScript, "typeface"));
58587
+ const csTypeface = this.resolveThemeTypeface(csTypefaceToken);
57613
58588
  if (csTypeface) {
57614
58589
  style.complexScriptFont = csTypeface;
57615
58590
  }
@@ -57625,6 +58600,9 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57625
58600
  const capAttr = String(runProperties2["@_cap"] || "").trim().toLowerCase();
57626
58601
  if (capAttr === "all" || capAttr === "small") {
57627
58602
  style.textCaps = capAttr;
58603
+ } else if (capAttr === "none") {
58604
+ style.textCaps = "none";
58605
+ style.textCapsExplicitNone = true;
57628
58606
  }
57629
58607
  const symNode = xmlChild(runProperties2, "a:sym");
57630
58608
  if (symNode) {
@@ -57684,6 +58662,12 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57684
58662
  this.applyTextRunEffects(style, runEffectList);
57685
58663
  }
57686
58664
  this.applyTextRunEffectDag(style, runProperties2);
58665
+ if (includeDefaultAlignment) {
58666
+ const runExtLst = runProperties2["a:extLst"];
58667
+ if (runExtLst && typeof runExtLst === "object") {
58668
+ style.runPropertiesExtLstXml = runExtLst;
58669
+ }
58670
+ }
57687
58671
  return style;
57688
58672
  }
57689
58673
  /**
@@ -58347,12 +59331,63 @@ function writeCellTextFormatting(xmlCell, style, ensureArray16) {
58347
59331
  }
58348
59332
  }
58349
59333
  }
59334
+ function flattenCellTxBodyText(txBody, ensureArray16) {
59335
+ if (!txBody) {
59336
+ return "";
59337
+ }
59338
+ const paragraphs = ensureArray16(txBody["a:p"]);
59339
+ const lines = [];
59340
+ for (const paragraph of paragraphs) {
59341
+ const runs = ensureArray16(paragraph?.["a:r"]);
59342
+ const fields = ensureArray16(paragraph?.["a:fld"]);
59343
+ let lineText = "";
59344
+ for (const run of runs) {
59345
+ lineText += String(run?.["a:t"] ?? "");
59346
+ }
59347
+ for (const field of fields) {
59348
+ lineText += String(field?.["a:t"] ?? "");
59349
+ }
59350
+ lines.push(lineText);
59351
+ }
59352
+ return lines.join("\n");
59353
+ }
59354
+ function isRichCellTxBody(txBody, ensureArray16) {
59355
+ if (!txBody) {
59356
+ return false;
59357
+ }
59358
+ const paragraphs = ensureArray16(txBody["a:p"]);
59359
+ let totalRuns = 0;
59360
+ for (const paragraph of paragraphs) {
59361
+ const runs = ensureArray16(paragraph?.["a:r"]);
59362
+ totalRuns += runs.length;
59363
+ if (totalRuns > 1) {
59364
+ return true;
59365
+ }
59366
+ if (ensureArray16(paragraph?.["a:fld"]).length > 0) {
59367
+ return true;
59368
+ }
59369
+ for (const run of runs) {
59370
+ const rPr = run?.["a:rPr"];
59371
+ if (rPr?.["a:hlinkClick"] !== void 0) {
59372
+ return true;
59373
+ }
59374
+ }
59375
+ }
59376
+ return false;
59377
+ }
58350
59378
  var PptxHandlerRuntime22 = class _PptxHandlerRuntime5 extends PptxHandlerRuntime21 {
58351
59379
  /**
58352
59380
  * Write plain text into a table cell's txBody, preserving
58353
59381
  * existing run properties where possible.
58354
59382
  */
58355
59383
  writeTableCellText(xmlCell, text2) {
59384
+ const ensureArray16 = this.ensureArray.bind(this);
59385
+ const existingTxBody = xmlCell["a:txBody"];
59386
+ if (existingTxBody && ensureArray16(existingTxBody["a:p"]).length > 0) {
59387
+ if (flattenCellTxBodyText(existingTxBody, ensureArray16) === text2) {
59388
+ return;
59389
+ }
59390
+ }
58356
59391
  if (!xmlCell["a:txBody"]) {
58357
59392
  xmlCell["a:txBody"] = { "a:bodyPr": {}, "a:p": {} };
58358
59393
  }
@@ -58480,7 +59515,9 @@ var PptxHandlerRuntime22 = class _PptxHandlerRuntime5 extends PptxHandlerRuntime
58480
59515
  }
58481
59516
  delete tcPr["a:tcMar"];
58482
59517
  writeDiagonalBorders(tcPr, style, _PptxHandlerRuntime5.EMU_PER_PX);
58483
- writeCellTextFormatting(xmlCell, style, this.ensureArray.bind(this));
59518
+ if (!isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
59519
+ writeCellTextFormatting(xmlCell, style, this.ensureArray.bind(this));
59520
+ }
58484
59521
  const reordered = reorderObjectKeys(tcPr, TC_PR_BORDERS_ORDER);
58485
59522
  for (const key of Object.keys(tcPr)) {
58486
59523
  delete tcPr[key];
@@ -60149,7 +61186,7 @@ function findKey19(obj, name, getLocalName2) {
60149
61186
  function hex9(value) {
60150
61187
  return value.replace("#", "");
60151
61188
  }
60152
- var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
61189
+ var COLOR_LOCAL_NAMES2 = /* @__PURE__ */ new Set([
60153
61190
  "srgbClr",
60154
61191
  "schemeClr",
60155
61192
  "sysClr",
@@ -60158,7 +61195,7 @@ var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
60158
61195
  "hslClr"
60159
61196
  ]);
60160
61197
  function applyColorToList(list, value, getLocalName2) {
60161
- const colorKey = Object.keys(list).find((k) => COLOR_LOCAL_NAMES.has(getLocalName2(k)));
61198
+ const colorKey = Object.keys(list).find((k) => COLOR_LOCAL_NAMES2.has(getLocalName2(k)));
60162
61199
  const srgb = { "@_val": hex9(value) };
60163
61200
  if (!colorKey) {
60164
61201
  list["a:srgbClr"] = srgb;
@@ -62621,6 +63658,31 @@ var PptxHandlerRuntime27 = class extends PptxHandlerRuntime26 {
62621
63658
  return shape;
62622
63659
  }
62623
63660
  };
63661
+ function writeLineFill(lineNode, shapeStyle, parseColor) {
63662
+ delete lineNode["a:noFill"];
63663
+ delete lineNode["a:solidFill"];
63664
+ delete lineNode["a:gradFill"];
63665
+ delete lineNode["a:pattFill"];
63666
+ if (shapeStyle.strokeColor === "transparent" || shapeStyle.strokeWidth === 0) {
63667
+ lineNode["a:noFill"] = {};
63668
+ return;
63669
+ }
63670
+ if (shapeStyle.strokeFillMode === "gradient" && shapeStyle.strokeGradientXml) {
63671
+ lineNode["a:gradFill"] = shapeStyle.strokeGradientXml;
63672
+ return;
63673
+ }
63674
+ if (shapeStyle.strokeFillMode === "pattern" && shapeStyle.strokePatternXml) {
63675
+ lineNode["a:pattFill"] = shapeStyle.strokePatternXml;
63676
+ return;
63677
+ }
63678
+ const resolvedStrokeOriginal = shapeStyle.strokeColorXml ? parseColor(shapeStyle.strokeColorXml) : void 0;
63679
+ lineNode["a:solidFill"] = serializeColorChoice(
63680
+ shapeStyle.strokeColorXml,
63681
+ resolvedStrokeOriginal,
63682
+ shapeStyle.strokeColor ?? "#000000",
63683
+ shapeStyle.strokeOpacity
63684
+ );
63685
+ }
62624
63686
  var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime27 {
62625
63687
  /**
62626
63688
  * Serialize shape fill, stroke, dash, arrows, line join/cap/compound,
@@ -62690,26 +63752,14 @@ var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime
62690
63752
  );
62691
63753
  }
62692
63754
  }
62693
- if (shapeStyle.strokeColor !== void 0) {
63755
+ if (shapeStyle.strokeColor !== void 0 || shapeStyle.strokeFillMode === "gradient" || shapeStyle.strokeFillMode === "pattern") {
62694
63756
  if (!spPr["a:ln"]) {
62695
63757
  spPr["a:ln"] = {};
62696
63758
  }
62697
63759
  const lineNode = spPr["a:ln"];
62698
63760
  const w = Math.round((shapeStyle.strokeWidth || 1) * _PptxHandlerRuntime8.EMU_PER_PX);
62699
63761
  lineNode["@_w"] = String(w);
62700
- if (shapeStyle.strokeColor === "transparent" || shapeStyle.strokeWidth === 0) {
62701
- lineNode["a:noFill"] = {};
62702
- delete lineNode["a:solidFill"];
62703
- } else {
62704
- delete lineNode["a:noFill"];
62705
- const resolvedStrokeOriginal = shapeStyle.strokeColorXml ? this.parseColor(shapeStyle.strokeColorXml) : void 0;
62706
- lineNode["a:solidFill"] = serializeColorChoice(
62707
- shapeStyle.strokeColorXml,
62708
- resolvedStrokeOriginal,
62709
- shapeStyle.strokeColor,
62710
- shapeStyle.strokeOpacity
62711
- );
62712
- }
63762
+ this.applyLineFill(lineNode, shapeStyle);
62713
63763
  }
62714
63764
  if (shapeStyle.strokeDash !== void 0) {
62715
63765
  if (!spPr["a:ln"]) {
@@ -62799,6 +63849,15 @@ var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime
62799
63849
  spPr["a:ln"]["a:effectLst"] = lineEffectListXml;
62800
63850
  }
62801
63851
  }
63852
+ /**
63853
+ * Emit the single fill child of an `<a:ln>` (CT_LineProperties allows at
63854
+ * most one of noFill/solidFill/gradFill/pattFill). Delegates to
63855
+ * {@link writeLineFill} so the logic stays unit-testable without the full
63856
+ * save runtime (issue #87).
63857
+ */
63858
+ applyLineFill(lineNode, shapeStyle) {
63859
+ writeLineFill(lineNode, shapeStyle, (colorNode) => this.parseColor(colorNode));
63860
+ }
62802
63861
  /**
62803
63862
  * Serialize the shape's `<p:style>` block (CT_ShapeStyle §20.1.2.2.36)
62804
63863
  * from the persisted ref indices/colour XML. Emits children in spec
@@ -65110,14 +66169,20 @@ var PptxHandlerRuntime41 = class _PptxHandlerRuntime17 extends PptxHandlerRuntim
65110
66169
  relationshipType: constants.slideSyncRelationshipType,
65111
66170
  contentType: constants.slideSyncContentType
65112
66171
  });
65113
- this.slideBackgroundBuilder.applyBackground({
66172
+ await this.slideBackgroundBuilder.applyBackground({
65114
66173
  slideNode,
65115
66174
  slide,
65116
66175
  zip: this.zip,
65117
66176
  saveState: saveSession,
65118
66177
  relationshipRegistry: slideRelationshipRegistry,
65119
66178
  slideImageRelationshipType: constants.slideImageRelationshipType,
65120
- parseDataUrlToBytes: (dataUrl) => this.parseDataUrlToBytes(dataUrl)
66179
+ resolveImageToBytes: (url) => this.resolveMediaToBytes(url),
66180
+ reportUnsupportedBackground: (imageUrl) => this.compatibilityService.reportWarning({
66181
+ code: "SAVE_BACKGROUND_IMAGE_UNSUPPORTED",
66182
+ message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
66183
+ scope: "save",
66184
+ slideId: slide.id
66185
+ })
65121
66186
  });
65122
66187
  this.slideCommentPartWriter.writeComments({
65123
66188
  slide,
@@ -66602,7 +67667,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66602
67667
  } = saveConstants;
66603
67668
  this.compatibilityService.resetWarnings();
66604
67669
  const saveSession = new PptxSaveStateBuilder().withZip(this.zip).withCommentAuthorMap(this.commentAuthorMap).withCommentAuthorDetails(this.commentAuthorDetails).withCommentAuthorsRootXml(this.commentAuthorsRootXml).withEmuPerPx(_PptxHandlerRuntime18.EMU_PER_PX).build();
66605
- await this.reconcilePresentationSlidesForSave({
67670
+ const slideReferenceRemap = await this.reconcilePresentationSlidesForSave({
66606
67671
  slides,
66607
67672
  saveSession,
66608
67673
  slideRelationshipType,
@@ -66697,7 +67762,8 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66697
67762
  rawSlideWidthEmu: this.rawSlideWidthEmu,
66698
67763
  rawSlideHeightEmu: this.rawSlideHeightEmu,
66699
67764
  rawSlideSizeType: this.rawSlideSizeType,
66700
- xmlLookupService: this.xmlLookupService
67765
+ xmlLookupService: this.xmlLookupService,
67766
+ slideReferenceRemap
66701
67767
  });
66702
67768
  this.deduplicateExtensionLists(this.presentationData);
66703
67769
  if (effectiveConformance === "transitional") {
@@ -66714,7 +67780,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66714
67780
  printSlidesPerPage: options.handoutMaster.slidesPerPage
66715
67781
  } : options?.presentationProperties;
66716
67782
  await this.applyPresentationPropertiesPart(presentationProperties);
66717
- await this.applyViewPropertiesPart(options?.viewProperties);
67783
+ await this.applyViewPropertiesPart(options?.viewProperties ?? this.loadedViewProperties);
66718
67784
  await this.applyTableStylesPart(options?.tableStyles);
66719
67785
  await this.documentPropertiesUpdater.updateOnSave(slides, {
66720
67786
  coreProperties: options?.coreProperties,
@@ -67000,26 +68066,16 @@ var PptxHandlerRuntime52 = class _PptxHandlerRuntime19 extends PptxHandlerRuntim
67000
68066
  return true;
67001
68067
  }
67002
68068
  const typesMatch = source.type === target.type || source.type === "ctrtitle" && target.type === "title" || source.type === "subtitle" && target.type === "body";
67003
- if (source.idx !== void 0 && target.idx !== void 0) {
67004
- if (source.idx !== target.idx) {
67005
- return false;
67006
- }
67007
- if (source.type && target.type && !typesMatch) {
67008
- return false;
67009
- }
67010
- return true;
67011
- }
67012
- if (source.idx !== void 0 && target.idx === void 0) {
67013
- const singletonTypes = /* @__PURE__ */ new Set(["title", "ctrtitle", "subtitle", "dt", "ftr", "sldnum"]);
67014
- if (source.type && singletonTypes.has(source.type)) {
67015
- return typesMatch;
67016
- }
68069
+ const sourceIdx = source.idx ?? "0";
68070
+ const targetIdx = target.idx ?? "0";
68071
+ if (sourceIdx !== targetIdx) {
67017
68072
  return false;
67018
68073
  }
67019
68074
  if (source.type && target.type && !typesMatch) {
67020
68075
  return false;
67021
68076
  }
67022
- if (source.type && !target.type) {
68077
+ const bothHaveExplicitIdx = source.idx !== void 0 && target.idx !== void 0;
68078
+ if (!bothHaveExplicitIdx && source.type && !target.type) {
67023
68079
  return false;
67024
68080
  }
67025
68081
  return true;
@@ -68447,6 +69503,19 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
68447
69503
  });
68448
69504
  return hasAny ? locks : void 0;
68449
69505
  }
69506
+ /**
69507
+ * Parse the `@txBox` attribute from a `p:cNvSpPr` node. Returns `true` /
69508
+ * `false` when the attribute is present, or `undefined` when absent so
69509
+ * callers can distinguish "not a text box" from "unspecified".
69510
+ */
69511
+ parseTxBoxFlag(cNvSpPr) {
69512
+ const raw = cNvSpPr?.["@_txBox"];
69513
+ if (raw === void 0) {
69514
+ return void 0;
69515
+ }
69516
+ const val = String(raw).trim().toLowerCase();
69517
+ return val === "1" || val === "true";
69518
+ }
68450
69519
  /**
68451
69520
  * Extract body-level text properties from `a:bodyPr` and apply them to the
68452
69521
  * provided {@link TextStyle}. Returns linked-textbox info when present.
@@ -68627,6 +69696,62 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
68627
69696
  }
68628
69697
  };
68629
69698
  var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntime61 {
69699
+ /**
69700
+ * Extract a paragraph's OWN `a:pPr` geometry (align, spacing, margins,
69701
+ * indent, tabs, rtl) as a partial {@link TextStyle} so per-paragraph
69702
+ * formatting round-trips rather than collapsing to one shape-level pPr
69703
+ * (#69). Inherited layout/master values are not re-stamped.
69704
+ */
69705
+ extractParagraphOwnProperties(p, basisFontSize) {
69706
+ const pPr = p["a:pPr"];
69707
+ if (!pPr) {
69708
+ return void 0;
69709
+ }
69710
+ const pp = { ...parseParagraphMargins(pPr) };
69711
+ const align = pPr["@_algn"] !== void 0 ? parseAlignmentAttr2(String(pPr["@_algn"])) : void 0;
69712
+ if (align) {
69713
+ pp.align = align;
69714
+ }
69715
+ const rtl = parseParagraphRtl(pPr);
69716
+ if (rtl !== void 0) {
69717
+ pp.rtl = rtl;
69718
+ }
69719
+ const spcBef = this.parseParagraphSpacingPx(
69720
+ pPr["a:spcBef"],
69721
+ basisFontSize
69722
+ );
69723
+ if (spcBef !== void 0) {
69724
+ pp.paragraphSpacingBefore = spcBef;
69725
+ }
69726
+ const spcAft = this.parseParagraphSpacingPx(
69727
+ pPr["a:spcAft"],
69728
+ basisFontSize
69729
+ );
69730
+ if (spcAft !== void 0) {
69731
+ pp.paragraphSpacingAfter = spcAft;
69732
+ }
69733
+ const lnSpcNode = pPr["a:lnSpc"];
69734
+ const lineSpacing = this.parseLineSpacingMultiplier(lnSpcNode);
69735
+ const exactPt = lineSpacing === void 0 ? this.parseLineSpacingExactPt(lnSpcNode) : void 0;
69736
+ if (lineSpacing !== void 0) {
69737
+ pp.lineSpacing = lineSpacing;
69738
+ } else if (exactPt !== void 0) {
69739
+ pp.lineSpacingExactPt = exactPt;
69740
+ }
69741
+ const tabStops = parseTabStops(pPr);
69742
+ if (tabStops && tabStops.length > 0) {
69743
+ pp.tabStops = tabStops;
69744
+ }
69745
+ const defRPr = pPr["a:defRPr"];
69746
+ if (defRPr && typeof defRPr === "object") {
69747
+ pp.paragraphDefaultRunPropertiesXml = defRPr;
69748
+ }
69749
+ const pPrExtLst = pPr["a:extLst"];
69750
+ if (pPrExtLst && typeof pPrExtLst === "object") {
69751
+ pp.paragraphPropertiesExtLstXml = pPrExtLst;
69752
+ }
69753
+ return Object.keys(pp).length > 0 ? pp : void 0;
69754
+ }
68630
69755
  /**
68631
69756
  * Resolve paragraph-level styles (alignment, spacing, margins, tabs,
68632
69757
  * level styles) for a single paragraph. Modifies `textStyle` in place
@@ -68873,6 +69998,12 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68873
69998
  ...mergedDefaultRunStyle,
68874
69999
  ...this.extractTextRunStyle(runProps, paraAlign, ctx.slideRelationshipMap)
68875
70000
  };
70001
+ if (!runStyle2.scriptFallbackFont) {
70002
+ const fallback = this.resolveScriptFallbackFont(runText);
70003
+ if (fallback) {
70004
+ runStyle2.scriptFallbackFont = fallback;
70005
+ }
70006
+ }
68876
70007
  parts.push(runText);
68877
70008
  segments.push({ text: runText, style: runStyle2 });
68878
70009
  maybeSeed(runStyle2);
@@ -68914,14 +70045,25 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68914
70045
  )
68915
70046
  };
68916
70047
  const fldType = String(field["@_type"] || "").trim() || void 0;
68917
- const fldGuid = String(field["@_uuid"] || field["@_id"] || "").trim() || void 0;
70048
+ const uuidAttr = String(field["@_uuid"] || "").trim();
70049
+ const idAttr = String(field["@_id"] || "").trim();
70050
+ const fldGuid = uuidAttr || idAttr || void 0;
70051
+ const fldGuidAttr = uuidAttr ? "uuid" : idAttr ? "id" : void 0;
68918
70052
  parts.push(fieldText);
68919
- segments.push({
70053
+ const fieldSegment = {
68920
70054
  text: fieldText,
68921
70055
  style: fieldRunStyle,
68922
70056
  fieldType: fldType,
68923
70057
  fieldGuid: fldGuid
68924
- });
70058
+ };
70059
+ if (fldGuidAttr) {
70060
+ fieldSegment.fieldGuidAttr = fldGuidAttr;
70061
+ }
70062
+ const fieldPPr = field["a:pPr"];
70063
+ if (fieldPPr && typeof fieldPPr === "object") {
70064
+ fieldSegment.fieldParagraphPropertiesXml = fieldPPr;
70065
+ }
70066
+ segments.push(fieldSegment);
68925
70067
  maybeSeed(fieldRunStyle);
68926
70068
  };
68927
70069
  const processMathElement = (mathEl) => {
@@ -69048,6 +70190,11 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
69048
70190
  ...endParaRPrRaw
69049
70191
  };
69050
70192
  }
70193
+ const basisFontSize = typeof mergedDefaultRunStyle.fontSize === "number" ? mergedDefaultRunStyle.fontSize : void 0;
70194
+ const paragraphOwnProps = this.extractParagraphOwnProperties(p, basisFontSize);
70195
+ if (paragraphOwnProps) {
70196
+ segments[firstSegmentIndex].paragraphProperties = paragraphOwnProps;
70197
+ }
69051
70198
  }
69052
70199
  return { parts, segments, seedStyle };
69053
70200
  }
@@ -69354,7 +70501,11 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime27 extends PptxHandlerRuntim
69354
70501
  const inheritedCNvSpPr = xmlPath(inheritedPlaceholder?.shape, "p:nvSpPr", "p:cNvSpPr") ?? xmlPath(inheritedPlaceholder?.picture, "p:nvPicPr", "p:cNvPicPr");
69355
70502
  const inheritedLockNode = inheritedCNvSpPr?.["a:spLocks"] ?? inheritedCNvSpPr?.["a:picLocks"];
69356
70503
  const inheritedLocks = this.parseShapeLocks(inheritedLockNode);
69357
- const locks = inheritedLocks ? { ...inheritedLocks, ...slideLocks } : slideLocks;
70504
+ let locks = inheritedLocks ? { ...inheritedLocks, ...slideLocks } : slideLocks;
70505
+ const txBox = this.parseTxBoxFlag(cNvSpPr);
70506
+ if (txBox !== void 0) {
70507
+ locks = { ...locks ?? {}, txBox };
70508
+ }
69358
70509
  const promptText = !hasText && phDefaults?.promptText ? phDefaults.promptText : void 0;
69359
70510
  const opaqueExtLstXml = this.extractOpaqueSpPrExtLst(effectiveSpPr);
69360
70511
  const commonProps = {
@@ -72875,16 +74026,20 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
72875
74026
  }
72876
74027
  let fontScheme;
72877
74028
  if (hasFonts) {
74029
+ const majorByScript = this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts);
74030
+ const minorByScript = this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);
72878
74031
  fontScheme = {
72879
74032
  majorFont: {
72880
74033
  latin: this.themeFontMap["mj-lt"],
72881
74034
  eastAsia: this.themeFontMap["mj-ea"],
72882
- complexScript: this.themeFontMap["mj-cs"]
74035
+ complexScript: this.themeFontMap["mj-cs"],
74036
+ ...Object.keys(majorByScript).length > 0 ? { byScript: majorByScript } : {}
72883
74037
  },
72884
74038
  minorFont: {
72885
74039
  latin: this.themeFontMap["mn-lt"],
72886
74040
  eastAsia: this.themeFontMap["mn-ea"],
72887
- complexScript: this.themeFontMap["mn-cs"]
74041
+ complexScript: this.themeFontMap["mn-cs"],
74042
+ ...Object.keys(minorByScript).length > 0 ? { byScript: minorByScript } : {}
72888
74043
  }
72889
74044
  };
72890
74045
  }
@@ -73092,6 +74247,23 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
73092
74247
  *
73093
74248
  * Phase 4 Stream A / M4.
73094
74249
  */
74250
+ /**
74251
+ * Flatten a per-theme-path script-override map (`themePath -> {script ->
74252
+ * typeface}`) into a single `{script -> typeface}` lookup for
74253
+ * {@link buildThemeObject}. Earlier entries win on collision, which matches
74254
+ * the primary-theme-first parse order. Phase 4 Stream A / M4 (#83).
74255
+ */
74256
+ aggregateFontScriptOverrides(perPathMap) {
74257
+ const aggregate = {};
74258
+ for (const overrides10 of perPathMap.values()) {
74259
+ for (const [script, typeface] of Object.entries(overrides10)) {
74260
+ if (!(script in aggregate)) {
74261
+ aggregate[script] = typeface;
74262
+ }
74263
+ }
74264
+ }
74265
+ return aggregate;
74266
+ }
73095
74267
  collectFontScriptOverrides(fontNode) {
73096
74268
  const overrides10 = {};
73097
74269
  if (!fontNode) {
@@ -73721,33 +74893,16 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
73721
74893
  const metadata = parseSmartArtDefinitionMetadata(colorsDef, localName22);
73722
74894
  const labels = parseSmartArtColorStyleLabels(colorsDef, localName22);
73723
74895
  const name = metadata.titles?.[0]?.value || String(colorsDef["@_title"] || colorsDef["@_uniqueId"] || "").trim() || void 0;
73724
- const fillColors = [];
73725
- const lineColors = [];
73726
74896
  const styleLbls = this.xmlLookupService.getChildrenArrayByLocalName(colorsDef, "styleLbl");
73727
- for (const lbl of styleLbls) {
73728
- const fillClrLst = this.xmlLookupService.getChildByLocalName(lbl, "fillClrLst");
73729
- const linClrLst = this.xmlLookupService.getChildByLocalName(lbl, "linClrLst");
73730
- if (fillClrLst) {
73731
- const color2 = this.parseColor(fillClrLst) ?? this.resolveSmartArtSchemeColor(
73732
- this.xmlLookupService.getChildByLocalName(fillClrLst, "schemeClr")
73733
- );
73734
- if (color2) {
73735
- fillColors.push(color2);
73736
- }
73737
- }
73738
- if (linClrLst) {
73739
- const color2 = this.parseColor(linClrLst) ?? this.resolveSmartArtSchemeColor(
73740
- this.xmlLookupService.getChildByLocalName(linClrLst, "schemeClr")
73741
- );
73742
- if (color2) {
73743
- lineColors.push(color2);
73744
- }
73745
- }
73746
- }
73747
- if (fillColors.length === 0 && lineColors.length === 0) {
74897
+ const colorLists = buildSmartArtColorLists(styleLbls, {
74898
+ getChild: (node, childName) => this.xmlLookupService.getChildByLocalName(node, childName),
74899
+ parseColorChoice: (colorChoice) => this.parseColor(colorChoice),
74900
+ resolveScheme: (colorNode) => this.resolveSmartArtSchemeColor(colorNode)
74901
+ });
74902
+ if (colorLists.fillColors.length === 0 && colorLists.lineColors.length === 0) {
73748
74903
  return void 0;
73749
74904
  }
73750
- return { ...metadata, name, fillColors, lineColors, labels };
74905
+ return { ...metadata, name, ...colorLists, labels };
73751
74906
  } catch {
73752
74907
  return void 0;
73753
74908
  }
@@ -74092,6 +75247,107 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
74092
75247
  };
74093
75248
  }
74094
75249
  };
75250
+ function collectDrawingShapeNodes(root, getChildren) {
75251
+ const out = [];
75252
+ const walk = (container) => {
75253
+ if (!container) {
75254
+ return;
75255
+ }
75256
+ for (const sp of getChildren(container, "sp")) {
75257
+ out.push({ node: sp, isPic: false });
75258
+ }
75259
+ for (const pic of getChildren(container, "pic")) {
75260
+ out.push({ node: pic, isPic: true });
75261
+ }
75262
+ for (const grp of getChildren(container, "grpSp")) {
75263
+ walk(grp);
75264
+ }
75265
+ };
75266
+ walk(root);
75267
+ return out;
75268
+ }
75269
+ function picBlipEmbedId(pic, getChild) {
75270
+ const blip = getChild(getChild(pic, "blipFill"), "blip");
75271
+ if (!blip) {
75272
+ return void 0;
75273
+ }
75274
+ const embed = String(blip["@_r:embed"] || blip["@_embed"] || blip["@_r:link"] || "").trim();
75275
+ return embed.length > 0 ? embed : void 0;
75276
+ }
75277
+ function parseDrawingRelTargets(relsXml, parse, ensureArray16) {
75278
+ const map = /* @__PURE__ */ new Map();
75279
+ try {
75280
+ const relsRoot = parse(relsXml)["Relationships"];
75281
+ if (!relsRoot) {
75282
+ return map;
75283
+ }
75284
+ for (const rel of ensureArray16(relsRoot["Relationship"])) {
75285
+ const id = String(rel?.["@_Id"] || "").trim();
75286
+ const target = String(rel?.["@_Target"] || "").trim();
75287
+ if (id.length > 0 && target.length > 0) {
75288
+ map.set(id, target);
75289
+ }
75290
+ }
75291
+ } catch {
75292
+ }
75293
+ return map;
75294
+ }
75295
+ async function resolveDrawingBlipFills(shapes, drawingPath, deps) {
75296
+ const pending = shapes.filter((shape) => shape.fillBlipEmbedId && !shape.fillImageUrl);
75297
+ if (pending.length === 0) {
75298
+ return;
75299
+ }
75300
+ const dir = drawingPath.replace(/\/[^/]+$/u, "");
75301
+ const file = drawingPath.split("/").pop() ?? "";
75302
+ const relsXml = await deps.readText(`${dir}/_rels/${file}.rels`);
75303
+ if (!relsXml) {
75304
+ return;
75305
+ }
75306
+ const targets = parseDrawingRelTargets(relsXml, deps.parse, deps.ensureArray);
75307
+ for (const shape of pending) {
75308
+ const target = targets.get(shape.fillBlipEmbedId ?? "");
75309
+ if (!target) {
75310
+ continue;
75311
+ }
75312
+ const source = /^(?:https?:|data:)/u.test(target) ? target : deps.resolveImagePath(drawingPath, target);
75313
+ const resolved = await deps.getImageData(source);
75314
+ if (resolved) {
75315
+ shape.fillImageUrl = resolved;
75316
+ }
75317
+ }
75318
+ }
75319
+ async function parseDrawingShapesFromPart(drawingPath, deps) {
75320
+ const xmlString = await deps.readText(drawingPath);
75321
+ if (!xmlString) {
75322
+ return [];
75323
+ }
75324
+ try {
75325
+ const xml = deps.parse(xmlString);
75326
+ const drawing = deps.getChild(xml, "drawing");
75327
+ const spTree = deps.getChild(drawing || xml, "spTree");
75328
+ if (!spTree) {
75329
+ return [];
75330
+ }
75331
+ const shapes = [];
75332
+ collectDrawingShapeNodes(spTree, deps.getChildren).forEach(({ node, isPic }, index) => {
75333
+ const shape = deps.parseDrawingShape(node, index, deps.emuPerPx);
75334
+ if (!shape) {
75335
+ return;
75336
+ }
75337
+ if (isPic && !shape.fillBlipEmbedId) {
75338
+ const embed = picBlipEmbedId(node, deps.getChild);
75339
+ if (embed) {
75340
+ shape.fillBlipEmbedId = embed;
75341
+ }
75342
+ }
75343
+ shapes.push(shape);
75344
+ });
75345
+ await resolveDrawingBlipFills(shapes, drawingPath, deps);
75346
+ return shapes;
75347
+ } catch {
75348
+ return [];
75349
+ }
75350
+ }
74095
75351
  var CATEGORY_FAMILY = {
74096
75352
  list: "list",
74097
75353
  process: "process",
@@ -74224,6 +75480,7 @@ var PptxHandlerRuntime85 = class _PptxHandlerRuntime36 extends PptxHandlerRuntim
74224
75480
  layoutDefinition,
74225
75481
  nodes,
74226
75482
  connections: parsedConnections.length > 0 ? parsedConnections : void 0,
75483
+ presLayoutVars: parseSmartArtPresLayoutVars(dataModel),
74227
75484
  drawingShapes: drawingShapes.length > 0 ? drawingShapes : void 0,
74228
75485
  chrome,
74229
75486
  colorTransform,
@@ -74302,30 +75559,28 @@ var PptxHandlerRuntime85 = class _PptxHandlerRuntime36 extends PptxHandlerRuntim
74302
75559
  }
74303
75560
  }
74304
75561
  /**
74305
- * Parse SmartArt drawing shapes given an absolute part path.
75562
+ * Parse cached SmartArt drawing shapes from an absolute part path.
74306
75563
  *
74307
- * Wraps `parseSmartArtDrawingShapes` (which expects a slide-relative
74308
- * relationship id) with a path-based lookup so the resolution layer
74309
- * can pull the part from anywhere in the package.
75564
+ * Enumerates `dsp:sp` / bare `dsp:pic` (incl. nested `dsp:grpSp`) and
75565
+ * resolves picture (blip) fills to data URLs via the drawing part's own
75566
+ * relationships. Delegates to a pure helper with an injected dep bundle.
74310
75567
  */
74311
75568
  async parseSmartArtDrawingShapesFromPath(drawingPath) {
74312
- const xmlString = await this.zip.file(drawingPath)?.async("string");
74313
- if (!xmlString) {
74314
- return [];
74315
- }
74316
- try {
74317
- const xml = this.parser.parse(xmlString);
74318
- const drawing = this.xmlLookupService.getChildByLocalName(xml, "drawing");
74319
- const spTree = this.xmlLookupService.getChildByLocalName(drawing || xml, "spTree");
74320
- if (!spTree) {
74321
- return [];
74322
- }
74323
- const shapes = this.xmlLookupService.getChildrenArrayByLocalName(spTree, "sp");
74324
- const emuPerPx = _PptxHandlerRuntime36.EMU_PER_PX;
74325
- return shapes.map((sp, index) => this.parseDrawingShape(sp, index, emuPerPx)).filter((entry) => entry !== null);
74326
- } catch {
74327
- return [];
74328
- }
75569
+ return parseDrawingShapesFromPart(drawingPath, this.drawingBlipDeps());
75570
+ }
75571
+ /** Bind runtime zip / parser / lookup / image helpers for the drawing parser. */
75572
+ drawingBlipDeps() {
75573
+ return {
75574
+ readText: (path) => this.zip.file(path)?.async("string") ?? Promise.resolve(void 0),
75575
+ parse: (xml) => this.parser.parse(xml),
75576
+ getChild: (node, local) => this.xmlLookupService.getChildByLocalName(node, local),
75577
+ getChildren: (node, local) => this.xmlLookupService.getChildrenArrayByLocalName(node, local),
75578
+ parseDrawingShape: (sp, index, emuPerPx) => this.parseDrawingShape(sp, index, emuPerPx),
75579
+ emuPerPx: _PptxHandlerRuntime36.EMU_PER_PX,
75580
+ ensureArray: (value) => this.ensureArray(value),
75581
+ resolveImagePath: (base, target) => this.resolveImagePath(base, target),
75582
+ getImageData: (path) => this.getImageData(path)
75583
+ };
74329
75584
  }
74330
75585
  };
74331
75586
  var PptxHandlerRuntime86 = class extends PptxHandlerRuntime85 {
@@ -75013,6 +76268,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
75013
76268
  grouping = "clustered";
75014
76269
  }
75015
76270
  }
76271
+ const varyColors = this.parseChartBoolVal(seriesContainer, "varyColors");
76272
+ const firstSliceAngle = this.parseChartNumberVal(seriesContainer, "firstSliceAng");
76273
+ const doughnutHoleSize = this.parseChartNumberVal(seriesContainer, "holeSize");
76274
+ const barGapWidth = this.parseChartNumberVal(seriesContainer, "gapWidth");
76275
+ const barOverlap = this.parseChartNumberVal(seriesContainer, "overlap");
75016
76276
  const chartPartPath = chartPart.partPath;
75017
76277
  const dataTable = parseDataTable(plotArea, this.xmlLookupService);
75018
76278
  const dropLines = parseLineStyle(
@@ -75089,6 +76349,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
75089
76349
  title: titleTextValues[0],
75090
76350
  style: chartStyle,
75091
76351
  grouping,
76352
+ ...varyColors !== void 0 ? { varyColors } : {},
76353
+ ...firstSliceAngle !== void 0 ? { firstSliceAngle } : {},
76354
+ ...doughnutHoleSize !== void 0 ? { doughnutHoleSize } : {},
76355
+ ...barGapWidth !== void 0 ? { barGapWidth } : {},
76356
+ ...barOverlap !== void 0 ? { barOverlap } : {},
75092
76357
  chartPartPath,
75093
76358
  chartRelationshipId,
75094
76359
  ...dataTable ? { dataTable } : {},
@@ -75165,6 +76430,35 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
75165
76430
  }
75166
76431
  return { categories, series };
75167
76432
  }
76433
+ /**
76434
+ * Read a numeric `@val` from a named child of a chart-type container.
76435
+ * Returns `undefined` when the child or its `@val` is absent/non-finite.
76436
+ */
76437
+ parseChartNumberVal(container, localName22) {
76438
+ const node = this.xmlLookupService.getChildByLocalName(container, localName22);
76439
+ const raw = node?.["@_val"];
76440
+ if (raw === void 0 || raw === null || raw === "") {
76441
+ return void 0;
76442
+ }
76443
+ const num = Number.parseFloat(String(raw));
76444
+ return Number.isFinite(num) ? num : void 0;
76445
+ }
76446
+ /**
76447
+ * Read a boolean `@val` from a named child of a chart-type container.
76448
+ * A present element with no `@val` follows the OOXML `CT_Boolean` default
76449
+ * of `true`; `undefined` when the child is absent.
76450
+ */
76451
+ parseChartBoolVal(container, localName22) {
76452
+ const node = this.xmlLookupService.getChildByLocalName(container, localName22);
76453
+ if (!node) {
76454
+ return void 0;
76455
+ }
76456
+ const raw = node["@_val"];
76457
+ if (raw === void 0 || raw === null || raw === "") {
76458
+ return true;
76459
+ }
76460
+ return !(raw === "0" || raw === "false");
76461
+ }
75168
76462
  /**
75169
76463
  * Build the series array from raw OOXML `c:ser` nodes.
75170
76464
  *
@@ -75208,6 +76502,10 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
75208
76502
  );
75209
76503
  const dataLabels = parseSeriesDataLabels(seriesNode, this.xmlLookupService);
75210
76504
  const explosion = parseSeriesExplosion(seriesNode, this.xmlLookupService);
76505
+ const smoothNode = this.xmlLookupService.getChildByLocalName(seriesNode, "smooth");
76506
+ const smooth = smoothNode ? !(smoothNode["@_val"] === "0" || smoothNode["@_val"] === "false") : void 0;
76507
+ const invertNode = this.xmlLookupService.getChildByLocalName(seriesNode, "invertIfNegative");
76508
+ const invertIfNegative = invertNode ? !(invertNode["@_val"] === "0" || invertNode["@_val"] === "false") : void 0;
75211
76509
  return {
75212
76510
  name: seriesName.trim().length > 0 ? seriesName : `Series ${seriesIndex + 1}`,
75213
76511
  values: fallbackValues,
@@ -75218,6 +76516,8 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
75218
76516
  ...seriesMarker ? { marker: seriesMarker } : {},
75219
76517
  ...dataLabels.length > 0 ? { dataLabels } : {},
75220
76518
  ...explosion !== void 0 ? { explosion } : {},
76519
+ ...invertIfNegative !== void 0 ? { invertIfNegative } : {},
76520
+ ...smooth !== void 0 ? { smooth } : {},
75221
76521
  ...axisId !== void 0 ? { axisId } : {},
75222
76522
  ...seriesChartType ? { seriesChartType } : {}
75223
76523
  };
@@ -76036,6 +77336,8 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
76036
77336
  async buildLoadData(presentationState, slidesWithWarnings, slideMasters) {
76037
77337
  const headerFooter = this.extractHeaderFooter();
76038
77338
  const presentationProperties = await this.parsePresentationProperties();
77339
+ const viewProperties = await this.parseViewProperties();
77340
+ this.loadedViewProperties = viewProperties;
76039
77341
  const customShows = this.parseCustomShows();
76040
77342
  const tableStyleMap = await this.parseTableStyles();
76041
77343
  const embeddedFontList = parseEmbeddedFontList(this.presentationData);
@@ -76065,7 +77367,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
76065
77367
  presentationState.height,
76066
77368
  this.rawSlideWidthEmu,
76067
77369
  this.rawSlideHeightEmu
76068
- ).withNotesDimensions(presentationState.notesWidthEmu, presentationState.notesHeightEmu).withSlides(slidesWithWarnings).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(headerFooter).withPresentationProperties(presentationProperties).withCustomShows(customShows).withSections(
77370
+ ).withNotesDimensions(presentationState.notesWidthEmu, presentationState.notesHeightEmu).withSlides(slidesWithWarnings).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(headerFooter).withPresentationProperties(presentationProperties).withViewProperties(viewProperties).withCustomShows(customShows).withSections(
76069
77371
  presentationState.orderedSections.length > 0 ? presentationState.orderedSections : void 0
76070
77372
  ).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({ ...this.themeColorMap }).withTheme(this.buildThemeObject()).withThemeOptions(themeOptions.length > 0 ? themeOptions : void 0).withTableStyleMap(tableStyleMap).withEmbeddedFonts(embeddedFonts.length > 0 ? embeddedFonts : void 0).withEmbeddedFontList(embeddedFontList).withMruColors(presentationProperties?.mruColors).withNotesMaster(notesMaster).withHandoutMaster(handoutMaster).withSlideMasters(slideMasters.length > 0 ? slideMasters : void 0).withTags(tags.length > 0 ? tags : void 0).withCustomProperties(customProperties.length > 0 ? customProperties : void 0).withCoreProperties(coreProperties).withAppProperties(appProperties).withHasMacros(this.vbaProjectBin !== null ? true : void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures || void 0).withDigitalSignatureCount(
76071
77373
  this.signatureDetection?.signatureCount && this.signatureDetection.signatureCount > 0 ? this.signatureDetection.signatureCount : void 0
@@ -76196,6 +77498,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
76196
77498
  this.customXmlParts = [];
76197
77499
  this.loadedEmbeddedFonts = [];
76198
77500
  this.loadedEmbeddedFontList = void 0;
77501
+ this.loadedViewProperties = void 0;
76199
77502
  this.orderedSlidePaths = [];
76200
77503
  this.zip = null;
76201
77504
  }
@@ -77141,11 +78444,13 @@ function parseDrawingColorChoice(colorNode) {
77141
78444
  }
77142
78445
  if (colorNode["a:scrgbClr"]) {
77143
78446
  const scrgb = colorNode["a:scrgbClr"];
77144
- const red = parseDrawingPercent(scrgb["@_r"]);
77145
- const green = parseDrawingPercent(scrgb["@_g"]);
77146
- const blue = parseDrawingPercent(scrgb["@_b"]);
78447
+ const red = parseDrawingFraction(scrgb["@_r"]);
78448
+ const green = parseDrawingFraction(scrgb["@_g"]);
78449
+ const blue = parseDrawingFraction(scrgb["@_b"]);
77147
78450
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
77148
- const base = `#${toHex(red * 255)}${toHex(green * 255)}${toHex(blue * 255)}`;
78451
+ const base = `#${toHex(scrgbLinearToSrgb8(red))}${toHex(scrgbLinearToSrgb8(green))}${toHex(
78452
+ scrgbLinearToSrgb8(blue)
78453
+ )}`;
77149
78454
  return applyDrawingColorTransforms(base, scrgb);
77150
78455
  }
77151
78456
  }
@@ -77230,7 +78535,7 @@ function parseDrawingColorOpacity(colorNode) {
77230
78535
  const alphaMod = parseDrawingPercent(
77231
78536
  colorChoice["a:alphaMod"]?.["@_val"]
77232
78537
  );
77233
- const alphaOff = parseDrawingPercent(
78538
+ const alphaOff = parseDrawingFraction(
77234
78539
  colorChoice["a:alphaOff"]?.["@_val"]
77235
78540
  );
77236
78541
  if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
@@ -91173,4 +92478,4 @@ var SvgExporter = class _SvgExporter {
91173
92478
  * `<p:extLst>` (optional)
91174
92479
  */
91175
92480
 
91176
- export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL3, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime96, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyKinsokuToXml, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertEmfToDataUrl, convertWmfToDataUrl, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decodeXmlEntities, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2, layoutEngineShapesToDrawingShapes, listUnassessedOpenXmlCoverage, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtQuickStyleLabels, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reconcileAnimationTargets, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setSmartArtNodeStyle, shouldRenderFallbackLabel, shouldReturnToZoomSlide, stripParentDirSegments, stripXmlOrderSuffix, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, themeColorSchemesEqual, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, withThemePlaceholderColor, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };
92481
+ export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL3, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime96, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyKinsokuToXml, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSlideReferenceRemap, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertEmfToDataUrl, convertWmfToDataUrl, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decodeXmlEntities, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, deriveSlideTitle, deriveSlideTitles, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2, layoutEngineShapesToDrawingShapes, listUnassessedOpenXmlCoverage, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtQuickStyleLabels, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reconcileAnimationTargets, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setSmartArtNodeStyle, shouldRenderFallbackLabel, shouldReturnToZoomSlide, stripParentDirSegments, stripXmlOrderSuffix, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, themeColorSchemesEqual, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, withThemePlaceholderColor, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };