ooxml-core 1.32.1 → 1.34.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-5UDSMCBG.cjs +14 -0
- package/dist/PptxHandler-TTRTAQAR.mjs +5 -0
- package/dist/PptxHandler-XCYX5DVX.mjs +7 -0
- package/dist/{PresentationBuilder-5NFBUP7Y.cjs → PresentationBuilder-HA56ZY23.cjs} +6 -5
- package/dist/{PresentationBuilder-S6HXHKEJ.mjs → PresentationBuilder-IVLUEB4K.mjs} +4 -4
- package/dist/{PresentationBuilder-3CH5TR4W.mjs → PresentationBuilder-JBTNOIL7.mjs} +3 -2
- package/dist/automation/index.cjs +47133 -42384
- package/dist/automation/index.mjs +47133 -42384
- package/dist/chart/funnel-geometry.d.ts +1 -1
- package/dist/chart/funnel-geometry.d.ts.map +1 -1
- package/dist/chart/index.cjs +5743 -3820
- package/dist/chart/index.mjs +5736 -3821
- package/dist/chart/region-map/alias.d.ts +12 -0
- package/dist/chart/region-map/alias.d.ts.map +1 -0
- package/dist/chart/region-map/cache.d.ts +20 -0
- package/dist/chart/region-map/cache.d.ts.map +1 -0
- package/dist/chart/region-map/colors.d.ts +4 -0
- package/dist/chart/region-map/colors.d.ts.map +1 -0
- package/dist/chart/region-map/data.d.ts +45 -0
- package/dist/chart/region-map/data.d.ts.map +1 -0
- package/dist/chart/region-map/geographic-projection.d.ts +4 -0
- package/dist/chart/region-map/geographic-projection.d.ts.map +1 -0
- package/dist/chart/region-map/geometry.d.ts +10 -0
- package/dist/chart/region-map/geometry.d.ts.map +1 -0
- package/dist/chart/region-map/index.cjs +892 -0
- package/dist/chart/region-map/index.d.ts +12 -0
- package/dist/chart/region-map/index.d.ts.map +1 -0
- package/dist/chart/region-map/index.mjs +870 -0
- package/dist/chart/region-map/projection.d.ts +19 -0
- package/dist/chart/region-map/projection.d.ts.map +1 -0
- package/dist/chart/region-map/types.d.ts +39 -0
- package/dist/chart/region-map/types.d.ts.map +1 -0
- package/dist/chart/region-map/value-color-positions.d.ts +4 -0
- package/dist/chart/region-map/value-color-positions.d.ts.map +1 -0
- package/dist/chart/region-map/value-colors.d.ts +4 -0
- package/dist/chart/region-map/value-colors.d.ts.map +1 -0
- package/dist/chart/region-map/world-regions.d.ts +22 -0
- package/dist/chart/region-map/world-regions.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-camera.d.ts +26 -0
- package/dist/chart/render/chart-3d-camera.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-layout.d.ts +27 -0
- package/dist/chart/render/chart-3d-layout.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-marks.d.ts +10 -0
- package/dist/chart/render/chart-3d-marks.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-mesh.d.ts +32 -0
- package/dist/chart/render/chart-3d-mesh.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-pie.d.ts +16 -0
- package/dist/chart/render/chart-3d-pie.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-projection.d.ts +37 -0
- package/dist/chart/render/chart-3d-projection.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-scene.d.ts +9 -0
- package/dist/chart/render/chart-3d-scene.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-shading.d.ts +10 -0
- package/dist/chart/render/chart-3d-shading.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-surface.d.ts +5 -0
- package/dist/chart/render/chart-3d-surface.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-svg.d.ts +7 -0
- package/dist/chart/render/chart-3d-svg.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-walls.d.ts +13 -0
- package/dist/chart/render/chart-3d-walls.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-region-map.d.ts +4 -0
- package/dist/chart/render/chart-svg-region-map.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-text-metrics.d.ts +2 -0
- package/dist/chart/render/chart-svg-text-metrics.d.ts.map +1 -1
- package/dist/chart/render/chart-svg.d.ts.map +1 -1
- package/dist/chart/render/chart-view.d.ts +5 -1
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/render/index.d.ts +5 -0
- package/dist/chart/render/index.d.ts.map +1 -1
- package/dist/chart/render/render-space.d.ts.map +1 -1
- package/dist/chart/render/summary-ex-formatting.d.ts +5 -0
- package/dist/chart/render/summary-ex-formatting.d.ts.map +1 -0
- package/dist/chart/render/summary-ex-series.d.ts.map +1 -1
- package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
- package/dist/chart/render/summary-from-space.d.ts.map +1 -1
- package/dist/chart/render/summary.d.ts +5 -1
- package/dist/chart/render/summary.d.ts.map +1 -1
- package/dist/chunk-2N7RZQLC.mjs +8 -0
- package/dist/{chunk-Q6NM64J2.cjs → chunk-A27O7M5X.cjs} +4938 -1083
- package/dist/{chunk-4R65YYAD.mjs → chunk-EGBNPVBA.mjs} +6256 -2277
- package/dist/{chunk-3H5UAJB3.mjs → chunk-GNGL4BO7.mjs} +935 -568
- package/dist/chunk-LSO5SSFX.mjs +112 -0
- package/dist/chunk-MB3TYNMV.mjs +28 -0
- package/dist/{chunk-N6424WKA.mjs → chunk-MK2IBZU6.mjs} +1 -1
- package/dist/{chunk-X6VNUBES.cjs → chunk-PA5ADSTX.cjs} +2124 -1791
- package/dist/{chunk-IOTGRLJH.mjs → chunk-RI56PFGL.mjs} +933 -600
- package/dist/{chunk-NAWLWKOJ.mjs → chunk-RPJHMPEL.mjs} +2 -2
- package/dist/{chunk-UYMSFJQZ.mjs → chunk-TJXK4D4U.mjs} +5 -5
- package/dist/{chunk-O7SVHLD7.mjs → chunk-UQMAPY6D.mjs} +4901 -1077
- package/dist/{chunk-54S5A5PZ.mjs → chunk-VDUNZTJC.mjs} +36 -1
- package/dist/chunk-XF6ZRA2D.cjs +120 -0
- package/dist/crypto/index.cjs +23 -15
- package/dist/crypto/index.mjs +23 -15
- package/dist/diagram/drawing-resolve.d.ts.map +1 -1
- package/dist/diagram/drawing-view.d.ts +6 -0
- package/dist/diagram/drawing-view.d.ts.map +1 -1
- package/dist/diagram/engine/engine-to-result.d.ts.map +1 -1
- package/dist/diagram/index.cjs +786 -145
- package/dist/diagram/index.d.ts +1 -0
- package/dist/diagram/index.d.ts.map +1 -1
- package/dist/diagram/index.mjs +783 -147
- package/dist/diagram/layout/smartart-layout-types.d.ts +7 -0
- package/dist/diagram/layout/smartart-layout-types.d.ts.map +1 -1
- package/dist/diagram/layout-preview.d.ts +4 -0
- package/dist/diagram/layout-preview.d.ts.map +1 -1
- package/dist/diagram/layout-role-style.d.ts +4 -0
- package/dist/diagram/layout-role-style.d.ts.map +1 -0
- package/dist/diagram/load.d.ts.map +1 -1
- package/dist/diagram/picture-layout.d.ts +23 -0
- package/dist/diagram/picture-layout.d.ts.map +1 -0
- package/dist/diagram/types.d.ts +6 -0
- package/dist/diagram/types.d.ts.map +1 -1
- package/dist/diagram/write/cache.d.ts +1 -0
- package/dist/diagram/write/cache.d.ts.map +1 -1
- package/dist/digest/crc32.d.ts +2 -0
- package/dist/digest/crc32.d.ts.map +1 -0
- package/dist/digest/index.cjs +11 -0
- package/dist/digest/index.d.ts +1 -0
- package/dist/digest/index.d.ts.map +1 -1
- package/dist/digest/index.mjs +11 -1
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/diagram-cache.d.ts.map +1 -1
- package/dist/docx/diagram-save.d.ts.map +1 -1
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +1394 -366
- package/dist/docx/embedded.mjs +1394 -366
- package/dist/docx/find-pattern.d.ts +33 -0
- package/dist/docx/find-pattern.d.ts.map +1 -0
- package/dist/docx/find-replacement.d.ts +16 -0
- package/dist/docx/find-replacement.d.ts.map +1 -0
- package/dist/docx/find-syntax.d.ts +13 -0
- package/dist/docx/find-syntax.d.ts.map +1 -0
- package/dist/docx/find-wildcards.d.ts +8 -0
- package/dist/docx/find-wildcards.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +39 -0
- package/dist/docx/form-field-model.d.ts.map +1 -1
- package/dist/docx/index.cjs +6107 -1728
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +6103 -1729
- package/dist/docx/inline-model.d.ts +4 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +2338 -554
- package/dist/docx/layout/index.mjs +2338 -554
- package/dist/docx/layout/input.d.ts +5 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +3 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +7593 -1539
- package/dist/docx/load/index.mjs +7593 -1539
- package/dist/docx/load/legacy-doc/binary-save.d.ts +4 -0
- package/dist/docx/load/legacy-doc/binary-save.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts +19 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/borders.d.ts +7 -0
- package/dist/docx/load/legacy-doc/borders.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/context.d.ts +65 -0
- package/dist/docx/load/legacy-doc/context.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts +15 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/error.d.ts +5 -0
- package/dist/docx/load/legacy-doc/error.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/inline.d.ts +7 -0
- package/dist/docx/load/legacy-doc/inline.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/package.d.ts +8 -0
- package/dist/docx/load/legacy-doc/package.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts +6 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts +8 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/sections.d.ts +23 -0
- package/dist/docx/load/legacy-doc/sections.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/table.d.ts +6 -0
- package/dist/docx/load/legacy-doc/table.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/xml.d.ts +21 -0
- package/dist/docx/load/legacy-doc/xml.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc.d.ts +5 -4
- package/dist/docx/load/legacy-doc.d.ts.map +1 -1
- package/dist/docx/model-paragraph.d.ts +5 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +3 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-editing.d.ts +11 -1
- package/dist/docx/numbering-editing.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/numbering-model.d.ts +17 -0
- package/dist/docx/numbering-model.d.ts.map +1 -1
- package/dist/docx/numbering-package.d.ts +2 -2
- package/dist/docx/numbering-package.d.ts.map +1 -1
- package/dist/docx/numbering-parse.d.ts +2 -1
- package/dist/docx/numbering-parse.d.ts.map +1 -1
- package/dist/docx/numbering-picture-save.d.ts +13 -0
- package/dist/docx/numbering-picture-save.d.ts.map +1 -0
- package/dist/docx/numbering-picture.d.ts +18 -0
- package/dist/docx/numbering-picture.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/permission-markers.d.ts +19 -0
- package/dist/docx/permission-markers.d.ts.map +1 -0
- package/dist/docx/permissions.d.ts +11 -0
- package/dist/docx/permissions.d.ts.map +1 -0
- package/dist/docx/protection-legacy.d.ts +13 -0
- package/dist/docx/protection-legacy.d.ts.map +1 -0
- package/dist/docx/protection.d.ts +30 -0
- package/dist/docx/protection.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +6 -1
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/ui/customization.d.ts.map +1 -1
- package/dist/docx/ui/edit-restriction.d.ts +53 -0
- package/dist/docx/ui/edit-restriction.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +3617 -1097
- package/dist/docx/ui/index.d.ts +4 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +3597 -1098
- package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
- package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
- package/dist/docx/ui/run-adapter.d.ts.map +1 -1
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +708 -111
- package/dist/drawingml/index.d.ts +7 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +698 -113
- package/dist/drawingml/picture-artistic.d.ts +14 -0
- package/dist/drawingml/picture-artistic.d.ts.map +1 -0
- package/dist/drawingml/picture-effects.d.ts +4 -1
- package/dist/drawingml/picture-effects.d.ts.map +1 -1
- package/dist/drawingml/picture-fill.d.ts.map +1 -1
- package/dist/drawingml/picture-hsl-pixels.d.ts +4 -0
- package/dist/drawingml/picture-hsl-pixels.d.ts.map +1 -0
- package/dist/drawingml/picture-layout.d.ts +25 -0
- package/dist/drawingml/picture-layout.d.ts.map +1 -0
- package/dist/drawingml/picture-standard-effects.d.ts +15 -0
- package/dist/drawingml/picture-standard-effects.d.ts.map +1 -0
- package/dist/drawingml/picture-transfer.d.ts +11 -0
- package/dist/drawingml/picture-transfer.d.ts.map +1 -0
- package/dist/drawingml/raster-image.d.ts +29 -0
- package/dist/drawingml/raster-image.d.ts.map +1 -0
- package/dist/drawingml/types.d.ts +1 -0
- package/dist/drawingml/types.d.ts.map +1 -1
- package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
- package/dist/drawingml/write-theme.d.ts +2 -0
- package/dist/drawingml/write-theme.d.ts.map +1 -1
- package/dist/geometry/index.cjs +38 -0
- package/dist/geometry/index.d.ts +1 -0
- package/dist/geometry/index.d.ts.map +1 -1
- package/dist/geometry/index.mjs +36 -1
- package/dist/geometry/picture-tile.d.ts +29 -0
- package/dist/geometry/picture-tile.d.ts.map +1 -0
- package/dist/index.cjs +15671 -12934
- package/dist/index.mjs +15671 -12934
- package/dist/pptx/automation/index.cjs +9313 -3688
- package/dist/pptx/automation/index.d.ts +40 -6
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +254 -12
- package/dist/pptx/automation/schemas/index.cjs +26 -0
- package/dist/pptx/automation/schemas/index.d.ts +26 -1
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -0
- package/dist/pptx/automation/schemas/index.mjs +1 -1
- package/dist/pptx/chunks/{elements-mSCZ84Tc.d.ts → elements-f3UbFph-.d.ts} +7 -2
- package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-DnWlmYCy.d.ts → index-BnH2QjYm.d.ts} +4 -4
- package/dist/pptx/chunks/{index-DnWlmYCy.d.ts.map → index-BnH2QjYm.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-D-FdgqrP.d.ts → index-Bp-1pGo1.d.ts} +4 -4
- package/dist/pptx/chunks/{index-D-FdgqrP.d.ts.map → index-Bp-1pGo1.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DKybuHPT.d.ts → index-pLLN4OTz.d.ts} +62 -24
- package/dist/pptx/chunks/index-pLLN4OTz.d.ts.map +1 -0
- package/dist/pptx/chunks/{smart-art-DLumQo90.d.ts → smart-art-CmOrPLLQ.d.ts} +86 -2
- package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts → text-operations-D5sgspO6.d.ts} +2 -2
- package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts.map → text-operations-D5sgspO6.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +7477 -2848
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +6 -6
- package/dist/pptx/converter/index.cjs +3895 -503
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/custom-show-operations.cjs +133 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts +42 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -0
- package/dist/pptx/editor/render/custom-show-operations.mjs +119 -0
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +8447 -3693
- package/dist/pptx/index.d.ts +7 -7
- package/dist/pptx/index.mjs +7 -7
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.mjs +2 -2
- package/dist/teams/index.cjs +2176 -751
- package/dist/teams/index.mjs +2176 -751
- package/dist/text/index.cjs +241 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +240 -1
- package/dist/text/truetype/parse.d.ts +36 -0
- package/dist/text/truetype/parse.d.ts.map +1 -0
- package/dist/text/truetype/subset.d.ts +16 -0
- package/dist/text/truetype/subset.d.ts.map +1 -0
- package/dist/visio/cell-formula.d.ts +5 -1
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/collab/index.cjs +3 -1
- package/dist/visio/collab/index.mjs +3 -1
- package/dist/visio/container-relationships.d.ts +53 -0
- package/dist/visio/container-relationships.d.ts.map +1 -0
- package/dist/visio/data-connections.d.ts +32 -0
- package/dist/visio/data-connections.d.ts.map +1 -0
- package/dist/visio/data-recordsets.d.ts +7 -0
- package/dist/visio/data-recordsets.d.ts.map +1 -1
- package/dist/visio/data-refresh.d.ts +33 -0
- package/dist/visio/data-refresh.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +6 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-container-fit.d.ts +32 -0
- package/dist/visio/edit-container-fit.d.ts.map +1 -0
- package/dist/visio/edit-container-members.d.ts +33 -0
- package/dist/visio/edit-container-members.d.ts.map +1 -0
- package/dist/visio/edit-container-options.d.ts +33 -0
- package/dist/visio/edit-container-options.d.ts.map +1 -0
- package/dist/visio/edit-data-commands.d.ts +5 -0
- package/dist/visio/edit-data-commands.d.ts.map +1 -1
- package/dist/visio/edit-data-parts.d.ts +2 -0
- package/dist/visio/edit-data-parts.d.ts.map +1 -1
- package/dist/visio/edit-data.d.ts.map +1 -1
- package/dist/visio/edit-delete.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts +24 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts.d.ts +11 -2
- package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
- package/dist/visio/edit-geometry.d.ts +4 -1
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-group-resize.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.d.ts.map +1 -1
- package/dist/visio/edit-package.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-commands.d.ts +26 -0
- package/dist/visio/edit-page-theme-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-part.d.ts +6 -0
- package/dist/visio/edit-page-theme-part.d.ts.map +1 -0
- package/dist/visio/edit-page-theme.d.ts +9 -1
- package/dist/visio/edit-page-theme.d.ts.map +1 -1
- package/dist/visio/edit-picture-adjust.d.ts +32 -0
- package/dist/visio/edit-picture-adjust.d.ts.map +1 -0
- package/dist/visio/edit-recalculate-index.d.ts +13 -0
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
- package/dist/visio/edit-recalculate.d.ts.map +1 -1
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-commands.d.ts +91 -0
- package/dist/visio/edit-swimlane-commands.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-layout.d.ts +64 -0
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-ops.d.ts +11 -0
- package/dist/visio/edit-swimlane-ops.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-shapes.d.ts +42 -0
- package/dist/visio/edit-swimlane-shapes.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-turn.d.ts +9 -0
- package/dist/visio/edit-swimlane-turn.d.ts.map +1 -0
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/effects.d.ts +3 -2
- package/dist/visio/effects.d.ts.map +1 -1
- package/dist/visio/formula-analyze.d.ts +2 -0
- package/dist/visio/formula-analyze.d.ts.map +1 -1
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula-master.d.ts +1 -0
- package/dist/visio/formula-master.d.ts.map +1 -1
- package/dist/visio/geometry.d.ts +2 -1
- package/dist/visio/geometry.d.ts.map +1 -1
- package/dist/visio/index.cjs +12207 -7779
- package/dist/visio/index.d.ts +8 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +12201 -7780
- package/dist/visio/infinite-line.d.ts +17 -0
- package/dist/visio/infinite-line.d.ts.map +1 -0
- package/dist/visio/media.d.ts +4 -23
- package/dist/visio/media.d.ts.map +1 -1
- package/dist/visio/model.d.ts +46 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/package-common.d.ts +1 -1
- package/dist/visio/package-common.d.ts.map +1 -1
- package/dist/visio/package-kind.d.ts +34 -0
- package/dist/visio/package-kind.d.ts.map +1 -0
- package/dist/visio/page-theme.d.ts +7 -0
- package/dist/visio/page-theme.d.ts.map +1 -1
- package/dist/visio/parser.d.ts +2 -2
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shadow.d.ts +2 -1
- package/dist/visio/shadow.d.ts.map +1 -1
- package/dist/visio/shape-structure.d.ts +19 -3
- package/dist/visio/shape-structure.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts +7 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/stencil-file.d.ts +2 -2
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/swimlane-stack.d.ts +65 -0
- package/dist/visio/swimlane-stack.d.ts.map +1 -0
- package/dist/visio/theme-builtins.d.ts +3 -0
- package/dist/visio/theme-builtins.d.ts.map +1 -1
- package/dist/visio/theme-effects.d.ts +19 -0
- package/dist/visio/theme-effects.d.ts.map +1 -0
- package/dist/visio/theme-font.d.ts +13 -0
- package/dist/visio/theme-font.d.ts.map +1 -0
- package/dist/visio/theme-line.d.ts.map +1 -1
- package/dist/visio/theme-write.d.ts.map +1 -1
- package/dist/visio/theme.d.ts +7 -0
- package/dist/visio/theme.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-config.d.ts +45 -0
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-rules.d.ts +7 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +9 -0
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/diagram-parts.d.ts +20 -2
- package/dist/visio/ui/diagram-parts.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/guides.d.ts +9 -1
- package/dist/visio/ui/guides.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +14266 -10008
- package/dist/visio/ui/index.d.ts +4 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +14231 -10009
- package/dist/visio/ui/org-chart.d.ts +75 -0
- package/dist/visio/ui/org-chart.d.ts.map +1 -0
- package/dist/visio/ui/resize-snap.d.ts +51 -0
- package/dist/visio/ui/resize-snap.d.ts.map +1 -0
- package/dist/visio/ui/sample-drawing.d.ts +26 -0
- package/dist/visio/ui/sample-drawing.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/selection-resize.d.ts +2 -2
- package/dist/visio/ui/selection-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-resize.d.ts +29 -1
- package/dist/visio/ui/shape-resize.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/swimlane.d.ts +37 -0
- package/dist/visio/ui/swimlane.d.ts.map +1 -0
- package/dist/visio/ui/templates.d.ts +26 -0
- package/dist/visio/ui/templates.d.ts.map +1 -0
- package/dist/xlsx/audit/ast-text.d.ts +12 -0
- package/dist/xlsx/audit/ast-text.d.ts.map +1 -0
- package/dist/xlsx/audit/error-check.d.ts +23 -0
- package/dist/xlsx/audit/error-check.d.ts.map +1 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts +48 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts.map +1 -0
- package/dist/xlsx/audit/index.d.ts +6 -0
- package/dist/xlsx/audit/index.d.ts.map +1 -0
- package/dist/xlsx/audit/trace.d.ts +59 -0
- package/dist/xlsx/audit/trace.d.ts.map +1 -0
- package/dist/xlsx/audit/watch.d.ts +17 -0
- package/dist/xlsx/audit/watch.d.ts.map +1 -0
- package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/chart-ex.d.ts +1 -0
- package/dist/xlsx/edit/chart-ex.d.ts.map +1 -1
- package/dist/xlsx/edit/filter.d.ts +8 -1
- package/dist/xlsx/edit/filter.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +5 -1
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/session-calc.d.ts +5 -0
- package/dist/xlsx/edit/session-calc.d.ts.map +1 -1
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sort-choices.d.ts +23 -0
- package/dist/xlsx/edit/sort-choices.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-keys.d.ts +49 -0
- package/dist/xlsx/edit/sort-keys.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-reapply.d.ts +11 -0
- package/dist/xlsx/edit/sort-reapply.d.ts.map +1 -0
- package/dist/xlsx/edit/sort.d.ts +14 -12
- package/dist/xlsx/edit/sort.d.ts.map +1 -1
- package/dist/xlsx/edit/text-columns.d.ts +21 -0
- package/dist/xlsx/edit/text-columns.d.ts.map +1 -0
- package/dist/xlsx/edit/types.d.ts +10 -5
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/edit/view.d.ts +9 -1
- package/dist/xlsx/edit/view.d.ts.map +1 -1
- package/dist/xlsx/embedded-chart-ex-space.d.ts +18 -0
- package/dist/xlsx/embedded-chart-ex-space.d.ts.map +1 -0
- package/dist/xlsx/filter-criteria.d.ts +23 -0
- package/dist/xlsx/filter-criteria.d.ts.map +1 -0
- package/dist/xlsx/filter-dynamic.d.ts +8 -0
- package/dist/xlsx/filter-dynamic.d.ts.map +1 -0
- package/dist/xlsx/filter-menu.d.ts +49 -0
- package/dist/xlsx/filter-menu.d.ts.map +1 -0
- package/dist/xlsx/filter-rows.d.ts +4 -4
- package/dist/xlsx/filter-rows.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-types.d.ts +8 -0
- package/dist/xlsx/formula/engine-types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +7259 -3079
- package/dist/xlsx/index.d.ts +5 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +7213 -3079
- package/dist/xlsx/layout/index.d.ts +1 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/split.d.ts +55 -0
- package/dist/xlsx/layout/split.d.ts.map +1 -0
- package/dist/xlsx/layout/viewport.d.ts +2 -0
- package/dist/xlsx/layout/viewport.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +2170 -688
- package/dist/xlsx/load/index.mjs +2170 -688
- package/dist/xlsx/model-filter.d.ts +54 -0
- package/dist/xlsx/model-filter.d.ts.map +1 -0
- package/dist/xlsx/model-sort.d.ts +27 -0
- package/dist/xlsx/model-sort.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +81 -4
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/chart.d.ts.map +1 -1
- package/dist/xlsx/read/drawing.d.ts.map +1 -1
- package/dist/xlsx/read/filter-columns.d.ts +5 -0
- package/dist/xlsx/read/filter-columns.d.ts.map +1 -0
- package/dist/xlsx/read/ignored-errors.d.ts +4 -0
- package/dist/xlsx/read/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/read/shared-strings.d.ts +5 -3
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-props.d.ts +2 -2
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/sort-state.d.ts +5 -0
- package/dist/xlsx/read/sort-state.d.ts.map +1 -0
- package/dist/xlsx/read/tables.d.ts +2 -2
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/sort-lists.d.ts +6 -0
- package/dist/xlsx/sort-lists.d.ts.map +1 -0
- package/dist/xlsx/ui/audit-state.d.ts +19 -0
- package/dist/xlsx/ui/audit-state.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/filters.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/filters.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -1
- package/dist/xlsx/ui/context.d.ts +6 -1
- package/dist/xlsx/ui/context.d.ts.map +1 -1
- package/dist/xlsx/ui/dialogs/grid-chart.d.ts.map +1 -1
- package/dist/xlsx/ui/grid/geometry.d.ts +29 -1
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +9454 -5323
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +9448 -5324
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
- package/dist/xlsx/write/drawing.d.ts.map +1 -1
- package/dist/xlsx/write/filter-columns.d.ts +53 -0
- package/dist/xlsx/write/filter-columns.d.ts.map +1 -0
- package/dist/xlsx/write/ignored-errors.d.ts +3 -0
- package/dist/xlsx/write/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/write/shared-strings.d.ts +4 -4
- package/dist/xlsx/write/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts +2 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/smart-art-cache.d.ts.map +1 -1
- package/dist/xlsx/write/smart-art.d.ts.map +1 -1
- package/dist/xlsx/write/sort-state.d.ts +55 -0
- package/dist/xlsx/write/sort-state.d.ts.map +1 -0
- package/dist/xlsx/write/table-patch.d.ts +2 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/dist/xlsx/write/tables.d.ts +2 -1
- package/dist/xlsx/write/tables.d.ts.map +1 -1
- package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +7 -2
- package/dist/PptxHandler-QY5VL3CY.mjs +0 -7
- package/dist/PptxHandler-SJ5ZUIUX.mjs +0 -4
- package/dist/PptxHandler-TESZUH66.cjs +0 -13
- package/dist/chunk-3GXV5MPC.mjs +0 -41
- package/dist/chunk-MHNETXQB.mjs +0 -1
- package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +0 -1
- package/dist/pptx/chunks/index-DKybuHPT.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, tableCellTextBodyMatches } from './chunk-LSO5SSFX.mjs';
|
|
2
|
+
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, readText3DValues, cloneXmlObject, readScene3DValues, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, openZip, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, readPictureEffect, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, patchDrawingColorIn, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, buildRelationshipsXml, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, guardZip, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, ZipBombError, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, decodeBase64, parseSmartArtPresLayoutVars, parseDrawingColorIn, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, resolveDiagramLayoutCategory, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-UQMAPY6D.mjs';
|
|
2
3
|
import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
|
|
3
4
|
import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
|
|
4
5
|
import JSZip2 from 'jszip';
|
|
@@ -914,196 +915,49 @@ function applyCellWritesToWorksheet(doc, writes, sharedStrings = []) {
|
|
|
914
915
|
return changed;
|
|
915
916
|
}
|
|
916
917
|
|
|
917
|
-
//
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
"legacyObliqueBottom",
|
|
927
|
-
"legacyObliqueBottomRight",
|
|
928
|
-
"legacyPerspectiveTopLeft",
|
|
929
|
-
"legacyPerspectiveTop",
|
|
930
|
-
"legacyPerspectiveTopRight",
|
|
931
|
-
"legacyPerspectiveLeft",
|
|
932
|
-
"legacyPerspectiveFront",
|
|
933
|
-
"legacyPerspectiveRight",
|
|
934
|
-
"legacyPerspectiveBottomLeft",
|
|
935
|
-
"legacyPerspectiveBottom",
|
|
936
|
-
"legacyPerspectiveBottomRight",
|
|
937
|
-
"orthographicFront",
|
|
938
|
-
"isometricTopUp",
|
|
939
|
-
"isometricTopDown",
|
|
940
|
-
"isometricBottomUp",
|
|
941
|
-
"isometricBottomDown",
|
|
942
|
-
"isometricLeftUp",
|
|
943
|
-
"isometricLeftDown",
|
|
944
|
-
"isometricRightUp",
|
|
945
|
-
"isometricRightDown",
|
|
946
|
-
"isometricOffAxis1Left",
|
|
947
|
-
"isometricOffAxis1Right",
|
|
948
|
-
"isometricOffAxis1Top",
|
|
949
|
-
"isometricOffAxis2Left",
|
|
950
|
-
"isometricOffAxis2Right",
|
|
951
|
-
"isometricOffAxis2Top",
|
|
952
|
-
"isometricOffAxis3Left",
|
|
953
|
-
"isometricOffAxis3Right",
|
|
954
|
-
"isometricOffAxis3Bottom",
|
|
955
|
-
"isometricOffAxis4Left",
|
|
956
|
-
"isometricOffAxis4Right",
|
|
957
|
-
"isometricOffAxis4Bottom",
|
|
958
|
-
"obliqueTopLeft",
|
|
959
|
-
"obliqueTop",
|
|
960
|
-
"obliqueTopRight",
|
|
961
|
-
"obliqueLeft",
|
|
962
|
-
"obliqueRight",
|
|
963
|
-
"obliqueBottomLeft",
|
|
964
|
-
"obliqueBottom",
|
|
965
|
-
"obliqueBottomRight",
|
|
966
|
-
"perspectiveFront",
|
|
967
|
-
"perspectiveLeft",
|
|
968
|
-
"perspectiveRight",
|
|
969
|
-
"perspectiveAbove",
|
|
970
|
-
"perspectiveBelow",
|
|
971
|
-
"perspectiveAboveLeftFacing",
|
|
972
|
-
"perspectiveAboveRightFacing",
|
|
973
|
-
"perspectiveContrastingLeftFacing",
|
|
974
|
-
"perspectiveContrastingRightFacing",
|
|
975
|
-
"perspectiveHeroicLeftFacing",
|
|
976
|
-
"perspectiveHeroicRightFacing",
|
|
977
|
-
"perspectiveHeroicExtremeLeftFacing",
|
|
978
|
-
"perspectiveHeroicExtremeRightFacing",
|
|
979
|
-
"perspectiveRelaxed",
|
|
980
|
-
"perspectiveRelaxedModerately"
|
|
981
|
-
]);
|
|
982
|
-
var LIGHT_RIGS = /* @__PURE__ */ new Set([
|
|
983
|
-
"legacyFlat1",
|
|
984
|
-
"legacyFlat2",
|
|
985
|
-
"legacyFlat3",
|
|
986
|
-
"legacyFlat4",
|
|
987
|
-
"legacyNormal1",
|
|
988
|
-
"legacyNormal2",
|
|
989
|
-
"legacyNormal3",
|
|
990
|
-
"legacyNormal4",
|
|
991
|
-
"legacyHarsh1",
|
|
992
|
-
"legacyHarsh2",
|
|
993
|
-
"legacyHarsh3",
|
|
994
|
-
"legacyHarsh4",
|
|
995
|
-
"threePt",
|
|
996
|
-
"balanced",
|
|
997
|
-
"soft",
|
|
998
|
-
"harsh",
|
|
999
|
-
"flood",
|
|
1000
|
-
"contrasting",
|
|
1001
|
-
"morning",
|
|
1002
|
-
"sunrise",
|
|
1003
|
-
"sunset",
|
|
1004
|
-
"chilly",
|
|
1005
|
-
"freezing",
|
|
1006
|
-
"flat",
|
|
1007
|
-
"twoPt",
|
|
1008
|
-
"glow",
|
|
1009
|
-
"brightRoom"
|
|
1010
|
-
]);
|
|
1011
|
-
var LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
|
|
1012
|
-
|
|
1013
|
-
// drawingml/read-3d-values.ts
|
|
1014
|
-
var integer = (value) => {
|
|
1015
|
-
if (value === void 0 || value === null || String(value).trim() === "") return void 0;
|
|
1016
|
-
const n = Number(value);
|
|
1017
|
-
return Number.isSafeInteger(n) ? n : void 0;
|
|
1018
|
-
};
|
|
1019
|
-
function readScene3DValues(node, read) {
|
|
1020
|
-
const out = {};
|
|
1021
|
-
const camera = read.child(node, "camera");
|
|
1022
|
-
const light = read.child(node, "lightRig");
|
|
1023
|
-
for (const [key2, source, attribute2, choices] of [
|
|
1024
|
-
["cameraPreset", camera, "prst", CAMERA_PRESETS],
|
|
1025
|
-
["lightRigType", light, "rig", LIGHT_RIGS],
|
|
1026
|
-
["lightRigDirection", light, "dir", LIGHT_DIRECTIONS]
|
|
1027
|
-
]) {
|
|
1028
|
-
const token2 = String(read.attribute(source, attribute2) ?? "").trim();
|
|
1029
|
-
if (choices.has(token2)) out[key2] = token2;
|
|
1030
|
-
}
|
|
1031
|
-
const fov = integer(read.attribute(camera, "fov"));
|
|
1032
|
-
if (fov !== void 0 && fov >= 0 && fov <= 108e5) out.cameraFieldOfView = fov;
|
|
1033
|
-
const zoom = picturePercentage(read.attribute(camera, "zoom"));
|
|
1034
|
-
if (zoom !== void 0 && zoom > 0) out.cameraZoom = zoom;
|
|
1035
|
-
for (const [prefix, source] of [
|
|
1036
|
-
["camera", camera],
|
|
1037
|
-
["lightRig", light]
|
|
1038
|
-
]) {
|
|
1039
|
-
const rot = read.child(source, "rot");
|
|
1040
|
-
for (const [axis, key2] of [
|
|
1041
|
-
["lat", "RotX"],
|
|
1042
|
-
["lon", "RotY"],
|
|
1043
|
-
["rev", "RotZ"]
|
|
1044
|
-
]) {
|
|
1045
|
-
const value = integer(read.attribute(rot, axis));
|
|
1046
|
-
if (value !== void 0 && value >= 0 && value < 216e5) out[`${prefix}${key2}`] = value;
|
|
1047
|
-
}
|
|
918
|
+
// diagram/edit/node-tree.ts
|
|
919
|
+
function treeOrderDiagramNodes(nodes) {
|
|
920
|
+
const ids = new Set(nodes.map((node) => node.id));
|
|
921
|
+
const childrenOf = /* @__PURE__ */ new Map();
|
|
922
|
+
for (const node of nodes) {
|
|
923
|
+
const parent = node.parentId && ids.has(node.parentId) ? node.parentId : void 0;
|
|
924
|
+
const list2 = childrenOf.get(parent) ?? [];
|
|
925
|
+
list2.push(node);
|
|
926
|
+
childrenOf.set(parent, list2);
|
|
1048
927
|
}
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
for (const
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
const point = read.child(backdrop, name);
|
|
1058
|
-
for (const [axis, suffix] of [
|
|
1059
|
-
["x", "X"],
|
|
1060
|
-
["y", "Y"],
|
|
1061
|
-
["z", "Z"]
|
|
1062
|
-
]) {
|
|
1063
|
-
const value = integer(read.attribute(point, `${attr5}${axis}`));
|
|
1064
|
-
if (value !== void 0) out[`${prefix}${suffix}`] = value;
|
|
1065
|
-
}
|
|
928
|
+
const ordered3 = [];
|
|
929
|
+
const seen = /* @__PURE__ */ new Set();
|
|
930
|
+
const visit = (parent) => {
|
|
931
|
+
for (const node of childrenOf.get(parent) ?? []) {
|
|
932
|
+
if (seen.has(node.id)) continue;
|
|
933
|
+
seen.add(node.id);
|
|
934
|
+
ordered3.push(node);
|
|
935
|
+
visit(node.id);
|
|
1066
936
|
}
|
|
1067
|
-
}
|
|
1068
|
-
|
|
937
|
+
};
|
|
938
|
+
visit(void 0);
|
|
939
|
+
for (const node of nodes) if (!seen.has(node.id)) ordered3.push(node);
|
|
940
|
+
return ordered3;
|
|
1069
941
|
}
|
|
1070
|
-
function
|
|
1071
|
-
const
|
|
1072
|
-
for (const
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
["bevelT", "bevelTop"],
|
|
1084
|
-
["bevelB", "bevelBottom"]
|
|
1085
|
-
]) {
|
|
1086
|
-
const bevel = read.child(node, name);
|
|
1087
|
-
if (!bevel) continue;
|
|
1088
|
-
out[`${prefix}Type`] = String(read.attribute(bevel, "prst") || "circle").trim();
|
|
1089
|
-
for (const [attribute2, suffix] of [
|
|
1090
|
-
["w", "Width"],
|
|
1091
|
-
["h", "Height"]
|
|
1092
|
-
]) {
|
|
1093
|
-
const value = integer(read.attribute(bevel, attribute2));
|
|
1094
|
-
if (value !== void 0) out[`${prefix}${suffix}`] = value;
|
|
942
|
+
function diagramNodesInTreeOrder(data) {
|
|
943
|
+
const order = /* @__PURE__ */ new Map();
|
|
944
|
+
for (const connection of data.connections)
|
|
945
|
+
if ((connection.type ?? "parOf") === "parOf" && !order.has(connection.destId))
|
|
946
|
+
order.set(connection.destId, connection.srcOrd ?? 0);
|
|
947
|
+
const nodes = data.nodes.map((node, index) => ({
|
|
948
|
+
index,
|
|
949
|
+
node: {
|
|
950
|
+
id: node.modelId,
|
|
951
|
+
text: node.text,
|
|
952
|
+
...node.textParagraphs ? { paragraphs: node.textParagraphs } : {},
|
|
953
|
+
...data.parentById.get(node.modelId) ? { parentId: data.parentById.get(node.modelId) } : {},
|
|
954
|
+
...node.type === "asst" ? { nodeType: "asst" } : {}
|
|
1095
955
|
}
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
function appendInSchemaOrder(parent, order, entries) {
|
|
1102
|
-
const rank = (name) => {
|
|
1103
|
-
const index = order.indexOf(name);
|
|
1104
|
-
return index < 0 ? order.length : index;
|
|
1105
|
-
};
|
|
1106
|
-
entries.map((entry2, index) => ({ entry: entry2, index })).sort((a, b) => rank(a.entry.name) - rank(b.entry.name) || a.index - b.index).forEach(({ entry: entry2 }) => parent.appendChild(entry2.node));
|
|
956
|
+
}));
|
|
957
|
+
nodes.sort(
|
|
958
|
+
(a, b) => (order.get(a.node.id) ?? Number.MAX_SAFE_INTEGER) - (order.get(b.node.id) ?? Number.MAX_SAFE_INTEGER) || a.index - b.index
|
|
959
|
+
);
|
|
960
|
+
return treeOrderDiagramNodes(nodes.map((entry2) => entry2.node));
|
|
1107
961
|
}
|
|
1108
962
|
|
|
1109
963
|
// diagram/write/fabricated-styles.ts
|
|
@@ -1150,185 +1004,31 @@ function buildFabricatedColorsXml(scheme) {
|
|
|
1150
1004
|
).join("")}</dgm:colorsDef>`;
|
|
1151
1005
|
}
|
|
1152
1006
|
|
|
1153
|
-
// drawingml/
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
"grpFill",
|
|
1162
|
-
"effectLst",
|
|
1163
|
-
"effectDag",
|
|
1164
|
-
"highlight",
|
|
1165
|
-
"uLnTx",
|
|
1166
|
-
"uLn",
|
|
1167
|
-
"uFillTx",
|
|
1168
|
-
"uFill",
|
|
1169
|
-
"latin",
|
|
1170
|
-
"ea",
|
|
1171
|
-
"cs",
|
|
1172
|
-
"sym",
|
|
1173
|
-
"hlinkClick",
|
|
1174
|
-
"hlinkMouseOver",
|
|
1175
|
-
"rtl",
|
|
1176
|
-
"extLst"
|
|
1177
|
-
];
|
|
1178
|
-
|
|
1179
|
-
// diagram/data-model.ts
|
|
1180
|
-
var TRANSITION_TYPES = /* @__PURE__ */ new Set(["parTrans", "sibTrans"]);
|
|
1181
|
-
function collectTransitionText(points7, describe, text) {
|
|
1182
|
-
const byId = /* @__PURE__ */ new Map();
|
|
1183
|
-
for (const point of points7) {
|
|
1184
|
-
const { type, modelId } = describe(point);
|
|
1185
|
-
if (!TRANSITION_TYPES.has((type ?? "").trim())) continue;
|
|
1186
|
-
const id = (modelId ?? "").trim();
|
|
1187
|
-
if (!id) continue;
|
|
1188
|
-
const value = text(point).trim();
|
|
1189
|
-
if (value.length > 0) byId.set(id, value);
|
|
1190
|
-
}
|
|
1191
|
-
return byId;
|
|
1192
|
-
}
|
|
1193
|
-
function connectionLabel(connection, transitionText) {
|
|
1194
|
-
const parent = connection.parentTransitionId ? transitionText.get(connection.parentTransitionId) : void 0;
|
|
1195
|
-
const sibling = connection.siblingTransitionId ? transitionText.get(connection.siblingTransitionId) : void 0;
|
|
1196
|
-
return parent ?? sibling;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
// diagram/layout-category.ts
|
|
1200
|
-
var CATEGORY_FAMILY = {
|
|
1201
|
-
list: "list",
|
|
1202
|
-
process: "process",
|
|
1203
|
-
cycle: "cycle",
|
|
1204
|
-
hierarchy: "hierarchy",
|
|
1205
|
-
relationship: "relationship",
|
|
1206
|
-
matrix: "matrix",
|
|
1207
|
-
pyramid: "pyramid"
|
|
1208
|
-
};
|
|
1209
|
-
var UNIQUE_ID_KEYWORDS = [
|
|
1210
|
-
[/hier|org/u, "hierarchy"],
|
|
1211
|
-
[/cycle|radial|circular/u, "cycle"],
|
|
1212
|
-
[/process|flow|chevron|arrow|equation/u, "process"],
|
|
1213
|
-
[/timeline/u, "timeline"],
|
|
1214
|
-
[/matrix|grid/u, "matrix"],
|
|
1215
|
-
[/pyramid/u, "pyramid"],
|
|
1216
|
-
[/venn/u, "venn"],
|
|
1217
|
-
[/funnel/u, "funnel"],
|
|
1218
|
-
[/gear/u, "gear"],
|
|
1219
|
-
[/target/u, "target"],
|
|
1220
|
-
[/list/u, "list"]
|
|
1221
|
-
];
|
|
1222
|
-
function resolveDiagramLayoutCategory(uniqueId, categories) {
|
|
1223
|
-
for (const category of categories) {
|
|
1224
|
-
const family = CATEGORY_FAMILY[category.trim().toLowerCase()];
|
|
1225
|
-
if (family) return family;
|
|
1226
|
-
}
|
|
1227
|
-
const lowerId = uniqueId.toLowerCase();
|
|
1228
|
-
if (lowerId.length > 0) {
|
|
1229
|
-
for (const [pattern, family] of UNIQUE_ID_KEYWORDS) if (pattern.test(lowerId)) return family;
|
|
1230
|
-
}
|
|
1231
|
-
return void 0;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
// opc/relationship-types.ts
|
|
1235
|
-
var BASE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
1236
|
-
var RELATIONSHIP_TYPES = {
|
|
1237
|
-
officeDocument: `${BASE}/officeDocument`,
|
|
1238
|
-
styles: `${BASE}/styles`,
|
|
1239
|
-
numbering: `${BASE}/numbering`,
|
|
1240
|
-
settings: `${BASE}/settings`,
|
|
1241
|
-
theme: `${BASE}/theme`,
|
|
1242
|
-
fontTable: `${BASE}/fontTable`,
|
|
1243
|
-
webSettings: `${BASE}/webSettings`,
|
|
1244
|
-
header: `${BASE}/header`,
|
|
1245
|
-
footer: `${BASE}/footer`,
|
|
1246
|
-
footnotes: `${BASE}/footnotes`,
|
|
1247
|
-
endnotes: `${BASE}/endnotes`,
|
|
1248
|
-
comments: `${BASE}/comments`,
|
|
1249
|
-
image: `${BASE}/image`,
|
|
1250
|
-
hyperlink: `${BASE}/hyperlink`,
|
|
1251
|
-
oleObject: `${BASE}/oleObject`,
|
|
1252
|
-
chart: `${BASE}/chart`,
|
|
1253
|
-
package: `${BASE}/package`,
|
|
1254
|
-
slide: `${BASE}/slide`,
|
|
1255
|
-
slideLayout: `${BASE}/slideLayout`,
|
|
1256
|
-
slideMaster: `${BASE}/slideMaster`,
|
|
1257
|
-
notesSlide: `${BASE}/notesSlide`,
|
|
1258
|
-
diagramData: `${BASE}/diagramData`,
|
|
1259
|
-
diagramLayout: `${BASE}/diagramLayout`,
|
|
1260
|
-
diagramQuickStyle: `${BASE}/diagramQuickStyle`,
|
|
1261
|
-
diagramColors: `${BASE}/diagramColors`,
|
|
1262
|
-
diagramDrawing: "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing",
|
|
1263
|
-
coreProperties: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
|
|
1264
|
-
extendedProperties: `${BASE}/extended-properties`,
|
|
1265
|
-
customProperties: `${BASE}/custom-properties`,
|
|
1266
|
-
customXml: `${BASE}/customXml`,
|
|
1267
|
-
worksheet: `${BASE}/worksheet`,
|
|
1268
|
-
chartsheet: `${BASE}/chartsheet`,
|
|
1269
|
-
dialogsheet: `${BASE}/dialogsheet`,
|
|
1270
|
-
xlMacrosheet: "http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",
|
|
1271
|
-
sharedStrings: `${BASE}/sharedStrings`,
|
|
1272
|
-
drawing: `${BASE}/drawing`,
|
|
1273
|
-
table: `${BASE}/table`,
|
|
1274
|
-
threadedComment: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",
|
|
1275
|
-
person: "http://schemas.microsoft.com/office/2017/10/relationships/person",
|
|
1276
|
-
vmlDrawing: `${BASE}/vmlDrawing`,
|
|
1277
|
-
calcChain: `${BASE}/calcChain`,
|
|
1278
|
-
vbaProject: "http://schemas.microsoft.com/office/2006/relationships/vbaProject",
|
|
1279
|
-
pivotTable: `${BASE}/pivotTable`,
|
|
1280
|
-
pivotCacheDefinition: `${BASE}/pivotCacheDefinition`,
|
|
1281
|
-
externalLink: `${BASE}/externalLink`,
|
|
1282
|
-
printerSettings: `${BASE}/printerSettings`,
|
|
1283
|
-
sheetMetadata: `${BASE}/sheetMetadata`
|
|
1284
|
-
};
|
|
1285
|
-
|
|
1286
|
-
// opc/relationships.ts
|
|
1287
|
-
function parseRelationships(xml) {
|
|
1288
|
-
const map = /* @__PURE__ */ new Map();
|
|
1289
|
-
if (!xml) return map;
|
|
1290
|
-
const root = parseXml(xml).documentElement;
|
|
1291
|
-
for (const node of elements(root)) {
|
|
1292
|
-
if (node.localName !== "Relationship") continue;
|
|
1293
|
-
const id = node.getAttribute("Id");
|
|
1294
|
-
const target = node.getAttribute("Target");
|
|
1295
|
-
if (!id || target == null) continue;
|
|
1296
|
-
map.set(id, {
|
|
1297
|
-
id,
|
|
1298
|
-
type: node.getAttribute("Type") ?? "",
|
|
1299
|
-
target,
|
|
1300
|
-
mode: node.getAttribute("TargetMode") === "External" ? "External" : "Internal"
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
return map;
|
|
1304
|
-
}
|
|
1305
|
-
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
1306
|
-
function buildRelationshipsXml(relationships2) {
|
|
1307
|
-
const items = Array.from(relationships2).map(([id, rel]) => {
|
|
1308
|
-
const mode = rel.mode === "External" ? ' TargetMode="External"' : "";
|
|
1309
|
-
return `<Relationship Id="${escapeAttr(id)}" Type="${escapeAttr(rel.type)}" Target="${escapeAttr(rel.target)}"${mode}/>`;
|
|
1310
|
-
}).join("");
|
|
1311
|
-
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${NS.rels}">${items}</Relationships>`;
|
|
1312
|
-
}
|
|
1313
|
-
function resolvePartPath(basePart, target) {
|
|
1314
|
-
if (target.startsWith("/")) return target.slice(1);
|
|
1315
|
-
const baseDir = basePart.slice(0, basePart.lastIndexOf("/") + 1);
|
|
1316
|
-
const resolved = [];
|
|
1317
|
-
for (const segment of `${baseDir}${target}`.split("/")) {
|
|
1318
|
-
if (segment === "." || segment === "") continue;
|
|
1319
|
-
if (segment === "..") resolved.pop();
|
|
1320
|
-
else resolved.push(segment);
|
|
1007
|
+
// drawingml/drawing-shadow.ts
|
|
1008
|
+
function resolveDrawingOuterShadow(effect, theme) {
|
|
1009
|
+
if (effect.sourceXml) {
|
|
1010
|
+
const source = parseXml(effect.sourceXml).documentElement;
|
|
1011
|
+
for (const attribute2 of ["blurRad", "dist", "dir", "sx", "sy", "kx", "ky"]) {
|
|
1012
|
+
const value = source.getAttribute(attribute2);
|
|
1013
|
+
if (value !== null && !Number.isFinite(Number(value))) return void 0;
|
|
1014
|
+
}
|
|
1321
1015
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
return
|
|
1016
|
+
if ((effect.scaleX ?? 1e5) !== 1e5 || (effect.scaleY ?? 1e5) !== 1e5 || (effect.skewXAngle ?? 0) !== 0 || (effect.skewYAngle ?? 0) !== 0)
|
|
1017
|
+
return void 0;
|
|
1018
|
+
const color3 = effect.color;
|
|
1019
|
+
const resolved = color3 && resolveDrawingColor(color3, theme, { transformOrder: "document" });
|
|
1020
|
+
const blur = (effect.blurRadiusEmu ?? 0) / EMU_PER_PIXEL;
|
|
1021
|
+
const distance = (effect.distanceEmu ?? 0) / EMU_PER_PIXEL;
|
|
1022
|
+
const angle = (effect.directionAngle ?? 0) / 6e4 * Math.PI / 180;
|
|
1023
|
+
if (!resolved || ![blur, distance, angle].every(Number.isFinite) || blur < 0 || distance < 0)
|
|
1024
|
+
return void 0;
|
|
1025
|
+
return {
|
|
1026
|
+
color: resolved.hex,
|
|
1027
|
+
opacity: resolved.alpha,
|
|
1028
|
+
blur,
|
|
1029
|
+
dx: Math.cos(angle) * distance,
|
|
1030
|
+
dy: Math.sin(angle) * distance
|
|
1031
|
+
};
|
|
1332
1032
|
}
|
|
1333
1033
|
|
|
1334
1034
|
// opc/content-types.ts
|
|
@@ -1907,6 +1607,215 @@ function replaceTitleGroup(headingPairs, titlesOfParts, group) {
|
|
|
1907
1607
|
return fromTitleGroups(groups);
|
|
1908
1608
|
}
|
|
1909
1609
|
|
|
1610
|
+
// diagram/drawing-theme.ts
|
|
1611
|
+
function resolveDiagramDrawingStyles(drawing, scheme) {
|
|
1612
|
+
if (!scheme) return drawing;
|
|
1613
|
+
return {
|
|
1614
|
+
...drawing,
|
|
1615
|
+
shapes: drawing.shapes.map((shape2) => {
|
|
1616
|
+
const refs = shape2.style;
|
|
1617
|
+
if (!refs) return shape2;
|
|
1618
|
+
const fill3 = !shape2.fill && refs.fill?.index !== void 0 ? refs.fill.index === 0 ? { kind: "none" } : resolveThemeFillStyle(scheme, refs.fill.index, refs.fill.color) : void 0;
|
|
1619
|
+
const inheritedLine = refs.line?.index !== void 0 ? refs.line.index === 0 ? { fill: { kind: "none" } } : resolveThemeLineStyle(scheme, refs.line.index, refs.line.color) : void 0;
|
|
1620
|
+
const line = inheritedLine ? { ...inheritedLine, ...shape2.line } : void 0;
|
|
1621
|
+
const effects2 = !shape2.effects && refs.effect?.index !== void 0 ? resolveThemeEffectStyle(scheme, refs.effect.index, refs.effect.color) : void 0;
|
|
1622
|
+
return {
|
|
1623
|
+
...shape2,
|
|
1624
|
+
...fill3 ? { fill: fill3 } : {},
|
|
1625
|
+
...line ? { line } : {},
|
|
1626
|
+
...effects2 ? { effects: effects2 } : {}
|
|
1627
|
+
};
|
|
1628
|
+
})
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
// diagram/write/cache.ts
|
|
1633
|
+
var DSP = "http://schemas.microsoft.com/office/drawing/2008/diagram";
|
|
1634
|
+
function add(parent, namespace, name, attrs3 = {}) {
|
|
1635
|
+
const child17 = parent.ownerDocument.createElementNS(namespace, name);
|
|
1636
|
+
for (const [key2, value] of Object.entries(attrs3)) child17.setAttribute(key2, value);
|
|
1637
|
+
parent.appendChild(child17);
|
|
1638
|
+
return child17;
|
|
1639
|
+
}
|
|
1640
|
+
function withDiagramDrawingRelationship(xml, relationshipId) {
|
|
1641
|
+
const doc = parseXml(xml);
|
|
1642
|
+
const model = doc.documentElement;
|
|
1643
|
+
let extension = descendants(model, "dataModelExt").find((node) => node.namespaceURI === DSP);
|
|
1644
|
+
if (!extension) {
|
|
1645
|
+
const extLst = first(model, "extLst", NS.dgm) ?? add(model, NS.dgm, "dgm:extLst");
|
|
1646
|
+
extension = add(add(extLst, NS.a, "a:ext", { uri: DSP }), DSP, "dsp:dataModelExt", {
|
|
1647
|
+
minVer: NS.dgm
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
extension.setAttribute("relId", relationshipId);
|
|
1651
|
+
return buildXml(doc);
|
|
1652
|
+
}
|
|
1653
|
+
function buildGeneratedDiagramCache(dataXml2, input) {
|
|
1654
|
+
dataXml2 = withDiagramPictureSources(dataXml2, input.source);
|
|
1655
|
+
const source = { ...input.source, dataXml: dataXml2 };
|
|
1656
|
+
const model = parseDiagramDataModel(dataXml2);
|
|
1657
|
+
const scheme = { ...DEFAULT_GENERATED_DIAGRAM_SCHEME, ...input.scheme };
|
|
1658
|
+
const preview = previewDiagramLayout({
|
|
1659
|
+
...input,
|
|
1660
|
+
source,
|
|
1661
|
+
scheme,
|
|
1662
|
+
nodes: diagramNodesInTreeOrder(model)
|
|
1663
|
+
});
|
|
1664
|
+
if (preview.mode !== "interpreted" || preview.issues.length || !preview.drawing?.shapes.length)
|
|
1665
|
+
return void 0;
|
|
1666
|
+
const drawing = resolveDiagramDrawingStyles(preview.drawing, input.formatScheme);
|
|
1667
|
+
const doc = parseXml(dataXml2);
|
|
1668
|
+
const root = doc.documentElement;
|
|
1669
|
+
const points7 = first(root, "ptLst", NS.dgm);
|
|
1670
|
+
const connections = first(root, "cxnLst", NS.dgm);
|
|
1671
|
+
if (!points7 || !connections) return void 0;
|
|
1672
|
+
const colors = source.colorsXml ? parseDiagramColors(source.colorsXml).labels : [];
|
|
1673
|
+
const authoredColors = colors.flatMap((label2) => [...label2.fill.colors, ...label2.line.colors]);
|
|
1674
|
+
const themed = /* @__PURE__ */ new Map();
|
|
1675
|
+
for (const color3 of authoredColors) {
|
|
1676
|
+
const resolved = resolveDrawingColor(color3, { scheme: (name) => scheme[name] });
|
|
1677
|
+
if (resolved && !resolved.unapplied.length) themed.set(resolved.hex.toUpperCase(), color3);
|
|
1678
|
+
}
|
|
1679
|
+
for (const shape2 of drawing.shapes) {
|
|
1680
|
+
if (shape2.has3d || shape2.foldedNodeIds?.length) return void 0;
|
|
1681
|
+
if (shape2.fill && !["none", "solid", "gradient", "picture"].includes(shape2.fill.kind))
|
|
1682
|
+
return void 0;
|
|
1683
|
+
if (shape2.fill?.kind === "picture" && (!shape2.fill.relId || !drawing.pictureParts?.[shape2.fill.relId]))
|
|
1684
|
+
return void 0;
|
|
1685
|
+
if (shape2.fill?.kind === "gradient" && shape2.fill.path && !["circle", "rect"].includes(shape2.fill.path))
|
|
1686
|
+
return void 0;
|
|
1687
|
+
if (shape2.effects?.effects.some(
|
|
1688
|
+
(effect) => effect.kind !== "outerShadow" || !resolveDrawingOuterShadow(effect, { scheme: (name) => scheme[name] })
|
|
1689
|
+
))
|
|
1690
|
+
return void 0;
|
|
1691
|
+
const point = children(points7, "pt", NS.dgm).find(
|
|
1692
|
+
(point2) => point2.getAttribute("modelId") === shape2.sourceNodeId
|
|
1693
|
+
);
|
|
1694
|
+
const direct = model.nodes.find((node) => node.modelId === shape2.sourceNodeId);
|
|
1695
|
+
const fillIndex = shape2.style?.fill?.index;
|
|
1696
|
+
const template = fillIndex ? input.formatScheme?.fillStyles[fillIndex - 1]?.fill : void 0;
|
|
1697
|
+
if (!direct?.fill && shape2.fill?.kind === "solid" && shape2.fill.color.kind === "srgb" && (!template || template.kind === "solid" && template.color.kind === "scheme" && template.color.value === "phClr")) {
|
|
1698
|
+
const original = themed.get(`#${shape2.fill.color.value}`.toUpperCase());
|
|
1699
|
+
if (original)
|
|
1700
|
+
shape2.fill.color = {
|
|
1701
|
+
...original,
|
|
1702
|
+
transforms: [...original.transforms, ...shape2.fill.color.transforms]
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
if (!direct?.fill && shape2.fill?.kind === "gradient" && template?.kind === "gradient") {
|
|
1706
|
+
shape2.fill.stops.forEach((stop, index) => {
|
|
1707
|
+
const authored = template.stops[index]?.color;
|
|
1708
|
+
if (authored?.kind === "scheme" && authored.value === "phClr" && stop.color.kind === "srgb") {
|
|
1709
|
+
const original = themed.get(`#${stop.color.value}`.toUpperCase());
|
|
1710
|
+
if (original)
|
|
1711
|
+
stop.color = {
|
|
1712
|
+
...original,
|
|
1713
|
+
transforms: [...original.transforms, ...stop.color.transforms]
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
const role = colors.find((label2) => label2.name === shape2.sourceStyleLabel) ?? colors.find((label2) => label2.name === "node0");
|
|
1719
|
+
const fallbackColor = role?.textFill.colors[0] ?? {
|
|
1720
|
+
kind: "scheme",
|
|
1721
|
+
value: "tx1",
|
|
1722
|
+
transforms: []
|
|
1723
|
+
};
|
|
1724
|
+
const body = parseDrawingRichTextBody(first(point, "t", NS.dgm));
|
|
1725
|
+
if (body) {
|
|
1726
|
+
const props = body.bodyProperties;
|
|
1727
|
+
if (props && (props.vertical && props.vertical !== "horz" || (props.columnCount ?? 1) > 1 || props.rotation || props.extraXml?.length || props.autofit?.kind === "shape"))
|
|
1728
|
+
return void 0;
|
|
1729
|
+
for (const paragraph2 of body.paragraphs) {
|
|
1730
|
+
if (paragraph2.properties?.bullet && paragraph2.properties.bullet.kind !== "none" || paragraph2.properties?.tabStops?.length || paragraph2.items.some((item) => item.kind === "unknown"))
|
|
1731
|
+
return void 0;
|
|
1732
|
+
if (paragraph2.properties?.extraXml?.length || paragraph2.items.some((item) => {
|
|
1733
|
+
const properties = "properties" in item ? item.properties : void 0;
|
|
1734
|
+
return properties && (properties.baseline || properties.spacingPt || properties.rightToLeft || properties.highlight || properties.line || properties.caps && properties.caps !== "none" || properties.strike && properties.strike !== "noStrike" || properties.extraXml?.length);
|
|
1735
|
+
}))
|
|
1736
|
+
return void 0;
|
|
1737
|
+
paragraph2.properties = {
|
|
1738
|
+
...paragraph2.properties,
|
|
1739
|
+
defaultRunProperties: {
|
|
1740
|
+
sizePt: shape2.text?.paragraphs[0]?.runs[0]?.sizePt ?? 12,
|
|
1741
|
+
fill: { kind: "solid", color: fallbackColor },
|
|
1742
|
+
latin: { typeface: "+mn-lt" },
|
|
1743
|
+
...paragraph2.properties?.defaultRunProperties
|
|
1744
|
+
}
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
body.bodyProperties = { anchor: "ctr", ...body.bodyProperties };
|
|
1748
|
+
shape2.body = body;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
let serialized;
|
|
1752
|
+
try {
|
|
1753
|
+
serialized = writeGeneratedDiagramDrawing(drawing);
|
|
1754
|
+
} catch {
|
|
1755
|
+
return void 0;
|
|
1756
|
+
}
|
|
1757
|
+
const oldMarkers = descendants(root, "generatedCache").filter(
|
|
1758
|
+
(node) => node.namespaceURI === GENERATED_DIAGRAM_CACHE_NS
|
|
1759
|
+
);
|
|
1760
|
+
const oldIds = new Set(
|
|
1761
|
+
oldMarkers.flatMap(
|
|
1762
|
+
(marker3) => descendants(marker3, "shape").map((node) => node.getAttribute("id"))
|
|
1763
|
+
)
|
|
1764
|
+
);
|
|
1765
|
+
for (const point of children(points7, "pt", NS.dgm))
|
|
1766
|
+
if (oldIds.has(point.getAttribute("modelId"))) points7.removeChild(point);
|
|
1767
|
+
for (const edge of children(connections, "cxn", NS.dgm))
|
|
1768
|
+
if (oldIds.has(edge.getAttribute("destId"))) connections.removeChild(edge);
|
|
1769
|
+
for (const marker3 of oldMarkers) {
|
|
1770
|
+
const parent = marker3.parentNode;
|
|
1771
|
+
if (parent && children(parent, "generatedCache", GENERATED_DIAGRAM_CACHE_NS).length === 1 && parent.childNodes.length === 1)
|
|
1772
|
+
parent.parentNode?.removeChild(parent);
|
|
1773
|
+
else parent?.removeChild(marker3);
|
|
1774
|
+
}
|
|
1775
|
+
const extLst = first(root, "extLst", NS.dgm) ?? add(root, NS.dgm, "dgm:extLst");
|
|
1776
|
+
const marker2 = add(
|
|
1777
|
+
add(extLst, NS.a, "a:ext", { uri: GENERATED_DIAGRAM_CACHE_NS }),
|
|
1778
|
+
GENERATED_DIAGRAM_CACHE_NS,
|
|
1779
|
+
"oc:generatedCache",
|
|
1780
|
+
{
|
|
1781
|
+
engine: "ordered-2d",
|
|
1782
|
+
approximate: "1",
|
|
1783
|
+
drawingSha256: generatedDrawingDigest(serialized.xml)
|
|
1784
|
+
}
|
|
1785
|
+
);
|
|
1786
|
+
drawing.shapes.forEach((shape2, index) => {
|
|
1787
|
+
const id = serialized.modelIds.get(shape2.modelId);
|
|
1788
|
+
const point = add(points7, NS.dgm, "dgm:pt", { modelId: id, type: "pres" });
|
|
1789
|
+
add(point, NS.dgm, "dgm:prSet", {
|
|
1790
|
+
...shape2.sourceNodeId ? { presAssocID: shape2.sourceNodeId } : {},
|
|
1791
|
+
presName: shape2.sourceLayoutRole ?? "node",
|
|
1792
|
+
presStyleLbl: shape2.sourceStyleLabel ?? "node1",
|
|
1793
|
+
presStyleIdx: String(index),
|
|
1794
|
+
presStyleCnt: String(drawing.shapes.length)
|
|
1795
|
+
});
|
|
1796
|
+
const properties = add(point, NS.dgm, "dgm:spPr");
|
|
1797
|
+
if (shape2.fill?.kind === "picture" && shape2.fill.sourceXml) {
|
|
1798
|
+
properties.appendChild(doc.importNode(parseXml(shape2.fill.sourceXml).documentElement, true));
|
|
1799
|
+
}
|
|
1800
|
+
if (shape2.sourceNodeId)
|
|
1801
|
+
add(connections, NS.dgm, "dgm:cxn", {
|
|
1802
|
+
modelId: createOfficeGuid(),
|
|
1803
|
+
type: "presOf",
|
|
1804
|
+
srcId: shape2.sourceNodeId,
|
|
1805
|
+
destId: id,
|
|
1806
|
+
srcOrd: "0",
|
|
1807
|
+
destOrd: "0",
|
|
1808
|
+
presId: input.layoutId ?? ""
|
|
1809
|
+
});
|
|
1810
|
+
add(marker2, GENERATED_DIAGRAM_CACHE_NS, "oc:shape", { id });
|
|
1811
|
+
});
|
|
1812
|
+
return {
|
|
1813
|
+
dataXml: buildXml(doc),
|
|
1814
|
+
drawingXml: serialized.xml,
|
|
1815
|
+
...drawing.pictureParts ? { pictureParts: drawing.pictureParts } : {}
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1910
1819
|
// diagram/relationships.ts
|
|
1911
1820
|
function diagramRelationshipsPart(partPath) {
|
|
1912
1821
|
const dir = partPath.replace(/\/[^/]+$/u, "");
|
|
@@ -1935,85 +1844,165 @@ async function resolveDiagramDrawingPart(hostPart, dataRelId, drawingExtensionRe
|
|
|
1935
1844
|
if (id.length === 0 || target.length === 0) return void 0;
|
|
1936
1845
|
return { relId: id, path: host.resolvePath(dataPath, target), ownerPart: dataPath };
|
|
1937
1846
|
}
|
|
1847
|
+
({
|
|
1848
|
+
data: RELATIONSHIP_TYPES.diagramData,
|
|
1849
|
+
layout: RELATIONSHIP_TYPES.diagramLayout,
|
|
1850
|
+
quickStyle: RELATIONSHIP_TYPES.diagramQuickStyle,
|
|
1851
|
+
colors: RELATIONSHIP_TYPES.diagramColors,
|
|
1852
|
+
drawing: RELATIONSHIP_TYPES.diagramDrawing
|
|
1853
|
+
});
|
|
1938
1854
|
|
|
1939
|
-
//
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
]
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1855
|
+
// diagram/load.ts
|
|
1856
|
+
var slot = [
|
|
1857
|
+
["data", "dataRelId"],
|
|
1858
|
+
["layout", "layoutRelId"],
|
|
1859
|
+
["quickStyle", "styleRelId"],
|
|
1860
|
+
["colors", "colorsRelId"]
|
|
1861
|
+
];
|
|
1862
|
+
async function loadDiagram(hostPart, relationshipIds, host) {
|
|
1863
|
+
const issues = [];
|
|
1864
|
+
const paths = {};
|
|
1865
|
+
const hostRels = host.hostRelationships(hostPart);
|
|
1866
|
+
for (const [name, key2] of slot) {
|
|
1867
|
+
const relId = relationshipIds[key2];
|
|
1868
|
+
if (!relId) {
|
|
1869
|
+
issues.push({
|
|
1870
|
+
code: "DIAGRAM_RELATIONSHIP_MISSING",
|
|
1871
|
+
message: `The diagram has no ${name} relationship id.`
|
|
1872
|
+
});
|
|
1873
|
+
continue;
|
|
1874
|
+
}
|
|
1875
|
+
const target = hostRels?.get(relId);
|
|
1876
|
+
if (target === void 0)
|
|
1877
|
+
issues.push({
|
|
1878
|
+
code: "DIAGRAM_RELATIONSHIP_UNRESOLVED",
|
|
1879
|
+
message: `Relationship ${relId} (${name}) is not in ${hostPart}.`
|
|
1880
|
+
});
|
|
1881
|
+
else paths[name] = host.resolvePath(hostPart, target);
|
|
1949
1882
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1883
|
+
const layoutSource = {};
|
|
1884
|
+
const read = async (name, parse) => {
|
|
1885
|
+
const part = paths[name];
|
|
1886
|
+
if (!part) return void 0;
|
|
1887
|
+
try {
|
|
1888
|
+
const xml = await host.readText(part);
|
|
1889
|
+
if (xml === void 0) {
|
|
1890
|
+
issues.push({
|
|
1891
|
+
code: "DIAGRAM_PART_MISSING",
|
|
1892
|
+
message: `Part ${part} is not in the package.`,
|
|
1893
|
+
part
|
|
1894
|
+
});
|
|
1895
|
+
return void 0;
|
|
1896
|
+
}
|
|
1897
|
+
if (name === "layout") layoutSource.layoutXml = xml;
|
|
1898
|
+
if (name === "data") layoutSource.dataXml = xml;
|
|
1899
|
+
if (name === "colors") layoutSource.colorsXml = xml;
|
|
1900
|
+
if (name === "quickStyle") layoutSource.quickStyleXml = xml;
|
|
1901
|
+
return parse(xml, part);
|
|
1902
|
+
} catch (error) {
|
|
1903
|
+
issues.push({
|
|
1904
|
+
code: "DIAGRAM_PART_UNREADABLE",
|
|
1905
|
+
message: `Part ${part} could not be parsed: ${error instanceof Error ? error.message : String(error)}`,
|
|
1906
|
+
part
|
|
1907
|
+
});
|
|
1908
|
+
return void 0;
|
|
1909
|
+
}
|
|
1972
1910
|
};
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1911
|
+
const data = await read("data", (xml, part) => parseDiagramDataModel(xml, part));
|
|
1912
|
+
if (data) issues.push(...data.issues);
|
|
1913
|
+
const layout = await read("layout", (xml) => parseDiagramLayoutSummary(xml));
|
|
1914
|
+
const colors = await read("colors", (xml) => parseDiagramColors(xml));
|
|
1915
|
+
const quickStyle = await read("quickStyle", (xml) => parseDiagramQuickStyle(xml));
|
|
1916
|
+
let drawingResolution;
|
|
1917
|
+
try {
|
|
1918
|
+
drawingResolution = await resolveDiagramDrawingPart(
|
|
1919
|
+
hostPart,
|
|
1920
|
+
relationshipIds.dataRelId ?? "",
|
|
1921
|
+
data?.drawingRelId ?? "",
|
|
1922
|
+
host
|
|
1923
|
+
);
|
|
1924
|
+
} catch (error) {
|
|
1925
|
+
issues.push({
|
|
1926
|
+
code: "DIAGRAM_DRAWING_UNRESOLVED",
|
|
1927
|
+
message: `The cached drawing could not be located: ${error instanceof Error ? error.message : String(error)}`
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
let drawing;
|
|
1931
|
+
let generatedCache = false;
|
|
1932
|
+
if (drawingResolution) {
|
|
1933
|
+
paths.drawing = drawingResolution.path;
|
|
1934
|
+
drawing = await read("drawing", (xml, part) => {
|
|
1935
|
+
generatedCache = Boolean(
|
|
1936
|
+
data?.generatedCacheDigest && data.generatedCacheDigest === generatedDrawingDigest(xml)
|
|
1937
|
+
);
|
|
1938
|
+
return parseDiagramDrawing(xml, part);
|
|
1939
|
+
});
|
|
1940
|
+
if (drawing) {
|
|
1941
|
+
try {
|
|
1942
|
+
const entries = await host.readRelationshipEntries(
|
|
1943
|
+
diagramRelationshipsPart(drawingResolution.path)
|
|
1944
|
+
);
|
|
1945
|
+
const pictures = (entries ?? []).filter(
|
|
1946
|
+
(entry2) => entry2.type.endsWith("/image") && entry2.mode !== "External" && !/^[a-z][a-z0-9+.-]*:/i.test(entry2.target)
|
|
1947
|
+
);
|
|
1948
|
+
if (pictures.length)
|
|
1949
|
+
drawing.pictureParts = Object.fromEntries(
|
|
1950
|
+
pictures.map((entry2) => [
|
|
1951
|
+
entry2.id,
|
|
1952
|
+
host.resolvePath(drawingResolution.path, entry2.target)
|
|
1953
|
+
])
|
|
1954
|
+
);
|
|
1955
|
+
} catch {
|
|
1956
|
+
issues.push({
|
|
1957
|
+
code: "DIAGRAM_PICTURE_RELATIONSHIPS_UNREADABLE",
|
|
1958
|
+
message: "Picture relationships in the cached drawing could not be read."
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
issues.push(...drawing.issues);
|
|
1962
|
+
}
|
|
1963
|
+
} else if (data)
|
|
1964
|
+
issues.push({
|
|
1965
|
+
code: "DIAGRAM_DRAWING_ABSENT",
|
|
1966
|
+
message: "The package has no cached drawing for this diagram; its layout can only be recomputed from the layout definition."
|
|
1967
|
+
});
|
|
1968
|
+
if (data && layoutSource.dataXml) {
|
|
1969
|
+
let pictureParts = {};
|
|
1970
|
+
if (paths.data) {
|
|
1971
|
+
const owner = paths.data;
|
|
1972
|
+
try {
|
|
1973
|
+
const entries = await host.readRelationshipEntries(diagramRelationshipsPart(owner));
|
|
1974
|
+
pictureParts = Object.fromEntries(
|
|
1975
|
+
(entries ?? []).filter(
|
|
1976
|
+
(entry2) => entry2.type.endsWith("/image") && entry2.mode !== "External" && !/^[a-z][a-z0-9+.-]*:/i.test(entry2.target)
|
|
1977
|
+
).map((entry2) => [entry2.id, host.resolvePath(owner, entry2.target)])
|
|
1978
|
+
);
|
|
1979
|
+
} catch {
|
|
1980
|
+
issues.push({
|
|
1981
|
+
code: "DIAGRAM_PICTURE_RELATIONSHIPS_UNREADABLE",
|
|
1982
|
+
message: "Picture relationships in the diagram data could not be read."
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
Object.assign(
|
|
1987
|
+
layoutSource,
|
|
1988
|
+
captureDiagramPictures(data, layoutSource.dataXml, pictureParts, drawing)
|
|
1989
|
+
);
|
|
1990
|
+
}
|
|
1985
1991
|
return {
|
|
1986
|
-
|
|
1987
|
-
...
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
...
|
|
1991
|
-
|
|
1992
|
+
layoutSource,
|
|
1993
|
+
...generatedCache ? { generatedCache: true } : {},
|
|
1994
|
+
relationshipIds,
|
|
1995
|
+
paths,
|
|
1996
|
+
...drawingResolution ? { drawingRelId: drawingResolution.relId } : {},
|
|
1997
|
+
...drawingResolution?.ownerPart ? { drawingOwnerPart: drawingResolution.ownerPart } : {},
|
|
1998
|
+
...data ? { data } : {},
|
|
1999
|
+
...layout ? { layout } : {},
|
|
2000
|
+
...colors ? { colors } : {},
|
|
2001
|
+
...quickStyle ? { quickStyle } : {},
|
|
2002
|
+
...drawing ? { drawing } : {},
|
|
2003
|
+
issues
|
|
1992
2004
|
};
|
|
1993
2005
|
}
|
|
1994
|
-
function parseDrawingTextBody(body) {
|
|
1995
|
-
if (!body) return void 0;
|
|
1996
|
-
const properties = first(body, "bodyPr", NS.a);
|
|
1997
|
-
const paragraphs = children(body, "p", NS.a).map(parseParagraph);
|
|
1998
|
-
const result = {
|
|
1999
|
-
paragraphs,
|
|
2000
|
-
text: paragraphs.map((paragraph2) => paragraph2.runs.map((run2) => run2.text).join("")).join("\n")
|
|
2001
|
-
};
|
|
2002
|
-
const anchor = properties?.getAttribute("anchor");
|
|
2003
|
-
if (anchor) result.anchor = anchor;
|
|
2004
|
-
const insets = {};
|
|
2005
|
-
for (const [key2, attribute2] of [
|
|
2006
|
-
["left", "lIns"],
|
|
2007
|
-
["top", "tIns"],
|
|
2008
|
-
["right", "rIns"],
|
|
2009
|
-
["bottom", "bIns"]
|
|
2010
|
-
]) {
|
|
2011
|
-
const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
|
|
2012
|
-
if (Number.isFinite(value)) insets[key2] = value;
|
|
2013
|
-
}
|
|
2014
|
-
if (Object.keys(insets).length > 0) result.insetsEmu = insets;
|
|
2015
|
-
return result;
|
|
2016
|
-
}
|
|
2017
2006
|
|
|
2018
2007
|
// chart/model-analysis.ts
|
|
2019
2008
|
var KIND_OF_TYPE = {
|
|
@@ -3491,7 +3480,7 @@ function findSectionList(presentation, lookup) {
|
|
|
3491
3480
|
}
|
|
3492
3481
|
return void 0;
|
|
3493
3482
|
}
|
|
3494
|
-
function
|
|
3483
|
+
function booleanAttribute(value) {
|
|
3495
3484
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
3496
3485
|
if (normalized === "1" || normalized === "true") {
|
|
3497
3486
|
return true;
|
|
@@ -3527,7 +3516,7 @@ function extractSectionMap(presentationData, lookup) {
|
|
|
3527
3516
|
id: sectionId,
|
|
3528
3517
|
name: sectionName,
|
|
3529
3518
|
slideIds,
|
|
3530
|
-
collapsed:
|
|
3519
|
+
collapsed: booleanAttribute(sectionPr?.["@_collapsed"]),
|
|
3531
3520
|
color: colorRaw ? colorRaw.startsWith("#") ? colorRaw : `#${colorRaw}` : void 0,
|
|
3532
3521
|
rawXml: cloneXmlObject(section)
|
|
3533
3522
|
});
|
|
@@ -6236,7 +6225,7 @@ function extractFillOverlayAttributes(shapeProps, context) {
|
|
|
6236
6225
|
|
|
6237
6226
|
// pptx/core/core/builders/effect-style-extractor-reflection.ts
|
|
6238
6227
|
var VALID_ALIGNMENTS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"]);
|
|
6239
|
-
function
|
|
6228
|
+
function integer(value) {
|
|
6240
6229
|
if (value === void 0 || value === null || value === "") {
|
|
6241
6230
|
return void 0;
|
|
6242
6231
|
}
|
|
@@ -6253,19 +6242,19 @@ function boolean(value) {
|
|
|
6253
6242
|
return void 0;
|
|
6254
6243
|
}
|
|
6255
6244
|
function fixedFraction(value) {
|
|
6256
|
-
const parsed =
|
|
6245
|
+
const parsed = integer(value);
|
|
6257
6246
|
return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
|
|
6258
6247
|
}
|
|
6259
6248
|
function extractReflectionAttributes(node, emuPerPx) {
|
|
6260
|
-
const blur =
|
|
6261
|
-
const distance =
|
|
6262
|
-
const startOpacity =
|
|
6263
|
-
const endOpacity =
|
|
6264
|
-
const startPosition =
|
|
6265
|
-
const endPosition =
|
|
6266
|
-
const direction =
|
|
6267
|
-
const rotation =
|
|
6268
|
-
const fadeDirection =
|
|
6249
|
+
const blur = integer(node["@_blurRad"]);
|
|
6250
|
+
const distance = integer(node["@_dist"]);
|
|
6251
|
+
const startOpacity = integer(node["@_stA"]);
|
|
6252
|
+
const endOpacity = integer(node["@_endA"]);
|
|
6253
|
+
const startPosition = integer(node["@_stPos"]);
|
|
6254
|
+
const endPosition = integer(node["@_endPos"]);
|
|
6255
|
+
const direction = integer(node["@_dir"]);
|
|
6256
|
+
const rotation = integer(node["@_rot"]);
|
|
6257
|
+
const fadeDirection = integer(node["@_fadeDir"]);
|
|
6269
6258
|
const alignment = String(node["@_algn"] ?? "").trim();
|
|
6270
6259
|
return {
|
|
6271
6260
|
reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
|
|
@@ -6277,10 +6266,10 @@ function extractReflectionAttributes(node, emuPerPx) {
|
|
|
6277
6266
|
reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
|
|
6278
6267
|
reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
|
|
6279
6268
|
reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
|
|
6280
|
-
reflectionScaleX:
|
|
6281
|
-
reflectionScaleY:
|
|
6282
|
-
reflectionSkewX:
|
|
6283
|
-
reflectionSkewY:
|
|
6269
|
+
reflectionScaleX: integer(node["@_sx"]),
|
|
6270
|
+
reflectionScaleY: integer(node["@_sy"]),
|
|
6271
|
+
reflectionSkewX: integer(node["@_kx"]),
|
|
6272
|
+
reflectionSkewY: integer(node["@_ky"]),
|
|
6284
6273
|
reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
|
|
6285
6274
|
reflectionRotateWithShape: boolean(node["@_rotWithShape"])
|
|
6286
6275
|
};
|
|
@@ -10839,12 +10828,12 @@ var PptxShapeIdValidator = class {
|
|
|
10839
10828
|
return { reassigned: 0, ids };
|
|
10840
10829
|
}
|
|
10841
10830
|
const usedIds = /* @__PURE__ */ new Set();
|
|
10842
|
-
const
|
|
10831
|
+
const invalid2 = [];
|
|
10843
10832
|
let maxId = 0;
|
|
10844
10833
|
for (const cNvPr of cNvPrNodes) {
|
|
10845
10834
|
const id = parseShapeId(cNvPr["@_id"], true);
|
|
10846
10835
|
if (id === void 0 || id === 0 || usedIds.has(id)) {
|
|
10847
|
-
|
|
10836
|
+
invalid2.push(cNvPr);
|
|
10848
10837
|
continue;
|
|
10849
10838
|
}
|
|
10850
10839
|
usedIds.add(id);
|
|
@@ -10853,7 +10842,7 @@ var PptxShapeIdValidator = class {
|
|
|
10853
10842
|
}
|
|
10854
10843
|
}
|
|
10855
10844
|
const allocator = new ShapeIdAllocator(usedIds, maxId);
|
|
10856
|
-
for (const cNvPr of
|
|
10845
|
+
for (const cNvPr of invalid2) {
|
|
10857
10846
|
const oldId = String(cNvPr["@_id"] ?? "").trim();
|
|
10858
10847
|
const fresh = String(allocator.next());
|
|
10859
10848
|
cNvPr["@_id"] = fresh;
|
|
@@ -10862,7 +10851,7 @@ var PptxShapeIdValidator = class {
|
|
|
10862
10851
|
}
|
|
10863
10852
|
}
|
|
10864
10853
|
remapShapeIdReferences(referenceRoot, ids);
|
|
10865
|
-
return { reassigned:
|
|
10854
|
+
return { reassigned: invalid2.length, ids };
|
|
10866
10855
|
}
|
|
10867
10856
|
};
|
|
10868
10857
|
|
|
@@ -35271,7 +35260,7 @@ function collectDesiredEffects(animations) {
|
|
|
35271
35260
|
const desired = [];
|
|
35272
35261
|
animations.forEach((anim, index) => {
|
|
35273
35262
|
const order = anim.order ?? index;
|
|
35274
|
-
const
|
|
35263
|
+
const add2 = (presetClass) => {
|
|
35275
35264
|
desired.push({
|
|
35276
35265
|
anim,
|
|
35277
35266
|
key: effectOwnershipKey(anim.elementId, presetClass),
|
|
@@ -35280,16 +35269,16 @@ function collectDesiredEffects(animations) {
|
|
|
35280
35269
|
});
|
|
35281
35270
|
};
|
|
35282
35271
|
if (anim.entrance && anim.entrance !== "none") {
|
|
35283
|
-
|
|
35272
|
+
add2("entr");
|
|
35284
35273
|
}
|
|
35285
35274
|
if (anim.emphasis && anim.emphasis !== "none") {
|
|
35286
|
-
|
|
35275
|
+
add2("emph");
|
|
35287
35276
|
}
|
|
35288
35277
|
if (anim.exit && anim.exit !== "none") {
|
|
35289
|
-
|
|
35278
|
+
add2("exit");
|
|
35290
35279
|
}
|
|
35291
35280
|
if (anim.motionPath) {
|
|
35292
|
-
|
|
35281
|
+
add2("path");
|
|
35293
35282
|
}
|
|
35294
35283
|
});
|
|
35295
35284
|
return desired;
|
|
@@ -38920,9 +38909,9 @@ function parseDimension(context, element2) {
|
|
|
38920
38909
|
var DATA = /* @__PURE__ */ new Set(["numDim", "strDim", "extLst"]);
|
|
38921
38910
|
function parseData(context, element2) {
|
|
38922
38911
|
reportUnmodelled2(context, element2, DATA);
|
|
38923
|
-
const
|
|
38912
|
+
const dimensions2 = elements(element2).filter((child17) => child17.localName === "numDim" || child17.localName === "strDim").map((child17) => parseDimension(context, child17));
|
|
38924
38913
|
return assignDefined(
|
|
38925
|
-
{ dimensions },
|
|
38914
|
+
{ dimensions: dimensions2 },
|
|
38926
38915
|
{ id: indexAttribute(context, element2, "id"), extLst: extensionList2(element2) }
|
|
38927
38916
|
);
|
|
38928
38917
|
}
|
|
@@ -39346,7 +39335,7 @@ function numberFormatXml2(format) {
|
|
|
39346
39335
|
|
|
39347
39336
|
// chart/ex/write-series.ts
|
|
39348
39337
|
function dataXml(context, data) {
|
|
39349
|
-
const
|
|
39338
|
+
const dimensions2 = data.dimensions.map((dimension2) => {
|
|
39350
39339
|
const levels = dimension2.levels.map(
|
|
39351
39340
|
(level) => cxElement(
|
|
39352
39341
|
"lvl",
|
|
@@ -39364,7 +39353,7 @@ function dataXml(context, data) {
|
|
|
39364
39353
|
attributes([["type", dimension2.type]])
|
|
39365
39354
|
);
|
|
39366
39355
|
}).join("");
|
|
39367
|
-
return cxElement("data",
|
|
39356
|
+
return cxElement("data", dimensions2 + raw(context, data.extLst), attributes([["id", data.id]]));
|
|
39368
39357
|
}
|
|
39369
39358
|
function chartDataXml(context, chartData) {
|
|
39370
39359
|
const external = chartData.externalData;
|
|
@@ -40671,6 +40660,236 @@ function createChartExSpace(data, layout, options2 = {}) {
|
|
|
40671
40660
|
return space;
|
|
40672
40661
|
}
|
|
40673
40662
|
|
|
40663
|
+
// digest/crc32.ts
|
|
40664
|
+
var crcTable = Uint32Array.from({ length: 256 }, (_, value) => {
|
|
40665
|
+
for (let i = 0; i < 8; i++) value = value & 1 ? 3988292384 ^ value >>> 1 : value >>> 1;
|
|
40666
|
+
return value >>> 0;
|
|
40667
|
+
});
|
|
40668
|
+
function crc32(bytes, crc = 4294967295) {
|
|
40669
|
+
for (const byte of bytes) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
40670
|
+
return crc >>> 0;
|
|
40671
|
+
}
|
|
40672
|
+
|
|
40673
|
+
// drawingml/raster-image.ts
|
|
40674
|
+
var RASTER_IMAGE_LIMITS = Object.freeze({
|
|
40675
|
+
maxImageBytes: 8 * 1024 * 1024,
|
|
40676
|
+
maxPixels: 16e6,
|
|
40677
|
+
maxDimension: 16384
|
|
40678
|
+
});
|
|
40679
|
+
var RasterImageError = class extends Error {
|
|
40680
|
+
constructor(code, message) {
|
|
40681
|
+
super(message);
|
|
40682
|
+
this.code = code;
|
|
40683
|
+
this.name = "RasterImageError";
|
|
40684
|
+
}
|
|
40685
|
+
code;
|
|
40686
|
+
};
|
|
40687
|
+
var invalid = (message) => {
|
|
40688
|
+
throw new RasterImageError("invalid-image", message);
|
|
40689
|
+
};
|
|
40690
|
+
var unsupported2 = (message) => {
|
|
40691
|
+
throw new RasterImageError("unsupported-image", message);
|
|
40692
|
+
};
|
|
40693
|
+
function dimensions(width, height, limits) {
|
|
40694
|
+
if (!width || !height) invalid("Raster image has zero dimensions.");
|
|
40695
|
+
if (width > limits.maxDimension || height > limits.maxDimension || width * height > limits.maxPixels)
|
|
40696
|
+
throw new RasterImageError(
|
|
40697
|
+
"image-limit",
|
|
40698
|
+
"Raster image dimensions exceed the configured limit."
|
|
40699
|
+
);
|
|
40700
|
+
}
|
|
40701
|
+
var ascii = (bytes, start, length) => String.fromCharCode(...bytes.subarray(start, start + length));
|
|
40702
|
+
function png(bytes, limits) {
|
|
40703
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40704
|
+
if (bytes.length < 33 || view.getUint32(8) !== 13 || ascii(bytes, 12, 4) !== "IHDR")
|
|
40705
|
+
return invalid("PNG is missing a complete IHDR header.");
|
|
40706
|
+
const width = view.getUint32(16), height = view.getUint32(20);
|
|
40707
|
+
dimensions(width, height, limits);
|
|
40708
|
+
const depth = bytes[24], color3 = bytes[25];
|
|
40709
|
+
const depths = {
|
|
40710
|
+
0: [1, 2, 4, 8, 16],
|
|
40711
|
+
2: [8, 16],
|
|
40712
|
+
3: [1, 2, 4, 8],
|
|
40713
|
+
4: [8, 16],
|
|
40714
|
+
6: [8, 16]
|
|
40715
|
+
};
|
|
40716
|
+
if (!depths[color3]?.includes(depth) || bytes[26] !== 0 || bytes[27] !== 0 || bytes[28] > 1)
|
|
40717
|
+
invalid("PNG header uses invalid color, compression, filter, or interlace values.");
|
|
40718
|
+
let data = false;
|
|
40719
|
+
for (let at = 8; at < bytes.length; ) {
|
|
40720
|
+
if (at + 12 > bytes.length) invalid("Truncated PNG chunk.");
|
|
40721
|
+
const length = view.getUint32(at), type = ascii(bytes, at + 4, 4), end = at + length + 12;
|
|
40722
|
+
if (end > bytes.length) invalid("Truncated PNG chunk payload.");
|
|
40723
|
+
if ((crc32(bytes.subarray(at + 4, end - 4)) ^ 4294967295) >>> 0 !== view.getUint32(end - 4))
|
|
40724
|
+
invalid("PNG chunk checksum mismatch.");
|
|
40725
|
+
if (type === "acTL") unsupported2("Animated PNG is not supported.");
|
|
40726
|
+
if (type === "IHDR" && at !== 8) invalid("PNG contains multiple image headers.");
|
|
40727
|
+
if (type === "IDAT" && length) data = true;
|
|
40728
|
+
if (type === "IEND") {
|
|
40729
|
+
if (length || end !== bytes.length || !data) invalid("PNG has an invalid image terminator.");
|
|
40730
|
+
return [width, height];
|
|
40731
|
+
}
|
|
40732
|
+
at = end;
|
|
40733
|
+
}
|
|
40734
|
+
return invalid("PNG has no image terminator.");
|
|
40735
|
+
}
|
|
40736
|
+
function gif(bytes, limits) {
|
|
40737
|
+
if (bytes.length < 13) return invalid("GIF is missing a complete screen descriptor.");
|
|
40738
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40739
|
+
const width = view.getUint16(6, true), height = view.getUint16(8, true);
|
|
40740
|
+
dimensions(width, height, limits);
|
|
40741
|
+
let at = 13 + (bytes[10] & 128 ? 3 * 2 ** ((bytes[10] & 7) + 1) : 0);
|
|
40742
|
+
let frames = 0, pixels = 0;
|
|
40743
|
+
const blocks = () => {
|
|
40744
|
+
for (; ; ) {
|
|
40745
|
+
if (at >= bytes.length) invalid("GIF has truncated data blocks.");
|
|
40746
|
+
const size = bytes[at++];
|
|
40747
|
+
if (!size) return;
|
|
40748
|
+
at += size;
|
|
40749
|
+
if (at > bytes.length) invalid("GIF has a truncated data block.");
|
|
40750
|
+
}
|
|
40751
|
+
};
|
|
40752
|
+
while (at < bytes.length) {
|
|
40753
|
+
const marker2 = bytes[at++];
|
|
40754
|
+
if (marker2 === 59) {
|
|
40755
|
+
if (!frames || at !== bytes.length) invalid("GIF has an invalid image terminator.");
|
|
40756
|
+
return [width, height];
|
|
40757
|
+
}
|
|
40758
|
+
if (marker2 === 33) {
|
|
40759
|
+
if (at >= bytes.length) invalid("GIF has a truncated extension.");
|
|
40760
|
+
at++;
|
|
40761
|
+
blocks();
|
|
40762
|
+
continue;
|
|
40763
|
+
}
|
|
40764
|
+
if (marker2 !== 44 || at + 9 > bytes.length) invalid("GIF has an invalid image descriptor.");
|
|
40765
|
+
const left = view.getUint16(at, true), top = view.getUint16(at + 2, true);
|
|
40766
|
+
const frameWidth = view.getUint16(at + 4, true), frameHeight = view.getUint16(at + 6, true);
|
|
40767
|
+
dimensions(frameWidth, frameHeight, limits);
|
|
40768
|
+
if (left + frameWidth > width || top + frameHeight > height)
|
|
40769
|
+
invalid("GIF frame exceeds its screen.");
|
|
40770
|
+
pixels += width * height;
|
|
40771
|
+
if (pixels > limits.maxPixels)
|
|
40772
|
+
throw new RasterImageError("image-limit", "GIF animation exceeds the pixel limit.");
|
|
40773
|
+
const packed = bytes[at + 8];
|
|
40774
|
+
at += 9 + (packed & 128 ? 3 * 2 ** ((packed & 7) + 1) : 0);
|
|
40775
|
+
if (at >= bytes.length || bytes[at] < 2 || bytes[at] > 8)
|
|
40776
|
+
invalid("GIF has an invalid LZW header.");
|
|
40777
|
+
at++;
|
|
40778
|
+
blocks();
|
|
40779
|
+
frames++;
|
|
40780
|
+
}
|
|
40781
|
+
return invalid("GIF has no image terminator.");
|
|
40782
|
+
}
|
|
40783
|
+
function jpeg(bytes, limits) {
|
|
40784
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40785
|
+
let at = 2, width = 0, height = 0, scan2 = false;
|
|
40786
|
+
while (at < bytes.length) {
|
|
40787
|
+
if (bytes[at++] !== 255) invalid("JPEG has an invalid segment marker.");
|
|
40788
|
+
while (bytes[at] === 255) at++;
|
|
40789
|
+
const marker2 = bytes[at++];
|
|
40790
|
+
if (marker2 === 217) {
|
|
40791
|
+
if (!width || !scan2 || at !== bytes.length) invalid("JPEG has an invalid image terminator.");
|
|
40792
|
+
return [width, height];
|
|
40793
|
+
}
|
|
40794
|
+
if (marker2 === void 0 || marker2 === 0 || marker2 === 216 || marker2 === 1 || marker2 >= 208 && marker2 <= 215)
|
|
40795
|
+
invalid("JPEG has an unexpected standalone marker.");
|
|
40796
|
+
if (at + 2 > bytes.length) invalid("JPEG has a truncated segment header.");
|
|
40797
|
+
const length = view.getUint16(at), end = at + length;
|
|
40798
|
+
if (length < 2 || end > bytes.length) invalid("JPEG has a truncated segment.");
|
|
40799
|
+
if (marker2 >= 192 && marker2 <= 207 && ![196, 200, 204].includes(marker2)) {
|
|
40800
|
+
if (![192, 193, 194].includes(marker2))
|
|
40801
|
+
unsupported2("This JPEG frame coding is unsupported.");
|
|
40802
|
+
if (width || length < 11 || bytes[at + 2] !== 8 || length !== 8 + 3 * bytes[at + 7])
|
|
40803
|
+
invalid("JPEG has an invalid frame header.");
|
|
40804
|
+
height = view.getUint16(at + 3);
|
|
40805
|
+
width = view.getUint16(at + 5);
|
|
40806
|
+
dimensions(width, height, limits);
|
|
40807
|
+
}
|
|
40808
|
+
if (marker2 === 220) unsupported2("JPEG deferred dimensions are unsupported.");
|
|
40809
|
+
at = end;
|
|
40810
|
+
if (marker2 === 218) {
|
|
40811
|
+
if (!width || length < 8 || length !== 6 + 2 * bytes[end - length + 2])
|
|
40812
|
+
invalid("JPEG has an invalid scan header.");
|
|
40813
|
+
scan2 = true;
|
|
40814
|
+
while (at < bytes.length) {
|
|
40815
|
+
if (bytes[at] !== 255) {
|
|
40816
|
+
at++;
|
|
40817
|
+
continue;
|
|
40818
|
+
}
|
|
40819
|
+
const next = bytes[at + 1];
|
|
40820
|
+
if (next === 0 || next !== void 0 && next >= 208 && next <= 215) {
|
|
40821
|
+
at += 2;
|
|
40822
|
+
continue;
|
|
40823
|
+
}
|
|
40824
|
+
break;
|
|
40825
|
+
}
|
|
40826
|
+
}
|
|
40827
|
+
}
|
|
40828
|
+
return invalid("JPEG has no image terminator.");
|
|
40829
|
+
}
|
|
40830
|
+
function inspectRasterImage(bytes, options2 = {}) {
|
|
40831
|
+
if (!options2 || typeof options2 !== "object" || Array.isArray(options2))
|
|
40832
|
+
throw new RasterImageError("invalid-limit", "Image limits must be an options object.");
|
|
40833
|
+
const limits = { ...RASTER_IMAGE_LIMITS, ...options2 };
|
|
40834
|
+
for (const key2 of Object.keys(RASTER_IMAGE_LIMITS)) {
|
|
40835
|
+
const value = limits[key2];
|
|
40836
|
+
if (!Number.isSafeInteger(value) || value <= 0 || value > RASTER_IMAGE_LIMITS[key2])
|
|
40837
|
+
throw new RasterImageError("invalid-limit", `Invalid raster image limit: ${key2}.`);
|
|
40838
|
+
}
|
|
40839
|
+
if (!(bytes instanceof Uint8Array)) invalid("Raster image bytes must be a Uint8Array.");
|
|
40840
|
+
if (bytes.byteLength > limits.maxImageBytes)
|
|
40841
|
+
throw new RasterImageError("image-limit", "Raster image bytes exceed the configured limit.");
|
|
40842
|
+
return inspectRasterImageStructure(bytes, limits);
|
|
40843
|
+
}
|
|
40844
|
+
function inspectRasterImageStructure(bytes, limits) {
|
|
40845
|
+
let mimeType, size;
|
|
40846
|
+
if ([137, 80, 78, 71, 13, 10, 26, 10].every((value, index) => bytes[index] === value)) {
|
|
40847
|
+
mimeType = "image/png";
|
|
40848
|
+
size = png(bytes, limits);
|
|
40849
|
+
} else if (["GIF87a", "GIF89a"].includes(ascii(bytes, 0, 6))) {
|
|
40850
|
+
mimeType = "image/gif";
|
|
40851
|
+
size = gif(bytes, limits);
|
|
40852
|
+
} else if (bytes[0] === 255 && bytes[1] === 216) {
|
|
40853
|
+
mimeType = "image/jpeg";
|
|
40854
|
+
size = jpeg(bytes, limits);
|
|
40855
|
+
} else return unsupported2("Foreign data is not a supported PNG, JPEG, or GIF raster image.");
|
|
40856
|
+
return { mimeType, pixelWidth: size[0], pixelHeight: size[1] };
|
|
40857
|
+
}
|
|
40858
|
+
|
|
40859
|
+
// chart/region-map/value-color-positions.ts
|
|
40860
|
+
function schemaPosition(node, end) {
|
|
40861
|
+
for (const kind of ["number", "percent"]) {
|
|
40862
|
+
const element2 = first(node, kind, NS.cx), raw2 = element2?.getAttribute("val");
|
|
40863
|
+
const value = raw2 === null || raw2 === void 0 || raw2 === "" ? NaN : Number(raw2);
|
|
40864
|
+
if (Number.isFinite(value)) return { kind, value };
|
|
40865
|
+
}
|
|
40866
|
+
return end === "mid" ? { kind: "percent", value: 50 } : { kind: end };
|
|
40867
|
+
}
|
|
40868
|
+
function parseRegionValueColorPositions(xml) {
|
|
40869
|
+
if (!xml) return void 0;
|
|
40870
|
+
const root = parseXml(`<cx:root xmlns:cx="${NS.cx}">${xml}</cx:root>`).documentElement;
|
|
40871
|
+
const positions2 = first(root, "valueColorPositions", NS.cx);
|
|
40872
|
+
if (!positions2) return void 0;
|
|
40873
|
+
const count2 = positions2.getAttribute("count");
|
|
40874
|
+
const native = ["min", "mid", "max"].some((key2) => first(positions2, key2, NS.cx));
|
|
40875
|
+
if (native || count2 !== null && children(positions2, "pos", NS.cx).length === 0) {
|
|
40876
|
+
const keys = count2 === "3" || first(positions2, "mid", NS.cx) ? ["min", "mid", "max"] : ["min", "max"];
|
|
40877
|
+
return keys.map((key2) => schemaPosition(first(positions2, key2, NS.cx), key2));
|
|
40878
|
+
}
|
|
40879
|
+
const legacy = children(positions2, "pos", NS.cx).flatMap(
|
|
40880
|
+
(element2) => {
|
|
40881
|
+
const type = element2.getAttribute("type");
|
|
40882
|
+
if (type === "min" || type === "max") return [{ kind: type }];
|
|
40883
|
+
if (type !== "num" && type !== "percent") return [];
|
|
40884
|
+
const raw2 = element2.getAttribute("val"), value = raw2 === null || raw2 === "" ? NaN : Number(raw2);
|
|
40885
|
+
return [
|
|
40886
|
+
{ kind: type === "num" ? "number" : type, ...Number.isFinite(value) ? { value } : {} }
|
|
40887
|
+
];
|
|
40888
|
+
}
|
|
40889
|
+
);
|
|
40890
|
+
return legacy.length ? legacy : void 0;
|
|
40891
|
+
}
|
|
40892
|
+
|
|
40674
40893
|
// text/wrap-styled-runs.ts
|
|
40675
40894
|
var graphemes = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
40676
40895
|
function wrapStyledRuns(runs, maxWidth, measure, options2 = {}) {
|
|
@@ -41476,10 +41695,10 @@ function holders(draft, target, create2 = false) {
|
|
|
41476
41695
|
throw new RangeError("This chart target has no text");
|
|
41477
41696
|
}
|
|
41478
41697
|
}
|
|
41479
|
-
function
|
|
41698
|
+
function descendants2(root, names) {
|
|
41480
41699
|
return elements(root).flatMap((node) => [
|
|
41481
41700
|
...node.namespaceURI === NS.a && names.includes(node.localName) ? [node] : [],
|
|
41482
|
-
...
|
|
41701
|
+
...descendants2(node, names)
|
|
41483
41702
|
]);
|
|
41484
41703
|
}
|
|
41485
41704
|
function chartTextBodyElement(body) {
|
|
@@ -41611,7 +41830,7 @@ function editChartTextBody(body, edit) {
|
|
|
41611
41830
|
String(typeof value === "number" ? Math.round(value * 6e4) : value)
|
|
41612
41831
|
);
|
|
41613
41832
|
}
|
|
41614
|
-
const runs =
|
|
41833
|
+
const runs = descendants2(root, ["defRPr", "rPr", "endParaRPr"]);
|
|
41615
41834
|
if (!runs.length) {
|
|
41616
41835
|
let paragraph2 = first(root, "p", NS.a);
|
|
41617
41836
|
if (!paragraph2) {
|
|
@@ -41821,22 +42040,22 @@ function patchRange(labels2, range, show) {
|
|
|
41821
42040
|
for (const child17 of elements(ext))
|
|
41822
42041
|
if (child17.namespaceURI === C15 && ["datalabelsRange", "showDataLabelsRange"].includes(child17.localName))
|
|
41823
42042
|
ext.removeChild(child17);
|
|
41824
|
-
const
|
|
42043
|
+
const add2 = (parent, ns, name, text) => {
|
|
41825
42044
|
const node = root.ownerDocument.createElementNS(ns, name);
|
|
41826
42045
|
if (text !== void 0) node.textContent = text;
|
|
41827
42046
|
parent.appendChild(node);
|
|
41828
42047
|
return node;
|
|
41829
42048
|
};
|
|
41830
42049
|
if (range) {
|
|
41831
|
-
|
|
41832
|
-
const node =
|
|
41833
|
-
|
|
41834
|
-
const cache =
|
|
41835
|
-
|
|
42050
|
+
add2(ext, C15, "c15:showDataLabelsRange").setAttribute("val", show ? "1" : "0");
|
|
42051
|
+
const node = add2(ext, C15, "c15:datalabelsRange");
|
|
42052
|
+
add2(node, C15, "c15:f", range.formula);
|
|
42053
|
+
const cache = add2(node, C15, "c15:dlblRangeCache");
|
|
42054
|
+
add2(cache, NS.c, "c:ptCount").setAttribute("val", String(range.cache.length));
|
|
41836
42055
|
range.cache.forEach((text, index) => {
|
|
41837
|
-
const pt2 =
|
|
42056
|
+
const pt2 = add2(cache, NS.c, "c:pt");
|
|
41838
42057
|
pt2.setAttribute("idx", String(index));
|
|
41839
|
-
|
|
42058
|
+
add2(pt2, NS.c, "c:v", text);
|
|
41840
42059
|
});
|
|
41841
42060
|
}
|
|
41842
42061
|
if (!elements(ext).length) root.removeChild(ext);
|
|
@@ -46497,6 +46716,7 @@ function dimension(data, kind, type) {
|
|
|
46497
46716
|
if (d.kind === kind) map.set(d.type?.trim() || (kind === "numDim" ? "val" : "cat"), d);
|
|
46498
46717
|
return map.get(type) ?? map.values().next().value;
|
|
46499
46718
|
}
|
|
46719
|
+
var exactDimension = (data, kind, type) => data?.dimensions.find((d) => d.kind === kind && d.type?.trim() === type);
|
|
46500
46720
|
var levelText = (dimension2) => dimension2?.levels.map((level) => level.points.map((point) => point.value.trim()));
|
|
46501
46721
|
function flags(visibility) {
|
|
46502
46722
|
return {
|
|
@@ -46518,6 +46738,32 @@ function chartExFromNeutral(space, styled) {
|
|
|
46518
46738
|
const values = levelText(dimension(dataOf2(index), "numDim", "val"))?.[0]?.map((value) => Number.parseFloat(value)).filter(Number.isFinite);
|
|
46519
46739
|
result.name = source.tx?.value?.trim() || `Series ${index + 1}`;
|
|
46520
46740
|
result.values = values?.length ? values : [0];
|
|
46741
|
+
if (source.layoutId === "regionMap") {
|
|
46742
|
+
const dim = exactDimension(dataOf2(index), "numDim", "colorVal")?.levels[0];
|
|
46743
|
+
if (dim) {
|
|
46744
|
+
result.values = dim.points.map((p) => Number.parseFloat(p.value));
|
|
46745
|
+
result.regionMapOptions = {
|
|
46746
|
+
...result.regionMapOptions,
|
|
46747
|
+
valueSourceIndices: dim.points.map((p, i) => p.index ?? i)
|
|
46748
|
+
};
|
|
46749
|
+
}
|
|
46750
|
+
for (const [type, key2] of [
|
|
46751
|
+
["cat", "categorySourceIndices"],
|
|
46752
|
+
["entityId", "entityIdSourceIndices"]
|
|
46753
|
+
]) {
|
|
46754
|
+
const points7 = exactDimension(dataOf2(index), "strDim", type)?.levels[0]?.points;
|
|
46755
|
+
if (points7)
|
|
46756
|
+
result.regionMapOptions = {
|
|
46757
|
+
...result.regionMapOptions,
|
|
46758
|
+
[key2]: points7.map((p, i) => p.index ?? i)
|
|
46759
|
+
};
|
|
46760
|
+
}
|
|
46761
|
+
const positions2 = parseRegionValueColorPositions(source.valueColorPositionsXml);
|
|
46762
|
+
if (positions2)
|
|
46763
|
+
result.regionMapOptions = { ...result.regionMapOptions, valueColorPositions: positions2 };
|
|
46764
|
+
if (source.spPr?.fill?.kind === "solid" && result.color)
|
|
46765
|
+
result.regionMapOptions = { ...result.regionMapOptions, fixedColor: result.color };
|
|
46766
|
+
}
|
|
46521
46767
|
for (const key2 of [
|
|
46522
46768
|
"histogramOptions",
|
|
46523
46769
|
"waterfallOptions",
|
|
@@ -46526,6 +46772,11 @@ function chartExFromNeutral(space, styled) {
|
|
|
46526
46772
|
])
|
|
46527
46773
|
delete result[key2];
|
|
46528
46774
|
Object.assign(result, chartExFamilyFields(source));
|
|
46775
|
+
if (source.layoutId === "regionMap" && source.layoutProperties?.geography?.geoCacheXml)
|
|
46776
|
+
result.regionMapOptions = {
|
|
46777
|
+
...result.regionMapOptions,
|
|
46778
|
+
geographyCacheXml: source.layoutProperties.geography.geoCacheXml
|
|
46779
|
+
};
|
|
46529
46780
|
const group = source.dataLabels;
|
|
46530
46781
|
if (!group) {
|
|
46531
46782
|
delete result.dataLabels;
|
|
@@ -46616,12 +46867,18 @@ function chartExFromNeutral(space, styled) {
|
|
|
46616
46867
|
});
|
|
46617
46868
|
const title = chartExText(space.title?.tx);
|
|
46618
46869
|
const chartData = { ...styled.chartData };
|
|
46870
|
+
if (space.plotArea.series[0]?.layoutId === "funnel") {
|
|
46871
|
+
const category = space.plotArea.axes.find((axis) => axis.scaling?.kind === "cat")?.scaling;
|
|
46872
|
+
if (category?.kind === "cat" && typeof category.gapWidth === "number")
|
|
46873
|
+
chartData.funnelGapWidth = category.gapWidth;
|
|
46874
|
+
else delete chartData.funnelGapWidth;
|
|
46875
|
+
}
|
|
46619
46876
|
if (axes.length) chartData.axes = axes;
|
|
46620
46877
|
else delete chartData.axes;
|
|
46621
46878
|
if (title) chartData.title = title;
|
|
46622
46879
|
else delete chartData.title;
|
|
46623
46880
|
return {
|
|
46624
|
-
categories: (levels?.[0] ?? []).filter(Boolean),
|
|
46881
|
+
categories: space.plotArea.series[0]?.layoutId === "regionMap" ? levels?.[0] ?? [] : (levels?.[0] ?? []).filter(Boolean),
|
|
46625
46882
|
categoryLevels: levels,
|
|
46626
46883
|
series,
|
|
46627
46884
|
hasDataLabels: space.plotArea.series.some((series2) => {
|
|
@@ -49564,6 +49821,27 @@ async function persistModernCommentPackage(init) {
|
|
|
49564
49821
|
return hasComments ? { authorPartPath: authorPath, authorRelationshipId: relationshipId } : {};
|
|
49565
49822
|
}
|
|
49566
49823
|
|
|
49824
|
+
// pptx/core/core/runtime/custom-show-save-ids.ts
|
|
49825
|
+
function withValidCustomShowIds(slides, options2) {
|
|
49826
|
+
if (!options2?.customShows) {
|
|
49827
|
+
return { slides, options: options2 };
|
|
49828
|
+
}
|
|
49829
|
+
const { shows, idMap } = normalizeCustomShowIds(options2.customShows);
|
|
49830
|
+
if (idMap.size === 0) {
|
|
49831
|
+
return { slides, options: options2 };
|
|
49832
|
+
}
|
|
49833
|
+
const properties = options2.presentationProperties;
|
|
49834
|
+
const showId = properties?.showSlidesCustomShowId;
|
|
49835
|
+
return {
|
|
49836
|
+
slides: mapCustomShowActions(slides, (id) => idMap.get(id) ?? id).slides,
|
|
49837
|
+
options: {
|
|
49838
|
+
...options2,
|
|
49839
|
+
customShows: shows,
|
|
49840
|
+
...properties && showId !== void 0 && idMap.has(showId) ? { presentationProperties: { ...properties, showSlidesCustomShowId: idMap.get(showId) } } : {}
|
|
49841
|
+
}
|
|
49842
|
+
};
|
|
49843
|
+
}
|
|
49844
|
+
|
|
49567
49845
|
// pptx/core/core/runtime/comment-authors-retention.ts
|
|
49568
49846
|
function shouldKeepSourceCommentAuthors(input) {
|
|
49569
49847
|
return !input.hasUsedCommentAuthors && input.authorsPartPresent && input.existingLegacyCommentPartCount === 0;
|
|
@@ -50863,7 +51141,7 @@ var NS2 = 'xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
|
|
|
50863
51141
|
var MODEL3D_URI = "http://schemas.microsoft.com/office/drawing/2017/model3d";
|
|
50864
51142
|
var MODEL3D_REL = "http://schemas.microsoft.com/office/2017/06/relationships/model3d";
|
|
50865
51143
|
var IMAGE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
50866
|
-
function
|
|
51144
|
+
function escapeAttr(value) {
|
|
50867
51145
|
return value.replace(/&/gu, "&").replace(/"/gu, """).replace(/</gu, "<");
|
|
50868
51146
|
}
|
|
50869
51147
|
function modelBody(cx, cy, hasPoster) {
|
|
@@ -50894,7 +51172,7 @@ function buildModel3dMetroInput(element2, glbBytes) {
|
|
|
50894
51172
|
const cx = Math.max(1, Math.round(rect.w));
|
|
50895
51173
|
const cy = Math.max(1, Math.round(rect.h));
|
|
50896
51174
|
const id = element2.shapeId && /^\d+$/u.test(element2.shapeId) ? element2.shapeId : "2";
|
|
50897
|
-
const name =
|
|
51175
|
+
const name = escapeAttr(element2.name ?? "3D Model");
|
|
50898
51176
|
const rootXml = `<p:E2oFrame ${NS2}><p:nvGraphicFramePr><p:cNvPr id="${id}" name="${name}"/><p:cNvGraphicFramePr/><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${Math.round(rect.x)}" y="${Math.round(rect.y)}"/><a:ext cx="${cx}" cy="${cy}"/></p:xfrm><a:graphic><a:graphicData uri="${MODEL3D_URI}"><am3d:model3d r:embed="rId1">${modelBody(cx, cy, Boolean(posterExt))}</am3d:model3d></a:graphicData></a:graphic></p:E2oFrame>`;
|
|
50899
51177
|
const parts = /* @__PURE__ */ new Map([["drs/media/model3d1.glb", glb]]);
|
|
50900
51178
|
const contentTypes2 = /* @__PURE__ */ new Map([["drs/media/model3d1.glb", "model/gltf-binary"]]);
|
|
@@ -50931,12 +51209,12 @@ var DOWNREV = {
|
|
|
50931
51209
|
contentType: "application/vnd.ms-office.DrsDownRev+xml",
|
|
50932
51210
|
relType: "http://schemas.microsoft.com/office/2006/relationships/downRev"
|
|
50933
51211
|
};
|
|
50934
|
-
function
|
|
51212
|
+
function escapeAttr2(value) {
|
|
50935
51213
|
return value.replace(/&/gu, "&").replace(/"/gu, """).replace(/</gu, "<").replace(/>/gu, ">");
|
|
50936
51214
|
}
|
|
50937
51215
|
function buildRelsXml(rels) {
|
|
50938
51216
|
const body = rels.map(
|
|
50939
|
-
(r) => `<Relationship Id="${
|
|
51217
|
+
(r) => `<Relationship Id="${escapeAttr2(r.id)}" Type="${escapeAttr2(r.type)}" Target="${escapeAttr2(
|
|
50940
51218
|
r.target
|
|
50941
51219
|
)}"${r.external ? ' TargetMode="External"' : ""}/>`
|
|
50942
51220
|
).join("");
|
|
@@ -50948,7 +51226,7 @@ function buildDownRevXml(shapeId) {
|
|
|
50948
51226
|
}
|
|
50949
51227
|
function buildContentTypesXml(overrides) {
|
|
50950
51228
|
const body = [...overrides].map(
|
|
50951
|
-
([path3, type]) => `<Override PartName="/${
|
|
51229
|
+
([path3, type]) => `<Override PartName="/${escapeAttr2(path3)}" ContentType="${escapeAttr2(type)}"/>`
|
|
50952
51230
|
).join("");
|
|
50953
51231
|
return `${XML_DECL}<Types xmlns="${CT_NS}"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${body}</Types>`;
|
|
50954
51232
|
}
|
|
@@ -51264,7 +51542,7 @@ async function buildMetroBlobs(pptxBytes, slides) {
|
|
|
51264
51542
|
return out;
|
|
51265
51543
|
}
|
|
51266
51544
|
|
|
51267
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51545
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/byte-writer.js
|
|
51268
51546
|
var ByteWriter = class {
|
|
51269
51547
|
chunks = [];
|
|
51270
51548
|
length = 0;
|
|
@@ -51357,7 +51635,7 @@ function record(recType, data, recInstance = 0, isContainer2 = false, recVer = 0
|
|
|
51357
51635
|
return out;
|
|
51358
51636
|
}
|
|
51359
51637
|
|
|
51360
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51638
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/legacy-ppt-record-types.js
|
|
51361
51639
|
var RT = {
|
|
51362
51640
|
Document: 1e3,
|
|
51363
51641
|
DocumentAtom: 1001,
|
|
@@ -51464,7 +51742,7 @@ function masterToEmu(mu) {
|
|
|
51464
51742
|
return Math.round(mu * EMU_PER_MASTER);
|
|
51465
51743
|
}
|
|
51466
51744
|
|
|
51467
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51745
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/current-user-writer.js
|
|
51468
51746
|
var USER_NAME = "pptx-viewer";
|
|
51469
51747
|
var CURRENT_USER_STREAM_SIZE = 4096;
|
|
51470
51748
|
function buildCurrentUserStream(offsetToCurrentEdit, encrypted) {
|
|
@@ -51479,7 +51757,7 @@ function buildCurrentUserStream(offsetToCurrentEdit, encrypted) {
|
|
|
51479
51757
|
return padded;
|
|
51480
51758
|
}
|
|
51481
51759
|
|
|
51482
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51760
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/digests/bit-ops.js
|
|
51483
51761
|
function rotl32(x, n) {
|
|
51484
51762
|
return (x << n | x >>> 32 - n) >>> 0;
|
|
51485
51763
|
}
|
|
@@ -51528,7 +51806,7 @@ function mdStyleDigest(message, initialState, transform2) {
|
|
|
51528
51806
|
return out;
|
|
51529
51807
|
}
|
|
51530
51808
|
|
|
51531
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51809
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/digests/md4.js
|
|
51532
51810
|
var INITIAL_STATE = [1732584193, 4023233417, 2562383102, 271733878];
|
|
51533
51811
|
function f1(x, y, z) {
|
|
51534
51812
|
return x & y | ~x & z;
|
|
@@ -51608,7 +51886,7 @@ function md4(message) {
|
|
|
51608
51886
|
return mdStyleDigest(message, INITIAL_STATE, transform);
|
|
51609
51887
|
}
|
|
51610
51888
|
|
|
51611
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51889
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/blip-writer.js
|
|
51612
51890
|
var MSOBLIP_PICT = 4;
|
|
51613
51891
|
var BLIP_INFO = {
|
|
51614
51892
|
emf: { recType: OA.BlipEmf, instance: 980, blipType: 2, macBlipType: MSOBLIP_PICT },
|
|
@@ -51638,7 +51916,7 @@ function buildFbse(picture, uid, foDelay, size) {
|
|
|
51638
51916
|
return record(OA.FBSE, data, info.blipType, false, 2);
|
|
51639
51917
|
}
|
|
51640
51918
|
|
|
51641
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51919
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/fopt-writer.js
|
|
51642
51920
|
var OPT = {
|
|
51643
51921
|
rotation: 4,
|
|
51644
51922
|
/** Combined picture-protection boolean flags; see `shape-props-writer.ts`. */
|
|
@@ -51694,7 +51972,7 @@ function buildMetroBlobTertiaryFopt(metroBlob) {
|
|
|
51694
51972
|
return record(OA.TertiaryFOPT, data, 1, false, 3);
|
|
51695
51973
|
}
|
|
51696
51974
|
|
|
51697
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51975
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/bstore-writer.js
|
|
51698
51976
|
function buildDggDefaultProperties() {
|
|
51699
51977
|
return buildFopt([
|
|
51700
51978
|
{ id: 385, value: 134217732 },
|
|
@@ -51752,7 +52030,7 @@ function buildPictureStore(pictures, shapesPerDrawing) {
|
|
|
51752
52030
|
};
|
|
51753
52031
|
}
|
|
51754
52032
|
|
|
51755
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52033
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/font-collection-writer.js
|
|
51756
52034
|
var LF_FACE_NAME_BYTES = 64;
|
|
51757
52035
|
function buildFontEntityAtom(name, index) {
|
|
51758
52036
|
const nameBytes = new ByteWriter().utf16(name.slice(0, 31)).u16(0).toBytes();
|
|
@@ -51780,7 +52058,7 @@ function buildEnvironment(fonts, otherTextStyle) {
|
|
|
51780
52058
|
return record(RT.Environment, data, 0, true);
|
|
51781
52059
|
}
|
|
51782
52060
|
|
|
51783
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52061
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/document-writer.js
|
|
51784
52062
|
function emuToMaster(emu2) {
|
|
51785
52063
|
return Math.round(emu2 / EMU_PER_MASTER);
|
|
51786
52064
|
}
|
|
@@ -51838,7 +52116,7 @@ function buildDocumentContainer(input) {
|
|
|
51838
52116
|
return record(RT.Document, w.toBytes(), 0, true);
|
|
51839
52117
|
}
|
|
51840
52118
|
|
|
51841
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52119
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/hyperlink-writer.js
|
|
51842
52120
|
var II_ACTION = {
|
|
51843
52121
|
noAction: 0,
|
|
51844
52122
|
jumpAction: 3,
|
|
@@ -52030,7 +52308,7 @@ function buildTextInteractiveInfoAtom(beginChar, endChar) {
|
|
|
52030
52308
|
return record(RT.TextInteractiveInfoAtom, data, 0, false, 0);
|
|
52031
52309
|
}
|
|
52032
52310
|
|
|
52033
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52311
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/media-writer.js
|
|
52034
52312
|
var MediaCollector = class {
|
|
52035
52313
|
hyperlinks;
|
|
52036
52314
|
entries = [];
|
|
@@ -52095,7 +52373,7 @@ function buildMediaExObjEntries(media) {
|
|
|
52095
52373
|
});
|
|
52096
52374
|
}
|
|
52097
52375
|
|
|
52098
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52376
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ole-writer.js
|
|
52099
52377
|
var PACKAGE_ROOT_CLSID = new Uint8Array([
|
|
52100
52378
|
12,
|
|
52101
52379
|
0,
|
|
@@ -52209,7 +52487,7 @@ var OleCollector = class {
|
|
|
52209
52487
|
}
|
|
52210
52488
|
};
|
|
52211
52489
|
|
|
52212
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52490
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ex-obj-list-writer.js
|
|
52213
52491
|
function buildExObjList(hyperlinks, ole, media) {
|
|
52214
52492
|
const oleEntries = ole?.all ?? [];
|
|
52215
52493
|
const mediaEntries = media?.all ?? [];
|
|
@@ -52236,7 +52514,7 @@ function buildExObjList(hyperlinks, ole, media) {
|
|
|
52236
52514
|
return record(RT.ExternalObjectList, w.toBytes(), 0, true);
|
|
52237
52515
|
}
|
|
52238
52516
|
|
|
52239
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52517
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/anchor-writer.js
|
|
52240
52518
|
function emuToMaster2(emu2) {
|
|
52241
52519
|
return Math.round(emu2 / EMU_PER_MASTER);
|
|
52242
52520
|
}
|
|
@@ -52282,7 +52560,7 @@ function buildChildAnchor(rect) {
|
|
|
52282
52560
|
return record(OA.ChildAnchor, buildChildAnchorData(rect), 0, false, 0);
|
|
52283
52561
|
}
|
|
52284
52562
|
|
|
52285
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52563
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/colors.js
|
|
52286
52564
|
var DEFAULT_RGB = "000000";
|
|
52287
52565
|
function parseHex(rgb) {
|
|
52288
52566
|
const hex3 = (rgb ?? DEFAULT_RGB).replace(/^#/u, "");
|
|
@@ -52304,7 +52582,7 @@ function encodeColorIndex(rgb) {
|
|
|
52304
52582
|
return [r, g, b, 254];
|
|
52305
52583
|
}
|
|
52306
52584
|
|
|
52307
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52585
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/text-exception-writer.js
|
|
52308
52586
|
var ALIGN_CODE = {
|
|
52309
52587
|
l: 0,
|
|
52310
52588
|
ctr: 1,
|
|
@@ -52400,7 +52678,7 @@ function writeCfException(w, run2, fontIndex) {
|
|
|
52400
52678
|
}
|
|
52401
52679
|
}
|
|
52402
52680
|
|
|
52403
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52681
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/text-atom-writer.js
|
|
52404
52682
|
function joinParagraphText(body) {
|
|
52405
52683
|
return body.paragraphs.map((p) => p.runs.map((r) => r.text).join("")).join("\r");
|
|
52406
52684
|
}
|
|
@@ -52461,7 +52739,7 @@ function buildTextAtoms(body, fonts, hyperlinks) {
|
|
|
52461
52739
|
return new ByteWriter().bytes(buildTextHeaderAtom(body.textType)).bytes(buildTextCharsAtom(text)).bytes(buildStyleTextPropAtom(body, fontIndex)).bytes(buildRunHyperlinks(body, hyperlinks)).toBytes();
|
|
52462
52740
|
}
|
|
52463
52741
|
|
|
52464
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52742
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-placeholders-writer.js
|
|
52465
52743
|
var FSP_FLAGS = 2560;
|
|
52466
52744
|
var RECTANGLE_SPT = 1;
|
|
52467
52745
|
var TEXT_TYPE_TITLE = 0;
|
|
@@ -52615,14 +52893,14 @@ function buildMasterPlaceholders(placeholders, allocator, fieldFontIndex) {
|
|
|
52615
52893
|
});
|
|
52616
52894
|
}
|
|
52617
52895
|
|
|
52618
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52896
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-style-fonts.js
|
|
52619
52897
|
function masterStyleFonts(styles2) {
|
|
52620
52898
|
if (!styles2)
|
|
52621
52899
|
return [];
|
|
52622
52900
|
return [styles2.title, styles2.body, styles2.other].flatMap((levels) => levels ?? []).map((level) => level.run.fontName).filter((name) => Boolean(name));
|
|
52623
52901
|
}
|
|
52624
52902
|
|
|
52625
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52903
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-text-styles-writer.js
|
|
52626
52904
|
var EMPTY_LEVELS = [{ paragraph: {}, run: {} }];
|
|
52627
52905
|
function buildMasterStyleAtom(recInstance, levels, fontIndex) {
|
|
52628
52906
|
const w = new ByteWriter().u16(levels.length);
|
|
@@ -52661,7 +52939,7 @@ function buildMasterTextStyles(styles2, fontIndex) {
|
|
|
52661
52939
|
return w.toBytes();
|
|
52662
52940
|
}
|
|
52663
52941
|
|
|
52664
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52942
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-props-writer.js
|
|
52665
52943
|
var DASH_CODE = {
|
|
52666
52944
|
solid: 0,
|
|
52667
52945
|
dash: 1,
|
|
@@ -52724,7 +53002,7 @@ function buildShapeFoptProps(input) {
|
|
|
52724
53002
|
return { simple, complex };
|
|
52725
53003
|
}
|
|
52726
53004
|
|
|
52727
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53005
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-writer.js
|
|
52728
53006
|
var FSP_FLAG_FLIPH = 64;
|
|
52729
53007
|
var FSP_FLAG_FLIPV = 128;
|
|
52730
53008
|
var FSP_FLAG_OLE_SHAPE = 16;
|
|
@@ -52835,7 +53113,7 @@ function buildMediaShapeContainer(media, allocator, hyperlinks, mediaEmbeds, inG
|
|
|
52835
53113
|
return record(OA.SpContainer, w.toBytes(), 0, true);
|
|
52836
53114
|
}
|
|
52837
53115
|
|
|
52838
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53116
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/group-writer.js
|
|
52839
53117
|
var FSP_FLAG_GROUP = 1;
|
|
52840
53118
|
var FSP_FLAG_PATRIARCH = 4;
|
|
52841
53119
|
var FSP_FLAG_HAVE_ANCHOR = 512;
|
|
@@ -52879,7 +53157,7 @@ function buildGroupContainer(group, fonts, allocator, hyperlinks, oleEmbeds, med
|
|
|
52879
53157
|
return record(OA.SpgrContainer, data.toBytes(), 0, true);
|
|
52880
53158
|
}
|
|
52881
53159
|
|
|
52882
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53160
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-id-allocator.js
|
|
52883
53161
|
var ShapeIdAllocator2 = class {
|
|
52884
53162
|
current;
|
|
52885
53163
|
constructor(drawingId, clusterSize) {
|
|
@@ -52903,7 +53181,7 @@ var ShapeIdAllocator2 = class {
|
|
|
52903
53181
|
}
|
|
52904
53182
|
};
|
|
52905
53183
|
|
|
52906
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53184
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/drawing-writer.js
|
|
52907
53185
|
var FSP_FLAG_BACKGROUND = 3072;
|
|
52908
53186
|
var BACKGROUND_RECT_SPT = 1;
|
|
52909
53187
|
function buildDg(drawingId, shapeCount, lastShapeId) {
|
|
@@ -52936,7 +53214,7 @@ function buildDrawing(canvasRect, shapes, backgroundRgb, fonts, drawingId, hyper
|
|
|
52936
53214
|
return record(RT.Drawing, dgContainer, 0, true);
|
|
52937
53215
|
}
|
|
52938
53216
|
|
|
52939
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53217
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/notes-writer.js
|
|
52940
53218
|
function buildNotesAtom(slidePersistIdRef) {
|
|
52941
53219
|
const data = new ByteWriter().i32(slidePersistIdRef).u16(0).u16(0).toBytes();
|
|
52942
53220
|
return record(RT.NotesAtom, data, 0, false, 1);
|
|
@@ -52954,7 +53232,7 @@ function buildNotesContainer(paragraphs, notesRect, slidePersistIdRef, fonts, dr
|
|
|
52954
53232
|
return record(RT.Notes, data, 0, true);
|
|
52955
53233
|
}
|
|
52956
53234
|
|
|
52957
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53235
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/legacy-ppt-record-stream.js
|
|
52958
53236
|
var PptParseError = class extends Error {
|
|
52959
53237
|
constructor(message) {
|
|
52960
53238
|
super(message);
|
|
@@ -53040,7 +53318,7 @@ function recordBytes(data, rec) {
|
|
|
53040
53318
|
return data.subarray(rec.dataOffset, rec.dataOffset + rec.recLen);
|
|
53041
53319
|
}
|
|
53042
53320
|
|
|
53043
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53321
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/color-scheme.js
|
|
53044
53322
|
var SCHEME = {
|
|
53045
53323
|
background: 0,
|
|
53046
53324
|
textAndLines: 1,
|
|
@@ -53110,7 +53388,7 @@ function resolveEscherColor(colorRef, scheme) {
|
|
|
53110
53388
|
return toHex3(colorRef & 255, colorRef >>> 8 & 255, colorRef >>> 16 & 255);
|
|
53111
53389
|
}
|
|
53112
53390
|
|
|
53113
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53391
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/color-scheme-writer.js
|
|
53114
53392
|
function buildColorSchemeAtom(recInstance = 1, colors) {
|
|
53115
53393
|
const w = new ByteWriter();
|
|
53116
53394
|
for (const rgb of colors?.length === 8 ? colors : DEFAULT_SCHEME) {
|
|
@@ -53119,7 +53397,7 @@ function buildColorSchemeAtom(recInstance = 1, colors) {
|
|
|
53119
53397
|
return record(RT.ColorSchemeAtom, w.toBytes(), recInstance, false, 0);
|
|
53120
53398
|
}
|
|
53121
53399
|
|
|
53122
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53400
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/slide-writer.js
|
|
53123
53401
|
var SLIDE_FLAG_MASTER_OBJECTS = 1;
|
|
53124
53402
|
var SLIDE_FLAG_MASTER_SCHEME = 2;
|
|
53125
53403
|
var SLIDE_FLAG_MASTER_BACKGROUND = 4;
|
|
@@ -53160,7 +53438,7 @@ function buildMainMasterContainer(slideRect, drawingId, hyperlinks, oleEmbeds, m
|
|
|
53160
53438
|
return record(RT.MainMaster, data, 0, true);
|
|
53161
53439
|
}
|
|
53162
53440
|
|
|
53163
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53441
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/document-stream-layout.js
|
|
53164
53442
|
function masterSlideId(index) {
|
|
53165
53443
|
return MASTER_SLIDE_ID_SENTINEL + index;
|
|
53166
53444
|
}
|
|
@@ -53285,10 +53563,10 @@ function ensureMinimumDocumentStreamSize(contentSizeWithoutPadding, maxPersistId
|
|
|
53285
53563
|
return Math.max(0, TARGET_MINIMUM - projectedTotal);
|
|
53286
53564
|
}
|
|
53287
53565
|
|
|
53288
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53566
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/crypto-constants.js
|
|
53289
53567
|
var RC4_ALG_ID2 = 26625;
|
|
53290
53568
|
|
|
53291
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53569
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/rc4-cipher.js
|
|
53292
53570
|
function rc4Cipher(key2, data) {
|
|
53293
53571
|
if (key2.length === 0) {
|
|
53294
53572
|
throw new Error("RC4 key must not be empty.");
|
|
@@ -53319,7 +53597,7 @@ function rc4Cipher(key2, data) {
|
|
|
53319
53597
|
return out;
|
|
53320
53598
|
}
|
|
53321
53599
|
|
|
53322
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53600
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/rc4-cryptoapi-key.js
|
|
53323
53601
|
var PADDED_40_BIT_KEY_BYTES = 16;
|
|
53324
53602
|
async function rc4CryptoApiKeyBase(password, salt) {
|
|
53325
53603
|
return hash("SHA-1", concatArrays(salt, encodePasswordUtf16LE(password)));
|
|
@@ -53360,7 +53638,7 @@ async function rc4CryptoApiEncryptVerifier(key0, verifier) {
|
|
|
53360
53638
|
};
|
|
53361
53639
|
}
|
|
53362
53640
|
|
|
53363
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53641
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/rc4-cryptoapi-streams.js
|
|
53364
53642
|
var UID_SIZE = 16;
|
|
53365
53643
|
var METAFILE_HEADER_SIZE = 34;
|
|
53366
53644
|
var BITMAP_TAG_SIZE = 1;
|
|
@@ -53433,7 +53711,7 @@ async function cipherPicturesStream(stream, keyFor, mode) {
|
|
|
53433
53711
|
return out;
|
|
53434
53712
|
}
|
|
53435
53713
|
|
|
53436
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53714
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/encrypt-writer.js
|
|
53437
53715
|
var CSP_NAME = "Microsoft Enhanced Cryptographic Provider v1.0";
|
|
53438
53716
|
var KEY_SIZE_BITS = 128;
|
|
53439
53717
|
var SALT_SIZE = 16;
|
|
@@ -53466,7 +53744,7 @@ async function encryptPicturesStream(stream, ctx) {
|
|
|
53466
53744
|
return cipherPicturesStream(stream, ctx.keyFor, "encrypt");
|
|
53467
53745
|
}
|
|
53468
53746
|
|
|
53469
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53747
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-relative-runs.js
|
|
53470
53748
|
var STYLE_KEYS = ["bold", "italic", "underline"];
|
|
53471
53749
|
function levelsFor(styles2, textType) {
|
|
53472
53750
|
switch (textType) {
|
|
@@ -53532,7 +53810,7 @@ function withMasterRelativeRunStyles(deck) {
|
|
|
53532
53810
|
};
|
|
53533
53811
|
}
|
|
53534
53812
|
|
|
53535
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53813
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/persist-writer.js
|
|
53536
53814
|
var MAX_RUN = 4095;
|
|
53537
53815
|
function buildPersistDirectoryAtom(entries) {
|
|
53538
53816
|
const sorted = [...entries].sort((a, b) => a[0] - b[0]);
|
|
@@ -53562,7 +53840,7 @@ function buildEncryptedUserEditAtom(input) {
|
|
|
53562
53840
|
return record(RT.UserEditAtom, data, 0, false, 0);
|
|
53563
53841
|
}
|
|
53564
53842
|
|
|
53565
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53843
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ppt-clsid.js
|
|
53566
53844
|
var PPT_STORAGE_CLSID = new Uint8Array([
|
|
53567
53845
|
16,
|
|
53568
53846
|
141,
|
|
@@ -53582,7 +53860,7 @@ var PPT_STORAGE_CLSID = new Uint8Array([
|
|
|
53582
53860
|
232
|
|
53583
53861
|
]);
|
|
53584
53862
|
|
|
53585
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53863
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/write-ppt.js
|
|
53586
53864
|
async function finishUnencrypted(layout, lastSlideId) {
|
|
53587
53865
|
const w = new ByteWriter().append(layout.bytes);
|
|
53588
53866
|
const dirAtom = buildPersistDirectoryAtom(layout.offsets);
|
|
@@ -53788,8 +54066,8 @@ function readTxStyles(masterXml) {
|
|
|
53788
54066
|
const declarations = [...root.matchAll(/\s(xmlns(?::\w+)?)="[^"]*"/gu)].filter((m) => !startTag.includes(` ${m[1]}=`)).map((m) => m[0]);
|
|
53789
54067
|
return txStyles.replace(/^<p:txStyles\b/u, `<p:txStyles${declarations.join("")}`);
|
|
53790
54068
|
}
|
|
53791
|
-
function themeColor(themeXml3,
|
|
53792
|
-
const body = new RegExp(`<a:${
|
|
54069
|
+
function themeColor(themeXml3, slot2) {
|
|
54070
|
+
const body = new RegExp(`<a:${slot2}>([\\s\\S]*?)</a:${slot2}>`, "u").exec(themeXml3)?.[1];
|
|
53793
54071
|
if (!body) {
|
|
53794
54072
|
return void 0;
|
|
53795
54073
|
}
|
|
@@ -53807,7 +54085,7 @@ function schemeColorsFor(themeXml3, clrMapAttributes) {
|
|
|
53807
54085
|
"hlink",
|
|
53808
54086
|
"folHlink"
|
|
53809
54087
|
];
|
|
53810
|
-
const colors = slots.map((
|
|
54088
|
+
const colors = slots.map((slot2) => themeColor(themeXml3, slot2)?.toUpperCase());
|
|
53811
54089
|
return colors.every((c) => c !== void 0) ? colors : void 0;
|
|
53812
54090
|
}
|
|
53813
54091
|
function latinFace(themeXml3, scheme) {
|
|
@@ -53978,18 +54256,18 @@ async function rasterizeSvgInDom(svg, fallbackW, fallbackH) {
|
|
|
53978
54256
|
}
|
|
53979
54257
|
}
|
|
53980
54258
|
async function rasterizeSvg(svg, fallbackWidthPx, fallbackHeightPx, rasterize) {
|
|
53981
|
-
let
|
|
54259
|
+
let png2;
|
|
53982
54260
|
if (rasterize) {
|
|
53983
54261
|
const sizeFor = (w, h) => svgRasterSize(w, h, fallbackWidthPx, fallbackHeightPx);
|
|
53984
54262
|
try {
|
|
53985
|
-
|
|
54263
|
+
png2 = await rasterize(svg, sizeFor);
|
|
53986
54264
|
} catch {
|
|
53987
|
-
|
|
54265
|
+
png2 = void 0;
|
|
53988
54266
|
}
|
|
53989
54267
|
} else if (hasDomRasteriser()) {
|
|
53990
|
-
|
|
54268
|
+
png2 = await rasterizeSvgInDom(svg, fallbackWidthPx, fallbackHeightPx);
|
|
53991
54269
|
}
|
|
53992
|
-
return
|
|
54270
|
+
return png2 ? { extension: "png", bytes: png2 } : void 0;
|
|
53993
54271
|
}
|
|
53994
54272
|
|
|
53995
54273
|
// pptx/core/ppt/writer/picture-resolve.ts
|
|
@@ -61639,31 +61917,6 @@ function blipExtensionEntries(blip) {
|
|
|
61639
61917
|
}
|
|
61640
61918
|
|
|
61641
61919
|
// pptx/core/core/runtime/image-a14-effects.ts
|
|
61642
|
-
var ARTISTIC_PRIMARY_ATTRIBUTE = {
|
|
61643
|
-
artisticBlur: "radius",
|
|
61644
|
-
artisticCement: "crackSpacing",
|
|
61645
|
-
artisticChalkSketch: "pressure",
|
|
61646
|
-
artisticCrisscrossEtching: "pressure",
|
|
61647
|
-
artisticCutout: "numberOfShades",
|
|
61648
|
-
artisticFilmGrain: "grainSize",
|
|
61649
|
-
artisticGlass: "scaling",
|
|
61650
|
-
artisticGlowDiffused: "intensity",
|
|
61651
|
-
artisticGlowEdges: "smoothness",
|
|
61652
|
-
artisticLightScreen: "gridSize",
|
|
61653
|
-
artisticLineDrawing: "pencilSize",
|
|
61654
|
-
artisticMarker: "size",
|
|
61655
|
-
// Spelled "Mosiaic" in the schema; Microsoft's typo is part of the format.
|
|
61656
|
-
artisticMosiaicBubbles: "pressure",
|
|
61657
|
-
artisticPaintBrush: "brushSize",
|
|
61658
|
-
artisticPaintStrokes: "intensity",
|
|
61659
|
-
artisticPastelsSmooth: "scaling",
|
|
61660
|
-
artisticPencilGrayscale: "pencilSize",
|
|
61661
|
-
artisticPencilSketch: "pressure",
|
|
61662
|
-
artisticPhotocopy: "detail",
|
|
61663
|
-
artisticPlasticWrap: "smoothness",
|
|
61664
|
-
artisticTexturizer: "scaling",
|
|
61665
|
-
artisticWatercolorSponge: "brushSize"
|
|
61666
|
-
};
|
|
61667
61920
|
var NON_SIZE_ATTRIBUTES = /* @__PURE__ */ new Set(["trans", "visible"]);
|
|
61668
61921
|
function parseMarks(parent, name) {
|
|
61669
61922
|
const marks = [];
|
|
@@ -70220,7 +70473,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
70220
70473
|
*/
|
|
70221
70474
|
findMasterSlotForLayoutSlot(masterSlots, layoutPhInfo) {
|
|
70222
70475
|
if (layoutPhInfo.idx !== void 0) {
|
|
70223
|
-
const byIdx = masterSlots.find((
|
|
70476
|
+
const byIdx = masterSlots.find((slot2) => slot2.phInfo.idx === layoutPhInfo.idx);
|
|
70224
70477
|
if (byIdx) {
|
|
70225
70478
|
return byIdx;
|
|
70226
70479
|
}
|
|
@@ -70230,7 +70483,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
70230
70483
|
}
|
|
70231
70484
|
const aliasedType = layoutPhInfo.type === "ctrtitle" ? "title" : layoutPhInfo.type === "subtitle" ? "body" : layoutPhInfo.type;
|
|
70232
70485
|
return masterSlots.find(
|
|
70233
|
-
(
|
|
70486
|
+
(slot2) => slot2.phInfo.type === layoutPhInfo.type || slot2.phInfo.type === aliasedType
|
|
70234
70487
|
);
|
|
70235
70488
|
}
|
|
70236
70489
|
/**
|
|
@@ -70246,7 +70499,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
70246
70499
|
if (slots.length === 0 || !layoutPath) {
|
|
70247
70500
|
return slots;
|
|
70248
70501
|
}
|
|
70249
|
-
const needsMasterGeometry = slots.some((
|
|
70502
|
+
const needsMasterGeometry = slots.some((slot2) => slot2.cxEmu <= 0 || slot2.cyEmu <= 0);
|
|
70250
70503
|
if (!needsMasterGeometry) {
|
|
70251
70504
|
return slots;
|
|
70252
70505
|
}
|
|
@@ -70257,16 +70510,16 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
70257
70510
|
if (masterSlots.length === 0) {
|
|
70258
70511
|
return slots;
|
|
70259
70512
|
}
|
|
70260
|
-
return slots.map((
|
|
70261
|
-
if (
|
|
70262
|
-
return
|
|
70513
|
+
return slots.map((slot2) => {
|
|
70514
|
+
if (slot2.cxEmu > 0 && slot2.cyEmu > 0) {
|
|
70515
|
+
return slot2;
|
|
70263
70516
|
}
|
|
70264
|
-
const masterSlot = this.findMasterSlotForLayoutSlot(masterSlots,
|
|
70517
|
+
const masterSlot = this.findMasterSlotForLayoutSlot(masterSlots, slot2.phInfo);
|
|
70265
70518
|
if (!masterSlot || masterSlot.cxEmu <= 0 || masterSlot.cyEmu <= 0) {
|
|
70266
|
-
return
|
|
70519
|
+
return slot2;
|
|
70267
70520
|
}
|
|
70268
70521
|
return {
|
|
70269
|
-
...
|
|
70522
|
+
...slot2,
|
|
70270
70523
|
xEmu: masterSlot.xEmu,
|
|
70271
70524
|
yEmu: masterSlot.yEmu,
|
|
70272
70525
|
cxEmu: masterSlot.cxEmu,
|
|
@@ -70290,8 +70543,8 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
70290
70543
|
* @returns The updated elements array.
|
|
70291
70544
|
*/
|
|
70292
70545
|
remapElementsToNewLayout(elements2, newLayoutXml, newLayoutPath) {
|
|
70293
|
-
const targets = this.extractLayoutPlaceholders(newLayoutXml, newLayoutPath).map((
|
|
70294
|
-
...
|
|
70546
|
+
const targets = this.extractLayoutPlaceholders(newLayoutXml, newLayoutPath).map((slot2) => ({
|
|
70547
|
+
...slot2,
|
|
70295
70548
|
matched: false
|
|
70296
70549
|
}));
|
|
70297
70550
|
const claimOrder = [
|
|
@@ -73807,7 +74060,17 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73807
74060
|
smartArtData.chrome,
|
|
73808
74061
|
(k) => this.compatibilityService.getXmlLocalName(k)
|
|
73809
74062
|
);
|
|
73810
|
-
this.zip.file(
|
|
74063
|
+
this.zip.file(
|
|
74064
|
+
dataPartPath,
|
|
74065
|
+
withDiagramPictureSources(this.builder.build(parsed), smartArtData.pictureLayoutSource)
|
|
74066
|
+
);
|
|
74067
|
+
const pictureDataRelsPath = dataPartPath.replace(/([^/]+)$/, "_rels/$1.rels");
|
|
74068
|
+
const pictureDataRels = diagramPictureRelationships(
|
|
74069
|
+
dataPartPath,
|
|
74070
|
+
smartArtData.pictureLayoutSource,
|
|
74071
|
+
await this.zip.file(pictureDataRelsPath)?.async("string")
|
|
74072
|
+
);
|
|
74073
|
+
if (pictureDataRels) this.zip.file(pictureDataRelsPath, pictureDataRels);
|
|
73811
74074
|
if (saveLayout && smartArtData.layoutRelId) {
|
|
73812
74075
|
const layoutTarget = relationships2?.get(smartArtData.layoutRelId);
|
|
73813
74076
|
if (layoutTarget) {
|
|
@@ -73828,7 +74091,31 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73828
74091
|
presentationIds
|
|
73829
74092
|
);
|
|
73830
74093
|
if (drawingTarget && drawingXml) {
|
|
73831
|
-
this.
|
|
74094
|
+
const drawingPath = this.resolveImagePath(slidePath, drawingTarget);
|
|
74095
|
+
const pictureSource = smartArtData.pictureLayoutSource;
|
|
74096
|
+
const savedData = await this.zip.file(dataPartPath)?.async("string");
|
|
74097
|
+
const pictureCache = pictureSource && savedData ? buildGeneratedDiagramCache(savedData, {
|
|
74098
|
+
extentEmu: { width: element2.width * 9525, height: element2.height * 9525 },
|
|
74099
|
+
source: {
|
|
74100
|
+
...pictureSource,
|
|
74101
|
+
...saveLayout ? { layoutXml: saveLayout.xml } : {}
|
|
74102
|
+
},
|
|
74103
|
+
minorFont: smartArtData.themeMinorFont,
|
|
74104
|
+
scheme: smartArtData.pictureScheme
|
|
74105
|
+
}) : void 0;
|
|
74106
|
+
if (pictureCache)
|
|
74107
|
+
this.zip.file(
|
|
74108
|
+
dataPartPath,
|
|
74109
|
+
withDiagramDrawingRelationship(pictureCache.dataXml, smartArtData.drawingRelId)
|
|
74110
|
+
);
|
|
74111
|
+
this.zip.file(drawingPath, pictureCache?.drawingXml ?? drawingXml);
|
|
74112
|
+
const relsPath2 = drawingPath.replace(/([^/]+)$/, "_rels/$1.rels");
|
|
74113
|
+
const rels = diagramPictureRelationships(
|
|
74114
|
+
drawingPath,
|
|
74115
|
+
pictureSource,
|
|
74116
|
+
await this.zip.file(relsPath2)?.async("string")
|
|
74117
|
+
);
|
|
74118
|
+
if (rels) this.zip.file(relsPath2, rels);
|
|
73832
74119
|
}
|
|
73833
74120
|
}
|
|
73834
74121
|
} catch (e) {
|
|
@@ -78354,7 +78641,7 @@ function pruneEmptyEnvelopes(slideNode, getLocalName2) {
|
|
|
78354
78641
|
function reconcileSlideTransition(options2) {
|
|
78355
78642
|
const { slideNode, transitionNode, sourceNode, getLocalName: getLocalName2 } = options2;
|
|
78356
78643
|
const slots = collectEnvelopeSlots(slideNode, getLocalName2);
|
|
78357
|
-
const target = sourceNode ? slots.find((
|
|
78644
|
+
const target = sourceNode ? slots.find((slot2) => slot2.node === sourceNode) : void 0;
|
|
78358
78645
|
const usage = transitionNode ? extensionUsageOf(transitionNode) : void 0;
|
|
78359
78646
|
const requiresPrefix = usage ? requiresPrefixFor(usage) : void 0;
|
|
78360
78647
|
const reuseTarget = target && (requiresPrefix === void 0 || target.branchLocalName === "Choice") ? target : void 0;
|
|
@@ -78362,9 +78649,9 @@ function reconcileSlideTransition(options2) {
|
|
|
78362
78649
|
delete slideNode[key2];
|
|
78363
78650
|
}
|
|
78364
78651
|
const keptEnvelope = transitionNode ? reuseTarget?.envelope : void 0;
|
|
78365
|
-
for (const
|
|
78366
|
-
if (
|
|
78367
|
-
delete
|
|
78652
|
+
for (const slot2 of slots) {
|
|
78653
|
+
if (slot2.envelope !== keptEnvelope) {
|
|
78654
|
+
delete slot2.branch[slot2.key];
|
|
78368
78655
|
}
|
|
78369
78656
|
}
|
|
78370
78657
|
if (reuseTarget && transitionNode) {
|
|
@@ -79150,25 +79437,25 @@ var PptxHandlerRuntime43 = class extends PptxHandlerRuntime42 {
|
|
|
79150
79437
|
* fix to preserve original color XML and is out of scope here).
|
|
79151
79438
|
*/
|
|
79152
79439
|
buildClrSchemeObject(schemeName, colorMap) {
|
|
79153
|
-
const
|
|
79440
|
+
const slot2 = (key2) => {
|
|
79154
79441
|
const hex3 = String(colorMap[key2] || "").replace(/^#/, "");
|
|
79155
79442
|
const srgb = hex3.length === 6 ? hex3.toUpperCase() : "000000";
|
|
79156
79443
|
return { "a:srgbClr": { "@_val": srgb } };
|
|
79157
79444
|
};
|
|
79158
79445
|
return {
|
|
79159
79446
|
"@_name": schemeName,
|
|
79160
|
-
"a:dk1":
|
|
79161
|
-
"a:lt1":
|
|
79162
|
-
"a:dk2":
|
|
79163
|
-
"a:lt2":
|
|
79164
|
-
"a:accent1":
|
|
79165
|
-
"a:accent2":
|
|
79166
|
-
"a:accent3":
|
|
79167
|
-
"a:accent4":
|
|
79168
|
-
"a:accent5":
|
|
79169
|
-
"a:accent6":
|
|
79170
|
-
"a:hlink":
|
|
79171
|
-
"a:folHlink":
|
|
79447
|
+
"a:dk1": slot2("dk1"),
|
|
79448
|
+
"a:lt1": slot2("lt1"),
|
|
79449
|
+
"a:dk2": slot2("dk2"),
|
|
79450
|
+
"a:lt2": slot2("lt2"),
|
|
79451
|
+
"a:accent1": slot2("accent1"),
|
|
79452
|
+
"a:accent2": slot2("accent2"),
|
|
79453
|
+
"a:accent3": slot2("accent3"),
|
|
79454
|
+
"a:accent4": slot2("accent4"),
|
|
79455
|
+
"a:accent5": slot2("accent5"),
|
|
79456
|
+
"a:accent6": slot2("accent6"),
|
|
79457
|
+
"a:hlink": slot2("hlink"),
|
|
79458
|
+
"a:folHlink": slot2("folHlink")
|
|
79172
79459
|
};
|
|
79173
79460
|
}
|
|
79174
79461
|
/**
|
|
@@ -80885,7 +81172,8 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80885
81172
|
* one that fails does not hold up the next.
|
|
80886
81173
|
*/
|
|
80887
81174
|
async save(slides, options2) {
|
|
80888
|
-
const
|
|
81175
|
+
const valid = withValidCustomShowIds(slides, options2);
|
|
81176
|
+
const run2 = this.saveQueue.then(() => this.saveNow(valid.slides, valid.options));
|
|
80889
81177
|
this.saveQueue = run2.catch(() => void 0);
|
|
80890
81178
|
return run2;
|
|
80891
81179
|
}
|
|
@@ -90216,6 +90504,14 @@ async function parseDrawingShapesFromPart(drawingPath, deps) {
|
|
|
90216
90504
|
shapes.push(shape2);
|
|
90217
90505
|
});
|
|
90218
90506
|
await resolveDrawingBlipFills(shapes, drawingPath, deps);
|
|
90507
|
+
try {
|
|
90508
|
+
const source = parseDiagramDrawing(xmlString);
|
|
90509
|
+
for (const shape2 of shapes) {
|
|
90510
|
+
const fill3 = source.shapes.find((entry2) => entry2.modelId === shape2.id)?.fill;
|
|
90511
|
+
if (fill3?.kind === "picture") shape2.pictureFill = fill3;
|
|
90512
|
+
}
|
|
90513
|
+
} catch {
|
|
90514
|
+
}
|
|
90219
90515
|
return shapes;
|
|
90220
90516
|
} catch {
|
|
90221
90517
|
return [];
|
|
@@ -90358,7 +90654,44 @@ var PptxHandlerRuntime91 = class _PptxHandlerRuntime extends PptxHandlerRuntime9
|
|
|
90358
90654
|
const drawingRelationshipId = drawingResolution?.relId;
|
|
90359
90655
|
const styleRelationshipId = parsedRelationshipIds?.styleRelId ?? "";
|
|
90360
90656
|
const quickStyle = await this.parseSmartArtQuickStyle(slidePath, styleRelationshipId);
|
|
90657
|
+
const neutral = await loadDiagram(slidePath, parsedRelationshipIds ?? {}, {
|
|
90658
|
+
hostRelationships: (path3) => this.slideRelsMap.get(path3),
|
|
90659
|
+
resolvePath: (base, target) => this.resolveImagePath(base, target),
|
|
90660
|
+
readText: (path3) => this.zip.file(path3)?.async("string") ?? Promise.resolve(void 0),
|
|
90661
|
+
readRelationshipEntries: async (path3) => {
|
|
90662
|
+
const xml = await this.zip.file(path3)?.async("string");
|
|
90663
|
+
return xml ? [...parseRelationships(xml).values()] : void 0;
|
|
90664
|
+
}
|
|
90665
|
+
});
|
|
90666
|
+
const pictureLayoutSource = neutral.layoutSource?.pictures?.length ? neutral.layoutSource : void 0;
|
|
90667
|
+
const pictureUrls = {};
|
|
90668
|
+
const pictureSizes = {};
|
|
90669
|
+
for (const part of Object.values(pictureLayoutSource?.pictureParts ?? {})) {
|
|
90670
|
+
const url = await this.getImageDataAsDataUrl(part);
|
|
90671
|
+
if (url) pictureUrls[part] = url;
|
|
90672
|
+
const payload = url ? /^data:[^,]*;base64,(.*)$/s.exec(url)?.[1] : void 0;
|
|
90673
|
+
const bytes = payload ? decodeBase64(payload) : void 0;
|
|
90674
|
+
if (bytes) {
|
|
90675
|
+
try {
|
|
90676
|
+
const info = inspectRasterImage(bytes);
|
|
90677
|
+
pictureSizes[part] = { width: info.pixelWidth, height: info.pixelHeight };
|
|
90678
|
+
} catch {
|
|
90679
|
+
}
|
|
90680
|
+
}
|
|
90681
|
+
}
|
|
90682
|
+
for (const shape2 of drawingShapes) {
|
|
90683
|
+
const part = shape2.fillBlipEmbedId ? neutral.drawing?.pictureParts?.[shape2.fillBlipEmbedId] : void 0;
|
|
90684
|
+
if (part && pictureUrls[part]) shape2.fillImageUrl = pictureUrls[part];
|
|
90685
|
+
if (part && pictureSizes[part]) {
|
|
90686
|
+
shape2.fillImageWidth = pictureSizes[part].width;
|
|
90687
|
+
shape2.fillImageHeight = pictureSizes[part].height;
|
|
90688
|
+
}
|
|
90689
|
+
}
|
|
90361
90690
|
return {
|
|
90691
|
+
pictureLayoutSource,
|
|
90692
|
+
pictureUrls: pictureLayoutSource ? pictureUrls : void 0,
|
|
90693
|
+
pictureScheme: pictureLayoutSource ? { ...this.themeColorMap } : void 0,
|
|
90694
|
+
pictureSizes: pictureLayoutSource ? pictureSizes : void 0,
|
|
90362
90695
|
layoutType,
|
|
90363
90696
|
resolvedLayoutType,
|
|
90364
90697
|
layoutDefinition,
|
|
@@ -93393,7 +93726,7 @@ var PptxHandlerRuntime104 = class extends PptxHandlerRuntime103 {
|
|
|
93393
93726
|
}
|
|
93394
93727
|
root["p:cSld"] = withLeadingBackground(root["p:cSld"] ?? {}, bg);
|
|
93395
93728
|
root["p:clrMap"] = Object.fromEntries(
|
|
93396
|
-
Object.entries(clrMap).map(([alias,
|
|
93729
|
+
Object.entries(clrMap).map(([alias, slot2]) => [`@_${alias}`, slot2])
|
|
93397
93730
|
);
|
|
93398
93731
|
this.masterClrMaps.set(masterPath, { ...clrMap });
|
|
93399
93732
|
this.masterStyleOverrides.set(masterPath, { bg, clrMap: { ...clrMap } });
|
|
@@ -93427,12 +93760,12 @@ function selectTextPlaceholder(input, type, options2, slots) {
|
|
|
93427
93760
|
};
|
|
93428
93761
|
let best;
|
|
93429
93762
|
let bestScore = 0;
|
|
93430
|
-
for (const
|
|
93431
|
-
if (!TEXT_PLACEHOLDER_TYPES.has(
|
|
93432
|
-
if (source.idx !== void 0 && source.idx !== (
|
|
93433
|
-
const score = scorePlaceholderMatch(input, source,
|
|
93763
|
+
for (const slot2 of slots) {
|
|
93764
|
+
if (!TEXT_PLACEHOLDER_TYPES.has(slot2.phInfo.type ?? "obj")) continue;
|
|
93765
|
+
if (source.idx !== void 0 && source.idx !== (slot2.phInfo.idx ?? "0")) continue;
|
|
93766
|
+
const score = scorePlaceholderMatch(input, source, slot2.phInfo);
|
|
93434
93767
|
if (score > bestScore) {
|
|
93435
|
-
best =
|
|
93768
|
+
best = slot2;
|
|
93436
93769
|
bestScore = score;
|
|
93437
93770
|
}
|
|
93438
93771
|
}
|
|
@@ -94235,7 +94568,7 @@ async function inflateZlib(data) {
|
|
|
94235
94568
|
}
|
|
94236
94569
|
}
|
|
94237
94570
|
|
|
94238
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
94571
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/persist-directory.js
|
|
94239
94572
|
var DEFAULT_MAX_EDITS = 1e4;
|
|
94240
94573
|
var DEFAULT_MAX_ENTRIES = 1e6;
|
|
94241
94574
|
function checkedLimit(value) {
|
|
@@ -94953,7 +95286,7 @@ var OPT2 = {
|
|
|
94953
95286
|
fNoLineDrawDash: 511,
|
|
94954
95287
|
wzName: 896
|
|
94955
95288
|
};
|
|
94956
|
-
function
|
|
95289
|
+
function parseProperties(view, data, rec) {
|
|
94957
95290
|
const values = /* @__PURE__ */ new Map();
|
|
94958
95291
|
const complex = /* @__PURE__ */ new Map();
|
|
94959
95292
|
const count2 = rec.recInstance;
|
|
@@ -95160,7 +95493,7 @@ function parseShape(ctx, container) {
|
|
|
95160
95493
|
return void 0;
|
|
95161
95494
|
}
|
|
95162
95495
|
const optRec = findChild2(ctx.view, container, OA.FOPT);
|
|
95163
|
-
const props = optRec ?
|
|
95496
|
+
const props = optRec ? parseProperties(ctx.view, ctx.data, optRec) : { values: /* @__PURE__ */ new Map(), complex: /* @__PURE__ */ new Map() };
|
|
95164
95497
|
const anchorRec = findChild2(ctx.view, container, OA.ClientAnchor);
|
|
95165
95498
|
const childAnchorRec = findChild2(ctx.view, container, OA.ChildAnchor);
|
|
95166
95499
|
const anchor = anchorRec ? readClientAnchor(ctx.view, anchorRec) : childAnchorRec ? readChildAnchor(ctx.view, childAnchorRec) : void 0;
|
|
@@ -95323,7 +95656,7 @@ function extractBackground(ctx, container) {
|
|
|
95323
95656
|
if (!optRec) {
|
|
95324
95657
|
return ctx.scheme[0];
|
|
95325
95658
|
}
|
|
95326
|
-
const props =
|
|
95659
|
+
const props = parseProperties(ctx.view, ctx.data, optRec);
|
|
95327
95660
|
const fillColor = props.values.get(OPT2.fillColor);
|
|
95328
95661
|
return fillColor !== void 0 ? resolveEscherColor(fillColor, ctx.scheme) : ctx.scheme[0];
|
|
95329
95662
|
}
|