@dialecte/core 0.6.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
- package/dist/diagnostics/diagnostics.d.ts +30 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/types.d.ts +77 -0
- package/dist/diagnostics/types.d.ts.map +1 -0
- package/dist/dialecte/create-dialecte-project.d.ts +11 -0
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
- package/dist/dialecte/create-project-factory.d.ts +14 -0
- package/dist/dialecte/create-project-factory.d.ts.map +1 -0
- package/dist/dialecte/define-dialecte.d.ts +12 -0
- package/dist/dialecte/define-dialecte.d.ts.map +1 -0
- package/dist/dialecte/dialecte.constants.d.ts +4 -0
- package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
- package/dist/dialecte/dialecte.types.d.ts +75 -0
- package/dist/dialecte/dialecte.types.d.ts.map +1 -0
- package/dist/dialecte/index.d.ts +4 -0
- package/dist/dialecte/index.d.ts.map +1 -0
- package/dist/{project-DGQAe9G9.js → dialecte-gIPrRzni.js} +7225 -7511
- package/dist/document/bind-extensions.d.ts +4 -1
- package/dist/document/bind-extensions.d.ts.map +1 -1
- package/dist/document/document.d.ts +58 -5
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/progress/progress.types.d.ts +21 -4
- package/dist/document/progress/progress.types.d.ts.map +1 -1
- package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
- package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
- package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
- package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
- package/dist/document/query/get/definition/get-definition.d.ts +2 -0
- package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
- package/dist/document/query/get/record/get-child.d.ts +2 -0
- package/dist/document/query/get/record/get-child.d.ts.map +1 -1
- package/dist/document/query/get/record/get-children.d.ts +2 -0
- package/dist/document/query/get/record/get-children.d.ts.map +1 -1
- package/dist/document/query/get/record/get-record.d.ts +2 -0
- package/dist/document/query/get/record/get-record.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
- package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records.d.ts +2 -0
- package/dist/document/query/get/record/get-records.d.ts.map +1 -1
- package/dist/document/query/get/record/load-live-records.d.ts +2 -0
- package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
- package/dist/document/query/get/record/resolve-record.d.ts +2 -0
- package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
- package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
- package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
- package/dist/document/query/get/tree/get-tree.d.ts +6 -0
- package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
- package/dist/document/query/main.d.ts +50 -15
- package/dist/document/query/main.d.ts.map +1 -1
- package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
- package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
- package/dist/document/query/tree-filter/omit.d.ts +8 -0
- package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
- package/dist/document/query/tree-filter/order.d.ts +5 -2
- package/dist/document/query/tree-filter/order.d.ts.map +1 -1
- package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
- package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
- package/dist/document/staged-operations.d.ts +5 -1
- package/dist/document/staged-operations.d.ts.map +1 -1
- package/dist/document/transaction/clone/clone.d.ts +2 -0
- package/dist/document/transaction/clone/clone.d.ts.map +1 -1
- package/dist/document/transaction/commit/commit.d.ts.map +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
- package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
- package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
- package/dist/document/transaction/create/create.d.ts +2 -0
- package/dist/document/transaction/create/create.d.ts.map +1 -1
- package/dist/document/transaction/guard.d.ts +5 -0
- package/dist/document/transaction/guard.d.ts.map +1 -1
- package/dist/document/transaction/index.d.ts +2 -0
- package/dist/document/transaction/index.d.ts.map +1 -1
- package/dist/document/transaction/main.d.ts +46 -16
- package/dist/document/transaction/main.d.ts.map +1 -1
- package/dist/document/transaction/stage-operations.d.ts.map +1 -1
- package/dist/document/transaction/update/update.d.ts +2 -0
- package/dist/document/transaction/update/update.d.ts.map +1 -1
- package/dist/document/types.d.ts +3 -5
- package/dist/document/types.d.ts.map +1 -1
- package/dist/engine-store-CIEqgPUb.js +348 -0
- package/dist/engine.constants-DBMjMmV9.js +98 -0
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +15805 -0
- package/dist/errors/codes.d.ts +455 -0
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/errors.constants.d.ts +3 -0
- package/dist/errors/errors.constants.d.ts.map +1 -0
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/types.d.ts +14 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/helpers/assert-fixed.d.ts +3 -1
- package/dist/helpers/assert-fixed.d.ts.map +1 -1
- package/dist/helpers/assert-xml-characters.d.ts +35 -0
- package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
- package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
- package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
- package/dist/helpers/assert-xsi-type.d.ts +4 -0
- package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
- package/dist/helpers/converter.d.ts +21 -6
- package/dist/helpers/converter.d.ts.map +1 -1
- package/dist/helpers/evaluate-expectations.d.ts +21 -0
- package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
- package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
- package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
- package/dist/helpers/guard.d.ts +24 -4
- package/dist/helpers/guard.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/merge-extensions.d.ts +2 -0
- package/dist/helpers/merge-extensions.d.ts.map +1 -1
- package/dist/helpers/read-attributes.d.ts +4 -0
- package/dist/helpers/read-attributes.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts +10 -0
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers/strip-attributes.d.ts +2 -0
- package/dist/helpers/strip-attributes.d.ts.map +1 -1
- package/dist/helpers-DVShv41E.js +489 -0
- package/dist/helpers.js +3 -439
- package/dist/in-process-link-DBeAOZRp.js +2791 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -3
- package/dist/perf/create-perf.d.ts +8 -1
- package/dist/perf/create-perf.d.ts.map +1 -1
- package/dist/perf/index.d.ts +1 -1
- package/dist/perf/index.d.ts.map +1 -1
- package/dist/perf/noop-perf.d.ts.map +1 -1
- package/dist/perf/perf.types.d.ts +65 -6
- package/dist/perf/perf.types.d.ts.map +1 -1
- package/dist/project/index.d.ts +7 -4
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/export-blob.d.ts +5 -2
- package/dist/project/io/export-blob.d.ts.map +1 -1
- package/dist/project/io/export-document.d.ts +5 -4
- package/dist/project/io/export-document.d.ts.map +1 -1
- package/dist/project/io/index.d.ts +1 -1
- package/dist/project/io/index.d.ts.map +1 -1
- package/dist/project/io/init-empty-document.d.ts +2 -0
- package/dist/project/io/init-empty-document.d.ts.map +1 -1
- package/dist/project/io/resolve-config.d.ts +4 -0
- package/dist/project/io/resolve-config.d.ts.map +1 -0
- package/dist/project/io/run-export.d.ts +19 -0
- package/dist/project/io/run-export.d.ts.map +1 -0
- package/dist/project/io/run-export.types.d.ts +45 -0
- package/dist/project/io/run-export.types.d.ts.map +1 -0
- package/dist/project/io/run-import.d.ts +15 -0
- package/dist/project/io/run-import.d.ts.map +1 -0
- package/dist/project/io/run-import.types.d.ts +19 -0
- package/dist/project/io/run-import.types.d.ts.map +1 -0
- package/dist/project/io/store-runtime.constants.d.ts +6 -0
- package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
- package/dist/project/io/store-runtime.d.ts +12 -0
- package/dist/project/io/store-runtime.d.ts.map +1 -0
- package/dist/project/io/store-runtime.types.d.ts +18 -0
- package/dist/project/io/store-runtime.types.d.ts.map +1 -0
- package/dist/project/project-channel.d.ts +11 -0
- package/dist/project/project-channel.d.ts.map +1 -0
- package/dist/project/project.constants.d.ts +12 -0
- package/dist/project/project.constants.d.ts.map +1 -0
- package/dist/project/project.d.ts +339 -25
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/state/document-lifecycle.d.ts +6 -0
- package/dist/project/state/document-lifecycle.d.ts.map +1 -0
- package/dist/project/state/document-state.d.ts +4 -0
- package/dist/project/state/document-state.d.ts.map +1 -1
- package/dist/project/types.d.ts +158 -48
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project-key-Ch34EtFa.js +1435 -0
- package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
- package/dist/running-operations-vnijBvn7.js +76 -0
- package/dist/same-json-value-C6kUaoyt.js +1603 -0
- package/dist/sqlite.d.ts +5 -0
- package/dist/sqlite.d.ts.map +1 -0
- package/dist/sqlite.js +2671 -0
- package/dist/sqlite3.wasm +0 -0
- package/dist/store/apply-record-patch.d.ts +13 -0
- package/dist/store/apply-record-patch.d.ts.map +1 -0
- package/dist/store/closing-connections.d.ts +7 -0
- package/dist/store/closing-connections.d.ts.map +1 -0
- package/dist/store/closing-connections.types.d.ts +13 -0
- package/dist/store/closing-connections.types.d.ts.map +1 -0
- package/dist/store/commit-progress.d.ts +10 -0
- package/dist/store/commit-progress.d.ts.map +1 -0
- package/dist/store/compare-by-id.d.ts +10 -0
- package/dist/store/compare-by-id.d.ts.map +1 -0
- package/dist/store/document-path.constants.d.ts +20 -0
- package/dist/store/document-path.constants.d.ts.map +1 -0
- package/dist/store/document-path.d.ts +75 -0
- package/dist/store/document-path.d.ts.map +1 -0
- package/dist/store/document-path.types.d.ts +11 -0
- package/dist/store/document-path.types.d.ts.map +1 -0
- package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
- package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/engine/client/client.constants.d.ts +30 -0
- package/dist/store/engine/client/client.constants.d.ts.map +1 -0
- package/dist/store/engine/client/client.types.d.ts +200 -0
- package/dist/store/engine/client/client.types.d.ts.map +1 -0
- package/dist/store/engine/client/engine-client.d.ts +15 -0
- package/dist/store/engine/client/engine-client.d.ts.map +1 -0
- package/dist/store/engine/client/engine-control.d.ts +16 -0
- package/dist/store/engine/client/engine-control.d.ts.map +1 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.d.ts +11 -0
- package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
- package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/engine/client/worker-connector.d.ts +32 -0
- package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
- package/dist/store/engine/creation-refusal.d.ts +10 -0
- package/dist/store/engine/creation-refusal.d.ts.map +1 -0
- package/dist/store/engine/dialecte-refusal.d.ts +18 -0
- package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/engine/engine-store.d.ts +163 -0
- package/dist/store/engine/engine-store.d.ts.map +1 -0
- package/dist/store/engine/engine-store.types.d.ts +53 -0
- package/dist/store/engine/engine-store.types.d.ts.map +1 -0
- package/dist/store/engine/engine.constants.d.ts +14 -0
- package/dist/store/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/engine/engine.types.d.ts +165 -0
- package/dist/store/engine/engine.types.d.ts.map +1 -0
- package/dist/store/engine/host/engine-wire.d.ts +19 -0
- package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
- package/dist/store/engine/host/heartbeat.d.ts +33 -0
- package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
- package/dist/store/engine/host/host.constants.d.ts +13 -0
- package/dist/store/engine/host/host.constants.d.ts.map +1 -0
- package/dist/store/engine/host/host.types.d.ts +65 -0
- package/dist/store/engine/host/host.types.d.ts.map +1 -0
- package/dist/store/engine/host/store-events.d.ts +14 -0
- package/dist/store/engine/host/store-events.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.d.ts +46 -0
- package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
- package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-router.d.ts +9 -0
- package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.d.ts +13 -0
- package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.constants.d.ts +33 -0
- package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.types.d.ts +305 -0
- package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.worker.d.ts +2 -0
- package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.d.ts +10 -0
- package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
- package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/engine/project-key.d.ts +15 -0
- package/dist/store/engine/project-key.d.ts.map +1 -0
- package/dist/store/engine/wire/error-envelope.d.ts +25 -0
- package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/engine/wire/wire-values.d.ts +33 -0
- package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.constants.d.ts +116 -0
- package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.types.d.ts +119 -0
- package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
- package/dist/store/hub-public.d.ts +33 -0
- package/dist/store/hub-public.d.ts.map +1 -0
- package/dist/store/ignore-destroy-outcome.d.ts +6 -0
- package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +46 -0
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.d.ts +105 -17
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +55 -1
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +8 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/json-values.constants.d.ts +18 -0
- package/dist/store/json-values.constants.d.ts.map +1 -0
- package/dist/store/json-values.d.ts +40 -0
- package/dist/store/json-values.d.ts.map +1 -0
- package/dist/store/json-values.types.d.ts +18 -0
- package/dist/store/json-values.types.d.ts.map +1 -0
- package/dist/store/local/dexie-store.constants.d.ts +20 -0
- package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
- package/dist/store/local/dexie-store.d.ts +134 -5
- package/dist/store/local/dexie-store.d.ts.map +1 -1
- package/dist/store/local/types.d.ts +9 -0
- package/dist/store/local/types.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +32 -0
- package/dist/store/lost-write.d.ts.map +1 -0
- package/dist/store/lost-write.types.d.ts +4 -0
- package/dist/store/lost-write.types.d.ts.map +1 -0
- package/dist/store/open-connections.d.ts +4 -0
- package/dist/store/open-connections.d.ts.map +1 -0
- package/dist/store/open-connections.types.d.ts +17 -0
- package/dist/store/open-connections.types.d.ts.map +1 -0
- package/dist/store/own-import.d.ts +10 -0
- package/dist/store/own-import.d.ts.map +1 -0
- package/dist/store/project-name.d.ts +10 -0
- package/dist/store/project-name.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +28 -4
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/running-operations.d.ts +7 -0
- package/dist/store/running-operations.d.ts.map +1 -0
- package/dist/store/running-operations.types.d.ts +10 -0
- package/dist/store/running-operations.types.d.ts.map +1 -0
- package/dist/store/same-json-value.d.ts +9 -0
- package/dist/store/same-json-value.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/blobs.d.ts +55 -0
- package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
- package/dist/store/sqlite/engine/commit.d.ts +20 -0
- package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
- package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
- package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/history.d.ts +114 -0
- package/dist/store/sqlite/engine/history.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
- package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-target.d.ts +23 -0
- package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-window.d.ts +23 -0
- package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
- package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
- package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
- package/dist/store/sqlite/engine/records.d.ts +117 -0
- package/dist/store/sqlite/engine/records.d.ts.map +1 -0
- package/dist/store/sqlite/engine/registry.d.ts +76 -0
- package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
- package/dist/store/sqlite/engine/schema.d.ts +57 -0
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/engine/transaction.d.ts +12 -0
- package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
- package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.d.ts +22 -0
- package/dist/store/sqlite/list-projects.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.types.d.ts +28 -0
- package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
- package/dist/store/sqlite/load-sqlite.d.ts +11 -0
- package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-text.d.ts +20 -0
- package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
- package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.types.d.ts +36 -0
- package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
- package/dist/store/sqlite-storage.constants.d.ts +14 -0
- package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite-storage.d.ts +22 -0
- package/dist/store/sqlite-storage.d.ts.map +1 -0
- package/dist/store/sqlite-storage.types.d.ts +24 -0
- package/dist/store/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/store-errors.d.ts +51 -0
- package/dist/store/store-errors.d.ts.map +1 -0
- package/dist/store/store.constants.d.ts +15 -3
- package/dist/store/store.constants.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +280 -16
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/store/stored-record.d.ts +16 -0
- package/dist/store/stored-record.d.ts.map +1 -0
- package/dist/store/unfinished-imports.d.ts +15 -0
- package/dist/store/unfinished-imports.d.ts.map +1 -0
- package/dist/store/write-outcome.d.ts +34 -0
- package/dist/store/write-outcome.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
- package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-xml/assert-xml.d.ts +23 -34
- package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
- package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
- package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
- package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
- package/dist/test/assert-xml/index.d.ts +1 -1
- package/dist/test/assert-xml/index.d.ts.map +1 -1
- package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
- package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
- package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
- package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
- package/dist/test/config.d.ts +5 -0
- package/dist/test/config.d.ts.map +1 -1
- package/dist/test/constant.d.ts +2 -0
- package/dist/test/constant.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.d.ts +32 -37
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.types.d.ts +99 -0
- package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
- package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers.d.ts +13 -0
- package/dist/test/create-test-helpers.d.ts.map +1 -0
- package/dist/test/create-test-helpers.types.d.ts +50 -0
- package/dist/test/create-test-helpers.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
- package/dist/test/generated/definition.generated.d.ts +5 -0
- package/dist/test/generated/definition.generated.d.ts.map +1 -1
- package/dist/test/in-memory-storage.setup.d.ts +2 -0
- package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
- package/dist/test/index.d.ts +6 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/normalize-uuids.constants.d.ts +3 -0
- package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
- package/dist/test/normalize-uuids.d.ts +12 -0
- package/dist/test/normalize-uuids.d.ts.map +1 -1
- package/dist/test/run-test-cases.d.ts +30 -11
- package/dist/test/run-test-cases.d.ts.map +1 -1
- package/dist/test/run-test-cases.type.d.ts +16 -0
- package/dist/test/run-test-cases.type.d.ts.map +1 -1
- package/dist/test/sqlite-storage.setup.d.ts +1 -0
- package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.d.ts +31 -0
- package/dist/test/test-dialecte-setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.types.d.ts +29 -0
- package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.d.ts +2722 -0
- package/dist/test/test-dialecte.d.ts.map +1 -0
- package/dist/test/test-dialecte.types.d.ts +3 -0
- package/dist/test/test-dialecte.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.worker.d.ts +2 -0
- package/dist/test/test-dialecte.worker.d.ts.map +1 -0
- package/dist/test/test-entry-environment.constants.d.ts +27 -0
- package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
- package/dist/test/test-record.d.ts +49 -1
- package/dist/test/test-record.d.ts.map +1 -1
- package/dist/test/test-storage/index.d.ts +5 -0
- package/dist/test/test-storage/index.d.ts.map +1 -0
- package/dist/test/test-storage/read-test-storage.d.ts +4 -0
- package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
- package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +15 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-for.d.ts +19 -0
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
- package/dist/test/test-storage/use-test-storage.d.ts +14 -0
- package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
- package/dist/test/test-timing.constants.d.ts +15 -0
- package/dist/test/test-timing.constants.d.ts.map +1 -0
- package/dist/test/xml/engine-console.d.ts +6 -0
- package/dist/test/xml/engine-console.d.ts.map +1 -0
- package/dist/test/xml/engine.d.ts +3 -0
- package/dist/test/xml/engine.d.ts.map +1 -0
- package/dist/test/xml/index.d.ts +8 -0
- package/dist/test/xml/index.d.ts.map +1 -0
- package/dist/test/xml/malformed-xml-error.d.ts +5 -0
- package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
- package/dist/test/xml/print-node.d.ts +7 -0
- package/dist/test/xml/print-node.d.ts.map +1 -0
- package/dist/test/xml/select-nodes.d.ts +14 -0
- package/dist/test/xml/select-nodes.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
- package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.d.ts +14 -0
- package/dist/test/xml/with-xml-document.d.ts.map +1 -0
- package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
- package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
- package/dist/test/xml/xml.constants.d.ts +16 -0
- package/dist/test/xml/xml.constants.d.ts.map +1 -0
- package/dist/test/xml/xml.types.d.ts +31 -0
- package/dist/test/xml/xml.types.d.ts.map +1 -0
- package/dist/test/xsd/test-ext.xsd +226 -0
- package/dist/test/xsd/test.xsd +528 -0
- package/dist/test.js +3427 -406
- package/dist/types/dialecte-config.d.ts +6 -0
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/types/io.d.ts +33 -25
- package/dist/types/io.d.ts.map +1 -1
- package/dist/utils/attribute-rules.d.ts +16 -1
- package/dist/utils/attribute-rules.d.ts.map +1 -1
- package/dist/utils/child-occurrences.constants.d.ts +4 -0
- package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
- package/dist/utils/child-occurrences.d.ts +17 -0
- package/dist/utils/child-occurrences.d.ts.map +1 -0
- package/dist/utils/child-occurrences.types.d.ts +6 -0
- package/dist/utils/child-occurrences.types.d.ts.map +1 -0
- package/dist/utils/datatype.d.ts +4 -0
- package/dist/utils/datatype.d.ts.map +1 -1
- package/dist/utils/format-xml.d.ts +4 -0
- package/dist/utils/format-xml.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/invariant.d.ts +2 -0
- package/dist/utils/invariant.d.ts.map +1 -1
- package/dist/utils/namespaces.d.ts +15 -1
- package/dist/utils/namespaces.d.ts.map +1 -1
- package/dist/utils/order-children.d.ts +14 -3
- package/dist/utils/order-children.d.ts.map +1 -1
- package/dist/utils/order-children.types.d.ts +10 -0
- package/dist/utils/order-children.types.d.ts.map +1 -0
- package/dist/utils/particle-occurrences.d.ts +4 -0
- package/dist/utils/particle-occurrences.d.ts.map +1 -0
- package/dist/utils/required-choices.d.ts +17 -0
- package/dist/utils/required-choices.d.ts.map +1 -0
- package/dist/utils/required-choices.types.d.ts +15 -0
- package/dist/utils/required-choices.types.d.ts.map +1 -0
- package/dist/utils/resolve-definition.d.ts +4 -0
- package/dist/utils/resolve-definition.d.ts.map +1 -1
- package/dist/utils/save-to-disk.constants.d.ts +3 -0
- package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
- package/dist/utils/save-to-disk.d.ts +17 -5
- package/dist/utils/save-to-disk.d.ts.map +1 -1
- package/dist/utils/save-to-disk.types.d.ts +17 -0
- package/dist/utils/save-to-disk.types.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.constants.d.ts +5 -0
- package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.d.ts +15 -0
- package/dist/utils/seeded-uuid.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.types.d.ts +8 -0
- package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
- package/dist/utils/tell-listener.constants.d.ts +9 -0
- package/dist/utils/tell-listener.constants.d.ts.map +1 -0
- package/dist/utils/tell-listener.d.ts +24 -0
- package/dist/utils/tell-listener.d.ts.map +1 -0
- package/dist/utils/xml-characters.constants.d.ts +9 -0
- package/dist/utils/xml-characters.constants.d.ts.map +1 -0
- package/dist/utils/xml-characters.d.ts +8 -0
- package/dist/utils/xml-characters.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.constants.d.ts +8 -0
- package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.d.ts +19 -0
- package/dist/utils/xml-whitespace.d.ts.map +1 -0
- package/dist/utils/xsi-type.d.ts +4 -0
- package/dist/utils/xsi-type.d.ts.map +1 -1
- package/dist/utils/yield-to-queue.d.ts +6 -0
- package/dist/utils/yield-to-queue.d.ts.map +1 -0
- package/dist/utils-USNkj4sT.js +1275 -0
- package/dist/utils.js +1 -2
- package/dist/xml/build/document-root.d.ts +7 -0
- package/dist/xml/build/document-root.d.ts.map +1 -0
- package/dist/xml/build/index.d.ts +0 -5
- package/dist/xml/build/index.d.ts.map +1 -1
- package/dist/xml/build/record-element.d.ts +15 -0
- package/dist/xml/build/record-element.d.ts.map +1 -0
- package/dist/xml/build/record-element.types.d.ts +12 -0
- package/dist/xml/build/record-element.types.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.d.ts +7 -0
- package/dist/xml/build/write-xml-records.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.types.d.ts +11 -0
- package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
- package/dist/xml/build/xml-element.d.ts +79 -0
- package/dist/xml/build/xml-element.d.ts.map +1 -0
- package/dist/xml/build/xml-element.types.d.ts +34 -0
- package/dist/xml/build/xml-element.types.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.constants.d.ts +24 -0
- package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.d.ts +40 -0
- package/dist/xml/build/xml-writer.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.types.d.ts +34 -0
- package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
- package/dist/xml/dom/index.d.ts +3 -0
- package/dist/xml/dom/index.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
- package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/inspect-xml.d.ts +2 -0
- package/dist/xml/inspect-xml.d.ts.map +1 -1
- package/dist/xml/parse/index.d.ts +1 -1
- package/dist/xml/parse/index.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
- package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
- package/dist/xml/parse/parse-xml-document.d.ts +13 -2
- package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.types.d.ts +12 -2
- package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
- package/dist/xml/parse/parser.constants.d.ts +7 -0
- package/dist/xml/parse/parser.constants.d.ts.map +1 -0
- package/dist/xml/parse/parser.d.ts +4 -2
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/dist/xml/parse/types.d.ts +2 -0
- package/dist/xml/parse/types.d.ts.map +1 -1
- package/package.json +88 -8
- package/skills/dialecte/SKILL.md +276 -0
- package/skills/dialecte/references/api.json +1830 -0
- package/skills/dialecte/references/api.md +557 -0
- package/skills/dialecte/references/core-api.md +204 -0
- package/skills/dialecte/references/testing.md +116 -0
- package/skills/dialecte-contributing/SKILL.md +328 -0
- package/skills/dialecte-contributing/references/code-rules.md +108 -0
- package/skills/dialecte-contributing/references/landing-changes.md +83 -0
- package/skills/dialecte-contributing/references/perf.md +39 -0
- package/skills/dialecte-contributing/references/traps.md +89 -0
- package/skills/dialecte-lot/SKILL.md +471 -0
- package/skills/dialecte-lot/references/briefs.md +152 -0
- package/skills/dialecte-lot/references/model-tiers.md +52 -0
- package/skills/dialecte-lot/references/retro.md +51 -0
- package/dist/project/io/import-document.d.ts +0 -7
- package/dist/project/io/import-document.d.ts.map +0 -1
- package/dist/test/assert-xml/types.d.ts +0 -2
- package/dist/test/assert-xml/types.d.ts.map +0 -1
- package/dist/utils-CTBHUFs9.js +0 -620
- package/dist/xml/build/build-xml-document.d.ts +0 -10
- package/dist/xml/build/build-xml-document.d.ts.map +0 -1
- package/dist/xml/build/build-xml-document.types.d.ts +0 -22
- package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
- package/dist/xml/build/download-file.d.ts +0 -7
- package/dist/xml/build/download-file.d.ts.map +0 -1
- package/dist/xml/build/formatter.d.ts +0 -2
- package/dist/xml/build/formatter.d.ts.map +0 -1
- package/dist/xml/build/serialize.d.ts +0 -11
- package/dist/xml/build/serialize.d.ts.map +0 -1
- package/dist/xml/build/serialize.types.d.ts +0 -12
- package/dist/xml/build/serialize.types.d.ts.map +0 -1
|
@@ -0,0 +1,1435 @@
|
|
|
1
|
+
import { A as e, B as t, F as n, O as r, R as i, S as a, W as o, a as s, f as c, h as l, w as u, y as d } from "./utils-USNkj4sT.js";
|
|
2
|
+
// src/store/store.constants.ts
|
|
3
|
+
var f = [
|
|
4
|
+
"",
|
|
5
|
+
".",
|
|
6
|
+
".."
|
|
7
|
+
], p = 2e3, m = "_documents", h = "_changeLog", g = "_meta", _ = "xel_";
|
|
8
|
+
function ee(e) {
|
|
9
|
+
return `${_}${e}`;
|
|
10
|
+
}
|
|
11
|
+
var te = "_blobs", v = "blob_";
|
|
12
|
+
function ne(e) {
|
|
13
|
+
return `${v}${e}`;
|
|
14
|
+
}
|
|
15
|
+
var re = {
|
|
16
|
+
primaryKey: "id",
|
|
17
|
+
indexes: ["name", "configKey"],
|
|
18
|
+
compoundIndexes: [],
|
|
19
|
+
arrayIndexes: []
|
|
20
|
+
}, ie = {
|
|
21
|
+
primaryKey: "id",
|
|
22
|
+
autoIncrement: !0,
|
|
23
|
+
indexes: ["documentId"],
|
|
24
|
+
compoundIndexes: [["documentId", "sequenceNumber"]],
|
|
25
|
+
arrayIndexes: []
|
|
26
|
+
}, ae = {
|
|
27
|
+
primaryKey: "key",
|
|
28
|
+
indexes: [],
|
|
29
|
+
compoundIndexes: [],
|
|
30
|
+
arrayIndexes: []
|
|
31
|
+
}, oe = {
|
|
32
|
+
primaryKey: "id",
|
|
33
|
+
indexes: ["documentId"],
|
|
34
|
+
compoundIndexes: [],
|
|
35
|
+
arrayIndexes: []
|
|
36
|
+
}, se = {
|
|
37
|
+
primaryKey: "id",
|
|
38
|
+
indexes: [],
|
|
39
|
+
compoundIndexes: [],
|
|
40
|
+
arrayIndexes: []
|
|
41
|
+
};
|
|
42
|
+
// src/store/project-name.ts
|
|
43
|
+
function ce(e) {
|
|
44
|
+
let { project: t, dialecteId: n } = e;
|
|
45
|
+
(f.includes(t) || n !== void 0 && f.includes(n)) && o("PROJECT_NAME_INVALID", {
|
|
46
|
+
detail: `A project cannot be named ${JSON.stringify(t)}${n === void 0 ? "" : ` in dialecte ${JSON.stringify(n)}`}: neither its name nor its dialecte's id may be empty, \`.\` or \`..\``,
|
|
47
|
+
meta: {
|
|
48
|
+
project: t,
|
|
49
|
+
...n !== void 0 && { dialecteId: n }
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// src/store/json-values.constants.ts
|
|
54
|
+
var le = {
|
|
55
|
+
bigint: "a BigInt",
|
|
56
|
+
function: "a function",
|
|
57
|
+
symbol: "a symbol"
|
|
58
|
+
}, y = "not well-formed UTF-16 (a lone surrogate)", ue = `text that is ${y}`, b = `a key that is ${y}`;
|
|
59
|
+
// src/store/store-errors.ts
|
|
60
|
+
function de(e) {
|
|
61
|
+
let { documentId: t } = e;
|
|
62
|
+
o("STORE_DUPLICATE_ID", {
|
|
63
|
+
detail: `Document "${t}" is already registered`,
|
|
64
|
+
meta: { documentId: t }
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function fe(e) {
|
|
68
|
+
let { path: t, reason: n } = e;
|
|
69
|
+
o("DOCUMENT_PATH_INVALID", {
|
|
70
|
+
detail: `The document path ${JSON.stringify(t)} is refused: ${n}`,
|
|
71
|
+
meta: { path: t }
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function pe(e) {
|
|
75
|
+
let { documentId: t, path: n, takenBy: r } = e;
|
|
76
|
+
o("DOCUMENT_PATH_TAKEN", {
|
|
77
|
+
detail: `Document "${t}" cannot take the path "${n}": document "${r}" holds that place`,
|
|
78
|
+
meta: {
|
|
79
|
+
documentId: t,
|
|
80
|
+
path: n,
|
|
81
|
+
takenBy: r
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function me(e) {
|
|
86
|
+
let { documentId: t, what: n } = e;
|
|
87
|
+
o("DOCUMENT_NOT_REGISTERED", {
|
|
88
|
+
detail: `Cannot write ${n} to document "${t}": it is not registered`,
|
|
89
|
+
meta: { documentId: t }
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function he(e) {
|
|
93
|
+
let { documentId: t, recordId: n } = e;
|
|
94
|
+
o("STORE_RECORD_NOT_FOUND", {
|
|
95
|
+
detail: `Record "${n}" is not in document "${t}": nothing to update`,
|
|
96
|
+
meta: {
|
|
97
|
+
documentId: t,
|
|
98
|
+
recordId: n
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function ge(e) {
|
|
103
|
+
let { documentId: t, held: n, repeated: r, cause: i } = e, a = [n.length > 0 ? `already holds: ${x(n).join(", ")}` : void 0, r.length > 0 ? `given twice: ${x(r).join(", ")}` : void 0].filter((e) => e !== void 0);
|
|
104
|
+
o("STORE_DUPLICATE_ID", {
|
|
105
|
+
detail: `Document "${t}" refuses ids to create - ${a.join("; ")}`,
|
|
106
|
+
meta: {
|
|
107
|
+
documentId: t,
|
|
108
|
+
recordIds: x([...n, ...r])
|
|
109
|
+
},
|
|
110
|
+
cause: i
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function x(e) {
|
|
114
|
+
return [...new Set(e)];
|
|
115
|
+
}
|
|
116
|
+
function _e(e) {
|
|
117
|
+
let { storeName: t, connections: n } = e;
|
|
118
|
+
o("PROJECT_OPEN_ELSEWHERE", {
|
|
119
|
+
detail: `Project "${t}" cannot be destroyed while another connection has it open: close that one first`,
|
|
120
|
+
meta: {
|
|
121
|
+
project: t,
|
|
122
|
+
...n !== void 0 && { connections: n }
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function ve(e) {
|
|
127
|
+
let { storeName: t } = e;
|
|
128
|
+
o("STORE_CLOSED", {
|
|
129
|
+
detail: `Store "${t}" is closed: open it again before using it`,
|
|
130
|
+
meta: { storeName: t }
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
// src/store/json-values.ts
|
|
134
|
+
function ye(e) {
|
|
135
|
+
Se({ walk: function() {
|
|
136
|
+
S({
|
|
137
|
+
value: e.value,
|
|
138
|
+
field: "",
|
|
139
|
+
inArray: !1,
|
|
140
|
+
ancestors: []
|
|
141
|
+
});
|
|
142
|
+
} });
|
|
143
|
+
}
|
|
144
|
+
function be(e) {
|
|
145
|
+
ye({ value: { writeId: e.writeId } });
|
|
146
|
+
}
|
|
147
|
+
function xe(e) {
|
|
148
|
+
return Se({ walk: function() {
|
|
149
|
+
return C({
|
|
150
|
+
value: e.value,
|
|
151
|
+
field: "",
|
|
152
|
+
inArray: !1,
|
|
153
|
+
ancestors: []
|
|
154
|
+
});
|
|
155
|
+
} });
|
|
156
|
+
}
|
|
157
|
+
function Se(e) {
|
|
158
|
+
try {
|
|
159
|
+
return e.walk();
|
|
160
|
+
} catch (e) {
|
|
161
|
+
let t = e instanceof Error ? e : void 0;
|
|
162
|
+
o("STORE_VALUE_NOT_JSON", {
|
|
163
|
+
detail: t?.message ?? String(e),
|
|
164
|
+
cause: t
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function S(e) {
|
|
169
|
+
let t = E(e);
|
|
170
|
+
if (t === "leaf") return;
|
|
171
|
+
let { ancestors: n } = e;
|
|
172
|
+
if (n.push(e.value), t === "array") {
|
|
173
|
+
let t = e.value, { length: r } = t;
|
|
174
|
+
for (let e = 0; e < r; e++) {
|
|
175
|
+
let r = t[e];
|
|
176
|
+
T({ value: r }) || S({
|
|
177
|
+
value: r,
|
|
178
|
+
field: e,
|
|
179
|
+
inArray: !0,
|
|
180
|
+
ancestors: n
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
} else {
|
|
184
|
+
let t = e.value;
|
|
185
|
+
for (let r of Object.keys(t)) {
|
|
186
|
+
r.isWellFormed() || k({
|
|
187
|
+
step: e,
|
|
188
|
+
kind: b
|
|
189
|
+
});
|
|
190
|
+
let i = t[r];
|
|
191
|
+
T({ value: i }) || S({
|
|
192
|
+
value: i,
|
|
193
|
+
field: r,
|
|
194
|
+
inArray: !1,
|
|
195
|
+
ancestors: n
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
n.pop();
|
|
200
|
+
}
|
|
201
|
+
function C(e) {
|
|
202
|
+
let t = E(e);
|
|
203
|
+
if (t === "leaf") return w({ value: e.value });
|
|
204
|
+
let { ancestors: n } = e;
|
|
205
|
+
n.push(e.value);
|
|
206
|
+
let r = t === "array" ? Ce(e) : we(e);
|
|
207
|
+
return n.pop(), r;
|
|
208
|
+
}
|
|
209
|
+
function Ce(e) {
|
|
210
|
+
let { ancestors: t } = e, n = e.value, r = [], { length: i } = n;
|
|
211
|
+
for (let e = 0; e < i; e++) {
|
|
212
|
+
let i = n[e];
|
|
213
|
+
r.push(T({ value: i }) ? w({ value: i }) : C({
|
|
214
|
+
value: i,
|
|
215
|
+
field: e,
|
|
216
|
+
inArray: !0,
|
|
217
|
+
ancestors: t
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
return r;
|
|
221
|
+
}
|
|
222
|
+
function we(e) {
|
|
223
|
+
let { ancestors: t } = e, n = e.value, r = {};
|
|
224
|
+
for (let i of Object.keys(n)) {
|
|
225
|
+
i.isWellFormed() || k({
|
|
226
|
+
step: e,
|
|
227
|
+
kind: b
|
|
228
|
+
});
|
|
229
|
+
let a = n[i], o = T({ value: a }) ? w({ value: a }) : C({
|
|
230
|
+
value: a,
|
|
231
|
+
field: i,
|
|
232
|
+
inArray: !1,
|
|
233
|
+
ancestors: t
|
|
234
|
+
});
|
|
235
|
+
o !== void 0 && (i === "__proto__" ? Object.defineProperty(r, i, {
|
|
236
|
+
value: o,
|
|
237
|
+
writable: !0,
|
|
238
|
+
enumerable: !0,
|
|
239
|
+
configurable: !0
|
|
240
|
+
}) : r[i] = o);
|
|
241
|
+
}
|
|
242
|
+
return r;
|
|
243
|
+
}
|
|
244
|
+
function w(e) {
|
|
245
|
+
return e.value === 0 ? 0 : e.value;
|
|
246
|
+
}
|
|
247
|
+
function T(e) {
|
|
248
|
+
let { value: t } = e;
|
|
249
|
+
switch (typeof t) {
|
|
250
|
+
case "string": return t.isWellFormed();
|
|
251
|
+
case "boolean": return !0;
|
|
252
|
+
case "number": return Number.isFinite(t);
|
|
253
|
+
case "object": return t === null;
|
|
254
|
+
default: return !1;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function E(e) {
|
|
258
|
+
let { value: t } = e, n = typeof t;
|
|
259
|
+
switch (n) {
|
|
260
|
+
case "string": return t.isWellFormed() ? "leaf" : k({
|
|
261
|
+
step: e,
|
|
262
|
+
kind: ue
|
|
263
|
+
});
|
|
264
|
+
case "boolean": return "leaf";
|
|
265
|
+
case "number": return Number.isFinite(t) ? "leaf" : k({
|
|
266
|
+
step: e,
|
|
267
|
+
kind: String(t)
|
|
268
|
+
});
|
|
269
|
+
case "undefined": return t === void 0 ? e.inArray ? k({
|
|
270
|
+
step: e,
|
|
271
|
+
kind: "undefined in an array"
|
|
272
|
+
}) : "leaf" : D({
|
|
273
|
+
step: e,
|
|
274
|
+
held: t
|
|
275
|
+
});
|
|
276
|
+
case "object": return t === null ? "leaf" : D({
|
|
277
|
+
step: e,
|
|
278
|
+
held: t
|
|
279
|
+
});
|
|
280
|
+
default: return k({
|
|
281
|
+
step: e,
|
|
282
|
+
kind: le[n]
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function D(e) {
|
|
287
|
+
let { step: t, held: n } = e, r = Array.isArray(n), i = Object.getPrototypeOf(n);
|
|
288
|
+
return O({
|
|
289
|
+
prototype: i,
|
|
290
|
+
name: r ? "Array" : "Object"
|
|
291
|
+
}) || k({
|
|
292
|
+
step: t,
|
|
293
|
+
kind: `an instance of ${n.constructor?.name || "a class"}`
|
|
294
|
+
}), i === null && JSON.isRawJSON?.(n) && k({
|
|
295
|
+
step: t,
|
|
296
|
+
kind: "a raw JSON value"
|
|
297
|
+
}), typeof n.toJSON == "function" && k({
|
|
298
|
+
step: t,
|
|
299
|
+
kind: "a value with toJSON"
|
|
300
|
+
}), t.ancestors.includes(n) && k({
|
|
301
|
+
step: t,
|
|
302
|
+
kind: "a cycle"
|
|
303
|
+
}), t.ancestors.length >= 512 && k({
|
|
304
|
+
step: t,
|
|
305
|
+
kind: "a value nested more than 512 levels deep"
|
|
306
|
+
}), r ? "array" : "object";
|
|
307
|
+
}
|
|
308
|
+
function O(e) {
|
|
309
|
+
let { prototype: t, name: n } = e;
|
|
310
|
+
if (t === (n === "Array" ? Array.prototype : Object.prototype)) return !0;
|
|
311
|
+
if (t === null) return n === "Object";
|
|
312
|
+
let r = Object.getOwnPropertyDescriptor(t, "constructor")?.value;
|
|
313
|
+
return typeof r == "function" && r.name === n;
|
|
314
|
+
}
|
|
315
|
+
function k(e) {
|
|
316
|
+
let t = String(e.step.field);
|
|
317
|
+
throw TypeError(`${e.kind} is not a JSON value${t ? ` (field "${t}")` : ""}`);
|
|
318
|
+
}
|
|
319
|
+
// src/utils/tell-listener.ts
|
|
320
|
+
var A = /* @__PURE__ */ new WeakSet();
|
|
321
|
+
function j(e) {
|
|
322
|
+
let { listener: t, value: n, of: r, call: i } = e;
|
|
323
|
+
if (t) try {
|
|
324
|
+
let e = t(n);
|
|
325
|
+
De(e) && Promise.resolve(e).catch(function(e) {
|
|
326
|
+
M({
|
|
327
|
+
call: i,
|
|
328
|
+
of: r,
|
|
329
|
+
thrown: e
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
} catch (e) {
|
|
333
|
+
M({
|
|
334
|
+
call: i,
|
|
335
|
+
of: r,
|
|
336
|
+
thrown: e
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function Te(e) {
|
|
341
|
+
return `the changes of project "${e.name}"`;
|
|
342
|
+
}
|
|
343
|
+
function Ee(e) {
|
|
344
|
+
let { listeners: t, value: n, of: r } = e;
|
|
345
|
+
for (let e of Array.from(t)) j({
|
|
346
|
+
listener: e,
|
|
347
|
+
value: n,
|
|
348
|
+
of: r
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function M(e) {
|
|
352
|
+
let { call: t } = e;
|
|
353
|
+
if (t !== void 0) {
|
|
354
|
+
if (A.has(t)) return;
|
|
355
|
+
A.add(t);
|
|
356
|
+
}
|
|
357
|
+
console.error(`[dialecte] a listener of ${e.of} threw; what told it goes on:`, e.thrown);
|
|
358
|
+
}
|
|
359
|
+
function De(e) {
|
|
360
|
+
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
361
|
+
}
|
|
362
|
+
// src/utils/tell-listener.constants.ts
|
|
363
|
+
var N = {
|
|
364
|
+
importProgress: "an import's progress",
|
|
365
|
+
exportProgress: "an export's progress",
|
|
366
|
+
commitProgress: "a commit's progress",
|
|
367
|
+
callProgress: "a call's progress",
|
|
368
|
+
engineChanges: "a project engine's changes"
|
|
369
|
+
}, P = Object.freeze({
|
|
370
|
+
start() {},
|
|
371
|
+
stop() {},
|
|
372
|
+
count() {},
|
|
373
|
+
time(e, t) {
|
|
374
|
+
return t();
|
|
375
|
+
},
|
|
376
|
+
profile(e, t) {
|
|
377
|
+
return t();
|
|
378
|
+
},
|
|
379
|
+
report() {
|
|
380
|
+
return {};
|
|
381
|
+
},
|
|
382
|
+
log() {},
|
|
383
|
+
reset() {},
|
|
384
|
+
snapshot() {
|
|
385
|
+
return {
|
|
386
|
+
timeOrigin: performance.timeOrigin,
|
|
387
|
+
spans: [],
|
|
388
|
+
totals: {}
|
|
389
|
+
};
|
|
390
|
+
},
|
|
391
|
+
merge() {}
|
|
392
|
+
}), F = "dialecte::";
|
|
393
|
+
function I({ enabled: e, timeline: t = !0 }) {
|
|
394
|
+
if (!e) return P;
|
|
395
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [], o = 0;
|
|
396
|
+
function s(e) {
|
|
397
|
+
t ? performance.measure(F + e.name, {
|
|
398
|
+
start: e.startTime,
|
|
399
|
+
duration: e.duration
|
|
400
|
+
}) : a.push(e);
|
|
401
|
+
}
|
|
402
|
+
function c() {
|
|
403
|
+
return t ? performance.getEntriesByType("measure").filter((e) => e.name.startsWith(F)).map((e) => ({
|
|
404
|
+
name: e.name.slice(10),
|
|
405
|
+
startTime: e.startTime,
|
|
406
|
+
duration: e.duration
|
|
407
|
+
})) : a;
|
|
408
|
+
}
|
|
409
|
+
function l(e, t, n) {
|
|
410
|
+
let r = i.get(e) ?? i.set(e, {
|
|
411
|
+
calls: 0,
|
|
412
|
+
totalMs: 0
|
|
413
|
+
}).get(e);
|
|
414
|
+
r.calls += t, r.totalMs += n;
|
|
415
|
+
}
|
|
416
|
+
let u = {
|
|
417
|
+
start(e) {
|
|
418
|
+
let r = F + e, i = `${r}:${++o}`;
|
|
419
|
+
t && performance.mark(i), (n.get(r) ?? n.set(r, []).get(r)).push({
|
|
420
|
+
mark: i,
|
|
421
|
+
startTime: performance.now()
|
|
422
|
+
});
|
|
423
|
+
},
|
|
424
|
+
stop(e) {
|
|
425
|
+
let r = F + e, i = n.get(r)?.pop();
|
|
426
|
+
i && (t ? (performance.measure(r, i.mark), performance.clearMarks(i.mark)) : a.push({
|
|
427
|
+
name: e,
|
|
428
|
+
startTime: i.startTime,
|
|
429
|
+
duration: performance.now() - i.startTime
|
|
430
|
+
}));
|
|
431
|
+
},
|
|
432
|
+
count(e) {
|
|
433
|
+
let t = F + e;
|
|
434
|
+
r.set(t, (r.get(t) ?? 0) + 1);
|
|
435
|
+
},
|
|
436
|
+
time(e, t) {
|
|
437
|
+
let n = F + e, r = performance.now();
|
|
438
|
+
try {
|
|
439
|
+
return t();
|
|
440
|
+
} finally {
|
|
441
|
+
l(n, 1, performance.now() - r);
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
profile(e, t) {
|
|
445
|
+
return typeof console.profile == "function" ? (console.profile(F + e), Promise.resolve(t()).finally(() => console.profileEnd(F + e))) : t();
|
|
446
|
+
},
|
|
447
|
+
report() {
|
|
448
|
+
let e = {};
|
|
449
|
+
for (let { name: t, duration: n } of c()) {
|
|
450
|
+
let r = e[t] ??= {
|
|
451
|
+
calls: 0,
|
|
452
|
+
totalMs: 0,
|
|
453
|
+
avgMs: 0
|
|
454
|
+
};
|
|
455
|
+
r.calls++, r.totalMs += n, r.avgMs = r.totalMs / r.calls;
|
|
456
|
+
}
|
|
457
|
+
return d(e);
|
|
458
|
+
},
|
|
459
|
+
log() {
|
|
460
|
+
console.table(u.report());
|
|
461
|
+
},
|
|
462
|
+
reset() {
|
|
463
|
+
t && (performance.clearMarks(), performance.clearMeasures()), n.clear(), a.length = 0, r.clear(), i.clear();
|
|
464
|
+
},
|
|
465
|
+
snapshot() {
|
|
466
|
+
return {
|
|
467
|
+
timeOrigin: performance.timeOrigin,
|
|
468
|
+
spans: [...c()],
|
|
469
|
+
totals: d({})
|
|
470
|
+
};
|
|
471
|
+
},
|
|
472
|
+
merge({ report: e, prefix: t }) {
|
|
473
|
+
let n = e.timeOrigin - performance.timeOrigin;
|
|
474
|
+
for (let r of e.spans) s({
|
|
475
|
+
name: `${t}::${r.name}`,
|
|
476
|
+
startTime: Math.max(0, r.startTime + n),
|
|
477
|
+
duration: r.duration
|
|
478
|
+
});
|
|
479
|
+
for (let [n, i] of Object.entries(e.totals)) {
|
|
480
|
+
let e = `${F}${t}::${n}`;
|
|
481
|
+
i.calls > 0 && l(e, i.calls, i.totalMs), i.count !== void 0 && r.set(e, (r.get(e) ?? 0) + i.count);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
function d(e) {
|
|
486
|
+
for (let [t, n] of i) {
|
|
487
|
+
let r = t.slice(10), i = e[r] ??= {
|
|
488
|
+
calls: 0,
|
|
489
|
+
totalMs: 0,
|
|
490
|
+
avgMs: 0
|
|
491
|
+
};
|
|
492
|
+
i.calls += n.calls, i.totalMs += n.totalMs, i.avgMs = i.calls ? i.totalMs / i.calls : 0;
|
|
493
|
+
}
|
|
494
|
+
for (let [t, n] of r) {
|
|
495
|
+
let r = t.slice(10), i = e[r] ??= {
|
|
496
|
+
calls: 0,
|
|
497
|
+
totalMs: 0,
|
|
498
|
+
avgMs: 0
|
|
499
|
+
};
|
|
500
|
+
i.count = n;
|
|
501
|
+
}
|
|
502
|
+
return e;
|
|
503
|
+
}
|
|
504
|
+
return u;
|
|
505
|
+
}
|
|
506
|
+
// src/project/io/resolve-config.ts
|
|
507
|
+
function L(e) {
|
|
508
|
+
let { configs: t, defaultConfigKey: n, configKey: r = n } = e, i = t[r];
|
|
509
|
+
return c(i, {
|
|
510
|
+
key: "UNKNOWN_CONFIG_KEY",
|
|
511
|
+
detail: `Unknown configKey: "${r}". Available: ${Object.keys(t).join(", ")}`
|
|
512
|
+
}), {
|
|
513
|
+
configKey: r,
|
|
514
|
+
config: i
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
// src/utils/yield-to-queue.ts
|
|
518
|
+
function Oe() {
|
|
519
|
+
return new Promise(function(e) {
|
|
520
|
+
let t = new MessageChannel();
|
|
521
|
+
t.port1.onmessage = function() {
|
|
522
|
+
t.port1.close(), e();
|
|
523
|
+
}, t.port2.postMessage(null);
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
// src/xml/build/document-root.ts
|
|
527
|
+
function ke(e) {
|
|
528
|
+
let { record: t, config: n } = e;
|
|
529
|
+
return t.tagName === n.rootElementName && t.parent === null;
|
|
530
|
+
}
|
|
531
|
+
// src/xml/build/constant.ts
|
|
532
|
+
var R = "_temp-idb-id", Ae = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>", je = " ", Me = /[&<>"\t\n\r]/, Ne = /[&<>"\t\n\r]/g, Pe = /[&<>]/, Fe = /[&<>]/g, Ie = /[&<>\r]/, Le = /[&<>\r]/g, Re = {
|
|
533
|
+
"&": "&",
|
|
534
|
+
"<": "<",
|
|
535
|
+
">": ">",
|
|
536
|
+
"\"": """,
|
|
537
|
+
" ": "	",
|
|
538
|
+
"\n": " ",
|
|
539
|
+
"\r": " "
|
|
540
|
+
}, ze = {
|
|
541
|
+
bindings: /* @__PURE__ */ new Map(),
|
|
542
|
+
parent: void 0
|
|
543
|
+
}, Be = /* @__PURE__ */ new Set();
|
|
544
|
+
// src/xml/build/xml-element.ts
|
|
545
|
+
function Ve(e) {
|
|
546
|
+
let { namespaceURI: t, qualifiedName: n, parent: r } = e;
|
|
547
|
+
if (t === null) return {
|
|
548
|
+
namespaceURI: t,
|
|
549
|
+
prefix: null,
|
|
550
|
+
localName: n,
|
|
551
|
+
attributes: [],
|
|
552
|
+
parent: r
|
|
553
|
+
};
|
|
554
|
+
let { prefix: i, localName: a } = Ze(n);
|
|
555
|
+
return {
|
|
556
|
+
namespaceURI: t,
|
|
557
|
+
prefix: i,
|
|
558
|
+
localName: a,
|
|
559
|
+
attributes: [],
|
|
560
|
+
parent: r
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
function z(e) {
|
|
564
|
+
let { element: t, qualifiedName: n, value: r } = e, i = t.attributes.find((e) => G(e) === n);
|
|
565
|
+
i ? i.value = r : t.attributes.push({
|
|
566
|
+
namespaceURI: null,
|
|
567
|
+
prefix: null,
|
|
568
|
+
localName: n,
|
|
569
|
+
value: r
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function B(e) {
|
|
573
|
+
let { element: t, namespaceURI: n, qualifiedName: r, value: i } = e, { prefix: a, localName: o } = Ze(r), s = K({
|
|
574
|
+
element: t,
|
|
575
|
+
namespaceURI: n,
|
|
576
|
+
localName: o
|
|
577
|
+
});
|
|
578
|
+
s ? s.value = i : t.attributes.push({
|
|
579
|
+
namespaceURI: n,
|
|
580
|
+
prefix: a,
|
|
581
|
+
localName: o,
|
|
582
|
+
value: i
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function He(e) {
|
|
586
|
+
let { element: t, qualifiedName: n } = e;
|
|
587
|
+
return t.attributes.some((e) => G(e) === n);
|
|
588
|
+
}
|
|
589
|
+
function Ue(e) {
|
|
590
|
+
return K(e)?.value ?? null;
|
|
591
|
+
}
|
|
592
|
+
function We(e) {
|
|
593
|
+
return K(e) !== void 0;
|
|
594
|
+
}
|
|
595
|
+
function V(e) {
|
|
596
|
+
let { prefix: t } = e;
|
|
597
|
+
for (let n = e.element; n; n = n.parent) {
|
|
598
|
+
if (n.namespaceURI !== null && n.prefix === t) return n.namespaceURI;
|
|
599
|
+
let e = n.attributes.find((e) => Qe({
|
|
600
|
+
attribute: e,
|
|
601
|
+
prefix: t
|
|
602
|
+
}));
|
|
603
|
+
if (e) return e.value || null;
|
|
604
|
+
}
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
function Ge(e) {
|
|
608
|
+
let { namespaceURI: t } = e;
|
|
609
|
+
if (!t) return null;
|
|
610
|
+
for (let n = e.element; n; n = n.parent) {
|
|
611
|
+
if (n.namespaceURI === t && n.prefix !== null) return n.prefix;
|
|
612
|
+
let e = n.attributes.find((e) => e.namespaceURI === "http://www.w3.org/2000/xmlns/" && e.prefix === "xmlns" && e.value === t);
|
|
613
|
+
if (e) return e.localName;
|
|
614
|
+
}
|
|
615
|
+
return null;
|
|
616
|
+
}
|
|
617
|
+
function H(e) {
|
|
618
|
+
let { element: t, prefixes: n } = e, r, i = e.scope, a;
|
|
619
|
+
for (let e of t.attributes) {
|
|
620
|
+
let t = $e(e);
|
|
621
|
+
t !== void 0 && q({
|
|
622
|
+
parent: i,
|
|
623
|
+
own: a,
|
|
624
|
+
prefix: t
|
|
625
|
+
}) !== e.value && (a ??= /* @__PURE__ */ new Map(), a.set(t, e.value));
|
|
626
|
+
}
|
|
627
|
+
let o = `<${G(t)}`, s = t.prefix ?? "", c = t.namespaceURI ?? "", l = q({
|
|
628
|
+
parent: i,
|
|
629
|
+
own: a,
|
|
630
|
+
prefix: ""
|
|
631
|
+
});
|
|
632
|
+
(t.namespaceURI !== null || l) && (q({
|
|
633
|
+
parent: i,
|
|
634
|
+
own: a,
|
|
635
|
+
prefix: s
|
|
636
|
+
}) ?? "") !== c && (o += s ? ` xmlns:${s}="${U(c)}"` : ` xmlns="${U(c)}"`, a ??= /* @__PURE__ */ new Map(), a.set(s, c));
|
|
637
|
+
for (let e of t.attributes) {
|
|
638
|
+
let { namespaceURI: t } = e;
|
|
639
|
+
if (t === null || t === "http://www.w3.org/2000/xmlns/" || t === "http://www.w3.org/XML/1998/namespace" || e.prefix === null) {
|
|
640
|
+
o += ` ${G(e)}="${U(e.value)}"`;
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
let { prefix: s, declare: c } = Ke({
|
|
644
|
+
attribute: e,
|
|
645
|
+
parent: i,
|
|
646
|
+
own: a,
|
|
647
|
+
prefixes: n
|
|
648
|
+
});
|
|
649
|
+
c && (o += ` xmlns:${s}="${U(t)}"`, a ??= /* @__PURE__ */ new Map(), a.set(s, t), r ??= /* @__PURE__ */ new Set(), r.add(s)), o += ` ${s}:${e.localName}="${U(e.value)}"`;
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
text: o,
|
|
653
|
+
scope: a ? {
|
|
654
|
+
bindings: a,
|
|
655
|
+
parent: i
|
|
656
|
+
} : i,
|
|
657
|
+
generated: r ?? Be
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
function Ke(e) {
|
|
661
|
+
let { attribute: t, parent: n, own: r, prefixes: i } = e, a = t.namespaceURI, o = t.prefix, s = q({
|
|
662
|
+
parent: n,
|
|
663
|
+
own: r,
|
|
664
|
+
prefix: o
|
|
665
|
+
});
|
|
666
|
+
if (s === a) return {
|
|
667
|
+
prefix: o,
|
|
668
|
+
declare: !1
|
|
669
|
+
};
|
|
670
|
+
let c = qe({
|
|
671
|
+
parent: n,
|
|
672
|
+
own: r,
|
|
673
|
+
namespaceURI: a
|
|
674
|
+
});
|
|
675
|
+
if (c !== void 0) return {
|
|
676
|
+
prefix: c,
|
|
677
|
+
declare: !1
|
|
678
|
+
};
|
|
679
|
+
if (s === void 0) return {
|
|
680
|
+
prefix: o,
|
|
681
|
+
declare: !0
|
|
682
|
+
};
|
|
683
|
+
for (;;) {
|
|
684
|
+
let e = `ns${i.next}`;
|
|
685
|
+
if (i.next++, q({
|
|
686
|
+
parent: n,
|
|
687
|
+
own: r,
|
|
688
|
+
prefix: e
|
|
689
|
+
}) === void 0) return {
|
|
690
|
+
prefix: e,
|
|
691
|
+
declare: !0
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function qe(e) {
|
|
696
|
+
let { parent: t, own: n, namespaceURI: r } = e, i = /* @__PURE__ */ new Set(), a = [n, ...Je(t)];
|
|
697
|
+
for (let e of a) if (e) {
|
|
698
|
+
for (let [t, n] of [...e].reverse()) if (!i.has(t) && (i.add(t), t && n === r)) return t;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function Je(e) {
|
|
702
|
+
let t = [];
|
|
703
|
+
for (let n = e; n; n = n.parent) t.push(n.bindings);
|
|
704
|
+
return t;
|
|
705
|
+
}
|
|
706
|
+
function U(e) {
|
|
707
|
+
return Me.test(e) ? e.replace(Ne, W) : e;
|
|
708
|
+
}
|
|
709
|
+
function Ye(e) {
|
|
710
|
+
return Ie.test(e) ? e.replace(Le, W) : e;
|
|
711
|
+
}
|
|
712
|
+
function Xe(e) {
|
|
713
|
+
return Pe.test(e) ? e.replace(Fe, W) : e;
|
|
714
|
+
}
|
|
715
|
+
function W(e) {
|
|
716
|
+
return Re[e];
|
|
717
|
+
}
|
|
718
|
+
function Ze(e) {
|
|
719
|
+
let t = e.indexOf(":");
|
|
720
|
+
return t === -1 ? {
|
|
721
|
+
prefix: null,
|
|
722
|
+
localName: e
|
|
723
|
+
} : {
|
|
724
|
+
prefix: e.slice(0, t),
|
|
725
|
+
localName: e.slice(t + 1)
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
function G(e) {
|
|
729
|
+
return e.prefix ? `${e.prefix}:${e.localName}` : e.localName;
|
|
730
|
+
}
|
|
731
|
+
function K(e) {
|
|
732
|
+
let { element: t, namespaceURI: n, localName: r } = e;
|
|
733
|
+
return t.attributes.find((e) => e.namespaceURI === n && e.localName === r);
|
|
734
|
+
}
|
|
735
|
+
function Qe(e) {
|
|
736
|
+
let { attribute: t, prefix: n } = e;
|
|
737
|
+
return t.namespaceURI === "http://www.w3.org/2000/xmlns/" ? n === null ? t.prefix === null && t.localName === "xmlns" : t.prefix === "xmlns" && t.localName === n : !1;
|
|
738
|
+
}
|
|
739
|
+
function $e(e) {
|
|
740
|
+
if (e.namespaceURI === "http://www.w3.org/2000/xmlns/") return e.prefix === "xmlns" ? e.localName : "";
|
|
741
|
+
if (e.namespaceURI === null && e.localName === "xmlns") return "";
|
|
742
|
+
}
|
|
743
|
+
function et(e) {
|
|
744
|
+
let { prefix: t } = e;
|
|
745
|
+
for (let n = e.scope; n; n = n.parent) {
|
|
746
|
+
let e = n.bindings.get(t);
|
|
747
|
+
if (e !== void 0) return e;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function q(e) {
|
|
751
|
+
let { parent: t, own: n, prefix: r } = e;
|
|
752
|
+
return n?.get(r) ?? et({
|
|
753
|
+
scope: t,
|
|
754
|
+
prefix: r
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
// src/xml/build/record-element.ts
|
|
758
|
+
function tt(e) {
|
|
759
|
+
let { context: t, record: n, parent: r } = e;
|
|
760
|
+
return r === void 0 ? nt({
|
|
761
|
+
context: t,
|
|
762
|
+
record: n
|
|
763
|
+
}) : rt({
|
|
764
|
+
context: t,
|
|
765
|
+
record: n,
|
|
766
|
+
parent: r
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
function nt(e) {
|
|
770
|
+
let { context: t, record: n } = e, { config: r, declareNamespaces: i, withDatabaseIds: a } = t, o = it({
|
|
771
|
+
context: t,
|
|
772
|
+
record: n,
|
|
773
|
+
parent: void 0
|
|
774
|
+
});
|
|
775
|
+
return t.rootElement = o, i && z({
|
|
776
|
+
element: o,
|
|
777
|
+
qualifiedName: "xmlns",
|
|
778
|
+
value: n.namespace.uri
|
|
779
|
+
}), at({
|
|
780
|
+
context: t,
|
|
781
|
+
element: o,
|
|
782
|
+
attributes: n.attributes,
|
|
783
|
+
isRoot: !0
|
|
784
|
+
}), t.documentRoot && st({
|
|
785
|
+
config: r,
|
|
786
|
+
element: o,
|
|
787
|
+
namespace: n.namespace,
|
|
788
|
+
rootRecord: t.documentRoot
|
|
789
|
+
}), a && z({
|
|
790
|
+
element: o,
|
|
791
|
+
qualifiedName: R,
|
|
792
|
+
value: n.id
|
|
793
|
+
}), i && ct({
|
|
794
|
+
context: t,
|
|
795
|
+
element: o,
|
|
796
|
+
record: n
|
|
797
|
+
}), o;
|
|
798
|
+
}
|
|
799
|
+
function rt(e) {
|
|
800
|
+
let { context: t, record: n, parent: r } = e, { config: i, declareNamespaces: a, withDatabaseIds: o } = t, s = n.namespace.uri === i.namespaces.default.uri, c = it({
|
|
801
|
+
context: t,
|
|
802
|
+
record: n,
|
|
803
|
+
parent: r
|
|
804
|
+
});
|
|
805
|
+
return a && !s && n.namespace.prefix && n.namespace.prefix !== "xmlns" && J({
|
|
806
|
+
context: t,
|
|
807
|
+
namespace: n.namespace
|
|
808
|
+
}), at({
|
|
809
|
+
context: t,
|
|
810
|
+
element: c,
|
|
811
|
+
attributes: n.attributes,
|
|
812
|
+
isRoot: !1
|
|
813
|
+
}), a && ot({
|
|
814
|
+
context: t,
|
|
815
|
+
element: c,
|
|
816
|
+
record: n
|
|
817
|
+
}), o && z({
|
|
818
|
+
element: c,
|
|
819
|
+
qualifiedName: R,
|
|
820
|
+
value: n.id
|
|
821
|
+
}), a && ct({
|
|
822
|
+
context: t,
|
|
823
|
+
element: c,
|
|
824
|
+
record: n
|
|
825
|
+
}), c;
|
|
826
|
+
}
|
|
827
|
+
function it(e) {
|
|
828
|
+
let { context: t, record: n, parent: r } = e, i = n.namespace.uri !== t.config.namespaces.default.uri && n.namespace.prefix && n.namespace.prefix !== "xmlns" ? `${n.namespace.prefix}:${n.tagName}` : n.tagName;
|
|
829
|
+
return Ve({
|
|
830
|
+
namespaceURI: t.declareNamespaces ? n.namespace.uri : null,
|
|
831
|
+
qualifiedName: i,
|
|
832
|
+
parent: r
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
function at(e) {
|
|
836
|
+
let { context: t, element: n, attributes: r, isRoot: i } = e;
|
|
837
|
+
for (let e of r) {
|
|
838
|
+
if (dt(e)) continue;
|
|
839
|
+
let r = String(e.value);
|
|
840
|
+
if (!ut(e) || !e.namespace.prefix) {
|
|
841
|
+
z({
|
|
842
|
+
element: n,
|
|
843
|
+
qualifiedName: e.name,
|
|
844
|
+
value: r
|
|
845
|
+
});
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
let a = `${e.namespace.prefix}:${d(e.name)}`;
|
|
849
|
+
t.declareNamespaces ? (i || J({
|
|
850
|
+
context: t,
|
|
851
|
+
namespace: e.namespace
|
|
852
|
+
}), B({
|
|
853
|
+
element: n,
|
|
854
|
+
namespaceURI: e.namespace.uri,
|
|
855
|
+
qualifiedName: a,
|
|
856
|
+
value: r
|
|
857
|
+
})) : z({
|
|
858
|
+
element: n,
|
|
859
|
+
qualifiedName: a,
|
|
860
|
+
value: r
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
function ot(e) {
|
|
865
|
+
let { context: t, element: n, record: r } = e, { config: i } = t, o = u({
|
|
866
|
+
dialecteConfig: i,
|
|
867
|
+
record: r
|
|
868
|
+
})?.attributes.details;
|
|
869
|
+
if (o) for (let [e, s] of Object.entries(o)) {
|
|
870
|
+
let o = a({
|
|
871
|
+
dialecteConfig: i,
|
|
872
|
+
record: r,
|
|
873
|
+
attributeName: e,
|
|
874
|
+
defaults: "required"
|
|
875
|
+
});
|
|
876
|
+
if (o === void 0) continue;
|
|
877
|
+
let c = d(e);
|
|
878
|
+
(s.namespace ? We({
|
|
879
|
+
element: n,
|
|
880
|
+
namespaceURI: s.namespace.uri,
|
|
881
|
+
localName: c
|
|
882
|
+
}) : He({
|
|
883
|
+
element: n,
|
|
884
|
+
qualifiedName: c
|
|
885
|
+
})) || (s.namespace && s.namespace.prefix && s.namespace.prefix !== "xmlns" ? (J({
|
|
886
|
+
context: t,
|
|
887
|
+
namespace: s.namespace
|
|
888
|
+
}), B({
|
|
889
|
+
element: n,
|
|
890
|
+
namespaceURI: s.namespace.uri,
|
|
891
|
+
qualifiedName: `${s.namespace.prefix}:${c}`,
|
|
892
|
+
value: o
|
|
893
|
+
})) : z({
|
|
894
|
+
element: n,
|
|
895
|
+
qualifiedName: c,
|
|
896
|
+
value: o
|
|
897
|
+
}));
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
function J(e) {
|
|
901
|
+
let { context: t, namespace: r } = e, i = t.rootElement;
|
|
902
|
+
i && r.prefix && r.prefix !== "xmlns" && Ue({
|
|
903
|
+
element: i,
|
|
904
|
+
namespaceURI: "http://www.w3.org/2000/xmlns/",
|
|
905
|
+
localName: r.prefix
|
|
906
|
+
}) === null && (B({
|
|
907
|
+
element: i,
|
|
908
|
+
namespaceURI: n,
|
|
909
|
+
qualifiedName: `xmlns:${r.prefix}`,
|
|
910
|
+
value: r.uri
|
|
911
|
+
}), t.documentRoot && st({
|
|
912
|
+
config: t.config,
|
|
913
|
+
element: i,
|
|
914
|
+
namespace: r,
|
|
915
|
+
rootRecord: t.documentRoot
|
|
916
|
+
}));
|
|
917
|
+
}
|
|
918
|
+
function st(e) {
|
|
919
|
+
let { config: t, element: n, namespace: r, rootRecord: i } = e, o = u({
|
|
920
|
+
dialecteConfig: t,
|
|
921
|
+
record: i
|
|
922
|
+
})?.attributes.details ?? {}, s = r.uri === t.namespaces.default.uri;
|
|
923
|
+
for (let [e, c] of Object.entries(o)) {
|
|
924
|
+
let o = a({
|
|
925
|
+
dialecteConfig: t,
|
|
926
|
+
record: i,
|
|
927
|
+
attributeName: e,
|
|
928
|
+
defaults: "required"
|
|
929
|
+
});
|
|
930
|
+
if (o === void 0 || !(s ? !c.namespace : c.namespace?.prefix === r.prefix && c.namespace?.uri === r.uri)) continue;
|
|
931
|
+
let l = d(e);
|
|
932
|
+
(c.namespace ? We({
|
|
933
|
+
element: n,
|
|
934
|
+
namespaceURI: c.namespace.uri,
|
|
935
|
+
localName: l
|
|
936
|
+
}) : He({
|
|
937
|
+
element: n,
|
|
938
|
+
qualifiedName: l
|
|
939
|
+
})) || (c.namespace ? B({
|
|
940
|
+
element: n,
|
|
941
|
+
namespaceURI: c.namespace.uri,
|
|
942
|
+
qualifiedName: `${c.namespace.prefix}:${l}`,
|
|
943
|
+
value: o
|
|
944
|
+
}) : z({
|
|
945
|
+
element: n,
|
|
946
|
+
qualifiedName: l,
|
|
947
|
+
value: o
|
|
948
|
+
}));
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
function ct(t) {
|
|
952
|
+
let { context: a, element: o, record: s } = t, { config: c } = a, l = Ue({
|
|
953
|
+
element: o,
|
|
954
|
+
namespaceURI: i.uri,
|
|
955
|
+
localName: "type"
|
|
956
|
+
});
|
|
957
|
+
if (l === null) return;
|
|
958
|
+
let u = e({
|
|
959
|
+
value: l,
|
|
960
|
+
namespaceOf: r({
|
|
961
|
+
dialecteConfig: c,
|
|
962
|
+
attributes: s.attributes
|
|
963
|
+
})
|
|
964
|
+
});
|
|
965
|
+
if (u === void 0 || u.namespace === "") return;
|
|
966
|
+
let d = l.indexOf(":"), f = d === -1 ? "" : l.slice(0, d), p = Object.values(c.namespaces).some((e) => e.prefix === f && e.uri === u.namespace);
|
|
967
|
+
if (f && p && J({
|
|
968
|
+
context: a,
|
|
969
|
+
namespace: {
|
|
970
|
+
prefix: f,
|
|
971
|
+
uri: u.namespace
|
|
972
|
+
}
|
|
973
|
+
}), V({
|
|
974
|
+
element: o,
|
|
975
|
+
prefix: f || null
|
|
976
|
+
}) === u.namespace) return;
|
|
977
|
+
let m = Ge({
|
|
978
|
+
element: o,
|
|
979
|
+
namespaceURI: u.namespace
|
|
980
|
+
}), h = m !== null && V({
|
|
981
|
+
element: o,
|
|
982
|
+
prefix: m
|
|
983
|
+
}) === u.namespace ? m : null, g = h ?? lt({ element: o });
|
|
984
|
+
h === null && B({
|
|
985
|
+
element: o,
|
|
986
|
+
namespaceURI: n,
|
|
987
|
+
qualifiedName: `xmlns:${g}`,
|
|
988
|
+
value: u.namespace
|
|
989
|
+
});
|
|
990
|
+
let _ = Ge({
|
|
991
|
+
element: o,
|
|
992
|
+
namespaceURI: i.uri
|
|
993
|
+
}) ?? "xsi";
|
|
994
|
+
B({
|
|
995
|
+
element: o,
|
|
996
|
+
namespaceURI: i.uri,
|
|
997
|
+
qualifiedName: `${_}:type`,
|
|
998
|
+
value: `${g}:${u.local}`
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
function lt(e) {
|
|
1002
|
+
let { element: t } = e;
|
|
1003
|
+
for (let e = 1;; e++) {
|
|
1004
|
+
let n = `ns${e}`;
|
|
1005
|
+
if (V({
|
|
1006
|
+
element: t,
|
|
1007
|
+
prefix: n
|
|
1008
|
+
}) === null) return n;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
function ut(e) {
|
|
1012
|
+
return !!e.namespace;
|
|
1013
|
+
}
|
|
1014
|
+
function dt(e) {
|
|
1015
|
+
return e.name === "xmlns" || e.name.startsWith("xmlns:") ? !0 : e.namespace?.prefix === "xmlns";
|
|
1016
|
+
}
|
|
1017
|
+
// src/utils/xml-characters.ts
|
|
1018
|
+
function ft(e) {
|
|
1019
|
+
let t = l.exec(e.text);
|
|
1020
|
+
if (t) return `U+${t[0].charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}`;
|
|
1021
|
+
}
|
|
1022
|
+
// src/helpers/assert-xml-characters.ts
|
|
1023
|
+
function pt(e) {
|
|
1024
|
+
let { record: t, withId: n = !1 } = e, r = mt({ record: t }) ?? ht({
|
|
1025
|
+
record: t,
|
|
1026
|
+
withId: n
|
|
1027
|
+
});
|
|
1028
|
+
if (!r) return;
|
|
1029
|
+
let { character: i, attribute: a, part: s } = r, c = t.tagName ? `<${t.tagName}> '${t.id}'` : `the record '${t.id}'`;
|
|
1030
|
+
o("XML_CHARACTER_NOT_ALLOWED", {
|
|
1031
|
+
detail: `${gt({
|
|
1032
|
+
place: r,
|
|
1033
|
+
element: c
|
|
1034
|
+
})} holds ${i}, a character XML does not allow.`,
|
|
1035
|
+
...t.tagName && { ref: {
|
|
1036
|
+
tagName: t.tagName,
|
|
1037
|
+
id: t.id
|
|
1038
|
+
} },
|
|
1039
|
+
meta: {
|
|
1040
|
+
recordId: t.id,
|
|
1041
|
+
...t.tagName && { tagName: t.tagName },
|
|
1042
|
+
...a && { attribute: a },
|
|
1043
|
+
part: s,
|
|
1044
|
+
character: i
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function mt(e) {
|
|
1049
|
+
let { record: t } = e, n = t.value === void 0 ? void 0 : Y({
|
|
1050
|
+
text: t.value,
|
|
1051
|
+
part: "value"
|
|
1052
|
+
});
|
|
1053
|
+
if (n) return n;
|
|
1054
|
+
let r = t.namespace && Y({
|
|
1055
|
+
text: t.namespace.uri,
|
|
1056
|
+
part: "namespace"
|
|
1057
|
+
});
|
|
1058
|
+
if (r) return r;
|
|
1059
|
+
for (let e of t.attributes ?? []) {
|
|
1060
|
+
let t = Y({
|
|
1061
|
+
text: e.value,
|
|
1062
|
+
part: "value",
|
|
1063
|
+
attribute: e.name
|
|
1064
|
+
}) ?? (e.namespace && Y({
|
|
1065
|
+
text: e.namespace.uri,
|
|
1066
|
+
part: "namespace",
|
|
1067
|
+
attribute: e.name
|
|
1068
|
+
}));
|
|
1069
|
+
if (t) return t;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
function ht(e) {
|
|
1073
|
+
let { record: t, withId: n } = e, r = t.tagName === void 0 ? void 0 : Y({
|
|
1074
|
+
text: t.tagName,
|
|
1075
|
+
part: "name"
|
|
1076
|
+
});
|
|
1077
|
+
if (r) return r;
|
|
1078
|
+
let i = t.namespace && Y({
|
|
1079
|
+
text: t.namespace.prefix,
|
|
1080
|
+
part: "prefix"
|
|
1081
|
+
});
|
|
1082
|
+
if (i) return i;
|
|
1083
|
+
for (let e of t.attributes ?? []) {
|
|
1084
|
+
let t = e.namespace && Y({
|
|
1085
|
+
text: e.namespace.prefix,
|
|
1086
|
+
part: "prefix",
|
|
1087
|
+
attribute: e.name
|
|
1088
|
+
}) || Y({
|
|
1089
|
+
text: e.name,
|
|
1090
|
+
part: "name",
|
|
1091
|
+
attribute: e.name
|
|
1092
|
+
});
|
|
1093
|
+
if (t) return t;
|
|
1094
|
+
}
|
|
1095
|
+
return n ? Y({
|
|
1096
|
+
text: t.id,
|
|
1097
|
+
part: "id"
|
|
1098
|
+
}) : void 0;
|
|
1099
|
+
}
|
|
1100
|
+
function gt(e) {
|
|
1101
|
+
let { place: t, element: n } = e, { part: r, attribute: i } = t;
|
|
1102
|
+
return i ? r === "value" ? `The attribute ${i} of ${n}` : r === "name" ? `The name of the attribute ${i} of ${n}` : `The ${r === "prefix" ? "namespace prefix" : "namespace URI"} of the attribute ${i} of ${n}` : r === "name" ? `The tag name of ${n}` : r === "prefix" ? `The namespace prefix of ${n}` : r === "namespace" ? `The namespace URI of ${n}` : r === "id" ? `The id of ${n}` : `The value of ${n}`;
|
|
1103
|
+
}
|
|
1104
|
+
function Y(e) {
|
|
1105
|
+
let { text: t, part: n, attribute: r } = e, i = ft({ text: t });
|
|
1106
|
+
if (i) return {
|
|
1107
|
+
character: i,
|
|
1108
|
+
part: n,
|
|
1109
|
+
...r !== void 0 && { attribute: r }
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
// src/xml/build/xml-writer.ts
|
|
1113
|
+
var _t = class {
|
|
1114
|
+
constructor(e) {
|
|
1115
|
+
this.openElements = [], this.body = [], this.rootBindings = /* @__PURE__ */ new Map(), this.rootScope = {
|
|
1116
|
+
bindings: this.rootBindings,
|
|
1117
|
+
parent: void 0
|
|
1118
|
+
}, this.rootAttributeCount = -1, this.prefixes = { next: 1 }, this.newLines = [];
|
|
1119
|
+
let { config: t, documentRoot: n, declareNamespaces: r = !0, withDatabaseIds: i = !1 } = e;
|
|
1120
|
+
this.context = {
|
|
1121
|
+
config: t,
|
|
1122
|
+
declareNamespaces: r,
|
|
1123
|
+
withDatabaseIds: i,
|
|
1124
|
+
documentRoot: n,
|
|
1125
|
+
rootElement: void 0
|
|
1126
|
+
}, this.indent = e.indent ?? !0, this.includeXmlDeclaration = e.includeXmlDeclaration ?? !0;
|
|
1127
|
+
}
|
|
1128
|
+
openElement(e) {
|
|
1129
|
+
let { record: n } = e;
|
|
1130
|
+
pt({
|
|
1131
|
+
record: n,
|
|
1132
|
+
withId: this.context.withDatabaseIds
|
|
1133
|
+
});
|
|
1134
|
+
let r = this.openElements.at(-1), i = tt({
|
|
1135
|
+
context: this.context,
|
|
1136
|
+
record: n,
|
|
1137
|
+
parent: r?.element
|
|
1138
|
+
}), a = n.value ? t({ text: n.value }) : "", o = n.children.length > 0, s = r ? r.level + 1 : 0, c = r ? r.inline || r.insideInline : !1, l = {
|
|
1139
|
+
element: i,
|
|
1140
|
+
qualifiedName: G(i),
|
|
1141
|
+
level: s,
|
|
1142
|
+
scope: this.rootScope,
|
|
1143
|
+
empty: !a && !o,
|
|
1144
|
+
inline: !this.indent || c || vt({
|
|
1145
|
+
element: i,
|
|
1146
|
+
text: a,
|
|
1147
|
+
hasChildren: o
|
|
1148
|
+
}),
|
|
1149
|
+
insideInline: c
|
|
1150
|
+
};
|
|
1151
|
+
if (r) {
|
|
1152
|
+
this.refreshRootScope();
|
|
1153
|
+
let { text: e, scope: t } = H({
|
|
1154
|
+
element: i,
|
|
1155
|
+
scope: r.scope,
|
|
1156
|
+
prefixes: this.prefixes
|
|
1157
|
+
});
|
|
1158
|
+
l.scope = t, c || this.newLine({ level: s }), this.body.push(e, l.empty ? "/>" : ">");
|
|
1159
|
+
} else this.root = l;
|
|
1160
|
+
this.openElements.push(l), a && this.writeText({
|
|
1161
|
+
text: a,
|
|
1162
|
+
owner: l
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
closeElement() {
|
|
1166
|
+
let e = this.openElements.pop();
|
|
1167
|
+
e && !e.empty && (e.inline || this.newLine({ level: e.level }), this.body.push(`</${e.qualifiedName}>`));
|
|
1168
|
+
}
|
|
1169
|
+
take() {
|
|
1170
|
+
let e = this.body.join("");
|
|
1171
|
+
return this.body = [], e;
|
|
1172
|
+
}
|
|
1173
|
+
head() {
|
|
1174
|
+
let e = this.root;
|
|
1175
|
+
if (!e) return "";
|
|
1176
|
+
let { text: t } = H({
|
|
1177
|
+
element: e.element,
|
|
1178
|
+
scope: ze,
|
|
1179
|
+
prefixes: { next: 1 }
|
|
1180
|
+
});
|
|
1181
|
+
return (this.includeXmlDeclaration ? Ae + (this.indent ? "\r\n" : "") : "") + t + (e.empty ? "/>" : ">");
|
|
1182
|
+
}
|
|
1183
|
+
refreshRootScope() {
|
|
1184
|
+
let e = this.root;
|
|
1185
|
+
if (!e) return;
|
|
1186
|
+
let t = e.element.attributes.length;
|
|
1187
|
+
if (t === this.rootAttributeCount) return;
|
|
1188
|
+
this.rootAttributeCount = t;
|
|
1189
|
+
let { scope: n, generated: r } = H({
|
|
1190
|
+
element: e.element,
|
|
1191
|
+
scope: ze,
|
|
1192
|
+
prefixes: { next: 1 }
|
|
1193
|
+
});
|
|
1194
|
+
this.rootBindings.clear();
|
|
1195
|
+
for (let [e, t] of n.bindings) r.has(e) || this.rootBindings.set(e, t);
|
|
1196
|
+
}
|
|
1197
|
+
writeText(e) {
|
|
1198
|
+
let { text: t, owner: n } = e;
|
|
1199
|
+
if (!this.indent) {
|
|
1200
|
+
this.body.push(Ye(t));
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
let r = Xe(t);
|
|
1204
|
+
n.inline || this.newLine({ level: n.level + 1 }), this.body.push(bt(r));
|
|
1205
|
+
}
|
|
1206
|
+
newLine(e) {
|
|
1207
|
+
if (!this.indent) return;
|
|
1208
|
+
let { level: t } = e;
|
|
1209
|
+
this.newLines[t] ??= "\r\n" + je.repeat(t), this.body.push(this.newLines[t]);
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
function vt(e) {
|
|
1213
|
+
let { element: t, text: n, hasChildren: r } = e;
|
|
1214
|
+
return yt(t) ? !0 : n ? !r || !n.includes("\n") : !1;
|
|
1215
|
+
}
|
|
1216
|
+
function yt(e) {
|
|
1217
|
+
return e.attributes.some((e) => e.value === "preserve" && (e.namespaceURI === "http://www.w3.org/XML/1998/namespace" && e.localName === "space" || e.namespaceURI === null && e.localName === "xml:space"));
|
|
1218
|
+
}
|
|
1219
|
+
function bt(e) {
|
|
1220
|
+
return e.includes("\n") ? e.replace(/\r\n/g, "\n").replace(/\n/g, "\r\n") : e;
|
|
1221
|
+
}
|
|
1222
|
+
// src/project/io/run-export.ts
|
|
1223
|
+
async function xt(e, t = {}) {
|
|
1224
|
+
let { source: n, runtime: r, documentId: i } = e, a = I({
|
|
1225
|
+
enabled: r.perf ?? !1,
|
|
1226
|
+
timeline: !1
|
|
1227
|
+
});
|
|
1228
|
+
$({
|
|
1229
|
+
signal: t.signal,
|
|
1230
|
+
documentId: i
|
|
1231
|
+
});
|
|
1232
|
+
let s = await Ct({
|
|
1233
|
+
source: n,
|
|
1234
|
+
documentId: i
|
|
1235
|
+
}), { config: c } = L({
|
|
1236
|
+
configs: r.configs,
|
|
1237
|
+
defaultConfigKey: r.defaultConfigKey,
|
|
1238
|
+
configKey: s.configKey
|
|
1239
|
+
}), l = St({ options: e.options });
|
|
1240
|
+
a.start("export");
|
|
1241
|
+
let u;
|
|
1242
|
+
try {
|
|
1243
|
+
let n = await wt({
|
|
1244
|
+
...e,
|
|
1245
|
+
config: c,
|
|
1246
|
+
control: t,
|
|
1247
|
+
perf: a,
|
|
1248
|
+
batchSize: l
|
|
1249
|
+
});
|
|
1250
|
+
u = n.status === "moved" ? await wt({
|
|
1251
|
+
...e,
|
|
1252
|
+
config: c,
|
|
1253
|
+
control: t,
|
|
1254
|
+
perf: a,
|
|
1255
|
+
batchSize: l
|
|
1256
|
+
}) : n;
|
|
1257
|
+
} finally {
|
|
1258
|
+
a.stop("export");
|
|
1259
|
+
}
|
|
1260
|
+
return u.status === "moved" && o("EXPORT_CONFLICT", {
|
|
1261
|
+
detail: `Document "${s.name}" changed twice while it was exported: export it again`,
|
|
1262
|
+
meta: { documentId: i }
|
|
1263
|
+
}), {
|
|
1264
|
+
file: u.file,
|
|
1265
|
+
filename: `${s.name}${s.extension}`,
|
|
1266
|
+
...r.perf && { perf: a.snapshot() }
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
function St(e) {
|
|
1270
|
+
let t = e.options?.batchSize ?? 2e3;
|
|
1271
|
+
return (!Number.isInteger(t) || t < 1) && o("ASSERTION_FAILED", { detail: `An export batch size is a whole number from 1, not ${t}` }), t;
|
|
1272
|
+
}
|
|
1273
|
+
async function Ct(e) {
|
|
1274
|
+
let { source: t, documentId: n } = e, r = await t.getDocument(n);
|
|
1275
|
+
return r && r.status === "ready" || Q({ documentId: n }), r;
|
|
1276
|
+
}
|
|
1277
|
+
async function wt(e) {
|
|
1278
|
+
let { source: t, documentId: n, options: r, config: i, control: a, perf: s, batchSize: c } = e, l = await t.getExportVersion({ documentId: n });
|
|
1279
|
+
l === void 0 && Q({ documentId: n });
|
|
1280
|
+
let u = await t.count(n), d = await Et({
|
|
1281
|
+
source: t,
|
|
1282
|
+
documentId: n,
|
|
1283
|
+
config: i
|
|
1284
|
+
});
|
|
1285
|
+
if (!d) {
|
|
1286
|
+
if (await Z({
|
|
1287
|
+
source: t,
|
|
1288
|
+
documentId: n,
|
|
1289
|
+
version: l
|
|
1290
|
+
})) return { status: "moved" };
|
|
1291
|
+
o("EXPORT_ROOT_NOT_FOUND", { detail: `No ${i.rootElementName} root element found in document "${n}"` });
|
|
1292
|
+
}
|
|
1293
|
+
let f = {
|
|
1294
|
+
source: t,
|
|
1295
|
+
documentId: n,
|
|
1296
|
+
version: l,
|
|
1297
|
+
totalRecords: u,
|
|
1298
|
+
control: a,
|
|
1299
|
+
perf: s,
|
|
1300
|
+
writer: new _t({
|
|
1301
|
+
config: i,
|
|
1302
|
+
documentRoot: d,
|
|
1303
|
+
indent: r?.indent,
|
|
1304
|
+
withDatabaseIds: r?.withDatabaseIds
|
|
1305
|
+
}),
|
|
1306
|
+
parts: [],
|
|
1307
|
+
recordsWritten: 0
|
|
1308
|
+
}, p = [Tt({
|
|
1309
|
+
pass: f,
|
|
1310
|
+
record: d,
|
|
1311
|
+
config: i
|
|
1312
|
+
})];
|
|
1313
|
+
if (f.recordsWritten % c === 0 && await X(f)) return { status: "moved" };
|
|
1314
|
+
for (; p.length > 0;) {
|
|
1315
|
+
let e = p.at(-1);
|
|
1316
|
+
if (e.next >= e.childRefs.length) {
|
|
1317
|
+
s.time("export::write", () => f.writer.closeElement()), p.pop();
|
|
1318
|
+
continue;
|
|
1319
|
+
}
|
|
1320
|
+
if (e.next >= e.chunkStart + e.chunk.length) {
|
|
1321
|
+
let r = e.childRefs.slice(e.next, e.next + c).map(Ot);
|
|
1322
|
+
s.start("export::read");
|
|
1323
|
+
try {
|
|
1324
|
+
e.chunk = await t.getMany(r, n);
|
|
1325
|
+
} finally {
|
|
1326
|
+
s.stop("export::read");
|
|
1327
|
+
}
|
|
1328
|
+
e.chunkStart = e.next;
|
|
1329
|
+
}
|
|
1330
|
+
let r = e.childRefs[e.next], a = e.chunk[e.next - e.chunkStart];
|
|
1331
|
+
if (e.next++, !a) {
|
|
1332
|
+
if (await Z(f)) return { status: "moved" };
|
|
1333
|
+
o("EXPORT_ORPHAN_CHILD_REF", {
|
|
1334
|
+
detail: `Parent '${e.record.tagName}' references non-existent child '${r.tagName}' (id: ${r.id})`,
|
|
1335
|
+
ref: {
|
|
1336
|
+
tagName: e.record.tagName,
|
|
1337
|
+
id: e.record.id
|
|
1338
|
+
}
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
if (p.push(Tt({
|
|
1342
|
+
pass: f,
|
|
1343
|
+
record: a,
|
|
1344
|
+
config: i
|
|
1345
|
+
})), f.recordsWritten % c === 0 && await X(f)) return { status: "moved" };
|
|
1346
|
+
}
|
|
1347
|
+
if (Dt(f), f.recordsWritten % c !== 0 && await X(f)) return { status: "moved" };
|
|
1348
|
+
s.start("export::assemble");
|
|
1349
|
+
try {
|
|
1350
|
+
return {
|
|
1351
|
+
status: "written",
|
|
1352
|
+
file: new Blob([f.writer.head(), ...f.parts], { type: "application/xml" })
|
|
1353
|
+
};
|
|
1354
|
+
} finally {
|
|
1355
|
+
s.stop("export::assemble");
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
function Tt(e) {
|
|
1359
|
+
let { pass: t, record: n, config: r } = e;
|
|
1360
|
+
return t.perf.time("export::write", () => t.writer.openElement({ record: n })), t.recordsWritten++, {
|
|
1361
|
+
record: n,
|
|
1362
|
+
childRefs: s({
|
|
1363
|
+
parentTagName: n.tagName,
|
|
1364
|
+
children: n.children,
|
|
1365
|
+
childrenConfig: r.children,
|
|
1366
|
+
definition: r.definition
|
|
1367
|
+
}),
|
|
1368
|
+
next: 0,
|
|
1369
|
+
chunk: [],
|
|
1370
|
+
chunkStart: 0
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
async function Et(e) {
|
|
1374
|
+
let { source: t, documentId: n, config: r } = e;
|
|
1375
|
+
return (await t.getByTagNameInDocument(r.rootElementName, n)).find((e) => ke({
|
|
1376
|
+
record: e,
|
|
1377
|
+
config: r
|
|
1378
|
+
}));
|
|
1379
|
+
}
|
|
1380
|
+
async function X(e) {
|
|
1381
|
+
let { control: t, documentId: n, recordsWritten: r, totalRecords: i } = e;
|
|
1382
|
+
return Dt(e), j({
|
|
1383
|
+
listener: t.onProgress,
|
|
1384
|
+
value: {
|
|
1385
|
+
recordsWritten: r,
|
|
1386
|
+
totalRecords: i
|
|
1387
|
+
},
|
|
1388
|
+
of: N.exportProgress,
|
|
1389
|
+
call: t
|
|
1390
|
+
}), $({
|
|
1391
|
+
signal: t.signal,
|
|
1392
|
+
documentId: n
|
|
1393
|
+
}), await Oe(), Z(e);
|
|
1394
|
+
}
|
|
1395
|
+
function Dt(e) {
|
|
1396
|
+
let t = e.writer.take();
|
|
1397
|
+
t && e.parts.push(new Blob([t]));
|
|
1398
|
+
}
|
|
1399
|
+
async function Z(e) {
|
|
1400
|
+
let { source: t, documentId: n, version: r } = e, i = await t.getExportVersion({ documentId: n });
|
|
1401
|
+
return i === void 0 && Q({ documentId: n }), i !== r;
|
|
1402
|
+
}
|
|
1403
|
+
function Ot(e) {
|
|
1404
|
+
return e.id;
|
|
1405
|
+
}
|
|
1406
|
+
function Q(e) {
|
|
1407
|
+
let { documentId: t } = e;
|
|
1408
|
+
o("DOCUMENT_NOT_REGISTERED", {
|
|
1409
|
+
detail: `Document "${t}" is not registered, or not ready, in this store`,
|
|
1410
|
+
meta: { documentId: t }
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
function $(e) {
|
|
1414
|
+
let { signal: t, documentId: n } = e;
|
|
1415
|
+
t?.aborted && o("EXPORT_ABORTED", {
|
|
1416
|
+
detail: `The export of document "${n}" was aborted`,
|
|
1417
|
+
meta: { documentId: n }
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
// src/store/engine/engine.constants.ts
|
|
1421
|
+
var kt = "dialecte:engine:", At = {
|
|
1422
|
+
heartbeat: "heartbeat",
|
|
1423
|
+
busy: "busy",
|
|
1424
|
+
progress: "progress",
|
|
1425
|
+
event: "event"
|
|
1426
|
+
};
|
|
1427
|
+
// src/store/engine/project-key.ts
|
|
1428
|
+
function jt(e) {
|
|
1429
|
+
let { dialecteId: t, project: n } = e;
|
|
1430
|
+
return `${encodeURIComponent(t)}/${encodeURIComponent(n)}`;
|
|
1431
|
+
}
|
|
1432
|
+
function Mt(e) {
|
|
1433
|
+
return `${kt}${jt(e)}`;
|
|
1434
|
+
}
|
|
1435
|
+
export { _e as A, ae as B, O as C, fe as D, me as E, oe as F, g as G, v as H, se as I, ee as J, _ as K, ie as L, ve as M, y as N, pe as O, ce as P, re as R, be as S, de as T, h as U, te as V, m as W, N as _, $ as a, Ee as b, gt as c, R as d, ke as f, P as g, I as h, xt as i, he as j, ge as k, mt as l, L as m, jt as n, _t as o, Oe as p, ne as q, At as r, pt as s, Mt as t, ft as u, Te as v, xe as w, ye as x, j as y, p as z };
|