@prisma/orm-family-mongo 8.0.0-rc.20-dev.2 → 8.0.0-rc.20-dev.4
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/{authoring-entity-types-UA5sY_Xm-DeYf_cYq.mjs → authoring-entity-types-BEwwEsFI-J0WF36SE.mjs} +8 -6
- package/dist/authoring-entity-types-BEwwEsFI-J0WF36SE.mjs.map +1 -0
- package/dist/config-types-DYTCUpAs.mjs.map +1 -1
- package/dist/contract-builder-d5cf-u9p.mjs +1832 -0
- package/dist/contract-builder-d5cf-u9p.mjs.map +1 -0
- package/dist/{contract-builder-ClL-xMK2.d.mts → contract-builder-lqaM5w74.d.mts} +489 -94
- package/dist/contract-builder-lqaM5w74.d.mts.map +1 -0
- package/dist/contract-prisma6__provider.mjs +168 -107
- package/dist/contract-prisma6__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +7 -4
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +5 -1
- package/dist/contract-psl__provider.d.mts.map +1 -1
- package/dist/contract-psl__provider.mjs +17 -4
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +2 -2
- package/dist/contract-ts.mjs +2 -2
- package/dist/contract-ts__contract-builder.d.mts +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +3 -3
- package/dist/contract.mjs +1 -1
- package/dist/contract__data-type.d.mts +2 -15
- package/dist/contract__data-type.d.mts.map +1 -1
- package/dist/contract__data-type.mjs +2 -2
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/{control-CvQSMuxa.d.mts → control-B5MQg_2b.d.mts} +5 -5
- package/dist/{control-CvQSMuxa.d.mts.map → control-B5MQg_2b.d.mts.map} +1 -1
- package/dist/{control-B_pPN58L.mjs → control-Bo6DU4E_.mjs} +71 -13
- package/dist/control-Bo6DU4E_.mjs.map +1 -0
- package/dist/{control-4pC8N2Rb.d.mts → control-DS-Fx1NE.d.mts} +3 -3
- package/dist/{control-4pC8N2Rb.d.mts.map → control-DS-Fx1NE.d.mts.map} +1 -1
- package/dist/{control-adapter-Bh_ZraGM--5JDb99k.d.mts → control-adapter-Bh_ZraGM-B4cpVawQ.d.mts} +4 -4
- package/dist/{control-adapter-Bh_ZraGM--5JDb99k.d.mts.map → control-adapter-Bh_ZraGM-B4cpVawQ.d.mts.map} +1 -1
- package/dist/control-adapter-CbqlnOk6.d.mts +1 -0
- package/dist/{dist-B8f-pfcT.mjs → dist-DgMGRQkm.mjs} +7 -7
- package/dist/dist-DgMGRQkm.mjs.map +1 -0
- package/dist/{dist-gmGbjhmk.mjs → dist-DmE6N0B3.mjs} +2 -2
- package/dist/{dist-gmGbjhmk.mjs.map → dist-DmE6N0B3.mjs.map} +1 -1
- package/dist/dist-xk_0xOR-.mjs.map +1 -1
- package/dist/family.d.mts +10 -10
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +2 -2
- package/dist/family__ir.d.mts +2 -2
- package/dist/family__ir.mjs +3 -3
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__migration.mjs +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/family__runtime.mjs +1 -1
- package/dist/family__schema-verify.d.mts +1 -1
- package/dist/family__schema-verify.mjs +1 -1
- package/dist/{field-accessor-CmxCw9xP-C6jMngbK.d.mts → field-accessor-CmxCw9xP-C7wBU7aM.d.mts} +3 -3
- package/dist/{field-accessor-CmxCw9xP-C6jMngbK.d.mts.map → field-accessor-CmxCw9xP-C7wBU7aM.d.mts.map} +1 -1
- package/dist/{index-FeVOOdZ0.d.mts → index-8ml_NVS_.d.mts} +3 -3
- package/dist/{index-FeVOOdZ0.d.mts.map → index-8ml_NVS_.d.mts.map} +1 -1
- package/dist/{index-BdXzdXGE.d.mts → index-BEE0UxUA.d.mts} +3 -3
- package/dist/{index-BdXzdXGE.d.mts.map → index-BEE0UxUA.d.mts.map} +1 -1
- package/dist/{index-YY1SU_7o.d.mts → index-CQ1JuHm5.d.mts} +13 -12
- package/dist/index-CQ1JuHm5.d.mts.map +1 -0
- package/dist/{index-rANtsIZG.d.mts → index-D62lu0tO.d.mts} +3 -3
- package/dist/{index-rANtsIZG.d.mts.map → index-D62lu0tO.d.mts.map} +1 -1
- package/dist/{index-BhIiYIXu.d.mts → index-Dfilr1Os.d.mts} +6 -6
- package/dist/{index-BhIiYIXu.d.mts.map → index-Dfilr1Os.d.mts.map} +1 -1
- package/dist/{interpreter-BfHdPd7T-DGqi2_Um.mjs → interpreter-DFYQNoyO--j8HG0mg.mjs} +620 -905
- package/dist/interpreter-DFYQNoyO--j8HG0mg.mjs.map +1 -0
- package/dist/{ir-DGm0HXbP.mjs → ir-DrSbC_hc.mjs} +2 -2
- package/dist/{ir-DGm0HXbP.mjs.map → ir-DrSbC_hc.mjs.map} +1 -1
- package/dist/{ir-BLC0t6_x.d.mts → ir-SLc3mVHt.d.mts} +4 -4
- package/dist/{ir-BLC0t6_x.d.mts.map → ir-SLc3mVHt.d.mts.map} +1 -1
- package/dist/lowering.d.mts +1 -1
- package/dist/{migration-YQVmgFU8.d.mts → migration-C9enejJh.d.mts} +5 -5
- package/dist/{migration-YQVmgFU8.d.mts.map → migration-C9enejJh.d.mts.map} +1 -1
- package/dist/{migration-DnQ7_A_B.mjs → migration-CKa85PF4.mjs} +2 -2
- package/dist/{migration-DnQ7_A_B.mjs.map → migration-CKa85PF4.mjs.map} +1 -1
- package/dist/{mongo-contract-serializer-Zx1rvil3-BywiKCpn.mjs → mongo-contract-serializer-DAPHJOHU-BjEbQIgp.mjs} +3 -3
- package/dist/{mongo-contract-serializer-Zx1rvil3-BywiKCpn.mjs.map → mongo-contract-serializer-DAPHJOHU-BjEbQIgp.mjs.map} +1 -1
- package/dist/{mongo-contract-view-AnejqfrQ-Wj_ulq2L.d.mts → mongo-contract-view-AnejqfrQ-DJJ6PwWt.d.mts} +3 -3
- package/dist/{mongo-contract-view-AnejqfrQ-Wj_ulq2L.d.mts.map → mongo-contract-view-AnejqfrQ-DJJ6PwWt.d.mts.map} +1 -1
- package/dist/{mongo-contract-view-D5yu2LrY-DCAZYJ4q.mjs → mongo-contract-view-x3OCGAk1-DvEhwf_e.mjs} +4 -4
- package/dist/{mongo-contract-view-D5yu2LrY-DCAZYJ4q.mjs.map → mongo-contract-view-x3OCGAk1-DvEhwf_e.mjs.map} +1 -1
- package/dist/mongo-data-type-Bv8Bd0zu-cnTiyyP0.mjs +33 -0
- package/dist/mongo-data-type-Bv8Bd0zu-cnTiyyP0.mjs.map +1 -0
- package/dist/{mongo-value-set-DEd7WLCT-B2Ar2GkJ.d.mts → mongo-value-set-BkGaKhbE-86TPJ91m.d.mts} +4 -5
- package/dist/mongo-value-set-BkGaKhbE-86TPJ91m.d.mts.map +1 -0
- package/dist/orm.d.mts +6 -6
- package/dist/orm.d.mts.map +1 -1
- package/dist/orm.mjs +2 -2
- package/dist/{pack-qw77Jt2G.d.mts → pack-WQox6nGF.d.mts} +4 -2
- package/dist/pack-WQox6nGF.d.mts.map +1 -0
- package/dist/query-ast.d.mts +2 -2
- package/dist/query-ast__control.d.mts +2 -2
- package/dist/query-builder.d.mts +2 -2
- package/dist/query-builder.mjs +1 -1
- package/dist/query-builder__contract-free.d.mts +3 -3
- package/dist/{runtime-yZA30qM2.d.mts → runtime-B1uT8PuG.d.mts} +2 -2
- package/dist/runtime-B1uT8PuG.d.mts.map +1 -0
- package/dist/runtime.d.mts +2 -2
- package/dist/schema-ir.d.mts +1 -1
- package/dist/{schema-verify-CVOG6EZx.d.mts → schema-verify-BiwnOU7s.d.mts} +4 -4
- package/dist/{schema-verify-CVOG6EZx.d.mts.map → schema-verify-BiwnOU7s.d.mts.map} +1 -1
- package/dist/{verify-mongo-schema-CeQP5N4k-CNOctppM.mjs → verify-mongo-schema-nsnAhPm8-BgFC6Aop.mjs} +3 -3
- package/dist/{verify-mongo-schema-CeQP5N4k-CNOctppM.mjs.map → verify-mongo-schema-nsnAhPm8-BgFC6Aop.mjs.map} +1 -1
- package/dist/wire.d.mts +1 -1
- package/package.json +20 -20
- package/dist/authoring-entity-types-UA5sY_Xm-DeYf_cYq.mjs.map +0 -1
- package/dist/contract-builder-BHzQQk70.mjs +0 -965
- package/dist/contract-builder-BHzQQk70.mjs.map +0 -1
- package/dist/contract-builder-ClL-xMK2.d.mts.map +0 -1
- package/dist/control-B_pPN58L.mjs.map +0 -1
- package/dist/control-adapter-CndDiTXW.d.mts +0 -1
- package/dist/dist-B8f-pfcT.mjs.map +0 -1
- package/dist/index-YY1SU_7o.d.mts.map +0 -1
- package/dist/interpreter-BfHdPd7T-DGqi2_Um.mjs.map +0 -1
- package/dist/mongo-data-type-DzyzU4LF-C1ydFXgE.mjs +0 -53
- package/dist/mongo-data-type-DzyzU4LF-C1ydFXgE.mjs.map +0 -1
- package/dist/mongo-value-set-DEd7WLCT-B2Ar2GkJ.d.mts.map +0 -1
- package/dist/pack-qw77Jt2G.d.mts.map +0 -1
- package/dist/runtime-yZA30qM2.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-DgMGRQkm.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/index.mjs"],"sourcesContent":["import { t as mongoContractCanonicalizationHooks } from \"./canonicalization-hooks-CRVM-Kqh.mjs\";\nimport { a as MongoCollection, c as MongoCollectionOptions, d as MongoCollationOptions, f as MongoChangeStreamPreAndPostImagesOptions, g as createMongoNamespaceEnvelopeSchema, h as createMongoContractSchema, i as MongoValueSet, l as MongoTimeSeriesCollectionOptions, m as StorageValueSetSchema, n as composeMongoEntityKinds, o as MongoValidator, p as MongoContractSchema, s as MongoIndex, u as MongoIndexOptionDefaults } from \"./entity-kinds-BQBtfVet.mjs\";\nimport { t as bsonTypesOfCodec } from \"./mongo-data-type-Bv8Bd0zu.mjs\";\nimport { RelationKeys } from \"@internal/framework-components/runtime\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\nimport { IRNodeBase, NamespaceBase, UNBOUND_NAMESPACE_ID, buildNamespacedEntities, buildSingleNamespaceView, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { governingControlPolicy } from \"@internal/contract/types\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { UNBOUND_DOMAIN_NAMESPACE_ID } from \"@internal/contract/default-namespace\";\nimport { assertDefined } from \"@internal/utils/assertions\";\n//#region src/ir/mongo-unbound-namespace.ts\nvar MongoUnboundNamespace = class MongoUnboundNamespace extends NamespaceBase {\n\tstatic instance = new MongoUnboundNamespace();\n\tid = UNBOUND_NAMESPACE_ID;\n\tentries = Object.freeze({ collection: Object.freeze({}) });\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"mongo-namespace\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/build-mongo-namespace.ts\nconst MONGO_NAMESPACE_KIND = \"mongo-namespace\";\nvar MongoBoundNamespace = class MongoBoundNamespace extends NamespaceBase {\n\tid;\n\tentries;\n\tstatic fromCollectionsInput(input) {\n\t\tconst collectionMap = input.entries[\"collection\"];\n\t\tconst collectionCount = collectionMap !== void 0 ? Object.keys(collectionMap).length : 0;\n\t\tconst hasUnknownKinds = Object.keys(input.entries).some((kind) => kind !== \"collection\");\n\t\tif (input.id === UNBOUND_NAMESPACE_ID && collectionCount === 0 && !hasUnknownKinds) return MongoUnboundNamespace.instance;\n\t\treturn new MongoBoundNamespace(input);\n\t}\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst rawEntries = {\n\t\t\tcollection: {},\n\t\t\t...input.entries\n\t\t};\n\t\tthis.entries = Object.freeze(blindCast(hydrateNamespaceEntities(rawEntries, composeMongoEntityKinds(), \"carry\")));\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: MONGO_NAMESPACE_KIND,\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget collection() {\n\t\treturn this.entries.collection ?? Object.freeze({});\n\t}\n};\nfunction buildMongoNamespace(input) {\n\treturn MongoBoundNamespace.fromCollectionsInput(input);\n}\n//#endregion\n//#region src/ir/mongo-storage.ts\nvar MongoStorage = class extends IRNodeBase {\n\tstorageHash;\n\tnamespaces;\n\tconstructor(input) {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"mongo-storage\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tthis.storageHash = input.storageHash;\n\t\tthis.namespaces = Object.freeze(input.namespaces);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/build-mongo-storage.ts\n/**\n* Builds a Mongo contract's storage: the namespace `namespaceId` holding the collections and value sets, and the storage hash that `db sign` and `db verify` compare. Every Mongo contract source calls this, so they hash storage the same way.\n*/\nfunction buildMongoStorage(input) {\n\tconst hasValueSets = Object.keys(input.valueSets).length > 0;\n\tconst namespace = buildMongoNamespace({\n\t\tid: input.namespaceId,\n\t\tentries: {\n\t\t\tcollection: input.collections,\n\t\t\t...hasValueSets ? { valueSet: input.valueSets } : {}\n\t\t}\n\t});\n\treturn new MongoStorage({\n\t\tstorageHash: computeStorageHash({\n\t\t\ttarget: \"mongo\",\n\t\t\ttargetFamily: \"mongo\",\n\t\t\tstorage: { namespaces: { [input.namespaceId]: {\n\t\t\t\tid: input.namespaceId,\n\t\t\t\tentries: {\n\t\t\t\t\tcollection: namespace.entries.collection,\n\t\t\t\t\t...namespace.entries.valueSet !== void 0 ? { valueSet: namespace.entries.valueSet } : {}\n\t\t\t\t}\n\t\t\t} } },\n\t\t\t...mongoContractCanonicalizationHooks\n\t\t}),\n\t\tnamespaces: { [input.namespaceId]: namespace }\n\t});\n}\n//#endregion\n//#region src/collection-control-policies.ts\n/** The control policies a built contract declares for its collections. */\nfunction collectionControlPoliciesOf(contract) {\n\treturn {\n\t\tcollections: Object.fromEntries(Object.values(contract.storage.namespaces).flatMap((namespace) => Object.entries(namespace.entries.collection ?? {}).map(([name, collection]) => [name, collection.control]))),\n\t\tdefaultControlPolicy: contract.defaultControlPolicy\n\t};\n}\n/** The control policy that governs `collection`, with the `external` default as a floor, as the planner, the validator derivation and the verifier all read it. */\nfunction collectionControlPolicyOf(collection, policies) {\n\treturn governingControlPolicy({ explicitNodeControlPolicy: policies.collections[collection] }, policies.defaultControlPolicy);\n}\n/** Whether `collection` is managed, so it gets a validator. */\nfunction isManaged(collection, policies) {\n\treturn collectionControlPolicyOf(collection, policies) === \"managed\";\n}\n//#endregion\n//#region src/collection-root-models.ts\n/**\n* The root models of each collection, keyed by collection name: every model stored in the collection that is neither a variant nor embedded, sorted by name.\n*/\nfunction collectionRootModelsOf(models) {\n\tconst roots = {};\n\tfor (const [name, model] of Object.entries(models)) {\n\t\tconst collection = model.storage[\"collection\"];\n\t\tif (typeof collection !== \"string\" || model.base !== void 0 || model.owner !== void 0) continue;\n\t\troots[collection] = [...roots[collection] ?? [], name];\n\t}\n\tfor (const names of Object.values(roots)) names.sort();\n\treturn roots;\n}\n//#endregion\n//#region src/document-id-refusal.ts\n/** The BSON types an `_id` cannot have: MongoDB refuses an array, a regular expression and undefined, and every document has an `_id`. */\nconst FORBIDDEN_DOCUMENT_ID_BSON_TYPES = /* @__PURE__ */ new Set([\n\t\"array\",\n\t\"regex\",\n\t\"undefined\",\n\t\"null\"\n]);\n/**\n* Why an `_id` stored by `codecId` cannot hold `forbidden`, the BSON types it can hold that an `_id` cannot have; an empty list means it can hold any BSON type. The subject is left out, so each caller leads with its own.\n*/\nfunction documentIdRefusalReason(codecId, forbidden) {\n\treturn `can hold ${forbidden.length === 0 ? \"any BSON type\" : `BSON type ${forbidden.join(\" or \")}`} (codec \"${codecId}\"). An _id cannot be an array, a regular expression, undefined or null: MongoDB refuses the first three, and every document has an _id.`;\n}\n/**\n* The refusal of an `_id` that can hold `bsonTypes`, or undefined when an `_id` can. An empty list means any BSON type, which includes all of them.\n*/\nfunction documentIdRefusalOf(codecId, bsonTypes) {\n\tif (bsonTypes.length === 0) return {\n\t\tforbidden: [...FORBIDDEN_DOCUMENT_ID_BSON_TYPES],\n\t\treason: documentIdRefusalReason(codecId, [])\n\t};\n\tconst forbidden = bsonTypes.filter((bsonType) => FORBIDDEN_DOCUMENT_ID_BSON_TYPES.has(bsonType));\n\treturn forbidden.length === 0 ? void 0 : {\n\t\tforbidden,\n\t\treason: documentIdRefusalReason(codecId, forbidden)\n\t};\n}\n/**\n* The BSON types a field stored as `_id` can hold: its codec's, an array for a list, and null for a nullable field. Undefined for a value object, which is stored as an object, and for a codec whose BSON types are unknown, which the field rule refuses.\n*/\nfunction documentIdBsonTypesOf(field, lookups) {\n\tif (field.type.kind !== \"scalar\") return void 0;\n\tconst codecTypes = bsonTypesOfCodec(field.type.codecId, lookups);\n\tif (codecTypes === void 0) return void 0;\n\tconst stored = field.many ? [\"array\"] : codecTypes;\n\treturn field.nullable ? [...stored, \"null\"] : stored;\n}\n//#endregion\n//#region src/field-bson-type-refusal.ts\nconst CANNOT_GIVE = \"so its BSON type is unknown and the contract cannot describe the field.\";\n/**\n* Why a field of codec `codecId` cannot be described, or undefined when its BSON type is known. The reason leaves out its subject so each authoring surface can lead with its own, as in `Field \"Place.location\" uses codec ...`.\n*/\nfunction fieldBsonTypeRefusalOf(codecId, lookups) {\n\tif (bsonTypesOfCodec(codecId, lookups) !== void 0) return void 0;\n\tconst descriptor = lookups.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) return {\n\t\tkind: \"unknownCodec\",\n\t\treason: `uses codec \"${codecId}\", which no pack in the contract provides, ${CANNOT_GIVE}`\n\t};\n\treturn {\n\t\tkind: \"notMongoDataType\",\n\t\tdataType: descriptor.dataType,\n\t\treason: `uses codec \"${codecId}\", whose data type \"${descriptor.dataType}\" is not a MongoDB data type of any pack in the contract, ${CANNOT_GIVE}`\n\t};\n}\n//#endregion\n//#region src/mongo-models.ts\n/** The models of namespace `namespaceId` of a validated MongoDB contract, whose storage records the stored name of every field. */\nfunction mongoModelsOf(domain, namespaceId) {\n\treturn blindCast(domain.namespaces[namespaceId]?.models ?? {});\n}\n/** Model `modelName` followed by its base models, nearest first; empty when the model is not in `models`. */\nfunction modelAndBasesOf(models, modelName) {\n\tconst chain = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (let name = modelName; name !== void 0 && !seen.has(name);) {\n\t\tseen.add(name);\n\t\tconst model = models[name];\n\t\tif (model === void 0) break;\n\t\tchain.push(model);\n\t\tname = model.base?.model;\n\t}\n\treturn chain;\n}\n//#endregion\n//#region src/stored-names.ts\n/** The name MongoDB stores a document's id under. */\nconst DOCUMENT_ID = \"_id\";\n/** Why a field or embed relation cannot be stored as `storedName`, if it cannot; the subject is the field or relation. */\nfunction unsupportedStoredNameReason(storedName) {\n\treturn storedName === \"__proto__\" ? \"is stored as \\\"__proto__\\\", which JavaScript reads as the prototype of an object rather than as a key\" : void 0;\n}\n/** The stored name of each of `model`'s own fields, keyed by field name. */\nfunction ownStoredNamesOf(model) {\n\tconst storageFields = model.storage.fields;\n\treturn Object.fromEntries(Object.keys(model.fields).map((name) => {\n\t\tconst entry = Object.hasOwn(storageFields, name) ? storageFields[name] : void 0;\n\t\tif (entry === void 0) throw new InternalError(`Field \"${name}\" has no entry in its model's storage.fields`);\n\t\treturn [name, entry.field];\n\t}));\n}\n/** The stored name of each field of a value object: its own name, since a value object has no storage block. */\nfunction valueObjectStoredNamesOf(valueObject) {\n\treturn Object.fromEntries(Object.keys(valueObject.fields).map((name) => [name, name]));\n}\n/** The stored name of `fieldName`, one of `model`'s own fields. */\nfunction ownStoredNameOf(model, fieldName) {\n\tconst storedNames = ownStoredNamesOf(model);\n\tconst storedName = Object.hasOwn(storedNames, fieldName) ? storedNames[fieldName] : void 0;\n\tif (storedName === void 0) throw new InternalError(`Model has no field \"${fieldName}\"`);\n\treturn storedName;\n}\n/** The own field of `model` stored under `storedName`, or undefined when no own field is. */\nfunction ownFieldStoredAs(model, storedName) {\n\treturn Object.entries(ownStoredNamesOf(model)).find(([, stored]) => stored === storedName)?.[0];\n}\n/** Whether one of `model`'s own fields is stored under `storedName`. */\nfunction hasOwnFieldStoredAs(model, storedName) {\n\treturn ownFieldStoredAs(model, storedName) !== void 0;\n}\n/** The own field of `model` stored as `_id`, with its name, or undefined when none of its own fields is. */\nfunction ownDocumentIdFieldOf(model) {\n\tconst name = ownFieldStoredAs(model, \"_id\");\n\tconst field = name === void 0 ? void 0 : model.fields[name];\n\treturn name === void 0 || field === void 0 ? void 0 : {\n\t\tname,\n\t\tfield\n\t};\n}\n/**\n* The stored name of each of `model`'s own embed relations, keyed by relation name: its `storage.relations` entry, or the relation's own name when it has none.\n*/\nfunction ownEmbedStoredNamesOf(model) {\n\treturn Object.fromEntries(Object.entries(model.relations).filter(([, relation]) => !(\"on\" in relation) && !(\"through\" in relation)).map(([name]) => [name, model.storage.relations?.[name]?.field ?? name]));\n}\n/** The stored name of each field of model `modelName`, its own and those it inherits from its base models, keyed by field name. */\nfunction storedNamesOf(models, modelName) {\n\tconst chain = [...modelAndBasesOf(models, modelName)].reverse();\n\treturn Object.assign({}, ...chain.map((model) => ownStoredNamesOf(model)));\n}\n//#endregion\n//#region src/relation-fields.ts\n/**\n* The model facts behind a same-space to-one relation's nullability: which side owns the\n* foreign key, and whether each local field is nullable.\n*/\nfunction resolveMongoToOneRelationFields(model, relation) {\n\tconst fields = relation.on.localFields.map((name) => ({\n\t\tname,\n\t\tnullable: model.fields[name]?.nullable ?? true\n\t}));\n\treturn {\n\t\townsForeignKey: !(relation.cardinality === \"1:1\" && fields.every((field) => Object.hasOwn(model.fields, field.name) && ownStoredNameOf(model, field.name) === \"_id\")),\n\t\tfields\n\t};\n}\n/** Whether `relation` stores the related model inside the document, rather than referring to documents elsewhere. */\nfunction isEmbedRelation(relation) {\n\treturn !(\"on\" in relation) && !(\"through\" in relation);\n}\n//#endregion\n//#region src/validator-enum-refusal.ts\nconst STORED_JSON_TYPE_NAMES = {\n\tstring: \"a string\",\n\tnumber: \"a finite number\",\n\tboolean: \"a boolean\",\n\tobject: \"a JSON object\",\n\tarray: \"a JSON array\"\n};\n/**\n* A collection validator lists an enum's members in their stored forms, so an enum's BSON type must be one whose values JSON holds. Maps each such type to the JSON type of a member's stored form.\n*/\nconst VALIDATOR_LISTABLE_BSON_TYPES = {\n\tstring: \"string\",\n\tint: \"number\",\n\tdouble: \"number\",\n\tbool: \"boolean\",\n\tobject: \"object\",\n\tarray: \"array\"\n};\nfunction storedJsonTypeOf(stored) {\n\tif (stored === null) return \"null\";\n\tif (Array.isArray(stored)) return \"array\";\n\tif (typeof stored === \"number\" && !Number.isFinite(stored)) return \"non-finite number\";\n\treturn typeof stored;\n}\nfunction storedText(stored) {\n\treturn typeof stored === \"number\" || typeof stored === \"bigint\" ? String(stored) : JSON.stringify(stored);\n}\n/**\n* Why a collection validator cannot list the members of an enum whose codec stores `bsonTypes`, or undefined when it can. Like {@link validatorEnumMemberRefusalOf}, the reason leaves out its subject so each authoring surface can lead with its own, as in `enum \"Role\" @@type codec \"mongo/int64@1\" stores BSON type long, ...`.\n*/\nfunction validatorEnumRefusalOf(bsonTypes) {\n\tconst [bsonType, ...otherBsonTypes] = bsonTypes;\n\tif (bsonType === void 0 || otherBsonTypes.length > 0) return `declares ${bsonTypes.length} BSON types; an enum needs exactly one. Use a codec with one BSON type, such as mongo/string@1.`;\n\tif (VALIDATOR_LISTABLE_BSON_TYPES[bsonType] === void 0) return `stores BSON type ${bsonType}, which a collection validator cannot list as an enum value. Use a codec whose BSON type is string, int, double, bool, object or array.`;\n}\n/**\n* Why a collection validator cannot list an enum member stored as `stored`, for an enum whose codec stores `bsonTypes`, or undefined when it can. The reason leaves out its subject, as in `enum \"Role\" member \"Admin\" is stored as ...`.\n*/\nfunction validatorEnumMemberRefusalOf(bsonTypes, stored) {\n\tconst enumRefusal = validatorEnumRefusalOf(bsonTypes);\n\tif (enumRefusal !== void 0) return enumRefusal;\n\tconst [bsonType] = bsonTypes;\n\tconst storedJsonType = bsonType === void 0 ? void 0 : VALIDATOR_LISTABLE_BSON_TYPES[bsonType];\n\tif (storedJsonType === void 0 || storedJsonTypeOf(stored) === storedJsonType) return void 0;\n\treturn `is stored as ${storedText(stored)}, which a collection validator cannot list as a ${bsonType}. A member of a ${bsonType} enum must be ${STORED_JSON_TYPE_NAMES[storedJsonType]}.`;\n}\n//#endregion\n//#region src/contract-refusals.ts\n/** Why an embed relation cannot target `embeddedModel`, a model with variants; the subject is the relation. */\nfunction embeddedVariantsReason(embeddedModel) {\n\treturn `embeds model \"${embeddedModel}\", which has variants. The ORM reads and writes only the base fields of an embedded model, so an embedded model cannot have variants.`;\n}\n/**\n* The parts of a MongoDB contract its validators cannot describe that can be decided without codec lookups: an embed relation to a model with variants. `mongoContractRefusalsOf` includes them, and `validateMongoStorage` applies them to a contract read back from `contract.json`.\n*/\nfunction lookupFreeRefusalsOf(models) {\n\treturn Object.entries(models).flatMap(([modelName, model]) => Object.entries(model.relations).flatMap(([relationName, relation]) => isEmbedRelation(relation) && models[relation.to.model]?.variants !== void 0 ? [{\n\t\tkind: \"embeddedModelHasVariants\",\n\t\tmodelName,\n\t\trelationName,\n\t\tembeddedModel: relation.to.model,\n\t\treason: embeddedVariantsReason(relation.to.model)\n\t}] : []));\n}\n/**\n* The enums a collection validator lists: those stored by a model in a managed collection, by one of its variants or embedded models, or by a value object any of them holds.\n*/\nfunction validatedEnumNames(input) {\n\tconst { models, valueObjects, controlPolicies } = input;\n\tconst visitedModels = new Set(Object.entries(collectionRootModelsOf(models)).flatMap(([collection, names]) => isManaged(collection, controlPolicies) ? names : []));\n\tconst visitedValueObjects = /* @__PURE__ */ new Set();\n\tconst enums = /* @__PURE__ */ new Set();\n\tconst visitFields = (fields) => {\n\t\tfor (const field of Object.values(fields)) {\n\t\t\tif (field.valueSet?.entityKind === \"enum\") enums.add(field.valueSet.entityName);\n\t\t\tif (field.type.kind === \"valueObject\" && !visitedValueObjects.has(field.type.name)) {\n\t\t\t\tvisitedValueObjects.add(field.type.name);\n\t\t\t\tvisitFields(valueObjects[field.type.name]?.fields ?? {});\n\t\t\t}\n\t\t}\n\t};\n\tconst pending = [...visitedModels];\n\tconst reach = (name) => {\n\t\tif (visitedModels.has(name)) return;\n\t\tvisitedModels.add(name);\n\t\tpending.push(name);\n\t};\n\tfor (let name = pending.pop(); name !== void 0; name = pending.pop()) {\n\t\tconst model = models[name];\n\t\tif (model === void 0) continue;\n\t\tvisitFields(model.fields);\n\t\tfor (const relation of Object.values(model.relations)) if (isEmbedRelation(relation)) reach(relation.to.model);\n\t\tfor (const [variant, candidate] of Object.entries(models)) if (candidate.base?.model === name) reach(variant);\n\t}\n\treturn enums;\n}\nfunction enumRefusals(input) {\n\tconst { enums, lookups } = input;\n\tconst validated = validatedEnumNames(input);\n\treturn Object.entries(enums).flatMap(([enumName, { codecId, members }]) => {\n\t\tconst refusal = fieldBsonTypeRefusalOf(codecId, lookups);\n\t\tif (refusal !== void 0) return [{\n\t\t\tkind: \"enumBsonType\",\n\t\t\tenumName,\n\t\t\tcodecId,\n\t\t\trefusal\n\t\t}];\n\t\tif (!validated.has(enumName)) return [];\n\t\tconst bsonTypes = bsonTypesOfCodec(codecId, lookups) ?? [];\n\t\tconst reason = validatorEnumRefusalOf(bsonTypes);\n\t\tif (reason !== void 0) return [{\n\t\t\tkind: \"enumNotListable\",\n\t\t\tenumName,\n\t\t\tcodecId,\n\t\t\treason\n\t\t}];\n\t\treturn members.flatMap((member) => {\n\t\t\tconst memberReason = validatorEnumMemberRefusalOf(bsonTypes, member.value);\n\t\t\treturn memberReason === void 0 ? [] : [{\n\t\t\t\tkind: \"enumMemberNotListable\",\n\t\t\t\tenumName,\n\t\t\t\tmember: member.name,\n\t\t\t\tcodecId,\n\t\t\t\treason: memberReason\n\t\t\t}];\n\t\t});\n\t});\n}\nfunction fieldRefusals(owner, fields, lookups) {\n\treturn Object.entries(fields).flatMap(([fieldName, field]) => {\n\t\tif (field.type.kind !== \"scalar\") return [];\n\t\tconst refusal = fieldBsonTypeRefusalOf(field.type.codecId, lookups);\n\t\treturn refusal === void 0 ? [] : [{\n\t\t\tkind: \"fieldBsonType\",\n\t\t\towner,\n\t\t\tfieldName,\n\t\t\tcodecId: field.type.codecId,\n\t\t\trefusal\n\t\t}];\n\t});\n}\nfunction documentIdRefusals(models, lookups) {\n\treturn Object.entries(collectionRootModelsOf(models)).flatMap(([collection, modelNames]) => modelNames.flatMap((modelName) => {\n\t\tconst model = models[modelName];\n\t\tconst id = model === void 0 ? void 0 : ownDocumentIdFieldOf(model);\n\t\tif (id === void 0 || id.field.type.kind !== \"scalar\") return [];\n\t\tconst bsonTypes = documentIdBsonTypesOf(id.field, lookups);\n\t\tconst codecId = id.field.type.codecId;\n\t\tconst refusal = bsonTypes === void 0 ? void 0 : documentIdRefusalOf(codecId, bsonTypes);\n\t\treturn refusal === void 0 ? [] : [{\n\t\t\tkind: \"documentId\",\n\t\t\tmodelName,\n\t\t\tfieldName: id.name,\n\t\t\tcollection,\n\t\t\tcodecId,\n\t\t\t...refusal\n\t\t}];\n\t}));\n}\n/**\n* Every part of a built MongoDB contract that its collection validators cannot describe: an embed relation to a model with variants, an enum a validator of a managed collection cannot list, a field whose codec has no MongoDB data type, and a root model's field stored as `_id` that can hold a BSON type an `_id` cannot have. Both authoring surfaces call it on what they built, so the rules are decided in one place.\n*/\nfunction mongoContractRefusalsOf(input) {\n\tconst { models, valueObjects, lookups } = input;\n\treturn [\n\t\t...lookupFreeRefusalsOf(models),\n\t\t...enumRefusals(input),\n\t\t...Object.entries(models).flatMap(([name, model]) => fieldRefusals({\n\t\t\tkind: \"model\",\n\t\t\tname\n\t\t}, model.fields, lookups)),\n\t\t...Object.entries(valueObjects).flatMap(([name, valueObject]) => fieldRefusals({\n\t\t\tkind: \"valueObject\",\n\t\t\tname\n\t\t}, valueObject.fields, lookups)),\n\t\t...documentIdRefusals(models, lookups)\n\t];\n}\n//#endregion\n//#region src/contract-view.ts\nconst MONGO_BUILTIN_KINDS = [\"collection\"];\n/**\n* Builds the Mongo view: unwraps the sole namespace's built-in `collection` kind\n* to the root, attaches the namespace-keyed `namespace` map, and layers both\n* over the deserialized contract so the result is a structural superset of the\n* contract.\n*/\nfunction buildMongoContractView(contract) {\n\tconst rootAccessors = buildSingleNamespaceView(contract.storage, MONGO_BUILTIN_KINDS);\n\tconst namespace = buildNamespacedEntities(contract.storage, MONGO_BUILTIN_KINDS);\n\treturn {\n\t\t...contract,\n\t\t...rootAccessors,\n\t\tnamespace\n\t};\n}\n//#endregion\n//#region src/default-namespace.ts\n/** Default storage namespace for Mongo-family contracts at runtime. */\nconst defaultMongoStorageNamespaceId = UNBOUND_NAMESPACE_ID;\n/** Default domain namespace for Mongo-family contracts at runtime. */\nconst defaultMongoDomainNamespaceId = UNBOUND_DOMAIN_NAMESPACE_ID;\n//#endregion\n//#region src/recursive-groups.ts\nfunction typeKey(kind, name) {\n\treturn `${kind}:${name}`;\n}\nfunction referencesOf(fields) {\n\treturn Object.values(fields).flatMap((field) => field.type.kind === \"valueObject\" ? [typeKey(\"valueObject\", field.type.name)] : []);\n}\n/**\n* The recursive groups of value objects and embedded models: each set of types that can reach each other through value-object fields and embed relations (a strongly connected component of that graph), and each type that refers to itself. Maps the {@link typeKey} of every type in such a group to the group's number; a type in no recursive group is absent.\n*/\nfunction recursiveGroupsOf(valueObjects, models) {\n\tconst edges = /* @__PURE__ */ new Map();\n\tfor (const [name, valueObject] of Object.entries(valueObjects)) edges.set(typeKey(\"valueObject\", name), referencesOf(valueObject.fields));\n\tfor (const [name, model] of Object.entries(models)) {\n\t\tconst embeds = Object.values(model.relations).flatMap((relation) => isEmbedRelation(relation) ? [typeKey(\"model\", relation.to.model)] : []);\n\t\tedges.set(typeKey(\"model\", name), [...referencesOf(model.fields), ...embeds]);\n\t}\n\tconst groups = /* @__PURE__ */ new Map();\n\tconst index = /* @__PURE__ */ new Map();\n\tconst lowLink = /* @__PURE__ */ new Map();\n\tconst stack = [];\n\tconst onStack = /* @__PURE__ */ new Set();\n\tlet nextIndex = 0;\n\tlet nextGroup = 0;\n\tconst visit = (node) => {\n\t\tindex.set(node, nextIndex);\n\t\tlowLink.set(node, nextIndex);\n\t\tnextIndex++;\n\t\tstack.push(node);\n\t\tonStack.add(node);\n\t\tfor (const target of edges.get(node) ?? []) {\n\t\t\tif (!edges.has(target)) continue;\n\t\t\tif (!index.has(target)) {\n\t\t\t\tvisit(target);\n\t\t\t\tlowLink.set(node, Math.min(lowLink.get(node) ?? 0, lowLink.get(target) ?? 0));\n\t\t\t} else if (onStack.has(target)) lowLink.set(node, Math.min(lowLink.get(node) ?? 0, index.get(target) ?? 0));\n\t\t}\n\t\tif (lowLink.get(node) !== index.get(node)) return;\n\t\tconst members = [];\n\t\tlet member;\n\t\tdo {\n\t\t\tmember = stack.pop();\n\t\t\tif (member === void 0) break;\n\t\t\tonStack.delete(member);\n\t\t\tmembers.push(member);\n\t\t} while (member !== node);\n\t\tconst refersToItself = (edges.get(node) ?? []).includes(node);\n\t\tif (members.length > 1 || refersToItself) {\n\t\t\tfor (const each of members) groups.set(each, nextGroup);\n\t\t\tnextGroup++;\n\t\t}\n\t};\n\tfor (const node of edges.keys()) if (!index.has(node)) visit(node);\n\treturn groups;\n}\n//#endregion\n//#region src/derive-json-schema.ts\n/**\n* `$jsonSchema` has no references, so a type that contains itself, directly or through other types, cannot be described at every depth. The validator describes the type through which a path enters a recursive group in full, and accepts any object for each field below it that refers back into that group. So each group is written out once for each place a document enters it, and no valid document is refused.\n*/\nconst OPEN_OBJECT = { bsonType: \"object\" };\nfunction sourcesFor(input, rootKey) {\n\tconst groups = recursiveGroupsOf(input.valueObjects, input.models);\n\tconst rootGroup = groups.get(rootKey);\n\treturn {\n\t\t...input,\n\t\tgroups,\n\t\tenteredGroups: new Set(rootGroup === void 0 ? [] : [rootGroup])\n\t};\n}\nfunction objectSchemaOf(kind, name, shape, sources) {\n\tconst key = typeKey(kind, name);\n\tconst group = sources.groups.get(key);\n\tif (group !== void 0 && sources.enteredGroups.has(group)) return OPEN_OBJECT;\n\treturn deriveObjectSchema(shape, entering(key, sources));\n}\n/** `sources` with the recursive group of the type `key` entered, if it has one. */\nfunction entering(key, sources) {\n\tconst group = sources.groups.get(key);\n\tif (group === void 0 || sources.enteredGroups.has(group)) return sources;\n\treturn {\n\t\t...sources,\n\t\tenteredGroups: /* @__PURE__ */ new Set([...sources.enteredGroups, group])\n\t};\n}\nfunction modelShape(model) {\n\treturn {\n\t\tfields: model.fields,\n\t\trelations: model.relations,\n\t\tstoredNames: ownStoredNamesOf(model),\n\t\tembedStoredNames: ownEmbedStoredNamesOf(model)\n\t};\n}\nfunction valueObjectShape(valueObject) {\n\treturn {\n\t\tfields: valueObject.fields,\n\t\trelations: {},\n\t\tstoredNames: valueObjectStoredNamesOf(valueObject),\n\t\tembedStoredNames: {}\n\t};\n}\nconst NOTHING_INHERITED = {\n\tfields: {},\n\trelations: {},\n\tstoredNames: {},\n\tembedStoredNames: {}\n};\n/**\n* The `bsonType` keyword for a list of BSON type names: the name itself for one entry, the list for several.\n*/\nfunction bsonTypeKeyword(bsonTypes) {\n\tconst [only, ...rest] = bsonTypes;\n\treturn only !== void 0 && rest.length === 0 ? only : [...bsonTypes];\n}\nfunction withNull(bsonTypes) {\n\treturn bsonTypes.includes(\"null\") ? bsonTypes : [\"null\", ...bsonTypes];\n}\nfunction anyValueSchema(field) {\n\tif (\"many\" in field && field.many) return {\n\t\tbsonType: field.nullable ? [\"null\", \"array\"] : \"array\",\n\t\titems: {}\n\t};\n\treturn {};\n}\nfunction fieldToBsonSchema(field, sources) {\n\tconst { lookups, valueObjects, valueSets } = sources;\n\tif (field.type.kind === \"scalar\") {\n\t\tconst bsonTypes = bsonTypesOfCodec(field.type.codecId, lookups);\n\t\tassertDefined(bsonTypes, `Field codec \"${field.type.codecId}\" has no MongoDB data type; the authoring surface refuses such a field before it derives the validator`);\n\t\tif (bsonTypes.length === 0) return anyValueSchema(field);\n\t\tconst bsonType = bsonTypeKeyword(bsonTypes);\n\t\tconst enumValues = field.valueSet !== void 0 ? valueSets[field.valueSet.entityName]?.values ?? null : null;\n\t\tif (field.many) {\n\t\t\tconst items = { bsonType: field.many.elementNullable ? [\"null\", bsonType] : bsonType };\n\t\t\tif (enumValues) items[\"enum\"] = field.many.elementNullable ? [...enumValues, null] : enumValues;\n\t\t\treturn {\n\t\t\t\tbsonType: field.nullable ? [\"null\", \"array\"] : \"array\",\n\t\t\t\titems\n\t\t\t};\n\t\t}\n\t\tif (field.nullable) {\n\t\t\tconst s = { bsonType: bsonTypeKeyword(withNull(bsonTypes)) };\n\t\t\tif (enumValues) s[\"enum\"] = [...enumValues, null];\n\t\t\treturn s;\n\t\t}\n\t\tconst s = { bsonType };\n\t\tif (enumValues) s[\"enum\"] = enumValues;\n\t\treturn s;\n\t}\n\tif (field.type.kind === \"valueObject\") {\n\t\tconst vo = valueObjects[field.type.name];\n\t\tif (!vo) return void 0;\n\t\tconst voSchema = objectSchemaOf(\"valueObject\", field.type.name, valueObjectShape(vo), sources);\n\t\tif (field.many) return {\n\t\t\tbsonType: field.nullable ? [\"null\", \"array\"] : \"array\",\n\t\t\titems: field.many.elementNullable ? { oneOf: [{ bsonType: \"null\" }, voSchema] } : voSchema\n\t\t};\n\t\tif (field.nullable) return { oneOf: [{ bsonType: \"null\" }, voSchema] };\n\t\treturn voSchema;\n\t}\n}\n/**\n* An embedded model is stored inside its owner's document as a closed object (a list of them for `1:N`). The contract does not say whether one must be present, and the ORM creates documents without them, so the property is never required.\n*/\nfunction embedToBsonSchema(relation, sources) {\n\tconst embeddedName = relation.to.model;\n\tconst embedded = sources.models[embeddedName];\n\tassertDefined(embedded, `Embedded model \"${embeddedName}\" is missing`);\n\tconst schema = objectSchemaOf(\"model\", embeddedName, modelShape(embedded), sources);\n\treturn relation.cardinality === \"1:N\" ? {\n\t\tbsonType: \"array\",\n\t\titems: schema\n\t} : schema;\n}\n/**\n* The properties of `shape`, leaving out the fields and relations `inherited` already describes.\n*/\nfunction propertiesOf(shape, sources, inherited) {\n\tconst properties = {};\n\tconst required = [];\n\tfor (const [fieldName, field] of Object.entries(shape.fields)) {\n\t\tif (Object.hasOwn(inherited.fields, fieldName)) continue;\n\t\tconst schema = fieldToBsonSchema(field, sources);\n\t\tif (schema) {\n\t\t\tconst storedName = shape.storedNames[fieldName];\n\t\t\tassertDefined(storedName, `Field \"${fieldName}\" has a stored name`);\n\t\t\tproperties[storedName] = schema;\n\t\t\tif (!field.nullable) required.push(storedName);\n\t\t}\n\t}\n\tfor (const [relationName, relation] of Object.entries(shape.relations)) {\n\t\tif (Object.hasOwn(inherited.relations, relationName) || !isEmbedRelation(relation)) continue;\n\t\tconst storedName = shape.embedStoredNames[relationName];\n\t\tassertDefined(storedName, `Embed relation \"${relationName}\" has a stored name`);\n\t\tproperties[storedName] = embedToBsonSchema(relation, sources);\n\t}\n\treturn {\n\t\tproperties,\n\t\trequired\n\t};\n}\nconst OBJECT_ID_SCHEMA = { bsonType: \"objectId\" };\nfunction deriveObjectSchema(shape, sources, { isDocument } = { isDocument: false }) {\n\tconst own = propertiesOf(shape, sources, NOTHING_INHERITED);\n\tconst addsDocumentId = isDocument && !Object.values(shape.storedNames).includes(\"_id\");\n\tconst properties = addsDocumentId ? {\n\t\t[\"_id\"]: OBJECT_ID_SCHEMA,\n\t\t...own.properties\n\t} : own.properties;\n\tconst required = addsDocumentId ? [\"_id\", ...own.required] : own.required;\n\tconst result = {\n\t\tbsonType: \"object\",\n\t\tproperties,\n\t\tadditionalProperties: false\n\t};\n\tif (required.length > 0) result[\"required\"] = required.sort();\n\treturn result;\n}\nfunction isRecord$1(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction validatorOf(jsonSchema) {\n\treturn new MongoValidator({\n\t\tjsonSchema,\n\t\tvalidationLevel: \"strict\",\n\t\tvalidationAction: \"error\"\n\t});\n}\nfunction polymorphicSchema(base, discriminatorField, variants, sources) {\n\tconst baseSchema = deriveObjectSchema(base, sources, { isDocument: true });\n\tconst baseProperties = isRecord$1(baseSchema[\"properties\"]) ? baseSchema[\"properties\"] : {};\n\tconst oneOf = [];\n\tfor (const variant of variants) {\n\t\tconst { properties: variantProperties, required } = propertiesOf(variant, entering(typeKey(\"model\", variant.modelName), sources), base);\n\t\toneOf.push({\n\t\t\tproperties: {\n\t\t\t\t...baseProperties,\n\t\t\t\t[discriminatorField]: { enum: [variant.discriminatorValue] },\n\t\t\t\t...variantProperties\n\t\t\t},\n\t\t\trequired: [discriminatorField, ...required].sort(),\n\t\t\tadditionalProperties: false\n\t\t});\n\t}\n\tconst jsonSchema = { ...baseSchema };\n\tdelete jsonSchema[\"additionalProperties\"];\n\tif (oneOf.length > 0) jsonSchema[\"oneOf\"] = oneOf;\n\treturn jsonSchema;\n}\n/**\n* The `$jsonSchema` of a root model's documents: the model's fields and embedded models, and for a model with variants one `oneOf` branch per variant.\n*/\nfunction deriveModelJsonSchema(modelName, model, sources) {\n\tconst schemaSources = sourcesFor(sources, typeKey(\"model\", modelName));\n\tif (!model.discriminator || !model.variants) return deriveObjectSchema(modelShape(model), schemaSources, { isDocument: true });\n\tconst variants = Object.entries(model.variants).map(([discriminatorValue, variant]) => {\n\t\tconst variantModel = sources.models[variant.model];\n\t\tassertDefined(variantModel, `Variant model \"${variant.model}\" of \"${modelName}\" is missing`);\n\t\treturn {\n\t\t\tdiscriminatorValue,\n\t\t\tmodelName: variant.model,\n\t\t\t...modelShape(variantModel)\n\t\t};\n\t});\n\treturn polymorphicSchema(modelShape(model), ownStoredNameOf(model, model.discriminator.field), variants, schemaSources);\n}\n//#endregion\n//#region src/derive-collection-validators.ts\n/**\n* The validator of each managed collection that stores a root model, keyed by collection name. A collection under another control policy holds documents Prisma does not own the shape of, so it gets none. A root model with variants gets one polymorphic schema covering every variant. A collection that stores several root models accepts a document of any of them: its schema has one `anyOf` branch per root model.\n*/\nfunction deriveCollectionValidators(input) {\n\tconst validators = {};\n\tfor (const [collectionName, modelNames] of Object.entries(collectionRootModelsOf(input.models))) {\n\t\tif (!isManaged(collectionName, input.controlPolicies)) continue;\n\t\tconst schemas = modelNames.map((modelName) => {\n\t\t\tconst model = input.models[modelName];\n\t\t\tassertDefined(model, `Root model \"${modelName}\" of collection \"${collectionName}\" is missing`);\n\t\t\treturn deriveModelJsonSchema(modelName, model, input);\n\t\t});\n\t\tconst [only, ...others] = schemas;\n\t\tassertDefined(only, `Collection \"${collectionName}\" has no root model`);\n\t\tvalidators[collectionName] = validatorOf(others.length === 0 ? only : {\n\t\t\tbsonType: \"object\",\n\t\t\tanyOf: schemas\n\t\t});\n\t}\n\treturn validators;\n}\n//#endregion\n//#region src/ir/mongo-clustered-collection-options.ts\n/**\n* Clustered-collection options (the `clusteredIndex` collection-creation\n* field). Lifted from a `type =` data shape to an AST class extending\n* `IRNodeBase` per FR18.\n*\n* MongoDB requires `key` and `unique` for any clustered collection; the\n* constructor enforces presence by type signature.\n*/\nvar MongoClusteredCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-clustered-collection-options\";\n\tkey;\n\tunique;\n\tconstructor(options) {\n\t\tsuper();\n\t\tif (options.name !== void 0) this.name = options.name;\n\t\tthis.key = options.key;\n\t\tthis.unique = options.unique;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index-options.ts\n/**\n* Mongo Contract IR node for the per-index option vocabulary (the second\n* argument to `db.collection.createIndex(keys, options)` minus the keys\n* themselves). Lifted from a `type =` data shape to an AST class\n* extending `IRNodeBase` per FR18.\n*\n* Nested `collation` is itself an IR class (`MongoCollationOptions`); the\n* constructor accepts either a class instance or a data literal and\n* normalises to the class form so downstream walks see a uniform IR tree.\n*/\nvar MongoIndexOptions = class extends IRNodeBase {\n\tkind = \"mongo-index-options\";\n\tconstructor(options = {}) {\n\t\tsuper();\n\t\tif (options.unique !== void 0) this.unique = options.unique;\n\t\tif (options.name !== void 0) this.name = options.name;\n\t\tif (options.partialFilterExpression !== void 0) this.partialFilterExpression = options.partialFilterExpression;\n\t\tif (options.sparse !== void 0) this.sparse = options.sparse;\n\t\tif (options.expireAfterSeconds !== void 0) this.expireAfterSeconds = options.expireAfterSeconds;\n\t\tif (options.weights !== void 0) this.weights = options.weights;\n\t\tif (options.default_language !== void 0) this.default_language = options.default_language;\n\t\tif (options.language_override !== void 0) this.language_override = options.language_override;\n\t\tif (options.textIndexVersion !== void 0) this.textIndexVersion = options.textIndexVersion;\n\t\tif (options[\"2dsphereIndexVersion\"] !== void 0) this[\"2dsphereIndexVersion\"] = options[\"2dsphereIndexVersion\"];\n\t\tif (options.bits !== void 0) this.bits = options.bits;\n\t\tif (options.min !== void 0) this.min = options.min;\n\t\tif (options.max !== void 0) this.max = options.max;\n\t\tif (options.bucketSize !== void 0) this.bucketSize = options.bucketSize;\n\t\tif (options.hidden !== void 0) this.hidden = options.hidden;\n\t\tif (options.collation !== void 0) this.collation = options.collation instanceof MongoCollationOptions ? options.collation : new MongoCollationOptions(options.collation);\n\t\tif (options.wildcardProjection !== void 0) this.wildcardProjection = options.wildcardProjection;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/mongo-enum.ts\n/**\n* The storage value set of each enum: its members as the contract holds them, in the form their codec stores.\n*/\nfunction mongoValueSetsOf(enums) {\n\tconst valueSets = {};\n\tfor (const [enumName, { members }] of Object.entries(enums)) valueSets[enumName] = {\n\t\tkind: \"valueSet\",\n\t\tvalues: members.map((member) => member.value)\n\t};\n\treturn valueSets;\n}\n//#endregion\n//#region src/polymorphic-index-scope.ts\nfunction isScalarDiscriminatorValue(value) {\n\tconst t = typeof value;\n\treturn t === \"string\" || t === \"number\" || t === \"boolean\";\n}\nfunction formatValue(value) {\n\tif (typeof value === \"string\") return JSON.stringify(value);\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return JSON.stringify(value);\n\tif (typeof value === \"object\") return JSON.stringify(value);\n\treturn String(value);\n}\nfunction applyPolymorphicScopeToMongoIndex(index, scope) {\n\tif (!isScalarDiscriminatorValue(scope.discriminatorValue)) return {\n\t\tkind: \"conflict\",\n\t\treason: `Variant-scoped indexes require a scalar (string, number, or boolean) discriminator value for field \"${scope.discriminatorField}\", but received ${formatValue(scope.discriminatorValue)}.`\n\t};\n\tconst existing = index.partialFilterExpression;\n\tif (existing && Object.hasOwn(existing, scope.discriminatorField)) {\n\t\tconst existingValue = existing[scope.discriminatorField];\n\t\tif (existingValue === scope.discriminatorValue) return {\n\t\t\tkind: \"ok\",\n\t\t\tindex\n\t\t};\n\t\treturn {\n\t\t\tkind: \"conflict\",\n\t\t\treason: `Index partialFilterExpression sets \"${scope.discriminatorField}\" to ${formatValue(existingValue)}, which conflicts with the variant's discriminator value ${formatValue(scope.discriminatorValue)}.`\n\t\t};\n\t}\n\tconst merged = {\n\t\t...existing ?? {},\n\t\t[scope.discriminatorField]: scope.discriminatorValue\n\t};\n\treturn {\n\t\tkind: \"ok\",\n\t\tindex: new MongoIndex({\n\t\t\tkeys: index.keys,\n\t\t\t...index.unique !== void 0 && { unique: index.unique },\n\t\t\t...index.sparse !== void 0 && { sparse: index.sparse },\n\t\t\t...index.expireAfterSeconds !== void 0 && { expireAfterSeconds: index.expireAfterSeconds },\n\t\t\tpartialFilterExpression: merged,\n\t\t\t...index.wildcardProjection !== void 0 && { wildcardProjection: index.wildcardProjection },\n\t\t\t...index.collation !== void 0 && { collation: index.collation },\n\t\t\t...index.weights !== void 0 && { weights: index.weights },\n\t\t\t...index.default_language !== void 0 && { default_language: index.default_language },\n\t\t\t...index.language_override !== void 0 && { language_override: index.language_override }\n\t\t})\n\t};\n}\n//#endregion\n//#region src/validator-shapes.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction records(value) {\n\treturn Array.isArray(value) ? value.filter(isRecord) : [];\n}\nfunction shapeOf(schema) {\n\tconst properties = schema[\"properties\"];\n\tconst required = schema[\"required\"];\n\treturn {\n\t\tproperties: isRecord(properties) ? properties : {},\n\t\trequired: Array.isArray(required) ? required.filter((name) => typeof name === \"string\") : []\n\t};\n}\n/**\n* The root model shapes a collection validator's `$jsonSchema` describes, as `deriveCollectionValidators` writes it: one per `anyOf` branch when the collection stores several root models, otherwise the schema itself, each with its variants' `oneOf` branches.\n*/\nfunction validatorRootShapesOf(jsonSchema) {\n\tif (!isRecord(jsonSchema)) return [];\n\treturn (Array.isArray(jsonSchema[\"anyOf\"]) ? records(jsonSchema[\"anyOf\"]) : [jsonSchema]).map((root) => ({\n\t\t...shapeOf(root),\n\t\tvariants: records(root[\"oneOf\"]).map(shapeOf)\n\t}));\n}\n/** Every field name a collection validator declares, for a root model or for a variant. */\nfunction validatorFieldNamesOf(jsonSchema) {\n\treturn new Set(validatorRootShapesOf(jsonSchema).flatMap((root) => [...Object.keys(root.properties), ...root.variants.flatMap((variant) => Object.keys(variant.properties))]));\n}\n//#endregion\n//#region src/validate-storage.ts\nfunction bsonTypesOf(schema) {\n\tif (!(\"bsonType\" in schema)) return [];\n\tconst { bsonType } = schema;\n\treturn (Array.isArray(bsonType) ? bsonType : [bsonType]).filter((type) => typeof type === \"string\");\n}\nfunction idSchemaOf(shape) {\n\tconst id = shape.properties[\"_id\"];\n\treturn shape.required.includes(\"_id\") && typeof id === \"object\" && id !== null ? id : void 0;\n}\n/**\n* What a collection validator gets wrong about `_id`: a root model's branch that does not require it, or an `_id` that can hold a BSON type an `_id` cannot have, refused with the reason the build gives.\n*/\nfunction documentIdErrors(contract) {\n\tconst models = Object.assign({}, ...Object.keys(contract.domain.namespaces).map((namespaceId) => mongoModelsOf(contract.domain, namespaceId)));\n\tconst rootModels = collectionRootModelsOf(models);\n\treturn Object.values(contract.storage.namespaces).flatMap((namespace) => Object.entries(namespace.entries[\"collection\"] ?? {}).flatMap(([name, collection]) => {\n\t\tif (collection.validator === void 0) return [];\n\t\tconst shapes = validatorRootShapesOf(collection.validator.jsonSchema);\n\t\tconst idSchemas = shapes.map(idSchemaOf);\n\t\tif (shapes.length === 0 || idSchemas.includes(void 0)) return [`Collection \"${name}\": its validator must require _id, for every model the collection stores, since every document has an _id`];\n\t\tconst names = rootModels[name] ?? [];\n\t\treturn idSchemas.flatMap((idSchema, index) => {\n\t\t\tconst modelName = names.length === shapes.length ? names[index] : void 0;\n\t\t\tconst model = modelName === void 0 ? void 0 : models[modelName];\n\t\t\tconst id = model === void 0 ? void 0 : ownDocumentIdFieldOf(model);\n\t\t\tconst codecId = id?.field.type.kind === \"scalar\" ? id.field.type.codecId : \"unknown\";\n\t\t\tconst refusal = idSchema === void 0 ? void 0 : documentIdRefusalOf(codecId, bsonTypesOf(idSchema));\n\t\t\tif (refusal === void 0) return [];\n\t\t\treturn [id === void 0 ? `Collection \"${name}\": its validator's _id ${refusal.reason}` : `Model \"${modelName}\" field \"${id.name}\" ${refusal.reason}`];\n\t\t});\n\t}));\n}\nfunction formatCrossRef(crossRef) {\n\treturn `${crossRef.namespace}.${crossRef.model}`;\n}\nfunction storageDeclaresCollection(storage, collectionName) {\n\tfor (const ns of Object.values(storage.namespaces)) if (Object.hasOwn(ns.entries[\"collection\"] ?? {}, collectionName)) return true;\n\treturn false;\n}\nfunction fieldStorageErrors(qualifiedName, modelName, model, models) {\n\tconst errors = [];\n\tconst storageFields = model.storage.fields;\n\tfor (const fieldName of Object.keys(model.fields)) if (!Object.hasOwn(storageFields, fieldName)) errors.push(`Model \"${qualifiedName}\" field \"${fieldName}\" has no entry in storage.fields`);\n\tfor (const fieldName of Object.keys(storageFields)) if (!Object.hasOwn(model.fields, fieldName)) errors.push(`Model \"${qualifiedName}\" storage.fields names \"${fieldName}\", which is not a field of the model`);\n\terrors.push(...unsupportedStoredNameErrors(qualifiedName, model));\n\tif (errors.length > 0) return errors;\n\tconst chain = [...modelAndBasesOf(models, modelName)].reverse();\n\tif (!chain.every(hasCompleteFieldStorage)) return errors;\n\tconst membersByStoredName = /* @__PURE__ */ new Map();\n\tconst members = chain.flatMap((each) => [...Object.entries(ownStoredNamesOf(each)).map(([name, storedName]) => [`field \"${name}\"`, storedName]), ...Object.entries(ownEmbedStoredNamesOf(each)).map(([name, storedName]) => [`embed relation \"${name}\"`, storedName])]);\n\tfor (const [member, storedName] of members) {\n\t\tconst other = membersByStoredName.get(storedName);\n\t\tif (other !== void 0 && other !== member) errors.push(bothStoredAs(qualifiedName, other, member, storedName));\n\t\tmembersByStoredName.set(storedName, member);\n\t}\n\treturn errors;\n}\nfunction unsupportedStoredNameErrors(qualifiedName, model) {\n\treturn [...Object.entries(model.storage.fields).map(([name, { field }]) => [`field \"${name}\"`, field]), ...Object.entries(model.storage.relations ?? {}).map(([name, { field }]) => [`embed relation \"${name}\"`, field])].flatMap(([member, storedName]) => {\n\t\tconst reason = unsupportedStoredNameReason(storedName);\n\t\treturn reason === void 0 ? [] : [`Model \"${qualifiedName}\" ${member} ${reason}`];\n\t});\n}\nfunction hasCompleteFieldStorage(model) {\n\treturn Object.keys(model.fields).every((name) => Object.hasOwn(model.storage.fields, name));\n}\nfunction bothStoredAs(qualifiedName, first, second, storedName) {\n\tconst fieldPrefix = \"field \\\"\";\n\tif (first.startsWith(fieldPrefix) && second.startsWith(fieldPrefix)) {\n\t\tconst [a, b] = [first, second].map((member) => member.slice(7, -1)).sort();\n\t\treturn `Model \"${qualifiedName}\" fields \"${a}\" and \"${b}\" are both stored as \"${storedName}\"`;\n\t}\n\treturn `Model \"${qualifiedName}\" ${first} and ${second} are both stored as \"${storedName}\"`;\n}\nfunction validateMongoStorage(contract) {\n\tconst errors = [];\n\tlet fieldStorageComplete = true;\n\tfor (const namespaceId of Object.keys(contract.domain.namespaces)) {\n\t\tconst models = mongoModelsOf(contract.domain, namespaceId);\n\t\tfor (const [modelName, model] of Object.entries(models)) {\n\t\t\tconst qualifiedName = `${namespaceId}:${modelName}`;\n\t\t\tconst fieldErrors = fieldStorageErrors(qualifiedName, modelName, model, models);\n\t\t\tif (fieldErrors.length > 0) fieldStorageComplete = false;\n\t\t\terrors.push(...fieldErrors);\n\t\t\tif (model.storage.collection && !storageDeclaresCollection(contract.storage, model.storage.collection)) errors.push(`Model \"${qualifiedName}\" references collection \"${model.storage.collection}\" which is not declared under any namespace's collections map`);\n\t\t\tif (model.base) {\n\t\t\t\tconst baseModel = models[model.base.model];\n\t\t\t\tif (baseModel) {\n\t\t\t\t\tconst variantCollection = model.storage.collection;\n\t\t\t\t\tconst baseCollection = baseModel.storage.collection;\n\t\t\t\t\tif (variantCollection !== baseCollection) errors.push(`Mongo does not support multi-table inheritance; variant \"${qualifiedName}\" must share its base's collection (\"${baseCollection ?? \"(none)\"}\"), but has \"${variantCollection ?? \"(none)\"}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const [relName, relation] of Object.entries(model.relations ?? {})) {\n\t\t\t\tconst targetModel = models[relation.to.model];\n\t\t\t\tconst targetLabel = formatCrossRef(relation.to);\n\t\t\t\tif (targetModel?.owner) {\n\t\t\t\t\tif (targetModel.owner !== modelName) errors.push(`Embed relation \"${relName}\" targets \"${targetLabel}\" which is owned by \"${targetModel.owner}\", not \"${qualifiedName}\"`);\n\t\t\t\t\tif (targetModel.storage.collection) errors.push(`Embed relation \"${relName}\" targets \"${targetLabel}\" which must not have a collection`);\n\t\t\t\t} else if (\"on\" in relation && relation.on) {\n\t\t\t\t\tfor (const localField of relation.on.localFields) if (!(localField in model.fields)) errors.push(`Reference relation \"${relName}\": localField \"${localField}\" is not a field on model \"${qualifiedName}\"`);\n\t\t\t\t\tif (targetModel) {\n\t\t\t\t\t\tfor (const targetField of relation.on.targetFields) if (!(targetField in targetModel.fields)) errors.push(`Reference relation \"${relName}\": targetField \"${targetField}\" is not a field on model \"${targetLabel}\"`);\n\t\t\t\t\t}\n\t\t\t\t\tconst nullabilityError = fieldErrors.length > 0 ? void 0 : toOneRelationNullabilityError(qualifiedName, relName, relation, model);\n\t\t\t\t\tif (nullabilityError !== void 0) errors.push(nullabilityError);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (const namespace of Object.values(contract.domain.namespaces)) for (const refusal of lookupFreeRefusalsOf(namespace.models)) if (refusal.kind === \"embeddedModelHasVariants\") errors.push(`Relation \"${refusal.modelName}.${refusal.relationName}\" ${refusal.reason}`);\n\tif (fieldStorageComplete) errors.push(...documentIdErrors(contract));\n\tif (errors.length > 0) throw structuredError(\"CONTRACT.VALIDATION_FAILED\", `Contract storage validation failed:\\n- ${errors.join(\"\\n- \")}`);\n}\n/**\n* A same-space to-one relation that states `nullable` must agree with its local fields: nullable\n* exactly when one of them is nullable (a field that is not declared counts as nullable). A\n* relation without the flag is left to hydration, which derives it the same way.\n*/\nfunction toOneRelationNullabilityError(qualifiedName, relationName, relation, model) {\n\tif (!(\"on\" in relation && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\") && relation.to.space === void 0) || relation.nullable === void 0) return void 0;\n\tconst location = `Relation \"${relationName}\" on model \"${qualifiedName}\"`;\n\tconst { ownsForeignKey, fields } = resolveMongoToOneRelationFields(model, relation);\n\tif (!ownsForeignKey) return relation.nullable ? void 0 : `${location} is required but does not own the foreign key, so nothing in storage guarantees the related document exists`;\n\tconst anyNullable = fields.some((field) => field.nullable);\n\tif (relation.nullable === anyNullable) return void 0;\n\tconst fieldList = fields.filter((field) => field.nullable !== relation.nullable).map((field) => `\"${field.name}\"`).join(\", \");\n\treturn relation.nullable ? `${location} is nullable but every local field is required (fields ${fieldList})` : `${location} is required but a local field is nullable (fields ${fieldList})`;\n}\n//#endregion\nexport { DOCUMENT_ID, MongoChangeStreamPreAndPostImagesOptions, MongoClusteredCollectionOptions, MongoCollationOptions, MongoCollection, MongoCollectionOptions, MongoContractSchema, MongoIndex, MongoIndexOptionDefaults, MongoIndexOptions, MongoStorage, MongoTimeSeriesCollectionOptions, MongoUnboundNamespace, MongoValidator, MongoValueSet, RelationKeys, StorageValueSetSchema, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoNamespace, buildMongoStorage, collectionControlPoliciesOf, collectionControlPolicyOf, collectionRootModelsOf, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, deriveCollectionValidators, documentIdRefusalReason, fieldBsonTypeRefusalOf, hasOwnFieldStoredAs, isEmbedRelation, modelAndBasesOf, mongoContractRefusalsOf, mongoModelsOf, mongoValueSetsOf, ownDocumentIdFieldOf, ownEmbedStoredNamesOf, ownFieldStoredAs, ownStoredNameOf, ownStoredNamesOf, resolveMongoToOneRelationFields, storedNamesOf, unsupportedStoredNameReason, validateMongoStorage, validatorEnumMemberRefusalOf, validatorEnumRefusalOf, validatorFieldNamesOf, validatorRootShapesOf, valueObjectStoredNamesOf };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,wBAAwB,MAAM,8BAA8B,cAAc;CAC7E,OAAO,WAAW,IAAI,sBAAsB;CAC5C,KAAK;CACL,UAAU,OAAO,OAAO,EAAE,YAAY,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC;CACzD,cAAc;EACb,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,WAAW,IAAI;CAChB;AACD;AAGA,MAAM,uBAAuB;AAC7B,IAAI,sBAAsB,MAAM,4BAA4B,cAAc;CACzE;CACA;CACA,OAAO,qBAAqB,OAAO;EAClC,MAAM,gBAAgB,MAAM,QAAQ;EACpC,MAAM,kBAAkB,kBAAkB,KAAK,IAAI,OA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,aAAa,aAAa,cAAc,cAAc;CACvE,MAAM,EAAE,gBAAgB,WAAW,gCAAgC,OAAO,QAAQ;CAClF,IAAI,CAAC,gBAAgB,OAAO,SAAS,WAAW,KAAK,IAAI,GAAG,SAAS;CACrE,MAAM,cAAc,OAAO,MAAM,UAAU,MAAM,QAAQ;CACzD,IAAI,SAAS,aAAa,aAAa,OAAO,KAAK;CACnD,MAAM,YAAY,OAAO,QAAQ,UAAU,MAAM,aAAa,SAAS,QAAQ,CAAC,CAAC,KAAK,UAAU,IAAI,MAAM,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI;CAC5H,OAAO,SAAS,WAAW,GAAG,SAAS,yDAAyD,UAAU,KAAK,GAAG,SAAS,qDAAqD,UAAU;AAC3L"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as mongoModelsOf, k as ownStoredNamesOf, m as defaultMongoDomainNamespaceId } from "./dist-
|
|
1
|
+
import { C as mongoModelsOf, k as ownStoredNamesOf, m as defaultMongoDomainNamespaceId } from "./dist-DgMGRQkm.mjs";
|
|
2
2
|
import { r as MongoExistsExpr, t as MongoAndExpr } from "./filter-expressions-Uo8ZdzwB-53qnqceS.mjs";
|
|
3
3
|
import { A as MongoLookupStage, B as MongoSetWindowFieldsStage, C as MongoDensifyStage, D as MongoGraphLookupStage, E as MongoGeoNearStage, F as MongoRedactStage, G as MongoUnwindStage, H as MongoSortByCountStage, I as MongoReplaceRootStage, K as MongoVectorSearchStage, L as MongoSampleStage, M as MongoMergeStage, N as MongoOutStage, O as MongoGroupStage, P as MongoProjectStage, R as MongoSearchMetaStage, S as MongoCountStage, T as MongoFillStage, U as MongoSortStage, V as MongoSkipStage, W as MongoUnionWithStage, _ as MongoAggOperator, a as FindOneAndUpdateCommand, at as freezeMongoResultShape, b as MongoBucketAutoStage, c as MongoAddFieldsStage, d as MongoAggCond, f as MongoAggFieldRef, i as FindOneAndDeleteCommand, it as freezeMongoFieldShape, j as MongoMatchStage, k as MongoLimitStage, l as MongoAggAccumulator, m as MongoAggLiteral, n as DeleteManyCommand, nt as UpdateManyCommand, o as InsertManyCommand, r as DeleteOneCommand, rt as UpdateOneCommand, s as InsertOneCommand, t as AggregateCommand, w as MongoFacetStage, x as MongoBucketStage, z as MongoSearchStage } from "./execution-CgP1Sdbr.mjs";
|
|
4
4
|
import { i as resolveUpdaterResult, r as ormError, t as createFieldAccessor } from "./field-accessor-0oUt6RZC-CrJVzQiS.mjs";
|
|
@@ -1567,4 +1567,4 @@ function mongoQuery(options) {
|
|
|
1567
1567
|
//#endregion
|
|
1568
1568
|
export { contractFieldToMongoFieldShape as a, mongoQuery as c, acc as i, FilteredCollection as n, contractModelToMongoResultShape as o, PipelineChain as r, fn as s, CollectionHandle as t };
|
|
1569
1569
|
|
|
1570
|
-
//# sourceMappingURL=dist-
|
|
1570
|
+
//# sourceMappingURL=dist-DmE6N0B3.mjs.map
|