ooxml-core 1.27.1 → 1.28.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-OIR3ZY4Q.mjs → PptxHandler-AFVUHNJO.mjs} +3 -3
- package/dist/PptxHandler-EZW4YAWL.mjs +4 -0
- package/dist/{PptxHandler-NHOKKZ4S.cjs → PptxHandler-WI23AJHM.cjs} +3 -3
- package/dist/{PresentationBuilder-RFTSZUPR.mjs → PresentationBuilder-DYEHCRHX.mjs} +2 -2
- package/dist/{PresentationBuilder-EX6DAE5X.cjs → PresentationBuilder-KUNPJTRL.cjs} +5 -5
- package/dist/{PresentationBuilder-X5WFSHLB.mjs → PresentationBuilder-WGTZPVOG.mjs} +3 -3
- package/dist/automation/index.cjs +16 -7
- package/dist/automation/index.mjs +16 -7
- package/dist/chart/index.cjs +16 -7
- package/dist/chart/index.mjs +16 -7
- package/dist/{chunk-36TR3PER.cjs → chunk-A2PC3CBO.cjs} +28 -7
- package/dist/{chunk-ZWTXVWMY.mjs → chunk-D7CAHL6J.mjs} +1 -1
- package/dist/{chunk-JJ37PCNR.mjs → chunk-EYCM7RVL.mjs} +28 -7
- package/dist/{chunk-DMJIDRJE.cjs → chunk-IQ7CB7BJ.cjs} +1771 -1319
- package/dist/{chunk-5NJPYCGO.mjs → chunk-LGSBK3BV.mjs} +258 -258
- package/dist/{chunk-I57SMSU6.mjs → chunk-LNPVKKR5.mjs} +28 -7
- package/dist/{chunk-GZ4DIXZZ.mjs → chunk-N5ROEHEQ.mjs} +699 -247
- package/dist/{chunk-QIMNQDON.mjs → chunk-RCEHCVLC.mjs} +1 -1
- package/dist/{chunk-BXZF7H5G.mjs → chunk-V33RUK4D.mjs} +5 -5
- package/dist/{chunk-5KJAQKZG.mjs → chunk-YNGMSNF4.mjs} +718 -246
- package/dist/docx/embedded.cjs +16 -7
- package/dist/docx/embedded.mjs +16 -7
- package/dist/docx/index.cjs +16 -7
- package/dist/docx/index.mjs +16 -7
- package/dist/docx/load/index.cjs +16 -7
- package/dist/docx/load/index.mjs +16 -7
- package/dist/index.cjs +16 -7
- package/dist/index.mjs +16 -7
- package/dist/opc/index.cjs +16 -7
- package/dist/opc/index.mjs +16 -7
- package/dist/opc/zip-limits.d.ts +8 -1
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +1009 -505
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{index-D8DNpc1X.d.ts → index-0slnMhMO.d.ts} +161 -12
- package/dist/pptx/chunks/index-0slnMhMO.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-D4FnOx6x.d.ts → index-DP-R2qY1.d.ts} +3 -3
- package/dist/pptx/chunks/{index-D4FnOx6x.d.ts.map → index-DP-R2qY1.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-GWpMAY-f.d.ts → index-OQwOyNYK.d.ts} +4 -4
- package/dist/pptx/chunks/{index-GWpMAY-f.d.ts.map → index-OQwOyNYK.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts → text-operations-dyvh8gyE.d.ts} +23 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts.map → text-operations-dyvh8gyE.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +834 -333
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +1249 -726
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/signature-node/index.cjs +28 -7
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/visio/index.cjs +14 -6
- package/dist/visio/index.mjs +14 -6
- package/dist/visio/ui/index.cjs +14 -6
- package/dist/visio/ui/index.mjs +14 -6
- package/dist/xlsx/index.cjs +14 -6
- package/dist/xlsx/index.mjs +14 -6
- package/dist/xlsx/load/index.cjs +14 -6
- package/dist/xlsx/load/index.mjs +14 -6
- package/dist/xlsx/ui/index.cjs +14 -6
- package/dist/xlsx/ui/index.mjs +14 -6
- package/package.json +5 -5
- package/dist/PptxHandler-TZJNIXPX.mjs +0 -4
- package/dist/pptx/chunks/index-D8DNpc1X.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, attr, childrenNamed, childNamed, parseCellAddress, readChartManualLayoutValues, worksheetData, formatCellAddress, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText,
|
|
2
|
-
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openZip, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError
|
|
1
|
+
import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, attr, childrenNamed, childNamed, parseCellAddress, readChartManualLayoutValues, worksheetData, formatCellAddress, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-LGSBK3BV.mjs';
|
|
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-3GXV5MPC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-54S5A5PZ.mjs';
|
|
5
5
|
import { themeColorRefFromColorChoice, parseOoxmlPercent, themeColorRefToSolidFillWithOpacity, applyDrawingColorTransforms, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, themeColorRefFromSchemeClr, blendColorOntoWhite } from './chunk-KII4AAYH.mjs';
|
|
@@ -7,6 +7,198 @@ import JSZip from 'jszip';
|
|
|
7
7
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
8
8
|
import { decompressEotFont } from 'mtx-decompressor';
|
|
9
9
|
|
|
10
|
+
// pptx/core/core/load-limits.ts
|
|
11
|
+
var DEFAULT_PPTX_LOAD_LIMITS = Object.freeze({
|
|
12
|
+
maxInputBytes: Number.POSITIVE_INFINITY,
|
|
13
|
+
maxUncompressedBytes: DEFAULT_MAX_UNCOMPRESSED_BYTES,
|
|
14
|
+
maxEntries: MAX_ZIP_ENTRY_COUNT,
|
|
15
|
+
maxSlides: Number.POSITIVE_INFINITY,
|
|
16
|
+
maxShapes: Number.POSITIVE_INFINITY
|
|
17
|
+
});
|
|
18
|
+
var LIMIT_NAMES = Object.keys(DEFAULT_PPTX_LOAD_LIMITS);
|
|
19
|
+
var PptxLoadLimitError = class extends Error {
|
|
20
|
+
code = "PPTX_LOAD_LIMIT";
|
|
21
|
+
/** The limit that was exceeded. */
|
|
22
|
+
limit;
|
|
23
|
+
/** The value of that limit. */
|
|
24
|
+
maximum;
|
|
25
|
+
/**
|
|
26
|
+
* The observed value: exact for `maxSlides` and for `maxInputBytes` on
|
|
27
|
+
* `load()`; for `maxShapes`, and for `maxInputBytes` on `loadFromJson()`
|
|
28
|
+
* (which stops counting once past the limit), a lower bound.
|
|
29
|
+
*/
|
|
30
|
+
actual;
|
|
31
|
+
constructor(message, limit, maximum, actual) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.name = "PptxLoadLimitError";
|
|
34
|
+
this.limit = limit;
|
|
35
|
+
this.maximum = maximum;
|
|
36
|
+
this.actual = actual;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function isLimitName(value) {
|
|
40
|
+
return typeof value === "string" && LIMIT_NAMES.includes(value);
|
|
41
|
+
}
|
|
42
|
+
function getPptxLoadLimitViolation(error) {
|
|
43
|
+
if (typeof error !== "object" || error === null) {
|
|
44
|
+
return void 0;
|
|
45
|
+
}
|
|
46
|
+
const fields = error;
|
|
47
|
+
const actual = typeof fields.actual === "number" ? fields.actual : void 0;
|
|
48
|
+
if (fields.code === "PPTX_LOAD_LIMIT" && isLimitName(fields.limit) && typeof fields.maximum === "number") {
|
|
49
|
+
return { limit: fields.limit, maximum: fields.maximum, actual };
|
|
50
|
+
}
|
|
51
|
+
if (fields.code === "ZIP_BOMB" && isLimitName(fields.loadLimit) && typeof fields.limit === "number") {
|
|
52
|
+
return { limit: fields.loadLimit, maximum: fields.limit, actual };
|
|
53
|
+
}
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
function resolvePptxLoadLimits(options = {}) {
|
|
57
|
+
const resolved = { ...DEFAULT_PPTX_LOAD_LIMITS };
|
|
58
|
+
const legacy = options.maxUncompressedBytes;
|
|
59
|
+
if (typeof legacy === "number" && legacy > 0) {
|
|
60
|
+
resolved.maxUncompressedBytes = legacy;
|
|
61
|
+
}
|
|
62
|
+
const limits = options.limits;
|
|
63
|
+
if (limits === void 0 || limits === null) {
|
|
64
|
+
return resolved;
|
|
65
|
+
}
|
|
66
|
+
for (const name of LIMIT_NAMES) {
|
|
67
|
+
const value = limits[name];
|
|
68
|
+
if (value === void 0) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
72
|
+
throw new RangeError(`limits.${name} must be a positive finite number`);
|
|
73
|
+
}
|
|
74
|
+
if (name === "maxEntries" && value > MAX_ZIP_ENTRY_COUNT) {
|
|
75
|
+
throw new RangeError(`limits.maxEntries must not exceed ${MAX_ZIP_ENTRY_COUNT}`);
|
|
76
|
+
}
|
|
77
|
+
resolved[name] = value;
|
|
78
|
+
}
|
|
79
|
+
return resolved;
|
|
80
|
+
}
|
|
81
|
+
function createPptxZipBombError(message, details) {
|
|
82
|
+
const { limit, kind, actual } = details;
|
|
83
|
+
if (kind === "maxEntries") {
|
|
84
|
+
return new ZipBombError(message, {
|
|
85
|
+
limit,
|
|
86
|
+
loadLimit: "maxEntries",
|
|
87
|
+
...actual === void 0 ? {} : { entryCount: actual, actual }
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
if (kind === "maxEntryBytes" || kind === "maxTotalBytes") {
|
|
91
|
+
return new ZipBombError(message, {
|
|
92
|
+
limit,
|
|
93
|
+
loadLimit: "maxUncompressedBytes",
|
|
94
|
+
...actual === void 0 ? {} : { uncompressedBytes: actual, actual }
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return new ZipBombError(message, { limit });
|
|
98
|
+
}
|
|
99
|
+
var count = (value) => value.toLocaleString("en-US");
|
|
100
|
+
function assertPptxInputWithinLimits(byteLength, limits) {
|
|
101
|
+
if (byteLength > limits.maxInputBytes) {
|
|
102
|
+
throw new PptxLoadLimitError(
|
|
103
|
+
`PPTX input is ${count(byteLength)} bytes, more than the maxInputBytes limit of ${count(limits.maxInputBytes)}`,
|
|
104
|
+
"maxInputBytes",
|
|
105
|
+
limits.maxInputBytes,
|
|
106
|
+
byteLength
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function assertPptxTextWithinLimits(text, limits) {
|
|
111
|
+
const maximum = limits.maxInputBytes;
|
|
112
|
+
if (text.length * 3 <= maximum) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const bytes = text.length > maximum ? text.length : utf8ByteLengthPast(text, maximum);
|
|
116
|
+
if (bytes > maximum) {
|
|
117
|
+
throw new PptxLoadLimitError(
|
|
118
|
+
`PPTX input is at least ${count(bytes)} bytes, more than the maxInputBytes limit of ${count(maximum)}`,
|
|
119
|
+
"maxInputBytes",
|
|
120
|
+
maximum,
|
|
121
|
+
bytes
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function utf8ByteLengthPast(text, maximum) {
|
|
126
|
+
let bytes = 0;
|
|
127
|
+
for (let index = 0; index < text.length && bytes <= maximum; index++) {
|
|
128
|
+
const unit = text.charCodeAt(index);
|
|
129
|
+
if (unit < 128) {
|
|
130
|
+
bytes += 1;
|
|
131
|
+
} else if (unit < 2048) {
|
|
132
|
+
bytes += 2;
|
|
133
|
+
} else if (unit >= 55296 && unit <= 56319 && isLowSurrogate(text.charCodeAt(index + 1))) {
|
|
134
|
+
bytes += 4;
|
|
135
|
+
index++;
|
|
136
|
+
} else {
|
|
137
|
+
bytes += 3;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return bytes;
|
|
141
|
+
}
|
|
142
|
+
function isLowSurrogate(unit) {
|
|
143
|
+
return unit >= 56320 && unit <= 57343;
|
|
144
|
+
}
|
|
145
|
+
function assertPptxSlideCountWithinLimits(slideCount, limits) {
|
|
146
|
+
if (slideCount > limits.maxSlides) {
|
|
147
|
+
throw new PptxLoadLimitError(
|
|
148
|
+
`PPTX presentation has ${count(slideCount)} slides, more than the maxSlides limit of ${count(limits.maxSlides)}`,
|
|
149
|
+
"maxSlides",
|
|
150
|
+
limits.maxSlides,
|
|
151
|
+
slideCount
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function countPptxShapesWithinLimits(counted, elements2, limits) {
|
|
156
|
+
const maximum = limits.maxShapes;
|
|
157
|
+
if (maximum === Number.POSITIVE_INFINITY) {
|
|
158
|
+
return counted;
|
|
159
|
+
}
|
|
160
|
+
const total = counted + countAuthoredElements(elements2);
|
|
161
|
+
if (total > maximum) {
|
|
162
|
+
throw new PptxLoadLimitError(
|
|
163
|
+
`PPTX presentation has at least ${count(total)} shapes, more than the maxShapes limit of ${count(maximum)}`,
|
|
164
|
+
"maxShapes",
|
|
165
|
+
maximum,
|
|
166
|
+
total
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
return total;
|
|
170
|
+
}
|
|
171
|
+
function countAuthoredElements(elements2) {
|
|
172
|
+
let total = 0;
|
|
173
|
+
const lists = [elements2];
|
|
174
|
+
const positions = [0];
|
|
175
|
+
while (lists.length > 0) {
|
|
176
|
+
const top = lists.length - 1;
|
|
177
|
+
const list2 = lists[top];
|
|
178
|
+
const position2 = positions[top];
|
|
179
|
+
if (position2 >= list2.length) {
|
|
180
|
+
lists.pop();
|
|
181
|
+
positions.pop();
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
positions[top] = position2 + 1;
|
|
185
|
+
const element = list2[position2];
|
|
186
|
+
if (typeof element !== "object" || element === null) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const { id, type, children: children6 } = element;
|
|
190
|
+
if (typeof id === "string" && isTemplateElementId(id)) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
total++;
|
|
194
|
+
if (type === "group" && Array.isArray(children6) && children6.length > 0) {
|
|
195
|
+
lists.push(children6);
|
|
196
|
+
positions.push(0);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return total;
|
|
200
|
+
}
|
|
201
|
+
|
|
10
202
|
// drawingml/dom.ts
|
|
11
203
|
function attributeReader(element) {
|
|
12
204
|
return (name) => {
|
|
@@ -644,8 +836,8 @@ function readPairs(element, vt) {
|
|
|
644
836
|
const out = [];
|
|
645
837
|
for (let i = 0; i + 1 < variants.length; i += 2) {
|
|
646
838
|
const name = variants[i]?.textContent ?? "";
|
|
647
|
-
const
|
|
648
|
-
out.push({ name, count: Number.isFinite(
|
|
839
|
+
const count2 = Number.parseInt(variants[i + 1]?.textContent ?? "", 10);
|
|
840
|
+
out.push({ name, count: Number.isFinite(count2) ? count2 : 0 });
|
|
649
841
|
}
|
|
650
842
|
return out;
|
|
651
843
|
}
|
|
@@ -815,9 +1007,9 @@ function customPropertyFromText(name, type, text) {
|
|
|
815
1007
|
function titleGroups(headingPairs, titlesOfParts) {
|
|
816
1008
|
let offset = 0;
|
|
817
1009
|
return headingPairs.map((pair) => {
|
|
818
|
-
const
|
|
819
|
-
const titles = titlesOfParts.slice(offset, offset +
|
|
820
|
-
offset +=
|
|
1010
|
+
const count2 = Math.max(0, pair.count);
|
|
1011
|
+
const titles = titlesOfParts.slice(offset, offset + count2);
|
|
1012
|
+
offset += count2;
|
|
821
1013
|
return { name: pair.name, titles };
|
|
822
1014
|
});
|
|
823
1015
|
}
|
|
@@ -7156,7 +7348,7 @@ function parsedParagraphSignature(paragraph2) {
|
|
|
7156
7348
|
return signatureOf(counts);
|
|
7157
7349
|
}
|
|
7158
7350
|
function signatureOf(counts) {
|
|
7159
|
-
return [...counts.entries()].sort((a, b) => a[0] < b[0] ? -1 : 1).map(([name,
|
|
7351
|
+
return [...counts.entries()].sort((a, b) => a[0] < b[0] ? -1 : 1).map(([name, count2]) => `${name}:${count2}`).join(",");
|
|
7160
7352
|
}
|
|
7161
7353
|
function collectParsedParagraphs(root) {
|
|
7162
7354
|
const result = [];
|
|
@@ -10310,23 +10502,23 @@ function classify(chars, index) {
|
|
|
10310
10502
|
}
|
|
10311
10503
|
function countParagraphWords(text) {
|
|
10312
10504
|
const chars = Array.from(text);
|
|
10313
|
-
let
|
|
10505
|
+
let count2 = 0;
|
|
10314
10506
|
let previous = "none";
|
|
10315
10507
|
for (let index = 0; index < chars.length; index++) {
|
|
10316
10508
|
const kind = classify(chars, index);
|
|
10317
10509
|
if (kind === "space") {
|
|
10318
10510
|
if (previous === "none" || previous === "control") {
|
|
10319
|
-
|
|
10511
|
+
count2++;
|
|
10320
10512
|
}
|
|
10321
10513
|
previous = "space";
|
|
10322
10514
|
continue;
|
|
10323
10515
|
}
|
|
10324
10516
|
if (kind === "ideograph" || kind === "control" || kind !== previous) {
|
|
10325
|
-
|
|
10517
|
+
count2++;
|
|
10326
10518
|
}
|
|
10327
10519
|
previous = kind;
|
|
10328
10520
|
}
|
|
10329
|
-
return
|
|
10521
|
+
return count2;
|
|
10330
10522
|
}
|
|
10331
10523
|
|
|
10332
10524
|
// pptx/core/utils/app-properties-text-stats.ts
|
|
@@ -10812,6 +11004,91 @@ function applyBackground(style, background) {
|
|
|
10812
11004
|
style.fillOpacity = 0;
|
|
10813
11005
|
}
|
|
10814
11006
|
|
|
11007
|
+
// pptx/core/core/runtime/load-part-reader.ts
|
|
11008
|
+
var openReaders = /* @__PURE__ */ new WeakMap();
|
|
11009
|
+
var LoadPartReader = class {
|
|
11010
|
+
constructor(zip) {
|
|
11011
|
+
this.zip = zip;
|
|
11012
|
+
openReaders.set(zip, this);
|
|
11013
|
+
}
|
|
11014
|
+
zip;
|
|
11015
|
+
parts = /* @__PURE__ */ new Map();
|
|
11016
|
+
closed = false;
|
|
11017
|
+
entry(path3) {
|
|
11018
|
+
const file = this.zip.file(path3);
|
|
11019
|
+
if (!file) {
|
|
11020
|
+
this.parts.delete(path3);
|
|
11021
|
+
return void 0;
|
|
11022
|
+
}
|
|
11023
|
+
const previous = this.parts.get(path3);
|
|
11024
|
+
if (previous?.file === file) {
|
|
11025
|
+
return previous;
|
|
11026
|
+
}
|
|
11027
|
+
const entry2 = { file, text: file.async("string"), relationships: /* @__PURE__ */ new Map() };
|
|
11028
|
+
this.parts.set(path3, entry2);
|
|
11029
|
+
entry2.text.catch(() => {
|
|
11030
|
+
if (this.parts.get(path3) === entry2) {
|
|
11031
|
+
this.parts.delete(path3);
|
|
11032
|
+
}
|
|
11033
|
+
});
|
|
11034
|
+
return entry2;
|
|
11035
|
+
}
|
|
11036
|
+
readText(path3) {
|
|
11037
|
+
return this.entry(path3)?.text ?? Promise.resolve(void 0);
|
|
11038
|
+
}
|
|
11039
|
+
async readXml(parser, path3) {
|
|
11040
|
+
const entry2 = this.entry(path3);
|
|
11041
|
+
if (!entry2) {
|
|
11042
|
+
return void 0;
|
|
11043
|
+
}
|
|
11044
|
+
if (!path3.endsWith(".rels")) {
|
|
11045
|
+
return parseText(parser, await entry2.text);
|
|
11046
|
+
}
|
|
11047
|
+
let parsed = entry2.relationships.get(parser);
|
|
11048
|
+
if (!parsed) {
|
|
11049
|
+
const pending = entry2.text.then((text) => parseText(parser, text));
|
|
11050
|
+
entry2.relationships.set(parser, pending);
|
|
11051
|
+
pending.catch(() => {
|
|
11052
|
+
if (entry2.relationships.get(parser) === pending) {
|
|
11053
|
+
entry2.relationships.delete(parser);
|
|
11054
|
+
}
|
|
11055
|
+
});
|
|
11056
|
+
parsed = pending;
|
|
11057
|
+
}
|
|
11058
|
+
return structuredClone(await parsed);
|
|
11059
|
+
}
|
|
11060
|
+
/** Whether this reader still serves reads for its package. */
|
|
11061
|
+
get isOpen() {
|
|
11062
|
+
return !this.closed;
|
|
11063
|
+
}
|
|
11064
|
+
/** Drops every cached read; later reads of the package go to the archive. */
|
|
11065
|
+
close() {
|
|
11066
|
+
this.closed = true;
|
|
11067
|
+
if (openReaders.get(this.zip) === this) {
|
|
11068
|
+
openReaders.delete(this.zip);
|
|
11069
|
+
}
|
|
11070
|
+
this.parts.clear();
|
|
11071
|
+
}
|
|
11072
|
+
};
|
|
11073
|
+
function parseText(parser, text) {
|
|
11074
|
+
return text ? parser.parse(text) : void 0;
|
|
11075
|
+
}
|
|
11076
|
+
function readPartText(zip, path3) {
|
|
11077
|
+
const reader = openReaders.get(zip);
|
|
11078
|
+
if (reader) {
|
|
11079
|
+
return reader.readText(path3);
|
|
11080
|
+
}
|
|
11081
|
+
return zip.file(path3)?.async("string") ?? Promise.resolve(void 0);
|
|
11082
|
+
}
|
|
11083
|
+
async function readPartXml(zip, parser, path3) {
|
|
11084
|
+
const reader = openReaders.get(zip);
|
|
11085
|
+
if (reader) {
|
|
11086
|
+
return reader.readXml(parser, path3);
|
|
11087
|
+
}
|
|
11088
|
+
const text = await zip.file(path3)?.async("string");
|
|
11089
|
+
return text ? parseText(parser, text) : void 0;
|
|
11090
|
+
}
|
|
11091
|
+
|
|
10815
11092
|
// pptx/core/core/builders/element-hidden-flag.ts
|
|
10816
11093
|
var NV_CONTAINERS = [
|
|
10817
11094
|
"p:nvSpPr",
|
|
@@ -10876,11 +11153,10 @@ function flattenElementsDeep(elements2) {
|
|
|
10876
11153
|
// pptx/core/utils/slide-synchronization.ts
|
|
10877
11154
|
var SLIDE_SYNC_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slideSyncData+xml";
|
|
10878
11155
|
async function loadSlideSynchronization(input) {
|
|
10879
|
-
const
|
|
10880
|
-
if (!
|
|
11156
|
+
const relsData = await readPartXml(input.zip, input.parser, input.relsPath);
|
|
11157
|
+
if (!relsData) {
|
|
10881
11158
|
return void 0;
|
|
10882
11159
|
}
|
|
10883
|
-
const relsData = input.parser.parse(relsXml);
|
|
10884
11160
|
const relationship2 = findSlideSyncRelationship(relsData);
|
|
10885
11161
|
if (!relationship2) {
|
|
10886
11162
|
return void 0;
|
|
@@ -10890,7 +11166,7 @@ async function loadSlideSynchronization(input) {
|
|
|
10890
11166
|
return void 0;
|
|
10891
11167
|
}
|
|
10892
11168
|
const partPath = resolvePartPath2(input.slidePath, target);
|
|
10893
|
-
const partXml = await input.zip
|
|
11169
|
+
const partXml = await readPartText(input.zip, partPath);
|
|
10894
11170
|
if (!partXml) {
|
|
10895
11171
|
return void 0;
|
|
10896
11172
|
}
|
|
@@ -11019,11 +11295,10 @@ function ensureArray(value) {
|
|
|
11019
11295
|
}
|
|
11020
11296
|
async function loadLegacyVmlDrawings(zip, parser, slidePath, relsPath2) {
|
|
11021
11297
|
try {
|
|
11022
|
-
const
|
|
11023
|
-
if (!
|
|
11298
|
+
const relsData = await readPartXml(zip, parser, relsPath2);
|
|
11299
|
+
if (!relsData) {
|
|
11024
11300
|
return [];
|
|
11025
11301
|
}
|
|
11026
|
-
const relsData = parser.parse(relsXml);
|
|
11027
11302
|
const relationships2 = ensureArray(
|
|
11028
11303
|
relsData["Relationships"]?.["Relationship"]
|
|
11029
11304
|
);
|
|
@@ -11046,7 +11321,7 @@ async function loadLegacyVmlDrawings(zip, parser, slidePath, relsPath2) {
|
|
|
11046
11321
|
if (!resolved) {
|
|
11047
11322
|
continue;
|
|
11048
11323
|
}
|
|
11049
|
-
const vmlXml = await zip
|
|
11324
|
+
const vmlXml = await readPartText(zip, resolved);
|
|
11050
11325
|
if (!vmlXml) {
|
|
11051
11326
|
continue;
|
|
11052
11327
|
}
|
|
@@ -13137,10 +13412,10 @@ function assertAfterAnimationClearSupported(effectCTn) {
|
|
|
13137
13412
|
if (!isXmlObject3(sub)) return;
|
|
13138
13413
|
const countAfterFlags = (value) => {
|
|
13139
13414
|
if (Array.isArray(value))
|
|
13140
|
-
return value.reduce((
|
|
13415
|
+
return value.reduce((count2, child16) => count2 + countAfterFlags(child16), 0);
|
|
13141
13416
|
if (!isXmlObject3(value)) return 0;
|
|
13142
13417
|
return Object.entries(value).reduce(
|
|
13143
|
-
(
|
|
13418
|
+
(count2, [key2, child16]) => count2 + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child16)) ? 1 : countAfterFlags(child16)),
|
|
13144
13419
|
0
|
|
13145
13420
|
);
|
|
13146
13421
|
};
|
|
@@ -13688,11 +13963,14 @@ var PptxSlideLoaderService = class {
|
|
|
13688
13963
|
* @returns Map of relationship ID to target path string.
|
|
13689
13964
|
*/
|
|
13690
13965
|
async loadPresentationSlideRels(params) {
|
|
13691
|
-
const
|
|
13692
|
-
|
|
13966
|
+
const relsData = await readPartXml(
|
|
13967
|
+
params.zip,
|
|
13968
|
+
params.parser,
|
|
13969
|
+
"ppt/_rels/presentation.xml.rels"
|
|
13970
|
+
);
|
|
13971
|
+
if (!relsData) {
|
|
13693
13972
|
return /* @__PURE__ */ new Map();
|
|
13694
13973
|
}
|
|
13695
|
-
const relsData = params.parser.parse(relsXml);
|
|
13696
13974
|
const relationships2 = relsData["Relationships"]?.["Relationship"];
|
|
13697
13975
|
const relNodes = this.toXmlObjectArray(relationships2);
|
|
13698
13976
|
const relsMap = /* @__PURE__ */ new Map();
|
|
@@ -13732,7 +14010,7 @@ var PptxSlideLoaderService = class {
|
|
|
13732
14010
|
if (!params.zip.file(path3)) {
|
|
13733
14011
|
path3 = `ppt/${target}`;
|
|
13734
14012
|
}
|
|
13735
|
-
const slideXmlStr = await params.zip
|
|
14013
|
+
const slideXmlStr = await readPartText(params.zip, path3);
|
|
13736
14014
|
if (!slideXmlStr) {
|
|
13737
14015
|
return void 0;
|
|
13738
14016
|
}
|
|
@@ -34825,8 +35103,8 @@ function reorderContainer(node, rawInner) {
|
|
|
34825
35103
|
if (isGroupedByTag(children6.map((child16) => child16.tag))) {
|
|
34826
35104
|
return;
|
|
34827
35105
|
}
|
|
34828
|
-
for (const [tag,
|
|
34829
|
-
if (ensureItems(node[tag]).length !==
|
|
35106
|
+
for (const [tag, count2] of occurrence) {
|
|
35107
|
+
if (ensureItems(node[tag]).length !== count2) {
|
|
34830
35108
|
return;
|
|
34831
35109
|
}
|
|
34832
35110
|
}
|
|
@@ -34848,8 +35126,8 @@ function annotateOmmlSiblingOrder(xml, parsed) {
|
|
|
34848
35126
|
return;
|
|
34849
35127
|
}
|
|
34850
35128
|
const nodes = collectParsedOmathNodes(parsed);
|
|
34851
|
-
const
|
|
34852
|
-
for (let index = 0; index <
|
|
35129
|
+
const count2 = Math.min(fragments.length, nodes.length);
|
|
35130
|
+
for (let index = 0; index < count2; index++) {
|
|
34853
35131
|
if (fragments[index]) {
|
|
34854
35132
|
reorderContainer(nodes[index], fragments[index]);
|
|
34855
35133
|
}
|
|
@@ -35907,6 +36185,174 @@ function extractFontFromEot(data) {
|
|
|
35907
36185
|
return { fontData, header };
|
|
35908
36186
|
}
|
|
35909
36187
|
|
|
36188
|
+
// pptx/core/utils/deferred-embedded-font.ts
|
|
36189
|
+
function resolveEmbeddedFontGuid(source) {
|
|
36190
|
+
if (isEotFormat(source.originalPartBytes)) {
|
|
36191
|
+
return void 0;
|
|
36192
|
+
}
|
|
36193
|
+
const { fontKey } = source;
|
|
36194
|
+
const fromKey = fontKey ? extractGuidFromPartName(fontKey) ?? fontKey.replace(/[{}]/g, "").trim() : null;
|
|
36195
|
+
return fromKey || extractGuidFromPartName(source.partPath) || void 0;
|
|
36196
|
+
}
|
|
36197
|
+
function hasSfntSignature(bytes) {
|
|
36198
|
+
if (bytes.length < 4) {
|
|
36199
|
+
return false;
|
|
36200
|
+
}
|
|
36201
|
+
const [v0, v1, v2, v3] = bytes;
|
|
36202
|
+
return v0 === 0 && v1 === 1 && v2 === 0 && v3 === 0 || v0 === 79 && v1 === 84 && v2 === 84 && v3 === 79 || v0 === 116 && v1 === 116 && v2 === 99 && v3 === 102 || v0 === 119 && v1 === 79 && v2 === 70 && (v3 === 70 || v3 === 50);
|
|
36203
|
+
}
|
|
36204
|
+
function warnInvalidSignature(name, bytes) {
|
|
36205
|
+
const hex3 = Array.from(bytes.subarray(0, 4), (b) => b.toString(16)).join(",");
|
|
36206
|
+
console.warn(
|
|
36207
|
+
`[pptx-viewer] Embedded font "${name}" has invalid sfnt header [${hex3}] after processing; skipping (web font fallback will be used)`
|
|
36208
|
+
);
|
|
36209
|
+
}
|
|
36210
|
+
function isEmbeddedFontPartPlausible(source) {
|
|
36211
|
+
const bytes = source.originalPartBytes;
|
|
36212
|
+
if (bytes.length === 0) {
|
|
36213
|
+
return false;
|
|
36214
|
+
}
|
|
36215
|
+
if (isEotFormat(bytes)) {
|
|
36216
|
+
return true;
|
|
36217
|
+
}
|
|
36218
|
+
const guid = resolveEmbeddedFontGuid(source);
|
|
36219
|
+
if (!guid) {
|
|
36220
|
+
console.warn(
|
|
36221
|
+
`[pptx-viewer] Embedded font "${source.name}" at "${source.partPath}" has no fontKey attribute and no GUID in filename; skipping`
|
|
36222
|
+
);
|
|
36223
|
+
return false;
|
|
36224
|
+
}
|
|
36225
|
+
const header = deobfuscateFont(bytes.subarray(0, Math.min(bytes.length, 32)), guid);
|
|
36226
|
+
if (header.length < 4) {
|
|
36227
|
+
return false;
|
|
36228
|
+
}
|
|
36229
|
+
if (!hasSfntSignature(header)) {
|
|
36230
|
+
warnInvalidSignature(source.name, header);
|
|
36231
|
+
return false;
|
|
36232
|
+
}
|
|
36233
|
+
return true;
|
|
36234
|
+
}
|
|
36235
|
+
function uint8ArrayToBase64(bytes) {
|
|
36236
|
+
let binary = "";
|
|
36237
|
+
const chunkSize = 8192;
|
|
36238
|
+
for (let i = 0; i < bytes.length; i += chunkSize) {
|
|
36239
|
+
const chunk = bytes.subarray(i, Math.min(i + chunkSize, bytes.length));
|
|
36240
|
+
for (let j = 0; j < chunk.length; j++) {
|
|
36241
|
+
binary += String.fromCharCode(chunk[j]);
|
|
36242
|
+
}
|
|
36243
|
+
}
|
|
36244
|
+
return btoa(binary);
|
|
36245
|
+
}
|
|
36246
|
+
function decodeEmbeddedFontPart(source) {
|
|
36247
|
+
const { name, partPath, originalPartBytes } = source;
|
|
36248
|
+
try {
|
|
36249
|
+
let fontData;
|
|
36250
|
+
const fontGuid = resolveEmbeddedFontGuid(source);
|
|
36251
|
+
if (isEotFormat(originalPartBytes)) {
|
|
36252
|
+
const extracted = extractFontFromEot(originalPartBytes);
|
|
36253
|
+
if (!extracted) {
|
|
36254
|
+
const header = parseEotHeader(originalPartBytes);
|
|
36255
|
+
console.info(
|
|
36256
|
+
`[pptx-viewer] Embedded font "${name}" uses EOT format${header?.isCompressed ? " with MTX compression" : ""}; extraction failed, will use web font fallback`
|
|
36257
|
+
);
|
|
36258
|
+
return null;
|
|
36259
|
+
}
|
|
36260
|
+
fontData = extracted.fontData;
|
|
36261
|
+
} else if (fontGuid) {
|
|
36262
|
+
fontData = deobfuscateFont(originalPartBytes, fontGuid);
|
|
36263
|
+
} else {
|
|
36264
|
+
console.warn(
|
|
36265
|
+
`[pptx-viewer] Embedded font "${name}" at "${partPath}" has no fontKey attribute and no GUID in filename; skipping`
|
|
36266
|
+
);
|
|
36267
|
+
return null;
|
|
36268
|
+
}
|
|
36269
|
+
if (fontData.length < 4) {
|
|
36270
|
+
return null;
|
|
36271
|
+
}
|
|
36272
|
+
if (!hasSfntSignature(fontData)) {
|
|
36273
|
+
warnInvalidSignature(name, fontData);
|
|
36274
|
+
return null;
|
|
36275
|
+
}
|
|
36276
|
+
const format = detectFontFormat(fontData);
|
|
36277
|
+
const mimeType = format === "woff2" ? "font/woff2" : format === "woff" ? "font/woff" : format === "opentype" ? "font/otf" : "font/ttf";
|
|
36278
|
+
return {
|
|
36279
|
+
name,
|
|
36280
|
+
dataUrl: `data:${mimeType};base64,${uint8ArrayToBase64(fontData)}`,
|
|
36281
|
+
bold: source.bold,
|
|
36282
|
+
italic: source.italic,
|
|
36283
|
+
format,
|
|
36284
|
+
rawFontData: fontData,
|
|
36285
|
+
partPath,
|
|
36286
|
+
fontGuid,
|
|
36287
|
+
originalRId: source.originalRId,
|
|
36288
|
+
originalPartBytes
|
|
36289
|
+
};
|
|
36290
|
+
} catch {
|
|
36291
|
+
return null;
|
|
36292
|
+
}
|
|
36293
|
+
}
|
|
36294
|
+
function createDeferredEmbeddedFont(source) {
|
|
36295
|
+
const fontGuid = resolveEmbeddedFontGuid(source);
|
|
36296
|
+
let fields;
|
|
36297
|
+
let pending;
|
|
36298
|
+
const decode = () => {
|
|
36299
|
+
if (!fields) {
|
|
36300
|
+
const decoded = decodeEmbeddedFontPart(source);
|
|
36301
|
+
fields = {
|
|
36302
|
+
dataUrl: decoded?.dataUrl ?? "",
|
|
36303
|
+
format: decoded?.format,
|
|
36304
|
+
rawFontData: decoded?.rawFontData
|
|
36305
|
+
};
|
|
36306
|
+
}
|
|
36307
|
+
return fields;
|
|
36308
|
+
};
|
|
36309
|
+
const font = {
|
|
36310
|
+
name: source.name,
|
|
36311
|
+
get dataUrl() {
|
|
36312
|
+
return decode().dataUrl;
|
|
36313
|
+
},
|
|
36314
|
+
set dataUrl(value) {
|
|
36315
|
+
decode().dataUrl = value;
|
|
36316
|
+
},
|
|
36317
|
+
bold: source.bold,
|
|
36318
|
+
italic: source.italic,
|
|
36319
|
+
get format() {
|
|
36320
|
+
return decode().format;
|
|
36321
|
+
},
|
|
36322
|
+
set format(value) {
|
|
36323
|
+
decode().format = value;
|
|
36324
|
+
},
|
|
36325
|
+
get rawFontData() {
|
|
36326
|
+
return decode().rawFontData;
|
|
36327
|
+
},
|
|
36328
|
+
set rawFontData(value) {
|
|
36329
|
+
decode().rawFontData = value;
|
|
36330
|
+
},
|
|
36331
|
+
partPath: source.partPath,
|
|
36332
|
+
fontGuid,
|
|
36333
|
+
originalRId: source.originalRId,
|
|
36334
|
+
originalPartBytes: source.originalPartBytes
|
|
36335
|
+
};
|
|
36336
|
+
Object.defineProperties(font, {
|
|
36337
|
+
load: {
|
|
36338
|
+
value: () => pending ??= Promise.resolve().then(
|
|
36339
|
+
() => decode().rawFontData?.length || decode().dataUrl ? font : null
|
|
36340
|
+
)
|
|
36341
|
+
},
|
|
36342
|
+
isLoaded: { get: () => fields !== void 0 }
|
|
36343
|
+
});
|
|
36344
|
+
return font;
|
|
36345
|
+
}
|
|
36346
|
+
function shouldSaveEmbeddedFontVerbatim(font) {
|
|
36347
|
+
if (font.isLoaded === void 0 || !font.originalPartBytes?.length) {
|
|
36348
|
+
return false;
|
|
36349
|
+
}
|
|
36350
|
+
if (!font.originalRId || !font.partPath) {
|
|
36351
|
+
return false;
|
|
36352
|
+
}
|
|
36353
|
+
return font.isLoaded === false || !font.rawFontData?.length;
|
|
36354
|
+
}
|
|
36355
|
+
|
|
35910
36356
|
// pptx/core/core/runtime/header-footer-parts.ts
|
|
35911
36357
|
var DEFAULT_DATE_FIELD_TYPE = "datetime1";
|
|
35912
36358
|
function asArray2(value) {
|
|
@@ -37550,6 +37996,7 @@ function collectChartWorkbookWrite(xmlLookupService, container, isNumeric2, valu
|
|
|
37550
37996
|
}
|
|
37551
37997
|
|
|
37552
37998
|
// pptx/core/utils/chart-label-source.ts
|
|
37999
|
+
var relationshipParser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "@_" });
|
|
37553
38000
|
function formulaCount(value) {
|
|
37554
38001
|
if (!value || typeof value !== "object") return 0;
|
|
37555
38002
|
if (Array.isArray(value)) return value.reduce((total, item) => total + formulaCount(item), 0);
|
|
@@ -37597,12 +38044,11 @@ async function chartLabelsHaveEditableSources(xml, zip, chartSpace, seriesNodes,
|
|
|
37597
38044
|
if (!external.targetPath || !external.embeddedWorkbookData) return false;
|
|
37598
38045
|
const target = resolve(chartPartPath, external.targetPath);
|
|
37599
38046
|
let references = 0;
|
|
37600
|
-
const parser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "@_" });
|
|
37601
38047
|
try {
|
|
37602
38048
|
for (const path3 of Object.keys(zip.files)) {
|
|
37603
38049
|
if (!path3.endsWith(".rels") || !path3.includes("/_rels/")) continue;
|
|
37604
38050
|
const source = path3.replace("/_rels/", "/").slice(0, -5);
|
|
37605
|
-
const tree =
|
|
38051
|
+
const tree = await readPartXml(zip, relationshipParser, path3);
|
|
37606
38052
|
for (const rel of xmlChildren(xmlChild(tree, "Relationships"), "Relationship")) {
|
|
37607
38053
|
const relationshipTarget2 = xmlAttr(rel, "Target");
|
|
37608
38054
|
if (relationshipTarget2 && xmlAttr(rel, "TargetMode") !== "External" && resolve(source, relationshipTarget2) === target)
|
|
@@ -37968,10 +38414,10 @@ function collectFilteredSeriesIndices(container, xmlLookup) {
|
|
|
37968
38414
|
}
|
|
37969
38415
|
return reserved;
|
|
37970
38416
|
}
|
|
37971
|
-
function assignSeriesIndices(
|
|
38417
|
+
function assignSeriesIndices(count2, reservedIndices) {
|
|
37972
38418
|
const assigned = [];
|
|
37973
38419
|
let cursor = 0;
|
|
37974
|
-
for (let i = 0; i <
|
|
38420
|
+
for (let i = 0; i < count2; i++) {
|
|
37975
38421
|
while (reservedIndices.has(cursor)) {
|
|
37976
38422
|
cursor++;
|
|
37977
38423
|
}
|
|
@@ -38290,8 +38736,8 @@ function parseCache(node) {
|
|
|
38290
38736
|
return point;
|
|
38291
38737
|
})
|
|
38292
38738
|
};
|
|
38293
|
-
const
|
|
38294
|
-
if (Number.isInteger(
|
|
38739
|
+
const count2 = Number(cVal(node, "ptCount") ?? Number.NaN);
|
|
38740
|
+
if (Number.isInteger(count2) && count2 >= 0) cache2.pointCount = count2;
|
|
38295
38741
|
const formatCode2 = cChild(node, "formatCode")?.textContent;
|
|
38296
38742
|
if (formatCode2) cache2.formatCode = formatCode2;
|
|
38297
38743
|
return cache2;
|
|
@@ -38309,8 +38755,8 @@ function parseDataSource(element) {
|
|
|
38309
38755
|
const levels = cChild(ref, "multiLvlStrCache");
|
|
38310
38756
|
if (levels) {
|
|
38311
38757
|
source.levels = children(levels, "lvl", NS.c).map(parseCache);
|
|
38312
|
-
const
|
|
38313
|
-
if (Number.isInteger(
|
|
38758
|
+
const count2 = Number(cVal(levels, "ptCount") ?? Number.NaN);
|
|
38759
|
+
if (Number.isInteger(count2) && count2 >= 0) source.levelPointCount = count2;
|
|
38314
38760
|
}
|
|
38315
38761
|
return source;
|
|
38316
38762
|
}
|
|
@@ -39719,7 +40165,7 @@ function parseChartData(context, element) {
|
|
|
39719
40165
|
}
|
|
39720
40166
|
return out;
|
|
39721
40167
|
}
|
|
39722
|
-
function
|
|
40168
|
+
function parseText2(context, element) {
|
|
39723
40169
|
if (!element) return void 0;
|
|
39724
40170
|
reportUnmodelled2(context, element, /* @__PURE__ */ new Set(["txData", "rich"]));
|
|
39725
40171
|
const data = cxChild(element, "txData");
|
|
@@ -39740,7 +40186,7 @@ function parseTitle2(context, element) {
|
|
|
39740
40186
|
return assignDefined(
|
|
39741
40187
|
{},
|
|
39742
40188
|
{
|
|
39743
|
-
tx:
|
|
40189
|
+
tx: parseText2(context, cxChild(element, "tx")),
|
|
39744
40190
|
spPr: shapeProperties2(element),
|
|
39745
40191
|
txPr: textProperties2(element),
|
|
39746
40192
|
position: attribute(element, "pos"),
|
|
@@ -39993,7 +40439,7 @@ function parseSeries2(context, element) {
|
|
|
39993
40439
|
ownerIndex: numberAttribute(context, element, "ownerIdx"),
|
|
39994
40440
|
uniqueId: attribute(element, "uniqueId"),
|
|
39995
40441
|
formatIndex: numberAttribute(context, element, "formatIdx"),
|
|
39996
|
-
tx:
|
|
40442
|
+
tx: parseText2(context, cxChild(element, "tx")),
|
|
39997
40443
|
spPr: shapeProperties2(element),
|
|
39998
40444
|
txPr: textProperties2(element),
|
|
39999
40445
|
valueColorsXml: rawChild2(element, "valueColors"),
|
|
@@ -46887,9 +47333,9 @@ function buildFopt(simple, complex = []) {
|
|
|
46887
47333
|
payload.bytes(bytes);
|
|
46888
47334
|
}
|
|
46889
47335
|
}
|
|
46890
|
-
const
|
|
47336
|
+
const count2 = simple.length + complex.length;
|
|
46891
47337
|
const data = new ByteWriter().append(entries).append(payload).toBytes();
|
|
46892
|
-
return record(OA.FOPT, data,
|
|
47338
|
+
return record(OA.FOPT, data, count2, false, 3);
|
|
46893
47339
|
}
|
|
46894
47340
|
var METRO_BLOB_OPID = 937;
|
|
46895
47341
|
function buildMetroBlobTertiaryFopt(metroBlob) {
|
|
@@ -46926,9 +47372,9 @@ function buildDgg(shapesPerDrawing, totalShapes) {
|
|
|
46926
47372
|
const cidcl = drawingCount + 1;
|
|
46927
47373
|
const cspSaved = totalShapes - drawingCount;
|
|
46928
47374
|
const w = new ByteWriter().u32(maxShapeId).u32(cidcl).u32(cspSaved).u32(drawingCount);
|
|
46929
|
-
shapesPerDrawing.forEach((
|
|
47375
|
+
shapesPerDrawing.forEach((count2, i) => {
|
|
46930
47376
|
const drawingId = i + 1;
|
|
46931
|
-
w.u32(drawingId).u32(
|
|
47377
|
+
w.u32(drawingId).u32(count2);
|
|
46932
47378
|
});
|
|
46933
47379
|
return record(OA.Dgg, w.toBytes(), 0, false, 0);
|
|
46934
47380
|
}
|
|
@@ -47725,8 +48171,8 @@ function atom(recType, data) {
|
|
|
47725
48171
|
function textHeader(textType) {
|
|
47726
48172
|
return atom(RT.TextHeaderAtom, new ByteWriter().u32(textType).toBytes());
|
|
47727
48173
|
}
|
|
47728
|
-
function textSpecInfo(
|
|
47729
|
-
return atom(RT.TextSpecInfoAtom, new ByteWriter().u32(
|
|
48174
|
+
function textSpecInfo(count2) {
|
|
48175
|
+
return atom(RT.TextSpecInfoAtom, new ByteWriter().u32(count2).u32(1).u16(0).toBytes());
|
|
47730
48176
|
}
|
|
47731
48177
|
function promptText(textType, paragraphs) {
|
|
47732
48178
|
const text = paragraphs.join("\r");
|
|
@@ -48374,17 +48820,17 @@ function slideMasterIndex(masterIndex, masterCount) {
|
|
|
48374
48820
|
return masterIndex !== void 0 && Number.isInteger(masterIndex) && masterIndex >= 0 && masterIndex < masterCount ? masterIndex : 0;
|
|
48375
48821
|
}
|
|
48376
48822
|
function countDrawingShapes(shapes) {
|
|
48377
|
-
let
|
|
48823
|
+
let count2 = 1;
|
|
48378
48824
|
const walk = (list2) => {
|
|
48379
48825
|
for (const shape of list2) {
|
|
48380
|
-
|
|
48826
|
+
count2++;
|
|
48381
48827
|
if (shape.kind === "group") {
|
|
48382
48828
|
walk(shape.children);
|
|
48383
48829
|
}
|
|
48384
48830
|
}
|
|
48385
48831
|
};
|
|
48386
48832
|
walk(shapes);
|
|
48387
|
-
return
|
|
48833
|
+
return count2;
|
|
48388
48834
|
}
|
|
48389
48835
|
function collectFonts(deck, masters) {
|
|
48390
48836
|
const collect = (shape) => {
|
|
@@ -48893,7 +49339,7 @@ function toLevel(style = {}, themeFonts = {}) {
|
|
|
48893
49339
|
}
|
|
48894
49340
|
};
|
|
48895
49341
|
}
|
|
48896
|
-
function toLevels(levels,
|
|
49342
|
+
function toLevels(levels, count2, themeFonts) {
|
|
48897
49343
|
if (!levels) {
|
|
48898
49344
|
return void 0;
|
|
48899
49345
|
}
|
|
@@ -48903,7 +49349,7 @@ function toLevels(levels, count, themeFonts) {
|
|
|
48903
49349
|
}
|
|
48904
49350
|
const base = levels[-1];
|
|
48905
49351
|
return Array.from(
|
|
48906
|
-
{ length:
|
|
49352
|
+
{ length: count2 },
|
|
48907
49353
|
(_, i) => toLevel(base || levels[i] ? { ...base, ...levels[i] } : void 0, themeFonts)
|
|
48908
49354
|
);
|
|
48909
49355
|
}
|
|
@@ -49739,12 +50185,12 @@ function visitGraphicData(node, relationshipId, extended, getLocalName2) {
|
|
|
49739
50185
|
}
|
|
49740
50186
|
if (Array.isArray(node)) {
|
|
49741
50187
|
return node.reduce(
|
|
49742
|
-
(
|
|
50188
|
+
(count3, entry2) => count3 + visitGraphicData(entry2, relationshipId, extended, getLocalName2),
|
|
49743
50189
|
0
|
|
49744
50190
|
);
|
|
49745
50191
|
}
|
|
49746
50192
|
const object = node;
|
|
49747
|
-
let
|
|
50193
|
+
let count2 = 0;
|
|
49748
50194
|
for (const key2 of Object.keys(object)) {
|
|
49749
50195
|
if (key2.startsWith("@_")) {
|
|
49750
50196
|
continue;
|
|
@@ -49756,14 +50202,14 @@ function visitGraphicData(node, relationshipId, extended, getLocalName2) {
|
|
|
49756
50202
|
const chart = chartKey ? candidate[chartKey] : void 0;
|
|
49757
50203
|
if (chart && String(chart["@_r:id"]) === relationshipId) {
|
|
49758
50204
|
rebindGraphicData(candidate, relationshipId, extended);
|
|
49759
|
-
|
|
50205
|
+
count2 += 1;
|
|
49760
50206
|
}
|
|
49761
50207
|
}
|
|
49762
50208
|
continue;
|
|
49763
50209
|
}
|
|
49764
|
-
|
|
50210
|
+
count2 += visitGraphicData(value, relationshipId, extended, getLocalName2);
|
|
49765
50211
|
}
|
|
49766
|
-
return
|
|
50212
|
+
return count2;
|
|
49767
50213
|
}
|
|
49768
50214
|
async function rewriteChartGraphicFrames(deps, slidePath, relationshipId, extended) {
|
|
49769
50215
|
const xml = await deps.zip.file(slidePath)?.async("string");
|
|
@@ -49771,11 +50217,11 @@ async function rewriteChartGraphicFrames(deps, slidePath, relationshipId, extend
|
|
|
49771
50217
|
return 0;
|
|
49772
50218
|
}
|
|
49773
50219
|
const tree = deps.parser.parse(xml);
|
|
49774
|
-
const
|
|
49775
|
-
if (
|
|
50220
|
+
const count2 = visitGraphicData(tree, relationshipId, extended, deps.getLocalName);
|
|
50221
|
+
if (count2 > 0) {
|
|
49776
50222
|
deps.zip.file(slidePath, deps.builder.build(tree));
|
|
49777
50223
|
}
|
|
49778
|
-
return
|
|
50224
|
+
return count2;
|
|
49779
50225
|
}
|
|
49780
50226
|
|
|
49781
50227
|
// pptx/core/utils/chart-color-style-writer.ts
|
|
@@ -52310,8 +52756,8 @@ async function discoverTagCollections(zip, codec) {
|
|
|
52310
52756
|
if (!sourcePartPath) {
|
|
52311
52757
|
continue;
|
|
52312
52758
|
}
|
|
52313
|
-
const data =
|
|
52314
|
-
const root = data["Relationships"];
|
|
52759
|
+
const data = await readPartXml(zip, codec, relFile.name);
|
|
52760
|
+
const root = data?.["Relationships"];
|
|
52315
52761
|
for (const relationship2 of ensureArray9(root?.["Relationship"])) {
|
|
52316
52762
|
if (String(relationship2["@_Type"] ?? "") !== TAG_RELATIONSHIP_TYPE) {
|
|
52317
52763
|
continue;
|
|
@@ -52416,7 +52862,7 @@ async function removeTagContentTypeOverride(zip, codec, path3) {
|
|
|
52416
52862
|
zip.file("[Content_Types].xml", codec.build(data));
|
|
52417
52863
|
}
|
|
52418
52864
|
async function readTagCollection(zip, codec, path3) {
|
|
52419
|
-
const xml = await zip
|
|
52865
|
+
const xml = await readPartText(zip, path3);
|
|
52420
52866
|
if (!xml) {
|
|
52421
52867
|
return void 0;
|
|
52422
52868
|
}
|
|
@@ -56613,6 +57059,30 @@ var TemplateElementBaselineTracker = class {
|
|
|
56613
57059
|
var PptxHandlerRuntime = class {
|
|
56614
57060
|
/** The in-memory ZIP archive representing the OPC (.pptx) package. */
|
|
56615
57061
|
zip;
|
|
57062
|
+
/** Shares part reads within the load in progress; see {@link LoadPartReader}. */
|
|
57063
|
+
loadPartReader;
|
|
57064
|
+
/** Opens a part reader for the current package, closing any earlier one. */
|
|
57065
|
+
beginPartReads() {
|
|
57066
|
+
this.endPartReads();
|
|
57067
|
+
const reader = new LoadPartReader(this.zip);
|
|
57068
|
+
this.loadPartReader = reader;
|
|
57069
|
+
return reader;
|
|
57070
|
+
}
|
|
57071
|
+
/** Closes `reader` (by default the open one) and releases its cached reads. */
|
|
57072
|
+
endPartReads(reader = this.loadPartReader) {
|
|
57073
|
+
reader?.close();
|
|
57074
|
+
if (reader && this.loadPartReader === reader) {
|
|
57075
|
+
this.loadPartReader = void 0;
|
|
57076
|
+
}
|
|
57077
|
+
}
|
|
57078
|
+
/** The text of a package part, shared within a load. */
|
|
57079
|
+
readPartText(path3) {
|
|
57080
|
+
return readPartText(this.zip, path3);
|
|
57081
|
+
}
|
|
57082
|
+
/** A parsed package part; relationship parts are parsed once per load. */
|
|
57083
|
+
readPartXml(path3) {
|
|
57084
|
+
return readPartXml(this.zip, this.parser, path3);
|
|
57085
|
+
}
|
|
56616
57086
|
/** fast-xml-parser instance used to parse XML strings into JS objects. */
|
|
56617
57087
|
parser;
|
|
56618
57088
|
/** fast-xml-parser builder used to serialize JS objects back to XML strings. */
|
|
@@ -56876,6 +57346,8 @@ var PptxHandlerRuntime = class {
|
|
|
56876
57346
|
alternateContentBlockByRawXml = /* @__PURE__ */ new WeakMap();
|
|
56877
57347
|
/** Embedded fonts extracted during load, preserved for automatic re-embedding on save. */
|
|
56878
57348
|
loadedEmbeddedFonts = [];
|
|
57349
|
+
/** Decode every embedded font variant during load (see `PptxHandlerLoadOptions`). */
|
|
57350
|
+
eagerDecodeEmbeddedFonts = false;
|
|
56879
57351
|
/** Typed source metadata for lossless embedded-font list round trips. */
|
|
56880
57352
|
loadedEmbeddedFontList;
|
|
56881
57353
|
/**
|
|
@@ -57031,11 +57503,11 @@ var PptxHandlerRuntime = class {
|
|
|
57031
57503
|
* @param relsPath - Path of the `.rels` part; derived from `partPath` when omitted.
|
|
57032
57504
|
*/
|
|
57033
57505
|
async loadPartRelationships(partPath, relsPath2) {
|
|
57034
|
-
const
|
|
57035
|
-
|
|
57506
|
+
const path3 = relsPath2 ?? partRelsPath(partPath);
|
|
57507
|
+
const relsData = await this.readPartXml(path3);
|
|
57508
|
+
if (!relsData) {
|
|
57036
57509
|
return;
|
|
57037
57510
|
}
|
|
57038
|
-
const relsData = this.parser.parse(relsXml);
|
|
57039
57511
|
const relationships2 = relsData?.["Relationships"];
|
|
57040
57512
|
const raw2 = relationships2?.["Relationship"];
|
|
57041
57513
|
const entries = Array.isArray(raw2) ? raw2 : raw2 ? [raw2] : [];
|
|
@@ -58481,10 +58953,6 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
58481
58953
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
58482
58954
|
return true;
|
|
58483
58955
|
}
|
|
58484
|
-
/** The text of a package part, or `undefined` when the package has no such part. */
|
|
58485
|
-
async readPartText(path3) {
|
|
58486
|
-
return this.zip.file(path3)?.async("string");
|
|
58487
|
-
}
|
|
58488
58956
|
/**
|
|
58489
58957
|
* Parse extended (application) properties from `docProps/app.xml`.
|
|
58490
58958
|
*/
|
|
@@ -58545,8 +59013,10 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
58545
59013
|
if (!relsFile) {
|
|
58546
59014
|
return [];
|
|
58547
59015
|
}
|
|
58548
|
-
const
|
|
58549
|
-
|
|
59016
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
59017
|
+
if (!relsData) {
|
|
59018
|
+
return [];
|
|
59019
|
+
}
|
|
58550
59020
|
const relRoot = relsData["Relationships"] || {};
|
|
58551
59021
|
const relationships2 = this.ensureArray(relRoot["Relationship"]);
|
|
58552
59022
|
const relMap = /* @__PURE__ */ new Map();
|
|
@@ -58577,7 +59047,7 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
58577
59047
|
try {
|
|
58578
59048
|
const file = this.zip.file(resolvedPath);
|
|
58579
59049
|
if (file) {
|
|
58580
|
-
data = await
|
|
59050
|
+
data = await this.readPartText(resolvedPath);
|
|
58581
59051
|
}
|
|
58582
59052
|
} catch {
|
|
58583
59053
|
}
|
|
@@ -58657,9 +59127,7 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
58657
59127
|
*/
|
|
58658
59128
|
async parseTags() {
|
|
58659
59129
|
try {
|
|
58660
|
-
return await discoverTagCollections(this.zip,
|
|
58661
|
-
parse: (xml) => this.parser.parse(xml)
|
|
58662
|
-
});
|
|
59130
|
+
return await discoverTagCollections(this.zip, this.parser);
|
|
58663
59131
|
} catch (e) {
|
|
58664
59132
|
console.warn("Failed to parse tags:", e);
|
|
58665
59133
|
return [];
|
|
@@ -58783,7 +59251,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58783
59251
|
}
|
|
58784
59252
|
for (const file of masterFiles) {
|
|
58785
59253
|
const path3 = file.name;
|
|
58786
|
-
const xml = await
|
|
59254
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
58787
59255
|
const data = this.parser.parse(xml);
|
|
58788
59256
|
const sldMaster = data?.["p:sldMaster"];
|
|
58789
59257
|
if (!sldMaster) {
|
|
@@ -58808,8 +59276,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58808
59276
|
);
|
|
58809
59277
|
const relsFile = this.zip.file(relsPath2);
|
|
58810
59278
|
if (relsFile) {
|
|
58811
|
-
const
|
|
58812
|
-
const relsData = this.parser.parse(relsXml);
|
|
59279
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
58813
59280
|
const rels = this.ensureArray(
|
|
58814
59281
|
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
58815
59282
|
);
|
|
@@ -58823,8 +59290,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58823
59290
|
}
|
|
58824
59291
|
const layoutPaths = [];
|
|
58825
59292
|
if (relsFile) {
|
|
58826
|
-
const
|
|
58827
|
-
const relsData = this.parser.parse(relsXml);
|
|
59293
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
58828
59294
|
const rels = this.ensureArray(
|
|
58829
59295
|
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
58830
59296
|
);
|
|
@@ -58868,7 +59334,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58868
59334
|
return void 0;
|
|
58869
59335
|
}
|
|
58870
59336
|
const path3 = files[0].name;
|
|
58871
|
-
const xml = await
|
|
59337
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
58872
59338
|
const data = this.parser.parse(xml);
|
|
58873
59339
|
const master = data?.["p:handoutMaster"];
|
|
58874
59340
|
if (!master) {
|
|
@@ -58900,7 +59366,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58900
59366
|
return void 0;
|
|
58901
59367
|
}
|
|
58902
59368
|
const path3 = files[0].name;
|
|
58903
|
-
const xml = await
|
|
59369
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
58904
59370
|
const data = this.parser.parse(xml);
|
|
58905
59371
|
const master = data?.["p:notesMaster"];
|
|
58906
59372
|
if (!master) {
|
|
@@ -58931,7 +59397,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
58931
59397
|
if (!layoutFile) {
|
|
58932
59398
|
return void 0;
|
|
58933
59399
|
}
|
|
58934
|
-
const xml = await
|
|
59400
|
+
const xml = await this.readPartText(layoutPath) ?? "";
|
|
58935
59401
|
const data = this.parser.parse(xml);
|
|
58936
59402
|
const sldLayout = data?.["p:sldLayout"];
|
|
58937
59403
|
if (!sldLayout) {
|
|
@@ -59025,18 +59491,19 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
59025
59491
|
*/
|
|
59026
59492
|
async parsePresentationProperties() {
|
|
59027
59493
|
try {
|
|
59028
|
-
const
|
|
59029
|
-
if (!
|
|
59494
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
59495
|
+
if (!relsData) {
|
|
59030
59496
|
return void 0;
|
|
59031
59497
|
}
|
|
59032
|
-
const
|
|
59033
|
-
|
|
59498
|
+
const rels = this.ensureArray(
|
|
59499
|
+
relsData.Relationships?.Relationship
|
|
59500
|
+
);
|
|
59034
59501
|
const prRel = rels.find(
|
|
59035
59502
|
(r) => String(r?.["@_Type"] || "").includes("presProps") || String(r?.["@_Target"] || "").includes("presProps")
|
|
59036
59503
|
);
|
|
59037
59504
|
const prTarget = prRel ? String(prRel["@_Target"] || "") : "presProps.xml";
|
|
59038
59505
|
const prPath = prTarget.startsWith("/") ? prTarget.substring(1) : `ppt/${prTarget}`;
|
|
59039
|
-
const prXmlStr = await this.
|
|
59506
|
+
const prXmlStr = await this.readPartText(prPath);
|
|
59040
59507
|
if (!prXmlStr) {
|
|
59041
59508
|
return void 0;
|
|
59042
59509
|
}
|
|
@@ -59082,7 +59549,7 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
59082
59549
|
*/
|
|
59083
59550
|
async parseViewProperties() {
|
|
59084
59551
|
try {
|
|
59085
|
-
const viewPropsXml2 = await this.
|
|
59552
|
+
const viewPropsXml2 = await this.readPartText("ppt/viewProps.xml");
|
|
59086
59553
|
if (!viewPropsXml2) {
|
|
59087
59554
|
return void 0;
|
|
59088
59555
|
}
|
|
@@ -61473,10 +61940,10 @@ function detectDominantScript(text) {
|
|
|
61473
61940
|
}
|
|
61474
61941
|
let best;
|
|
61475
61942
|
let bestCount = 0;
|
|
61476
|
-
for (const [cat,
|
|
61477
|
-
if (
|
|
61943
|
+
for (const [cat, count2] of Object.entries(counts)) {
|
|
61944
|
+
if (count2 > bestCount) {
|
|
61478
61945
|
best = cat;
|
|
61479
|
-
bestCount =
|
|
61946
|
+
bestCount = count2;
|
|
61480
61947
|
}
|
|
61481
61948
|
}
|
|
61482
61949
|
return best;
|
|
@@ -63381,7 +63848,7 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
63381
63848
|
if (existingRel?.target) {
|
|
63382
63849
|
drawingPath = this.resolveImagePath(chartPartPath, existingRel.target);
|
|
63383
63850
|
try {
|
|
63384
|
-
const xml = await this.
|
|
63851
|
+
const xml = await this.readPartText(drawingPath);
|
|
63385
63852
|
if (xml) {
|
|
63386
63853
|
const root = this.parser.parse(xml);
|
|
63387
63854
|
onDisk = parseChartUserShapesDrawing(root, this.xmlLookupService, {
|
|
@@ -63432,11 +63899,10 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
63432
63899
|
const slash = chartPartPath.lastIndexOf("/");
|
|
63433
63900
|
const relsPath2 = `${chartPartPath.slice(0, slash + 1)}_rels/${chartPartPath.slice(slash + 1)}.rels`;
|
|
63434
63901
|
try {
|
|
63435
|
-
const
|
|
63436
|
-
if (!
|
|
63902
|
+
const tree = await this.readPartXml(relsPath2);
|
|
63903
|
+
if (!tree) {
|
|
63437
63904
|
return void 0;
|
|
63438
63905
|
}
|
|
63439
|
-
const tree = this.parser.parse(xml);
|
|
63440
63906
|
const root = tree["Relationships"];
|
|
63441
63907
|
const rels = root?.["Relationship"];
|
|
63442
63908
|
const list2 = rels === void 0 ? [] : Array.isArray(rels) ? rels : [rels];
|
|
@@ -64218,9 +64684,9 @@ function applyTableStructureEditXml(table, source, next, edit) {
|
|
|
64218
64684
|
if (axis !== "row" && axis !== "column" || action !== "insert" && action !== "delete") {
|
|
64219
64685
|
return false;
|
|
64220
64686
|
}
|
|
64221
|
-
const
|
|
64687
|
+
const count2 = axis === "row" ? rows.length : columns.length;
|
|
64222
64688
|
const delta = action === "insert" ? 1 : -1;
|
|
64223
|
-
if (!grid || !Number.isInteger(index) || index < 0 || index >
|
|
64689
|
+
if (!grid || !Number.isInteger(index) || index < 0 || index > count2 - (action === "delete" ? 1 : 0) || action === "delete" && count2 <= 1 || next.rows.length !== rows.length + (axis === "row" ? delta : 0) || next.columnWidths.length !== columns.length + (axis === "column" ? delta : 0)) {
|
|
64224
64690
|
return false;
|
|
64225
64691
|
}
|
|
64226
64692
|
if (axis === "row") {
|
|
@@ -67145,7 +67611,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
67145
67611
|
return;
|
|
67146
67612
|
}
|
|
67147
67613
|
const fonts = explicitFonts ?? this.loadedEmbeddedFonts;
|
|
67148
|
-
const fontsWithData = fonts.filter(
|
|
67614
|
+
const fontsWithData = fonts.filter(
|
|
67615
|
+
(f) => shouldSaveEmbeddedFontVerbatim(f) || f.rawFontData && f.rawFontData.length > 0
|
|
67616
|
+
);
|
|
67149
67617
|
if (fontsWithData.length === 0) {
|
|
67150
67618
|
const metadata = explicitFontList ?? this.loadedEmbeddedFontList;
|
|
67151
67619
|
if (metadata && this.presentationData) {
|
|
@@ -67188,10 +67656,11 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
67188
67656
|
"p:font": { "@_typeface": typeface }
|
|
67189
67657
|
};
|
|
67190
67658
|
for (const variant of variants) {
|
|
67191
|
-
const
|
|
67659
|
+
const verbatim = shouldSaveEmbeddedFontVerbatim(variant);
|
|
67660
|
+
const fontData = verbatim ? void 0 : variant.rawFontData;
|
|
67192
67661
|
const hasOriginal = Boolean(variant.originalRId && variant.partPath);
|
|
67193
|
-
const reuseObfuscation = hasOriginal && Boolean(variant.fontGuid);
|
|
67194
|
-
const reuseVerbatim = hasOriginal && !variant.fontGuid && Boolean(variant.originalPartBytes);
|
|
67662
|
+
const reuseObfuscation = hasOriginal && !verbatim && Boolean(variant.fontGuid);
|
|
67663
|
+
const reuseVerbatim = hasOriginal && (verbatim || !variant.fontGuid) && Boolean(variant.originalPartBytes);
|
|
67195
67664
|
let guid;
|
|
67196
67665
|
let fontPartPath;
|
|
67197
67666
|
let relativeTarget4;
|
|
@@ -70633,13 +71102,13 @@ function countDeclaredIds(node, counts, ensureArray12) {
|
|
|
70633
71102
|
if (!countDeclaredIds(branch, branchCounts, ensureArray12)) {
|
|
70634
71103
|
return false;
|
|
70635
71104
|
}
|
|
70636
|
-
for (const [id,
|
|
70637
|
-
merged.set(id, Math.max(merged.get(id) ?? 0,
|
|
71105
|
+
for (const [id, count2] of branchCounts) {
|
|
71106
|
+
merged.set(id, Math.max(merged.get(id) ?? 0, count2));
|
|
70638
71107
|
}
|
|
70639
71108
|
}
|
|
70640
71109
|
}
|
|
70641
|
-
for (const [id,
|
|
70642
|
-
counts.set(id, (counts.get(id) ?? 0) +
|
|
71110
|
+
for (const [id, count2] of merged) {
|
|
71111
|
+
counts.set(id, (counts.get(id) ?? 0) + count2);
|
|
70643
71112
|
}
|
|
70644
71113
|
}
|
|
70645
71114
|
return true;
|
|
@@ -70649,8 +71118,8 @@ function hasStructuralIdDefects(spTree, ensureArray12) {
|
|
|
70649
71118
|
if (!countDeclaredIds(spTree, counts, ensureArray12)) {
|
|
70650
71119
|
return true;
|
|
70651
71120
|
}
|
|
70652
|
-
for (const
|
|
70653
|
-
if (
|
|
71121
|
+
for (const count2 of counts.values()) {
|
|
71122
|
+
if (count2 > 1) {
|
|
70654
71123
|
return true;
|
|
70655
71124
|
}
|
|
70656
71125
|
}
|
|
@@ -78482,7 +78951,7 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
78482
78951
|
this.unwrapAlternateContent(spTree);
|
|
78483
78952
|
let rawXmlStr;
|
|
78484
78953
|
try {
|
|
78485
|
-
rawXmlStr = await this.
|
|
78954
|
+
rawXmlStr = await this.readPartText(slidePath);
|
|
78486
78955
|
} catch {
|
|
78487
78956
|
}
|
|
78488
78957
|
const slidePrefix = slidePath ? `${slidePath}-` : "";
|
|
@@ -79035,7 +79504,7 @@ var PptxHandlerRuntime73 = class extends PptxHandlerRuntime72 {
|
|
|
79035
79504
|
if (cached) {
|
|
79036
79505
|
return cached;
|
|
79037
79506
|
}
|
|
79038
|
-
const xml = await this.
|
|
79507
|
+
const xml = await this.readPartText(layoutPath);
|
|
79039
79508
|
if (!xml) {
|
|
79040
79509
|
return void 0;
|
|
79041
79510
|
}
|
|
@@ -79049,7 +79518,7 @@ var PptxHandlerRuntime73 = class extends PptxHandlerRuntime72 {
|
|
|
79049
79518
|
if (cached) {
|
|
79050
79519
|
return cached;
|
|
79051
79520
|
}
|
|
79052
|
-
const xml = await this.
|
|
79521
|
+
const xml = await this.readPartText(masterPath);
|
|
79053
79522
|
if (!xml) {
|
|
79054
79523
|
return void 0;
|
|
79055
79524
|
}
|
|
@@ -79500,7 +79969,7 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
79500
79969
|
if (!notesPath) {
|
|
79501
79970
|
return {};
|
|
79502
79971
|
}
|
|
79503
|
-
const notesXml = await this.
|
|
79972
|
+
const notesXml = await this.readPartText(notesPath);
|
|
79504
79973
|
if (!notesXml) {
|
|
79505
79974
|
return {};
|
|
79506
79975
|
}
|
|
@@ -79974,7 +80443,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
79974
80443
|
try {
|
|
79975
80444
|
let masterXmlObj = this.masterXmlMap.get(master.path);
|
|
79976
80445
|
if (!masterXmlObj) {
|
|
79977
|
-
const xmlStr = await this.
|
|
80446
|
+
const xmlStr = await this.readPartText(master.path);
|
|
79978
80447
|
if (!xmlStr) {
|
|
79979
80448
|
continue;
|
|
79980
80449
|
}
|
|
@@ -80047,7 +80516,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
80047
80516
|
}
|
|
80048
80517
|
const masterToken = masterPath.split("/").pop()?.replace(/\.xml$/u, "") ?? masterPath;
|
|
80049
80518
|
try {
|
|
80050
|
-
const masterXmlStr = await this.
|
|
80519
|
+
const masterXmlStr = await this.readPartText(masterPath);
|
|
80051
80520
|
if (!masterXmlStr) {
|
|
80052
80521
|
return [];
|
|
80053
80522
|
}
|
|
@@ -80198,7 +80667,7 @@ var PptxHandlerRuntime78 = class extends PptxHandlerRuntime77 {
|
|
|
80198
80667
|
}
|
|
80199
80668
|
const partPath = part.path;
|
|
80200
80669
|
rememberMasterPartBackground(this, partPath, part.backgroundColor);
|
|
80201
|
-
const xml = await this.
|
|
80670
|
+
const xml = await this.readPartText(partPath);
|
|
80202
80671
|
if (!xml) {
|
|
80203
80672
|
return;
|
|
80204
80673
|
}
|
|
@@ -80349,7 +80818,7 @@ var PptxHandlerRuntime79 = class extends PptxHandlerRuntime78 {
|
|
|
80349
80818
|
}
|
|
80350
80819
|
const layoutToken = layoutPath.split("/").pop()?.replace(/\.xml$/u, "") ?? layoutPath;
|
|
80351
80820
|
try {
|
|
80352
|
-
const layoutXmlStr = await this.
|
|
80821
|
+
const layoutXmlStr = await this.readPartText(layoutPath);
|
|
80353
80822
|
if (!layoutXmlStr) {
|
|
80354
80823
|
return [];
|
|
80355
80824
|
}
|
|
@@ -81062,7 +81531,7 @@ var PptxHandlerRuntime82 = class extends PptxHandlerRuntime81 {
|
|
|
81062
81531
|
return cached;
|
|
81063
81532
|
}
|
|
81064
81533
|
try {
|
|
81065
|
-
const overrideXml = await this.
|
|
81534
|
+
const overrideXml = await this.readPartText(overridePath);
|
|
81066
81535
|
if (!overrideXml) {
|
|
81067
81536
|
return null;
|
|
81068
81537
|
}
|
|
@@ -81659,10 +82128,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
81659
82128
|
if (!relsXml) {
|
|
81660
82129
|
return void 0;
|
|
81661
82130
|
}
|
|
81662
|
-
const relsData = this.
|
|
81663
|
-
// eslint-disable-next-line no-await-in-loop
|
|
81664
|
-
await relsXml.async("string")
|
|
81665
|
-
);
|
|
82131
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
81666
82132
|
const relNodes = this.ensureArray(
|
|
81667
82133
|
relsData?.Relationships?.Relationship
|
|
81668
82134
|
);
|
|
@@ -81688,7 +82154,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
81688
82154
|
const options = [];
|
|
81689
82155
|
for (const file of themeFiles) {
|
|
81690
82156
|
try {
|
|
81691
|
-
const xml = await file.
|
|
82157
|
+
const xml = await this.readPartText(file.name) ?? "";
|
|
81692
82158
|
const data = this.parser.parse(xml);
|
|
81693
82159
|
const root = data["a:theme"];
|
|
81694
82160
|
const name = String(root?.["@_name"] || "").trim();
|
|
@@ -81768,7 +82234,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
81768
82234
|
];
|
|
81769
82235
|
for (const file of masterFiles) {
|
|
81770
82236
|
try {
|
|
81771
|
-
const masterXml = await file.
|
|
82237
|
+
const masterXml = await this.readPartText(file.name) ?? "";
|
|
81772
82238
|
const masterData = this.parser.parse(masterXml);
|
|
81773
82239
|
const clrMap = masterData?.["p:sldMaster"]?.["p:clrMap"];
|
|
81774
82240
|
if (!clrMap) {
|
|
@@ -81801,7 +82267,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
81801
82267
|
if (!themeFile) {
|
|
81802
82268
|
return null;
|
|
81803
82269
|
}
|
|
81804
|
-
const themeXml3 = await
|
|
82270
|
+
const themeXml3 = await this.readPartText(themePath) ?? "";
|
|
81805
82271
|
const model = this.parseThemePartXml(themeXml3);
|
|
81806
82272
|
this.cacheThemePartModel(themePath, themeXml3, model);
|
|
81807
82273
|
return { colorMap: model.colorMap, fontMap: model.fontMap, formatScheme: model.formatScheme };
|
|
@@ -81836,7 +82302,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
81836
82302
|
if (!relsXml) {
|
|
81837
82303
|
return void 0;
|
|
81838
82304
|
}
|
|
81839
|
-
const relsData =
|
|
82305
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
81840
82306
|
const relNodes = this.ensureArray(
|
|
81841
82307
|
relsData?.Relationships?.Relationship
|
|
81842
82308
|
);
|
|
@@ -82143,11 +82609,10 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82143
82609
|
async extractModernSlideComments(slidePath) {
|
|
82144
82610
|
try {
|
|
82145
82611
|
const relsPath2 = `${slidePath.replace("slides/", "slides/_rels/")}.rels`;
|
|
82146
|
-
const
|
|
82147
|
-
if (!
|
|
82612
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
82613
|
+
if (!relsData) {
|
|
82148
82614
|
return [];
|
|
82149
82615
|
}
|
|
82150
|
-
const relsData = this.parser.parse(relsXml);
|
|
82151
82616
|
const rels = this.ensureArray(
|
|
82152
82617
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
82153
82618
|
);
|
|
@@ -82164,7 +82629,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82164
82629
|
continue;
|
|
82165
82630
|
}
|
|
82166
82631
|
const filePath = this.resolvePath(slidePath, target);
|
|
82167
|
-
const xml = await this.
|
|
82632
|
+
const xml = await this.readPartText(filePath);
|
|
82168
82633
|
if (!xml) {
|
|
82169
82634
|
continue;
|
|
82170
82635
|
}
|
|
@@ -82187,11 +82652,10 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82187
82652
|
return [];
|
|
82188
82653
|
}
|
|
82189
82654
|
async loadModernCommentAuthors() {
|
|
82190
|
-
const
|
|
82191
|
-
if (!
|
|
82655
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
82656
|
+
if (!relsData) {
|
|
82192
82657
|
return;
|
|
82193
82658
|
}
|
|
82194
|
-
const relsData = this.parser.parse(relsXml);
|
|
82195
82659
|
const relationships2 = this.ensureArray(
|
|
82196
82660
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
82197
82661
|
);
|
|
@@ -82203,7 +82667,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82203
82667
|
return;
|
|
82204
82668
|
}
|
|
82205
82669
|
const partPath = this.resolvePath("ppt/presentation.xml", target);
|
|
82206
|
-
const xml = await this.
|
|
82670
|
+
const xml = await this.readPartText(partPath);
|
|
82207
82671
|
if (!xml) {
|
|
82208
82672
|
return;
|
|
82209
82673
|
}
|
|
@@ -82229,12 +82693,12 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82229
82693
|
}
|
|
82230
82694
|
}
|
|
82231
82695
|
const relsPath2 = `${slidePath.replace("slides/", "slides/_rels/")}.rels`;
|
|
82232
|
-
const relsXml = await this.
|
|
82696
|
+
const relsXml = await this.readPartText(relsPath2);
|
|
82233
82697
|
if (!relsXml) {
|
|
82234
82698
|
return void 0;
|
|
82235
82699
|
}
|
|
82236
82700
|
try {
|
|
82237
|
-
const relsData = this.
|
|
82701
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
82238
82702
|
const rels = this.ensureArray(
|
|
82239
82703
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
82240
82704
|
);
|
|
@@ -82273,7 +82737,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82273
82737
|
return [];
|
|
82274
82738
|
}
|
|
82275
82739
|
const commentsPath = this.resolveImagePath(slidePath, commentTarget);
|
|
82276
|
-
const commentsXml = await this.
|
|
82740
|
+
const commentsXml = await this.readPartText(commentsPath);
|
|
82277
82741
|
if (!commentsXml) {
|
|
82278
82742
|
return [];
|
|
82279
82743
|
}
|
|
@@ -82308,7 +82772,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
82308
82772
|
}
|
|
82309
82773
|
}
|
|
82310
82774
|
async loadCommentAuthors() {
|
|
82311
|
-
const commentAuthorsXml = await this.
|
|
82775
|
+
const commentAuthorsXml = await this.readPartText("ppt/commentAuthors.xml");
|
|
82312
82776
|
if (!commentAuthorsXml) {
|
|
82313
82777
|
return;
|
|
82314
82778
|
}
|
|
@@ -82370,7 +82834,7 @@ var PptxHandlerRuntime89 = class extends PptxHandlerRuntime88 {
|
|
|
82370
82834
|
return void 0;
|
|
82371
82835
|
}
|
|
82372
82836
|
const partPath = this.resolveImagePath(slidePath, target);
|
|
82373
|
-
const xmlString = await this.
|
|
82837
|
+
const xmlString = await this.readPartText(partPath);
|
|
82374
82838
|
if (!xmlString) {
|
|
82375
82839
|
return void 0;
|
|
82376
82840
|
}
|
|
@@ -83977,9 +84441,8 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
83977
84441
|
const chartDir = chartPartPath.substring(0, chartPartPath.lastIndexOf("/") + 1);
|
|
83978
84442
|
const chartFileName = chartPartPath.substring(chartPartPath.lastIndexOf("/") + 1);
|
|
83979
84443
|
const chartRelsPath = `${chartDir}_rels/${chartFileName}.rels`;
|
|
83980
|
-
const
|
|
83981
|
-
if (
|
|
83982
|
-
const chartRelsData = this.parser.parse(chartRelsXml);
|
|
84444
|
+
const chartRelsData = await this.readPartXml(chartRelsPath);
|
|
84445
|
+
if (chartRelsData) {
|
|
83983
84446
|
const relsContainer = chartRelsData?.Relationships;
|
|
83984
84447
|
if (relsContainer?.Relationship) {
|
|
83985
84448
|
const rels = Array.isArray(relsContainer.Relationship) ? relsContainer.Relationship : [relsContainer.Relationship];
|
|
@@ -84061,7 +84524,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
84061
84524
|
if (drawingPath.length === 0) {
|
|
84062
84525
|
return void 0;
|
|
84063
84526
|
}
|
|
84064
|
-
const drawingXml = await this.
|
|
84527
|
+
const drawingXml = await this.readPartText(drawingPath);
|
|
84065
84528
|
if (!drawingXml) {
|
|
84066
84529
|
return void 0;
|
|
84067
84530
|
}
|
|
@@ -84082,11 +84545,10 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
84082
84545
|
const chartDir = chartPartPath.substring(0, chartPartPath.lastIndexOf("/") + 1);
|
|
84083
84546
|
const chartFileName = chartPartPath.substring(chartPartPath.lastIndexOf("/") + 1);
|
|
84084
84547
|
const chartRelsPath = `${chartDir}_rels/${chartFileName}.rels`;
|
|
84085
|
-
const
|
|
84086
|
-
if (!
|
|
84548
|
+
const chartRelsData = await this.readPartXml(chartRelsPath);
|
|
84549
|
+
if (!chartRelsData) {
|
|
84087
84550
|
return [];
|
|
84088
84551
|
}
|
|
84089
|
-
const chartRelsData = this.parser.parse(chartRelsXml);
|
|
84090
84552
|
const relsContainer = chartRelsData?.Relationships;
|
|
84091
84553
|
if (!relsContainer?.Relationship) {
|
|
84092
84554
|
return [];
|
|
@@ -84915,11 +85377,10 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
84915
85377
|
async loadPresentationFontRels() {
|
|
84916
85378
|
const map = /* @__PURE__ */ new Map();
|
|
84917
85379
|
try {
|
|
84918
|
-
const
|
|
84919
|
-
if (!
|
|
85380
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
85381
|
+
if (!relsData) {
|
|
84920
85382
|
return map;
|
|
84921
85383
|
}
|
|
84922
|
-
const relsData = this.parser.parse(relsXml);
|
|
84923
85384
|
const rels = this.ensureArray(
|
|
84924
85385
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
84925
85386
|
);
|
|
@@ -84938,7 +85399,13 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
84938
85399
|
}
|
|
84939
85400
|
return map;
|
|
84940
85401
|
}
|
|
84941
|
-
/**
|
|
85402
|
+
/**
|
|
85403
|
+
* Read one variant's part. By default the result is a deferred descriptor
|
|
85404
|
+
* that decodes on first use (see `createDeferredEmbeddedFont`); parts that
|
|
85405
|
+
* fail the checks possible without decoding are skipped, as before. With
|
|
85406
|
+
* `eagerDecodeEmbeddedFonts` the variant is decoded now and skipped when
|
|
85407
|
+
* decoding fails.
|
|
85408
|
+
*/
|
|
84942
85409
|
async extractEmbeddedFontVariant(typeface, rId, bold, italic, relsMap, fontKey) {
|
|
84943
85410
|
const fontPath = relsMap.get(rId);
|
|
84944
85411
|
if (!fontPath) {
|
|
@@ -84949,80 +85416,25 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
84949
85416
|
if (!fontBinary || fontBinary.length === 0) {
|
|
84950
85417
|
return null;
|
|
84951
85418
|
}
|
|
84952
|
-
const
|
|
84953
|
-
let fontData;
|
|
84954
|
-
let resolvedGuid;
|
|
84955
|
-
if (isEotFormat(fontBinary)) {
|
|
84956
|
-
const extracted = extractFontFromEot(fontBinary);
|
|
84957
|
-
if (extracted) {
|
|
84958
|
-
fontData = extracted.fontData;
|
|
84959
|
-
} else {
|
|
84960
|
-
const header = parseEotHeader(fontBinary);
|
|
84961
|
-
console.info(
|
|
84962
|
-
`[pptx-viewer] Embedded font "${typeface}" uses EOT format${header?.isCompressed ? " with MTX compression" : ""} \u2014 extraction failed, will use web font fallback`
|
|
84963
|
-
);
|
|
84964
|
-
return null;
|
|
84965
|
-
}
|
|
84966
|
-
} else {
|
|
84967
|
-
const guidFromKey = fontKey ? extractGuidFromPartName(fontKey) ?? fontKey.replace(/[{}]/g, "").trim() : null;
|
|
84968
|
-
const guidFromPath = extractGuidFromPartName(fontPath);
|
|
84969
|
-
const guid = guidFromKey || guidFromPath;
|
|
84970
|
-
if (guid) {
|
|
84971
|
-
fontData = deobfuscateFont(fontBinary, guid);
|
|
84972
|
-
resolvedGuid = guid;
|
|
84973
|
-
} else {
|
|
84974
|
-
console.warn(
|
|
84975
|
-
`[pptx-viewer] Embedded font "${typeface}" at "${fontPath}" has no fontKey attribute and no GUID in filename \u2014 skipping`
|
|
84976
|
-
);
|
|
84977
|
-
return null;
|
|
84978
|
-
}
|
|
84979
|
-
}
|
|
84980
|
-
if (fontData.length < 4) {
|
|
84981
|
-
return null;
|
|
84982
|
-
}
|
|
84983
|
-
const v0 = fontData[0], v1 = fontData[1], v2 = fontData[2], v3 = fontData[3];
|
|
84984
|
-
const isTrueType = v0 === 0 && v1 === 1 && v2 === 0 && v3 === 0;
|
|
84985
|
-
const isOTTO = v0 === 79 && v1 === 84 && v2 === 84 && v3 === 79;
|
|
84986
|
-
const isTTC = v0 === 116 && v1 === 116 && v2 === 99 && v3 === 102;
|
|
84987
|
-
const isWOFF = v0 === 119 && v1 === 79 && v2 === 70 && (v3 === 70 || v3 === 50);
|
|
84988
|
-
if (!(isTrueType || isOTTO || isTTC || isWOFF)) {
|
|
84989
|
-
console.warn(
|
|
84990
|
-
`[pptx-viewer] Embedded font "${typeface}" has invalid sfnt header [${v0.toString(16)},${v1.toString(16)},${v2.toString(16)},${v3.toString(16)}] after processing \u2014 skipping (web font fallback will be used)`
|
|
84991
|
-
);
|
|
84992
|
-
return null;
|
|
84993
|
-
}
|
|
84994
|
-
const format = detectFontFormat(fontData);
|
|
84995
|
-
const mimeType = format === "woff2" ? "font/woff2" : format === "woff" ? "font/woff" : format === "opentype" ? "font/otf" : "font/ttf";
|
|
84996
|
-
const base64 = this.uint8ArrayToBase64(fontData);
|
|
84997
|
-
const dataUrl = `data:${mimeType};base64,${base64}`;
|
|
84998
|
-
return {
|
|
85419
|
+
const source = {
|
|
84999
85420
|
name: typeface,
|
|
85000
|
-
dataUrl,
|
|
85001
85421
|
bold,
|
|
85002
85422
|
italic,
|
|
85003
|
-
format,
|
|
85004
|
-
rawFontData: fontData,
|
|
85005
|
-
partPath: fontPath,
|
|
85006
|
-
fontGuid: resolvedGuid,
|
|
85007
85423
|
originalRId: rId,
|
|
85008
|
-
|
|
85424
|
+
partPath: fontPath,
|
|
85425
|
+
// The descriptor owns a copy, so it outlives this handler's ZIP and
|
|
85426
|
+
// the save pipeline can write it back verbatim.
|
|
85427
|
+
originalPartBytes: new Uint8Array(fontBinary),
|
|
85428
|
+
fontKey
|
|
85009
85429
|
};
|
|
85430
|
+
if (this.eagerDecodeEmbeddedFonts) {
|
|
85431
|
+
return decodeEmbeddedFontPart(source);
|
|
85432
|
+
}
|
|
85433
|
+
return isEmbeddedFontPartPlausible(source) ? createDeferredEmbeddedFont(source) : null;
|
|
85010
85434
|
} catch {
|
|
85011
85435
|
return null;
|
|
85012
85436
|
}
|
|
85013
85437
|
}
|
|
85014
|
-
/** Convert Uint8Array to base64 string. */
|
|
85015
|
-
uint8ArrayToBase64(bytes) {
|
|
85016
|
-
let binary = "";
|
|
85017
|
-
const chunkSize = 8192;
|
|
85018
|
-
for (let i = 0; i < bytes.length; i += chunkSize) {
|
|
85019
|
-
const chunk = bytes.subarray(i, Math.min(i + chunkSize, bytes.length));
|
|
85020
|
-
for (let j = 0; j < chunk.length; j++) {
|
|
85021
|
-
binary += String.fromCharCode(chunk[j]);
|
|
85022
|
-
}
|
|
85023
|
-
}
|
|
85024
|
-
return btoa(binary);
|
|
85025
|
-
}
|
|
85026
85438
|
getLayoutOptions() {
|
|
85027
85439
|
const options = [];
|
|
85028
85440
|
for (const [path3, xmlObj] of this.layoutXmlMap.entries()) {
|
|
@@ -85070,6 +85482,10 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
85070
85482
|
// pptx/core/core/runtime/PptxHandlerRuntimeLoadSession.ts
|
|
85071
85483
|
var MAX_OLE_EMBEDDING_BYTES = 25 * 1024 * 1024;
|
|
85072
85484
|
var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime99 {
|
|
85485
|
+
/** The limits of the load in progress (see `PptxHandlerLoadOptions.limits`). */
|
|
85486
|
+
loadLimits = { ...DEFAULT_PPTX_LOAD_LIMITS };
|
|
85487
|
+
/** Slide elements parsed so far by the load in progress, for `maxShapes`. */
|
|
85488
|
+
loadedShapeCount = 0;
|
|
85073
85489
|
isZipContainer(data) {
|
|
85074
85490
|
const bytes = new Uint8Array(data);
|
|
85075
85491
|
if (bytes.byteLength < 4) {
|
|
@@ -85078,7 +85494,9 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85078
85494
|
return bytes[0] === 80 && bytes[1] === 75 && (bytes[2] === 3 && bytes[3] === 4 || bytes[2] === 5 && bytes[3] === 6 || bytes[2] === 7 && bytes[3] === 8);
|
|
85079
85495
|
}
|
|
85080
85496
|
async initializeLoadSession(data, options) {
|
|
85497
|
+
const limits = resolvePptxLoadLimits(options);
|
|
85081
85498
|
this.eagerDecodeImages = options.eagerDecodeImages ?? false;
|
|
85499
|
+
this.eagerDecodeEmbeddedFonts = options.eagerDecodeEmbeddedFonts === true;
|
|
85082
85500
|
this.allowExternalImages = options.allowExternalImages === true;
|
|
85083
85501
|
if (data.byteLength < 4) {
|
|
85084
85502
|
throw new Error("Invalid PPTX binary: file is empty or truncated.");
|
|
@@ -85088,7 +85506,7 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85088
85506
|
"Invalid PPTX binary: not a ZIP/OpenXML package. The file is neither an OpenXML archive nor an OLE compound file (which is how legacy .ppt and encrypted presentations arrive), so it is most likely corrupt, truncated, or not a presentation at all."
|
|
85089
85507
|
);
|
|
85090
85508
|
}
|
|
85091
|
-
const maxBytes =
|
|
85509
|
+
const maxBytes = limits.maxUncompressedBytes;
|
|
85092
85510
|
let loaded;
|
|
85093
85511
|
try {
|
|
85094
85512
|
loaded = await JSZip.loadAsync(data);
|
|
@@ -85098,11 +85516,13 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85098
85516
|
}
|
|
85099
85517
|
this.zip = guardZip(loaded, {
|
|
85100
85518
|
label: "PPTX",
|
|
85101
|
-
maxEntries:
|
|
85519
|
+
maxEntries: limits.maxEntries,
|
|
85102
85520
|
maxEntryBytes: maxBytes,
|
|
85103
85521
|
maxTotalBytes: maxBytes,
|
|
85104
|
-
createError:
|
|
85522
|
+
createError: createPptxZipBombError
|
|
85105
85523
|
});
|
|
85524
|
+
this.loadLimits = limits;
|
|
85525
|
+
this.loadedShapeCount = 0;
|
|
85106
85526
|
try {
|
|
85107
85527
|
this.documentPropertiesUpdater = this.dependencyFactory.createDocumentPropertiesUpdater(
|
|
85108
85528
|
this.zip,
|
|
@@ -85229,13 +85649,13 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85229
85649
|
if (!file) {
|
|
85230
85650
|
continue;
|
|
85231
85651
|
}
|
|
85232
|
-
const data = await
|
|
85652
|
+
const data = await this.readPartText(entry2) ?? "";
|
|
85233
85653
|
const propsPath = `customXml/itemProps${itemId}.xml`;
|
|
85234
85654
|
const propsFile = this.zip.file(propsPath);
|
|
85235
85655
|
let properties;
|
|
85236
85656
|
let schemaUri;
|
|
85237
85657
|
if (propsFile) {
|
|
85238
|
-
properties = await
|
|
85658
|
+
properties = await this.readPartText(propsPath) ?? "";
|
|
85239
85659
|
try {
|
|
85240
85660
|
const propsData = this.parser.parse(properties);
|
|
85241
85661
|
const schemaRefs = propsData?.["ds:datastoreItem"]?.["ds:schemaRefs"]?.["ds:schemaRef"];
|
|
@@ -85255,19 +85675,24 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85255
85675
|
const relsFile = this.zip.file(relsPath2);
|
|
85256
85676
|
let rels;
|
|
85257
85677
|
if (relsFile) {
|
|
85258
|
-
rels = await
|
|
85678
|
+
rels = await this.readPartText(relsPath2);
|
|
85259
85679
|
}
|
|
85260
85680
|
parts.push({ id: itemId, data, schemaUri, properties, rels });
|
|
85261
85681
|
}
|
|
85262
85682
|
this.customXmlParts = parts;
|
|
85263
85683
|
}
|
|
85264
85684
|
async loadPresentationState() {
|
|
85265
|
-
const presentationXml3 = await this.
|
|
85685
|
+
const presentationXml3 = await this.readPartText("ppt/presentation.xml");
|
|
85266
85686
|
if (!presentationXml3) {
|
|
85267
85687
|
throw new Error("Invalid PPTX: presentation.xml not found");
|
|
85268
85688
|
}
|
|
85269
85689
|
this.presentationData = this.parser.parse(presentationXml3);
|
|
85270
85690
|
this.detectAndSetStrictConformance(this.presentationData);
|
|
85691
|
+
const slideIds = this.presentationData?.["p:presentation"]?.["p:sldIdLst"]?.["p:sldId"];
|
|
85692
|
+
assertPptxSlideCountWithinLimits(
|
|
85693
|
+
Array.isArray(slideIds) ? slideIds.length : slideIds ? 1 : 0,
|
|
85694
|
+
this.loadLimits
|
|
85695
|
+
);
|
|
85271
85696
|
await this.loadThemeData();
|
|
85272
85697
|
this.parsePresentationDefaultTextStyle();
|
|
85273
85698
|
await this.loadCommentAuthors();
|
|
@@ -85397,7 +85822,17 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
85397
85822
|
loadThemeOverride: (partBasePath) => this.loadThemeOverride(partBasePath),
|
|
85398
85823
|
applyThemeOverrideState: (override) => this.applyThemeOverrideState(override),
|
|
85399
85824
|
getLayoutElements: (slidePath) => this.getLayoutElements(slidePath),
|
|
85400
|
-
|
|
85825
|
+
// `maxShapes`: each slide's own elements are counted as soon as they are
|
|
85826
|
+
// parsed, before that slide's media is resolved and before the next slide.
|
|
85827
|
+
parseSlide: async (slideXml3, slidePath) => {
|
|
85828
|
+
const elements2 = await this.parseSlide(slideXml3, slidePath);
|
|
85829
|
+
this.loadedShapeCount = countPptxShapesWithinLimits(
|
|
85830
|
+
this.loadedShapeCount,
|
|
85831
|
+
elements2,
|
|
85832
|
+
this.loadLimits
|
|
85833
|
+
);
|
|
85834
|
+
return elements2;
|
|
85835
|
+
},
|
|
85401
85836
|
extractMediaTimingMap: (slideXml3, slidePath) => this.extractMediaTimingMap(slideXml3, slidePath),
|
|
85402
85837
|
enrichMediaElementsWithTiming: (elements2, timingMap) => this.enrichMediaElementsWithTiming(elements2, timingMap),
|
|
85403
85838
|
enrichOleElementsWithEmbeddedData: (elements2, slidePath) => this.enrichOleElementsWithEmbeddedData(elements2, slidePath),
|
|
@@ -85596,6 +86031,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
85596
86031
|
* or resolve images. Create a new `PptxHandler` instance instead.
|
|
85597
86032
|
*/
|
|
85598
86033
|
dispose() {
|
|
86034
|
+
this.endPartReads();
|
|
85599
86035
|
this.revokeBlobUrls();
|
|
85600
86036
|
this.imageDataCache.clear();
|
|
85601
86037
|
this.slideMap.clear();
|
|
@@ -85629,7 +86065,23 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
85629
86065
|
this.zip = null;
|
|
85630
86066
|
}
|
|
85631
86067
|
async load(data, options = {}) {
|
|
85632
|
-
|
|
86068
|
+
let reader;
|
|
86069
|
+
try {
|
|
86070
|
+
await this.initializeLoadSession(data, options);
|
|
86071
|
+
reader = this.beginPartReads();
|
|
86072
|
+
try {
|
|
86073
|
+
return await this.loadInitializedSession();
|
|
86074
|
+
} catch (error) {
|
|
86075
|
+
if (error instanceof PptxLoadLimitError) {
|
|
86076
|
+
this.dispose();
|
|
86077
|
+
}
|
|
86078
|
+
throw error;
|
|
86079
|
+
}
|
|
86080
|
+
} finally {
|
|
86081
|
+
this.endPartReads(reader);
|
|
86082
|
+
}
|
|
86083
|
+
}
|
|
86084
|
+
async loadInitializedSession() {
|
|
85633
86085
|
await this.detectAndPreserveVbaProject();
|
|
85634
86086
|
this.detectDigitalSignatureParts();
|
|
85635
86087
|
await this.parseCustomXmlParts();
|
|
@@ -85779,7 +86231,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
85779
86231
|
options.push(this.buildLayoutOption(lp, xmlObj));
|
|
85780
86232
|
} else {
|
|
85781
86233
|
try {
|
|
85782
|
-
const layoutXmlStr = await this.
|
|
86234
|
+
const layoutXmlStr = await this.readPartText(lp);
|
|
85783
86235
|
if (layoutXmlStr) {
|
|
85784
86236
|
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
85785
86237
|
this.layoutXmlMap.set(lp, layoutXmlObj);
|
|
@@ -85822,7 +86274,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
85822
86274
|
}
|
|
85823
86275
|
let layoutXml3 = this.layoutXmlMap.get(layoutPath);
|
|
85824
86276
|
if (!layoutXml3) {
|
|
85825
|
-
const layoutXmlStr = await this.
|
|
86277
|
+
const layoutXmlStr = await this.readPartText(layoutPath);
|
|
85826
86278
|
if (!layoutXmlStr) {
|
|
85827
86279
|
throw new Error(`Layout not found: ${layoutPath}`);
|
|
85828
86280
|
}
|
|
@@ -87075,24 +87527,24 @@ function parseStyleTextPropAtom(view, dataOffset, dataLen, textLength, scheme) {
|
|
|
87075
87527
|
const charRuns = [];
|
|
87076
87528
|
let covered = 0;
|
|
87077
87529
|
while (covered < total && c.canRead(6)) {
|
|
87078
|
-
const
|
|
87530
|
+
const count2 = c.u32();
|
|
87079
87531
|
const indentLevel = c.u16();
|
|
87080
|
-
const props = { count, indentLevel };
|
|
87532
|
+
const props = { count: count2, indentLevel };
|
|
87081
87533
|
if (!parsePfException(c, scheme, props)) {
|
|
87082
87534
|
break;
|
|
87083
87535
|
}
|
|
87084
87536
|
paragraphRuns.push(props);
|
|
87085
|
-
covered +=
|
|
87537
|
+
covered += count2;
|
|
87086
87538
|
}
|
|
87087
87539
|
covered = 0;
|
|
87088
87540
|
while (covered < total && c.canRead(8)) {
|
|
87089
|
-
const
|
|
87090
|
-
const props = { count };
|
|
87541
|
+
const count2 = c.u32();
|
|
87542
|
+
const props = { count: count2 };
|
|
87091
87543
|
if (!parseCfException(c, scheme, props)) {
|
|
87092
87544
|
break;
|
|
87093
87545
|
}
|
|
87094
87546
|
charRuns.push(props);
|
|
87095
|
-
covered +=
|
|
87547
|
+
covered += count2;
|
|
87096
87548
|
}
|
|
87097
87549
|
return { paragraphRuns, charRuns };
|
|
87098
87550
|
}
|
|
@@ -88089,13 +88541,13 @@ var OPT2 = {
|
|
|
88089
88541
|
function parseProperties2(view, data, rec) {
|
|
88090
88542
|
const values = /* @__PURE__ */ new Map();
|
|
88091
88543
|
const complex = /* @__PURE__ */ new Map();
|
|
88092
|
-
const
|
|
88093
|
-
const entriesEnd = rec.dataOffset +
|
|
88544
|
+
const count2 = rec.recInstance;
|
|
88545
|
+
const entriesEnd = rec.dataOffset + count2 * 6;
|
|
88094
88546
|
if (entriesEnd > rec.dataOffset + rec.recLen) {
|
|
88095
88547
|
return { values, complex };
|
|
88096
88548
|
}
|
|
88097
88549
|
const complexRefs = [];
|
|
88098
|
-
for (let i = 0; i <
|
|
88550
|
+
for (let i = 0; i < count2; i++) {
|
|
88099
88551
|
const at = rec.dataOffset + i * 6;
|
|
88100
88552
|
const opid = view.getUint16(at, true);
|
|
88101
88553
|
const value = view.getUint32(at + 2, true);
|
|
@@ -89141,8 +89593,8 @@ function levelXml(tag, level, fallbackSizePt) {
|
|
|
89141
89593
|
}
|
|
89142
89594
|
function styleLevels(levels, fallbackSizePt) {
|
|
89143
89595
|
const result = [];
|
|
89144
|
-
const
|
|
89145
|
-
for (let i = 0; i <
|
|
89596
|
+
const count2 = Math.max(1, Math.min(levels.length, 9));
|
|
89597
|
+
for (let i = 0; i < count2; i++) {
|
|
89146
89598
|
result.push(levelXml(`lvl${i + 1}pPr`, levels[i] ?? {}, fallbackSizePt));
|
|
89147
89599
|
}
|
|
89148
89600
|
return result.join("");
|
|
@@ -89970,6 +90422,7 @@ var PptxHandlerCore = class {
|
|
|
89970
90422
|
* ```
|
|
89971
90423
|
*/
|
|
89972
90424
|
async load(data, options = {}) {
|
|
90425
|
+
assertPptxInputWithinLimits(data.byteLength, resolvePptxLoadLimits(options));
|
|
89973
90426
|
const detection = detectFileFormat(data);
|
|
89974
90427
|
if (detection.format === "ole") {
|
|
89975
90428
|
let ole;
|
|
@@ -90281,13 +90734,15 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
90281
90734
|
* archives and portable `pptx-viewer-json` documents.
|
|
90282
90735
|
*
|
|
90283
90736
|
* The buffer is sniffed first: JSON documents (leading `{` plus the
|
|
90284
|
-
* `"pptx-viewer-json"` format marker) are
|
|
90285
|
-
* everything else goes through the regular ZIP/OLE2 pipeline.
|
|
90737
|
+
* `"pptx-viewer-json"` format marker) are imported as {@link loadFromJson}
|
|
90738
|
+
* does; everything else goes through the regular ZIP/OLE2 pipeline.
|
|
90286
90739
|
*/
|
|
90287
90740
|
async load(data, options = {}) {
|
|
90741
|
+
const limits = resolvePptxLoadLimits(options);
|
|
90742
|
+
assertPptxInputWithinLimits(data.byteLength, limits);
|
|
90288
90743
|
const jsonText = decodePptxJsonText(data);
|
|
90289
90744
|
if (jsonText !== null) {
|
|
90290
|
-
return this.
|
|
90745
|
+
return this.importJson(jsonText, options, limits);
|
|
90291
90746
|
}
|
|
90292
90747
|
return super.load(data, options);
|
|
90293
90748
|
}
|
|
@@ -90298,9 +90753,26 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
90298
90753
|
* handler keeps a valid in-memory archive (editing and {@link save} keep
|
|
90299
90754
|
* working), then the imported model is overlaid on top: imported
|
|
90300
90755
|
* presentation fields win, and the slide array is replaced wholesale.
|
|
90756
|
+
*
|
|
90757
|
+
* `options.limits` applies as it does for {@link load}: `maxInputBytes` to
|
|
90758
|
+
* the UTF-8 size of `text` (checked before it is parsed), and `maxSlides`
|
|
90759
|
+
* and `maxShapes` to the document's slides with the same counting rule as
|
|
90760
|
+
* a `.pptx` package (layout and master elements are not counted).
|
|
90301
90761
|
*/
|
|
90302
90762
|
async loadFromJson(text, options = {}) {
|
|
90303
|
-
const
|
|
90763
|
+
const limits = resolvePptxLoadLimits(options);
|
|
90764
|
+
assertPptxTextWithinLimits(text, limits);
|
|
90765
|
+
return this.importJson(text, options, limits);
|
|
90766
|
+
}
|
|
90767
|
+
async importJson(text, options, limits) {
|
|
90768
|
+
const document2 = parsePptxJson(text);
|
|
90769
|
+
assertPptxSlideCountWithinLimits(document2.slides.length, limits);
|
|
90770
|
+
let shapes = 0;
|
|
90771
|
+
for (const slide of document2.slides) {
|
|
90772
|
+
const elements2 = Array.isArray(slide.elements) ? slide.elements : [];
|
|
90773
|
+
shapes = countPptxShapesWithinLimits(shapes, elements2, limits);
|
|
90774
|
+
}
|
|
90775
|
+
const imported = pptxDataFromJsonDocument(document2);
|
|
90304
90776
|
const blankBytes = await buildBlankPresentationArchive({
|
|
90305
90777
|
width: imported.widthEmu,
|
|
90306
90778
|
height: imported.heightEmu,
|
|
@@ -90308,7 +90780,7 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
90308
90780
|
// the overlaid model, so the archive must carry the value itself.
|
|
90309
90781
|
firstSlideNumber: imported.firstSlideNumber
|
|
90310
90782
|
});
|
|
90311
|
-
const base = await super.load(blankBytes, options);
|
|
90783
|
+
const base = await super.load(blankBytes, { ...options, limits: void 0 });
|
|
90312
90784
|
return applyImportedPptxData(base, imported);
|
|
90313
90785
|
}
|
|
90314
90786
|
};
|
|
@@ -91738,13 +92210,13 @@ function layoutRelsXml(masterIndex = 1) {
|
|
|
91738
92210
|
</Relationships>`;
|
|
91739
92211
|
}
|
|
91740
92212
|
function countExistingLayouts(zip) {
|
|
91741
|
-
let
|
|
92213
|
+
let count2 = 0;
|
|
91742
92214
|
zip.forEach((relativePath) => {
|
|
91743
92215
|
if (/^ppt\/slideLayouts\/slideLayout\d+\.xml$/.test(relativePath)) {
|
|
91744
|
-
|
|
92216
|
+
count2++;
|
|
91745
92217
|
}
|
|
91746
92218
|
});
|
|
91747
|
-
return
|
|
92219
|
+
return count2;
|
|
91748
92220
|
}
|
|
91749
92221
|
async function addLayoutToSlideMaster(zip, layoutIndex, masterIndex = 1) {
|
|
91750
92222
|
const masterRelsPath = `ppt/slideMasters/_rels/slideMaster${masterIndex}.xml.rels`;
|
|
@@ -92346,4 +92818,4 @@ var PresentationBuilder = class {
|
|
|
92346
92818
|
* `<p:extLst>` (optional)
|
|
92347
92819
|
*/
|
|
92348
92820
|
|
|
92349
|
-
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EncryptedPptError, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime107 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, PresentationBuilder, STANDARD_LAYOUTS, SlideBuilder, TABLE_STYLE_PART_SEQUENCE, TextShapeXmlFactory, addChartCategory, addChartSeries, addLayoutContentType, addLayoutToSlideMaster, addTableStyleToMap, animationFor, applyAfterAnimationBehavior, applyAfterAnimationFromEditorList, applyChartGroupOptionsInput, applyConnectorShapeIds, applySoundToEffectCTn, applySpeedToDuration, applyTableCellTextAndStyle, assertChartGradientSupported, breakAutoNumberRun, buildBlankPresentationArchive, buildRelationshipsXml, buildSingleEffectNode, buildSlideReferenceRemap, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, chartFormatTargetKey, clonePartGraph, convertPptToPptx, countExistingLayouts, createAutoNumberSequence, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTextElement, deleteTableStyleFromMap, ensureChartData, ensureDataPoint, extractAfterAnimationFromSubTnLst, extractGraphicBuilds, extractTableCellTextRuns, findLayoutByName, findLayoutByType, generateLayoutXml, generateTableStyleGuid, getAfterAnimation, getAfterAnimationState, getCapturedPreset, getCapturedTree, hasAnimation, isEncryptedLegacyPpt, isLegacyPpt, isLineDrawnChartType, isNativeAfterAnimationOnly, layoutRelsXml, mergeNativeAfterAnimationIntoEditorAnimations, mergeNativeSoundIntoEditorAnimations, nextAutoNumber, nextRelationshipId, normalizeTableStyleGuid, ooxmlToPresetName, parseAnimEffectFilter, parseChartFormatTargetKey, parseCondition, parseConditionList, parseFilterToken, parseRelationships, parseTimeTargetElement, rebuildTableStructureInRawXml, reconcileAnimationTargets, relationshipsPartFor, relativePartTarget, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeEmptyDataPoint, resetIdCounter, resolveConnectorShapeIds, resolveDirectionSubtype, resolveEffectTiming, resolveIterationCount, resolveOoxmlPresetMapping, resolveOpacitySet, resolvePartPath, resolveTableBackgroundFillRef, resolveTableStyleLineRef, resolveTableStyleLineRefColor, resolveVisibilitySetTiming, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeTimeTargetElement, setAfterAnimation, setAfterAnimationColor, setChartAreaFormat, setChartAxis2 as setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories2 as setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGroupOptions, setChartGrouping, setChartLegend2 as setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle2 as setChartTitle, setChartType, shouldHoldEndState, timingCurveToAccelDecel, toChartGradientFill, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, upsert, validateSeriesIndex };
|
|
92821
|
+
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, DEFAULT_PPTX_LOAD_LIMITS, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EncryptedPptError, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime107 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxLoadLimitError, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, PresentationBuilder, STANDARD_LAYOUTS, SlideBuilder, TABLE_STYLE_PART_SEQUENCE, TextShapeXmlFactory, addChartCategory, addChartSeries, addLayoutContentType, addLayoutToSlideMaster, addTableStyleToMap, animationFor, applyAfterAnimationBehavior, applyAfterAnimationFromEditorList, applyChartGroupOptionsInput, applyConnectorShapeIds, applySoundToEffectCTn, applySpeedToDuration, applyTableCellTextAndStyle, assertChartGradientSupported, breakAutoNumberRun, buildBlankPresentationArchive, buildRelationshipsXml, buildSingleEffectNode, buildSlideReferenceRemap, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, chartFormatTargetKey, clonePartGraph, convertPptToPptx, countExistingLayouts, createAutoNumberSequence, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTextElement, deleteTableStyleFromMap, ensureChartData, ensureDataPoint, extractAfterAnimationFromSubTnLst, extractGraphicBuilds, extractTableCellTextRuns, findLayoutByName, findLayoutByType, generateLayoutXml, generateTableStyleGuid, getAfterAnimation, getAfterAnimationState, getCapturedPreset, getCapturedTree, getPptxLoadLimitViolation, hasAnimation, isEncryptedLegacyPpt, isLegacyPpt, isLineDrawnChartType, isNativeAfterAnimationOnly, layoutRelsXml, mergeNativeAfterAnimationIntoEditorAnimations, mergeNativeSoundIntoEditorAnimations, nextAutoNumber, nextRelationshipId, normalizeTableStyleGuid, ooxmlToPresetName, parseAnimEffectFilter, parseChartFormatTargetKey, parseCondition, parseConditionList, parseFilterToken, parseRelationships, parseTimeTargetElement, rebuildTableStructureInRawXml, reconcileAnimationTargets, relationshipsPartFor, relativePartTarget, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeEmptyDataPoint, resetIdCounter, resolveConnectorShapeIds, resolveDirectionSubtype, resolveEffectTiming, resolveIterationCount, resolveOoxmlPresetMapping, resolveOpacitySet, resolvePartPath, resolveTableBackgroundFillRef, resolveTableStyleLineRef, resolveTableStyleLineRefColor, resolveVisibilitySetTiming, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeTimeTargetElement, setAfterAnimation, setAfterAnimationColor, setChartAreaFormat, setChartAxis2 as setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories2 as setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGroupOptions, setChartGrouping, setChartLegend2 as setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle2 as setChartTitle, setChartType, shouldHoldEndState, timingCurveToAccelDecel, toChartGradientFill, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, upsert, validateSeriesIndex };
|