ooxml-core 1.37.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/automation/index.cjs +207 -207
- package/dist/automation/index.mjs +207 -207
- package/dist/{chunk-M2DFN3SP.mjs → chunk-XBIZIBTJ.mjs} +507 -10
- package/dist/collab/merge-values.d.ts +14 -0
- package/dist/collab/merge-values.d.ts.map +1 -0
- package/dist/docx/embedded.cjs +476 -474
- package/dist/docx/embedded.mjs +476 -474
- package/dist/docx/index.cjs +1075 -719
- package/dist/docx/index.d.ts +1 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +1075 -720
- package/dist/docx/layout/index.cjs +4 -0
- package/dist/docx/layout/index.mjs +4 -0
- package/dist/docx/load/index.cjs +164 -164
- package/dist/docx/load/index.mjs +164 -164
- package/dist/docx/merge-snapshots.d.ts +9 -0
- package/dist/docx/merge-snapshots.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +155 -155
- package/dist/docx/ui/index.mjs +155 -155
- package/dist/embedding/index.cjs +207 -0
- package/dist/embedding/index.d.ts +3 -0
- package/dist/embedding/index.d.ts.map +1 -1
- package/dist/embedding/index.mjs +205 -1
- package/dist/embedding/onedrive/client.d.ts +4 -0
- package/dist/embedding/onedrive/client.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.cjs +617 -0
- package/dist/embedding/onedrive/index.d.ts +6 -0
- package/dist/embedding/onedrive/index.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.mjs +611 -0
- package/dist/embedding/onedrive/metadata.d.ts +6 -0
- package/dist/embedding/onedrive/metadata.d.ts.map +1 -0
- package/dist/embedding/onedrive/requests.d.ts +8 -0
- package/dist/embedding/onedrive/requests.d.ts.map +1 -0
- package/dist/embedding/onedrive/session.d.ts +4 -0
- package/dist/embedding/onedrive/session.d.ts.map +1 -0
- package/dist/embedding/onedrive/transport.d.ts +9 -0
- package/dist/embedding/onedrive/transport.d.ts.map +1 -0
- package/dist/embedding/onedrive/types.d.ts +86 -0
- package/dist/embedding/onedrive/types.d.ts.map +1 -0
- package/dist/embedding/onedrive/upload.d.ts +3 -0
- package/dist/embedding/onedrive/upload.d.ts.map +1 -0
- package/dist/embedding/storage-merge.d.ts +8 -0
- package/dist/embedding/storage-merge.d.ts.map +1 -0
- package/dist/embedding/storage-session.d.ts +7 -0
- package/dist/embedding/storage-session.d.ts.map +1 -0
- package/dist/embedding/versioned-storage.d.ts +67 -0
- package/dist/embedding/versioned-storage.d.ts.map +1 -0
- package/dist/index.cjs +1013 -340
- package/dist/index.mjs +1013 -340
- package/dist/opc/index.cjs +680 -216
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +680 -217
- package/dist/opc/merge-snapshots.d.ts +26 -0
- package/dist/opc/merge-snapshots.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +20 -6
- package/dist/pptx/automation/index.d.ts +8 -17
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +1 -1
- 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.d.ts +1 -3
- package/dist/pptx/automation/schemas/index.d.ts.map +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.d.ts +1 -3
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +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-BnH2QjYm.d.ts → index-Jcce8TlI.d.ts} +5 -37
- package/dist/pptx/chunks/index-Jcce8TlI.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-pLLN4OTz.d.ts → index-bgj0Ztnq.d.ts} +23 -543
- package/dist/pptx/chunks/index-bgj0Ztnq.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 +20 -6
- package/dist/pptx/cli/index.d.ts +1 -3
- package/dist/pptx/cli/index.d.ts.map +1 -1
- package/dist/pptx/converter/index.cjs +7 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- 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.d.ts +0 -2
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +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.d.ts +2 -4
- package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
- 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.d.ts +0 -2
- package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
- 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 +1687 -1159
- package/dist/pptx/index.d.ts +10 -10
- package/dist/pptx/index.mjs +1 -1
- 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 +1 -9
- package/dist/pptx/ui/index.d.ts.map +1 -1
- package/dist/teams/index.cjs +215 -201
- package/dist/teams/index.mjs +215 -201
- package/dist/text/index.cjs +193 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +193 -1
- package/dist/text/merge-three-way.d.ts +9 -0
- package/dist/text/merge-three-way.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +226 -7
- package/dist/visio/collab/index.d.ts +1 -0
- package/dist/visio/collab/index.d.ts.map +1 -1
- package/dist/visio/collab/index.mjs +225 -7
- package/dist/visio/collab/merge-snapshots.d.ts +14 -0
- package/dist/visio/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/visio/index.cjs +9 -9
- package/dist/visio/index.mjs +9 -9
- package/dist/visio/ui/index.cjs +9 -9
- package/dist/visio/ui/index.mjs +9 -9
- package/dist/xlsx/collab/index.cjs +49966 -507
- package/dist/xlsx/collab/index.d.ts +1 -0
- package/dist/xlsx/collab/index.d.ts.map +1 -1
- package/dist/xlsx/collab/index.mjs +49961 -507
- package/dist/xlsx/collab/merge-residual.d.ts +16 -0
- package/dist/xlsx/collab/merge-residual.d.ts.map +1 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts +8 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/xlsx/index.cjs +202 -202
- package/dist/xlsx/index.mjs +202 -202
- package/dist/xlsx/load/index.cjs +155 -155
- package/dist/xlsx/load/index.mjs +155 -155
- package/dist/xlsx/ui/index.cjs +202 -202
- package/dist/xlsx/ui/index.mjs +202 -202
- package/dist/xml/index.cjs +390 -22
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/index.mjs +390 -23
- package/dist/xml/merge-three-way.d.ts +16 -0
- package/dist/xml/merge-three-way.d.ts.map +1 -0
- package/package.json +13 -8
- 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/ui/index.cjs
CHANGED
|
@@ -1846,6 +1846,161 @@ function attr(element3, local, ns, prefix) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
var relAttr = (element3, local) => attr(element3, local, NS.r, "r");
|
|
1848
1848
|
|
|
1849
|
+
// text/text-diff.ts
|
|
1850
|
+
var isLowSurrogate = (text3, at2) => {
|
|
1851
|
+
const code = text3.charCodeAt(at2);
|
|
1852
|
+
return code >= 56320 && code <= 57343;
|
|
1853
|
+
};
|
|
1854
|
+
function shortestEdit(n2, m, same12, maxEdits) {
|
|
1855
|
+
const max = Math.min(n2 + m, maxEdits);
|
|
1856
|
+
const offset2 = max + 1;
|
|
1857
|
+
const v = new Int32Array(2 * max + 3);
|
|
1858
|
+
const trace2 = [];
|
|
1859
|
+
for (let d = 0; d <= max; d++) {
|
|
1860
|
+
for (let k = -d; k <= d; k += 2) {
|
|
1861
|
+
const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
|
|
1862
|
+
let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
|
|
1863
|
+
let y = x - k;
|
|
1864
|
+
while (x < n2 && y < m && same12(x, y)) {
|
|
1865
|
+
x++;
|
|
1866
|
+
y++;
|
|
1867
|
+
}
|
|
1868
|
+
v[offset2 + k] = x;
|
|
1869
|
+
if (x >= n2 && y >= m) return backtrack(trace2, n2, m, d);
|
|
1870
|
+
}
|
|
1871
|
+
trace2.push(v.slice(offset2 - d, offset2 + d + 1));
|
|
1872
|
+
}
|
|
1873
|
+
return void 0;
|
|
1874
|
+
}
|
|
1875
|
+
function backtrack(trace2, n2, m, d) {
|
|
1876
|
+
const edits = [];
|
|
1877
|
+
let x = n2;
|
|
1878
|
+
let y = m;
|
|
1879
|
+
for (let step = d; step > 0; step--) {
|
|
1880
|
+
const previous = trace2[step - 1];
|
|
1881
|
+
const at2 = (k2) => previous[k2 + step - 1];
|
|
1882
|
+
const k = x - y;
|
|
1883
|
+
const down = k === -step || k !== step && at2(k - 1) < at2(k + 1);
|
|
1884
|
+
const before = down ? k + 1 : k - 1;
|
|
1885
|
+
const startX = at2(before);
|
|
1886
|
+
const startY = startX - before;
|
|
1887
|
+
edits.push(down ? [startX, startY, true] : [startX, startY, false]);
|
|
1888
|
+
x = startX;
|
|
1889
|
+
y = startY;
|
|
1890
|
+
}
|
|
1891
|
+
return edits.reverse();
|
|
1892
|
+
}
|
|
1893
|
+
function changesOf(edits) {
|
|
1894
|
+
const changes = [];
|
|
1895
|
+
for (const [x, y, inserts] of edits) {
|
|
1896
|
+
const last = changes.at(-1);
|
|
1897
|
+
if (last && last.fromEnd === x && last.toEnd === y) {
|
|
1898
|
+
if (inserts) last.toEnd++;
|
|
1899
|
+
else last.fromEnd++;
|
|
1900
|
+
} else
|
|
1901
|
+
changes.push({
|
|
1902
|
+
fromStart: x,
|
|
1903
|
+
fromEnd: inserts ? x : x + 1,
|
|
1904
|
+
toStart: y,
|
|
1905
|
+
toEnd: inserts ? y + 1 : y
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
return changes;
|
|
1909
|
+
}
|
|
1910
|
+
function characterChanges(a2, b, maxEdits) {
|
|
1911
|
+
const edits = shortestEdit(
|
|
1912
|
+
a2.length,
|
|
1913
|
+
b.length,
|
|
1914
|
+
(x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
|
|
1915
|
+
maxEdits
|
|
1916
|
+
);
|
|
1917
|
+
return edits && changesOf(edits);
|
|
1918
|
+
}
|
|
1919
|
+
var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
|
|
1920
|
+
function tokensOf(text3, ids) {
|
|
1921
|
+
const tokens2 = [];
|
|
1922
|
+
const starts = [];
|
|
1923
|
+
for (const match2 of text3.matchAll(TOKEN)) {
|
|
1924
|
+
let id = ids.get(match2[0]);
|
|
1925
|
+
if (id === void 0) ids.set(match2[0], id = ids.size);
|
|
1926
|
+
tokens2.push(id);
|
|
1927
|
+
starts.push(match2.index);
|
|
1928
|
+
}
|
|
1929
|
+
starts.push(text3.length);
|
|
1930
|
+
return { tokens: tokens2, starts };
|
|
1931
|
+
}
|
|
1932
|
+
function tokenChanges(a2, b, maxEdits) {
|
|
1933
|
+
const ids = /* @__PURE__ */ new Map();
|
|
1934
|
+
const from = tokensOf(a2, ids);
|
|
1935
|
+
const to = tokensOf(b, ids);
|
|
1936
|
+
const edits = shortestEdit(
|
|
1937
|
+
from.tokens.length,
|
|
1938
|
+
to.tokens.length,
|
|
1939
|
+
(x, y) => from.tokens[x] === to.tokens[y],
|
|
1940
|
+
maxEdits
|
|
1941
|
+
);
|
|
1942
|
+
if (!edits) return void 0;
|
|
1943
|
+
let budget2 = maxEdits;
|
|
1944
|
+
return changesOf(edits).flatMap((stretch) => {
|
|
1945
|
+
const change = {
|
|
1946
|
+
fromStart: from.starts[stretch.fromStart],
|
|
1947
|
+
fromEnd: from.starts[stretch.fromEnd],
|
|
1948
|
+
toStart: to.starts[stretch.toStart],
|
|
1949
|
+
toEnd: to.starts[stretch.toEnd]
|
|
1950
|
+
};
|
|
1951
|
+
const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
|
|
1952
|
+
a2.slice(change.fromStart, change.fromEnd),
|
|
1953
|
+
b.slice(change.toStart, change.toEnd),
|
|
1954
|
+
budget2
|
|
1955
|
+
) : void 0;
|
|
1956
|
+
if (!inner2) return [change];
|
|
1957
|
+
for (const found of inner2)
|
|
1958
|
+
budget2 -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
|
|
1959
|
+
return inner2.map((found) => ({
|
|
1960
|
+
fromStart: found.fromStart + change.fromStart,
|
|
1961
|
+
fromEnd: found.fromEnd + change.fromStart,
|
|
1962
|
+
toStart: found.toStart + change.toStart,
|
|
1963
|
+
toEnd: found.toEnd + change.toStart
|
|
1964
|
+
}));
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
function diffText(from, to, maxEdits = 500) {
|
|
1968
|
+
let start = 0;
|
|
1969
|
+
while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
|
|
1970
|
+
start++;
|
|
1971
|
+
let end = 0;
|
|
1972
|
+
while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
|
|
1973
|
+
end++;
|
|
1974
|
+
const a2 = from.slice(start, from.length - end);
|
|
1975
|
+
const b = to.slice(start, to.length - end);
|
|
1976
|
+
if (!a2.length && !b.length) return [];
|
|
1977
|
+
const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
|
|
1978
|
+
const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
|
|
1979
|
+
const result2 = [];
|
|
1980
|
+
for (const change of changes) {
|
|
1981
|
+
const placed = {
|
|
1982
|
+
fromStart: change.fromStart + start,
|
|
1983
|
+
fromEnd: change.fromEnd + start,
|
|
1984
|
+
toStart: change.toStart + start,
|
|
1985
|
+
toEnd: change.toEnd + start
|
|
1986
|
+
};
|
|
1987
|
+
if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
|
|
1988
|
+
placed.fromStart--;
|
|
1989
|
+
placed.toStart--;
|
|
1990
|
+
}
|
|
1991
|
+
if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
|
|
1992
|
+
placed.fromEnd++;
|
|
1993
|
+
placed.toEnd++;
|
|
1994
|
+
}
|
|
1995
|
+
const last = result2.at(-1);
|
|
1996
|
+
if (last && placed.fromStart <= last.fromEnd) {
|
|
1997
|
+
last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
|
|
1998
|
+
last.toEnd = Math.max(last.toEnd, placed.toEnd);
|
|
1999
|
+
} else result2.push(placed);
|
|
2000
|
+
}
|
|
2001
|
+
return result2;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1849
2004
|
// xml/lite.ts
|
|
1850
2005
|
var LiteElement = class {
|
|
1851
2006
|
constructor(tagName, localName3, namespaceURI) {
|
|
@@ -20649,53 +20804,6 @@ function buildContentTypesXml(types) {
|
|
|
20649
20804
|
).join("");
|
|
20650
20805
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="${NS.contentTypes}">${defaults}${overrides}</Types>`;
|
|
20651
20806
|
}
|
|
20652
|
-
|
|
20653
|
-
// opc/safe-href.ts
|
|
20654
|
-
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
20655
|
-
var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
20656
|
-
var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
|
|
20657
|
-
"javascript",
|
|
20658
|
-
"vbscript",
|
|
20659
|
-
"livescript",
|
|
20660
|
-
"jscript",
|
|
20661
|
-
"mocha",
|
|
20662
|
-
"data",
|
|
20663
|
-
"mhtml",
|
|
20664
|
-
"ms-its",
|
|
20665
|
-
"mk",
|
|
20666
|
-
"x-javascript",
|
|
20667
|
-
"blob"
|
|
20668
|
-
]);
|
|
20669
|
-
var IGNORABLE = new RegExp(
|
|
20670
|
-
"[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
|
|
20671
|
-
"gu"
|
|
20672
|
-
);
|
|
20673
|
-
var CONTROL2 = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
|
|
20674
|
-
var SCHEME = /^([a-z][a-z0-9+.-]*):/;
|
|
20675
|
-
var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
|
|
20676
|
-
var reject = (reason) => ({
|
|
20677
|
-
store: false,
|
|
20678
|
-
open: false,
|
|
20679
|
-
reason
|
|
20680
|
-
});
|
|
20681
|
-
function hyperlinkPolicy(href, options7 = {}) {
|
|
20682
|
-
if (typeof href !== "string") return reject("empty");
|
|
20683
|
-
const trimmed2 = href.trim();
|
|
20684
|
-
const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
|
|
20685
|
-
if (normalized.length === 0) return reject("empty");
|
|
20686
|
-
const scheme2 = SCHEME.exec(normalized)?.[1];
|
|
20687
|
-
if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
|
|
20688
|
-
if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
|
|
20689
|
-
return reject("obfuscated-scheme");
|
|
20690
|
-
if (CONTROL2.test(trimmed2)) return reject("control-characters");
|
|
20691
|
-
if (scheme2 === void 0) return options7.openRelative ? { store: true, open: true } : STORE_ONLY;
|
|
20692
|
-
if (scheme2.length === 1) return STORE_ONLY;
|
|
20693
|
-
if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
|
|
20694
|
-
if (options7.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
|
|
20695
|
-
return { store: true, open: true };
|
|
20696
|
-
if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
|
|
20697
|
-
return reject("unsupported-scheme");
|
|
20698
|
-
}
|
|
20699
20807
|
var DEFAULT_ZIP_LIMITS = {
|
|
20700
20808
|
maxEntries: 1e4,
|
|
20701
20809
|
maxEntryBytes: 100 * 1024 * 1024,
|
|
@@ -20904,6 +21012,53 @@ function guardZip(zip, limits = {}) {
|
|
|
20904
21012
|
return zip;
|
|
20905
21013
|
}
|
|
20906
21014
|
|
|
21015
|
+
// opc/safe-href.ts
|
|
21016
|
+
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
21017
|
+
var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
21018
|
+
var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
|
|
21019
|
+
"javascript",
|
|
21020
|
+
"vbscript",
|
|
21021
|
+
"livescript",
|
|
21022
|
+
"jscript",
|
|
21023
|
+
"mocha",
|
|
21024
|
+
"data",
|
|
21025
|
+
"mhtml",
|
|
21026
|
+
"ms-its",
|
|
21027
|
+
"mk",
|
|
21028
|
+
"x-javascript",
|
|
21029
|
+
"blob"
|
|
21030
|
+
]);
|
|
21031
|
+
var IGNORABLE = new RegExp(
|
|
21032
|
+
"[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
|
|
21033
|
+
"gu"
|
|
21034
|
+
);
|
|
21035
|
+
var CONTROL2 = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
|
|
21036
|
+
var SCHEME = /^([a-z][a-z0-9+.-]*):/;
|
|
21037
|
+
var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
|
|
21038
|
+
var reject = (reason) => ({
|
|
21039
|
+
store: false,
|
|
21040
|
+
open: false,
|
|
21041
|
+
reason
|
|
21042
|
+
});
|
|
21043
|
+
function hyperlinkPolicy(href, options7 = {}) {
|
|
21044
|
+
if (typeof href !== "string") return reject("empty");
|
|
21045
|
+
const trimmed2 = href.trim();
|
|
21046
|
+
const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
|
|
21047
|
+
if (normalized.length === 0) return reject("empty");
|
|
21048
|
+
const scheme2 = SCHEME.exec(normalized)?.[1];
|
|
21049
|
+
if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
|
|
21050
|
+
if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
|
|
21051
|
+
return reject("obfuscated-scheme");
|
|
21052
|
+
if (CONTROL2.test(trimmed2)) return reject("control-characters");
|
|
21053
|
+
if (scheme2 === void 0) return options7.openRelative ? { store: true, open: true } : STORE_ONLY;
|
|
21054
|
+
if (scheme2.length === 1) return STORE_ONLY;
|
|
21055
|
+
if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
|
|
21056
|
+
if (options7.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
|
|
21057
|
+
return { store: true, open: true };
|
|
21058
|
+
if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
|
|
21059
|
+
return reject("unsupported-scheme");
|
|
21060
|
+
}
|
|
21061
|
+
|
|
20907
21062
|
// opc/properties/types.ts
|
|
20908
21063
|
var CUSTOM_PROPERTIES_FMTID = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}";
|
|
20909
21064
|
var PROPERTY_PART_NAMES = {
|
|
@@ -49648,161 +49803,6 @@ var CommentIds = class {
|
|
|
49648
49803
|
}
|
|
49649
49804
|
};
|
|
49650
49805
|
|
|
49651
|
-
// text/text-diff.ts
|
|
49652
|
-
var isLowSurrogate = (text3, at2) => {
|
|
49653
|
-
const code = text3.charCodeAt(at2);
|
|
49654
|
-
return code >= 56320 && code <= 57343;
|
|
49655
|
-
};
|
|
49656
|
-
function shortestEdit(n2, m, same12, maxEdits) {
|
|
49657
|
-
const max = Math.min(n2 + m, maxEdits);
|
|
49658
|
-
const offset2 = max + 1;
|
|
49659
|
-
const v = new Int32Array(2 * max + 3);
|
|
49660
|
-
const trace2 = [];
|
|
49661
|
-
for (let d = 0; d <= max; d++) {
|
|
49662
|
-
for (let k = -d; k <= d; k += 2) {
|
|
49663
|
-
const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
|
|
49664
|
-
let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
|
|
49665
|
-
let y = x - k;
|
|
49666
|
-
while (x < n2 && y < m && same12(x, y)) {
|
|
49667
|
-
x++;
|
|
49668
|
-
y++;
|
|
49669
|
-
}
|
|
49670
|
-
v[offset2 + k] = x;
|
|
49671
|
-
if (x >= n2 && y >= m) return backtrack(trace2, n2, m, d);
|
|
49672
|
-
}
|
|
49673
|
-
trace2.push(v.slice(offset2 - d, offset2 + d + 1));
|
|
49674
|
-
}
|
|
49675
|
-
return void 0;
|
|
49676
|
-
}
|
|
49677
|
-
function backtrack(trace2, n2, m, d) {
|
|
49678
|
-
const edits = [];
|
|
49679
|
-
let x = n2;
|
|
49680
|
-
let y = m;
|
|
49681
|
-
for (let step = d; step > 0; step--) {
|
|
49682
|
-
const previous = trace2[step - 1];
|
|
49683
|
-
const at2 = (k2) => previous[k2 + step - 1];
|
|
49684
|
-
const k = x - y;
|
|
49685
|
-
const down = k === -step || k !== step && at2(k - 1) < at2(k + 1);
|
|
49686
|
-
const before = down ? k + 1 : k - 1;
|
|
49687
|
-
const startX = at2(before);
|
|
49688
|
-
const startY = startX - before;
|
|
49689
|
-
edits.push(down ? [startX, startY, true] : [startX, startY, false]);
|
|
49690
|
-
x = startX;
|
|
49691
|
-
y = startY;
|
|
49692
|
-
}
|
|
49693
|
-
return edits.reverse();
|
|
49694
|
-
}
|
|
49695
|
-
function changesOf(edits) {
|
|
49696
|
-
const changes = [];
|
|
49697
|
-
for (const [x, y, inserts] of edits) {
|
|
49698
|
-
const last = changes.at(-1);
|
|
49699
|
-
if (last && last.fromEnd === x && last.toEnd === y) {
|
|
49700
|
-
if (inserts) last.toEnd++;
|
|
49701
|
-
else last.fromEnd++;
|
|
49702
|
-
} else
|
|
49703
|
-
changes.push({
|
|
49704
|
-
fromStart: x,
|
|
49705
|
-
fromEnd: inserts ? x : x + 1,
|
|
49706
|
-
toStart: y,
|
|
49707
|
-
toEnd: inserts ? y + 1 : y
|
|
49708
|
-
});
|
|
49709
|
-
}
|
|
49710
|
-
return changes;
|
|
49711
|
-
}
|
|
49712
|
-
function characterChanges(a2, b, maxEdits) {
|
|
49713
|
-
const edits = shortestEdit(
|
|
49714
|
-
a2.length,
|
|
49715
|
-
b.length,
|
|
49716
|
-
(x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
|
|
49717
|
-
maxEdits
|
|
49718
|
-
);
|
|
49719
|
-
return edits && changesOf(edits);
|
|
49720
|
-
}
|
|
49721
|
-
var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
|
|
49722
|
-
function tokensOf(text3, ids) {
|
|
49723
|
-
const tokens2 = [];
|
|
49724
|
-
const starts = [];
|
|
49725
|
-
for (const match2 of text3.matchAll(TOKEN)) {
|
|
49726
|
-
let id = ids.get(match2[0]);
|
|
49727
|
-
if (id === void 0) ids.set(match2[0], id = ids.size);
|
|
49728
|
-
tokens2.push(id);
|
|
49729
|
-
starts.push(match2.index);
|
|
49730
|
-
}
|
|
49731
|
-
starts.push(text3.length);
|
|
49732
|
-
return { tokens: tokens2, starts };
|
|
49733
|
-
}
|
|
49734
|
-
function tokenChanges(a2, b, maxEdits) {
|
|
49735
|
-
const ids = /* @__PURE__ */ new Map();
|
|
49736
|
-
const from = tokensOf(a2, ids);
|
|
49737
|
-
const to = tokensOf(b, ids);
|
|
49738
|
-
const edits = shortestEdit(
|
|
49739
|
-
from.tokens.length,
|
|
49740
|
-
to.tokens.length,
|
|
49741
|
-
(x, y) => from.tokens[x] === to.tokens[y],
|
|
49742
|
-
maxEdits
|
|
49743
|
-
);
|
|
49744
|
-
if (!edits) return void 0;
|
|
49745
|
-
let budget2 = maxEdits;
|
|
49746
|
-
return changesOf(edits).flatMap((stretch) => {
|
|
49747
|
-
const change = {
|
|
49748
|
-
fromStart: from.starts[stretch.fromStart],
|
|
49749
|
-
fromEnd: from.starts[stretch.fromEnd],
|
|
49750
|
-
toStart: to.starts[stretch.toStart],
|
|
49751
|
-
toEnd: to.starts[stretch.toEnd]
|
|
49752
|
-
};
|
|
49753
|
-
const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
|
|
49754
|
-
a2.slice(change.fromStart, change.fromEnd),
|
|
49755
|
-
b.slice(change.toStart, change.toEnd),
|
|
49756
|
-
budget2
|
|
49757
|
-
) : void 0;
|
|
49758
|
-
if (!inner2) return [change];
|
|
49759
|
-
for (const found of inner2)
|
|
49760
|
-
budget2 -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
|
|
49761
|
-
return inner2.map((found) => ({
|
|
49762
|
-
fromStart: found.fromStart + change.fromStart,
|
|
49763
|
-
fromEnd: found.fromEnd + change.fromStart,
|
|
49764
|
-
toStart: found.toStart + change.toStart,
|
|
49765
|
-
toEnd: found.toEnd + change.toStart
|
|
49766
|
-
}));
|
|
49767
|
-
});
|
|
49768
|
-
}
|
|
49769
|
-
function diffText(from, to, maxEdits = 500) {
|
|
49770
|
-
let start = 0;
|
|
49771
|
-
while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
|
|
49772
|
-
start++;
|
|
49773
|
-
let end = 0;
|
|
49774
|
-
while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
|
|
49775
|
-
end++;
|
|
49776
|
-
const a2 = from.slice(start, from.length - end);
|
|
49777
|
-
const b = to.slice(start, to.length - end);
|
|
49778
|
-
if (!a2.length && !b.length) return [];
|
|
49779
|
-
const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
|
|
49780
|
-
const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
|
|
49781
|
-
const result2 = [];
|
|
49782
|
-
for (const change of changes) {
|
|
49783
|
-
const placed = {
|
|
49784
|
-
fromStart: change.fromStart + start,
|
|
49785
|
-
fromEnd: change.fromEnd + start,
|
|
49786
|
-
toStart: change.toStart + start,
|
|
49787
|
-
toEnd: change.toEnd + start
|
|
49788
|
-
};
|
|
49789
|
-
if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
|
|
49790
|
-
placed.fromStart--;
|
|
49791
|
-
placed.toStart--;
|
|
49792
|
-
}
|
|
49793
|
-
if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
|
|
49794
|
-
placed.fromEnd++;
|
|
49795
|
-
placed.toEnd++;
|
|
49796
|
-
}
|
|
49797
|
-
const last = result2.at(-1);
|
|
49798
|
-
if (last && placed.fromStart <= last.fromEnd) {
|
|
49799
|
-
last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
|
|
49800
|
-
last.toEnd = Math.max(last.toEnd, placed.toEnd);
|
|
49801
|
-
} else result2.push(placed);
|
|
49802
|
-
}
|
|
49803
|
-
return result2;
|
|
49804
|
-
}
|
|
49805
|
-
|
|
49806
49806
|
// xlsx/write/comment-mentions.ts
|
|
49807
49807
|
function patchCommentMentions(node2, before, message, ids, commentId, preserveIds) {
|
|
49808
49808
|
const container = first(node2, "mentions", NS.tc);
|