ooxml-core 1.12.2 → 1.14.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-5YP75BPO.cjs +12 -0
- package/dist/PptxHandler-GT5Q66TG.mjs +3 -0
- package/dist/{PptxHandler-FIN6XDTI.mjs → PptxHandler-KNBFECUE.mjs} +3 -3
- package/dist/PresentationBuilder-5DCCFHWJ.mjs +7 -0
- package/dist/PresentationBuilder-CVM6LJ7L.mjs +3 -0
- package/dist/PresentationBuilder-II7C4A3R.cjs +20 -0
- package/dist/automation/docx.d.ts +18 -0
- package/dist/automation/docx.d.ts.map +1 -1
- package/dist/automation/index.cjs +22549 -8585
- package/dist/automation/index.d.ts +1 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +22546 -8586
- package/dist/automation/node.cjs +66 -6
- package/dist/automation/node.d.ts +10 -0
- package/dist/automation/node.d.ts.map +1 -1
- package/dist/automation/node.mjs +67 -7
- package/dist/automation/outline.d.ts +29 -0
- package/dist/automation/outline.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +21 -0
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/chart/auto-title.d.ts +31 -0
- package/dist/chart/auto-title.d.ts.map +1 -0
- package/dist/chart/axis-format.d.ts +13 -0
- package/dist/chart/axis-format.d.ts.map +1 -0
- package/dist/chart/bubble-radius.d.ts +30 -0
- package/dist/chart/bubble-radius.d.ts.map +1 -0
- package/dist/chart/error-bar-amount.d.ts +22 -0
- package/dist/chart/error-bar-amount.d.ts.map +1 -0
- package/dist/chart/hierarchy.d.ts +69 -0
- package/dist/chart/hierarchy.d.ts.map +1 -0
- package/dist/chart/index.cjs +2377 -527
- package/dist/chart/index.d.ts +12 -0
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart/index.mjs +2338 -528
- package/dist/chart/model-analysis.d.ts +66 -0
- package/dist/chart/model-analysis.d.ts.map +1 -0
- package/dist/chart/model-series.d.ts +5 -0
- package/dist/chart/model-series.d.ts.map +1 -1
- package/dist/chart/number-format-pattern.d.ts +35 -0
- package/dist/chart/number-format-pattern.d.ts.map +1 -0
- package/dist/chart/number-format.d.ts +21 -0
- package/dist/chart/number-format.d.ts.map +1 -0
- package/dist/chart/parse-analysis.d.ts +13 -0
- package/dist/chart/parse-analysis.d.ts.map +1 -0
- package/dist/chart/parse-series.d.ts +1 -1
- package/dist/chart/parse-series.d.ts.map +1 -1
- package/dist/chart/parse-util.d.ts +2 -0
- package/dist/chart/parse-util.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-analysis.d.ts +7 -0
- package/dist/chart/render/chart-svg-analysis.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-bars.d.ts +5 -0
- package/dist/chart/render/chart-svg-bars.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-cartesian.d.ts +7 -2
- package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-hierarchy.d.ts +5 -0
- package/dist/chart/render/chart-svg-hierarchy.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-plots.d.ts +5 -0
- package/dist/chart/render/chart-svg-plots.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-stock.d.ts +4 -0
- package/dist/chart/render/chart-svg-stock.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-waterfall.d.ts +4 -0
- package/dist/chart/render/chart-svg-waterfall.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-xy.d.ts +4 -0
- package/dist/chart/render/chart-svg-xy.d.ts.map +1 -0
- package/dist/chart/render/chart-svg.d.ts +1 -1
- package/dist/chart/render/chart-svg.d.ts.map +1 -1
- package/dist/chart/render/chart-value-axis.d.ts +6 -1
- package/dist/chart/render/chart-value-axis.d.ts.map +1 -1
- package/dist/chart/render/chart-view-analysis.d.ts +30 -0
- package/dist/chart/render/chart-view-analysis.d.ts.map +1 -0
- package/dist/chart/render/chart-view-ex.d.ts +24 -0
- package/dist/chart/render/chart-view-ex.d.ts.map +1 -0
- package/dist/chart/render/chart-view-families.d.ts +10 -0
- package/dist/chart/render/chart-view-families.d.ts.map +1 -0
- package/dist/chart/render/chart-view-series.d.ts +36 -0
- package/dist/chart/render/chart-view-series.d.ts.map +1 -0
- package/dist/chart/render/chart-view-stock.d.ts +23 -0
- package/dist/chart/render/chart-view-stock.d.ts.map +1 -0
- package/dist/chart/render/chart-view.d.ts +49 -18
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/render/index.d.ts +2 -0
- package/dist/chart/render/index.d.ts.map +1 -1
- package/dist/chart/render/render-space.d.ts +6 -1
- package/dist/chart/render/render-space.d.ts.map +1 -1
- package/dist/chart/render/summary-analysis.d.ts +11 -0
- package/dist/chart/render/summary-analysis.d.ts.map +1 -0
- package/dist/chart/render/summary-from-chartex.d.ts +11 -0
- package/dist/chart/render/summary-from-chartex.d.ts.map +1 -0
- package/dist/chart/render/summary-from-space.d.ts.map +1 -1
- package/dist/chart/render/summary.d.ts +86 -3
- package/dist/chart/render/summary.d.ts.map +1 -1
- package/dist/chart/stock-candles.d.ts +72 -0
- package/dist/chart/stock-candles.d.ts.map +1 -0
- package/dist/chart/style-palette.d.ts +29 -0
- package/dist/chart/style-palette.d.ts.map +1 -0
- package/dist/chart/sunburst-arcs.d.ts +41 -0
- package/dist/chart/sunburst-arcs.d.ts.map +1 -0
- package/dist/chart/trendline-fit.d.ts +39 -0
- package/dist/chart/trendline-fit.d.ts.map +1 -0
- package/dist/chart/waterfall.d.ts +31 -0
- package/dist/chart/waterfall.d.ts.map +1 -0
- package/dist/chart/write-analysis.d.ts +12 -0
- package/dist/chart/write-analysis.d.ts.map +1 -0
- package/dist/chart/write-series.d.ts.map +1 -1
- package/dist/{chunk-G5PQKHCG.mjs → chunk-2D4IFQ5M.mjs} +1 -1
- package/dist/{chunk-UAY26XOI.mjs → chunk-2EBMHIGJ.mjs} +1303 -994
- package/dist/{chunk-TVE6UIJF.mjs → chunk-4WZLFUUA.mjs} +54 -13
- package/dist/{chunk-H2FRDUNV.mjs → chunk-54ASP65T.mjs} +868 -585
- package/dist/chunk-M4XLF4R7.mjs +387 -0
- package/dist/{chunk-O6NIA4NG.mjs → chunk-ORH32TO3.mjs} +5798 -5742
- package/dist/{chunk-B2JBBAEQ.mjs → chunk-TNNXOW2O.mjs} +1 -1
- package/dist/{chunk-IT3U6QD6.cjs → chunk-TQE7FFNT.cjs} +6754 -6695
- package/dist/{chunk-7QZGRB3T.cjs → chunk-X7MGZQ6C.cjs} +1321 -995
- package/dist/{chunk-6DELVMYB.mjs → chunk-XGXIS4PN.mjs} +12316 -12260
- package/dist/crypto/decrypt.d.ts +17 -3
- package/dist/crypto/decrypt.d.ts.map +1 -1
- package/dist/crypto/encryption-info.d.ts.map +1 -1
- package/dist/crypto/index.cjs +252 -78
- package/dist/crypto/index.d.ts +19 -4
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.mjs +252 -79
- package/dist/crypto/key-derivation.d.ts +2 -3
- package/dist/crypto/key-derivation.d.ts.map +1 -1
- package/dist/crypto/validate.d.ts +22 -0
- package/dist/crypto/validate.d.ts.map +1 -0
- package/dist/diagram/engine/layout-def-parse.d.ts.map +1 -1
- package/dist/diagram/engine/pres-tree.d.ts.map +1 -1
- package/dist/diagram/index.cjs +102 -52
- package/dist/diagram/index.mjs +102 -52
- package/dist/digest/index.cjs +23 -11
- package/dist/digest/index.d.ts +2 -1
- package/dist/digest/index.d.ts.map +1 -1
- package/dist/digest/index.mjs +21 -12
- package/dist/digest/password-hash.d.ts +19 -5
- package/dist/digest/password-hash.d.ts.map +1 -1
- package/dist/digest/timing-safe.d.ts +7 -0
- package/dist/digest/timing-safe.d.ts.map +1 -0
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/chart-paint.d.ts.map +1 -1
- package/dist/docx/chart.d.ts +10 -2
- package/dist/docx/chart.d.ts.map +1 -1
- package/dist/docx/content-control-edit.d.ts +26 -0
- package/dist/docx/content-control-edit.d.ts.map +1 -0
- package/dist/docx/content-control-model.d.ts +51 -0
- package/dist/docx/content-control-model.d.ts.map +1 -0
- package/dist/docx/content-control.d.ts +9 -0
- package/dist/docx/content-control.d.ts.map +1 -0
- package/dist/docx/default-styles.d.ts.map +1 -1
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +9932 -935
- package/dist/docx/embedded.mjs +9932 -935
- package/dist/docx/equation.d.ts +7 -3
- package/dist/docx/equation.d.ts.map +1 -1
- package/dist/docx/index.cjs +14117 -1513
- package/dist/docx/index.d.ts +6 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +14093 -1514
- package/dist/docx/inline-model.d.ts +3 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/layout/adapt-floats.d.ts +3 -3
- 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/equation-object.d.ts +7 -0
- package/dist/docx/layout/equation-object.d.ts.map +1 -0
- package/dist/docx/layout/floats.d.ts +8 -0
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/incremental-layout.d.ts +39 -0
- package/dist/docx/layout/incremental-layout.d.ts.map +1 -0
- package/dist/docx/layout/index.cjs +14177 -1707
- package/dist/docx/layout/index.d.ts +2 -2
- package/dist/docx/layout/index.d.ts.map +1 -1
- package/dist/docx/layout/index.mjs +14176 -1708
- package/dist/docx/layout/input.d.ts +4 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/layout-session.d.ts +13 -2
- package/dist/docx/layout/layout-session.d.ts.map +1 -1
- package/dist/docx/layout/layout.d.ts +1 -1
- package/dist/docx/layout/layout.d.ts.map +1 -1
- package/dist/docx/layout/line-metrics.d.ts.map +1 -1
- package/dist/docx/layout/page-cursor.d.ts +1 -1
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/layout/page-fields.d.ts +3 -1
- package/dist/docx/layout/page-fields.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +14 -1
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/section-flow.d.ts +11 -1
- package/dist/docx/layout/section-flow.d.ts.map +1 -1
- package/dist/docx/ligatures.d.ts +2 -0
- package/dist/docx/ligatures.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +12709 -3590
- package/dist/docx/load/index.mjs +12709 -3590
- package/dist/docx/model-paragraph.d.ts +3 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model-run.d.ts +3 -0
- package/dist/docx/model-run.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-parse.d.ts.map +1 -1
- package/dist/docx/numbering-text.d.ts.map +1 -1
- package/dist/docx/package-limits.d.ts +6 -0
- package/dist/docx/package-limits.d.ts.map +1 -0
- package/dist/docx/parse-content-control.d.ts +28 -0
- package/dist/docx/parse-content-control.d.ts.map +1 -0
- package/dist/docx/parse-table.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/shape-model.d.ts +31 -0
- package/dist/docx/shape-model.d.ts.map +1 -0
- package/dist/docx/shape-palette.d.ts +19 -0
- package/dist/docx/shape-palette.d.ts.map +1 -0
- package/dist/docx/shape-parse.d.ts +16 -0
- package/dist/docx/shape-parse.d.ts.map +1 -0
- package/dist/docx/shape-svg.d.ts +20 -0
- package/dist/docx/shape-svg.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +4 -0
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/ui/content-control-commands.d.ts +37 -0
- package/dist/docx/ui/content-control-commands.d.ts.map +1 -0
- package/dist/docx/ui/content-control-guard.d.ts +8 -0
- package/dist/docx/ui/content-control-guard.d.ts.map +1 -0
- package/dist/docx/ui/content-control-spans.d.ts +19 -0
- package/dist/docx/ui/content-control-spans.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +3132 -506
- package/dist/docx/ui/index.d.ts +3 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +3117 -507
- 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/ui/run-compare.d.ts.map +1 -1
- package/dist/docx/ui/run-mark-properties.d.ts.map +1 -1
- package/dist/docx/ui/run-marks.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +16 -1
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/table-structure-guard.d.ts.map +1 -1
- package/dist/docx/write-block-placement.d.ts +9 -0
- package/dist/docx/write-block-placement.d.ts.map +1 -0
- package/dist/docx/write-content-control.d.ts +12 -0
- package/dist/docx/write-content-control.d.ts.map +1 -0
- package/dist/docx/write-drawing.d.ts +2 -0
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-inline.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/docx/write-shape.d.ts +16 -0
- package/dist/docx/write-shape.d.ts.map +1 -0
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +24 -0
- package/dist/drawingml/index.mjs +24 -0
- package/dist/geometry/index.cjs +63 -48
- package/dist/geometry/index.mjs +63 -48
- package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -1
- package/dist/i18n/index.cjs +266 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.mjs +265 -1
- package/dist/i18n/option-strings.d.ts +17 -0
- package/dist/i18n/option-strings.d.ts.map +1 -0
- package/dist/index.cjs +4558 -1579
- package/dist/index.mjs +4558 -1579
- package/dist/math/equation-gallery.d.ts +10 -0
- package/dist/math/equation-gallery.d.ts.map +1 -0
- package/dist/math/index.cjs +777 -139
- package/dist/math/index.d.ts +3 -0
- package/dist/math/index.d.ts.map +1 -1
- package/dist/math/index.mjs +772 -140
- package/dist/math/latex-omml-siblings.d.ts.map +1 -1
- package/dist/math/latex-to-omml.d.ts.map +1 -1
- package/dist/math/omml-box-grouped.d.ts +9 -0
- package/dist/math/omml-box-grouped.d.ts.map +1 -0
- package/dist/math/omml-box-layout.d.ts +15 -0
- package/dist/math/omml-box-layout.d.ts.map +1 -0
- package/dist/math/omml-box-structures.d.ts +7 -0
- package/dist/math/omml-box-structures.d.ts.map +1 -0
- package/dist/math/omml-box.d.ts +85 -0
- package/dist/math/omml-box.d.ts.map +1 -0
- package/dist/math/omml-dom.d.ts.map +1 -1
- package/dist/math/omml-mathml-converters.d.ts.map +1 -1
- package/dist/math/omml-svg.d.ts +14 -0
- package/dist/math/omml-svg.d.ts.map +1 -0
- package/dist/math/omml-to-xml.d.ts +10 -0
- package/dist/math/omml-to-xml.d.ts.map +1 -0
- package/dist/opc/embedded-packages.d.ts.map +1 -1
- package/dist/opc/index.cjs +257 -22
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +251 -23
- package/dist/opc/package.d.ts.map +1 -1
- package/dist/opc/signature/detection.d.ts +22 -6
- package/dist/opc/signature/detection.d.ts.map +1 -1
- package/dist/opc/signature/index.d.ts +1 -1
- package/dist/opc/signature/index.d.ts.map +1 -1
- package/dist/opc/signature/xml-utils.d.ts.map +1 -1
- package/dist/opc/zip-limits.d.ts +52 -0
- package/dist/opc/zip-limits.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +1848 -1320
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{elements-DmbzOhFu.d.ts → elements-tK7xnWeS.d.ts} +20 -9
- package/dist/pptx/chunks/elements-tK7xnWeS.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Cija6Dih.d.ts → index-BSpNQuvz.d.ts} +30 -5
- package/dist/pptx/chunks/{index-Cija6Dih.d.ts.map → index-BSpNQuvz.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-BmvOxbsh.d.ts → index-DS9Y4Ne3.d.ts} +25 -9
- package/dist/pptx/chunks/index-DS9Y4Ne3.d.ts.map +1 -0
- package/dist/pptx/chunks/inspection-status-DjiWd_Aa.d.ts.map +1 -1
- package/dist/pptx/chunks/{text-operations-sXxhsKDd.d.ts → text-operations-BdD_UQ11.d.ts} +2 -2
- package/dist/pptx/chunks/{text-operations-sXxhsKDd.d.ts.map → text-operations-BdD_UQ11.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +1795 -1275
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.cjs +80 -54
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/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 +1117 -351
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/signature-node/index.cjs +342 -65
- package/dist/pptx/signature-node/index.d.ts +12 -1
- package/dist/pptx/signature-node/index.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.mjs +112 -52
- package/dist/teams/activity-feed.d.ts +19 -0
- package/dist/teams/activity-feed.d.ts.map +1 -0
- package/dist/teams/activity-state.d.ts +12 -0
- package/dist/teams/activity-state.d.ts.map +1 -0
- package/dist/teams/activity.d.ts +52 -0
- package/dist/teams/activity.d.ts.map +1 -0
- package/dist/teams/calendar.d.ts +57 -0
- package/dist/teams/calendar.d.ts.map +1 -0
- package/dist/teams/chat-actions.d.ts +20 -0
- package/dist/teams/chat-actions.d.ts.map +1 -0
- package/dist/teams/chat-rooms.d.ts +42 -0
- package/dist/teams/chat-rooms.d.ts.map +1 -0
- package/dist/teams/chat-view.d.ts +56 -0
- package/dist/teams/chat-view.d.ts.map +1 -0
- package/dist/teams/chat.d.ts +25 -3
- package/dist/teams/chat.d.ts.map +1 -1
- package/dist/teams/chats.d.ts +52 -0
- package/dist/teams/chats.d.ts.map +1 -0
- package/dist/teams/ics-timezone.d.ts +17 -0
- package/dist/teams/ics-timezone.d.ts.map +1 -0
- package/dist/teams/ics.d.ts +20 -0
- package/dist/teams/ics.d.ts.map +1 -0
- package/dist/teams/index.cjs +12462 -7011
- package/dist/teams/index.d.ts +25 -0
- package/dist/teams/index.d.ts.map +1 -1
- package/dist/teams/index.mjs +12349 -7012
- package/dist/teams/meeting-actions.d.ts +31 -0
- package/dist/teams/meeting-actions.d.ts.map +1 -0
- package/dist/teams/meeting-exceptions.d.ts +28 -0
- package/dist/teams/meeting-exceptions.d.ts.map +1 -0
- package/dist/teams/meeting-reminders.d.ts +13 -0
- package/dist/teams/meeting-reminders.d.ts.map +1 -0
- package/dist/teams/meetings.d.ts +71 -0
- package/dist/teams/meetings.d.ts.map +1 -0
- package/dist/teams/mention-text.d.ts +11 -0
- package/dist/teams/mention-text.d.ts.map +1 -0
- package/dist/teams/mentions.d.ts +68 -0
- package/dist/teams/mentions.d.ts.map +1 -0
- package/dist/teams/model.d.ts +7 -0
- package/dist/teams/model.d.ts.map +1 -1
- package/dist/teams/notifications.d.ts +21 -0
- package/dist/teams/notifications.d.ts.map +1 -0
- package/dist/teams/pins.d.ts +22 -0
- package/dist/teams/pins.d.ts.map +1 -0
- package/dist/teams/presence-controller.d.ts +39 -0
- package/dist/teams/presence-controller.d.ts.map +1 -0
- package/dist/teams/presence.d.ts +55 -0
- package/dist/teams/presence.d.ts.map +1 -0
- package/dist/teams/recurrence.d.ts +18 -0
- package/dist/teams/recurrence.d.ts.map +1 -0
- package/dist/teams/roster.d.ts +12 -0
- package/dist/teams/roster.d.ts.map +1 -0
- package/dist/teams/server-config.d.ts +23 -2
- package/dist/teams/server-config.d.ts.map +1 -1
- package/dist/teams/server-session.d.ts +19 -0
- package/dist/teams/server-session.d.ts.map +1 -0
- package/dist/teams/shared-chat.d.ts +83 -0
- package/dist/teams/shared-chat.d.ts.map +1 -0
- package/dist/teams/store.d.ts +79 -5
- package/dist/teams/store.d.ts.map +1 -1
- package/dist/teams/sync-transport.d.ts +12 -0
- package/dist/teams/sync-transport.d.ts.map +1 -0
- package/dist/teams/time-zone.d.ts +32 -0
- package/dist/teams/time-zone.d.ts.map +1 -0
- package/dist/teams/view.d.ts +8 -0
- package/dist/teams/view.d.ts.map +1 -1
- package/dist/teams/workspace.d.ts +23 -4
- package/dist/teams/workspace.d.ts.map +1 -1
- package/dist/visio/edit-connector-follow.d.ts +15 -0
- package/dist/visio/edit-connector-follow.d.ts.map +1 -0
- package/dist/visio/edit-connector-obstacles.d.ts +9 -3
- package/dist/visio/edit-connector-obstacles.d.ts.map +1 -1
- package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-master-add.d.ts +37 -0
- package/dist/visio/edit-master-add.d.ts.map +1 -0
- package/dist/visio/edit-master-drop.d.ts +6 -0
- package/dist/visio/edit-master-drop.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-index.d.ts +5 -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-stencil-connector-layout.d.ts +2 -0
- package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -1
- package/dist/visio/edit-stencil-connector.d.ts +1 -0
- package/dist/visio/edit-stencil-connector.d.ts.map +1 -1
- package/dist/visio/edit-stencil-import.d.ts +10 -0
- package/dist/visio/edit-stencil-import.d.ts.map +1 -0
- package/dist/visio/edit-stencil-line.d.ts +29 -0
- package/dist/visio/edit-stencil-line.d.ts.map +1 -0
- package/dist/visio/edit-stencil-master.d.ts +3 -8
- package/dist/visio/edit-stencil-master.d.ts.map +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula-math-functions.d.ts +11 -0
- package/dist/visio/formula-math-functions.d.ts.map +1 -0
- package/dist/visio/formula-text-functions.d.ts +23 -0
- package/dist/visio/formula-text-functions.d.ts.map +1 -0
- package/dist/visio/formula.d.ts.map +1 -1
- package/dist/visio/index.cjs +2552 -1833
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +2552 -1834
- package/dist/visio/parser.d.ts +6 -0
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/stencil-file.d.ts +14 -0
- package/dist/visio/stencil-file.d.ts.map +1 -0
- package/dist/visio/ui/index.cjs +2398 -1679
- package/dist/visio/ui/index.mjs +2398 -1680
- package/dist/visio/ui/master-drop.d.ts +10 -0
- package/dist/visio/ui/master-drop.d.ts.map +1 -1
- package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-html-parse.d.ts +4 -0
- package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
- package/dist/xlsx/edit/data-table.d.ts +38 -0
- package/dist/xlsx/edit/data-table.d.ts.map +1 -0
- package/dist/xlsx/edit/drawings.d.ts.map +1 -1
- package/dist/xlsx/edit/goal-seek.d.ts +30 -0
- package/dist/xlsx/edit/goal-seek.d.ts.map +1 -0
- package/dist/xlsx/edit/goal-solver.d.ts +20 -0
- package/dist/xlsx/edit/goal-solver.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +1 -1
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +5 -0
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/input-text.d.ts.map +1 -1
- package/dist/xlsx/edit/pivots.d.ts +2 -1
- package/dist/xlsx/edit/pivots.d.ts.map +1 -1
- package/dist/xlsx/edit/scenarios.d.ts +41 -0
- package/dist/xlsx/edit/scenarios.d.ts.map +1 -0
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/slicers.d.ts +34 -0
- package/dist/xlsx/edit/slicers.d.ts.map +1 -0
- package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts +26 -0
- package/dist/xlsx/edit/timelines.d.ts.map +1 -0
- package/dist/xlsx/edit/types.d.ts +39 -0
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/formula/context.d.ts +13 -0
- package/dist/xlsx/formula/context.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/formula/evaluator.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/amordegrc.d.ts +6 -0
- package/dist/xlsx/formula/functions/amordegrc.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/bahttext.d.ts +4 -0
- package/dist/xlsx/formula/functions/bahttext.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/bessel.d.ts +7 -0
- package/dist/xlsx/formula/functions/bessel.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/bonds.d.ts +3 -0
- package/dist/xlsx/formula/functions/bonds.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/engineering.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/financial.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/getpivotdata.d.ts +2 -0
- package/dist/xlsx/formula/functions/getpivotdata.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/groupby.d.ts +3 -0
- package/dist/xlsx/formula/functions/groupby.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/helpers.d.ts +3 -2
- package/dist/xlsx/formula/functions/helpers.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/logical.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/modern.d.ts +3 -0
- package/dist/xlsx/formula/functions/modern.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/odd-securities.d.ts +3 -0
- package/dist/xlsx/formula/functions/odd-securities.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/registry.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-regex.d.ts +8 -0
- package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/wildcard.d.ts +8 -0
- package/dist/xlsx/formula/functions/wildcard.d.ts.map +1 -0
- package/dist/xlsx/formula/values.d.ts +11 -0
- package/dist/xlsx/formula/values.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +11696 -4994
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +11612 -4994
- package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
- package/dist/xlsx/layout/header-footer-edit.d.ts +16 -0
- package/dist/xlsx/layout/header-footer-edit.d.ts.map +1 -0
- package/dist/xlsx/layout/index.d.ts +3 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/page-break-view.d.ts +39 -0
- package/dist/xlsx/layout/page-break-view.d.ts.map +1 -0
- package/dist/xlsx/layout/page-view.d.ts +69 -0
- package/dist/xlsx/layout/page-view.d.ts.map +1 -0
- package/dist/xlsx/layout/ref-evaluator.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +5718 -2191
- package/dist/xlsx/load/index.mjs +5717 -2190
- package/dist/xlsx/model-pivots.d.ts +88 -2
- package/dist/xlsx/model-pivots.d.ts.map +1 -1
- package/dist/xlsx/model-slicers.d.ts +146 -0
- package/dist/xlsx/model-slicers.d.ts.map +1 -0
- package/dist/xlsx/model-whatif.d.ts +51 -0
- package/dist/xlsx/model-whatif.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +26 -1
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/pivot/admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/aggregate.d.ts +15 -6
- package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
- package/dist/xlsx/pivot/axes.d.ts +6 -0
- package/dist/xlsx/pivot/axes.d.ts.map +1 -0
- package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/columns.d.ts +48 -0
- package/dist/xlsx/pivot/columns.d.ts.map +1 -0
- package/dist/xlsx/pivot/data.d.ts +9 -3
- package/dist/xlsx/pivot/data.d.ts.map +1 -1
- package/dist/xlsx/pivot/date-axes.d.ts +12 -0
- package/dist/xlsx/pivot/date-axes.d.ts.map +1 -0
- package/dist/xlsx/pivot/date-group-read.d.ts +11 -0
- package/dist/xlsx/pivot/date-group-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/date-groups.d.ts +60 -0
- package/dist/xlsx/pivot/date-groups.d.ts.map +1 -0
- package/dist/xlsx/pivot/date-read.d.ts +10 -0
- package/dist/xlsx/pivot/date-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/dates.d.ts +17 -0
- package/dist/xlsx/pivot/dates.d.ts.map +1 -0
- package/dist/xlsx/pivot/group-read.d.ts +9 -0
- package/dist/xlsx/pivot/group-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/groups.d.ts +31 -0
- package/dist/xlsx/pivot/groups.d.ts.map +1 -0
- package/dist/xlsx/pivot/hierarchy.d.ts +4 -1
- package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
- package/dist/xlsx/pivot/index.d.ts +7 -0
- package/dist/xlsx/pivot/index.d.ts.map +1 -1
- package/dist/xlsx/pivot/item-filters-read.d.ts +7 -0
- package/dist/xlsx/pivot/item-filters-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/item-filters.d.ts +23 -0
- package/dist/xlsx/pivot/item-filters.d.ts.map +1 -0
- package/dist/xlsx/pivot/measures.d.ts +6 -4
- package/dist/xlsx/pivot/measures.d.ts.map +1 -1
- package/dist/xlsx/pivot/nested.d.ts +8 -0
- package/dist/xlsx/pivot/nested.d.ts.map +1 -0
- package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
- package/dist/xlsx/pivot/read.d.ts +2 -1
- package/dist/xlsx/pivot/read.d.ts.map +1 -1
- package/dist/xlsx/pivot/subtotal-read.d.ts +9 -0
- package/dist/xlsx/pivot/subtotal-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/subtotals.d.ts +23 -0
- package/dist/xlsx/pivot/subtotals.d.ts.map +1 -0
- package/dist/xlsx/pivot/table-xml.d.ts +1 -1
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/values-axis.d.ts +2 -2
- package/dist/xlsx/pivot/values-axis.d.ts.map +1 -1
- package/dist/xlsx/read/chart-ex.d.ts +9 -0
- package/dist/xlsx/read/chart-ex.d.ts.map +1 -0
- package/dist/xlsx/read/chart.d.ts.map +1 -1
- package/dist/xlsx/read/drawing.d.ts.map +1 -1
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts +2 -1
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/scenarios.d.ts +4 -0
- package/dist/xlsx/read/scenarios.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/tables.d.ts +3 -0
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/slicer/book.d.ts +16 -0
- package/dist/xlsx/slicer/book.d.ts.map +1 -0
- package/dist/xlsx/slicer/frame.d.ts +14 -0
- package/dist/xlsx/slicer/frame.d.ts.map +1 -0
- package/dist/xlsx/slicer/index.d.ts +10 -0
- package/dist/xlsx/slicer/index.d.ts.map +1 -0
- package/dist/xlsx/slicer/items.d.ts +30 -0
- package/dist/xlsx/slicer/items.d.ts.map +1 -0
- package/dist/xlsx/slicer/layout.d.ts +67 -0
- package/dist/xlsx/slicer/layout.d.ts.map +1 -0
- package/dist/xlsx/slicer/read-slicers.d.ts +11 -0
- package/dist/xlsx/slicer/read-slicers.d.ts.map +1 -0
- package/dist/xlsx/slicer/read-timelines.d.ts +5 -0
- package/dist/xlsx/slicer/read-timelines.d.ts.map +1 -0
- package/dist/xlsx/slicer/read.d.ts +26 -0
- package/dist/xlsx/slicer/read.d.ts.map +1 -0
- package/dist/xlsx/slicer/select.d.ts +10 -0
- package/dist/xlsx/slicer/select.d.ts.map +1 -0
- package/dist/xlsx/slicer/styles.d.ts +36 -0
- package/dist/xlsx/slicer/styles.d.ts.map +1 -0
- package/dist/xlsx/slicer/table-filter.d.ts +28 -0
- package/dist/xlsx/slicer/table-filter.d.ts.map +1 -0
- package/dist/xlsx/slicer/timeline-periods.d.ts +35 -0
- package/dist/xlsx/slicer/timeline-periods.d.ts.map +1 -0
- package/dist/xlsx/slicer/timeline-view.d.ts +60 -0
- package/dist/xlsx/slicer/timeline-view.d.ts.map +1 -0
- package/dist/xlsx/slicer/write-plan.d.ts +31 -0
- package/dist/xlsx/slicer/write-plan.d.ts.map +1 -0
- package/dist/xlsx/slicer/write-timeline.d.ts +7 -0
- package/dist/xlsx/slicer/write-timeline.d.ts.map +1 -0
- package/dist/xlsx/slicer/write-xml.d.ts +17 -0
- package/dist/xlsx/slicer/write-xml.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/print-layout.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/slicers.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/slicers.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/what-if.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/what-if.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/slicers.d.ts +37 -0
- package/dist/xlsx/ui/commands/slicers.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/what-if.d.ts +4 -0
- package/dist/xlsx/ui/commands/what-if.d.ts.map +1 -0
- package/dist/xlsx/ui/commands.d.ts +2 -0
- package/dist/xlsx/ui/commands.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +6999 -3052
- package/dist/xlsx/ui/index.d.ts +2 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +6994 -3053
- package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/de/options.d.ts +2 -0
- package/dist/xlsx/ui/locales/de/options.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/options.d.ts +2 -0
- package/dist/xlsx/ui/locales/en/options.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/options.d.ts +2 -0
- package/dist/xlsx/ui/locales/es/options.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/options.d.ts +2 -0
- package/dist/xlsx/ui/locales/fr/options.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/options.d.ts +2 -0
- package/dist/xlsx/ui/locales/zh-CN/options.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
- package/dist/xlsx/write/carried-refs.d.ts.map +1 -1
- package/dist/xlsx/write/drawing.d.ts.map +1 -1
- package/dist/xlsx/write/package-writer.d.ts +2 -0
- package/dist/xlsx/write/package-writer.d.ts.map +1 -1
- package/dist/xlsx/write/save.d.ts.map +1 -1
- package/dist/xlsx/write/scenarios.d.ts +4 -0
- package/dist/xlsx/write/scenarios.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-parts.d.ts +1 -0
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/dist/xlsx/write/tables.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/dist/xml/index.cjs +28 -0
- package/dist/xml/index.mjs +27 -1
- package/dist/xml/namespaces.d.ts +2 -0
- package/dist/xml/namespaces.d.ts.map +1 -1
- package/dist/xml/xml.d.ts +15 -0
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-RWTOUCLC.mjs +0 -3
- package/dist/PptxHandler-UU4ZCT6H.cjs +0 -12
- package/dist/chunk-KBIJI6P5.mjs +0 -166
- package/dist/pptx/chunks/elements-DmbzOhFu.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BmvOxbsh.d.ts.map +0 -1
package/dist/pptx/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var JSZip = require('jszip');
|
|
4
4
|
var fastXmlParser = require('fast-xml-parser');
|
|
5
5
|
var xmldom = require('@xmldom/xmldom');
|
|
6
6
|
var mtxDecompressor = require('mtx-decompressor');
|
|
7
7
|
|
|
8
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
|
|
11
11
|
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -3416,11 +3416,11 @@ function normalizeChartContainerChildren(container2, containerLocal, getLocalNam
|
|
|
3416
3416
|
}
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
3419
|
-
const
|
|
3420
|
-
if (
|
|
3421
|
-
const present = Object.keys(container2).some((k) => getLocalName2(k) ===
|
|
3419
|
+
const required2 = REQUIRED_LEADING_CHILD[containerLocal];
|
|
3420
|
+
if (required2) {
|
|
3421
|
+
const present = Object.keys(container2).some((k) => getLocalName2(k) === required2.local);
|
|
3422
3422
|
if (!present) {
|
|
3423
|
-
container2[`c:${
|
|
3423
|
+
container2[`c:${required2.local}`] = { "@_val": required2.val };
|
|
3424
3424
|
}
|
|
3425
3425
|
}
|
|
3426
3426
|
}
|
|
@@ -4899,6 +4899,14 @@ var init_SlideBuilder = __esm({
|
|
|
4899
4899
|
};
|
|
4900
4900
|
}
|
|
4901
4901
|
});
|
|
4902
|
+
|
|
4903
|
+
// pptx/core/builders/sdk/PresentationBuilder.ts
|
|
4904
|
+
var PresentationBuilder_exports = {};
|
|
4905
|
+
__export(PresentationBuilder_exports, {
|
|
4906
|
+
PresentationBuilder: () => exports.PresentationBuilder,
|
|
4907
|
+
STANDARD_LAYOUTS: () => STANDARD_LAYOUTS,
|
|
4908
|
+
buildBlankPresentationArchive: () => buildBlankPresentationArchive
|
|
4909
|
+
});
|
|
4902
4910
|
function normalizeSrgbHex(color2) {
|
|
4903
4911
|
if (!color2) {
|
|
4904
4912
|
return void 0;
|
|
@@ -5206,7 +5214,7 @@ async function buildBlankPresentationArchive(options) {
|
|
|
5206
5214
|
const layoutCount = STANDARD_LAYOUTS.length;
|
|
5207
5215
|
const initialSlideCount = Math.max(0, options?.initialSlideCount ?? 0);
|
|
5208
5216
|
const blankLayoutIdx = STANDARD_LAYOUTS.findIndex((l) => l.type === "blank") + 1 || 7;
|
|
5209
|
-
const zip = new
|
|
5217
|
+
const zip = new JSZip__default.default();
|
|
5210
5218
|
zip.file("[Content_Types].xml", contentTypesXml(layoutCount, initialSlideCount));
|
|
5211
5219
|
zip.file("_rels/.rels", rootRelsXml());
|
|
5212
5220
|
zip.file(
|
|
@@ -12582,7 +12590,7 @@ function gd16(name, formula) {
|
|
|
12582
12590
|
const parts = formula.trim().split(/\s+/);
|
|
12583
12591
|
return { name, formula, args: parts.slice(1) };
|
|
12584
12592
|
}
|
|
12585
|
-
var FULL_RECT11, rect, roundRect, ellipse, triangle, rtTriangle, parallelogram, trapezoid, diamond, pentagon, hexagon, heptagon, octagon, decagon, dodecagon, pie, pieWedge, chord, arc, donut, noSmoking, blockArc, rightArrow, leftArrow, upArrow, downArrow, wedgeRectCallout, wedgeRoundRectCallout, wedgeEllipseCallout, star4, star5; exports.PRESET_SHAPE_GEOMETRY_TABLE = void 0;
|
|
12593
|
+
var FULL_RECT11, rect, roundRect, ellipse, triangle, rtTriangle, parallelogram, trapezoid, diamond, pentagon, hexagon, heptagon, octagon, decagon, dodecagon, pie, pieWedge, chord, arc, donut, noSmoking, blockArc, rightArrow, leftArrow, upArrow, downArrow, wedgePointerGuides, wedgeRectCallout, wedgeRoundRectCallout, wedgeEllipseCallout, star4, star5; exports.PRESET_SHAPE_GEOMETRY_TABLE = void 0;
|
|
12586
12594
|
var init_preset_shape_definitions_table = __esm({
|
|
12587
12595
|
"geometry/preset-shape-definitions-table.ts"() {
|
|
12588
12596
|
init_preset_shape_definitions_action_buttons();
|
|
@@ -13376,55 +13384,65 @@ var init_preset_shape_definitions_table = __esm({
|
|
|
13376
13384
|
}
|
|
13377
13385
|
]
|
|
13378
13386
|
};
|
|
13387
|
+
wedgePointerGuides = [
|
|
13388
|
+
gd16("dxPos", "*/ w adj1 100000"),
|
|
13389
|
+
gd16("dyPos", "*/ h adj2 100000"),
|
|
13390
|
+
gd16("xPos", "+- hc dxPos 0"),
|
|
13391
|
+
gd16("yPos", "+- vc dyPos 0"),
|
|
13392
|
+
gd16("dx", "+- xPos 0 hc"),
|
|
13393
|
+
gd16("dy", "+- yPos 0 vc"),
|
|
13394
|
+
gd16("dq", "*/ dxPos h w"),
|
|
13395
|
+
gd16("ady", "abs dy"),
|
|
13396
|
+
gd16("adq", "abs dq"),
|
|
13397
|
+
gd16("dz", "+- ady 0 adq"),
|
|
13398
|
+
gd16("xg1", "?: dxPos 7 2"),
|
|
13399
|
+
gd16("xg2", "?: dxPos 10 5"),
|
|
13400
|
+
gd16("x1", "*/ w xg1 12"),
|
|
13401
|
+
gd16("x2", "*/ w xg2 12"),
|
|
13402
|
+
gd16("yg1", "?: dyPos 7 2"),
|
|
13403
|
+
gd16("yg2", "?: dyPos 10 5"),
|
|
13404
|
+
gd16("y1", "*/ h yg1 12"),
|
|
13405
|
+
gd16("y2", "*/ h yg2 12"),
|
|
13406
|
+
gd16("t1", "?: dxPos l xPos"),
|
|
13407
|
+
gd16("xl", "?: dz l t1"),
|
|
13408
|
+
gd16("t2", "?: dyPos x1 xPos"),
|
|
13409
|
+
gd16("xt", "?: dz t2 x1"),
|
|
13410
|
+
gd16("t3", "?: dxPos xPos r"),
|
|
13411
|
+
gd16("xr", "?: dz r t3"),
|
|
13412
|
+
gd16("t4", "?: dyPos xPos x1"),
|
|
13413
|
+
gd16("xb", "?: dz t4 x1"),
|
|
13414
|
+
gd16("t5", "?: dxPos y1 yPos"),
|
|
13415
|
+
gd16("yl", "?: dz y1 t5"),
|
|
13416
|
+
gd16("t6", "?: dyPos t yPos"),
|
|
13417
|
+
gd16("yt", "?: dz t6 t"),
|
|
13418
|
+
gd16("t7", "?: dxPos yPos y1"),
|
|
13419
|
+
gd16("yr", "?: dz y1 t7"),
|
|
13420
|
+
gd16("t8", "?: dyPos yPos b"),
|
|
13421
|
+
gd16("yb", "?: dz t8 b")
|
|
13422
|
+
];
|
|
13379
13423
|
wedgeRectCallout = {
|
|
13380
13424
|
name: "wedgeRectCallout",
|
|
13381
13425
|
avLst: { adj1: -20833, adj2: 62500 },
|
|
13382
|
-
gdLst:
|
|
13383
|
-
gd16("dxPos", "*/ w adj1 100000"),
|
|
13384
|
-
gd16("dyPos", "*/ h adj2 100000"),
|
|
13385
|
-
gd16("xPos", "+- hc dxPos 0"),
|
|
13386
|
-
gd16("yPos", "+- vc dyPos 0"),
|
|
13387
|
-
gd16("dx", "+- xPos 0 hc"),
|
|
13388
|
-
gd16("dy", "+- yPos 0 vc"),
|
|
13389
|
-
gd16("dq", "*/ dxPos h w"),
|
|
13390
|
-
gd16("ady", "abs dy"),
|
|
13391
|
-
gd16("adq", "abs dq"),
|
|
13392
|
-
gd16("xg1", "?: dxPos 7 2"),
|
|
13393
|
-
gd16("xg2", "?: dxPos 10 5"),
|
|
13394
|
-
gd16("x1", "*/ w xg1 12"),
|
|
13395
|
-
gd16("x2", "*/ w xg2 12"),
|
|
13396
|
-
gd16("yg1", "?: dyPos 7 2"),
|
|
13397
|
-
gd16("yg2", "?: dyPos 10 5"),
|
|
13398
|
-
gd16("y1", "*/ h yg1 12"),
|
|
13399
|
-
gd16("y2", "*/ h yg2 12"),
|
|
13400
|
-
gd16("t1", "?: dxPos l xPos"),
|
|
13401
|
-
gd16("xl", "?: ady adq t1 l"),
|
|
13402
|
-
gd16("t2", "?: dyPos yPos t"),
|
|
13403
|
-
gd16("yt", "?: ady adq t t2"),
|
|
13404
|
-
gd16("t3", "?: dxPos xPos r"),
|
|
13405
|
-
gd16("xr", "?: ady adq t3 r"),
|
|
13406
|
-
gd16("t4", "?: dyPos b yPos"),
|
|
13407
|
-
gd16("yb", "?: ady adq b t4")
|
|
13408
|
-
],
|
|
13426
|
+
gdLst: wedgePointerGuides,
|
|
13409
13427
|
rect: FULL_RECT11,
|
|
13410
13428
|
pathLst: [
|
|
13411
13429
|
{
|
|
13412
13430
|
commands: [
|
|
13413
13431
|
{ kind: "moveTo", x: "l", y: "t" },
|
|
13414
13432
|
{ kind: "lnTo", x: "x1", y: "t" },
|
|
13415
|
-
{ kind: "lnTo", x: "
|
|
13433
|
+
{ kind: "lnTo", x: "xt", y: "yt" },
|
|
13416
13434
|
{ kind: "lnTo", x: "x2", y: "t" },
|
|
13417
13435
|
{ kind: "lnTo", x: "r", y: "t" },
|
|
13418
13436
|
{ kind: "lnTo", x: "r", y: "y1" },
|
|
13419
|
-
{ kind: "lnTo", x: "xr", y: "
|
|
13437
|
+
{ kind: "lnTo", x: "xr", y: "yr" },
|
|
13420
13438
|
{ kind: "lnTo", x: "r", y: "y2" },
|
|
13421
13439
|
{ kind: "lnTo", x: "r", y: "b" },
|
|
13422
13440
|
{ kind: "lnTo", x: "x2", y: "b" },
|
|
13423
|
-
{ kind: "lnTo", x: "
|
|
13441
|
+
{ kind: "lnTo", x: "xb", y: "yb" },
|
|
13424
13442
|
{ kind: "lnTo", x: "x1", y: "b" },
|
|
13425
13443
|
{ kind: "lnTo", x: "l", y: "b" },
|
|
13426
13444
|
{ kind: "lnTo", x: "l", y: "y2" },
|
|
13427
|
-
{ kind: "lnTo", x: "
|
|
13445
|
+
{ kind: "lnTo", x: "xl", y: "yl" },
|
|
13428
13446
|
{ kind: "lnTo", x: "l", y: "y1" },
|
|
13429
13447
|
{ kind: "close" }
|
|
13430
13448
|
]
|
|
@@ -13435,31 +13453,38 @@ var init_preset_shape_definitions_table = __esm({
|
|
|
13435
13453
|
name: "wedgeRoundRectCallout",
|
|
13436
13454
|
avLst: { adj1: -20833, adj2: 62500, adj3: 16667 },
|
|
13437
13455
|
gdLst: [
|
|
13438
|
-
|
|
13439
|
-
gd16("dyPos", "*/ h adj2 100000"),
|
|
13440
|
-
gd16("xPos", "+- hc dxPos 0"),
|
|
13441
|
-
gd16("yPos", "+- vc dyPos 0"),
|
|
13456
|
+
...wedgePointerGuides,
|
|
13442
13457
|
gd16("a3", "pin 0 adj3 50000"),
|
|
13443
13458
|
gd16("rad", "*/ ss a3 100000"),
|
|
13444
|
-
gd16("
|
|
13445
|
-
gd16("
|
|
13446
|
-
gd16("
|
|
13447
|
-
gd16("
|
|
13459
|
+
gd16("xc1", "+- l rad 0"),
|
|
13460
|
+
gd16("xc2", "+- r 0 rad"),
|
|
13461
|
+
gd16("yc1", "+- t rad 0"),
|
|
13462
|
+
gd16("yc2", "+- b 0 rad")
|
|
13448
13463
|
],
|
|
13449
13464
|
rect: FULL_RECT11,
|
|
13450
13465
|
pathLst: [
|
|
13451
13466
|
{
|
|
13452
13467
|
commands: [
|
|
13453
|
-
{ kind: "moveTo", x: "l", y: "
|
|
13468
|
+
{ kind: "moveTo", x: "l", y: "yc1" },
|
|
13454
13469
|
{ kind: "arcTo", wR: "rad", hR: "rad", stAng: "cd2", swAng: "cd4" },
|
|
13470
|
+
{ kind: "lnTo", x: "x1", y: "t" },
|
|
13471
|
+
{ kind: "lnTo", x: "xt", y: "yt" },
|
|
13455
13472
|
{ kind: "lnTo", x: "x2", y: "t" },
|
|
13473
|
+
{ kind: "lnTo", x: "xc2", y: "t" },
|
|
13456
13474
|
{ kind: "arcTo", wR: "rad", hR: "rad", stAng: "3cd4", swAng: "cd4" },
|
|
13475
|
+
{ kind: "lnTo", x: "r", y: "y1" },
|
|
13476
|
+
{ kind: "lnTo", x: "xr", y: "yr" },
|
|
13457
13477
|
{ kind: "lnTo", x: "r", y: "y2" },
|
|
13478
|
+
{ kind: "lnTo", x: "r", y: "yc2" },
|
|
13458
13479
|
{ kind: "arcTo", wR: "rad", hR: "rad", stAng: "0", swAng: "cd4" },
|
|
13459
|
-
{ kind: "lnTo", x: "
|
|
13460
|
-
{ kind: "lnTo", x: "
|
|
13480
|
+
{ kind: "lnTo", x: "x2", y: "b" },
|
|
13481
|
+
{ kind: "lnTo", x: "xb", y: "yb" },
|
|
13461
13482
|
{ kind: "lnTo", x: "x1", y: "b" },
|
|
13483
|
+
{ kind: "lnTo", x: "xc1", y: "b" },
|
|
13462
13484
|
{ kind: "arcTo", wR: "rad", hR: "rad", stAng: "cd4", swAng: "cd4" },
|
|
13485
|
+
{ kind: "lnTo", x: "l", y: "y2" },
|
|
13486
|
+
{ kind: "lnTo", x: "xl", y: "yl" },
|
|
13487
|
+
{ kind: "lnTo", x: "l", y: "y1" },
|
|
13463
13488
|
{ kind: "close" }
|
|
13464
13489
|
]
|
|
13465
13490
|
}
|
|
@@ -13474,7 +13499,7 @@ var init_preset_shape_definitions_table = __esm({
|
|
|
13474
13499
|
gd16("xPos", "+- hc dxPos 0"),
|
|
13475
13500
|
gd16("yPos", "+- vc dyPos 0"),
|
|
13476
13501
|
gd16("sdx", "*/ dxPos hd2 wd2"),
|
|
13477
|
-
gd16("sdy", "
|
|
13502
|
+
gd16("sdy", "*/ dyPos wd2 hd2"),
|
|
13478
13503
|
gd16("pang", "at2 sdx sdy"),
|
|
13479
13504
|
gd16("stAng", "+- pang 660000 0"),
|
|
13480
13505
|
gd16("enAng", "+- pang 0 660000"),
|
|
@@ -13486,17 +13511,15 @@ var init_preset_shape_definitions_table = __esm({
|
|
|
13486
13511
|
gd16("dy2", "sin hd2 enAng"),
|
|
13487
13512
|
gd16("x2", "+- hc dx2 0"),
|
|
13488
13513
|
gd16("y2", "+- vc dy2 0"),
|
|
13489
|
-
|
|
13490
|
-
gd16("
|
|
13491
|
-
gd16("swAng1", "+- enAngFinal 0 stAng1"),
|
|
13492
|
-
gd16("swAng", "?: swAng1 swAng1 +- swAng1 21600000 0")
|
|
13514
|
+
// The arc runs the long way round, from the first pointer edge to the second.
|
|
13515
|
+
gd16("swAng", "+- 21600000 0 1320000")
|
|
13493
13516
|
],
|
|
13494
13517
|
rect: FULL_RECT11,
|
|
13495
13518
|
pathLst: [
|
|
13496
13519
|
{
|
|
13497
13520
|
commands: [
|
|
13498
13521
|
{ kind: "moveTo", x: "x1", y: "y1" },
|
|
13499
|
-
{ kind: "arcTo", wR: "wd2", hR: "hd2", stAng: "
|
|
13522
|
+
{ kind: "arcTo", wR: "wd2", hR: "hd2", stAng: "stAng", swAng: "swAng" },
|
|
13500
13523
|
{ kind: "lnTo", x: "xPos", y: "yPos" },
|
|
13501
13524
|
{ kind: "close" }
|
|
13502
13525
|
]
|
|
@@ -22855,6 +22878,216 @@ var init_ole_embedded_replace = __esm({
|
|
|
22855
22878
|
CONTENTS_STREAM2 = "CONTENTS";
|
|
22856
22879
|
}
|
|
22857
22880
|
});
|
|
22881
|
+
function isSafePartName(name) {
|
|
22882
|
+
if (name.includes("\0") || name.includes("\\")) return false;
|
|
22883
|
+
if (/^[A-Za-z]:/u.test(name)) return false;
|
|
22884
|
+
const body = name.startsWith("/") ? name.slice(1) : name;
|
|
22885
|
+
if (body.startsWith("/")) return false;
|
|
22886
|
+
return !body.split("/").some((segment) => segment === "..");
|
|
22887
|
+
}
|
|
22888
|
+
function declaredEntrySize(entry2) {
|
|
22889
|
+
const data = entry2._data;
|
|
22890
|
+
const size = Number(data?.uncompressedSize ?? 0);
|
|
22891
|
+
return Number.isFinite(size) && size > 0 ? size : 0;
|
|
22892
|
+
}
|
|
22893
|
+
function resolveLimits(limits) {
|
|
22894
|
+
const create = limits.createError;
|
|
22895
|
+
return {
|
|
22896
|
+
maxEntries: limits.maxEntries ?? DEFAULT_ZIP_LIMITS.maxEntries,
|
|
22897
|
+
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
22898
|
+
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
22899
|
+
label: limits.label ?? "ZIP",
|
|
22900
|
+
fail: (message, limit) => create ? create(message, { limit }) : new ZipLimitError(message, { limit })
|
|
22901
|
+
};
|
|
22902
|
+
}
|
|
22903
|
+
function inflateEntryGuarded(entry2, alreadyRead, limits) {
|
|
22904
|
+
const r = resolveLimits(limits);
|
|
22905
|
+
const declared = declaredEntrySize(entry2);
|
|
22906
|
+
return new Promise((resolvePromise, reject) => {
|
|
22907
|
+
const chunks = [];
|
|
22908
|
+
let size = 0;
|
|
22909
|
+
let done = false;
|
|
22910
|
+
const stream = entry2.internalStream("uint8array");
|
|
22911
|
+
const abort = (error) => {
|
|
22912
|
+
if (done) return;
|
|
22913
|
+
done = true;
|
|
22914
|
+
stream.pause();
|
|
22915
|
+
chunks.length = 0;
|
|
22916
|
+
reject(error);
|
|
22917
|
+
};
|
|
22918
|
+
stream.on("data", (chunk2) => {
|
|
22919
|
+
if (done) return;
|
|
22920
|
+
size += chunk2.byteLength;
|
|
22921
|
+
if (size > declared || size > r.maxEntryBytes)
|
|
22922
|
+
return abort(
|
|
22923
|
+
r.fail(`${r.label} part ${entry2.name} inflates past its declared size`, r.maxEntryBytes)
|
|
22924
|
+
);
|
|
22925
|
+
if (alreadyRead + size > r.maxTotalBytes)
|
|
22926
|
+
return abort(
|
|
22927
|
+
r.fail(
|
|
22928
|
+
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
22929
|
+
r.maxTotalBytes
|
|
22930
|
+
)
|
|
22931
|
+
);
|
|
22932
|
+
chunks.push(chunk2);
|
|
22933
|
+
});
|
|
22934
|
+
stream.on("error", (error) => abort(error));
|
|
22935
|
+
stream.on("end", () => {
|
|
22936
|
+
if (done) return;
|
|
22937
|
+
done = true;
|
|
22938
|
+
if (chunks.length === 1 && chunks[0]) return resolvePromise(chunks[0]);
|
|
22939
|
+
const out = new Uint8Array(size);
|
|
22940
|
+
let offset = 0;
|
|
22941
|
+
for (const chunk2 of chunks) {
|
|
22942
|
+
out.set(chunk2, offset);
|
|
22943
|
+
offset += chunk2.byteLength;
|
|
22944
|
+
}
|
|
22945
|
+
resolvePromise(out);
|
|
22946
|
+
});
|
|
22947
|
+
stream.resume();
|
|
22948
|
+
});
|
|
22949
|
+
}
|
|
22950
|
+
function toBase64(bytes) {
|
|
22951
|
+
let binary = "";
|
|
22952
|
+
for (let i2 = 0; i2 < bytes.length; i2 += 32768)
|
|
22953
|
+
binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
|
|
22954
|
+
return btoa(binary);
|
|
22955
|
+
}
|
|
22956
|
+
function guardZip(zip, limits = {}) {
|
|
22957
|
+
const r = resolveLimits(limits);
|
|
22958
|
+
const entries = Object.values(zip.files);
|
|
22959
|
+
if (entries.length > r.maxEntries)
|
|
22960
|
+
throw r.fail(
|
|
22961
|
+
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
22962
|
+
r.maxEntries
|
|
22963
|
+
);
|
|
22964
|
+
let declared = 0;
|
|
22965
|
+
for (const entry2 of entries) {
|
|
22966
|
+
const original = entry2.unsafeOriginalName;
|
|
22967
|
+
if (!isSafePartName(entry2.name) || original !== void 0 && !isSafePartName(original))
|
|
22968
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
22969
|
+
if (entry2.dir) continue;
|
|
22970
|
+
const size = declaredEntrySize(entry2);
|
|
22971
|
+
if (size > r.maxEntryBytes)
|
|
22972
|
+
throw r.fail(
|
|
22973
|
+
`${r.label} part ${entry2.name} exceeds the uncompressed part size limit`,
|
|
22974
|
+
r.maxEntryBytes
|
|
22975
|
+
);
|
|
22976
|
+
declared += size;
|
|
22977
|
+
}
|
|
22978
|
+
if (declared > r.maxTotalBytes)
|
|
22979
|
+
throw r.fail(
|
|
22980
|
+
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
22981
|
+
r.maxTotalBytes
|
|
22982
|
+
);
|
|
22983
|
+
const produced = /* @__PURE__ */ new Map();
|
|
22984
|
+
let total = 0;
|
|
22985
|
+
for (const entry2 of entries) {
|
|
22986
|
+
if (entry2.dir) continue;
|
|
22987
|
+
const inflateOriginal = entry2.async.bind(entry2);
|
|
22988
|
+
entry2.async = async (type, onUpdate) => {
|
|
22989
|
+
const previous = produced.get(entry2.name) ?? 0;
|
|
22990
|
+
const bytes = await inflateEntryGuarded(entry2, total - previous, limits);
|
|
22991
|
+
if (bytes.byteLength > previous) {
|
|
22992
|
+
total += bytes.byteLength - previous;
|
|
22993
|
+
produced.set(entry2.name, bytes.byteLength);
|
|
22994
|
+
}
|
|
22995
|
+
switch (type) {
|
|
22996
|
+
case "uint8array":
|
|
22997
|
+
return bytes;
|
|
22998
|
+
case "string":
|
|
22999
|
+
case "text":
|
|
23000
|
+
return new TextDecoder("utf-8", { ignoreBOM: true }).decode(bytes);
|
|
23001
|
+
case "arraybuffer":
|
|
23002
|
+
return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
|
23003
|
+
case "base64":
|
|
23004
|
+
return toBase64(bytes);
|
|
23005
|
+
default:
|
|
23006
|
+
return inflateOriginal(type, onUpdate);
|
|
23007
|
+
}
|
|
23008
|
+
};
|
|
23009
|
+
}
|
|
23010
|
+
return zip;
|
|
23011
|
+
}
|
|
23012
|
+
async function openZip(input, limits = {}) {
|
|
23013
|
+
const r = resolveLimits(limits);
|
|
23014
|
+
const maxInput = limits.maxInputBytes ?? DEFAULT_ZIP_LIMITS.maxInputBytes;
|
|
23015
|
+
const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
23016
|
+
if (bytes.byteLength > maxInput)
|
|
23017
|
+
throw r.fail(
|
|
23018
|
+
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
23019
|
+
maxInput
|
|
23020
|
+
);
|
|
23021
|
+
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
23022
|
+
}
|
|
23023
|
+
var DEFAULT_ZIP_LIMITS, ZipLimitError, mib;
|
|
23024
|
+
var init_zip_limits = __esm({
|
|
23025
|
+
"opc/zip-limits.ts"() {
|
|
23026
|
+
DEFAULT_ZIP_LIMITS = {
|
|
23027
|
+
maxInputBytes: 100 * 1024 * 1024,
|
|
23028
|
+
maxEntries: 1e4,
|
|
23029
|
+
maxEntryBytes: 100 * 1024 * 1024,
|
|
23030
|
+
maxTotalBytes: 100 * 1024 * 1024
|
|
23031
|
+
};
|
|
23032
|
+
ZipLimitError = class extends Error {
|
|
23033
|
+
code = "ZIP_BOMB";
|
|
23034
|
+
limit;
|
|
23035
|
+
constructor(message, details) {
|
|
23036
|
+
super(message);
|
|
23037
|
+
this.name = "ZipLimitError";
|
|
23038
|
+
this.limit = details.limit;
|
|
23039
|
+
}
|
|
23040
|
+
};
|
|
23041
|
+
mib = (bytes) => Math.round(bytes / 1048576);
|
|
23042
|
+
}
|
|
23043
|
+
});
|
|
23044
|
+
|
|
23045
|
+
// pptx/core/core/types.ts
|
|
23046
|
+
exports.DEFAULT_MAX_UNCOMPRESSED_BYTES = void 0; exports.MAX_ZIP_ENTRY_COUNT = void 0; exports.ZipBombError = void 0;
|
|
23047
|
+
var init_types2 = __esm({
|
|
23048
|
+
"pptx/core/core/types.ts"() {
|
|
23049
|
+
exports.DEFAULT_MAX_UNCOMPRESSED_BYTES = 500 * 1024 * 1024;
|
|
23050
|
+
exports.MAX_ZIP_ENTRY_COUNT = 65536;
|
|
23051
|
+
exports.ZipBombError = class extends Error {
|
|
23052
|
+
code = "ZIP_BOMB";
|
|
23053
|
+
uncompressedBytes;
|
|
23054
|
+
limit;
|
|
23055
|
+
entryCount;
|
|
23056
|
+
constructor(message, details) {
|
|
23057
|
+
super(message);
|
|
23058
|
+
this.name = "ZipBombError";
|
|
23059
|
+
this.uncompressedBytes = details.uncompressedBytes;
|
|
23060
|
+
this.limit = details.limit;
|
|
23061
|
+
this.entryCount = details.entryCount;
|
|
23062
|
+
}
|
|
23063
|
+
};
|
|
23064
|
+
}
|
|
23065
|
+
});
|
|
23066
|
+
|
|
23067
|
+
// pptx/core/utils/zip-open.ts
|
|
23068
|
+
function openPptxZip(bytes) {
|
|
23069
|
+
return openZip(bytes, {
|
|
23070
|
+
label: "PPTX",
|
|
23071
|
+
maxInputBytes: exports.DEFAULT_MAX_UNCOMPRESSED_BYTES,
|
|
23072
|
+
maxEntries: exports.MAX_ZIP_ENTRY_COUNT,
|
|
23073
|
+
maxEntryBytes: exports.DEFAULT_MAX_UNCOMPRESSED_BYTES,
|
|
23074
|
+
maxTotalBytes: exports.DEFAULT_MAX_UNCOMPRESSED_BYTES,
|
|
23075
|
+
createError
|
|
23076
|
+
});
|
|
23077
|
+
}
|
|
23078
|
+
function openNestedZip(bytes) {
|
|
23079
|
+
return openZip(bytes, { label: "Embedded", createError });
|
|
23080
|
+
}
|
|
23081
|
+
var createError;
|
|
23082
|
+
var init_zip_open = __esm({
|
|
23083
|
+
"pptx/core/utils/zip-open.ts"() {
|
|
23084
|
+
init_zip_limits();
|
|
23085
|
+
init_types2();
|
|
23086
|
+
createError = (message, details) => new exports.ZipBombError(message, details);
|
|
23087
|
+
}
|
|
23088
|
+
});
|
|
23089
|
+
|
|
23090
|
+
// pptx/core/utils/ole-payload-kind.ts
|
|
22858
23091
|
function isZipMagic(bytes) {
|
|
22859
23092
|
if (bytes.length < 4) {
|
|
22860
23093
|
return false;
|
|
@@ -22867,7 +23100,7 @@ async function detectOlePayloadEditorKind(bytes) {
|
|
|
22867
23100
|
}
|
|
22868
23101
|
if (isZipMagic(bytes)) {
|
|
22869
23102
|
try {
|
|
22870
|
-
const zip = await
|
|
23103
|
+
const zip = await openNestedZip(bytes);
|
|
22871
23104
|
if (zip.file("xl/workbook.xml")) {
|
|
22872
23105
|
return "sheet-xlsx";
|
|
22873
23106
|
}
|
|
@@ -22903,6 +23136,7 @@ async function detectOlePayloadEditorKind(bytes) {
|
|
|
22903
23136
|
var ZIP_MAGIC;
|
|
22904
23137
|
var init_ole_payload_kind = __esm({
|
|
22905
23138
|
"pptx/core/utils/ole-payload-kind.ts"() {
|
|
23139
|
+
init_zip_open();
|
|
22906
23140
|
init_ole_embedded_extract();
|
|
22907
23141
|
init_ole2_parser_read2();
|
|
22908
23142
|
ZIP_MAGIC = [80, 75, 3, 4];
|
|
@@ -23357,7 +23591,7 @@ function cellDisplayValue(cell, sharedStrings) {
|
|
|
23357
23591
|
}
|
|
23358
23592
|
async function readOleSheetGrid(xlsxBytes, maxRows = DEFAULT_MAX_ROWS, maxCols = DEFAULT_MAX_COLS) {
|
|
23359
23593
|
try {
|
|
23360
|
-
const zip = await
|
|
23594
|
+
const zip = await openNestedZip(xlsxBytes);
|
|
23361
23595
|
const sheetFile = zip.file(FIRST_SHEET_PATH);
|
|
23362
23596
|
if (!sheetFile) {
|
|
23363
23597
|
return void 0;
|
|
@@ -23416,7 +23650,7 @@ function markFullCalcOnLoad(workbookXml, parser, builder3) {
|
|
|
23416
23650
|
}
|
|
23417
23651
|
async function writeOleSheetCellEdit(xlsxBytes, edit) {
|
|
23418
23652
|
try {
|
|
23419
|
-
const zip = await
|
|
23653
|
+
const zip = await openNestedZip(xlsxBytes);
|
|
23420
23654
|
const sheetFile = zip.file(FIRST_SHEET_PATH);
|
|
23421
23655
|
if (!sheetFile) {
|
|
23422
23656
|
return xlsxBytes;
|
|
@@ -23454,6 +23688,7 @@ async function writeOleSheetCellEdit(xlsxBytes, edit) {
|
|
|
23454
23688
|
var FIRST_SHEET_PATH, DEFAULT_MAX_ROWS, DEFAULT_MAX_COLS;
|
|
23455
23689
|
var init_ole_sheet_xlsx_editor = __esm({
|
|
23456
23690
|
"pptx/core/utils/ole-sheet-xlsx-editor.ts"() {
|
|
23691
|
+
init_zip_open();
|
|
23457
23692
|
init_chart_xlsx_cellref();
|
|
23458
23693
|
init_chart_xlsx_sheet_cells();
|
|
23459
23694
|
init_xml_access();
|
|
@@ -24574,7 +24809,7 @@ function paragraphText(paragraph) {
|
|
|
24574
24809
|
}
|
|
24575
24810
|
async function readOleDocumentParagraphs(docxBytes) {
|
|
24576
24811
|
try {
|
|
24577
|
-
const zip = await
|
|
24812
|
+
const zip = await openNestedZip(docxBytes);
|
|
24578
24813
|
const documentFile = zip.file(DOCUMENT_PART_PATH);
|
|
24579
24814
|
if (!documentFile) {
|
|
24580
24815
|
return void 0;
|
|
@@ -24592,7 +24827,7 @@ async function readOleDocumentParagraphs(docxBytes) {
|
|
|
24592
24827
|
}
|
|
24593
24828
|
async function writeOleDocumentParagraphEdit(docxBytes, paragraphIndex, text2) {
|
|
24594
24829
|
try {
|
|
24595
|
-
const zip = await
|
|
24830
|
+
const zip = await openNestedZip(docxBytes);
|
|
24596
24831
|
const documentFile = zip.file(DOCUMENT_PART_PATH);
|
|
24597
24832
|
if (!documentFile) {
|
|
24598
24833
|
return docxBytes;
|
|
@@ -24638,6 +24873,7 @@ async function writeOleDocumentParagraphEdit(docxBytes, paragraphIndex, text2) {
|
|
|
24638
24873
|
var DOCUMENT_PART_PATH;
|
|
24639
24874
|
var init_ole_document_docx_editor = __esm({
|
|
24640
24875
|
"pptx/core/utils/ole-document-docx-editor.ts"() {
|
|
24876
|
+
init_zip_open();
|
|
24641
24877
|
init_xml_access();
|
|
24642
24878
|
DOCUMENT_PART_PATH = "word/document.xml";
|
|
24643
24879
|
}
|
|
@@ -30875,7 +31111,7 @@ function parseStatement(element, state) {
|
|
|
30875
31111
|
rules: element.children.filter((c) => c.name === "rule").map((c) => parseRule(c.attrs))
|
|
30876
31112
|
};
|
|
30877
31113
|
case "varLst": {
|
|
30878
|
-
const vars =
|
|
31114
|
+
const vars = /* @__PURE__ */ Object.create(null);
|
|
30879
31115
|
for (const entry2 of element.children) {
|
|
30880
31116
|
vars[entry2.name] = entry2.attrs.val ?? "";
|
|
30881
31117
|
}
|
|
@@ -31085,6 +31321,9 @@ function walk(statements, point2, node, state) {
|
|
|
31085
31321
|
}
|
|
31086
31322
|
state.depth++;
|
|
31087
31323
|
for (const next of iteratePoints(point2, forEach.iterator)) {
|
|
31324
|
+
if (state.counter >= MAX_NODES) {
|
|
31325
|
+
break;
|
|
31326
|
+
}
|
|
31088
31327
|
walk(forEach.body, next, node, state);
|
|
31089
31328
|
}
|
|
31090
31329
|
state.depth--;
|
|
@@ -31127,10 +31366,17 @@ function walk(statements, point2, node, state) {
|
|
|
31127
31366
|
}
|
|
31128
31367
|
}
|
|
31129
31368
|
function recordedVars(point2, name) {
|
|
31130
|
-
|
|
31369
|
+
const byName = point2.source?.presLayoutVarsByName;
|
|
31370
|
+
if (!byName || !Object.prototype.hasOwnProperty.call(byName, name)) {
|
|
31371
|
+
return {};
|
|
31372
|
+
}
|
|
31373
|
+
return byName[name] ?? {};
|
|
31374
|
+
}
|
|
31375
|
+
function variableMap(...sources) {
|
|
31376
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), ...sources);
|
|
31131
31377
|
}
|
|
31132
31378
|
function buildNode(def, point2, parent, state) {
|
|
31133
|
-
if (state.depth > MAX_DEPTH) {
|
|
31379
|
+
if (state.depth > MAX_DEPTH || state.counter >= MAX_NODES) {
|
|
31134
31380
|
return void 0;
|
|
31135
31381
|
}
|
|
31136
31382
|
const node = {
|
|
@@ -31144,7 +31390,7 @@ function buildNode(def, point2, parent, state) {
|
|
|
31144
31390
|
presOfAnchored: false,
|
|
31145
31391
|
constraints: [],
|
|
31146
31392
|
rules: [],
|
|
31147
|
-
vars:
|
|
31393
|
+
vars: variableMap(recordedVars(point2, def.name)),
|
|
31148
31394
|
children: [],
|
|
31149
31395
|
parent,
|
|
31150
31396
|
order: state.counter++
|
|
@@ -31157,12 +31403,13 @@ function buildNode(def, point2, parent, state) {
|
|
|
31157
31403
|
function buildPresentationTree(def, doc, options = {}) {
|
|
31158
31404
|
return buildNode(def.root, doc, void 0, { def, options, counter: 0, depth: 0 });
|
|
31159
31405
|
}
|
|
31160
|
-
var MAX_DEPTH;
|
|
31406
|
+
var MAX_DEPTH, MAX_NODES;
|
|
31161
31407
|
var init_pres_tree = __esm({
|
|
31162
31408
|
"diagram/engine/pres-tree.ts"() {
|
|
31163
31409
|
init_axis();
|
|
31164
31410
|
init_conditions();
|
|
31165
31411
|
MAX_DEPTH = 96;
|
|
31412
|
+
MAX_NODES = 1e5;
|
|
31166
31413
|
}
|
|
31167
31414
|
});
|
|
31168
31415
|
|
|
@@ -44504,7 +44751,7 @@ var init_smartart_decompose = __esm({
|
|
|
44504
44751
|
});
|
|
44505
44752
|
|
|
44506
44753
|
// diagram/types.ts
|
|
44507
|
-
var
|
|
44754
|
+
var init_types3 = __esm({
|
|
44508
44755
|
"diagram/types.ts"() {
|
|
44509
44756
|
}
|
|
44510
44757
|
});
|
|
@@ -44914,6 +45161,8 @@ var init_namespaces = __esm({
|
|
|
44914
45161
|
a: "http://schemas.openxmlformats.org/drawingml/2006/main",
|
|
44915
45162
|
/** DrawingML chart. */
|
|
44916
45163
|
c: "http://schemas.openxmlformats.org/drawingml/2006/chart",
|
|
45164
|
+
/** Office 2016 extended charts (waterfall, histogram, funnel...; `cx:chartSpace`). */
|
|
45165
|
+
cx: "http://schemas.microsoft.com/office/drawing/2014/chartex",
|
|
44917
45166
|
/** Office 2010 chart extensions, including built-in modern chart styles. */
|
|
44918
45167
|
c14: "http://schemas.microsoft.com/office/drawing/2007/8/2/chart",
|
|
44919
45168
|
/** DrawingML diagram (SmartArt) main. */
|
|
@@ -44971,10 +45220,29 @@ var init_namespaces = __esm({
|
|
|
44971
45220
|
};
|
|
44972
45221
|
}
|
|
44973
45222
|
});
|
|
45223
|
+
function checkXmlLimits(xml, label, limits = {}) {
|
|
45224
|
+
const maxDepth2 = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
45225
|
+
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
45226
|
+
let depth = 0;
|
|
45227
|
+
let nodes = 0;
|
|
45228
|
+
for (const match of xml.matchAll(MARKUP_RE)) {
|
|
45229
|
+
const [, closing, name, selfClosing] = match;
|
|
45230
|
+
if (name === void 0) continue;
|
|
45231
|
+
if (closing) {
|
|
45232
|
+
depth--;
|
|
45233
|
+
continue;
|
|
45234
|
+
}
|
|
45235
|
+
nodes++;
|
|
45236
|
+
if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
|
|
45237
|
+
if (!selfClosing && ++depth > maxDepth2)
|
|
45238
|
+
throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth2}`);
|
|
45239
|
+
}
|
|
45240
|
+
}
|
|
44974
45241
|
function parseXml(xml, options = {}) {
|
|
44975
45242
|
const label = options.label ?? "OOXML";
|
|
44976
45243
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
44977
45244
|
throw new Error(`${label} XML with DTD or entity declarations is not supported`);
|
|
45245
|
+
checkXmlLimits(xml, label, options.limits);
|
|
44978
45246
|
let parseError = "";
|
|
44979
45247
|
let parsed;
|
|
44980
45248
|
try {
|
|
@@ -45000,10 +45268,15 @@ function named(element, local, ns, lenient = true) {
|
|
|
45000
45268
|
function attr(element, local, ns, prefix) {
|
|
45001
45269
|
return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix}:${local}`) ?? void 0;
|
|
45002
45270
|
}
|
|
45003
|
-
var buildXml, isElement, elements, children2, first, relAttr;
|
|
45271
|
+
var DEFAULT_XML_LIMITS, MARKUP_RE, buildXml, isElement, elements, children2, first, relAttr;
|
|
45004
45272
|
var init_xml = __esm({
|
|
45005
45273
|
"xml/xml.ts"() {
|
|
45006
45274
|
init_namespaces();
|
|
45275
|
+
DEFAULT_XML_LIMITS = {
|
|
45276
|
+
maxDepth: 512,
|
|
45277
|
+
maxNodes: 5e6
|
|
45278
|
+
};
|
|
45279
|
+
MARKUP_RE = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/g;
|
|
45007
45280
|
buildXml = (node) => new xmldom.XMLSerializer().serializeToString(node);
|
|
45008
45281
|
isElement = (node) => node.nodeType === 1;
|
|
45009
45282
|
elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
@@ -45115,7 +45388,9 @@ var init_content_types = __esm({
|
|
|
45115
45388
|
|
|
45116
45389
|
// opc/package.ts
|
|
45117
45390
|
function attr2(tag, name) {
|
|
45118
|
-
|
|
45391
|
+
const escaped2 = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
45392
|
+
const match = new RegExp(`(?<=[\\s<])${escaped2}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(tag);
|
|
45393
|
+
return match ? match[1] ?? match[2] : void 0;
|
|
45119
45394
|
}
|
|
45120
45395
|
async function ensureContentTypeOverride(zip, partName, contentType) {
|
|
45121
45396
|
const xml = await zip.file(CONTENT_TYPES_PATH)?.async("string") ?? EMPTY_TYPES;
|
|
@@ -45211,7 +45486,7 @@ var init_embedded_packages = __esm({
|
|
|
45211
45486
|
|
|
45212
45487
|
// opc/properties/types.ts
|
|
45213
45488
|
var CUSTOM_PROPERTIES_FMTID, PROPERTY_CONTENT_TYPES;
|
|
45214
|
-
var
|
|
45489
|
+
var init_types4 = __esm({
|
|
45215
45490
|
"opc/properties/types.ts"() {
|
|
45216
45491
|
CUSTOM_PROPERTIES_FMTID = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}";
|
|
45217
45492
|
PROPERTY_CONTENT_TYPES = {
|
|
@@ -45683,7 +45958,7 @@ var escape, isVt, INT32;
|
|
|
45683
45958
|
var init_custom = __esm({
|
|
45684
45959
|
"opc/properties/custom.ts"() {
|
|
45685
45960
|
init_xml2();
|
|
45686
|
-
|
|
45961
|
+
init_types4();
|
|
45687
45962
|
escape = (text2, attribute7 = false) => {
|
|
45688
45963
|
const out = text2.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
45689
45964
|
return attribute7 ? out.replace(/"/g, """) : out;
|
|
@@ -45725,7 +46000,7 @@ var init_title_groups = __esm({
|
|
|
45725
46000
|
// opc/properties/index.ts
|
|
45726
46001
|
var init_properties = __esm({
|
|
45727
46002
|
"opc/properties/index.ts"() {
|
|
45728
|
-
|
|
46003
|
+
init_types4();
|
|
45729
46004
|
init_core();
|
|
45730
46005
|
init_app();
|
|
45731
46006
|
init_custom();
|
|
@@ -45875,8 +46150,11 @@ async function verifySignatureDigests(signature, getPartContent) {
|
|
|
45875
46150
|
if (typeof globalThis.crypto?.subtle === "undefined") {
|
|
45876
46151
|
return "unverified";
|
|
45877
46152
|
}
|
|
46153
|
+
let checked = 0;
|
|
46154
|
+
let skipped = false;
|
|
45878
46155
|
for (const ref of signature.references) {
|
|
45879
46156
|
if (!ref.digestValue || !ref.uri) {
|
|
46157
|
+
skipped = true;
|
|
45880
46158
|
continue;
|
|
45881
46159
|
}
|
|
45882
46160
|
const algo = ref.digestMethod?.toLowerCase() || "";
|
|
@@ -45888,23 +46166,24 @@ async function verifySignatureDigests(signature, getPartContent) {
|
|
|
45888
46166
|
} else if (algo.includes("sha1") || algo.includes("sha-1")) {
|
|
45889
46167
|
hashAlgo = "SHA-1";
|
|
45890
46168
|
} else {
|
|
46169
|
+
skipped = true;
|
|
45891
46170
|
continue;
|
|
45892
46171
|
}
|
|
45893
46172
|
const content2 = await getPartContent(ref.uri);
|
|
45894
46173
|
if (!content2) {
|
|
45895
|
-
|
|
46174
|
+
return "invalid";
|
|
45896
46175
|
}
|
|
45897
46176
|
try {
|
|
45898
46177
|
const digest = await crypto.subtle.digest(hashAlgo, content2);
|
|
45899
|
-
|
|
45900
|
-
if (digestBase64 !== ref.digestValue) {
|
|
46178
|
+
if (arrayBufferToBase64(digest) !== ref.digestValue) {
|
|
45901
46179
|
return "invalid";
|
|
45902
46180
|
}
|
|
46181
|
+
checked++;
|
|
45903
46182
|
} catch {
|
|
45904
46183
|
return "unverified";
|
|
45905
46184
|
}
|
|
45906
46185
|
}
|
|
45907
|
-
return
|
|
46186
|
+
return checked > 0 && !skipped ? "digestsMatch" : "unverified";
|
|
45908
46187
|
}
|
|
45909
46188
|
function arrayBufferToBase64(buffer) {
|
|
45910
46189
|
const bytes = new Uint8Array(buffer);
|
|
@@ -45977,32 +46256,61 @@ function extractTagAttribute(xml, tagName, attributeName) {
|
|
|
45977
46256
|
const match = xml.match(pattern);
|
|
45978
46257
|
return match?.groups?.["attributeValue"]?.trim();
|
|
45979
46258
|
}
|
|
46259
|
+
function matchName(xml, lowerXml, from, lname) {
|
|
46260
|
+
let pos2 = from;
|
|
46261
|
+
if (!lowerXml.startsWith(lname, pos2)) {
|
|
46262
|
+
let end = pos2;
|
|
46263
|
+
while (isNameChar2(xml[end])) end++;
|
|
46264
|
+
if (end === pos2 || xml[end] !== ":") return -1;
|
|
46265
|
+
pos2 = end + 1;
|
|
46266
|
+
if (!lowerXml.startsWith(lname, pos2)) return -1;
|
|
46267
|
+
}
|
|
46268
|
+
return pos2 + lname.length;
|
|
46269
|
+
}
|
|
46270
|
+
function findTagText(xml, lowerXml, lname, from) {
|
|
46271
|
+
let lt = xml.indexOf("<", from);
|
|
46272
|
+
while (lt !== -1) {
|
|
46273
|
+
const afterName = matchName(xml, lowerXml, lt + 1, lname);
|
|
46274
|
+
if (afterName !== -1 && !isWordChar(xml[afterName])) {
|
|
46275
|
+
const gt = xml.indexOf(">", afterName);
|
|
46276
|
+
if (gt === -1) return null;
|
|
46277
|
+
let close = xml.indexOf("</", gt + 1);
|
|
46278
|
+
while (close !== -1) {
|
|
46279
|
+
const closeEnd = matchName(xml, lowerXml, close + 2, lname);
|
|
46280
|
+
if (closeEnd !== -1 && xml[closeEnd] === ">") {
|
|
46281
|
+
return { text: xml.slice(gt + 1, close), end: closeEnd + 1 };
|
|
46282
|
+
}
|
|
46283
|
+
close = xml.indexOf("</", close + 2);
|
|
46284
|
+
}
|
|
46285
|
+
return null;
|
|
46286
|
+
}
|
|
46287
|
+
lt = xml.indexOf("<", lt + 1);
|
|
46288
|
+
}
|
|
46289
|
+
return null;
|
|
46290
|
+
}
|
|
45980
46291
|
function extractFirstTagText(xml, localName29) {
|
|
45981
|
-
const
|
|
45982
|
-
|
|
45983
|
-
"i"
|
|
45984
|
-
);
|
|
45985
|
-
const match = xml.match(pattern);
|
|
45986
|
-
return match?.[2]?.replace(/\s+/g, "").trim() || void 0;
|
|
46292
|
+
const found = findTagText(xml, xml.toLowerCase(), localName29.toLowerCase(), 0);
|
|
46293
|
+
return found?.text.replace(/\s+/g, "").trim() || void 0;
|
|
45987
46294
|
}
|
|
45988
46295
|
function extractAllTagText(xml, localName29) {
|
|
45989
46296
|
const result = [];
|
|
45990
|
-
const
|
|
45991
|
-
|
|
45992
|
-
|
|
45993
|
-
)
|
|
45994
|
-
|
|
45995
|
-
while (match) {
|
|
45996
|
-
const value = match[2]?.replace(/\s+/g, "").trim();
|
|
46297
|
+
const lowerXml = xml.toLowerCase();
|
|
46298
|
+
const lname = localName29.toLowerCase();
|
|
46299
|
+
let found = findTagText(xml, lowerXml, lname, 0);
|
|
46300
|
+
while (found) {
|
|
46301
|
+
const value = found.text.replace(/\s+/g, "").trim();
|
|
45997
46302
|
if (value) {
|
|
45998
46303
|
result.push(value);
|
|
45999
46304
|
}
|
|
46000
|
-
|
|
46305
|
+
found = findTagText(xml, lowerXml, lname, found.end);
|
|
46001
46306
|
}
|
|
46002
46307
|
return result;
|
|
46003
46308
|
}
|
|
46309
|
+
var isNameChar2, isWordChar;
|
|
46004
46310
|
var init_xml_utils2 = __esm({
|
|
46005
46311
|
"opc/signature/xml-utils.ts"() {
|
|
46312
|
+
isNameChar2 = (c) => c !== void 0 && /[\w.-]/.test(c);
|
|
46313
|
+
isWordChar = (c) => c !== void 0 && /\w/.test(c);
|
|
46006
46314
|
}
|
|
46007
46315
|
});
|
|
46008
46316
|
|
|
@@ -46127,6 +46435,7 @@ var init_opc = __esm({
|
|
|
46127
46435
|
init_embedded_packages();
|
|
46128
46436
|
init_properties();
|
|
46129
46437
|
init_signature();
|
|
46438
|
+
init_zip_limits();
|
|
46130
46439
|
}
|
|
46131
46440
|
});
|
|
46132
46441
|
|
|
@@ -46840,7 +47149,7 @@ var init_rect_path_gradient = __esm({
|
|
|
46840
47149
|
// diagram/index.ts
|
|
46841
47150
|
var init_diagram = __esm({
|
|
46842
47151
|
"diagram/index.ts"() {
|
|
46843
|
-
|
|
47152
|
+
init_types3();
|
|
46844
47153
|
init_engine2();
|
|
46845
47154
|
init_layout();
|
|
46846
47155
|
init_hierarchy();
|
|
@@ -48749,6 +49058,18 @@ var init_ooxml_crypto_primitives = __esm({
|
|
|
48749
49058
|
}
|
|
48750
49059
|
});
|
|
48751
49060
|
|
|
49061
|
+
// digest/timing-safe.ts
|
|
49062
|
+
function timingSafeEqual(a, b) {
|
|
49063
|
+
if (a.length !== b.length) return false;
|
|
49064
|
+
let difference = 0;
|
|
49065
|
+
for (let i2 = 0; i2 < a.length; i2++) difference |= a[i2] ^ b[i2];
|
|
49066
|
+
return difference === 0;
|
|
49067
|
+
}
|
|
49068
|
+
var init_timing_safe = __esm({
|
|
49069
|
+
"digest/timing-safe.ts"() {
|
|
49070
|
+
}
|
|
49071
|
+
});
|
|
49072
|
+
|
|
48752
49073
|
// crypto/aes-ecb.ts
|
|
48753
49074
|
async function aesEcbDecrypt(key2, data) {
|
|
48754
49075
|
const plain = await aesCbcDecryptRaw(key2, new Uint8Array(BLOCK), data);
|
|
@@ -50623,9 +50944,40 @@ var init_digest2 = __esm({
|
|
|
50623
50944
|
}
|
|
50624
50945
|
});
|
|
50625
50946
|
|
|
50947
|
+
// digest/password-hash.ts
|
|
50948
|
+
function isValidSpinCount(spinCount, maxSpinCount = DEFAULT_MAX_SPIN_COUNT) {
|
|
50949
|
+
const limit = Math.min(maxSpinCount, MAX_SPIN_COUNT);
|
|
50950
|
+
return spinCount === void 0 || Number.isInteger(spinCount) && spinCount >= 0 && spinCount <= limit;
|
|
50951
|
+
}
|
|
50952
|
+
function spinPasswordHash(password, salt, spinCount, digest) {
|
|
50953
|
+
const input = new Uint8Array(salt.length + password.length * 2);
|
|
50954
|
+
input.set(salt);
|
|
50955
|
+
for (let i2 = 0; i2 < password.length; i2++) {
|
|
50956
|
+
const code = password.charCodeAt(i2);
|
|
50957
|
+
input[salt.length + i2 * 2] = code & 255;
|
|
50958
|
+
input[salt.length + i2 * 2 + 1] = code >> 8;
|
|
50959
|
+
}
|
|
50960
|
+
let value = digest(input);
|
|
50961
|
+
const buffer = new Uint8Array(value.length + 4);
|
|
50962
|
+
const view = new DataView(buffer.buffer);
|
|
50963
|
+
for (let i2 = 0; i2 < spinCount; i2++) {
|
|
50964
|
+
buffer.set(value);
|
|
50965
|
+
view.setUint32(value.length, i2, true);
|
|
50966
|
+
value = digest(buffer);
|
|
50967
|
+
}
|
|
50968
|
+
return value;
|
|
50969
|
+
}
|
|
50970
|
+
var MAX_SPIN_COUNT, DEFAULT_MAX_SPIN_COUNT;
|
|
50971
|
+
var init_password_hash = __esm({
|
|
50972
|
+
"digest/password-hash.ts"() {
|
|
50973
|
+
MAX_SPIN_COUNT = 1e7;
|
|
50974
|
+
DEFAULT_MAX_SPIN_COUNT = 1e6;
|
|
50975
|
+
}
|
|
50976
|
+
});
|
|
50977
|
+
|
|
50626
50978
|
// crypto/key-derivation.ts
|
|
50627
|
-
async function spinPassword(password, salt, spinCount, hashAlgorithm) {
|
|
50628
|
-
if (!
|
|
50979
|
+
async function spinPassword(password, salt, spinCount, hashAlgorithm, limits = {}) {
|
|
50980
|
+
if (!isValidSpinCount(spinCount, limits.maxSpinCount)) {
|
|
50629
50981
|
throw new Error(`Unsupported encryption spin count: ${spinCount}.`);
|
|
50630
50982
|
}
|
|
50631
50983
|
const passwordBytes = encodePasswordUtf16LE(password);
|
|
@@ -50638,6 +50990,9 @@ async function spinPassword(password, salt, spinCount, hashAlgorithm) {
|
|
|
50638
50990
|
view.setUint32(0, i2, true);
|
|
50639
50991
|
buffer.set(h3, 4);
|
|
50640
50992
|
h3 = digest(buffer);
|
|
50993
|
+
if (i2 % SPIN_CHUNK === SPIN_CHUNK - 1 && i2 + 1 < spinCount) {
|
|
50994
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
50995
|
+
}
|
|
50641
50996
|
}
|
|
50642
50997
|
return h3;
|
|
50643
50998
|
}
|
|
@@ -50656,8 +51011,8 @@ async function extendKey(h2, hashAlgorithm, keyLength) {
|
|
|
50656
51011
|
const x3 = concatArrays(await pad2(54), await pad2(92));
|
|
50657
51012
|
return x3.subarray(0, keyLength);
|
|
50658
51013
|
}
|
|
50659
|
-
function computeAgileKeyBase(password, salt, spinCount, hashAlgorithm) {
|
|
50660
|
-
return spinPassword(password, salt, spinCount, hashAlgorithm);
|
|
51014
|
+
function computeAgileKeyBase(password, salt, spinCount, hashAlgorithm, limits = {}) {
|
|
51015
|
+
return spinPassword(password, salt, spinCount, hashAlgorithm, limits);
|
|
50661
51016
|
}
|
|
50662
51017
|
async function deriveAgileKeyFromBase(base, hashAlgorithm, blockKey, keyBits, hashSize) {
|
|
50663
51018
|
const h2 = await hash(hashAlgorithm, concatArrays(base, blockKey));
|
|
@@ -50683,11 +51038,12 @@ async function generateIV(hashAlgorithm, salt, blockKey, blockSize) {
|
|
|
50683
51038
|
padded.set(h2);
|
|
50684
51039
|
return padded;
|
|
50685
51040
|
}
|
|
50686
|
-
var BLOCK_KEYS,
|
|
51041
|
+
var BLOCK_KEYS, SPIN_CHUNK;
|
|
50687
51042
|
var init_key_derivation = __esm({
|
|
50688
51043
|
"crypto/key-derivation.ts"() {
|
|
50689
51044
|
init_ooxml_crypto_primitives();
|
|
50690
51045
|
init_digest2();
|
|
51046
|
+
init_password_hash();
|
|
50691
51047
|
BLOCK_KEYS = {
|
|
50692
51048
|
verifierHashInput: new Uint8Array([254, 167, 210, 118, 59, 75, 158, 121]),
|
|
50693
51049
|
verifierHashValue: new Uint8Array([215, 170, 15, 109, 48, 97, 52, 78]),
|
|
@@ -50695,14 +51051,92 @@ var init_key_derivation = __esm({
|
|
|
50695
51051
|
dataIntegrityHmacKey: new Uint8Array([95, 178, 173, 1, 12, 185, 225, 246]),
|
|
50696
51052
|
dataIntegrityHmacValue: new Uint8Array([160, 103, 127, 2, 178, 44, 132, 51])
|
|
50697
51053
|
};
|
|
50698
|
-
|
|
51054
|
+
SPIN_CHUNK = 1e5;
|
|
51055
|
+
}
|
|
51056
|
+
});
|
|
51057
|
+
|
|
51058
|
+
// crypto/validate.ts
|
|
51059
|
+
function agileDigestLength(hashAlgorithm) {
|
|
51060
|
+
const name = normalizeDigestAlgorithmName(hashAlgorithm);
|
|
51061
|
+
return name === void 0 ? void 0 : AGILE_DIGEST_LENGTH[name];
|
|
51062
|
+
}
|
|
51063
|
+
function assertBlock(block, what) {
|
|
51064
|
+
if (block.cipherAlgorithm !== "AES") {
|
|
51065
|
+
throw new Error(`Unsupported ${what} cipherAlgorithm: ${block.cipherAlgorithm}.`);
|
|
51066
|
+
}
|
|
51067
|
+
if (block.cipherChaining !== "ChainingModeCBC") {
|
|
51068
|
+
throw new Error(`Unsupported ${what} cipherChaining: ${block.cipherChaining}.`);
|
|
51069
|
+
}
|
|
51070
|
+
const digestLength = agileDigestLength(block.hashAlgorithm);
|
|
51071
|
+
if (digestLength === void 0) {
|
|
51072
|
+
throw new Error(`Unsupported ${what} hashAlgorithm: ${block.hashAlgorithm}.`);
|
|
51073
|
+
}
|
|
51074
|
+
if (block.hashSize !== digestLength) {
|
|
51075
|
+
throw new Error(
|
|
51076
|
+
`Invalid ${what} hashSize ${block.hashSize}: ${block.hashAlgorithm} produces ${digestLength} bytes.`
|
|
51077
|
+
);
|
|
51078
|
+
}
|
|
51079
|
+
if (!KEY_BITS.has(block.keyBits)) throw new Error(`Invalid ${what} keyBits: ${block.keyBits}.`);
|
|
51080
|
+
if (block.blockSize !== 16) throw new Error(`Invalid ${what} blockSize: ${block.blockSize}.`);
|
|
51081
|
+
if (!Number.isInteger(block.saltSize) || block.saltSize <= 0 || block.saltSize > 64) {
|
|
51082
|
+
throw new Error(`Invalid ${what} saltSize: ${block.saltSize}.`);
|
|
51083
|
+
}
|
|
51084
|
+
if (block.saltValue.length !== block.saltSize) {
|
|
51085
|
+
throw new Error(`The ${what} saltValue does not match its saltSize.`);
|
|
51086
|
+
}
|
|
51087
|
+
}
|
|
51088
|
+
function assertValidAgileEncryptionInfo(info) {
|
|
51089
|
+
assertBlock(info.keyData, "keyData");
|
|
51090
|
+
const pke = info.passwordKeyEncryptor;
|
|
51091
|
+
assertBlock(pke, "password key encryptor");
|
|
51092
|
+
if (!Number.isInteger(pke.spinCount) || pke.spinCount < 0) {
|
|
51093
|
+
throw new Error(`Invalid spinCount: ${pke.spinCount}.`);
|
|
51094
|
+
}
|
|
51095
|
+
if (pke.saltSize > pke.hashSize) {
|
|
51096
|
+
throw new Error(`Invalid password key encryptor saltSize: ${pke.saltSize}.`);
|
|
51097
|
+
}
|
|
51098
|
+
}
|
|
51099
|
+
function assertValidStandardEncryptionInfo(info) {
|
|
51100
|
+
if (!KEY_BITS.has(info.header.keySize)) {
|
|
51101
|
+
throw new Error(`Invalid Standard encryption keySize: ${info.header.keySize}.`);
|
|
51102
|
+
}
|
|
51103
|
+
if (info.verifier.salt.length !== 16 || info.verifier.saltSize !== 16) {
|
|
51104
|
+
throw new Error(`Invalid Standard encryption saltSize: ${info.verifier.saltSize}.`);
|
|
51105
|
+
}
|
|
51106
|
+
if (info.verifier.verifierHashSize !== 20) {
|
|
51107
|
+
throw new Error(
|
|
51108
|
+
`Invalid Standard encryption verifierHashSize: ${info.verifier.verifierHashSize}.`
|
|
51109
|
+
);
|
|
51110
|
+
}
|
|
51111
|
+
if (info.verifier.encryptedVerifier.length !== 16 || info.verifier.encryptedVerifierHash.length < 20) {
|
|
51112
|
+
throw new Error("The Standard encryption verifier is truncated.");
|
|
51113
|
+
}
|
|
51114
|
+
}
|
|
51115
|
+
var AGILE_DIGEST_LENGTH, KEY_BITS;
|
|
51116
|
+
var init_validate = __esm({
|
|
51117
|
+
"crypto/validate.ts"() {
|
|
51118
|
+
init_algorithm_names();
|
|
51119
|
+
AGILE_DIGEST_LENGTH = {
|
|
51120
|
+
"SHA-1": 20,
|
|
51121
|
+
"SHA-256": 32,
|
|
51122
|
+
"SHA-384": 48,
|
|
51123
|
+
"SHA-512": 64
|
|
51124
|
+
};
|
|
51125
|
+
KEY_BITS = /* @__PURE__ */ new Set([128, 192, 256]);
|
|
50699
51126
|
}
|
|
50700
51127
|
});
|
|
50701
51128
|
|
|
50702
51129
|
// crypto/decrypt.ts
|
|
50703
|
-
async function verifyAgilePassword(info, password) {
|
|
51130
|
+
async function verifyAgilePassword(info, password, limits = {}) {
|
|
51131
|
+
assertValidAgileEncryptionInfo(info);
|
|
50704
51132
|
const pke = info.passwordKeyEncryptor;
|
|
50705
|
-
const base = await computeAgileKeyBase(
|
|
51133
|
+
const base = await computeAgileKeyBase(
|
|
51134
|
+
password,
|
|
51135
|
+
pke.saltValue,
|
|
51136
|
+
pke.spinCount,
|
|
51137
|
+
pke.hashAlgorithm,
|
|
51138
|
+
limits
|
|
51139
|
+
);
|
|
50706
51140
|
const blockKey = (block) => deriveAgileKeyFromBase(base, pke.hashAlgorithm, block, pke.keyBits, pke.hashSize);
|
|
50707
51141
|
const verifierHashInput = await aesCbcDecryptRaw(
|
|
50708
51142
|
await blockKey(BLOCK_KEYS.verifierHashInput),
|
|
@@ -50715,10 +51149,8 @@ async function verifyAgilePassword(info, password) {
|
|
|
50715
51149
|
pke.encryptedVerifierHashValue
|
|
50716
51150
|
);
|
|
50717
51151
|
const computedHash = await hash(pke.hashAlgorithm, verifierHashInput.subarray(0, pke.saltSize));
|
|
50718
|
-
if (computedHash.length
|
|
50719
|
-
|
|
50720
|
-
for (let i2 = 0; i2 < pke.hashSize; i2++) difference |= verifierHashValue[i2] ^ computedHash[i2];
|
|
50721
|
-
if (difference !== 0) return null;
|
|
51152
|
+
if (computedHash.length !== pke.hashSize || verifierHashValue.length < pke.hashSize) return null;
|
|
51153
|
+
if (!timingSafeEqual(verifierHashValue.subarray(0, pke.hashSize), computedHash)) return null;
|
|
50722
51154
|
const decryptedKey = await aesCbcDecryptRaw(
|
|
50723
51155
|
await blockKey(BLOCK_KEYS.encryptedKeyValue),
|
|
50724
51156
|
pke.saltValue,
|
|
@@ -50727,6 +51159,7 @@ async function verifyAgilePassword(info, password) {
|
|
|
50727
51159
|
return decryptedKey.subarray(0, info.keyData.keyBits / 8);
|
|
50728
51160
|
}
|
|
50729
51161
|
async function verifyStandardPassword(info, password) {
|
|
51162
|
+
assertValidStandardEncryptionInfo(info);
|
|
50730
51163
|
const key2 = await deriveStandardKey(
|
|
50731
51164
|
password,
|
|
50732
51165
|
info.verifier.salt,
|
|
@@ -50736,20 +51169,16 @@ async function verifyStandardPassword(info, password) {
|
|
|
50736
51169
|
const decryptedVerifier = await aesEcbDecrypt(key2, info.verifier.encryptedVerifier);
|
|
50737
51170
|
const decryptedHash = await aesEcbDecrypt(key2, info.verifier.encryptedVerifierHash);
|
|
50738
51171
|
const computedHash = await hash("SHA-1", decryptedVerifier);
|
|
50739
|
-
const
|
|
50740
|
-
let match = true;
|
|
50741
|
-
for (let i2 = 0; i2 < Math.min(hashSize, 20); i2++) {
|
|
50742
|
-
if (computedHash[i2] !== decryptedHash[i2]) {
|
|
50743
|
-
match = false;
|
|
50744
|
-
break;
|
|
50745
|
-
}
|
|
50746
|
-
}
|
|
51172
|
+
const match = timingSafeEqual(decryptedHash.subarray(0, 20), computedHash);
|
|
50747
51173
|
return match ? key2 : null;
|
|
50748
51174
|
}
|
|
50749
|
-
async function verifyAgileDataIntegrity(info, key2, encryptedPackage) {
|
|
51175
|
+
async function verifyAgileDataIntegrity(info, key2, encryptedPackage, options = {}) {
|
|
50750
51176
|
const keyData = info.keyData;
|
|
50751
51177
|
if (!info.dataIntegrity) {
|
|
50752
|
-
return;
|
|
51178
|
+
if (options.allowMissingIntegrity) return;
|
|
51179
|
+
throw new exports.DataIntegrityError(
|
|
51180
|
+
"The encrypted package has no data integrity record, so it cannot be checked for tampering."
|
|
51181
|
+
);
|
|
50753
51182
|
}
|
|
50754
51183
|
const hmacKeyIV = await generateIV(
|
|
50755
51184
|
keyData.hashAlgorithm,
|
|
@@ -50776,28 +51205,26 @@ async function verifyAgileDataIntegrity(info, key2, encryptedPackage) {
|
|
|
50776
51205
|
);
|
|
50777
51206
|
const expectedHmac = decryptedHmacValue.subarray(0, keyData.hashSize);
|
|
50778
51207
|
const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedPackage);
|
|
50779
|
-
|
|
50780
|
-
if (computedHmac.length < keyData.hashSize) {
|
|
50781
|
-
match = false;
|
|
50782
|
-
} else {
|
|
50783
|
-
for (let i2 = 0; i2 < keyData.hashSize; i2++) {
|
|
50784
|
-
if (computedHmac[i2] !== expectedHmac[i2]) {
|
|
50785
|
-
match = false;
|
|
50786
|
-
break;
|
|
50787
|
-
}
|
|
50788
|
-
}
|
|
50789
|
-
}
|
|
51208
|
+
const match = timingSafeEqual(computedHmac, expectedHmac);
|
|
50790
51209
|
if (!match) {
|
|
50791
51210
|
throw new exports.DataIntegrityError(
|
|
50792
51211
|
"Data integrity check failed. The encrypted file may be corrupted or tampered with."
|
|
50793
51212
|
);
|
|
50794
51213
|
}
|
|
50795
51214
|
}
|
|
51215
|
+
function readOriginalSize(encryptedPackage, wide) {
|
|
51216
|
+
if (encryptedPackage.length < 8) throw new Error("The EncryptedPackage stream is truncated.");
|
|
51217
|
+
const view = new DataView(encryptedPackage.buffer, encryptedPackage.byteOffset, 8);
|
|
51218
|
+
const high = view.getUint32(4, true);
|
|
51219
|
+
return view.getUint32(0, true) + (wide ? high * 4294967296 : 0);
|
|
51220
|
+
}
|
|
50796
51221
|
async function decryptAgilePackage(encryptedPackage, key2, info) {
|
|
50797
51222
|
const keyData = info.keyData;
|
|
50798
|
-
const
|
|
50799
|
-
const originalSize = sizeView.getUint32(0, true) + sizeView.getUint32(4, true) * 4294967296;
|
|
51223
|
+
const originalSize = readOriginalSize(encryptedPackage, true);
|
|
50800
51224
|
const encryptedData = encryptedPackage.subarray(8);
|
|
51225
|
+
if (originalSize > encryptedData.length) {
|
|
51226
|
+
throw new Error("The declared package size exceeds the encrypted data.");
|
|
51227
|
+
}
|
|
50801
51228
|
const segmentSize = 4096;
|
|
50802
51229
|
const result = new Uint8Array(originalSize);
|
|
50803
51230
|
let resultOffset = 0;
|
|
@@ -50821,18 +51248,22 @@ async function decryptAgilePackage(encryptedPackage, key2, info) {
|
|
|
50821
51248
|
return result.buffer;
|
|
50822
51249
|
}
|
|
50823
51250
|
async function decryptStandardPackage(encryptedPackage, key2) {
|
|
50824
|
-
const
|
|
50825
|
-
const originalSize = sizeView.getUint32(0, true);
|
|
51251
|
+
const originalSize = readOriginalSize(encryptedPackage, false);
|
|
50826
51252
|
const encryptedData = encryptedPackage.subarray(8);
|
|
51253
|
+
if (originalSize > encryptedData.length) {
|
|
51254
|
+
throw new Error("The declared package size exceeds the encrypted data.");
|
|
51255
|
+
}
|
|
50827
51256
|
const decrypted = await aesEcbDecrypt(key2, encryptedData);
|
|
50828
51257
|
return decrypted.slice(0, originalSize).buffer;
|
|
50829
51258
|
}
|
|
50830
51259
|
var init_decrypt = __esm({
|
|
50831
51260
|
"crypto/decrypt.ts"() {
|
|
50832
51261
|
init_ooxml_crypto_primitives();
|
|
51262
|
+
init_timing_safe();
|
|
50833
51263
|
init_aes_ecb();
|
|
50834
51264
|
init_errors();
|
|
50835
51265
|
init_key_derivation();
|
|
51266
|
+
init_validate();
|
|
50836
51267
|
}
|
|
50837
51268
|
});
|
|
50838
51269
|
|
|
@@ -51101,59 +51532,95 @@ function parseStandardEncryptionInfo(data) {
|
|
|
51101
51532
|
}
|
|
51102
51533
|
};
|
|
51103
51534
|
}
|
|
51104
|
-
function
|
|
51105
|
-
const
|
|
51106
|
-
|
|
51107
|
-
|
|
51108
|
-
|
|
51535
|
+
function childrenNamed2(parent, localName29) {
|
|
51536
|
+
const found = [];
|
|
51537
|
+
for (let node = parent.firstChild; node; node = node.nextSibling) {
|
|
51538
|
+
if (node.nodeType === 1 && node.localName === localName29) {
|
|
51539
|
+
found.push(node);
|
|
51540
|
+
}
|
|
51541
|
+
}
|
|
51542
|
+
return found;
|
|
51543
|
+
}
|
|
51544
|
+
function singleChild(parent, localName29, mustExist) {
|
|
51545
|
+
const matches = childrenNamed2(parent, localName29);
|
|
51546
|
+
if (matches.length > 1) throw new Error(`The EncryptionInfo has several ${localName29} elements.`);
|
|
51547
|
+
if (matches.length === 0 && mustExist) {
|
|
51548
|
+
throw new Error(`The EncryptionInfo has no ${localName29} element.`);
|
|
51549
|
+
}
|
|
51550
|
+
return matches[0];
|
|
51109
51551
|
}
|
|
51110
|
-
function
|
|
51111
|
-
const
|
|
51112
|
-
|
|
51113
|
-
|
|
51114
|
-
|
|
51115
|
-
|
|
51116
|
-
const
|
|
51552
|
+
function required(element, attr6) {
|
|
51553
|
+
const value = element.getAttribute(attr6);
|
|
51554
|
+
if (!value) throw new Error(`The EncryptionInfo ${element.localName} has no ${attr6}.`);
|
|
51555
|
+
return value;
|
|
51556
|
+
}
|
|
51557
|
+
function requiredInt(element, attr6) {
|
|
51558
|
+
const value = required(element, attr6);
|
|
51559
|
+
if (!/^\d{1,10}$/.test(value)) {
|
|
51560
|
+
throw new Error(`The EncryptionInfo ${element.localName} ${attr6} is not a number: ${value}.`);
|
|
51561
|
+
}
|
|
51562
|
+
return Number(value);
|
|
51563
|
+
}
|
|
51564
|
+
function parseKeyBlock(element) {
|
|
51117
51565
|
return {
|
|
51566
|
+
saltSize: requiredInt(element, "saltSize"),
|
|
51567
|
+
blockSize: requiredInt(element, "blockSize"),
|
|
51568
|
+
keyBits: requiredInt(element, "keyBits"),
|
|
51569
|
+
hashSize: requiredInt(element, "hashSize"),
|
|
51570
|
+
cipherAlgorithm: required(element, "cipherAlgorithm"),
|
|
51571
|
+
cipherChaining: required(element, "cipherChaining"),
|
|
51572
|
+
hashAlgorithm: required(element, "hashAlgorithm"),
|
|
51573
|
+
saltValue: base64Decode(required(element, "saltValue"))
|
|
51574
|
+
};
|
|
51575
|
+
}
|
|
51576
|
+
function parseAgileEncryptionInfo(data) {
|
|
51577
|
+
const root = parseXml(new TextDecoder("utf-8").decode(data.subarray(8)), {
|
|
51578
|
+
label: "EncryptionInfo"
|
|
51579
|
+
}).documentElement;
|
|
51580
|
+
if (root.localName !== "encryption") {
|
|
51581
|
+
throw new Error("The EncryptionInfo root element is not <encryption>.");
|
|
51582
|
+
}
|
|
51583
|
+
const keyData = parseKeyBlock(singleChild(root, "keyData", true));
|
|
51584
|
+
const integrity = singleChild(root, "dataIntegrity", false);
|
|
51585
|
+
const encryptors = childrenNamed2(singleChild(root, "keyEncryptors", true), "keyEncryptor");
|
|
51586
|
+
const passwordEncryptors = encryptors.filter(
|
|
51587
|
+
(encryptor) => encryptor.getAttribute("uri") === PASSWORD_KEY_ENCRYPTOR_URI
|
|
51588
|
+
);
|
|
51589
|
+
if (passwordEncryptors.length !== 1) {
|
|
51590
|
+
throw new Error(
|
|
51591
|
+
passwordEncryptors.length === 0 ? "The EncryptionInfo has no password key encryptor." : "The EncryptionInfo has several password key encryptors."
|
|
51592
|
+
);
|
|
51593
|
+
}
|
|
51594
|
+
const pke = singleChild(passwordEncryptors[0], "encryptedKey", true);
|
|
51595
|
+
const info = {
|
|
51118
51596
|
version: { major: 4, minor: 4 },
|
|
51119
51597
|
isAgile: true,
|
|
51120
|
-
keyData
|
|
51121
|
-
|
|
51122
|
-
blockSize: int(keyData("blockSize")),
|
|
51123
|
-
keyBits: int(keyData("keyBits")),
|
|
51124
|
-
hashSize: int(keyData("hashSize")),
|
|
51125
|
-
cipherAlgorithm: keyData("cipherAlgorithm"),
|
|
51126
|
-
cipherChaining: keyData("cipherChaining"),
|
|
51127
|
-
hashAlgorithm: keyData("hashAlgorithm"),
|
|
51128
|
-
saltValue: base64Decode(keyData("saltValue"))
|
|
51129
|
-
},
|
|
51130
|
-
...encryptedHmacKey ? {
|
|
51598
|
+
keyData,
|
|
51599
|
+
...integrity ? {
|
|
51131
51600
|
dataIntegrity: {
|
|
51132
|
-
encryptedHmacKey: base64Decode(encryptedHmacKey),
|
|
51133
|
-
encryptedHmacValue: base64Decode(integrity
|
|
51601
|
+
encryptedHmacKey: base64Decode(required(integrity, "encryptedHmacKey")),
|
|
51602
|
+
encryptedHmacValue: base64Decode(required(integrity, "encryptedHmacValue"))
|
|
51134
51603
|
}
|
|
51135
51604
|
} : {},
|
|
51136
51605
|
passwordKeyEncryptor: {
|
|
51137
|
-
|
|
51138
|
-
|
|
51139
|
-
|
|
51140
|
-
|
|
51141
|
-
|
|
51142
|
-
|
|
51143
|
-
|
|
51144
|
-
|
|
51145
|
-
|
|
51146
|
-
|
|
51147
|
-
|
|
51148
|
-
encryptedKeyValue: base64Decode(pke("encryptedKeyValue"))
|
|
51149
|
-
}
|
|
51150
|
-
};
|
|
51151
|
-
}
|
|
51152
|
-
var RC4_ALG_ID;
|
|
51606
|
+
...parseKeyBlock(pke),
|
|
51607
|
+
spinCount: requiredInt(pke, "spinCount"),
|
|
51608
|
+
encryptedVerifierHashInput: base64Decode(required(pke, "encryptedVerifierHashInput")),
|
|
51609
|
+
encryptedVerifierHashValue: base64Decode(required(pke, "encryptedVerifierHashValue")),
|
|
51610
|
+
encryptedKeyValue: base64Decode(required(pke, "encryptedKeyValue"))
|
|
51611
|
+
}
|
|
51612
|
+
};
|
|
51613
|
+
assertValidAgileEncryptionInfo(info);
|
|
51614
|
+
return info;
|
|
51615
|
+
}
|
|
51616
|
+
var RC4_ALG_ID, PASSWORD_KEY_ENCRYPTOR_URI;
|
|
51153
51617
|
var init_encryption_info = __esm({
|
|
51154
51618
|
"crypto/encryption-info.ts"() {
|
|
51155
51619
|
init_ooxml_crypto_primitives();
|
|
51620
|
+
init_xml();
|
|
51621
|
+
init_validate();
|
|
51156
51622
|
RC4_ALG_ID = 26625;
|
|
51623
|
+
PASSWORD_KEY_ENCRYPTOR_URI = "http://schemas.microsoft.com/office/2006/keyEncryptor/password";
|
|
51157
51624
|
}
|
|
51158
51625
|
});
|
|
51159
51626
|
|
|
@@ -51169,7 +51636,7 @@ function streams(bytes) {
|
|
|
51169
51636
|
}
|
|
51170
51637
|
throw new Error("EncryptedPackage stream not found. The file may be corrupted.");
|
|
51171
51638
|
}
|
|
51172
|
-
async function decryptOoxmlPackage(input, password) {
|
|
51639
|
+
async function decryptOoxmlPackage(input, password, options = {}) {
|
|
51173
51640
|
const { info: infoStream, data } = streams(toBytes(input));
|
|
51174
51641
|
const info = parseEncryptionInfo(infoStream);
|
|
51175
51642
|
if (isStandard(info)) {
|
|
@@ -51177,21 +51644,21 @@ async function decryptOoxmlPackage(input, password) {
|
|
|
51177
51644
|
if (!key3) throw new exports.IncorrectPasswordError();
|
|
51178
51645
|
return new Uint8Array(await decryptStandardPackage(data, key3));
|
|
51179
51646
|
}
|
|
51180
|
-
const key2 = await verifyAgilePassword(info, password);
|
|
51647
|
+
const key2 = await verifyAgilePassword(info, password, options);
|
|
51181
51648
|
if (!key2) throw new exports.IncorrectPasswordError();
|
|
51182
|
-
await verifyAgileDataIntegrity(info, key2, data);
|
|
51649
|
+
await verifyAgileDataIntegrity(info, key2, data, options);
|
|
51183
51650
|
return new Uint8Array(await decryptAgilePackage(data, key2, info));
|
|
51184
51651
|
}
|
|
51185
51652
|
function encryptOoxmlPackage(input, password, options = {}) {
|
|
51186
51653
|
const bytes = toBytes(input);
|
|
51187
51654
|
return options.encryptionScheme === "standard" ? encryptStandard(bytes, password, options) : encryptAgile(bytes, password, options);
|
|
51188
51655
|
}
|
|
51189
|
-
async function verifyOoxmlPackagePassword(input, password) {
|
|
51656
|
+
async function verifyOoxmlPackagePassword(input, password, options = {}) {
|
|
51190
51657
|
try {
|
|
51191
51658
|
const opened = openEncryptedPackage(input);
|
|
51192
51659
|
if (!opened) return false;
|
|
51193
51660
|
const info = parseEncryptionInfo(opened.encryptionInfo);
|
|
51194
|
-
const key2 = isStandard(info) ? await verifyStandardPassword(info, password) : await verifyAgilePassword(info, password);
|
|
51661
|
+
const key2 = isStandard(info) ? await verifyStandardPassword(info, password) : await verifyAgilePassword(info, password, options);
|
|
51195
51662
|
return key2 !== null;
|
|
51196
51663
|
} catch {
|
|
51197
51664
|
return false;
|
|
@@ -51243,30 +51710,6 @@ var init_ole2_parser = __esm({
|
|
|
51243
51710
|
}
|
|
51244
51711
|
});
|
|
51245
51712
|
|
|
51246
|
-
// digest/password-hash.ts
|
|
51247
|
-
function spinPasswordHash(password, salt, spinCount, digest) {
|
|
51248
|
-
const input = new Uint8Array(salt.length + password.length * 2);
|
|
51249
|
-
input.set(salt);
|
|
51250
|
-
for (let i2 = 0; i2 < password.length; i2++) {
|
|
51251
|
-
const code = password.charCodeAt(i2);
|
|
51252
|
-
input[salt.length + i2 * 2] = code & 255;
|
|
51253
|
-
input[salt.length + i2 * 2 + 1] = code >> 8;
|
|
51254
|
-
}
|
|
51255
|
-
let value = digest(input);
|
|
51256
|
-
const buffer = new Uint8Array(value.length + 4);
|
|
51257
|
-
const view = new DataView(buffer.buffer);
|
|
51258
|
-
for (let i2 = 0; i2 < spinCount; i2++) {
|
|
51259
|
-
buffer.set(value);
|
|
51260
|
-
view.setUint32(value.length, i2, true);
|
|
51261
|
-
value = digest(buffer);
|
|
51262
|
-
}
|
|
51263
|
-
return value;
|
|
51264
|
-
}
|
|
51265
|
-
var init_password_hash = __esm({
|
|
51266
|
-
"digest/password-hash.ts"() {
|
|
51267
|
-
}
|
|
51268
|
-
});
|
|
51269
|
-
|
|
51270
51713
|
// pptx/core/utils/modify-verifier-codec.ts
|
|
51271
51714
|
function base64Decode2(str) {
|
|
51272
51715
|
const normalized = str.replace(/\s+/g, "");
|
|
@@ -51293,33 +51736,24 @@ function base64Encode2(bytes) {
|
|
|
51293
51736
|
}
|
|
51294
51737
|
function randomSalt() {
|
|
51295
51738
|
const salt = new Uint8Array(16);
|
|
51296
|
-
if (typeof globalThis.crypto !== "
|
|
51297
|
-
|
|
51298
|
-
|
|
51299
|
-
|
|
51300
|
-
salt[i2] = Math.floor(Math.random() * 256);
|
|
51301
|
-
}
|
|
51739
|
+
if (typeof globalThis.crypto?.getRandomValues !== "function") {
|
|
51740
|
+
throw new Error(
|
|
51741
|
+
"A secure random source (crypto.getRandomValues) is required to create a salt."
|
|
51742
|
+
);
|
|
51302
51743
|
}
|
|
51744
|
+
globalThis.crypto.getRandomValues(salt);
|
|
51303
51745
|
return salt;
|
|
51304
51746
|
}
|
|
51305
51747
|
async function iteratedHash(algorithm, salt, password, spinCount) {
|
|
51748
|
+
if (!isValidSpinCount(spinCount)) {
|
|
51749
|
+
throw new Error(`Unsupported verifier spin count: ${spinCount}.`);
|
|
51750
|
+
}
|
|
51306
51751
|
const digest = digestFunction(algorithm);
|
|
51307
51752
|
if (!digest) {
|
|
51308
51753
|
throw new Error(`Unsupported digest algorithm: ${algorithm}`);
|
|
51309
51754
|
}
|
|
51310
51755
|
return spinPasswordHash(password, salt, spinCount, digest);
|
|
51311
51756
|
}
|
|
51312
|
-
function bytesEqual2(a, b) {
|
|
51313
|
-
if (a.length !== b.length) {
|
|
51314
|
-
return false;
|
|
51315
|
-
}
|
|
51316
|
-
for (let i2 = 0; i2 < a.length; i2++) {
|
|
51317
|
-
if (a[i2] !== b[i2]) {
|
|
51318
|
-
return false;
|
|
51319
|
-
}
|
|
51320
|
-
}
|
|
51321
|
-
return true;
|
|
51322
|
-
}
|
|
51323
51757
|
var init_modify_verifier_codec = __esm({
|
|
51324
51758
|
"pptx/core/utils/modify-verifier-codec.ts"() {
|
|
51325
51759
|
init_digest2();
|
|
@@ -51348,8 +51782,9 @@ async function verifyModifyPassword(verifier, password) {
|
|
|
51348
51782
|
const salt = verifier.saltData ? base64Decode2(verifier.saltData) : new Uint8Array(0);
|
|
51349
51783
|
const expectedHash = base64Decode2(verifier.hashData);
|
|
51350
51784
|
const spinCount = verifier.spinValue ?? 1e5;
|
|
51785
|
+
if (!isValidSpinCount(spinCount)) return false;
|
|
51351
51786
|
const h2 = await iteratedHash(algorithm, salt, password, spinCount);
|
|
51352
|
-
return
|
|
51787
|
+
return timingSafeEqual(h2, expectedHash);
|
|
51353
51788
|
}
|
|
51354
51789
|
async function createModifyVerifier(password, options) {
|
|
51355
51790
|
const requestedAlgorithm = options?.algorithmName ?? "SHA-512";
|
|
@@ -51389,6 +51824,8 @@ var CRYPT_ALGORITHM_SID_NAMES;
|
|
|
51389
51824
|
var init_modify_verifier = __esm({
|
|
51390
51825
|
"pptx/core/utils/modify-verifier.ts"() {
|
|
51391
51826
|
init_algorithm_names();
|
|
51827
|
+
init_password_hash();
|
|
51828
|
+
init_timing_safe();
|
|
51392
51829
|
init_modify_verifier_codec();
|
|
51393
51830
|
CRYPT_ALGORITHM_SID_NAMES = {
|
|
51394
51831
|
1: "MD2",
|
|
@@ -51444,6 +51881,40 @@ var init_signature_inspection_status = __esm({
|
|
|
51444
51881
|
}
|
|
51445
51882
|
});
|
|
51446
51883
|
|
|
51884
|
+
// chart/model-analysis.ts
|
|
51885
|
+
var KIND_OF_TYPE, TYPE_OF_KIND, chartTrendlineKind, chartTrendlineType, CHART_ERROR_BAR_DIRECTIONS, CHART_ERROR_BAR_TYPES, CHART_ERROR_VALUE_TYPES;
|
|
51886
|
+
var init_model_analysis = __esm({
|
|
51887
|
+
"chart/model-analysis.ts"() {
|
|
51888
|
+
KIND_OF_TYPE = {
|
|
51889
|
+
linear: "linear",
|
|
51890
|
+
exp: "exponential",
|
|
51891
|
+
log: "logarithmic",
|
|
51892
|
+
poly: "polynomial",
|
|
51893
|
+
power: "power",
|
|
51894
|
+
movingAvg: "movingAvg"
|
|
51895
|
+
};
|
|
51896
|
+
TYPE_OF_KIND = {
|
|
51897
|
+
linear: "linear",
|
|
51898
|
+
exponential: "exp",
|
|
51899
|
+
logarithmic: "log",
|
|
51900
|
+
polynomial: "poly",
|
|
51901
|
+
power: "power",
|
|
51902
|
+
movingAvg: "movingAvg"
|
|
51903
|
+
};
|
|
51904
|
+
chartTrendlineKind = (type) => type !== void 0 && Object.hasOwn(KIND_OF_TYPE, type) ? KIND_OF_TYPE[type] : void 0;
|
|
51905
|
+
chartTrendlineType = (kind) => TYPE_OF_KIND[kind];
|
|
51906
|
+
CHART_ERROR_BAR_DIRECTIONS = ["x", "y"];
|
|
51907
|
+
CHART_ERROR_BAR_TYPES = ["both", "minus", "plus"];
|
|
51908
|
+
CHART_ERROR_VALUE_TYPES = [
|
|
51909
|
+
"cust",
|
|
51910
|
+
"fixedVal",
|
|
51911
|
+
"percentage",
|
|
51912
|
+
"stdDev",
|
|
51913
|
+
"stdErr"
|
|
51914
|
+
];
|
|
51915
|
+
}
|
|
51916
|
+
});
|
|
51917
|
+
|
|
51447
51918
|
// chart/manual-layout.ts
|
|
51448
51919
|
function readChartManualLayoutValues(value) {
|
|
51449
51920
|
const result = {};
|
|
@@ -51700,7 +52171,7 @@ function parseSeriesTrendlines(seriesNode, xmlLookup, colorParser) {
|
|
|
51700
52171
|
return trendlineNodes.map((node) => {
|
|
51701
52172
|
const typeNode = xmlLookup.getChildByLocalName(node, "trendlineType");
|
|
51702
52173
|
const rawType = String(typeNode?.["@_val"] || "").trim();
|
|
51703
|
-
const trendlineType =
|
|
52174
|
+
const trendlineType = chartTrendlineKind(rawType);
|
|
51704
52175
|
if (!trendlineType) {
|
|
51705
52176
|
return void 0;
|
|
51706
52177
|
}
|
|
@@ -51770,13 +52241,13 @@ function parseSeriesErrBars(seriesNode, xmlLookup, extractPointValues, colorPars
|
|
|
51770
52241
|
const direction = rawDir === "x" ? "x" : "y";
|
|
51771
52242
|
const errBarTypeNode = xmlLookup.getChildByLocalName(node, "errBarType");
|
|
51772
52243
|
const rawBarType = String(errBarTypeNode?.["@_val"] || "both").trim();
|
|
51773
|
-
const barType =
|
|
52244
|
+
const barType = isErrBarType(rawBarType) ? rawBarType : "both";
|
|
51774
52245
|
const errValTypeNode = xmlLookup.getChildByLocalName(node, "errValType");
|
|
51775
52246
|
const rawValType = String(errValTypeNode?.["@_val"] || "").trim();
|
|
51776
|
-
|
|
51777
|
-
if (!valType) {
|
|
52247
|
+
if (!isErrValType(rawValType)) {
|
|
51778
52248
|
return void 0;
|
|
51779
52249
|
}
|
|
52250
|
+
const valType = rawValType;
|
|
51780
52251
|
const result = { direction, barType, valType };
|
|
51781
52252
|
const noEndCap = booleanValue2(xmlLookup.getChildByLocalName(node, "noEndCap"));
|
|
51782
52253
|
if (noEndCap !== void 0) {
|
|
@@ -51846,30 +52317,13 @@ function parseLineStyle(container2, elementName, xmlLookup, colorParser) {
|
|
|
51846
52317
|
}
|
|
51847
52318
|
return result;
|
|
51848
52319
|
}
|
|
51849
|
-
var
|
|
52320
|
+
var isErrBarType, isErrValType;
|
|
51850
52321
|
var init_chart_advanced_parser = __esm({
|
|
51851
52322
|
"pptx/core/utils/chart-advanced-parser.ts"() {
|
|
52323
|
+
init_model_analysis();
|
|
51852
52324
|
init_chart_trendline_label();
|
|
51853
|
-
|
|
51854
|
-
|
|
51855
|
-
exp: "exponential",
|
|
51856
|
-
log: "logarithmic",
|
|
51857
|
-
poly: "polynomial",
|
|
51858
|
-
power: "power",
|
|
51859
|
-
movingAvg: "movingAvg"
|
|
51860
|
-
};
|
|
51861
|
-
ERR_BAR_TYPE_MAP = {
|
|
51862
|
-
both: "both",
|
|
51863
|
-
minus: "minus",
|
|
51864
|
-
plus: "plus"
|
|
51865
|
-
};
|
|
51866
|
-
ERR_VAL_TYPE_MAP = {
|
|
51867
|
-
cust: "cust",
|
|
51868
|
-
fixedVal: "fixedVal",
|
|
51869
|
-
percentage: "percentage",
|
|
51870
|
-
stdDev: "stdDev",
|
|
51871
|
-
stdErr: "stdErr"
|
|
51872
|
-
};
|
|
52325
|
+
isErrBarType = (value) => CHART_ERROR_BAR_TYPES.includes(value);
|
|
52326
|
+
isErrValType = (value) => CHART_ERROR_VALUE_TYPES.includes(value);
|
|
51873
52327
|
}
|
|
51874
52328
|
});
|
|
51875
52329
|
|
|
@@ -55494,7 +55948,7 @@ function resolveCellValue(cell, sharedStrings) {
|
|
|
55494
55948
|
}
|
|
55495
55949
|
async function parseEmbeddedXlsx(xlsxData) {
|
|
55496
55950
|
try {
|
|
55497
|
-
const xlsxZip = await
|
|
55951
|
+
const xlsxZip = await openNestedZip(xlsxData);
|
|
55498
55952
|
const xmlParser = new fastXmlParser.XMLParser({
|
|
55499
55953
|
ignoreAttributes: false,
|
|
55500
55954
|
attributeNamePrefix: "@_",
|
|
@@ -55589,6 +56043,7 @@ async function parseEmbeddedXlsx(xlsxData) {
|
|
|
55589
56043
|
}
|
|
55590
56044
|
var init_chart_xlsx_parser = __esm({
|
|
55591
56045
|
"pptx/core/utils/chart-xlsx-parser.ts"() {
|
|
56046
|
+
init_zip_open();
|
|
55592
56047
|
init_xml_whitespace();
|
|
55593
56048
|
}
|
|
55594
56049
|
});
|
|
@@ -56101,34 +56556,34 @@ function isAlternateContentChoiceXmlSupported(requires, branchXml) {
|
|
|
56101
56556
|
if (!areNamespacesSupported(requires)) {
|
|
56102
56557
|
return false;
|
|
56103
56558
|
}
|
|
56104
|
-
const
|
|
56559
|
+
const required2 = new Set(requires.trim().split(/\s+/).filter(Boolean));
|
|
56105
56560
|
const tagPattern = /<(?!\/|\?|!)([A-Za-z_][\w.-]*):([A-Za-z_][\w.-]*)\b/g;
|
|
56106
56561
|
let match;
|
|
56107
56562
|
while ((match = tagPattern.exec(branchXml)) !== null) {
|
|
56108
|
-
if (
|
|
56563
|
+
if (required2.has(match[1]) && !isExtensionElementSupported(match[1], match[2])) {
|
|
56109
56564
|
return false;
|
|
56110
56565
|
}
|
|
56111
56566
|
}
|
|
56112
56567
|
return true;
|
|
56113
56568
|
}
|
|
56114
|
-
function hasOnlySupportedExtensionElements(node,
|
|
56569
|
+
function hasOnlySupportedExtensionElements(node, required2) {
|
|
56115
56570
|
if (!node || typeof node !== "object") {
|
|
56116
56571
|
return true;
|
|
56117
56572
|
}
|
|
56118
56573
|
if (Array.isArray(node)) {
|
|
56119
|
-
return node.every((item) => hasOnlySupportedExtensionElements(item,
|
|
56574
|
+
return node.every((item) => hasOnlySupportedExtensionElements(item, required2));
|
|
56120
56575
|
}
|
|
56121
56576
|
for (const [key2, value] of Object.entries(node)) {
|
|
56122
56577
|
if (!key2.startsWith("@_")) {
|
|
56123
56578
|
const separator = key2.indexOf(":");
|
|
56124
56579
|
if (separator > 0) {
|
|
56125
56580
|
const prefix = key2.slice(0, separator);
|
|
56126
|
-
if (
|
|
56581
|
+
if (required2.has(prefix) && !isExtensionElementSupported(prefix, key2.slice(separator + 1))) {
|
|
56127
56582
|
return false;
|
|
56128
56583
|
}
|
|
56129
56584
|
}
|
|
56130
56585
|
}
|
|
56131
|
-
if (!hasOnlySupportedExtensionElements(value,
|
|
56586
|
+
if (!hasOnlySupportedExtensionElements(value, required2)) {
|
|
56132
56587
|
return false;
|
|
56133
56588
|
}
|
|
56134
56589
|
}
|
|
@@ -59599,7 +60054,7 @@ function normalisePath(p) {
|
|
|
59599
60054
|
}
|
|
59600
60055
|
async function tryOpenZip(buffer) {
|
|
59601
60056
|
try {
|
|
59602
|
-
const zip = await
|
|
60057
|
+
const zip = await openPptxZip(buffer);
|
|
59603
60058
|
return { zip };
|
|
59604
60059
|
} catch {
|
|
59605
60060
|
return { error: "Buffer is not a valid ZIP file" };
|
|
@@ -59658,6 +60113,7 @@ function relsOwnerDir(relsPath2) {
|
|
|
59658
60113
|
}
|
|
59659
60114
|
var init_pptx_validator_helpers = __esm({
|
|
59660
60115
|
"pptx/core/utils/pptx-validator-helpers.ts"() {
|
|
60116
|
+
init_zip_open();
|
|
59661
60117
|
init_xml_entities();
|
|
59662
60118
|
}
|
|
59663
60119
|
});
|
|
@@ -60561,13 +61017,13 @@ function add6(issues, path2, code, message) {
|
|
|
60561
61017
|
}
|
|
60562
61018
|
function validateRequiredChildren(xml, contract, path2, issues) {
|
|
60563
61019
|
const children16 = directChildren(xml);
|
|
60564
|
-
for (const
|
|
60565
|
-
if (!children16.includes(
|
|
61020
|
+
for (const required2 of contract.required ?? []) {
|
|
61021
|
+
if (!children16.includes(required2)) {
|
|
60566
61022
|
add6(
|
|
60567
61023
|
issues,
|
|
60568
61024
|
path2,
|
|
60569
61025
|
"MISSING_REQUIRED_PART_ELEMENT",
|
|
60570
|
-
`<${contract.root}> must contain <${
|
|
61026
|
+
`<${contract.root}> must contain <${required2}> as a direct child`
|
|
60571
61027
|
);
|
|
60572
61028
|
}
|
|
60573
61029
|
}
|
|
@@ -60578,13 +61034,13 @@ function validateThemeElements(xml, path2, issues) {
|
|
|
60578
61034
|
return;
|
|
60579
61035
|
}
|
|
60580
61036
|
const children16 = directChildren(elements3);
|
|
60581
|
-
for (const
|
|
60582
|
-
if (!children16.includes(
|
|
61037
|
+
for (const required2 of ["clrScheme", "fontScheme", "fmtScheme"]) {
|
|
61038
|
+
if (!children16.includes(required2)) {
|
|
60583
61039
|
add6(
|
|
60584
61040
|
issues,
|
|
60585
61041
|
path2,
|
|
60586
61042
|
"MISSING_REQUIRED_PART_ELEMENT",
|
|
60587
|
-
`<themeElements> must contain <${
|
|
61043
|
+
`<themeElements> must contain <${required2}>`
|
|
60588
61044
|
);
|
|
60589
61045
|
}
|
|
60590
61046
|
}
|
|
@@ -60597,8 +61053,8 @@ function elementStartAttributes(xml, localName29) {
|
|
|
60597
61053
|
(match) => match[1]
|
|
60598
61054
|
);
|
|
60599
61055
|
}
|
|
60600
|
-
function validateRequiredAttributes(attributes2,
|
|
60601
|
-
for (const name of
|
|
61056
|
+
function validateRequiredAttributes(attributes2, required2, element, path2, issues) {
|
|
61057
|
+
for (const name of required2) {
|
|
60602
61058
|
if (attributeValue(attributes2, name) === void 0) {
|
|
60603
61059
|
add6(
|
|
60604
61060
|
issues,
|
|
@@ -60834,13 +61290,13 @@ var init_pptx_validator_types = __esm({
|
|
|
60834
61290
|
|
|
60835
61291
|
// pptx/core/utils/pptx-validator-checks.ts
|
|
60836
61292
|
async function validateZipStructure(zip, issues) {
|
|
60837
|
-
for (const
|
|
60838
|
-
if (!zip.file(
|
|
61293
|
+
for (const required2 of REQUIRED_PATHS) {
|
|
61294
|
+
if (!zip.file(required2)) {
|
|
60839
61295
|
issues.push({
|
|
60840
61296
|
severity: "error",
|
|
60841
61297
|
code: "MISSING_REQUIRED_FILE",
|
|
60842
|
-
message: `Required file "${
|
|
60843
|
-
path:
|
|
61298
|
+
message: `Required file "${required2}" is missing from the package`,
|
|
61299
|
+
path: required2
|
|
60844
61300
|
});
|
|
60845
61301
|
}
|
|
60846
61302
|
}
|
|
@@ -80869,7 +81325,7 @@ var init_app_properties_counts = __esm({
|
|
|
80869
81325
|
});
|
|
80870
81326
|
|
|
80871
81327
|
// pptx/core/utils/app-properties-word-count.ts
|
|
80872
|
-
function
|
|
81328
|
+
function isWordChar2(char) {
|
|
80873
81329
|
return char !== void 0 && WORD_CHAR.test(char) && !IDEOGRAPH_CHAR.test(char);
|
|
80874
81330
|
}
|
|
80875
81331
|
function isDigit(char) {
|
|
@@ -80880,7 +81336,7 @@ function isJoiner(chars, index) {
|
|
|
80880
81336
|
const before = chars[index - 1];
|
|
80881
81337
|
const after = chars[index + 1];
|
|
80882
81338
|
if (WORD_JOINERS.has(char)) {
|
|
80883
|
-
return
|
|
81339
|
+
return isWordChar2(before) && isWordChar2(after);
|
|
80884
81340
|
}
|
|
80885
81341
|
return NUMBER_JOINERS.has(char) && isDigit(before) && isDigit(after);
|
|
80886
81342
|
}
|
|
@@ -106878,28 +107334,6 @@ var init_layout_switch_placeholder_prompts = __esm({
|
|
|
106878
107334
|
}
|
|
106879
107335
|
});
|
|
106880
107336
|
|
|
106881
|
-
// pptx/core/core/types.ts
|
|
106882
|
-
exports.DEFAULT_MAX_UNCOMPRESSED_BYTES = void 0; exports.MAX_ZIP_ENTRY_COUNT = void 0; exports.ZipBombError = void 0;
|
|
106883
|
-
var init_types4 = __esm({
|
|
106884
|
-
"pptx/core/core/types.ts"() {
|
|
106885
|
-
exports.DEFAULT_MAX_UNCOMPRESSED_BYTES = 500 * 1024 * 1024;
|
|
106886
|
-
exports.MAX_ZIP_ENTRY_COUNT = 65536;
|
|
106887
|
-
exports.ZipBombError = class extends Error {
|
|
106888
|
-
code = "ZIP_BOMB";
|
|
106889
|
-
uncompressedBytes;
|
|
106890
|
-
limit;
|
|
106891
|
-
entryCount;
|
|
106892
|
-
constructor(message, details) {
|
|
106893
|
-
super(message);
|
|
106894
|
-
this.name = "ZipBombError";
|
|
106895
|
-
this.uncompressedBytes = details.uncompressedBytes;
|
|
106896
|
-
this.limit = details.limit;
|
|
106897
|
-
this.entryCount = details.entryCount;
|
|
106898
|
-
}
|
|
106899
|
-
};
|
|
106900
|
-
}
|
|
106901
|
-
});
|
|
106902
|
-
|
|
106903
107337
|
// pptx/core/core/runtime/bullet-picture-image-enrichment.ts
|
|
106904
107338
|
async function enrichBulletPictureImages(elements3, slidePath, resolver, depth = 0) {
|
|
106905
107339
|
if (depth > MAX_GROUP_DEPTH) {
|
|
@@ -107483,7 +107917,7 @@ async function writeChartWorkbookUpdates(xlsxBytes, writes, options = {}) {
|
|
|
107483
107917
|
}
|
|
107484
107918
|
let xlsxZip;
|
|
107485
107919
|
try {
|
|
107486
|
-
xlsxZip = await
|
|
107920
|
+
xlsxZip = await openNestedZip(xlsxBytes);
|
|
107487
107921
|
} catch {
|
|
107488
107922
|
if (options.atomic) {
|
|
107489
107923
|
throw new Error("Chart label replacement requires a readable embedded workbook.");
|
|
@@ -107551,6 +107985,7 @@ async function writeChartWorkbookUpdates(xlsxBytes, writes, options = {}) {
|
|
|
107551
107985
|
}
|
|
107552
107986
|
var init_chart_xlsx_writer = __esm({
|
|
107553
107987
|
"pptx/core/utils/chart-xlsx-writer.ts"() {
|
|
107988
|
+
init_zip_open();
|
|
107554
107989
|
init_chart_xlsx_cellref();
|
|
107555
107990
|
init_chart_xlsx_write_validation();
|
|
107556
107991
|
init_chart_xlsx_sheet_cells();
|
|
@@ -107953,9 +108388,33 @@ var init_axis_nice = __esm({
|
|
|
107953
108388
|
}
|
|
107954
108389
|
});
|
|
107955
108390
|
|
|
107956
|
-
// chart/
|
|
107957
|
-
var
|
|
107958
|
-
"chart/
|
|
108391
|
+
// chart/number-format.ts
|
|
108392
|
+
var init_number_format = __esm({
|
|
108393
|
+
"chart/number-format.ts"() {
|
|
108394
|
+
}
|
|
108395
|
+
});
|
|
108396
|
+
|
|
108397
|
+
// chart/auto-title.ts
|
|
108398
|
+
var init_auto_title = __esm({
|
|
108399
|
+
"chart/auto-title.ts"() {
|
|
108400
|
+
}
|
|
108401
|
+
});
|
|
108402
|
+
|
|
108403
|
+
// chart/axis-format.ts
|
|
108404
|
+
var init_axis_format = __esm({
|
|
108405
|
+
"chart/axis-format.ts"() {
|
|
108406
|
+
}
|
|
108407
|
+
});
|
|
108408
|
+
|
|
108409
|
+
// chart/bubble-radius.ts
|
|
108410
|
+
var init_bubble_radius = __esm({
|
|
108411
|
+
"chart/bubble-radius.ts"() {
|
|
108412
|
+
}
|
|
108413
|
+
});
|
|
108414
|
+
|
|
108415
|
+
// chart/stock-candles.ts
|
|
108416
|
+
var init_stock_candles = __esm({
|
|
108417
|
+
"chart/stock-candles.ts"() {
|
|
107959
108418
|
}
|
|
107960
108419
|
});
|
|
107961
108420
|
|
|
@@ -107965,12 +108424,65 @@ var init_treemap_squarify = __esm({
|
|
|
107965
108424
|
}
|
|
107966
108425
|
});
|
|
107967
108426
|
|
|
108427
|
+
// chart/hierarchy.ts
|
|
108428
|
+
var init_hierarchy2 = __esm({
|
|
108429
|
+
"chart/hierarchy.ts"() {
|
|
108430
|
+
}
|
|
108431
|
+
});
|
|
108432
|
+
|
|
108433
|
+
// chart/sunburst-arcs.ts
|
|
108434
|
+
var init_sunburst_arcs = __esm({
|
|
108435
|
+
"chart/sunburst-arcs.ts"() {
|
|
108436
|
+
}
|
|
108437
|
+
});
|
|
108438
|
+
|
|
108439
|
+
// chart/style-palette.ts
|
|
108440
|
+
var OFFICE_ACCENTS, DEFAULT_EXTRAS;
|
|
108441
|
+
var init_style_palette = __esm({
|
|
108442
|
+
"chart/style-palette.ts"() {
|
|
108443
|
+
OFFICE_ACCENTS = [
|
|
108444
|
+
"#4472C4",
|
|
108445
|
+
"#ED7D31",
|
|
108446
|
+
"#A5A5A5",
|
|
108447
|
+
"#FFC000",
|
|
108448
|
+
"#5B9BD5",
|
|
108449
|
+
"#70AD47"
|
|
108450
|
+
];
|
|
108451
|
+
DEFAULT_EXTRAS = ["#FF0000", "#00B0F0"];
|
|
108452
|
+
[...OFFICE_ACCENTS, ...DEFAULT_EXTRAS];
|
|
108453
|
+
}
|
|
108454
|
+
});
|
|
108455
|
+
|
|
108456
|
+
// chart/histogram-binning.ts
|
|
108457
|
+
var init_histogram_binning = __esm({
|
|
108458
|
+
"chart/histogram-binning.ts"() {
|
|
108459
|
+
}
|
|
108460
|
+
});
|
|
108461
|
+
|
|
108462
|
+
// chart/waterfall.ts
|
|
108463
|
+
var init_waterfall = __esm({
|
|
108464
|
+
"chart/waterfall.ts"() {
|
|
108465
|
+
}
|
|
108466
|
+
});
|
|
108467
|
+
|
|
107968
108468
|
// chart/trendline-equation.ts
|
|
107969
108469
|
var init_trendline_equation = __esm({
|
|
107970
108470
|
"chart/trendline-equation.ts"() {
|
|
107971
108471
|
}
|
|
107972
108472
|
});
|
|
107973
108473
|
|
|
108474
|
+
// chart/trendline-fit.ts
|
|
108475
|
+
var init_trendline_fit = __esm({
|
|
108476
|
+
"chart/trendline-fit.ts"() {
|
|
108477
|
+
}
|
|
108478
|
+
});
|
|
108479
|
+
|
|
108480
|
+
// chart/error-bar-amount.ts
|
|
108481
|
+
var init_error_bar_amount = __esm({
|
|
108482
|
+
"chart/error-bar-amount.ts"() {
|
|
108483
|
+
}
|
|
108484
|
+
});
|
|
108485
|
+
|
|
107974
108486
|
// chart/radar-geometry.ts
|
|
107975
108487
|
var init_radar_geometry = __esm({
|
|
107976
108488
|
"chart/radar-geometry.ts"() {
|
|
@@ -108295,6 +108807,14 @@ function cNumber(context, parent, local) {
|
|
|
108295
108807
|
malformed(context, element, raw);
|
|
108296
108808
|
return void 0;
|
|
108297
108809
|
}
|
|
108810
|
+
function cEnum(context, parent, local, allowed) {
|
|
108811
|
+
const element = cChild(parent, local);
|
|
108812
|
+
const raw = attribute5(element, "val");
|
|
108813
|
+
if (!element || raw === void 0) return void 0;
|
|
108814
|
+
if (allowed.includes(raw)) return raw;
|
|
108815
|
+
malformed(context, element, raw);
|
|
108816
|
+
return void 0;
|
|
108817
|
+
}
|
|
108298
108818
|
function reportUnmodelled(context, element, handled) {
|
|
108299
108819
|
for (const child30 of elements(element)) {
|
|
108300
108820
|
if (handled.has(child30.localName)) continue;
|
|
@@ -108625,6 +109145,114 @@ var init_parse_chrome = __esm({
|
|
|
108625
109145
|
}
|
|
108626
109146
|
});
|
|
108627
109147
|
|
|
109148
|
+
// chart/parse-analysis.ts
|
|
109149
|
+
function parseTrendlineLabel2(context, element) {
|
|
109150
|
+
if (!element) return void 0;
|
|
109151
|
+
reportUnmodelled(context, element, LABEL2);
|
|
109152
|
+
return assignDefined(
|
|
109153
|
+
{},
|
|
109154
|
+
{
|
|
109155
|
+
layout: manualLayout(element),
|
|
109156
|
+
tx: parseChartText(context, cChild(element, "tx"), false),
|
|
109157
|
+
numberFormat: numberFormat(element),
|
|
109158
|
+
spPr: shapeProperties(element),
|
|
109159
|
+
txPr: textProperties(element),
|
|
109160
|
+
extLst: extensionList(element)
|
|
109161
|
+
}
|
|
109162
|
+
);
|
|
109163
|
+
}
|
|
109164
|
+
function parseTrendline(context, element) {
|
|
109165
|
+
reportUnmodelled(context, element, TRENDLINE);
|
|
109166
|
+
const name = cChild(element, "name");
|
|
109167
|
+
return assignDefined(
|
|
109168
|
+
{},
|
|
109169
|
+
{
|
|
109170
|
+
name: name ? name.textContent ?? "" : void 0,
|
|
109171
|
+
spPr: shapeProperties(element),
|
|
109172
|
+
trendlineType: cEnum(context, element, "trendlineType", TRENDLINE_TYPES),
|
|
109173
|
+
order: cNumber(context, element, "order"),
|
|
109174
|
+
period: cNumber(context, element, "period"),
|
|
109175
|
+
forward: cNumber(context, element, "forward"),
|
|
109176
|
+
backward: cNumber(context, element, "backward"),
|
|
109177
|
+
intercept: cNumber(context, element, "intercept"),
|
|
109178
|
+
displayRSquared: cBool(context, element, "dispRSqr"),
|
|
109179
|
+
displayEquation: cBool(context, element, "dispEq"),
|
|
109180
|
+
label: parseTrendlineLabel2(context, cChild(element, "trendlineLbl")),
|
|
109181
|
+
extLst: extensionList(element)
|
|
109182
|
+
}
|
|
109183
|
+
);
|
|
109184
|
+
}
|
|
109185
|
+
function parseErrorBars(context, element) {
|
|
109186
|
+
reportUnmodelled(context, element, ERROR_BARS);
|
|
109187
|
+
return assignDefined(
|
|
109188
|
+
{},
|
|
109189
|
+
{
|
|
109190
|
+
direction: cEnum(context, element, "errDir", CHART_ERROR_BAR_DIRECTIONS),
|
|
109191
|
+
barType: cEnum(context, element, "errBarType", CHART_ERROR_BAR_TYPES),
|
|
109192
|
+
valueType: cEnum(context, element, "errValType", CHART_ERROR_VALUE_TYPES),
|
|
109193
|
+
noEndCap: cBool(context, element, "noEndCap"),
|
|
109194
|
+
plus: parseDataSource(cChild(element, "plus")),
|
|
109195
|
+
minus: parseDataSource(cChild(element, "minus")),
|
|
109196
|
+
value: cNumber(context, element, "val"),
|
|
109197
|
+
spPr: shapeProperties(element),
|
|
109198
|
+
extLst: extensionList(element)
|
|
109199
|
+
}
|
|
109200
|
+
);
|
|
109201
|
+
}
|
|
109202
|
+
function parseSeriesAnalysis(context, series) {
|
|
109203
|
+
const trendlines = children2(series, "trendline", NS.c).map(
|
|
109204
|
+
(node) => parseTrendline(context, node)
|
|
109205
|
+
);
|
|
109206
|
+
const errorBars = children2(series, "errBars", NS.c).map((node) => parseErrorBars(context, node));
|
|
109207
|
+
return {
|
|
109208
|
+
...trendlines.length ? { trendlines } : {},
|
|
109209
|
+
...errorBars.length ? { errorBars } : {}
|
|
109210
|
+
};
|
|
109211
|
+
}
|
|
109212
|
+
var TRENDLINE_TYPES, LABEL2, TRENDLINE, ERROR_BARS;
|
|
109213
|
+
var init_parse_analysis = __esm({
|
|
109214
|
+
"chart/parse-analysis.ts"() {
|
|
109215
|
+
init_xml2();
|
|
109216
|
+
init_model_analysis();
|
|
109217
|
+
init_parse_text();
|
|
109218
|
+
init_parse_util();
|
|
109219
|
+
TRENDLINE_TYPES = [
|
|
109220
|
+
"exp",
|
|
109221
|
+
"linear",
|
|
109222
|
+
"log",
|
|
109223
|
+
"movingAvg",
|
|
109224
|
+
"poly",
|
|
109225
|
+
"power"
|
|
109226
|
+
];
|
|
109227
|
+
LABEL2 = /* @__PURE__ */ new Set(["layout", "tx", "numFmt", "spPr", "txPr", "extLst"]);
|
|
109228
|
+
TRENDLINE = /* @__PURE__ */ new Set([
|
|
109229
|
+
"name",
|
|
109230
|
+
"spPr",
|
|
109231
|
+
"trendlineType",
|
|
109232
|
+
"order",
|
|
109233
|
+
"period",
|
|
109234
|
+
"forward",
|
|
109235
|
+
"backward",
|
|
109236
|
+
"intercept",
|
|
109237
|
+
"dispRSqr",
|
|
109238
|
+
"dispEq",
|
|
109239
|
+
"trendlineLbl",
|
|
109240
|
+
"extLst"
|
|
109241
|
+
]);
|
|
109242
|
+
ERROR_BARS = /* @__PURE__ */ new Set([
|
|
109243
|
+
"errDir",
|
|
109244
|
+
"errBarType",
|
|
109245
|
+
"errValType",
|
|
109246
|
+
"noEndCap",
|
|
109247
|
+
"plus",
|
|
109248
|
+
"minus",
|
|
109249
|
+
"val",
|
|
109250
|
+
"spPr",
|
|
109251
|
+
"extLst"
|
|
109252
|
+
]);
|
|
109253
|
+
}
|
|
109254
|
+
});
|
|
109255
|
+
|
|
108628
109256
|
// chart/parse-series.ts
|
|
108629
109257
|
function parseMarker2(context, element) {
|
|
108630
109258
|
if (!element) return void 0;
|
|
@@ -108658,7 +109286,10 @@ function parseDataPoint(context, element) {
|
|
|
108658
109286
|
function parseSeries(context, element) {
|
|
108659
109287
|
reportUnmodelled(context, element, SERIES);
|
|
108660
109288
|
return assignDefined(
|
|
108661
|
-
{
|
|
109289
|
+
{
|
|
109290
|
+
dataPoints: children2(element, "dPt", NS.c).map((point2) => parseDataPoint(context, point2)),
|
|
109291
|
+
...parseSeriesAnalysis(context, element)
|
|
109292
|
+
},
|
|
108662
109293
|
{
|
|
108663
109294
|
index: cNumber(context, element, "idx"),
|
|
108664
109295
|
order: cNumber(context, element, "order"),
|
|
@@ -108684,6 +109315,7 @@ var MARKER, POINT, SERIES;
|
|
|
108684
109315
|
var init_parse_series = __esm({
|
|
108685
109316
|
"chart/parse-series.ts"() {
|
|
108686
109317
|
init_xml2();
|
|
109318
|
+
init_parse_analysis();
|
|
108687
109319
|
init_parse_text();
|
|
108688
109320
|
init_parse_util();
|
|
108689
109321
|
MARKER = /* @__PURE__ */ new Set(["symbol", "size", "spPr", "extLst"]);
|
|
@@ -108704,6 +109336,8 @@ var init_parse_series = __esm({
|
|
|
108704
109336
|
"invertIfNegative",
|
|
108705
109337
|
"dPt",
|
|
108706
109338
|
"dLbls",
|
|
109339
|
+
"trendline",
|
|
109340
|
+
"errBars",
|
|
108707
109341
|
"cat",
|
|
108708
109342
|
"val",
|
|
108709
109343
|
"xVal",
|
|
@@ -109122,6 +109756,12 @@ var init_summary_from_space = __esm({
|
|
|
109122
109756
|
}
|
|
109123
109757
|
});
|
|
109124
109758
|
|
|
109759
|
+
// chart/render/summary-from-chartex.ts
|
|
109760
|
+
var init_summary_from_chartex = __esm({
|
|
109761
|
+
"chart/render/summary-from-chartex.ts"() {
|
|
109762
|
+
}
|
|
109763
|
+
});
|
|
109764
|
+
|
|
109125
109765
|
// text/wrap-styled-runs.ts
|
|
109126
109766
|
function wrapStyledRuns(runs, maxWidth, measure3, options = {}) {
|
|
109127
109767
|
const groups = [];
|
|
@@ -109202,6 +109842,7 @@ var init_render = __esm({
|
|
|
109202
109842
|
"chart/render/index.ts"() {
|
|
109203
109843
|
init_summary();
|
|
109204
109844
|
init_summary_from_space();
|
|
109845
|
+
init_summary_from_chartex();
|
|
109205
109846
|
init_render_space();
|
|
109206
109847
|
}
|
|
109207
109848
|
});
|
|
@@ -109214,9 +109855,20 @@ var init_chart2 = __esm({
|
|
|
109214
109855
|
init_blank_display();
|
|
109215
109856
|
init_stacked_series();
|
|
109216
109857
|
init_axis_nice();
|
|
109858
|
+
init_number_format();
|
|
109859
|
+
init_auto_title();
|
|
109860
|
+
init_axis_format();
|
|
109861
|
+
init_bubble_radius();
|
|
109862
|
+
init_stock_candles();
|
|
109863
|
+
init_hierarchy2();
|
|
109864
|
+
init_sunburst_arcs();
|
|
109865
|
+
init_style_palette();
|
|
109217
109866
|
init_histogram_binning();
|
|
109867
|
+
init_waterfall();
|
|
109218
109868
|
init_treemap_squarify();
|
|
109219
109869
|
init_trendline_equation();
|
|
109870
|
+
init_trendline_fit();
|
|
109871
|
+
init_error_bar_amount();
|
|
109220
109872
|
init_radar_geometry();
|
|
109221
109873
|
init_pie_best_fit();
|
|
109222
109874
|
init_pie_label_collision();
|
|
@@ -109235,6 +109887,7 @@ var init_chart2 = __esm({
|
|
|
109235
109887
|
init_manual_layout();
|
|
109236
109888
|
init_write_layout_formatting();
|
|
109237
109889
|
init_model();
|
|
109890
|
+
init_model_analysis();
|
|
109238
109891
|
init_data_cache();
|
|
109239
109892
|
init_parse_space();
|
|
109240
109893
|
init_parse_chrome();
|
|
@@ -109528,6 +110181,95 @@ var init_chart_from_neutral_axes = __esm({
|
|
|
109528
110181
|
}
|
|
109529
110182
|
});
|
|
109530
110183
|
|
|
110184
|
+
// pptx/core/utils/chart-from-neutral-analysis.ts
|
|
110185
|
+
function treeLine(node, reader2) {
|
|
110186
|
+
const ln = reader2.xml.getChildByLocalName(reader2.xml.getChildByLocalName(node, "spPr"), "ln");
|
|
110187
|
+
const out = {};
|
|
110188
|
+
const color2 = reader2.parseColor(reader2.xml.getChildByLocalName(ln, "solidFill"));
|
|
110189
|
+
if (color2) out.color = color2;
|
|
110190
|
+
const widthEmu = parseInt(String(ln?.["@_w"]), 10);
|
|
110191
|
+
if (Number.isFinite(widthEmu)) out.width = widthEmu / 12700;
|
|
110192
|
+
const dash = reader2.xml.getChildByLocalName(ln, "prstDash")?.["@_val"];
|
|
110193
|
+
if (dash) out.dash = String(dash);
|
|
110194
|
+
return out;
|
|
110195
|
+
}
|
|
110196
|
+
function labelFromNeutral(label, node, reader2) {
|
|
110197
|
+
if (!label) return void 0;
|
|
110198
|
+
const result = {};
|
|
110199
|
+
const layout = parseChartManualLayout(
|
|
110200
|
+
reader2.xml.getChildByLocalName(node, "trendlineLbl"),
|
|
110201
|
+
reader2.localName
|
|
110202
|
+
);
|
|
110203
|
+
if (layout) result.layout = layout;
|
|
110204
|
+
if (label.numberFormat) result.numberFormatCode = label.numberFormat.formatCode;
|
|
110205
|
+
if (label.numberFormat?.sourceLinked !== void 0)
|
|
110206
|
+
result.sourceLinked = label.numberFormat.sourceLinked;
|
|
110207
|
+
return result;
|
|
110208
|
+
}
|
|
110209
|
+
function trendlineFromNeutral(trendline, node, reader2) {
|
|
110210
|
+
const trendlineType = chartTrendlineKind(trendline.trendlineType);
|
|
110211
|
+
if (!trendlineType) return void 0;
|
|
110212
|
+
const result = { trendlineType };
|
|
110213
|
+
if (trendline.name !== void 0) result.name = trendline.name;
|
|
110214
|
+
const { order, period } = trendline;
|
|
110215
|
+
if (order !== void 0 && Number.isInteger(order) && order >= 2 && order <= 6)
|
|
110216
|
+
result.order = order;
|
|
110217
|
+
if (period !== void 0 && Number.isInteger(period) && period >= 2) result.period = period;
|
|
110218
|
+
if (trendline.forward !== void 0) result.forward = trendline.forward;
|
|
110219
|
+
if (trendline.backward !== void 0) result.backward = trendline.backward;
|
|
110220
|
+
if (trendline.intercept !== void 0) result.intercept = trendline.intercept;
|
|
110221
|
+
if (trendline.displayRSquared !== void 0) result.displayRSq = trendline.displayRSquared;
|
|
110222
|
+
if (trendline.displayEquation !== void 0) result.displayEq = trendline.displayEquation;
|
|
110223
|
+
const line2 = treeLine(node, reader2);
|
|
110224
|
+
if (line2.color) result.color = line2.color;
|
|
110225
|
+
if (line2.width !== void 0) result.lineWidth = line2.width;
|
|
110226
|
+
if (line2.dash) result.lineDashStyle = line2.dash;
|
|
110227
|
+
const label = labelFromNeutral(trendline.label, node, reader2);
|
|
110228
|
+
if (label) result.label = label;
|
|
110229
|
+
return result;
|
|
110230
|
+
}
|
|
110231
|
+
function trendlinesFromNeutral(trendlines, seriesNode, reader2) {
|
|
110232
|
+
if (!trendlines?.length) return [];
|
|
110233
|
+
const nodes = reader2.xml.getChildrenArrayByLocalName(seriesNode, "trendline");
|
|
110234
|
+
return trendlines.map((trendline, index) => trendlineFromNeutral(trendline, nodes[index], reader2)).filter((trendline) => trendline !== void 0);
|
|
110235
|
+
}
|
|
110236
|
+
function customAmounts(source) {
|
|
110237
|
+
if (source?.kind !== "numRef" && source?.kind !== "numLit") return [];
|
|
110238
|
+
return [...source.cache?.points ?? []].sort((left, right) => (left.index ?? 0) - (right.index ?? 0)).map((point2) => point2.value.trim()).filter((value) => value.length > 0).map((value) => parseFloat(value)).filter((value) => Number.isFinite(value));
|
|
110239
|
+
}
|
|
110240
|
+
function errBarsFromNeutralOne(bars, node, reader2) {
|
|
110241
|
+
if (!bars.valueType) return void 0;
|
|
110242
|
+
const result = {
|
|
110243
|
+
direction: bars.direction === "x" ? "x" : "y",
|
|
110244
|
+
barType: bars.barType ?? "both",
|
|
110245
|
+
valType: bars.valueType
|
|
110246
|
+
};
|
|
110247
|
+
if (bars.noEndCap !== void 0) result.noEndCap = bars.noEndCap;
|
|
110248
|
+
if (bars.value !== void 0) result.val = bars.value;
|
|
110249
|
+
if (bars.valueType === "cust") {
|
|
110250
|
+
const plus2 = customAmounts(bars.plus);
|
|
110251
|
+
if (plus2.length > 0) result.customPlus = plus2;
|
|
110252
|
+
const minus = customAmounts(bars.minus);
|
|
110253
|
+
if (minus.length > 0) result.customMinus = minus;
|
|
110254
|
+
}
|
|
110255
|
+
const line2 = treeLine(node, reader2);
|
|
110256
|
+
if (line2.color) result.color = line2.color;
|
|
110257
|
+
if (line2.width !== void 0) result.width = line2.width;
|
|
110258
|
+
if (line2.dash) result.dashStyle = line2.dash;
|
|
110259
|
+
return result;
|
|
110260
|
+
}
|
|
110261
|
+
function errBarsFromNeutral(errorBars, seriesNode, reader2) {
|
|
110262
|
+
if (!errorBars?.length) return [];
|
|
110263
|
+
const nodes = reader2.xml.getChildrenArrayByLocalName(seriesNode, "errBars");
|
|
110264
|
+
return errorBars.map((bars, index) => errBarsFromNeutralOne(bars, nodes[index], reader2)).filter((bars) => bars !== void 0);
|
|
110265
|
+
}
|
|
110266
|
+
var init_chart_from_neutral_analysis = __esm({
|
|
110267
|
+
"pptx/core/utils/chart-from-neutral-analysis.ts"() {
|
|
110268
|
+
init_chart2();
|
|
110269
|
+
init_chart_layout();
|
|
110270
|
+
}
|
|
110271
|
+
});
|
|
110272
|
+
|
|
109531
110273
|
// pptx/core/utils/chart-from-neutral-data.ts
|
|
109532
110274
|
function expandCache(cache2, read, declared) {
|
|
109533
110275
|
if (!cache2 || cache2.points.length === 0) return void 0;
|
|
@@ -109661,8 +110403,6 @@ function readSeriesTreeFields(seriesNode, containerChartType, reader2) {
|
|
|
109661
110403
|
const line2 = xml.getChildByLocalName(spPr, "ln");
|
|
109662
110404
|
const color2 = reader2.parseColor(xml.getChildByLocalName(spPr, "solidFill")) ?? (isLineDrawnChartType(containerChartType) ? reader2.parseColor(xml.getChildByLocalName(line2, "solidFill")) : void 0);
|
|
109663
110405
|
const codec = reader2.colorStyleCodec;
|
|
109664
|
-
const trendlines = parseSeriesTrendlines(seriesNode, xml, colorAdapter);
|
|
109665
|
-
const errBars = parseSeriesErrBars(seriesNode, xml, reader2.extractPointValues, colorAdapter);
|
|
109666
110406
|
const dataPoints = parseSeriesDataPoints(
|
|
109667
110407
|
seriesNode,
|
|
109668
110408
|
xml,
|
|
@@ -109685,8 +110425,6 @@ function readSeriesTreeFields(seriesNode, containerChartType, reader2) {
|
|
|
109685
110425
|
color: color2,
|
|
109686
110426
|
...codec ? seriesGradientFill(spPr, xml, codec) : {},
|
|
109687
110427
|
...lineGradientFill ? { lineGradientFill } : {},
|
|
109688
|
-
...trendlines.length > 0 ? { trendlines } : {},
|
|
109689
|
-
...errBars.length > 0 ? { errBars } : {},
|
|
109690
110428
|
...dataPoints.length > 0 ? { dataPoints } : {},
|
|
109691
110429
|
...marker ? { marker } : {},
|
|
109692
110430
|
...dataLabels.length > 0 ? { dataLabels } : {},
|
|
@@ -109702,7 +110440,6 @@ function readSeriesTreeFields(seriesNode, containerChartType, reader2) {
|
|
|
109702
110440
|
var init_chart_series_tree_fields = __esm({
|
|
109703
110441
|
"pptx/core/utils/chart-series-tree-fields.ts"() {
|
|
109704
110442
|
init_units2();
|
|
109705
|
-
init_chart_advanced_parser();
|
|
109706
110443
|
init_chart_container_type_map();
|
|
109707
110444
|
init_chart_data_label_parser();
|
|
109708
110445
|
init_chart_datapoint_picture();
|
|
@@ -109733,6 +110470,8 @@ function seriesFromNeutral(place, reader2) {
|
|
|
109733
110470
|
const dataLabels = pointLabelsFromNeutral(series.dataLabels, tree.dataLabels);
|
|
109734
110471
|
const shape = containerChartType === "bar3D" ? parseBar3DShapeVal(series.shape?.trim() ?? "") : void 0;
|
|
109735
110472
|
const name = neutralSeriesName(series.tx);
|
|
110473
|
+
const trendlines = trendlinesFromNeutral(series.trendlines, place.node, reader2);
|
|
110474
|
+
const errBars = errBarsFromNeutral(series.errorBars, place.node, reader2);
|
|
109736
110475
|
return {
|
|
109737
110476
|
name: name.trim().length > 0 ? name : `Series ${index + 1}`,
|
|
109738
110477
|
...series.index !== void 0 ? { idx: series.index } : {},
|
|
@@ -109748,8 +110487,8 @@ function seriesFromNeutral(place, reader2) {
|
|
|
109748
110487
|
color: tree.color,
|
|
109749
110488
|
...tree.gradientFill ? { gradientFill: tree.gradientFill } : {},
|
|
109750
110489
|
...tree.lineGradientFill ? { lineGradientFill: tree.lineGradientFill } : {},
|
|
109751
|
-
...
|
|
109752
|
-
...
|
|
110490
|
+
...trendlines.length > 0 ? { trendlines } : {},
|
|
110491
|
+
...errBars.length > 0 ? { errBars } : {},
|
|
109753
110492
|
...dataPoints ? { dataPoints } : {},
|
|
109754
110493
|
...marker ? { marker } : {},
|
|
109755
110494
|
...dataLabels ? { dataLabels } : {},
|
|
@@ -109766,6 +110505,7 @@ function seriesFromNeutral(place, reader2) {
|
|
|
109766
110505
|
}
|
|
109767
110506
|
var init_chart_from_neutral_series = __esm({
|
|
109768
110507
|
"pptx/core/utils/chart-from-neutral-series.ts"() {
|
|
110508
|
+
init_chart_from_neutral_analysis();
|
|
109769
110509
|
init_chart_from_neutral_labels();
|
|
109770
110510
|
init_chart_from_neutral_data();
|
|
109771
110511
|
init_chart_series_tree_fields();
|
|
@@ -115133,7 +115873,7 @@ function buildContentTypesXml(overrides28) {
|
|
|
115133
115873
|
}
|
|
115134
115874
|
async function buildMetroBlobPackage(input) {
|
|
115135
115875
|
const root = ROOT[input.kind];
|
|
115136
|
-
const zip = new
|
|
115876
|
+
const zip = new JSZip__default.default();
|
|
115137
115877
|
const overrides28 = new Map([
|
|
115138
115878
|
[root.path, root.contentType],
|
|
115139
115879
|
...input.parts.contentTypes,
|
|
@@ -115397,6 +116137,8 @@ var init_metro_blob_xml = __esm({
|
|
|
115397
116137
|
];
|
|
115398
116138
|
}
|
|
115399
116139
|
});
|
|
116140
|
+
|
|
116141
|
+
// pptx/core/ppt/writer/metro-blob-collect.ts
|
|
115400
116142
|
function deckNeedsMetroBlobs(slides) {
|
|
115401
116143
|
const walk3 = (elements3) => elements3.some((el) => METRO_TYPES.has(el.type) || el.type === "group" && walk3(el.children));
|
|
115402
116144
|
return slides.some((slide) => walk3(slide.elements));
|
|
@@ -115449,7 +116191,7 @@ async function buildOne(zip, slidePath, slideXml3, element) {
|
|
|
115449
116191
|
});
|
|
115450
116192
|
}
|
|
115451
116193
|
async function buildMetroBlobs(pptxBytes, slides) {
|
|
115452
|
-
const zip = await
|
|
116194
|
+
const zip = await openPptxZip(pptxBytes);
|
|
115453
116195
|
const slidePaths = await orderedSlidePaths(zip);
|
|
115454
116196
|
const out = /* @__PURE__ */ new Map();
|
|
115455
116197
|
for (let i2 = 0; i2 < slides.length; i2++) {
|
|
@@ -115472,6 +116214,7 @@ async function buildMetroBlobs(pptxBytes, slides) {
|
|
|
115472
116214
|
var METRO_TYPES;
|
|
115473
116215
|
var init_metro_blob_collect = __esm({
|
|
115474
116216
|
"pptx/core/ppt/writer/metro-blob-collect.ts"() {
|
|
116217
|
+
init_zip_open();
|
|
115475
116218
|
init_metro_blob_model3d();
|
|
115476
116219
|
init_metro_blob_package();
|
|
115477
116220
|
init_metro_blob_source();
|
|
@@ -118441,7 +119184,7 @@ function withDeclaration(xml) {
|
|
|
118441
119184
|
${body}`;
|
|
118442
119185
|
}
|
|
118443
119186
|
async function zipParts(parts) {
|
|
118444
|
-
const zip = new
|
|
119187
|
+
const zip = new JSZip__default.default();
|
|
118445
119188
|
for (const [name, text2] of parts) {
|
|
118446
119189
|
zip.file(name, text2);
|
|
118447
119190
|
}
|
|
@@ -118488,7 +119231,7 @@ async function buildMasterRoundTrip(source) {
|
|
|
118488
119231
|
};
|
|
118489
119232
|
}
|
|
118490
119233
|
async function buildDeckMasterRoundTripsFromPptx(pptxBytes) {
|
|
118491
|
-
const zip = await
|
|
119234
|
+
const zip = await openPptxZip(pptxBytes);
|
|
118492
119235
|
const slidePaths = await readSlideMasterPaths(zip);
|
|
118493
119236
|
const masterPaths = [...new Set(slidePaths)];
|
|
118494
119237
|
if (masterPaths.length === 0) {
|
|
@@ -118512,6 +119255,7 @@ async function buildDeckMasterRoundTripsFromPptx(pptxBytes) {
|
|
|
118512
119255
|
var XML_DECL2, CT_NS2, REL_NS2, OFFICE_REL, A_NS2, PML_CT;
|
|
118513
119256
|
var init_master_roundtrip_writer = __esm({
|
|
118514
119257
|
"pptx/core/ppt/writer/master-roundtrip-writer.ts"() {
|
|
119258
|
+
init_zip_open();
|
|
118515
119259
|
init_master_roundtrip_source();
|
|
118516
119260
|
XML_DECL2 = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
|
118517
119261
|
CT_NS2 = "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
@@ -120168,7 +120912,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
|
|
|
120168
120912
|
if (spPr) {
|
|
120169
120913
|
node["c:spPr"] = spPr;
|
|
120170
120914
|
}
|
|
120171
|
-
node["c:trendlineType"] = { "@_val":
|
|
120915
|
+
node["c:trendlineType"] = { "@_val": chartTrendlineType(t.trendlineType) };
|
|
120172
120916
|
if (t.trendlineType === "polynomial") {
|
|
120173
120917
|
node["c:order"] = { "@_val": String(t.order ?? 2) };
|
|
120174
120918
|
}
|
|
@@ -120236,19 +120980,11 @@ function applySeriesTrendlinesToXml(seriesNode, trendlines, getLocalName2, resol
|
|
|
120236
120980
|
seriesNode[k] = v;
|
|
120237
120981
|
}
|
|
120238
120982
|
}
|
|
120239
|
-
var TYPE_TO_OOXML;
|
|
120240
120983
|
var init_chart_trendline_serializer = __esm({
|
|
120241
120984
|
"pptx/core/utils/chart-trendline-serializer.ts"() {
|
|
120985
|
+
init_model_analysis();
|
|
120242
120986
|
init_chart_shape_props_writer();
|
|
120243
120987
|
init_chart_trendline_label();
|
|
120244
|
-
TYPE_TO_OOXML = {
|
|
120245
|
-
linear: "linear",
|
|
120246
|
-
exponential: "exp",
|
|
120247
|
-
logarithmic: "log",
|
|
120248
|
-
polynomial: "poly",
|
|
120249
|
-
power: "power",
|
|
120250
|
-
movingAvg: "movingAvg"
|
|
120251
|
-
};
|
|
120252
120988
|
}
|
|
120253
120989
|
});
|
|
120254
120990
|
|
|
@@ -155819,8 +156555,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
155819
156555
|
parseColor: (node, placeholder) => this.parseColor(node, placeholder),
|
|
155820
156556
|
resolveTypeface: (raw) => this.resolveThemeTypeface(raw) ?? raw,
|
|
155821
156557
|
localName: (key2) => this.compatibilityService.getXmlLocalName(key2),
|
|
155822
|
-
...this.colorStyleCodec ? { colorStyleCodec: this.colorStyleCodec } : {}
|
|
155823
|
-
extractPointValues: (node, preferNumeric) => this.extractChartPointValues(node, preferNumeric)
|
|
156558
|
+
...this.colorStyleCodec ? { colorStyleCodec: this.colorStyleCodec } : {}
|
|
155824
156559
|
};
|
|
155825
156560
|
}
|
|
155826
156561
|
/**
|
|
@@ -156435,10 +157170,11 @@ var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
|
|
|
156435
157170
|
var MAX_OLE_EMBEDDING_BYTES, PptxHandlerRuntime98;
|
|
156436
157171
|
var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
156437
157172
|
"pptx/core/core/runtime/PptxHandlerRuntimeLoadSession.ts"() {
|
|
157173
|
+
init_zip_limits();
|
|
156438
157174
|
init_ole_embedded_extract();
|
|
156439
157175
|
init_ole_utils();
|
|
156440
157176
|
init_signature_detection();
|
|
156441
|
-
|
|
157177
|
+
init_types2();
|
|
156442
157178
|
init_authored_slide_background();
|
|
156443
157179
|
init_bullet_picture_image_enrichment();
|
|
156444
157180
|
init_PptxHandlerRuntimeEmbeddedFonts();
|
|
@@ -156462,8 +157198,22 @@ var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
|
156462
157198
|
"Invalid PPTX binary: not a ZIP/OpenXML package. The file is neither an OpenXML archive nor an OLE compound file (which is how legacy .ppt and encrypted presentations arrive), so it is most likely corrupt, truncated, or not a presentation at all."
|
|
156463
157199
|
);
|
|
156464
157200
|
}
|
|
157201
|
+
const maxBytes = typeof options.maxUncompressedBytes === "number" && options.maxUncompressedBytes > 0 ? options.maxUncompressedBytes : exports.DEFAULT_MAX_UNCOMPRESSED_BYTES;
|
|
157202
|
+
let loaded;
|
|
157203
|
+
try {
|
|
157204
|
+
loaded = await JSZip__default.default.loadAsync(data);
|
|
157205
|
+
} catch (error) {
|
|
157206
|
+
const message = error instanceof Error ? error.message : "Unable to read zip container.";
|
|
157207
|
+
throw new Error(`Invalid PPTX package: ${message}`, { cause: error });
|
|
157208
|
+
}
|
|
157209
|
+
this.zip = guardZip(loaded, {
|
|
157210
|
+
label: "PPTX",
|
|
157211
|
+
maxEntries: exports.MAX_ZIP_ENTRY_COUNT,
|
|
157212
|
+
maxEntryBytes: maxBytes,
|
|
157213
|
+
maxTotalBytes: maxBytes,
|
|
157214
|
+
createError: (message, details) => new exports.ZipBombError(message, details)
|
|
157215
|
+
});
|
|
156465
157216
|
try {
|
|
156466
|
-
this.zip = await JSZip17__default.default.loadAsync(data);
|
|
156467
157217
|
this.documentPropertiesUpdater = this.dependencyFactory.createDocumentPropertiesUpdater(
|
|
156468
157218
|
this.zip,
|
|
156469
157219
|
this.parser,
|
|
@@ -156473,29 +157223,6 @@ var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
|
156473
157223
|
const message = error instanceof Error ? error.message : "Unable to read zip container.";
|
|
156474
157224
|
throw new Error(`Invalid PPTX package: ${message}`, { cause: error });
|
|
156475
157225
|
}
|
|
156476
|
-
const maxBytes = typeof options.maxUncompressedBytes === "number" && options.maxUncompressedBytes > 0 ? options.maxUncompressedBytes : exports.DEFAULT_MAX_UNCOMPRESSED_BYTES;
|
|
156477
|
-
let totalUncompressed = 0;
|
|
156478
|
-
let entryCount = 0;
|
|
156479
|
-
for (const filename of Object.keys(this.zip.files)) {
|
|
156480
|
-
entryCount += 1;
|
|
156481
|
-
if (entryCount > exports.MAX_ZIP_ENTRY_COUNT) {
|
|
156482
|
-
throw new exports.ZipBombError(
|
|
156483
|
-
`PPTX archive contains more than ${exports.MAX_ZIP_ENTRY_COUNT} entries \u2014 refusing to load.`,
|
|
156484
|
-
{ limit: exports.MAX_ZIP_ENTRY_COUNT, entryCount }
|
|
156485
|
-
);
|
|
156486
|
-
}
|
|
156487
|
-
const file = this.zip.files[filename];
|
|
156488
|
-
const size = Number(file?._data?.uncompressedSize ?? 0);
|
|
156489
|
-
if (Number.isFinite(size) && size > 0) {
|
|
156490
|
-
totalUncompressed += size;
|
|
156491
|
-
if (totalUncompressed > maxBytes) {
|
|
156492
|
-
throw new exports.ZipBombError(
|
|
156493
|
-
`PPTX archive uncompressed size exceeds ${maxBytes} bytes (zip-bomb guard).`,
|
|
156494
|
-
{ uncompressedBytes: totalUncompressed, limit: maxBytes }
|
|
156495
|
-
);
|
|
156496
|
-
}
|
|
156497
|
-
}
|
|
156498
|
-
}
|
|
156499
157226
|
this.slideRelsMap.clear();
|
|
156500
157227
|
this.externalRelsMap.clear();
|
|
156501
157228
|
this.slideMap.clear();
|
|
@@ -156900,7 +157627,7 @@ var init_PptxHandlerRuntimeLoadPipeline = __esm({
|
|
|
156900
157627
|
* MAX_NODES to bound CPU on pathological trees.
|
|
156901
157628
|
*/
|
|
156902
157629
|
findMaxElementId(slides) {
|
|
156903
|
-
const
|
|
157630
|
+
const MAX_NODES2 = 1e6;
|
|
156904
157631
|
let max = 0;
|
|
156905
157632
|
const stack = [];
|
|
156906
157633
|
for (const slide of slides) {
|
|
@@ -156908,7 +157635,7 @@ var init_PptxHandlerRuntimeLoadPipeline = __esm({
|
|
|
156908
157635
|
}
|
|
156909
157636
|
let visited = 0;
|
|
156910
157637
|
while (stack.length > 0) {
|
|
156911
|
-
if (visited++ >
|
|
157638
|
+
if (visited++ > MAX_NODES2) {
|
|
156912
157639
|
break;
|
|
156913
157640
|
}
|
|
156914
157641
|
const node = stack.pop();
|
|
@@ -157392,7 +158119,7 @@ var init_PptxHandlerRuntimeImplementation = __esm({
|
|
|
157392
158119
|
constructor(dependencyFactory = new exports.PptxRuntimeDependencyFactory()) {
|
|
157393
158120
|
super();
|
|
157394
158121
|
this.dependencyFactory = dependencyFactory;
|
|
157395
|
-
this.zip = new
|
|
158122
|
+
this.zip = new JSZip__default.default();
|
|
157396
158123
|
this.parser = this.dependencyFactory.createParser();
|
|
157397
158124
|
this.builder = this.dependencyFactory.createBuilder();
|
|
157398
158125
|
this.elementXmlBuilder = new exports.PptxElementXmlBuilder({
|
|
@@ -157715,7 +158442,7 @@ var init_core2 = __esm({
|
|
|
157715
158442
|
init_PptxHandlerRuntime();
|
|
157716
158443
|
init_builders();
|
|
157717
158444
|
init_factories();
|
|
157718
|
-
|
|
158445
|
+
init_types2();
|
|
157719
158446
|
init_table_structural_ops();
|
|
157720
158447
|
init_table_style_defaults();
|
|
157721
158448
|
init_auto_number_sequence();
|
|
@@ -160567,7 +161294,7 @@ function collectPictureIndexes(slide) {
|
|
|
160567
161294
|
return indexes;
|
|
160568
161295
|
}
|
|
160569
161296
|
async function buildPptxPackage(deck) {
|
|
160570
|
-
const zip = new
|
|
161297
|
+
const zip = new JSZip__default.default();
|
|
160571
161298
|
const usage = { fileNumbers: /* @__PURE__ */ new Map() };
|
|
160572
161299
|
let mediaCounter = 0;
|
|
160573
161300
|
for (const slide of deck.slides) {
|
|
@@ -163257,6 +163984,7 @@ function addChartUserShapeGroupChild(element, groupPath, child30) {
|
|
|
163257
163984
|
}
|
|
163258
163985
|
|
|
163259
163986
|
// pptx/core/builders/sdk/layout-operations.ts
|
|
163987
|
+
init_zip_open();
|
|
163260
163988
|
init_xml_utils();
|
|
163261
163989
|
init_PptxHandler();
|
|
163262
163990
|
var EMU_PER_PIXEL4 = 9525;
|
|
@@ -163381,7 +164109,7 @@ async function addLayoutContentType(zip, layoutIndex2) {
|
|
|
163381
164109
|
}
|
|
163382
164110
|
async function createLayout(handler, data, definition, masterIndex = 1) {
|
|
163383
164111
|
const bytes = await handler.save(data.slides);
|
|
163384
|
-
const zip = await
|
|
164112
|
+
const zip = await openPptxZip(bytes);
|
|
163385
164113
|
const existingCount = countExistingLayouts(zip);
|
|
163386
164114
|
const newIndex = existingCount + 1;
|
|
163387
164115
|
const layoutPath = `ppt/slideLayouts/slideLayout${newIndex}.xml`;
|
|
@@ -163404,7 +164132,7 @@ async function createLayouts(handler, data, definitions, masterIndex = 1) {
|
|
|
163404
164132
|
return { layoutPaths: [], handler, data };
|
|
163405
164133
|
}
|
|
163406
164134
|
const bytes = await handler.save(data.slides);
|
|
163407
|
-
const zip = await
|
|
164135
|
+
const zip = await openPptxZip(bytes);
|
|
163408
164136
|
const existingCount = countExistingLayouts(zip);
|
|
163409
164137
|
const layoutPaths = [];
|
|
163410
164138
|
for (let i2 = 0; i2 < definitions.length; i2++) {
|
|
@@ -163506,11 +164234,12 @@ function uniquePrefixedName(existingNames, base) {
|
|
|
163506
164234
|
}
|
|
163507
164235
|
|
|
163508
164236
|
// pptx/core/builders/sdk/master-layout-crud-xml.ts
|
|
164237
|
+
init_zip_open();
|
|
163509
164238
|
init_xml_utils();
|
|
163510
164239
|
init_PptxHandler();
|
|
163511
164240
|
async function saveToZip(handler, data) {
|
|
163512
164241
|
const bytes = await handler.save(data.slides);
|
|
163513
|
-
return
|
|
164242
|
+
return openPptxZip(bytes);
|
|
163514
164243
|
}
|
|
163515
164244
|
async function reload(zip) {
|
|
163516
164245
|
const buffer = await zip.generateAsync({ type: "arraybuffer" });
|
|
@@ -165742,6 +166471,7 @@ function getThemePreset(name) {
|
|
|
165742
166471
|
}
|
|
165743
166472
|
|
|
165744
166473
|
// pptx/core/builders/sdk/import-slide-package.ts
|
|
166474
|
+
init_zip_open();
|
|
165745
166475
|
init_PresentationBuilder();
|
|
165746
166476
|
init_PptxHandler();
|
|
165747
166477
|
init_clone_part_graph();
|
|
@@ -165750,10 +166480,7 @@ init_xml2();
|
|
|
165750
166480
|
async function importSlidePackage(destination, source, options = {}) {
|
|
165751
166481
|
if (options.insertAt !== void 0 && (!Number.isInteger(options.insertAt) || !Number.isFinite(options.insertAt)))
|
|
165752
166482
|
throw new Error("Insertion point must be a finite integer");
|
|
165753
|
-
const [zip, sourceZip] = await Promise.all([
|
|
165754
|
-
JSZip17__default.default.loadAsync(destination),
|
|
165755
|
-
JSZip17__default.default.loadAsync(source)
|
|
165756
|
-
]);
|
|
166483
|
+
const [zip, sourceZip] = await Promise.all([openPptxZip(destination), openPptxZip(source)]);
|
|
165757
166484
|
const presentationPath = "ppt/presentation.xml";
|
|
165758
166485
|
const sourceDoc = parseXml(await requiredXml(sourceZip, presentationPath));
|
|
165759
166486
|
const destinationDoc = parseXml(await requiredXml(zip, presentationPath));
|
|
@@ -165933,7 +166660,7 @@ function nativeIdAllocator(values, min, max, kind) {
|
|
|
165933
166660
|
};
|
|
165934
166661
|
}
|
|
165935
166662
|
async function createSlideClipboardPackage(source, slideIndices) {
|
|
165936
|
-
const sourceZip = await
|
|
166663
|
+
const sourceZip = await openPptxZip(source);
|
|
165937
166664
|
const root = parseXml(await requiredXml(sourceZip, "ppt/presentation.xml")).documentElement;
|
|
165938
166665
|
const size = first(root, "sldSz", root.namespaceURI ?? "");
|
|
165939
166666
|
const width = Number(size?.getAttribute("cx")), height = Number(size?.getAttribute("cy"));
|
|
@@ -175849,6 +176576,44 @@ async function setPresentationRunText(bytes, slideIndex, elementId, runIndex, te
|
|
|
175849
176576
|
element.text = element.textSegments.map((segment) => segment.text).join("");
|
|
175850
176577
|
return handler.save(data.slides);
|
|
175851
176578
|
}
|
|
176579
|
+
async function createPresentationFromOutline(slides, options = {}) {
|
|
176580
|
+
if (!(slides instanceof Array) || !slides.length || slides.length > 200)
|
|
176581
|
+
throw new Error("A presentation outline has 1 to 200 slides");
|
|
176582
|
+
const { PresentationBuilder: PresentationBuilder2 } = await Promise.resolve().then(() => (init_PresentationBuilder(), PresentationBuilder_exports));
|
|
176583
|
+
const { handler, data, createSlide } = await PresentationBuilder2.create({
|
|
176584
|
+
...options.title ? { title: options.title } : {}
|
|
176585
|
+
});
|
|
176586
|
+
const plain = (value, max = 2e3) => {
|
|
176587
|
+
if (typeof value !== "string" || value.length > max) throw new Error("Invalid slide text");
|
|
176588
|
+
return value;
|
|
176589
|
+
};
|
|
176590
|
+
slides.forEach((slide, index) => {
|
|
176591
|
+
const bullets = (slide.bullets ?? []).map((item) => plain(item));
|
|
176592
|
+
const cover = index === 0 && !bullets.length;
|
|
176593
|
+
const builder3 = createSlide(cover ? "Title Slide" : "Title and Content").addText(
|
|
176594
|
+
plain(slide.title, 500),
|
|
176595
|
+
cover ? { x: 96, y: 250, width: 1088, height: 160, fontSize: 60, alignment: "center" } : { x: 64, y: 40, width: 1152, height: 110, fontSize: 44 }
|
|
176596
|
+
);
|
|
176597
|
+
if (bullets.length)
|
|
176598
|
+
builder3.addText(bullets.map((text2) => text2.replace(/\n/g, " ")).join("\n"), {
|
|
176599
|
+
x: 64,
|
|
176600
|
+
y: 160,
|
|
176601
|
+
width: 1152,
|
|
176602
|
+
height: 500,
|
|
176603
|
+
fontSize: 28
|
|
176604
|
+
});
|
|
176605
|
+
if (slide.notes) builder3.setNotes(plain(slide.notes, 2e4));
|
|
176606
|
+
const built = builder3.build();
|
|
176607
|
+
const body = bullets.length ? built.elements[built.elements.length - 1] : void 0;
|
|
176608
|
+
if (body?.type === "text") {
|
|
176609
|
+
for (const [i2, segment] of (body.textSegments ?? []).entries())
|
|
176610
|
+
if (!segment.isParagraphBreak && (i2 === 0 || body.textSegments?.[i2 - 1]?.isParagraphBreak))
|
|
176611
|
+
segment.bulletInfo = { char: "\u2022" };
|
|
176612
|
+
}
|
|
176613
|
+
data.slides.push(built);
|
|
176614
|
+
});
|
|
176615
|
+
return handler.save(data.slides);
|
|
176616
|
+
}
|
|
175852
176617
|
|
|
175853
176618
|
// pptx/converter/media-context.ts
|
|
175854
176619
|
var MIME_TO_EXT = {
|
|
@@ -179386,6 +180151,7 @@ exports.createLayout = createLayout;
|
|
|
179386
180151
|
exports.createLayouts = createLayouts;
|
|
179387
180152
|
exports.createMediaElement = createMediaElement;
|
|
179388
180153
|
exports.createModifyVerifier = createModifyVerifier;
|
|
180154
|
+
exports.createPresentationFromOutline = createPresentationFromOutline;
|
|
179389
180155
|
exports.createSaltlessModifyVerifierForTesting = createSaltlessModifyVerifierForTesting;
|
|
179390
180156
|
exports.createShapeElement = createShapeElement;
|
|
179391
180157
|
exports.createSlideClipboardPackage = createSlideClipboardPackage;
|