@usejunior/odf-core 0.9.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/.tsbuildinfo +1 -0
- package/dist/comments.d.ts +55 -0
- package/dist/comments.d.ts.map +1 -0
- package/dist/comments.js +230 -0
- package/dist/comments.js.map +1 -0
- package/dist/compare/diff.d.ts +51 -0
- package/dist/compare/diff.d.ts.map +1 -0
- package/dist/compare/diff.js +189 -0
- package/dist/compare/diff.js.map +1 -0
- package/dist/compare/emit.d.ts +64 -0
- package/dist/compare/emit.d.ts.map +1 -0
- package/dist/compare/emit.js +404 -0
- package/dist/compare/emit.js.map +1 -0
- package/dist/compare/index.d.ts +49 -0
- package/dist/compare/index.d.ts.map +1 -0
- package/dist/compare/index.js +59 -0
- package/dist/compare/index.js.map +1 -0
- package/dist/compare/inline_diff.d.ts +32 -0
- package/dist/compare/inline_diff.d.ts.map +1 -0
- package/dist/compare/inline_diff.js +102 -0
- package/dist/compare/inline_diff.js.map +1 -0
- package/dist/compare/inline_map.d.ts +40 -0
- package/dist/compare/inline_map.d.ts.map +1 -0
- package/dist/compare/inline_map.js +153 -0
- package/dist/compare/inline_map.js.map +1 -0
- package/dist/document.d.ts +98 -0
- package/dist/document.d.ts.map +1 -0
- package/dist/document.js +172 -0
- package/dist/document.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/odf_archive_safety.d.ts +18 -0
- package/dist/odf_archive_safety.d.ts.map +1 -0
- package/dist/odf_archive_safety.js +72 -0
- package/dist/odf_archive_safety.js.map +1 -0
- package/dist/shared/odf/OdfArchive.d.ts +50 -0
- package/dist/shared/odf/OdfArchive.d.ts.map +1 -0
- package/dist/shared/odf/OdfArchive.js +118 -0
- package/dist/shared/odf/OdfArchive.js.map +1 -0
- package/dist/shared/odf/blocks.d.ts +15 -0
- package/dist/shared/odf/blocks.d.ts.map +1 -0
- package/dist/shared/odf/blocks.js +36 -0
- package/dist/shared/odf/blocks.js.map +1 -0
- package/dist/shared/odf/namespaces.d.ts +27 -0
- package/dist/shared/odf/namespaces.d.ts.map +1 -0
- package/dist/shared/odf/namespaces.js +29 -0
- package/dist/shared/odf/namespaces.js.map +1 -0
- package/dist/shared/odf/text_segments.d.ts +63 -0
- package/dist/shared/odf/text_segments.d.ts.map +1 -0
- package/dist/shared/odf/text_segments.js +90 -0
- package/dist/shared/odf/text_segments.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/shared/odf/namespaces.ts","../src/shared/odf/text_segments.ts","../src/comments.ts","../../docx-core/dist/compare-types.d.ts","../../docx-core/dist/shared/ooxml/namespaces.d.ts","../../docx-core/dist/shared/ooxml/types.d.ts","../../docx-core/dist/core-types.d.ts","../../docx-core/dist/atomizer.d.ts","../../docx-core/dist/move-detection.d.ts","../../docx-core/dist/format-detection.d.ts","../../docx-core/dist/baselines/atomizer/formattingfidelity.d.ts","../../docx-core/dist/numbering.d.ts","../../docx-core/dist/footnotes.d.ts","../../docx-core/dist/primitives/track-changes-emitter.d.ts","../../docx-core/dist/primitives/text.d.ts","../../docx-core/dist/primitives/styles.d.ts","../../docx-core/dist/primitives/formatting_tags.d.ts","../../docx-core/dist/primitives/relationships.d.ts","../../docx-core/dist/primitives/list_labels.d.ts","../../docx-core/dist/primitives/document_view-types.d.ts","../../docx-core/dist/primitives/document_view-headings.d.ts","../../docx-core/dist/primitives/document_view-styles.d.ts","../../docx-core/dist/primitives/document_view-comments.d.ts","../../docx-core/dist/primitives/document_view-toon.d.ts","../../docx-core/dist/primitives/document_view.d.ts","../../docx-core/dist/primitives/zip.d.ts","../../docx-core/dist/primitives/footnotes.d.ts","../../docx-core/dist/primitives/serialize_markdown.d.ts","../../docx-core/dist/primitives/serialize_html.d.ts","../../docx-core/dist/primitives/serialize_plaintext.d.ts","../../docx-core/dist/primitives/layout.d.ts","../../docx-core/dist/primitives/tables.d.ts","../../docx-core/dist/primitives/merge_runs.d.ts","../../docx-core/dist/primitives/validate_document.d.ts","../../docx-core/dist/primitives/accept_changes.d.ts","../../docx-core/dist/primitives/reject_changes.d.ts","../../docx-core/dist/primitives/comments.d.ts","../../docx-core/dist/primitives/document.d.ts","../../docx-core/dist/primitives/errors.d.ts","../../docx-core/dist/primitives/matching.d.ts","../../docx-core/dist/primitives/namespaces.d.ts","../../docx-core/dist/primitives/numbering.d.ts","../../docx-core/dist/primitives/semantic_tags.d.ts","../../docx-core/dist/primitives/xml.d.ts","../../docx-core/dist/primitives/dom-helpers.d.ts","../../docx-core/dist/primitives/simplify_redlines.d.ts","../../docx-core/dist/primitives/extract_revisions.d.ts","../../docx-core/dist/primitives/prevent_double_elevation.d.ts","../../docx-core/dist/primitives/content_fingerprint.d.ts","../../docx-core/dist/primitives/bookmarks.d.ts","../../docx-core/dist/primitives/index.d.ts","../../docx-core/dist/integration/libreoffice-oracle.d.ts","../../docx-core/dist/index.d.ts","../src/shared/odf/blocks.ts","../src/document.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/jszip/index.d.ts","../src/shared/odf/odfarchive.ts","../src/compare/diff.ts","../src/compare/inline_diff.ts","../src/compare/inline_map.ts","../src/compare/emit.ts","../src/compare/index.ts","../src/odf_archive_safety.ts","../src/index.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/d3-color/index.d.ts","../../../node_modules/@types/d3-delaunay/index.d.ts","../../../node_modules/@types/d3-format/index.d.ts","../../../node_modules/@types/d3-hierarchy/index.d.ts","../../../node_modules/@types/d3-interpolate/index.d.ts","../../../node_modules/@types/d3-path/index.d.ts","../../../node_modules/@types/d3-time/index.d.ts","../../../node_modules/@types/d3-scale/index.d.ts","../../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../../node_modules/@types/d3-shape/index.d.ts","../../../node_modules/@types/d3-time-format/index.d.ts","../../../node_modules/@types/diff-match-patch/index.d.ts","../../../node_modules/@types/esrecurse/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts"],"fileIdsList":[[119,168,185,186,228,229],[119,168,185,186],[119,168,185,186,231],[119,168,185,186,237],[119,168,185,186,236],[119,165,166,168,185,186],[119,167,168,185,186],[168,185,186],[119,168,173,185,186,203],[119,168,169,174,179,185,186,188,200,211],[119,168,169,170,179,185,186,188],[114,115,116,119,168,185,186],[119,168,171,185,186,212],[119,168,172,173,180,185,186,189],[119,168,173,185,186,200,208],[119,168,174,176,179,185,186,188],[119,167,168,175,185,186],[119,168,176,177,185,186],[119,168,178,179,185,186],[119,167,168,179,185,186],[119,168,179,180,181,185,186,200,211],[119,168,179,180,181,185,186,195,200,203],[119,161,168,176,179,182,185,186,188,200,211],[119,168,179,180,182,183,185,186,188,200,208,211],[119,168,182,184,185,186,200,208,211],[117,118,119,120,121,122,123,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217],[119,168,179,185,186],[119,168,185,186,187,211],[119,168,176,179,185,186,188,200],[119,168,185,186,189],[119,168,185,186,190],[119,167,168,185,186,191],[119,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217],[119,168,185,186,193],[119,168,185,186,194],[119,168,179,185,186,195,196],[119,168,185,186,195,197,212,214],[119,168,180,185,186],[119,168,179,185,186,200,201,203],[119,168,185,186,202,203],[119,168,185,186,200,201],[119,168,185,186,203],[119,168,185,186,204],[119,165,168,185,186,200,205,211],[119,168,179,185,186,206,207],[119,168,185,186,206,207],[119,168,173,185,186,188,200,208],[119,168,185,186,209],[119,168,185,186,188,210],[119,168,182,185,186,194,211],[119,168,173,185,186,212],[119,168,185,186,200,213],[119,168,185,186,187,214],[119,168,185,186,215],[119,161,168,185,186],[119,161,168,179,181,185,186,191,200,203,211,213,214,216],[119,168,185,186,200,217],[119,168,185,186,246],[119,168,185,186,218],[119,133,137,168,185,186,211],[119,133,168,185,186,200,211],[119,128,168,185,186],[119,130,133,168,185,186,208,211],[119,168,185,186,188,208],[119,128,168,185,186,218],[119,130,133,168,185,186,188,211],[119,125,126,129,132,168,179,185,186,200,211],[119,133,140,168,185,186],[119,125,131,168,185,186],[119,133,154,155,168,185,186],[119,129,133,168,185,186,203,211,218],[119,154,168,185,186,218],[119,127,128,168,185,186,218],[119,133,168,185,186],[119,127,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,155,156,157,158,159,160,168,185,186],[119,133,148,168,185,186],[119,133,140,141,168,185,186],[119,131,133,141,142,168,185,186],[119,132,168,185,186],[119,125,128,133,168,185,186],[119,133,137,141,142,168,185,186],[119,137,168,185,186],[119,131,133,136,168,185,186,211],[119,125,130,133,140,168,185,186],[119,168,185,186,200],[119,128,133,154,168,185,186,216,218],[65,119,168,185,186],[62,63,64,65,66,67,68,69,70,71,72,109,110,119,168,185,186],[72,84,119,168,185,186],[72,73,75,83,85,86,87,88,89,90,91,92,93,94,95,119,168,185,186],[78,119,168,185,186],[74,78,119,168,185,186],[74,77,119,168,185,186],[75,76,78,79,80,81,82,119,168,185,186],[95,119,168,185,186],[74,119,168,185,186],[73,74,75,76,77,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,119,168,185,186],[72,119,168,185,186],[83,85,119,168,185,186],[59,60,119,168,185,186],[59,60,119,168,185,186,221,222,223],[60,111,112,119,168,185,186,221,224],[59,60,61,111,112,119,168,185,186],[59,61,113,119,168,185,186,220,225,226],[59,111,119,168,185,186,219],[60,119,168,185,186],[59,119,168,185,186,219],[59,119,168,185,186]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"3134d085c760378e4f32edb4d8b6ce1f1e7061e9f84ee2227c4b21661ce2ffae","signature":"7383c0f1cd85d58deab95bf1d48eca6506d3ffb4614d430d583b481a568f2c8e","impliedFormat":99},{"version":"3ca757068781e2d35f505d69e0fbe8de78f938e8cb71894c6b6b5420aa7d348a","signature":"0c2004fc7eeb62d959b9046864fcb54a2029c9e31d8a11a082e29e838f45d9c5","impliedFormat":99},{"version":"51e2e83e5b517c4bf0fe4f63f618e0610344f8b770778554765bd084144b905a","signature":"b3052bae9a66fa92571dd90dc36f82d858d527dd7cb4df57529174a2764ea81e","impliedFormat":99},{"version":"202fc710d5943087a1c94fcb76392d7c45d195502401d1021868ffce75bb5d1d","impliedFormat":99},{"version":"0d7706169db873e377766d79305e14acc4b2ef9c77dbf964a57328fea422736c","impliedFormat":99},{"version":"4ff1db512f8c8f372ec0c3c27a5cb12e96ea4615959ae393232605668710b1a8","impliedFormat":99},{"version":"41e164e0ee7eb3fd63f99cc02357dcb74a242ff1f3f56aac5c21710b77e6df8b","impliedFormat":99},{"version":"57f61b1c482c541c25d61aa36f97ae8cfa50fcc9f81244c6335831b14a666fe6","impliedFormat":99},{"version":"221aecc629800a4a51592c3752ccd2c902581eab8b4dc38fbf7c01db6fff027c","impliedFormat":99},{"version":"913e4bb6afc2e61a03847d3fa5384a43af2146868272b907ded2a2fcdf45ef5c","impliedFormat":99},{"version":"df1c5b69167094421e87cae5c22fddb778b635e92b298dfdbe1085baef6429d6","impliedFormat":99},{"version":"cc508f83120a560b7307fed31a238e3f2bbd08affd7172b67f3caa2f0cdd811d","impliedFormat":99},{"version":"3f729aad26c399ba47ca9e52b4c28a14debd80b5d363b16a10d79af2684347cd","impliedFormat":99},{"version":"0c0c263eb7fea76a8d124cb8b414d5bf310b45a598c102b97657e75ff865e542","impliedFormat":99},{"version":"2f063c3aa634eb5f2f14aa3dbe9cf6403904b0232117d9f7d283528736c4b9df","impliedFormat":99},{"version":"b23e262db3449cdb30e95cc7fbfed698ce5037967869d68befc7d8e0723f8bed","impliedFormat":99},{"version":"03d946b52e0fe8cc06c10c15275e97f5e154b39ae07aeff3ab0dd786090201ab","impliedFormat":99},{"version":"b7b7326b7f25ede0ef26a7ad298e4f8fe595c049f67cc2a63235f80b7ba8da14","impliedFormat":99},{"version":"e3e673423af121b5d355d8274b65abab7e0665726d04009a454ff94ad6927473","impliedFormat":99},{"version":"43365d18d597a14e1eeb2e58efa9ba8d8c9b8421f9046cc3695e92b882f47948","impliedFormat":99},{"version":"f7b280460df549711ec182e8355494bb5df5a53be17ad871c08cd3ada15b1b7c","impliedFormat":99},{"version":"8594202a06813ae26f6f85a98c473c14e455043cf500c453cef099eea5679301","impliedFormat":99},{"version":"0e7f2090f244ad9605df54a2c33b5b5c2d259701af792aa7a498c21105042e66","impliedFormat":99},{"version":"9ce6bb846b329b932c1551b4b328af9a75fc5b7ea7d335fe4f31f1a691a7fb5c","impliedFormat":99},{"version":"c522701209769f701e2f448608f438fce42d54863aa0ae165947eeae0cddd9f7","impliedFormat":99},{"version":"7dbe92175f41987cd2629702e68dfa5379c714558e402f10b9b68927d048be91","impliedFormat":99},{"version":"d4a694bd2358996199bea5493c64169f123142f56ffed8ace725f72140a72810","impliedFormat":99},{"version":"f29b331adf185e29797383dfb2c722db5911b07f827cc0a5ca3b446200fa2e09","impliedFormat":99},{"version":"5b90b4aed566dce3900b22fc4d1756598427a850e7190f2cc9ec51a3b9409c74","impliedFormat":99},{"version":"6f1815e91cbede5f2468930ad2fce5fdcd161b040e941f9087d4c455125f5a95","impliedFormat":99},{"version":"bc476834af307e2b6a8f1bccba7f863a96d05aac1ceb7de71541699edc14e3b6","impliedFormat":99},{"version":"e5705bf8dfbafedf6d58657a3726055ab10b0af13c9c46f4c5e00bdf5f5386e7","impliedFormat":99},{"version":"db0c0acb407f5f420ab41577fd47256e0943bf862d72072da26a91622c2693af","impliedFormat":99},{"version":"ac1a4a16e04736502cf6b0ead3745da26a068a42000011c59aa29e92da88a9fa","impliedFormat":99},{"version":"f813b9cac3e1899ddd925ed05adea9f0872c03a765db66a4b9b2d40e8d049362","impliedFormat":99},{"version":"ef09993596be2950f370ce72b7db6ca6bade19b51ecf3fc626f1fb5e484ed5e5","impliedFormat":99},{"version":"01c7d498b5b593838879c3ffec9c6f6ba2a60db87e96bcad504446bf2915ac8a","impliedFormat":99},{"version":"7f76f28b02cd0abf2a8f8840554b96c289f4bf4ee3b752b0158df7a2641c8a61","impliedFormat":99},{"version":"4ed8f9ae9e57c5ea33843dd71dee74f2e5e1d770f9bbf07350ccff4e6ae43e9b","impliedFormat":99},{"version":"1d1cbc4570321a7c3e43ab20ad38492459b065d5701670efd66fc667acd8a8a4","impliedFormat":99},{"version":"0386576c6eb1b513f975385d950c302825be86d3b34ae05b60ddde880a664476","impliedFormat":99},{"version":"995c7807933e16006b8bbfe4902d33116ea2053d3e6f3b68bb59801224fa47a6","impliedFormat":99},{"version":"2154ebf4162619d5e573dc5aa7e13547270b775e82e2863ac239b7144d548ebb","impliedFormat":99},{"version":"73834fc1602d6220250487f6252531ba406f3421ff4329d94917cb086492370a","impliedFormat":99},{"version":"6bff12fc5fc689e69138ff614f5384fd9b0f09c070ccd2380b50175113aa10d8","impliedFormat":99},{"version":"0c009d5d1094a5467bca139c434d9c2845b2b9ddc7221520c93fbcf915794f41","impliedFormat":99},{"version":"0954c2db95714ff01b02140c0b1002680cff4c1413dbedfa89b656070ee5a855","impliedFormat":99},{"version":"6c77e11bc223fea4b9c0774dee0f4f9195847f710264e308c52af809984ae84b","impliedFormat":99},{"version":"a6d69d2a91baa98d9b6a167abd56dbcb1409c9f80799b5a502e2c1cf0bc41d7e","impliedFormat":99},{"version":"3468a72026826ebb1d4975c7fba621c7bcb071ce7599eca0f6fcd147d3171a2a","impliedFormat":99},{"version":"cf3cee9c76d1ba65544081bfbfe08f5561e6f0ed94de6a370c3e120b8f73a0fa","impliedFormat":99},{"version":"4a6b514eb39f545c8877041a36c4dacb31fb6eeebbd6cae4fe36c9194ba6610e","impliedFormat":99},{"version":"1dabde1c3b995cee37ca8796ab4da6df75485bd9ed98f5b75bf918eecb3879dc","impliedFormat":99},{"version":"62c05c30a36b09af3e721660defd6fd65a0ad675cc4c916e797d362b728504f7","signature":"cd4bc313f674b594c50b94467a252d3be1ec847abbd9e6a335ff60b208a635f8","impliedFormat":99},{"version":"1bcf6f610ad1435dd53a3056c06e588b5457160c10ca3685fea9fb80141c6345","signature":"0ac27c1f4725cc8d40bb9e041c1e42733f017ef8f724aefd34c55178bb78f00c","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"522cb15ff9bef5a65c2f3dbd10dbba9e7ecae4de32f90f5c0b4198132be63ae4","impliedFormat":1},{"version":"f04af4e73ab0b8d6e4aed58d4c71165677bfa1097d47961b48cc8f4a51f12964","signature":"d8799299d29d553aa975d67f2f359f0cfd3ab5c05cb00155555bd983c8c8124b","impliedFormat":99},{"version":"05b214715372af0d17242d73feebd4a59072f61a0377931354388a81d0c0a2dd","signature":"dafa074428d853c23856727a13bf255948692f7d4494018c16dc0eca532f8418","impliedFormat":99},{"version":"9975b019c0f7c03998868af91d8333595700a178c41ac96cdfa44652e505c8ca","signature":"df9a762f1a4440fd13324fb9bb7784581fbf9d520d0432e29abff7657aca3b88","impliedFormat":99},{"version":"9cf31b6d8c6cb6ef58579ea9ace1f7305e16d9569c973ad8ab60075c71eca157","signature":"3b5d222cf2b23fd1e6e086fc6d600ec6fc9d8fe2c3627cf2c271e00cd9bd1513","impliedFormat":99},{"version":"dae3c95a33994d2a042506fd0e8e59a0ce308eced36b561734860eb92168ec65","signature":"c3b99b56fd7fa3ec7ab7341f340d509af25e6f2765c697b20f9c37f8b6e17b4c","impliedFormat":99},{"version":"d6710b808a66127692a6310cb44b8339335e61b2f7b2038640d84ab27b2df17e","signature":"ceabfa1f04dc0a6eb1f0fe171f6cf122159b53e211b5b19e902425a358816bb4","impliedFormat":99},{"version":"85b87ede8764afa682eb80da44b0045aedcde89d88de0eb8baf6d619a5177b85","signature":"41616b9345c218b1ace5bb30a6125d8e5638554d7e0bcf79f73e8053ebb3c68f","impliedFormat":99},{"version":"4d71a1cd47ff8a5c9bb2f06b1477afc7f88bc92808ed7cdf093820c9921db380","signature":"db34f9e02bdec95b46742e07e1b2f3128171a4e9761f4669f000dbc0d75d1dc0","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"5f3d83561233c9f2ad1f9cc5e45a7dad0b863727c571c848fb6317d405efab97","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"9ad2b3a8d8563177a660b2c629765fa9eddd8fcf7fdaf7734cd456e2a4e3e3fe","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"9b048390bcffe88c023a4cd742a720b41d4cd7df83bc9270e6f2339bf38de278","affectsGlobalScope":true,"impliedFormat":1},{"version":"a56ff40eb9934b7a318b813e6c53b31240fe77f16afe4ff35158a8f7fa1f8ad1","impliedFormat":1},{"version":"460627dd2a599c2664d6f9e81ed4765ef520dc2786551d9dcab276df57b98c02","impliedFormat":1},{"version":"d5799bcf7fe4e6de3063abf4e321c14b051706f03cf5716d8a19f22fe1f69519","impliedFormat":1},{"version":"751764bb94219b4ce8f5475dc35d3de2e432fea01a0c9610cd7f69ad05e398c6","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1}],"root":[[59,61],112,113,[220,227]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":199,"noFallthroughCasesInSwitch":true,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[230,1],[231,2],[232,2],[233,2],[234,2],[235,3],[236,2],[239,2],[238,4],[240,5],[241,2],[237,2],[228,2],[242,2],[243,2],[244,2],[245,2],[165,6],[166,6],[167,7],[119,8],[168,9],[169,10],[170,11],[114,2],[117,12],[115,2],[116,2],[171,13],[172,14],[173,15],[174,16],[175,17],[176,18],[177,18],[178,19],[179,20],[180,21],[181,22],[120,2],[118,2],[182,23],[183,24],[184,25],[218,26],[185,27],[186,2],[187,28],[188,29],[189,30],[190,31],[191,32],[192,33],[193,34],[194,35],[195,36],[196,36],[197,37],[198,2],[199,38],[200,39],[202,40],[201,41],[203,42],[204,43],[205,44],[206,45],[207,46],[208,47],[209,48],[210,49],[211,50],[212,51],[213,52],[214,53],[215,54],[121,2],[122,2],[123,2],[162,55],[163,2],[164,2],[216,56],[217,57],[247,58],[246,2],[229,2],[124,2],[219,59],[57,2],[58,2],[10,2],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[21,2],[22,2],[4,2],[23,2],[27,2],[24,2],[25,2],[26,2],[28,2],[29,2],[30,2],[5,2],[31,2],[32,2],[33,2],[34,2],[6,2],[38,2],[35,2],[36,2],[37,2],[39,2],[7,2],[40,2],[45,2],[46,2],[41,2],[42,2],[43,2],[44,2],[8,2],[50,2],[47,2],[48,2],[49,2],[51,2],[9,2],[52,2],[53,2],[54,2],[56,2],[55,2],[1,2],[140,60],[150,61],[139,60],[160,62],[131,63],[130,64],[159,59],[153,65],[158,66],[133,67],[147,68],[132,69],[156,70],[128,71],[127,59],[157,72],[129,73],[134,74],[135,2],[138,74],[125,2],[161,75],[151,76],[142,77],[143,78],[145,79],[141,80],[144,81],[154,59],[136,82],[137,83],[146,84],[126,85],[149,76],[148,74],[152,2],[155,86],[66,87],[69,2],[62,2],[65,2],[71,87],[68,87],[111,88],[110,2],[67,87],[70,87],[93,2],[108,2],[95,89],[107,2],[96,90],[81,91],[79,92],[80,91],[82,91],[78,93],[83,94],[103,2],[97,2],[105,95],[85,89],[75,96],[109,97],[89,98],[77,2],[98,2],[91,2],[99,2],[100,2],[106,2],[94,2],[76,2],[101,2],[87,99],[86,99],[88,99],[104,2],[74,2],[90,2],[73,98],[72,2],[92,2],[102,2],[84,2],[63,2],[64,2],[61,100],[221,2],[224,101],[225,102],[222,2],[223,100],[113,103],[227,104],[226,105],[112,106],[59,2],[220,107],[60,108]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ODF comment (`office:annotation`) read/write over a parsed `content.xml` DOM.
|
|
3
|
+
*
|
|
4
|
+
* ODF comments are inline: an `office:annotation` (carrying `dc:creator`, `dc:date`, and a
|
|
5
|
+
* `text:p` body) marks the anchor point, and a paired `office:annotation-end` (same
|
|
6
|
+
* `office:name`) closes a ranged comment. There is no separate comments part.
|
|
7
|
+
*
|
|
8
|
+
* Two insertion paths (a deliberate split — see the `add-odf-comments` design notes):
|
|
9
|
+
* - whole-paragraph: structural (annotation as the block's first inline child, end after its
|
|
10
|
+
* last), independent of text segmentation — robust to spans/spaces/tabs/multiple text nodes;
|
|
11
|
+
* - ranged: split a single host `#text` node at the visible `[start,end)` offsets; a match that
|
|
12
|
+
* crosses node boundaries returns `MATCH_SPANS_MULTIPLE_NODES`.
|
|
13
|
+
*
|
|
14
|
+
* All element matching is by `namespaceURI` + `localName` (ODF prefixes are not guaranteed).
|
|
15
|
+
*/
|
|
16
|
+
/** A comment read back from the document. */
|
|
17
|
+
export type OdfComment = {
|
|
18
|
+
id: number;
|
|
19
|
+
author: string;
|
|
20
|
+
date: string | null;
|
|
21
|
+
initials: string;
|
|
22
|
+
text: string;
|
|
23
|
+
anchoredParagraphId: string | null;
|
|
24
|
+
};
|
|
25
|
+
export type AddAnnotationParams = {
|
|
26
|
+
/** Visible offset of the range start; omit (with `end`) to bracket the whole paragraph. */
|
|
27
|
+
start?: number;
|
|
28
|
+
/** Visible offset of the range end (exclusive). */
|
|
29
|
+
end?: number;
|
|
30
|
+
author: string;
|
|
31
|
+
text: string;
|
|
32
|
+
initials?: string;
|
|
33
|
+
};
|
|
34
|
+
export type AddAnnotationResult = {
|
|
35
|
+
ok: true;
|
|
36
|
+
commentId: number;
|
|
37
|
+
name: string;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
code: 'MATCH_SPANS_MULTIPLE_NODES' | 'INVALID_RANGE';
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Insert an annotation on `block`. With no `start`/`end` the whole paragraph is bracketed; with a
|
|
45
|
+
* range, a single host `#text` node is split. Returns the allocated comment id, or
|
|
46
|
+
* `MATCH_SPANS_MULTIPLE_NODES` if a ranged match crosses node boundaries.
|
|
47
|
+
*/
|
|
48
|
+
export declare function addAnnotation(doc: Document, block: Element, params: AddAnnotationParams): AddAnnotationResult;
|
|
49
|
+
/**
|
|
50
|
+
* Read every `office:annotation` across `blocks` (document order) into structured comments.
|
|
51
|
+
* Numeric ids are parsed from `__Annot__<n>` names; annotations whose names don't match the
|
|
52
|
+
* convention are assigned ids sequentially after the max parsed value (a documented limitation).
|
|
53
|
+
*/
|
|
54
|
+
export declare function readAnnotations(blocks: Element[]): OdfComment[];
|
|
55
|
+
//# sourceMappingURL=comments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../src/comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,4BAA4B,GAAG,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAgFzF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CAuE7G;AA4BD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAgC/D"}
|
package/dist/comments.js
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ODF comment (`office:annotation`) read/write over a parsed `content.xml` DOM.
|
|
3
|
+
*
|
|
4
|
+
* ODF comments are inline: an `office:annotation` (carrying `dc:creator`, `dc:date`, and a
|
|
5
|
+
* `text:p` body) marks the anchor point, and a paired `office:annotation-end` (same
|
|
6
|
+
* `office:name`) closes a ranged comment. There is no separate comments part.
|
|
7
|
+
*
|
|
8
|
+
* Two insertion paths (a deliberate split — see the `add-odf-comments` design notes):
|
|
9
|
+
* - whole-paragraph: structural (annotation as the block's first inline child, end after its
|
|
10
|
+
* last), independent of text segmentation — robust to spans/spaces/tabs/multiple text nodes;
|
|
11
|
+
* - ranged: split a single host `#text` node at the visible `[start,end)` offsets; a match that
|
|
12
|
+
* crosses node boundaries returns `MATCH_SPANS_MULTIPLE_NODES`.
|
|
13
|
+
*
|
|
14
|
+
* All element matching is by `namespaceURI` + `localName` (ODF prefixes are not guaranteed).
|
|
15
|
+
*/
|
|
16
|
+
import { ODF_NS } from './shared/odf/namespaces.js';
|
|
17
|
+
import { ELEMENT_NODE, buildSegments } from './shared/odf/text_segments.js';
|
|
18
|
+
const ANNOT_NAME_RE = /^__Annot__(\d+)$/;
|
|
19
|
+
function attrNS(el, ns, local, prefixed) {
|
|
20
|
+
return el.getAttributeNS(ns, local) ?? el.getAttribute(prefixed);
|
|
21
|
+
}
|
|
22
|
+
/** ODF `dc:date` value: ISO 8601 local-ish, no fractional seconds or trailing `Z`. */
|
|
23
|
+
function nowOdfDate() {
|
|
24
|
+
return new Date().toISOString().replace(/\.\d{3}Z$/, '');
|
|
25
|
+
}
|
|
26
|
+
/** Collect every existing `office:name` value (on annotations and annotation-ends) in the doc. */
|
|
27
|
+
function existingAnnotationNames(doc) {
|
|
28
|
+
const names = new Set();
|
|
29
|
+
for (const local of ['annotation', 'annotation-end']) {
|
|
30
|
+
const els = doc.getElementsByTagNameNS(ODF_NS.OFFICE, local);
|
|
31
|
+
for (let i = 0; i < els.length; i++) {
|
|
32
|
+
const name = attrNS(els[i], ODF_NS.OFFICE, 'name', 'office:name');
|
|
33
|
+
if (name)
|
|
34
|
+
names.add(name);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return names;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Allocate `{ id, name }` for a new annotation, in the SAME id space `readAnnotations` derives.
|
|
41
|
+
* `readAnnotations` assigns parsed `__Annot__<n>` suffixes, then hands every annotation whose name
|
|
42
|
+
* does NOT match that pattern a synthetic id starting at `maxParsed + 1`. So the next free id must
|
|
43
|
+
* clear both: `maxParsed + (count of non-matching annotation elements) + 1`. Still guard against a
|
|
44
|
+
* literal `office:name` collision. This keeps the returned `commentId` from coinciding with the
|
|
45
|
+
* synthetic id a custom-named (e.g. LibreOffice) annotation would otherwise receive.
|
|
46
|
+
*/
|
|
47
|
+
function allocateName(doc) {
|
|
48
|
+
const names = existingAnnotationNames(doc);
|
|
49
|
+
let maxParsed = 0;
|
|
50
|
+
let nonMatching = 0;
|
|
51
|
+
const annots = doc.getElementsByTagNameNS(ODF_NS.OFFICE, 'annotation');
|
|
52
|
+
for (let i = 0; i < annots.length; i++) {
|
|
53
|
+
const name = attrNS(annots[i], ODF_NS.OFFICE, 'name', 'office:name');
|
|
54
|
+
const m = name ? ANNOT_NAME_RE.exec(name) : null;
|
|
55
|
+
if (m)
|
|
56
|
+
maxParsed = Math.max(maxParsed, Number.parseInt(m[1], 10));
|
|
57
|
+
else
|
|
58
|
+
nonMatching += 1;
|
|
59
|
+
}
|
|
60
|
+
let id = maxParsed + nonMatching + 1;
|
|
61
|
+
while (names.has(`__Annot__${id}`))
|
|
62
|
+
id += 1;
|
|
63
|
+
return { id, name: `__Annot__${id}` };
|
|
64
|
+
}
|
|
65
|
+
function makeAnnotation(doc, name, params) {
|
|
66
|
+
const annot = doc.createElementNS(ODF_NS.OFFICE, 'office:annotation');
|
|
67
|
+
annot.setAttributeNS(ODF_NS.OFFICE, 'office:name', name);
|
|
68
|
+
const creator = doc.createElementNS(ODF_NS.DC, 'dc:creator');
|
|
69
|
+
creator.appendChild(doc.createTextNode(params.author));
|
|
70
|
+
annot.appendChild(creator);
|
|
71
|
+
const date = doc.createElementNS(ODF_NS.DC, 'dc:date');
|
|
72
|
+
date.appendChild(doc.createTextNode(nowOdfDate()));
|
|
73
|
+
annot.appendChild(date);
|
|
74
|
+
// Body: blank lines split into separate `text:p`; single newlines become `text:line-break`
|
|
75
|
+
// (parity with insertParagraph). A literal `\n` in one text node would otherwise render as a
|
|
76
|
+
// space in LibreOffice and round-trip lossily through getComments.
|
|
77
|
+
const blockTexts = params.text.replace(/\r\n/g, '\n').split(/\n{2,}/);
|
|
78
|
+
for (const blockText of blockTexts) {
|
|
79
|
+
const body = doc.createElementNS(ODF_NS.TEXT, 'text:p');
|
|
80
|
+
blockText.split('\n').forEach((line, i) => {
|
|
81
|
+
if (i > 0)
|
|
82
|
+
body.appendChild(doc.createElementNS(ODF_NS.TEXT, 'text:line-break'));
|
|
83
|
+
if (line.length > 0)
|
|
84
|
+
body.appendChild(doc.createTextNode(line));
|
|
85
|
+
});
|
|
86
|
+
annot.appendChild(body);
|
|
87
|
+
}
|
|
88
|
+
return annot;
|
|
89
|
+
}
|
|
90
|
+
function makeAnnotationEnd(doc, name) {
|
|
91
|
+
const end = doc.createElementNS(ODF_NS.OFFICE, 'office:annotation-end');
|
|
92
|
+
end.setAttributeNS(ODF_NS.OFFICE, 'office:name', name);
|
|
93
|
+
return end;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Insert an annotation on `block`. With no `start`/`end` the whole paragraph is bracketed; with a
|
|
97
|
+
* range, a single host `#text` node is split. Returns the allocated comment id, or
|
|
98
|
+
* `MATCH_SPANS_MULTIPLE_NODES` if a ranged match crosses node boundaries.
|
|
99
|
+
*/
|
|
100
|
+
export function addAnnotation(doc, block, params) {
|
|
101
|
+
const hasStart = params.start != null;
|
|
102
|
+
const hasEnd = params.end != null;
|
|
103
|
+
// A range is all-or-nothing; a one-sided range is a caller error, not a whole-paragraph comment.
|
|
104
|
+
if (hasStart !== hasEnd) {
|
|
105
|
+
return {
|
|
106
|
+
ok: false,
|
|
107
|
+
code: 'INVALID_RANGE',
|
|
108
|
+
message: 'A ranged comment requires both start and end; provide neither for a whole-paragraph comment.',
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const ranged = hasStart && hasEnd;
|
|
112
|
+
if (!ranged) {
|
|
113
|
+
// Whole-paragraph: structural bracket, independent of text segmentation.
|
|
114
|
+
const { id, name } = allocateName(doc);
|
|
115
|
+
const annot = makeAnnotation(doc, name, params);
|
|
116
|
+
if (!block.firstChild) {
|
|
117
|
+
// Empty paragraph → a single point annotation (no end marker).
|
|
118
|
+
block.appendChild(annot);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
block.insertBefore(annot, block.firstChild);
|
|
122
|
+
block.appendChild(makeAnnotationEnd(doc, name));
|
|
123
|
+
}
|
|
124
|
+
return { ok: true, commentId: id, name };
|
|
125
|
+
}
|
|
126
|
+
const start = params.start;
|
|
127
|
+
const end = params.end;
|
|
128
|
+
const { segments, visible } = buildSegments(block);
|
|
129
|
+
// Fail closed on a malformed range before mutating the DOM (reversed/oob ranges duplicate text).
|
|
130
|
+
if (!Number.isInteger(start) || !Number.isInteger(end) || start < 0 || start >= end || end > visible.length) {
|
|
131
|
+
return {
|
|
132
|
+
ok: false,
|
|
133
|
+
code: 'INVALID_RANGE',
|
|
134
|
+
message: `Invalid annotation range [${start}, ${end}) for a paragraph of visible length ${visible.length}.`,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const { id, name } = allocateName(doc);
|
|
138
|
+
const annot = makeAnnotation(doc, name, params);
|
|
139
|
+
const host = segments.find((seg) => seg.kind === 'text' && start >= seg.visStart && end <= seg.visStart + seg.length);
|
|
140
|
+
if (!host || host.kind !== 'text') {
|
|
141
|
+
return {
|
|
142
|
+
ok: false,
|
|
143
|
+
code: 'MATCH_SPANS_MULTIPLE_NODES',
|
|
144
|
+
message: `Annotation range [${start}, ${end}) in this paragraph crosses node boundaries ` +
|
|
145
|
+
`(spans, spaces, or tabs). Ranged comments must lie within a single text run.`,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
// `host.node` is the live DOM text node (typed loosely by buildSegments).
|
|
149
|
+
const textNode = host.node;
|
|
150
|
+
const parent = textNode.parentNode;
|
|
151
|
+
const next = textNode.nextSibling;
|
|
152
|
+
const localStart = start - host.visStart;
|
|
153
|
+
const localEnd = end - host.visStart;
|
|
154
|
+
const data = textNode.data;
|
|
155
|
+
const mid = data.slice(localStart, localEnd);
|
|
156
|
+
const after = data.slice(localEnd);
|
|
157
|
+
// Keep the leading slice in the original node; insert annotation, middle text, end, trailing text.
|
|
158
|
+
textNode.data = data.slice(0, localStart);
|
|
159
|
+
parent.insertBefore(annot, next);
|
|
160
|
+
if (mid.length > 0)
|
|
161
|
+
parent.insertBefore(doc.createTextNode(mid), next);
|
|
162
|
+
parent.insertBefore(makeAnnotationEnd(doc, name), next);
|
|
163
|
+
if (after.length > 0)
|
|
164
|
+
parent.insertBefore(doc.createTextNode(after), next);
|
|
165
|
+
return { ok: true, commentId: id, name };
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Visible text of an annotation body (its child `text:p` elements, joined by newlines). Uses
|
|
169
|
+
* `buildSegments` rather than `textContent` so `text:line-break` → `\n` and `text:s` → spaces are
|
|
170
|
+
* preserved (a LibreOffice multi-line comment round-trips instead of collapsing to one line).
|
|
171
|
+
*/
|
|
172
|
+
function annotationBodyText(annot) {
|
|
173
|
+
const parts = [];
|
|
174
|
+
for (let child = annot.firstChild; child; child = child.nextSibling) {
|
|
175
|
+
if (child.nodeType !== ELEMENT_NODE)
|
|
176
|
+
continue;
|
|
177
|
+
const el = child;
|
|
178
|
+
if (el.namespaceURI === ODF_NS.TEXT && el.localName === 'p') {
|
|
179
|
+
parts.push(buildSegments(el).visible);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return parts.join('\n');
|
|
183
|
+
}
|
|
184
|
+
function childText(el, ns, local) {
|
|
185
|
+
for (let child = el.firstChild; child; child = child.nextSibling) {
|
|
186
|
+
if (child.nodeType !== ELEMENT_NODE)
|
|
187
|
+
continue;
|
|
188
|
+
const c = child;
|
|
189
|
+
if (c.namespaceURI === ns && c.localName === local)
|
|
190
|
+
return c.textContent ?? '';
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Read every `office:annotation` across `blocks` (document order) into structured comments.
|
|
196
|
+
* Numeric ids are parsed from `__Annot__<n>` names; annotations whose names don't match the
|
|
197
|
+
* convention are assigned ids sequentially after the max parsed value (a documented limitation).
|
|
198
|
+
*/
|
|
199
|
+
export function readAnnotations(blocks) {
|
|
200
|
+
const raw = [];
|
|
201
|
+
let maxParsed = 0;
|
|
202
|
+
blocks.forEach((block, i) => {
|
|
203
|
+
const annots = block.getElementsByTagNameNS(ODF_NS.OFFICE, 'annotation');
|
|
204
|
+
for (let a = 0; a < annots.length; a++) {
|
|
205
|
+
const annot = annots[a];
|
|
206
|
+
const name = attrNS(annot, ODF_NS.OFFICE, 'name', 'office:name');
|
|
207
|
+
const m = name ? ANNOT_NAME_RE.exec(name) : null;
|
|
208
|
+
const parsedId = m ? Number.parseInt(m[1], 10) : null;
|
|
209
|
+
if (parsedId != null)
|
|
210
|
+
maxParsed = Math.max(maxParsed, parsedId);
|
|
211
|
+
raw.push({
|
|
212
|
+
parsedId,
|
|
213
|
+
author: childText(annot, ODF_NS.DC, 'creator') ?? '',
|
|
214
|
+
date: childText(annot, ODF_NS.DC, 'date'),
|
|
215
|
+
text: annotationBodyText(annot),
|
|
216
|
+
anchor: `p${i}`,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
let next = maxParsed + 1;
|
|
221
|
+
return raw.map((r) => ({
|
|
222
|
+
id: r.parsedId ?? next++,
|
|
223
|
+
author: r.author,
|
|
224
|
+
date: r.date,
|
|
225
|
+
initials: '',
|
|
226
|
+
text: r.text,
|
|
227
|
+
anchoredParagraphId: r.anchor,
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../src/comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AA0B5E,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC,SAAS,MAAM,CAAC,EAAW,EAAE,EAAU,EAAE,KAAa,EAAE,QAAgB;IACtE,OAAO,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED,sFAAsF;AACtF,SAAS,UAAU;IACjB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,kGAAkG;AAClG,SAAS,uBAAuB,CAAC,GAAa;IAC5C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAE,CAAC;QACrD,MAAM,GAAG,GAAG,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC7D,KAAK,IAAI,CAAC,GAAG,C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AAC,CAAC;IACzB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACrB,EAAE,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI,EAAE;QACxB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,mBAAmB,EAAE,CAAC,CAAC,MAAM;KAC9B,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure paragraph-level diff for ODF comparison (Slice 1).
|
|
3
|
+
*
|
|
4
|
+
* A language-agnostic O(N·M) LCS over two arrays of paragraph visible-text strings, returning a
|
|
5
|
+
* structured edit script in standard diff order. No DOM — this mirrors docx-core's `atomLcs.ts`
|
|
6
|
+
* (kept separate from emission so it is testable in isolation).
|
|
7
|
+
*
|
|
8
|
+
* Order convention: a paragraph "replaced" in place (text differs at a matched slot) surfaces as
|
|
9
|
+
* a `delete` of the original immediately followed by an `insert` of the revised, because at a
|
|
10
|
+
* mismatch we prefer the deletion branch. The emitter relies on this delete-before-insert order
|
|
11
|
+
* when both anchor at the same position.
|
|
12
|
+
*/
|
|
13
|
+
/** One step of the edit script, in merged document order. */
|
|
14
|
+
export type EditOp = {
|
|
15
|
+
kind: 'equal';
|
|
16
|
+
originalIndex: number;
|
|
17
|
+
revisedIndex: number;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'insert';
|
|
20
|
+
revisedIndex: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'delete';
|
|
23
|
+
originalIndex: number;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'modify';
|
|
26
|
+
originalIndex: number;
|
|
27
|
+
revisedIndex: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Diff two paragraph-text arrays into an ordered edit script.
|
|
31
|
+
* `equal` ops carry both indices; `insert` carries the revised index; `delete` the original index.
|
|
32
|
+
*/
|
|
33
|
+
export declare function diffParagraphs(original: string[], revised: string[]): EditOp[];
|
|
34
|
+
/**
|
|
35
|
+
* Below this Jaccard word-overlap, an aligned delete/insert pair is a replacement, not an
|
|
36
|
+
* in-place edit. Matches docx-core's `DEFAULT_PARAGRAPH_SIMILARITY_THRESHOLD` reference point.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_ODF_SIMILARITY_THRESHOLD = 0.25;
|
|
39
|
+
/**
|
|
40
|
+
* Post-pass over a `diffParagraphs` script: inside each gap (a run of deletes followed by a run
|
|
41
|
+
* of inserts between two anchors — the order `diffParagraphs`'s tie-break guarantees), convert
|
|
42
|
+
* similar delete/insert pairs into `modify` ops.
|
|
43
|
+
*
|
|
44
|
+
* Pairing is an order-constrained DP, deterministic by construction: maximize the pair count,
|
|
45
|
+
* then the total Jaccard similarity; a pair is admissible only when similarity ≥
|
|
46
|
+
* `similarityThreshold`. At ties, pairing beats skipping, and skipping a delete beats skipping
|
|
47
|
+
* an insert (keeps the delete-first convention). Output preserves merged document order:
|
|
48
|
+
* between pairs, unpaired deletes precede unpaired inserts, exactly as Slice 1 emitted them.
|
|
49
|
+
*/
|
|
50
|
+
export declare function pairModifications(ops: EditOp[], original: string[], revised: string[], similarityThreshold?: number): EditOp[];
|
|
51
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/compare/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,MAAM,GACd;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAmC9E;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC,OAAO,CAAC;AAqBrD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EAAE,EACb,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,MAAM,EAAE,EACjB,mBAAmB,GAAE,MAAyC,GAC7D,MAAM,EAAE,CA8FV"}
|