ooxml-core 1.9.0 → 1.11.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.
- package/dist/PptxHandler-DNZHAHUY.cjs +12 -0
- package/dist/PptxHandler-E44KDHMQ.mjs +3 -0
- package/dist/{PptxHandler-EX4WBIQQ.mjs → PptxHandler-NROFYT2N.mjs} +2 -2
- package/dist/automation/index.cjs +3236 -2258
- package/dist/automation/index.mjs +3236 -2258
- package/dist/{chunk-SWF7KVL5.cjs → chunk-2UVH6RHI.cjs} +1608 -1163
- package/dist/{chunk-M76PHYRR.mjs → chunk-7DSZI7S6.mjs} +1 -1
- package/dist/{chunk-AT66SA5M.cjs → chunk-7QZGRB3T.cjs} +28 -10
- package/dist/chunk-ANZ4Q6I3.cjs +21 -0
- package/dist/{chunk-CPKNMQLX.cjs → chunk-AWIDASUW.cjs} +25 -2
- package/dist/{chunk-SVQZXP3F.mjs → chunk-CBNKBVX5.mjs} +25 -2
- package/dist/{chunk-FIELY5PI.mjs → chunk-EC2W2MDY.mjs} +30 -2
- package/dist/chunk-EGTRL3QJ.mjs +19 -0
- package/dist/chunk-GXHKNSZX.mjs +9 -0
- package/dist/{chunk-OXHMZS7B.mjs → chunk-HCXUI5UC.mjs} +943 -273
- package/dist/chunk-HDQXPSHY.cjs +17 -0
- package/dist/chunk-KTYBFGEY.mjs +14 -0
- package/dist/chunk-QOO36KG4.cjs +42 -0
- package/dist/chunk-R2KZXD6U.mjs +39 -0
- package/dist/{chunk-IGOA57LE.mjs → chunk-U2DF3EGK.mjs} +1 -1
- package/dist/{chunk-OB277ZGE.mjs → chunk-UAY26XOI.mjs} +27 -9
- package/dist/{chunk-WSO4T2LJ.mjs → chunk-W5ARCUJB.mjs} +26 -3
- package/dist/chunk-XZPZHXV4.cjs +12 -0
- package/dist/{chunk-LCS3J3QI.mjs → chunk-YB5SRNFS.mjs} +717 -272
- package/dist/docx/layout/adapt-table.d.ts +2 -2
- package/dist/docx/layout/adapt-table.d.ts.map +1 -1
- package/dist/docx/layout/flow-table.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +554 -83
- package/dist/docx/layout/index.mjs +554 -84
- package/dist/docx/layout/nested-fragment-edges.d.ts +9 -0
- package/dist/docx/layout/nested-fragment-edges.d.ts.map +1 -0
- package/dist/docx/layout/nested-frame-profile.d.ts +9 -0
- package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -0
- package/dist/docx/layout/page-cursor.d.ts +2 -0
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +20 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/table-border-layout.d.ts +16 -0
- package/dist/docx/layout/table-border-layout.d.ts.map +1 -0
- package/dist/docx/layout/table-cell-layout.d.ts +3 -2
- package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
- package/dist/docx/layout/table-content.d.ts +4 -0
- package/dist/docx/layout/table-content.d.ts.map +1 -0
- package/dist/docx/layout/table-footnotes.d.ts +5 -0
- package/dist/docx/layout/table-footnotes.d.ts.map +1 -1
- package/dist/docx/layout/table-frames.d.ts +4 -0
- package/dist/docx/layout/table-frames.d.ts.map +1 -0
- package/dist/docx/layout/table-layout.d.ts +8 -3
- package/dist/docx/layout/table-layout.d.ts.map +1 -1
- package/dist/docx/layout/table-note-completion.d.ts +5 -0
- package/dist/docx/layout/table-note-completion.d.ts.map +1 -0
- package/dist/docx/layout/table-note-stories.d.ts +6 -0
- package/dist/docx/layout/table-note-stories.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +801 -296
- package/dist/pptx/automation/index.d.ts +5 -4
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{text-operations-BLodkuXE.d.ts → elements-DD3UGOMd.d.ts} +27 -3248
- package/dist/pptx/chunks/elements-DD3UGOMd.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-B4cnSPNz.d.ts → index-BZrFyNtU.d.ts} +113 -5
- package/dist/pptx/chunks/index-BZrFyNtU.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BZh-IMkN.d.ts → index-DdX02BSm.d.ts} +19 -3
- package/dist/pptx/chunks/index-DdX02BSm.d.ts.map +1 -0
- package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts +1512 -0
- package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts.map +1 -0
- package/dist/pptx/chunks/text-D49FKllA.d.ts +1473 -0
- package/dist/pptx/chunks/text-D49FKllA.d.ts.map +1 -0
- package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts +3261 -0
- package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +801 -296
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +1 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +19 -18
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +3 -2
- package/dist/pptx/editor/render/font-family-update.cjs +14 -0
- package/dist/pptx/editor/render/font-family-update.d.ts +17 -0
- package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -0
- package/dist/pptx/editor/render/font-family-update.mjs +1 -0
- package/dist/pptx/editor/render/paragraph-geometry-overrides.cjs +14 -0
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +17 -0
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -0
- package/dist/pptx/editor/render/paragraph-geometry-overrides.mjs +12 -0
- package/dist/pptx/editor/render/remap-text.cjs +2 -2
- package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/editor/render/text-content-style.cjs +18 -0
- package/dist/pptx/editor/render/text-content-style.d.ts +9 -0
- package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -0
- package/dist/pptx/editor/render/text-content-style.mjs +5 -0
- package/dist/pptx/editor/render/text-runs-style-patch.cjs +17 -0
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +7 -0
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -0
- package/dist/pptx/editor/render/text-runs-style-patch.mjs +15 -0
- package/dist/pptx/editor/render/text-style-scope.cjs +173 -0
- package/dist/pptx/editor/render/text-style-scope.d.ts +76 -0
- package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -0
- package/dist/pptx/editor/render/text-style-scope.mjs +164 -0
- package/dist/pptx/editor/render/theme-editor-model.cjs +1 -1
- package/dist/pptx/editor/render/theme-editor-model.mjs +1 -1
- package/dist/pptx/editor/render/update-text-segment-style.cjs +11 -0
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +14 -0
- package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -0
- package/dist/pptx/editor/render/update-text-segment-style.mjs +2 -0
- package/dist/pptx/index.cjs +1091 -296
- package/dist/pptx/index.d.ts +7 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/smartart-layouts/index.d.ts +1 -1
- package/dist/teams/index.cjs +590 -122
- package/dist/teams/index.mjs +590 -122
- package/dist/visio/date-cache.d.ts +3 -0
- package/dist/visio/date-cache.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +3 -3
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-text-field-commands.d.ts +15 -0
- package/dist/visio/edit-text-field-commands.d.ts.map +1 -1
- package/dist/visio/edit-text-field.d.ts +2 -2
- package/dist/visio/edit-text-field.d.ts.map +1 -1
- package/dist/visio/edit.d.ts +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/index.cjs +501 -220
- package/dist/visio/index.d.ts +1 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +501 -220
- package/dist/visio/model.d.ts +6 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/shape-metadata.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/style.d.ts +1 -1
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/text-field-display.d.ts +3 -0
- package/dist/visio/text-field-display.d.ts.map +1 -1
- package/dist/visio/text-field-editability.d.ts +6 -0
- package/dist/visio/text-field-editability.d.ts.map +1 -0
- package/dist/visio/text-field-fraction.d.ts +3 -0
- package/dist/visio/text-field-fraction.d.ts.map +1 -0
- package/dist/visio/text-field-independent.d.ts +4 -0
- package/dist/visio/text-field-independent.d.ts.map +1 -0
- package/dist/visio/text-field-numeric.d.ts +1 -1
- package/dist/visio/text-field-numeric.d.ts.map +1 -1
- package/dist/visio/text-field-source.d.ts +6 -0
- package/dist/visio/text-field-source.d.ts.map +1 -0
- package/dist/visio/text-field-system-date.d.ts +4 -0
- package/dist/visio/text-field-system-date.d.ts.map +1 -0
- package/dist/visio/text-fields.d.ts +1 -0
- package/dist/visio/text-fields.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +514 -221
- package/dist/visio/ui/index.mjs +514 -221
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/text-field-catalog.d.ts.map +1 -1
- package/dist/xlsx/edit/pivots.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +1362 -659
- package/dist/xlsx/index.mjs +1361 -660
- package/dist/xlsx/load/index.cjs +1091 -430
- package/dist/xlsx/load/index.mjs +1091 -430
- package/dist/xlsx/model-pivots.d.ts +31 -2
- package/dist/xlsx/model-pivots.d.ts.map +1 -1
- package/dist/xlsx/pivot/admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/aggregate.d.ts +3 -1
- package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
- package/dist/xlsx/pivot/data.d.ts +2 -2
- package/dist/xlsx/pivot/data.d.ts.map +1 -1
- package/dist/xlsx/pivot/hierarchy-first.d.ts +21 -0
- package/dist/xlsx/pivot/hierarchy-first.d.ts.map +1 -0
- package/dist/xlsx/pivot/hierarchy.d.ts +2 -4
- package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
- package/dist/xlsx/pivot/index.d.ts +2 -0
- package/dist/xlsx/pivot/index.d.ts.map +1 -1
- package/dist/xlsx/pivot/measures.d.ts +13 -0
- package/dist/xlsx/pivot/measures.d.ts.map +1 -0
- package/dist/xlsx/pivot/page-filter-admission.d.ts +5 -0
- package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -0
- package/dist/xlsx/pivot/page-filter.d.ts +11 -0
- package/dist/xlsx/pivot/page-filter.d.ts.map +1 -0
- package/dist/xlsx/pivot/read.d.ts.map +1 -1
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/values-axis.d.ts +12 -0
- package/dist/xlsx/pivot/values-axis.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +640 -137
- package/dist/xlsx/ui/index.mjs +640 -137
- package/package.json +2 -2
- package/dist/PptxHandler-AT7FVG5Q.mjs +0 -2
- package/dist/PptxHandler-VFSCECPL.cjs +0 -11
- package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BZh-IMkN.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts +0 -2970
- package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
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,
|
|
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, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, 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-UAY26XOI.mjs';
|
|
2
|
+
import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
|
|
2
3
|
import JSZip5 from 'jszip';
|
|
3
4
|
import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
|
|
4
5
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
@@ -125,6 +126,7 @@ var PRESENTATION_FIELD_KEYS = {
|
|
|
125
126
|
modernCommentAuthors: true,
|
|
126
127
|
conformance: true,
|
|
127
128
|
embedTrueTypeFonts: true,
|
|
129
|
+
firstSlideNumber: true,
|
|
128
130
|
defaultTextStyle: true
|
|
129
131
|
};
|
|
130
132
|
var PRESENTATION_FIELD_NAMES = Object.keys(PRESENTATION_FIELD_KEYS);
|
|
@@ -1938,7 +1940,7 @@ function rootRelsXml() {
|
|
|
1938
1940
|
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
|
|
1939
1941
|
</Relationships>`;
|
|
1940
1942
|
}
|
|
1941
|
-
function presentationXml(width, height, slideCount) {
|
|
1943
|
+
function presentationXml(width, height, slideCount, firstSlideNumber) {
|
|
1942
1944
|
const slideIdBase = 256;
|
|
1943
1945
|
const slideRIdBase = 6;
|
|
1944
1946
|
const sldIdLst = slideCount > 0 ? ` <p:sldIdLst>
|
|
@@ -1947,6 +1949,7 @@ ${Array.from(
|
|
|
1947
1949
|
(_, i) => ` <p:sldId id="${slideIdBase + i}" r:id="rId${slideRIdBase + i}"/>`
|
|
1948
1950
|
).join("\n")}
|
|
1949
1951
|
</p:sldIdLst>` : "";
|
|
1952
|
+
const firstSlideNum = firstSlideNumber === void 0 ? "" : ` firstSlideNum="${Math.trunc(firstSlideNumber)}"`;
|
|
1950
1953
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
1951
1954
|
<p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
|
|
1952
1955
|
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
|
@@ -1954,7 +1957,7 @@ ${Array.from(
|
|
|
1954
1957
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
1955
1958
|
xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"
|
|
1956
1959
|
xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"
|
|
1957
|
-
saveSubsetFonts="1">
|
|
1960
|
+
saveSubsetFonts="1"${firstSlideNum}>
|
|
1958
1961
|
<p:sldMasterIdLst>
|
|
1959
1962
|
<p:sldMasterId id="2147483648" r:id="rId1"/>
|
|
1960
1963
|
</p:sldMasterIdLst>
|
|
@@ -2191,7 +2194,10 @@ async function buildBlankPresentationArchive(options) {
|
|
|
2191
2194
|
const zip = new JSZip5();
|
|
2192
2195
|
zip.file("[Content_Types].xml", contentTypesXml(layoutCount, initialSlideCount));
|
|
2193
2196
|
zip.file("_rels/.rels", rootRelsXml());
|
|
2194
|
-
zip.file(
|
|
2197
|
+
zip.file(
|
|
2198
|
+
"ppt/presentation.xml",
|
|
2199
|
+
presentationXml(width, height, initialSlideCount, options?.firstSlideNumber)
|
|
2200
|
+
);
|
|
2195
2201
|
zip.file("ppt/_rels/presentation.xml.rels", presentationRelsXml(layoutCount, initialSlideCount));
|
|
2196
2202
|
zip.file("ppt/slideMasters/slideMaster1.xml", slideMasterXml(layoutCount));
|
|
2197
2203
|
zip.file("ppt/slideMasters/_rels/slideMaster1.xml.rels", slideMasterRelsXml(layoutCount));
|
|
@@ -3812,6 +3818,7 @@ function parseStructuredCustomGeometry(custGeom, shapeWidth, shapeHeight, ensure
|
|
|
3812
3818
|
var ensureArray = (value) => ensureArrayValue(value);
|
|
3813
3819
|
function pathNodesOf(rawData) {
|
|
3814
3820
|
const pathLst = rawData?.pathLstXml;
|
|
3821
|
+
restorePathListCommandOrder(pathLst, rawData?.pathCommandOrder);
|
|
3815
3822
|
return ensureArrayValue(pathLst?.["a:path"]);
|
|
3816
3823
|
}
|
|
3817
3824
|
function evaluateCustomGeometryPaths(rawData, pathWidth, pathHeight, overrides) {
|
|
@@ -10780,7 +10787,7 @@ function parseShapeLockNode(node, spec) {
|
|
|
10780
10787
|
return void 0;
|
|
10781
10788
|
}
|
|
10782
10789
|
const locks = {};
|
|
10783
|
-
let
|
|
10790
|
+
let hasAny2 = false;
|
|
10784
10791
|
for (const prop of spec.permitted) {
|
|
10785
10792
|
const raw = node[LOCK_ATTRIBUTE[prop]];
|
|
10786
10793
|
if (raw === void 0) {
|
|
@@ -10788,9 +10795,9 @@ function parseShapeLockNode(node, spec) {
|
|
|
10788
10795
|
}
|
|
10789
10796
|
const value = String(raw).trim().toLowerCase();
|
|
10790
10797
|
locks[prop] = value === "1" || value === "true";
|
|
10791
|
-
|
|
10798
|
+
hasAny2 = true;
|
|
10792
10799
|
}
|
|
10793
|
-
return
|
|
10800
|
+
return hasAny2 ? locks : void 0;
|
|
10794
10801
|
}
|
|
10795
10802
|
|
|
10796
10803
|
// pptx/core/core/runtime/shape-lock-containers.ts
|
|
@@ -11594,6 +11601,7 @@ var PptxLoadDataBuilder = class {
|
|
|
11594
11601
|
modernCommentAuthors;
|
|
11595
11602
|
conformance;
|
|
11596
11603
|
embedTrueTypeFonts;
|
|
11604
|
+
firstSlideNumber;
|
|
11597
11605
|
defaultTextStyle;
|
|
11598
11606
|
withDimensions(width, height, widthEmu, heightEmu) {
|
|
11599
11607
|
this.width = width;
|
|
@@ -11763,6 +11771,10 @@ var PptxLoadDataBuilder = class {
|
|
|
11763
11771
|
this.embedTrueTypeFonts = embedTrueTypeFonts;
|
|
11764
11772
|
return this;
|
|
11765
11773
|
}
|
|
11774
|
+
withFirstSlideNumber(firstSlideNumber) {
|
|
11775
|
+
this.firstSlideNumber = firstSlideNumber;
|
|
11776
|
+
return this;
|
|
11777
|
+
}
|
|
11766
11778
|
withDefaultTextStyle(defaultTextStyle) {
|
|
11767
11779
|
this.defaultTextStyle = defaultTextStyle;
|
|
11768
11780
|
return this;
|
|
@@ -11814,6 +11826,7 @@ var PptxLoadDataBuilder = class {
|
|
|
11814
11826
|
modernCommentAuthors: this.modernCommentAuthors,
|
|
11815
11827
|
conformance: this.conformance,
|
|
11816
11828
|
embedTrueTypeFonts: this.embedTrueTypeFonts,
|
|
11829
|
+
firstSlideNumber: this.firstSlideNumber,
|
|
11817
11830
|
defaultTextStyle: this.defaultTextStyle
|
|
11818
11831
|
};
|
|
11819
11832
|
}
|
|
@@ -15465,6 +15478,273 @@ async function attachRealMediaDurations(elements2, nativeAnimations, readBytes)
|
|
|
15465
15478
|
applyPlainDelayRemap(nativeAnimations, plainDelayRemap);
|
|
15466
15479
|
}
|
|
15467
15480
|
|
|
15481
|
+
// pptx/core/services/editor-animation-entry.ts
|
|
15482
|
+
function hasAuthoredAnimationEffect(entry2) {
|
|
15483
|
+
return Boolean(
|
|
15484
|
+
[entry2.entrance, entry2.exit, entry2.emphasis].some((preset) => preset && preset !== "none") || entry2.motionPath
|
|
15485
|
+
);
|
|
15486
|
+
}
|
|
15487
|
+
function animationFor(slideAnimations, elementId) {
|
|
15488
|
+
return slideAnimations.find((a) => a.elementId === elementId);
|
|
15489
|
+
}
|
|
15490
|
+
|
|
15491
|
+
// pptx/core/services/native-animation-after-effect.ts
|
|
15492
|
+
function hasAfterEffectFlag(cTn) {
|
|
15493
|
+
const raw = cTn?.["@_afterEffect"];
|
|
15494
|
+
return raw === "1" || raw === "true";
|
|
15495
|
+
}
|
|
15496
|
+
function extractSrgbHex(colorContainer) {
|
|
15497
|
+
const srgb = colorContainer?.["a:srgbClr"];
|
|
15498
|
+
const val = srgb?.["@_val"];
|
|
15499
|
+
return val !== void 0 ? `#${String(val).toUpperCase()}` : void 0;
|
|
15500
|
+
}
|
|
15501
|
+
function findDimBehaviour(subTnLst) {
|
|
15502
|
+
for (const node of ensureArray4(subTnLst["p:animClr"])) {
|
|
15503
|
+
const cBhvr = node["p:cBhvr"];
|
|
15504
|
+
if (extractAttrNameFromCBhvr(cBhvr) !== "ppt_c") {
|
|
15505
|
+
continue;
|
|
15506
|
+
}
|
|
15507
|
+
if (!hasAfterEffectFlag(cBhvr?.["p:cTn"])) {
|
|
15508
|
+
continue;
|
|
15509
|
+
}
|
|
15510
|
+
const toNode = node["p:to"];
|
|
15511
|
+
const color2 = extractSrgbHex(toNode);
|
|
15512
|
+
if (color2) {
|
|
15513
|
+
return { action: "dimToColor", color: color2 };
|
|
15514
|
+
}
|
|
15515
|
+
const colorRef = themeColorRefFromSchemeClr(toNode?.["a:schemeClr"]);
|
|
15516
|
+
return colorRef ? { action: "dimToColor", colorRef } : { action: "dimToColor" };
|
|
15517
|
+
}
|
|
15518
|
+
return void 0;
|
|
15519
|
+
}
|
|
15520
|
+
function findHideBehaviour(subTnLst) {
|
|
15521
|
+
for (const node of ensureArray4(subTnLst["p:set"])) {
|
|
15522
|
+
const cBhvr = node["p:cBhvr"];
|
|
15523
|
+
if (extractAttrNameFromCBhvr(cBhvr) !== "style.visibility") {
|
|
15524
|
+
continue;
|
|
15525
|
+
}
|
|
15526
|
+
const innerCTn = cBhvr?.["p:cTn"];
|
|
15527
|
+
if (!hasAfterEffectFlag(innerCTn)) {
|
|
15528
|
+
continue;
|
|
15529
|
+
}
|
|
15530
|
+
const toNode = node["p:to"];
|
|
15531
|
+
const strVal = toNode?.["p:strVal"]?.["@_val"];
|
|
15532
|
+
if (String(strVal ?? "").toLowerCase() !== "hidden") {
|
|
15533
|
+
continue;
|
|
15534
|
+
}
|
|
15535
|
+
const action = innerCTn?.["@_masterRel"] === "sameClick" ? "hideAfterAnimation" : "hideOnNextClick";
|
|
15536
|
+
return { action };
|
|
15537
|
+
}
|
|
15538
|
+
return void 0;
|
|
15539
|
+
}
|
|
15540
|
+
function extractAfterAnimationFromSubTnLst(cTn) {
|
|
15541
|
+
const subTnLst = cTn["p:subTnLst"];
|
|
15542
|
+
if (!subTnLst) {
|
|
15543
|
+
return void 0;
|
|
15544
|
+
}
|
|
15545
|
+
return findDimBehaviour(subTnLst) ?? findHideBehaviour(subTnLst);
|
|
15546
|
+
}
|
|
15547
|
+
|
|
15548
|
+
// pptx/core/services/animation-after-effect-write.ts
|
|
15549
|
+
function assertAfterAnimationClearSupported(effectCTn) {
|
|
15550
|
+
const shapeIds = /* @__PURE__ */ new Set();
|
|
15551
|
+
const checkTarget = (value) => {
|
|
15552
|
+
if (Array.isArray(value)) {
|
|
15553
|
+
value.forEach(checkTarget);
|
|
15554
|
+
return;
|
|
15555
|
+
}
|
|
15556
|
+
if (!isXmlObject3(value)) return;
|
|
15557
|
+
const shapeTarget = value["p:spTgt"];
|
|
15558
|
+
if (isXmlObject3(shapeTarget) && shapeTarget["@_spid"] !== void 0)
|
|
15559
|
+
shapeIds.add(String(shapeTarget["@_spid"]));
|
|
15560
|
+
if ([
|
|
15561
|
+
"p:bg",
|
|
15562
|
+
"p:txEl",
|
|
15563
|
+
"p:subSp",
|
|
15564
|
+
"p:graphicEl",
|
|
15565
|
+
"p:oleChartEl",
|
|
15566
|
+
"p:sndTgt",
|
|
15567
|
+
"p:inkTgt",
|
|
15568
|
+
"p:sldTgt"
|
|
15569
|
+
].some((key2) => value[key2] !== void 0))
|
|
15570
|
+
throw new Error("Clearing after-animation supports whole-shape targets only");
|
|
15571
|
+
Object.values(value).forEach(checkTarget);
|
|
15572
|
+
};
|
|
15573
|
+
checkTarget(effectCTn["p:childTnLst"]);
|
|
15574
|
+
if (shapeIds.size > 1)
|
|
15575
|
+
throw new Error("Editing after-animation supports a single whole-shape target only");
|
|
15576
|
+
const sub = effectCTn["p:subTnLst"];
|
|
15577
|
+
if (!isXmlObject3(sub)) return;
|
|
15578
|
+
const countAfterFlags = (value) => {
|
|
15579
|
+
if (Array.isArray(value))
|
|
15580
|
+
return value.reduce((count, child14) => count + countAfterFlags(child14), 0);
|
|
15581
|
+
if (!isXmlObject3(value)) return 0;
|
|
15582
|
+
return Object.entries(value).reduce(
|
|
15583
|
+
(count, [key2, child14]) => count + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child14)) ? 1 : countAfterFlags(child14)),
|
|
15584
|
+
0
|
|
15585
|
+
);
|
|
15586
|
+
};
|
|
15587
|
+
for (const [key2, value] of Object.entries(sub)) {
|
|
15588
|
+
for (const node of ensureArray4(value)) {
|
|
15589
|
+
const flags = countAfterFlags(node);
|
|
15590
|
+
if (!flags) continue;
|
|
15591
|
+
if (flags !== 1 || !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } }))
|
|
15592
|
+
throw new Error("Cannot clear an unsupported native after-animation behavior");
|
|
15593
|
+
checkTarget(node);
|
|
15594
|
+
}
|
|
15595
|
+
}
|
|
15596
|
+
if (shapeIds.size > 1)
|
|
15597
|
+
throw new Error("Editing after-animation supports a single whole-shape target only");
|
|
15598
|
+
}
|
|
15599
|
+
function clearAfterAnimationBehavior(effectCTn) {
|
|
15600
|
+
const sub = effectCTn["p:subTnLst"];
|
|
15601
|
+
if (!isXmlObject3(sub)) return;
|
|
15602
|
+
for (const key2 of Object.keys(sub)) {
|
|
15603
|
+
const nodes = ensureArray4(sub[key2]);
|
|
15604
|
+
const remaining = nodes.filter(
|
|
15605
|
+
(node) => !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } })
|
|
15606
|
+
);
|
|
15607
|
+
if (remaining.length === nodes.length) continue;
|
|
15608
|
+
if (remaining.length === 0) delete sub[key2];
|
|
15609
|
+
else sub[key2] = remaining.length === 1 ? remaining[0] : remaining;
|
|
15610
|
+
}
|
|
15611
|
+
if (Object.keys(sub).length === 0) delete effectCTn["p:subTnLst"];
|
|
15612
|
+
}
|
|
15613
|
+
function applyAfterAnimationBehavior(effectCTn, anim, shapeId) {
|
|
15614
|
+
if (anim.afterAnimation === void 0) return;
|
|
15615
|
+
if (anim.afterAnimation === "none") {
|
|
15616
|
+
assertAfterAnimationClearSupported(effectCTn);
|
|
15617
|
+
clearAfterAnimationBehavior(effectCTn);
|
|
15618
|
+
return;
|
|
15619
|
+
}
|
|
15620
|
+
assertAfterAnimationClearSupported(effectCTn);
|
|
15621
|
+
clearAfterAnimationBehavior(effectCTn);
|
|
15622
|
+
delete effectCTn["@_afterEffect"];
|
|
15623
|
+
if (anim.afterAnimation === "dimToColor" && anim.afterAnimationColor) {
|
|
15624
|
+
appendAfterAnimationBehavior(effectCTn, buildDimSubTnLst(shapeId, anim.afterAnimationColor));
|
|
15625
|
+
return;
|
|
15626
|
+
}
|
|
15627
|
+
if (anim.afterAnimation === "hideAfterAnimation") {
|
|
15628
|
+
const entranceId = effectCTn["@_id"] !== void 0 ? String(effectCTn["@_id"]) : "0";
|
|
15629
|
+
appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "sameClick", entranceId));
|
|
15630
|
+
return;
|
|
15631
|
+
}
|
|
15632
|
+
if (anim.afterAnimation === "hideOnNextClick") {
|
|
15633
|
+
appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "nextClick"));
|
|
15634
|
+
}
|
|
15635
|
+
}
|
|
15636
|
+
function appendAfterAnimationBehavior(effect, addition) {
|
|
15637
|
+
const sub = isXmlObject3(effect["p:subTnLst"]) ? effect["p:subTnLst"] : {};
|
|
15638
|
+
for (const [key2, value] of Object.entries(addition)) {
|
|
15639
|
+
const nodes = [...ensureArray4(sub[key2]), ...ensureArray4(value)];
|
|
15640
|
+
sub[key2] = nodes.length === 1 ? nodes[0] : nodes;
|
|
15641
|
+
}
|
|
15642
|
+
effect["p:subTnLst"] = sub;
|
|
15643
|
+
}
|
|
15644
|
+
function buildDimSubTnLst(shapeId, colorHex) {
|
|
15645
|
+
const hex3 = colorHex.replace(/^#/u, "").toUpperCase();
|
|
15646
|
+
return {
|
|
15647
|
+
"p:animClr": {
|
|
15648
|
+
"@_clrSpc": "rgb",
|
|
15649
|
+
"@_dir": "cw",
|
|
15650
|
+
"p:cBhvr": {
|
|
15651
|
+
"@_override": "childStyle",
|
|
15652
|
+
"p:cTn": {
|
|
15653
|
+
"@_dur": "1",
|
|
15654
|
+
"@_fill": "hold",
|
|
15655
|
+
"@_display": "0",
|
|
15656
|
+
"@_masterRel": "nextClick",
|
|
15657
|
+
"@_afterEffect": "1"
|
|
15658
|
+
},
|
|
15659
|
+
"p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
|
|
15660
|
+
"p:attrNameLst": { "p:attrName": "ppt_c" }
|
|
15661
|
+
},
|
|
15662
|
+
"p:to": { "a:srgbClr": { "@_val": hex3 } }
|
|
15663
|
+
}
|
|
15664
|
+
};
|
|
15665
|
+
}
|
|
15666
|
+
function buildHideSubTnLst(shapeId, masterRel, entranceId) {
|
|
15667
|
+
const cTn = {
|
|
15668
|
+
"@_dur": "1",
|
|
15669
|
+
"@_fill": "hold",
|
|
15670
|
+
"@_display": "0",
|
|
15671
|
+
"@_masterRel": masterRel,
|
|
15672
|
+
"@_afterEffect": "1"
|
|
15673
|
+
};
|
|
15674
|
+
if (masterRel === "sameClick") {
|
|
15675
|
+
cTn["p:stCondLst"] = {
|
|
15676
|
+
"p:cond": {
|
|
15677
|
+
"@_evt": "end",
|
|
15678
|
+
"@_delay": "0",
|
|
15679
|
+
"p:tn": { "@_val": entranceId ?? "0" }
|
|
15680
|
+
}
|
|
15681
|
+
};
|
|
15682
|
+
}
|
|
15683
|
+
return {
|
|
15684
|
+
"p:set": {
|
|
15685
|
+
"p:cBhvr": {
|
|
15686
|
+
"@_override": "childStyle",
|
|
15687
|
+
"p:cTn": cTn,
|
|
15688
|
+
"p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
|
|
15689
|
+
"p:attrNameLst": { "p:attrName": "style.visibility" }
|
|
15690
|
+
},
|
|
15691
|
+
"p:to": { "p:strVal": { "@_val": "hidden" } }
|
|
15692
|
+
}
|
|
15693
|
+
};
|
|
15694
|
+
}
|
|
15695
|
+
|
|
15696
|
+
// pptx/core/services/editor-animation-after-effect.ts
|
|
15697
|
+
function mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming) {
|
|
15698
|
+
for (const native of nativeAnimations ?? []) {
|
|
15699
|
+
const existing = native.targetId ? animationFor(animations, native.targetId) : void 0;
|
|
15700
|
+
const action = native.afterAnimationAction ?? (existing?.afterAnimation !== void 0 ? "none" : void 0);
|
|
15701
|
+
if ((nativeAnimations ?? []).filter(
|
|
15702
|
+
(other) => other.targetId === native.targetId && ["entr", "emph"].includes(other.presetClass ?? "")
|
|
15703
|
+
).length !== 1)
|
|
15704
|
+
continue;
|
|
15705
|
+
if (!native.targetId || !action || !["entr", "emph"].includes(native.presetClass ?? "") || native.textTarget)
|
|
15706
|
+
continue;
|
|
15707
|
+
if (native.target && (native.target.type !== "shape" || native.target.backgroundOnly || native.target.subShapeId || native.target.graphicElement || native.target.oleChartElement))
|
|
15708
|
+
continue;
|
|
15709
|
+
try {
|
|
15710
|
+
if (rawTiming && native.target?.type === "shape" && indexEffectNodes(rawTiming).filter(
|
|
15711
|
+
(ref) => ref.spid === (native.target?.type === "shape" ? native.target.shapeId : void 0) && ["entr", "emph"].includes(ref.presetClass)
|
|
15712
|
+
).length !== 1)
|
|
15713
|
+
continue;
|
|
15714
|
+
const effect = rawTiming ? indexEffectNodes(rawTiming).find(
|
|
15715
|
+
(ref) => String(ref.cTn["@_id"]) === String(native.nodeId) && native.target?.type === "shape" && ref.spid === native.target.shapeId
|
|
15716
|
+
) : void 0;
|
|
15717
|
+
if (rawTiming && !effect) continue;
|
|
15718
|
+
assertAfterAnimationClearSupported(
|
|
15719
|
+
effect?.cTn ?? { "p:subTnLst": native.cTnAttributes?.["p:subTnLst"] }
|
|
15720
|
+
);
|
|
15721
|
+
} catch {
|
|
15722
|
+
continue;
|
|
15723
|
+
}
|
|
15724
|
+
let entry2 = animationFor(animations, native.targetId);
|
|
15725
|
+
if (!entry2) {
|
|
15726
|
+
entry2 = { elementId: native.targetId };
|
|
15727
|
+
animations.push(entry2);
|
|
15728
|
+
}
|
|
15729
|
+
if (entry2.nativeAfterAnimation !== void 0) continue;
|
|
15730
|
+
entry2.nativeAfterAnimation = action;
|
|
15731
|
+
entry2.nativeAfterAnimationColor = native.afterAnimationColor;
|
|
15732
|
+
}
|
|
15733
|
+
}
|
|
15734
|
+
function isNativeAfterAnimationFallback(entry2) {
|
|
15735
|
+
return entry2.nativeAfterAnimation !== void 0 && Object.entries(entry2).every(
|
|
15736
|
+
([key2, value]) => value === void 0 || [
|
|
15737
|
+
"elementId",
|
|
15738
|
+
"nativeAfterAnimation",
|
|
15739
|
+
"nativeAfterAnimationColor",
|
|
15740
|
+
"soundRId",
|
|
15741
|
+
"soundPath",
|
|
15742
|
+
"soundName",
|
|
15743
|
+
"stopSound"
|
|
15744
|
+
].includes(key2)
|
|
15745
|
+
);
|
|
15746
|
+
}
|
|
15747
|
+
|
|
15468
15748
|
// pptx/core/services/slide-name.ts
|
|
15469
15749
|
function asNode3(value) {
|
|
15470
15750
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -15966,6 +16246,8 @@ var PptxSlideLoaderService = class {
|
|
|
15966
16246
|
}
|
|
15967
16247
|
});
|
|
15968
16248
|
reconcileAnimationTargets(elements2, nativeAnimations, animations, animationTimelineAnchors);
|
|
16249
|
+
animations ??= [];
|
|
16250
|
+
mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming);
|
|
15969
16251
|
mergeNativeSoundIntoEditorAnimations(nativeAnimations, animations);
|
|
15970
16252
|
mergeNativeBuildTemplatesIntoEditorAnimations(nativeAnimations, animations);
|
|
15971
16253
|
applyHiddenFlagFromRawXml(elements2);
|
|
@@ -16391,7 +16673,7 @@ var PptxEditorAnimationService = class {
|
|
|
16391
16673
|
* @param animations - Editor animations to serialize.
|
|
16392
16674
|
*/
|
|
16393
16675
|
applyEditorAnimations(slideNode, animations) {
|
|
16394
|
-
const sequenced =
|
|
16676
|
+
const sequenced = animations.filter((entry2) => !isNativeAfterAnimationFallback(entry2)).sort((left, right) => sortOrder(left) - sortOrder(right));
|
|
16395
16677
|
const sanitizedAnimations = sequenced.map((animation) => {
|
|
16396
16678
|
const elementId = String(animation.elementId || "").trim();
|
|
16397
16679
|
if (elementId.length === 0) {
|
|
@@ -16405,7 +16687,7 @@ var PptxEditorAnimationService = class {
|
|
|
16405
16687
|
const orderIsTreeDerived = animation.orderFromTimeline !== void 0 && animation.order === animation.orderFromTimeline;
|
|
16406
16688
|
const order = typeof animation.order === "number" && Number.isFinite(animation.order) && !orderIsTreeDerived ? Math.round(animation.order) : void 0;
|
|
16407
16689
|
const repeatCount = typeof animation.repeatCount === "number" && Number.isFinite(animation.repeatCount) && animation.repeatCount > 0 ? animation.repeatCount : void 0;
|
|
16408
|
-
if (!entrance && !exit2 && !emphasis && !animation.motionPath) {
|
|
16690
|
+
if (!entrance && !exit2 && !emphasis && !animation.motionPath && animation.afterAnimation === void 0) {
|
|
16409
16691
|
return null;
|
|
16410
16692
|
}
|
|
16411
16693
|
return {
|
|
@@ -16796,109 +17078,6 @@ function collectMediaNodes(node, animations) {
|
|
|
16796
17078
|
}
|
|
16797
17079
|
}
|
|
16798
17080
|
|
|
16799
|
-
// pptx/core/services/animation-effect-filter-parsing.ts
|
|
16800
|
-
var FILTER_TOKEN_RE = /^([A-Za-z]+)(?:\(([^)]*)\))?$/;
|
|
16801
|
-
function parseFilterToken(raw) {
|
|
16802
|
-
const trimmed2 = raw.trim();
|
|
16803
|
-
if (!trimmed2) {
|
|
16804
|
-
return void 0;
|
|
16805
|
-
}
|
|
16806
|
-
const match = FILTER_TOKEN_RE.exec(trimmed2);
|
|
16807
|
-
if (!match) {
|
|
16808
|
-
return void 0;
|
|
16809
|
-
}
|
|
16810
|
-
const family = match[1].toLowerCase();
|
|
16811
|
-
const subtypeToken = match[2];
|
|
16812
|
-
const subtype = subtypeToken !== void 0 && subtypeToken !== "" ? subtypeToken : void 0;
|
|
16813
|
-
return { family, subtype };
|
|
16814
|
-
}
|
|
16815
|
-
function parseAnimEffectFilter(childTnList) {
|
|
16816
|
-
if (!childTnList) {
|
|
16817
|
-
return void 0;
|
|
16818
|
-
}
|
|
16819
|
-
const rawAnimEffect = childTnList["p:animEffect"];
|
|
16820
|
-
const animEffect = Array.isArray(rawAnimEffect) ? rawAnimEffect[0] : rawAnimEffect;
|
|
16821
|
-
if (!animEffect || typeof animEffect !== "object") {
|
|
16822
|
-
return void 0;
|
|
16823
|
-
}
|
|
16824
|
-
const node = animEffect;
|
|
16825
|
-
const filterAttr = node["@_filter"];
|
|
16826
|
-
if (filterAttr === void 0 || filterAttr === null) {
|
|
16827
|
-
return void 0;
|
|
16828
|
-
}
|
|
16829
|
-
const raw = String(filterAttr);
|
|
16830
|
-
const firstToken = raw.split(";")[0] ?? "";
|
|
16831
|
-
const parsed = parseFilterToken(firstToken);
|
|
16832
|
-
if (!parsed) {
|
|
16833
|
-
return void 0;
|
|
16834
|
-
}
|
|
16835
|
-
const transitionAttr = node["@_transition"];
|
|
16836
|
-
const transition = transitionAttr === "in" || transitionAttr === "out" || transitionAttr === "none" ? transitionAttr : void 0;
|
|
16837
|
-
return {
|
|
16838
|
-
family: parsed.family,
|
|
16839
|
-
subtype: parsed.subtype,
|
|
16840
|
-
transition,
|
|
16841
|
-
raw
|
|
16842
|
-
};
|
|
16843
|
-
}
|
|
16844
|
-
|
|
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
17081
|
// pptx/core/services/native-animation-cbhvr-attrs.ts
|
|
16903
17082
|
var ADDITIVE_VALUES = /* @__PURE__ */ new Set(["base", "sum", "repl", "mult", "none"]);
|
|
16904
17083
|
var ACCUMULATE_VALUES = /* @__PURE__ */ new Set(["none", "always"]);
|
|
@@ -16969,51 +17148,6 @@ function extractChildCalcMode(childTnList) {
|
|
|
16969
17148
|
return void 0;
|
|
16970
17149
|
}
|
|
16971
17150
|
|
|
16972
|
-
// pptx/core/services/native-animation-attribute-components.ts
|
|
16973
|
-
function extractBounceEndFraction(raw) {
|
|
16974
|
-
if (raw === void 0) {
|
|
16975
|
-
return void 0;
|
|
16976
|
-
}
|
|
16977
|
-
const parsed = Number(raw);
|
|
16978
|
-
if (!Number.isFinite(parsed)) {
|
|
16979
|
-
return void 0;
|
|
16980
|
-
}
|
|
16981
|
-
return Math.max(0, Math.min(1, parsed / 1e5));
|
|
16982
|
-
}
|
|
16983
|
-
function extractAttributeAnimations(childTnList) {
|
|
16984
|
-
if (!childTnList) {
|
|
16985
|
-
return void 0;
|
|
16986
|
-
}
|
|
16987
|
-
const components = [];
|
|
16988
|
-
for (const node of ensureArray4(childTnList["p:anim"])) {
|
|
16989
|
-
const attrName = extractAttrNameFromCBhvr(node["p:cBhvr"]);
|
|
16990
|
-
const keyframes = extractKeyframes(node);
|
|
16991
|
-
const from = node["@_from"] !== void 0 ? String(node["@_from"]) : void 0;
|
|
16992
|
-
const to = node["@_to"] !== void 0 ? String(node["@_to"]) : void 0;
|
|
16993
|
-
const by = node["@_by"] !== void 0 ? String(node["@_by"]) : void 0;
|
|
16994
|
-
const hasKeyframes = Boolean(keyframes && keyframes.length > 0);
|
|
16995
|
-
if (!attrName || !hasKeyframes && from === void 0 && to === void 0 && by === void 0) {
|
|
16996
|
-
continue;
|
|
16997
|
-
}
|
|
16998
|
-
const behavior = node["p:cBhvr"];
|
|
16999
|
-
const cTn = behavior?.["p:cTn"];
|
|
17000
|
-
const calcMode = normalizeCalcMode(node["@_calcmode"]);
|
|
17001
|
-
const bounceEnd = extractBounceEndFraction(node["@_p14:bounceEnd"]);
|
|
17002
|
-
components.push({
|
|
17003
|
-
attrName,
|
|
17004
|
-
keyframes: keyframes ?? [],
|
|
17005
|
-
durationMs: readTimingAttr(cTn?.["@_dur"]),
|
|
17006
|
-
delayMs: cTn ? extractStartConditionDelayMs(cTn) : void 0,
|
|
17007
|
-
...calcMode ? { calcMode } : {},
|
|
17008
|
-
...from !== void 0 ? { from } : {},
|
|
17009
|
-
...to !== void 0 ? { to } : {},
|
|
17010
|
-
...by !== void 0 ? { by } : {},
|
|
17011
|
-
...bounceEnd !== void 0 ? { bounceEnd } : {}
|
|
17012
|
-
});
|
|
17013
|
-
}
|
|
17014
|
-
return components.length > 0 ? components : void 0;
|
|
17015
|
-
}
|
|
17016
|
-
|
|
17017
17151
|
// pptx/core/services/native-animation-behaviors.ts
|
|
17018
17152
|
var BEHAVIOR_TAGS = [
|
|
17019
17153
|
"p:set",
|
|
@@ -17041,6 +17175,16 @@ function readTiming(cTn) {
|
|
|
17041
17175
|
return {};
|
|
17042
17176
|
}
|
|
17043
17177
|
const timing = {};
|
|
17178
|
+
const starts = ensureArray4(cTn["p:stCondLst"]?.["p:cond"]);
|
|
17179
|
+
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(
|
|
17180
|
+
(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"
|
|
17181
|
+
)) {
|
|
17182
|
+
timing.unsupportedSetTiming = true;
|
|
17183
|
+
}
|
|
17184
|
+
const fill = cTn["@_fill"];
|
|
17185
|
+
if (fill === "remove" || fill === "freeze" || fill === "hold" || fill === "transition") {
|
|
17186
|
+
timing.fill = fill;
|
|
17187
|
+
}
|
|
17044
17188
|
const durationMs = readTimingAttr(cTn["@_dur"]);
|
|
17045
17189
|
if (durationMs !== void 0) {
|
|
17046
17190
|
timing.durationMs = durationMs;
|
|
@@ -17197,6 +17341,188 @@ function extractBehaviors(childTnList) {
|
|
|
17197
17341
|
return behaviors.length > 0 ? behaviors : void 0;
|
|
17198
17342
|
}
|
|
17199
17343
|
|
|
17344
|
+
// pptx/core/services/native-animation-visibility-timing.ts
|
|
17345
|
+
var neutralTiming = (node) => [
|
|
17346
|
+
"@_repeatDur",
|
|
17347
|
+
"@_tmFilter",
|
|
17348
|
+
"@_endSync",
|
|
17349
|
+
"@_evtFilter",
|
|
17350
|
+
"@_display",
|
|
17351
|
+
"@_masterRel",
|
|
17352
|
+
"@_syncBehavior",
|
|
17353
|
+
"@_nodePh",
|
|
17354
|
+
"@_progress",
|
|
17355
|
+
"@_p14:presetBounceEnd",
|
|
17356
|
+
"p:endCondLst",
|
|
17357
|
+
"p:endSync",
|
|
17358
|
+
"p:iterate"
|
|
17359
|
+
].every((key2) => node[key2] === void 0) && (node["@_repeatCount"] === void 0 || String(node["@_repeatCount"]) === "1000") && (node["@_autoRev"] === void 0 || ["0", "false"].includes(String(node["@_autoRev"]))) && (node["@_spd"] === void 0 || String(node["@_spd"]) === "100000") && (node["@_accel"] === void 0 || String(node["@_accel"]) === "0") && (node["@_decel"] === void 0 || String(node["@_decel"]) === "0");
|
|
17360
|
+
function hasNativeVisibilitySet(node) {
|
|
17361
|
+
if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0") return false;
|
|
17362
|
+
const children5 = node["p:childTnLst"];
|
|
17363
|
+
if (!isXmlObject3(children5)) return false;
|
|
17364
|
+
return ensureArray4(children5["p:set"]).some((set) => {
|
|
17365
|
+
const common = set["p:cBhvr"];
|
|
17366
|
+
const list = isXmlObject3(common) ? common["p:attrNameLst"] : void 0;
|
|
17367
|
+
const names = isXmlObject3(list) ? list["p:attrName"] : void 0;
|
|
17368
|
+
return (Array.isArray(names) ? names : [names]).some(
|
|
17369
|
+
(name) => String(isXmlObject3(name) ? name["#text"] : name).trim().toLowerCase() === "style.visibility"
|
|
17370
|
+
);
|
|
17371
|
+
});
|
|
17372
|
+
}
|
|
17373
|
+
function simpleStarts(node, clickGate = false) {
|
|
17374
|
+
const list = node["p:stCondLst"];
|
|
17375
|
+
if (list === void 0) return true;
|
|
17376
|
+
if (!isXmlObject3(list) || Object.keys(list).some((key2) => key2 !== "p:cond")) return false;
|
|
17377
|
+
const conditions = ensureArray4(list["p:cond"]);
|
|
17378
|
+
return conditions.length === 1 && conditions.every(
|
|
17379
|
+
(condition) => Object.keys(condition).every((key2) => key2 === "@_delay") && (condition["@_delay"] === void 0 || /^\d+$/u.test(String(condition["@_delay"])) && Number.isSafeInteger(Number(condition["@_delay"])) && Number(condition["@_delay"]) <= 2147483647 || clickGate && condition["@_delay"] === "indefinite")
|
|
17380
|
+
);
|
|
17381
|
+
}
|
|
17382
|
+
function unsupportedVisibilityContainerTiming(node) {
|
|
17383
|
+
if (node["@_presetClass"] !== void 0) return false;
|
|
17384
|
+
const structuralRoot = ["tmRoot", "mainSeq"].includes(String(node["@_nodeType"] ?? ""));
|
|
17385
|
+
return !neutralTiming(node) || !simpleStarts(node, true) || ensureArray4(isXmlObject3(node["p:stCondLst"]) ? node["p:stCondLst"]["p:cond"] : void 0).some(
|
|
17386
|
+
(condition) => /^\d+$/u.test(String(condition["@_delay"])) && Number(condition["@_delay"]) > 0
|
|
17387
|
+
) || node["@_dur"] !== void 0 && !(structuralRoot && node["@_dur"] === "indefinite") || node["@_fill"] !== void 0 && node["@_fill"] !== "hold" || node["p:subTnLst"] !== void 0;
|
|
17388
|
+
}
|
|
17389
|
+
function extractVisibilitySetTiming(node) {
|
|
17390
|
+
if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0" || String(node["@_presetSubtype"] ?? "0") !== "0" || node["@_dur"] !== void 0 || node["@_fill"] !== "hold" || !neutralTiming(node) || !simpleStarts(node))
|
|
17391
|
+
return void 0;
|
|
17392
|
+
const children5 = node["p:childTnLst"];
|
|
17393
|
+
if (!isXmlObject3(children5) || Object.keys(children5).length !== 1 || !children5["p:set"])
|
|
17394
|
+
return void 0;
|
|
17395
|
+
const sets = ensureArray4(children5["p:set"]);
|
|
17396
|
+
if (sets.length !== 1) return void 0;
|
|
17397
|
+
if (Object.keys(sets[0]).some((key2) => !["p:cBhvr", "p:to"].includes(key2))) return void 0;
|
|
17398
|
+
const to = sets[0]["p:to"];
|
|
17399
|
+
if (!isXmlObject3(to) || Object.keys(to).length !== 1 || !isXmlObject3(to["p:strVal"]) || Object.keys(to["p:strVal"]).some((key2) => key2 !== "@_val") || to["p:strVal"]["@_val"] !== "visible")
|
|
17400
|
+
return void 0;
|
|
17401
|
+
const common = sets[0]["p:cBhvr"];
|
|
17402
|
+
if (!isXmlObject3(common) || Object.keys(common).some(
|
|
17403
|
+
(key2) => !["p:cTn", "p:tgtEl", "p:attrNameLst", "@_additive"].includes(key2)
|
|
17404
|
+
) || common["@_additive"] !== void 0 && !["base", "repl", "none"].includes(String(common["@_additive"])))
|
|
17405
|
+
return void 0;
|
|
17406
|
+
const target = common["p:tgtEl"];
|
|
17407
|
+
if (!isXmlObject3(target) || Object.keys(target).length !== 1 || !isXmlObject3(target["p:spTgt"]) || Object.keys(target["p:spTgt"]).some((key2) => key2 !== "@_spid") || !/^\d+$/u.test(String(target["p:spTgt"]["@_spid"])))
|
|
17408
|
+
return void 0;
|
|
17409
|
+
const child14 = common["p:cTn"];
|
|
17410
|
+
if (!isXmlObject3(child14) || !neutralTiming(child14) || !simpleStarts(child14) || String(child14["@_dur"]) !== "1" || child14["@_fill"] !== "hold")
|
|
17411
|
+
return void 0;
|
|
17412
|
+
const behavior = extractBehaviors(children5)?.[0];
|
|
17413
|
+
if (!behavior || behavior.kind !== "set" || behavior.value !== "visible" || behavior.attrNames.length !== 1 || behavior.attrNames[0] !== "style.visibility" || behavior.timing.unsupportedSetTiming)
|
|
17414
|
+
return void 0;
|
|
17415
|
+
try {
|
|
17416
|
+
assertAfterAnimationClearSupported(node);
|
|
17417
|
+
} catch {
|
|
17418
|
+
return void 0;
|
|
17419
|
+
}
|
|
17420
|
+
const sub = node["p:subTnLst"];
|
|
17421
|
+
if (sub !== void 0) {
|
|
17422
|
+
if (!isXmlObject3(sub)) return void 0;
|
|
17423
|
+
for (const [key2, raw] of Object.entries(sub)) {
|
|
17424
|
+
for (const value of ensureArray4(raw)) {
|
|
17425
|
+
if (!extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: value } }))
|
|
17426
|
+
return void 0;
|
|
17427
|
+
}
|
|
17428
|
+
}
|
|
17429
|
+
}
|
|
17430
|
+
const delayMs = behavior.timing.delayMs ?? 0;
|
|
17431
|
+
if (!Number.isSafeInteger(delayMs) || delayMs < 0 || delayMs >= 2147483647) return void 0;
|
|
17432
|
+
return { delayMs, durationMs: 1 };
|
|
17433
|
+
}
|
|
17434
|
+
|
|
17435
|
+
// pptx/core/services/animation-effect-filter-parsing.ts
|
|
17436
|
+
var FILTER_TOKEN_RE = /^([A-Za-z]+)(?:\(([^)]*)\))?$/;
|
|
17437
|
+
function parseFilterToken(raw) {
|
|
17438
|
+
const trimmed2 = raw.trim();
|
|
17439
|
+
if (!trimmed2) {
|
|
17440
|
+
return void 0;
|
|
17441
|
+
}
|
|
17442
|
+
const match = FILTER_TOKEN_RE.exec(trimmed2);
|
|
17443
|
+
if (!match) {
|
|
17444
|
+
return void 0;
|
|
17445
|
+
}
|
|
17446
|
+
const family = match[1].toLowerCase();
|
|
17447
|
+
const subtypeToken = match[2];
|
|
17448
|
+
const subtype = subtypeToken !== void 0 && subtypeToken !== "" ? subtypeToken : void 0;
|
|
17449
|
+
return { family, subtype };
|
|
17450
|
+
}
|
|
17451
|
+
function parseAnimEffectFilter(childTnList) {
|
|
17452
|
+
if (!childTnList) {
|
|
17453
|
+
return void 0;
|
|
17454
|
+
}
|
|
17455
|
+
const rawAnimEffect = childTnList["p:animEffect"];
|
|
17456
|
+
const animEffect = Array.isArray(rawAnimEffect) ? rawAnimEffect[0] : rawAnimEffect;
|
|
17457
|
+
if (!animEffect || typeof animEffect !== "object") {
|
|
17458
|
+
return void 0;
|
|
17459
|
+
}
|
|
17460
|
+
const node = animEffect;
|
|
17461
|
+
const filterAttr = node["@_filter"];
|
|
17462
|
+
if (filterAttr === void 0 || filterAttr === null) {
|
|
17463
|
+
return void 0;
|
|
17464
|
+
}
|
|
17465
|
+
const raw = String(filterAttr);
|
|
17466
|
+
const firstToken = raw.split(";")[0] ?? "";
|
|
17467
|
+
const parsed = parseFilterToken(firstToken);
|
|
17468
|
+
if (!parsed) {
|
|
17469
|
+
return void 0;
|
|
17470
|
+
}
|
|
17471
|
+
const transitionAttr = node["@_transition"];
|
|
17472
|
+
const transition = transitionAttr === "in" || transitionAttr === "out" || transitionAttr === "none" ? transitionAttr : void 0;
|
|
17473
|
+
return {
|
|
17474
|
+
family: parsed.family,
|
|
17475
|
+
subtype: parsed.subtype,
|
|
17476
|
+
transition,
|
|
17477
|
+
raw
|
|
17478
|
+
};
|
|
17479
|
+
}
|
|
17480
|
+
|
|
17481
|
+
// pptx/core/services/native-animation-attribute-components.ts
|
|
17482
|
+
function extractBounceEndFraction(raw) {
|
|
17483
|
+
if (raw === void 0) {
|
|
17484
|
+
return void 0;
|
|
17485
|
+
}
|
|
17486
|
+
const parsed = Number(raw);
|
|
17487
|
+
if (!Number.isFinite(parsed)) {
|
|
17488
|
+
return void 0;
|
|
17489
|
+
}
|
|
17490
|
+
return Math.max(0, Math.min(1, parsed / 1e5));
|
|
17491
|
+
}
|
|
17492
|
+
function extractAttributeAnimations(childTnList) {
|
|
17493
|
+
if (!childTnList) {
|
|
17494
|
+
return void 0;
|
|
17495
|
+
}
|
|
17496
|
+
const components = [];
|
|
17497
|
+
for (const node of ensureArray4(childTnList["p:anim"])) {
|
|
17498
|
+
const attrName = extractAttrNameFromCBhvr(node["p:cBhvr"]);
|
|
17499
|
+
const keyframes = extractKeyframes(node);
|
|
17500
|
+
const from = node["@_from"] !== void 0 ? String(node["@_from"]) : void 0;
|
|
17501
|
+
const to = node["@_to"] !== void 0 ? String(node["@_to"]) : void 0;
|
|
17502
|
+
const by = node["@_by"] !== void 0 ? String(node["@_by"]) : void 0;
|
|
17503
|
+
const hasKeyframes = Boolean(keyframes && keyframes.length > 0);
|
|
17504
|
+
if (!attrName || !hasKeyframes && from === void 0 && to === void 0 && by === void 0) {
|
|
17505
|
+
continue;
|
|
17506
|
+
}
|
|
17507
|
+
const behavior = node["p:cBhvr"];
|
|
17508
|
+
const cTn = behavior?.["p:cTn"];
|
|
17509
|
+
const calcMode = normalizeCalcMode(node["@_calcmode"]);
|
|
17510
|
+
const bounceEnd = extractBounceEndFraction(node["@_p14:bounceEnd"]);
|
|
17511
|
+
components.push({
|
|
17512
|
+
attrName,
|
|
17513
|
+
keyframes: keyframes ?? [],
|
|
17514
|
+
durationMs: readTimingAttr(cTn?.["@_dur"]),
|
|
17515
|
+
delayMs: cTn ? extractStartConditionDelayMs(cTn) : void 0,
|
|
17516
|
+
...calcMode ? { calcMode } : {},
|
|
17517
|
+
...from !== void 0 ? { from } : {},
|
|
17518
|
+
...to !== void 0 ? { to } : {},
|
|
17519
|
+
...by !== void 0 ? { by } : {},
|
|
17520
|
+
...bounceEnd !== void 0 ? { bounceEnd } : {}
|
|
17521
|
+
});
|
|
17522
|
+
}
|
|
17523
|
+
return components.length > 0 ? components : void 0;
|
|
17524
|
+
}
|
|
17525
|
+
|
|
17200
17526
|
// pptx/core/services/native-animation-child-timing.ts
|
|
17201
17527
|
var PRIMARY_BEHAVIOUR_FAMILIES = [
|
|
17202
17528
|
["p:animMotion", "p:animRot", "p:animScale"],
|
|
@@ -17313,12 +17639,13 @@ function resolveNodeTrigger(cTn, currentTrigger) {
|
|
|
17313
17639
|
}
|
|
17314
17640
|
return trigger;
|
|
17315
17641
|
}
|
|
17316
|
-
function buildTimingNodeAnimation(cTn, trigger, group) {
|
|
17642
|
+
function buildTimingNodeAnimation(cTn, trigger, group, unsupportedVisibilityAncestor = false) {
|
|
17317
17643
|
const presetClass = cTn["@_presetClass"];
|
|
17318
|
-
const presetId = cTn["@_presetID"] ? Number.parseInt(String(cTn["@_presetID"]), 10) : void 0;
|
|
17644
|
+
const presetId = cTn["@_presetID"] !== void 0 ? Number.parseInt(String(cTn["@_presetID"]), 10) : void 0;
|
|
17319
17645
|
const presetSubtype = cTn["@_presetSubtype"] !== void 0 ? Number.parseInt(String(cTn["@_presetSubtype"]), 10) : void 0;
|
|
17320
17646
|
const childAutoReverseTiming = extractChildAutoReverseTiming(cTn, ensureArray4);
|
|
17321
|
-
const
|
|
17647
|
+
const visibilitySetTiming = !unsupportedVisibilityAncestor && group.seqConcurrent === true && group.seqNextAction === "seek" && ["onClick", "withPrevious"].includes(trigger) ? extractVisibilitySetTiming(cTn) : void 0;
|
|
17648
|
+
const durationMs = readTimingAttr(cTn["@_dur"]) ?? childAutoReverseTiming?.durationMs ?? extractChildBehaviourDurationMs(cTn, ensureArray4) ?? (visibilitySetTiming ? visibilitySetTiming.delayMs + visibilitySetTiming.durationMs : void 0);
|
|
17322
17649
|
const delayMs = readTimingAttr(cTn["@_delay"]) ?? extractStartConditionDelayMs(cTn);
|
|
17323
17650
|
const accel = parseTimingPercentFraction(cTn["@_accel"]);
|
|
17324
17651
|
const decel = parseTimingPercentFraction(cTn["@_decel"]);
|
|
@@ -17369,6 +17696,8 @@ function buildTimingNodeAnimation(cTn, trigger, group) {
|
|
|
17369
17696
|
presetId,
|
|
17370
17697
|
presetSubtype,
|
|
17371
17698
|
durationMs,
|
|
17699
|
+
visibilitySetTiming,
|
|
17700
|
+
unsupportedVisibilitySet: hasNativeVisibilitySet(cTn) && !visibilitySetTiming || void 0,
|
|
17372
17701
|
delayMs,
|
|
17373
17702
|
accel,
|
|
17374
17703
|
decel,
|
|
@@ -17417,6 +17746,7 @@ function buildTimingNodeAnimation(cTn, trigger, group) {
|
|
|
17417
17746
|
commandString: cmdInfo.commandString,
|
|
17418
17747
|
textTarget: textTarget ?? void 0,
|
|
17419
17748
|
cTnAttributes: roundTripAttrs,
|
|
17749
|
+
unsupportedOpacitySetTiming: cTn["@_dur"] === "indefinite" || cTn["p:endSync"] !== void 0 || void 0,
|
|
17420
17750
|
afterEffect: afterEffectFlag,
|
|
17421
17751
|
afterAnimationAction: parsedAfterAnimation?.action,
|
|
17422
17752
|
afterAnimationColor: parsedAfterAnimation?.color,
|
|
@@ -17452,17 +17782,18 @@ function extractTextTargetFromCTn(cTn) {
|
|
|
17452
17782
|
}
|
|
17453
17783
|
|
|
17454
17784
|
// pptx/core/services/native-animation-timing-walk.ts
|
|
17455
|
-
function walkTimingTree(node, animations, currentTrigger, group, ctx) {
|
|
17785
|
+
function walkTimingTree(node, animations, currentTrigger, group, ctx, unsupportedVisibilityAncestor = false) {
|
|
17456
17786
|
if (!node) {
|
|
17457
17787
|
return;
|
|
17458
17788
|
}
|
|
17459
17789
|
const cTn = node["p:cTn"];
|
|
17460
17790
|
if (cTn) {
|
|
17461
17791
|
const trigger = resolveNodeTrigger(cTn, currentTrigger);
|
|
17462
|
-
const animation = buildTimingNodeAnimation(cTn, trigger, group);
|
|
17792
|
+
const animation = buildTimingNodeAnimation(cTn, trigger, group, unsupportedVisibilityAncestor);
|
|
17463
17793
|
if (animation) {
|
|
17464
17794
|
animations.push(animation);
|
|
17465
17795
|
}
|
|
17796
|
+
const unsupportedChildVisibility = unsupportedVisibilityAncestor || unsupportedVisibilityContainerTiming(cTn);
|
|
17466
17797
|
const childTnList = cTn["p:childTnLst"];
|
|
17467
17798
|
if (childTnList) {
|
|
17468
17799
|
const isClickLevel = isMainSequence(cTn);
|
|
@@ -17482,7 +17813,8 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
|
|
|
17482
17813
|
id: String(mainSequenceId)
|
|
17483
17814
|
} : void 0
|
|
17484
17815
|
}),
|
|
17485
|
-
ctx
|
|
17816
|
+
ctx,
|
|
17817
|
+
unsupportedChildVisibility
|
|
17486
17818
|
);
|
|
17487
17819
|
}
|
|
17488
17820
|
for (const sequence of sequences) {
|
|
@@ -17490,11 +17822,18 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
|
|
|
17490
17822
|
continue;
|
|
17491
17823
|
}
|
|
17492
17824
|
const seqAttrs = extractSeqAttrs(sequence);
|
|
17493
|
-
walkTimingTree(
|
|
17825
|
+
walkTimingTree(
|
|
17826
|
+
sequence,
|
|
17827
|
+
animations,
|
|
17828
|
+
trigger,
|
|
17829
|
+
{ ...group, ...seqAttrs },
|
|
17830
|
+
ctx,
|
|
17831
|
+
unsupportedChildVisibility
|
|
17832
|
+
);
|
|
17494
17833
|
}
|
|
17495
17834
|
for (const excl of exclusives) {
|
|
17496
17835
|
const exclAnims = [];
|
|
17497
|
-
walkTimingTree(excl, exclAnims, trigger, group, ctx);
|
|
17836
|
+
walkTimingTree(excl, exclAnims, trigger, group, ctx, true);
|
|
17498
17837
|
const exclGroupId = ctx.allocateExclGroupId();
|
|
17499
17838
|
for (const a of exclAnims) {
|
|
17500
17839
|
a.exclusive = true;
|
|
@@ -17514,7 +17853,8 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
|
|
|
17514
17853
|
childGroupContext(group, parallel["p:cTn"], {
|
|
17515
17854
|
isClickLevelGroup: false
|
|
17516
17855
|
}),
|
|
17517
|
-
ctx
|
|
17856
|
+
ctx,
|
|
17857
|
+
unsupportedVisibilityAncestor
|
|
17518
17858
|
);
|
|
17519
17859
|
}
|
|
17520
17860
|
for (const sequence of directSequences) {
|
|
@@ -17522,7 +17862,14 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
|
|
|
17522
17862
|
continue;
|
|
17523
17863
|
}
|
|
17524
17864
|
const seqAttrs = extractSeqAttrs(sequence);
|
|
17525
|
-
walkTimingTree(
|
|
17865
|
+
walkTimingTree(
|
|
17866
|
+
sequence,
|
|
17867
|
+
animations,
|
|
17868
|
+
currentTrigger,
|
|
17869
|
+
{ ...group, ...seqAttrs },
|
|
17870
|
+
ctx,
|
|
17871
|
+
unsupportedVisibilityAncestor
|
|
17872
|
+
);
|
|
17526
17873
|
}
|
|
17527
17874
|
}
|
|
17528
17875
|
|
|
@@ -18154,75 +18501,6 @@ function isTransitionElementName(localName15) {
|
|
|
18154
18501
|
return P14_TRANSITION_TYPES.has(localName15) || localName15 === "prstTrans" || localName15 === "morph";
|
|
18155
18502
|
}
|
|
18156
18503
|
|
|
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
18504
|
// pptx/core/services/animation-behavior-captures.json
|
|
18227
18505
|
var animation_behavior_captures_default = {
|
|
18228
18506
|
entr: {
|
|
@@ -36263,6 +36541,33 @@ function updateEffectNodeAttributes(cTn, anim, presetClass, shapeId, allocateId)
|
|
|
36263
36541
|
applySoundToEffectCTn(cTn, anim);
|
|
36264
36542
|
}
|
|
36265
36543
|
function surgicallyUpdateTimingTree(rawTiming, animations) {
|
|
36544
|
+
const sourceRefs = indexEffectNodes(rawTiming);
|
|
36545
|
+
for (const entry2 of animations.filter((animation) => animation.afterAnimation !== void 0)) {
|
|
36546
|
+
if (sourceRefs.filter(
|
|
36547
|
+
(ref) => ref.spid === entry2.elementId && ["entr", "emph"].includes(ref.presetClass)
|
|
36548
|
+
).length > 1)
|
|
36549
|
+
throw new Error(
|
|
36550
|
+
"Cannot edit an ambiguous native after-animation target with multiple effects"
|
|
36551
|
+
);
|
|
36552
|
+
}
|
|
36553
|
+
const explicitClears = new Map(
|
|
36554
|
+
animations.filter((a) => a.afterAnimation !== void 0 && !hasAuthoredAnimationEffect(a)).map((a) => [a.elementId, a])
|
|
36555
|
+
);
|
|
36556
|
+
const clearRefs = sourceRefs.filter(
|
|
36557
|
+
(ref) => ref.spid && explicitClears.has(ref.spid) && (ref.presetClass === "entr" || ref.presetClass === "emph")
|
|
36558
|
+
);
|
|
36559
|
+
for (const target of explicitClears.keys()) {
|
|
36560
|
+
if (!clearRefs.some((ref) => ref.spid === target))
|
|
36561
|
+
throw new Error("Cannot edit after-animation without a supported native effect");
|
|
36562
|
+
if (clearRefs.filter((ref) => ref.spid === target).length > 1)
|
|
36563
|
+
throw new Error(
|
|
36564
|
+
"Cannot clear an ambiguous native after-animation target with multiple effects"
|
|
36565
|
+
);
|
|
36566
|
+
}
|
|
36567
|
+
clearRefs.forEach((ref) => assertAfterAnimationClearSupported(ref.cTn));
|
|
36568
|
+
clearRefs.forEach(
|
|
36569
|
+
(ref) => applyAfterAnimationBehavior(ref.cTn, explicitClears.get(ref.spid), ref.spid)
|
|
36570
|
+
);
|
|
36266
36571
|
const desired = collectDesiredEffects(animations);
|
|
36267
36572
|
const previouslyOwned = readOwnedEffectKeys(rawTiming);
|
|
36268
36573
|
if (desired.length === 0 && previouslyOwned.size === 0) {
|
|
@@ -36357,9 +36662,11 @@ var PptxAnimationWriteService = class {
|
|
|
36357
36662
|
const validAnimations = animations.filter((a) => a.entrance || a.exit || a.emphasis || a.motionPath).sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
36358
36663
|
if (existingRawTiming) {
|
|
36359
36664
|
const cloned = typeof structuredClone === "function" ? structuredClone(existingRawTiming) : JSON.parse(JSON.stringify(existingRawTiming));
|
|
36360
|
-
return surgicallyUpdateTimingTree(cloned,
|
|
36665
|
+
return surgicallyUpdateTimingTree(cloned, animations);
|
|
36361
36666
|
}
|
|
36362
36667
|
if (validAnimations.length === 0) {
|
|
36668
|
+
if (animations.some((entry2) => entry2.afterAnimation !== void 0))
|
|
36669
|
+
throw new Error("Cannot edit after-animation without a supported native effect");
|
|
36363
36670
|
return void 0;
|
|
36364
36671
|
}
|
|
36365
36672
|
this.nextId = 1;
|
|
@@ -51008,8 +51315,8 @@ function buildDefRPr(style, existing, resolveColor2) {
|
|
|
51008
51315
|
return rPr;
|
|
51009
51316
|
}
|
|
51010
51317
|
function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveColor2) {
|
|
51011
|
-
const
|
|
51012
|
-
if (!
|
|
51318
|
+
const hasAny2 = style.fontFamily !== void 0 || style.fontSize !== void 0 || style.fontBold !== void 0 || style.fontColor !== void 0;
|
|
51319
|
+
if (!hasAny2) {
|
|
51013
51320
|
return;
|
|
51014
51321
|
}
|
|
51015
51322
|
const titleKey = findKey(axisNode, "title", getLocalName2);
|
|
@@ -52728,8 +53035,8 @@ function applyRotationFlipToRawNode(node, rotation, flipH, flipV) {
|
|
|
52728
53035
|
const spPrKey = findChildKey(node, "spPr");
|
|
52729
53036
|
const container = spPrKey ? node[spPrKey] ?? node : node;
|
|
52730
53037
|
const xfrmKey = findChildKey(container, "xfrm");
|
|
52731
|
-
const
|
|
52732
|
-
if (!xfrmKey && !
|
|
53038
|
+
const hasAny2 = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
|
|
53039
|
+
if (!xfrmKey && !hasAny2) {
|
|
52733
53040
|
return;
|
|
52734
53041
|
}
|
|
52735
53042
|
const xfrm = xfrmKey ? container[xfrmKey] : {};
|
|
@@ -52766,24 +53073,24 @@ function hexVal(hex3) {
|
|
|
52766
53073
|
}
|
|
52767
53074
|
function buildRunProps(para) {
|
|
52768
53075
|
const rPr = {};
|
|
52769
|
-
let
|
|
53076
|
+
let hasAny2 = false;
|
|
52770
53077
|
if (para.fontSize !== void 0) {
|
|
52771
53078
|
rPr["@_sz"] = String(Math.round(para.fontSize * 100));
|
|
52772
|
-
|
|
53079
|
+
hasAny2 = true;
|
|
52773
53080
|
}
|
|
52774
53081
|
if (para.bold) {
|
|
52775
53082
|
rPr["@_b"] = "1";
|
|
52776
|
-
|
|
53083
|
+
hasAny2 = true;
|
|
52777
53084
|
}
|
|
52778
53085
|
if (para.italic) {
|
|
52779
53086
|
rPr["@_i"] = "1";
|
|
52780
|
-
|
|
53087
|
+
hasAny2 = true;
|
|
52781
53088
|
}
|
|
52782
53089
|
if (para.color) {
|
|
52783
53090
|
rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hexVal(para.color) } };
|
|
52784
|
-
|
|
53091
|
+
hasAny2 = true;
|
|
52785
53092
|
}
|
|
52786
|
-
return
|
|
53093
|
+
return hasAny2 ? rPr : void 0;
|
|
52787
53094
|
}
|
|
52788
53095
|
function buildParagraphNode(para) {
|
|
52789
53096
|
const node = {};
|
|
@@ -54691,7 +54998,7 @@ async function blobUrlToDataUrl(blobUrl, fallbackMimeType) {
|
|
|
54691
54998
|
|
|
54692
54999
|
// pptx/core/core/runtime/image-a14-effects-model.ts
|
|
54693
55000
|
function applyA14ExtensionToEffects(effects, a14) {
|
|
54694
|
-
let
|
|
55001
|
+
let hasAny2 = false;
|
|
54695
55002
|
if (a14.artisticEffect !== void 0) {
|
|
54696
55003
|
effects.artisticEffect = a14.artisticEffect;
|
|
54697
55004
|
if (a14.originalImageRelId !== void 0) {
|
|
@@ -54703,15 +55010,15 @@ function applyA14ExtensionToEffects(effects, a14) {
|
|
|
54703
55010
|
if (a14.artisticParams) {
|
|
54704
55011
|
effects.artisticParams = a14.artisticParams;
|
|
54705
55012
|
}
|
|
54706
|
-
|
|
55013
|
+
hasAny2 = true;
|
|
54707
55014
|
}
|
|
54708
55015
|
if (a14.backgroundRemoval) {
|
|
54709
55016
|
effects.backgroundRemoval = a14.backgroundRemoval;
|
|
54710
|
-
|
|
55017
|
+
hasAny2 = true;
|
|
54711
55018
|
}
|
|
54712
55019
|
if (a14.originalImageRelId !== void 0) {
|
|
54713
55020
|
effects.originalImageRelId = a14.originalImageRelId;
|
|
54714
|
-
|
|
55021
|
+
hasAny2 = true;
|
|
54715
55022
|
}
|
|
54716
55023
|
const corrections = {};
|
|
54717
55024
|
if (a14.sharpenSoften) {
|
|
@@ -54734,9 +55041,9 @@ function applyA14ExtensionToEffects(effects, a14) {
|
|
|
54734
55041
|
if (a14.originalImageRelId !== void 0) {
|
|
54735
55042
|
effects.prerenderedCorrections = corrections;
|
|
54736
55043
|
}
|
|
54737
|
-
|
|
55044
|
+
hasAny2 = true;
|
|
54738
55045
|
}
|
|
54739
|
-
return
|
|
55046
|
+
return hasAny2;
|
|
54740
55047
|
}
|
|
54741
55048
|
|
|
54742
55049
|
// pptx/converter/svg-image-effect-values.ts
|
|
@@ -56910,13 +57217,13 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
56910
57217
|
return null;
|
|
56911
57218
|
}
|
|
56912
57219
|
const effects = {};
|
|
56913
|
-
let
|
|
57220
|
+
let hasAny2 = false;
|
|
56914
57221
|
const brightRaw = blip["@_bright"] ?? blip["@_brt"];
|
|
56915
57222
|
if (brightRaw !== null) {
|
|
56916
57223
|
const val = parseInt(String(brightRaw));
|
|
56917
57224
|
if (Number.isFinite(val)) {
|
|
56918
57225
|
effects.brightness = val / 1e3;
|
|
56919
|
-
|
|
57226
|
+
hasAny2 = true;
|
|
56920
57227
|
}
|
|
56921
57228
|
}
|
|
56922
57229
|
const contrastRaw = blip["@_contrast"] ?? blip["@_cont"];
|
|
@@ -56924,7 +57231,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
56924
57231
|
const val = parseInt(String(contrastRaw));
|
|
56925
57232
|
if (Number.isFinite(val)) {
|
|
56926
57233
|
effects.contrast = val / 1e3;
|
|
56927
|
-
|
|
57234
|
+
hasAny2 = true;
|
|
56928
57235
|
}
|
|
56929
57236
|
}
|
|
56930
57237
|
const colorEffects = parseImageColorEffects(
|
|
@@ -56934,12 +57241,12 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
56934
57241
|
);
|
|
56935
57242
|
Object.assign(effects, colorEffects);
|
|
56936
57243
|
if (Object.keys(colorEffects).length > 0) {
|
|
56937
|
-
|
|
57244
|
+
hasAny2 = true;
|
|
56938
57245
|
}
|
|
56939
57246
|
const alphaEffects = parseImageAlphaEffects(blip, (node) => this.parseColor(node));
|
|
56940
57247
|
Object.assign(effects, alphaEffects);
|
|
56941
57248
|
if (Object.keys(alphaEffects).length > 0) {
|
|
56942
|
-
|
|
57249
|
+
hasAny2 = true;
|
|
56943
57250
|
}
|
|
56944
57251
|
const lumNode = blip["a:lum"];
|
|
56945
57252
|
if (lumNode) {
|
|
@@ -56959,7 +57266,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
56959
57266
|
}
|
|
56960
57267
|
}
|
|
56961
57268
|
effects.lum = lumEffect;
|
|
56962
|
-
|
|
57269
|
+
hasAny2 = true;
|
|
56963
57270
|
}
|
|
56964
57271
|
const hslNode = blip["a:hsl"];
|
|
56965
57272
|
if (hslNode) {
|
|
@@ -56986,7 +57293,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
56986
57293
|
}
|
|
56987
57294
|
}
|
|
56988
57295
|
effects.hsl = hslEffect;
|
|
56989
|
-
|
|
57296
|
+
hasAny2 = true;
|
|
56990
57297
|
}
|
|
56991
57298
|
const tintNode = blip["a:tint"];
|
|
56992
57299
|
if (tintNode) {
|
|
@@ -57006,7 +57313,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
57006
57313
|
}
|
|
57007
57314
|
}
|
|
57008
57315
|
effects.tint = tintEffect;
|
|
57009
|
-
|
|
57316
|
+
hasAny2 = true;
|
|
57010
57317
|
}
|
|
57011
57318
|
const fillOverlay = blip["a:fillOverlay"];
|
|
57012
57319
|
if (fillOverlay) {
|
|
@@ -57033,7 +57340,7 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
57033
57340
|
...resolvedGradient ? { resolvedGradient } : {},
|
|
57034
57341
|
...resolvedPattern ? { resolvedPattern } : {}
|
|
57035
57342
|
};
|
|
57036
|
-
|
|
57343
|
+
hasAny2 = true;
|
|
57037
57344
|
}
|
|
57038
57345
|
const blurNode = blip["a:blur"];
|
|
57039
57346
|
if (blurNode) {
|
|
@@ -57051,16 +57358,16 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
57051
57358
|
blurEffect.grow = s === "1" || s === "true";
|
|
57052
57359
|
}
|
|
57053
57360
|
effects.blur = blurEffect;
|
|
57054
|
-
|
|
57361
|
+
hasAny2 = true;
|
|
57055
57362
|
}
|
|
57056
57363
|
const extLst = xmlChild(blip, "a:extLst");
|
|
57057
57364
|
if (extLst) {
|
|
57058
57365
|
const a14 = parseA14ImageExtension(this.ensureArray(extLst["a:ext"]));
|
|
57059
57366
|
if (a14 && applyA14ExtensionToEffects(effects, a14)) {
|
|
57060
|
-
|
|
57367
|
+
hasAny2 = true;
|
|
57061
57368
|
}
|
|
57062
57369
|
}
|
|
57063
|
-
return
|
|
57370
|
+
return hasAny2 ? effects : null;
|
|
57064
57371
|
}
|
|
57065
57372
|
/**
|
|
57066
57373
|
* Resolve a blip `a:fillOverlay/a:gradFill` to the structured gradient a
|
|
@@ -58638,8 +58945,8 @@ function buildTextRunEffectListXml(style, parseColor) {
|
|
|
58638
58945
|
const hasTextHsl = typeof style.textHslHue === "number" || typeof style.textHslSaturation === "number" || typeof style.textHslLuminance === "number";
|
|
58639
58946
|
const hasTextClrChange = Boolean(style.textClrChangeFrom) && Boolean(style.textClrChangeTo);
|
|
58640
58947
|
const hasTextDuotone = Boolean(style.textDuotone);
|
|
58641
|
-
const
|
|
58642
|
-
if (!
|
|
58948
|
+
const hasAny2 = hasTextShadow || hasTextInnerShadow || hasTextPresetShadow || hasTextGlow || hasTextReflection || hasTextBlur || hasTextSoftEdge || hasTextAlphaModFix || hasTextAlphaMod || hasTextHsl || hasTextClrChange || hasTextDuotone;
|
|
58949
|
+
if (!hasAny2) {
|
|
58643
58950
|
return void 0;
|
|
58644
58951
|
}
|
|
58645
58952
|
const effectLst = {};
|
|
@@ -62694,6 +63001,82 @@ function writeTableColumnWidths(tbl, columnWidths) {
|
|
|
62694
63001
|
}
|
|
62695
63002
|
}
|
|
62696
63003
|
|
|
63004
|
+
// pptx/core/core/runtime/table-style-change-cell-clear.ts
|
|
63005
|
+
var FILL_KEYS = [
|
|
63006
|
+
"a:noFill",
|
|
63007
|
+
"a:solidFill",
|
|
63008
|
+
"a:gradFill",
|
|
63009
|
+
"a:blipFill",
|
|
63010
|
+
"a:pattFill",
|
|
63011
|
+
"a:grpFill"
|
|
63012
|
+
];
|
|
63013
|
+
var LINE_KEYS = [
|
|
63014
|
+
["a:lnL", ["borderLeftWidth", "borderLeftColor", "borderLeftDash"]],
|
|
63015
|
+
["a:lnR", ["borderRightWidth", "borderRightColor", "borderRightDash"]],
|
|
63016
|
+
["a:lnT", ["borderTopWidth", "borderTopColor", "borderTopDash"]],
|
|
63017
|
+
["a:lnB", ["borderBottomWidth", "borderBottomColor", "borderBottomDash"]],
|
|
63018
|
+
["a:lnTlToBr", ["borderDiagDownWidth", "borderDiagDownColor"]],
|
|
63019
|
+
["a:lnBlToTr", ["borderDiagUpWidth", "borderDiagUpColor"]]
|
|
63020
|
+
];
|
|
63021
|
+
var FILL_FIELDS = [
|
|
63022
|
+
"fillMode",
|
|
63023
|
+
"backgroundColor",
|
|
63024
|
+
"gradientFillStops",
|
|
63025
|
+
"patternFillPreset",
|
|
63026
|
+
"backgroundImageFillPath",
|
|
63027
|
+
"backgroundImageFillData"
|
|
63028
|
+
];
|
|
63029
|
+
function normaliseStyleId(id) {
|
|
63030
|
+
const text = typeof id === "string" || typeof id === "number" ? String(id) : "";
|
|
63031
|
+
const trimmed2 = text.trim().toUpperCase();
|
|
63032
|
+
if (!trimmed2) {
|
|
63033
|
+
return "";
|
|
63034
|
+
}
|
|
63035
|
+
return trimmed2.startsWith("{") ? trimmed2 : `{${trimmed2}}`;
|
|
63036
|
+
}
|
|
63037
|
+
function xmlTableStyleId(tblPr) {
|
|
63038
|
+
if (!tblPr || typeof tblPr !== "object") {
|
|
63039
|
+
return "";
|
|
63040
|
+
}
|
|
63041
|
+
const props = tblPr;
|
|
63042
|
+
const node = props["a:tableStyleId"];
|
|
63043
|
+
const spec = normaliseStyleId(
|
|
63044
|
+
node && typeof node === "object" ? node["#text"] : node
|
|
63045
|
+
);
|
|
63046
|
+
if (spec) {
|
|
63047
|
+
return spec;
|
|
63048
|
+
}
|
|
63049
|
+
const legacy = props["a:tblStyle"];
|
|
63050
|
+
return normaliseStyleId(legacy?.["@_val"] || props["@_tblStyle"]);
|
|
63051
|
+
}
|
|
63052
|
+
function tableStyleIdChanged(tblPr, nextStyleId) {
|
|
63053
|
+
if (nextStyleId === void 0) {
|
|
63054
|
+
return false;
|
|
63055
|
+
}
|
|
63056
|
+
return normaliseStyleId(nextStyleId) !== xmlTableStyleId(tblPr);
|
|
63057
|
+
}
|
|
63058
|
+
var hasAny = (style, keys) => keys.some((key2) => style?.[key2] !== void 0);
|
|
63059
|
+
function clearCellFormattingForStyleChange(xmlCell, style) {
|
|
63060
|
+
const tcPr = xmlCell["a:tcPr"];
|
|
63061
|
+
if (!tcPr || typeof tcPr !== "object") {
|
|
63062
|
+
return;
|
|
63063
|
+
}
|
|
63064
|
+
const props = tcPr;
|
|
63065
|
+
if (!hasAny(style, FILL_FIELDS)) {
|
|
63066
|
+
for (const key2 of FILL_KEYS) {
|
|
63067
|
+
delete props[key2];
|
|
63068
|
+
}
|
|
63069
|
+
}
|
|
63070
|
+
for (const [key2, fields] of LINE_KEYS) {
|
|
63071
|
+
if (!hasAny(style, fields)) {
|
|
63072
|
+
delete props[key2];
|
|
63073
|
+
}
|
|
63074
|
+
}
|
|
63075
|
+
if (!style?.cell3D) {
|
|
63076
|
+
delete props["a:cell3D"];
|
|
63077
|
+
}
|
|
63078
|
+
}
|
|
63079
|
+
|
|
62697
63080
|
// pptx/core/core/runtime/table-paragraph-save-order.ts
|
|
62698
63081
|
var CONTENT_TAGS = /* @__PURE__ */ new Set(["a:r", "a:br", "a:fld"]);
|
|
62699
63082
|
var paragraphOrders = /* @__PURE__ */ new WeakMap();
|
|
@@ -63181,6 +63564,7 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
63181
63564
|
if (!tbl) {
|
|
63182
63565
|
return;
|
|
63183
63566
|
}
|
|
63567
|
+
const styleChanged = tableData.clearDirectCellFormatting === true || tableStyleIdChanged(tbl["a:tblPr"], tableData.tableStyleId);
|
|
63184
63568
|
serializeTablePropertyFlags(tbl, tableData);
|
|
63185
63569
|
writeTablePropertiesOwnFillAndEffects(tbl["a:tblPr"], tableData);
|
|
63186
63570
|
const xmlRows = this.ensureArray(tbl["a:tr"]);
|
|
@@ -63212,6 +63596,9 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
63212
63596
|
if (cell.text !== void 0) {
|
|
63213
63597
|
this.writeTableCellText(xmlCell, cell.text);
|
|
63214
63598
|
}
|
|
63599
|
+
if (styleChanged) {
|
|
63600
|
+
clearCellFormattingForStyleChange(xmlCell, cell.style);
|
|
63601
|
+
}
|
|
63215
63602
|
if (cell.style) {
|
|
63216
63603
|
this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
|
|
63217
63604
|
}
|
|
@@ -63235,6 +63622,9 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
63235
63622
|
if (cell.text !== void 0) {
|
|
63236
63623
|
this.writeTableCellText(xmlCell, cell.text);
|
|
63237
63624
|
}
|
|
63625
|
+
if (styleChanged) {
|
|
63626
|
+
clearCellFormattingForStyleChange(xmlCell, cell.style);
|
|
63627
|
+
}
|
|
63238
63628
|
if (cell.style) {
|
|
63239
63629
|
this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
|
|
63240
63630
|
}
|
|
@@ -73532,6 +73922,10 @@ var PptxHandlerRuntime60 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
73532
73922
|
const pathLst = custGeom["a:pathLst"];
|
|
73533
73923
|
if (isNonEmpty(pathLst)) {
|
|
73534
73924
|
result.pathLstXml = pathLst;
|
|
73925
|
+
const pathCommandOrder = readPathListCommandOrder(pathLst);
|
|
73926
|
+
if (pathCommandOrder) {
|
|
73927
|
+
result.pathCommandOrder = pathCommandOrder;
|
|
73928
|
+
}
|
|
73535
73929
|
}
|
|
73536
73930
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
73537
73931
|
}
|
|
@@ -74405,7 +74799,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
74405
74799
|
return void 0;
|
|
74406
74800
|
}
|
|
74407
74801
|
const locks = {};
|
|
74408
|
-
let
|
|
74802
|
+
let hasAny2 = false;
|
|
74409
74803
|
const boolAttr2 = (attr5) => {
|
|
74410
74804
|
const raw = spLocks[attr5];
|
|
74411
74805
|
if (raw === void 0) {
|
|
@@ -74418,7 +74812,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
74418
74812
|
const val = boolAttr2(attr5);
|
|
74419
74813
|
if (val !== void 0) {
|
|
74420
74814
|
fn(val);
|
|
74421
|
-
|
|
74815
|
+
hasAny2 = true;
|
|
74422
74816
|
}
|
|
74423
74817
|
};
|
|
74424
74818
|
set("@_noGrp", (v) => {
|
|
@@ -74457,7 +74851,7 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
74457
74851
|
set("@_noCrop", (v) => {
|
|
74458
74852
|
locks.noCrop = v;
|
|
74459
74853
|
});
|
|
74460
|
-
return
|
|
74854
|
+
return hasAny2 ? locks : void 0;
|
|
74461
74855
|
}
|
|
74462
74856
|
/**
|
|
74463
74857
|
* Parse the `@txBox` attribute from a `p:cNvSpPr` node. Returns `true` /
|
|
@@ -74738,6 +75132,36 @@ var PptxHandlerRuntime65 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
74738
75132
|
)
|
|
74739
75133
|
);
|
|
74740
75134
|
const pPr = this.mergeXmlObjects(lstStyleParagraphDefaults, directPPr);
|
|
75135
|
+
if (!textStyle.inheritedParagraphSpacing) {
|
|
75136
|
+
textStyle.inheritedParagraphSpacing = {};
|
|
75137
|
+
for (let spacingLevel = 0; spacingLevel < 9; spacingLevel++) {
|
|
75138
|
+
const key2 = `a:lvl${spacingLevel + 1}pPr`;
|
|
75139
|
+
const defaults = this.mergeXmlObjects(
|
|
75140
|
+
this.mergeXmlObjects(
|
|
75141
|
+
inheritedLstStyle?.["a:defPPr"],
|
|
75142
|
+
inheritedLstStyle?.[key2]
|
|
75143
|
+
),
|
|
75144
|
+
this.mergeXmlObjects(
|
|
75145
|
+
ownLstStyle?.["a:defPPr"],
|
|
75146
|
+
ownLstStyle?.[key2]
|
|
75147
|
+
)
|
|
75148
|
+
);
|
|
75149
|
+
const inherited = this.mergeXmlObjects(
|
|
75150
|
+
defaults,
|
|
75151
|
+
inheritedParagraph?.["a:pPr"]
|
|
75152
|
+
);
|
|
75153
|
+
const spacing = this.extractParagraphOwnProperties({ "a:pPr": inherited }, textStyle.fontSize) ?? {};
|
|
75154
|
+
const phLevel = ctx.effectiveLevelStyles?.[spacingLevel];
|
|
75155
|
+
const phBase = ctx.effectiveLevelStyles?.[-1];
|
|
75156
|
+
if (phLevel) this.applyPlaceholderLevelDefaults(spacing, phLevel);
|
|
75157
|
+
if (phBase) this.applyPlaceholderLevelDefaults(spacing, phBase);
|
|
75158
|
+
textStyle.inheritedParagraphSpacing[spacingLevel] = {
|
|
75159
|
+
paragraphSpacingBefore: spacing.paragraphSpacingBefore ?? 0,
|
|
75160
|
+
paragraphSpacingAfter: spacing.paragraphSpacingAfter ?? 0,
|
|
75161
|
+
...spacing.lineSpacingExactPt !== void 0 ? { lineSpacingExactPt: spacing.lineSpacingExactPt } : { lineSpacing: spacing.lineSpacing ?? 1 }
|
|
75162
|
+
};
|
|
75163
|
+
}
|
|
75164
|
+
}
|
|
74741
75165
|
const paragraphRtl = this.parseOptionalBooleanAttr(pPr?.["@_rtl"]);
|
|
74742
75166
|
if (paragraphRtl !== void 0 && textStyle.rtl === void 0) {
|
|
74743
75167
|
textStyle.rtl = paragraphRtl;
|
|
@@ -82728,6 +83152,8 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
|
|
|
82728
83152
|
};
|
|
82729
83153
|
|
|
82730
83154
|
// pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts
|
|
83155
|
+
var XSD_INT_MIN = -2147483648;
|
|
83156
|
+
var XSD_INT_MAX = 2147483647;
|
|
82731
83157
|
var PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
|
|
82732
83158
|
parseEditorAnimations(slideXml3) {
|
|
82733
83159
|
return this.editorAnimationService.parseEditorAnimations(slideXml3);
|
|
@@ -82910,6 +83336,22 @@ var PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
|
|
|
82910
83336
|
const lexical = String(raw).trim().toLowerCase();
|
|
82911
83337
|
return lexical !== "0" && lexical !== "false";
|
|
82912
83338
|
}
|
|
83339
|
+
/**
|
|
83340
|
+
* Extract `p:presentation/@firstSlideNum` (ECMA-376 §19.2.1.26, an
|
|
83341
|
+
* `xsd:int`). `undefined` when absent, not an integer, or outside the
|
|
83342
|
+
* `xsd:int` range (-2147483648 to 2147483647, which also rejects digit
|
|
83343
|
+
* strings too long to parse), so the spec default (`1`) is never forced
|
|
83344
|
+
* onto the typed model.
|
|
83345
|
+
*/
|
|
83346
|
+
extractFirstSlideNumber() {
|
|
83347
|
+
const pres = this.presentationData?.["p:presentation"];
|
|
83348
|
+
const lexical = String(pres?.["@_firstSlideNum"] ?? "").trim();
|
|
83349
|
+
if (!/^[+-]?\d+$/.test(lexical)) {
|
|
83350
|
+
return void 0;
|
|
83351
|
+
}
|
|
83352
|
+
const value = Number(lexical);
|
|
83353
|
+
return value >= XSD_INT_MIN && value <= XSD_INT_MAX ? value : void 0;
|
|
83354
|
+
}
|
|
82913
83355
|
};
|
|
82914
83356
|
|
|
82915
83357
|
// pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts
|
|
@@ -83542,7 +83984,7 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
83542
83984
|
this.commentAuthorDetails.size > 0 ? Array.from(this.commentAuthorDetails.values()) : void 0
|
|
83543
83985
|
).withModernCommentAuthors(
|
|
83544
83986
|
this.modernCommentAuthors.size > 0 ? Array.from(this.modernCommentAuthors.values()) : void 0
|
|
83545
|
-
).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withDefaultTextStyle(defaultTextStyle).build();
|
|
83987
|
+
).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withFirstSlideNumber(this.extractFirstSlideNumber()).withDefaultTextStyle(defaultTextStyle).build();
|
|
83546
83988
|
}
|
|
83547
83989
|
/**
|
|
83548
83990
|
* Walk the raw XML of every slide to find the highest numeric `@_id`
|
|
@@ -87543,7 +87985,10 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
87543
87985
|
const imported = deserializePptxFromJson(text);
|
|
87544
87986
|
const blankBytes = await buildBlankPresentationArchive({
|
|
87545
87987
|
width: imported.widthEmu,
|
|
87546
|
-
height: imported.heightEmu
|
|
87988
|
+
height: imported.heightEmu,
|
|
87989
|
+
// Saving writes presentation.xml from the loaded archive, not from
|
|
87990
|
+
// the overlaid model, so the archive must carry the value itself.
|
|
87991
|
+
firstSlideNumber: imported.firstSlideNumber
|
|
87547
87992
|
});
|
|
87548
87993
|
const base = await super.load(blankBytes, options);
|
|
87549
87994
|
return applyImportedPptxData(base, imported);
|