ooxml-core 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/PptxHandler-5UURGJEV.mjs +2 -0
  2. package/dist/{PptxHandler-EX4WBIQQ.mjs → PptxHandler-ADEFY476.mjs} +2 -2
  3. package/dist/PptxHandler-U5XB2HUE.cjs +11 -0
  4. package/dist/automation/index.cjs +744 -192
  5. package/dist/automation/index.mjs +744 -192
  6. package/dist/{chunk-SWF7KVL5.cjs → chunk-3N6XMMTT.cjs} +1365 -1062
  7. package/dist/{chunk-FIELY5PI.mjs → chunk-5NVJN4E6.mjs} +30 -2
  8. package/dist/{chunk-IGOA57LE.mjs → chunk-A6P7G3UK.mjs} +1 -1
  9. package/dist/{chunk-CPKNMQLX.cjs → chunk-AWIDASUW.cjs} +25 -2
  10. package/dist/{chunk-SVQZXP3F.mjs → chunk-CBNKBVX5.mjs} +25 -2
  11. package/dist/{chunk-OXHMZS7B.mjs → chunk-CCHYFCPD.mjs} +649 -172
  12. package/dist/{chunk-OB277ZGE.mjs → chunk-R6KSBNKX.mjs} +27 -1
  13. package/dist/{chunk-AT66SA5M.cjs → chunk-S6DOCMQC.cjs} +28 -0
  14. package/dist/{chunk-WSO4T2LJ.mjs → chunk-WUE5ZHU3.mjs} +26 -3
  15. package/dist/{chunk-LCS3J3QI.mjs → chunk-ZE53K7DH.mjs} +474 -171
  16. package/dist/{chunk-M76PHYRR.mjs → chunk-ZOUGMAZG.mjs} +1 -1
  17. package/dist/docx/layout/adapt-table.d.ts +2 -2
  18. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  19. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  20. package/dist/docx/layout/index.cjs +477 -75
  21. package/dist/docx/layout/index.mjs +477 -76
  22. package/dist/docx/layout/nested-frame-profile.d.ts +9 -0
  23. package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -0
  24. package/dist/docx/layout/page-cursor.d.ts +2 -0
  25. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  26. package/dist/docx/layout/result.d.ts +13 -0
  27. package/dist/docx/layout/result.d.ts.map +1 -1
  28. package/dist/docx/layout/table-border-layout.d.ts +16 -0
  29. package/dist/docx/layout/table-border-layout.d.ts.map +1 -0
  30. package/dist/docx/layout/table-cell-layout.d.ts +2 -1
  31. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  32. package/dist/docx/layout/table-content.d.ts +4 -0
  33. package/dist/docx/layout/table-content.d.ts.map +1 -0
  34. package/dist/docx/layout/table-footnotes.d.ts +5 -0
  35. package/dist/docx/layout/table-footnotes.d.ts.map +1 -1
  36. package/dist/docx/layout/table-frames.d.ts +4 -0
  37. package/dist/docx/layout/table-frames.d.ts.map +1 -0
  38. package/dist/docx/layout/table-layout.d.ts +8 -3
  39. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  40. package/dist/docx/layout/table-note-completion.d.ts +5 -0
  41. package/dist/docx/layout/table-note-completion.d.ts.map +1 -0
  42. package/dist/docx/layout/table-note-stories.d.ts +6 -0
  43. package/dist/docx/layout/table-note-stories.d.ts.map +1 -0
  44. package/dist/pptx/automation/index.cjs +535 -182
  45. package/dist/pptx/automation/index.d.ts +4 -4
  46. package/dist/pptx/automation/index.mjs +5 -5
  47. package/dist/pptx/chunks/{index-BZh-IMkN.d.ts → index-Cuxtr76Y.d.ts} +17 -3
  48. package/dist/pptx/chunks/index-Cuxtr76Y.d.ts.map +1 -0
  49. package/dist/pptx/chunks/{index-B4cnSPNz.d.ts → index-DUCGeZh7.d.ts} +65 -5
  50. package/dist/pptx/chunks/index-DUCGeZh7.d.ts.map +1 -0
  51. package/dist/pptx/chunks/{smart-art-Q2kZQtHh.d.ts → smart-art-D-sXa_Nb.d.ts} +11 -1
  52. package/dist/pptx/chunks/smart-art-D-sXa_Nb.d.ts.map +1 -0
  53. package/dist/pptx/chunks/{text-operations-BLodkuXE.d.ts → text-operations-BqHmLaLA.d.ts} +26 -2
  54. package/dist/pptx/chunks/text-operations-BqHmLaLA.d.ts.map +1 -0
  55. package/dist/pptx/cli/index.cjs +535 -182
  56. package/dist/pptx/cli/index.d.ts +1 -1
  57. package/dist/pptx/cli/index.mjs +4 -4
  58. package/dist/pptx/converter/index.cjs +1 -0
  59. package/dist/pptx/converter/index.d.ts +1 -1
  60. package/dist/pptx/converter/index.mjs +2 -2
  61. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +2 -2
  62. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +1 -1
  63. package/dist/pptx/editor/render/find-replace.cjs +18 -18
  64. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  65. package/dist/pptx/editor/render/find-replace.mjs +2 -2
  66. package/dist/pptx/editor/render/remap-text.cjs +2 -2
  67. package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
  68. package/dist/pptx/editor/render/remap-text.mjs +1 -1
  69. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  70. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  71. package/dist/pptx/index.cjs +762 -182
  72. package/dist/pptx/index.d.ts +5 -5
  73. package/dist/pptx/index.mjs +5 -5
  74. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  75. package/dist/teams/index.cjs +486 -114
  76. package/dist/teams/index.mjs +486 -114
  77. package/dist/visio/date-cache.d.ts +3 -0
  78. package/dist/visio/date-cache.d.ts.map +1 -0
  79. package/dist/visio/edit-text-field.d.ts.map +1 -1
  80. package/dist/visio/index.cjs +131 -22
  81. package/dist/visio/index.mjs +131 -22
  82. package/dist/visio/shape-metadata.d.ts.map +1 -1
  83. package/dist/visio/text-field-display.d.ts.map +1 -1
  84. package/dist/visio/text-field-fraction.d.ts +3 -0
  85. package/dist/visio/text-field-fraction.d.ts.map +1 -0
  86. package/dist/visio/text-field-numeric.d.ts +1 -1
  87. package/dist/visio/text-field-numeric.d.ts.map +1 -1
  88. package/dist/visio/text-field-system-date.d.ts +4 -0
  89. package/dist/visio/text-field-system-date.d.ts.map +1 -0
  90. package/dist/visio/text-fields.d.ts +1 -0
  91. package/dist/visio/text-fields.d.ts.map +1 -1
  92. package/dist/visio/ui/index.cjs +132 -22
  93. package/dist/visio/ui/index.mjs +132 -22
  94. package/dist/visio/ui/text-field-catalog.d.ts.map +1 -1
  95. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  96. package/dist/xlsx/index.cjs +614 -170
  97. package/dist/xlsx/index.mjs +614 -170
  98. package/dist/xlsx/load/index.cjs +575 -163
  99. package/dist/xlsx/load/index.mjs +575 -163
  100. package/dist/xlsx/model-pivots.d.ts +23 -2
  101. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  102. package/dist/xlsx/pivot/admission.d.ts.map +1 -1
  103. package/dist/xlsx/pivot/aggregate.d.ts +3 -1
  104. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
  105. package/dist/xlsx/pivot/data.d.ts +1 -1
  106. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  107. package/dist/xlsx/pivot/hierarchy-first.d.ts +21 -0
  108. package/dist/xlsx/pivot/hierarchy-first.d.ts.map +1 -0
  109. package/dist/xlsx/pivot/hierarchy.d.ts +2 -4
  110. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
  111. package/dist/xlsx/pivot/measures.d.ts +13 -0
  112. package/dist/xlsx/pivot/measures.d.ts.map +1 -0
  113. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  114. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  115. package/dist/xlsx/pivot/values-axis.d.ts +9 -0
  116. package/dist/xlsx/pivot/values-axis.d.ts.map +1 -0
  117. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
  118. package/dist/xlsx/ui/index.cjs +547 -127
  119. package/dist/xlsx/ui/index.mjs +547 -127
  120. package/package.json +1 -1
  121. package/dist/PptxHandler-AT7FVG5Q.mjs +0 -2
  122. package/dist/PptxHandler-VFSCECPL.cjs +0 -11
  123. package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +0 -1
  124. package/dist/pptx/chunks/index-BZh-IMkN.d.ts.map +0 -1
  125. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +0 -1
  126. package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { 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, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, 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, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, 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, writeChartColorChoice, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, IncorrectPasswordError, encodeXmlAttributeValue, encodeXmlTextValue, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, svgToCustomGeometryPaths, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, detectOleObjectType, inferOleExtensionFromTarget, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, extractGuidFromPartName, deobfuscateFont, detectFontFormat, OOXML_PERCENT_UNITS, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, themeColorRefFromSchemeClr, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesTrendlines, parseSeriesErrBars, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-OB277ZGE.mjs';
1
+ import { 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, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, 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, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, 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, writeChartColorChoice, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, IncorrectPasswordError, encodeXmlAttributeValue, encodeXmlTextValue, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, svgToCustomGeometryPaths, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, detectOleObjectType, inferOleExtensionFromTarget, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, extractGuidFromPartName, deobfuscateFont, detectFontFormat, OOXML_PERCENT_UNITS, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, themeColorRefFromSchemeClr, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesTrendlines, parseSeriesErrBars, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-R6KSBNKX.mjs';
2
2
  import JSZip5 from 'jszip';
3
3
  import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
4
4
  import { XMLParser, XMLBuilder } from 'fast-xml-parser';
@@ -125,6 +125,7 @@ var PRESENTATION_FIELD_KEYS = {
125
125
  modernCommentAuthors: true,
126
126
  conformance: true,
127
127
  embedTrueTypeFonts: true,
128
+ firstSlideNumber: true,
128
129
  defaultTextStyle: true
129
130
  };
130
131
  var PRESENTATION_FIELD_NAMES = Object.keys(PRESENTATION_FIELD_KEYS);
@@ -1938,7 +1939,7 @@ function rootRelsXml() {
1938
1939
  <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
1939
1940
  </Relationships>`;
1940
1941
  }
1941
- function presentationXml(width, height, slideCount) {
1942
+ function presentationXml(width, height, slideCount, firstSlideNumber) {
1942
1943
  const slideIdBase = 256;
1943
1944
  const slideRIdBase = 6;
1944
1945
  const sldIdLst = slideCount > 0 ? ` <p:sldIdLst>
@@ -1947,6 +1948,7 @@ ${Array.from(
1947
1948
  (_, i) => ` <p:sldId id="${slideIdBase + i}" r:id="rId${slideRIdBase + i}"/>`
1948
1949
  ).join("\n")}
1949
1950
  </p:sldIdLst>` : "";
1951
+ const firstSlideNum = firstSlideNumber === void 0 ? "" : ` firstSlideNum="${Math.trunc(firstSlideNumber)}"`;
1950
1952
  return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1951
1953
  <p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
1952
1954
  xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
@@ -1954,7 +1956,7 @@ ${Array.from(
1954
1956
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1955
1957
  xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"
1956
1958
  xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"
1957
- saveSubsetFonts="1">
1959
+ saveSubsetFonts="1"${firstSlideNum}>
1958
1960
  <p:sldMasterIdLst>
1959
1961
  <p:sldMasterId id="2147483648" r:id="rId1"/>
1960
1962
  </p:sldMasterIdLst>
@@ -2191,7 +2193,10 @@ async function buildBlankPresentationArchive(options) {
2191
2193
  const zip = new JSZip5();
2192
2194
  zip.file("[Content_Types].xml", contentTypesXml(layoutCount, initialSlideCount));
2193
2195
  zip.file("_rels/.rels", rootRelsXml());
2194
- zip.file("ppt/presentation.xml", presentationXml(width, height, initialSlideCount));
2196
+ zip.file(
2197
+ "ppt/presentation.xml",
2198
+ presentationXml(width, height, initialSlideCount, options?.firstSlideNumber)
2199
+ );
2195
2200
  zip.file("ppt/_rels/presentation.xml.rels", presentationRelsXml(layoutCount, initialSlideCount));
2196
2201
  zip.file("ppt/slideMasters/slideMaster1.xml", slideMasterXml(layoutCount));
2197
2202
  zip.file("ppt/slideMasters/_rels/slideMaster1.xml.rels", slideMasterRelsXml(layoutCount));
@@ -3812,6 +3817,7 @@ function parseStructuredCustomGeometry(custGeom, shapeWidth, shapeHeight, ensure
3812
3817
  var ensureArray = (value) => ensureArrayValue(value);
3813
3818
  function pathNodesOf(rawData) {
3814
3819
  const pathLst = rawData?.pathLstXml;
3820
+ restorePathListCommandOrder(pathLst, rawData?.pathCommandOrder);
3815
3821
  return ensureArrayValue(pathLst?.["a:path"]);
3816
3822
  }
3817
3823
  function evaluateCustomGeometryPaths(rawData, pathWidth, pathHeight, overrides) {
@@ -10780,7 +10786,7 @@ function parseShapeLockNode(node, spec) {
10780
10786
  return void 0;
10781
10787
  }
10782
10788
  const locks = {};
10783
- let hasAny = false;
10789
+ let hasAny2 = false;
10784
10790
  for (const prop of spec.permitted) {
10785
10791
  const raw = node[LOCK_ATTRIBUTE[prop]];
10786
10792
  if (raw === void 0) {
@@ -10788,9 +10794,9 @@ function parseShapeLockNode(node, spec) {
10788
10794
  }
10789
10795
  const value = String(raw).trim().toLowerCase();
10790
10796
  locks[prop] = value === "1" || value === "true";
10791
- hasAny = true;
10797
+ hasAny2 = true;
10792
10798
  }
10793
- return hasAny ? locks : void 0;
10799
+ return hasAny2 ? locks : void 0;
10794
10800
  }
10795
10801
 
10796
10802
  // pptx/core/core/runtime/shape-lock-containers.ts
@@ -11594,6 +11600,7 @@ var PptxLoadDataBuilder = class {
11594
11600
  modernCommentAuthors;
11595
11601
  conformance;
11596
11602
  embedTrueTypeFonts;
11603
+ firstSlideNumber;
11597
11604
  defaultTextStyle;
11598
11605
  withDimensions(width, height, widthEmu, heightEmu) {
11599
11606
  this.width = width;
@@ -11763,6 +11770,10 @@ var PptxLoadDataBuilder = class {
11763
11770
  this.embedTrueTypeFonts = embedTrueTypeFonts;
11764
11771
  return this;
11765
11772
  }
11773
+ withFirstSlideNumber(firstSlideNumber) {
11774
+ this.firstSlideNumber = firstSlideNumber;
11775
+ return this;
11776
+ }
11766
11777
  withDefaultTextStyle(defaultTextStyle) {
11767
11778
  this.defaultTextStyle = defaultTextStyle;
11768
11779
  return this;
@@ -11814,6 +11825,7 @@ var PptxLoadDataBuilder = class {
11814
11825
  modernCommentAuthors: this.modernCommentAuthors,
11815
11826
  conformance: this.conformance,
11816
11827
  embedTrueTypeFonts: this.embedTrueTypeFonts,
11828
+ firstSlideNumber: this.firstSlideNumber,
11817
11829
  defaultTextStyle: this.defaultTextStyle
11818
11830
  };
11819
11831
  }
@@ -15465,6 +15477,273 @@ async function attachRealMediaDurations(elements2, nativeAnimations, readBytes)
15465
15477
  applyPlainDelayRemap(nativeAnimations, plainDelayRemap);
15466
15478
  }
15467
15479
 
15480
+ // pptx/core/services/editor-animation-entry.ts
15481
+ function hasAuthoredAnimationEffect(entry2) {
15482
+ return Boolean(
15483
+ [entry2.entrance, entry2.exit, entry2.emphasis].some((preset) => preset && preset !== "none") || entry2.motionPath
15484
+ );
15485
+ }
15486
+ function animationFor(slideAnimations, elementId) {
15487
+ return slideAnimations.find((a) => a.elementId === elementId);
15488
+ }
15489
+
15490
+ // pptx/core/services/native-animation-after-effect.ts
15491
+ function hasAfterEffectFlag(cTn) {
15492
+ const raw = cTn?.["@_afterEffect"];
15493
+ return raw === "1" || raw === "true";
15494
+ }
15495
+ function extractSrgbHex(colorContainer) {
15496
+ const srgb = colorContainer?.["a:srgbClr"];
15497
+ const val = srgb?.["@_val"];
15498
+ return val !== void 0 ? `#${String(val).toUpperCase()}` : void 0;
15499
+ }
15500
+ function findDimBehaviour(subTnLst) {
15501
+ for (const node of ensureArray4(subTnLst["p:animClr"])) {
15502
+ const cBhvr = node["p:cBhvr"];
15503
+ if (extractAttrNameFromCBhvr(cBhvr) !== "ppt_c") {
15504
+ continue;
15505
+ }
15506
+ if (!hasAfterEffectFlag(cBhvr?.["p:cTn"])) {
15507
+ continue;
15508
+ }
15509
+ const toNode = node["p:to"];
15510
+ const color2 = extractSrgbHex(toNode);
15511
+ if (color2) {
15512
+ return { action: "dimToColor", color: color2 };
15513
+ }
15514
+ const colorRef = themeColorRefFromSchemeClr(toNode?.["a:schemeClr"]);
15515
+ return colorRef ? { action: "dimToColor", colorRef } : { action: "dimToColor" };
15516
+ }
15517
+ return void 0;
15518
+ }
15519
+ function findHideBehaviour(subTnLst) {
15520
+ for (const node of ensureArray4(subTnLst["p:set"])) {
15521
+ const cBhvr = node["p:cBhvr"];
15522
+ if (extractAttrNameFromCBhvr(cBhvr) !== "style.visibility") {
15523
+ continue;
15524
+ }
15525
+ const innerCTn = cBhvr?.["p:cTn"];
15526
+ if (!hasAfterEffectFlag(innerCTn)) {
15527
+ continue;
15528
+ }
15529
+ const toNode = node["p:to"];
15530
+ const strVal = toNode?.["p:strVal"]?.["@_val"];
15531
+ if (String(strVal ?? "").toLowerCase() !== "hidden") {
15532
+ continue;
15533
+ }
15534
+ const action = innerCTn?.["@_masterRel"] === "sameClick" ? "hideAfterAnimation" : "hideOnNextClick";
15535
+ return { action };
15536
+ }
15537
+ return void 0;
15538
+ }
15539
+ function extractAfterAnimationFromSubTnLst(cTn) {
15540
+ const subTnLst = cTn["p:subTnLst"];
15541
+ if (!subTnLst) {
15542
+ return void 0;
15543
+ }
15544
+ return findDimBehaviour(subTnLst) ?? findHideBehaviour(subTnLst);
15545
+ }
15546
+
15547
+ // pptx/core/services/animation-after-effect-write.ts
15548
+ function assertAfterAnimationClearSupported(effectCTn) {
15549
+ const shapeIds = /* @__PURE__ */ new Set();
15550
+ const checkTarget = (value) => {
15551
+ if (Array.isArray(value)) {
15552
+ value.forEach(checkTarget);
15553
+ return;
15554
+ }
15555
+ if (!isXmlObject3(value)) return;
15556
+ const shapeTarget = value["p:spTgt"];
15557
+ if (isXmlObject3(shapeTarget) && shapeTarget["@_spid"] !== void 0)
15558
+ shapeIds.add(String(shapeTarget["@_spid"]));
15559
+ if ([
15560
+ "p:bg",
15561
+ "p:txEl",
15562
+ "p:subSp",
15563
+ "p:graphicEl",
15564
+ "p:oleChartEl",
15565
+ "p:sndTgt",
15566
+ "p:inkTgt",
15567
+ "p:sldTgt"
15568
+ ].some((key2) => value[key2] !== void 0))
15569
+ throw new Error("Clearing after-animation supports whole-shape targets only");
15570
+ Object.values(value).forEach(checkTarget);
15571
+ };
15572
+ checkTarget(effectCTn["p:childTnLst"]);
15573
+ if (shapeIds.size > 1)
15574
+ throw new Error("Editing after-animation supports a single whole-shape target only");
15575
+ const sub = effectCTn["p:subTnLst"];
15576
+ if (!isXmlObject3(sub)) return;
15577
+ const countAfterFlags = (value) => {
15578
+ if (Array.isArray(value))
15579
+ return value.reduce((count, child14) => count + countAfterFlags(child14), 0);
15580
+ if (!isXmlObject3(value)) return 0;
15581
+ return Object.entries(value).reduce(
15582
+ (count, [key2, child14]) => count + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child14)) ? 1 : countAfterFlags(child14)),
15583
+ 0
15584
+ );
15585
+ };
15586
+ for (const [key2, value] of Object.entries(sub)) {
15587
+ for (const node of ensureArray4(value)) {
15588
+ const flags = countAfterFlags(node);
15589
+ if (!flags) continue;
15590
+ if (flags !== 1 || !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } }))
15591
+ throw new Error("Cannot clear an unsupported native after-animation behavior");
15592
+ checkTarget(node);
15593
+ }
15594
+ }
15595
+ if (shapeIds.size > 1)
15596
+ throw new Error("Editing after-animation supports a single whole-shape target only");
15597
+ }
15598
+ function clearAfterAnimationBehavior(effectCTn) {
15599
+ const sub = effectCTn["p:subTnLst"];
15600
+ if (!isXmlObject3(sub)) return;
15601
+ for (const key2 of Object.keys(sub)) {
15602
+ const nodes = ensureArray4(sub[key2]);
15603
+ const remaining = nodes.filter(
15604
+ (node) => !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } })
15605
+ );
15606
+ if (remaining.length === nodes.length) continue;
15607
+ if (remaining.length === 0) delete sub[key2];
15608
+ else sub[key2] = remaining.length === 1 ? remaining[0] : remaining;
15609
+ }
15610
+ if (Object.keys(sub).length === 0) delete effectCTn["p:subTnLst"];
15611
+ }
15612
+ function applyAfterAnimationBehavior(effectCTn, anim, shapeId) {
15613
+ if (anim.afterAnimation === void 0) return;
15614
+ if (anim.afterAnimation === "none") {
15615
+ assertAfterAnimationClearSupported(effectCTn);
15616
+ clearAfterAnimationBehavior(effectCTn);
15617
+ return;
15618
+ }
15619
+ assertAfterAnimationClearSupported(effectCTn);
15620
+ clearAfterAnimationBehavior(effectCTn);
15621
+ delete effectCTn["@_afterEffect"];
15622
+ if (anim.afterAnimation === "dimToColor" && anim.afterAnimationColor) {
15623
+ appendAfterAnimationBehavior(effectCTn, buildDimSubTnLst(shapeId, anim.afterAnimationColor));
15624
+ return;
15625
+ }
15626
+ if (anim.afterAnimation === "hideAfterAnimation") {
15627
+ const entranceId = effectCTn["@_id"] !== void 0 ? String(effectCTn["@_id"]) : "0";
15628
+ appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "sameClick", entranceId));
15629
+ return;
15630
+ }
15631
+ if (anim.afterAnimation === "hideOnNextClick") {
15632
+ appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "nextClick"));
15633
+ }
15634
+ }
15635
+ function appendAfterAnimationBehavior(effect, addition) {
15636
+ const sub = isXmlObject3(effect["p:subTnLst"]) ? effect["p:subTnLst"] : {};
15637
+ for (const [key2, value] of Object.entries(addition)) {
15638
+ const nodes = [...ensureArray4(sub[key2]), ...ensureArray4(value)];
15639
+ sub[key2] = nodes.length === 1 ? nodes[0] : nodes;
15640
+ }
15641
+ effect["p:subTnLst"] = sub;
15642
+ }
15643
+ function buildDimSubTnLst(shapeId, colorHex) {
15644
+ const hex3 = colorHex.replace(/^#/u, "").toUpperCase();
15645
+ return {
15646
+ "p:animClr": {
15647
+ "@_clrSpc": "rgb",
15648
+ "@_dir": "cw",
15649
+ "p:cBhvr": {
15650
+ "@_override": "childStyle",
15651
+ "p:cTn": {
15652
+ "@_dur": "1",
15653
+ "@_fill": "hold",
15654
+ "@_display": "0",
15655
+ "@_masterRel": "nextClick",
15656
+ "@_afterEffect": "1"
15657
+ },
15658
+ "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
15659
+ "p:attrNameLst": { "p:attrName": "ppt_c" }
15660
+ },
15661
+ "p:to": { "a:srgbClr": { "@_val": hex3 } }
15662
+ }
15663
+ };
15664
+ }
15665
+ function buildHideSubTnLst(shapeId, masterRel, entranceId) {
15666
+ const cTn = {
15667
+ "@_dur": "1",
15668
+ "@_fill": "hold",
15669
+ "@_display": "0",
15670
+ "@_masterRel": masterRel,
15671
+ "@_afterEffect": "1"
15672
+ };
15673
+ if (masterRel === "sameClick") {
15674
+ cTn["p:stCondLst"] = {
15675
+ "p:cond": {
15676
+ "@_evt": "end",
15677
+ "@_delay": "0",
15678
+ "p:tn": { "@_val": entranceId ?? "0" }
15679
+ }
15680
+ };
15681
+ }
15682
+ return {
15683
+ "p:set": {
15684
+ "p:cBhvr": {
15685
+ "@_override": "childStyle",
15686
+ "p:cTn": cTn,
15687
+ "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
15688
+ "p:attrNameLst": { "p:attrName": "style.visibility" }
15689
+ },
15690
+ "p:to": { "p:strVal": { "@_val": "hidden" } }
15691
+ }
15692
+ };
15693
+ }
15694
+
15695
+ // pptx/core/services/editor-animation-after-effect.ts
15696
+ function mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming) {
15697
+ for (const native of nativeAnimations ?? []) {
15698
+ const existing = native.targetId ? animationFor(animations, native.targetId) : void 0;
15699
+ const action = native.afterAnimationAction ?? (existing?.afterAnimation !== void 0 ? "none" : void 0);
15700
+ if ((nativeAnimations ?? []).filter(
15701
+ (other) => other.targetId === native.targetId && ["entr", "emph"].includes(other.presetClass ?? "")
15702
+ ).length !== 1)
15703
+ continue;
15704
+ if (!native.targetId || !action || !["entr", "emph"].includes(native.presetClass ?? "") || native.textTarget)
15705
+ continue;
15706
+ if (native.target && (native.target.type !== "shape" || native.target.backgroundOnly || native.target.subShapeId || native.target.graphicElement || native.target.oleChartElement))
15707
+ continue;
15708
+ try {
15709
+ if (rawTiming && native.target?.type === "shape" && indexEffectNodes(rawTiming).filter(
15710
+ (ref) => ref.spid === (native.target?.type === "shape" ? native.target.shapeId : void 0) && ["entr", "emph"].includes(ref.presetClass)
15711
+ ).length !== 1)
15712
+ continue;
15713
+ const effect = rawTiming ? indexEffectNodes(rawTiming).find(
15714
+ (ref) => String(ref.cTn["@_id"]) === String(native.nodeId) && native.target?.type === "shape" && ref.spid === native.target.shapeId
15715
+ ) : void 0;
15716
+ if (rawTiming && !effect) continue;
15717
+ assertAfterAnimationClearSupported(
15718
+ effect?.cTn ?? { "p:subTnLst": native.cTnAttributes?.["p:subTnLst"] }
15719
+ );
15720
+ } catch {
15721
+ continue;
15722
+ }
15723
+ let entry2 = animationFor(animations, native.targetId);
15724
+ if (!entry2) {
15725
+ entry2 = { elementId: native.targetId };
15726
+ animations.push(entry2);
15727
+ }
15728
+ if (entry2.nativeAfterAnimation !== void 0) continue;
15729
+ entry2.nativeAfterAnimation = action;
15730
+ entry2.nativeAfterAnimationColor = native.afterAnimationColor;
15731
+ }
15732
+ }
15733
+ function isNativeAfterAnimationFallback(entry2) {
15734
+ return entry2.nativeAfterAnimation !== void 0 && Object.entries(entry2).every(
15735
+ ([key2, value]) => value === void 0 || [
15736
+ "elementId",
15737
+ "nativeAfterAnimation",
15738
+ "nativeAfterAnimationColor",
15739
+ "soundRId",
15740
+ "soundPath",
15741
+ "soundName",
15742
+ "stopSound"
15743
+ ].includes(key2)
15744
+ );
15745
+ }
15746
+
15468
15747
  // pptx/core/services/slide-name.ts
15469
15748
  function asNode3(value) {
15470
15749
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -15966,6 +16245,8 @@ var PptxSlideLoaderService = class {
15966
16245
  }
15967
16246
  });
15968
16247
  reconcileAnimationTargets(elements2, nativeAnimations, animations, animationTimelineAnchors);
16248
+ animations ??= [];
16249
+ mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming);
15969
16250
  mergeNativeSoundIntoEditorAnimations(nativeAnimations, animations);
15970
16251
  mergeNativeBuildTemplatesIntoEditorAnimations(nativeAnimations, animations);
15971
16252
  applyHiddenFlagFromRawXml(elements2);
@@ -16391,7 +16672,7 @@ var PptxEditorAnimationService = class {
16391
16672
  * @param animations - Editor animations to serialize.
16392
16673
  */
16393
16674
  applyEditorAnimations(slideNode, animations) {
16394
- const sequenced = [...animations].sort((left, right) => sortOrder(left) - sortOrder(right));
16675
+ const sequenced = animations.filter((entry2) => !isNativeAfterAnimationFallback(entry2)).sort((left, right) => sortOrder(left) - sortOrder(right));
16395
16676
  const sanitizedAnimations = sequenced.map((animation) => {
16396
16677
  const elementId = String(animation.elementId || "").trim();
16397
16678
  if (elementId.length === 0) {
@@ -16405,7 +16686,7 @@ var PptxEditorAnimationService = class {
16405
16686
  const orderIsTreeDerived = animation.orderFromTimeline !== void 0 && animation.order === animation.orderFromTimeline;
16406
16687
  const order = typeof animation.order === "number" && Number.isFinite(animation.order) && !orderIsTreeDerived ? Math.round(animation.order) : void 0;
16407
16688
  const repeatCount = typeof animation.repeatCount === "number" && Number.isFinite(animation.repeatCount) && animation.repeatCount > 0 ? animation.repeatCount : void 0;
16408
- if (!entrance && !exit2 && !emphasis && !animation.motionPath) {
16689
+ if (!entrance && !exit2 && !emphasis && !animation.motionPath && animation.afterAnimation === void 0) {
16409
16690
  return null;
16410
16691
  }
16411
16692
  return {
@@ -16842,63 +17123,6 @@ function parseAnimEffectFilter(childTnList) {
16842
17123
  };
16843
17124
  }
16844
17125
 
16845
- // pptx/core/services/native-animation-after-effect.ts
16846
- function hasAfterEffectFlag(cTn) {
16847
- const raw = cTn?.["@_afterEffect"];
16848
- return raw === "1" || raw === "true";
16849
- }
16850
- function extractSrgbHex(colorContainer) {
16851
- const srgb = colorContainer?.["a:srgbClr"];
16852
- const val = srgb?.["@_val"];
16853
- return val !== void 0 ? `#${String(val).toUpperCase()}` : void 0;
16854
- }
16855
- function findDimBehaviour(subTnLst) {
16856
- for (const node of ensureArray4(subTnLst["p:animClr"])) {
16857
- const cBhvr = node["p:cBhvr"];
16858
- if (extractAttrNameFromCBhvr(cBhvr) !== "ppt_c") {
16859
- continue;
16860
- }
16861
- if (!hasAfterEffectFlag(cBhvr?.["p:cTn"])) {
16862
- continue;
16863
- }
16864
- const toNode = node["p:to"];
16865
- const color2 = extractSrgbHex(toNode);
16866
- if (color2) {
16867
- return { action: "dimToColor", color: color2 };
16868
- }
16869
- const colorRef = themeColorRefFromSchemeClr(toNode?.["a:schemeClr"]);
16870
- return colorRef ? { action: "dimToColor", colorRef } : { action: "dimToColor" };
16871
- }
16872
- return void 0;
16873
- }
16874
- function findHideBehaviour(subTnLst) {
16875
- for (const node of ensureArray4(subTnLst["p:set"])) {
16876
- const cBhvr = node["p:cBhvr"];
16877
- if (extractAttrNameFromCBhvr(cBhvr) !== "style.visibility") {
16878
- continue;
16879
- }
16880
- const innerCTn = cBhvr?.["p:cTn"];
16881
- if (!hasAfterEffectFlag(innerCTn)) {
16882
- continue;
16883
- }
16884
- const toNode = node["p:to"];
16885
- const strVal = toNode?.["p:strVal"]?.["@_val"];
16886
- if (String(strVal ?? "").toLowerCase() !== "hidden") {
16887
- continue;
16888
- }
16889
- const action = innerCTn?.["@_masterRel"] === "sameClick" ? "hideAfterAnimation" : "hideOnNextClick";
16890
- return { action };
16891
- }
16892
- return void 0;
16893
- }
16894
- function extractAfterAnimationFromSubTnLst(cTn) {
16895
- const subTnLst = cTn["p:subTnLst"];
16896
- if (!subTnLst) {
16897
- return void 0;
16898
- }
16899
- return findDimBehaviour(subTnLst) ?? findHideBehaviour(subTnLst);
16900
- }
16901
-
16902
17126
  // pptx/core/services/native-animation-cbhvr-attrs.ts
16903
17127
  var ADDITIVE_VALUES = /* @__PURE__ */ new Set(["base", "sum", "repl", "mult", "none"]);
16904
17128
  var ACCUMULATE_VALUES = /* @__PURE__ */ new Set(["none", "always"]);
@@ -17041,6 +17265,16 @@ function readTiming(cTn) {
17041
17265
  return {};
17042
17266
  }
17043
17267
  const timing = {};
17268
+ const starts = ensureArray4(cTn["p:stCondLst"]?.["p:cond"]);
17269
+ if (starts.length > 1 || cTn["@_dur"] === "indefinite" || cTn["@_repeatCount"] === "indefinite" || cTn["@_repeatDur"] !== void 0 || cTn["p:endCondLst"] !== void 0 || cTn["p:endSync"] !== void 0 || starts.some(
17270
+ (condition) => condition === null || typeof condition !== "object" || condition["@_evt"] !== void 0 || condition["@_tn"] !== void 0 || condition["@_rtn"] !== void 0 || condition["p:tn"] !== void 0 || condition["p:rtn"] !== void 0 || condition["p:tgtEl"] !== void 0 || condition["@_delay"] !== void 0 && !/^\d+$/u.test(String(condition["@_delay"])) || condition["@_delay"] === "indefinite"
17271
+ )) {
17272
+ timing.unsupportedSetTiming = true;
17273
+ }
17274
+ const fill = cTn["@_fill"];
17275
+ if (fill === "remove" || fill === "freeze" || fill === "hold" || fill === "transition") {
17276
+ timing.fill = fill;
17277
+ }
17044
17278
  const durationMs = readTimingAttr(cTn["@_dur"]);
17045
17279
  if (durationMs !== void 0) {
17046
17280
  timing.durationMs = durationMs;
@@ -17417,6 +17651,7 @@ function buildTimingNodeAnimation(cTn, trigger, group) {
17417
17651
  commandString: cmdInfo.commandString,
17418
17652
  textTarget: textTarget ?? void 0,
17419
17653
  cTnAttributes: roundTripAttrs,
17654
+ unsupportedOpacitySetTiming: cTn["@_dur"] === "indefinite" || cTn["p:endSync"] !== void 0 || void 0,
17420
17655
  afterEffect: afterEffectFlag,
17421
17656
  afterAnimationAction: parsedAfterAnimation?.action,
17422
17657
  afterAnimationColor: parsedAfterAnimation?.color,
@@ -18154,75 +18389,6 @@ function isTransitionElementName(localName15) {
18154
18389
  return P14_TRANSITION_TYPES.has(localName15) || localName15 === "prstTrans" || localName15 === "morph";
18155
18390
  }
18156
18391
 
18157
- // pptx/core/services/animation-after-effect-write.ts
18158
- function applyAfterAnimationBehavior(effectCTn, anim, shapeId) {
18159
- delete effectCTn["p:subTnLst"];
18160
- delete effectCTn["@_afterEffect"];
18161
- if (anim.afterAnimation === "dimToColor" && anim.afterAnimationColor) {
18162
- effectCTn["p:subTnLst"] = buildDimSubTnLst(shapeId, anim.afterAnimationColor);
18163
- return;
18164
- }
18165
- if (anim.afterAnimation === "hideAfterAnimation") {
18166
- const entranceId = effectCTn["@_id"] !== void 0 ? String(effectCTn["@_id"]) : "0";
18167
- effectCTn["p:subTnLst"] = buildHideSubTnLst(shapeId, "sameClick", entranceId);
18168
- return;
18169
- }
18170
- if (anim.afterAnimation === "hideOnNextClick") {
18171
- effectCTn["p:subTnLst"] = buildHideSubTnLst(shapeId, "nextClick");
18172
- }
18173
- }
18174
- function buildDimSubTnLst(shapeId, colorHex) {
18175
- const hex3 = colorHex.replace(/^#/u, "").toUpperCase();
18176
- return {
18177
- "p:animClr": {
18178
- "@_clrSpc": "rgb",
18179
- "@_dir": "cw",
18180
- "p:cBhvr": {
18181
- "@_override": "childStyle",
18182
- "p:cTn": {
18183
- "@_dur": "1",
18184
- "@_fill": "hold",
18185
- "@_display": "0",
18186
- "@_masterRel": "nextClick",
18187
- "@_afterEffect": "1"
18188
- },
18189
- "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
18190
- "p:attrNameLst": { "p:attrName": "ppt_c" }
18191
- },
18192
- "p:to": { "a:srgbClr": { "@_val": hex3 } }
18193
- }
18194
- };
18195
- }
18196
- function buildHideSubTnLst(shapeId, masterRel, entranceId) {
18197
- const cTn = {
18198
- "@_dur": "1",
18199
- "@_fill": "hold",
18200
- "@_display": "0",
18201
- "@_masterRel": masterRel,
18202
- "@_afterEffect": "1"
18203
- };
18204
- if (masterRel === "sameClick") {
18205
- cTn["p:stCondLst"] = {
18206
- "p:cond": {
18207
- "@_evt": "end",
18208
- "@_delay": "0",
18209
- "p:tn": { "@_val": entranceId ?? "0" }
18210
- }
18211
- };
18212
- }
18213
- return {
18214
- "p:set": {
18215
- "p:cBhvr": {
18216
- "@_override": "childStyle",
18217
- "p:cTn": cTn,
18218
- "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
18219
- "p:attrNameLst": { "p:attrName": "style.visibility" }
18220
- },
18221
- "p:to": { "p:strVal": { "@_val": "hidden" } }
18222
- }
18223
- };
18224
- }
18225
-
18226
18392
  // pptx/core/services/animation-behavior-captures.json
18227
18393
  var animation_behavior_captures_default = {
18228
18394
  entr: {
@@ -36263,6 +36429,33 @@ function updateEffectNodeAttributes(cTn, anim, presetClass, shapeId, allocateId)
36263
36429
  applySoundToEffectCTn(cTn, anim);
36264
36430
  }
36265
36431
  function surgicallyUpdateTimingTree(rawTiming, animations) {
36432
+ const sourceRefs = indexEffectNodes(rawTiming);
36433
+ for (const entry2 of animations.filter((animation) => animation.afterAnimation !== void 0)) {
36434
+ if (sourceRefs.filter(
36435
+ (ref) => ref.spid === entry2.elementId && ["entr", "emph"].includes(ref.presetClass)
36436
+ ).length > 1)
36437
+ throw new Error(
36438
+ "Cannot edit an ambiguous native after-animation target with multiple effects"
36439
+ );
36440
+ }
36441
+ const explicitClears = new Map(
36442
+ animations.filter((a) => a.afterAnimation !== void 0 && !hasAuthoredAnimationEffect(a)).map((a) => [a.elementId, a])
36443
+ );
36444
+ const clearRefs = sourceRefs.filter(
36445
+ (ref) => ref.spid && explicitClears.has(ref.spid) && (ref.presetClass === "entr" || ref.presetClass === "emph")
36446
+ );
36447
+ for (const target of explicitClears.keys()) {
36448
+ if (!clearRefs.some((ref) => ref.spid === target))
36449
+ throw new Error("Cannot edit after-animation without a supported native effect");
36450
+ if (clearRefs.filter((ref) => ref.spid === target).length > 1)
36451
+ throw new Error(
36452
+ "Cannot clear an ambiguous native after-animation target with multiple effects"
36453
+ );
36454
+ }
36455
+ clearRefs.forEach((ref) => assertAfterAnimationClearSupported(ref.cTn));
36456
+ clearRefs.forEach(
36457
+ (ref) => applyAfterAnimationBehavior(ref.cTn, explicitClears.get(ref.spid), ref.spid)
36458
+ );
36266
36459
  const desired = collectDesiredEffects(animations);
36267
36460
  const previouslyOwned = readOwnedEffectKeys(rawTiming);
36268
36461
  if (desired.length === 0 && previouslyOwned.size === 0) {
@@ -36357,9 +36550,11 @@ var PptxAnimationWriteService = class {
36357
36550
  const validAnimations = animations.filter((a) => a.entrance || a.exit || a.emphasis || a.motionPath).sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
36358
36551
  if (existingRawTiming) {
36359
36552
  const cloned = typeof structuredClone === "function" ? structuredClone(existingRawTiming) : JSON.parse(JSON.stringify(existingRawTiming));
36360
- return surgicallyUpdateTimingTree(cloned, validAnimations);
36553
+ return surgicallyUpdateTimingTree(cloned, animations);
36361
36554
  }
36362
36555
  if (validAnimations.length === 0) {
36556
+ if (animations.some((entry2) => entry2.afterAnimation !== void 0))
36557
+ throw new Error("Cannot edit after-animation without a supported native effect");
36363
36558
  return void 0;
36364
36559
  }
36365
36560
  this.nextId = 1;
@@ -51008,8 +51203,8 @@ function buildDefRPr(style, existing, resolveColor2) {
51008
51203
  return rPr;
51009
51204
  }
51010
51205
  function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveColor2) {
51011
- const hasAny = style.fontFamily !== void 0 || style.fontSize !== void 0 || style.fontBold !== void 0 || style.fontColor !== void 0;
51012
- if (!hasAny) {
51206
+ const hasAny2 = style.fontFamily !== void 0 || style.fontSize !== void 0 || style.fontBold !== void 0 || style.fontColor !== void 0;
51207
+ if (!hasAny2) {
51013
51208
  return;
51014
51209
  }
51015
51210
  const titleKey = findKey(axisNode, "title", getLocalName2);
@@ -52728,8 +52923,8 @@ function applyRotationFlipToRawNode(node, rotation, flipH, flipV) {
52728
52923
  const spPrKey = findChildKey(node, "spPr");
52729
52924
  const container = spPrKey ? node[spPrKey] ?? node : node;
52730
52925
  const xfrmKey = findChildKey(container, "xfrm");
52731
- const hasAny = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
52732
- if (!xfrmKey && !hasAny) {
52926
+ const hasAny2 = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
52927
+ if (!xfrmKey && !hasAny2) {
52733
52928
  return;
52734
52929
  }
52735
52930
  const xfrm = xfrmKey ? container[xfrmKey] : {};
@@ -52766,24 +52961,24 @@ function hexVal(hex3) {
52766
52961
  }
52767
52962
  function buildRunProps(para) {
52768
52963
  const rPr = {};
52769
- let hasAny = false;
52964
+ let hasAny2 = false;
52770
52965
  if (para.fontSize !== void 0) {
52771
52966
  rPr["@_sz"] = String(Math.round(para.fontSize * 100));
52772
- hasAny = true;
52967
+ hasAny2 = true;
52773
52968
  }
52774
52969
  if (para.bold) {
52775
52970
  rPr["@_b"] = "1";
52776
- hasAny = true;
52971
+ hasAny2 = true;
52777
52972
  }
52778
52973
  if (para.italic) {
52779
52974
  rPr["@_i"] = "1";
52780
- hasAny = true;
52975
+ hasAny2 = true;
52781
52976
  }
52782
52977
  if (para.color) {
52783
52978
  rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hexVal(para.color) } };
52784
- hasAny = true;
52979
+ hasAny2 = true;
52785
52980
  }
52786
- return hasAny ? rPr : void 0;
52981
+ return hasAny2 ? rPr : void 0;
52787
52982
  }
52788
52983
  function buildParagraphNode(para) {
52789
52984
  const node = {};
@@ -54691,7 +54886,7 @@ async function blobUrlToDataUrl(blobUrl, fallbackMimeType) {
54691
54886
 
54692
54887
  // pptx/core/core/runtime/image-a14-effects-model.ts
54693
54888
  function applyA14ExtensionToEffects(effects, a14) {
54694
- let hasAny = false;
54889
+ let hasAny2 = false;
54695
54890
  if (a14.artisticEffect !== void 0) {
54696
54891
  effects.artisticEffect = a14.artisticEffect;
54697
54892
  if (a14.originalImageRelId !== void 0) {
@@ -54703,15 +54898,15 @@ function applyA14ExtensionToEffects(effects, a14) {
54703
54898
  if (a14.artisticParams) {
54704
54899
  effects.artisticParams = a14.artisticParams;
54705
54900
  }
54706
- hasAny = true;
54901
+ hasAny2 = true;
54707
54902
  }
54708
54903
  if (a14.backgroundRemoval) {
54709
54904
  effects.backgroundRemoval = a14.backgroundRemoval;
54710
- hasAny = true;
54905
+ hasAny2 = true;
54711
54906
  }
54712
54907
  if (a14.originalImageRelId !== void 0) {
54713
54908
  effects.originalImageRelId = a14.originalImageRelId;
54714
- hasAny = true;
54909
+ hasAny2 = true;
54715
54910
  }
54716
54911
  const corrections = {};
54717
54912
  if (a14.sharpenSoften) {
@@ -54734,9 +54929,9 @@ function applyA14ExtensionToEffects(effects, a14) {
54734
54929
  if (a14.originalImageRelId !== void 0) {
54735
54930
  effects.prerenderedCorrections = corrections;
54736
54931
  }
54737
- hasAny = true;
54932
+ hasAny2 = true;
54738
54933
  }
54739
- return hasAny;
54934
+ return hasAny2;
54740
54935
  }
54741
54936
 
54742
54937
  // pptx/converter/svg-image-effect-values.ts
@@ -56910,13 +57105,13 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
56910
57105
  return null;
56911
57106
  }
56912
57107
  const effects = {};
56913
- let hasAny = false;
57108
+ let hasAny2 = false;
56914
57109
  const brightRaw = blip["@_bright"] ?? blip["@_brt"];
56915
57110
  if (brightRaw !== null) {
56916
57111
  const val = parseInt(String(brightRaw));
56917
57112
  if (Number.isFinite(val)) {
56918
57113
  effects.brightness = val / 1e3;
56919
- hasAny = true;
57114
+ hasAny2 = true;
56920
57115
  }
56921
57116
  }
56922
57117
  const contrastRaw = blip["@_contrast"] ?? blip["@_cont"];
@@ -56924,7 +57119,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
56924
57119
  const val = parseInt(String(contrastRaw));
56925
57120
  if (Number.isFinite(val)) {
56926
57121
  effects.contrast = val / 1e3;
56927
- hasAny = true;
57122
+ hasAny2 = true;
56928
57123
  }
56929
57124
  }
56930
57125
  const colorEffects = parseImageColorEffects(
@@ -56934,12 +57129,12 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
56934
57129
  );
56935
57130
  Object.assign(effects, colorEffects);
56936
57131
  if (Object.keys(colorEffects).length > 0) {
56937
- hasAny = true;
57132
+ hasAny2 = true;
56938
57133
  }
56939
57134
  const alphaEffects = parseImageAlphaEffects(blip, (node) => this.parseColor(node));
56940
57135
  Object.assign(effects, alphaEffects);
56941
57136
  if (Object.keys(alphaEffects).length > 0) {
56942
- hasAny = true;
57137
+ hasAny2 = true;
56943
57138
  }
56944
57139
  const lumNode = blip["a:lum"];
56945
57140
  if (lumNode) {
@@ -56959,7 +57154,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
56959
57154
  }
56960
57155
  }
56961
57156
  effects.lum = lumEffect;
56962
- hasAny = true;
57157
+ hasAny2 = true;
56963
57158
  }
56964
57159
  const hslNode = blip["a:hsl"];
56965
57160
  if (hslNode) {
@@ -56986,7 +57181,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
56986
57181
  }
56987
57182
  }
56988
57183
  effects.hsl = hslEffect;
56989
- hasAny = true;
57184
+ hasAny2 = true;
56990
57185
  }
56991
57186
  const tintNode = blip["a:tint"];
56992
57187
  if (tintNode) {
@@ -57006,7 +57201,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
57006
57201
  }
57007
57202
  }
57008
57203
  effects.tint = tintEffect;
57009
- hasAny = true;
57204
+ hasAny2 = true;
57010
57205
  }
57011
57206
  const fillOverlay = blip["a:fillOverlay"];
57012
57207
  if (fillOverlay) {
@@ -57033,7 +57228,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
57033
57228
  ...resolvedGradient ? { resolvedGradient } : {},
57034
57229
  ...resolvedPattern ? { resolvedPattern } : {}
57035
57230
  };
57036
- hasAny = true;
57231
+ hasAny2 = true;
57037
57232
  }
57038
57233
  const blurNode = blip["a:blur"];
57039
57234
  if (blurNode) {
@@ -57051,16 +57246,16 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
57051
57246
  blurEffect.grow = s === "1" || s === "true";
57052
57247
  }
57053
57248
  effects.blur = blurEffect;
57054
- hasAny = true;
57249
+ hasAny2 = true;
57055
57250
  }
57056
57251
  const extLst = xmlChild(blip, "a:extLst");
57057
57252
  if (extLst) {
57058
57253
  const a14 = parseA14ImageExtension(this.ensureArray(extLst["a:ext"]));
57059
57254
  if (a14 && applyA14ExtensionToEffects(effects, a14)) {
57060
- hasAny = true;
57255
+ hasAny2 = true;
57061
57256
  }
57062
57257
  }
57063
- return hasAny ? effects : null;
57258
+ return hasAny2 ? effects : null;
57064
57259
  }
57065
57260
  /**
57066
57261
  * Resolve a blip `a:fillOverlay/a:gradFill` to the structured gradient a
@@ -58638,8 +58833,8 @@ function buildTextRunEffectListXml(style, parseColor) {
58638
58833
  const hasTextHsl = typeof style.textHslHue === "number" || typeof style.textHslSaturation === "number" || typeof style.textHslLuminance === "number";
58639
58834
  const hasTextClrChange = Boolean(style.textClrChangeFrom) && Boolean(style.textClrChangeTo);
58640
58835
  const hasTextDuotone = Boolean(style.textDuotone);
58641
- const hasAny = hasTextShadow || hasTextInnerShadow || hasTextPresetShadow || hasTextGlow || hasTextReflection || hasTextBlur || hasTextSoftEdge || hasTextAlphaModFix || hasTextAlphaMod || hasTextHsl || hasTextClrChange || hasTextDuotone;
58642
- if (!hasAny) {
58836
+ const hasAny2 = hasTextShadow || hasTextInnerShadow || hasTextPresetShadow || hasTextGlow || hasTextReflection || hasTextBlur || hasTextSoftEdge || hasTextAlphaModFix || hasTextAlphaMod || hasTextHsl || hasTextClrChange || hasTextDuotone;
58837
+ if (!hasAny2) {
58643
58838
  return void 0;
58644
58839
  }
58645
58840
  const effectLst = {};
@@ -62694,6 +62889,82 @@ function writeTableColumnWidths(tbl, columnWidths) {
62694
62889
  }
62695
62890
  }
62696
62891
 
62892
+ // pptx/core/core/runtime/table-style-change-cell-clear.ts
62893
+ var FILL_KEYS = [
62894
+ "a:noFill",
62895
+ "a:solidFill",
62896
+ "a:gradFill",
62897
+ "a:blipFill",
62898
+ "a:pattFill",
62899
+ "a:grpFill"
62900
+ ];
62901
+ var LINE_KEYS = [
62902
+ ["a:lnL", ["borderLeftWidth", "borderLeftColor", "borderLeftDash"]],
62903
+ ["a:lnR", ["borderRightWidth", "borderRightColor", "borderRightDash"]],
62904
+ ["a:lnT", ["borderTopWidth", "borderTopColor", "borderTopDash"]],
62905
+ ["a:lnB", ["borderBottomWidth", "borderBottomColor", "borderBottomDash"]],
62906
+ ["a:lnTlToBr", ["borderDiagDownWidth", "borderDiagDownColor"]],
62907
+ ["a:lnBlToTr", ["borderDiagUpWidth", "borderDiagUpColor"]]
62908
+ ];
62909
+ var FILL_FIELDS = [
62910
+ "fillMode",
62911
+ "backgroundColor",
62912
+ "gradientFillStops",
62913
+ "patternFillPreset",
62914
+ "backgroundImageFillPath",
62915
+ "backgroundImageFillData"
62916
+ ];
62917
+ function normaliseStyleId(id) {
62918
+ const text = typeof id === "string" || typeof id === "number" ? String(id) : "";
62919
+ const trimmed2 = text.trim().toUpperCase();
62920
+ if (!trimmed2) {
62921
+ return "";
62922
+ }
62923
+ return trimmed2.startsWith("{") ? trimmed2 : `{${trimmed2}}`;
62924
+ }
62925
+ function xmlTableStyleId(tblPr) {
62926
+ if (!tblPr || typeof tblPr !== "object") {
62927
+ return "";
62928
+ }
62929
+ const props = tblPr;
62930
+ const node = props["a:tableStyleId"];
62931
+ const spec = normaliseStyleId(
62932
+ node && typeof node === "object" ? node["#text"] : node
62933
+ );
62934
+ if (spec) {
62935
+ return spec;
62936
+ }
62937
+ const legacy = props["a:tblStyle"];
62938
+ return normaliseStyleId(legacy?.["@_val"] || props["@_tblStyle"]);
62939
+ }
62940
+ function tableStyleIdChanged(tblPr, nextStyleId) {
62941
+ if (nextStyleId === void 0) {
62942
+ return false;
62943
+ }
62944
+ return normaliseStyleId(nextStyleId) !== xmlTableStyleId(tblPr);
62945
+ }
62946
+ var hasAny = (style, keys) => keys.some((key2) => style?.[key2] !== void 0);
62947
+ function clearCellFormattingForStyleChange(xmlCell, style) {
62948
+ const tcPr = xmlCell["a:tcPr"];
62949
+ if (!tcPr || typeof tcPr !== "object") {
62950
+ return;
62951
+ }
62952
+ const props = tcPr;
62953
+ if (!hasAny(style, FILL_FIELDS)) {
62954
+ for (const key2 of FILL_KEYS) {
62955
+ delete props[key2];
62956
+ }
62957
+ }
62958
+ for (const [key2, fields] of LINE_KEYS) {
62959
+ if (!hasAny(style, fields)) {
62960
+ delete props[key2];
62961
+ }
62962
+ }
62963
+ if (!style?.cell3D) {
62964
+ delete props["a:cell3D"];
62965
+ }
62966
+ }
62967
+
62697
62968
  // pptx/core/core/runtime/table-paragraph-save-order.ts
62698
62969
  var CONTENT_TAGS = /* @__PURE__ */ new Set(["a:r", "a:br", "a:fld"]);
62699
62970
  var paragraphOrders = /* @__PURE__ */ new WeakMap();
@@ -63181,6 +63452,7 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
63181
63452
  if (!tbl) {
63182
63453
  return;
63183
63454
  }
63455
+ const styleChanged = tableData.clearDirectCellFormatting === true || tableStyleIdChanged(tbl["a:tblPr"], tableData.tableStyleId);
63184
63456
  serializeTablePropertyFlags(tbl, tableData);
63185
63457
  writeTablePropertiesOwnFillAndEffects(tbl["a:tblPr"], tableData);
63186
63458
  const xmlRows = this.ensureArray(tbl["a:tr"]);
@@ -63212,6 +63484,9 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
63212
63484
  if (cell.text !== void 0) {
63213
63485
  this.writeTableCellText(xmlCell, cell.text);
63214
63486
  }
63487
+ if (styleChanged) {
63488
+ clearCellFormattingForStyleChange(xmlCell, cell.style);
63489
+ }
63215
63490
  if (cell.style) {
63216
63491
  this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
63217
63492
  }
@@ -63235,6 +63510,9 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
63235
63510
  if (cell.text !== void 0) {
63236
63511
  this.writeTableCellText(xmlCell, cell.text);
63237
63512
  }
63513
+ if (styleChanged) {
63514
+ clearCellFormattingForStyleChange(xmlCell, cell.style);
63515
+ }
63238
63516
  if (cell.style) {
63239
63517
  this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
63240
63518
  }
@@ -73532,6 +73810,10 @@ var PptxHandlerRuntime60 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
73532
73810
  const pathLst = custGeom["a:pathLst"];
73533
73811
  if (isNonEmpty(pathLst)) {
73534
73812
  result.pathLstXml = pathLst;
73813
+ const pathCommandOrder = readPathListCommandOrder(pathLst);
73814
+ if (pathCommandOrder) {
73815
+ result.pathCommandOrder = pathCommandOrder;
73816
+ }
73535
73817
  }
73536
73818
  return Object.keys(result).length > 0 ? result : void 0;
73537
73819
  }
@@ -74405,7 +74687,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
74405
74687
  return void 0;
74406
74688
  }
74407
74689
  const locks = {};
74408
- let hasAny = false;
74690
+ let hasAny2 = false;
74409
74691
  const boolAttr2 = (attr5) => {
74410
74692
  const raw = spLocks[attr5];
74411
74693
  if (raw === void 0) {
@@ -74418,7 +74700,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
74418
74700
  const val = boolAttr2(attr5);
74419
74701
  if (val !== void 0) {
74420
74702
  fn(val);
74421
- hasAny = true;
74703
+ hasAny2 = true;
74422
74704
  }
74423
74705
  };
74424
74706
  set("@_noGrp", (v) => {
@@ -74457,7 +74739,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
74457
74739
  set("@_noCrop", (v) => {
74458
74740
  locks.noCrop = v;
74459
74741
  });
74460
- return hasAny ? locks : void 0;
74742
+ return hasAny2 ? locks : void 0;
74461
74743
  }
74462
74744
  /**
74463
74745
  * Parse the `@txBox` attribute from a `p:cNvSpPr` node. Returns `true` /
@@ -82728,6 +83010,8 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
82728
83010
  };
82729
83011
 
82730
83012
  // pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts
83013
+ var XSD_INT_MIN = -2147483648;
83014
+ var XSD_INT_MAX = 2147483647;
82731
83015
  var PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
82732
83016
  parseEditorAnimations(slideXml3) {
82733
83017
  return this.editorAnimationService.parseEditorAnimations(slideXml3);
@@ -82910,6 +83194,22 @@ var PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
82910
83194
  const lexical = String(raw).trim().toLowerCase();
82911
83195
  return lexical !== "0" && lexical !== "false";
82912
83196
  }
83197
+ /**
83198
+ * Extract `p:presentation/@firstSlideNum` (ECMA-376 §19.2.1.26, an
83199
+ * `xsd:int`). `undefined` when absent, not an integer, or outside the
83200
+ * `xsd:int` range (-2147483648 to 2147483647, which also rejects digit
83201
+ * strings too long to parse), so the spec default (`1`) is never forced
83202
+ * onto the typed model.
83203
+ */
83204
+ extractFirstSlideNumber() {
83205
+ const pres = this.presentationData?.["p:presentation"];
83206
+ const lexical = String(pres?.["@_firstSlideNum"] ?? "").trim();
83207
+ if (!/^[+-]?\d+$/.test(lexical)) {
83208
+ return void 0;
83209
+ }
83210
+ const value = Number(lexical);
83211
+ return value >= XSD_INT_MIN && value <= XSD_INT_MAX ? value : void 0;
83212
+ }
82913
83213
  };
82914
83214
 
82915
83215
  // pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts
@@ -83542,7 +83842,7 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
83542
83842
  this.commentAuthorDetails.size > 0 ? Array.from(this.commentAuthorDetails.values()) : void 0
83543
83843
  ).withModernCommentAuthors(
83544
83844
  this.modernCommentAuthors.size > 0 ? Array.from(this.modernCommentAuthors.values()) : void 0
83545
- ).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withDefaultTextStyle(defaultTextStyle).build();
83845
+ ).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withFirstSlideNumber(this.extractFirstSlideNumber()).withDefaultTextStyle(defaultTextStyle).build();
83546
83846
  }
83547
83847
  /**
83548
83848
  * Walk the raw XML of every slide to find the highest numeric `@_id`
@@ -87543,7 +87843,10 @@ var PptxHandler = class extends PptxHandlerCore {
87543
87843
  const imported = deserializePptxFromJson(text);
87544
87844
  const blankBytes = await buildBlankPresentationArchive({
87545
87845
  width: imported.widthEmu,
87546
- height: imported.heightEmu
87846
+ height: imported.heightEmu,
87847
+ // Saving writes presentation.xml from the loaded archive, not from
87848
+ // the overlaid model, so the archive must carry the value itself.
87849
+ firstSlideNumber: imported.firstSlideNumber
87547
87850
  });
87548
87851
  const base = await super.load(blankBytes, options);
87549
87852
  return applyImportedPptxData(base, imported);