ooxml-core 1.45.0 → 1.47.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-JX62VKU4.cjs +14 -0
- package/dist/{PptxHandler-FXLXIOLT.mjs → PptxHandler-NXHZ6ITL.mjs} +2 -2
- package/dist/PptxHandler-SUGLNSZI.mjs +5 -0
- package/dist/{PresentationBuilder-CSKLG64K.cjs → PresentationBuilder-IK6NIK6T.cjs} +6 -6
- package/dist/{PresentationBuilder-DDYHRV26.mjs → PresentationBuilder-LHQ333UL.mjs} +3 -3
- package/dist/{PresentationBuilder-3FKFRSSV.mjs → PresentationBuilder-URSPID7L.mjs} +2 -2
- package/dist/automation/index.cjs +12 -7
- package/dist/automation/index.mjs +12 -7
- package/dist/chart/edit/group-options.d.ts +4 -0
- package/dist/chart/edit/group-options.d.ts.map +1 -1
- package/dist/chart/edit/new-chart-minimal.d.ts +13 -0
- package/dist/chart/edit/new-chart-minimal.d.ts.map +1 -0
- package/dist/chart/edit/new-chart.d.ts +34 -1
- package/dist/chart/edit/new-chart.d.ts.map +1 -1
- package/dist/chart/edit/secondary-axis.d.ts +8 -1
- package/dist/chart/edit/secondary-axis.d.ts.map +1 -1
- package/dist/chart/edit/type.d.ts +2 -0
- package/dist/chart/edit/type.d.ts.map +1 -1
- package/dist/chart/index.cjs +414 -263
- package/dist/chart/index.mjs +412 -264
- package/dist/{chunk-YBSNMVSN.cjs → chunk-4GPLQEEC.cjs} +1604 -1324
- package/dist/{chunk-U5BXJQZG.mjs → chunk-553WFEHD.mjs} +332 -53
- package/dist/{chunk-RVYGAYCP.mjs → chunk-5HNRZOBX.mjs} +1 -1
- package/dist/{chunk-VKFKEVHK.mjs → chunk-6MU4WKHS.mjs} +1 -1
- package/dist/{chunk-GXYK3H4O.mjs → chunk-7L6ZAA5Y.mjs} +82 -17
- package/dist/{chunk-3J6VIKLP.cjs → chunk-APCA7N6Q.cjs} +3 -3
- package/dist/{chunk-IPV3J3I5.mjs → chunk-DEDK2J57.mjs} +68 -1
- package/dist/{chunk-7T3SJQA6.cjs → chunk-E5TGYYKO.cjs} +1 -0
- package/dist/{chunk-R7NS42KQ.mjs → chunk-FKU2Z6ZB.mjs} +1 -1
- package/dist/{chunk-GGJUWJXB.mjs → chunk-QHR726W3.mjs} +1 -1
- package/dist/{chunk-XTUX5RMG.cjs → chunk-T4BVZTII.cjs} +9 -9
- package/dist/{chunk-QZPOPUI5.cjs → chunk-WFN6ZU7N.cjs} +69 -0
- package/dist/{chunk-LCXBTJXE.mjs → chunk-XVEJS7HN.mjs} +5 -5
- package/dist/{chunk-CVJX6NNO.mjs → chunk-Z734BYYR.mjs} +334 -54
- package/dist/{chunk-OORQCSVA.mjs → chunk-ZLUHU2SU.mjs} +1 -0
- package/dist/docx/index.cjs +300 -144
- package/dist/docx/index.mjs +300 -144
- package/dist/index.cjs +484 -333
- package/dist/index.mjs +484 -333
- package/dist/pptx/automation/index.cjs +2207 -1825
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts → index--HBUyILF.d.ts} +5 -5
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts.map → index--HBUyILF.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DGKI80Hj.d.ts → index-BDVzSboe.d.ts} +71 -7
- package/dist/pptx/chunks/{index-DGKI80Hj.d.ts.map → index-BDVzSboe.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts → index-Dr3iIPt9.d.ts} +3 -3
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts.map → index-Dr3iIPt9.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts → text-operations-CVHXOSit.d.ts} +18 -3
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts.map → text-operations-CVHXOSit.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +608 -226
- 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 +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +8 -8
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/index.cjs +2605 -2226
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/xlsx/index.cjs +12 -7
- package/dist/xlsx/index.mjs +12 -7
- package/dist/xlsx/ui/index.cjs +12 -7
- package/dist/xlsx/ui/index.mjs +12 -7
- package/package.json +1 -1
- package/dist/PptxHandler-3RDVJFQV.cjs +0 -14
- package/dist/PptxHandler-EI6DMHPM.mjs +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, formatCellAddress, childrenNamed, childNamed, parseCellAddress, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, worksheetData, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect,
|
|
1
|
+
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, ooxmlGradientAngleToCssDegrees, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, formatCellAddress, childrenNamed, childNamed, parseCellAddress, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, worksheetData, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, xmlAttrBool, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, patchDrawingColorIn, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, buildRelationshipsXml, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, parseDrawingLineDash, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, patchPictureEffects, cssDegreesToOoxmlGradientAngle, escText, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, decodeBase64, parseSmartArtPresLayoutVars, parseDrawingColorIn, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-7L6ZAA5Y.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openZip, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError } from './chunk-EYCM7RVL.mjs';
|
|
3
3
|
import { resolveSmartArtLayoutCategory } from './chunk-2N7RZQLC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-VDUNZTJC.mjs';
|
|
@@ -4094,7 +4094,15 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
4094
4094
|
init.reportUnsupportedBackground?.(rawBackgroundImage);
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
|
-
if (backgroundProperties["a:blipFill"] === void 0 &&
|
|
4097
|
+
if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundGradient) {
|
|
4098
|
+
const gradFill2 = init.buildBackgroundGradientFill?.();
|
|
4099
|
+
if (gradFill2) {
|
|
4100
|
+
backgroundProperties["a:gradFill"] = gradFill2;
|
|
4101
|
+
} else if (!hasBackgroundColor && !hasBackgroundImage) {
|
|
4102
|
+
init.reportUnsupportedGradient?.();
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
if (backgroundProperties["a:blipFill"] === void 0 && backgroundProperties["a:gradFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
|
|
4098
4106
|
backgroundProperties["a:solidFill"] = {
|
|
4099
4107
|
"a:srgbClr": {
|
|
4100
4108
|
"@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
|
|
@@ -8756,8 +8764,8 @@ function decodeAinkInk(inkRoot) {
|
|
|
8756
8764
|
if (raw2.length === 0) {
|
|
8757
8765
|
return 2;
|
|
8758
8766
|
}
|
|
8759
|
-
const
|
|
8760
|
-
return Number.isFinite(
|
|
8767
|
+
const num3 = Number(raw2);
|
|
8768
|
+
return Number.isFinite(num3) && num3 > 0 ? num3 : 2;
|
|
8761
8769
|
})();
|
|
8762
8770
|
const traces = ensureArrayLike3(inkRoot["aink:trace"]);
|
|
8763
8771
|
for (const trace of traces) {
|
|
@@ -10780,9 +10788,9 @@ async function ensureCustomPropertiesPackagingArtifacts(context) {
|
|
|
10780
10788
|
let maxId = 0;
|
|
10781
10789
|
for (const rel of rels) {
|
|
10782
10790
|
const id = String(rel?.["@_Id"] || "");
|
|
10783
|
-
const
|
|
10784
|
-
if (Number.isFinite(
|
|
10785
|
-
maxId =
|
|
10791
|
+
const num3 = Number.parseInt(id.replace(/^rId/, ""), 10);
|
|
10792
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
10793
|
+
maxId = num3;
|
|
10786
10794
|
}
|
|
10787
10795
|
}
|
|
10788
10796
|
rels.push({
|
|
@@ -10852,11 +10860,11 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
10852
10860
|
this.context = context;
|
|
10853
10861
|
}
|
|
10854
10862
|
async updateOnSave(slides, options2) {
|
|
10855
|
-
await this.updateCoreProperties(options2?.coreProperties);
|
|
10863
|
+
await this.updateCoreProperties(options2?.coreProperties, options2?.fixedDate);
|
|
10856
10864
|
await this.updateAppProperties(slides, options2?.appProperties);
|
|
10857
10865
|
await this.updateCustomProperties(options2?.customProperties);
|
|
10858
10866
|
}
|
|
10859
|
-
async updateCoreProperties(overrides) {
|
|
10867
|
+
async updateCoreProperties(overrides, fixedDate) {
|
|
10860
10868
|
const coreFile = this.context.zip.file("docProps/core.xml");
|
|
10861
10869
|
if (!coreFile) {
|
|
10862
10870
|
return;
|
|
@@ -10865,7 +10873,12 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
10865
10873
|
const coreXml = await coreFile.async("string");
|
|
10866
10874
|
const core = applyCoreOverrides(parseCoreProperties(coreXml), overrides);
|
|
10867
10875
|
const revision = Number.parseInt(core.revision?.trim() ?? "", 10);
|
|
10868
|
-
const next = {
|
|
10876
|
+
const next = fixedDate ? {
|
|
10877
|
+
...core,
|
|
10878
|
+
revision: overrides?.revision ?? "1",
|
|
10879
|
+
created: overrides?.created ?? formatW3cdtf(fixedDate),
|
|
10880
|
+
modified: overrides?.modified ?? formatW3cdtf(fixedDate)
|
|
10881
|
+
} : {
|
|
10869
10882
|
...core,
|
|
10870
10883
|
revision: String(Number.isFinite(revision) && revision >= 0 ? revision + 1 : 1),
|
|
10871
10884
|
modified: formatW3cdtf(/* @__PURE__ */ new Date())
|
|
@@ -41805,7 +41818,7 @@ var SWITCHABLE = {
|
|
|
41805
41818
|
stock: false,
|
|
41806
41819
|
surface: true
|
|
41807
41820
|
};
|
|
41808
|
-
function
|
|
41821
|
+
function chartGroupElement(kind, is3D) {
|
|
41809
41822
|
const match = Object.entries(CHART_GROUP_ELEMENTS).find(
|
|
41810
41823
|
([, value]) => value.kind === kind && value.is3D === is3D
|
|
41811
41824
|
);
|
|
@@ -41821,7 +41834,7 @@ function groupingFor(element2, grouping) {
|
|
|
41821
41834
|
var horizontalBars = (group) => group.kind === "bar" && group.barDirection === "bar";
|
|
41822
41835
|
function newGroup(base, target, series) {
|
|
41823
41836
|
const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
|
|
41824
|
-
const element2 =
|
|
41837
|
+
const element2 = chartGroupElement(target.kind, is3D);
|
|
41825
41838
|
const group = { kind: target.kind, element: element2, is3D, series, axisIds: [] };
|
|
41826
41839
|
const allowed = GROUP_FIELDS[element2] ?? [];
|
|
41827
41840
|
for (const key2 of allowed)
|
|
@@ -41996,6 +42009,11 @@ var RANGES = {
|
|
|
41996
42009
|
firstSliceAngle: [0, 360],
|
|
41997
42010
|
holeSize: [1, 90]
|
|
41998
42011
|
};
|
|
42012
|
+
function assertChartGroupOption(key2, value) {
|
|
42013
|
+
const [min, max] = RANGES[key2];
|
|
42014
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
42015
|
+
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42016
|
+
}
|
|
41999
42017
|
function setChartGroupOptions(space, seriesIndex, edit) {
|
|
42000
42018
|
return editChartSpace(space, (draft) => {
|
|
42001
42019
|
const { group } = chartSeriesEntryAt(draft, seriesIndex);
|
|
@@ -42008,9 +42026,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
|
|
|
42008
42026
|
delete group[key2];
|
|
42009
42027
|
continue;
|
|
42010
42028
|
}
|
|
42011
|
-
|
|
42012
|
-
if (!Number.isInteger(value) || value < min || value > max)
|
|
42013
|
-
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42029
|
+
assertChartGroupOption(key2, value);
|
|
42014
42030
|
group[key2] = value;
|
|
42015
42031
|
}
|
|
42016
42032
|
});
|
|
@@ -54052,6 +54068,43 @@ function applyCommonViewContainer(root, name, props) {
|
|
|
54052
54068
|
root[key2] = container;
|
|
54053
54069
|
}
|
|
54054
54070
|
|
|
54071
|
+
// pptx/core/utils/slide-background-gradient.ts
|
|
54072
|
+
var num2 = (value) => String(Number(value.toFixed(3)));
|
|
54073
|
+
function cssColor(color2, opacity2) {
|
|
54074
|
+
if (opacity2 === void 0 || opacity2 >= 1) {
|
|
54075
|
+
return color2;
|
|
54076
|
+
}
|
|
54077
|
+
const hex3 = color2.replace("#", "");
|
|
54078
|
+
const channel = (index) => Number.parseInt(hex3.slice(index, index + 2), 16);
|
|
54079
|
+
return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${num2(opacity2)})`;
|
|
54080
|
+
}
|
|
54081
|
+
function slideBackgroundGradientCss(gradient) {
|
|
54082
|
+
const stops = (gradient.fillGradientStops ?? []).map((stop) => `${cssColor(stop.color, stop.opacity)} ${num2(stop.position)}%`).join(", ");
|
|
54083
|
+
if (gradient.fillGradientType !== "radial") {
|
|
54084
|
+
const angle = ooxmlGradientAngleToCssDegrees(gradient.fillGradientAngle ?? 0);
|
|
54085
|
+
return `linear-gradient(${num2(angle)}deg, ${stops})`;
|
|
54086
|
+
}
|
|
54087
|
+
const focus = gradient.fillGradientFillToRect;
|
|
54088
|
+
const cx = focus ? (focus.l + (1 - focus.r)) / 2 * 100 : 50;
|
|
54089
|
+
const cy = focus ? (focus.t + (1 - focus.b)) / 2 * 100 : 50;
|
|
54090
|
+
const at = `at ${num2(cx)}% ${num2(cy)}%`;
|
|
54091
|
+
switch (gradient.fillGradientPathType) {
|
|
54092
|
+
case "rect":
|
|
54093
|
+
return `radial-gradient(${num2(Math.max(cx, 100 - cx))}% ${num2(Math.max(cy, 100 - cy))}% ${at}, ${stops})`;
|
|
54094
|
+
case "shape":
|
|
54095
|
+
return `radial-gradient(farthest-side ${at}, ${stops})`;
|
|
54096
|
+
default:
|
|
54097
|
+
return `radial-gradient(circle ${at}, ${stops})`;
|
|
54098
|
+
}
|
|
54099
|
+
}
|
|
54100
|
+
function slideBackgroundGradientToWrite(slide) {
|
|
54101
|
+
const gradient = slide.backgroundGradientFill;
|
|
54102
|
+
if (!gradient || !slide.backgroundGradient) {
|
|
54103
|
+
return void 0;
|
|
54104
|
+
}
|
|
54105
|
+
return slide.backgroundGradient === slideBackgroundGradientCss(gradient) ? gradient : void 0;
|
|
54106
|
+
}
|
|
54107
|
+
|
|
54055
54108
|
// pptx/core/core/runtime/chart-part-registration.ts
|
|
54056
54109
|
var CHART_GRAPHIC_DATA_URI = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
54057
54110
|
var CHART_EX_GRAPHIC_DATA_URI = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
@@ -55680,8 +55733,8 @@ function authoredValue(node) {
|
|
|
55680
55733
|
return void 0;
|
|
55681
55734
|
}
|
|
55682
55735
|
const raw2 = node["@_val"];
|
|
55683
|
-
const
|
|
55684
|
-
return Number.isFinite(
|
|
55736
|
+
const num3 = raw2 === void 0 || raw2 === null || raw2 === "" ? NaN : Number.parseFloat(String(raw2));
|
|
55737
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
55685
55738
|
}
|
|
55686
55739
|
function applyChartGroupOptionsToXml(container, containerLocal, chartData, getLocalName2) {
|
|
55687
55740
|
let changed = false;
|
|
@@ -61756,6 +61809,17 @@ function applyImageAlphaEffects(blip, effects2, parseColor) {
|
|
|
61756
61809
|
);
|
|
61757
61810
|
}
|
|
61758
61811
|
|
|
61812
|
+
// pptx/core/core/runtime/blip-extension-order.ts
|
|
61813
|
+
function keepExtensionListLast(blip) {
|
|
61814
|
+
const key2 = Object.keys(blip).find((candidate) => candidate.split(":").at(-1) === "extLst");
|
|
61815
|
+
if (key2 === void 0) {
|
|
61816
|
+
return;
|
|
61817
|
+
}
|
|
61818
|
+
const value = blip[key2];
|
|
61819
|
+
delete blip[key2];
|
|
61820
|
+
blip[key2] = value;
|
|
61821
|
+
}
|
|
61822
|
+
|
|
61759
61823
|
// pptx/core/core/runtime/image-color-effects.ts
|
|
61760
61824
|
var localName13 = (key2) => key2.split(":").at(-1) ?? key2;
|
|
61761
61825
|
function child16(parent, name) {
|
|
@@ -67333,11 +67397,31 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
67333
67397
|
* default) is correct at depth 0. See `group-xfrm-preservation.ts`'s
|
|
67334
67398
|
* module doc for why a nested group must not re-derive this itself.
|
|
67335
67399
|
*/
|
|
67400
|
+
/**
|
|
67401
|
+
* `PptxHandlerSaveOptions.fixedDate` of the save in progress: set, the save
|
|
67402
|
+
* mints reproducible ids and names (new table columns' `a16:colId`, the
|
|
67403
|
+
* fallback name of a new group) instead of random or time-based ones.
|
|
67404
|
+
*/
|
|
67405
|
+
saveFixedDate;
|
|
67406
|
+
/**
|
|
67407
|
+
* The `p:cNvPr/@name` of a group with neither a name nor one from its
|
|
67408
|
+
* file: its element id, or for a reproducible save (`fixedDate`), which
|
|
67409
|
+
* must not depend on the time-based ids of elements made in code,
|
|
67410
|
+
* `Group <shape id>` as PowerPoint names groups.
|
|
67411
|
+
*/
|
|
67412
|
+
groupFallbackName(group) {
|
|
67413
|
+
return this.saveFixedDate ? `Group ${group.shapeId ?? ""}`.trim() : group.id;
|
|
67414
|
+
}
|
|
67336
67415
|
buildGroupShapeXml(group, ctx, ownEmuOverride) {
|
|
67337
67416
|
if (group.rawXml && group.children.length === 0) {
|
|
67338
67417
|
return {
|
|
67339
67418
|
...group.rawXml,
|
|
67340
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67419
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67420
|
+
group.rawXml,
|
|
67421
|
+
group.name,
|
|
67422
|
+
this.groupFallbackName(group),
|
|
67423
|
+
group.shapeId
|
|
67424
|
+
)
|
|
67341
67425
|
};
|
|
67342
67426
|
}
|
|
67343
67427
|
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
@@ -67346,7 +67430,12 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
67346
67430
|
const xfrm = buildGroupTransformXml(group, EMU, ownEmuOverride, rewrap);
|
|
67347
67431
|
const childSpace = group;
|
|
67348
67432
|
const grpXml2 = {
|
|
67349
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67433
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67434
|
+
rawGroupXml,
|
|
67435
|
+
group.name,
|
|
67436
|
+
this.groupFallbackName(group),
|
|
67437
|
+
group.shapeId
|
|
67438
|
+
),
|
|
67350
67439
|
"p:grpSpPr": buildGroupPropertiesXml(rawGroupXml, xfrm)
|
|
67351
67440
|
};
|
|
67352
67441
|
const rawExtLst = rawGroupXml?.["p:extLst"];
|
|
@@ -67556,6 +67645,7 @@ var PptxHandlerRuntime16 = class extends PptxHandlerRuntime15 {
|
|
|
67556
67645
|
delete blip["a:blur"];
|
|
67557
67646
|
}
|
|
67558
67647
|
applyA14ImageExtension(blip, nextEffects);
|
|
67648
|
+
keepExtensionListLast(blip);
|
|
67559
67649
|
}
|
|
67560
67650
|
normalizePresetGeometry(shapeType) {
|
|
67561
67651
|
return this.elementXmlBuilder.normalizePresetGeometry(shapeType);
|
|
@@ -70244,7 +70334,15 @@ function slideContainsA16Element(node) {
|
|
|
70244
70334
|
function randomColumnId() {
|
|
70245
70335
|
return String(Math.floor(Math.random() * 4294967295));
|
|
70246
70336
|
}
|
|
70247
|
-
function
|
|
70337
|
+
function deterministicColumnId(index) {
|
|
70338
|
+
let hash2 = 2166136261;
|
|
70339
|
+
for (const ch of `a16:colId:${index}`) {
|
|
70340
|
+
hash2 ^= ch.charCodeAt(0);
|
|
70341
|
+
hash2 = Math.imul(hash2, 16777619) >>> 0;
|
|
70342
|
+
}
|
|
70343
|
+
return String(hash2);
|
|
70344
|
+
}
|
|
70345
|
+
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn, newColumnId = randomColumnId) {
|
|
70248
70346
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
70249
70347
|
const existingGridCols = ensureArrayFn(
|
|
70250
70348
|
tbl["a:tblGrid"]?.["a:gridCol"]
|
|
@@ -70275,7 +70373,7 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
70275
70373
|
// `ensureA16NamespaceOnSlideRoot`; emitting it here too is
|
|
70276
70374
|
// schema-redundant and PowerPoint flags it.
|
|
70277
70375
|
"a16:colId": {
|
|
70278
|
-
"@_val": existingColIds[i] ||
|
|
70376
|
+
"@_val": existingColIds[i] || newColumnId(i)
|
|
70279
70377
|
}
|
|
70280
70378
|
}
|
|
70281
70379
|
}
|
|
@@ -70970,7 +71068,8 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
70970
71068
|
tbl,
|
|
70971
71069
|
tableData,
|
|
70972
71070
|
_PptxHandlerRuntime.EMU_PER_PX,
|
|
70973
|
-
this.ensureArray.bind(this)
|
|
71071
|
+
this.ensureArray.bind(this),
|
|
71072
|
+
this.saveFixedDate ? deterministicColumnId : void 0
|
|
70974
71073
|
);
|
|
70975
71074
|
const rebuiltRows = this.ensureArray(tbl["a:tr"]);
|
|
70976
71075
|
for (let rIdx = 0; rIdx < tableData.rows.length; rIdx++) {
|
|
@@ -73505,9 +73604,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73505
73604
|
let maxId = 0;
|
|
73506
73605
|
for (const rel of relationships2) {
|
|
73507
73606
|
const id = String(rel?.["@_Id"] || "");
|
|
73508
|
-
const
|
|
73509
|
-
if (Number.isFinite(
|
|
73510
|
-
maxId =
|
|
73607
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
73608
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
73609
|
+
maxId = num3;
|
|
73511
73610
|
}
|
|
73512
73611
|
}
|
|
73513
73612
|
const existingFontTargets = /* @__PURE__ */ new Set();
|
|
@@ -73650,9 +73749,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73650
73749
|
let maxId = 0;
|
|
73651
73750
|
for (const rel of relationships2) {
|
|
73652
73751
|
const id = String(rel?.["@_Id"] || "");
|
|
73653
|
-
const
|
|
73654
|
-
if (Number.isFinite(
|
|
73655
|
-
maxId =
|
|
73752
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
73753
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
73754
|
+
maxId = num3;
|
|
73656
73755
|
}
|
|
73657
73756
|
}
|
|
73658
73757
|
relationships2.push({
|
|
@@ -77997,6 +78096,16 @@ var PptxHandlerRuntime42 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
77997
78096
|
message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
|
|
77998
78097
|
scope: "save",
|
|
77999
78098
|
slideId: slide.id
|
|
78099
|
+
}),
|
|
78100
|
+
buildBackgroundGradientFill: () => {
|
|
78101
|
+
const gradient = slideBackgroundGradientToWrite(slide);
|
|
78102
|
+
return gradient ? this.buildGradientFillXml({ fillMode: "gradient", ...gradient }) : void 0;
|
|
78103
|
+
},
|
|
78104
|
+
reportUnsupportedGradient: () => this.compatibilityService.reportWarning({
|
|
78105
|
+
code: "SAVE_BACKGROUND_GRADIENT_UNSUPPORTED",
|
|
78106
|
+
message: "Slide background gradient has no structured form (backgroundGradientFill) matching its CSS gradient and could not be written; the slide was saved without a background of its own.",
|
|
78107
|
+
scope: "save",
|
|
78108
|
+
slideId: slide.id
|
|
78000
78109
|
})
|
|
78001
78110
|
});
|
|
78002
78111
|
this.slideCommentPartWriter.writeComments({
|
|
@@ -80241,6 +80350,7 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80241
80350
|
/** One save, with the package to itself; callers go through {@link save}. */
|
|
80242
80351
|
async saveNow(slides, options2) {
|
|
80243
80352
|
validateSlideGeometry(slides);
|
|
80353
|
+
this.saveFixedDate = validFixedDate(options2?.fixedDate);
|
|
80244
80354
|
const templates = [
|
|
80245
80355
|
...options2?.slideMasters ?? [],
|
|
80246
80356
|
...options2?.slideLayouts ?? [],
|
|
@@ -80431,7 +80541,8 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80431
80541
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
80432
80542
|
coreProperties: options2?.coreProperties,
|
|
80433
80543
|
appProperties: options2?.appProperties,
|
|
80434
|
-
customProperties: options2?.customProperties
|
|
80544
|
+
customProperties: options2?.customProperties,
|
|
80545
|
+
fixedDate: this.saveFixedDate
|
|
80435
80546
|
});
|
|
80436
80547
|
await this.applyTagCollectionChanges(options2?.tags);
|
|
80437
80548
|
await this.applyNotesMasterChanges(options2?.notesMaster);
|
|
@@ -80475,6 +80586,11 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80475
80586
|
delete this.zip.files[name];
|
|
80476
80587
|
}
|
|
80477
80588
|
}
|
|
80589
|
+
if (this.saveFixedDate) {
|
|
80590
|
+
for (const file of Object.values(this.zip.files)) {
|
|
80591
|
+
file.date = this.saveFixedDate;
|
|
80592
|
+
}
|
|
80593
|
+
}
|
|
80478
80594
|
return await this.zip.generateAsync({
|
|
80479
80595
|
type: "uint8array",
|
|
80480
80596
|
compression: "DEFLATE",
|
|
@@ -80559,6 +80675,15 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80559
80675
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
80560
80676
|
}
|
|
80561
80677
|
};
|
|
80678
|
+
function validFixedDate(date) {
|
|
80679
|
+
if (date === void 0) {
|
|
80680
|
+
return void 0;
|
|
80681
|
+
}
|
|
80682
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
80683
|
+
throw new RangeError("PptxHandlerSaveOptions.fixedDate must be a valid Date");
|
|
80684
|
+
}
|
|
80685
|
+
return date;
|
|
80686
|
+
}
|
|
80562
80687
|
|
|
80563
80688
|
// pptx/core/core/runtime/PptxHandlerRuntimeElementParsing.ts
|
|
80564
80689
|
var SPECIAL_PLACEHOLDER_TYPES = /* @__PURE__ */ new Set(["dt", "ftr", "hdr", "sldnum"]);
|
|
@@ -90015,8 +90140,8 @@ function parseNumberVal(node) {
|
|
|
90015
90140
|
if (raw2 === void 0 || raw2 === null || raw2 === "") {
|
|
90016
90141
|
return void 0;
|
|
90017
90142
|
}
|
|
90018
|
-
const
|
|
90019
|
-
return Number.isFinite(
|
|
90143
|
+
const num3 = Number.parseFloat(String(raw2));
|
|
90144
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
90020
90145
|
}
|
|
90021
90146
|
var PptxHandlerRuntime93 = class extends PptxHandlerRuntime92 {
|
|
90022
90147
|
/**
|
|
@@ -92483,12 +92608,12 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
92483
92608
|
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
92484
92609
|
* them, the deck's.
|
|
92485
92610
|
*/
|
|
92486
|
-
async writeFormatScheme(
|
|
92611
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
92487
92612
|
const deckBefore = this.getThemeFormatScheme();
|
|
92488
92613
|
const replaced = /* @__PURE__ */ new Map();
|
|
92489
92614
|
const schemes = /* @__PURE__ */ new Map();
|
|
92490
92615
|
const written = await this.rewriteThemeParts(themePaths, (data, path3) => {
|
|
92491
|
-
const element2 =
|
|
92616
|
+
const element2 = elementFor(path3);
|
|
92492
92617
|
const elements2 = data["a:theme"]?.["a:themeElements"];
|
|
92493
92618
|
if (!element2 || !elements2) {
|
|
92494
92619
|
return false;
|
|
@@ -92526,7 +92651,7 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
92526
92651
|
this.themeFormatScheme = deck;
|
|
92527
92652
|
this.heldFormatSchemes.holdParts(
|
|
92528
92653
|
deck,
|
|
92529
|
-
new Map(written.map((path3) => [path3,
|
|
92654
|
+
new Map(written.map((path3) => [path3, elementFor(path3)]))
|
|
92530
92655
|
);
|
|
92531
92656
|
}
|
|
92532
92657
|
return this.getThemeFormatScheme();
|
|
@@ -96770,6 +96895,80 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
96770
96895
|
}
|
|
96771
96896
|
};
|
|
96772
96897
|
|
|
96898
|
+
// pptx/core/builders/sdk/background-gradient-input.ts
|
|
96899
|
+
var HEX = /^#?[0-9a-f]{6}$/iu;
|
|
96900
|
+
var PATHS = /* @__PURE__ */ new Set(["circle", "rect", "shape"]);
|
|
96901
|
+
var WHERE = "BackgroundInput";
|
|
96902
|
+
function finite3(name, value, min, max) {
|
|
96903
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
96904
|
+
throw new RangeError(`${WHERE}.${name} must be a finite number, got ${String(value)}`);
|
|
96905
|
+
}
|
|
96906
|
+
if (min !== void 0 && value < min || max !== void 0 && value > max) {
|
|
96907
|
+
throw new RangeError(`${WHERE}.${name} must be between ${min} and ${max}, got ${value}`);
|
|
96908
|
+
}
|
|
96909
|
+
return value;
|
|
96910
|
+
}
|
|
96911
|
+
function stopsOf(input) {
|
|
96912
|
+
if (!Array.isArray(input.stops) || input.stops.length < 2) {
|
|
96913
|
+
throw new RangeError(`${WHERE}.stops needs at least two stops (a:gsLst)`);
|
|
96914
|
+
}
|
|
96915
|
+
return input.stops.map((stop, index) => {
|
|
96916
|
+
if (typeof stop.color !== "string" || !HEX.test(stop.color)) {
|
|
96917
|
+
throw new RangeError(
|
|
96918
|
+
`${WHERE}.stops[${index}].color must be #RRGGBB, got ${String(stop.color)}`
|
|
96919
|
+
);
|
|
96920
|
+
}
|
|
96921
|
+
const position3 = finite3(`stops[${index}].position`, stop.position, 0, 1);
|
|
96922
|
+
const opacity2 = stop.opacity === void 0 ? void 0 : finite3(`stops[${index}].opacity`, stop.opacity, 0, 1);
|
|
96923
|
+
return {
|
|
96924
|
+
color: `#${stop.color.replace("#", "").toUpperCase()}`,
|
|
96925
|
+
// The shape gradient model keeps positions in percent.
|
|
96926
|
+
position: position3 * 100,
|
|
96927
|
+
...opacity2 !== void 0 ? { opacity: opacity2 } : {}
|
|
96928
|
+
};
|
|
96929
|
+
});
|
|
96930
|
+
}
|
|
96931
|
+
function mapBackgroundGradientInput(input) {
|
|
96932
|
+
const fillGradientStops = stopsOf(input);
|
|
96933
|
+
let gradient;
|
|
96934
|
+
if (input.path !== void 0) {
|
|
96935
|
+
if (!PATHS.has(input.path)) {
|
|
96936
|
+
throw new RangeError(
|
|
96937
|
+
`${WHERE}.path must be circle, rect or shape, got ${String(input.path)}`
|
|
96938
|
+
);
|
|
96939
|
+
}
|
|
96940
|
+
if (input.angle !== void 0) {
|
|
96941
|
+
throw new RangeError(`${WHERE}.angle applies to a linear gradient, not a path one`);
|
|
96942
|
+
}
|
|
96943
|
+
const focus = input.focus ?? { l: 0.5, t: 0.5, r: 0.5, b: 0.5 };
|
|
96944
|
+
gradient = {
|
|
96945
|
+
fillGradientType: "radial",
|
|
96946
|
+
fillGradientPathType: input.path,
|
|
96947
|
+
fillGradientStops,
|
|
96948
|
+
fillGradientFillToRect: {
|
|
96949
|
+
l: finite3("focus.l", focus.l),
|
|
96950
|
+
t: finite3("focus.t", focus.t),
|
|
96951
|
+
r: finite3("focus.r", focus.r),
|
|
96952
|
+
b: finite3("focus.b", focus.b)
|
|
96953
|
+
}
|
|
96954
|
+
};
|
|
96955
|
+
} else {
|
|
96956
|
+
if (input.focus !== void 0) {
|
|
96957
|
+
throw new RangeError(`${WHERE}.focus needs a path gradient`);
|
|
96958
|
+
}
|
|
96959
|
+
const cssAngle = finite3("angle", input.angle ?? 180);
|
|
96960
|
+
gradient = {
|
|
96961
|
+
fillGradientType: "linear",
|
|
96962
|
+
fillGradientAngle: cssDegreesToOoxmlGradientAngle(cssAngle),
|
|
96963
|
+
fillGradientStops
|
|
96964
|
+
};
|
|
96965
|
+
}
|
|
96966
|
+
return {
|
|
96967
|
+
backgroundGradient: slideBackgroundGradientCss(gradient),
|
|
96968
|
+
backgroundGradientFill: gradient
|
|
96969
|
+
};
|
|
96970
|
+
}
|
|
96971
|
+
|
|
96773
96972
|
// pptx/core/builders/sdk/chart-gradient-input.ts
|
|
96774
96973
|
var HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
|
|
96775
96974
|
var FULL_TURN = 360;
|
|
@@ -97416,6 +97615,48 @@ function applyChartInputLayout(element2, input) {
|
|
|
97416
97615
|
}
|
|
97417
97616
|
}
|
|
97418
97617
|
|
|
97618
|
+
// pptx/core/builders/sdk/picture-effects-input.ts
|
|
97619
|
+
function pictureEffectsFromInput(options2) {
|
|
97620
|
+
const { opacity: opacity2, brightness, contrast } = options2 ?? {};
|
|
97621
|
+
if (opacity2 !== void 0 && !(opacity2 >= 0 && opacity2 <= 1)) {
|
|
97622
|
+
throw new RangeError(`ImageOptions.opacity must be between 0 and 1, got ${opacity2}`);
|
|
97623
|
+
}
|
|
97624
|
+
const patch = {};
|
|
97625
|
+
if (opacity2 !== void 0 && opacity2 < 1) {
|
|
97626
|
+
patch.alpha = opacity2;
|
|
97627
|
+
}
|
|
97628
|
+
if (brightness !== void 0) {
|
|
97629
|
+
patch.brightness = brightness / 100;
|
|
97630
|
+
}
|
|
97631
|
+
if (contrast !== void 0) {
|
|
97632
|
+
patch.contrast = contrast / 100;
|
|
97633
|
+
}
|
|
97634
|
+
if (Object.keys(patch).length === 0) {
|
|
97635
|
+
return void 0;
|
|
97636
|
+
}
|
|
97637
|
+
let patched;
|
|
97638
|
+
try {
|
|
97639
|
+
patched = patchPictureEffects([], patch);
|
|
97640
|
+
} catch (error) {
|
|
97641
|
+
throw new RangeError(
|
|
97642
|
+
`ImageOptions.brightness and contrast must be finite percentages from -100 to 100 (${String(error)})`
|
|
97643
|
+
);
|
|
97644
|
+
}
|
|
97645
|
+
let effects2;
|
|
97646
|
+
for (const effect of patched) {
|
|
97647
|
+
effects2 ??= {};
|
|
97648
|
+
if (effect.kind === "alphaModFix") {
|
|
97649
|
+
effects2.alphaModFix = effect.amount * 100;
|
|
97650
|
+
} else if (effect.kind === "luminance") {
|
|
97651
|
+
effects2.lum = {
|
|
97652
|
+
...effect.brightness !== void 0 ? { bright: effect.brightness * 100 } : {},
|
|
97653
|
+
...effect.contrast !== void 0 ? { contrast: effect.contrast * 100 } : {}
|
|
97654
|
+
};
|
|
97655
|
+
}
|
|
97656
|
+
}
|
|
97657
|
+
return effects2;
|
|
97658
|
+
}
|
|
97659
|
+
|
|
97419
97660
|
// pptx/core/builders/sdk/shape-style-input.ts
|
|
97420
97661
|
var DASH_UNITS_PER_WIDTH = 1e5;
|
|
97421
97662
|
var MITER_UNITS_PER_RATIO = 1e5;
|
|
@@ -98045,12 +98286,13 @@ function createConnectorElement(options2) {
|
|
|
98045
98286
|
function createImageElement(source, options2) {
|
|
98046
98287
|
const p = pos("image", options2);
|
|
98047
98288
|
const isDataUrl = source.startsWith("data:");
|
|
98289
|
+
const imageEffects = pictureEffectsFromInput(options2);
|
|
98048
98290
|
return {
|
|
98049
98291
|
type: "image",
|
|
98050
98292
|
id: generateId("img"),
|
|
98051
98293
|
...p,
|
|
98052
98294
|
rotation: options2?.rotation,
|
|
98053
|
-
|
|
98295
|
+
...imageEffects ? { imageEffects } : {},
|
|
98054
98296
|
imagePath: isDataUrl ? void 0 : source,
|
|
98055
98297
|
imageData: isDataUrl ? source : void 0,
|
|
98056
98298
|
altText: options2?.altText,
|
|
@@ -98322,12 +98564,12 @@ var SlideBuilder = class {
|
|
|
98322
98564
|
switch (bg.type) {
|
|
98323
98565
|
case "solid":
|
|
98324
98566
|
this.slide.backgroundColor = bg.color;
|
|
98567
|
+
delete this.slide.backgroundGradient;
|
|
98568
|
+
delete this.slide.backgroundGradientFill;
|
|
98325
98569
|
break;
|
|
98326
|
-
case "gradient":
|
|
98327
|
-
|
|
98328
|
-
this.slide.backgroundGradient = `linear-gradient(${bg.angle ?? 180}deg, ${stops})`;
|
|
98570
|
+
case "gradient":
|
|
98571
|
+
Object.assign(this.slide, mapBackgroundGradientInput(bg));
|
|
98329
98572
|
break;
|
|
98330
|
-
}
|
|
98331
98573
|
case "image":
|
|
98332
98574
|
this.slide.backgroundImage = bg.source;
|
|
98333
98575
|
break;
|
|
@@ -98703,6 +98945,56 @@ function findLayoutByType(data, type) {
|
|
|
98703
98945
|
return void 0;
|
|
98704
98946
|
}
|
|
98705
98947
|
|
|
98948
|
+
// pptx/core/builders/sdk/presentation-app-properties.ts
|
|
98949
|
+
var INPUT_FIELDS = /* @__PURE__ */ new Set([
|
|
98950
|
+
"application",
|
|
98951
|
+
"appVersion",
|
|
98952
|
+
"presentationFormat",
|
|
98953
|
+
"company",
|
|
98954
|
+
"manager",
|
|
98955
|
+
"template"
|
|
98956
|
+
]);
|
|
98957
|
+
var APP_VERSION = /^\d+\.\d{4}$/u;
|
|
98958
|
+
function blankAppXml(slideCount) {
|
|
98959
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
98960
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
|
|
98961
|
+
xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
|
|
98962
|
+
<Application>pptx-viewer-sdk</Application>
|
|
98963
|
+
<Slides>${slideCount}</Slides>
|
|
98964
|
+
<ScaleCrop>false</ScaleCrop>
|
|
98965
|
+
<LinksUpToDate>false</LinksUpToDate>
|
|
98966
|
+
<SharedDoc>false</SharedDoc>
|
|
98967
|
+
<HyperlinksChanged>false</HyperlinksChanged>
|
|
98968
|
+
<AppVersion>1.0000</AppVersion>
|
|
98969
|
+
</Properties>`;
|
|
98970
|
+
}
|
|
98971
|
+
function validate(input) {
|
|
98972
|
+
for (const [field, value] of Object.entries(input)) {
|
|
98973
|
+
if (!INPUT_FIELDS.has(field)) {
|
|
98974
|
+
throw new RangeError(
|
|
98975
|
+
`appProperties.${field} cannot be set when a presentation is created; it takes ${[...INPUT_FIELDS].join(", ")} (counts are computed on save)`
|
|
98976
|
+
);
|
|
98977
|
+
}
|
|
98978
|
+
if (value !== void 0 && typeof value !== "string") {
|
|
98979
|
+
throw new RangeError(`appProperties.${field} must be a string`);
|
|
98980
|
+
}
|
|
98981
|
+
}
|
|
98982
|
+
const version = input.appVersion?.trim();
|
|
98983
|
+
if (version && !APP_VERSION.test(version)) {
|
|
98984
|
+
throw new RangeError(
|
|
98985
|
+
`appProperties.appVersion must be digits, a dot and four digits (e.g. "16.0000"), got "${input.appVersion}"`
|
|
98986
|
+
);
|
|
98987
|
+
}
|
|
98988
|
+
}
|
|
98989
|
+
function newPresentationAppXml(slideCount, input) {
|
|
98990
|
+
const xml = blankAppXml(slideCount);
|
|
98991
|
+
if (input === void 0) {
|
|
98992
|
+
return xml;
|
|
98993
|
+
}
|
|
98994
|
+
validate(input);
|
|
98995
|
+
return writeAppProperties(applyAppOverrides(parseAppProperties(xml), input), xml);
|
|
98996
|
+
}
|
|
98997
|
+
|
|
98706
98998
|
// pptx/core/builders/sdk/standard-layout-placeholders.ts
|
|
98707
98999
|
function standardLayoutPlaceholders(type, width, height) {
|
|
98708
99000
|
if (type === "blank") return [];
|
|
@@ -99060,19 +99352,6 @@ function corePropsXml(title, creator) {
|
|
|
99060
99352
|
<dcterms:modified xsi:type="dcterms:W3CDTF">${now}</dcterms:modified>
|
|
99061
99353
|
</cp:coreProperties>`;
|
|
99062
99354
|
}
|
|
99063
|
-
function appPropsXml(slideCount) {
|
|
99064
|
-
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
99065
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
|
|
99066
|
-
xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
|
|
99067
|
-
<Application>pptx-viewer-sdk</Application>
|
|
99068
|
-
<Slides>${slideCount}</Slides>
|
|
99069
|
-
<ScaleCrop>false</ScaleCrop>
|
|
99070
|
-
<LinksUpToDate>false</LinksUpToDate>
|
|
99071
|
-
<SharedDoc>false</SharedDoc>
|
|
99072
|
-
<HyperlinksChanged>false</HyperlinksChanged>
|
|
99073
|
-
<AppVersion>1.0000</AppVersion>
|
|
99074
|
-
</Properties>`;
|
|
99075
|
-
}
|
|
99076
99355
|
async function buildBlankPresentationArchive(options2) {
|
|
99077
99356
|
const width = options2?.width ?? DEFAULT_WIDTH;
|
|
99078
99357
|
const height = options2?.height ?? DEFAULT_HEIGHT;
|
|
@@ -99114,7 +99393,7 @@ async function buildBlankPresentationArchive(options2) {
|
|
|
99114
99393
|
zip.file("ppt/viewProps.xml", viewPropsXml());
|
|
99115
99394
|
zip.file("ppt/tableStyles.xml", tableStylesXml());
|
|
99116
99395
|
zip.file("docProps/core.xml", corePropsXml(options2?.title, options2?.creator));
|
|
99117
|
-
zip.file("docProps/app.xml",
|
|
99396
|
+
zip.file("docProps/app.xml", newPresentationAppXml(initialSlideCount, options2?.appProperties));
|
|
99118
99397
|
return zip.generateAsync({ type: "arraybuffer" });
|
|
99119
99398
|
}
|
|
99120
99399
|
var PresentationBuilder = class {
|