ooxml-core 1.26.1 → 1.27.1

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 (35) hide show
  1. package/dist/{PptxHandler-AILFLRH7.cjs → PptxHandler-NHOKKZ4S.cjs} +3 -3
  2. package/dist/{PptxHandler-64BZOBWX.mjs → PptxHandler-OIR3ZY4Q.mjs} +2 -2
  3. package/dist/PptxHandler-TZJNIXPX.mjs +4 -0
  4. package/dist/{PresentationBuilder-RBQP6A37.cjs → PresentationBuilder-EX6DAE5X.cjs} +5 -5
  5. package/dist/{PresentationBuilder-EJY2TYWL.mjs → PresentationBuilder-RFTSZUPR.mjs} +2 -2
  6. package/dist/{PresentationBuilder-HBCCO2CF.mjs → PresentationBuilder-X5WFSHLB.mjs} +2 -2
  7. package/dist/{chunk-MU3XSASV.cjs → chunk-36TR3PER.cjs} +270 -13
  8. package/dist/{chunk-FZBAMWCJ.mjs → chunk-5KJAQKZG.mjs} +62 -275
  9. package/dist/{chunk-R7RL7W43.mjs → chunk-5NJPYCGO.mjs} +271 -17
  10. package/dist/{chunk-OQPT5IC3.mjs → chunk-BXZF7H5G.mjs} +4 -4
  11. package/dist/{chunk-NXTHB2M3.cjs → chunk-DMJIDRJE.cjs} +1139 -1352
  12. package/dist/{chunk-OTXJVFMY.mjs → chunk-GZ4DIXZZ.mjs} +62 -275
  13. package/dist/{chunk-2XMK5SXU.mjs → chunk-I57SMSU6.mjs} +268 -14
  14. package/dist/{chunk-WRFMS5CL.mjs → chunk-QIMNQDON.mjs} +1 -1
  15. package/dist/{chunk-DHAZSMC7.mjs → chunk-ZWTXVWMY.mjs} +1 -1
  16. package/dist/pptx/automation/index.cjs +352 -311
  17. package/dist/pptx/automation/index.d.ts +1 -1
  18. package/dist/pptx/automation/index.mjs +5 -5
  19. package/dist/pptx/chunks/index-D8DNpc1X.d.ts.map +1 -1
  20. package/dist/pptx/chunks/{index-CbFowkp4.d.ts → index-GWpMAY-f.d.ts} +16 -3
  21. package/dist/pptx/chunks/index-GWpMAY-f.d.ts.map +1 -0
  22. package/dist/pptx/cli/index.cjs +352 -311
  23. package/dist/pptx/cli/index.mjs +4 -4
  24. package/dist/pptx/converter/index.mjs +2 -2
  25. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  26. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  27. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  28. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  29. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  30. package/dist/pptx/index.cjs +354 -311
  31. package/dist/pptx/index.d.ts +2 -2
  32. package/dist/pptx/index.mjs +5 -5
  33. package/package.json +1 -1
  34. package/dist/PptxHandler-PMLQGMFQ.mjs +0 -4
  35. package/dist/pptx/chunks/index-CbFowkp4.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-2XMK5SXU.mjs';
1
+ import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-I57SMSU6.mjs';
2
2
  import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
3
3
  import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
4
4
  import JSZip from 'jszip';
@@ -773,10 +773,10 @@ var COLOR_ELEMENTS = {
773
773
  hslClr: "hsl"
774
774
  };
775
775
  function colorValue(kind, element) {
776
- const attribute3 = (name) => element.getAttribute(name) ?? "";
777
- if (kind === "scrgb") return `${attribute3("r")},${attribute3("g")},${attribute3("b")}`;
778
- if (kind === "hsl") return `${attribute3("hue")},${attribute3("sat")},${attribute3("lum")}`;
779
- return attribute3("val");
776
+ const attribute2 = (name) => element.getAttribute(name) ?? "";
777
+ if (kind === "scrgb") return `${attribute2("r")},${attribute2("g")},${attribute2("b")}`;
778
+ if (kind === "hsl") return `${attribute2("hue")},${attribute2("sat")},${attribute2("lum")}`;
779
+ return attribute2("val");
780
780
  }
781
781
  function parseDrawingColorIn(container) {
782
782
  if (!container) return void 0;
@@ -1218,10 +1218,10 @@ var PartPatch = class {
1218
1218
  if (kids.length !== children6.length) throw new Error("Property part markup is not supported");
1219
1219
  kids.forEach((kid, index) => this.spans.set(kid, children6[index]));
1220
1220
  this.root = root;
1221
- for (const attribute3 of Array.from(rootElement.attributes)) {
1222
- if (attribute3.name === "xmlns") this.defaultNs = attribute3.value;
1223
- else if (attribute3.namespaceURI === XMLNS || attribute3.name.startsWith("xmlns:"))
1224
- this.prefixes.set(attribute3.value, attribute3.localName);
1221
+ for (const attribute2 of Array.from(rootElement.attributes)) {
1222
+ if (attribute2.name === "xmlns") this.defaultNs = attribute2.value;
1223
+ else if (attribute2.namespaceURI === XMLNS || attribute2.name.startsWith("xmlns:"))
1224
+ this.prefixes.set(attribute2.value, attribute2.localName);
1225
1225
  }
1226
1226
  }
1227
1227
  xml;
@@ -1264,10 +1264,10 @@ var PartPatch = class {
1264
1264
  else this.add(span.openEnd, span.closeStart, content2);
1265
1265
  }
1266
1266
  /** Adds ` name="value"` text to the element's start tag. */
1267
- addAttribute(element, attribute3) {
1267
+ addAttribute(element, attribute2) {
1268
1268
  const span = this.span(element);
1269
1269
  const at = span.openEnd - (span.selfClosing ? 2 : 1);
1270
- this.add(at, at, attribute3);
1270
+ this.add(at, at, attribute2);
1271
1271
  }
1272
1272
  remove(element) {
1273
1273
  const span = this.span(element);
@@ -1488,9 +1488,9 @@ function writeAppProperties(props, sourceXml) {
1488
1488
  }
1489
1489
 
1490
1490
  // opc/properties/custom.ts
1491
- var escape = (text, attribute3 = false) => {
1491
+ var escape = (text, attribute2 = false) => {
1492
1492
  const out = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1493
- return attribute3 ? out.replace(/"/g, "&quot;") : out;
1493
+ return attribute2 ? out.replace(/"/g, "&quot;") : out;
1494
1494
  };
1495
1495
  var isVt = (element) => element.namespaceURI === NS.vt || element.prefix === "vt";
1496
1496
  function allocateCustomPropertyIds(properties) {
@@ -1721,13 +1721,13 @@ function parseDrawingTextBody(body) {
1721
1721
  const anchor = properties?.getAttribute("anchor");
1722
1722
  if (anchor) result.anchor = anchor;
1723
1723
  const insets = {};
1724
- for (const [key2, attribute3] of [
1724
+ for (const [key2, attribute2] of [
1725
1725
  ["left", "lIns"],
1726
1726
  ["top", "tIns"],
1727
1727
  ["right", "rIns"],
1728
1728
  ["bottom", "bIns"]
1729
1729
  ]) {
1730
- const value = Number.parseInt(properties?.getAttribute(attribute3) ?? "", 10);
1730
+ const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
1731
1731
  if (Number.isFinite(value)) insets[key2] = value;
1732
1732
  }
1733
1733
  if (Object.keys(insets).length > 0) result.insetsEmu = insets;
@@ -36379,7 +36379,10 @@ async function resolveBulletImage(imageRelId, slidePath, resolver) {
36379
36379
  if (!target) {
36380
36380
  return void 0;
36381
36381
  }
36382
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
36382
+ if (target.startsWith("http://") || target.startsWith("https://")) {
36383
+ return resolver.allowExternalImages ? target : void 0;
36384
+ }
36385
+ if (target.startsWith("data:")) {
36383
36386
  return target;
36384
36387
  }
36385
36388
  const imagePath = resolver.resolveImagePath(slidePath, target);
@@ -36565,8 +36568,8 @@ function readPlaceholderFieldType(sp) {
36565
36568
  function readHeaderFooterFromMaster(masterRoot) {
36566
36569
  const result = {};
36567
36570
  const hf = child2(masterRoot, "p:hf");
36568
- const flag = (attribute3, placeholder) => {
36569
- const raw2 = hf?.[attribute3];
36571
+ const flag = (attribute2, placeholder) => {
36572
+ const raw2 = hf?.[attribute2];
36570
36573
  if (raw2 !== void 0) {
36571
36574
  return String(raw2) !== "0" && String(raw2) !== "false";
36572
36575
  }
@@ -38656,11 +38659,11 @@ function readChartAppearance(text, properties) {
38656
38659
  const out = {};
38657
38660
  const size = Number(text?.getAttribute("sz") ?? NaN);
38658
38661
  if (Number.isFinite(size) && size > 0) out.fontSize = size / 100;
38659
- for (const [attribute3, key2] of [
38662
+ for (const [attribute2, key2] of [
38660
38663
  ["b", "bold"],
38661
38664
  ["i", "italic"]
38662
38665
  ]) {
38663
- const value = text?.getAttribute(attribute3);
38666
+ const value = text?.getAttribute(attribute2);
38664
38667
  if (value !== null && value !== void 0) out[key2] = value === "1" || value === "true";
38665
38668
  }
38666
38669
  const typeface = first(text, "latin", NS.a)?.getAttribute("typeface");
@@ -43211,9 +43214,9 @@ function parseChartStyleDefinition(styleRoot, xmlLookup, resolveSchemeColor, par
43211
43214
  return resolveChartStyleDefinition(style, (color2) => {
43212
43215
  const element = parseXml(drawingColorXml(color2)).documentElement;
43213
43216
  const raw2 = {};
43214
- for (const attribute3 of Array.from(element.attributes))
43215
- if (attribute3.localName !== "xmlns" && attribute3.prefix !== "xmlns")
43216
- raw2[`@_${attribute3.localName}`] = attribute3.value;
43217
+ for (const attribute2 of Array.from(element.attributes))
43218
+ if (attribute2.localName !== "xmlns" && attribute2.prefix !== "xmlns")
43219
+ raw2[`@_${attribute2.localName}`] = attribute2.value;
43217
43220
  for (const transform2 of elements(element))
43218
43221
  raw2[`a:${transform2.localName}`] = transform2.hasAttribute("val") ? { "@_val": transform2.getAttribute("val") ?? "" } : {};
43219
43222
  const fill = {};
@@ -43702,242 +43705,6 @@ function modernCommentStatus(comment, hasRaw, hasRawStatus) {
43702
43705
  return comment.status === "resolved" || comment.status === "closed" ? "active" : comment.status || "active";
43703
43706
  }
43704
43707
 
43705
- // pptx/core/utils/modern-comment-mention-read.ts
43706
- var mentionLocalName = (key2) => key2.split(":").pop() || key2;
43707
- var mentionNodesOf = (value) => {
43708
- if (Array.isArray(value)) {
43709
- return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
43710
- }
43711
- return value && typeof value === "object" ? [value] : [];
43712
- };
43713
- var mentionChildrenNamed = (node, name) => {
43714
- if (!node) {
43715
- return [];
43716
- }
43717
- const result = [];
43718
- for (const [key2, value] of Object.entries(node)) {
43719
- if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
43720
- result.push(...mentionNodesOf(value));
43721
- }
43722
- }
43723
- return result;
43724
- };
43725
- var MENTION_PERSON_KEYS = [
43726
- "@_mentionpersonId",
43727
- "@_mentionPersonId",
43728
- "@_personId",
43729
- "@_authorId"
43730
- ];
43731
- var MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
43732
- var attribute2 = (node, keys) => {
43733
- for (const key2 of keys) {
43734
- const value = node[key2];
43735
- if (value !== void 0 && value !== null && String(value).length > 0) {
43736
- return String(value);
43737
- }
43738
- }
43739
- return void 0;
43740
- };
43741
- var integer2 = (value) => {
43742
- if (value === void 0) {
43743
- return void 0;
43744
- }
43745
- const parsed = Number.parseInt(value, 10);
43746
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
43747
- };
43748
- var readMention = (node, authorName, containerUri) => {
43749
- const personId = attribute2(node, MENTION_PERSON_KEYS);
43750
- const startIndex = integer2(attribute2(node, ["@_startIndex"]));
43751
- const length = integer2(attribute2(node, MENTION_LENGTH_KEYS));
43752
- if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
43753
- return void 0;
43754
- }
43755
- return {
43756
- personId,
43757
- startIndex,
43758
- length,
43759
- id: attribute2(node, ["@_mentionId", "@_id"]),
43760
- authorName: authorName(personId),
43761
- containerUri,
43762
- rawXml: node
43763
- };
43764
- };
43765
- function readCommentMentions(node, authorName) {
43766
- if (!node) {
43767
- return void 0;
43768
- }
43769
- const found = [];
43770
- for (const list2 of mentionChildrenNamed(node, "mentionLst")) {
43771
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43772
- const mention = readMention(entry2, authorName);
43773
- if (mention) {
43774
- found.push(mention);
43775
- }
43776
- }
43777
- }
43778
- for (const extension of mentionChildrenNamed(mentionChildrenNamed(node, "extLst")[0], "ext")) {
43779
- const uri = String(extension["@_uri"] || "");
43780
- for (const list2 of mentionChildrenNamed(extension, "mentionLst")) {
43781
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43782
- const mention = readMention(entry2, authorName, uri);
43783
- if (mention) {
43784
- found.push(mention);
43785
- }
43786
- }
43787
- }
43788
- }
43789
- found.sort((a, b) => a.startIndex - b.startIndex);
43790
- return found.length > 0 ? found : void 0;
43791
- }
43792
-
43793
- // pptx/core/utils/modern-comment-mentions.ts
43794
- var commonPrefixLength = (a, b) => {
43795
- const max = Math.min(a.length, b.length);
43796
- let index = 0;
43797
- while (index < max && a[index] === b[index]) {
43798
- index += 1;
43799
- }
43800
- return index;
43801
- };
43802
- var commonSuffixLength = (a, b, limit) => {
43803
- let index = 0;
43804
- while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43805
- index += 1;
43806
- }
43807
- return index;
43808
- };
43809
- var nearestOccurrence = (text, span, hint) => {
43810
- let best = -1;
43811
- let bestDistance = Number.POSITIVE_INFINITY;
43812
- let at = text.indexOf(span);
43813
- while (at !== -1) {
43814
- const distance = Math.abs(at - hint);
43815
- if (distance < bestDistance) {
43816
- best = at;
43817
- bestDistance = distance;
43818
- }
43819
- at = text.indexOf(span, at + 1);
43820
- }
43821
- return best;
43822
- };
43823
- function rebaseCommentMentions(mentions, oldText, newText) {
43824
- if (!mentions || mentions.length === 0) {
43825
- return void 0;
43826
- }
43827
- if (oldText === newText) {
43828
- return mentions;
43829
- }
43830
- const prefix = commonPrefixLength(oldText, newText);
43831
- const suffix = commonSuffixLength(
43832
- oldText,
43833
- newText,
43834
- Math.min(oldText.length, newText.length) - prefix
43835
- );
43836
- const changeEnd = oldText.length - suffix;
43837
- const delta = newText.length - oldText.length;
43838
- const result = [];
43839
- for (const mention of mentions) {
43840
- const start = mention.startIndex;
43841
- const end = start + mention.length;
43842
- const span = oldText.slice(start, end);
43843
- if (span.length !== mention.length) {
43844
- continue;
43845
- }
43846
- let next = -1;
43847
- if (end <= prefix) {
43848
- next = start;
43849
- } else if (start >= changeEnd) {
43850
- next = start + delta;
43851
- }
43852
- if (next >= 0 && newText.slice(next, next + mention.length) === span) {
43853
- result.push(next === start ? mention : { ...mention, startIndex: next });
43854
- continue;
43855
- }
43856
- const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
43857
- if (relocated >= 0) {
43858
- result.push({ ...mention, startIndex: relocated });
43859
- }
43860
- }
43861
- return result.length > 0 ? result : void 0;
43862
- }
43863
- var buildMention = (mention) => {
43864
- const node = {};
43865
- for (const [key2, value] of Object.entries(mention.rawXml || {})) {
43866
- if (key2.startsWith("@_")) {
43867
- node[key2] = value;
43868
- }
43869
- }
43870
- const personKey = MENTION_PERSON_KEYS.find((key2) => node[key2] !== void 0) || "@_mentionpersonId";
43871
- const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node[key2] !== void 0) || "@_length";
43872
- node[personKey] = mention.personId;
43873
- node[lengthKey] = String(mention.length);
43874
- node["@_startIndex"] = String(mention.startIndex);
43875
- if (mention.id) {
43876
- const idKey = node["@_id"] !== void 0 && node["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
43877
- node[idKey] = mention.id;
43878
- }
43879
- return node;
43880
- };
43881
- function buildMentionListNode(mentions) {
43882
- if (!mentions || mentions.length === 0) {
43883
- return void 0;
43884
- }
43885
- return { "p188:mention": mentions.map(buildMention) };
43886
- }
43887
- var stripMentionLists = (node) => {
43888
- const result = {};
43889
- for (const [key2, value] of Object.entries(node)) {
43890
- if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
43891
- result[key2] = value;
43892
- }
43893
- }
43894
- return result;
43895
- };
43896
- var groupByContainer = (mentions) => {
43897
- const direct = [];
43898
- const byUri = /* @__PURE__ */ new Map();
43899
- for (const mention of mentions || []) {
43900
- if (!mention.containerUri) {
43901
- direct.push(mention);
43902
- continue;
43903
- }
43904
- const bucket = byUri.get(mention.containerUri);
43905
- if (bucket) {
43906
- bucket.push(mention);
43907
- } else {
43908
- byUri.set(mention.containerUri, [mention]);
43909
- }
43910
- }
43911
- return { direct, byUri };
43912
- };
43913
- function applyCommentMentions(node, mentions, extension, replace) {
43914
- if (!replace) {
43915
- return extension;
43916
- }
43917
- const { direct, byUri } = groupByContainer(mentions);
43918
- const directList = buildMentionListNode(direct);
43919
- if (directList) {
43920
- node["p188:mentionLst"] = directList;
43921
- }
43922
- if (!extension) {
43923
- return void 0;
43924
- }
43925
- const rebuilt = stripMentionLists(extension);
43926
- const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
43927
- const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
43928
- const list2 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
43929
- const next = stripMentionLists(entry2);
43930
- if (list2) {
43931
- next["p188:mentionLst"] = list2;
43932
- }
43933
- return next;
43934
- });
43935
- if (entries.length > 0) {
43936
- rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
43937
- }
43938
- return rebuilt;
43939
- }
43940
-
43941
43708
  // pptx/core/utils/modern-comment-text-body.ts
43942
43709
  var localName4 = (key2) => key2.split(":").pop() || key2;
43943
43710
  var keyOf8 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
@@ -43977,7 +43744,7 @@ function flattenBodyText(node) {
43977
43744
  };
43978
43745
  return (paragraphs.length > 0 ? paragraphs : [node]).map((paragraph2) => collect(paragraph2));
43979
43746
  }
43980
- var commonPrefixLength2 = (a, b) => {
43747
+ var commonPrefixLength = (a, b) => {
43981
43748
  const max = Math.min(a.length, b.length);
43982
43749
  let index = 0;
43983
43750
  while (index < max && a[index] === b[index]) {
@@ -43985,7 +43752,7 @@ var commonPrefixLength2 = (a, b) => {
43985
43752
  }
43986
43753
  return index;
43987
43754
  };
43988
- var commonSuffixLength2 = (a, b, limit) => {
43755
+ var commonSuffixLength = (a, b, limit) => {
43989
43756
  let index = 0;
43990
43757
  while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43991
43758
  index += 1;
@@ -44019,8 +43786,8 @@ function spliceParagraph(paragraph2, line) {
44019
43786
  if (runs.length === 0) {
44020
43787
  return { ...paragraph2, "a:r": bareRun(void 0, line) };
44021
43788
  }
44022
- const prefix = commonPrefixLength2(original, line);
44023
- const suffix = commonSuffixLength2(
43789
+ const prefix = commonPrefixLength(original, line);
43790
+ const suffix = commonSuffixLength(
44024
43791
  original,
44025
43792
  line,
44026
43793
  Math.min(original.length, line.length) - prefix
@@ -44232,7 +43999,7 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44232
43999
  "@_authorId": resolveAuthorId(comment),
44233
44000
  "@_created": modernCommentCreated(comment.createdAt, raw2?.["@_created"])
44234
44001
  };
44235
- for (const [attribute3, value] of [
44002
+ for (const [attribute2, value] of [
44236
44003
  ["status", modernCommentStatus(comment, raw2 !== void 0, raw2?.["@_status"] !== void 0)],
44237
44004
  ["tags", comment.tags?.join(" ")],
44238
44005
  ["likes", comment.likes?.join(" ")],
@@ -44244,9 +44011,9 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44244
44011
  ["title", comment.title]
44245
44012
  ]) {
44246
44013
  if (value === void 0) {
44247
- delete node[`@_${attribute3}`];
44014
+ delete node[`@_${attribute2}`];
44248
44015
  } else {
44249
- node[`@_${attribute3}`] = String(value);
44016
+ node[`@_${attribute2}`] = String(value);
44250
44017
  }
44251
44018
  }
44252
44019
  const ownsMentions = (comment.mentions?.length ?? 0) > 0;
@@ -44288,7 +44055,13 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44288
44055
  const originalBody = child8(raw2, "txBody");
44289
44056
  node["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
44290
44057
  const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
44291
- const mentions = rebaseCommentMentions(comment.mentions, originalText, comment.text);
44058
+ const loadedMentions = raw2 ? readCommentMentions(raw2, () => void 0) : void 0;
44059
+ const mentions = rebaseCommentMentions(
44060
+ comment.mentions,
44061
+ originalText,
44062
+ comment.text,
44063
+ loadedMentions ?? []
44064
+ );
44292
44065
  const extension = applyCommentMentions(node, mentions, child8(raw2, "extLst"), ownsMentions);
44293
44066
  if (extension) {
44294
44067
  node["p188:extLst"] = extension;
@@ -53654,8 +53427,8 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
53654
53427
  return;
53655
53428
  }
53656
53429
  const node = {};
53657
- for (const [attribute3, attrValue] of Object.entries(value)) {
53658
- node[`@_${attribute3}`] = attrValue;
53430
+ for (const [attribute2, attrValue] of Object.entries(value)) {
53431
+ node[`@_${attribute2}`] = attrValue;
53659
53432
  }
53660
53433
  if (existingKey) {
53661
53434
  chartSpace[existingKey] = node;
@@ -70992,15 +70765,15 @@ var PptxHandlerRuntime39 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
70992
70765
  this.applyModel3DTransformFlags(transform2, el);
70993
70766
  }
70994
70767
  applyModel3DTransformFlags(transform2, el) {
70995
- for (const [attribute3, value] of [
70768
+ for (const [attribute2, value] of [
70996
70769
  ["@_rot", el.rotation],
70997
70770
  ["@_skewX", el.skewX],
70998
70771
  ["@_skewY", el.skewY]
70999
70772
  ]) {
71000
70773
  if (value === void 0) {
71001
- delete transform2[attribute3];
70774
+ delete transform2[attribute2];
71002
70775
  } else {
71003
- transform2[attribute3] = String(Math.round(value * 6e4));
70776
+ transform2[attribute2] = String(Math.round(value * 6e4));
71004
70777
  }
71005
70778
  }
71006
70779
  if (el.flipHorizontal) {
@@ -75733,7 +75506,13 @@ var PptxHandlerRuntime55 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
75733
75506
  if (posterRId && relsMap) {
75734
75507
  const posterTarget = relsMap.get(posterRId);
75735
75508
  if (posterTarget) {
75736
- if (posterTarget.startsWith("http://") || posterTarget.startsWith("https://") || posterTarget.startsWith("data:")) {
75509
+ if (posterTarget.startsWith("http://") || posterTarget.startsWith("https://")) {
75510
+ if (this.allowExternalImages === true) {
75511
+ posterImage = posterTarget;
75512
+ imagePath = posterTarget;
75513
+ imageData = posterTarget;
75514
+ }
75515
+ } else if (posterTarget.startsWith("data:")) {
75737
75516
  posterImage = posterTarget;
75738
75517
  imagePath = posterTarget;
75739
75518
  imageData = posterTarget;
@@ -76863,7 +76642,12 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
76863
76642
  const slideRels = this.slideRelsMap.get(slidePath);
76864
76643
  const target = slideRels?.get(relId);
76865
76644
  if (target) {
76866
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
76645
+ if (target.startsWith("http://") || target.startsWith("https://")) {
76646
+ if (this.allowExternalImages === true) {
76647
+ imagePath = target;
76648
+ imageData = target;
76649
+ }
76650
+ } else if (target.startsWith("data:")) {
76867
76651
  imagePath = target;
76868
76652
  imageData = target;
76869
76653
  } else {
@@ -77317,7 +77101,9 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
77317
77101
  const target = slideRels?.get(imageRelId);
77318
77102
  let imageDataUrl;
77319
77103
  if (target) {
77320
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
77104
+ if (target.startsWith("http://") || target.startsWith("https://")) {
77105
+ imageDataUrl = this.allowExternalImages === true ? target : void 0;
77106
+ } else if (target.startsWith("data:")) {
77321
77107
  imageDataUrl = target;
77322
77108
  } else {
77323
77109
  const imagePath = this.resolveImagePath(slidePath, target);
@@ -86628,6 +86414,7 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
86628
86414
  async enrichBulletPictureElementsWithEmbeddedData(elements2, slidePath) {
86629
86415
  await enrichBulletPictureImages(elements2, slidePath, {
86630
86416
  slideRelsMap: this.slideRelsMap,
86417
+ allowExternalImages: this.allowExternalImages === true,
86631
86418
  resolveImagePath: (path3, target) => this.resolveImagePath(path3, target),
86632
86419
  getImageData: (imagePath) => this.getImageData(imagePath)
86633
86420
  });