ooxml-core 1.36.0 → 1.37.1
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-2JSQ22VD.cjs +14 -0
- package/dist/{PptxHandler-XCYX5DVX.mjs → PptxHandler-3T5DTNKA.mjs} +2 -2
- package/dist/PptxHandler-7T7ZS7IK.mjs +5 -0
- package/dist/{PresentationBuilder-JBTNOIL7.mjs → PresentationBuilder-D6ZICJWN.mjs} +3 -3
- package/dist/{PresentationBuilder-HA56ZY23.cjs → PresentationBuilder-HCMXZQDK.cjs} +6 -6
- package/dist/{PresentationBuilder-IVLUEB4K.mjs → PresentationBuilder-XHKNDJMD.mjs} +2 -2
- package/dist/automation/index.cjs +21750 -19661
- package/dist/automation/index.mjs +21731 -19661
- package/dist/chart/index.cjs +1 -1
- package/dist/chart/index.mjs +1 -1
- package/dist/chart/region-map/index.cjs +1 -1
- package/dist/chart/region-map/index.mjs +1 -1
- package/dist/{chunk-UQMAPY6D.mjs → chunk-2TQJHNVU.mjs} +1 -1
- package/dist/{chunk-RI56PFGL.mjs → chunk-4YBSHQ76.mjs} +5 -5
- package/dist/{chunk-XF6ZRA2D.cjs → chunk-AFALJ5TA.cjs} +3 -3
- package/dist/{chunk-MK2IBZU6.mjs → chunk-CNIKTXAV.mjs} +1 -1
- package/dist/{chunk-PA5ADSTX.cjs → chunk-GZOYXHDF.cjs} +1269 -1269
- package/dist/{chunk-LSO5SSFX.mjs → chunk-H2Q42P6P.mjs} +1 -1
- package/dist/{chunk-EGBNPVBA.mjs → chunk-J43V3QOA.mjs} +2 -2
- package/dist/{chunk-TJXK4D4U.mjs → chunk-M2DFN3SP.mjs} +4 -4
- package/dist/{chunk-RPJHMPEL.mjs → chunk-OEM2ECAJ.mjs} +1 -1
- package/dist/{chunk-GNGL4BO7.mjs → chunk-RHQQS6LJ.mjs} +4 -4
- package/dist/{chunk-A27O7M5X.cjs → chunk-SNID2FDY.cjs} +1 -1
- package/dist/{chunk-EDRS3OSM.mjs → chunk-WNAPUUAT.mjs} +1 -0
- package/dist/color/theme-palette.d.ts +1 -1
- package/dist/color/theme-palette.d.ts.map +1 -1
- package/dist/crypto/index.cjs +1 -1
- package/dist/crypto/index.mjs +1 -1
- package/dist/diagram/index.cjs +1 -1
- package/dist/diagram/index.mjs +1 -1
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/comment-parts.d.ts +33 -0
- package/dist/docx/comment-parts.d.ts.map +1 -0
- package/dist/docx/comments.d.ts +5 -2
- package/dist/docx/comments.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +15231 -14731
- package/dist/docx/embedded.mjs +15231 -14731
- package/dist/docx/glossary.d.ts.map +1 -1
- package/dist/docx/index.cjs +10771 -10329
- package/dist/docx/index.mjs +10771 -10329
- package/dist/docx/layout/index.cjs +81 -73
- package/dist/docx/layout/index.mjs +81 -73
- package/dist/docx/load/index.cjs +16891 -16391
- package/dist/docx/load/index.mjs +16891 -16391
- package/dist/docx/page-background.d.ts +4 -3
- package/dist/docx/page-background.d.ts.map +1 -1
- package/dist/docx/paragraph-text.d.ts +5 -0
- package/dist/docx/paragraph-text.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/special-characters.d.ts +2 -0
- package/dist/docx/special-characters.d.ts.map +1 -1
- package/dist/docx/theme-color.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +135 -135
- package/dist/docx/ui/index.mjs +135 -135
- package/dist/docx/write-comment-identities.d.ts +8 -0
- package/dist/docx/write-comment-identities.d.ts.map +1 -0
- package/dist/docx/write-comment-metadata.d.ts +12 -0
- package/dist/docx/write-comment-metadata.d.ts.map +1 -0
- package/dist/docx/write-comment-text.d.ts +3 -0
- package/dist/docx/write-comment-text.d.ts.map +1 -0
- package/dist/docx/write-comments.d.ts +1 -4
- package/dist/docx/write-comments.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +1 -1
- package/dist/drawingml/index.mjs +1 -1
- package/dist/index.cjs +110 -6
- package/dist/index.mjs +91 -6
- package/dist/math/index.cjs +1 -1
- package/dist/math/index.mjs +1 -1
- package/dist/opc/index.cjs +78 -3
- package/dist/opc/index.mjs +78 -3
- package/dist/opc/signature/index.d.ts +1 -0
- package/dist/opc/signature/index.d.ts.map +1 -1
- package/dist/opc/signature/package.d.ts +12 -0
- package/dist/opc/signature/package.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +21 -4
- package/dist/pptx/automation/index.d.ts +9 -17
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +16 -6
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/index.cjs +1 -0
- package/dist/pptx/automation/schemas/index.d.ts +1 -3
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/index.mjs +1 -1
- package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.cjs +1 -0
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts +2 -3
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.mjs +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -3
- package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
- package/dist/pptx/chunks/{collaboration-text-codec-Du_XeE_i.d.ts → collaboration-text-codec-1VmwD3yq.d.ts} +1 -3
- package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-merge-DWWWdT_t.d.ts → collaboration-text-merge-B-tth-0W.d.ts} +2 -4
- package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-positions-MMT3GkZi.d.ts → collaboration-text-positions-D-1Jo1Fz.d.ts} +1 -3
- package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-session-D0NOLQk7.d.ts → collaboration-text-session-CWHTaWF4.d.ts} +4 -6
- package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts.map +1 -0
- package/dist/pptx/chunks/{collaboration-text-session-delta-CzJGrTKJ.d.ts → collaboration-text-session-delta-Dxzybssp.d.ts} +2 -4
- package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts.map +1 -0
- package/dist/pptx/chunks/{color-ref-DT599vEx.d.ts → color-ref-CwUQoKPJ.d.ts} +1 -3
- package/dist/pptx/chunks/color-ref-CwUQoKPJ.d.ts.map +1 -0
- package/dist/pptx/chunks/{elements-f3UbFph-.d.ts → elements-DheCTwi0.d.ts} +4 -54
- package/dist/pptx/chunks/elements-DheCTwi0.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Bp-1pGo1.d.ts → index-B4ofjG6_.d.ts} +6 -384
- package/dist/pptx/chunks/index-B4ofjG6_.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-pLLN4OTz.d.ts → index-DC5m1m_8.d.ts} +8 -542
- package/dist/pptx/chunks/index-DC5m1m_8.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BnH2QjYm.d.ts → index-Jcce8TlI.d.ts} +5 -37
- package/dist/pptx/chunks/index-Jcce8TlI.d.ts.map +1 -0
- package/dist/pptx/chunks/{inspection-status-DjiWd_Aa.d.ts → inspection-status-TKac7eqb.d.ts} +1 -13
- package/dist/pptx/chunks/inspection-status-TKac7eqb.d.ts.map +1 -0
- package/dist/pptx/chunks/{schemas-fuDGetRe.d.ts → schemas-LHsDbVOw.d.ts} +1 -29
- package/dist/pptx/chunks/schemas-LHsDbVOw.d.ts.map +1 -0
- package/dist/pptx/chunks/{smart-art-CmOrPLLQ.d.ts → smart-art-DB37AsFP.d.ts} +2 -46
- package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-D5sgspO6.d.ts → text-operations-CdgEnFuK.d.ts} +4 -32
- package/dist/pptx/chunks/text-operations-CdgEnFuK.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-P9xVnXXf.d.ts → text-t_wJ2OwM.d.ts} +2 -12
- package/dist/pptx/chunks/text-t_wJ2OwM.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +10 -4
- package/dist/pptx/cli/index.d.ts +1 -3
- package/dist/pptx/cli/index.d.ts.map +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +7 -1
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/ai/table-merge.d.ts +0 -2
- package/dist/pptx/editor/ai/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/loader/element-patch-walker.d.ts +0 -2
- package/dist/pptx/editor/loader/element-patch-walker.d.ts.map +1 -1
- package/dist/pptx/editor/loader/is-external-url.d.ts +0 -2
- package/dist/pptx/editor/loader/is-external-url.d.ts.map +1 -1
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts +0 -2
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts.map +1 -1
- package/dist/pptx/editor/loader/load-content-helpers.d.ts +0 -2
- package/dist/pptx/editor/loader/load-content-helpers.d.ts.map +1 -1
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts +0 -2
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts +0 -2
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-list.d.ts +0 -2
- package/dist/pptx/editor/render/bullet-list.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-toggle.d.ts +0 -2
- package/dist/pptx/editor/render/bullet-toggle.d.ts.map +1 -1
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts +0 -2
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/clone.d.ts +0 -2
- package/dist/pptx/editor/render/clone.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-active-session.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-active-session.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-departure.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-departure.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-load-origin.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-load-origin.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.d.ts +4 -8
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-codec.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-lease.d.ts +0 -2
- package/dist/pptx/editor/render/collaboration-text-lease.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-merge.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +2 -4
- package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-positions.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-projection.d.ts +1 -3
- package/dist/pptx/editor/render/collaboration-text-projection.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts +3 -5
- package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -3
- package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-session.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts +2 -4
- package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts.map +1 -1
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.d.ts +0 -2
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/deck-save-encryption.d.ts +0 -2
- package/dist/pptx/editor/render/deck-save-encryption.d.ts.map +1 -1
- package/dist/pptx/editor/render/editor-history.d.ts +0 -2
- package/dist/pptx/editor/render/editor-history.d.ts.map +1 -1
- package/dist/pptx/editor/render/editor-mutations.d.ts +0 -2
- package/dist/pptx/editor/render/editor-mutations.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-locks.d.ts +0 -2
- package/dist/pptx/editor/render/element-locks.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-operations.d.ts +0 -2
- package/dist/pptx/editor/render/element-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/element.d.ts +0 -2
- package/dist/pptx/editor/render/element.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -4
- package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/font-family-update.d.ts +1 -3
- package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -1
- package/dist/pptx/editor/render/group-drill.d.ts +0 -2
- package/dist/pptx/editor/render/group-drill.d.ts.map +1 -1
- package/dist/pptx/editor/render/inline-list-body.d.ts +0 -2
- package/dist/pptx/editor/render/inline-list-body.d.ts.map +1 -1
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -3
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-empty-paragraph.d.ts +0 -2
- package/dist/pptx/editor/render/remap-empty-paragraph.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-paragraph-sources.d.ts +0 -2
- package/dist/pptx/editor/render/remap-paragraph-sources.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text-bullets.d.ts +0 -2
- package/dist/pptx/editor/render/remap-text-bullets.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text.d.ts +0 -2
- package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
- package/dist/pptx/editor/render/schema-label-keys.d.ts +0 -2
- package/dist/pptx/editor/render/schema-label-keys.d.ts.map +1 -1
- package/dist/pptx/editor/render/section-operations.d.ts +0 -2
- package/dist/pptx/editor/render/section-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-background-patch.d.ts +0 -2
- package/dist/pptx/editor/render/slide-background-patch.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.d.ts +0 -2
- package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/editor/render/slide-search.d.ts +0 -2
- package/dist/pptx/editor/render/slide-search.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +0 -2
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-transition-edits.d.ts +0 -2
- package/dist/pptx/editor/render/slide-transition-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-edit.d.ts +0 -2
- package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-merge.d.ts +0 -2
- package/dist/pptx/editor/render/table-cell-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts +0 -2
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.d.ts +0 -2
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-merge.d.ts +0 -2
- package/dist/pptx/editor/render/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-map-edits.d.ts +0 -2
- package/dist/pptx/editor/render/table-style-map-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/template-editing.d.ts +0 -2
- package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-content-style.d.ts +1 -3
- package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -4
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts +0 -2
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +2 -4
- package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-theme.d.ts +0 -2
- package/dist/pptx/editor/render/text-theme.d.ts.map +1 -1
- package/dist/pptx/editor/render/theme-editor-model.d.ts +0 -2
- package/dist/pptx/editor/render/theme-editor-model.d.ts.map +1 -1
- package/dist/pptx/editor/render/theme-editor-presets.d.ts +0 -2
- package/dist/pptx/editor/render/theme-editor-presets.d.ts.map +1 -1
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -3
- package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -1
- package/dist/pptx/index.cjs +10 -4
- package/dist/pptx/index.d.ts +9 -9
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -3
- package/dist/pptx/node/index.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.d.ts +1 -21
- package/dist/pptx/signature-node/index.d.ts.map +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +1 -7
- package/dist/pptx/smartart-layouts/index.d.ts.map +1 -1
- package/dist/pptx/ui/index.d.ts +2 -10
- package/dist/pptx/ui/index.d.ts.map +1 -1
- package/dist/teams/index.cjs +812 -95
- package/dist/teams/index.mjs +811 -95
- package/dist/visio/bevel-3d.d.ts +6 -10
- package/dist/visio/bevel-3d.d.ts.map +1 -1
- package/dist/visio/bevel-shading.d.ts +72 -0
- package/dist/visio/bevel-shading.d.ts.map +1 -0
- package/dist/visio/cff-recalc.d.ts.map +1 -1
- package/dist/visio/collab/index.cjs +1 -1
- package/dist/visio/collab/index.mjs +1 -1
- package/dist/visio/data-graphic-instance.d.ts +44 -0
- package/dist/visio/data-graphic-instance.d.ts.map +1 -0
- package/dist/visio/data-graphic-masters.d.ts +38 -0
- package/dist/visio/data-graphic-masters.d.ts.map +1 -0
- package/dist/visio/data-graphic-place.d.ts +34 -0
- package/dist/visio/data-graphic-place.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +3 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-data-graphic-guard.d.ts +13 -0
- package/dist/visio/edit-data-graphic-guard.d.ts.map +1 -0
- package/dist/visio/edit-data-graphic-owner.d.ts +9 -0
- package/dist/visio/edit-data-graphic-owner.d.ts.map +1 -0
- package/dist/visio/edit-data-graphic-refresh.d.ts +14 -0
- package/dist/visio/edit-data-graphic-refresh.d.ts.map +1 -0
- package/dist/visio/edit-data-graphic.d.ts +33 -0
- package/dist/visio/edit-data-graphic.d.ts.map +1 -0
- package/dist/visio/edit-formatting-text-commands.d.ts +8 -0
- package/dist/visio/edit-formatting-text-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-text-extra.d.ts +14 -0
- package/dist/visio/edit-formatting-text-extra.d.ts.map +1 -1
- package/dist/visio/edit-formatting-text.d.ts.map +1 -1
- package/dist/visio/edit-formatting.d.ts.map +1 -1
- package/dist/visio/edit-shape-data.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-cff.d.ts +28 -0
- package/dist/visio/edit-swimlane-cff.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-clone.d.ts +8 -4
- package/dist/visio/edit-swimlane-clone.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-layout.d.ts +6 -1
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-ops.d.ts.map +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/formula-analyze.d.ts.map +1 -1
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula.d.ts.map +1 -1
- package/dist/visio/index.cjs +2980 -1707
- package/dist/visio/index.d.ts +2 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +2971 -1708
- package/dist/visio/master-list.d.ts +3 -3
- package/dist/visio/master-list.d.ts.map +1 -1
- package/dist/visio/model.d.ts +6 -1
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/rotation-presets.d.ts +25 -0
- package/dist/visio/rotation-presets.d.ts.map +1 -0
- package/dist/visio/shape-structure.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts +2 -0
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/solid-3d.d.ts +9 -0
- package/dist/visio/solid-3d.d.ts.map +1 -1
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-config.d.ts +4 -19
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-items.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-native.d.ts +20 -0
- package/dist/visio/ui/data-graphic-native.d.ts.map +1 -0
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +3130 -1821
- package/dist/visio/ui/index.mjs +3128 -1822
- package/dist/visio/ui/org-chart-belt.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/swimlane.d.ts.map +1 -1
- package/dist/visio/ui/text-dialog.d.ts +12 -0
- package/dist/visio/ui/text-dialog.d.ts.map +1 -1
- package/dist/xlsx/collab/index.cjs +45 -2
- package/dist/xlsx/collab/index.mjs +45 -2
- package/dist/xlsx/collab/part-specs.d.ts.map +1 -1
- package/dist/xlsx/collab/sheets.d.ts +1 -0
- package/dist/xlsx/collab/sheets.d.ts.map +1 -1
- package/dist/xlsx/edit/annotations.d.ts +4 -0
- package/dist/xlsx/edit/annotations.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-annotations.d.ts.map +1 -1
- package/dist/xlsx/edit/comment-identities.d.ts +4 -0
- package/dist/xlsx/edit/comment-identities.d.ts.map +1 -0
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sheets.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +3 -0
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/filterxml.d.ts +2 -0
- package/dist/xlsx/formula/functions/filterxml.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/registry.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +1007 -285
- package/dist/xlsx/index.mjs +988 -285
- package/dist/xlsx/layout/split.d.ts +3 -1
- package/dist/xlsx/layout/split.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +809 -126
- package/dist/xlsx/load/index.mjs +790 -126
- package/dist/xlsx/model.d.ts +19 -7
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/comments.d.ts +3 -1
- package/dist/xlsx/read/comments.d.ts.map +1 -1
- package/dist/xlsx/read/conditional.d.ts +2 -2
- package/dist/xlsx/read/conditional.d.ts.map +1 -1
- package/dist/xlsx/read/data-validations.d.ts +7 -0
- package/dist/xlsx/read/data-validations.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/messages.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/grid/geometry.d.ts +3 -0
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +952 -168
- package/dist/xlsx/ui/index.mjs +933 -169
- package/dist/xlsx/ui/selection.d.ts +3 -0
- package/dist/xlsx/ui/selection.d.ts.map +1 -1
- package/dist/xlsx/validation-extensions.d.ts +6 -0
- package/dist/xlsx/validation-extensions.d.ts.map +1 -0
- package/dist/xlsx/write/comment-ids.d.ts +14 -0
- package/dist/xlsx/write/comment-ids.d.ts.map +1 -0
- package/dist/xlsx/write/comment-mentions.d.ts +6 -0
- package/dist/xlsx/write/comment-mentions.d.ts.map +1 -0
- package/dist/xlsx/write/comment-persons.d.ts +16 -0
- package/dist/xlsx/write/comment-persons.d.ts.map +1 -0
- package/dist/xlsx/write/comments.d.ts +5 -11
- package/dist/xlsx/write/comments.d.ts.map +1 -1
- package/dist/xlsx/write/conditional.d.ts +2 -2
- package/dist/xlsx/write/conditional.d.ts.map +1 -1
- package/dist/xlsx/write/data-validations.d.ts +6 -0
- package/dist/xlsx/write/data-validations.d.ts.map +1 -0
- package/dist/xlsx/write/save.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-parts.d.ts +4 -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/threaded-comments.d.ts +19 -0
- package/dist/xlsx/write/threaded-comments.d.ts.map +1 -0
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/dist/xml/index.cjs +31 -1
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/index.mjs +11 -2
- package/dist/xml/xml.d.ts +2 -0
- package/dist/xml/xml.d.ts.map +1 -1
- package/dist/xml/xpath.d.ts +9 -0
- package/dist/xml/xpath.d.ts.map +1 -0
- package/package.json +8 -7
- package/dist/PptxHandler-5UDSMCBG.cjs +0 -14
- package/dist/PptxHandler-TTRTAQAR.mjs +0 -5
- package/dist/pptx/chunks/collaboration-text-codec-Du_XeE_i.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-merge-DWWWdT_t.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-positions-MMT3GkZi.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-D0NOLQk7.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-delta-CzJGrTKJ.d.ts.map +0 -1
- package/dist/pptx/chunks/color-ref-DT599vEx.d.ts.map +0 -1
- package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BnH2QjYm.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +0 -1
- package/dist/pptx/chunks/index-pLLN4OTz.d.ts.map +0 -1
- package/dist/pptx/chunks/inspection-status-DjiWd_Aa.d.ts.map +0 -1
- package/dist/pptx/chunks/schemas-fuDGetRe.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +0 -1
- package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-D5sgspO6.d.ts.map +0 -1
package/dist/xlsx/index.cjs
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var xmldom = require('@xmldom/xmldom');
|
|
4
|
+
var xpath = require('xpath');
|
|
4
5
|
var JSZip2 = require('jszip');
|
|
5
6
|
var fflate = require('fflate');
|
|
6
7
|
|
|
7
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var xpath__namespace = /*#__PURE__*/_interopNamespace(xpath);
|
|
9
29
|
var JSZip2__default = /*#__PURE__*/_interopDefault(JSZip2);
|
|
10
30
|
|
|
11
31
|
// xlsx/model.ts
|
|
@@ -193,7 +213,7 @@ function parseXml(xml, options2 = {}) {
|
|
|
193
213
|
try {
|
|
194
214
|
parsed = new xmldom.DOMParser({
|
|
195
215
|
onError: (level4, message) => {
|
|
196
|
-
if (level4 !== "warning") parseError = message;
|
|
216
|
+
if (level4 !== "warning" || options2.warningsAsErrors) parseError = message;
|
|
197
217
|
}
|
|
198
218
|
}).parseFromString(xml, "application/xml");
|
|
199
219
|
} catch (error) {
|
|
@@ -431,6 +451,14 @@ function startTag(source3, from, namespaces) {
|
|
|
431
451
|
if (i2 < n2 && !isSpace(after) && after !== 62 && after !== 47) return void 0;
|
|
432
452
|
}
|
|
433
453
|
}
|
|
454
|
+
var compiler = xpath__namespace;
|
|
455
|
+
function selectXmlNodes(expression, node2, options2 = {}) {
|
|
456
|
+
return compiler.parse(expression).select({
|
|
457
|
+
node: node2,
|
|
458
|
+
...options2.namespaces ? { namespaces: options2.namespaces } : {},
|
|
459
|
+
allowAnyNamespaceForNoPrefix: options2.matchDefaultNamespace ?? false
|
|
460
|
+
});
|
|
461
|
+
}
|
|
434
462
|
|
|
435
463
|
// color/color-primitives.ts
|
|
436
464
|
function clampUnitInterval(value2) {
|
|
@@ -17712,6 +17740,83 @@ var TEXT_EXTRA_FUNCTIONS = [
|
|
|
17712
17740
|
)
|
|
17713
17741
|
];
|
|
17714
17742
|
|
|
17743
|
+
// xlsx/formula/functions/filterxml.ts
|
|
17744
|
+
var XML = "http://www.w3.org/XML/1998/namespace";
|
|
17745
|
+
var XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
17746
|
+
function preservesSpace(node2) {
|
|
17747
|
+
for (let current = node2; current; current = current.parentNode) {
|
|
17748
|
+
if (current.nodeType !== 1) continue;
|
|
17749
|
+
const value2 = current.getAttributeNS(XML, "space");
|
|
17750
|
+
if (value2) return value2 === "preserve";
|
|
17751
|
+
}
|
|
17752
|
+
return false;
|
|
17753
|
+
}
|
|
17754
|
+
function prepare(root) {
|
|
17755
|
+
const namespaces = /* @__PURE__ */ Object.create(null);
|
|
17756
|
+
const visit2 = (element3) => {
|
|
17757
|
+
for (const attr3 of Array.from(element3.attributes)) {
|
|
17758
|
+
if (attr3.namespaceURI !== XMLNS || attr3.localName === "xmlns") continue;
|
|
17759
|
+
const prior = namespaces[attr3.localName];
|
|
17760
|
+
if (prior !== void 0 && prior !== attr3.value) throw new Error("Conflicting namespaces");
|
|
17761
|
+
namespaces[attr3.localName] = attr3.value;
|
|
17762
|
+
}
|
|
17763
|
+
for (const child6 of Array.from(element3.childNodes)) {
|
|
17764
|
+
if (child6.nodeType === 1) visit2(child6);
|
|
17765
|
+
else if (child6.nodeType === 3 && !child6.nodeValue?.trim() && !preservesSpace(element3))
|
|
17766
|
+
element3.removeChild(child6);
|
|
17767
|
+
}
|
|
17768
|
+
};
|
|
17769
|
+
visit2(root);
|
|
17770
|
+
return namespaces;
|
|
17771
|
+
}
|
|
17772
|
+
function nodeValue(node2) {
|
|
17773
|
+
let text3;
|
|
17774
|
+
if (node2.nodeType === 2) text3 = (node2.nodeValue ?? "").trim();
|
|
17775
|
+
else if (node2.nodeType === 1) {
|
|
17776
|
+
const preserve = preservesSpace(node2);
|
|
17777
|
+
text3 = Array.from(node2.childNodes).filter((child6) => child6.nodeType === 3 || child6.nodeType === 4).map((child6) => {
|
|
17778
|
+
const value2 = child6.nodeValue ?? "";
|
|
17779
|
+
return preserve || child6.nodeType === 4 ? value2 : value2.trim();
|
|
17780
|
+
}).join("");
|
|
17781
|
+
} else return ERR.VALUE;
|
|
17782
|
+
if (!text3) return ERR.VALUE;
|
|
17783
|
+
if (/^(true|false)$/i.test(text3)) return text3.toLowerCase() === "true";
|
|
17784
|
+
const date = /^(\d{1,4})[-/](\d{1,2})[-/](\d{1,4})(.*)$/.exec(text3.trim());
|
|
17785
|
+
let numberText = text3;
|
|
17786
|
+
if (date) {
|
|
17787
|
+
let year = Number(date[1]);
|
|
17788
|
+
if (year < 100) year += year < 30 ? 2e3 : 1900;
|
|
17789
|
+
numberText = `${year}-${date[2]}-${date[3]}${date[4]?.replace(/^T/, " ") ?? ""}`;
|
|
17790
|
+
}
|
|
17791
|
+
return parseNumberText(numberText) ?? text3;
|
|
17792
|
+
}
|
|
17793
|
+
var FILTERXML = spec(
|
|
17794
|
+
"FILTERXML",
|
|
17795
|
+
"Web",
|
|
17796
|
+
"FILTERXML(xml, xpath)",
|
|
17797
|
+
"Returns XML element or attribute values selected by XPath, as a column.",
|
|
17798
|
+
2,
|
|
17799
|
+
2,
|
|
17800
|
+
(args) => {
|
|
17801
|
+
const xml = str(args[0]);
|
|
17802
|
+
const expression = str(args[1]);
|
|
17803
|
+
if (xml.length > 32767 || expression.length > 32767) return ERR.VALUE;
|
|
17804
|
+
let nodes;
|
|
17805
|
+
try {
|
|
17806
|
+
const doc = parseXml(xml, { warningsAsErrors: true, label: "FILTERXML" });
|
|
17807
|
+
nodes = selectXmlNodes(expression, doc, {
|
|
17808
|
+
namespaces: prepare(doc.documentElement),
|
|
17809
|
+
matchDefaultNamespace: true
|
|
17810
|
+
});
|
|
17811
|
+
} catch {
|
|
17812
|
+
return ERR.VALUE;
|
|
17813
|
+
}
|
|
17814
|
+
if (!nodes.length) return ERR.VALUE;
|
|
17815
|
+
chargeArrayCells(nodes.length);
|
|
17816
|
+
return new Matrix(nodes.map((node2) => [nodeValue(node2)]));
|
|
17817
|
+
}
|
|
17818
|
+
);
|
|
17819
|
+
|
|
17715
17820
|
// xlsx/formula/functions/registry.ts
|
|
17716
17821
|
var ALL = [
|
|
17717
17822
|
...MATH_FUNCTIONS,
|
|
@@ -17721,6 +17826,7 @@ var ALL = [
|
|
|
17721
17826
|
...LOGICAL_FUNCTIONS,
|
|
17722
17827
|
...TEXT_FUNCTIONS,
|
|
17723
17828
|
...TEXT_EXTRA_FUNCTIONS,
|
|
17829
|
+
FILTERXML,
|
|
17724
17830
|
BAHTTEXT,
|
|
17725
17831
|
GETPIVOTDATA,
|
|
17726
17832
|
...GROUPBY_FUNCTIONS,
|
|
@@ -20666,7 +20772,7 @@ var PROPERTY_CONTENT_TYPES = {
|
|
|
20666
20772
|
};
|
|
20667
20773
|
|
|
20668
20774
|
// opc/properties/patch.ts
|
|
20669
|
-
var
|
|
20775
|
+
var XMLNS2 = "http://www.w3.org/2000/xmlns/";
|
|
20670
20776
|
function tagEnd(xml, from) {
|
|
20671
20777
|
let quote3 = "";
|
|
20672
20778
|
for (let i2 = from + 1; i2 < xml.length; i2++) {
|
|
@@ -20748,7 +20854,7 @@ var PartPatch = class {
|
|
|
20748
20854
|
this.root = root;
|
|
20749
20855
|
for (const attribute2 of Array.from(rootElement.attributes)) {
|
|
20750
20856
|
if (attribute2.name === "xmlns") this.defaultNs = attribute2.value;
|
|
20751
|
-
else if (attribute2.namespaceURI ===
|
|
20857
|
+
else if (attribute2.namespaceURI === XMLNS2 || attribute2.name.startsWith("xmlns:"))
|
|
20752
20858
|
this.prefixes.set(attribute2.value, attribute2.localName);
|
|
20753
20859
|
}
|
|
20754
20860
|
}
|
|
@@ -22601,31 +22707,90 @@ function parsePersons(xml) {
|
|
|
22601
22707
|
}
|
|
22602
22708
|
return persons;
|
|
22603
22709
|
}
|
|
22604
|
-
function parseThreadedComments(xml, persons) {
|
|
22710
|
+
function parseThreadedComments(xml, persons, personsXml) {
|
|
22605
22711
|
if (!xml) return [];
|
|
22606
22712
|
const root = parseXml(xml, { label: "XLSX threaded comments" }).documentElement;
|
|
22607
22713
|
const roots = /* @__PURE__ */ new Map();
|
|
22714
|
+
const personNames = new Map([...persons].map(([id, name]) => [id.toUpperCase(), name]));
|
|
22608
22715
|
const order = [];
|
|
22609
|
-
|
|
22610
|
-
|
|
22716
|
+
const nodes = children(root, "threadedComment", NS.tc);
|
|
22717
|
+
const byId2 = new Map(nodes.map((node2) => [(att(node2, "id") ?? "").toUpperCase(), node2]));
|
|
22718
|
+
const parentRoot = (parent) => {
|
|
22719
|
+
const seen = /* @__PURE__ */ new Set();
|
|
22720
|
+
while (parent) {
|
|
22721
|
+
parent = parent.toUpperCase();
|
|
22722
|
+
if (seen.has(parent)) break;
|
|
22723
|
+
if (roots.has(parent)) return roots.get(parent);
|
|
22724
|
+
seen.add(parent);
|
|
22725
|
+
parent = att(byId2.get(parent), "parentId");
|
|
22726
|
+
}
|
|
22727
|
+
return void 0;
|
|
22728
|
+
};
|
|
22729
|
+
for (const node2 of [
|
|
22730
|
+
...nodes.filter((n2) => !att(n2, "parentId")),
|
|
22731
|
+
...nodes.filter((n2) => att(n2, "parentId"))
|
|
22732
|
+
]) {
|
|
22733
|
+
const parentComment = parentRoot(att(node2, "parentId"));
|
|
22734
|
+
const address2 = parseAddress(att(node2, "ref") ?? "") ?? parentComment?.address;
|
|
22611
22735
|
if (!address2) continue;
|
|
22612
|
-
const author =
|
|
22736
|
+
const author = personNames.get((att(node2, "personId") ?? "").toUpperCase()) ?? "";
|
|
22613
22737
|
const text3 = xText(children(node2, "text", NS.tc)[0]);
|
|
22614
22738
|
const date = att(node2, "dT");
|
|
22615
|
-
const parent = att(node2, "parentId");
|
|
22616
|
-
const parentComment = parent ? roots.get(parent) : void 0;
|
|
22617
22739
|
if (parentComment) {
|
|
22618
|
-
const reply = { author, text: text3 };
|
|
22740
|
+
const reply = { author, text: text3, threadedXml: selfContainedXml(node2) };
|
|
22619
22741
|
if (date) reply.date = date;
|
|
22620
22742
|
(parentComment.replies ??= []).push(reply);
|
|
22621
22743
|
continue;
|
|
22622
22744
|
}
|
|
22623
|
-
const comment = {
|
|
22624
|
-
|
|
22745
|
+
const comment = {
|
|
22746
|
+
address: address2,
|
|
22747
|
+
author,
|
|
22748
|
+
text: text3,
|
|
22749
|
+
replies: [],
|
|
22750
|
+
threadedXml: selfContainedXml(node2)
|
|
22751
|
+
};
|
|
22752
|
+
if (date) comment.date = date;
|
|
22753
|
+
const resolved = boolAttr(node2, "done");
|
|
22754
|
+
if (resolved !== void 0) comment.resolved = resolved;
|
|
22755
|
+
roots.set((att(node2, "id") ?? `${order.length}`).toUpperCase(), comment);
|
|
22625
22756
|
order.push(comment);
|
|
22626
22757
|
}
|
|
22758
|
+
for (const comment of order)
|
|
22759
|
+
comment.replies?.sort((a2, b) => {
|
|
22760
|
+
const aDate = a2.date ? Date.parse(a2.date) : NaN;
|
|
22761
|
+
const bDate = b.date ? Date.parse(b.date) : NaN;
|
|
22762
|
+
return Number.isFinite(aDate) && Number.isFinite(bDate) ? aDate - bDate : 0;
|
|
22763
|
+
});
|
|
22764
|
+
if (personsXml) {
|
|
22765
|
+
const records = /* @__PURE__ */ new Map();
|
|
22766
|
+
for (const person of children(parseXml(personsXml).documentElement, "person", NS.tc)) {
|
|
22767
|
+
const id = att(person, "id") ?? "";
|
|
22768
|
+
records.set(id.toUpperCase(), [id, selfContainedXml(person)]);
|
|
22769
|
+
}
|
|
22770
|
+
for (const comment of order) {
|
|
22771
|
+
const ids = /* @__PURE__ */ new Set();
|
|
22772
|
+
for (const message of [comment, ...comment.replies ?? []]) {
|
|
22773
|
+
const node2 = parseXml(message.threadedXml).documentElement;
|
|
22774
|
+
ids.add((att(node2, "personId") ?? "").toUpperCase());
|
|
22775
|
+
const mentions = first(node2, "mentions", NS.tc);
|
|
22776
|
+
if (mentions)
|
|
22777
|
+
for (const mention of children(mentions, "mention", NS.tc))
|
|
22778
|
+
ids.add((att(mention, "mentionpersonId") ?? "").toUpperCase());
|
|
22779
|
+
}
|
|
22780
|
+
const kept = [...ids].flatMap((id) => records.has(id) ? [records.get(id)] : []);
|
|
22781
|
+
if (kept.length) comment.threadedPersons = Object.fromEntries(kept);
|
|
22782
|
+
}
|
|
22783
|
+
}
|
|
22627
22784
|
return order;
|
|
22628
22785
|
}
|
|
22786
|
+
function threadedCommentEnvelope(xml) {
|
|
22787
|
+
if (!xml) return void 0;
|
|
22788
|
+
const doc = parseXml(xml);
|
|
22789
|
+
for (const node2 of children(doc.documentElement, "threadedComment", NS.tc)) {
|
|
22790
|
+
doc.documentElement.removeChild(node2);
|
|
22791
|
+
}
|
|
22792
|
+
return buildXml(doc);
|
|
22793
|
+
}
|
|
22629
22794
|
function mergeComments(legacy, threaded) {
|
|
22630
22795
|
if (!threaded.length) return legacy;
|
|
22631
22796
|
const key = (c2) => `${c2.address.row}:${c2.address.col}`;
|
|
@@ -23470,7 +23635,7 @@ function readSheetView(sheetViews) {
|
|
|
23470
23635
|
const cols = Math.max(0, Math.round(numAttr(pane, "xSplit") ?? 0));
|
|
23471
23636
|
if (rows2 || cols) view.freeze = { rows: rows2, cols };
|
|
23472
23637
|
}
|
|
23473
|
-
const split2 = pane && state === "split";
|
|
23638
|
+
const split2 = pane && (state === void 0 || state === "split");
|
|
23474
23639
|
if (split2) {
|
|
23475
23640
|
const x = Math.max(0, Math.round(numAttr(pane, "xSplit") ?? 0));
|
|
23476
23641
|
const y = Math.max(0, Math.round(numAttr(pane, "ySplit") ?? 0));
|
|
@@ -23478,9 +23643,8 @@ function readSheetView(sheetViews) {
|
|
|
23478
23643
|
view.split = { x, y };
|
|
23479
23644
|
const first2 = parseAddress(att(node2, "topLeftCell") ?? "");
|
|
23480
23645
|
if (first2) view.split.topLeft = first2;
|
|
23481
|
-
const active = att(pane, "activePane");
|
|
23482
|
-
if (
|
|
23483
|
-
view.split.activePane = active;
|
|
23646
|
+
const active = att(pane, "activePane") ?? "topLeft";
|
|
23647
|
+
if (PANES.has(active)) view.split.activePane = active;
|
|
23484
23648
|
}
|
|
23485
23649
|
}
|
|
23486
23650
|
const topLeft = parseAddress(
|
|
@@ -43669,6 +43833,49 @@ var WORKSHEET_CHILD_ORDER = [
|
|
|
43669
43833
|
"extLst"
|
|
43670
43834
|
];
|
|
43671
43835
|
|
|
43836
|
+
// xlsx/read/data-validations.ts
|
|
43837
|
+
var VALIDATION_XM = "http://schemas.microsoft.com/office/excel/2006/main";
|
|
43838
|
+
var TYPES = /* @__PURE__ */ new Set(["none", "whole", "decimal", "list", "date", "time", "textLength", "custom"]);
|
|
43839
|
+
var ERROR_STYLES = /* @__PURE__ */ new Set(["stop", "warning", "information"]);
|
|
43840
|
+
function readDataValidation(dv) {
|
|
43841
|
+
const extended = dv.namespaceURI === NS.x14;
|
|
43842
|
+
const ns = extended ? NS.x14 : NS.x;
|
|
43843
|
+
const ranges = parseSqref(
|
|
43844
|
+
extended ? first(dv, "sqref", VALIDATION_XM)?.textContent ?? "" : att(dv, "sqref")
|
|
43845
|
+
);
|
|
43846
|
+
if (!ranges.length) return void 0;
|
|
43847
|
+
const type = att(dv, "type") ?? "none";
|
|
43848
|
+
const validation = {
|
|
43849
|
+
ranges,
|
|
43850
|
+
type: TYPES.has(type) ? type : "none"
|
|
43851
|
+
};
|
|
43852
|
+
const operator = att(dv, "operator");
|
|
43853
|
+
if (operator) validation.operator = operator;
|
|
43854
|
+
for (const key of ["formula1", "formula2"]) {
|
|
43855
|
+
const container = first(dv, key, ns);
|
|
43856
|
+
const formula2 = extended ? first(container, "f", VALIDATION_XM) : container;
|
|
43857
|
+
if (formula2) validation[key] = stripFuturePrefixes(formula2.textContent ?? "");
|
|
43858
|
+
}
|
|
43859
|
+
if (boolAttr(dv, "allowBlank")) validation.allowBlank = true;
|
|
43860
|
+
const hideDropDown = boolAttr(dv, "showDropDown");
|
|
43861
|
+
if (validation.type === "list") validation.showDropDown = !hideDropDown;
|
|
43862
|
+
else if (hideDropDown) validation.showDropDown = false;
|
|
43863
|
+
if (boolAttr(dv, "showErrorMessage")) validation.showErrorMessage = true;
|
|
43864
|
+
if (boolAttr(dv, "showInputMessage")) validation.showInputMessage = true;
|
|
43865
|
+
const errorStyle = att(dv, "errorStyle");
|
|
43866
|
+
if (errorStyle && ERROR_STYLES.has(errorStyle))
|
|
43867
|
+
validation.errorStyle = errorStyle;
|
|
43868
|
+
for (const key of ["errorTitle", "error", "promptTitle", "prompt"]) {
|
|
43869
|
+
const value2 = att(dv, key);
|
|
43870
|
+
if (value2 !== void 0) validation[key] = value2;
|
|
43871
|
+
}
|
|
43872
|
+
if (extended) validation.extensionXml = selfContainedXml(dv);
|
|
43873
|
+
return validation;
|
|
43874
|
+
}
|
|
43875
|
+
function readDataValidations(node2) {
|
|
43876
|
+
return node2 ? children(node2, "dataValidation", NS.x).flatMap((dv) => readDataValidation(dv) ?? []) : [];
|
|
43877
|
+
}
|
|
43878
|
+
|
|
43672
43879
|
// xlsx/read/conditional.ts
|
|
43673
43880
|
var CFVO_TYPES = /* @__PURE__ */ new Set(["min", "max", "num", "percent", "percentile", "formula"]);
|
|
43674
43881
|
function cfvo(node2) {
|
|
@@ -43795,55 +44002,151 @@ function readConditionalFormats(blocks, dxfs, palette, warn) {
|
|
|
43795
44002
|
}
|
|
43796
44003
|
return out;
|
|
43797
44004
|
}
|
|
43798
|
-
|
|
43799
|
-
|
|
43800
|
-
|
|
43801
|
-
|
|
43802
|
-
|
|
43803
|
-
|
|
43804
|
-
|
|
43805
|
-
|
|
43806
|
-
|
|
43807
|
-
|
|
43808
|
-
|
|
43809
|
-
|
|
43810
|
-
|
|
43811
|
-
|
|
43812
|
-
|
|
43813
|
-
|
|
43814
|
-
|
|
43815
|
-
|
|
43816
|
-
|
|
43817
|
-
|
|
43818
|
-
|
|
43819
|
-
|
|
43820
|
-
|
|
43821
|
-
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
43825
|
-
|
|
43826
|
-
|
|
43827
|
-
|
|
43828
|
-
|
|
43829
|
-
|
|
43830
|
-
|
|
43831
|
-
|
|
43832
|
-
const
|
|
43833
|
-
|
|
43834
|
-
validation.errorStyle = errorStyle;
|
|
43835
|
-
for (const key of ["errorTitle", "error", "promptTitle", "prompt"]) {
|
|
43836
|
-
const value2 = att(dv, key);
|
|
43837
|
-
if (value2 !== void 0) validation[key] = value2;
|
|
43838
|
-
}
|
|
43839
|
-
out.push(validation);
|
|
44005
|
+
|
|
44006
|
+
// xlsx/write/data-validations.ts
|
|
44007
|
+
function usesValidationExtension(dv) {
|
|
44008
|
+
if (dv.extensionXml) return true;
|
|
44009
|
+
return [dv.formula1, dv.formula2].some((formula2) => {
|
|
44010
|
+
if (!formula2) return false;
|
|
44011
|
+
try {
|
|
44012
|
+
return tokenize(formula2).some((token2) => token2.prefix !== void 0);
|
|
44013
|
+
} catch {
|
|
44014
|
+
return false;
|
|
44015
|
+
}
|
|
44016
|
+
});
|
|
44017
|
+
}
|
|
44018
|
+
function validationAttributes(dv) {
|
|
44019
|
+
return {
|
|
44020
|
+
type: dv.type === "none" ? void 0 : dv.type,
|
|
44021
|
+
errorStyle: dv.errorStyle,
|
|
44022
|
+
operator: dv.operator,
|
|
44023
|
+
allowBlank: dv.allowBlank || void 0,
|
|
44024
|
+
showDropDown: dv.showDropDown === false ? true : void 0,
|
|
44025
|
+
showInputMessage: dv.showInputMessage || void 0,
|
|
44026
|
+
showErrorMessage: dv.showErrorMessage || void 0,
|
|
44027
|
+
errorTitle: dv.errorTitle,
|
|
44028
|
+
error: dv.error,
|
|
44029
|
+
promptTitle: dv.promptTitle,
|
|
44030
|
+
prompt: dv.prompt
|
|
44031
|
+
};
|
|
44032
|
+
}
|
|
44033
|
+
function dataValidationXml(dv, extended) {
|
|
44034
|
+
const sqref2 = dv.ranges.map(formatRange).join(" ");
|
|
44035
|
+
if (!extended) {
|
|
44036
|
+
const formulas = ["formula1", "formula2"].map(
|
|
44037
|
+
(key) => dv[key] === void 0 ? "" : `<${key}>${escapeText(addFuturePrefixes(dv[key]))}</${key}>`
|
|
44038
|
+
).join("");
|
|
44039
|
+
const values2 = attrs2({ ...validationAttributes(dv), sqref: sqref2 });
|
|
44040
|
+
return formulas ? `<dataValidation${values2}>${formulas}</dataValidation>` : `<dataValidation${values2}/>`;
|
|
43840
44041
|
}
|
|
43841
|
-
|
|
44042
|
+
const doc = parseXml(
|
|
44043
|
+
dv.extensionXml || `<x14:dataValidation xmlns:x14="${NS.x14}" xmlns:xm="${VALIDATION_XM}"/>`
|
|
44044
|
+
);
|
|
44045
|
+
const node2 = doc.documentElement;
|
|
44046
|
+
for (const [key, value2] of Object.entries(validationAttributes(dv))) {
|
|
44047
|
+
if (value2 === void 0) node2.removeAttribute(key);
|
|
44048
|
+
else node2.setAttribute(key, typeof value2 === "boolean" ? "1" : value2);
|
|
44049
|
+
}
|
|
44050
|
+
for (const key of ["formula1", "formula2"]) {
|
|
44051
|
+
let container = first(node2, key, NS.x14);
|
|
44052
|
+
if (dv[key] === void 0) {
|
|
44053
|
+
if (container) node2.removeChild(container);
|
|
44054
|
+
continue;
|
|
44055
|
+
}
|
|
44056
|
+
if (!container) {
|
|
44057
|
+
container = doc.createElementNS(NS.x14, `x14:${key}`);
|
|
44058
|
+
const next = key === "formula1" ? first(node2, "formula2", NS.x14) : void 0;
|
|
44059
|
+
node2.insertBefore(container, next ?? first(node2, "sqref", VALIDATION_XM) ?? null);
|
|
44060
|
+
}
|
|
44061
|
+
let formula2 = first(container, "f", VALIDATION_XM);
|
|
44062
|
+
if (!formula2) {
|
|
44063
|
+
formula2 = doc.createElementNS(VALIDATION_XM, "xm:f");
|
|
44064
|
+
container.appendChild(formula2);
|
|
44065
|
+
}
|
|
44066
|
+
formula2.textContent = addFuturePrefixes(dv[key]);
|
|
44067
|
+
}
|
|
44068
|
+
let ranges = first(node2, "sqref", VALIDATION_XM);
|
|
44069
|
+
if (!ranges) {
|
|
44070
|
+
ranges = doc.createElementNS(VALIDATION_XM, "xm:sqref");
|
|
44071
|
+
node2.appendChild(ranges);
|
|
44072
|
+
}
|
|
44073
|
+
ranges.textContent = sqref2;
|
|
44074
|
+
return buildXml(doc);
|
|
44075
|
+
}
|
|
44076
|
+
function dataValidationsXml(validations) {
|
|
44077
|
+
const items = validations.filter((dv) => dv.ranges.length && !usesValidationExtension(dv)).map((dv) => dataValidationXml(dv, false));
|
|
44078
|
+
return items.length ? `<dataValidations count="${items.length}">${items.join("")}</dataValidations>` : "";
|
|
44079
|
+
}
|
|
44080
|
+
|
|
44081
|
+
// xlsx/validation-extensions.ts
|
|
44082
|
+
var URI = "{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}";
|
|
44083
|
+
function readValidationExtensions(sheet) {
|
|
44084
|
+
const kept = [];
|
|
44085
|
+
for (const xml of sheet.preserved.get("extLst") ?? []) {
|
|
44086
|
+
const doc = parseXml(xml);
|
|
44087
|
+
let changed = false;
|
|
44088
|
+
for (const ext of children(doc.documentElement, "ext", NS.x)) {
|
|
44089
|
+
if (ext.getAttribute("uri")?.toUpperCase() !== URI.toUpperCase()) continue;
|
|
44090
|
+
const collection = first(ext, "dataValidations", NS.x14);
|
|
44091
|
+
if (!collection) continue;
|
|
44092
|
+
for (const node2 of children(collection, "dataValidation", NS.x14)) {
|
|
44093
|
+
const rule = readDataValidation(node2);
|
|
44094
|
+
if (!rule) continue;
|
|
44095
|
+
sheet.dataValidations.push(rule);
|
|
44096
|
+
collection.removeChild(node2);
|
|
44097
|
+
changed = true;
|
|
44098
|
+
}
|
|
44099
|
+
collection.setAttribute(
|
|
44100
|
+
"count",
|
|
44101
|
+
String(children(collection, "dataValidation", NS.x14).length)
|
|
44102
|
+
);
|
|
44103
|
+
}
|
|
44104
|
+
if (!changed) kept.push(xml);
|
|
44105
|
+
else if (elements(doc.documentElement).length) kept.push(buildXml(doc));
|
|
44106
|
+
}
|
|
44107
|
+
if (kept.length) sheet.preserved.set("extLst", kept);
|
|
44108
|
+
else sheet.preserved.delete("extLst");
|
|
44109
|
+
}
|
|
44110
|
+
function validationExtensionsXml(sheet, extensions, ids = /* @__PURE__ */ new Set()) {
|
|
44111
|
+
const rules = sheet.dataValidations.filter(
|
|
44112
|
+
(dv) => dv.ranges.length && usesValidationExtension(dv)
|
|
44113
|
+
);
|
|
44114
|
+
const doc = parseXml(extensions || `<extLst xmlns="${NS.x}"/>`);
|
|
44115
|
+
let ext = elements(doc.documentElement).find(
|
|
44116
|
+
(node2) => node2.getAttribute("uri")?.toUpperCase() === URI.toUpperCase()
|
|
44117
|
+
);
|
|
44118
|
+
if (!rules.length) {
|
|
44119
|
+
const collection2 = first(ext, "dataValidations", NS.x14);
|
|
44120
|
+
if (ext && collection2 && !elements(collection2).length) {
|
|
44121
|
+
ext.removeChild(collection2);
|
|
44122
|
+
if (!elements(ext).length) doc.documentElement.removeChild(ext);
|
|
44123
|
+
}
|
|
44124
|
+
return elements(doc.documentElement).length ? inlineFragment(buildXml(doc)) : "";
|
|
44125
|
+
}
|
|
44126
|
+
if (!ext) {
|
|
44127
|
+
ext = doc.createElementNS(NS.x, "ext");
|
|
44128
|
+
ext.setAttribute("uri", URI);
|
|
44129
|
+
doc.documentElement.appendChild(ext);
|
|
44130
|
+
}
|
|
44131
|
+
let collection = first(ext, "dataValidations", NS.x14);
|
|
44132
|
+
if (!collection) {
|
|
44133
|
+
collection = doc.createElementNS(NS.x14, "x14:dataValidations");
|
|
44134
|
+
ext.appendChild(collection);
|
|
44135
|
+
}
|
|
44136
|
+
for (const rule of rules) {
|
|
44137
|
+
const node2 = doc.importNode(parseXml(dataValidationXml(rule, true)).documentElement, true);
|
|
44138
|
+
const id = node2.getAttributeNS(NS.xr, "uid");
|
|
44139
|
+
if (id && ids.has(id)) node2.removeAttributeNS(NS.xr, "uid");
|
|
44140
|
+
else if (id) ids.add(id);
|
|
44141
|
+
collection.appendChild(node2);
|
|
44142
|
+
}
|
|
44143
|
+
collection.setAttribute("count", String(children(collection, "dataValidation", NS.x14).length));
|
|
44144
|
+
return inlineFragment(buildXml(doc));
|
|
43842
44145
|
}
|
|
43843
44146
|
|
|
43844
44147
|
// xlsx/conditional-extensions.ts
|
|
43845
44148
|
var XM = "http://schemas.microsoft.com/office/excel/2006/main";
|
|
43846
|
-
var
|
|
44149
|
+
var URI2 = "{78C0D931-6437-407d-A8EE-F0AAD7539E65}";
|
|
43847
44150
|
function writeSettings(node2, rule) {
|
|
43848
44151
|
const bar = first(node2, "dataBar", NS.x14);
|
|
43849
44152
|
if (!bar) return;
|
|
@@ -43937,14 +44240,14 @@ function conditionalExtensionsXml(sheet) {
|
|
|
43937
44240
|
for (const xml of preserved.slice(1))
|
|
43938
44241
|
for (const node2 of elements(parseXml(xml).documentElement))
|
|
43939
44242
|
doc.documentElement.appendChild(doc.importNode(node2, true));
|
|
43940
|
-
let ext = elements(doc.documentElement).find((e) => e.getAttribute("uri") ===
|
|
44243
|
+
let ext = elements(doc.documentElement).find((e) => e.getAttribute("uri") === URI2);
|
|
43941
44244
|
let collection = first(ext, "conditionalFormattings", NS.x14);
|
|
43942
44245
|
for (const format of sheet.conditionalFormats)
|
|
43943
44246
|
for (const rule of format.rules) {
|
|
43944
44247
|
if (rule.type !== "dataBar" || !rule.extensionXml || !rule.extensionId) continue;
|
|
43945
44248
|
if (!ext) {
|
|
43946
44249
|
ext = doc.createElementNS(NS.x, "ext");
|
|
43947
|
-
ext.setAttribute("uri",
|
|
44250
|
+
ext.setAttribute("uri", URI2);
|
|
43948
44251
|
doc.documentElement.appendChild(ext);
|
|
43949
44252
|
}
|
|
43950
44253
|
if (!collection) {
|
|
@@ -47906,7 +48209,7 @@ function slicerFrameXml(kind, name, id, anchor, box2) {
|
|
|
47906
48209
|
}
|
|
47907
48210
|
|
|
47908
48211
|
// xlsx/read/form-control.ts
|
|
47909
|
-
var
|
|
48212
|
+
var TYPES2 = {
|
|
47910
48213
|
checkbox: "checkbox",
|
|
47911
48214
|
radio: "radio",
|
|
47912
48215
|
drop: "dropdown",
|
|
@@ -47948,7 +48251,7 @@ var num4 = (value2) => {
|
|
|
47948
48251
|
};
|
|
47949
48252
|
function readProps(control, xml) {
|
|
47950
48253
|
const props = parseXml(xml, { label: "XLSX form control" }).documentElement;
|
|
47951
|
-
control.controlType =
|
|
48254
|
+
control.controlType = TYPES2[(att(props, "objectType") ?? "").toLowerCase()] ?? "other";
|
|
47952
48255
|
const link = att(props, "fmlaLink");
|
|
47953
48256
|
if (link) control.linkedCell = link;
|
|
47954
48257
|
const range = att(props, "fmlaRange");
|
|
@@ -48723,12 +49026,21 @@ function readTables(ctx, partName, node2, sheet) {
|
|
|
48723
49026
|
function readComments(ctx, partName, sheet) {
|
|
48724
49027
|
const legacyPart = ctx.source.targetOfType(partName, RELATIONSHIP_TYPES.comments);
|
|
48725
49028
|
const threadedPart = ctx.source.targetOfType(partName, RELATIONSHIP_TYPES.threadedComment);
|
|
49029
|
+
const personsPart = ctx.source.targetOfType(
|
|
49030
|
+
ctx.source.workbookPart() ?? "",
|
|
49031
|
+
RELATIONSHIP_TYPES.person
|
|
49032
|
+
);
|
|
48726
49033
|
const legacy = parseLegacyComments(legacyPart ? ctx.source.text(legacyPart) : void 0);
|
|
48727
49034
|
const threaded = parseThreadedComments(
|
|
48728
49035
|
threadedPart ? ctx.source.text(threadedPart) : void 0,
|
|
48729
|
-
ctx.persons
|
|
49036
|
+
ctx.persons,
|
|
49037
|
+
personsPart ? ctx.source.text(personsPart) : void 0
|
|
48730
49038
|
);
|
|
48731
49039
|
sheet.comments = mergeComments(legacy, threaded);
|
|
49040
|
+
const envelope = threadedCommentEnvelope(
|
|
49041
|
+
threadedPart ? ctx.source.text(threadedPart) : void 0
|
|
49042
|
+
);
|
|
49043
|
+
if (envelope) sheet.threadedCommentsXml = envelope;
|
|
48732
49044
|
}
|
|
48733
49045
|
function parseWorksheet(ctx, partName, name, sheetId) {
|
|
48734
49046
|
const xml = ctx.source.text(partName);
|
|
@@ -48799,6 +49111,7 @@ function readWorksheet(ctx, partName, name, sheetId, xml, rows2) {
|
|
|
48799
49111
|
const scenarios = readScenarios(byName.get("scenarios"));
|
|
48800
49112
|
if (scenarios) sheet.scenarios = scenarios;
|
|
48801
49113
|
sheet.dataValidations = readDataValidations(byName.get("dataValidations"));
|
|
49114
|
+
readValidationExtensions(sheet);
|
|
48802
49115
|
readConditionalExtensions(sheet);
|
|
48803
49116
|
sheet.hyperlinks = readHyperlinks(ctx, partName, byName.get("hyperlinks"));
|
|
48804
49117
|
const page = readPageSetup(
|
|
@@ -49170,7 +49483,7 @@ var PartReader = class {
|
|
|
49170
49483
|
|
|
49171
49484
|
// xlsx/read/sparklines.ts
|
|
49172
49485
|
var XM2 = "http://schemas.microsoft.com/office/excel/2006/main";
|
|
49173
|
-
var
|
|
49486
|
+
var TYPES3 = ["line", "column", "stacked"];
|
|
49174
49487
|
var EMPTY = ["gap", "zero", "span"];
|
|
49175
49488
|
var AXES = ["individual", "group", "custom"];
|
|
49176
49489
|
var COLORS = [
|
|
@@ -49193,7 +49506,7 @@ var text = (element3) => {
|
|
|
49193
49506
|
function readSparklineGroup(node2) {
|
|
49194
49507
|
const attr3 = (name) => node2.hasAttribute(name) ? node2.getAttribute(name) : null;
|
|
49195
49508
|
const group2 = {
|
|
49196
|
-
type: pick2(attr3("type"),
|
|
49509
|
+
type: pick2(attr3("type"), TYPES3, "line"),
|
|
49197
49510
|
lineWeight: numAttr(node2, "lineWeight") ?? 0.75,
|
|
49198
49511
|
dateAxis: boolAttr(node2, "dateAxis", false),
|
|
49199
49512
|
markers: boolAttr(node2, "markers", false),
|
|
@@ -49254,7 +49567,7 @@ function sheetSparklineGroups(sheet) {
|
|
|
49254
49567
|
return groups;
|
|
49255
49568
|
}
|
|
49256
49569
|
|
|
49257
|
-
// xlsx/write/
|
|
49570
|
+
// xlsx/write/comment-ids.ts
|
|
49258
49571
|
function guidFrom(seed) {
|
|
49259
49572
|
let h1 = 2166136261;
|
|
49260
49573
|
let h2 = 16777619;
|
|
@@ -49270,32 +49583,406 @@ function guidFrom(seed) {
|
|
|
49270
49583
|
const s = hex2.join("");
|
|
49271
49584
|
return `{${s.slice(0, 8)}-${s.slice(8, 12)}-4${s.slice(13, 16)}-8${s.slice(17, 20)}-${s.slice(20, 32)}}`;
|
|
49272
49585
|
}
|
|
49273
|
-
var
|
|
49586
|
+
var validGuid = (id) => /^\{[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}\}$/i.test(id);
|
|
49587
|
+
var CommentIds = class {
|
|
49588
|
+
reserved = /* @__PURE__ */ new Map();
|
|
49589
|
+
used = /* @__PURE__ */ new Set();
|
|
49590
|
+
mentions = /* @__PURE__ */ new WeakMap();
|
|
49591
|
+
constructor(workbook) {
|
|
49592
|
+
for (const matching2 of [true, false])
|
|
49593
|
+
for (const sheet of workbook?.sheets ?? []) {
|
|
49594
|
+
for (const comment of sheet.comments)
|
|
49595
|
+
for (const message of [comment, ...comment.replies ?? []]) {
|
|
49596
|
+
if (comment.regenerateThreadIds) continue;
|
|
49597
|
+
if (!message.threadedXml) continue;
|
|
49598
|
+
const node2 = parseXml(message.threadedXml).documentElement;
|
|
49599
|
+
if (node2.getAttribute("ref") === formatAddress(comment.address) !== matching2)
|
|
49600
|
+
continue;
|
|
49601
|
+
this.reserve(node2.getAttribute("id") ?? "", message);
|
|
49602
|
+
const mentions = first(node2, "mentions", NS.tc);
|
|
49603
|
+
if (mentions)
|
|
49604
|
+
children(mentions, "mention", NS.tc).forEach((mention, index3) => {
|
|
49605
|
+
this.reserve(
|
|
49606
|
+
mention.getAttribute("mentionId") ?? "",
|
|
49607
|
+
this.mentionOwner(message, index3)
|
|
49608
|
+
);
|
|
49609
|
+
});
|
|
49610
|
+
}
|
|
49611
|
+
}
|
|
49612
|
+
}
|
|
49613
|
+
reserve(id, owner) {
|
|
49614
|
+
const key = id.toUpperCase();
|
|
49615
|
+
if (validGuid(id) && !this.reserved.has(key)) this.reserved.set(key, owner);
|
|
49616
|
+
}
|
|
49617
|
+
mentionOwner(message, index3) {
|
|
49618
|
+
let owners = this.mentions.get(message);
|
|
49619
|
+
if (!owners) this.mentions.set(message, owners = []);
|
|
49620
|
+
return owners[index3] ??= {};
|
|
49621
|
+
}
|
|
49622
|
+
claim(source3, seed, owner, preserve = true) {
|
|
49623
|
+
const key = source3.toUpperCase();
|
|
49624
|
+
if (preserve && validGuid(source3) && !this.used.has(key) && (!this.reserved.has(key) || this.reserved.get(key) === owner)) {
|
|
49625
|
+
this.used.add(key);
|
|
49626
|
+
return source3;
|
|
49627
|
+
}
|
|
49628
|
+
let index3 = 0;
|
|
49629
|
+
let id = guidFrom(seed);
|
|
49630
|
+
while (this.used.has(id) || this.reserved.has(id)) id = guidFrom(`${seed}:${++index3}`);
|
|
49631
|
+
this.used.add(id);
|
|
49632
|
+
return id;
|
|
49633
|
+
}
|
|
49634
|
+
};
|
|
49635
|
+
|
|
49636
|
+
// text/text-diff.ts
|
|
49637
|
+
var isLowSurrogate = (text3, at2) => {
|
|
49638
|
+
const code = text3.charCodeAt(at2);
|
|
49639
|
+
return code >= 56320 && code <= 57343;
|
|
49640
|
+
};
|
|
49641
|
+
function shortestEdit(n2, m, same11, maxEdits) {
|
|
49642
|
+
const max = Math.min(n2 + m, maxEdits);
|
|
49643
|
+
const offset2 = max + 1;
|
|
49644
|
+
const v = new Int32Array(2 * max + 3);
|
|
49645
|
+
const trace = [];
|
|
49646
|
+
for (let d = 0; d <= max; d++) {
|
|
49647
|
+
for (let k = -d; k <= d; k += 2) {
|
|
49648
|
+
const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
|
|
49649
|
+
let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
|
|
49650
|
+
let y = x - k;
|
|
49651
|
+
while (x < n2 && y < m && same11(x, y)) {
|
|
49652
|
+
x++;
|
|
49653
|
+
y++;
|
|
49654
|
+
}
|
|
49655
|
+
v[offset2 + k] = x;
|
|
49656
|
+
if (x >= n2 && y >= m) return backtrack(trace, n2, m, d);
|
|
49657
|
+
}
|
|
49658
|
+
trace.push(v.slice(offset2 - d, offset2 + d + 1));
|
|
49659
|
+
}
|
|
49660
|
+
return void 0;
|
|
49661
|
+
}
|
|
49662
|
+
function backtrack(trace, n2, m, d) {
|
|
49663
|
+
const edits = [];
|
|
49664
|
+
let x = n2;
|
|
49665
|
+
let y = m;
|
|
49666
|
+
for (let step2 = d; step2 > 0; step2--) {
|
|
49667
|
+
const previous = trace[step2 - 1];
|
|
49668
|
+
const at2 = (k2) => previous[k2 + step2 - 1];
|
|
49669
|
+
const k = x - y;
|
|
49670
|
+
const down = k === -step2 || k !== step2 && at2(k - 1) < at2(k + 1);
|
|
49671
|
+
const before = down ? k + 1 : k - 1;
|
|
49672
|
+
const startX = at2(before);
|
|
49673
|
+
const startY = startX - before;
|
|
49674
|
+
edits.push(down ? [startX, startY, true] : [startX, startY, false]);
|
|
49675
|
+
x = startX;
|
|
49676
|
+
y = startY;
|
|
49677
|
+
}
|
|
49678
|
+
return edits.reverse();
|
|
49679
|
+
}
|
|
49680
|
+
function changesOf(edits) {
|
|
49681
|
+
const changes = [];
|
|
49682
|
+
for (const [x, y, inserts] of edits) {
|
|
49683
|
+
const last = changes.at(-1);
|
|
49684
|
+
if (last && last.fromEnd === x && last.toEnd === y) {
|
|
49685
|
+
if (inserts) last.toEnd++;
|
|
49686
|
+
else last.fromEnd++;
|
|
49687
|
+
} else
|
|
49688
|
+
changes.push({
|
|
49689
|
+
fromStart: x,
|
|
49690
|
+
fromEnd: inserts ? x : x + 1,
|
|
49691
|
+
toStart: y,
|
|
49692
|
+
toEnd: inserts ? y + 1 : y
|
|
49693
|
+
});
|
|
49694
|
+
}
|
|
49695
|
+
return changes;
|
|
49696
|
+
}
|
|
49697
|
+
function characterChanges(a2, b, maxEdits) {
|
|
49698
|
+
const edits = shortestEdit(
|
|
49699
|
+
a2.length,
|
|
49700
|
+
b.length,
|
|
49701
|
+
(x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
|
|
49702
|
+
maxEdits
|
|
49703
|
+
);
|
|
49704
|
+
return edits && changesOf(edits);
|
|
49705
|
+
}
|
|
49706
|
+
var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
|
|
49707
|
+
function tokensOf(text3, ids) {
|
|
49708
|
+
const tokens2 = [];
|
|
49709
|
+
const starts = [];
|
|
49710
|
+
for (const match2 of text3.matchAll(TOKEN)) {
|
|
49711
|
+
let id = ids.get(match2[0]);
|
|
49712
|
+
if (id === void 0) ids.set(match2[0], id = ids.size);
|
|
49713
|
+
tokens2.push(id);
|
|
49714
|
+
starts.push(match2.index);
|
|
49715
|
+
}
|
|
49716
|
+
starts.push(text3.length);
|
|
49717
|
+
return { tokens: tokens2, starts };
|
|
49718
|
+
}
|
|
49719
|
+
function tokenChanges(a2, b, maxEdits) {
|
|
49720
|
+
const ids = /* @__PURE__ */ new Map();
|
|
49721
|
+
const from = tokensOf(a2, ids);
|
|
49722
|
+
const to = tokensOf(b, ids);
|
|
49723
|
+
const edits = shortestEdit(
|
|
49724
|
+
from.tokens.length,
|
|
49725
|
+
to.tokens.length,
|
|
49726
|
+
(x, y) => from.tokens[x] === to.tokens[y],
|
|
49727
|
+
maxEdits
|
|
49728
|
+
);
|
|
49729
|
+
if (!edits) return void 0;
|
|
49730
|
+
let budget = maxEdits;
|
|
49731
|
+
return changesOf(edits).flatMap((stretch) => {
|
|
49732
|
+
const change = {
|
|
49733
|
+
fromStart: from.starts[stretch.fromStart],
|
|
49734
|
+
fromEnd: from.starts[stretch.fromEnd],
|
|
49735
|
+
toStart: to.starts[stretch.toStart],
|
|
49736
|
+
toEnd: to.starts[stretch.toEnd]
|
|
49737
|
+
};
|
|
49738
|
+
const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
|
|
49739
|
+
a2.slice(change.fromStart, change.fromEnd),
|
|
49740
|
+
b.slice(change.toStart, change.toEnd),
|
|
49741
|
+
budget
|
|
49742
|
+
) : void 0;
|
|
49743
|
+
if (!inner2) return [change];
|
|
49744
|
+
for (const found of inner2)
|
|
49745
|
+
budget -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
|
|
49746
|
+
return inner2.map((found) => ({
|
|
49747
|
+
fromStart: found.fromStart + change.fromStart,
|
|
49748
|
+
fromEnd: found.fromEnd + change.fromStart,
|
|
49749
|
+
toStart: found.toStart + change.toStart,
|
|
49750
|
+
toEnd: found.toEnd + change.toStart
|
|
49751
|
+
}));
|
|
49752
|
+
});
|
|
49753
|
+
}
|
|
49754
|
+
function diffText(from, to, maxEdits = 500) {
|
|
49755
|
+
let start = 0;
|
|
49756
|
+
while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
|
|
49757
|
+
start++;
|
|
49758
|
+
let end = 0;
|
|
49759
|
+
while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
|
|
49760
|
+
end++;
|
|
49761
|
+
const a2 = from.slice(start, from.length - end);
|
|
49762
|
+
const b = to.slice(start, to.length - end);
|
|
49763
|
+
if (!a2.length && !b.length) return [];
|
|
49764
|
+
const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
|
|
49765
|
+
const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
|
|
49766
|
+
const result2 = [];
|
|
49767
|
+
for (const change of changes) {
|
|
49768
|
+
const placed = {
|
|
49769
|
+
fromStart: change.fromStart + start,
|
|
49770
|
+
fromEnd: change.fromEnd + start,
|
|
49771
|
+
toStart: change.toStart + start,
|
|
49772
|
+
toEnd: change.toEnd + start
|
|
49773
|
+
};
|
|
49774
|
+
if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
|
|
49775
|
+
placed.fromStart--;
|
|
49776
|
+
placed.toStart--;
|
|
49777
|
+
}
|
|
49778
|
+
if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
|
|
49779
|
+
placed.fromEnd++;
|
|
49780
|
+
placed.toEnd++;
|
|
49781
|
+
}
|
|
49782
|
+
const last = result2.at(-1);
|
|
49783
|
+
if (last && placed.fromStart <= last.fromEnd) {
|
|
49784
|
+
last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
|
|
49785
|
+
last.toEnd = Math.max(last.toEnd, placed.toEnd);
|
|
49786
|
+
} else result2.push(placed);
|
|
49787
|
+
}
|
|
49788
|
+
return result2;
|
|
49789
|
+
}
|
|
49790
|
+
|
|
49791
|
+
// xlsx/write/comment-mentions.ts
|
|
49792
|
+
function patchCommentMentions(node2, before, message, ids, commentId, preserveIds) {
|
|
49793
|
+
const container = first(node2, "mentions", NS.tc);
|
|
49794
|
+
if (!container) return;
|
|
49795
|
+
const changes = diffText(before, message.text);
|
|
49796
|
+
children(container, "mention", NS.tc).forEach((mention, index3) => {
|
|
49797
|
+
const start = Number(mention.getAttribute("startIndex"));
|
|
49798
|
+
const length = Number(mention.getAttribute("length"));
|
|
49799
|
+
const end = start + length;
|
|
49800
|
+
let shift3 = 0;
|
|
49801
|
+
let intact = Number.isInteger(start) && start >= 0 && Number.isInteger(length) && length > 0 && end <= before.length;
|
|
49802
|
+
for (const change of changes) {
|
|
49803
|
+
if (change.fromEnd <= start)
|
|
49804
|
+
shift3 += change.toEnd - change.toStart - (change.fromEnd - change.fromStart);
|
|
49805
|
+
else if (change.fromStart < end) intact = false;
|
|
49806
|
+
}
|
|
49807
|
+
if (!intact) {
|
|
49808
|
+
container.removeChild(mention);
|
|
49809
|
+
return;
|
|
49810
|
+
}
|
|
49811
|
+
mention.setAttribute("startIndex", String(start + shift3));
|
|
49812
|
+
mention.setAttribute(
|
|
49813
|
+
"mentionId",
|
|
49814
|
+
ids.claim(
|
|
49815
|
+
mention.getAttribute("mentionId") ?? "",
|
|
49816
|
+
`${commentId}:mention:${index3}`,
|
|
49817
|
+
ids.mentionOwner(message, index3),
|
|
49818
|
+
preserveIds
|
|
49819
|
+
)
|
|
49820
|
+
);
|
|
49821
|
+
});
|
|
49822
|
+
if (!children(container, "mention", NS.tc).length) node2.removeChild(container);
|
|
49823
|
+
}
|
|
49824
|
+
|
|
49825
|
+
// xlsx/write/threaded-comments.ts
|
|
49826
|
+
var ThreadedCommentsWriter = class {
|
|
49827
|
+
constructor(persons, options2 = {}) {
|
|
49828
|
+
this.persons = persons;
|
|
49829
|
+
this.doc = parseXml(
|
|
49830
|
+
options2.envelope ?? `${XML_HEADER}<ThreadedComments xmlns="${NS.tc}" xmlns:x="${NS.x}"/>`
|
|
49831
|
+
);
|
|
49832
|
+
for (const node2 of children(this.doc.documentElement, "threadedComment", NS.tc))
|
|
49833
|
+
this.doc.documentElement.removeChild(node2);
|
|
49834
|
+
this.ids = options2.ids ?? new CommentIds();
|
|
49835
|
+
}
|
|
49836
|
+
persons;
|
|
49837
|
+
doc;
|
|
49838
|
+
ids;
|
|
49839
|
+
count = 0;
|
|
49840
|
+
add(comment, ref, sheetName) {
|
|
49841
|
+
this.persons.retain(comment.threadedPersons);
|
|
49842
|
+
const preserve = !comment.regenerateThreadIds;
|
|
49843
|
+
const prepare2 = (message, seed) => {
|
|
49844
|
+
const source3 = parseXml(message.threadedXml ?? `<threadedComment xmlns="${NS.tc}"/>`);
|
|
49845
|
+
const priorId = source3.documentElement.getAttribute("id") ?? "";
|
|
49846
|
+
const id = this.ids.claim(priorId, seed, message, preserve);
|
|
49847
|
+
return { message, source: source3, priorId, id };
|
|
49848
|
+
};
|
|
49849
|
+
const root = prepare2(comment, `${sheetName}!${ref}:${comment.text}`);
|
|
49850
|
+
const replies = (comment.replies ?? []).map(
|
|
49851
|
+
(reply, index3) => prepare2(reply, `${root.id}:reply:${index3}:${reply.text}`)
|
|
49852
|
+
);
|
|
49853
|
+
const identities = new Map(
|
|
49854
|
+
[root, ...replies].filter((item2) => item2.priorId).map((item2) => [item2.priorId.toUpperCase(), item2.id])
|
|
49855
|
+
);
|
|
49856
|
+
this.message(comment, ref, root.source, root.id, preserve, void 0, comment.resolved);
|
|
49857
|
+
for (const reply of replies)
|
|
49858
|
+
this.message(
|
|
49859
|
+
reply.message,
|
|
49860
|
+
ref,
|
|
49861
|
+
reply.source,
|
|
49862
|
+
reply.id,
|
|
49863
|
+
preserve,
|
|
49864
|
+
identities.get(
|
|
49865
|
+
(reply.source.documentElement.getAttribute("parentId") ?? "").toUpperCase()
|
|
49866
|
+
) ?? root.id
|
|
49867
|
+
);
|
|
49868
|
+
return root.id;
|
|
49869
|
+
}
|
|
49870
|
+
message(message, ref, source3, id, preserve, parent, resolved) {
|
|
49871
|
+
const node2 = source3.documentElement;
|
|
49872
|
+
const personId = this.persons.id(message.author, node2.getAttribute("personId") ?? void 0);
|
|
49873
|
+
for (const [key, value2] of Object.entries({
|
|
49874
|
+
id,
|
|
49875
|
+
ref,
|
|
49876
|
+
personId,
|
|
49877
|
+
dT: message.date,
|
|
49878
|
+
parentId: parent
|
|
49879
|
+
})) {
|
|
49880
|
+
if (value2 === void 0) node2.removeAttribute(key);
|
|
49881
|
+
else node2.setAttribute(key, value2);
|
|
49882
|
+
}
|
|
49883
|
+
if (!parent) {
|
|
49884
|
+
if (resolved === void 0) node2.removeAttribute("done");
|
|
49885
|
+
else node2.setAttribute("done", resolved ? "1" : "0");
|
|
49886
|
+
}
|
|
49887
|
+
let text3 = first(node2, "text", NS.tc);
|
|
49888
|
+
patchCommentMentions(node2, text3?.textContent ?? "", message, this.ids, id, preserve);
|
|
49889
|
+
if (!text3) {
|
|
49890
|
+
text3 = source3.createElementNS(NS.tc, node2.prefix ? `${node2.prefix}:text` : "text");
|
|
49891
|
+
node2.insertBefore(text3, node2.firstChild);
|
|
49892
|
+
}
|
|
49893
|
+
text3.textContent = message.text;
|
|
49894
|
+
const root = this.doc.documentElement;
|
|
49895
|
+
root.insertBefore(this.doc.importNode(node2, true), first(root, "extLst", NS.tc) ?? null);
|
|
49896
|
+
this.count++;
|
|
49897
|
+
}
|
|
49898
|
+
xml() {
|
|
49899
|
+
return this.count ? buildXml(this.doc) : void 0;
|
|
49900
|
+
}
|
|
49901
|
+
};
|
|
49902
|
+
|
|
49903
|
+
// xlsx/write/comment-persons.ts
|
|
49274
49904
|
var PersonRegistry = class {
|
|
49905
|
+
constructor(existing, source3) {
|
|
49906
|
+
this.source = source3;
|
|
49907
|
+
for (const [id, name] of existing ?? []) {
|
|
49908
|
+
this.names.set(id, name);
|
|
49909
|
+
this.identities.set(id.toUpperCase(), id);
|
|
49910
|
+
if (!this.byName.has(name)) this.byName.set(name, id);
|
|
49911
|
+
}
|
|
49912
|
+
}
|
|
49913
|
+
source;
|
|
49275
49914
|
names = /* @__PURE__ */ new Map();
|
|
49276
49915
|
byName = /* @__PURE__ */ new Map();
|
|
49277
|
-
|
|
49278
|
-
|
|
49916
|
+
identities = /* @__PURE__ */ new Map();
|
|
49917
|
+
added = /* @__PURE__ */ new Map();
|
|
49918
|
+
retained = /* @__PURE__ */ new Map();
|
|
49919
|
+
get changed() {
|
|
49920
|
+
return this.added.size > 0;
|
|
49921
|
+
}
|
|
49922
|
+
/** Bring referenced account records along with a thread copied from another workbook. */
|
|
49923
|
+
retain(records) {
|
|
49924
|
+
for (const [sourceId, xml] of Object.entries(records ?? {})) {
|
|
49925
|
+
const known = this.identities.get(sourceId.toUpperCase());
|
|
49926
|
+
if (known && (this.source || this.retained.has(known))) continue;
|
|
49927
|
+
const node2 = parseXml(xml).documentElement;
|
|
49928
|
+
if (node2.localName !== "person" || node2.namespaceURI !== NS.tc || node2.getAttribute("id")?.toUpperCase() !== sourceId.toUpperCase())
|
|
49929
|
+
continue;
|
|
49930
|
+
const name = node2.getAttribute("displayName") ?? "";
|
|
49931
|
+
const id = known ?? node2.getAttribute("id");
|
|
49932
|
+
this.retained.set(id, xml);
|
|
49279
49933
|
this.names.set(id, name);
|
|
49934
|
+
this.identities.set(id.toUpperCase(), id);
|
|
49935
|
+
this.added.set(id, name);
|
|
49280
49936
|
if (!this.byName.has(name)) this.byName.set(name, id);
|
|
49281
49937
|
}
|
|
49282
49938
|
}
|
|
49283
|
-
id(name) {
|
|
49939
|
+
id(name, preferred) {
|
|
49940
|
+
const preferredId = preferred ? this.identities.get(preferred.toUpperCase()) : void 0;
|
|
49941
|
+
if (preferredId && this.names.get(preferredId) === name) return preferredId;
|
|
49284
49942
|
let id = this.byName.get(name);
|
|
49285
49943
|
if (!id) {
|
|
49944
|
+
let index3 = 0;
|
|
49286
49945
|
id = guidFrom(`person:${name}`);
|
|
49946
|
+
while (this.identities.has(id.toUpperCase())) id = guidFrom(`person:${name}:${++index3}`);
|
|
49287
49947
|
this.byName.set(name, id);
|
|
49288
49948
|
this.names.set(id, name);
|
|
49949
|
+
this.identities.set(id.toUpperCase(), id);
|
|
49950
|
+
this.added.set(id, name);
|
|
49289
49951
|
}
|
|
49290
49952
|
return id;
|
|
49291
49953
|
}
|
|
49292
49954
|
xml() {
|
|
49293
|
-
|
|
49294
|
-
|
|
49295
|
-
|
|
49296
|
-
|
|
49955
|
+
if (this.source && !this.changed) return this.source;
|
|
49956
|
+
const doc = parseXml(
|
|
49957
|
+
this.source ?? `${XML_HEADER}<personList xmlns="${NS.tc}" xmlns:x="${NS.x}"/>`
|
|
49958
|
+
);
|
|
49959
|
+
const root = doc.documentElement;
|
|
49960
|
+
for (const [id, name] of this.source ? this.added : this.names) {
|
|
49961
|
+
const retained = this.retained.get(id);
|
|
49962
|
+
if (retained) {
|
|
49963
|
+
root.insertBefore(
|
|
49964
|
+
doc.importNode(parseXml(retained).documentElement, true),
|
|
49965
|
+
first(root, "extLst", NS.tc) ?? null
|
|
49966
|
+
);
|
|
49967
|
+
continue;
|
|
49968
|
+
}
|
|
49969
|
+
const person = doc.createElementNS(NS.tc, root.prefix ? `${root.prefix}:person` : "person");
|
|
49970
|
+
for (const [key, value2] of Object.entries({
|
|
49971
|
+
id,
|
|
49972
|
+
displayName: name,
|
|
49973
|
+
userId: name,
|
|
49974
|
+
providerId: "None"
|
|
49975
|
+
})) {
|
|
49976
|
+
person.setAttribute(key, value2);
|
|
49977
|
+
}
|
|
49978
|
+
root.insertBefore(person, first(root, "extLst", NS.tc) ?? null);
|
|
49979
|
+
}
|
|
49980
|
+
return buildXml(doc);
|
|
49297
49981
|
}
|
|
49298
49982
|
};
|
|
49983
|
+
|
|
49984
|
+
// xlsx/write/comments.ts
|
|
49985
|
+
var THREADED_NOTE = "[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n ";
|
|
49299
49986
|
function vmlShape(comment, index3, id) {
|
|
49300
49987
|
const { row: row2, col } = comment.address;
|
|
49301
49988
|
const anchor = `${col + 1}, 15, ${Math.max(0, row2 - 1)}, 10, ${col + 3}, 15, ${row2 + 3}, 4`;
|
|
@@ -49317,7 +50004,7 @@ function vmlXml(comments, layout2) {
|
|
|
49317
50004
|
}
|
|
49318
50005
|
return `<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="${data}"/></o:shapelayout>` + NOTE_SHAPETYPE + shapes + "</xml>";
|
|
49319
50006
|
}
|
|
49320
|
-
function commentParts(comments, sheetNumber, persons, sheetName, layout2) {
|
|
50007
|
+
function commentParts(comments, sheetNumber, persons, sheetName, layout2, threadOptions) {
|
|
49321
50008
|
const authors = [];
|
|
49322
50009
|
const authorId = (name) => {
|
|
49323
50010
|
let id = authors.indexOf(name);
|
|
@@ -49327,18 +50014,11 @@ function commentParts(comments, sheetNumber, persons, sheetName, layout2) {
|
|
|
49327
50014
|
const sorted2 = [...comments].sort(
|
|
49328
50015
|
(a2, b) => a2.address.row - b.address.row || a2.address.col - b.address.col
|
|
49329
50016
|
);
|
|
49330
|
-
|
|
50017
|
+
const threads = new ThreadedCommentsWriter(persons, threadOptions);
|
|
49331
50018
|
const list3 = sorted2.map((comment) => {
|
|
49332
50019
|
const ref = formatAddress(comment.address);
|
|
49333
50020
|
if (comment.replies) {
|
|
49334
|
-
const id =
|
|
49335
|
-
const personId = persons.id(comment.author);
|
|
49336
|
-
threaded += `<threadedComment ref="${ref}" personId="${personId}" id="${id}"><text>${escapeText(comment.text)}</text></threadedComment>`;
|
|
49337
|
-
comment.replies.forEach((reply, index3) => {
|
|
49338
|
-
const replyId = guidFrom(`${id}:reply:${index3}:${reply.text}`);
|
|
49339
|
-
const dT = reply.date ? ` dT="${escapeAttr(reply.date)}"` : "";
|
|
49340
|
-
threaded += `<threadedComment ref="${ref}"${dT} personId="${persons.id(reply.author)}" id="${replyId}" parentId="${id}"><text>${escapeText(reply.text)}</text></threadedComment>`;
|
|
49341
|
-
});
|
|
50021
|
+
const id = threads.add(comment, ref, sheetName);
|
|
49342
50022
|
const fallback = `${THREADED_NOTE}${comment.text}${comment.replies.map((r) => `
|
|
49343
50023
|
Reply:
|
|
49344
50024
|
${r.text}`).join("")}`;
|
|
@@ -49356,8 +50036,8 @@ Reply:
|
|
|
49356
50036
|
}
|
|
49357
50037
|
);
|
|
49358
50038
|
const parts = { comments: commentsXml, vml };
|
|
49359
|
-
|
|
49360
|
-
|
|
50039
|
+
const threaded = threads.xml();
|
|
50040
|
+
if (threaded) parts.threaded = threaded;
|
|
49361
50041
|
return parts;
|
|
49362
50042
|
}
|
|
49363
50043
|
|
|
@@ -52432,6 +53112,158 @@ function pageXml(sheet) {
|
|
|
52432
53112
|
return result2;
|
|
52433
53113
|
}
|
|
52434
53114
|
|
|
53115
|
+
// xlsx/layout/viewport.ts
|
|
53116
|
+
var frozenExtent = (count2, start) => count2 > 0 ? start(count2) : 0;
|
|
53117
|
+
function collectVisible(from, to, limit2, at2, start, size, minIndex) {
|
|
53118
|
+
const out = [];
|
|
53119
|
+
if (to <= from) return out;
|
|
53120
|
+
let i2 = Math.max(minIndex, at2(from));
|
|
53121
|
+
while (i2 <= limit2 && start(i2) < to) {
|
|
53122
|
+
if (size(i2) > 0) out.push(i2);
|
|
53123
|
+
i2++;
|
|
53124
|
+
}
|
|
53125
|
+
return out;
|
|
53126
|
+
}
|
|
53127
|
+
function frozenList(count2, size, limit2) {
|
|
53128
|
+
const out = [];
|
|
53129
|
+
for (let i2 = 0; i2 < Math.min(count2, limit2 + 1); i2++) if (size(i2) > 0) out.push(i2);
|
|
53130
|
+
return out;
|
|
53131
|
+
}
|
|
53132
|
+
function visibleCells(metrics, viewport, freeze) {
|
|
53133
|
+
const fRows = Math.max(0, freeze?.rows ?? 0);
|
|
53134
|
+
const fCols = Math.max(0, freeze?.cols ?? 0);
|
|
53135
|
+
const frozenH = frozenExtent(fRows, metrics.rowTop);
|
|
53136
|
+
const frozenW = frozenExtent(fCols, metrics.colLeft);
|
|
53137
|
+
const top = frozenH + Math.max(0, viewport.scrollTop);
|
|
53138
|
+
const left2 = frozenW + Math.max(0, viewport.scrollLeft);
|
|
53139
|
+
const rows2 = collectVisible(
|
|
53140
|
+
top,
|
|
53141
|
+
top + Math.max(0, viewport.height - frozenH),
|
|
53142
|
+
MAX_ROW,
|
|
53143
|
+
metrics.rowAt,
|
|
53144
|
+
metrics.rowTop,
|
|
53145
|
+
metrics.rowHeight,
|
|
53146
|
+
fRows
|
|
53147
|
+
);
|
|
53148
|
+
const cols = collectVisible(
|
|
53149
|
+
left2,
|
|
53150
|
+
left2 + Math.max(0, viewport.width - frozenW),
|
|
53151
|
+
MAX_COL,
|
|
53152
|
+
metrics.colAt,
|
|
53153
|
+
metrics.colLeft,
|
|
53154
|
+
metrics.colWidth,
|
|
53155
|
+
fCols
|
|
53156
|
+
);
|
|
53157
|
+
return {
|
|
53158
|
+
rows: rows2,
|
|
53159
|
+
cols,
|
|
53160
|
+
frozenRows: frozenList(fRows, metrics.rowHeight, MAX_ROW),
|
|
53161
|
+
frozenCols: frozenList(fCols, metrics.colWidth, MAX_COL)
|
|
53162
|
+
};
|
|
53163
|
+
}
|
|
53164
|
+
|
|
53165
|
+
// xlsx/layout/split.ts
|
|
53166
|
+
var TWIPS_PER_PX = 15;
|
|
53167
|
+
var MIN_SPLIT_PANE = 24;
|
|
53168
|
+
function splitActivePane(split2) {
|
|
53169
|
+
const valid = split2.x > 0 && split2.y > 0 ? ["topLeft", "topRight", "bottomLeft", "bottomRight"] : split2.y > 0 ? ["topLeft", "bottomLeft"] : ["topLeft", "topRight"];
|
|
53170
|
+
return split2.activePane && valid.includes(split2.activePane) ? split2.activePane : valid[valid.length - 1];
|
|
53171
|
+
}
|
|
53172
|
+
var splitToPx = (twips, zoom) => twips > 0 ? Math.round(twips / TWIPS_PER_PX * zoom / 100) : 0;
|
|
53173
|
+
var pxToSplit = (px, zoom) => px > 0 ? Math.round(px * TWIPS_PER_PX * 100 / zoom) : 0;
|
|
53174
|
+
function splitAtCell(metrics, active, scroll2, view) {
|
|
53175
|
+
if (view.width <= 0 || view.height <= 0) return void 0;
|
|
53176
|
+
const ax = metrics.colLeft(active.col) - scroll2.left;
|
|
53177
|
+
const ay = metrics.rowTop(active.row) - scroll2.top;
|
|
53178
|
+
let x = ax > 0 && ax < view.width ? ax : 0;
|
|
53179
|
+
let y = ay > 0 && ay < view.height ? ay : 0;
|
|
53180
|
+
if (!x && !y) {
|
|
53181
|
+
x = Math.floor(view.width / 2);
|
|
53182
|
+
y = Math.floor(view.height / 2);
|
|
53183
|
+
}
|
|
53184
|
+
const first2 = {
|
|
53185
|
+
row: metrics.rowAt(scroll2.top),
|
|
53186
|
+
col: metrics.colAt(scroll2.left)
|
|
53187
|
+
};
|
|
53188
|
+
const split2 = {
|
|
53189
|
+
x: pxToSplit(x, metrics.zoom),
|
|
53190
|
+
y: pxToSplit(y, metrics.zoom),
|
|
53191
|
+
topLeft: first2,
|
|
53192
|
+
activePane: x && y ? "bottomRight" : y ? "bottomLeft" : "topRight"
|
|
53193
|
+
};
|
|
53194
|
+
return split2;
|
|
53195
|
+
}
|
|
53196
|
+
function clampSplitBar(px, extent2, zoom) {
|
|
53197
|
+
const min = Math.round(MIN_SPLIT_PANE * zoom / 100);
|
|
53198
|
+
return Math.max(min, Math.min(extent2 - min, Math.round(px)));
|
|
53199
|
+
}
|
|
53200
|
+
function splitVisible(metrics, layout2) {
|
|
53201
|
+
const along = (from, size, at2, start, extent2, limit2) => collectVisible(from, from + Math.max(0, size), limit2, at2, start, extent2, 0);
|
|
53202
|
+
const rest = (total2, taken) => Math.max(0, total2 - taken);
|
|
53203
|
+
return {
|
|
53204
|
+
frozenRows: along(
|
|
53205
|
+
layout2.top,
|
|
53206
|
+
layout2.y,
|
|
53207
|
+
metrics.rowAt,
|
|
53208
|
+
metrics.rowTop,
|
|
53209
|
+
metrics.rowHeight,
|
|
53210
|
+
MAX_ROW
|
|
53211
|
+
),
|
|
53212
|
+
frozenCols: along(
|
|
53213
|
+
layout2.left,
|
|
53214
|
+
layout2.x,
|
|
53215
|
+
metrics.colAt,
|
|
53216
|
+
metrics.colLeft,
|
|
53217
|
+
metrics.colWidth,
|
|
53218
|
+
MAX_COL
|
|
53219
|
+
),
|
|
53220
|
+
rows: along(
|
|
53221
|
+
layout2.mainTop,
|
|
53222
|
+
rest(layout2.height, layout2.y),
|
|
53223
|
+
metrics.rowAt,
|
|
53224
|
+
metrics.rowTop,
|
|
53225
|
+
metrics.rowHeight,
|
|
53226
|
+
MAX_ROW
|
|
53227
|
+
),
|
|
53228
|
+
cols: along(
|
|
53229
|
+
layout2.mainLeft,
|
|
53230
|
+
rest(layout2.width, layout2.x),
|
|
53231
|
+
metrics.colAt,
|
|
53232
|
+
metrics.colLeft,
|
|
53233
|
+
metrics.colWidth,
|
|
53234
|
+
MAX_COL
|
|
53235
|
+
)
|
|
53236
|
+
};
|
|
53237
|
+
}
|
|
53238
|
+
function revealInSplit(metrics, layout2, row2, col) {
|
|
53239
|
+
const axis = (start, size, paneStart, paneSize, mainStart, mainSize) => {
|
|
53240
|
+
const inPane = paneSize > 0 && start >= paneStart && start + size <= paneStart + paneSize;
|
|
53241
|
+
if (inPane) return mainStart;
|
|
53242
|
+
if (start < mainStart) return start;
|
|
53243
|
+
if (start + size > mainStart + mainSize)
|
|
53244
|
+
return Math.max(0, Math.min(start, start + size - mainSize));
|
|
53245
|
+
return mainStart;
|
|
53246
|
+
};
|
|
53247
|
+
return {
|
|
53248
|
+
left: axis(
|
|
53249
|
+
metrics.colLeft(col),
|
|
53250
|
+
metrics.colWidth(col),
|
|
53251
|
+
layout2.left,
|
|
53252
|
+
layout2.x,
|
|
53253
|
+
layout2.mainLeft,
|
|
53254
|
+
Math.max(0, layout2.width - layout2.x)
|
|
53255
|
+
),
|
|
53256
|
+
top: axis(
|
|
53257
|
+
metrics.rowTop(row2),
|
|
53258
|
+
metrics.rowHeight(row2),
|
|
53259
|
+
layout2.top,
|
|
53260
|
+
layout2.y,
|
|
53261
|
+
layout2.mainTop,
|
|
53262
|
+
Math.max(0, layout2.height - layout2.y)
|
|
53263
|
+
)
|
|
53264
|
+
};
|
|
53265
|
+
}
|
|
53266
|
+
|
|
52435
53267
|
// xlsx/write/filter-columns.ts
|
|
52436
53268
|
function criteriaOf(column3) {
|
|
52437
53269
|
const { values: values2, blank, dateGroups, custom, top10, dynamic, color: color3, icon, hiddenButton } = column3;
|
|
@@ -52593,16 +53425,14 @@ function dimensionXml(sheet) {
|
|
|
52593
53425
|
const used = usedRange(sheet);
|
|
52594
53426
|
return `<dimension ref="${used ? formatRange(used) : "A1"}"/>`;
|
|
52595
53427
|
}
|
|
52596
|
-
function splitActivePane(split2) {
|
|
52597
|
-
const both = split2.x > 0 && split2.y > 0;
|
|
52598
|
-
const valid = both ? ["topLeft", "topRight", "bottomLeft", "bottomRight"] : split2.y > 0 ? ["topLeft", "bottomLeft"] : ["topLeft", "topRight"];
|
|
52599
|
-
if (split2.activePane && valid.includes(split2.activePane)) return split2.activePane;
|
|
52600
|
-
return both ? "bottomRight" : split2.y > 0 ? "bottomLeft" : "topRight";
|
|
52601
|
-
}
|
|
52602
53428
|
function selectionXml(selection, pane) {
|
|
53429
|
+
const activeCellId = selection.ranges.findIndex(
|
|
53430
|
+
(range) => rangeContains(range, selection.active)
|
|
53431
|
+
);
|
|
52603
53432
|
return el("selection", {
|
|
52604
53433
|
pane,
|
|
52605
53434
|
activeCell: formatAddress(selection.active),
|
|
53435
|
+
activeCellId: activeCellId > 0 ? activeCellId : void 0,
|
|
52606
53436
|
sqref: sqref(selection.ranges) || formatAddress(selection.active)
|
|
52607
53437
|
});
|
|
52608
53438
|
}
|
|
@@ -53269,28 +54099,6 @@ function conditionalFormatsXml(formats, styles) {
|
|
|
53269
54099
|
return `<conditionalFormatting sqref="${format.ranges.map((r) => formatRange(r)).join(" ")}">${rules}</conditionalFormatting>`;
|
|
53270
54100
|
}).join("");
|
|
53271
54101
|
}
|
|
53272
|
-
function dataValidationsXml(validations) {
|
|
53273
|
-
const items = validations.filter((dv) => dv.ranges.length).map((dv) => {
|
|
53274
|
-
const hideDropDown = dv.showDropDown === false ? true : void 0;
|
|
53275
|
-
const values2 = attrs2({
|
|
53276
|
-
type: dv.type === "none" ? void 0 : dv.type,
|
|
53277
|
-
errorStyle: dv.errorStyle,
|
|
53278
|
-
operator: dv.operator,
|
|
53279
|
-
allowBlank: dv.allowBlank || void 0,
|
|
53280
|
-
showDropDown: hideDropDown,
|
|
53281
|
-
showInputMessage: dv.showInputMessage || void 0,
|
|
53282
|
-
showErrorMessage: dv.showErrorMessage || void 0,
|
|
53283
|
-
errorTitle: dv.errorTitle,
|
|
53284
|
-
error: dv.error,
|
|
53285
|
-
promptTitle: dv.promptTitle,
|
|
53286
|
-
prompt: dv.prompt,
|
|
53287
|
-
sqref: dv.ranges.map((r) => formatRange(r)).join(" ")
|
|
53288
|
-
});
|
|
53289
|
-
const formulas = (dv.formula1 !== void 0 ? formulaXml2(dv.formula1, "formula1") : "") + (dv.formula2 !== void 0 ? formulaXml2(dv.formula2, "formula2") : "");
|
|
53290
|
-
return formulas ? `<dataValidation${values2}>${formulas}</dataValidation>` : `<dataValidation${values2}/>`;
|
|
53291
|
-
});
|
|
53292
|
-
return items.length ? `<dataValidations count="${items.length}">${items.join("")}</dataValidations>` : "";
|
|
53293
|
-
}
|
|
53294
54102
|
|
|
53295
54103
|
// xlsx/write/sheet-data.ts
|
|
53296
54104
|
var MAX_CELL_TEXT = 32767;
|
|
@@ -54528,6 +55336,8 @@ function writeComments(ctx, sheet, index3, partName, rels) {
|
|
|
54528
55336
|
const { writer, source: source3 } = ctx;
|
|
54529
55337
|
const name = (pattern) => writer.uniqueName(pattern, ctx.reserved);
|
|
54530
55338
|
const fromSource = source3 && sheet.partName && source3.has(sheet.partName);
|
|
55339
|
+
const sourceThreaded = fromSource ? source3.targetOfType(sheet.partName ?? "", RELATIONSHIP_TYPES.threadedComment) : void 0;
|
|
55340
|
+
const threadEnvelope = sheet.threadedCommentsXml ?? threadedCommentEnvelope(sourceThreaded ? source3?.text(sourceThreaded) : void 0);
|
|
54531
55341
|
const sourceVml = fromSource ? sourceVmlPart(source3, sheet.partName ?? "") : void 0;
|
|
54532
55342
|
const kept = source3 && sourceVml && !writer.has(sourceVml) ? stripNoteShapes(source3.text(sourceVml) ?? "") : void 0;
|
|
54533
55343
|
const base = kept && kept.kept > 0 ? kept.xml : void 0;
|
|
@@ -54552,11 +55362,13 @@ function writeComments(ctx, sheet, index3, partName, rels) {
|
|
|
54552
55362
|
parseLegacyComments(legacyPart ? source3.text(legacyPart) : void 0),
|
|
54553
55363
|
parseThreadedComments(
|
|
54554
55364
|
threadedPart ? source3.text(threadedPart) : void 0,
|
|
54555
|
-
parsePersons(personsPart ? source3.text(personsPart) : void 0)
|
|
55365
|
+
parsePersons(personsPart ? source3.text(personsPart) : void 0),
|
|
55366
|
+
personsPart ? source3.text(personsPart) : void 0
|
|
54556
55367
|
)
|
|
54557
55368
|
);
|
|
54558
55369
|
const free = [legacyPart, threadedPart, vmlPart].every((p) => !p || !writer.has(p));
|
|
54559
|
-
|
|
55370
|
+
const envelope = threadedCommentEnvelope(threadedPart ? source3.text(threadedPart) : void 0);
|
|
55371
|
+
if (legacyPart && vmlPart && free && sameModel(before, sheet.comments) && (sheet.threadedCommentsXml === void 0 || sheet.threadedCommentsXml === envelope)) {
|
|
54560
55372
|
writer.carry(legacyPart);
|
|
54561
55373
|
writer.carry(vmlPart);
|
|
54562
55374
|
rels.add(RELATIONSHIP_TYPES.comments, relativeTarget(partName, legacyPart));
|
|
@@ -54570,10 +55382,20 @@ function writeComments(ctx, sheet, index3, partName, rels) {
|
|
|
54570
55382
|
}
|
|
54571
55383
|
const own = base ? vmlIdmapBlocks(base) : [];
|
|
54572
55384
|
const layout2 = vmlAllocatorFor(ctx, source3).allocate(sheet.comments.length, index3 + 1, own);
|
|
54573
|
-
const parts = commentParts(
|
|
54574
|
-
|
|
54575
|
-
|
|
54576
|
-
|
|
55385
|
+
const parts = commentParts(
|
|
55386
|
+
sheet.comments,
|
|
55387
|
+
index3 + 1,
|
|
55388
|
+
ctx.persons,
|
|
55389
|
+
sheet.name,
|
|
55390
|
+
{
|
|
55391
|
+
...layout2,
|
|
55392
|
+
...base ? { base } : {}
|
|
55393
|
+
},
|
|
55394
|
+
{
|
|
55395
|
+
...threadEnvelope ? { envelope: threadEnvelope } : {},
|
|
55396
|
+
ids: ctx.commentIds ??= new CommentIds(ctx.workbook)
|
|
55397
|
+
}
|
|
55398
|
+
);
|
|
54577
55399
|
const commentsPart = name((n2) => `xl/comments${n2}.xml`);
|
|
54578
55400
|
writer.add(commentsPart, parts.comments, CONTENT_TYPES.comments);
|
|
54579
55401
|
rels.add(RELATIONSHIP_TYPES.comments, relativeTarget(partName, commentsPart));
|
|
@@ -54764,13 +55586,17 @@ function writeWorksheet(ctx, sheet, index3, partName) {
|
|
|
54764
55586
|
blocks.set("legacyDrawing", writeComments(ctx, sheet, index3, partName, rels));
|
|
54765
55587
|
blocks.set("tableParts", tableParts);
|
|
54766
55588
|
ctx.pivots?.writeSheet(writer, sheet, partName, rels);
|
|
54767
|
-
const extensions =
|
|
55589
|
+
const extensions = validationExtensionsXml(
|
|
55590
|
+
sheet,
|
|
55591
|
+
conditionalExtensionsXml(sheet),
|
|
55592
|
+
ctx.validationIds ??= /* @__PURE__ */ new Set()
|
|
55593
|
+
);
|
|
54768
55594
|
blocks.set(
|
|
54769
55595
|
"extLst",
|
|
54770
55596
|
ctx.slicers?.active ? ctx.slicers.writeSheet(sheet, partName, rels, extensions) : extensions
|
|
54771
55597
|
);
|
|
54772
55598
|
for (const [key, list3] of sheet.preserved) {
|
|
54773
|
-
if (key.startsWith("source:") || !WORKSHEET_CHILD_ORDER.includes(key) || (blocks.get(key) ?? "") !== "" || key === "extLst"
|
|
55599
|
+
if (key.startsWith("source:") || !WORKSHEET_CHILD_ORDER.includes(key) || (blocks.get(key) ?? "") !== "" || key === "extLst")
|
|
54774
55600
|
continue;
|
|
54775
55601
|
const valid = list3.filter(
|
|
54776
55602
|
(xml) => [...xml.matchAll(/\br:(?:id|embed|link|pict)="([^"]*)"/g)].every(
|
|
@@ -55046,7 +55872,7 @@ function dateFilterXml(pivot, filter2) {
|
|
|
55046
55872
|
}
|
|
55047
55873
|
|
|
55048
55874
|
// xlsx/pivot/write.ts
|
|
55049
|
-
var
|
|
55875
|
+
var TYPES4 = {
|
|
55050
55876
|
table: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
|
|
55051
55877
|
definition: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml",
|
|
55052
55878
|
records: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"
|
|
@@ -55112,14 +55938,14 @@ var PivotWritePlan = class {
|
|
|
55112
55938
|
`${NS.r}/pivotCacheRecords`,
|
|
55113
55939
|
relativeTarget(definition2, records)
|
|
55114
55940
|
);
|
|
55115
|
-
writer.add(records, pivotCacheRecordsXml(pivot, cache3),
|
|
55941
|
+
writer.add(records, pivotCacheRecordsXml(pivot, cache3), TYPES4.records);
|
|
55116
55942
|
writer.add(
|
|
55117
55943
|
definition2,
|
|
55118
55944
|
pivotCacheDefinitionXml(pivot, workbook, cache3, recordRel),
|
|
55119
|
-
|
|
55945
|
+
TYPES4.definition
|
|
55120
55946
|
);
|
|
55121
55947
|
writer.rels(definition2, cacheRels);
|
|
55122
|
-
writer.add(table3, pivotTableXml(pivot, cacheId, cache3),
|
|
55948
|
+
writer.add(table3, pivotTableXml(pivot, cacheId, cache3), TYPES4.table);
|
|
55123
55949
|
const tableRels = new RelationshipSet();
|
|
55124
55950
|
tableRels.add(RELATIONSHIP_TYPES.pivotCacheDefinition, relativeTarget(table3, definition2));
|
|
55125
55951
|
writer.rels(table3, tableRels);
|
|
@@ -56646,7 +57472,8 @@ async function saveXlsx(workbook) {
|
|
|
56646
57472
|
styles: new StyleWriter(workbook, stylesPart ? source3?.text(stylesPart) : void 0),
|
|
56647
57473
|
strings: new SharedStringTable(),
|
|
56648
57474
|
persons: new PersonRegistry(
|
|
56649
|
-
parsePersons(personsSource ? source3?.text(personsSource) : void 0)
|
|
57475
|
+
parsePersons(personsSource ? source3?.text(personsSource) : void 0),
|
|
57476
|
+
personsSource ? source3?.text(personsSource) : void 0
|
|
56650
57477
|
),
|
|
56651
57478
|
reserved,
|
|
56652
57479
|
tableIds: /* @__PURE__ */ new Set(),
|
|
@@ -56721,7 +57548,9 @@ async function saveXlsx(workbook) {
|
|
|
56721
57548
|
rels.add(RELATIONSHIP_TYPES.theme, relativeTarget(bookPart, outTheme));
|
|
56722
57549
|
if (ctx.threaded.used) {
|
|
56723
57550
|
const personsPart = personsSource ?? "xl/persons/person.xml";
|
|
56724
|
-
|
|
57551
|
+
if (personsSource) writer.carry(personsSource);
|
|
57552
|
+
if (!personsSource || ctx.persons.changed)
|
|
57553
|
+
writer.add(personsPart, ctx.persons.xml(), CONTENT_TYPES.persons);
|
|
56725
57554
|
rels.add(RELATIONSHIP_TYPES.person, relativeTarget(bookPart, personsPart));
|
|
56726
57555
|
}
|
|
56727
57556
|
writeMetadataPart(
|
|
@@ -57842,6 +58671,37 @@ function setComment(ctx, s, at2, text3, author) {
|
|
|
57842
58671
|
{ sheet: s, ranges: [{ start: at2, end: at2 }] }
|
|
57843
58672
|
);
|
|
57844
58673
|
}
|
|
58674
|
+
function setCommentReply(ctx, s, at2, replyIndex, text3) {
|
|
58675
|
+
const sheet = sheetAt(ctx.workbook, s);
|
|
58676
|
+
const comment = sheet.comments.find((c2) => c2.address.row === at2.row && c2.address.col === at2.col);
|
|
58677
|
+
const reply = Number.isInteger(replyIndex) ? comment?.replies?.[replyIndex] : void 0;
|
|
58678
|
+
if (!reply) throw new RangeError("Comment reply not found.");
|
|
58679
|
+
if (reply.text === text3) return;
|
|
58680
|
+
ctx.run(
|
|
58681
|
+
"Edit comment",
|
|
58682
|
+
"annotations",
|
|
58683
|
+
[{ kind: "sheet", sheet: s }],
|
|
58684
|
+
() => {
|
|
58685
|
+
reply.text = text3;
|
|
58686
|
+
},
|
|
58687
|
+
{ sheet: s, ranges: [{ start: at2, end: at2 }] }
|
|
58688
|
+
);
|
|
58689
|
+
}
|
|
58690
|
+
function setCommentResolved(ctx, s, at2, resolved) {
|
|
58691
|
+
const sheet = sheetAt(ctx.workbook, s);
|
|
58692
|
+
const comment = sheet.comments.find((c2) => c2.address.row === at2.row && c2.address.col === at2.col);
|
|
58693
|
+
if (!comment?.replies) throw new RangeError("Threaded comment not found.");
|
|
58694
|
+
if ((comment.resolved ?? false) === resolved) return;
|
|
58695
|
+
ctx.run(
|
|
58696
|
+
"Edit comment",
|
|
58697
|
+
"annotations",
|
|
58698
|
+
[{ kind: "sheet", sheet: s }],
|
|
58699
|
+
() => {
|
|
58700
|
+
comment.resolved = resolved;
|
|
58701
|
+
},
|
|
58702
|
+
{ sheet: s, ranges: [{ start: at2, end: at2 }] }
|
|
58703
|
+
);
|
|
58704
|
+
}
|
|
57845
58705
|
function setHyperlink(ctx, s, range, link) {
|
|
57846
58706
|
const sheet = sheetAt(ctx.workbook, s);
|
|
57847
58707
|
const r = normalizeRange(range);
|
|
@@ -59202,6 +60062,11 @@ function pasteWidths(ctx, s, selection, cells, transpose2, cut) {
|
|
|
59202
60062
|
return dest;
|
|
59203
60063
|
}
|
|
59204
60064
|
|
|
60065
|
+
// xlsx/edit/comment-identities.ts
|
|
60066
|
+
function resetCommentIdentities(comment) {
|
|
60067
|
+
if (comment.replies) comment.regenerateThreadIds = true;
|
|
60068
|
+
}
|
|
60069
|
+
|
|
59205
60070
|
// xlsx/edit/clipboard-annotations.ts
|
|
59206
60071
|
function copyAnnotations(sheet, area) {
|
|
59207
60072
|
const relative2 = (at2) => ({
|
|
@@ -59243,7 +60108,9 @@ function pasteAnnotations(sheet, dest, cells, mode, transpose2, skipBlanks, cutF
|
|
|
59243
60108
|
for (const comment of cells.comments) {
|
|
59244
60109
|
const address2 = point2(comment.address);
|
|
59245
60110
|
comments.delete(key(address2));
|
|
59246
|
-
|
|
60111
|
+
const pasted = { ...structuredClone(comment), address: address2 };
|
|
60112
|
+
if (!cutFormula) resetCommentIdentities(pasted);
|
|
60113
|
+
comments.set(key(address2), pasted);
|
|
59247
60114
|
}
|
|
59248
60115
|
sheet.comments = [...comments.values()];
|
|
59249
60116
|
}
|
|
@@ -61248,7 +62115,7 @@ function applyPrint(workbook, sheet, index3, saved) {
|
|
|
61248
62115
|
|
|
61249
62116
|
// xlsx/edit/sparkline-xml.ts
|
|
61250
62117
|
var XM4 = "http://schemas.microsoft.com/office/excel/2006/main";
|
|
61251
|
-
var
|
|
62118
|
+
var URI3 = "{05C60535-1F16-4fd2-B633-F4F36F0B64E0}";
|
|
61252
62119
|
var COLORS2 = [
|
|
61253
62120
|
"colorSeries",
|
|
61254
62121
|
"colorNegative",
|
|
@@ -61334,15 +62201,15 @@ function appendSparklineXml(sheet, groupXml3) {
|
|
|
61334
62201
|
const doc = parseXml(source3[index3] ?? `<extLst xmlns="${NS.x}"/>`);
|
|
61335
62202
|
const root = doc.documentElement;
|
|
61336
62203
|
let ext = children(root, "ext", NS.x).find(
|
|
61337
|
-
(node2) => node2.getAttribute("uri")?.toUpperCase() ===
|
|
62204
|
+
(node2) => node2.getAttribute("uri")?.toUpperCase() === URI3.toUpperCase()
|
|
61338
62205
|
);
|
|
61339
62206
|
if (!ext) {
|
|
61340
62207
|
ext = doc.createElementNS(NS.x, "ext");
|
|
61341
|
-
ext.setAttribute("uri",
|
|
62208
|
+
ext.setAttribute("uri", URI3);
|
|
61342
62209
|
ext.setAttribute("xmlns:x14", NS.x14);
|
|
61343
62210
|
root.appendChild(ext);
|
|
61344
62211
|
}
|
|
61345
|
-
ext.setAttribute("uri",
|
|
62212
|
+
ext.setAttribute("uri", URI3);
|
|
61346
62213
|
let groups = first(ext, "sparklineGroups", NS.x14);
|
|
61347
62214
|
if (!groups) {
|
|
61348
62215
|
groups = doc.createElementNS(NS.x14, "x14:sparklineGroups");
|
|
@@ -62548,7 +63415,7 @@ function admitted(space, seriesIndex) {
|
|
|
62548
63415
|
if (!chartSeriesAnalysisSupported(space, seriesIndex))
|
|
62549
63416
|
throw new RangeError("This chart family does not support series analysis editing");
|
|
62550
63417
|
}
|
|
62551
|
-
var
|
|
63418
|
+
var TYPES5 = /* @__PURE__ */ new Set(["linear", "exp", "log", "poly", "power", "movingAvg"]);
|
|
62552
63419
|
function setChartTrendline(space, seriesIndex, index3, edit) {
|
|
62553
63420
|
admitted(space, seriesIndex);
|
|
62554
63421
|
return editChartSpace(space, (draft) => {
|
|
@@ -62562,7 +63429,7 @@ function setChartTrendline(space, seriesIndex, index3, edit) {
|
|
|
62562
63429
|
}
|
|
62563
63430
|
const next = { ...list3[index3] ?? { trendlineType: "linear" } };
|
|
62564
63431
|
if (edit.type !== void 0) {
|
|
62565
|
-
if (!
|
|
63432
|
+
if (!TYPES5.has(edit.type)) throw new RangeError("Unsupported trendline type");
|
|
62566
63433
|
next.trendlineType = edit.type;
|
|
62567
63434
|
if (edit.type !== "poly") delete next.order;
|
|
62568
63435
|
if (edit.type !== "movingAvg") delete next.period;
|
|
@@ -73539,6 +74406,7 @@ function duplicateSheet(ctx, index3) {
|
|
|
73539
74406
|
copy.name = copyName(workbook, sheet.name);
|
|
73540
74407
|
copy.sheetId = nextSheetId(workbook);
|
|
73541
74408
|
delete copy.partName;
|
|
74409
|
+
for (const comment of copy.comments) resetCommentIdentities(comment);
|
|
73542
74410
|
const pivotNames = reservedPivotNames(workbook);
|
|
73543
74411
|
for (const pivot of copy.pivotTables ?? []) {
|
|
73544
74412
|
let suffix = 2;
|
|
@@ -74033,6 +74901,8 @@ function createEditSession(workbook, options2 = {}) {
|
|
|
74033
74901
|
setFreeze: (s, freeze) => setFreeze(ctx, s, freeze),
|
|
74034
74902
|
setSplit: (s, split2, topLeft) => setSplit(ctx, s, split2, topLeft),
|
|
74035
74903
|
setComment: (s, at2, text3, author) => setComment(ctx, s, at2, text3, author),
|
|
74904
|
+
setCommentReply: (s, at2, index3, text3) => setCommentReply(ctx, s, at2, index3, text3),
|
|
74905
|
+
setCommentResolved: (s, at2, resolved) => setCommentResolved(ctx, s, at2, resolved),
|
|
74036
74906
|
setHyperlink: (s, range, link) => setHyperlink(ctx, s, range, link),
|
|
74037
74907
|
addConditionalFormat: (s, cf) => addConditionalFormat(ctx, s, cf),
|
|
74038
74908
|
clearConditionalFormats: (s, range) => clearConditionalFormats(ctx, s, range),
|
|
@@ -74362,154 +75232,6 @@ function chartQuickLayoutPatch(chart, n2) {
|
|
|
74362
75232
|
return patch3;
|
|
74363
75233
|
}
|
|
74364
75234
|
|
|
74365
|
-
// xlsx/layout/viewport.ts
|
|
74366
|
-
var frozenExtent = (count2, start) => count2 > 0 ? start(count2) : 0;
|
|
74367
|
-
function collectVisible(from, to, limit2, at2, start, size, minIndex) {
|
|
74368
|
-
const out = [];
|
|
74369
|
-
if (to <= from) return out;
|
|
74370
|
-
let i2 = Math.max(minIndex, at2(from));
|
|
74371
|
-
while (i2 <= limit2 && start(i2) < to) {
|
|
74372
|
-
if (size(i2) > 0) out.push(i2);
|
|
74373
|
-
i2++;
|
|
74374
|
-
}
|
|
74375
|
-
return out;
|
|
74376
|
-
}
|
|
74377
|
-
function frozenList(count2, size, limit2) {
|
|
74378
|
-
const out = [];
|
|
74379
|
-
for (let i2 = 0; i2 < Math.min(count2, limit2 + 1); i2++) if (size(i2) > 0) out.push(i2);
|
|
74380
|
-
return out;
|
|
74381
|
-
}
|
|
74382
|
-
function visibleCells(metrics, viewport, freeze) {
|
|
74383
|
-
const fRows = Math.max(0, freeze?.rows ?? 0);
|
|
74384
|
-
const fCols = Math.max(0, freeze?.cols ?? 0);
|
|
74385
|
-
const frozenH = frozenExtent(fRows, metrics.rowTop);
|
|
74386
|
-
const frozenW = frozenExtent(fCols, metrics.colLeft);
|
|
74387
|
-
const top = frozenH + Math.max(0, viewport.scrollTop);
|
|
74388
|
-
const left2 = frozenW + Math.max(0, viewport.scrollLeft);
|
|
74389
|
-
const rows2 = collectVisible(
|
|
74390
|
-
top,
|
|
74391
|
-
top + Math.max(0, viewport.height - frozenH),
|
|
74392
|
-
MAX_ROW,
|
|
74393
|
-
metrics.rowAt,
|
|
74394
|
-
metrics.rowTop,
|
|
74395
|
-
metrics.rowHeight,
|
|
74396
|
-
fRows
|
|
74397
|
-
);
|
|
74398
|
-
const cols = collectVisible(
|
|
74399
|
-
left2,
|
|
74400
|
-
left2 + Math.max(0, viewport.width - frozenW),
|
|
74401
|
-
MAX_COL,
|
|
74402
|
-
metrics.colAt,
|
|
74403
|
-
metrics.colLeft,
|
|
74404
|
-
metrics.colWidth,
|
|
74405
|
-
fCols
|
|
74406
|
-
);
|
|
74407
|
-
return {
|
|
74408
|
-
rows: rows2,
|
|
74409
|
-
cols,
|
|
74410
|
-
frozenRows: frozenList(fRows, metrics.rowHeight, MAX_ROW),
|
|
74411
|
-
frozenCols: frozenList(fCols, metrics.colWidth, MAX_COL)
|
|
74412
|
-
};
|
|
74413
|
-
}
|
|
74414
|
-
|
|
74415
|
-
// xlsx/layout/split.ts
|
|
74416
|
-
var TWIPS_PER_PX = 15;
|
|
74417
|
-
var MIN_SPLIT_PANE = 24;
|
|
74418
|
-
var splitToPx = (twips, zoom) => twips > 0 ? Math.round(twips / TWIPS_PER_PX * zoom / 100) : 0;
|
|
74419
|
-
var pxToSplit = (px, zoom) => px > 0 ? Math.round(px * TWIPS_PER_PX * 100 / zoom) : 0;
|
|
74420
|
-
function splitAtCell(metrics, active, scroll2, view) {
|
|
74421
|
-
if (view.width <= 0 || view.height <= 0) return void 0;
|
|
74422
|
-
const ax = metrics.colLeft(active.col) - scroll2.left;
|
|
74423
|
-
const ay = metrics.rowTop(active.row) - scroll2.top;
|
|
74424
|
-
let x = ax > 0 && ax < view.width ? ax : 0;
|
|
74425
|
-
let y = ay > 0 && ay < view.height ? ay : 0;
|
|
74426
|
-
if (!x && !y) {
|
|
74427
|
-
x = Math.floor(view.width / 2);
|
|
74428
|
-
y = Math.floor(view.height / 2);
|
|
74429
|
-
}
|
|
74430
|
-
const first2 = {
|
|
74431
|
-
row: metrics.rowAt(scroll2.top),
|
|
74432
|
-
col: metrics.colAt(scroll2.left)
|
|
74433
|
-
};
|
|
74434
|
-
const split2 = {
|
|
74435
|
-
x: pxToSplit(x, metrics.zoom),
|
|
74436
|
-
y: pxToSplit(y, metrics.zoom),
|
|
74437
|
-
topLeft: first2,
|
|
74438
|
-
activePane: x && y ? "bottomRight" : y ? "bottomLeft" : "topRight"
|
|
74439
|
-
};
|
|
74440
|
-
return split2;
|
|
74441
|
-
}
|
|
74442
|
-
function clampSplitBar(px, extent2, zoom) {
|
|
74443
|
-
const min = Math.round(MIN_SPLIT_PANE * zoom / 100);
|
|
74444
|
-
return Math.max(min, Math.min(extent2 - min, Math.round(px)));
|
|
74445
|
-
}
|
|
74446
|
-
function splitVisible(metrics, layout2) {
|
|
74447
|
-
const along = (from, size, at2, start, extent2, limit2) => collectVisible(from, from + Math.max(0, size), limit2, at2, start, extent2, 0);
|
|
74448
|
-
const rest = (total2, taken) => Math.max(0, total2 - taken);
|
|
74449
|
-
return {
|
|
74450
|
-
frozenRows: along(
|
|
74451
|
-
layout2.top,
|
|
74452
|
-
layout2.y,
|
|
74453
|
-
metrics.rowAt,
|
|
74454
|
-
metrics.rowTop,
|
|
74455
|
-
metrics.rowHeight,
|
|
74456
|
-
MAX_ROW
|
|
74457
|
-
),
|
|
74458
|
-
frozenCols: along(
|
|
74459
|
-
layout2.left,
|
|
74460
|
-
layout2.x,
|
|
74461
|
-
metrics.colAt,
|
|
74462
|
-
metrics.colLeft,
|
|
74463
|
-
metrics.colWidth,
|
|
74464
|
-
MAX_COL
|
|
74465
|
-
),
|
|
74466
|
-
rows: along(
|
|
74467
|
-
layout2.mainTop,
|
|
74468
|
-
rest(layout2.height, layout2.y),
|
|
74469
|
-
metrics.rowAt,
|
|
74470
|
-
metrics.rowTop,
|
|
74471
|
-
metrics.rowHeight,
|
|
74472
|
-
MAX_ROW
|
|
74473
|
-
),
|
|
74474
|
-
cols: along(
|
|
74475
|
-
layout2.mainLeft,
|
|
74476
|
-
rest(layout2.width, layout2.x),
|
|
74477
|
-
metrics.colAt,
|
|
74478
|
-
metrics.colLeft,
|
|
74479
|
-
metrics.colWidth,
|
|
74480
|
-
MAX_COL
|
|
74481
|
-
)
|
|
74482
|
-
};
|
|
74483
|
-
}
|
|
74484
|
-
function revealInSplit(metrics, layout2, row2, col) {
|
|
74485
|
-
const axis = (start, size, paneStart, paneSize, mainStart, mainSize) => {
|
|
74486
|
-
const inPane = paneSize > 0 && start >= paneStart && start + size <= paneStart + paneSize;
|
|
74487
|
-
if (inPane) return mainStart;
|
|
74488
|
-
if (start < mainStart) return start;
|
|
74489
|
-
if (start + size > mainStart + mainSize)
|
|
74490
|
-
return Math.max(0, Math.min(start, start + size - mainSize));
|
|
74491
|
-
return mainStart;
|
|
74492
|
-
};
|
|
74493
|
-
return {
|
|
74494
|
-
left: axis(
|
|
74495
|
-
metrics.colLeft(col),
|
|
74496
|
-
metrics.colWidth(col),
|
|
74497
|
-
layout2.left,
|
|
74498
|
-
layout2.x,
|
|
74499
|
-
layout2.mainLeft,
|
|
74500
|
-
Math.max(0, layout2.width - layout2.x)
|
|
74501
|
-
),
|
|
74502
|
-
top: axis(
|
|
74503
|
-
metrics.rowTop(row2),
|
|
74504
|
-
metrics.rowHeight(row2),
|
|
74505
|
-
layout2.top,
|
|
74506
|
-
layout2.y,
|
|
74507
|
-
layout2.mainTop,
|
|
74508
|
-
Math.max(0, layout2.height - layout2.y)
|
|
74509
|
-
)
|
|
74510
|
-
};
|
|
74511
|
-
}
|
|
74512
|
-
|
|
74513
75235
|
// collab/identity.ts
|
|
74514
75236
|
var MAX_LABEL_CHARS = 20;
|
|
74515
75237
|
function formatCursorLabel(userName, maxChars = MAX_LABEL_CHARS) {
|