@prisma/orm-family-sql 8.0.0-rc.18-dev.32 → 8.0.0-rc.18-dev.34
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/{ast-DB7g9Mh2.d.mts → ast-DlajRqlB.d.mts} +3 -3
- package/dist/{ast-DB7g9Mh2.d.mts.map → ast-DlajRqlB.d.mts.map} +1 -1
- package/dist/{attribute-specs-BzBk62Jx.d.mts → attribute-specs-CKPSK8oZ.d.mts} +3 -3
- package/dist/{attribute-specs-BzBk62Jx.d.mts.map → attribute-specs-CKPSK8oZ.d.mts.map} +1 -1
- package/dist/authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts +9 -0
- package/dist/authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts.map +1 -0
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +7 -7
- package/dist/builder__types.d.mts +5 -5
- package/dist/{collection-methods-B-tM7OPZ-DzXedZdV.d.mts → collection-methods-BtJYB_5s-0fek2_wK.d.mts} +3 -3
- package/dist/{collection-methods-B-tM7OPZ-DzXedZdV.d.mts.map → collection-methods-BtJYB_5s-0fek2_wK.d.mts.map} +1 -1
- package/dist/collection-methods-CwBVxvll.d.mts +1 -0
- package/dist/{config-types-BkcCqeAg.mjs → config-types-Dc7u9onO.mjs} +2 -2
- package/dist/{config-types-BkcCqeAg.mjs.map → config-types-Dc7u9onO.mjs.map} +1 -1
- package/dist/{contract-builder-GH-eCIpl.d.mts → contract-builder-C7X80029.d.mts} +8 -5
- package/dist/{contract-builder-GH-eCIpl.d.mts.map → contract-builder-C7X80029.d.mts.map} +1 -1
- package/dist/{contract-builder-D3XaKpyw.mjs → contract-builder-CKfnPa4C.mjs} +2 -2
- package/dist/{contract-builder-D3XaKpyw.mjs.map → contract-builder-CKfnPa4C.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +7 -7
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{control-Db07JiRl.d.mts → control-B1Nyqky-.d.mts} +11 -15
- package/dist/{control-Db07JiRl.d.mts.map → control-B1Nyqky-.d.mts.map} +1 -1
- package/dist/{control-adapter-Bn0uhplA-BnsQY8_q.d.mts → control-adapter-Bn0uhplA-BBax-2PG.d.mts} +4 -4
- package/dist/{control-adapter-Bn0uhplA-BnsQY8_q.d.mts.map → control-adapter-Bn0uhplA-BBax-2PG.d.mts.map} +1 -1
- package/dist/{control-adapter-DgxEVzhZ.d.mts → control-adapter-QzlyTp1z.d.mts} +2 -2
- package/dist/{control-adapter-DgxEVzhZ.d.mts.map → control-adapter-QzlyTp1z.d.mts.map} +1 -1
- package/dist/{control-DbHnaxDE.mjs → control-jtTYvP_4.mjs} +5 -14
- package/dist/control-jtTYvP_4.mjs.map +1 -0
- package/dist/{db-BmrN9nRS-BGnRxI7X.d.mts → db-BmrN9nRS-DGNx3jwd.d.mts} +10 -10
- package/dist/{db-BmrN9nRS-BGnRxI7X.d.mts.map → db-BmrN9nRS-DGNx3jwd.d.mts.map} +1 -1
- package/dist/{ddl-types-CoP6yAw9-Cxc2zvi3.d.mts → ddl-types-BBrLVtS--u4u-I8L5.d.mts} +3 -3
- package/dist/{ddl-types-CoP6yAw9-Cxc2zvi3.d.mts.map → ddl-types-BBrLVtS--u4u-I8L5.d.mts.map} +1 -1
- package/dist/{default-mapping-CEISdj2g-DF1LzGBR.d.mts → default-mapping-CP8q4TfH-CF6eJMej.d.mts} +6 -4
- package/dist/default-mapping-CP8q4TfH-CF6eJMej.d.mts.map +1 -0
- package/dist/{derived-checks-B1qNxwBL-DFoGexId.mjs → derived-checks-CwbSfZ8d-B3-zWGv_.mjs} +31 -31
- package/dist/{derived-checks-B1qNxwBL-DFoGexId.mjs.map → derived-checks-CwbSfZ8d-B3-zWGv_.mjs.map} +1 -1
- package/dist/{diff-BN_3K9lv.d.mts → diff-DDjcnhgw.d.mts} +2 -2
- package/dist/{diff-BN_3K9lv.d.mts.map → diff-DDjcnhgw.d.mts.map} +1 -1
- package/dist/{expression-sOY1120I-DMTeGMQP.d.mts → expression-BdaU48Qq-Dff96hT_.d.mts} +4 -4
- package/dist/expression-BdaU48Qq-Dff96hT_.d.mts.map +1 -0
- package/dist/{expression-BzrfOiPC-CXjjRKqc.d.mts → expression-CC4544Y8-C_EWTA_0.d.mts} +4 -4
- package/dist/{expression-BzrfOiPC-CXjjRKqc.d.mts.map → expression-CC4544Y8-C_EWTA_0.d.mts.map} +1 -1
- package/dist/expression-DI_LoyKf.d.mts +2 -0
- package/dist/family.d.mts +11 -11
- package/dist/family.mjs +4 -4
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +2 -2
- package/dist/family__control.mjs +1 -1
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__migration.d.mts +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__psl-build.d.mts +3 -3
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/{functions-LyIMc_v9.d.mts → functions-wFi6AtCc.d.mts} +3 -3
- package/dist/{functions-LyIMc_v9.d.mts.map → functions-wFi6AtCc.d.mts.map} +1 -1
- package/dist/{generator-functions-BoE7Lc9d-MgcgdnPZ.mjs → generator-functions-DIXj2u8w-B_EpEY8t.mjs} +6 -6
- package/dist/generator-functions-DIXj2u8w-B_EpEY8t.mjs.map +1 -0
- package/dist/{index-Bw9Y19Js.d.mts → index-enjgL4Lb.d.mts} +17 -17
- package/dist/{index-Bw9Y19Js.d.mts.map → index-enjgL4Lb.d.mts.map} +1 -1
- package/dist/{index-reference-DJaQLZA3-DS-GPKXs.d.mts → index-reference-DSsn39tX-EEkv1N4w.d.mts} +3 -3
- package/dist/{index-reference-DJaQLZA3-DS-GPKXs.d.mts.map → index-reference-DSsn39tX-EEkv1N4w.d.mts.map} +1 -1
- package/dist/index-reference-burEIuXy.d.mts +1 -0
- package/dist/{interpreter-Bk0xpelv-4laiO5dH.mjs → interpreter-Dq32sxoS-BcLhPY0_.mjs} +11 -18
- package/dist/interpreter-Dq32sxoS-BcLhPY0_.mjs.map +1 -0
- package/dist/{middleware-oCT0RWkt-DGav7C8b.d.mts → middleware-C7H9kh01-l6_mYpN2.d.mts} +3 -3
- package/dist/{middleware-oCT0RWkt-DGav7C8b.d.mts.map → middleware-C7H9kh01-l6_mYpN2.d.mts.map} +1 -1
- package/dist/middleware-CpxZxPGp.d.mts +1 -0
- package/dist/{migration-go6YP7-v.d.mts → migration-BZJFz90J.d.mts} +2 -2
- package/dist/{migration-go6YP7-v.d.mts.map → migration-BZJFz90J.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +17 -17
- package/dist/{pack-DXEOdHaM.d.mts → pack-C4yN9ooT.d.mts} +3 -3
- package/dist/{pack-DXEOdHaM.d.mts.map → pack-C4yN9ooT.d.mts.map} +1 -1
- package/dist/{plan-Cbed2eDu-3c5s1Aq5.d.mts → plan-BiCLdXQr-0ZB4P6b9.d.mts} +3 -3
- package/dist/plan-BiCLdXQr-0ZB4P6b9.d.mts.map +1 -0
- package/dist/plan-xPa9B6I3.d.mts +2 -0
- package/dist/{psl-build-C41KHJL_.d.mts → psl-build-DETsH_kq.d.mts} +2 -2
- package/dist/{psl-build-C41KHJL_.d.mts.map → psl-build-DETsH_kq.d.mts.map} +1 -1
- package/dist/{psl-build-BYqCjsqi.mjs → psl-build-DzdzY3o1.mjs} +3 -2
- package/dist/{psl-build-BYqCjsqi.mjs.map → psl-build-DzdzY3o1.mjs.map} +1 -1
- package/dist/{psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts → psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts} +2 -2
- package/dist/{psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts.map → psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-BET6wtHZ-C_hO6YE1.mjs → psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs} +10 -13
- package/dist/psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs.map +1 -0
- package/dist/{psl-infer-CALmBIqX.d.mts → psl-infer-C-RcAyUr.d.mts} +2 -2
- package/dist/{psl-infer-CALmBIqX.d.mts.map → psl-infer-C-RcAyUr.d.mts.map} +1 -1
- package/dist/query-lane-context--sVodqqM.d.mts +1 -0
- package/dist/{query-lane-context-BLOPW1rQ-4vNq0fxJ.d.mts → query-lane-context-DEr9NHM--ClIM8v5T.d.mts} +5 -5
- package/dist/{query-lane-context-BLOPW1rQ-4vNq0fxJ.d.mts.map → query-lane-context-DEr9NHM--ClIM8v5T.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +13 -13
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- package/dist/relational-core__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +2 -2
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{sql-execution-plan-Dam5yMZg-bDl_0qHQ.d.mts → sql-execution-plan-BEhLlwYP-seGNP8Qr.d.mts} +3 -3
- package/dist/sql-execution-plan-BEhLlwYP-seGNP8Qr.d.mts.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-D_pb9QgR.d.mts → transaction-state-DR3nKTmH-2-ewbth1.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-D_pb9QgR.d.mts.map → transaction-state-DR3nKTmH-2-ewbth1.d.mts.map} +1 -1
- package/dist/types-BQC-To7K.d.mts +1 -0
- package/dist/{types-DlFdMaDJ-BEDwj-Qv.d.mts → types-DKSRuPhK-DuxW_ceI.d.mts} +4 -5
- package/dist/{types-DlFdMaDJ-BEDwj-Qv.d.mts.map → types-DKSRuPhK-DuxW_ceI.d.mts.map} +1 -1
- package/dist/{types-Cv5t6_Ly-BaGc023t.d.mts → types-Dy1w8GHm-7hJTBOLL.d.mts} +6 -6
- package/dist/{types-Cv5t6_Ly-BaGc023t.d.mts.map → types-Dy1w8GHm-7hJTBOLL.d.mts.map} +1 -1
- package/dist/{types-DVaVM20q-DrinF7w_.d.mts → types-GgcOrYm_-RhoxnXdj.d.mts} +10 -4
- package/dist/types-GgcOrYm_-RhoxnXdj.d.mts.map +1 -0
- package/package.json +18 -18
- package/dist/authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts +0 -9
- package/dist/authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts.map +0 -1
- package/dist/collection-methods-BNAu8vHk.d.mts +0 -1
- package/dist/control-DbHnaxDE.mjs.map +0 -1
- package/dist/default-mapping-CEISdj2g-DF1LzGBR.d.mts.map +0 -1
- package/dist/expression-CIBqCwC1.d.mts +0 -2
- package/dist/expression-sOY1120I-DMTeGMQP.d.mts.map +0 -1
- package/dist/generator-functions-BoE7Lc9d-MgcgdnPZ.mjs.map +0 -1
- package/dist/index-reference-CsxaNof9.d.mts +0 -1
- package/dist/interpreter-Bk0xpelv-4laiO5dH.mjs.map +0 -1
- package/dist/middleware-MgGkjEXt.d.mts +0 -1
- package/dist/plan-BOyVvttx.d.mts +0 -2
- package/dist/plan-Cbed2eDu-3c5s1Aq5.d.mts.map +0 -1
- package/dist/psl-field-resolution-BET6wtHZ-C_hO6YE1.mjs.map +0 -1
- package/dist/query-lane-context-BPJrXopg.d.mts +0 -1
- package/dist/sql-execution-plan-Dam5yMZg-bDl_0qHQ.d.mts.map +0 -1
- package/dist/types-DVaVM20q-DrinF7w_.d.mts.map +0 -1
- package/dist/types-VUCzaDbp.d.mts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-prisma7__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-prisma7/dist/provider.mjs"],"sourcesContent":["import { readFile, readdir, stat } from \"node:fs/promises\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\nimport { ArrayLiteralAst, BooleanLiteralExprAst, FunctionCallAst, IdentifierAst, ModelAttributeAst, NumberLiteralExprAst, PathExprAst, StringLiteralExprAst, dottedPathsIn, parse, printSyntax } from \"@internal/psl-parser/syntax\";\nimport { validateModelStorageReferences, validateSqlStorageConsistency } from \"@internal/sql-contract/validators\";\nimport { applySqlSpecifierControlPolicy, buildSqlContractFromDefinition } from \"@internal/sql-contract-ts/contract-builder\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { basename, dirname, extname, join, normalize } from \"pathe\";\nimport { entryForTag, getAuthoringTypeConstructor, instantiateAuthoringEntityType } from \"@internal/framework-components/authoring\";\nimport { buildSymbolTable, createPslDiagnosticCollector, diagnosticSource, keywordPslSpan, nodePslSpan, readResolvedAttribute } from \"@internal/psl-parser\";\nimport { sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\nimport { declaredBackingObjectName, declaredIndexesServeForeignKey } from \"@internal/sql-contract/foreign-key-materialization\";\nimport { lowerAuthoredIndex } from \"@internal/sql-contract/index-naming\";\nimport { deriveValueSetFromEntity } from \"@internal/sql-contract/value-set-derivation-hook\";\nimport { applyBackrelationCandidates, buildEntityTypesByDiscriminator, indexFkRelations, instantiateFieldTypeConstructor, normalizeReferentialAction, readDataTypeDefault } from \"@internal/sql-contract-psl/resolution\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { clipToUtf8Bytes, utf8ByteLength } from \"@internal/utils/text\";\nimport { fkRelationPairKey } from \"@internal/psl-parser/interpret\";\n//#region src/diagnostics.ts\nfunction prisma7Diagnostic(code, message, sourceId, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId,\n\t\t...span !== void 0 ? { span } : {}\n\t};\n}\nfunction andList(items) {\n\tconst leading = items.slice(0, -1);\n\tconst last = items[items.length - 1] ?? \"\";\n\treturn leading.length === 0 ? last : `${leading.join(\", \")} and ${last}`;\n}\nfunction fieldList(modelName, fieldNames) {\n\treturn andList(fieldNames.map((name) => `\"${modelName}.${name}\"`));\n}\n/** An `@ignore` field in the model's primary key: without it the model has no field that identifies a row. */\nfunction ignoredFieldInPrimaryKey(input) {\n\tconst fields = fieldList(input.modelName, input.fieldNames);\n\tconst one = input.fieldNames.length === 1;\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${input.usedBy} uses ${one ? \"it\" : \"them\"}, and without ${one ? \"it\" : \"them\"} model \"${input.modelName}\" has no field that identifies a row, so Prisma 8 could not update, delete or relate its rows. Remove @ignore from ${fields}: Prisma 7's next migration is then empty, and ${one ? \"the field appears\" : \"the fields appear\"} in the Prisma 7 client again. Or replace ${one ? \"it\" : \"them\"} with @@ignore on model \"${input.modelName}\": Prisma 7 then requires @ignore on every relation field that points to the model, its next migration is empty, Prisma 8 keeps the model's table with its primary key, and the model disappears from both clients.`, input.sourceId, input.span);\n}\n/** A relation that is not `@ignore` joins on `@ignore` fields: Prisma 8 relations join on fields, and the domain has no ignored field. */\nfunction ignoredFieldJoined(input) {\n\tconst fields = fieldList(input.modelName, input.fieldNames);\n\tconst one = input.fieldNames.length === 1;\n\tconst relation = `relation field \"${input.relationField}\"`;\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${relation} joins on ${one ? \"it\" : \"them\"}, and Prisma 8 relations join on fields. Remove @ignore from ${fields}: Prisma 7's next migration is then empty, and ${one ? \"the field appears\" : \"the fields appear\"} in the Prisma 7 client again. Or mark ${relation} @ignore as well: Prisma 7's next migration is then empty, the relation field disappears from the Prisma 7 client, and Prisma 8 keeps its foreign key while leaving the relation out of the contract's models.`, input.sourceId, input.span);\n}\n//#endregion\n//#region src/indexes.ts\nfunction parseIndexAttribute(attribute, owner, sourceId, indexTypes, diagnostics) {\n\tconst unsupported = (what, span) => {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED\", `\"${owner}\": @${attribute.name} ${what}`, sourceId, span));\n\t};\n\tlet fields;\n\tlet map;\n\tlet type;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"fields\" : arg.name;\n\t\tconst expression = arg.expression;\n\t\tswitch (key) {\n\t\t\tcase \"fields\": {\n\t\t\t\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\t\t\t\tif (array === void 0) return unsupported(\"expects a list of field names.\", arg.span);\n\t\t\t\tconst names = [];\n\t\t\t\tfor (const element of array.elements()) {\n\t\t\t\t\tconst path = PathExprAst.cast(element.syntax) ?? FunctionCallAst.cast(element.syntax)?.memberPath();\n\t\t\t\t\tif (path !== void 0) return unsupported(`lists the dotted path \"${path.path().join(\".\")}\"; an index lists fields of its model by name, and Prisma 7 refuses the path as an unknown field.`, arg.span);\n\t\t\t\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\t\t\t\tif (name === void 0) return unsupported(\"field arguments such as sort or length are not supported; Prisma 8 indexes carry none.\", arg.span);\n\t\t\t\t\tnames.push(name);\n\t\t\t\t}\n\t\t\t\tfields = names;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"map\":\n\t\t\t\tmap = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\t\t\t\tif (map === void 0) return unsupported(\"map must be a string.\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"name\": break;\n\t\t\tcase \"type\": {\n\t\t\t\tconst token = expression === void 0 ? void 0 : IdentifierAst.cast(expression.syntax)?.name();\n\t\t\t\ttype = token !== void 0 && Object.hasOwn(indexTypes, token) ? indexTypes[token] : void 0;\n\t\t\t\tif (type === void 0) return unsupported(`type \"${token ?? \"\"}\" is not an index type Prisma 8 supports.`, arg.span);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: return unsupported(`argument \"${key ?? \"\"}\" is not supported.`, arg.span);\n\t\t}\n\t}\n\treturn {\n\t\tfields,\n\t\tmap,\n\t\ttype,\n\t\tspan: attribute.span\n\t};\n}\n/**\n* A generated constraint name as Prisma 7 spells it: `base` cut so that\n* `base + suffix` is at most `maxBytes` bytes, cut on a character boundary,\n* with the suffix kept whole. Prisma 7.10.0 emits `..._aVeryLongCo_idx` for a\n* long `@@index`, `..._AB_pkey` and `..._B_index` for a long implicit junction,\n* and cuts a multi-byte name before the character that would cross the budget.\n*/\nfunction prisma7ConstraintName(base, suffix, maxBytes) {\n\treturn `${clipToUtf8Bytes(base, maxBytes - utf8ByteLength(suffix))}${suffix}`;\n}\n/** Prisma 7's default index name: `{table}_{columns}_idx`, or `_key` for a unique index, cut to `maxBytes`. */\nfunction defaultIndexName(tableName, columns, unique, maxBytes) {\n\treturn prisma7ConstraintName(`${tableName}_${columns.join(\"_\")}`, unique ? \"_key\" : \"_idx\", maxBytes);\n}\nfunction indexNode(tableName, columns, attribute, unique, maxBytes) {\n\treturn {\n\t\tcolumns,\n\t\t...attribute.type === void 0 ? {\n\t\t\ttype: void 0,\n\t\t\toptions: void 0\n\t\t} : {\n\t\t\ttype: attribute.type,\n\t\t\toptions: {}\n\t\t},\n\t\twhere: void 0,\n\t\tunique: unique ? true : void 0,\n\t\tmap: attribute.map ?? defaultIndexName(tableName, columns, unique, maxBytes),\n\t\tname: void 0\n\t};\n}\n//#endregion\n//#region src/constraint-names.ts\n/** Prisma 7's primary key name: `map`, or `{table}_pkey` cut to `maxBytes`. */\nfunction prisma7PrimaryKeyName(tableName, map, maxBytes) {\n\treturn map ?? prisma7ConstraintName(tableName, \"_pkey\", maxBytes);\n}\n/** Prisma 7's foreign key name: `map`, or `{table}_{columns}_fkey` cut to `maxBytes`. */\nfunction prisma7ForeignKeyName(tableName, columns, map, maxBytes) {\n\treturn map ?? prisma7ConstraintName(`${tableName}_${columns.join(\"_\")}`, \"_fkey\", maxBytes);\n}\n/** Prisma 7's primary key name for the junction table of an implicit many-to-many relation. */\nfunction prisma7JunctionPrimaryKeyName(relationName, maxBytes) {\n\treturn prisma7ConstraintName(`_${relationName}`, \"_AB_pkey\", maxBytes);\n}\n/** Prisma 7's name for the junction foreign key on column `A` or `B`. */\nfunction prisma7JunctionForeignKeyName(relationName, column, maxBytes) {\n\treturn prisma7ConstraintName(`_${relationName}`, `_${column}_fkey`, maxBytes);\n}\n/**\n* The name a contract states for a constraint Prisma 7 named `prisma7Name`: the name itself where the target would derive a different one, and `undefined` where the two agree, so the contract stays unnamed there and a table rename keeps deriving it.\n*/\nfunction statedConstraintName(prisma7Name, derivedName) {\n\treturn prisma7Name === derivedName ? void 0 : prisma7Name;\n}\n/**\n* Refuses a `map` on `@id`, `@@id`, `@unique`, `@@unique`, `@@index` or `@relation` longer than the database keeps, as Prisma 7 does. The database would store the name cut short, so a contract holding it whole would rename or drop a constraint the database does not have.\n*/\nfunction checkStatedConstraintNameLength(input) {\n\tconst { attribute, maxBytes } = input;\n\tconst mapArgument = attribute.args.find((arg) => arg.kind === \"named\" && arg.name === \"map\");\n\tconst expression = mapArgument?.expression;\n\tconst name = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (mapArgument === void 0 || name === void 0) return;\n\tconst bytes = utf8ByteLength(name);\n\tif (bytes <= maxBytes) return;\n\tconst spelling = `${attribute.node instanceof ModelAttributeAst ? \"@@\" : \"@\"}${attribute.name}`;\n\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_CONSTRAINT_NAME_TOO_LONG\", `${input.owner}: the name \"${name}\" in the map argument of ${spelling} is ${bytes} bytes, longer than the ${maxBytes} bytes the database keeps. Shorten the map to ${maxBytes} bytes or fewer; Prisma 7 refuses this name too.`, input.sourceId, mapArgument.span));\n}\n//#endregion\n//#region src/defaults.ts\n/** Positional argument keys per Prisma 7 default function, matching the target registry's signatures. */\nconst FUNCTION_ARGUMENT_KEYS = {\n\tuuid: [\"version\"],\n\tcuid: [\"version\"],\n\tnanoid: [\"size\"],\n\tnow: [],\n\tautoincrement: [],\n\tulid: []\n};\nfunction literalArgument(expression) {\n\tconst text = StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (text !== void 0) return text;\n\tconst number = NumberLiteralExprAst.cast(expression.syntax)?.value();\n\tif (number !== void 0) return number;\n\treturn BooleanLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction lowerPrisma7Default(input) {\n\tconst { attribute, field, sourceId, diagnostics } = input;\n\tconst label = `Field \"${input.modelName}.${field.name}\"`;\n\tconst unknown = (reason, span) => {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_DEFAULT\", `${label}: @default ${reason}`, sourceId, span));\n\t};\n\tconst argument = attribute.args.find((arg) => arg.kind === \"positional\");\n\tconst expression = argument?.expression;\n\tif (argument === void 0 || expression === void 0) return unknown(\"needs one value.\", attribute.span);\n\tconst call = FunctionCallAst.cast(expression.syntax);\n\tif (call !== void 0) return lowerFunction(call, input, label, unknown);\n\tconst scalar = scalarValue$1(expression, input, unknown);\n\tif (scalar === void 0) return void 0;\n\treturn {\n\t\tstorage: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: scalar,\n\t\t\tinStoredForm: true\n\t\t},\n\t\tonCreate: void 0\n\t};\n}\n/**\n* The stored value of a written default: an enum member resolves through the enum's members, and\n* every other value is read by the authoring entry for its syntax, cast into the column's data type\n* and validated by the column's codec — the same path the current schema language takes.\n*/\nfunction scalarValue$1(expression, input, unknown) {\n\tconst span = input.attribute.span;\n\tconst enumValue = enumMemberValue(expression, input);\n\tif (enumValue !== void 0) return enumValue;\n\tconst array = ArrayLiteralAst.cast(expression.syntax);\n\tconst elements = array === void 0 ? void 0 : [...array.elements()];\n\tif (elements?.some((element) => enumMemberValue(element, input) !== void 0) === true) {\n\t\tconst values = [];\n\t\tfor (const element of elements) {\n\t\t\tconst value = enumMemberValue(element, input);\n\t\t\tif (value === void 0) return unknown(\"lists may only hold literals or enum members.\", span);\n\t\t\tvalues.push(value);\n\t\t}\n\t\treturn values;\n\t}\n\tconst finer = finerThanColumn(elements ?? [expression], elements !== void 0, input);\n\tif (finer !== void 0) return unknown(finer, span);\n\tconst written = writtenLiteralFor(expression, elements, input);\n\tif (written === void 0) return unreadableValue(expression, input, unknown);\n\tconst jsonNull = jsonNullDefault(written, expression, input);\n\tif (jsonNull !== void 0) return jsonNull;\n\tconst read = readDataTypeDefault({\n\t\twritten,\n\t\tisList: input.field.list,\n\t\tcolumn: {\n\t\t\tcodecId: input.codecId,\n\t\t\ttypeParams: input.typeParams\n\t\t},\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypes: input.dataTypes,\n\t\tfieldPath: `${input.modelName}.${input.field.name}`\n\t});\n\treturn read.ok ? read.value : unknown(refusalReason(read.refusal), span);\n}\n/**\n* Why a written date and time is refused when it has more fraction digits than the column holds:\n* Prisma 7 let the database round it, so the reason names the value the database stores.\n*/\nfunction finerThanColumn(values, isList, input) {\n\tconst form = input.literalForm;\n\tif (form?.kind !== \"tag\" || form.finerThanColumn === void 0) return void 0;\n\tfor (const [index, value] of values.entries()) {\n\t\tconst text = StringLiteralExprAst.cast(value.syntax)?.value();\n\t\tconst finer = text === void 0 ? void 0 : form.finerThanColumn(text);\n\t\tif (text === void 0 || finer === void 0) continue;\n\t\tconst at = isList ? ` at element ${index + 1}` : \"\";\n\t\tconst writtenDigits = /\\.(\\d+)/.exec(text)?.[1]?.length ?? 0;\n\t\tconst held = finer.heldDigits === 0 ? \"none\" : String(finer.heldDigits);\n\t\treturn `holds \"${text}\"${at}, with ${writtenDigits} ${writtenDigits === 1 ? \"digit\" : \"digits\"} after the decimal point, but the column holds ${held}. PostgreSQL stores it as \"${finer.stored}\"; write that instead.`;\n\t}\n}\n/** The storage value of an enum member name, when the field is typed by a Prisma 7 enum. */\nfunction enumMemberValue(expression, input) {\n\tconst member = IdentifierAst.cast(expression.syntax)?.name();\n\treturn member === void 0 ? void 0 : input.enumMembers?.get(member);\n}\nfunction writtenLiteralFor(expression, elements, input) {\n\tif (elements === void 0) return writtenLiteral(expression, input);\n\tconst written = [];\n\tfor (const element of elements) {\n\t\tconst elementLiteral = writtenLiteral(element, input);\n\t\tif (elementLiteral === void 0) return void 0;\n\t\twritten.push(elementLiteral);\n\t}\n\treturn {\n\t\tkind: \"list\",\n\t\telements: written\n\t};\n}\n/**\n* The JSON value null, which the contract cannot tell apart from SQL NULL, reported before the\n* column's codec sees the literal.\n*/\nfunction jsonNullDefault(written, expression, input) {\n\tif (input.literalForm?.kind !== \"json\") return void 0;\n\tconst value = jsonDocumentOf(written, input);\n\tif (value === void 0) return void 0;\n\tif (!(Array.isArray(value) ? value.includes(null) : value === null)) return void 0;\n\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JSON_NULL_DEFAULT_UNSUPPORTED\", `Field \"${input.modelName}.${input.field.name}\": @default(${printSyntax(expression.syntax).trim()}) ${written.kind === \"list\" ? \"holds\" : \"is\"} the JSON value null, which the contract cannot tell apart from SQL NULL. Remove the @default or give it another JSON value; either changes the column default on Prisma 7's next migration.`, input.sourceId, input.attribute.span));\n}\n/** A `@default(...)` this contract source cannot read as a literal at all. */\nfunction unreadableValue(expression, input, unknown) {\n\tconst span = input.attribute.span;\n\tconst identifier = IdentifierAst.cast(expression.syntax)?.name();\n\tif (identifier !== void 0) return unknown(input.enumMembers === void 0 ? `refers to \"${identifier}\", but the field is not an enum.` : `refers to \"${identifier}\", which is not a member of the field's enum.`, span);\n\tif (ArrayLiteralAst.cast(expression.syntax) !== void 0) return unknown(\"lists may only hold literals or enum members.\", span);\n\treturn unknown(\"holds a value this contract source does not read.\", span);\n}\n/** The written literal a Prisma 7 expression is, or `undefined` when it is not a literal at all. */\nfunction writtenLiteral(expression, input) {\n\tconst text = StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (text !== void 0) {\n\t\tconst form = input.literalForm;\n\t\tif (form?.kind === \"json\") return {\n\t\t\tkind: \"tag\",\n\t\t\ttag: \"json\",\n\t\t\ttext\n\t\t};\n\t\tif (form?.kind === \"tag\") {\n\t\t\tconst body = form.body(text);\n\t\t\treturn body === void 0 ? void 0 : {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: form.tag,\n\t\t\t\ttext: body\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NumberLiteralExprAst.cast(expression.syntax)?.token()?.text;\n\tif (number !== void 0) return {\n\t\tkind: \"number\",\n\t\ttext: number\n\t};\n\tconst boolean = BooleanLiteralExprAst.cast(expression.syntax)?.value();\n\treturn boolean === void 0 ? void 0 : {\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t};\n}\n/**\n* The document a written JSON value holds, read through the same entry the interpreter uses, or\n* `undefined` when the body is not a document.\n*/\nfunction jsonDocumentOf(written, input) {\n\tconst entry = entryForTag(input.dataTypes, \"json\");\n\tif (entry === void 0 || entry.entry.written.kind !== \"tag\") return void 0;\n\tconst bodies = written.kind === \"list\" ? written.elements.flatMap((element) => element.kind === \"tag\" ? [element.text] : []) : written.kind === \"tag\" ? [written.text] : [];\n\tconst parse = entry.entry.written.parse;\n\ttry {\n\t\tconst documents = bodies.map((body) => parse(body));\n\t\treturn written.kind === \"list\" ? documents : documents[0];\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Why the column refused the value, as a phrase following `@default `. */\nfunction refusalReason(refusal) {\n\tconst at = refusal.elementIndex === void 0 ? \"\" : ` at element ${refusal.elementIndex + 1}`;\n\tswitch (refusal.kind) {\n\t\tcase \"unreadable\": return `holds text${at} that this contract source does not read: ${refusal.message}`;\n\t\tcase \"unknown-tag\": return `holds a ${refusal.tag} literal${at}, which this stack does not register.`;\n\t\tcase \"unwritable\": return `holds a ${refusal.syntax} value${at}, which this target has no data type for.`;\n\t\tcase \"not-a-list\": return \"holds a single value on a list column, which takes a list literal.\";\n\t\tcase \"no-cast\": return `holds a ${refusal.valueType} value${at}, which ${refusal.receivingType} has no cast from; ${describeCasts(refusal.casts)}.`;\n\t\tcase \"no-list-cast\": return `holds a list, which ${refusal.receivingType} has no cast from; ${describeCasts(refusal.casts)}.`;\n\t\tcase \"no-element-cast\": return `holds a ${refusal.valueType} value${at}, which the list cast of ${refusal.receivingType} does not take; it takes ${refusal.elementTypes.join(\", \")}.`;\n\t\tcase \"refused-by-column\": return `holds a value${at} that ${refusal.codecId} does not read: ${refusal.message}`;\n\t}\n}\nfunction describeCasts(casts) {\n\treturn casts.length === 0 ? \"it casts from nothing\" : `it casts from ${casts.join(\", \")}`;\n}\nfunction lowerFunction(call, input, label, unknown) {\n\tconst fn = call.path().join(\".\");\n\tconst span = input.attribute.span;\n\tconst callArgs = [...call.args()];\n\tif (fn === \"dbgenerated\") return dbgeneratedDefault(callArgs, unknown, span);\n\tconst keys = FUNCTION_ARGUMENT_KEYS[fn];\n\tconst entry = input.controlMutationDefaults.defaultFunctionRegistry.get(fn);\n\tif (keys === void 0 || entry === void 0 && !input.generatorFunctions.has(fn)) return unknown(`function \"${fn}()\" is not a Prisma 7 default function this target supports.`, span);\n\tconst args = {};\n\tlet index = 0;\n\tfor (const arg of callArgs) {\n\t\tconst key = arg.name()?.name() ?? keys[index];\n\t\tconst value = arg.value();\n\t\tconst literal = value === void 0 ? void 0 : literalArgument(value);\n\t\tif (key === void 0 || literal === void 0) return unknown(`function \"${fn}()\" has an argument this contract source does not read.`, span);\n\t\targs[key] = literal;\n\t\tindex += 1;\n\t}\n\tif (fn === \"cuid\") args[\"version\"] = 2;\n\tif (entry === void 0) {\n\t\tconst resolution = input.generatorFunctions.resolve({\n\t\t\tname: fn,\n\t\t\targs\n\t\t}, {\n\t\t\tcodecId: input.codecId,\n\t\t\ttypeParams: input.typeParams\n\t\t});\n\t\tif (resolution.ok) return {\n\t\t\tstorage: void 0,\n\t\t\tonCreate: resolution.generator\n\t\t};\n\t\tif (resolution.reason === \"refused\") {\n\t\t\tconst written = input.attribute.args.find((arg) => arg.kind === \"positional\")?.value.trim() ?? `${fn}()`;\n\t\t\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_GENERATOR_REFUSED\", `${label}: @default(${written}) cannot fill its column: ${resolution.message}`, input.sourceId, span));\n\t\t\treturn;\n\t\t}\n\t\treturn unknown(`function \"${fn}()\" cannot fill a column of codec \"${input.codecId}\".`, span);\n\t}\n\tconst lowered = entry.lower({\n\t\tcall: {\n\t\t\tfn,\n\t\t\tspan,\n\t\t\targs\n\t\t},\n\t\tcontext: {\n\t\t\tsourceId: input.sourceId,\n\t\t\tmodelName: input.modelName,\n\t\t\tfieldName: input.field.name,\n\t\t\tcolumnCodecId: input.codecId\n\t\t}\n\t});\n\tif (!lowered.ok) {\n\t\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_DEFAULT\", `${label}: ${lowered.diagnostic.message}`, input.sourceId, span));\n\t\treturn;\n\t}\n\treturn {\n\t\tstorage: lowered.value.defaultValue,\n\t\tonCreate: void 0\n\t};\n}\n/**\n* Prisma 7's `dbgenerated(\"<sql>\")` is a raw SQL default, carried as written; the empty form\n* `dbgenerated()` means the column has no default. Prisma 7 refuses a blank string, so this\n* source does too.\n*/\nfunction dbgeneratedDefault(callArgs, unknown, span) {\n\tif (callArgs.length === 0) return {\n\t\tstorage: void 0,\n\t\tonCreate: void 0\n\t};\n\tconst [argument] = callArgs;\n\tconst value = argument?.value();\n\tconst expression = callArgs.length === 1 && argument?.name() === void 0 && value !== void 0 ? StringLiteralExprAst.cast(value.syntax)?.value() : void 0;\n\tif (expression === void 0 || expression.trim() === \"\") return unknown(\"function \\\"dbgenerated()\\\" has an argument this contract source does not read.\", span);\n\treturn {\n\t\tstorage: {\n\t\t\tkind: \"function\",\n\t\t\texpression\n\t\t},\n\t\tonCreate: void 0\n\t};\n}\n//#endregion\n//#region src/native-types.ts\nfunction prisma7ScalarMapping(typeMap, scalar) {\n\treturn Object.hasOwn(typeMap.scalars, scalar) ? typeMap.scalars[scalar] : void 0;\n}\nfunction prisma7NativeTypeMapping(typeMap, nativeType, args) {\n\tconst mapping = Object.hasOwn(typeMap.nativeTypes, nativeType) ? typeMap.nativeTypes[nativeType] : void 0;\n\tif (mapping === void 0) return void 0;\n\treturn args.length === 0 ? mapping : {\n\t\tconstructorName: mapping.constructorName,\n\t\targs\n\t};\n}\n//#endregion\n//#region src/relations.ts\n/** The codes `applyBackrelationCandidates` reports, each shown as `PSL.PRISMA7_RELATION_UNRESOLVED`. */\nconst RELATION_PAIRING_CODES = /* @__PURE__ */ new Set([\n\t\"PSL_ORPHANED_BACKRELATION\",\n\t\"PSL_AMBIGUOUS_BACKRELATION\",\n\t\"PSL_NON_UNIQUE_BACKRELATION\",\n\t\"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\"PSL_JUNCTION_ID_NOT_FK_COVERING\",\n\t\"PSL_JUNCTION_TARGET_FK_NOT_ID\"\n]);\nfunction identifierNames(expression) {\n\tif (expression === void 0) return void 0;\n\tconst array = ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return void 0;\n\tconst names = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name === void 0) return void 0;\n\t\tnames.push(name);\n\t}\n\treturn names;\n}\nfunction stringValue(expression) {\n\treturn expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nconst PRISMA7_REFERENTIAL_ACTIONS = /* @__PURE__ */ new Set([\n\t\"Cascade\",\n\t\"Restrict\",\n\t\"NoAction\",\n\t\"SetNull\",\n\t\"SetDefault\"\n]);\nfunction actionValue(expression) {\n\tconst token = expression === void 0 ? void 0 : IdentifierAst.cast(expression.syntax)?.name();\n\treturn token !== void 0 && PRISMA7_REFERENTIAL_ACTIONS.has(token) ? normalizeReferentialAction(token) : void 0;\n}\nfunction parseRelationAttribute(attribute, label, sourceId, diagnostics) {\n\tlet name;\n\tlet map;\n\tlet fields;\n\tlet references;\n\tlet onDelete;\n\tlet onUpdate;\n\tconst invalid = (what, span) => {\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${label}: @relation ${what}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t};\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"name\" : arg.name;\n\t\tswitch (key) {\n\t\t\tcase \"name\":\n\t\t\t\tname = stringValue(arg.expression);\n\t\t\t\tif (name === void 0) return invalid(\"name must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"fields\":\n\t\t\t\tfields = identifierNames(arg.expression);\n\t\t\t\tif (fields === void 0) return invalid(\"fields must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"references\":\n\t\t\t\treferences = identifierNames(arg.expression);\n\t\t\t\tif (references === void 0) return invalid(\"references must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onDelete\":\n\t\t\t\tonDelete = actionValue(arg.expression);\n\t\t\t\tif (onDelete === void 0) return invalid(\"onDelete must be a referential action\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onUpdate\":\n\t\t\t\tonUpdate = actionValue(arg.expression);\n\t\t\t\tif (onUpdate === void 0) return invalid(\"onUpdate must be a referential action\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"map\":\n\t\t\t\tmap = stringValue(arg.expression);\n\t\t\t\tif (map === void 0) return invalid(\"map must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\tdefault: return invalid(`argument \"${key ?? \"\"}\" is not supported`, arg.span);\n\t\t}\n\t}\n\treturn {\n\t\tname,\n\t\tmap,\n\t\tfields,\n\t\treferences,\n\t\tonDelete,\n\t\tonUpdate,\n\t\tspan: attribute.span\n\t};\n}\nfunction storageColumn(model, fieldName) {\n\treturn model.columns.get(fieldName) ?? model.ignoredColumns.get(fieldName);\n}\n/** A foreign key reaches a table with a model through the model, and an `@@ignore` model's table by its name. */\nfunction referenceTo(model, columns) {\n\tconst table = {\n\t\ttable: model.tableName,\n\t\tcolumns,\n\t\tnamespaceId: model.namespaceId\n\t};\n\treturn model.ignored ? table : {\n\t\tmodel: model.modelName,\n\t\t...table\n\t};\n}\nfunction columnNames(model, fieldNames) {\n\tconst columns = [];\n\tfor (const fieldName of fieldNames) {\n\t\tconst column = storageColumn(model, fieldName);\n\t\tif (column === void 0) return void 0;\n\t\tcolumns.push(column.columnName);\n\t}\n\treturn columns;\n}\nfunction unresolved(label, reason, sourceId, span) {\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_RELATION_UNRESOLVED\", `${label} ${reason}`, sourceId, span);\n}\nfunction groupBy(items, keyOf) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const item of items) {\n\t\tconst group = groups.get(keyOf(item)) ?? [];\n\t\tgroups.set(keyOf(item), group);\n\t\tgroup.push(item);\n\t}\n\treturn groups;\n}\nfunction orderJunctionSides(requester, partner) {\n\treturn (requester.model === partner.model ? requester.field.field.name < partner.field.field.name : requester.model.modelName < partner.model.modelName) ? [requester, partner] : [partner, requester];\n}\nfunction junctionKey(namespaceId, name) {\n\treturn JSON.stringify([namespaceId, name]);\n}\n/**\n* Prisma 7's default relation name: the two model names in alphabetical\n* order joined by `To`. Giving every unnamed relation that name lets the\n* shared pairing helper match Prisma 7's rule that an unnamed side pairs only\n* with the unnamed side of the same model pair.\n*/\nfunction effectiveRelationName(attribute, modelName, targetModelName) {\n\tif (attribute?.name !== void 0) return attribute.name;\n\tconst [first, second] = modelName < targetModelName ? [modelName, targetModelName] : [targetModelName, modelName];\n\treturn `${first}To${second}`;\n}\n/**\n* Prisma 7 accepts `SetNull` over a required field and `SetDefault` over a\n* required field with no default, and writes them into the foreign key; the\n* contract rejects both, because the action would fail the first time it runs.\n*/\nfunction referentialActionRejections(input) {\n\tconst { model, relationField, label, fieldNames, span } = input;\n\tconst anotherAction = \"choose another action, which replaces the foreign key on Prisma 7's next migration and leaves the Prisma 7 client unchanged.\";\n\tconst fieldsWhere = (predicate) => fieldNames.filter((name) => {\n\t\tconst column = storageColumn(model, name);\n\t\treturn column !== void 0 && predicate(column);\n\t});\n\tconst rejections = [];\n\tfor (const [key, action] of Object.entries(input.actions)) {\n\t\tif (action === \"setNull\") {\n\t\t\tconst required = fieldsWhere((column) => !column.nullable);\n\t\t\tif (required.length === 0) continue;\n\t\t\tconst fields = fieldList(model.modelName, required);\n\t\t\trejections.push(prisma7Diagnostic(\"PSL.PRISMA7_REFERENTIAL_ACTION_UNSUPPORTED\", `${label}: ${key}: SetNull sets the foreign key fields to null, but ${fields} ${required.length === 1 ? \"is\" : \"are\"} required, so Prisma 8 cannot describe this foreign key. Make ${fields}${relationField.optional ? \"\" : ` and \"${model.modelName}.${relationField.name}\"`} optional, which drops NOT NULL on Prisma 7's next migration and makes ${required.length === 1 && relationField.optional ? \"it\" : \"them\"} nullable in the Prisma 7 client, or ${anotherAction}`, model.sourceId, span));\n\t\t}\n\t\tif (action === \"setDefault\") {\n\t\t\tconst withoutDefault = fieldsWhere((column) => !column.nullable && column.default === void 0);\n\t\t\tif (withoutDefault.length === 0) continue;\n\t\t\tconst fields = fieldList(model.modelName, withoutDefault);\n\t\t\tconst one = withoutDefault.length === 1;\n\t\t\tconst generated = withoutDefault.filter((name) => model.columns.get(name)?.executionDefaults?.onCreate !== void 0);\n\t\t\tconst plain = withoutDefault.filter((name) => !generated.includes(name));\n\t\t\tconst generatorNote = generated.length > 0 ? \" (a client-side generator such as uuid() does not give the column one)\" : \"\";\n\t\t\tconst example = \"a column default, such as a literal or @default(dbgenerated(\\\"<expression>\\\"))\";\n\t\t\tconst plainFields = fieldList(model.modelName, plain);\n\t\t\tconst generatedFields = fieldList(model.modelName, generated);\n\t\t\tconst edit = generated.length === 0 ? `Give ${plainFields} ${example}` : plain.length === 0 ? `Replace the @default on ${generatedFields} with ${example}, because a field takes only one @default` : `Give ${plainFields} ${example}, and replace the @default on ${generatedFields} with one, because a field takes only one @default`;\n\t\t\tconst effects = [\n\t\t\t\t`Prisma 7's next migration sets ${one ? \"it\" : \"them\"}`,\n\t\t\t\t...plain.length > 0 ? [`${plainFields} ${plain.length === 1 ? \"becomes\" : \"become\"} optional when creating records with the Prisma 7 client`] : [],\n\t\t\t\t...generated.length > 0 ? [`the Prisma 7 client stops generating ${generated.length === 1 ? \"a value\" : \"values\"} for ${generatedFields}`] : []\n\t\t\t];\n\t\t\trejections.push(prisma7Diagnostic(\"PSL.PRISMA7_REFERENTIAL_ACTION_UNSUPPORTED\", `${label}: ${key}: SetDefault sets the foreign key fields to their column defaults, but ${fields} ${one ? \"is\" : \"are\"} required and ${one ? \"has\" : \"have\"} no column default${generatorNote}, so Prisma 8 cannot describe this foreign key. ${edit}: ${andList(effects)}. Or ${anotherAction}`, model.sourceId, span));\n\t\t}\n\t}\n\treturn rejections;\n}\nfunction lowerRelations(models, naming, diagnostics) {\n\tconst fkRelationMetadata = [];\n\tconst candidates = [];\n\tconst invalidFkPairings = [];\n\tconst foreignKeys = /* @__PURE__ */ new Map();\n\tconst junctions = /* @__PURE__ */ new Map();\n\tconst ignoredJunctions = /* @__PURE__ */ new Map();\n\tconst reportedJunctionNames = /* @__PURE__ */ new Set();\n\tconst junctionRequests = [];\n\tconst addForeignKey = (modelName, node) => {\n\t\tconst existing = foreignKeys.get(modelName) ?? [];\n\t\tforeignKeys.set(modelName, existing);\n\t\texisting.push(node);\n\t};\n\tconst isFkSide = (relationField) => relationField.attribute?.fields !== void 0;\n\tconst sameName = (left, right) => left.attribute?.name === right.attribute?.name;\n\tconst rejectFkSide = (model, relationField, ...rejections) => {\n\t\tdiagnostics.push(...rejections);\n\t\tinvalidFkPairings.push({\n\t\t\tpairKey: fkRelationPairKey(model.modelName, relationField.targetModelName),\n\t\t\trelationName: effectiveRelationName(relationField.attribute, model.modelName, relationField.targetModelName)\n\t\t});\n\t};\n\tfor (const model of models.values()) for (const relationField of [...model.relationFields, ...model.ignoredRelationFields]) {\n\t\tconst { field, targetModelName } = relationField;\n\t\tconst label = `Relation field \"${model.modelName}.${field.name}\"`;\n\t\tconst target = models.get(targetModelName);\n\t\tif (target === void 0) continue;\n\t\tif (isFkSide(relationField)) {\n\t\t\tconst attribute = relationField.attribute;\n\t\t\tif (attribute === void 0 || attribute.fields === void 0) continue;\n\t\t\tconst ignoredRelation = model.ignoredRelationFields.includes(relationField);\n\t\t\tconst joinedIgnored = ignoredRelation ? [] : [{\n\t\t\t\towner: model,\n\t\t\t\tnames: attribute.fields\n\t\t\t}, {\n\t\t\t\towner: target,\n\t\t\t\tnames: attribute.references ?? []\n\t\t\t}].flatMap(({ owner, names }) => {\n\t\t\t\tconst ignored = names.filter((name) => owner.ignoredFields.has(name));\n\t\t\t\treturn ignored.length === 0 ? [] : [ignoredFieldJoined({\n\t\t\t\t\tmodelName: owner.modelName,\n\t\t\t\t\tfieldNames: ignored,\n\t\t\t\t\trelationField: `${model.modelName}.${field.name}`,\n\t\t\t\t\tsourceId: model.sourceId,\n\t\t\t\t\tspan: attribute.span\n\t\t\t\t})];\n\t\t\t});\n\t\t\tif (joinedIgnored.length > 0) {\n\t\t\t\trejectFkSide(model, relationField, ...joinedIgnored);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (attribute.references === void 0) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"declares fields without references.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (attribute.fields.some((name) => model.rejectedFields.has(name)) || attribute.references.some((name) => target.rejectedFields.has(name))) {\n\t\t\t\trejectFkSide(model, relationField);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst localColumns = columnNames(model, attribute.fields);\n\t\t\tconst referencedColumns = columnNames(target, attribute.references);\n\t\t\tif (localColumns === void 0 || referencedColumns === void 0) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"names a field that is not a scalar column of the model or its target.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (localColumns.length !== referencedColumns.length) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"must list as many fields as references.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst nullability = attribute.fields.map((name) => storageColumn(model, name)?.nullable === true);\n\t\t\tconst anyNullable = nullability.includes(true);\n\t\t\tif (anyNullable && !field.optional) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"must be optional because one of its fields is optional.\", model.sourceId, field.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst onDelete = attribute.onDelete ?? (nullability.includes(false) ? \"restrict\" : \"setNull\");\n\t\t\tconst onUpdate = attribute.onUpdate ?? \"cascade\";\n\t\t\tconst actionRejections = referentialActionRejections({\n\t\t\t\tmodel,\n\t\t\t\trelationField: field,\n\t\t\t\tlabel,\n\t\t\t\tfieldNames: attribute.fields,\n\t\t\t\tactions: {\n\t\t\t\t\tonDelete,\n\t\t\t\t\tonUpdate\n\t\t\t\t},\n\t\t\t\tspan: attribute.span\n\t\t\t});\n\t\t\tif (actionRejections.length > 0) {\n\t\t\t\trejectFkSide(model, relationField, ...actionRejections);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst foreignKeyName = statedConstraintName(prisma7ForeignKeyName(model.tableName, localColumns, attribute.map, naming.identifierMaxBytes), naming.defaultConstraintNames.foreignKey(model.tableName, localColumns));\n\t\t\taddForeignKey(model.modelName, {\n\t\t\t\t...ifDefined(\"name\", foreignKeyName),\n\t\t\t\tcolumns: localColumns,\n\t\t\t\treferences: referenceTo(target, referencedColumns),\n\t\t\t\tonDelete,\n\t\t\t\tonUpdate,\n\t\t\t\tindex: false\n\t\t\t});\n\t\t\tif (ignoredRelation) continue;\n\t\t\tfkRelationMetadata.push({\n\t\t\t\tdeclaringModelName: model.modelName,\n\t\t\t\tdeclaringFieldName: field.name,\n\t\t\t\tdeclaringTableName: model.tableName,\n\t\t\t\tdeclaringNamespaceId: model.namespaceId,\n\t\t\t\ttargetModelName: target.modelName,\n\t\t\t\ttargetTableName: target.tableName,\n\t\t\t\ttargetNamespaceId: target.namespaceId,\n\t\t\t\trelationName: effectiveRelationName(attribute, model.modelName, target.modelName),\n\t\t\t\tnullable: anyNullable,\n\t\t\t\tlocalColumns,\n\t\t\t\treferencedColumns\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst ignoredPair = model.ignoredRelationFields.includes(relationField) || target.ignoredRelationFields.some((other) => other.targetModelName === model.modelName && sameName(other, relationField));\n\t\tconst targetRelationFields = [...target.relationFields, ...target.ignoredRelationFields];\n\t\tif (targetRelationFields.filter((other) => other.targetModelName === model.modelName && isFkSide(other) && sameName(other, relationField)).length > 0 || !field.list) {\n\t\t\tif (ignoredPair) continue;\n\t\t\tcandidates.push({\n\t\t\t\tmodelName: model.modelName,\n\t\t\t\ttableName: model.tableName,\n\t\t\t\tfield,\n\t\t\t\ttargetModelName: target.modelName,\n\t\t\t\tisList: field.list,\n\t\t\t\trelationName: effectiveRelationName(relationField.attribute, model.modelName, target.modelName)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst partners = targetRelationFields.filter((other) => other !== relationField && other.targetModelName === model.modelName && other.field.list && !isFkSide(other) && sameName(other, relationField));\n\t\tconst [partner] = partners;\n\t\tif (partner === void 0) {\n\t\t\tdiagnostics.push(unresolved(label, `has no matching relation field on \"${target.modelName}\".`, model.sourceId, field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tif (partners.length > 1 || target === model && relationField.attribute?.name === void 0) {\n\t\t\tdiagnostics.push(unresolved(label, `is ambiguous: more than one list field on \"${target.modelName}\" could pair with it. Name both sides with @relation(\"name\").`, model.sourceId, field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst junctionName = effectiveRelationName(relationField.attribute, model.modelName, target.modelName);\n\t\tconst requester = {\n\t\t\tmodel,\n\t\t\tfield: relationField\n\t\t};\n\t\tconst partnerSide = {\n\t\t\tmodel: target,\n\t\t\tfield: partner\n\t\t};\n\t\tconst junctionNamespaceId = orderJunctionSides(requester, partnerSide)[0].model.namespaceId;\n\t\tconst namesake = models.get(junctionName);\n\t\tif (namesake !== void 0 && namesake.namespaceId === junctionNamespaceId) {\n\t\t\tconst reportedKey = junctionKey(junctionNamespaceId, junctionName);\n\t\t\tif (!reportedJunctionNames.has(reportedKey)) {\n\t\t\t\treportedJunctionNames.add(reportedKey);\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JUNCTION_NAME_COLLISION\", `${label} is an implicit many-to-many relation whose junction model would be named \"${junctionName}\", but model \"${junctionName}\" already has that name. Rename model \"${junctionName}\" and keep its table with @@map(\"${namesake.tableName}\"); Prisma 7's next migration is then empty.`, model.sourceId, field.span));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tjunctionRequests.push({\n\t\t\trequester,\n\t\t\tpartner: partnerSide,\n\t\t\tname: junctionName,\n\t\t\tignored: ignoredPair\n\t\t});\n\t}\n\tconst requestsByJunction = groupBy(junctionRequests, (request) => junctionKey(orderJunctionSides(request.requester, request.partner)[0].model.namespaceId, request.name));\n\tfor (const requests of requestsByJunction.values()) {\n\t\tconst [first] = requests;\n\t\tif (first === void 0) continue;\n\t\tconst name = first.name;\n\t\tconst [sideA] = orderJunctionSides(first.requester, first.partner);\n\t\tconst tableName = prisma7ConstraintName(`_${name}`, \"\", naming.identifierMaxBytes);\n\t\tconst sideLabel = (side) => `${side.model.modelName}.${side.field.field.name}`;\n\t\tconst pairs = /* @__PURE__ */ new Map();\n\t\tfor (const request of requests) {\n\t\t\tconst key = [sideLabel(request.requester), sideLabel(request.partner)].sort().join(\"|\");\n\t\t\tif (!pairs.has(key)) pairs.set(key, request);\n\t\t}\n\t\tif (pairs.size > 1) {\n\t\t\tconst pairRequests = [...pairs.values()];\n\t\t\tfor (const request of pairRequests) {\n\t\t\t\tconst others = pairRequests.filter((other) => other !== request).map((other) => `\"${sideLabel(other.requester)}\"`);\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_RELATION_NAME_SHARED\", `Relation field \"${sideLabel(request.requester)}\" is an implicit many-to-many relation named \"${name}\", and so ${others.length === 1 ? \"is relation field\" : \"are relation fields\"} ${andList(others)}; Prisma 7 creates one table \"${tableName}\" for them, wired to only one of the relations (its foreign keys show which). Give each relation its own name with @relation(\"<name>\") on both fields: renaming a relation that \"${tableName}\" does not reference makes Prisma 7's next migration create its own table, while renaming the one it references moves \"${tableName}\"'s foreign keys to another relation, which fails on rows whose ids that relation's models lack and attaches the rest to the wrong records.`, request.requester.model.sourceId, request.requester.field.field.span));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tconst tableOwner = [...models.values()].find((other) => other.tableName === tableName && other.namespaceId === sideA.model.namespaceId);\n\t\tif (tableOwner !== void 0) {\n\t\t\tconst relationField = `${first.requester.model.modelName}.${first.requester.field.field.name}`;\n\t\t\tconst message = `Model \"${tableOwner.modelName}\" and the implicit many-to-many relation \"${relationField}\" both use table \"${tableOwner.namespaceId}\".\"${tableName}\"; Prisma 7 creates the relation's table there and never creates the model's. Rename the model's table with @@map, which makes Prisma 7's next migration create it, or give the relation its own name with @relation(\"<name>\") on both fields, which makes Prisma 7's next migration rebuild \"${tableName}\" as the model's table and create an empty table for the relation, losing the relation's rows.`;\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", message, tableOwner.sourceId, tableOwner.tableSpan), prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", message, first.requester.model.sourceId, first.requester.field.field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const { requester, partner, ignored } of requests) {\n\t\t\tconst junction = synthesizeJunction(requester, partner, naming, diagnostics);\n\t\t\tif (junction === void 0) continue;\n\t\t\tif (ignored) {\n\t\t\t\tignoredJunctions.set(junction.key, junction.table);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!junctions.has(junction.key)) {\n\t\t\t\tjunctions.set(junction.key, junctionModel(junction.name, junction.table));\n\t\t\t\tfkRelationMetadata.push(...junction.foreignKeys);\n\t\t\t}\n\t\t\tcandidates.push({\n\t\t\t\tmodelName: requester.model.modelName,\n\t\t\t\ttableName: requester.model.tableName,\n\t\t\t\tfield: requester.field.field,\n\t\t\t\ttargetModelName: partner.model.modelName,\n\t\t\t\tisList: true,\n\t\t\t\trelationName: junction.candidateRelationName\n\t\t\t});\n\t\t}\n\t}\n\tconst { modelRelations, fkRelationsByPair, fkRelationsByDeclaringModel } = indexFkRelations({ fkRelationMetadata });\n\tconst modelIdColumns = /* @__PURE__ */ new Map();\n\tconst modelUniqueColumnSets = /* @__PURE__ */ new Map();\n\tfor (const model of models.values()) {\n\t\tconst id = columnNames(model, model.idFields);\n\t\tif (id !== void 0 && id.length > 0) modelIdColumns.set(model.modelName, id);\n\t\tconst sets = [];\n\t\tif (id !== void 0 && id.length > 0) sets.push(id);\n\t\tfor (const unique of model.uniqueFieldSets) {\n\t\t\tconst columns = columnNames(model, unique);\n\t\t\tif (columns !== void 0) sets.push(columns);\n\t\t}\n\t\tmodelUniqueColumnSets.set(model.modelName, sets);\n\t}\n\tfor (const key of junctions.keys()) {\n\t\tmodelIdColumns.set(key, [\"A\", \"B\"]);\n\t\tmodelUniqueColumnSets.set(key, [[\"A\", \"B\"]]);\n\t}\n\tconst candidatesBySourceId = /* @__PURE__ */ new Map();\n\tfor (const candidate of candidates) {\n\t\tconst model = models.get(candidate.modelName);\n\t\tif (model === void 0) continue;\n\t\tconst group = candidatesBySourceId.get(model.sourceId) ?? {\n\t\t\tsources: model.sources,\n\t\t\tcandidates: []\n\t\t};\n\t\tcandidatesBySourceId.set(model.sourceId, group);\n\t\tgroup.candidates.push(candidate);\n\t}\n\tfor (const { sources, candidates: backrelationCandidates } of candidatesBySourceId.values()) {\n\t\tconst pairingDiagnostics = createPslDiagnosticCollector(sources);\n\t\tapplyBackrelationCandidates({\n\t\t\tbackrelationCandidates,\n\t\t\tfkRelationsByPair,\n\t\t\tinvalidFkPairings,\n\t\t\tfkRelationsByDeclaringModel,\n\t\t\tmodelIdColumns,\n\t\t\tmodelUniqueColumnSets,\n\t\t\tmodelRelations,\n\t\t\tdiagnostics: pairingDiagnostics,\n\t\t\tsources\n\t\t});\n\t\tfor (const diagnostic of pairingDiagnostics.toExternal()) diagnostics.push(RELATION_PAIRING_CODES.has(diagnostic.code) ? {\n\t\t\t...diagnostic,\n\t\t\tcode: \"PSL.PRISMA7_RELATION_UNRESOLVED\"\n\t\t} : diagnostic);\n\t}\n\tconst relations = /* @__PURE__ */ new Map();\n\tfor (const [modelName, nodes] of modelRelations) relations.set(modelName, [...nodes].sort((left, right) => left.fieldName.localeCompare(right.fieldName)));\n\treturn {\n\t\tjunctions,\n\t\tignoredJunctions,\n\t\tforeignKeys,\n\t\trelations\n\t};\n}\n/** The junction model over a junction table: a field for each of its columns. */\nfunction junctionModel(name, table) {\n\tconst { columns, ...properties } = table;\n\treturn {\n\t\t...properties,\n\t\tmodelName: name,\n\t\tfields: columns.map((column) => ({\n\t\t\tfieldName: column.columnName,\n\t\t\t...column\n\t\t}))\n\t};\n}\n/**\n* The id column a junction side contributes. The diagnostic names the\n* requesting relation field, so it is located at that field, whichever side's\n* id is at fault.\n*/\nfunction singleIdColumn(side, requester, diagnostics) {\n\tif (side.model.idFields.some((name) => side.model.ignoredFields.has(name) || side.model.rejectedFields.has(name))) return;\n\tconst [idField, ...rest] = side.model.idFields;\n\tconst column = idField === void 0 ? void 0 : storageColumn(side.model, idField);\n\tif (column === void 0 || rest.length > 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JUNCTION_ID_UNSUPPORTED\", `Relation field \"${requester.model.modelName}.${requester.field.field.name}\" is an implicit many-to-many relation, but \"${side.model.modelName}\" ${column === void 0 ? \"has no single-field @id\" : \"has a composite id\"}; Prisma 7 requires a single-field @id on both models of an implicit many-to-many relation.`, requester.model.sourceId, requester.field.field.span));\n\t\treturn;\n\t}\n\treturn column;\n}\n/**\n* Prisma 7's implicit junction: table `_AToB` (or `_Name`), columns `A` and `B`\n* typed like the two ids, primary key `(A, B)`, index `_AToB_B_index`, and two\n* cascading foreign keys, with relation fields named as `contract infer` names\n* them. `A` is the model whose name is smaller in plain\n* string order; for a self-relation, the field whose name is smaller. This is\n* prisma-engines' rule (`psl/parser-database/src/relations.rs`,\n* `ingest_relation`: the side with the greater model name, or field name for a\n* self relation, is skipped so the smaller one owns `field_a`).\n*/\nfunction synthesizeJunction(requester, partner, naming, diagnostics) {\n\tconst [sideA, sideB] = orderJunctionSides(requester, partner);\n\tconst requesterFirst = sideA === requester;\n\tconst name = requester.field.attribute?.name ?? `${sideA.model.modelName}To${sideB.model.modelName}`;\n\tconst idA = singleIdColumn(sideA, requester, diagnostics);\n\tconst idB = singleIdColumn(sideB, requester, diagnostics);\n\tif (idA === void 0 || idB === void 0) return void 0;\n\tconst tableName = prisma7ConstraintName(`_${name}`, \"\", naming.identifierMaxBytes);\n\tconst namespaceId = sideA.model.namespaceId;\n\tconst key = junctionKey(namespaceId, name);\n\tconst [relationFieldA, relationFieldB] = naming.junctionRelationFieldNames(sideA.model.tableName, sideB.model.tableName);\n\tconst foreignKeyName = (column) => statedConstraintName(prisma7JunctionForeignKeyName(name, column, naming.identifierMaxBytes), naming.defaultConstraintNames.foreignKey(tableName, [column]));\n\tconst primaryKeyName = statedConstraintName(prisma7JunctionPrimaryKeyName(name, naming.identifierMaxBytes), naming.defaultConstraintNames.primaryKey(tableName));\n\tconst foreignKey = (column, side, id) => ({\n\t\t...ifDefined(\"name\", foreignKeyName(column)),\n\t\tcolumns: [column],\n\t\treferences: referenceTo(side.model, [id.columnName]),\n\t\tonDelete: \"cascade\",\n\t\tonUpdate: \"cascade\",\n\t\tindex: false\n\t});\n\tconst metadata = (column, side, id) => ({\n\t\tdeclaringModelName: key,\n\t\tdeclaringFieldName: column === \"A\" ? relationFieldA : relationFieldB,\n\t\tdeclaringTableName: tableName,\n\t\tdeclaringNamespaceId: namespaceId,\n\t\ttargetModelName: side.model.modelName,\n\t\ttargetTableName: side.model.tableName,\n\t\ttargetNamespaceId: side.model.namespaceId,\n\t\trelationName: `${name}:${column}`,\n\t\tnullable: false,\n\t\tlocalColumns: [column],\n\t\treferencedColumns: [id.columnName]\n\t});\n\tconst index = {\n\t\tcolumns: [\"B\"],\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\twhere: void 0,\n\t\tunique: void 0,\n\t\tmap: prisma7ConstraintName(`_${name}`, \"_B_index\", naming.identifierMaxBytes),\n\t\tname: void 0\n\t};\n\treturn {\n\t\tkey,\n\t\tname,\n\t\ttable: {\n\t\t\ttableName,\n\t\t\tnamespaceId,\n\t\t\tcolumns: [{\n\t\t\t\tcolumnName: \"A\",\n\t\t\t\tdescriptor: idA.descriptor,\n\t\t\t\tnullable: false,\n\t\t\t\tmany: false\n\t\t\t}, {\n\t\t\t\tcolumnName: \"B\",\n\t\t\t\tdescriptor: idB.descriptor,\n\t\t\t\tnullable: false,\n\t\t\t\tmany: false\n\t\t\t}],\n\t\t\tid: {\n\t\t\t\tcolumns: [\"A\", \"B\"],\n\t\t\t\t...ifDefined(\"name\", primaryKeyName)\n\t\t\t},\n\t\t\tindexes: [index],\n\t\t\tforeignKeys: [foreignKey(\"A\", sideA, idA), foreignKey(\"B\", sideB, idB)]\n\t\t},\n\t\tforeignKeys: [metadata(\"A\", sideA, idA), metadata(\"B\", sideB, idB)],\n\t\tcandidateRelationName: requesterFirst ? `${name}:A` : `${name}:B`\n\t};\n}\n//#endregion\n//#region src/interpreter.ts\n/** The generator `now()` resolves to for a column, which `@updatedAt` writes on create and on update; `undefined` when no generator function binds `now` to its codec. */\nfunction nowGeneratorFor(generatorFunctions, column) {\n\tconst resolution = generatorFunctions.resolve({\n\t\tname: \"now\",\n\t\targs: {}\n\t}, {\n\t\tcodecId: column.codecId,\n\t\ttypeParams: column.typeParams\n\t});\n\treturn resolution.ok ? resolution.generator : void 0;\n}\nconst SUMMARY = \"Prisma 7 schema interpretation failed\";\nfunction stringArgument(attribute) {\n\tconst expression = (attribute.args.find((arg) => arg.kind === \"positional\") ?? attribute.args.find((arg) => arg.name === \"name\"))?.expression;\n\tif (expression === void 0) return void 0;\n\treturn StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction blockEntry(source, key) {\n\tfor (const entry of source.block.entries) if (entry.key()?.name() === key) return entry;\n}\nfunction scalarValue(source, key) {\n\tconst value = blockEntry(source, key)?.value();\n\tif (value === void 0) return void 0;\n\treturn StringLiteralExprAst.cast(value.syntax)?.value();\n}\nfunction parameterSpan(source, key) {\n\tconst entry = blockEntry(source, key);\n\treturn entry === void 0 ? source.block.span : nodePslSpan(entry.syntax, source.sources);\n}\n/** Prisma 7 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */\nfunction reportDottedBlockValues(block, sourceId, sources, diagnostics) {\n\tfor (const entry of block.entries) {\n\t\tconst value = entry.value();\n\t\tif (value === void 0) continue;\n\t\tfor (const path of dottedPathsIn(value)) diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\",\n\t\t\tmessage: `${block.keyword} \"${block.name}\": the value of \"${entry.key()?.name() ?? \"\"}\" holds the dotted path ${path.path().join(\".\")}, which Prisma 7 does not accept in a ${block.keyword} block.`,\n\t\t\tsourceId,\n\t\t\tspan: nodePslSpan(path.syntax, sources)\n\t\t});\n\t}\n}\nfunction reportDuplicateBlockEntries(source, diagnostics) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of source.block.entries) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${key}\" in \"${source.block.keyword}\" block \"${source.block.name}\"; first occurrence wins`,\n\t\t\t\tsourceId: source.sourceId,\n\t\t\t\tspan: nodePslSpan(entry.syntax, source.sources)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t}\n}\nfunction interpretPrisma7Documents(input) {\n\tconst { binding } = input;\n\tconst diagnostics = [...input.seedDiagnostics];\n\tconst { defaultNamespaceId } = input;\n\tconst datasources = [];\n\tconst enumBlocks = [];\n\tconst models = [];\n\tconst declaredNames = /* @__PURE__ */ new Map();\n\tconst claimName = (kind, name, sourceId, span) => {\n\t\tconst previous = declaredNames.get(name);\n\t\tif (previous === void 0) {\n\t\t\tdeclaredNames.set(name, sourceId);\n\t\t\treturn true;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\tmessage: `Duplicate declaration of ${kind} \"${name}\"; first declared in ${basename(previous)}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t\treturn false;\n\t};\n\tfor (const { document, sources, sourceFile, sourceId } of input.documents) {\n\t\tconst { symbolTable, diagnostics: tableDiagnostics } = buildSymbolTable({\n\t\t\tdocuments: [document],\n\t\t\tsources,\n\t\t\tdefaultNamespaceId\n\t\t});\n\t\tfor (const diagnostic of tableDiagnostics) diagnostics.push({\n\t\t\tcode: diagnostic.code,\n\t\t\tmessage: diagnostic.message,\n\t\t\tsourceId,\n\t\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t\t});\n\t\tconst unsupported = (keyword, span) => {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\t\t\tmessage: `Unsupported top-level block \"${keyword}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t};\n\t\tconst unsupportedInclusions = (code, holders) => {\n\t\t\tfor (const holder of Object.values(holders)) for (const inclusion of holder.node.inclusions()) diagnostics.push({\n\t\t\t\tcode,\n\t\t\t\tmessage: `Unsupported mixin inclusion \"${printSyntax(inclusion.syntax).trim()}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: nodePslSpan(inclusion.syntax, sources)\n\t\t\t});\n\t\t};\n\t\tfor (const block of Object.values(symbolTable.defaultNamespace.blocks)) switch (block.keyword) {\n\t\t\tcase \"datasource\":\n\t\t\t\tdatasources.push({\n\t\t\t\t\tblock,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources,\n\t\t\t\t\tsourceFile\n\t\t\t\t});\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"generator\":\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"enum\":\n\t\t\t\tif (claimName(\"enum\", block.name, sourceId, block.span)) enumBlocks.push({\n\t\t\t\t\tblock,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources,\n\t\t\t\t\tsourceFile\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"view\":\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_VIEW_UNSUPPORTED\", `View \"${block.name}\" is not supported; Prisma 8 has no views. Remove the view or replace it with a model over the underlying table.`, sourceId, keywordPslSpan(block.node.syntax, block.keyword, sources)));\n\t\t\t\tbreak;\n\t\t\tdefault: unsupported(block.keyword, keywordPslSpan(block.node.syntax, block.keyword, sources));\n\t\t}\n\t\tfor (const namespace of Object.values(symbolTable.namespaces)) for (const { span } of namespace.declarations) unsupported(\"namespace\", span);\n\t\tfor (const compositeType of Object.values(symbolTable.defaultNamespace.compositeTypes)) unsupported(\"type\", compositeType.span);\n\t\tfor (const namedType of Object.values(symbolTable.namedTypes)) unsupported(\"types\", namedType.span);\n\t\tfor (const mixin of Object.values(symbolTable.defaultNamespace.mixins)) unsupported(`${mixin.keyword} mixin`, mixin.span);\n\t\tunsupportedInclusions(\"PSL_INVALID_MODEL_MEMBER\", symbolTable.defaultNamespace.models);\n\t\tunsupportedInclusions(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", symbolTable.defaultNamespace.blocks);\n\t\tfor (const symbol of Object.values(symbolTable.defaultNamespace.models)) {\n\t\t\tif (!claimName(\"model\", symbol.name, sourceId, symbol.span)) continue;\n\t\t\tmodels.push(readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics));\n\t\t}\n\t}\n\tcheckDatasource(datasources, input.documents[0]?.sourceId ?? \"schema.prisma\", binding, diagnostics);\n\treportTableCollisions(models, diagnostics);\n\tconst enums = /* @__PURE__ */ new Map();\n\tfor (const source of enumBlocks) {\n\t\tconst declaration = readEnumDeclaration(source, defaultNamespaceId, diagnostics);\n\t\tif (declaration !== void 0) enums.set(declaration.name, declaration);\n\t}\n\tconst namespaceEntities = lowerNativeEnums(enums, input, diagnostics);\n\tconst modelNames = new Set(models.map((model) => model.symbol.name));\n\tconst ignoredModels = new Set(models.filter((model) => model.ignored).map((model) => model.symbol.name));\n\tconst composedExtensions = new Set(input.composedExtensions);\n\tconst builds = /* @__PURE__ */ new Map();\n\tfor (const declaration of models) {\n\t\tconst build = {\n\t\t\tdeclaration,\n\t\t\tcolumns: /* @__PURE__ */ new Map(),\n\t\t\tignoredColumns: /* @__PURE__ */ new Map(),\n\t\t\tignoredFields: /* @__PURE__ */ new Set(),\n\t\t\tignoredRelationFields: [],\n\t\t\trejectedFields: /* @__PURE__ */ new Set(),\n\t\t\tidFields: declaration.id?.fields ?? [],\n\t\t\tidMap: declaration.id?.map,\n\t\t\tuniqueIndexes: [...declaration.uniqueIndexes],\n\t\t\trelationFields: []\n\t\t};\n\t\tfor (const field of Object.values(declaration.symbol.fields)) {\n\t\t\tconst reported = diagnostics.length;\n\t\t\treadField({\n\t\t\t\tfield,\n\t\t\t\tbuild,\n\t\t\t\tmodelNames,\n\t\t\t\tignoredModels,\n\t\t\t\tenums,\n\t\t\t\tnamespaceEntities,\n\t\t\t\tcomposedExtensions,\n\t\t\t\tinput,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (diagnostics.length > reported && !build.columns.has(field.name) && !build.ignoredColumns.has(field.name)) build.rejectedFields.add(field.name);\n\t\t}\n\t\tbuilds.set(declaration.symbol.name, build);\n\t}\n\tconst relationModels = /* @__PURE__ */ new Map();\n\tfor (const [modelName, build] of builds) relationModels.set(modelName, {\n\t\tmodelName,\n\t\ttableName: build.declaration.tableName,\n\t\tignored: build.declaration.ignored,\n\t\ttableSpan: build.declaration.symbol.attributes.find((attribute) => attribute.name === \"map\")?.span ?? build.declaration.symbol.span,\n\t\tnamespaceId: build.declaration.namespaceId,\n\t\tsourceId: build.declaration.sourceId,\n\t\tsources: build.declaration.sources,\n\t\tcolumns: build.columns,\n\t\tignoredColumns: build.ignoredColumns,\n\t\tignoredFields: build.ignoredFields,\n\t\tignoredRelationFields: build.ignoredRelationFields,\n\t\trejectedFields: build.rejectedFields,\n\t\tidFields: build.idFields,\n\t\tuniqueFieldSets: build.uniqueIndexes.flatMap((index) => index.fields === void 0 ? [] : [index.fields]),\n\t\trelationFields: build.relationFields\n\t});\n\tconst lowered = lowerRelations(relationModels, binding, diagnostics);\n\tconst modelNodes = [];\n\tconst tables = [];\n\tfor (const [modelName, build] of builds) {\n\t\tconst model = relationModels.get(modelName);\n\t\tif (model === void 0) continue;\n\t\tconst ignoredAmong = (fieldNames) => fieldNames?.filter((name) => build.ignoredFields.has(name)) ?? [];\n\t\tconst idAttribute = build.declaration.id;\n\t\tconst ignoredIdFields = ignoredAmong(idAttribute?.fields);\n\t\tif (idAttribute !== void 0 && ignoredIdFields.length > 0) diagnostics.push(ignoredFieldInPrimaryKey({\n\t\t\tmodelName,\n\t\t\tfieldNames: ignoredIdFields,\n\t\t\tusedBy: `@@id on model \"${modelName}\"`,\n\t\t\tsourceId: model.sourceId,\n\t\t\tspan: idAttribute.span\n\t\t}));\n\t\tconst id = keyColumns(model, model.idFields);\n\t\tconst indexes = [...build.uniqueIndexes.map((attribute) => ({\n\t\t\tattribute,\n\t\t\tunique: true\n\t\t})), ...build.declaration.indexes.map((attribute) => ({\n\t\t\tattribute,\n\t\t\tunique: false\n\t\t}))].flatMap(({ attribute, unique }) => {\n\t\t\tif (attribute.fields?.some((name) => build.rejectedFields.has(name))) return [];\n\t\t\tconst columns = attribute.fields === void 0 ? void 0 : keyColumns(model, attribute.fields);\n\t\t\tif (columns === void 0) {\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED\", `Model \"${modelName}\": an index names a field that is not a scalar column of the model.`, model.sourceId, attribute.span));\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn [indexNode(model.tableName, columns, attribute, unique, binding.identifierMaxBytes)];\n\t\t});\n\t\tconst foreignKeys = lowered.foreignKeys.get(modelName);\n\t\tconst relations = lowered.relations.get(modelName);\n\t\tconst primaryKeyName = statedConstraintName(prisma7PrimaryKeyName(model.tableName, build.idMap, binding.identifierMaxBytes), binding.defaultConstraintNames.primaryKey(model.tableName));\n\t\tconst tableProperties = stateServedBackingIndexes({\n\t\t\ttableName: model.tableName,\n\t\t\t...id !== void 0 && id.length > 0 ? { id: {\n\t\t\t\tcolumns: id,\n\t\t\t\t...ifDefined(\"name\", primaryKeyName)\n\t\t\t} } : {},\n\t\t\t...indexes.length > 0 ? { indexes } : {},\n\t\t\t...foreignKeys !== void 0 ? { foreignKeys } : {}\n\t\t});\n\t\tconst ignoredColumns = [...build.ignoredColumns.values()];\n\t\tif (model.ignored) {\n\t\t\ttables.push({\n\t\t\t\t...tableProperties,\n\t\t\t\tnamespaceId: model.namespaceId,\n\t\t\t\tcolumns: ignoredColumns\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tmodelNodes.push({\n\t\t\t...tableProperties,\n\t\t\tmodelName,\n\t\t\tnamespaceId: model.namespaceId,\n\t\t\tfields: [...build.columns.values()],\n\t\t\t...relations !== void 0 ? { relations } : {}\n\t\t});\n\t\tif (ignoredColumns.length > 0) tables.push({\n\t\t\tnamespaceId: model.namespaceId,\n\t\t\ttableName: model.tableName,\n\t\t\tcolumns: ignoredColumns\n\t\t});\n\t}\n\ttables.push(...[...lowered.ignoredJunctions.values()].map(stateServedBackingIndexes));\n\tfor (const [key, junction] of lowered.junctions) {\n\t\tconst relations = lowered.relations.get(key);\n\t\tmodelNodes.push(stateServedBackingIndexes(relations === void 0 ? junction : {\n\t\t\t...junction,\n\t\t\trelations\n\t\t}));\n\t}\n\tif (diagnostics.length > 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics\n\t});\n\tconst createNamespace = (namespace) => {\n\t\tconst entities = namespaceEntities.get(namespace.id);\n\t\tif (entities === void 0) return binding.createNamespace(namespace);\n\t\tconst valueSet = {\n\t\t\t...namespace.entries[\"valueSet\"],\n\t\t\t...entities[\"valueSet\"]\n\t\t};\n\t\treturn binding.createNamespace({\n\t\t\t...namespace,\n\t\t\tentries: {\n\t\t\t\t...namespace.entries,\n\t\t\t\t...entities,\n\t\t\t\t...Object.keys(valueSet).length > 0 ? { valueSet } : {}\n\t\t\t}\n\t\t});\n\t};\n\treturn ok(buildSqlContractFromDefinition({\n\t\ttarget: binding.target,\n\t\twarnings: void 0,\n\t\tcreateNamespace,\n\t\t...namespaceEntities.size > 0 ? { namespaces: [...namespaceEntities.keys()] } : {},\n\t\tmodels: modelNodes,\n\t\t...tables.length > 0 ? { tables } : {}\n\t}, input.codecLookup, input.dataTypes.lookup));\n}\n/**\n* Prisma 7 never derives a backing index for a foreign key, so its relations say `index: false`. Where the model's own indexes or keys already serve a foreign key, the relation takes the default instead, so the build drops the derived index again, or names the named key or plain index whose first columns are the foreign key's. Either way the stored foreign key states what backs it, and no index is added.\n*/\nfunction stateServedBackingIndexes(node) {\n\tif (node.foreignKeys === void 0) return node;\n\tconst table = {\n\t\tindexes: (node.indexes ?? []).map((index) => lowerAuthoredIndex(node.tableName, blindCast(index), [])),\n\t\tuniques: node.uniques ?? [],\n\t\tprimaryKey: node.id\n\t};\n\treturn {\n\t\t...node,\n\t\tforeignKeys: node.foreignKeys.map((foreignKey) => {\n\t\t\tif (foreignKey.index !== false) return foreignKey;\n\t\t\tif (declaredIndexesServeForeignKey(foreignKey.columns, table)) return {\n\t\t\t\t...foreignKey,\n\t\t\t\tindex: true\n\t\t\t};\n\t\t\tconst name = declaredBackingObjectName(foreignKey.columns, table);\n\t\t\treturn name === void 0 ? foreignKey : {\n\t\t\t\t...foreignKey,\n\t\t\t\tindex: name\n\t\t\t};\n\t\t})\n\t};\n}\nfunction checkDatasource(datasources, fallbackSourceId, binding, diagnostics) {\n\tconst [datasource] = datasources;\n\tconst [namedProvider] = binding.providers;\n\tif (datasource === void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_PROVIDER_MISMATCH\", `No datasource block found; add \\`datasource db { provider = \"${namedProvider}\" }\\`.`, fallbackSourceId, void 0));\n\t\treturn;\n\t}\n\treportDuplicateBlockEntries(datasource, diagnostics);\n\tconst provider = scalarValue(datasource, \"provider\");\n\tif (provider === void 0 || !binding.providers.includes(provider)) diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_PROVIDER_MISMATCH\", provider === void 0 ? `The datasource block declares no string \\`provider\\`; this contract source reads Prisma 7 schemas for provider \"${namedProvider}\".` : `The datasource provider is \"${provider}\"; this contract source reads Prisma 7 schemas for provider \"${namedProvider}\".`, datasource.sourceId, parameterSpan(datasource, \"provider\")));\n\tfor (const [property, edit] of Object.entries({\n\t\trelationMode: \"Removing relationMode, or setting it to \\\"foreignKeys\\\"\",\n\t\treferentialIntegrity: \"Removing referentialIntegrity, or replacing it with relationMode = \\\"foreignKeys\\\"\"\n\t})) {\n\t\tif (scalarValue(datasource, property) !== \"prisma\") continue;\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_RELATION_MODE_UNSUPPORTED\", `${property} = \"prisma\" is not supported: the contract declares the foreign keys its relations need, and in this mode Prisma 7 creates none. ${edit}, makes Prisma 7's next migration add those foreign keys, and that migration fails if any existing row breaks one.`, datasource.sourceId, parameterSpan(datasource, property)));\n\t}\n}\nfunction reportTableCollisions(models, diagnostics) {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tfor (const model of models) {\n\t\tconst key = `${model.namespaceId}.${model.tableName}`;\n\t\tconst group = byTable.get(key) ?? [];\n\t\tbyTable.set(key, group);\n\t\tgroup.push(model);\n\t}\n\tfor (const group of byTable.values()) {\n\t\tif (group.length < 2) continue;\n\t\tconst names = group.map((model) => `\"${model.symbol.name}\"`).join(\", \");\n\t\tfor (const model of group) {\n\t\t\tconst mapAttribute = model.symbol.attributes.find((attribute) => attribute.name === \"map\");\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", `Models ${names} all map to table \"${model.namespaceId}\".\"${model.tableName}\"; each model needs its own table.`, model.sourceId, mapAttribute?.span ?? model.symbol.span));\n\t\t}\n\t}\n}\nfunction keyColumns(model, fieldNames) {\n\tconst columns = [];\n\tfor (const fieldName of fieldNames) {\n\t\tconst column = model.columns.get(fieldName) ?? model.ignoredColumns.get(fieldName);\n\t\tif (column === void 0) return void 0;\n\t\tcolumns.push(column.columnName);\n\t}\n\treturn columns;\n}\nfunction readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics) {\n\tconst { indexTypes } = binding;\n\tlet ignored = false;\n\tlet tableName = symbol.name;\n\tlet namespaceId = defaultNamespaceId;\n\tlet id;\n\tconst uniqueIndexes = [];\n\tconst indexes = [];\n\tfor (const attribute of symbol.attributes) {\n\t\tif ([\n\t\t\t\"id\",\n\t\t\t\"unique\",\n\t\t\t\"index\"\n\t\t].includes(attribute.name)) checkStatedConstraintNameLength({\n\t\t\tattribute,\n\t\t\towner: `Model \"${symbol.name}\"`,\n\t\t\tmaxBytes: binding.identifierMaxBytes,\n\t\t\tsourceId,\n\t\t\tdiagnostics\n\t\t});\n\t\tswitch (attribute.name) {\n\t\t\tcase \"map\":\n\t\t\t\ttableName = requireStringArgument(attribute, symbol.name, sourceId, diagnostics) ?? tableName;\n\t\t\t\tbreak;\n\t\t\tcase \"schema\":\n\t\t\t\tnamespaceId = requireStringArgument(attribute, symbol.name, sourceId, diagnostics) ?? namespaceId;\n\t\t\t\tbreak;\n\t\t\tcase \"id\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) id = parsed;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"unique\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) uniqueIndexes.push(parsed);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"index\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) indexes.push(parsed);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ignore\":\n\t\t\t\tignored = true;\n\t\t\t\tbreak;\n\t\t\tdefault: diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Model \"${symbol.name}\": attribute \"@@${attribute.name}\" is not supported yet by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t\t}\n\t}\n\treturn {\n\t\tsymbol,\n\t\tsourceId,\n\t\tsources,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tignored,\n\t\tid,\n\t\tuniqueIndexes,\n\t\tindexes\n\t};\n}\nfunction requireStringArgument(attribute, owner, sourceId, diagnostics) {\n\tconst value = stringArgument(attribute);\n\tif (value === void 0) diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `\"${owner}\": attribute \"${attribute.name}\" expects one string argument.`,\n\t\tsourceId,\n\t\tspan: attribute.span\n\t});\n\treturn value;\n}\nfunction readEnumDeclaration(source, defaultNamespaceId, diagnostics) {\n\tconst { block, sourceId, sources } = source;\n\tlet typeName = block.name;\n\tlet namespaceId = defaultNamespaceId;\n\tfor (const attribute of block.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\ttypeName = requireStringArgument(attribute, block.name, sourceId, diagnostics) ?? typeName;\n\t\t\tbreak;\n\t\tcase \"schema\":\n\t\t\tnamespaceId = requireStringArgument(attribute, block.name, sourceId, diagnostics) ?? namespaceId;\n\t\t\tbreak;\n\t\tdefault: diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Enum \"${block.name}\": attribute \"@@${attribute.name}\" is not supported by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t}\n\tconst members = [];\n\tconst seenMemberNames = /* @__PURE__ */ new Set();\n\tfor (const entry of block.entries) {\n\t\tconst name = entry.key()?.name();\n\t\tif (name === void 0) continue;\n\t\tif (seenMemberNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: nodePslSpan(entry.syntax, sources)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenMemberNames.add(name);\n\t\tlet value = name;\n\t\tconst span = nodePslSpan(entry.syntax, sources);\n\t\tfor (const attributeNode of entry.attributes()) {\n\t\t\tconst attribute = readResolvedAttribute(attributeNode, sources);\n\t\t\tif (attribute.name === \"map\") value = requireStringArgument(attribute, `${block.name}.${name}`, sourceId, diagnostics) ?? value;\n\t\t\telse diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Enum member \"${block.name}.${name}\": attribute \"@${attribute.name}\" is not supported by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t\t}\n\t\tmembers.push({\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tspan\n\t\t});\n\t}\n\treturn {\n\t\tname: block.name,\n\t\ttypeName,\n\t\tnamespaceId,\n\t\tmembers,\n\t\tspan: block.span,\n\t\tsourceId\n\t};\n}\nfunction lowerNativeEnums(enums, input, diagnostics) {\n\tconst result = /* @__PURE__ */ new Map();\n\tif (enums.size === 0) return result;\n\tconst { entityKind } = input.binding.nativeEnum;\n\tconst descriptor = buildEntityTypesByDiscriminator(input.authoringContributions).get(entityKind);\n\tfor (const declaration of enums.values()) {\n\t\tif (descriptor === void 0) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `Enum \"${declaration.name}\" cannot be lowered: target \"${input.binding.target.targetId}\" registers no \"${entityKind}\" entity kind.`, declaration.sourceId, declaration.span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst context = {\n\t\t\tfamily: input.binding.target.familyId,\n\t\t\ttarget: input.binding.target.targetId,\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\t\tsourceId: declaration.sourceId,\n\t\t\tdiagnostics: { push: (diagnostic) => {\n\t\t\t\tdiagnostics.push(blindCast(diagnostic));\n\t\t\t} }\n\t\t};\n\t\tconst values = Object.create(null);\n\t\tconst parameterSpans = Object.create(null);\n\t\tfor (const member of declaration.members) {\n\t\t\tvalues[member.name] = member.value;\n\t\t\tparameterSpans[member.name] = member.span;\n\t\t}\n\t\tconst entity = instantiateAuthoringEntityType(entityKind, descriptor, [{\n\t\t\tkind: entityKind,\n\t\t\tkeyword: entityKind,\n\t\t\tname: declaration.name,\n\t\t\tvalues,\n\t\t\tparameterSpans,\n\t\t\tattributes: { map: {\n\t\t\t\targs: { name: declaration.typeName },\n\t\t\t\tspan: declaration.span\n\t\t\t} },\n\t\t\tspan: declaration.span,\n\t\t\tnamespaceId: declaration.namespaceId\n\t\t}], context);\n\t\tif (entity === void 0) continue;\n\t\tconst entities = result.get(declaration.namespaceId) ?? {};\n\t\tresult.set(declaration.namespaceId, entities);\n\t\tentities[entityKind] = {\n\t\t\t...entities[entityKind],\n\t\t\t[declaration.name]: entity\n\t\t};\n\t\tconst valueSet = deriveValueSetFromEntity(descriptor.output, entity);\n\t\tif (valueSet !== void 0) entities[\"valueSet\"] = {\n\t\t\t...entities[\"valueSet\"],\n\t\t\t[declaration.name]: valueSet\n\t\t};\n\t}\n\treturn result;\n}\nfunction nativeTypeMessage(label, nativeType) {\n\treturn `${label}: native type \"@db.${nativeType}\" has no Prisma 8 codec yet, and Prisma 8 cannot read this schema until it supports the column type. @ignore on the field or @@ignore on the model does not help: Prisma 8 keeps the columns of ignored fields and models in the contract. Changing the field's type to one Prisma 8 supports changes the column type on Prisma 7's next migration.`;\n}\nfunction readField(args) {\n\tconst { field, build, diagnostics, input } = args;\n\tconst { binding } = input;\n\tconst model = build.declaration;\n\tconst sourceId = model.sourceId;\n\tconst label = `Field \"${model.symbol.name}.${field.name}\"`;\n\tconst isRelationField = args.modelNames.has(field.typeName) && field.typeConstructor === void 0;\n\tconst fieldIgnored = field.attributes.some((attribute) => attribute.name === \"ignore\") || isRelationField && args.ignoredModels.has(field.typeName);\n\tif (fieldIgnored) build.ignoredFields.add(field.name);\n\tconst ignored = fieldIgnored || model.ignored;\n\tlet columnName = field.name;\n\tlet nativeType;\n\tlet relation;\n\tlet defaultAttribute;\n\tlet updatedAt;\n\tfor (const attribute of field.attributes) {\n\t\tif (isRelationField ? attribute.name === \"relation\" : [\"id\", \"unique\"].includes(attribute.name)) checkStatedConstraintNameLength({\n\t\t\tattribute,\n\t\t\towner: label,\n\t\t\tmaxBytes: binding.identifierMaxBytes,\n\t\t\tsourceId,\n\t\t\tdiagnostics\n\t\t});\n\t\tif (attribute.name === \"map\" && !isRelationField) columnName = requireStringArgument(attribute, label, sourceId, diagnostics) ?? columnName;\n\t\telse if (attribute.name.startsWith(\"db.\") && !isRelationField) nativeType = {\n\t\t\tname: attribute.name.slice(3),\n\t\t\tattribute\n\t\t};\n\t\telse if (attribute.name === \"id\" && !isRelationField) {\n\t\t\tconst parsed = parseIndexAttribute(attribute, label, sourceId, binding.indexTypes, diagnostics);\n\t\t\tif (parsed !== void 0) {\n\t\t\t\tbuild.idFields = [field.name];\n\t\t\t\tbuild.idMap = parsed.map;\n\t\t\t}\n\t\t\tif (fieldIgnored) diagnostics.push(ignoredFieldInPrimaryKey({\n\t\t\t\tmodelName: model.symbol.name,\n\t\t\t\tfieldNames: [field.name],\n\t\t\t\tusedBy: \"its @id\",\n\t\t\t\tsourceId,\n\t\t\t\tspan: attribute.span\n\t\t\t}));\n\t\t} else if (attribute.name === \"unique\" && !isRelationField) {\n\t\t\tconst parsed = parseIndexAttribute(attribute, label, sourceId, binding.indexTypes, diagnostics);\n\t\t\tif (parsed !== void 0) build.uniqueIndexes.push({\n\t\t\t\t...parsed,\n\t\t\t\tfields: [field.name]\n\t\t\t});\n\t\t} else if (attribute.name === \"default\" && !isRelationField) defaultAttribute = attribute;\n\t\telse if (attribute.name === \"updatedAt\" && !isRelationField) updatedAt = attribute;\n\t\telse if (attribute.name === \"relation\" && isRelationField) relation = attribute;\n\t\telse if (attribute.name === \"ignore\") {} else diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `${label}: attribute \"@${attribute.name}\" is not supported yet by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t}\n\tif (field.malformedType) return;\n\tif (field.typeConstructor !== void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} has type \"${field.typeConstructor.path.join(\".\")}(...)\", which has no Prisma 8 codec yet, and Prisma 8 cannot read this schema until it supports the column type. @@ignore on model \"${model.symbol.name}\" does not help: Prisma 8 keeps the columns of ignored models in the contract. Removing the field drops its column on Prisma 7's next migration.`, sourceId, field.typeConstructor.span));\n\t\treturn;\n\t}\n\tif (isRelationField) {\n\t\tconst attribute = relation === void 0 ? void 0 : parseRelationAttribute(relation, label, sourceId, diagnostics);\n\t\tif (relation !== void 0 && attribute === void 0) return;\n\t\t(ignored ? build.ignoredRelationFields : build.relationFields).push({\n\t\t\tfield,\n\t\t\ttargetModelName: field.typeName,\n\t\t\tattribute\n\t\t});\n\t\treturn;\n\t}\n\tif (updatedAt !== void 0 && field.typeName !== \"DateTime\") {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} has type \"${field.typeName}\", but @updatedAt is only allowed on a DateTime field. Prisma 7 refuses this schema too: \"Fields that are marked with @updatedAt must be of type DateTime.\" Remove @updatedAt, or change the field's type to DateTime.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tif (updatedAt !== void 0 && field.list) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} is a list, but @updatedAt is not allowed on a list field. Prisma 7 refuses this schema too: \"Fields that are marked with @updatedAt cannot be lists.\" Remove @updatedAt, or make the field a single DateTime.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tconst enumDeclaration = args.enums.get(field.typeName);\n\tlet call;\n\tif (enumDeclaration !== void 0) {\n\t\tif (enumDeclaration.namespaceId !== model.namespaceId) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_ENUM_NAMESPACE_MISMATCH\", `${label} uses enum \"${enumDeclaration.name}\" from schema \"${enumDeclaration.namespaceId}\", but the model is in schema \"${model.namespaceId}\". Prisma 8 columns reference the enum type of their own schema; declare the enum in \"${model.namespaceId}\" or move the model.`, sourceId, field.span));\n\t\t\treturn;\n\t\t}\n\t\tcall = {\n\t\t\tpath: binding.nativeEnum.typeConstructor,\n\t\t\targs: [{\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue: enumDeclaration.name,\n\t\t\t\tspan: field.span\n\t\t\t}],\n\t\t\tspan: field.span\n\t\t};\n\t} else {\n\t\tconst scalar = prisma7ScalarMapping(binding.typeMap, field.typeName);\n\t\tif (scalar === void 0) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} has unknown type \"${field.typeName}\".`, sourceId, field.span));\n\t\t\treturn;\n\t\t}\n\t\tlet mapping = scalar;\n\t\tlet span = field.span;\n\t\tif (nativeType !== void 0) {\n\t\t\tconst native = prisma7NativeTypeMapping(binding.typeMap, nativeType.name, nativeType.attribute.args.map((arg) => arg.value));\n\t\t\tif (native === void 0) {\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_NATIVE_TYPE_UNSUPPORTED\", nativeTypeMessage(label, nativeType.name), sourceId, nativeType.attribute.span));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmapping = native;\n\t\t\tspan = nativeType.attribute.span;\n\t\t}\n\t\tcall = {\n\t\t\tpath: [mapping.constructorName],\n\t\t\targs: mapping.args.map((value) => ({\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue,\n\t\t\t\tspan\n\t\t\t})),\n\t\t\tspan\n\t\t};\n\t}\n\tconst typeConstructor = getAuthoringTypeConstructor(input.authoringContributions, call.path);\n\tif (typeConstructor === void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} type \"${field.typeName}\" could not be resolved against target \"${binding.target.targetId}\".`, sourceId, field.span));\n\t\treturn;\n\t}\n\tconst typeDiagnostics = createPslDiagnosticCollector(model.sources);\n\tconst resolved = instantiateFieldTypeConstructor({\n\t\tcall,\n\t\tdescriptor: typeConstructor,\n\t\tdiagnostics: typeDiagnostics,\n\t\tsource: diagnosticSource(model.sources, field.node.syntax),\n\t\tentityLabel: label,\n\t\tnamespaceId: model.namespaceId,\n\t\tnamespaceExtensionEntities: args.namespaceEntities,\n\t\tcodecLookup: input.codecLookup\n\t});\n\tdiagnostics.push(...typeDiagnostics.toExternal());\n\tif (!resolved.ok) return;\n\tconst typeLookups = {\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypeLookup: input.dataTypes.lookup\n\t};\n\tconst updatedAtGenerator = updatedAt === void 0 || ignored ? void 0 : nowGeneratorFor(input.generatorFunctions, resolved.descriptor);\n\tif (updatedAt !== void 0 && !ignored && updatedAtGenerator === void 0) {\n\t\tif (nativeType === void 0) throw new InternalError(`The Prisma 7 target binding has no \"now\" generator for codec \"${resolved.descriptor.codecId}\", which the DateTime scalar maps to.`);\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} has @updatedAt, but \"@db.${nativeType.name}\" makes it a column that is not a date or time, so @updatedAt cannot set it. Prisma 7 refuses this schema too: \"Native type ${nativeType.name} is not compatible with declared field type DateTime\". Remove @updatedAt, or use a date or time native type such as @db.Timestamp.`, sourceId, nativeType.attribute.span));\n\t\treturn;\n\t}\n\tconst lowered = defaultAttribute === void 0 ? void 0 : lowerPrisma7Default({\n\t\tattribute: defaultAttribute,\n\t\tfield,\n\t\tmodelName: model.symbol.name,\n\t\tcodecId: resolved.descriptor.codecId,\n\t\ttypeParams: resolved.descriptor.typeParams,\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypes: input.dataTypes,\n\t\tliteralForm: binding.literalDefaultForm({\n\t\t\tcodecId: resolved.descriptor.codecId,\n\t\t\tdataType: sqlDataTypeOfCodec(resolved.descriptor.codecId, typeLookups).id,\n\t\t\ttypeParams: resolved.descriptor.typeParams\n\t\t}),\n\t\tenumMembers: enumDeclaration === void 0 ? void 0 : new Map(enumDeclaration.members.map((member) => [member.name, member.value])),\n\t\tcontrolMutationDefaults: input.controlMutationDefaults,\n\t\tgeneratorFunctions: input.generatorFunctions,\n\t\tsourceId,\n\t\tdiagnostics\n\t});\n\tif (defaultAttribute !== void 0 && lowered === void 0) return;\n\tconst column = {\n\t\tcolumnName,\n\t\tdescriptor: resolved.descriptor,\n\t\tnullable: field.optional || field.list,\n\t\tmany: field.list,\n\t\t...field.list ? { elementNullable: true } : {},\n\t\t...ifDefined(\"default\", lowered?.storage)\n\t};\n\tif (ignored) {\n\t\tbuild.ignoredColumns.set(field.name, column);\n\t\treturn;\n\t}\n\tconst executionDefaults = updatedAtGenerator !== void 0 ? {\n\t\tonCreate: updatedAtGenerator,\n\t\tonUpdate: updatedAtGenerator\n\t} : lowered?.onCreate !== void 0 ? { onCreate: lowered.onCreate } : void 0;\n\tbuild.columns.set(field.name, {\n\t\tfieldName: field.name,\n\t\t...column,\n\t\t...ifDefined(\"executionDefaults\", executionDefaults)\n\t});\n}\n//#endregion\n//#region src/provider.ts\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\treturn join(dirname(schemaPath), \"contract.json\");\n}\nfunction mapParseDiagnostics(diagnostics, sourceFile, sourceId) {\n\treturn diagnostics.map((diagnostic) => ({\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\tsourceId,\n\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t}));\n}\n/**\n* The files a Prisma 7 schema input names: the file itself, or every regular\n* `.prisma` file under the directory, nested directories and symbolic links\n* included, as Prisma 7 reads a schema directory. Sorted by path so duplicate\n* detection blames the later file deterministically.\n*/\nasync function listSchemaFiles(absolutePath, displayPath) {\n\tif (!(await stat(absolutePath)).isDirectory()) return [{\n\t\tsourceId: displayPath,\n\t\tabsolutePath\n\t}];\n\tconst entries = await readdir(absolutePath, { recursive: true });\n\tconst files = [];\n\tfor (const entry of entries.filter((name) => extname(name) === \".prisma\").map((name) => normalize(name)).sort()) {\n\t\tconst entryPath = join(absolutePath, entry);\n\t\tif ((await stat(entryPath)).isFile()) files.push({\n\t\t\tsourceId: join(displayPath, entry),\n\t\t\tabsolutePath: entryPath\n\t\t});\n\t}\n\treturn files;\n}\n/**\n* The checks `contract emit` runs on the contract after `load` that the\n* contract builder does not: domain roots and relations, column defaults\n* against nullability, and model storage references. The structural check also\n* needs the target's entity kinds, which `load` does not receive.\n*/\nfunction validateInterpretedContract(contract) {\n\tvalidateContractDomain(contract);\n\tconst sqlContract = blindCast(contract);\n\tvalidateSqlStorageConsistency(sqlContract);\n\tvalidateModelStorageReferences(sqlContract);\n}\nfunction isMissingPath(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"ENOENT\";\n}\nfunction prisma7Contract(schemaPath, options) {\n\tconst parserOptions = { grammar: \"prisma-7\" };\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tparserOptions,\n\t\t\tasync load(context) {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"prisma7Contract: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tlet files;\n\t\t\t\ttry {\n\t\t\t\t\tfiles = await listSchemaFiles(absolutePath, schemaPath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst cause = String(error);\n\t\t\t\t\tconst message = isMissingPath(error) ? `There is no file or directory at \"${schemaPath}\". Fix the path passed to prisma7Schema() in prisma.config.ts.` : cause;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${schemaPath}\"`,\n\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", message, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tabsolutePath,\n\t\t\t\t\t\t\tcause\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (files.length === 0) return notOk({\n\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${schemaPath}\"`,\n\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", `The schema directory \"${schemaPath}\" contains no .prisma file.`, schemaPath, void 0)],\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\tabsolutePath\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconst documents = [];\n\t\t\t\tconst seedDiagnostics = [];\n\t\t\t\tfor (const file of files) {\n\t\t\t\t\tlet schema;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tschema = await readFile(file.absolutePath, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treturn notOk({\n\t\t\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${file.sourceId}\"`,\n\t\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", message, file.sourceId, void 0)],\n\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\tschemaPath: file.sourceId,\n\t\t\t\t\t\t\t\tabsoluteSchemaPath: file.absolutePath,\n\t\t\t\t\t\t\t\tcause: message\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst { document, sources, diagnostics } = parse(schema, file.sourceId, parserOptions);\n\t\t\t\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\t\t\t\tseedDiagnostics.push(...mapParseDiagnostics(diagnostics, sourceFile, file.sourceId));\n\t\t\t\t\tdocuments.push({\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tsources,\n\t\t\t\t\t\tsourceFile,\n\t\t\t\t\t\tsourceId: file.sourceId\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tlet contract;\n\t\t\t\ttry {\n\t\t\t\t\tconst interpreted = interpretPrisma7Documents({\n\t\t\t\t\t\tdocuments,\n\t\t\t\t\t\tseedDiagnostics,\n\t\t\t\t\t\tbinding: options.binding,\n\t\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\t\tgeneratorFunctions: context.generatorFunctions,\n\t\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\t\tdataTypes: context.dataTypes,\n\t\t\t\t\t\tcomposedExtensions: context.composedExtensions,\n\t\t\t\t\t\tdefaultNamespaceId: context.defaultNamespaceId\n\t\t\t\t\t});\n\t\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\t\tcontract = applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.binding.createNamespace);\n\t\t\t\t\tvalidateInterpretedContract(contract);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isStructuredError(error)) throw error;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"Prisma 7 schema interpretation failed\",\n\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_CONTRACT_INVALID\", `This schema gives a contract that Prisma 8 rejects, and the Prisma 7 contract source has no specific diagnostic for the cause: ${error.message.replace(/\\.$/, \"\")}. This is a bug in Prisma ORM; please report it with this schema.`, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tcode: error.code\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn ok(contract);\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prisma7Contract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB,MAAM,SAAS,UAAU,MAAM;CACzD,OAAO;EACN;EACA;EACA;EACA,GAAG,SAAS,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC;CAClC;AACD;AACA,SAAS,QAAQ,OAAO;CACvB,MAAM,UAAU,MAAM,MAAM,GAAG,EAAE;CACjC,MAAM,OAAO,MAAM,MAAM,SAAS,MAAM;CACxC,OAAO,QAAQ,WAAW,IAAI,OAAO,GAAG,QAAQ,KAAK,IAAI,EAAE,OAAO;AACnE;AACA,SAAS,UAAU,WAAW,YAAY;CACzC,OAAO,QAAQ,WAAW,KAAK,SAAS,IAAI,UAAU,GAAG,KAAK,EAAE,CAAC;AAClE;;AAEA,SAAS,yBAAyB,OAAO;CACxC,MAAM,SAAS,UAAU,MAAM,WAAW,MAAM,UAAU;CAC1D,MAAM,MAAM,MAAM,WAAW,WAAW;CACxC,OAAO,kBAAkB,wCAAwC,GAAG,MAAM,UAAU,SAAS,GAAG,OAAO,GAAG,MAAM,OAAO,MAAM,uBAAuB,MAAM,OAAO,QAAQ,MAAM,OAAO,OAAO,gBAAgB,MAAM,OAAO,OAAO,UAAU,MAAM,UAAU,qHAAqH,OAAO,iDAAiD,MAAM,sBAAsB,oBAAoB,4CAA4C,MAAM,OAAO,OAAO,2BAA2B,MAAM,UAAU,sNAAsN,MAAM,UAAU,MAAM,IAAI;AACpzB;;AAEA,SAAS,mBAAmB,OAAO;CAClC,MAAM,SAAS,UAAU,MAAM,WAAW,MAAM,UAAU;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K;QACjB,oBAAoB,KAAK;QACzB,OAAO;OACR;MACD,CAAC;KACF;KACA,MAAM,EAAE,UAAU,SAAS,gBAAgB,MAAM,QAAQ,KAAK,UAAU,aAAa;KACrF,MAAM,aAAa,QAAQ,cAAc,SAAS,MAAM;KACxD,gBAAgB,KAAK,GAAG,oBAAoB,aAAa,YAAY,KAAK,QAAQ,CAAC;KACnF,UAAU,KAAK;MACd;MACA;MACA;MACA,UAAU,KAAK;KAChB,CAAC;IACF;IACA,IAAI;IACJ,IAAI;KACH,MAAM,cAAc,0BAA0B;MAC7C;MACA;MACA,SAAS,QAAQ;MACjB,yBAAyB,QAAQ;MACjC,oBAAoB,QAAQ;MAC5B,wBAAwB,QAAQ;MAChC,aAAa,QAAQ;MACrB,WAAW,QAAQ;MACnB,oBAAoB,QAAQ;MAC5B,oBAAoB,QAAQ;KAC7B,CAAC;KACD,IAAI,CAAC,YAAY,IAAI,OAAO;KAC5B,WAAW,+BAA+B,YAAY,OAAO,QAAQ,sBAAsB,QAAQ,QAAQ,eAAe;KAC1H,4BAA4B,QAAQ;IACrC,SAAS,OAAO;KACf,IAAI,CAAC,kBAAkB,KAAK,GAAG,MAAM;KACrC,OAAO,MAAM;MACZ,SAAS;MACT,aAAa,CAAC,kBAAkB,gCAAgC,kIAAkI,MAAM,QAAQ,QAAQ,OAAO,EAAE,EAAE,oEAAoE,YAAY,KAAK,CAAC,CAAC;MAC1T,MAAM;OACL;OACA,MAAM,MAAM;MACb;KACD,CAAC;IACF;IACA,OAAO,GAAG,QAAQ;GACnB;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
|
|
1
|
+
{"version":3,"file":"contract-prisma7__provider.mjs","names":["enumMemberValue"],"sources":["../../../../2-sql/2-authoring/contract-prisma7/dist/provider.mjs"],"sourcesContent":["import { readFile, readdir, stat } from \"node:fs/promises\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\nimport { ArrayLiteralAst, BooleanLiteralExprAst, FunctionCallAst, IdentifierAst, ModelAttributeAst, NumberLiteralExprAst, PathExprAst, StringLiteralExprAst, dottedPathsIn, parse, printSyntax } from \"@internal/psl-parser/syntax\";\nimport { validateModelStorageReferences, validateSqlStorageConsistency } from \"@internal/sql-contract/validators\";\nimport { applySqlSpecifierControlPolicy, buildSqlContractFromDefinition } from \"@internal/sql-contract-ts/contract-builder\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { basename, dirname, extname, join, normalize } from \"pathe\";\nimport { entryForTag, getAuthoringTypeConstructor, instantiateAuthoringEntityType } from \"@internal/framework-components/authoring\";\nimport { buildSymbolTable, createPslDiagnosticCollector, diagnosticSource, keywordPslSpan, nodePslSpan, readResolvedAttribute } from \"@internal/psl-parser\";\nimport { sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\nimport { declaredBackingObjectName, declaredIndexesServeForeignKey } from \"@internal/sql-contract/foreign-key-materialization\";\nimport { lowerAuthoredIndex } from \"@internal/sql-contract/index-naming\";\nimport { deriveValueSetFromEntity } from \"@internal/sql-contract/value-set-derivation-hook\";\nimport { applyBackrelationCandidates, buildEntityTypesByDiscriminator, indexFkRelations, instantiateFieldTypeConstructor, normalizeReferentialAction, readDataTypeDefault } from \"@internal/sql-contract-psl/resolution\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { clipToUtf8Bytes, utf8ByteLength } from \"@internal/utils/text\";\nimport { fkRelationPairKey } from \"@internal/psl-parser/interpret\";\n//#region src/diagnostics.ts\nfunction prisma7Diagnostic(code, message, sourceId, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId,\n\t\t...span !== void 0 ? { span } : {}\n\t};\n}\nfunction andList(items) {\n\tconst leading = items.slice(0, -1);\n\tconst last = items[items.length - 1] ?? \"\";\n\treturn leading.length === 0 ? last : `${leading.join(\", \")} and ${last}`;\n}\nfunction fieldList(modelName, fieldNames) {\n\treturn andList(fieldNames.map((name) => `\"${modelName}.${name}\"`));\n}\n/** An `@ignore` field in the model's primary key: without it the model has no field that identifies a row. */\nfunction ignoredFieldInPrimaryKey(input) {\n\tconst fields = fieldList(input.modelName, input.fieldNames);\n\tconst one = input.fieldNames.length === 1;\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${input.usedBy} uses ${one ? \"it\" : \"them\"}, and without ${one ? \"it\" : \"them\"} model \"${input.modelName}\" has no field that identifies a row, so Prisma 8 could not update, delete or relate its rows. Remove @ignore from ${fields}: Prisma 7's next migration is then empty, and ${one ? \"the field appears\" : \"the fields appear\"} in the Prisma 7 client again. Or replace ${one ? \"it\" : \"them\"} with @@ignore on model \"${input.modelName}\": Prisma 7 then requires @ignore on every relation field that points to the model, its next migration is empty, Prisma 8 keeps the model's table with its primary key, and the model disappears from both clients.`, input.sourceId, input.span);\n}\n/** A relation that is not `@ignore` joins on `@ignore` fields: Prisma 8 relations join on fields, and the domain has no ignored field. */\nfunction ignoredFieldJoined(input) {\n\tconst fields = fieldList(input.modelName, input.fieldNames);\n\tconst one = input.fieldNames.length === 1;\n\tconst relation = `relation field \"${input.relationField}\"`;\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${relation} joins on ${one ? \"it\" : \"them\"}, and Prisma 8 relations join on fields. Remove @ignore from ${fields}: Prisma 7's next migration is then empty, and ${one ? \"the field appears\" : \"the fields appear\"} in the Prisma 7 client again. Or mark ${relation} @ignore as well: Prisma 7's next migration is then empty, the relation field disappears from the Prisma 7 client, and Prisma 8 keeps its foreign key while leaving the relation out of the contract's models.`, input.sourceId, input.span);\n}\n//#endregion\n//#region src/indexes.ts\nfunction parseIndexAttribute(attribute, owner, sourceId, indexTypes, diagnostics) {\n\tconst unsupported = (what, span) => {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED\", `\"${owner}\": @${attribute.name} ${what}`, sourceId, span));\n\t};\n\tlet fields;\n\tlet map;\n\tlet type;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"fields\" : arg.name;\n\t\tconst expression = arg.expression;\n\t\tswitch (key) {\n\t\t\tcase \"fields\": {\n\t\t\t\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\t\t\t\tif (array === void 0) return unsupported(\"expects a list of field names.\", arg.span);\n\t\t\t\tconst names = [];\n\t\t\t\tfor (const element of array.elements()) {\n\t\t\t\t\tconst path = PathExprAst.cast(element.syntax) ?? FunctionCallAst.cast(element.syntax)?.memberPath();\n\t\t\t\t\tif (path !== void 0) return unsupported(`lists the dotted path \"${path.path().join(\".\")}\"; an index lists fields of its model by name, and Prisma 7 refuses the path as an unknown field.`, arg.span);\n\t\t\t\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\t\t\t\tif (name === void 0) return unsupported(\"field arguments such as sort or length are not supported; Prisma 8 indexes carry none.\", arg.span);\n\t\t\t\t\tnames.push(name);\n\t\t\t\t}\n\t\t\t\tfields = names;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"map\":\n\t\t\t\tmap = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\t\t\t\tif (map === void 0) return unsupported(\"map must be a string.\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"name\": break;\n\t\t\tcase \"type\": {\n\t\t\t\tconst token = expression === void 0 ? void 0 : IdentifierAst.cast(expression.syntax)?.name();\n\t\t\t\ttype = token !== void 0 && Object.hasOwn(indexTypes, token) ? indexTypes[token] : void 0;\n\t\t\t\tif (type === void 0) return unsupported(`type \"${token ?? \"\"}\" is not an index type Prisma 8 supports.`, arg.span);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: return unsupported(`argument \"${key ?? \"\"}\" is not supported.`, arg.span);\n\t\t}\n\t}\n\treturn {\n\t\tfields,\n\t\tmap,\n\t\ttype,\n\t\tspan: attribute.span\n\t};\n}\n/**\n* A generated constraint name as Prisma 7 spells it: `base` cut so that\n* `base + suffix` is at most `maxBytes` bytes, cut on a character boundary,\n* with the suffix kept whole. Prisma 7.10.0 emits `..._aVeryLongCo_idx` for a\n* long `@@index`, `..._AB_pkey` and `..._B_index` for a long implicit junction,\n* and cuts a multi-byte name before the character that would cross the budget.\n*/\nfunction prisma7ConstraintName(base, suffix, maxBytes) {\n\treturn `${clipToUtf8Bytes(base, maxBytes - utf8ByteLength(suffix))}${suffix}`;\n}\n/** Prisma 7's default index name: `{table}_{columns}_idx`, or `_key` for a unique index, cut to `maxBytes`. */\nfunction defaultIndexName(tableName, columns, unique, maxBytes) {\n\treturn prisma7ConstraintName(`${tableName}_${columns.join(\"_\")}`, unique ? \"_key\" : \"_idx\", maxBytes);\n}\nfunction indexNode(tableName, columns, attribute, unique, maxBytes) {\n\treturn {\n\t\tcolumns,\n\t\t...attribute.type === void 0 ? {\n\t\t\ttype: void 0,\n\t\t\toptions: void 0\n\t\t} : {\n\t\t\ttype: attribute.type,\n\t\t\toptions: {}\n\t\t},\n\t\twhere: void 0,\n\t\tunique: unique ? true : void 0,\n\t\tmap: attribute.map ?? defaultIndexName(tableName, columns, unique, maxBytes),\n\t\tname: void 0\n\t};\n}\n//#endregion\n//#region src/constraint-names.ts\n/** Prisma 7's primary key name: `map`, or `{table}_pkey` cut to `maxBytes`. */\nfunction prisma7PrimaryKeyName(tableName, map, maxBytes) {\n\treturn map ?? prisma7ConstraintName(tableName, \"_pkey\", maxBytes);\n}\n/** Prisma 7's foreign key name: `map`, or `{table}_{columns}_fkey` cut to `maxBytes`. */\nfunction prisma7ForeignKeyName(tableName, columns, map, maxBytes) {\n\treturn map ?? prisma7ConstraintName(`${tableName}_${columns.join(\"_\")}`, \"_fkey\", maxBytes);\n}\n/** Prisma 7's primary key name for the junction table of an implicit many-to-many relation. */\nfunction prisma7JunctionPrimaryKeyName(relationName, maxBytes) {\n\treturn prisma7ConstraintName(`_${relationName}`, \"_AB_pkey\", maxBytes);\n}\n/** Prisma 7's name for the junction foreign key on column `A` or `B`. */\nfunction prisma7JunctionForeignKeyName(relationName, column, maxBytes) {\n\treturn prisma7ConstraintName(`_${relationName}`, `_${column}_fkey`, maxBytes);\n}\n/**\n* The name a contract states for a constraint Prisma 7 named `prisma7Name`: the name itself where the target would derive a different one, and `undefined` where the two agree, so the contract stays unnamed there and a table rename keeps deriving it.\n*/\nfunction statedConstraintName(prisma7Name, derivedName) {\n\treturn prisma7Name === derivedName ? void 0 : prisma7Name;\n}\n/**\n* Refuses a `map` on `@id`, `@@id`, `@unique`, `@@unique`, `@@index` or `@relation` longer than the database keeps, as Prisma 7 does. The database would store the name cut short, so a contract holding it whole would rename or drop a constraint the database does not have.\n*/\nfunction checkStatedConstraintNameLength(input) {\n\tconst { attribute, maxBytes } = input;\n\tconst mapArgument = attribute.args.find((arg) => arg.kind === \"named\" && arg.name === \"map\");\n\tconst expression = mapArgument?.expression;\n\tconst name = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (mapArgument === void 0 || name === void 0) return;\n\tconst bytes = utf8ByteLength(name);\n\tif (bytes <= maxBytes) return;\n\tconst spelling = `${attribute.node instanceof ModelAttributeAst ? \"@@\" : \"@\"}${attribute.name}`;\n\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_CONSTRAINT_NAME_TOO_LONG\", `${input.owner}: the name \"${name}\" in the map argument of ${spelling} is ${bytes} bytes, longer than the ${maxBytes} bytes the database keeps. Shorten the map to ${maxBytes} bytes or fewer; Prisma 7 refuses this name too.`, input.sourceId, mapArgument.span));\n}\n//#endregion\n//#region src/defaults.ts\n/** Positional argument keys per Prisma 7 default function, matching the target registry's signatures. */\nconst FUNCTION_ARGUMENT_KEYS = {\n\tuuid: [\"version\"],\n\tcuid: [\"version\"],\n\tnanoid: [\"size\"],\n\tnow: [],\n\tautoincrement: [],\n\tulid: []\n};\nfunction literalArgument(expression) {\n\tconst text = StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (text !== void 0) return text;\n\tconst number = NumberLiteralExprAst.cast(expression.syntax)?.value();\n\tif (number !== void 0) return number;\n\treturn BooleanLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction lowerPrisma7Default(input) {\n\tconst { attribute, field, sourceId, diagnostics } = input;\n\tconst label = `Field \"${input.modelName}.${field.name}\"`;\n\tconst unknown = (reason, span) => {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_DEFAULT\", `${label}: @default ${reason}`, sourceId, span));\n\t};\n\tconst argument = attribute.args.find((arg) => arg.kind === \"positional\");\n\tconst expression = argument?.expression;\n\tif (argument === void 0 || expression === void 0) return unknown(\"needs one value.\", attribute.span);\n\tconst call = FunctionCallAst.cast(expression.syntax);\n\tif (call !== void 0) return lowerFunction(call, input, label, unknown);\n\tconst scalar = scalarValue$1(expression, input, unknown);\n\tif (scalar === void 0) return void 0;\n\treturn {\n\t\tstorage: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: scalar,\n\t\t\tinStoredForm: true\n\t\t},\n\t\tonCreate: void 0\n\t};\n}\n/**\n* The stored value of a written default: an enum member resolves through the enum's members, and\n* every other value is read by the authoring entry for its syntax, cast into the column's data type\n* and validated by the column's codec — the same path the current schema language takes.\n*/\nfunction scalarValue$1(expression, input, unknown) {\n\tconst span = input.attribute.span;\n\tconst enumValue = enumMemberValue(expression, input);\n\tif (enumValue !== void 0) return enumValue;\n\tconst array = ArrayLiteralAst.cast(expression.syntax);\n\tconst elements = array === void 0 ? void 0 : [...array.elements()];\n\tif (elements?.some((element) => enumMemberValue(element, input) !== void 0) === true) {\n\t\tconst values = [];\n\t\tfor (const element of elements) {\n\t\t\tconst value = enumMemberValue(element, input);\n\t\t\tif (value === void 0) return unknown(\"lists may only hold literals or enum members.\", span);\n\t\t\tvalues.push(value);\n\t\t}\n\t\treturn values;\n\t}\n\tconst finer = finerThanColumn(elements ?? [expression], elements !== void 0, input);\n\tif (finer !== void 0) return unknown(finer, span);\n\tconst written = writtenLiteralFor(expression, elements, input);\n\tif (written === void 0) return unreadableValue(expression, input, unknown);\n\tconst jsonNull = jsonNullDefault(written, expression, input);\n\tif (jsonNull !== void 0) return jsonNull;\n\tconst read = readDataTypeDefault({\n\t\twritten,\n\t\tisList: input.field.list,\n\t\tcolumn: {\n\t\t\tcodecId: input.codecId,\n\t\t\ttypeParams: input.typeParams\n\t\t},\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypes: input.dataTypes,\n\t\tfieldPath: `${input.modelName}.${input.field.name}`\n\t});\n\treturn read.ok ? read.value : unknown(refusalReason(read.refusal), span);\n}\n/**\n* Why a written date and time is refused when it has more fraction digits than the column holds:\n* Prisma 7 let the database round it, so the reason names the value the database stores.\n*/\nfunction finerThanColumn(values, isList, input) {\n\tconst form = input.literalForm;\n\tif (form?.kind !== \"tag\" || form.finerThanColumn === void 0) return void 0;\n\tfor (const [index, value] of values.entries()) {\n\t\tconst text = StringLiteralExprAst.cast(value.syntax)?.value();\n\t\tconst finer = text === void 0 ? void 0 : form.finerThanColumn(text);\n\t\tif (text === void 0 || finer === void 0) continue;\n\t\tconst at = isList ? ` at element ${index + 1}` : \"\";\n\t\tconst writtenDigits = /\\.(\\d+)/.exec(text)?.[1]?.length ?? 0;\n\t\tconst held = finer.heldDigits === 0 ? \"none\" : String(finer.heldDigits);\n\t\treturn `holds \"${text}\"${at}, with ${writtenDigits} ${writtenDigits === 1 ? \"digit\" : \"digits\"} after the decimal point, but the column holds ${held}. PostgreSQL stores it as \"${finer.stored}\"; write that instead.`;\n\t}\n}\n/** The storage value of an enum member name, when the field is typed by a Prisma 7 enum. */\nfunction enumMemberValue(expression, input) {\n\tconst member = IdentifierAst.cast(expression.syntax)?.name();\n\treturn member === void 0 ? void 0 : input.enumMembers?.get(member);\n}\nfunction writtenLiteralFor(expression, elements, input) {\n\tif (elements === void 0) return writtenLiteral(expression, input);\n\tconst written = [];\n\tfor (const element of elements) {\n\t\tconst elementLiteral = writtenLiteral(element, input);\n\t\tif (elementLiteral === void 0) return void 0;\n\t\twritten.push(elementLiteral);\n\t}\n\treturn {\n\t\tkind: \"list\",\n\t\telements: written\n\t};\n}\n/**\n* The JSON value null, which the contract cannot tell apart from SQL NULL, reported before the\n* column's codec sees the literal.\n*/\nfunction jsonNullDefault(written, expression, input) {\n\tif (input.literalForm?.kind !== \"json\") return void 0;\n\tconst value = jsonDocumentOf(written, input);\n\tif (value === void 0) return void 0;\n\tif (!(Array.isArray(value) ? value.includes(null) : value === null)) return void 0;\n\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JSON_NULL_DEFAULT_UNSUPPORTED\", `Field \"${input.modelName}.${input.field.name}\": @default(${printSyntax(expression.syntax).trim()}) ${written.kind === \"list\" ? \"holds\" : \"is\"} the JSON value null, which the contract cannot tell apart from SQL NULL. Remove the @default or give it another JSON value; either changes the column default on Prisma 7's next migration.`, input.sourceId, input.attribute.span));\n}\n/** A `@default(...)` this contract source cannot read as a literal at all. */\nfunction unreadableValue(expression, input, unknown) {\n\tconst span = input.attribute.span;\n\tconst identifier = IdentifierAst.cast(expression.syntax)?.name();\n\tif (identifier !== void 0) return unknown(input.enumMembers === void 0 ? `refers to \"${identifier}\", but the field is not an enum.` : `refers to \"${identifier}\", which is not a member of the field's enum.`, span);\n\tif (ArrayLiteralAst.cast(expression.syntax) !== void 0) return unknown(\"lists may only hold literals or enum members.\", span);\n\treturn unknown(\"holds a value this contract source does not read.\", span);\n}\n/** The written literal a Prisma 7 expression is, or `undefined` when it is not a literal at all. */\nfunction writtenLiteral(expression, input) {\n\tconst text = StringLiteralExprAst.cast(expression.syntax)?.value();\n\tif (text !== void 0) {\n\t\tconst form = input.literalForm;\n\t\tif (form?.kind === \"json\") return {\n\t\t\tkind: \"tag\",\n\t\t\ttag: \"json\",\n\t\t\ttext\n\t\t};\n\t\tif (form?.kind === \"tag\") {\n\t\t\tconst body = form.body(text);\n\t\t\treturn body === void 0 ? void 0 : {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: form.tag,\n\t\t\t\ttext: body\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NumberLiteralExprAst.cast(expression.syntax)?.token()?.text;\n\tif (number !== void 0) return {\n\t\tkind: \"number\",\n\t\ttext: number\n\t};\n\tconst boolean = BooleanLiteralExprAst.cast(expression.syntax)?.value();\n\treturn boolean === void 0 ? void 0 : {\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t};\n}\n/**\n* The document a written JSON value holds, read through the same entry the interpreter uses, or\n* `undefined` when the body is not a document.\n*/\nfunction jsonDocumentOf(written, input) {\n\tconst entry = entryForTag(input.dataTypes, \"json\");\n\tif (entry === void 0 || entry.entry.written.kind !== \"tag\") return void 0;\n\tconst bodies = written.kind === \"list\" ? written.elements.flatMap((element) => element.kind === \"tag\" ? [element.text] : []) : written.kind === \"tag\" ? [written.text] : [];\n\tconst parse = entry.entry.written.parse;\n\ttry {\n\t\tconst documents = bodies.map((body) => parse(body));\n\t\treturn written.kind === \"list\" ? documents : documents[0];\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Why the column refused the value, as a phrase following `@default `. */\nfunction refusalReason(refusal) {\n\tconst at = refusal.elementIndex === void 0 ? \"\" : ` at element ${refusal.elementIndex + 1}`;\n\tswitch (refusal.kind) {\n\t\tcase \"unreadable\": return `holds text${at} that this contract source does not read: ${refusal.message}`;\n\t\tcase \"unknown-tag\": return `holds a ${refusal.tag} literal${at}, which this stack does not register.`;\n\t\tcase \"unwritable\": return `holds a ${refusal.syntax} value${at}, which this target has no data type for.`;\n\t\tcase \"not-a-list\": return \"holds a single value on a list column, which takes a list literal.\";\n\t\tcase \"no-cast\": return `holds a ${refusal.valueType} value${at}, which ${refusal.receivingType} has no cast from; ${describeCasts(refusal.casts)}.`;\n\t\tcase \"no-list-cast\": return `holds a list, which ${refusal.receivingType} has no cast from; ${describeCasts(refusal.casts)}.`;\n\t\tcase \"no-element-cast\": return `holds a ${refusal.valueType} value${at}, which the list cast of ${refusal.receivingType} does not take; it takes ${refusal.elementTypes.join(\", \")}.`;\n\t\tcase \"refused-by-column\": return `holds a value${at} that ${refusal.codecId} does not read: ${refusal.message}`;\n\t}\n}\nfunction describeCasts(casts) {\n\treturn casts.length === 0 ? \"it casts from nothing\" : `it casts from ${casts.join(\", \")}`;\n}\nfunction lowerFunction(call, input, label, unknown) {\n\tconst fn = call.path().join(\".\");\n\tconst span = input.attribute.span;\n\tconst callArgs = [...call.args()];\n\tif (fn === \"dbgenerated\") return dbgeneratedDefault(callArgs, unknown, span);\n\tconst keys = FUNCTION_ARGUMENT_KEYS[fn];\n\tconst entry = input.controlMutationDefaults.defaultFunctionRegistry.get(fn);\n\tif (keys === void 0 || entry === void 0 && !input.generatorFunctions.has(fn)) return unknown(`function \"${fn}()\" is not a Prisma 7 default function this target supports.`, span);\n\tconst args = {};\n\tlet index = 0;\n\tfor (const arg of callArgs) {\n\t\tconst key = arg.name()?.name() ?? keys[index];\n\t\tconst value = arg.value();\n\t\tconst literal = value === void 0 ? void 0 : literalArgument(value);\n\t\tif (key === void 0 || literal === void 0) return unknown(`function \"${fn}()\" has an argument this contract source does not read.`, span);\n\t\targs[key] = literal;\n\t\tindex += 1;\n\t}\n\tif (fn === \"cuid\") args[\"version\"] = 2;\n\tif (entry === void 0) {\n\t\tconst resolution = input.generatorFunctions.resolve({\n\t\t\tname: fn,\n\t\t\targs\n\t\t}, {\n\t\t\tcodecId: input.codecId,\n\t\t\ttypeParams: input.typeParams\n\t\t});\n\t\tif (resolution.ok) return {\n\t\t\tstorage: void 0,\n\t\t\tonCreate: resolution.generator\n\t\t};\n\t\tif (resolution.reason === \"refused\") {\n\t\t\tconst written = input.attribute.args.find((arg) => arg.kind === \"positional\")?.value.trim() ?? `${fn}()`;\n\t\t\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_GENERATOR_REFUSED\", `${label}: @default(${written}) cannot fill its column: ${resolution.message}`, input.sourceId, span));\n\t\t\treturn;\n\t\t}\n\t\treturn unknown(`function \"${fn}()\" cannot fill a column of codec \"${input.codecId}\".`, span);\n\t}\n\tconst lowered = entry.lower({\n\t\tcall: {\n\t\t\tfn,\n\t\t\tspan,\n\t\t\targs\n\t\t},\n\t\tcontext: {\n\t\t\tsourceId: input.sourceId,\n\t\t\tmodelName: input.modelName,\n\t\t\tfieldName: input.field.name,\n\t\t\tcolumnCodecId: input.codecId\n\t\t}\n\t});\n\tif (!lowered.ok) {\n\t\tinput.diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_DEFAULT\", `${label}: ${lowered.diagnostic.message}`, input.sourceId, span));\n\t\treturn;\n\t}\n\treturn {\n\t\tstorage: lowered.value.defaultValue,\n\t\tonCreate: void 0\n\t};\n}\n/**\n* Prisma 7's `dbgenerated(\"<sql>\")` is a raw SQL default, carried as written; the empty form\n* `dbgenerated()` means the column has no default. Prisma 7 refuses a blank string, so this\n* source does too.\n*/\nfunction dbgeneratedDefault(callArgs, unknown, span) {\n\tif (callArgs.length === 0) return {\n\t\tstorage: void 0,\n\t\tonCreate: void 0\n\t};\n\tconst [argument] = callArgs;\n\tconst value = argument?.value();\n\tconst expression = callArgs.length === 1 && argument?.name() === void 0 && value !== void 0 ? StringLiteralExprAst.cast(value.syntax)?.value() : void 0;\n\tif (expression === void 0 || expression.trim() === \"\") return unknown(\"function \\\"dbgenerated()\\\" has an argument this contract source does not read.\", span);\n\treturn {\n\t\tstorage: {\n\t\t\tkind: \"function\",\n\t\t\texpression\n\t\t},\n\t\tonCreate: void 0\n\t};\n}\n//#endregion\n//#region src/native-types.ts\nfunction prisma7ScalarMapping(typeMap, scalar) {\n\treturn Object.hasOwn(typeMap.scalars, scalar) ? typeMap.scalars[scalar] : void 0;\n}\nfunction prisma7NativeTypeMapping(typeMap, nativeType, args) {\n\tconst mapping = Object.hasOwn(typeMap.nativeTypes, nativeType) ? typeMap.nativeTypes[nativeType] : void 0;\n\tif (mapping === void 0) return void 0;\n\treturn args.length === 0 ? mapping : {\n\t\tconstructorName: mapping.constructorName,\n\t\targs\n\t};\n}\n//#endregion\n//#region src/relations.ts\n/** The codes `applyBackrelationCandidates` reports, each shown as `PSL.PRISMA7_RELATION_UNRESOLVED`. */\nconst RELATION_PAIRING_CODES = /* @__PURE__ */ new Set([\n\t\"PSL_ORPHANED_BACKRELATION\",\n\t\"PSL_AMBIGUOUS_BACKRELATION\",\n\t\"PSL_NON_UNIQUE_BACKRELATION\",\n\t\"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\"PSL_JUNCTION_ID_NOT_FK_COVERING\",\n\t\"PSL_JUNCTION_TARGET_FK_NOT_ID\"\n]);\nfunction identifierNames(expression) {\n\tif (expression === void 0) return void 0;\n\tconst array = ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return void 0;\n\tconst names = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name === void 0) return void 0;\n\t\tnames.push(name);\n\t}\n\treturn names;\n}\nfunction stringValue(expression) {\n\treturn expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nconst PRISMA7_REFERENTIAL_ACTIONS = /* @__PURE__ */ new Set([\n\t\"Cascade\",\n\t\"Restrict\",\n\t\"NoAction\",\n\t\"SetNull\",\n\t\"SetDefault\"\n]);\nfunction actionValue(expression) {\n\tconst token = expression === void 0 ? void 0 : IdentifierAst.cast(expression.syntax)?.name();\n\treturn token !== void 0 && PRISMA7_REFERENTIAL_ACTIONS.has(token) ? normalizeReferentialAction(token) : void 0;\n}\nfunction parseRelationAttribute(attribute, label, sourceId, diagnostics) {\n\tlet name;\n\tlet map;\n\tlet fields;\n\tlet references;\n\tlet onDelete;\n\tlet onUpdate;\n\tconst invalid = (what, span) => {\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${label}: @relation ${what}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t};\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"name\" : arg.name;\n\t\tswitch (key) {\n\t\t\tcase \"name\":\n\t\t\t\tname = stringValue(arg.expression);\n\t\t\t\tif (name === void 0) return invalid(\"name must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"fields\":\n\t\t\t\tfields = identifierNames(arg.expression);\n\t\t\t\tif (fields === void 0) return invalid(\"fields must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"references\":\n\t\t\t\treferences = identifierNames(arg.expression);\n\t\t\t\tif (references === void 0) return invalid(\"references must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onDelete\":\n\t\t\t\tonDelete = actionValue(arg.expression);\n\t\t\t\tif (onDelete === void 0) return invalid(\"onDelete must be a referential action\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onUpdate\":\n\t\t\t\tonUpdate = actionValue(arg.expression);\n\t\t\t\tif (onUpdate === void 0) return invalid(\"onUpdate must be a referential action\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"map\":\n\t\t\t\tmap = stringValue(arg.expression);\n\t\t\t\tif (map === void 0) return invalid(\"map must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\tdefault: return invalid(`argument \"${key ?? \"\"}\" is not supported`, arg.span);\n\t\t}\n\t}\n\treturn {\n\t\tname,\n\t\tmap,\n\t\tfields,\n\t\treferences,\n\t\tonDelete,\n\t\tonUpdate,\n\t\tspan: attribute.span\n\t};\n}\nfunction storageColumn(model, fieldName) {\n\treturn model.columns.get(fieldName) ?? model.ignoredColumns.get(fieldName);\n}\n/** A foreign key reaches a table with a model through the model, and an `@@ignore` model's table by its name. */\nfunction referenceTo(model, columns) {\n\tconst table = {\n\t\ttable: model.tableName,\n\t\tcolumns,\n\t\tnamespaceId: model.namespaceId\n\t};\n\treturn model.ignored ? table : {\n\t\tmodel: model.modelName,\n\t\t...table\n\t};\n}\nfunction columnNames(model, fieldNames) {\n\tconst columns = [];\n\tfor (const fieldName of fieldNames) {\n\t\tconst column = storageColumn(model, fieldName);\n\t\tif (column === void 0) return void 0;\n\t\tcolumns.push(column.columnName);\n\t}\n\treturn columns;\n}\nfunction unresolved(label, reason, sourceId, span) {\n\treturn prisma7Diagnostic(\"PSL.PRISMA7_RELATION_UNRESOLVED\", `${label} ${reason}`, sourceId, span);\n}\nfunction groupBy(items, keyOf) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const item of items) {\n\t\tconst group = groups.get(keyOf(item)) ?? [];\n\t\tgroups.set(keyOf(item), group);\n\t\tgroup.push(item);\n\t}\n\treturn groups;\n}\nfunction orderJunctionSides(requester, partner) {\n\treturn (requester.model === partner.model ? requester.field.field.name < partner.field.field.name : requester.model.modelName < partner.model.modelName) ? [requester, partner] : [partner, requester];\n}\nfunction junctionKey(namespaceId, name) {\n\treturn JSON.stringify([namespaceId, name]);\n}\n/**\n* Prisma 7's default relation name: the two model names in alphabetical\n* order joined by `To`. Giving every unnamed relation that name lets the\n* shared pairing helper match Prisma 7's rule that an unnamed side pairs only\n* with the unnamed side of the same model pair.\n*/\nfunction effectiveRelationName(attribute, modelName, targetModelName) {\n\tif (attribute?.name !== void 0) return attribute.name;\n\tconst [first, second] = modelName < targetModelName ? [modelName, targetModelName] : [targetModelName, modelName];\n\treturn `${first}To${second}`;\n}\n/**\n* Prisma 7 accepts `SetNull` over a required field and `SetDefault` over a\n* required field with no default, and writes them into the foreign key; the\n* contract rejects both, because the action would fail the first time it runs.\n*/\nfunction referentialActionRejections(input) {\n\tconst { model, relationField, label, fieldNames, span } = input;\n\tconst anotherAction = \"choose another action, which replaces the foreign key on Prisma 7's next migration and leaves the Prisma 7 client unchanged.\";\n\tconst fieldsWhere = (predicate) => fieldNames.filter((name) => {\n\t\tconst column = storageColumn(model, name);\n\t\treturn column !== void 0 && predicate(column);\n\t});\n\tconst rejections = [];\n\tfor (const [key, action] of Object.entries(input.actions)) {\n\t\tif (action === \"setNull\") {\n\t\t\tconst required = fieldsWhere((column) => !column.nullable);\n\t\t\tif (required.length === 0) continue;\n\t\t\tconst fields = fieldList(model.modelName, required);\n\t\t\trejections.push(prisma7Diagnostic(\"PSL.PRISMA7_REFERENTIAL_ACTION_UNSUPPORTED\", `${label}: ${key}: SetNull sets the foreign key fields to null, but ${fields} ${required.length === 1 ? \"is\" : \"are\"} required, so Prisma 8 cannot describe this foreign key. Make ${fields}${relationField.optional ? \"\" : ` and \"${model.modelName}.${relationField.name}\"`} optional, which drops NOT NULL on Prisma 7's next migration and makes ${required.length === 1 && relationField.optional ? \"it\" : \"them\"} nullable in the Prisma 7 client, or ${anotherAction}`, model.sourceId, span));\n\t\t}\n\t\tif (action === \"setDefault\") {\n\t\t\tconst withoutDefault = fieldsWhere((column) => !column.nullable && column.default === void 0);\n\t\t\tif (withoutDefault.length === 0) continue;\n\t\t\tconst fields = fieldList(model.modelName, withoutDefault);\n\t\t\tconst one = withoutDefault.length === 1;\n\t\t\tconst generated = withoutDefault.filter((name) => model.columns.get(name)?.executionDefaults?.onCreate !== void 0);\n\t\t\tconst plain = withoutDefault.filter((name) => !generated.includes(name));\n\t\t\tconst generatorNote = generated.length > 0 ? \" (a client-side generator such as uuid() does not give the column one)\" : \"\";\n\t\t\tconst example = \"a column default, such as a literal or @default(dbgenerated(\\\"<expression>\\\"))\";\n\t\t\tconst plainFields = fieldList(model.modelName, plain);\n\t\t\tconst generatedFields = fieldList(model.modelName, generated);\n\t\t\tconst edit = generated.length === 0 ? `Give ${plainFields} ${example}` : plain.length === 0 ? `Replace the @default on ${generatedFields} with ${example}, because a field takes only one @default` : `Give ${plainFields} ${example}, and replace the @default on ${generatedFields} with one, because a field takes only one @default`;\n\t\t\tconst effects = [\n\t\t\t\t`Prisma 7's next migration sets ${one ? \"it\" : \"them\"}`,\n\t\t\t\t...plain.length > 0 ? [`${plainFields} ${plain.length === 1 ? \"becomes\" : \"become\"} optional when creating records with the Prisma 7 client`] : [],\n\t\t\t\t...generated.length > 0 ? [`the Prisma 7 client stops generating ${generated.length === 1 ? \"a value\" : \"values\"} for ${generatedFields}`] : []\n\t\t\t];\n\t\t\trejections.push(prisma7Diagnostic(\"PSL.PRISMA7_REFERENTIAL_ACTION_UNSUPPORTED\", `${label}: ${key}: SetDefault sets the foreign key fields to their column defaults, but ${fields} ${one ? \"is\" : \"are\"} required and ${one ? \"has\" : \"have\"} no column default${generatorNote}, so Prisma 8 cannot describe this foreign key. ${edit}: ${andList(effects)}. Or ${anotherAction}`, model.sourceId, span));\n\t\t}\n\t}\n\treturn rejections;\n}\nfunction lowerRelations(models, naming, diagnostics) {\n\tconst fkRelationMetadata = [];\n\tconst candidates = [];\n\tconst invalidFkPairings = [];\n\tconst foreignKeys = /* @__PURE__ */ new Map();\n\tconst junctions = /* @__PURE__ */ new Map();\n\tconst ignoredJunctions = /* @__PURE__ */ new Map();\n\tconst reportedJunctionNames = /* @__PURE__ */ new Set();\n\tconst junctionRequests = [];\n\tconst addForeignKey = (modelName, node) => {\n\t\tconst existing = foreignKeys.get(modelName) ?? [];\n\t\tforeignKeys.set(modelName, existing);\n\t\texisting.push(node);\n\t};\n\tconst isFkSide = (relationField) => relationField.attribute?.fields !== void 0;\n\tconst sameName = (left, right) => left.attribute?.name === right.attribute?.name;\n\tconst rejectFkSide = (model, relationField, ...rejections) => {\n\t\tdiagnostics.push(...rejections);\n\t\tinvalidFkPairings.push({\n\t\t\tpairKey: fkRelationPairKey(model.modelName, relationField.targetModelName),\n\t\t\trelationName: effectiveRelationName(relationField.attribute, model.modelName, relationField.targetModelName)\n\t\t});\n\t};\n\tfor (const model of models.values()) for (const relationField of [...model.relationFields, ...model.ignoredRelationFields]) {\n\t\tconst { field, targetModelName } = relationField;\n\t\tconst label = `Relation field \"${model.modelName}.${field.name}\"`;\n\t\tconst target = models.get(targetModelName);\n\t\tif (target === void 0) continue;\n\t\tif (isFkSide(relationField)) {\n\t\t\tconst attribute = relationField.attribute;\n\t\t\tif (attribute === void 0 || attribute.fields === void 0) continue;\n\t\t\tconst ignoredRelation = model.ignoredRelationFields.includes(relationField);\n\t\t\tconst joinedIgnored = ignoredRelation ? [] : [{\n\t\t\t\towner: model,\n\t\t\t\tnames: attribute.fields\n\t\t\t}, {\n\t\t\t\towner: target,\n\t\t\t\tnames: attribute.references ?? []\n\t\t\t}].flatMap(({ owner, names }) => {\n\t\t\t\tconst ignored = names.filter((name) => owner.ignoredFields.has(name));\n\t\t\t\treturn ignored.length === 0 ? [] : [ignoredFieldJoined({\n\t\t\t\t\tmodelName: owner.modelName,\n\t\t\t\t\tfieldNames: ignored,\n\t\t\t\t\trelationField: `${model.modelName}.${field.name}`,\n\t\t\t\t\tsourceId: model.sourceId,\n\t\t\t\t\tspan: attribute.span\n\t\t\t\t})];\n\t\t\t});\n\t\t\tif (joinedIgnored.length > 0) {\n\t\t\t\trejectFkSide(model, relationField, ...joinedIgnored);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (attribute.references === void 0) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"declares fields without references.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (attribute.fields.some((name) => model.rejectedFields.has(name)) || attribute.references.some((name) => target.rejectedFields.has(name))) {\n\t\t\t\trejectFkSide(model, relationField);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst localColumns = columnNames(model, attribute.fields);\n\t\t\tconst referencedColumns = columnNames(target, attribute.references);\n\t\t\tif (localColumns === void 0 || referencedColumns === void 0) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"names a field that is not a scalar column of the model or its target.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (localColumns.length !== referencedColumns.length) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"must list as many fields as references.\", model.sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst nullability = attribute.fields.map((name) => storageColumn(model, name)?.nullable === true);\n\t\t\tconst anyNullable = nullability.includes(true);\n\t\t\tif (anyNullable && !field.optional) {\n\t\t\t\trejectFkSide(model, relationField, unresolved(label, \"must be optional because one of its fields is optional.\", model.sourceId, field.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst onDelete = attribute.onDelete ?? (nullability.includes(false) ? \"restrict\" : \"setNull\");\n\t\t\tconst onUpdate = attribute.onUpdate ?? \"cascade\";\n\t\t\tconst actionRejections = referentialActionRejections({\n\t\t\t\tmodel,\n\t\t\t\trelationField: field,\n\t\t\t\tlabel,\n\t\t\t\tfieldNames: attribute.fields,\n\t\t\t\tactions: {\n\t\t\t\t\tonDelete,\n\t\t\t\t\tonUpdate\n\t\t\t\t},\n\t\t\t\tspan: attribute.span\n\t\t\t});\n\t\t\tif (actionRejections.length > 0) {\n\t\t\t\trejectFkSide(model, relationField, ...actionRejections);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst foreignKeyName = statedConstraintName(prisma7ForeignKeyName(model.tableName, localColumns, attribute.map, naming.identifierMaxBytes), naming.defaultConstraintNames.foreignKey(model.tableName, localColumns));\n\t\t\taddForeignKey(model.modelName, {\n\t\t\t\t...ifDefined(\"name\", foreignKeyName),\n\t\t\t\tcolumns: localColumns,\n\t\t\t\treferences: referenceTo(target, referencedColumns),\n\t\t\t\tonDelete,\n\t\t\t\tonUpdate,\n\t\t\t\tindex: false\n\t\t\t});\n\t\t\tif (ignoredRelation) continue;\n\t\t\tfkRelationMetadata.push({\n\t\t\t\tdeclaringModelName: model.modelName,\n\t\t\t\tdeclaringFieldName: field.name,\n\t\t\t\tdeclaringTableName: model.tableName,\n\t\t\t\tdeclaringNamespaceId: model.namespaceId,\n\t\t\t\ttargetModelName: target.modelName,\n\t\t\t\ttargetTableName: target.tableName,\n\t\t\t\ttargetNamespaceId: target.namespaceId,\n\t\t\t\trelationName: effectiveRelationName(attribute, model.modelName, target.modelName),\n\t\t\t\tnullable: anyNullable,\n\t\t\t\tlocalColumns,\n\t\t\t\treferencedColumns\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst ignoredPair = model.ignoredRelationFields.includes(relationField) || target.ignoredRelationFields.some((other) => other.targetModelName === model.modelName && sameName(other, relationField));\n\t\tconst targetRelationFields = [...target.relationFields, ...target.ignoredRelationFields];\n\t\tif (targetRelationFields.filter((other) => other.targetModelName === model.modelName && isFkSide(other) && sameName(other, relationField)).length > 0 || !field.list) {\n\t\t\tif (ignoredPair) continue;\n\t\t\tcandidates.push({\n\t\t\t\tmodelName: model.modelName,\n\t\t\t\ttableName: model.tableName,\n\t\t\t\tfield,\n\t\t\t\ttargetModelName: target.modelName,\n\t\t\t\tisList: field.list,\n\t\t\t\trelationName: effectiveRelationName(relationField.attribute, model.modelName, target.modelName)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst partners = targetRelationFields.filter((other) => other !== relationField && other.targetModelName === model.modelName && other.field.list && !isFkSide(other) && sameName(other, relationField));\n\t\tconst [partner] = partners;\n\t\tif (partner === void 0) {\n\t\t\tdiagnostics.push(unresolved(label, `has no matching relation field on \"${target.modelName}\".`, model.sourceId, field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tif (partners.length > 1 || target === model && relationField.attribute?.name === void 0) {\n\t\t\tdiagnostics.push(unresolved(label, `is ambiguous: more than one list field on \"${target.modelName}\" could pair with it. Name both sides with @relation(\"name\").`, model.sourceId, field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst junctionName = effectiveRelationName(relationField.attribute, model.modelName, target.modelName);\n\t\tconst requester = {\n\t\t\tmodel,\n\t\t\tfield: relationField\n\t\t};\n\t\tconst partnerSide = {\n\t\t\tmodel: target,\n\t\t\tfield: partner\n\t\t};\n\t\tconst junctionNamespaceId = orderJunctionSides(requester, partnerSide)[0].model.namespaceId;\n\t\tconst namesake = models.get(junctionName);\n\t\tif (namesake !== void 0 && namesake.namespaceId === junctionNamespaceId) {\n\t\t\tconst reportedKey = junctionKey(junctionNamespaceId, junctionName);\n\t\t\tif (!reportedJunctionNames.has(reportedKey)) {\n\t\t\t\treportedJunctionNames.add(reportedKey);\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JUNCTION_NAME_COLLISION\", `${label} is an implicit many-to-many relation whose junction model would be named \"${junctionName}\", but model \"${junctionName}\" already has that name. Rename model \"${junctionName}\" and keep its table with @@map(\"${namesake.tableName}\"); Prisma 7's next migration is then empty.`, model.sourceId, field.span));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tjunctionRequests.push({\n\t\t\trequester,\n\t\t\tpartner: partnerSide,\n\t\t\tname: junctionName,\n\t\t\tignored: ignoredPair\n\t\t});\n\t}\n\tconst requestsByJunction = groupBy(junctionRequests, (request) => junctionKey(orderJunctionSides(request.requester, request.partner)[0].model.namespaceId, request.name));\n\tfor (const requests of requestsByJunction.values()) {\n\t\tconst [first] = requests;\n\t\tif (first === void 0) continue;\n\t\tconst name = first.name;\n\t\tconst [sideA] = orderJunctionSides(first.requester, first.partner);\n\t\tconst tableName = prisma7ConstraintName(`_${name}`, \"\", naming.identifierMaxBytes);\n\t\tconst sideLabel = (side) => `${side.model.modelName}.${side.field.field.name}`;\n\t\tconst pairs = /* @__PURE__ */ new Map();\n\t\tfor (const request of requests) {\n\t\t\tconst key = [sideLabel(request.requester), sideLabel(request.partner)].sort().join(\"|\");\n\t\t\tif (!pairs.has(key)) pairs.set(key, request);\n\t\t}\n\t\tif (pairs.size > 1) {\n\t\t\tconst pairRequests = [...pairs.values()];\n\t\t\tfor (const request of pairRequests) {\n\t\t\t\tconst others = pairRequests.filter((other) => other !== request).map((other) => `\"${sideLabel(other.requester)}\"`);\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_RELATION_NAME_SHARED\", `Relation field \"${sideLabel(request.requester)}\" is an implicit many-to-many relation named \"${name}\", and so ${others.length === 1 ? \"is relation field\" : \"are relation fields\"} ${andList(others)}; Prisma 7 creates one table \"${tableName}\" for them, wired to only one of the relations (its foreign keys show which). Give each relation its own name with @relation(\"<name>\") on both fields: renaming a relation that \"${tableName}\" does not reference makes Prisma 7's next migration create its own table, while renaming the one it references moves \"${tableName}\"'s foreign keys to another relation, which fails on rows whose ids that relation's models lack and attaches the rest to the wrong records.`, request.requester.model.sourceId, request.requester.field.field.span));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tconst tableOwner = [...models.values()].find((other) => other.tableName === tableName && other.namespaceId === sideA.model.namespaceId);\n\t\tif (tableOwner !== void 0) {\n\t\t\tconst relationField = `${first.requester.model.modelName}.${first.requester.field.field.name}`;\n\t\t\tconst message = `Model \"${tableOwner.modelName}\" and the implicit many-to-many relation \"${relationField}\" both use table \"${tableOwner.namespaceId}\".\"${tableName}\"; Prisma 7 creates the relation's table there and never creates the model's. Rename the model's table with @@map, which makes Prisma 7's next migration create it, or give the relation its own name with @relation(\"<name>\") on both fields, which makes Prisma 7's next migration rebuild \"${tableName}\" as the model's table and create an empty table for the relation, losing the relation's rows.`;\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", message, tableOwner.sourceId, tableOwner.tableSpan), prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", message, first.requester.model.sourceId, first.requester.field.field.span));\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const { requester, partner, ignored } of requests) {\n\t\t\tconst junction = synthesizeJunction(requester, partner, naming, diagnostics);\n\t\t\tif (junction === void 0) continue;\n\t\t\tif (ignored) {\n\t\t\t\tignoredJunctions.set(junction.key, junction.table);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!junctions.has(junction.key)) {\n\t\t\t\tjunctions.set(junction.key, junctionModel(junction.name, junction.table));\n\t\t\t\tfkRelationMetadata.push(...junction.foreignKeys);\n\t\t\t}\n\t\t\tcandidates.push({\n\t\t\t\tmodelName: requester.model.modelName,\n\t\t\t\ttableName: requester.model.tableName,\n\t\t\t\tfield: requester.field.field,\n\t\t\t\ttargetModelName: partner.model.modelName,\n\t\t\t\tisList: true,\n\t\t\t\trelationName: junction.candidateRelationName\n\t\t\t});\n\t\t}\n\t}\n\tconst { modelRelations, fkRelationsByPair, fkRelationsByDeclaringModel } = indexFkRelations({ fkRelationMetadata });\n\tconst modelIdColumns = /* @__PURE__ */ new Map();\n\tconst modelUniqueColumnSets = /* @__PURE__ */ new Map();\n\tfor (const model of models.values()) {\n\t\tconst id = columnNames(model, model.idFields);\n\t\tif (id !== void 0 && id.length > 0) modelIdColumns.set(model.modelName, id);\n\t\tconst sets = [];\n\t\tif (id !== void 0 && id.length > 0) sets.push(id);\n\t\tfor (const unique of model.uniqueFieldSets) {\n\t\t\tconst columns = columnNames(model, unique);\n\t\t\tif (columns !== void 0) sets.push(columns);\n\t\t}\n\t\tmodelUniqueColumnSets.set(model.modelName, sets);\n\t}\n\tfor (const key of junctions.keys()) {\n\t\tmodelIdColumns.set(key, [\"A\", \"B\"]);\n\t\tmodelUniqueColumnSets.set(key, [[\"A\", \"B\"]]);\n\t}\n\tconst candidatesBySourceId = /* @__PURE__ */ new Map();\n\tfor (const candidate of candidates) {\n\t\tconst model = models.get(candidate.modelName);\n\t\tif (model === void 0) continue;\n\t\tconst group = candidatesBySourceId.get(model.sourceId) ?? {\n\t\t\tsources: model.sources,\n\t\t\tcandidates: []\n\t\t};\n\t\tcandidatesBySourceId.set(model.sourceId, group);\n\t\tgroup.candidates.push(candidate);\n\t}\n\tfor (const { sources, candidates: backrelationCandidates } of candidatesBySourceId.values()) {\n\t\tconst pairingDiagnostics = createPslDiagnosticCollector(sources);\n\t\tapplyBackrelationCandidates({\n\t\t\tbackrelationCandidates,\n\t\t\tfkRelationsByPair,\n\t\t\tinvalidFkPairings,\n\t\t\tfkRelationsByDeclaringModel,\n\t\t\tmodelIdColumns,\n\t\t\tmodelUniqueColumnSets,\n\t\t\tmodelRelations,\n\t\t\tdiagnostics: pairingDiagnostics,\n\t\t\tsources\n\t\t});\n\t\tfor (const diagnostic of pairingDiagnostics.toExternal()) diagnostics.push(RELATION_PAIRING_CODES.has(diagnostic.code) ? {\n\t\t\t...diagnostic,\n\t\t\tcode: \"PSL.PRISMA7_RELATION_UNRESOLVED\"\n\t\t} : diagnostic);\n\t}\n\tconst relations = /* @__PURE__ */ new Map();\n\tfor (const [modelName, nodes] of modelRelations) relations.set(modelName, [...nodes].sort((left, right) => left.fieldName.localeCompare(right.fieldName)));\n\treturn {\n\t\tjunctions,\n\t\tignoredJunctions,\n\t\tforeignKeys,\n\t\trelations\n\t};\n}\n/** The junction model over a junction table: a field for each of its columns. */\nfunction junctionModel(name, table) {\n\tconst { columns, ...properties } = table;\n\treturn {\n\t\t...properties,\n\t\tmodelName: name,\n\t\tfields: columns.map((column) => ({\n\t\t\tfieldName: column.columnName,\n\t\t\t...column\n\t\t}))\n\t};\n}\n/**\n* The id column a junction side contributes. The diagnostic names the\n* requesting relation field, so it is located at that field, whichever side's\n* id is at fault.\n*/\nfunction singleIdColumn(side, requester, diagnostics) {\n\tif (side.model.idFields.some((name) => side.model.ignoredFields.has(name) || side.model.rejectedFields.has(name))) return;\n\tconst [idField, ...rest] = side.model.idFields;\n\tconst column = idField === void 0 ? void 0 : storageColumn(side.model, idField);\n\tif (column === void 0 || rest.length > 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_JUNCTION_ID_UNSUPPORTED\", `Relation field \"${requester.model.modelName}.${requester.field.field.name}\" is an implicit many-to-many relation, but \"${side.model.modelName}\" ${column === void 0 ? \"has no single-field @id\" : \"has a composite id\"}; Prisma 7 requires a single-field @id on both models of an implicit many-to-many relation.`, requester.model.sourceId, requester.field.field.span));\n\t\treturn;\n\t}\n\treturn column;\n}\n/**\n* Prisma 7's implicit junction: table `_AToB` (or `_Name`), columns `A` and `B`\n* typed like the two ids, primary key `(A, B)`, index `_AToB_B_index`, and two\n* cascading foreign keys, with relation fields named as `contract infer` names\n* them. `A` is the model whose name is smaller in plain\n* string order; for a self-relation, the field whose name is smaller. This is\n* prisma-engines' rule (`psl/parser-database/src/relations.rs`,\n* `ingest_relation`: the side with the greater model name, or field name for a\n* self relation, is skipped so the smaller one owns `field_a`).\n*/\nfunction synthesizeJunction(requester, partner, naming, diagnostics) {\n\tconst [sideA, sideB] = orderJunctionSides(requester, partner);\n\tconst requesterFirst = sideA === requester;\n\tconst name = requester.field.attribute?.name ?? `${sideA.model.modelName}To${sideB.model.modelName}`;\n\tconst idA = singleIdColumn(sideA, requester, diagnostics);\n\tconst idB = singleIdColumn(sideB, requester, diagnostics);\n\tif (idA === void 0 || idB === void 0) return void 0;\n\tconst tableName = prisma7ConstraintName(`_${name}`, \"\", naming.identifierMaxBytes);\n\tconst namespaceId = sideA.model.namespaceId;\n\tconst key = junctionKey(namespaceId, name);\n\tconst [relationFieldA, relationFieldB] = naming.junctionRelationFieldNames(sideA.model.tableName, sideB.model.tableName);\n\tconst foreignKeyName = (column) => statedConstraintName(prisma7JunctionForeignKeyName(name, column, naming.identifierMaxBytes), naming.defaultConstraintNames.foreignKey(tableName, [column]));\n\tconst primaryKeyName = statedConstraintName(prisma7JunctionPrimaryKeyName(name, naming.identifierMaxBytes), naming.defaultConstraintNames.primaryKey(tableName));\n\tconst foreignKey = (column, side, id) => ({\n\t\t...ifDefined(\"name\", foreignKeyName(column)),\n\t\tcolumns: [column],\n\t\treferences: referenceTo(side.model, [id.columnName]),\n\t\tonDelete: \"cascade\",\n\t\tonUpdate: \"cascade\",\n\t\tindex: false\n\t});\n\tconst metadata = (column, side, id) => ({\n\t\tdeclaringModelName: key,\n\t\tdeclaringFieldName: column === \"A\" ? relationFieldA : relationFieldB,\n\t\tdeclaringTableName: tableName,\n\t\tdeclaringNamespaceId: namespaceId,\n\t\ttargetModelName: side.model.modelName,\n\t\ttargetTableName: side.model.tableName,\n\t\ttargetNamespaceId: side.model.namespaceId,\n\t\trelationName: `${name}:${column}`,\n\t\tnullable: false,\n\t\tlocalColumns: [column],\n\t\treferencedColumns: [id.columnName]\n\t});\n\tconst index = {\n\t\tcolumns: [\"B\"],\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\twhere: void 0,\n\t\tunique: void 0,\n\t\tmap: prisma7ConstraintName(`_${name}`, \"_B_index\", naming.identifierMaxBytes),\n\t\tname: void 0\n\t};\n\treturn {\n\t\tkey,\n\t\tname,\n\t\ttable: {\n\t\t\ttableName,\n\t\t\tnamespaceId,\n\t\t\tcolumns: [{\n\t\t\t\tcolumnName: \"A\",\n\t\t\t\tdescriptor: idA.descriptor,\n\t\t\t\tnullable: false,\n\t\t\t\tmany: false\n\t\t\t}, {\n\t\t\t\tcolumnName: \"B\",\n\t\t\t\tdescriptor: idB.descriptor,\n\t\t\t\tnullable: false,\n\t\t\t\tmany: false\n\t\t\t}],\n\t\t\tid: {\n\t\t\t\tcolumns: [\"A\", \"B\"],\n\t\t\t\t...ifDefined(\"name\", primaryKeyName)\n\t\t\t},\n\t\t\tindexes: [index],\n\t\t\tforeignKeys: [foreignKey(\"A\", sideA, idA), foreignKey(\"B\", sideB, idB)]\n\t\t},\n\t\tforeignKeys: [metadata(\"A\", sideA, idA), metadata(\"B\", sideB, idB)],\n\t\tcandidateRelationName: requesterFirst ? `${name}:A` : `${name}:B`\n\t};\n}\n//#endregion\n//#region src/interpreter.ts\n/** The generator `now()` resolves to for a column, which `@updatedAt` writes on create and on update; `undefined` when no generator function binds `now` to its codec. */\nfunction nowGeneratorFor(generatorFunctions, column) {\n\tconst resolution = generatorFunctions.resolve({\n\t\tname: \"now\",\n\t\targs: {}\n\t}, {\n\t\tcodecId: column.codecId,\n\t\ttypeParams: column.typeParams\n\t});\n\treturn resolution.ok ? resolution.generator : void 0;\n}\nconst SUMMARY = \"Prisma 7 schema interpretation failed\";\nfunction stringArgument(attribute) {\n\tconst expression = (attribute.args.find((arg) => arg.kind === \"positional\") ?? attribute.args.find((arg) => arg.name === \"name\"))?.expression;\n\tif (expression === void 0) return void 0;\n\treturn StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction blockEntry(source, key) {\n\tfor (const entry of source.block.entries) if (entry.key()?.name() === key) return entry;\n}\nfunction scalarValue(source, key) {\n\tconst value = blockEntry(source, key)?.value();\n\tif (value === void 0) return void 0;\n\treturn StringLiteralExprAst.cast(value.syntax)?.value();\n}\nfunction parameterSpan(source, key) {\n\tconst entry = blockEntry(source, key);\n\treturn entry === void 0 ? source.block.span : nodePslSpan(entry.syntax, source.sources);\n}\n/** Prisma 7 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */\nfunction reportDottedBlockValues(block, sourceId, sources, diagnostics) {\n\tfor (const entry of block.entries) {\n\t\tconst value = entry.value();\n\t\tif (value === void 0) continue;\n\t\tfor (const path of dottedPathsIn(value)) diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\",\n\t\t\tmessage: `${block.keyword} \"${block.name}\": the value of \"${entry.key()?.name() ?? \"\"}\" holds the dotted path ${path.path().join(\".\")}, which Prisma 7 does not accept in a ${block.keyword} block.`,\n\t\t\tsourceId,\n\t\t\tspan: nodePslSpan(path.syntax, sources)\n\t\t});\n\t}\n}\nfunction reportDuplicateBlockEntries(source, diagnostics) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of source.block.entries) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${key}\" in \"${source.block.keyword}\" block \"${source.block.name}\"; first occurrence wins`,\n\t\t\t\tsourceId: source.sourceId,\n\t\t\t\tspan: nodePslSpan(entry.syntax, source.sources)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t}\n}\nfunction interpretPrisma7Documents(input) {\n\tconst { binding } = input;\n\tconst diagnostics = [...input.seedDiagnostics];\n\tconst { defaultNamespaceId } = input;\n\tconst datasources = [];\n\tconst enumBlocks = [];\n\tconst models = [];\n\tconst declaredNames = /* @__PURE__ */ new Map();\n\tconst claimName = (kind, name, sourceId, span) => {\n\t\tconst previous = declaredNames.get(name);\n\t\tif (previous === void 0) {\n\t\t\tdeclaredNames.set(name, sourceId);\n\t\t\treturn true;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\tmessage: `Duplicate declaration of ${kind} \"${name}\"; first declared in ${basename(previous)}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t\treturn false;\n\t};\n\tfor (const { document, sources, sourceFile, sourceId } of input.documents) {\n\t\tconst { symbolTable, diagnostics: tableDiagnostics } = buildSymbolTable({\n\t\t\tdocuments: [document],\n\t\t\tsources,\n\t\t\tdefaultNamespaceId\n\t\t});\n\t\tfor (const diagnostic of tableDiagnostics) diagnostics.push({\n\t\t\tcode: diagnostic.code,\n\t\t\tmessage: diagnostic.message,\n\t\t\tsourceId,\n\t\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t\t});\n\t\tconst unsupported = (keyword, span) => {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\t\t\tmessage: `Unsupported top-level block \"${keyword}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t};\n\t\tconst unsupportedInclusions = (code, holders) => {\n\t\t\tfor (const holder of Object.values(holders)) for (const inclusion of holder.node.inclusions()) diagnostics.push({\n\t\t\t\tcode,\n\t\t\t\tmessage: `Unsupported mixin inclusion \"${printSyntax(inclusion.syntax).trim()}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: nodePslSpan(inclusion.syntax, sources)\n\t\t\t});\n\t\t};\n\t\tfor (const block of Object.values(symbolTable.defaultNamespace.blocks)) switch (block.keyword) {\n\t\t\tcase \"datasource\":\n\t\t\t\tdatasources.push({\n\t\t\t\t\tblock,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources,\n\t\t\t\t\tsourceFile\n\t\t\t\t});\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"generator\":\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"enum\":\n\t\t\t\tif (claimName(\"enum\", block.name, sourceId, block.span)) enumBlocks.push({\n\t\t\t\t\tblock,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources,\n\t\t\t\t\tsourceFile\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"view\":\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_VIEW_UNSUPPORTED\", `View \"${block.name}\" is not supported; Prisma 8 has no views. Remove the view or replace it with a model over the underlying table.`, sourceId, keywordPslSpan(block.node.syntax, block.keyword, sources)));\n\t\t\t\tbreak;\n\t\t\tdefault: unsupported(block.keyword, keywordPslSpan(block.node.syntax, block.keyword, sources));\n\t\t}\n\t\tfor (const namespace of Object.values(symbolTable.namespaces)) for (const { span } of namespace.declarations) unsupported(\"namespace\", span);\n\t\tfor (const compositeType of Object.values(symbolTable.defaultNamespace.compositeTypes)) unsupported(\"type\", compositeType.span);\n\t\tfor (const namedType of Object.values(symbolTable.namedTypes)) unsupported(\"types\", namedType.span);\n\t\tfor (const mixin of Object.values(symbolTable.defaultNamespace.mixins)) unsupported(`${mixin.keyword} mixin`, mixin.span);\n\t\tunsupportedInclusions(\"PSL_INVALID_MODEL_MEMBER\", symbolTable.defaultNamespace.models);\n\t\tunsupportedInclusions(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", symbolTable.defaultNamespace.blocks);\n\t\tfor (const symbol of Object.values(symbolTable.defaultNamespace.models)) {\n\t\t\tif (!claimName(\"model\", symbol.name, sourceId, symbol.span)) continue;\n\t\t\tmodels.push(readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics));\n\t\t}\n\t}\n\tcheckDatasource(datasources, input.documents[0]?.sourceId ?? \"schema.prisma\", binding, diagnostics);\n\treportTableCollisions(models, diagnostics);\n\tconst enums = /* @__PURE__ */ new Map();\n\tfor (const source of enumBlocks) {\n\t\tconst declaration = readEnumDeclaration(source, defaultNamespaceId, diagnostics);\n\t\tif (declaration !== void 0) enums.set(declaration.name, declaration);\n\t}\n\tconst namespaceEntities = lowerNativeEnums(enums, input, diagnostics);\n\tconst modelNames = new Set(models.map((model) => model.symbol.name));\n\tconst ignoredModels = new Set(models.filter((model) => model.ignored).map((model) => model.symbol.name));\n\tconst composedExtensions = new Set(input.composedExtensions);\n\tconst builds = /* @__PURE__ */ new Map();\n\tfor (const declaration of models) {\n\t\tconst build = {\n\t\t\tdeclaration,\n\t\t\tcolumns: /* @__PURE__ */ new Map(),\n\t\t\tignoredColumns: /* @__PURE__ */ new Map(),\n\t\t\tignoredFields: /* @__PURE__ */ new Set(),\n\t\t\tignoredRelationFields: [],\n\t\t\trejectedFields: /* @__PURE__ */ new Set(),\n\t\t\tidFields: declaration.id?.fields ?? [],\n\t\t\tidMap: declaration.id?.map,\n\t\t\tuniqueIndexes: [...declaration.uniqueIndexes],\n\t\t\trelationFields: []\n\t\t};\n\t\tfor (const field of Object.values(declaration.symbol.fields)) {\n\t\t\tconst reported = diagnostics.length;\n\t\t\treadField({\n\t\t\t\tfield,\n\t\t\t\tbuild,\n\t\t\t\tmodelNames,\n\t\t\t\tignoredModels,\n\t\t\t\tenums,\n\t\t\t\tnamespaceEntities,\n\t\t\t\tcomposedExtensions,\n\t\t\t\tinput,\n\t\t\t\tdiagnostics\n\t\t\t});\n\t\t\tif (diagnostics.length > reported && !build.columns.has(field.name) && !build.ignoredColumns.has(field.name)) build.rejectedFields.add(field.name);\n\t\t}\n\t\tbuilds.set(declaration.symbol.name, build);\n\t}\n\tconst relationModels = /* @__PURE__ */ new Map();\n\tfor (const [modelName, build] of builds) relationModels.set(modelName, {\n\t\tmodelName,\n\t\ttableName: build.declaration.tableName,\n\t\tignored: build.declaration.ignored,\n\t\ttableSpan: build.declaration.symbol.attributes.find((attribute) => attribute.name === \"map\")?.span ?? build.declaration.symbol.span,\n\t\tnamespaceId: build.declaration.namespaceId,\n\t\tsourceId: build.declaration.sourceId,\n\t\tsources: build.declaration.sources,\n\t\tcolumns: build.columns,\n\t\tignoredColumns: build.ignoredColumns,\n\t\tignoredFields: build.ignoredFields,\n\t\tignoredRelationFields: build.ignoredRelationFields,\n\t\trejectedFields: build.rejectedFields,\n\t\tidFields: build.idFields,\n\t\tuniqueFieldSets: build.uniqueIndexes.flatMap((index) => index.fields === void 0 ? [] : [index.fields]),\n\t\trelationFields: build.relationFields\n\t});\n\tconst lowered = lowerRelations(relationModels, binding, diagnostics);\n\tconst modelNodes = [];\n\tconst tables = [];\n\tfor (const [modelName, build] of builds) {\n\t\tconst model = relationModels.get(modelName);\n\t\tif (model === void 0) continue;\n\t\tconst ignoredAmong = (fieldNames) => fieldNames?.filter((name) => build.ignoredFields.has(name)) ?? [];\n\t\tconst idAttribute = build.declaration.id;\n\t\tconst ignoredIdFields = ignoredAmong(idAttribute?.fields);\n\t\tif (idAttribute !== void 0 && ignoredIdFields.length > 0) diagnostics.push(ignoredFieldInPrimaryKey({\n\t\t\tmodelName,\n\t\t\tfieldNames: ignoredIdFields,\n\t\t\tusedBy: `@@id on model \"${modelName}\"`,\n\t\t\tsourceId: model.sourceId,\n\t\t\tspan: idAttribute.span\n\t\t}));\n\t\tconst id = keyColumns(model, model.idFields);\n\t\tconst indexes = [...build.uniqueIndexes.map((attribute) => ({\n\t\t\tattribute,\n\t\t\tunique: true\n\t\t})), ...build.declaration.indexes.map((attribute) => ({\n\t\t\tattribute,\n\t\t\tunique: false\n\t\t}))].flatMap(({ attribute, unique }) => {\n\t\t\tif (attribute.fields?.some((name) => build.rejectedFields.has(name))) return [];\n\t\t\tconst columns = attribute.fields === void 0 ? void 0 : keyColumns(model, attribute.fields);\n\t\t\tif (columns === void 0) {\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED\", `Model \"${modelName}\": an index names a field that is not a scalar column of the model.`, model.sourceId, attribute.span));\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn [indexNode(model.tableName, columns, attribute, unique, binding.identifierMaxBytes)];\n\t\t});\n\t\tconst foreignKeys = lowered.foreignKeys.get(modelName);\n\t\tconst relations = lowered.relations.get(modelName);\n\t\tconst primaryKeyName = statedConstraintName(prisma7PrimaryKeyName(model.tableName, build.idMap, binding.identifierMaxBytes), binding.defaultConstraintNames.primaryKey(model.tableName));\n\t\tconst tableProperties = stateServedBackingIndexes({\n\t\t\ttableName: model.tableName,\n\t\t\t...id !== void 0 && id.length > 0 ? { id: {\n\t\t\t\tcolumns: id,\n\t\t\t\t...ifDefined(\"name\", primaryKeyName)\n\t\t\t} } : {},\n\t\t\t...indexes.length > 0 ? { indexes } : {},\n\t\t\t...foreignKeys !== void 0 ? { foreignKeys } : {}\n\t\t});\n\t\tconst ignoredColumns = [...build.ignoredColumns.values()];\n\t\tif (model.ignored) {\n\t\t\ttables.push({\n\t\t\t\t...tableProperties,\n\t\t\t\tnamespaceId: model.namespaceId,\n\t\t\t\tcolumns: ignoredColumns\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tmodelNodes.push({\n\t\t\t...tableProperties,\n\t\t\tmodelName,\n\t\t\tnamespaceId: model.namespaceId,\n\t\t\tfields: [...build.columns.values()],\n\t\t\t...relations !== void 0 ? { relations } : {}\n\t\t});\n\t\tif (ignoredColumns.length > 0) tables.push({\n\t\t\tnamespaceId: model.namespaceId,\n\t\t\ttableName: model.tableName,\n\t\t\tcolumns: ignoredColumns\n\t\t});\n\t}\n\ttables.push(...[...lowered.ignoredJunctions.values()].map(stateServedBackingIndexes));\n\tfor (const [key, junction] of lowered.junctions) {\n\t\tconst relations = lowered.relations.get(key);\n\t\tmodelNodes.push(stateServedBackingIndexes(relations === void 0 ? junction : {\n\t\t\t...junction,\n\t\t\trelations\n\t\t}));\n\t}\n\tif (diagnostics.length > 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics\n\t});\n\tconst createNamespace = (namespace) => {\n\t\tconst entities = namespaceEntities.get(namespace.id);\n\t\tif (entities === void 0) return binding.createNamespace(namespace);\n\t\tconst valueSet = {\n\t\t\t...namespace.entries[\"valueSet\"],\n\t\t\t...entities[\"valueSet\"]\n\t\t};\n\t\treturn binding.createNamespace({\n\t\t\t...namespace,\n\t\t\tentries: {\n\t\t\t\t...namespace.entries,\n\t\t\t\t...entities,\n\t\t\t\t...Object.keys(valueSet).length > 0 ? { valueSet } : {}\n\t\t\t}\n\t\t});\n\t};\n\treturn ok(buildSqlContractFromDefinition({\n\t\ttarget: binding.target,\n\t\twarnings: void 0,\n\t\tcreateNamespace,\n\t\t...namespaceEntities.size > 0 ? { namespaces: [...namespaceEntities.keys()] } : {},\n\t\tmodels: modelNodes,\n\t\t...tables.length > 0 ? { tables } : {}\n\t}, input.codecLookup, input.dataTypes.lookup));\n}\n/**\n* Prisma 7 never derives a backing index for a foreign key, so its relations say `index: false`. Where the model's own indexes or keys already serve a foreign key, the relation takes the default instead, so the build drops the derived index again, or names the named key or plain index whose first columns are the foreign key's. Either way the stored foreign key states what backs it, and no index is added.\n*/\nfunction stateServedBackingIndexes(node) {\n\tif (node.foreignKeys === void 0) return node;\n\tconst table = {\n\t\tindexes: (node.indexes ?? []).map((index) => lowerAuthoredIndex(node.tableName, blindCast(index), [])),\n\t\tuniques: node.uniques ?? [],\n\t\tprimaryKey: node.id\n\t};\n\treturn {\n\t\t...node,\n\t\tforeignKeys: node.foreignKeys.map((foreignKey) => {\n\t\t\tif (foreignKey.index !== false) return foreignKey;\n\t\t\tif (declaredIndexesServeForeignKey(foreignKey.columns, table)) return {\n\t\t\t\t...foreignKey,\n\t\t\t\tindex: true\n\t\t\t};\n\t\t\tconst name = declaredBackingObjectName(foreignKey.columns, table);\n\t\t\treturn name === void 0 ? foreignKey : {\n\t\t\t\t...foreignKey,\n\t\t\t\tindex: name\n\t\t\t};\n\t\t})\n\t};\n}\nfunction checkDatasource(datasources, fallbackSourceId, binding, diagnostics) {\n\tconst [datasource] = datasources;\n\tconst [namedProvider] = binding.providers;\n\tif (datasource === void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_PROVIDER_MISMATCH\", `No datasource block found; add \\`datasource db { provider = \"${namedProvider}\" }\\`.`, fallbackSourceId, void 0));\n\t\treturn;\n\t}\n\treportDuplicateBlockEntries(datasource, diagnostics);\n\tconst provider = scalarValue(datasource, \"provider\");\n\tif (provider === void 0 || !binding.providers.includes(provider)) diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_PROVIDER_MISMATCH\", provider === void 0 ? `The datasource block declares no string \\`provider\\`; this contract source reads Prisma 7 schemas for provider \"${namedProvider}\".` : `The datasource provider is \"${provider}\"; this contract source reads Prisma 7 schemas for provider \"${namedProvider}\".`, datasource.sourceId, parameterSpan(datasource, \"provider\")));\n\tfor (const [property, edit] of Object.entries({\n\t\trelationMode: \"Removing relationMode, or setting it to \\\"foreignKeys\\\"\",\n\t\treferentialIntegrity: \"Removing referentialIntegrity, or replacing it with relationMode = \\\"foreignKeys\\\"\"\n\t})) {\n\t\tif (scalarValue(datasource, property) !== \"prisma\") continue;\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_RELATION_MODE_UNSUPPORTED\", `${property} = \"prisma\" is not supported: the contract declares the foreign keys its relations need, and in this mode Prisma 7 creates none. ${edit}, makes Prisma 7's next migration add those foreign keys, and that migration fails if any existing row breaks one.`, datasource.sourceId, parameterSpan(datasource, property)));\n\t}\n}\nfunction reportTableCollisions(models, diagnostics) {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tfor (const model of models) {\n\t\tconst key = `${model.namespaceId}.${model.tableName}`;\n\t\tconst group = byTable.get(key) ?? [];\n\t\tbyTable.set(key, group);\n\t\tgroup.push(model);\n\t}\n\tfor (const group of byTable.values()) {\n\t\tif (group.length < 2) continue;\n\t\tconst names = group.map((model) => `\"${model.symbol.name}\"`).join(\", \");\n\t\tfor (const model of group) {\n\t\t\tconst mapAttribute = model.symbol.attributes.find((attribute) => attribute.name === \"map\");\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_TABLE_COLLISION\", `Models ${names} all map to table \"${model.namespaceId}\".\"${model.tableName}\"; each model needs its own table.`, model.sourceId, mapAttribute?.span ?? model.symbol.span));\n\t\t}\n\t}\n}\nfunction keyColumns(model, fieldNames) {\n\tconst columns = [];\n\tfor (const fieldName of fieldNames) {\n\t\tconst column = model.columns.get(fieldName) ?? model.ignoredColumns.get(fieldName);\n\t\tif (column === void 0) return void 0;\n\t\tcolumns.push(column.columnName);\n\t}\n\treturn columns;\n}\nfunction readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics) {\n\tconst { indexTypes } = binding;\n\tlet ignored = false;\n\tlet tableName = symbol.name;\n\tlet namespaceId = defaultNamespaceId;\n\tlet id;\n\tconst uniqueIndexes = [];\n\tconst indexes = [];\n\tfor (const attribute of symbol.attributes) {\n\t\tif ([\n\t\t\t\"id\",\n\t\t\t\"unique\",\n\t\t\t\"index\"\n\t\t].includes(attribute.name)) checkStatedConstraintNameLength({\n\t\t\tattribute,\n\t\t\towner: `Model \"${symbol.name}\"`,\n\t\t\tmaxBytes: binding.identifierMaxBytes,\n\t\t\tsourceId,\n\t\t\tdiagnostics\n\t\t});\n\t\tswitch (attribute.name) {\n\t\t\tcase \"map\":\n\t\t\t\ttableName = requireStringArgument(attribute, symbol.name, sourceId, diagnostics) ?? tableName;\n\t\t\t\tbreak;\n\t\t\tcase \"schema\":\n\t\t\t\tnamespaceId = requireStringArgument(attribute, symbol.name, sourceId, diagnostics) ?? namespaceId;\n\t\t\t\tbreak;\n\t\t\tcase \"id\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) id = parsed;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"unique\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) uniqueIndexes.push(parsed);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"index\": {\n\t\t\t\tconst parsed = parseIndexAttribute(attribute, symbol.name, sourceId, indexTypes, diagnostics);\n\t\t\t\tif (parsed?.fields !== void 0) indexes.push(parsed);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ignore\":\n\t\t\t\tignored = true;\n\t\t\t\tbreak;\n\t\t\tdefault: diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Model \"${symbol.name}\": attribute \"@@${attribute.name}\" is not supported yet by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t\t}\n\t}\n\treturn {\n\t\tsymbol,\n\t\tsourceId,\n\t\tsources,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tignored,\n\t\tid,\n\t\tuniqueIndexes,\n\t\tindexes\n\t};\n}\nfunction requireStringArgument(attribute, owner, sourceId, diagnostics) {\n\tconst value = stringArgument(attribute);\n\tif (value === void 0) diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `\"${owner}\": attribute \"${attribute.name}\" expects one string argument.`,\n\t\tsourceId,\n\t\tspan: attribute.span\n\t});\n\treturn value;\n}\nfunction readEnumDeclaration(source, defaultNamespaceId, diagnostics) {\n\tconst { block, sourceId, sources } = source;\n\tlet typeName = block.name;\n\tlet namespaceId = defaultNamespaceId;\n\tfor (const attribute of block.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\ttypeName = requireStringArgument(attribute, block.name, sourceId, diagnostics) ?? typeName;\n\t\t\tbreak;\n\t\tcase \"schema\":\n\t\t\tnamespaceId = requireStringArgument(attribute, block.name, sourceId, diagnostics) ?? namespaceId;\n\t\t\tbreak;\n\t\tdefault: diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Enum \"${block.name}\": attribute \"@@${attribute.name}\" is not supported by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t}\n\tconst members = [];\n\tconst seenMemberNames = /* @__PURE__ */ new Set();\n\tfor (const entry of block.entries) {\n\t\tconst name = entry.key()?.name();\n\t\tif (name === void 0) continue;\n\t\tif (seenMemberNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: nodePslSpan(entry.syntax, sources)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenMemberNames.add(name);\n\t\tlet value = name;\n\t\tconst span = nodePslSpan(entry.syntax, sources);\n\t\tfor (const attributeNode of entry.attributes()) {\n\t\t\tconst attribute = readResolvedAttribute(attributeNode, sources);\n\t\t\tif (attribute.name === \"map\") value = requireStringArgument(attribute, `${block.name}.${name}`, sourceId, diagnostics) ?? value;\n\t\t\telse diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `Enum member \"${block.name}.${name}\": attribute \"@${attribute.name}\" is not supported by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t\t}\n\t\tmembers.push({\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tspan\n\t\t});\n\t}\n\treturn {\n\t\tname: block.name,\n\t\ttypeName,\n\t\tnamespaceId,\n\t\tmembers,\n\t\tspan: block.span,\n\t\tsourceId\n\t};\n}\nfunction lowerNativeEnums(enums, input, diagnostics) {\n\tconst result = /* @__PURE__ */ new Map();\n\tif (enums.size === 0) return result;\n\tconst { entityKind } = input.binding.nativeEnum;\n\tconst descriptor = buildEntityTypesByDiscriminator(input.authoringContributions).get(entityKind);\n\tfor (const declaration of enums.values()) {\n\t\tif (descriptor === void 0) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `Enum \"${declaration.name}\" cannot be lowered: target \"${input.binding.target.targetId}\" registers no \"${entityKind}\" entity kind.`, declaration.sourceId, declaration.span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst context = {\n\t\t\tfamily: input.binding.target.familyId,\n\t\t\ttarget: input.binding.target.targetId,\n\t\t\tcodecLookup: input.codecLookup,\n\t\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\t\tsourceId: declaration.sourceId,\n\t\t\tdiagnostics: { push: (diagnostic) => {\n\t\t\t\tdiagnostics.push(blindCast(diagnostic));\n\t\t\t} }\n\t\t};\n\t\tconst values = Object.create(null);\n\t\tconst parameterSpans = Object.create(null);\n\t\tfor (const member of declaration.members) {\n\t\t\tvalues[member.name] = member.value;\n\t\t\tparameterSpans[member.name] = member.span;\n\t\t}\n\t\tconst entity = instantiateAuthoringEntityType(entityKind, descriptor, [{\n\t\t\tkind: entityKind,\n\t\t\tkeyword: entityKind,\n\t\t\tname: declaration.name,\n\t\t\tvalues,\n\t\t\tparameterSpans,\n\t\t\tattributes: { map: {\n\t\t\t\targs: { name: declaration.typeName },\n\t\t\t\tspan: declaration.span\n\t\t\t} },\n\t\t\tspan: declaration.span,\n\t\t\tnamespaceId: declaration.namespaceId\n\t\t}], context);\n\t\tif (entity === void 0) continue;\n\t\tconst entities = result.get(declaration.namespaceId) ?? {};\n\t\tresult.set(declaration.namespaceId, entities);\n\t\tentities[entityKind] = {\n\t\t\t...entities[entityKind],\n\t\t\t[declaration.name]: entity\n\t\t};\n\t\tconst valueSet = deriveValueSetFromEntity(descriptor.output, entity);\n\t\tif (valueSet !== void 0) entities[\"valueSet\"] = {\n\t\t\t...entities[\"valueSet\"],\n\t\t\t[declaration.name]: valueSet\n\t\t};\n\t}\n\treturn result;\n}\nfunction nativeTypeMessage(label, nativeType) {\n\treturn `${label}: native type \"@db.${nativeType}\" has no Prisma 8 codec yet, and Prisma 8 cannot read this schema until it supports the column type. @ignore on the field or @@ignore on the model does not help: Prisma 8 keeps the columns of ignored fields and models in the contract. Changing the field's type to one Prisma 8 supports changes the column type on Prisma 7's next migration.`;\n}\nfunction readField(args) {\n\tconst { field, build, diagnostics, input } = args;\n\tconst { binding } = input;\n\tconst model = build.declaration;\n\tconst sourceId = model.sourceId;\n\tconst label = `Field \"${model.symbol.name}.${field.name}\"`;\n\tconst isRelationField = args.modelNames.has(field.typeName) && field.typeConstructor === void 0;\n\tconst fieldIgnored = field.attributes.some((attribute) => attribute.name === \"ignore\") || isRelationField && args.ignoredModels.has(field.typeName);\n\tif (fieldIgnored) build.ignoredFields.add(field.name);\n\tconst ignored = fieldIgnored || model.ignored;\n\tlet columnName = field.name;\n\tlet nativeType;\n\tlet relation;\n\tlet defaultAttribute;\n\tlet updatedAt;\n\tfor (const attribute of field.attributes) {\n\t\tif (isRelationField ? attribute.name === \"relation\" : [\"id\", \"unique\"].includes(attribute.name)) checkStatedConstraintNameLength({\n\t\t\tattribute,\n\t\t\towner: label,\n\t\t\tmaxBytes: binding.identifierMaxBytes,\n\t\t\tsourceId,\n\t\t\tdiagnostics\n\t\t});\n\t\tif (attribute.name === \"map\" && !isRelationField) columnName = requireStringArgument(attribute, label, sourceId, diagnostics) ?? columnName;\n\t\telse if (attribute.name.startsWith(\"db.\") && !isRelationField) nativeType = {\n\t\t\tname: attribute.name.slice(3),\n\t\t\tattribute\n\t\t};\n\t\telse if (attribute.name === \"id\" && !isRelationField) {\n\t\t\tconst parsed = parseIndexAttribute(attribute, label, sourceId, binding.indexTypes, diagnostics);\n\t\t\tif (parsed !== void 0) {\n\t\t\t\tbuild.idFields = [field.name];\n\t\t\t\tbuild.idMap = parsed.map;\n\t\t\t}\n\t\t\tif (fieldIgnored) diagnostics.push(ignoredFieldInPrimaryKey({\n\t\t\t\tmodelName: model.symbol.name,\n\t\t\t\tfieldNames: [field.name],\n\t\t\t\tusedBy: \"its @id\",\n\t\t\t\tsourceId,\n\t\t\t\tspan: attribute.span\n\t\t\t}));\n\t\t} else if (attribute.name === \"unique\" && !isRelationField) {\n\t\t\tconst parsed = parseIndexAttribute(attribute, label, sourceId, binding.indexTypes, diagnostics);\n\t\t\tif (parsed !== void 0) build.uniqueIndexes.push({\n\t\t\t\t...parsed,\n\t\t\t\tfields: [field.name]\n\t\t\t});\n\t\t} else if (attribute.name === \"default\" && !isRelationField) defaultAttribute = attribute;\n\t\telse if (attribute.name === \"updatedAt\" && !isRelationField) updatedAt = attribute;\n\t\telse if (attribute.name === \"relation\" && isRelationField) relation = attribute;\n\t\telse if (attribute.name === \"ignore\") {} else diagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNKNOWN_ATTRIBUTE\", `${label}: attribute \"@${attribute.name}\" is not supported yet by the Prisma 7 contract source.`, sourceId, attribute.span));\n\t}\n\tif (field.malformedType) return;\n\tif (field.typeConstructor !== void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} has type \"${field.typeConstructor.path.join(\".\")}(...)\", which has no Prisma 8 codec yet, and Prisma 8 cannot read this schema until it supports the column type. @@ignore on model \"${model.symbol.name}\" does not help: Prisma 8 keeps the columns of ignored models in the contract. Removing the field drops its column on Prisma 7's next migration.`, sourceId, field.typeConstructor.span));\n\t\treturn;\n\t}\n\tif (isRelationField) {\n\t\tconst attribute = relation === void 0 ? void 0 : parseRelationAttribute(relation, label, sourceId, diagnostics);\n\t\tif (relation !== void 0 && attribute === void 0) return;\n\t\t(ignored ? build.ignoredRelationFields : build.relationFields).push({\n\t\t\tfield,\n\t\t\ttargetModelName: field.typeName,\n\t\t\tattribute\n\t\t});\n\t\treturn;\n\t}\n\tif (updatedAt !== void 0 && field.typeName !== \"DateTime\") {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} has type \"${field.typeName}\", but @updatedAt is only allowed on a DateTime field. Prisma 7 refuses this schema too: \"Fields that are marked with @updatedAt must be of type DateTime.\" Remove @updatedAt, or change the field's type to DateTime.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tif (updatedAt !== void 0 && field.list) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} is a list, but @updatedAt is not allowed on a list field. Prisma 7 refuses this schema too: \"Fields that are marked with @updatedAt cannot be lists.\" Remove @updatedAt, or make the field a single DateTime.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tconst enumDeclaration = args.enums.get(field.typeName);\n\tlet call;\n\tif (enumDeclaration !== void 0) {\n\t\tif (enumDeclaration.namespaceId !== model.namespaceId) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_ENUM_NAMESPACE_MISMATCH\", `${label} uses enum \"${enumDeclaration.name}\" from schema \"${enumDeclaration.namespaceId}\", but the model is in schema \"${model.namespaceId}\". Prisma 8 columns reference the enum type of their own schema; declare the enum in \"${model.namespaceId}\" or move the model.`, sourceId, field.span));\n\t\t\treturn;\n\t\t}\n\t\tcall = {\n\t\t\tpath: binding.nativeEnum.typeConstructor,\n\t\t\targs: [{\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue: enumDeclaration.name,\n\t\t\t\tspan: field.span\n\t\t\t}],\n\t\t\tspan: field.span\n\t\t};\n\t} else {\n\t\tconst scalar = prisma7ScalarMapping(binding.typeMap, field.typeName);\n\t\tif (scalar === void 0) {\n\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} has unknown type \"${field.typeName}\".`, sourceId, field.span));\n\t\t\treturn;\n\t\t}\n\t\tlet mapping = scalar;\n\t\tlet span = field.span;\n\t\tif (nativeType !== void 0) {\n\t\t\tconst native = prisma7NativeTypeMapping(binding.typeMap, nativeType.name, nativeType.attribute.args.map((arg) => arg.value));\n\t\t\tif (native === void 0) {\n\t\t\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_NATIVE_TYPE_UNSUPPORTED\", nativeTypeMessage(label, nativeType.name), sourceId, nativeType.attribute.span));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmapping = native;\n\t\t\tspan = nativeType.attribute.span;\n\t\t}\n\t\tcall = {\n\t\t\tpath: [mapping.constructorName],\n\t\t\targs: mapping.args.map((value) => ({\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue,\n\t\t\t\tspan\n\t\t\t})),\n\t\t\tspan\n\t\t};\n\t}\n\tconst typeConstructor = getAuthoringTypeConstructor(input.authoringContributions, call.path);\n\tif (typeConstructor === void 0) {\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UNSUPPORTED_TYPE\", `${label} type \"${field.typeName}\" could not be resolved against target \"${binding.target.targetId}\".`, sourceId, field.span));\n\t\treturn;\n\t}\n\tconst typeDiagnostics = createPslDiagnosticCollector(model.sources);\n\tconst resolved = instantiateFieldTypeConstructor({\n\t\tcall,\n\t\tdescriptor: typeConstructor,\n\t\tdiagnostics: typeDiagnostics,\n\t\tsource: diagnosticSource(model.sources, field.node.syntax),\n\t\tentityLabel: label,\n\t\tnamespaceId: model.namespaceId,\n\t\tnamespaceExtensionEntities: args.namespaceEntities,\n\t\tcodecLookup: input.codecLookup\n\t});\n\tdiagnostics.push(...typeDiagnostics.toExternal());\n\tif (!resolved.ok) return;\n\tconst typeLookups = {\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypeLookup: input.dataTypes.lookup\n\t};\n\tconst updatedAtGenerator = updatedAt === void 0 || ignored ? void 0 : nowGeneratorFor(input.generatorFunctions, resolved.descriptor);\n\tif (updatedAt !== void 0 && !ignored && updatedAtGenerator === void 0) {\n\t\tif (nativeType === void 0) throw new InternalError(`The Prisma 7 target binding has no \"now\" generator for codec \"${resolved.descriptor.codecId}\", which the DateTime scalar maps to.`);\n\t\tdiagnostics.push(prisma7Diagnostic(\"PSL.PRISMA7_UPDATED_AT_FIELD_INVALID\", `${label} has @updatedAt, but \"@db.${nativeType.name}\" makes it a column that is not a date or time, so @updatedAt cannot set it. Prisma 7 refuses this schema too: \"Native type ${nativeType.name} is not compatible with declared field type DateTime\". Remove @updatedAt, or use a date or time native type such as @db.Timestamp.`, sourceId, nativeType.attribute.span));\n\t\treturn;\n\t}\n\tconst lowered = defaultAttribute === void 0 ? void 0 : lowerPrisma7Default({\n\t\tattribute: defaultAttribute,\n\t\tfield,\n\t\tmodelName: model.symbol.name,\n\t\tcodecId: resolved.descriptor.codecId,\n\t\ttypeParams: resolved.descriptor.typeParams,\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypes: input.dataTypes,\n\t\tliteralForm: binding.literalDefaultForm({\n\t\t\tcodecId: resolved.descriptor.codecId,\n\t\t\tdataType: sqlDataTypeOfCodec(resolved.descriptor.codecId, typeLookups).id,\n\t\t\ttypeParams: resolved.descriptor.typeParams\n\t\t}),\n\t\tenumMembers: enumDeclaration === void 0 ? void 0 : new Map(enumDeclaration.members.map((member) => [member.name, member.value])),\n\t\tcontrolMutationDefaults: input.controlMutationDefaults,\n\t\tgeneratorFunctions: input.generatorFunctions,\n\t\tsourceId,\n\t\tdiagnostics\n\t});\n\tif (defaultAttribute !== void 0 && lowered === void 0) return;\n\tconst column = {\n\t\tcolumnName,\n\t\tdescriptor: resolved.descriptor,\n\t\tnullable: field.optional || field.list,\n\t\tmany: field.list,\n\t\t...field.list ? { elementNullable: true } : {},\n\t\t...ifDefined(\"default\", lowered?.storage)\n\t};\n\tif (ignored) {\n\t\tbuild.ignoredColumns.set(field.name, column);\n\t\treturn;\n\t}\n\tconst executionDefaults = updatedAtGenerator !== void 0 ? {\n\t\tonCreate: updatedAtGenerator,\n\t\tonUpdate: updatedAtGenerator\n\t} : lowered?.onCreate !== void 0 ? { onCreate: lowered.onCreate } : void 0;\n\tbuild.columns.set(field.name, {\n\t\tfieldName: field.name,\n\t\t...column,\n\t\t...ifDefined(\"executionDefaults\", executionDefaults)\n\t});\n}\n//#endregion\n//#region src/provider.ts\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\treturn join(dirname(schemaPath), \"contract.json\");\n}\nfunction mapParseDiagnostics(diagnostics, sourceFile, sourceId) {\n\treturn diagnostics.map((diagnostic) => ({\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\tsourceId,\n\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t}));\n}\n/**\n* The files a Prisma 7 schema input names: the file itself, or every regular\n* `.prisma` file under the directory, nested directories and symbolic links\n* included, as Prisma 7 reads a schema directory. Sorted by path so duplicate\n* detection blames the later file deterministically.\n*/\nasync function listSchemaFiles(absolutePath, displayPath) {\n\tif (!(await stat(absolutePath)).isDirectory()) return [{\n\t\tsourceId: displayPath,\n\t\tabsolutePath\n\t}];\n\tconst entries = await readdir(absolutePath, { recursive: true });\n\tconst files = [];\n\tfor (const entry of entries.filter((name) => extname(name) === \".prisma\").map((name) => normalize(name)).sort()) {\n\t\tconst entryPath = join(absolutePath, entry);\n\t\tif ((await stat(entryPath)).isFile()) files.push({\n\t\t\tsourceId: join(displayPath, entry),\n\t\t\tabsolutePath: entryPath\n\t\t});\n\t}\n\treturn files;\n}\n/**\n* The checks `contract emit` runs on the contract after `load` that the\n* contract builder does not: domain roots and relations, column defaults\n* against nullability, and model storage references. The structural check also\n* needs the target's entity kinds, which `load` does not receive.\n*/\nfunction validateInterpretedContract(contract) {\n\tvalidateContractDomain(contract);\n\tconst sqlContract = blindCast(contract);\n\tvalidateSqlStorageConsistency(sqlContract);\n\tvalidateModelStorageReferences(sqlContract);\n}\nfunction isMissingPath(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"ENOENT\";\n}\nfunction prisma7Contract(schemaPath, options) {\n\tconst parserOptions = { grammar: \"prisma-7\" };\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tparserOptions,\n\t\t\tasync load(context) {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"prisma7Contract: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tlet files;\n\t\t\t\ttry {\n\t\t\t\t\tfiles = await listSchemaFiles(absolutePath, schemaPath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst cause = String(error);\n\t\t\t\t\tconst message = isMissingPath(error) ? `There is no file or directory at \"${schemaPath}\". Fix the path passed to prisma7Schema() in prisma.config.ts.` : cause;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${schemaPath}\"`,\n\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", message, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tabsolutePath,\n\t\t\t\t\t\t\tcause\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (files.length === 0) return notOk({\n\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${schemaPath}\"`,\n\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", `The schema directory \"${schemaPath}\" contains no .prisma file.`, schemaPath, void 0)],\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\tabsolutePath\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconst documents = [];\n\t\t\t\tconst seedDiagnostics = [];\n\t\t\t\tfor (const file of files) {\n\t\t\t\t\tlet schema;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tschema = await readFile(file.absolutePath, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treturn notOk({\n\t\t\t\t\t\t\tsummary: `Failed to read Prisma 7 schema at \"${file.sourceId}\"`,\n\t\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_SCHEMA_READ_FAILED\", message, file.sourceId, void 0)],\n\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\tschemaPath: file.sourceId,\n\t\t\t\t\t\t\t\tabsoluteSchemaPath: file.absolutePath,\n\t\t\t\t\t\t\t\tcause: message\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst { document, sources, diagnostics } = parse(schema, file.sourceId, parserOptions);\n\t\t\t\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\t\t\t\tseedDiagnostics.push(...mapParseDiagnostics(diagnostics, sourceFile, file.sourceId));\n\t\t\t\t\tdocuments.push({\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tsources,\n\t\t\t\t\t\tsourceFile,\n\t\t\t\t\t\tsourceId: file.sourceId\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tlet contract;\n\t\t\t\ttry {\n\t\t\t\t\tconst interpreted = interpretPrisma7Documents({\n\t\t\t\t\t\tdocuments,\n\t\t\t\t\t\tseedDiagnostics,\n\t\t\t\t\t\tbinding: options.binding,\n\t\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\t\tgeneratorFunctions: context.generatorFunctions,\n\t\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\t\tdataTypes: context.dataTypes,\n\t\t\t\t\t\tcomposedExtensions: context.composedExtensions,\n\t\t\t\t\t\tdefaultNamespaceId: context.defaultNamespaceId\n\t\t\t\t\t});\n\t\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\t\tcontract = applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.binding.createNamespace);\n\t\t\t\t\tvalidateInterpretedContract(contract);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isStructuredError(error)) throw error;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"Prisma 7 schema interpretation failed\",\n\t\t\t\t\t\tdiagnostics: [prisma7Diagnostic(\"PSL.PRISMA7_CONTRACT_INVALID\", `This schema gives a contract that Prisma 8 rejects, and the Prisma 7 contract source has no specific diagnostic for the cause: ${error.message.replace(/\\.$/, \"\")}. This is a bug in Prisma ORM; please report it with this schema.`, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tcode: error.code\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn ok(contract);\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prisma7Contract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB,MAAM,SAAS,UAAU,MAAM;CACzD,OAAO;EACN;EACA;EACA;EACA,GAAG,SAAS,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC;CAClC;AACD;AACA,SAAS,QAAQ,OAAO;CACvB,MAAM,UAAU,MAAM,MAAM,GAAG,EAAE;CACjC,MAAM,OAAO,MAAM,MAAM,SAAS,MAAM;CACxC,OAAO,QAAQ,WAAW,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