ooxml-core 1.27.0 → 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 (34) hide show
  1. package/dist/{PptxHandler-6ZGALYYM.cjs → PptxHandler-NHOKKZ4S.cjs} +3 -3
  2. package/dist/{PptxHandler-HEPPGI32.mjs → PptxHandler-OIR3ZY4Q.mjs} +2 -2
  3. package/dist/PptxHandler-TZJNIXPX.mjs +4 -0
  4. package/dist/{PresentationBuilder-HFGK2BWN.cjs → PresentationBuilder-EX6DAE5X.cjs} +5 -5
  5. package/dist/{PresentationBuilder-OQOZE76H.mjs → PresentationBuilder-RFTSZUPR.mjs} +2 -2
  6. package/dist/{PresentationBuilder-BCDRASRT.mjs → PresentationBuilder-X5WFSHLB.mjs} +2 -2
  7. package/dist/{chunk-MU3XSASV.cjs → chunk-36TR3PER.cjs} +270 -13
  8. package/dist/{chunk-KE2FUFIU.mjs → chunk-5KJAQKZG.mjs} +41 -271
  9. package/dist/{chunk-VRJOOHWV.mjs → chunk-5NJPYCGO.mjs} +271 -17
  10. package/dist/{chunk-4SGBL2H4.mjs → chunk-BXZF7H5G.mjs} +4 -4
  11. package/dist/{chunk-HYCOBPCC.cjs → chunk-DMJIDRJE.cjs} +1118 -1348
  12. package/dist/{chunk-7E45SAZJ.mjs → chunk-GZ4DIXZZ.mjs} +41 -271
  13. package/dist/{chunk-2XMK5SXU.mjs → chunk-I57SMSU6.mjs} +268 -14
  14. package/dist/{chunk-63GRFYAN.mjs → chunk-QIMNQDON.mjs} +1 -1
  15. package/dist/{chunk-ANIFYTKH.mjs → chunk-ZWTXVWMY.mjs} +1 -1
  16. package/dist/pptx/automation/index.cjs +331 -307
  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-CbFowkp4.d.ts → index-GWpMAY-f.d.ts} +16 -3
  20. package/dist/pptx/chunks/index-GWpMAY-f.d.ts.map +1 -0
  21. package/dist/pptx/cli/index.cjs +331 -307
  22. package/dist/pptx/cli/index.mjs +4 -4
  23. package/dist/pptx/converter/index.mjs +2 -2
  24. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  25. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  26. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  27. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  28. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  29. package/dist/pptx/index.cjs +333 -307
  30. package/dist/pptx/index.d.ts +2 -2
  31. package/dist/pptx/index.mjs +5 -5
  32. package/package.json +1 -1
  33. package/dist/PptxHandler-NO7MNGOW.mjs +0 -4
  34. 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, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, 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, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, attr, childrenNamed, childNamed, parseCellAddress, readChartManualLayoutValues, worksheetData, formatCellAddress, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, 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, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-VRJOOHWV.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, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, 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, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, attr, childrenNamed, childNamed, parseCellAddress, readChartManualLayoutValues, worksheetData, formatCellAddress, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, 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, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-5NJPYCGO.mjs';
2
2
  import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openZip, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT } from './chunk-JJ37PCNR.mjs';
3
3
  import { resolveSmartArtLayoutCategory } from './chunk-3GXV5MPC.mjs';
4
4
  import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-54S5A5PZ.mjs';
@@ -38,10 +38,10 @@ var COLOR_ELEMENTS = {
38
38
  hslClr: "hsl"
39
39
  };
40
40
  function colorValue(kind, element) {
41
- const attribute3 = (name) => element.getAttribute(name) ?? "";
42
- if (kind === "scrgb") return `${attribute3("r")},${attribute3("g")},${attribute3("b")}`;
43
- if (kind === "hsl") return `${attribute3("hue")},${attribute3("sat")},${attribute3("lum")}`;
44
- return attribute3("val");
41
+ const attribute2 = (name) => element.getAttribute(name) ?? "";
42
+ if (kind === "scrgb") return `${attribute2("r")},${attribute2("g")},${attribute2("b")}`;
43
+ if (kind === "hsl") return `${attribute2("hue")},${attribute2("sat")},${attribute2("lum")}`;
44
+ return attribute2("val");
45
45
  }
46
46
  function parseDrawingColorIn(container) {
47
47
  if (!container) return void 0;
@@ -448,10 +448,10 @@ var PartPatch = class {
448
448
  if (kids.length !== children6.length) throw new Error("Property part markup is not supported");
449
449
  kids.forEach((kid, index) => this.spans.set(kid, children6[index]));
450
450
  this.root = root;
451
- for (const attribute3 of Array.from(rootElement.attributes)) {
452
- if (attribute3.name === "xmlns") this.defaultNs = attribute3.value;
453
- else if (attribute3.namespaceURI === XMLNS || attribute3.name.startsWith("xmlns:"))
454
- this.prefixes.set(attribute3.value, attribute3.localName);
451
+ for (const attribute2 of Array.from(rootElement.attributes)) {
452
+ if (attribute2.name === "xmlns") this.defaultNs = attribute2.value;
453
+ else if (attribute2.namespaceURI === XMLNS || attribute2.name.startsWith("xmlns:"))
454
+ this.prefixes.set(attribute2.value, attribute2.localName);
455
455
  }
456
456
  }
457
457
  xml;
@@ -494,10 +494,10 @@ var PartPatch = class {
494
494
  else this.add(span.openEnd, span.closeStart, content2);
495
495
  }
496
496
  /** Adds ` name="value"` text to the element's start tag. */
497
- addAttribute(element, attribute3) {
497
+ addAttribute(element, attribute2) {
498
498
  const span = this.span(element);
499
499
  const at = span.openEnd - (span.selfClosing ? 2 : 1);
500
- this.add(at, at, attribute3);
500
+ this.add(at, at, attribute2);
501
501
  }
502
502
  remove(element) {
503
503
  const span = this.span(element);
@@ -718,9 +718,9 @@ function writeAppProperties(props, sourceXml) {
718
718
  }
719
719
 
720
720
  // opc/properties/custom.ts
721
- var escape = (text, attribute3 = false) => {
721
+ var escape = (text, attribute2 = false) => {
722
722
  const out = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
723
- return attribute3 ? out.replace(/"/g, "&quot;") : out;
723
+ return attribute2 ? out.replace(/"/g, "&quot;") : out;
724
724
  };
725
725
  var isVt = (element) => element.namespaceURI === NS.vt || element.prefix === "vt";
726
726
  function allocateCustomPropertyIds(properties) {
@@ -951,13 +951,13 @@ function parseDrawingTextBody(body) {
951
951
  const anchor = properties?.getAttribute("anchor");
952
952
  if (anchor) result.anchor = anchor;
953
953
  const insets = {};
954
- for (const [key2, attribute3] of [
954
+ for (const [key2, attribute2] of [
955
955
  ["left", "lIns"],
956
956
  ["top", "tIns"],
957
957
  ["right", "rIns"],
958
958
  ["bottom", "bIns"]
959
959
  ]) {
960
- const value = Number.parseInt(properties?.getAttribute(attribute3) ?? "", 10);
960
+ const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
961
961
  if (Number.isFinite(value)) insets[key2] = value;
962
962
  }
963
963
  if (Object.keys(insets).length > 0) result.insetsEmu = insets;
@@ -35965,8 +35965,8 @@ function readPlaceholderFieldType(sp) {
35965
35965
  function readHeaderFooterFromMaster(masterRoot) {
35966
35966
  const result = {};
35967
35967
  const hf = child2(masterRoot, "p:hf");
35968
- const flag = (attribute3, placeholder) => {
35969
- const raw2 = hf?.[attribute3];
35968
+ const flag = (attribute2, placeholder) => {
35969
+ const raw2 = hf?.[attribute2];
35970
35970
  if (raw2 !== void 0) {
35971
35971
  return String(raw2) !== "0" && String(raw2) !== "false";
35972
35972
  }
@@ -38070,11 +38070,11 @@ function readChartAppearance(text, properties) {
38070
38070
  const out = {};
38071
38071
  const size = Number(text?.getAttribute("sz") ?? NaN);
38072
38072
  if (Number.isFinite(size) && size > 0) out.fontSize = size / 100;
38073
- for (const [attribute3, key2] of [
38073
+ for (const [attribute2, key2] of [
38074
38074
  ["b", "bold"],
38075
38075
  ["i", "italic"]
38076
38076
  ]) {
38077
- const value = text?.getAttribute(attribute3);
38077
+ const value = text?.getAttribute(attribute2);
38078
38078
  if (value !== null && value !== void 0) out[key2] = value === "1" || value === "true";
38079
38079
  }
38080
38080
  const typeface = first(text, "latin", NS.a)?.getAttribute("typeface");
@@ -42561,9 +42561,9 @@ function parseChartStyleDefinition(styleRoot, xmlLookup, resolveSchemeColor, par
42561
42561
  return resolveChartStyleDefinition(style, (color) => {
42562
42562
  const element = parseXml(drawingColorXml(color)).documentElement;
42563
42563
  const raw2 = {};
42564
- for (const attribute3 of Array.from(element.attributes))
42565
- if (attribute3.localName !== "xmlns" && attribute3.prefix !== "xmlns")
42566
- raw2[`@_${attribute3.localName}`] = attribute3.value;
42564
+ for (const attribute2 of Array.from(element.attributes))
42565
+ if (attribute2.localName !== "xmlns" && attribute2.prefix !== "xmlns")
42566
+ raw2[`@_${attribute2.localName}`] = attribute2.value;
42567
42567
  for (const transform2 of elements(element))
42568
42568
  raw2[`a:${transform2.localName}`] = transform2.hasAttribute("val") ? { "@_val": transform2.getAttribute("val") ?? "" } : {};
42569
42569
  const fill = {};
@@ -43052,242 +43052,6 @@ function modernCommentStatus(comment, hasRaw, hasRawStatus) {
43052
43052
  return comment.status === "resolved" || comment.status === "closed" ? "active" : comment.status || "active";
43053
43053
  }
43054
43054
 
43055
- // pptx/core/utils/modern-comment-mention-read.ts
43056
- var mentionLocalName = (key2) => key2.split(":").pop() || key2;
43057
- var mentionNodesOf = (value) => {
43058
- if (Array.isArray(value)) {
43059
- return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
43060
- }
43061
- return value && typeof value === "object" ? [value] : [];
43062
- };
43063
- var mentionChildrenNamed = (node, name) => {
43064
- if (!node) {
43065
- return [];
43066
- }
43067
- const result = [];
43068
- for (const [key2, value] of Object.entries(node)) {
43069
- if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
43070
- result.push(...mentionNodesOf(value));
43071
- }
43072
- }
43073
- return result;
43074
- };
43075
- var MENTION_PERSON_KEYS = [
43076
- "@_mentionpersonId",
43077
- "@_mentionPersonId",
43078
- "@_personId",
43079
- "@_authorId"
43080
- ];
43081
- var MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
43082
- var attribute2 = (node, keys) => {
43083
- for (const key2 of keys) {
43084
- const value = node[key2];
43085
- if (value !== void 0 && value !== null && String(value).length > 0) {
43086
- return String(value);
43087
- }
43088
- }
43089
- return void 0;
43090
- };
43091
- var integer2 = (value) => {
43092
- if (value === void 0) {
43093
- return void 0;
43094
- }
43095
- const parsed = Number.parseInt(value, 10);
43096
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
43097
- };
43098
- var readMention = (node, authorName, containerUri) => {
43099
- const personId = attribute2(node, MENTION_PERSON_KEYS);
43100
- const startIndex = integer2(attribute2(node, ["@_startIndex"]));
43101
- const length = integer2(attribute2(node, MENTION_LENGTH_KEYS));
43102
- if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
43103
- return void 0;
43104
- }
43105
- return {
43106
- personId,
43107
- startIndex,
43108
- length,
43109
- id: attribute2(node, ["@_mentionId", "@_id"]),
43110
- authorName: authorName(personId),
43111
- containerUri,
43112
- rawXml: node
43113
- };
43114
- };
43115
- function readCommentMentions(node, authorName) {
43116
- if (!node) {
43117
- return void 0;
43118
- }
43119
- const found = [];
43120
- for (const list2 of mentionChildrenNamed(node, "mentionLst")) {
43121
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43122
- const mention = readMention(entry2, authorName);
43123
- if (mention) {
43124
- found.push(mention);
43125
- }
43126
- }
43127
- }
43128
- for (const extension of mentionChildrenNamed(mentionChildrenNamed(node, "extLst")[0], "ext")) {
43129
- const uri = String(extension["@_uri"] || "");
43130
- for (const list2 of mentionChildrenNamed(extension, "mentionLst")) {
43131
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43132
- const mention = readMention(entry2, authorName, uri);
43133
- if (mention) {
43134
- found.push(mention);
43135
- }
43136
- }
43137
- }
43138
- }
43139
- found.sort((a, b) => a.startIndex - b.startIndex);
43140
- return found.length > 0 ? found : void 0;
43141
- }
43142
-
43143
- // pptx/core/utils/modern-comment-mentions.ts
43144
- var commonPrefixLength = (a, b) => {
43145
- const max = Math.min(a.length, b.length);
43146
- let index = 0;
43147
- while (index < max && a[index] === b[index]) {
43148
- index += 1;
43149
- }
43150
- return index;
43151
- };
43152
- var commonSuffixLength = (a, b, limit) => {
43153
- let index = 0;
43154
- while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43155
- index += 1;
43156
- }
43157
- return index;
43158
- };
43159
- var nearestOccurrence = (text, span, hint) => {
43160
- let best = -1;
43161
- let bestDistance = Number.POSITIVE_INFINITY;
43162
- let at = text.indexOf(span);
43163
- while (at !== -1) {
43164
- const distance = Math.abs(at - hint);
43165
- if (distance < bestDistance) {
43166
- best = at;
43167
- bestDistance = distance;
43168
- }
43169
- at = text.indexOf(span, at + 1);
43170
- }
43171
- return best;
43172
- };
43173
- function rebaseCommentMentions(mentions, oldText, newText) {
43174
- if (!mentions || mentions.length === 0) {
43175
- return void 0;
43176
- }
43177
- if (oldText === newText) {
43178
- return mentions;
43179
- }
43180
- const prefix = commonPrefixLength(oldText, newText);
43181
- const suffix = commonSuffixLength(
43182
- oldText,
43183
- newText,
43184
- Math.min(oldText.length, newText.length) - prefix
43185
- );
43186
- const changeEnd = oldText.length - suffix;
43187
- const delta = newText.length - oldText.length;
43188
- const result = [];
43189
- for (const mention of mentions) {
43190
- const start = mention.startIndex;
43191
- const end = start + mention.length;
43192
- const span = oldText.slice(start, end);
43193
- if (span.length !== mention.length) {
43194
- continue;
43195
- }
43196
- let next = -1;
43197
- if (end <= prefix) {
43198
- next = start;
43199
- } else if (start >= changeEnd) {
43200
- next = start + delta;
43201
- }
43202
- if (next >= 0 && newText.slice(next, next + mention.length) === span) {
43203
- result.push(next === start ? mention : { ...mention, startIndex: next });
43204
- continue;
43205
- }
43206
- const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
43207
- if (relocated >= 0) {
43208
- result.push({ ...mention, startIndex: relocated });
43209
- }
43210
- }
43211
- return result.length > 0 ? result : void 0;
43212
- }
43213
- var buildMention = (mention) => {
43214
- const node = {};
43215
- for (const [key2, value] of Object.entries(mention.rawXml || {})) {
43216
- if (key2.startsWith("@_")) {
43217
- node[key2] = value;
43218
- }
43219
- }
43220
- const personKey = MENTION_PERSON_KEYS.find((key2) => node[key2] !== void 0) || "@_mentionpersonId";
43221
- const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node[key2] !== void 0) || "@_length";
43222
- node[personKey] = mention.personId;
43223
- node[lengthKey] = String(mention.length);
43224
- node["@_startIndex"] = String(mention.startIndex);
43225
- if (mention.id) {
43226
- const idKey = node["@_id"] !== void 0 && node["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
43227
- node[idKey] = mention.id;
43228
- }
43229
- return node;
43230
- };
43231
- function buildMentionListNode(mentions) {
43232
- if (!mentions || mentions.length === 0) {
43233
- return void 0;
43234
- }
43235
- return { "p188:mention": mentions.map(buildMention) };
43236
- }
43237
- var stripMentionLists = (node) => {
43238
- const result = {};
43239
- for (const [key2, value] of Object.entries(node)) {
43240
- if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
43241
- result[key2] = value;
43242
- }
43243
- }
43244
- return result;
43245
- };
43246
- var groupByContainer = (mentions) => {
43247
- const direct = [];
43248
- const byUri = /* @__PURE__ */ new Map();
43249
- for (const mention of mentions || []) {
43250
- if (!mention.containerUri) {
43251
- direct.push(mention);
43252
- continue;
43253
- }
43254
- const bucket = byUri.get(mention.containerUri);
43255
- if (bucket) {
43256
- bucket.push(mention);
43257
- } else {
43258
- byUri.set(mention.containerUri, [mention]);
43259
- }
43260
- }
43261
- return { direct, byUri };
43262
- };
43263
- function applyCommentMentions(node, mentions, extension, replace) {
43264
- if (!replace) {
43265
- return extension;
43266
- }
43267
- const { direct, byUri } = groupByContainer(mentions);
43268
- const directList = buildMentionListNode(direct);
43269
- if (directList) {
43270
- node["p188:mentionLst"] = directList;
43271
- }
43272
- if (!extension) {
43273
- return void 0;
43274
- }
43275
- const rebuilt = stripMentionLists(extension);
43276
- const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
43277
- const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
43278
- const list2 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
43279
- const next = stripMentionLists(entry2);
43280
- if (list2) {
43281
- next["p188:mentionLst"] = list2;
43282
- }
43283
- return next;
43284
- });
43285
- if (entries.length > 0) {
43286
- rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
43287
- }
43288
- return rebuilt;
43289
- }
43290
-
43291
43055
  // pptx/core/utils/modern-comment-text-body.ts
43292
43056
  var localName4 = (key2) => key2.split(":").pop() || key2;
43293
43057
  var keyOf8 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
@@ -43327,7 +43091,7 @@ function flattenBodyText(node) {
43327
43091
  };
43328
43092
  return (paragraphs.length > 0 ? paragraphs : [node]).map((paragraph2) => collect(paragraph2));
43329
43093
  }
43330
- var commonPrefixLength2 = (a, b) => {
43094
+ var commonPrefixLength = (a, b) => {
43331
43095
  const max = Math.min(a.length, b.length);
43332
43096
  let index = 0;
43333
43097
  while (index < max && a[index] === b[index]) {
@@ -43335,7 +43099,7 @@ var commonPrefixLength2 = (a, b) => {
43335
43099
  }
43336
43100
  return index;
43337
43101
  };
43338
- var commonSuffixLength2 = (a, b, limit) => {
43102
+ var commonSuffixLength = (a, b, limit) => {
43339
43103
  let index = 0;
43340
43104
  while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43341
43105
  index += 1;
@@ -43369,8 +43133,8 @@ function spliceParagraph(paragraph2, line) {
43369
43133
  if (runs.length === 0) {
43370
43134
  return { ...paragraph2, "a:r": bareRun(void 0, line) };
43371
43135
  }
43372
- const prefix = commonPrefixLength2(original, line);
43373
- const suffix = commonSuffixLength2(
43136
+ const prefix = commonPrefixLength(original, line);
43137
+ const suffix = commonSuffixLength(
43374
43138
  original,
43375
43139
  line,
43376
43140
  Math.min(original.length, line.length) - prefix
@@ -43582,7 +43346,7 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
43582
43346
  "@_authorId": resolveAuthorId(comment),
43583
43347
  "@_created": modernCommentCreated(comment.createdAt, raw2?.["@_created"])
43584
43348
  };
43585
- for (const [attribute3, value] of [
43349
+ for (const [attribute2, value] of [
43586
43350
  ["status", modernCommentStatus(comment, raw2 !== void 0, raw2?.["@_status"] !== void 0)],
43587
43351
  ["tags", comment.tags?.join(" ")],
43588
43352
  ["likes", comment.likes?.join(" ")],
@@ -43594,9 +43358,9 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
43594
43358
  ["title", comment.title]
43595
43359
  ]) {
43596
43360
  if (value === void 0) {
43597
- delete node[`@_${attribute3}`];
43361
+ delete node[`@_${attribute2}`];
43598
43362
  } else {
43599
- node[`@_${attribute3}`] = String(value);
43363
+ node[`@_${attribute2}`] = String(value);
43600
43364
  }
43601
43365
  }
43602
43366
  const ownsMentions = (comment.mentions?.length ?? 0) > 0;
@@ -43638,7 +43402,13 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
43638
43402
  const originalBody = child8(raw2, "txBody");
43639
43403
  node["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
43640
43404
  const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
43641
- const mentions = rebaseCommentMentions(comment.mentions, originalText, comment.text);
43405
+ const loadedMentions = raw2 ? readCommentMentions(raw2, () => void 0) : void 0;
43406
+ const mentions = rebaseCommentMentions(
43407
+ comment.mentions,
43408
+ originalText,
43409
+ comment.text,
43410
+ loadedMentions ?? []
43411
+ );
43642
43412
  const extension = applyCommentMentions(node, mentions, child8(raw2, "extLst"), ownsMentions);
43643
43413
  if (extension) {
43644
43414
  node["p188:extLst"] = extension;
@@ -53004,8 +52774,8 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
53004
52774
  return;
53005
52775
  }
53006
52776
  const node = {};
53007
- for (const [attribute3, attrValue] of Object.entries(value)) {
53008
- node[`@_${attribute3}`] = attrValue;
52777
+ for (const [attribute2, attrValue] of Object.entries(value)) {
52778
+ node[`@_${attribute2}`] = attrValue;
53009
52779
  }
53010
52780
  if (existingKey) {
53011
52781
  chartSpace[existingKey] = node;
@@ -69954,15 +69724,15 @@ var PptxHandlerRuntime39 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
69954
69724
  this.applyModel3DTransformFlags(transform2, el);
69955
69725
  }
69956
69726
  applyModel3DTransformFlags(transform2, el) {
69957
- for (const [attribute3, value] of [
69727
+ for (const [attribute2, value] of [
69958
69728
  ["@_rot", el.rotation],
69959
69729
  ["@_skewX", el.skewX],
69960
69730
  ["@_skewY", el.skewY]
69961
69731
  ]) {
69962
69732
  if (value === void 0) {
69963
- delete transform2[attribute3];
69733
+ delete transform2[attribute2];
69964
69734
  } else {
69965
- transform2[attribute3] = String(Math.round(value * 6e4));
69735
+ transform2[attribute2] = String(Math.round(value * 6e4));
69966
69736
  }
69967
69737
  }
69968
69738
  if (el.flipHorizontal) {