ooxml-core 1.20.0 → 1.22.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/README.md +35 -0
- package/dist/{PptxHandler-TEKISCJO.cjs → PptxHandler-DNSXWTQV.cjs} +3 -3
- package/dist/{PptxHandler-FYD7IYXT.mjs → PptxHandler-FSKKPZZC.mjs} +3 -3
- package/dist/PptxHandler-H7MEWJJJ.mjs +4 -0
- package/dist/{PresentationBuilder-IMB4DVRN.mjs → PresentationBuilder-7TSENZTX.mjs} +2 -2
- package/dist/{PresentationBuilder-NCKASKXU.cjs → PresentationBuilder-A5NI35VN.cjs} +5 -5
- package/dist/{PresentationBuilder-EYI6Z2JP.mjs → PresentationBuilder-RIJWQSEU.mjs} +3 -3
- package/dist/automation/docx-forms.d.ts +26 -0
- package/dist/automation/docx-forms.d.ts.map +1 -0
- package/dist/automation/index.cjs +39159 -14352
- package/dist/automation/index.d.ts +5 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +39145 -14353
- package/dist/automation/node.cjs +37 -0
- package/dist/automation/node.d.ts +32 -1
- package/dist/automation/node.d.ts.map +1 -1
- package/dist/automation/node.mjs +36 -1
- package/dist/automation/proposal.d.ts +25 -0
- package/dist/automation/proposal.d.ts.map +1 -0
- package/dist/automation/tools/define.d.ts +27 -0
- package/dist/automation/tools/define.d.ts.map +1 -0
- package/dist/automation/tools/docx-tools.d.ts +4 -0
- package/dist/automation/tools/docx-tools.d.ts.map +1 -0
- package/dist/automation/tools/index.d.ts +16 -0
- package/dist/automation/tools/index.d.ts.map +1 -0
- package/dist/automation/tools/types.d.ts +52 -0
- package/dist/automation/tools/types.d.ts.map +1 -0
- package/dist/automation/tools/visio-tools.d.ts +4 -0
- package/dist/automation/tools/visio-tools.d.ts.map +1 -0
- package/dist/automation/tools/xlsx-tools.d.ts +8 -0
- package/dist/automation/tools/xlsx-tools.d.ts.map +1 -0
- package/dist/automation/xlsx-edits.d.ts +88 -0
- package/dist/automation/xlsx-edits.d.ts.map +1 -0
- package/dist/automation/xlsx-proposal.d.ts +34 -0
- package/dist/automation/xlsx-proposal.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +10 -5
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/chart/axis-range.d.ts.map +1 -1
- package/dist/chart/bubble-radius.d.ts +0 -5
- package/dist/chart/bubble-radius.d.ts.map +1 -1
- package/dist/chart/extent.d.ts +9 -0
- package/dist/chart/extent.d.ts.map +1 -0
- package/dist/chart/histogram-binning.d.ts.map +1 -1
- package/dist/chart/index.cjs +56 -18
- package/dist/chart/index.mjs +56 -18
- package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-legend.d.ts.map +1 -1
- package/dist/chart/render/chart-view-ex.d.ts.map +1 -1
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/trendline-fit.d.ts.map +1 -1
- package/dist/{chunk-3IENHIFD.cjs → chunk-4LZIUJI3.cjs} +52 -12
- package/dist/{chunk-LEV2SVMK.mjs → chunk-4QPOJCJG.mjs} +45 -8
- package/dist/{chunk-CC5UNZOO.mjs → chunk-6IIMI5RS.mjs} +52 -12
- package/dist/{chunk-MN27HKHM.mjs → chunk-BA7Z6ATM.mjs} +5 -5
- package/dist/{chunk-LVM3IZJ2.mjs → chunk-DLFMCZZT.mjs} +1 -1
- package/dist/{chunk-M4XLF4R7.mjs → chunk-GBKBR4CX.mjs} +20 -8
- package/dist/{chunk-NXKATFM5.cjs → chunk-HL3FBJ6X.cjs} +1065 -1016
- package/dist/{chunk-WXY5EDGT.mjs → chunk-LF5E5ZOH.mjs} +51 -2
- package/dist/chunk-MHNETXQB.mjs +1 -0
- package/dist/{chunk-MNXKRXFB.mjs → chunk-Q5PKBQXH.mjs} +52 -3
- package/dist/{chunk-GQYQQ3GA.mjs → chunk-VQF6HQEE.mjs} +1 -1
- package/dist/collab/embedding.d.ts +108 -0
- package/dist/collab/embedding.d.ts.map +1 -0
- package/dist/collab/index.cjs +423 -293
- package/dist/collab/index.d.ts +2 -0
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.mjs +415 -294
- package/dist/collab/webrtc-provider.d.ts +21 -0
- package/dist/collab/webrtc-provider.d.ts.map +1 -0
- package/dist/color/theme-palette.d.ts +5 -1
- package/dist/color/theme-palette.d.ts.map +1 -1
- package/dist/crypto/index.cjs +27 -2
- package/dist/crypto/index.mjs +27 -2
- package/dist/diagram/index.cjs +31 -3
- package/dist/diagram/index.mjs +31 -3
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/cell-blocks.d.ts +7 -1
- package/dist/docx/cell-blocks.d.ts.map +1 -1
- package/dist/docx/content-control-edit.d.ts +14 -0
- package/dist/docx/content-control-edit.d.ts.map +1 -1
- package/dist/docx/content-control-model.d.ts +8 -0
- package/dist/docx/content-control-model.d.ts.map +1 -1
- package/dist/docx/content-control-values.d.ts +20 -0
- package/dist/docx/content-control-values.d.ts.map +1 -0
- package/dist/docx/content-control.d.ts +7 -1
- package/dist/docx/content-control.d.ts.map +1 -1
- package/dist/docx/element-order.d.ts +10 -5
- package/dist/docx/element-order.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +3861 -1379
- package/dist/docx/embedded.mjs +3861 -1379
- package/dist/docx/field-instruction.d.ts +22 -0
- package/dist/docx/field-instruction.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +48 -0
- package/dist/docx/form-field-model.d.ts.map +1 -0
- package/dist/docx/form-fields.d.ts +31 -0
- package/dist/docx/form-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-fields.d.ts +61 -0
- package/dist/docx/form-fill-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-labels.d.ts +8 -0
- package/dist/docx/form-fill-labels.d.ts.map +1 -0
- package/dist/docx/form-fill-sites.d.ts +59 -0
- package/dist/docx/form-fill-sites.d.ts.map +1 -0
- package/dist/docx/form-fill-values.d.ts +28 -0
- package/dist/docx/form-fill-values.d.ts.map +1 -0
- package/dist/docx/form-fill-write.d.ts +26 -0
- package/dist/docx/form-fill-write.d.ts.map +1 -0
- package/dist/docx/glossary.d.ts +15 -0
- package/dist/docx/glossary.d.ts.map +1 -0
- package/dist/docx/index.cjs +5929 -3153
- package/dist/docx/index.d.ts +7 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +5913 -3154
- package/dist/docx/inline-annotations.d.ts +21 -0
- package/dist/docx/inline-annotations.d.ts.map +1 -0
- package/dist/docx/inline-container-markers.d.ts +14 -0
- package/dist/docx/inline-container-markers.d.ts.map +1 -0
- package/dist/docx/inline-containers.d.ts +54 -0
- package/dist/docx/inline-containers.d.ts.map +1 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts +15 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts.map +1 -0
- package/dist/docx/inline-marker-positions.d.ts +15 -0
- package/dist/docx/inline-marker-positions.d.ts.map +1 -0
- package/dist/docx/inline-markers.d.ts +63 -0
- package/dist/docx/inline-markers.d.ts.map +1 -0
- package/dist/docx/inline-slots.d.ts +24 -0
- package/dist/docx/inline-slots.d.ts.map +1 -0
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +1176 -563
- package/dist/docx/layout/index.d.ts +2 -1
- package/dist/docx/layout/index.d.ts.map +1 -1
- package/dist/docx/layout/index.mjs +1175 -564
- package/dist/docx/layout/input.d.ts +5 -1
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/page-style-refs.d.ts +21 -0
- package/dist/docx/layout/page-style-refs.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +1 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/tab-stops.d.ts +8 -1
- package/dist/docx/layout/tab-stops.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +3969 -1487
- package/dist/docx/load/index.mjs +3969 -1487
- package/dist/docx/model-run.d.ts +24 -2
- package/dist/docx/model-run.d.ts.map +1 -1
- package/dist/docx/model.d.ts +5 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/parse-warnings.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/run-segmentation.d.ts +11 -0
- package/dist/docx/run-segmentation.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/section-model.d.ts +5 -0
- package/dist/docx/section-model.d.ts.map +1 -1
- package/dist/docx/sections.d.ts +4 -2
- package/dist/docx/sections.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +9 -0
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/special-characters.d.ts +34 -0
- package/dist/docx/special-characters.d.ts.map +1 -0
- package/dist/docx/style-ref-fields.d.ts +40 -0
- package/dist/docx/style-ref-fields.d.ts.map +1 -0
- package/dist/docx/style-ref.d.ts +85 -0
- package/dist/docx/style-ref.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +2 -2
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/ui/break-note-schema.d.ts.map +1 -1
- package/dist/docx/ui/content-control-commands.d.ts +20 -8
- package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
- package/dist/docx/ui/content-control-guard.d.ts +4 -1
- package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
- package/dist/docx/ui/content-control-paste.d.ts +23 -0
- package/dist/docx/ui/content-control-paste.d.ts.map +1 -0
- package/dist/docx/ui/content-control-rows.d.ts +15 -0
- package/dist/docx/ui/content-control-rows.d.ts.map +1 -0
- package/dist/docx/ui/content-control-sources.d.ts +12 -0
- package/dist/docx/ui/content-control-sources.d.ts.map +1 -0
- package/dist/docx/ui/content-control-spans.d.ts +29 -6
- package/dist/docx/ui/content-control-spans.d.ts.map +1 -1
- package/dist/docx/ui/content-control-temporary.d.ts +10 -0
- package/dist/docx/ui/content-control-temporary.d.ts.map +1 -0
- package/dist/docx/ui/form-field-commands.d.ts +41 -0
- package/dist/docx/ui/form-field-commands.d.ts.map +1 -0
- package/dist/docx/ui/form-field-guard.d.ts +24 -0
- package/dist/docx/ui/form-field-guard.d.ts.map +1 -0
- package/dist/docx/ui/form-text-blank.d.ts +18 -0
- package/dist/docx/ui/form-text-blank.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +9276 -7132
- package/dist/docx/ui/index.d.ts +5 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +9259 -7137
- package/dist/docx/ui/positional-tab-input.d.ts +7 -0
- package/dist/docx/ui/positional-tab-input.d.ts.map +1 -0
- package/dist/docx/ui/run-compare.d.ts.map +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +1 -1
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/symbol-font.d.ts +4 -0
- package/dist/docx/ui/symbol-font.d.ts.map +1 -0
- package/dist/docx/ui/yjs-collaboration.d.ts +12 -1
- package/dist/docx/ui/yjs-collaboration.d.ts.map +1 -1
- package/dist/docx/write-block-placement.d.ts +7 -0
- package/dist/docx/write-block-placement.d.ts.map +1 -1
- package/dist/docx/write-content-control.d.ts +6 -0
- package/dist/docx/write-content-control.d.ts.map +1 -1
- package/dist/docx/write-header-footer.d.ts +6 -2
- package/dist/docx/write-header-footer.d.ts.map +1 -1
- package/dist/docx/write-inline.d.ts +12 -16
- package/dist/docx/write-inline.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/docx/write-revisions.d.ts.map +1 -1
- package/dist/docx/write-run.d.ts.map +1 -1
- package/dist/docx/write-section-properties.d.ts +5 -0
- package/dist/docx/write-section-properties.d.ts.map +1 -0
- package/dist/docx/write-sections.d.ts.map +1 -1
- package/dist/docx/write-table-controls.d.ts +15 -0
- package/dist/docx/write-table-controls.d.ts.map +1 -0
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/docx/xml.d.ts +6 -0
- package/dist/docx/xml.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +31 -3
- package/dist/drawingml/index.mjs +31 -3
- package/dist/index.cjs +77 -26
- package/dist/index.mjs +77 -26
- package/dist/math/index.cjs +27 -2
- package/dist/math/index.mjs +27 -2
- package/dist/opc/index.cjs +51 -11
- package/dist/opc/index.mjs +51 -11
- package/dist/opc/zip-folders.d.ts +11 -0
- package/dist/opc/zip-folders.d.ts.map +1 -0
- package/dist/opc/zip-limits.d.ts +9 -0
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +28818 -7388
- package/dist/pptx/automation/index.d.ts +93 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +740 -63
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/index.mjs +1 -0
- package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
- package/dist/pptx/chunks/{index-CgFX0T7b.d.ts → index-CPhsd7Df.d.ts} +9 -1
- package/dist/pptx/chunks/{index-CgFX0T7b.d.ts.map → index-CPhsd7Df.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-qwVYoFn6.d.ts → index-Q5mM8kIR.d.ts} +2 -2
- package/dist/pptx/chunks/{index-qwVYoFn6.d.ts.map → index-Q5mM8kIR.d.ts.map} +1 -1
- package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts → schemas-fuDGetRe.d.ts} +2 -2
- package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts.map → schemas-fuDGetRe.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +116 -17
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.cjs +12 -3
- 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 +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +116 -17
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/signature-node/index.cjs +20 -8
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/teams/index.cjs +105 -70
- package/dist/teams/index.mjs +105 -70
- package/dist/text/text-diff.d.ts +15 -0
- package/dist/text/text-diff.d.ts.map +1 -0
- package/dist/visio/collab/bind.d.ts +44 -0
- package/dist/visio/collab/bind.d.ts.map +1 -0
- package/dist/visio/collab/compose.d.ts +15 -0
- package/dist/visio/collab/compose.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +1194 -0
- package/dist/visio/collab/index.d.ts +8 -0
- package/dist/visio/collab/index.d.ts.map +1 -0
- package/dist/visio/collab/index.mjs +1152 -0
- package/dist/visio/collab/keys.d.ts +22 -0
- package/dist/visio/collab/keys.d.ts.map +1 -0
- package/dist/visio/collab/order.d.ts +11 -0
- package/dist/visio/collab/order.d.ts.map +1 -0
- package/dist/visio/collab/package.d.ts +37 -0
- package/dist/visio/collab/package.d.ts.map +1 -0
- package/dist/visio/collab/read.d.ts +41 -0
- package/dist/visio/collab/read.d.ts.map +1 -0
- package/dist/visio/collab/scan.d.ts +28 -0
- package/dist/visio/collab/scan.d.ts.map +1 -0
- package/dist/visio/collab/schema.d.ts +70 -0
- package/dist/visio/collab/schema.d.ts.map +1 -0
- package/dist/visio/collab/snapshot.d.ts +61 -0
- package/dist/visio/collab/snapshot.d.ts.map +1 -0
- package/dist/visio/collab/write.d.ts +20 -0
- package/dist/visio/collab/write.d.ts.map +1 -0
- package/dist/visio/index.cjs +159 -39
- package/dist/visio/index.mjs +159 -39
- package/dist/visio/ui/collab-options.d.ts +24 -0
- package/dist/visio/ui/collab-options.d.ts.map +1 -0
- package/dist/visio/ui/collab-presence.d.ts +31 -0
- package/dist/visio/ui/collab-presence.d.ts.map +1 -0
- package/dist/visio/ui/contract.d.ts +9 -3
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/document-history.d.ts +3 -1
- package/dist/visio/ui/document-history.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +284 -95
- package/dist/visio/ui/index.d.ts +2 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +278 -95
- package/dist/xlsx/collab/index.cjs +8 -3
- package/dist/xlsx/collab/index.mjs +8 -3
- package/dist/xlsx/compare/cells.d.ts +22 -0
- package/dist/xlsx/compare/cells.d.ts.map +1 -0
- package/dist/xlsx/compare/compare.d.ts +12 -0
- package/dist/xlsx/compare/compare.d.ts.map +1 -0
- package/dist/xlsx/compare/conditional.d.ts +7 -0
- package/dist/xlsx/compare/conditional.d.ts.map +1 -0
- package/dist/xlsx/compare/format-key.d.ts +34 -0
- package/dist/xlsx/compare/format-key.d.ts.map +1 -0
- package/dist/xlsx/compare/group.d.ts +8 -0
- package/dist/xlsx/compare/group.d.ts.map +1 -0
- package/dist/xlsx/compare/index.d.ts +5 -0
- package/dist/xlsx/compare/index.d.ts.map +1 -0
- package/dist/xlsx/compare/rich-text.d.ts +7 -0
- package/dist/xlsx/compare/rich-text.d.ts.map +1 -0
- package/dist/xlsx/compare/sheets.d.ts +22 -0
- package/dist/xlsx/compare/sheets.d.ts.map +1 -0
- package/dist/xlsx/compare/structure.d.ts +11 -0
- package/dist/xlsx/compare/structure.d.ts.map +1 -0
- package/dist/xlsx/compare/text.d.ts +8 -0
- package/dist/xlsx/compare/text.d.ts.map +1 -0
- package/dist/xlsx/compare/types.d.ts +173 -0
- package/dist/xlsx/compare/types.d.ts.map +1 -0
- package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-html.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-text.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard.d.ts.map +1 -1
- package/dist/xlsx/edit/clone-cell.d.ts +9 -0
- package/dist/xlsx/edit/clone-cell.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +8 -3
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts.map +1 -1
- package/dist/xlsx/formula/change-areas.d.ts +9 -0
- package/dist/xlsx/formula/change-areas.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-prepare.d.ts +8 -0
- package/dist/xlsx/formula/engine-prepare.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/formula/spill.d.ts +5 -1
- package/dist/xlsx/formula/spill.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +2461 -1192
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +2454 -1193
- package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
- package/dist/xlsx/layout/navigate.d.ts.map +1 -1
- package/dist/xlsx/layout/style-view.d.ts +5 -0
- package/dist/xlsx/layout/style-view.d.ts.map +1 -1
- package/dist/xlsx/load/csv-dates.d.ts +22 -0
- package/dist/xlsx/load/csv-dates.d.ts.map +1 -0
- package/dist/xlsx/load/csv-import.d.ts +64 -0
- package/dist/xlsx/load/csv-import.d.ts.map +1 -0
- package/dist/xlsx/load/csv-separators.d.ts +13 -0
- package/dist/xlsx/load/csv-separators.d.ts.map +1 -0
- package/dist/xlsx/load/csv-traits.d.ts +20 -0
- package/dist/xlsx/load/csv-traits.d.ts.map +1 -0
- package/dist/xlsx/load/csv.d.ts +8 -4
- package/dist/xlsx/load/csv.d.ts.map +1 -1
- package/dist/xlsx/load/detect.d.ts +13 -0
- package/dist/xlsx/load/detect.d.ts.map +1 -1
- package/dist/xlsx/load/errors.d.ts +1 -0
- package/dist/xlsx/load/errors.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +537 -91
- package/dist/xlsx/load/index.d.ts +3 -1
- package/dist/xlsx/load/index.d.ts.map +1 -1
- package/dist/xlsx/load/index.mjs +536 -92
- package/dist/xlsx/numfmt/input-date.d.ts +2 -0
- package/dist/xlsx/numfmt/input-date.d.ts.map +1 -1
- package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/groups.d.ts.map +1 -1
- package/dist/xlsx/read/index.d.ts +2 -1
- package/dist/xlsx/read/index.d.ts.map +1 -1
- package/dist/xlsx/read/limits.d.ts +50 -0
- package/dist/xlsx/read/limits.d.ts.map +1 -0
- package/dist/xlsx/read/load.d.ts +11 -1
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts +5 -23
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/shared-strings.d.ts +2 -2
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts +2 -0
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/stable-key.d.ts +3 -0
- package/dist/xlsx/stable-key.d.ts.map +1 -0
- package/dist/xlsx/styles.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +662 -372
- package/dist/xlsx/ui/index.mjs +662 -372
- package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xml/index.cjs +32 -3
- package/dist/xml/index.mjs +32 -4
- package/dist/xml/xml.d.ts +11 -1
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +6 -1
- package/dist/PptxHandler-SITN3K3F.mjs +0 -4
package/dist/chart/index.cjs
CHANGED
|
@@ -609,6 +609,17 @@ function formatCompactAxisValue(value, formatCode) {
|
|
|
609
609
|
return value.toFixed(1);
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
+
// chart/extent.ts
|
|
613
|
+
function extentOf(values) {
|
|
614
|
+
let min = Infinity;
|
|
615
|
+
let max = -Infinity;
|
|
616
|
+
for (const value of values) {
|
|
617
|
+
min = Math.min(min, value);
|
|
618
|
+
max = Math.max(max, value);
|
|
619
|
+
}
|
|
620
|
+
return { min, max };
|
|
621
|
+
}
|
|
622
|
+
|
|
612
623
|
// chart/bubble-radius.ts
|
|
613
624
|
function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options2) {
|
|
614
625
|
const scale = (options2?.bubbleScale ?? 100) / 100;
|
|
@@ -619,7 +630,7 @@ function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options2) {
|
|
|
619
630
|
return medianRadius * scale * 0.5 + ratio * medianRadius * scale * 1.5;
|
|
620
631
|
}
|
|
621
632
|
function maxBubbleSize(sizes) {
|
|
622
|
-
return
|
|
633
|
+
return Math.max(1, extentOf(sizes.map(Math.abs)).max);
|
|
623
634
|
}
|
|
624
635
|
function medianBubbleRadius(plotWidth, plotHeight) {
|
|
625
636
|
return Math.min(plotWidth, plotHeight) * 0.04;
|
|
@@ -1038,8 +1049,7 @@ function computeHistogramBins(values, options2, format = String) {
|
|
|
1038
1049
|
});
|
|
1039
1050
|
}
|
|
1040
1051
|
if (regular.length > 0) {
|
|
1041
|
-
const min =
|
|
1042
|
-
const max = Math.max(...regular.map((item) => item.value));
|
|
1052
|
+
const { min, max } = extentOf(regular.map((item) => item.value));
|
|
1043
1053
|
const requestedSize = options2.binSize && options2.binSize > 0 ? options2.binSize : void 0;
|
|
1044
1054
|
const requestedCount = options2.binCount && options2.binCount > 0 ? options2.binCount : void 0;
|
|
1045
1055
|
const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
|
|
@@ -1255,8 +1265,9 @@ function fitChartTrendline(options2, xVals, yVals) {
|
|
|
1255
1265
|
}
|
|
1256
1266
|
const model = fitModel(options2, xVals, yVals);
|
|
1257
1267
|
if (!model) return noFit();
|
|
1258
|
-
const
|
|
1259
|
-
const
|
|
1268
|
+
const xRange = extentOf(xVals);
|
|
1269
|
+
const startX = xRange.min - (options2.backward ?? 0);
|
|
1270
|
+
const endX = xRange.max + (options2.forward ?? 0);
|
|
1260
1271
|
const steps = Math.max(Math.ceil((endX - startX) * 4), 20);
|
|
1261
1272
|
const points = [];
|
|
1262
1273
|
for (let step = 0; step <= steps; step++) {
|
|
@@ -1863,6 +1874,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1863
1874
|
maxDepth: 512,
|
|
1864
1875
|
maxNodes: 5e6
|
|
1865
1876
|
};
|
|
1877
|
+
var XmlLimitError = class extends Error {
|
|
1878
|
+
code = "xml-limit";
|
|
1879
|
+
/** The limit that was exceeded. */
|
|
1880
|
+
limit;
|
|
1881
|
+
/** Its value: the largest depth or element count allowed. */
|
|
1882
|
+
maximum;
|
|
1883
|
+
constructor(message, limit, maximum) {
|
|
1884
|
+
super(message);
|
|
1885
|
+
this.name = "XmlLimitError";
|
|
1886
|
+
this.limit = limit;
|
|
1887
|
+
this.maximum = maximum;
|
|
1888
|
+
}
|
|
1889
|
+
};
|
|
1866
1890
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
1867
1891
|
var MARKUP_SKIPS = [
|
|
1868
1892
|
["<!--", "-->"],
|
|
@@ -1896,11 +1920,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
1896
1920
|
continue;
|
|
1897
1921
|
}
|
|
1898
1922
|
nodes++;
|
|
1899
|
-
if (nodes > maxNodes)
|
|
1923
|
+
if (nodes > maxNodes)
|
|
1924
|
+
throw new XmlLimitError(
|
|
1925
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
1926
|
+
"maxNodes",
|
|
1927
|
+
maxNodes
|
|
1928
|
+
);
|
|
1900
1929
|
if (!selfClosing && ++depth > maxDepth)
|
|
1901
|
-
throw new
|
|
1930
|
+
throw new XmlLimitError(
|
|
1931
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
1932
|
+
"maxDepth",
|
|
1933
|
+
maxDepth
|
|
1934
|
+
);
|
|
1902
1935
|
}
|
|
1903
1936
|
}
|
|
1937
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
1938
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
1904
1939
|
function parseXml(xml, options2 = {}) {
|
|
1905
1940
|
const label = options2.label ?? "OOXML";
|
|
1906
1941
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -1922,9 +1957,13 @@ function parseXml(xml, options2 = {}) {
|
|
|
1922
1957
|
}
|
|
1923
1958
|
if (parseError || !parsed.documentElement)
|
|
1924
1959
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
1960
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
1925
1961
|
return parsed;
|
|
1926
1962
|
}
|
|
1927
|
-
var buildXml = (node) =>
|
|
1963
|
+
var buildXml = (node) => {
|
|
1964
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node);
|
|
1965
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
1966
|
+
};
|
|
1928
1967
|
var isElement = (node) => node.nodeType === 1;
|
|
1929
1968
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
1930
1969
|
function named(element, local, ns, lenient = true) {
|
|
@@ -6113,8 +6152,7 @@ function computeLogValueRange(series, logBase) {
|
|
|
6113
6152
|
if (allValues.length === 0) {
|
|
6114
6153
|
return { min: 1, max: logBase, span: 1, logScale: true, logBase };
|
|
6115
6154
|
}
|
|
6116
|
-
const dataMin =
|
|
6117
|
-
const dataMax = Math.max(...allValues);
|
|
6155
|
+
const { min: dataMin, max: dataMax } = extentOf(allValues);
|
|
6118
6156
|
const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
|
|
6119
6157
|
const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
|
|
6120
6158
|
const min = logBase ** logMin;
|
|
@@ -6729,8 +6767,9 @@ function waterfallView(chart, model, ctx) {
|
|
|
6729
6767
|
colors: { increase: role(0), decrease: role(1), total: role(2) }
|
|
6730
6768
|
};
|
|
6731
6769
|
const ends = steps.flatMap((step) => [step.startValue, step.endValue]);
|
|
6770
|
+
const range = extentOf(ends);
|
|
6732
6771
|
model.valueAxis = {
|
|
6733
|
-
...ends.length ? niceScale(
|
|
6772
|
+
...ends.length ? niceScale(range.min, range.max) : niceScale(0, 1),
|
|
6734
6773
|
percent: false
|
|
6735
6774
|
};
|
|
6736
6775
|
const labels = model.categories;
|
|
@@ -6846,7 +6885,8 @@ function chartSummaryView(chart, theme, options2 = {}) {
|
|
|
6846
6885
|
s.xValues = s.values.map((_, k) => numeric ? toNumber(cats[k] ?? null) : k + 1);
|
|
6847
6886
|
});
|
|
6848
6887
|
const xs = series.flatMap((s) => s.xValues ?? []).filter((x) => x !== null);
|
|
6849
|
-
|
|
6888
|
+
const range = extentOf(xs);
|
|
6889
|
+
model.xAxis = xs.length ? niceScale(range.min, range.max) : niceScale(0, 1);
|
|
6850
6890
|
}
|
|
6851
6891
|
if (type === "stock") model.stock = stockView(chart.stock, ctx);
|
|
6852
6892
|
if (type === "bubble") bubbleView(chart, model, ctx.evaluateRef);
|
|
@@ -6878,7 +6918,7 @@ function cartesianAxes(model, area, out) {
|
|
|
6878
6918
|
const cats = Math.max(1, model.categories.length);
|
|
6879
6919
|
const catW = Math.min(
|
|
6880
6920
|
area.w * 0.3,
|
|
6881
|
-
Math.max(
|
|
6921
|
+
Math.max(extentOf(model.categories.map((c2) => textWidth(c2, categorySize))).max, 8) + 6
|
|
6882
6922
|
);
|
|
6883
6923
|
const second = horizontal ? void 0 : model.secondaryAxis;
|
|
6884
6924
|
const secondLabels = second?.ticks.map((t) => axisTickText(t, model.axes?.secondary, second.percent)) ?? [];
|
|
@@ -7571,13 +7611,11 @@ function chartLegendSvg(model, area, frame, options2) {
|
|
|
7571
7611
|
chartAreaRect(model, "legend", { x: manual.x, y: manual.y, w: manual.width, h: manual.height })
|
|
7572
7612
|
];
|
|
7573
7613
|
const baselineOffset = font ? (font.ascent - font.descent) / 2 : size * 0.35;
|
|
7614
|
+
const widest = extentOf(widths).max;
|
|
7574
7615
|
entries.forEach((entry3, i) => {
|
|
7575
7616
|
const available = horizontal ? chartTextWidth(entry3.label, attrs, options2) : Math.max(0, rowWidth - size / 2 - keySize - keyGap);
|
|
7576
7617
|
const label = fitChartText(entry3.label, available, attrs, options2);
|
|
7577
|
-
const contentWidth = Math.min(
|
|
7578
|
-
horizontal ? widths[i] ?? 0 : Math.max(...widths),
|
|
7579
|
-
rowWidth - size / 2
|
|
7580
|
-
);
|
|
7618
|
+
const contentWidth = Math.min(horizontal ? widths[i] ?? 0 : widest, rowWidth - size / 2);
|
|
7581
7619
|
const x = horizontal ? horizontalX : manual.x + Math.max(size / 4, (rowWidth - contentWidth) / 2);
|
|
7582
7620
|
const centerY = manual.y + (horizontal ? 0 : i * rowHeight) + rowHeight / 2;
|
|
7583
7621
|
markup.push(rect(x, centerY - keySize / 2, keySize, keySize, entry3.color));
|
|
@@ -7649,7 +7687,7 @@ function automaticLegend(model, area, out, options2, bounds) {
|
|
|
7649
7687
|
}
|
|
7650
7688
|
const width = Math.min(
|
|
7651
7689
|
area.w * 0.35,
|
|
7652
|
-
|
|
7690
|
+
extentOf(entries.map((e) => chartTextWidth(e.label, attrs, options2))).max + 22
|
|
7653
7691
|
);
|
|
7654
7692
|
const height = entries.length * rowH;
|
|
7655
7693
|
const x = pos === "l" ? area.x + 4 : area.x + area.w - width;
|
package/dist/chart/index.mjs
CHANGED
|
@@ -607,6 +607,17 @@ function formatCompactAxisValue(value, formatCode) {
|
|
|
607
607
|
return value.toFixed(1);
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
+
// chart/extent.ts
|
|
611
|
+
function extentOf(values) {
|
|
612
|
+
let min = Infinity;
|
|
613
|
+
let max = -Infinity;
|
|
614
|
+
for (const value of values) {
|
|
615
|
+
min = Math.min(min, value);
|
|
616
|
+
max = Math.max(max, value);
|
|
617
|
+
}
|
|
618
|
+
return { min, max };
|
|
619
|
+
}
|
|
620
|
+
|
|
610
621
|
// chart/bubble-radius.ts
|
|
611
622
|
function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options2) {
|
|
612
623
|
const scale = (options2?.bubbleScale ?? 100) / 100;
|
|
@@ -617,7 +628,7 @@ function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options2) {
|
|
|
617
628
|
return medianRadius * scale * 0.5 + ratio * medianRadius * scale * 1.5;
|
|
618
629
|
}
|
|
619
630
|
function maxBubbleSize(sizes) {
|
|
620
|
-
return
|
|
631
|
+
return Math.max(1, extentOf(sizes.map(Math.abs)).max);
|
|
621
632
|
}
|
|
622
633
|
function medianBubbleRadius(plotWidth, plotHeight) {
|
|
623
634
|
return Math.min(plotWidth, plotHeight) * 0.04;
|
|
@@ -1036,8 +1047,7 @@ function computeHistogramBins(values, options2, format = String) {
|
|
|
1036
1047
|
});
|
|
1037
1048
|
}
|
|
1038
1049
|
if (regular.length > 0) {
|
|
1039
|
-
const min =
|
|
1040
|
-
const max = Math.max(...regular.map((item) => item.value));
|
|
1050
|
+
const { min, max } = extentOf(regular.map((item) => item.value));
|
|
1041
1051
|
const requestedSize = options2.binSize && options2.binSize > 0 ? options2.binSize : void 0;
|
|
1042
1052
|
const requestedCount = options2.binCount && options2.binCount > 0 ? options2.binCount : void 0;
|
|
1043
1053
|
const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
|
|
@@ -1253,8 +1263,9 @@ function fitChartTrendline(options2, xVals, yVals) {
|
|
|
1253
1263
|
}
|
|
1254
1264
|
const model = fitModel(options2, xVals, yVals);
|
|
1255
1265
|
if (!model) return noFit();
|
|
1256
|
-
const
|
|
1257
|
-
const
|
|
1266
|
+
const xRange = extentOf(xVals);
|
|
1267
|
+
const startX = xRange.min - (options2.backward ?? 0);
|
|
1268
|
+
const endX = xRange.max + (options2.forward ?? 0);
|
|
1258
1269
|
const steps = Math.max(Math.ceil((endX - startX) * 4), 20);
|
|
1259
1270
|
const points = [];
|
|
1260
1271
|
for (let step = 0; step <= steps; step++) {
|
|
@@ -1861,6 +1872,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1861
1872
|
maxDepth: 512,
|
|
1862
1873
|
maxNodes: 5e6
|
|
1863
1874
|
};
|
|
1875
|
+
var XmlLimitError = class extends Error {
|
|
1876
|
+
code = "xml-limit";
|
|
1877
|
+
/** The limit that was exceeded. */
|
|
1878
|
+
limit;
|
|
1879
|
+
/** Its value: the largest depth or element count allowed. */
|
|
1880
|
+
maximum;
|
|
1881
|
+
constructor(message, limit, maximum) {
|
|
1882
|
+
super(message);
|
|
1883
|
+
this.name = "XmlLimitError";
|
|
1884
|
+
this.limit = limit;
|
|
1885
|
+
this.maximum = maximum;
|
|
1886
|
+
}
|
|
1887
|
+
};
|
|
1864
1888
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
1865
1889
|
var MARKUP_SKIPS = [
|
|
1866
1890
|
["<!--", "-->"],
|
|
@@ -1894,11 +1918,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
1894
1918
|
continue;
|
|
1895
1919
|
}
|
|
1896
1920
|
nodes++;
|
|
1897
|
-
if (nodes > maxNodes)
|
|
1921
|
+
if (nodes > maxNodes)
|
|
1922
|
+
throw new XmlLimitError(
|
|
1923
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
1924
|
+
"maxNodes",
|
|
1925
|
+
maxNodes
|
|
1926
|
+
);
|
|
1898
1927
|
if (!selfClosing && ++depth > maxDepth)
|
|
1899
|
-
throw new
|
|
1928
|
+
throw new XmlLimitError(
|
|
1929
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
1930
|
+
"maxDepth",
|
|
1931
|
+
maxDepth
|
|
1932
|
+
);
|
|
1900
1933
|
}
|
|
1901
1934
|
}
|
|
1935
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
1936
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
1902
1937
|
function parseXml(xml, options2 = {}) {
|
|
1903
1938
|
const label = options2.label ?? "OOXML";
|
|
1904
1939
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -1920,9 +1955,13 @@ function parseXml(xml, options2 = {}) {
|
|
|
1920
1955
|
}
|
|
1921
1956
|
if (parseError || !parsed.documentElement)
|
|
1922
1957
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
1958
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
1923
1959
|
return parsed;
|
|
1924
1960
|
}
|
|
1925
|
-
var buildXml = (node) =>
|
|
1961
|
+
var buildXml = (node) => {
|
|
1962
|
+
const xml = new XMLSerializer().serializeToString(node);
|
|
1963
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
1964
|
+
};
|
|
1926
1965
|
var isElement = (node) => node.nodeType === 1;
|
|
1927
1966
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
1928
1967
|
function named(element, local, ns, lenient = true) {
|
|
@@ -6111,8 +6150,7 @@ function computeLogValueRange(series, logBase) {
|
|
|
6111
6150
|
if (allValues.length === 0) {
|
|
6112
6151
|
return { min: 1, max: logBase, span: 1, logScale: true, logBase };
|
|
6113
6152
|
}
|
|
6114
|
-
const dataMin =
|
|
6115
|
-
const dataMax = Math.max(...allValues);
|
|
6153
|
+
const { min: dataMin, max: dataMax } = extentOf(allValues);
|
|
6116
6154
|
const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
|
|
6117
6155
|
const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
|
|
6118
6156
|
const min = logBase ** logMin;
|
|
@@ -6727,8 +6765,9 @@ function waterfallView(chart, model, ctx) {
|
|
|
6727
6765
|
colors: { increase: role(0), decrease: role(1), total: role(2) }
|
|
6728
6766
|
};
|
|
6729
6767
|
const ends = steps.flatMap((step) => [step.startValue, step.endValue]);
|
|
6768
|
+
const range = extentOf(ends);
|
|
6730
6769
|
model.valueAxis = {
|
|
6731
|
-
...ends.length ? niceScale(
|
|
6770
|
+
...ends.length ? niceScale(range.min, range.max) : niceScale(0, 1),
|
|
6732
6771
|
percent: false
|
|
6733
6772
|
};
|
|
6734
6773
|
const labels = model.categories;
|
|
@@ -6844,7 +6883,8 @@ function chartSummaryView(chart, theme, options2 = {}) {
|
|
|
6844
6883
|
s.xValues = s.values.map((_, k) => numeric ? toNumber(cats[k] ?? null) : k + 1);
|
|
6845
6884
|
});
|
|
6846
6885
|
const xs = series.flatMap((s) => s.xValues ?? []).filter((x) => x !== null);
|
|
6847
|
-
|
|
6886
|
+
const range = extentOf(xs);
|
|
6887
|
+
model.xAxis = xs.length ? niceScale(range.min, range.max) : niceScale(0, 1);
|
|
6848
6888
|
}
|
|
6849
6889
|
if (type === "stock") model.stock = stockView(chart.stock, ctx);
|
|
6850
6890
|
if (type === "bubble") bubbleView(chart, model, ctx.evaluateRef);
|
|
@@ -6876,7 +6916,7 @@ function cartesianAxes(model, area, out) {
|
|
|
6876
6916
|
const cats = Math.max(1, model.categories.length);
|
|
6877
6917
|
const catW = Math.min(
|
|
6878
6918
|
area.w * 0.3,
|
|
6879
|
-
Math.max(
|
|
6919
|
+
Math.max(extentOf(model.categories.map((c2) => textWidth(c2, categorySize))).max, 8) + 6
|
|
6880
6920
|
);
|
|
6881
6921
|
const second = horizontal ? void 0 : model.secondaryAxis;
|
|
6882
6922
|
const secondLabels = second?.ticks.map((t) => axisTickText(t, model.axes?.secondary, second.percent)) ?? [];
|
|
@@ -7569,13 +7609,11 @@ function chartLegendSvg(model, area, frame, options2) {
|
|
|
7569
7609
|
chartAreaRect(model, "legend", { x: manual.x, y: manual.y, w: manual.width, h: manual.height })
|
|
7570
7610
|
];
|
|
7571
7611
|
const baselineOffset = font ? (font.ascent - font.descent) / 2 : size * 0.35;
|
|
7612
|
+
const widest = extentOf(widths).max;
|
|
7572
7613
|
entries.forEach((entry3, i) => {
|
|
7573
7614
|
const available = horizontal ? chartTextWidth(entry3.label, attrs, options2) : Math.max(0, rowWidth - size / 2 - keySize - keyGap);
|
|
7574
7615
|
const label = fitChartText(entry3.label, available, attrs, options2);
|
|
7575
|
-
const contentWidth = Math.min(
|
|
7576
|
-
horizontal ? widths[i] ?? 0 : Math.max(...widths),
|
|
7577
|
-
rowWidth - size / 2
|
|
7578
|
-
);
|
|
7616
|
+
const contentWidth = Math.min(horizontal ? widths[i] ?? 0 : widest, rowWidth - size / 2);
|
|
7579
7617
|
const x = horizontal ? horizontalX : manual.x + Math.max(size / 4, (rowWidth - contentWidth) / 2);
|
|
7580
7618
|
const centerY = manual.y + (horizontal ? 0 : i * rowHeight) + rowHeight / 2;
|
|
7581
7619
|
markup.push(rect(x, centerY - keySize / 2, keySize, keySize, entry3.color));
|
|
@@ -7647,7 +7685,7 @@ function automaticLegend(model, area, out, options2, bounds) {
|
|
|
7647
7685
|
}
|
|
7648
7686
|
const width = Math.min(
|
|
7649
7687
|
area.w * 0.35,
|
|
7650
|
-
|
|
7688
|
+
extentOf(entries.map((e) => chartTextWidth(e.label, attrs, options2))).max + 22
|
|
7651
7689
|
);
|
|
7652
7690
|
const height = entries.length * rowH;
|
|
7653
7691
|
const x = pos === "l" ? area.x + 4 : area.x + area.w - width;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-svg-cartesian.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-svg-cartesian.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-svg-cartesian.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-svg-cartesian.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAInE,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,2CAA2C;IAC3C,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7B,wEAAwE;IACxE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAClC;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,SAAS,CAoJjG;AAED,yDAAyD;AACzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAMlE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAqEtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-svg-legend.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-svg-legend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-svg-legend.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-svg-legend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,0BAA0B,CAAC;AAIlC,kFAAkF;AAClF,wBAAgB,cAAc,CAC7B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACxC,OAAO,EAAE,eAAe,GACtB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAyDrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-view-ex.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-view-ex.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGvE,OAAO,KAAK,EAAkB,cAAc,EAAiB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-view-ex.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-view-ex.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGvE,OAAO,KAAK,EAAkB,cAAc,EAAiB,MAAM,cAAc,CAAC;AAIlF,OAAO,EAAc,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAElE,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,2EAA2E;IAC3E,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D;AAgBD,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,CAAC,SAAS,kBAAkB,EAC1D,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,EACrB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,IAAI,GAC3C,IAAI,CAkBN;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAiB1D;AAED,8FAA8F;AAC9F,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EACzD,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,GACnB,IAAI,CAmBN;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EACzD,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,cAAc,GACnB,IAAI,CAeN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-view.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-view.d.ts","sourceRoot":"","sources":["../../../chart/render/chart-view.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trendline-fit.d.ts","sourceRoot":"","sources":["../../chart/trendline-fit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"trendline-fit.d.ts","sourceRoot":"","sources":["../../chart/trendline-fit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAW3D,4FAA4F;AAC5F,MAAM,WAAW,wBAAwB;IACxC,IAAI,EAAE,kBAAkB,CAAC;IACzB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,0BAA0B;AAC1B,MAAM,WAAW,iBAAiB;IACjC,0FAA0F;IAC1F,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AA8FD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,EAAE,SAAS,MAAM,EAAE,GACtB,iBAAiB,CA+BnB"}
|
|
@@ -2848,10 +2848,13 @@ var DEFAULT_ZIP_LIMITS = {
|
|
|
2848
2848
|
var ZipLimitError = class extends Error {
|
|
2849
2849
|
code = "ZIP_BOMB";
|
|
2850
2850
|
limit;
|
|
2851
|
+
/** The check that failed (absent when the error was built without one). */
|
|
2852
|
+
kind;
|
|
2851
2853
|
constructor(message, details) {
|
|
2852
2854
|
super(message);
|
|
2853
2855
|
this.name = "ZipLimitError";
|
|
2854
2856
|
this.limit = details.limit;
|
|
2857
|
+
this.kind = details.kind;
|
|
2855
2858
|
}
|
|
2856
2859
|
};
|
|
2857
2860
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -2874,7 +2877,7 @@ function resolveLimits(limits) {
|
|
|
2874
2877
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
2875
2878
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
2876
2879
|
label: limits.label ?? "ZIP",
|
|
2877
|
-
fail: (message, limit) => create ? create(message, { limit }) : new ZipLimitError(message, { limit })
|
|
2880
|
+
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
2878
2881
|
};
|
|
2879
2882
|
}
|
|
2880
2883
|
function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -2897,13 +2900,18 @@ function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
|
2897
2900
|
size += chunk2.byteLength;
|
|
2898
2901
|
if (size > declared || size > r.maxEntryBytes)
|
|
2899
2902
|
return abort(
|
|
2900
|
-
r.fail(
|
|
2903
|
+
r.fail(
|
|
2904
|
+
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
2905
|
+
r.maxEntryBytes,
|
|
2906
|
+
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
2907
|
+
)
|
|
2901
2908
|
);
|
|
2902
2909
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
2903
2910
|
return abort(
|
|
2904
2911
|
r.fail(
|
|
2905
2912
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
2906
|
-
r.maxTotalBytes
|
|
2913
|
+
r.maxTotalBytes,
|
|
2914
|
+
"maxTotalBytes"
|
|
2907
2915
|
)
|
|
2908
2916
|
);
|
|
2909
2917
|
chunks.push(chunk2);
|
|
@@ -2936,26 +2944,29 @@ function guardZip(zip, limits = {}) {
|
|
|
2936
2944
|
if (entries.length > r.maxEntries)
|
|
2937
2945
|
throw r.fail(
|
|
2938
2946
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
2939
|
-
r.maxEntries
|
|
2947
|
+
r.maxEntries,
|
|
2948
|
+
"maxEntries"
|
|
2940
2949
|
);
|
|
2941
2950
|
let declared = 0;
|
|
2942
2951
|
for (const entry of entries) {
|
|
2943
2952
|
const original = entry.unsafeOriginalName;
|
|
2944
2953
|
if (!isSafePartName(entry.name) || original !== void 0 && !isSafePartName(original))
|
|
2945
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
2954
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
2946
2955
|
if (entry.dir) continue;
|
|
2947
2956
|
const size = declaredEntrySize(entry);
|
|
2948
2957
|
if (size > r.maxEntryBytes)
|
|
2949
2958
|
throw r.fail(
|
|
2950
2959
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
2951
|
-
r.maxEntryBytes
|
|
2960
|
+
r.maxEntryBytes,
|
|
2961
|
+
"maxEntryBytes"
|
|
2952
2962
|
);
|
|
2953
2963
|
declared += size;
|
|
2954
2964
|
}
|
|
2955
2965
|
if (declared > r.maxTotalBytes)
|
|
2956
2966
|
throw r.fail(
|
|
2957
2967
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
2958
|
-
r.maxTotalBytes
|
|
2968
|
+
r.maxTotalBytes,
|
|
2969
|
+
"maxTotalBytes"
|
|
2959
2970
|
);
|
|
2960
2971
|
const produced = /* @__PURE__ */ new Map();
|
|
2961
2972
|
let total = 0;
|
|
@@ -2993,7 +3004,8 @@ async function openZip(input, limits = {}) {
|
|
|
2993
3004
|
if (bytes.byteLength > maxInput)
|
|
2994
3005
|
throw r.fail(
|
|
2995
3006
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
2996
|
-
maxInput
|
|
3007
|
+
maxInput,
|
|
3008
|
+
"maxInputBytes"
|
|
2997
3009
|
);
|
|
2998
3010
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
2999
3011
|
}
|
|
@@ -29124,6 +29136,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
29124
29136
|
maxDepth: 512,
|
|
29125
29137
|
maxNodes: 5e6
|
|
29126
29138
|
};
|
|
29139
|
+
var XmlLimitError = class extends Error {
|
|
29140
|
+
code = "xml-limit";
|
|
29141
|
+
/** The limit that was exceeded. */
|
|
29142
|
+
limit;
|
|
29143
|
+
/** Its value: the largest depth or element count allowed. */
|
|
29144
|
+
maximum;
|
|
29145
|
+
constructor(message, limit, maximum) {
|
|
29146
|
+
super(message);
|
|
29147
|
+
this.name = "XmlLimitError";
|
|
29148
|
+
this.limit = limit;
|
|
29149
|
+
this.maximum = maximum;
|
|
29150
|
+
}
|
|
29151
|
+
};
|
|
29127
29152
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
29128
29153
|
var MARKUP_SKIPS = [
|
|
29129
29154
|
["<!--", "-->"],
|
|
@@ -29157,11 +29182,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
29157
29182
|
continue;
|
|
29158
29183
|
}
|
|
29159
29184
|
nodes++;
|
|
29160
|
-
if (nodes > maxNodes)
|
|
29185
|
+
if (nodes > maxNodes)
|
|
29186
|
+
throw new XmlLimitError(
|
|
29187
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
29188
|
+
"maxNodes",
|
|
29189
|
+
maxNodes
|
|
29190
|
+
);
|
|
29161
29191
|
if (!selfClosing && ++depth > maxDepth2)
|
|
29162
|
-
throw new
|
|
29192
|
+
throw new XmlLimitError(
|
|
29193
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth2}`,
|
|
29194
|
+
"maxDepth",
|
|
29195
|
+
maxDepth2
|
|
29196
|
+
);
|
|
29163
29197
|
}
|
|
29164
29198
|
}
|
|
29199
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
29200
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
29165
29201
|
function parseXml(xml, options = {}) {
|
|
29166
29202
|
const label = options.label ?? "OOXML";
|
|
29167
29203
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -29183,9 +29219,13 @@ function parseXml(xml, options = {}) {
|
|
|
29183
29219
|
}
|
|
29184
29220
|
if (parseError || !parsed.documentElement)
|
|
29185
29221
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
29222
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
29186
29223
|
return parsed;
|
|
29187
29224
|
}
|
|
29188
|
-
var buildXml = (node) =>
|
|
29225
|
+
var buildXml = (node) => {
|
|
29226
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node);
|
|
29227
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
29228
|
+
};
|
|
29189
29229
|
var isElement = (node) => node.nodeType === 1;
|
|
29190
29230
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
29191
29231
|
function named(element, local, ns, lenient = true) {
|
|
@@ -44045,7 +44085,7 @@ function getShapeType(shapeType) {
|
|
|
44045
44085
|
if (normalized === "downarrow") {
|
|
44046
44086
|
return "downArrow";
|
|
44047
44087
|
}
|
|
44048
|
-
if (normalized.includes("connector")) {
|
|
44088
|
+
if (normalized.includes("connector") && !normalized.startsWith("flowchart")) {
|
|
44049
44089
|
return "connector";
|
|
44050
44090
|
}
|
|
44051
44091
|
if (PRESET_SHAPE_CLIP_PATHS[normalized] !== void 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openNestedZip, openPptxZip } from './chunk-
|
|
1
|
+
import { openNestedZip, openPptxZip } from './chunk-GBKBR4CX.mjs';
|
|
2
2
|
import { cloneTextStyle, cloneElement, cloneXmlObject, parseOrderedWhen } from './chunk-54S5A5PZ.mjs';
|
|
3
3
|
import { themeColorRefToSolidFillWithOpacity, normalizeHexColor, parseDrawingFraction, toHex, scrgbLinearToSrgb8, applyDrawingColorTransforms, parseDrawingHueDegrees, parseDrawingPercent, hslToRgb, clampUnitInterval, parseOoxmlPercent, resolveThemeColorRef } from './chunk-KII4AAYH.mjs';
|
|
4
4
|
import { XMLBuilder, XMLParser } from 'fast-xml-parser';
|
|
@@ -12494,7 +12494,7 @@ function getShapeType(shapeType) {
|
|
|
12494
12494
|
if (normalized === "downarrow") {
|
|
12495
12495
|
return "downArrow";
|
|
12496
12496
|
}
|
|
12497
|
-
if (normalized.includes("connector")) {
|
|
12497
|
+
if (normalized.includes("connector") && !normalized.startsWith("flowchart")) {
|
|
12498
12498
|
return "connector";
|
|
12499
12499
|
}
|
|
12500
12500
|
if (PRESET_SHAPE_CLIP_PATHS[normalized] !== void 0) {
|
|
@@ -21818,7 +21818,7 @@ function findTextBearingElementById(elements3, elementId) {
|
|
|
21818
21818
|
}
|
|
21819
21819
|
async function loadNestedDeck(pptxBytes) {
|
|
21820
21820
|
try {
|
|
21821
|
-
const { PptxHandler } = await import('./PptxHandler-
|
|
21821
|
+
const { PptxHandler } = await import('./PptxHandler-FSKKPZZC.mjs');
|
|
21822
21822
|
const handler = new PptxHandler();
|
|
21823
21823
|
const data = await handler.load(pptxBytes.buffer.slice(0));
|
|
21824
21824
|
return { handler, slides: data.slides };
|
|
@@ -38777,6 +38777,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
38777
38777
|
maxDepth: 512,
|
|
38778
38778
|
maxNodes: 5e6
|
|
38779
38779
|
};
|
|
38780
|
+
var XmlLimitError = class extends Error {
|
|
38781
|
+
code = "xml-limit";
|
|
38782
|
+
/** The limit that was exceeded. */
|
|
38783
|
+
limit;
|
|
38784
|
+
/** Its value: the largest depth or element count allowed. */
|
|
38785
|
+
maximum;
|
|
38786
|
+
constructor(message, limit, maximum) {
|
|
38787
|
+
super(message);
|
|
38788
|
+
this.name = "XmlLimitError";
|
|
38789
|
+
this.limit = limit;
|
|
38790
|
+
this.maximum = maximum;
|
|
38791
|
+
}
|
|
38792
|
+
};
|
|
38780
38793
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
38781
38794
|
var MARKUP_SKIPS = [
|
|
38782
38795
|
["<!--", "-->"],
|
|
@@ -38810,11 +38823,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
38810
38823
|
continue;
|
|
38811
38824
|
}
|
|
38812
38825
|
nodes++;
|
|
38813
|
-
if (nodes > maxNodes)
|
|
38826
|
+
if (nodes > maxNodes)
|
|
38827
|
+
throw new XmlLimitError(
|
|
38828
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
38829
|
+
"maxNodes",
|
|
38830
|
+
maxNodes
|
|
38831
|
+
);
|
|
38814
38832
|
if (!selfClosing && ++depth > maxDepth2)
|
|
38815
|
-
throw new
|
|
38833
|
+
throw new XmlLimitError(
|
|
38834
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth2}`,
|
|
38835
|
+
"maxDepth",
|
|
38836
|
+
maxDepth2
|
|
38837
|
+
);
|
|
38816
38838
|
}
|
|
38817
38839
|
}
|
|
38840
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
38841
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
38818
38842
|
function parseXml(xml, options = {}) {
|
|
38819
38843
|
const label = options.label ?? "OOXML";
|
|
38820
38844
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -38836,9 +38860,13 @@ function parseXml(xml, options = {}) {
|
|
|
38836
38860
|
}
|
|
38837
38861
|
if (parseError || !parsed.documentElement)
|
|
38838
38862
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
38863
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
38839
38864
|
return parsed;
|
|
38840
38865
|
}
|
|
38841
|
-
var buildXml = (node) =>
|
|
38866
|
+
var buildXml = (node) => {
|
|
38867
|
+
const xml = new XMLSerializer().serializeToString(node);
|
|
38868
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
38869
|
+
};
|
|
38842
38870
|
var isElement = (node) => node.nodeType === 1;
|
|
38843
38871
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
38844
38872
|
function named(element, local, ns, lenient = true) {
|
|
@@ -50482,20 +50510,29 @@ var FONT_STYLE_SUFFIX_TOKENS = /* @__PURE__ */ new Set([
|
|
|
50482
50510
|
"italic",
|
|
50483
50511
|
"oblique"
|
|
50484
50512
|
]);
|
|
50513
|
+
var FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
|
|
50514
|
+
var FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
|
|
50485
50515
|
function stripFontStyleSuffix(fontName) {
|
|
50486
50516
|
let name = fontName.trim();
|
|
50487
50517
|
let stripped = false;
|
|
50488
|
-
|
|
50518
|
+
let previous = "";
|
|
50519
|
+
let tokens = 0;
|
|
50520
|
+
for (; ; ) {
|
|
50489
50521
|
const idx = name.lastIndexOf(" ");
|
|
50490
50522
|
if (idx <= 0) {
|
|
50491
50523
|
break;
|
|
50492
50524
|
}
|
|
50493
50525
|
const token = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
|
|
50494
|
-
|
|
50526
|
+
const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
|
|
50527
|
+
if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token))) {
|
|
50495
50528
|
break;
|
|
50496
50529
|
}
|
|
50497
50530
|
name = name.slice(0, idx).trim();
|
|
50498
50531
|
stripped = true;
|
|
50532
|
+
previous = prefix ? "" : token;
|
|
50533
|
+
if (!prefix) {
|
|
50534
|
+
tokens++;
|
|
50535
|
+
}
|
|
50499
50536
|
}
|
|
50500
50537
|
return stripped && name.length > 0 ? name : void 0;
|
|
50501
50538
|
}
|