diff --git a/charybdis/.gitignore b/charybdis/.gitignore index 11ddd8db..4de35f61 100644 --- a/charybdis/.gitignore +++ b/charybdis/.gitignore @@ -1,3 +1,6 @@ node_modules # Keep environment variables out of version control .env + +cloud-prisma/cloud-prisma-client/* +local-prisma/local-prisma-client/* \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/default.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/default.d.ts deleted file mode 100644 index bc20c6c1..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/default.js b/charybdis/cloud-prisma/cloud-prisma-client/default.js deleted file mode 100644 index fa52f0cd..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/edge.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/edge.d.ts deleted file mode 100644 index 274b8fa6..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./default" \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/edge.js b/charybdis/cloud-prisma/cloud-prisma-client/edge.js deleted file mode 100644 index 0a02591c..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/edge.js +++ /dev/null @@ -1,198 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/edge.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/cloud-prisma/cloud-prisma-client", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin-arm64", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/cloud-prisma/schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "6.2.1", - "engineVersion": "4123509d24aa4dede1e864b46351bf2790323b69", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "CLOUD_DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"cloud-prisma-client\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"CLOUD_DATABASE_URL\")\n}\n\nmodel run {\n id String @id @default(uuid())\n runId Int @default(autoincrement())\n driverName String\n notes String\n time DateTime @db.Timestamptz()\n\n data data[]\n}\n\nmodel data {\n values Float[]\n time DateTime @db.Timestamptz()\n\n dataTypeName String\n dataType data_type @relation(fields: [dataTypeName], references: [name])\n runId String\n run run @relation(fields: [runId], references: [id])\n\n @@id([time, dataTypeName])\n}\n\nmodel data_type {\n name String @id\n unit String\n nodeName String\n\n data data[]\n}\n", - "inlineSchemaHash": "1722fd1cef888e6202201083d0c67f307d09eceab1f1972c98f2a10cbdc26953", - "copyEngine": true -} -config.dirname = '/' - -config.runtimeDataModel = JSON.parse("{\"models\":{\"run\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driverName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"values\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataTypeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data_type\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[\"dataTypeName\"],\"relationToFields\":[\"name\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"run\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"run\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[\"runId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"time\",\"dataTypeName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data_type\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"unit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nodeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - -config.injectableEdgeEnv = () => ({ - parsed: { - CLOUD_DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['CLOUD_DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.CLOUD_DATABASE_URL || undefined - } -}) - -if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { - Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) -} - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - diff --git a/charybdis/cloud-prisma/cloud-prisma-client/index-browser.js b/charybdis/cloud-prisma/cloud-prisma-client/index-browser.js deleted file mode 100644 index 0d417148..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/index-browser.js +++ /dev/null @@ -1,187 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/charybdis/cloud-prisma/cloud-prisma-client/index.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/index.d.ts deleted file mode 100644 index 8e905be1..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/index.d.ts +++ /dev/null @@ -1,5404 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions -import $Result = runtime.Types.Result - -export type PrismaPromise = $Public.PrismaPromise - - -/** - * Model run - * - */ -export type run = $Result.DefaultSelection -/** - * Model data - * - */ -export type data = $Result.DefaultSelection -/** - * Model data_type - * - */ -export type data_type = $Result.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg ?: Prisma.Subset); - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - -/** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> - - $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - - - $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, ClientOptions> - - /** - * `prisma.run`: Exposes CRUD operations for the **run** model. - * Example usage: - * ```ts - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - */ - get run(): Prisma.runDelegate; - - /** - * `prisma.data`: Exposes CRUD operations for the **data** model. - * Example usage: - * ```ts - * // Fetch zero or more Data - * const data = await prisma.data.findMany() - * ``` - */ - get data(): Prisma.dataDelegate; - - /** - * `prisma.data_type`: Exposes CRUD operations for the **data_type** model. - * Example usage: - * ```ts - * // Fetch zero or more Data_types - * const data_types = await prisma.data_type.findMany() - * ``` - */ - get data_type(): Prisma.data_typeDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError - export import PrismaClientValidationError = runtime.PrismaClientValidationError - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag - export import empty = runtime.empty - export import join = runtime.join - export import raw = runtime.raw - export import Sql = runtime.Sql - - - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal - - export type DecimalJsLike = runtime.DecimalJsLike - - /** - * Metrics - */ - export type Metrics = runtime.Metrics - export type Metric = runtime.Metric - export type MetricHistogram = runtime.MetricHistogram - export type MetricHistogramBucket = runtime.MetricHistogramBucket - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = $Public.Args - export import Payload = $Public.Payload - export import Result = $Public.Result - export import Exact = $Public.Exact - - /** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - - export import JsonObject = runtime.JsonObject - export import JsonArray = runtime.JsonArray - export import JsonValue = runtime.JsonValue - export import InputJsonObject = runtime.InputJsonObject - export import InputJsonArray = runtime.InputJsonArray - export import InputJsonValue = runtime.InputJsonValue - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never - private constructor() - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never - private constructor() - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never - private constructor() - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull - - type SelectAndInclude = { - select: any - include: any - } - - type SelectAndOmit = { - select: any - omit: any - } - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType> - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K - }[keyof T] - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K - } - - export type TrueKeys = TruthyKeys>> - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}) - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - K - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - - - /** - * Is T a Record? - */ - type IsObject = T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False - - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick // With K possibilities - }[K] - - type EitherStrict = Strict<__Either> - - type EitherLoose = ComputeRaw<__Either> - - type _Either< - O extends object, - K extends Key, - strict extends Boolean - > = { - 1: EitherStrict - 0: EitherLoose - }[strict] - - type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 - > = O extends unknown ? _Either : never - - export type Union = any - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K] - } & {} - - /** Helper Types for "Merge" **/ - export type IntersectOf = ( - U extends unknown ? (k: U) => void : never - ) extends (k: infer I) => void - ? I - : never - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf; - }>>; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O - : never>; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False - - // /** - // 1 - // */ - export type True = 1 - - /** - 0 - */ - export type False = 0 - - export type Not = { - 0: 1 - 1: 0 - }[B] - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0 - - export type Has = Not< - Extends, U1> - > - - export type Or = { - 0: { - 0: 0 - 1: 1 - } - 1: { - 0: 1 - 1: 1 - } - }[B1][B2] - - export type Keys = U extends unknown ? keyof U : never - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - - - /** - * Used by group by - */ - - export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never - } : never - - type FieldPaths< - T, - U = Omit - > = IsObject extends True ? U : T - - type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K - }[keyof T] - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never - type TupleToUnion = _TupleToUnion - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick> - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - - - export type FieldRef = runtime.FieldRef - - type FieldRefInputType = Model extends never ? never : FieldRef - - - export const ModelName: { - run: 'run', - data: 'data', - data_type: 'data_type' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: "run" | "data" | "data_type" - txIsolationLevel: Prisma.TransactionIsolationLevel - } - model: { - run: { - payload: Prisma.$runPayload - fields: Prisma.runFieldRefs - operations: { - findUnique: { - args: Prisma.runFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.runFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.runFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.runFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.runFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.runCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.runCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.runCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.runDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.runUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.runDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.runUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.runUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.runUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.RunAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.runGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.runCountArgs - result: $Utils.Optional | number - } - } - } - data: { - payload: Prisma.$dataPayload - fields: Prisma.dataFieldRefs - operations: { - findUnique: { - args: Prisma.dataFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.dataFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.dataFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.dataFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.dataFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.dataCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.dataCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.dataCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.dataDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.dataUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.dataDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.dataUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.dataUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.dataUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.DataAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.dataGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.dataCountArgs - result: $Utils.Optional | number - } - } - } - data_type: { - payload: Prisma.$data_typePayload - fields: Prisma.data_typeFieldRefs - operations: { - findUnique: { - args: Prisma.data_typeFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.data_typeFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.data_typeFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.data_typeFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.data_typeFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.data_typeCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.data_typeCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.data_typeCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.data_typeDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.data_typeUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.data_typeDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.data_typeUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.data_typeUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.data_typeUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Data_typeAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.data_typeGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.data_typeCountArgs - result: $Utils.Optional | number - } - } - } - } - } & { - other: { - payload: any - operations: { - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - } - } - } - export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> - export type DefaultPrismaClient = PrismaClient - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat - /** - * @example - * ``` - * // Defaults to stdout - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * ] - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[] - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number - timeout?: number - isolationLevel?: Prisma.TransactionIsolationLevel - } - /** - * Global configuration for omitting model fields by default. - * - * @example - * ``` - * const prisma = new PrismaClient({ - * omit: { - * user: { - * password: true - * } - * } - * }) - * ``` - */ - omit?: Prisma.GlobalOmitConfig - } - export type GlobalOmitConfig = { - run?: runOmit - data?: dataOmit - data_type?: data_typeOmit - } - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error' - export type LogDefinition = { - level: LogLevel - emit: 'stdout' | 'event' - } - - export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never - export type GetEvents = T extends Array ? - GetLogType | GetLogType | GetLogType | GetLogType - : never - - export type QueryEvent = { - timestamp: Date - query: string - params: string - duration: number - target: string - } - - export type LogEvent = { - timestamp: Date - message: string - target: string - } - /* End Types for Logging */ - - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy' - - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit - - export type Datasource = { - url?: string - } - - /** - * Count Types - */ - - - /** - * Count Type RunCountOutputType - */ - - export type RunCountOutputType = { - data: number - } - - export type RunCountOutputTypeSelect = { - data?: boolean | RunCountOutputTypeCountDataArgs - } - - // Custom InputTypes - /** - * RunCountOutputType without action - */ - export type RunCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the RunCountOutputType - */ - select?: RunCountOutputTypeSelect | null - } - - /** - * RunCountOutputType without action - */ - export type RunCountOutputTypeCountDataArgs = { - where?: dataWhereInput - } - - - /** - * Count Type Data_typeCountOutputType - */ - - export type Data_typeCountOutputType = { - data: number - } - - export type Data_typeCountOutputTypeSelect = { - data?: boolean | Data_typeCountOutputTypeCountDataArgs - } - - // Custom InputTypes - /** - * Data_typeCountOutputType without action - */ - export type Data_typeCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the Data_typeCountOutputType - */ - select?: Data_typeCountOutputTypeSelect | null - } - - /** - * Data_typeCountOutputType without action - */ - export type Data_typeCountOutputTypeCountDataArgs = { - where?: dataWhereInput - } - - - /** - * Models - */ - - /** - * Model run - */ - - export type AggregateRun = { - _count: RunCountAggregateOutputType | null - _avg: RunAvgAggregateOutputType | null - _sum: RunSumAggregateOutputType | null - _min: RunMinAggregateOutputType | null - _max: RunMaxAggregateOutputType | null - } - - export type RunAvgAggregateOutputType = { - runId: number | null - } - - export type RunSumAggregateOutputType = { - runId: number | null - } - - export type RunMinAggregateOutputType = { - id: string | null - runId: number | null - driverName: string | null - notes: string | null - time: Date | null - } - - export type RunMaxAggregateOutputType = { - id: string | null - runId: number | null - driverName: string | null - notes: string | null - time: Date | null - } - - export type RunCountAggregateOutputType = { - id: number - runId: number - driverName: number - notes: number - time: number - _all: number - } - - - export type RunAvgAggregateInputType = { - runId?: true - } - - export type RunSumAggregateInputType = { - runId?: true - } - - export type RunMinAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - } - - export type RunMaxAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - } - - export type RunCountAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - _all?: true - } - - export type RunAggregateArgs = { - /** - * Filter which run to aggregate. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned runs - **/ - _count?: true | RunCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: RunAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: RunSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: RunMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: RunMaxAggregateInputType - } - - export type GetRunAggregateType = { - [P in keyof T & keyof AggregateRun]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type runGroupByArgs = { - where?: runWhereInput - orderBy?: runOrderByWithAggregationInput | runOrderByWithAggregationInput[] - by: RunScalarFieldEnum[] | RunScalarFieldEnum - having?: runScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: RunCountAggregateInputType | true - _avg?: RunAvgAggregateInputType - _sum?: RunSumAggregateInputType - _min?: RunMinAggregateInputType - _max?: RunMaxAggregateInputType - } - - export type RunGroupByOutputType = { - id: string - runId: number - driverName: string - notes: string - time: Date - _count: RunCountAggregateOutputType | null - _avg: RunAvgAggregateOutputType | null - _sum: RunSumAggregateOutputType | null - _min: RunMinAggregateOutputType | null - _max: RunMaxAggregateOutputType | null - } - - type GetRunGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof RunGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type runSelect = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - data?: boolean | run$dataArgs - _count?: boolean | RunCountOutputTypeDefaultArgs - }, ExtArgs["result"]["run"]> - - export type runSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - }, ExtArgs["result"]["run"]> - - export type runSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - }, ExtArgs["result"]["run"]> - - export type runSelectScalar = { - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - } - - export type runOmit = $Extensions.GetOmit<"id" | "runId" | "driverName" | "notes" | "time", ExtArgs["result"]["run"]> - export type runInclude = { - data?: boolean | run$dataArgs - _count?: boolean | RunCountOutputTypeDefaultArgs - } - export type runIncludeCreateManyAndReturn = {} - export type runIncludeUpdateManyAndReturn = {} - - export type $runPayload = { - name: "run" - objects: { - data: Prisma.$dataPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: string - runId: number - driverName: string - notes: string - time: Date - }, ExtArgs["result"]["run"]> - composites: {} - } - - type runGetPayload = $Result.GetResult - - type runCountArgs = - Omit & { - select?: RunCountAggregateInputType | true - } - - export interface runDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['run'], meta: { name: 'run' } } - /** - * Find zero or one Run that matches the filter. - * @param {runFindUniqueArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Run that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {runFindUniqueOrThrowArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Run that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindFirstArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Run that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindFirstOrThrowArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Runs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Runs - * const runs = await prisma.run.findMany() - * - * // Get first 10 Runs - * const runs = await prisma.run.findMany({ take: 10 }) - * - * // Only select the `id` - * const runWithIdOnly = await prisma.run.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Run. - * @param {runCreateArgs} args - Arguments to create a Run. - * @example - * // Create one Run - * const Run = await prisma.run.create({ - * data: { - * // ... data to create a Run - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Runs. - * @param {runCreateManyArgs} args - Arguments to create many Runs. - * @example - * // Create many Runs - * const run = await prisma.run.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Runs and returns the data saved in the database. - * @param {runCreateManyAndReturnArgs} args - Arguments to create many Runs. - * @example - * // Create many Runs - * const run = await prisma.run.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Runs and only return the `id` - * const runWithIdOnly = await prisma.run.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Run. - * @param {runDeleteArgs} args - Arguments to delete one Run. - * @example - * // Delete one Run - * const Run = await prisma.run.delete({ - * where: { - * // ... filter to delete one Run - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Run. - * @param {runUpdateArgs} args - Arguments to update one Run. - * @example - * // Update one Run - * const run = await prisma.run.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Runs. - * @param {runDeleteManyArgs} args - Arguments to filter Runs to delete. - * @example - * // Delete a few Runs - * const { count } = await prisma.run.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Runs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Runs - * const run = await prisma.run.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Runs and returns the data updated in the database. - * @param {runUpdateManyAndReturnArgs} args - Arguments to update many Runs. - * @example - * // Update many Runs - * const run = await prisma.run.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Runs and only return the `id` - * const runWithIdOnly = await prisma.run.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Run. - * @param {runUpsertArgs} args - Arguments to update or create a Run. - * @example - * // Update or create a Run - * const run = await prisma.run.upsert({ - * create: { - * // ... data to create a Run - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Run we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Runs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runCountArgs} args - Arguments to filter Runs to count. - * @example - * // Count the number of Runs - * const count = await prisma.run.count({ - * where: { - * // ... the filter for the Runs we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Run. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RunAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Run. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends runGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: runGroupByArgs['orderBy'] } - : { orderBy?: runGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetRunGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the run model - */ - readonly fields: runFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for run. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__runClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - data = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the run model - */ - interface runFieldRefs { - readonly id: FieldRef<"run", 'String'> - readonly runId: FieldRef<"run", 'Int'> - readonly driverName: FieldRef<"run", 'String'> - readonly notes: FieldRef<"run", 'String'> - readonly time: FieldRef<"run", 'DateTime'> - } - - - // Custom InputTypes - /** - * run findUnique - */ - export type runFindUniqueArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where: runWhereUniqueInput - } - - /** - * run findUniqueOrThrow - */ - export type runFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where: runWhereUniqueInput - } - - /** - * run findFirst - */ - export type runFindFirstArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of runs. - */ - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run findFirstOrThrow - */ - export type runFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of runs. - */ - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run findMany - */ - export type runFindManyArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which runs to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run create - */ - export type runCreateArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The data needed to create a run. - */ - data: XOR - } - - /** - * run createMany - */ - export type runCreateManyArgs = { - /** - * The data used to create many runs. - */ - data: runCreateManyInput | runCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * run createManyAndReturn - */ - export type runCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelectCreateManyAndReturn | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * The data used to create many runs. - */ - data: runCreateManyInput | runCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * run update - */ - export type runUpdateArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The data needed to update a run. - */ - data: XOR - /** - * Choose, which run to update. - */ - where: runWhereUniqueInput - } - - /** - * run updateMany - */ - export type runUpdateManyArgs = { - /** - * The data used to update runs. - */ - data: XOR - /** - * Filter which runs to update - */ - where?: runWhereInput - } - - /** - * run updateManyAndReturn - */ - export type runUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * The data used to update runs. - */ - data: XOR - /** - * Filter which runs to update - */ - where?: runWhereInput - } - - /** - * run upsert - */ - export type runUpsertArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The filter to search for the run to update in case it exists. - */ - where: runWhereUniqueInput - /** - * In case the run found by the `where` argument doesn't exist, create a new run with this data. - */ - create: XOR - /** - * In case the run was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * run delete - */ - export type runDeleteArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter which run to delete. - */ - where: runWhereUniqueInput - } - - /** - * run deleteMany - */ - export type runDeleteManyArgs = { - /** - * Filter which runs to delete - */ - where?: runWhereInput - } - - /** - * run.data - */ - export type run$dataArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - where?: dataWhereInput - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - cursor?: dataWhereUniqueInput - take?: number - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * run without action - */ - export type runDefaultArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - } - - - /** - * Model data - */ - - export type AggregateData = { - _count: DataCountAggregateOutputType | null - _avg: DataAvgAggregateOutputType | null - _sum: DataSumAggregateOutputType | null - _min: DataMinAggregateOutputType | null - _max: DataMaxAggregateOutputType | null - } - - export type DataAvgAggregateOutputType = { - values: number | null - } - - export type DataSumAggregateOutputType = { - values: number[] - } - - export type DataMinAggregateOutputType = { - time: Date | null - dataTypeName: string | null - runId: string | null - } - - export type DataMaxAggregateOutputType = { - time: Date | null - dataTypeName: string | null - runId: string | null - } - - export type DataCountAggregateOutputType = { - values: number - time: number - dataTypeName: number - runId: number - _all: number - } - - - export type DataAvgAggregateInputType = { - values?: true - } - - export type DataSumAggregateInputType = { - values?: true - } - - export type DataMinAggregateInputType = { - time?: true - dataTypeName?: true - runId?: true - } - - export type DataMaxAggregateInputType = { - time?: true - dataTypeName?: true - runId?: true - } - - export type DataCountAggregateInputType = { - values?: true - time?: true - dataTypeName?: true - runId?: true - _all?: true - } - - export type DataAggregateArgs = { - /** - * Filter which data to aggregate. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned data - **/ - _count?: true | DataCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: DataAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: DataSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: DataMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: DataMaxAggregateInputType - } - - export type GetDataAggregateType = { - [P in keyof T & keyof AggregateData]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type dataGroupByArgs = { - where?: dataWhereInput - orderBy?: dataOrderByWithAggregationInput | dataOrderByWithAggregationInput[] - by: DataScalarFieldEnum[] | DataScalarFieldEnum - having?: dataScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: DataCountAggregateInputType | true - _avg?: DataAvgAggregateInputType - _sum?: DataSumAggregateInputType - _min?: DataMinAggregateInputType - _max?: DataMaxAggregateInputType - } - - export type DataGroupByOutputType = { - values: number[] - time: Date - dataTypeName: string - runId: string - _count: DataCountAggregateOutputType | null - _avg: DataAvgAggregateOutputType | null - _sum: DataSumAggregateOutputType | null - _min: DataMinAggregateOutputType | null - _max: DataMaxAggregateOutputType | null - } - - type GetDataGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof DataGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type dataSelect = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectCreateManyAndReturn = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectScalar = { - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - } - - export type dataOmit = $Extensions.GetOmit<"values" | "time" | "dataTypeName" | "runId", ExtArgs["result"]["data"]> - export type dataInclude = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - export type dataIncludeCreateManyAndReturn = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - export type dataIncludeUpdateManyAndReturn = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - - export type $dataPayload = { - name: "data" - objects: { - dataType: Prisma.$data_typePayload - run: Prisma.$runPayload - } - scalars: $Extensions.GetPayloadResult<{ - values: number[] - time: Date - dataTypeName: string - runId: string - }, ExtArgs["result"]["data"]> - composites: {} - } - - type dataGetPayload = $Result.GetResult - - type dataCountArgs = - Omit & { - select?: DataCountAggregateInputType | true - } - - export interface dataDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['data'], meta: { name: 'data' } } - /** - * Find zero or one Data that matches the filter. - * @param {dataFindUniqueArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Data that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {dataFindUniqueOrThrowArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Data that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindFirstArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Data that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindFirstOrThrowArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Data that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Data - * const data = await prisma.data.findMany() - * - * // Get first 10 Data - * const data = await prisma.data.findMany({ take: 10 }) - * - * // Only select the `values` - * const dataWithValuesOnly = await prisma.data.findMany({ select: { values: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Data. - * @param {dataCreateArgs} args - Arguments to create a Data. - * @example - * // Create one Data - * const Data = await prisma.data.create({ - * data: { - * // ... data to create a Data - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Data. - * @param {dataCreateManyArgs} args - Arguments to create many Data. - * @example - * // Create many Data - * const data = await prisma.data.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Data and returns the data saved in the database. - * @param {dataCreateManyAndReturnArgs} args - Arguments to create many Data. - * @example - * // Create many Data - * const data = await prisma.data.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Data and only return the `values` - * const dataWithValuesOnly = await prisma.data.createManyAndReturn({ - * select: { values: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Data. - * @param {dataDeleteArgs} args - Arguments to delete one Data. - * @example - * // Delete one Data - * const Data = await prisma.data.delete({ - * where: { - * // ... filter to delete one Data - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Data. - * @param {dataUpdateArgs} args - Arguments to update one Data. - * @example - * // Update one Data - * const data = await prisma.data.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Data. - * @param {dataDeleteManyArgs} args - Arguments to filter Data to delete. - * @example - * // Delete a few Data - * const { count } = await prisma.data.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Data - * const data = await prisma.data.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data and returns the data updated in the database. - * @param {dataUpdateManyAndReturnArgs} args - Arguments to update many Data. - * @example - * // Update many Data - * const data = await prisma.data.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Data and only return the `values` - * const dataWithValuesOnly = await prisma.data.updateManyAndReturn({ - * select: { values: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Data. - * @param {dataUpsertArgs} args - Arguments to update or create a Data. - * @example - * // Update or create a Data - * const data = await prisma.data.upsert({ - * create: { - * // ... data to create a Data - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Data we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataCountArgs} args - Arguments to filter Data to count. - * @example - * // Count the number of Data - * const count = await prisma.data.count({ - * where: { - * // ... the filter for the Data we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DataAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends dataGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: dataGroupByArgs['orderBy'] } - : { orderBy?: dataGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetDataGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the data model - */ - readonly fields: dataFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for data. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__dataClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - dataType = {}>(args?: Subset>): Prisma__data_typeClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> - run = {}>(args?: Subset>): Prisma__runClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the data model - */ - interface dataFieldRefs { - readonly values: FieldRef<"data", 'Float[]'> - readonly time: FieldRef<"data", 'DateTime'> - readonly dataTypeName: FieldRef<"data", 'String'> - readonly runId: FieldRef<"data", 'String'> - } - - - // Custom InputTypes - /** - * data findUnique - */ - export type dataFindUniqueArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where: dataWhereUniqueInput - } - - /** - * data findUniqueOrThrow - */ - export type dataFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where: dataWhereUniqueInput - } - - /** - * data findFirst - */ - export type dataFindFirstArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data. - */ - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data findFirstOrThrow - */ - export type dataFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data. - */ - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data findMany - */ - export type dataFindManyArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data create - */ - export type dataCreateArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The data needed to create a data. - */ - data: XOR - } - - /** - * data createMany - */ - export type dataCreateManyArgs = { - /** - * The data used to create many data. - */ - data: dataCreateManyInput | dataCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data createManyAndReturn - */ - export type dataCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelectCreateManyAndReturn | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * The data used to create many data. - */ - data: dataCreateManyInput | dataCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: dataIncludeCreateManyAndReturn | null - } - - /** - * data update - */ - export type dataUpdateArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The data needed to update a data. - */ - data: XOR - /** - * Choose, which data to update. - */ - where: dataWhereUniqueInput - } - - /** - * data updateMany - */ - export type dataUpdateManyArgs = { - /** - * The data used to update data. - */ - data: XOR - /** - * Filter which data to update - */ - where?: dataWhereInput - } - - /** - * data updateManyAndReturn - */ - export type dataUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * The data used to update data. - */ - data: XOR - /** - * Filter which data to update - */ - where?: dataWhereInput - /** - * Choose, which related nodes to fetch as well - */ - include?: dataIncludeUpdateManyAndReturn | null - } - - /** - * data upsert - */ - export type dataUpsertArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The filter to search for the data to update in case it exists. - */ - where: dataWhereUniqueInput - /** - * In case the data found by the `where` argument doesn't exist, create a new data with this data. - */ - create: XOR - /** - * In case the data was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * data delete - */ - export type dataDeleteArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter which data to delete. - */ - where: dataWhereUniqueInput - } - - /** - * data deleteMany - */ - export type dataDeleteManyArgs = { - /** - * Filter which data to delete - */ - where?: dataWhereInput - } - - /** - * data without action - */ - export type dataDefaultArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - } - - - /** - * Model data_type - */ - - export type AggregateData_type = { - _count: Data_typeCountAggregateOutputType | null - _min: Data_typeMinAggregateOutputType | null - _max: Data_typeMaxAggregateOutputType | null - } - - export type Data_typeMinAggregateOutputType = { - name: string | null - unit: string | null - nodeName: string | null - } - - export type Data_typeMaxAggregateOutputType = { - name: string | null - unit: string | null - nodeName: string | null - } - - export type Data_typeCountAggregateOutputType = { - name: number - unit: number - nodeName: number - _all: number - } - - - export type Data_typeMinAggregateInputType = { - name?: true - unit?: true - nodeName?: true - } - - export type Data_typeMaxAggregateInputType = { - name?: true - unit?: true - nodeName?: true - } - - export type Data_typeCountAggregateInputType = { - name?: true - unit?: true - nodeName?: true - _all?: true - } - - export type Data_typeAggregateArgs = { - /** - * Filter which data_type to aggregate. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned data_types - **/ - _count?: true | Data_typeCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Data_typeMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Data_typeMaxAggregateInputType - } - - export type GetData_typeAggregateType = { - [P in keyof T & keyof AggregateData_type]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type data_typeGroupByArgs = { - where?: data_typeWhereInput - orderBy?: data_typeOrderByWithAggregationInput | data_typeOrderByWithAggregationInput[] - by: Data_typeScalarFieldEnum[] | Data_typeScalarFieldEnum - having?: data_typeScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Data_typeCountAggregateInputType | true - _min?: Data_typeMinAggregateInputType - _max?: Data_typeMaxAggregateInputType - } - - export type Data_typeGroupByOutputType = { - name: string - unit: string - nodeName: string - _count: Data_typeCountAggregateOutputType | null - _min: Data_typeMinAggregateOutputType | null - _max: Data_typeMaxAggregateOutputType | null - } - - type GetData_typeGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof Data_typeGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type data_typeSelect = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - data?: boolean | data_type$dataArgs - _count?: boolean | Data_typeCountOutputTypeDefaultArgs - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectCreateManyAndReturn = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectScalar = { - name?: boolean - unit?: boolean - nodeName?: boolean - } - - export type data_typeOmit = $Extensions.GetOmit<"name" | "unit" | "nodeName", ExtArgs["result"]["data_type"]> - export type data_typeInclude = { - data?: boolean | data_type$dataArgs - _count?: boolean | Data_typeCountOutputTypeDefaultArgs - } - export type data_typeIncludeCreateManyAndReturn = {} - export type data_typeIncludeUpdateManyAndReturn = {} - - export type $data_typePayload = { - name: "data_type" - objects: { - data: Prisma.$dataPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - name: string - unit: string - nodeName: string - }, ExtArgs["result"]["data_type"]> - composites: {} - } - - type data_typeGetPayload = $Result.GetResult - - type data_typeCountArgs = - Omit & { - select?: Data_typeCountAggregateInputType | true - } - - export interface data_typeDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['data_type'], meta: { name: 'data_type' } } - /** - * Find zero or one Data_type that matches the filter. - * @param {data_typeFindUniqueArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Data_type that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {data_typeFindUniqueOrThrowArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Data_type that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindFirstArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Data_type that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindFirstOrThrowArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Data_types that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Data_types - * const data_types = await prisma.data_type.findMany() - * - * // Get first 10 Data_types - * const data_types = await prisma.data_type.findMany({ take: 10 }) - * - * // Only select the `name` - * const data_typeWithNameOnly = await prisma.data_type.findMany({ select: { name: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Data_type. - * @param {data_typeCreateArgs} args - Arguments to create a Data_type. - * @example - * // Create one Data_type - * const Data_type = await prisma.data_type.create({ - * data: { - * // ... data to create a Data_type - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Data_types. - * @param {data_typeCreateManyArgs} args - Arguments to create many Data_types. - * @example - * // Create many Data_types - * const data_type = await prisma.data_type.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Data_types and returns the data saved in the database. - * @param {data_typeCreateManyAndReturnArgs} args - Arguments to create many Data_types. - * @example - * // Create many Data_types - * const data_type = await prisma.data_type.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Data_types and only return the `name` - * const data_typeWithNameOnly = await prisma.data_type.createManyAndReturn({ - * select: { name: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Data_type. - * @param {data_typeDeleteArgs} args - Arguments to delete one Data_type. - * @example - * // Delete one Data_type - * const Data_type = await prisma.data_type.delete({ - * where: { - * // ... filter to delete one Data_type - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Data_type. - * @param {data_typeUpdateArgs} args - Arguments to update one Data_type. - * @example - * // Update one Data_type - * const data_type = await prisma.data_type.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Data_types. - * @param {data_typeDeleteManyArgs} args - Arguments to filter Data_types to delete. - * @example - * // Delete a few Data_types - * const { count } = await prisma.data_type.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data_types. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Data_types - * const data_type = await prisma.data_type.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data_types and returns the data updated in the database. - * @param {data_typeUpdateManyAndReturnArgs} args - Arguments to update many Data_types. - * @example - * // Update many Data_types - * const data_type = await prisma.data_type.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Data_types and only return the `name` - * const data_typeWithNameOnly = await prisma.data_type.updateManyAndReturn({ - * select: { name: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Data_type. - * @param {data_typeUpsertArgs} args - Arguments to update or create a Data_type. - * @example - * // Update or create a Data_type - * const data_type = await prisma.data_type.upsert({ - * create: { - * // ... data to create a Data_type - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Data_type we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Data_types. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeCountArgs} args - Arguments to filter Data_types to count. - * @example - * // Count the number of Data_types - * const count = await prisma.data_type.count({ - * where: { - * // ... the filter for the Data_types we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Data_type. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Data_typeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Data_type. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends data_typeGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: data_typeGroupByArgs['orderBy'] } - : { orderBy?: data_typeGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetData_typeGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the data_type model - */ - readonly fields: data_typeFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for data_type. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__data_typeClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - data = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the data_type model - */ - interface data_typeFieldRefs { - readonly name: FieldRef<"data_type", 'String'> - readonly unit: FieldRef<"data_type", 'String'> - readonly nodeName: FieldRef<"data_type", 'String'> - } - - - // Custom InputTypes - /** - * data_type findUnique - */ - export type data_typeFindUniqueArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type findUniqueOrThrow - */ - export type data_typeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type findFirst - */ - export type data_typeFindFirstArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data_types. - */ - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type findFirstOrThrow - */ - export type data_typeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data_types. - */ - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type findMany - */ - export type data_typeFindManyArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_types to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type create - */ - export type data_typeCreateArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The data needed to create a data_type. - */ - data: XOR - } - - /** - * data_type createMany - */ - export type data_typeCreateManyArgs = { - /** - * The data used to create many data_types. - */ - data: data_typeCreateManyInput | data_typeCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data_type createManyAndReturn - */ - export type data_typeCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelectCreateManyAndReturn | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * The data used to create many data_types. - */ - data: data_typeCreateManyInput | data_typeCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data_type update - */ - export type data_typeUpdateArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The data needed to update a data_type. - */ - data: XOR - /** - * Choose, which data_type to update. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type updateMany - */ - export type data_typeUpdateManyArgs = { - /** - * The data used to update data_types. - */ - data: XOR - /** - * Filter which data_types to update - */ - where?: data_typeWhereInput - } - - /** - * data_type updateManyAndReturn - */ - export type data_typeUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * The data used to update data_types. - */ - data: XOR - /** - * Filter which data_types to update - */ - where?: data_typeWhereInput - } - - /** - * data_type upsert - */ - export type data_typeUpsertArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The filter to search for the data_type to update in case it exists. - */ - where: data_typeWhereUniqueInput - /** - * In case the data_type found by the `where` argument doesn't exist, create a new data_type with this data. - */ - create: XOR - /** - * In case the data_type was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * data_type delete - */ - export type data_typeDeleteArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter which data_type to delete. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type deleteMany - */ - export type data_typeDeleteManyArgs = { - /** - * Filter which data_types to delete - */ - where?: data_typeWhereInput - } - - /** - * data_type.data - */ - export type data_type$dataArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - where?: dataWhereInput - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - cursor?: dataWhereUniqueInput - take?: number - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data_type without action - */ - export type data_typeDefaultArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - } - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const RunScalarFieldEnum: { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' - }; - - export type RunScalarFieldEnum = (typeof RunScalarFieldEnum)[keyof typeof RunScalarFieldEnum] - - - export const DataScalarFieldEnum: { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' - }; - - export type DataScalarFieldEnum = (typeof DataScalarFieldEnum)[keyof typeof DataScalarFieldEnum] - - - export const Data_typeScalarFieldEnum: { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' - }; - - export type Data_typeScalarFieldEnum = (typeof Data_typeScalarFieldEnum)[keyof typeof Data_typeScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - - /** - * Field references - */ - - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - - /** - * Reference to a field of type 'String[]' - */ - export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> - - - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - - - - /** - * Reference to a field of type 'Int[]' - */ - export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> - - - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - - - /** - * Reference to a field of type 'DateTime[]' - */ - export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> - - - - /** - * Reference to a field of type 'Float[]' - */ - export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> - - - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> - - /** - * Deep Input Types - */ - - - export type runWhereInput = { - AND?: runWhereInput | runWhereInput[] - OR?: runWhereInput[] - NOT?: runWhereInput | runWhereInput[] - id?: StringFilter<"run"> | string - runId?: IntFilter<"run"> | number - driverName?: StringFilter<"run"> | string - notes?: StringFilter<"run"> | string - time?: DateTimeFilter<"run"> | Date | string - data?: DataListRelationFilter - } - - export type runOrderByWithRelationInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - data?: dataOrderByRelationAggregateInput - } - - export type runWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: runWhereInput | runWhereInput[] - OR?: runWhereInput[] - NOT?: runWhereInput | runWhereInput[] - runId?: IntFilter<"run"> | number - driverName?: StringFilter<"run"> | string - notes?: StringFilter<"run"> | string - time?: DateTimeFilter<"run"> | Date | string - data?: DataListRelationFilter - }, "id"> - - export type runOrderByWithAggregationInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - _count?: runCountOrderByAggregateInput - _avg?: runAvgOrderByAggregateInput - _max?: runMaxOrderByAggregateInput - _min?: runMinOrderByAggregateInput - _sum?: runSumOrderByAggregateInput - } - - export type runScalarWhereWithAggregatesInput = { - AND?: runScalarWhereWithAggregatesInput | runScalarWhereWithAggregatesInput[] - OR?: runScalarWhereWithAggregatesInput[] - NOT?: runScalarWhereWithAggregatesInput | runScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"run"> | string - runId?: IntWithAggregatesFilter<"run"> | number - driverName?: StringWithAggregatesFilter<"run"> | string - notes?: StringWithAggregatesFilter<"run"> | string - time?: DateTimeWithAggregatesFilter<"run"> | Date | string - } - - export type dataWhereInput = { - AND?: dataWhereInput | dataWhereInput[] - OR?: dataWhereInput[] - NOT?: dataWhereInput | dataWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - dataType?: XOR - run?: XOR - } - - export type dataOrderByWithRelationInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - dataType?: data_typeOrderByWithRelationInput - run?: runOrderByWithRelationInput - } - - export type dataWhereUniqueInput = Prisma.AtLeast<{ - time_dataTypeName?: dataTimeDataTypeNameCompoundUniqueInput - AND?: dataWhereInput | dataWhereInput[] - OR?: dataWhereInput[] - NOT?: dataWhereInput | dataWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - dataType?: XOR - run?: XOR - }, "time_dataTypeName"> - - export type dataOrderByWithAggregationInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - _count?: dataCountOrderByAggregateInput - _avg?: dataAvgOrderByAggregateInput - _max?: dataMaxOrderByAggregateInput - _min?: dataMinOrderByAggregateInput - _sum?: dataSumOrderByAggregateInput - } - - export type dataScalarWhereWithAggregatesInput = { - AND?: dataScalarWhereWithAggregatesInput | dataScalarWhereWithAggregatesInput[] - OR?: dataScalarWhereWithAggregatesInput[] - NOT?: dataScalarWhereWithAggregatesInput | dataScalarWhereWithAggregatesInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeWithAggregatesFilter<"data"> | Date | string - dataTypeName?: StringWithAggregatesFilter<"data"> | string - runId?: StringWithAggregatesFilter<"data"> | string - } - - export type data_typeWhereInput = { - AND?: data_typeWhereInput | data_typeWhereInput[] - OR?: data_typeWhereInput[] - NOT?: data_typeWhereInput | data_typeWhereInput[] - name?: StringFilter<"data_type"> | string - unit?: StringFilter<"data_type"> | string - nodeName?: StringFilter<"data_type"> | string - data?: DataListRelationFilter - } - - export type data_typeOrderByWithRelationInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - data?: dataOrderByRelationAggregateInput - } - - export type data_typeWhereUniqueInput = Prisma.AtLeast<{ - name?: string - AND?: data_typeWhereInput | data_typeWhereInput[] - OR?: data_typeWhereInput[] - NOT?: data_typeWhereInput | data_typeWhereInput[] - unit?: StringFilter<"data_type"> | string - nodeName?: StringFilter<"data_type"> | string - data?: DataListRelationFilter - }, "name"> - - export type data_typeOrderByWithAggregationInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - _count?: data_typeCountOrderByAggregateInput - _max?: data_typeMaxOrderByAggregateInput - _min?: data_typeMinOrderByAggregateInput - } - - export type data_typeScalarWhereWithAggregatesInput = { - AND?: data_typeScalarWhereWithAggregatesInput | data_typeScalarWhereWithAggregatesInput[] - OR?: data_typeScalarWhereWithAggregatesInput[] - NOT?: data_typeScalarWhereWithAggregatesInput | data_typeScalarWhereWithAggregatesInput[] - name?: StringWithAggregatesFilter<"data_type"> | string - unit?: StringWithAggregatesFilter<"data_type"> | string - nodeName?: StringWithAggregatesFilter<"data_type"> | string - } - - export type runCreateInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - data?: dataCreateNestedManyWithoutRunInput - } - - export type runUncheckedCreateInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - data?: dataUncheckedCreateNestedManyWithoutRunInput - } - - export type runUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - data?: dataUpdateManyWithoutRunNestedInput - } - - export type runUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - data?: dataUncheckedUpdateManyWithoutRunNestedInput - } - - export type runCreateManyInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type runUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataCreateInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataType: data_typeCreateNestedOneWithoutDataInput - run: runCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - runId: string - } - - export type dataUpdateInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataType?: data_typeUpdateOneRequiredWithoutDataNestedInput - run?: runUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type dataCreateManyInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - runId: string - } - - export type dataUpdateManyMutationInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataUncheckedUpdateManyInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type data_typeCreateInput = { - name: string - unit: string - nodeName: string - data?: dataCreateNestedManyWithoutDataTypeInput - } - - export type data_typeUncheckedCreateInput = { - name: string - unit: string - nodeName: string - data?: dataUncheckedCreateNestedManyWithoutDataTypeInput - } - - export type data_typeUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - data?: dataUpdateManyWithoutDataTypeNestedInput - } - - export type data_typeUncheckedUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - data?: dataUncheckedUpdateManyWithoutDataTypeNestedInput - } - - export type data_typeCreateManyInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type data_typeUncheckedUpdateManyInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringFilter<$PrismaModel> | string - } - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type DataListRelationFilter = { - every?: dataWhereInput - some?: dataWhereInput - none?: dataWhereInput - } - - export type dataOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type runCountOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runAvgOrderByAggregateInput = { - runId?: SortOrder - } - - export type runMaxOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runMinOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runSumOrderByAggregateInput = { - runId?: SortOrder - } - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type FloatNullableListFilter<$PrismaModel = never> = { - equals?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - has?: number | FloatFieldRefInput<$PrismaModel> | null - hasEvery?: number[] | ListFloatFieldRefInput<$PrismaModel> - hasSome?: number[] | ListFloatFieldRefInput<$PrismaModel> - isEmpty?: boolean - } - - export type Data_typeScalarRelationFilter = { - is?: data_typeWhereInput - isNot?: data_typeWhereInput - } - - export type RunScalarRelationFilter = { - is?: runWhereInput - isNot?: runWhereInput - } - - export type dataTimeDataTypeNameCompoundUniqueInput = { - time: Date | string - dataTypeName: string - } - - export type dataCountOrderByAggregateInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataAvgOrderByAggregateInput = { - values?: SortOrder - } - - export type dataMaxOrderByAggregateInput = { - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataMinOrderByAggregateInput = { - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataSumOrderByAggregateInput = { - values?: SortOrder - } - - export type data_typeCountOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type data_typeMaxOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type data_typeMinOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type dataCreateNestedManyWithoutRunInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUncheckedCreateNestedManyWithoutRunInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type dataUpdateManyWithoutRunNestedInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - upsert?: dataUpsertWithWhereUniqueWithoutRunInput | dataUpsertWithWhereUniqueWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutRunInput | dataUpdateWithWhereUniqueWithoutRunInput[] - updateMany?: dataUpdateManyWithWhereWithoutRunInput | dataUpdateManyWithWhereWithoutRunInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataUncheckedUpdateManyWithoutRunNestedInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - upsert?: dataUpsertWithWhereUniqueWithoutRunInput | dataUpsertWithWhereUniqueWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutRunInput | dataUpdateWithWhereUniqueWithoutRunInput[] - updateMany?: dataUpdateManyWithWhereWithoutRunInput | dataUpdateManyWithWhereWithoutRunInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataCreatevaluesInput = { - set: number[] - } - - export type data_typeCreateNestedOneWithoutDataInput = { - create?: XOR - connectOrCreate?: data_typeCreateOrConnectWithoutDataInput - connect?: data_typeWhereUniqueInput - } - - export type runCreateNestedOneWithoutDataInput = { - create?: XOR - connectOrCreate?: runCreateOrConnectWithoutDataInput - connect?: runWhereUniqueInput - } - - export type dataUpdatevaluesInput = { - set?: number[] - push?: number | number[] - } - - export type data_typeUpdateOneRequiredWithoutDataNestedInput = { - create?: XOR - connectOrCreate?: data_typeCreateOrConnectWithoutDataInput - upsert?: data_typeUpsertWithoutDataInput - connect?: data_typeWhereUniqueInput - update?: XOR, data_typeUncheckedUpdateWithoutDataInput> - } - - export type runUpdateOneRequiredWithoutDataNestedInput = { - create?: XOR - connectOrCreate?: runCreateOrConnectWithoutDataInput - upsert?: runUpsertWithoutDataInput - connect?: runWhereUniqueInput - update?: XOR, runUncheckedUpdateWithoutDataInput> - } - - export type dataCreateNestedManyWithoutDataTypeInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUncheckedCreateNestedManyWithoutDataTypeInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUpdateManyWithoutDataTypeNestedInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - upsert?: dataUpsertWithWhereUniqueWithoutDataTypeInput | dataUpsertWithWhereUniqueWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutDataTypeInput | dataUpdateWithWhereUniqueWithoutDataTypeInput[] - updateMany?: dataUpdateManyWithWhereWithoutDataTypeInput | dataUpdateManyWithWhereWithoutDataTypeInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataUncheckedUpdateManyWithoutDataTypeNestedInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - upsert?: dataUpsertWithWhereUniqueWithoutDataTypeInput | dataUpsertWithWhereUniqueWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutDataTypeInput | dataUpdateWithWhereUniqueWithoutDataTypeInput[] - updateMany?: dataUpdateManyWithWhereWithoutDataTypeInput | dataUpdateManyWithWhereWithoutDataTypeInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type dataCreateWithoutRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataType: data_typeCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateWithoutRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - } - - export type dataCreateOrConnectWithoutRunInput = { - where: dataWhereUniqueInput - create: XOR - } - - export type dataCreateManyRunInputEnvelope = { - data: dataCreateManyRunInput | dataCreateManyRunInput[] - skipDuplicates?: boolean - } - - export type dataUpsertWithWhereUniqueWithoutRunInput = { - where: dataWhereUniqueInput - update: XOR - create: XOR - } - - export type dataUpdateWithWhereUniqueWithoutRunInput = { - where: dataWhereUniqueInput - data: XOR - } - - export type dataUpdateManyWithWhereWithoutRunInput = { - where: dataScalarWhereInput - data: XOR - } - - export type dataScalarWhereInput = { - AND?: dataScalarWhereInput | dataScalarWhereInput[] - OR?: dataScalarWhereInput[] - NOT?: dataScalarWhereInput | dataScalarWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - } - - export type data_typeCreateWithoutDataInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeUncheckedCreateWithoutDataInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeCreateOrConnectWithoutDataInput = { - where: data_typeWhereUniqueInput - create: XOR - } - - export type runCreateWithoutDataInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runUncheckedCreateWithoutDataInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runCreateOrConnectWithoutDataInput = { - where: runWhereUniqueInput - create: XOR - } - - export type data_typeUpsertWithoutDataInput = { - update: XOR - create: XOR - where?: data_typeWhereInput - } - - export type data_typeUpdateToOneWithWhereWithoutDataInput = { - where?: data_typeWhereInput - data: XOR - } - - export type data_typeUpdateWithoutDataInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type data_typeUncheckedUpdateWithoutDataInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type runUpsertWithoutDataInput = { - update: XOR - create: XOR - where?: runWhereInput - } - - export type runUpdateToOneWithWhereWithoutDataInput = { - where?: runWhereInput - data: XOR - } - - export type runUpdateWithoutDataInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type runUncheckedUpdateWithoutDataInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataCreateWithoutDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - run: runCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateWithoutDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - runId: string - } - - export type dataCreateOrConnectWithoutDataTypeInput = { - where: dataWhereUniqueInput - create: XOR - } - - export type dataCreateManyDataTypeInputEnvelope = { - data: dataCreateManyDataTypeInput | dataCreateManyDataTypeInput[] - skipDuplicates?: boolean - } - - export type dataUpsertWithWhereUniqueWithoutDataTypeInput = { - where: dataWhereUniqueInput - update: XOR - create: XOR - } - - export type dataUpdateWithWhereUniqueWithoutDataTypeInput = { - where: dataWhereUniqueInput - data: XOR - } - - export type dataUpdateManyWithWhereWithoutDataTypeInput = { - where: dataScalarWhereInput - data: XOR - } - - export type dataCreateManyRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - } - - export type dataUpdateWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataType?: data_typeUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - } - - export type dataUncheckedUpdateManyWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - } - - export type dataCreateManyDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - runId: string - } - - export type dataUpdateWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - run?: runUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type dataUncheckedUpdateManyWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - runId?: StringFieldUpdateOperationsInput | string - } - - - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number - } - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF -} \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/index.js b/charybdis/cloud-prisma/cloud-prisma-client/index.js deleted file mode 100644 index b36461f7..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/index.js +++ /dev/null @@ -1,219 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/library.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - const path = require('path') - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/cloud-prisma/cloud-prisma-client", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin-arm64", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/cloud-prisma/schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "6.2.1", - "engineVersion": "4123509d24aa4dede1e864b46351bf2790323b69", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "CLOUD_DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"cloud-prisma-client\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"CLOUD_DATABASE_URL\")\n}\n\nmodel run {\n id String @id @default(uuid())\n runId Int @default(autoincrement())\n driverName String\n notes String\n time DateTime @db.Timestamptz()\n\n data data[]\n}\n\nmodel data {\n values Float[]\n time DateTime @db.Timestamptz()\n\n dataTypeName String\n dataType data_type @relation(fields: [dataTypeName], references: [name])\n runId String\n run run @relation(fields: [runId], references: [id])\n\n @@id([time, dataTypeName])\n}\n\nmodel data_type {\n name String @id\n unit String\n nodeName String\n\n data data[]\n}\n", - "inlineSchemaHash": "1722fd1cef888e6202201083d0c67f307d09eceab1f1972c98f2a10cbdc26953", - "copyEngine": true -} - -const fs = require('fs') - -config.dirname = __dirname -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = [ - "cloud-prisma/cloud-prisma-client", - "cloud-prisma-client", - ] - - const alternativePath = alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) - }) ?? alternativePaths[0] - - config.dirname = path.join(process.cwd(), alternativePath) - config.isBundled = true -} - -config.runtimeDataModel = JSON.parse("{\"models\":{\"run\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driverName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"values\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataTypeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data_type\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[\"dataTypeName\"],\"relationToFields\":[\"name\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"run\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"run\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[\"runId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"time\",\"dataTypeName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data_type\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"unit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nodeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - - -const { warnEnvConflicts } = require('./runtime/library.js') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -// file annotations for bundling tools to include these files -path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node"); -path.join(process.cwd(), "cloud-prisma/cloud-prisma-client/libquery_engine-darwin-arm64.dylib.node") -// file annotations for bundling tools to include these files -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "cloud-prisma/cloud-prisma-client/schema.prisma") diff --git a/charybdis/cloud-prisma/cloud-prisma-client/libquery_engine-darwin-arm64.dylib.node b/charybdis/cloud-prisma/cloud-prisma-client/libquery_engine-darwin-arm64.dylib.node deleted file mode 100755 index a25a1ba8..00000000 Binary files a/charybdis/cloud-prisma/cloud-prisma-client/libquery_engine-darwin-arm64.dylib.node and /dev/null differ diff --git a/charybdis/cloud-prisma/cloud-prisma-client/package.json b/charybdis/cloud-prisma/cloud-prisma-client/package.json deleted file mode 100644 index b079c2c3..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "prisma-client-2fe4512c347f6496837fe5ab16a73c3173810e04afdc5a054b21094a05ce98d3", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.js", - "default": "./wasm.js" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.js", - "default": "./runtime/library.js" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.js", - "default": "./runtime/binary.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./sql": { - "require": { - "types": "./sql.d.ts", - "node": "./sql.js", - "default": "./sql.js" - }, - "import": { - "types": "./sql.d.ts", - "node": "./sql.mjs", - "default": "./sql.mjs" - }, - "default": "./sql.js" - }, - "./*": "./*" - }, - "version": "6.2.1", - "sideEffects": false -} \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge-esm.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge-esm.js deleted file mode 100644 index 9b9b5739..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge-esm.js +++ /dev/null @@ -1,31 +0,0 @@ -var ea=Object.create;var Kr=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty;var Ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zr=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},oa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ra(t))!ia.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=ta(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?ea(na(e)):{},oa(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e));var y,u=Ae(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,c=Ae(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=Ae(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ae(()=>{"use strict"});var yi=Fe(Ke=>{"use strict";d();u();c();p();m();var ni=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sa=ni(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function l(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function f(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],U=D[1],k=new n(f(A,M,U)),F=0,L=U>0?M-4:M,G;for(G=0;G>16&255,k[F++]=R>>8&255,k[F++]=R&255;return U===2&&(R=r[A.charCodeAt(G)]<<2|r[A.charCodeAt(G+1)]>>4,k[F++]=R&255),U===1&&(R=r[A.charCodeAt(G)]<<10|r[A.charCodeAt(G+1)]<<4|r[A.charCodeAt(G+2)]>>2,k[F++]=R>>8&255,k[F++]=R&255),k}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,U=[],k=R;kL?L:F+k));return M===1?(R=A[D-1],U.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],U.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),U.join("")}}),aa=ni(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+v>=1?r+=S/f:r+=S*Math.pow(2,1-v),r*f>=2&&(a++,f/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*f-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),Yr=sa(),We=aa(),Xn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ke.Buffer=T;Ke.SlowBuffer=da;Ke.INSPECT_MAX_BYTES=50;var or=2147483647;Ke.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=la();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function la(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>or)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return en(e)}return ii(e,t,r)}T.poolSize=8192;function ii(e,t,r){if(typeof e=="string")return ca(e,t);if(ArrayBuffer.isView(e))return pa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return si(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ma(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ii(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function oi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ua(e,t,r){return oi(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return ua(e,t,r)};function en(e){return oi(e),be(e<0?0:tn(e)|0)}T.allocUnsafe=function(e){return en(e)};T.allocUnsafeSlow=function(e){return en(e)};function ca(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ai(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Zr(e){let t=e.length<0?0:tn(e.length)|0,r=be(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function da(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ai(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Xr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return hi(e).length;default:if(i)return n?-1:Xr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ai;function fa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ta(this,t,r);case"utf8":case"utf-8":return ui(this,t,r);case"ascii":return Pa(this,t,r);case"latin1":case"binary":return va(this,t,r);case"base64":return ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ca(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Xn&&(T.prototype[Xn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,nn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ei(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ei(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ei(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return ga(this,e,t,r);case"utf8":case"utf-8":return ha(this,e,t,r);case"ascii":case"latin1":case"binary":return ya(this,e,t,r);case"base64":return wa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ea(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ba(e,t,r){return t===0&&r===e.length?Yr.fromByteArray(e):Yr.fromByteArray(e.slice(t,r))}function ui(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return xa(n)}var ti=4096;function xa(e){let t=e.length;if(t<=ti)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function ci(e,t,r,n,i){gi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function pi(e,t,r,n,i){gi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return ci(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return ci(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function mi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function di(e,t,r,n,i){return t=+t,r=r>>>0,i||mi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return di(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return di(this,e,t,!1,r)};function fi(e,t,r,n,i){return t=+t,r=r>>>0,i||mi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return fi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return fi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ri(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ri(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ri(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Aa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function gi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Qe.ERR_OUT_OF_RANGE("value",a,e)}Aa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Qe.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Qe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ra=/[^+/0-9A-Za-z-_]/g;function Sa(e){if(e=e.split("=")[0],e=e.trim().replace(Ra,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Xr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ia(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function hi(e){return Yr.toByteArray(Sa(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function nn(e){return e!==e}var ka=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?Da:e}function Da(){throw new Error("BigInt not supported")}});var w,d=Ae(()=>{"use strict";w=Le(yi())});function Ma(){return!1}var Na,_a,vi,Ti=Ae(()=>{"use strict";d();u();c();p();m();Na={},_a={existsSync:Ma,promises:Na},vi=_a});function qa(...e){return e.join("/")}function Va(...e){return e.join("/")}var Ui,ja,Ja,xt,$i=Ae(()=>{"use strict";d();u();c();p();m();Ui="/",ja={sep:Ui},Ja={resolve:qa,posix:ja,join:Va,sep:Ui},xt=Ja});var pr,Vi=Ae(()=>{"use strict";d();u();c();p();m();pr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ji=Fe((od,ji)=>{"use strict";d();u();c();p();m();ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Wi=Fe((yd,Qi)=>{"use strict";d();u();c();p();m();Qi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ki=Fe((vd,Hi)=>{"use strict";d();u();c();p();m();var za=Wi();Hi.exports=e=>typeof e=="string"?e.replace(za(),""):e});var yn=Fe((ch,mo)=>{"use strict";d();u();c();p();m();mo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Vu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Uo=Fe(()=>{"use strict";d();u();c();p();m()});d();u();c();p();m();var bi={};zr(bi,{defineExtension:()=>wi,getExtensionContext:()=>Ei});d();u();c();p();m();d();u();c();p();m();function wi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ei(e){return e}var Pi={};zr(Pi,{validator:()=>xi});d();u();c();p();m();d();u();c();p();m();function xi(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var on,Ci,Ai,Ri,Si=!0;typeof y<"u"&&({FORCE_COLOR:on,NODE_DISABLE_COLORS:Ci,NO_COLOR:Ai,TERM:Ri}=y.env||{},Si=y.stdout&&y.stdout.isTTY);var Fa={enabled:!Ci&&Ai==null&&Ri!=="dumb"&&(on!=null&&on!=="0"||Si)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Vp=j(0,0),ar=j(1,22),lr=j(2,22),jp=j(3,23),Ii=j(4,24),Jp=j(7,27),Gp=j(8,28),Qp=j(9,29),Wp=j(30,39),ze=j(31,39),Oi=j(32,39),ki=j(33,39),Di=j(34,39),Hp=j(35,39),Mi=j(36,39),Kp=j(37,39),Ni=j(90,39),zp=j(90,39),Yp=j(40,49),Zp=j(41,49),Xp=j(42,49),em=j(43,49),tm=j(44,49),rm=j(45,49),nm=j(46,49),im=j(47,49);d();u();c();p();m();var La=100,_i=["green","yellow","blue","magenta","cyan","red"],ur=[],Fi=Date.now(),Ba=0,sn=typeof y<"u"?y.env:{};globalThis.DEBUG??=sn.DEBUG??"";globalThis.DEBUG_COLORS??=sn.DEBUG_COLORS?sn.DEBUG_COLORS==="true":!0;var bt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ua(e){let t={color:_i[Ba++%_i.length],enabled:bt.enabled(e),namespace:e,log:bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>La&&ur.shift(),bt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:$a(g)),f=`+${Date.now()-Fi}ms`;Fi=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Li=new Proxy(Ua,{get:(e,t)=>bt[t],set:(e,t,r)=>bt[t]=r});function $a(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Bi(){ur.length=0}var X=Li;d();u();c();p();m();d();u();c();p();m();var qi="library";function Pt(e){let t=Ga();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":qi)}function Ga(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();u();c();p();m();d();u();c();p();m();var cr;(t=>{let e;(L=>(L.findUnique="findUnique",L.findUniqueOrThrow="findUniqueOrThrow",L.findFirst="findFirst",L.findFirstOrThrow="findFirstOrThrow",L.findMany="findMany",L.create="create",L.createMany="createMany",L.createManyAndReturn="createManyAndReturn",L.update="update",L.updateMany="updateMany",L.updateManyAndReturn="updateManyAndReturn",L.upsert="upsert",L.delete="delete",L.deleteMany="deleteMany",L.groupBy="groupBy",L.count="count",L.aggregate="aggregate",L.findRaw="findRaw",L.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(cr||={});var Tt={};zr(Tt,{error:()=>Ha,info:()=>Wa,log:()=>Qa,query:()=>Ka,should:()=>Gi,tags:()=>vt,warn:()=>an});d();u();c();p();m();var vt={error:ze("prisma:error"),warn:ki("prisma:warn"),info:Mi("prisma:info"),query:Di("prisma:query")},Gi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Qa(...e){console.log(...e)}function an(e,...t){Gi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Wa(e,...t){console.info(`${vt.info} ${e}`,...t)}function Ha(e,...t){console.error(`${vt.error} ${e}`,...t)}function Ka(e,...t){console.log(`${vt.query} ${e}`,...t)}d();u();c();p();m();function xe(e,t){throw new Error(t)}d();u();c();p();m();function ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();var un=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();u();c();p();m();function Ye(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function cn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{zi.has(e)||(zi.add(e),an(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(Q,"PrismaClientInitializationError");d();u();c();p();m();var oe=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(oe,"PrismaClientKnownRequestError");d();u();c();p();m();var Se=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(Se,"PrismaClientRustPanicError");d();u();c();p();m();var se=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(se,"PrismaClientUnknownRequestError");d();u();c();p();m();var ee=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(ee,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var Ze=9e15,De=1e9,pn="0123456789abcdef",fr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",mn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ze,maxE:Ze,crypto:!1},to,Pe,N=!0,yr="[DecimalError] ",ke=yr+"Invalid argument: ",ro=yr+"Precision limit exceeded",no=yr+"crypto unavailable",io="[object Decimal]",Z=Math.floor,W=Math.pow,Ya=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Za=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Xa=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,oo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,el=9007199254740991,tl=fr.length-1,dn=gr.length-1,C={toStringTag:io};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};C.ceil=function(){return I(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=rl(n,co(n,r)),n.precision=e,n.rounding=t,I(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=Z((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=q(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,I(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-Z(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return I(q(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return I(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Er(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Xe(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Xe(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Er(5,e)),i=Xe(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=dn)return s=ce(g,h+4,v).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=dn)return s=ce(g,h+4,v).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/O),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+S,s=Oe(f,a),n=t?hr(g,a+10):Oe(e,a),l=q(s,n,a,1),Ct(l.d,i=h,v))do if(a+=10,s=Oe(f,a),n=t?hr(g,a+10):Oe(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Ct(l.d,i+=10,v));return N=!0,I(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(f=S.d,v=e.d,a=A.precision,l=A.rounding,!f[0]||!v[0]){if(v[0])e.s=-e.s;else if(f[0])e=new A(S);else return new A(l===3?-0:0);return N?I(e,a,l):e}if(r=Z(e.e/O),g=Z(S.e/O),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=v.length):(t=v,r=g,s=f.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=v.length,h=n0;--n)f[s++]=0;for(n=v.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=wr(f,n),N?I(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=so(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=il(n,co(n,r)),n.precision=e,n.rounding=t,I(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=Z((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,I(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=Z(g.e/O)+Z(e.e/O),l=v.length,f=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=wr(o,r),N?I(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return hn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,De),t===void 0?t=n.rounding:ne(t,0,8),I(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,!0):(ne(e,0,De),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e+1,t),r=de(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=de(i):(ne(e,0,De),t===void 0?t=o.rounding:ne(t,0,8),n=I(new o(i),e+i.e+1,t),r=de(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(f=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=so(A)-S.e-1,s=o%O,t.d[0]=W(10,s<0?O+s:s),e==null)e=o>0?t:f;else{if(a=new R(e),!a.isInt()||a.lt(f))throw Error(ke+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new R(z(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=S.s,v=q(f,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[f,n]:[l,r],R.precision=g,N=!0,v};C.toHexadecimal=C.toHex=function(e,t){return hn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=q(r,e,0,t,1).times(e),N=!0,I(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return hn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=Z(e.e/O),t>=e.d.length-1&&(r=f<0?-f:f)<=el)return i=ao(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=fn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=I(fn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,I(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,De),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e,t),r=de(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,De),t===void 0?t=n.rounding:ne(t,0,8)),I(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return I(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=W(10,O-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function dr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function rl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Er(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Xe(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,v,S,A,R,D,M,U,k,F,L,G,Qr,rr,wt,Wr,ue,nr,ir=n.constructor,Hr=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new ir(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?Hr*0:Hr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=O,g=Z(n.e/S)-Z(i.e/S)),ue=V.length,wt=Y.length,M=new ir(Hr),U=M.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(G=o=ir.precision,s=ir.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)U.push(1),A=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,V=V[0],G++;(h1&&(V=e(V,v,l),Y=e(Y,v,l),ue=V.length,wt=Y.length),rr=ue,k=Y.slice(0,ue),F=k.length;F=l/2&&++Wr;do v=0,f=t(V,k,ue,F),f<0?(L=k[0],ue!=F&&(L=L*l+(k[1]||0)),v=L/Wr|0,v>1?(v>=l&&(v=l-1),R=e(V,v,l),D=R.length,F=k.length,f=t(R,k,D,F),f==1&&(v--,r(R,ue=10;v/=10)h++;M.e=h+g*S-1,I(M,a?o+M.e+1:o,s,A)}return M}}();function I(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=O,s=t,g=h[v=0],l=g/W(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=W(10,O-o),h[v]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function wr(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function hr(e,t,r){if(t>tl)throw N=!0,r&&(e.precision=r),Error(ro);return I(new e(fr),t,1,!0)}function ce(e,t,r){if(t>dn)throw Error(ro);return I(new e(gr),t,r,!0)}function so(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function ao(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/O+4);for(N=!1;;){if(r%2&&(o=o.times(t),Xi(o.d,s)&&(i=!0)),r=Z(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Xi(t.d,s)}return N=!0,o}function Zi(e){return e.d[e.d.length-1]&1}function lo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(f<3&&Ct(s.d,l-n,S,f))v.precision=l+=10,r=o=a=new v(1),g=0,f++;else return I(s,v.precision=A,S,N=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,U=M.rounding,k=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(N=!1,g=k):g=t,M.precision=g+=A,r=z(D),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=z(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return f=hr(M,g+2,k).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(f),M.precision=k,t==null?I(R,k,U,N=!0):R;for(h=R,l=s=R=q(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),f=l.plus(q(s,new M(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(hr(M,g+2,k).times(o+""))),l=q(l,new M(S),g,1),t==null)if(Ct(l.d,g-A,U,a))M.precision=g+=A,f=s=R=q(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,M.precision=k,U,N=!0);else return M.precision=k,l;l=f,i+=2}}function uo(e){return String(e.s*e.s/0)}function gn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),oo.test(t))return gn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Za.test(t))r=16,t=t.toLowerCase();else if(Ya.test(t))r=2;else if(Xa.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=ao(n,new n(r),o,o*2)),f=dr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=wr(f,g),e.d=f,N=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ue.pow(2,l))),N=!0,e)}function il(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Xe(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Er(5,r)),t=Xe(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Xe(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/O);for(N=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Er(e,t){for(var r=e;--t;)r*=e;return r}function co(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=Zi(r)?n?2:3:n?4:1,t;Pe=Zi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function hn(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ne(r,1,De),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=uo(e);else{for(g=de(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=dr(de(v),10,i),v.e=v.d.length),h=dr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,f=to),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=dr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function ol(e){return new this(e).abs()}function sl(e){return new this(e).acos()}function al(e){return new this(e).acosh()}function ll(e,t){return new this(e).plus(t)}function ul(e){return new this(e).asin()}function cl(e){return new this(e).asinh()}function pl(e){return new this(e).atan()}function ml(e){return new this(e).atanh()}function dl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function fl(e){return new this(e).cbrt()}function gl(e){return I(e=new this(e),e.e+1,2)}function hl(e,t,r){return new this(e).clamp(t,r)}function yl(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-Ze,0,"toExpPos",0,Ze,"maxE",0,Ze,"minE",-Ze,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=mn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(no);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function wl(e){return new this(e).cos()}function El(e){return new this(e).cosh()}function po(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,eo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(no);else for(;o=10;i/=10)n++;ne.highlight()},Hl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Kl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function zl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Yl(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Yl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function xr(e){let t=e.showColors?Wl:Hl,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Kl(e),zl(r,t)}d();u();c();p();m();var Eo=Le(yn());d();u();c();p();m();function ho(e,t,r){let n=yo(e),i=Zl(n),o=eu(i);o?Pr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function yo(e){return e.errors.flatMap(t=>t.kind==="Union"?yo(t):[t])}function Zl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Xl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Xl(e,t){return[...new Set(e.concat(t))]}function eu(e){return cn(e,(t,r)=>{let n=fo(t),i=fo(r);return n!==i?n-i:go(t)-go(r)})}function fo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function go(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var ae=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();u();c();p();m();d();u();c();p();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},wo={bold:ar,red:ze,green:Oi,dim:lr,enabled:!0},it={write(e){e.writeLine(",")}};d();u();c();p();m();var fe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Me=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ot=class extends Me{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new fe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Me{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ot&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new fe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(it,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var K=class extends Me{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var Rt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Pr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ru(e,t);break;case"IncludeOnScalar":nu(e,t);break;case"EmptySelection":iu(e,t,r);break;case"UnknownSelectionField":lu(e,t);break;case"InvalidSelectionValue":uu(e,t);break;case"UnknownArgument":cu(e,t);break;case"UnknownInputField":pu(e,t);break;case"RequiredArgumentMissing":mu(e,t);break;case"InvalidArgumentType":du(e,t);break;case"InvalidArgumentValue":fu(e,t);break;case"ValueTooLarge":gu(e,t);break;case"SomeFieldsMissing":hu(e,t);break;case"TooManyFieldsGiven":yu(e,t);break;case"Union":ho(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ru(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function nu(e,t){let[r,n]=St(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ae(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${It(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function iu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ou(e,t,i);return}if(n.hasField("select")){su(e,t);return}}if(r?.[et(e.outputType.name)]){au(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function ou(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ae(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function su(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Po(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function au(e,t){let r=new Rt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ae("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=St(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function lu(e,t){let r=vo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Po(n,e.outputType);break;case"include":wu(n,e.outputType);break;case"omit":Eu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function uu(e,t){let r=vo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function cu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),bu(n,e.arguments)),t.addErrorMessage(i=>bo(i,r,e.arguments.map(o=>o.name)))}function pu(e,t){let[r,n]=St(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&To(o,e.inputType)}t.addErrorMessage(o=>bo(o,n,e.inputType.fields.map(s=>s.name)))}function bo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Pu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function mu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=St(e.argumentPath),s=new Rt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(xo).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function xo(e){return e.kind==="list"?`${xo(e.elementType)}[]`:e.name}function du(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Ar("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function fu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Ar("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function gu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function hu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&To(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Ar("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(It(i)),o.join(" ")})}function yu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Ar("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Po(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,"true"))}function wu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ae(r.name,"true"))}function Eu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ae(r.name,"true"))}function bu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function vo(e,t){let[r,n]=St(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function To(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function St(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Ar(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var xu=3;function Pu(e,t){let r=1/0,n;for(let i of t){let o=(0,Eo.default)(e,i);o>xu||o`}};function at(e){return e instanceof Ot}d();u();c();p();m();var Rr=Symbol(),wn=new WeakMap,Te=class{constructor(t){t===Rr?wn.set(this,`Prisma.${this._getName()}`):wn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return wn.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{};bn(Dt,"DbNull");var Mt=class extends kt{};bn(Mt,"JsonNull");var Nt=class extends kt{};bn(Nt,"AnyNull");var En={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:Nt},instances:{DbNull:new Dt(Rr),JsonNull:new Mt(Rr),AnyNull:new Nt(Rr)}};function bn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Ao=": ",Sr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ao.length}write(t){let r=new fe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ao).write(this.value)}};var xn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function lt(e){return new xn(Ro(e))}function Ro(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Sr(r,So(n));t.addField(i)}return t}function So(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(rt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=br(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Te?new K(`Prisma.${e._getName()}`):at(e)?new K(`prisma.${Co(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?vu(e):typeof e=="object"?Ro(e):new K(Object.prototype.toString.call(e))}function vu(e){let t=new ot;for(let r of e)t.addItem(So(r));return t}function Ir(e,t){let r=t==="pretty"?wo:Cr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Or({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=lt(e);for(let h of t)Pr(h,a,s);let{message:l,args:f}=Ir(a,r),g=xr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new ee(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();var ge=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};d();u();c();p();m();function _t(e){let t;return{get(){return t||(t={value:e()}),t.value}}}d();u();c();p();m();function he(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Oo(e,t,r){let n=he(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Tu({...e,...Io(t.name,e,t.result.$allModels),...Io(t.name,e,t.result[n])})}function Tu(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ye(e,n=>({...n,needs:r(n.name,new Set)}))}function Io(e,t,r){return r?Ye(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Cu(t,o,i)})):{}}function Cu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ko(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Do(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ge;this.modelExtensionsCache=new ge;this.queryCallbacksCache=new ge;this.clientExtensions=_t(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=_t(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Oo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=he(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ut=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();d();u();c();p();m();var Mo=Symbol(),Ft=class{constructor(t){if(t!==Mo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Pn:t}},Pn=new Ft(Mo);function ye(e){return e instanceof Ft}var Au={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},No="explicitly `undefined` values are not allowed";function Tn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ut.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new vn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:Au[t],query:Lt(r,h)}}function Lt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Fo(r,n),selection:Ru(e,t,i,n)}}function Ru(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ku(e,n)):Su(n,t,r)}function Su(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Iu(n,t,e),Ou(n,r,e),n}function Iu(e,t,r){for(let[n,i]of Object.entries(t)){if(ye(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Lt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Lt(i,o)}}function Ou(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Do(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function ku(e,t){let r={},n=t.getComputedFields(),i=ko(e,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Lt({},a):r[o]=!0;continue}r[o]=Lt(s,a)}}return r}function _o(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(tt(e)){if(br(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(at(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Du(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Mu(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Nu(e))return e.toJSON();if(typeof e=="object")return Fo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Fo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ye(i)||(i!==void 0?r[n]=_o(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:No}))}return r}function Du(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[et(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:xe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();var Bt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();u();c();p();m();function _u(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Fu(e,t){let r=_t(()=>Lu(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Lu(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Sn=new WeakMap,Dr="$$PrismaTypedSql",In=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Dr,{value:Dr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function Bu(e){return(...t)=>new In(e,t)}function Lo(e){return e!=null&&e[Dr]===Dr}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function Ut(e){return{ok:!1,error:e,map(){return Ut(e)},flatMap(){return Ut(e)}}}var On=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},kn=e=>{let t=new On,r=we(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Uu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=qu(t,e.getConnectionInfo.bind(e))),n},Uu=(e,t)=>{let r=we(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>$u(e,o))}},$u=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),commit:we(e,t.commit.bind(t)),rollback:we(e,t.rollback.bind(t))});function we(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Ut({kind:"GenericJs",id:i})}}}function qu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Ut({kind:"GenericJs",id:i})}}}var Xs=Le(Bo());var Tk=Le(Uo());Vi();Ti();$i();d();u();c();p();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Mr={enumerable:!0,configurable:!0,writable:!0};function Nr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Mr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Vo=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=Gu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=jo(Reflect.ownKeys(o),r),a=jo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Mr,...l?.getPropertyDescriptor(s)}:Mr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Vo]=function(){let o={...this};return delete o[Vo],o},i}function Gu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function jo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function ct(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function _r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function Jo(e){if(e===void 0)return"";let t=lt(e);return new nt(0,{colors:Cr}).write(t).toString()}d();u();c();p();m();var Qu="P2037";function Fr({error:e,user_facing_error:t},r,n){return t.error_code?new oe(Wu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Wu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Qu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Dn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Dn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Go={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function pt(e={}){let t=Ku(e);return Object.entries(t).reduce((n,[i,o])=>(Go[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ku(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Lr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Qo(e,t){let r=Lr(e);return t({action:"aggregate",unpacker:r,argsMapper:pt})(e)}d();u();c();p();m();function zu(e={}){let{select:t,...r}=e;return typeof t=="object"?pt({...r,_count:t}):pt({...r,_count:{_all:!0}})}function Yu(e={}){return typeof e.select=="object"?t=>Lr(e)(t)._count:t=>Lr(e)(t)._count._all}function Wo(e,t){return t({action:"count",unpacker:Yu(e),argsMapper:zu})(e)}d();u();c();p();m();function Zu(e={}){let t=pt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Xu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ho(e,t){return t({action:"groupBy",unpacker:Xu(e),argsMapper:Zu})(e)}function Ko(e,t,r){if(t==="aggregate")return n=>Qo(n,r);if(t==="count")return n=>Wo(n,r);if(t==="groupBy")return n=>Ho(n,r)}d();u();c();p();m();function zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=un(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ot(e,o,s.type,s.isList,s.kind==="enum")},...Nr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var Yo=e=>Array.isArray(e)?e:e.split("."),Mn=(e,t)=>Yo(t).reduce((r,n)=>r&&r[n],e),Zo=(e,t,r)=>Yo(t).reduceRight((n,i,o,s)=>Object.assign({},Mn(e,s.slice(0,o)),{[i]:n}),r);function ec(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function tc(e,t,r){return t===void 0?e??{}:Zo(t,r,e||!0)}function Nn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Ne(e._errorFormat),g=ec(n,i),h=tc(l,o,g),v=r({dataPath:g,callsite:f})(h),S=rc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],U=[g,h];return Nn(e,...M,...U)},...Nr([...S,...Object.getOwnPropertyNames(v)])})}}function rc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var nc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ic=["aggregate","count","groupBy"];function _n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[oc(e,t),ac(e,t),$t(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ee({},n)}function oc(e,t){let r=he(t),n=Object.keys(cr.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})})};return nc.includes(o)?Nn(e,t,s):sc(i)?Ko(e,i,s):s({})}}}function sc(e){return ic.includes(e)}function ac(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return zo(t,r)}))}d();u();c();p();m();function Xo(e){return e.replace(/^./,t=>t.toUpperCase())}var Fn=Symbol();function qt(e){let t=[lc(e),te(Fn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),Ee(e,t)}function lc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(he),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Xo(i);if(e._runtimeDataModel.models[o]!==void 0)return _n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return _n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function es(e){return e[Fn]?e[Fn]:e}function ts(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return qt(t)}d();u();c();p();m();d();u();c();p();m();function rs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(ct(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(ct(f))}uc(e,l.needs)&&s.push(cc(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function uc(e,t){return t.every(r=>ln(e,r))}function cc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Br({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Br({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function is({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Br({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=he(l);return rs({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();function os(e){if(e instanceof le)return pc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:os(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ps(o,l),a.args=s,as(e,a,r,n+1)}})})}function ls(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return as(e,t,s)}function us(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?cs(r,n,0,e):e(r)}}function cs(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ps(i,l),cs(a,t,r+1,n)}})}var ss=e=>e;function ps(e=ss,t=ss){return r=>e(t(r))}d();u();c();p();m();var ms=X("prisma:client"),ds={Vercel:"vercel","Netlify CI":"netlify"};function fs({postinstall:e,ciName:t,clientVersion:r}){if(ms("checkPlatformCaching:postinstall",e),ms("checkPlatformCaching:ciName",t),e===!0&&t&&t in ds){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ds[t]}-build`;throw console.error(n),new Q(n,r)}}d();u();c();p();m();function gs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var mc="Cloudflare-Workers",dc="node";function hs(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===mc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===dc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var fc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ln(){let e=hs();return{id:e,prettyName:fc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function mt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ln().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();var Ur=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Ur{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();d();u();c();p();m();function B(e,t){return{...e,isRetryable:t}}var dt=class extends ie{constructor(r){super("This request must be retried",B(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(dt,"ForcedRetryError");d();u();c();p();m();var qe=class extends ie{constructor(r,n){super(r,B(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(qe,"InvalidDatasourceError");d();u();c();p();m();var Ve=class extends ie{constructor(r,n){super(r,B(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(Ve,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var J=class extends ie{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var je=class extends J{constructor(r){super("Schema needs to be uploaded",B(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(je,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Bn="This request could not be understood by the server",jt=class extends J{constructor(r,n,i){super(n||Bn,B(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(jt,"BadRequestError");d();u();c();p();m();var Jt=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",B(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Jt,"HealthcheckTimeoutError");d();u();c();p();m();var Gt=class extends J{constructor(r,n,i){super(n,B(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Gt,"EngineStartupError");d();u();c();p();m();var Qt=class extends J{constructor(r){super("Engine version is not supported",B(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Qt,"EngineVersionNotSupportedError");d();u();c();p();m();var Un="Request timed out",Wt=class extends J{constructor(r,n=Un){super(n,B(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Wt,"GatewayTimeoutError");d();u();c();p();m();var gc="Interactive transaction error",Ht=class extends J{constructor(r,n=gc){super(n,B(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Ht,"InteractiveTransactionError");d();u();c();p();m();var hc="Request parameters are invalid",Kt=class extends J{constructor(r,n=hc){super(n,B(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Kt,"InvalidRequestError");d();u();c();p();m();var $n="Requested resource does not exist",zt=class extends J{constructor(r,n=$n){super(n,B(r,!1));this.name="NotFoundError";this.code="P5003"}};_(zt,"NotFoundError");d();u();c();p();m();var qn="Unknown server error",ft=class extends J{constructor(r,n,i){super(n||qn,B(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(ft,"ServerError");d();u();c();p();m();var Vn="Unauthorized, check your connection string",Yt=class extends J{constructor(r,n=Vn){super(n,B(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Yt,"UnauthorizedError");d();u();c();p();m();var jn="Usage exceeded, retry again later",Zt=class extends J{constructor(r,n=jn){super(n,B(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Zt,"UsageExceededError");async function yc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await yc(e);if(n.type==="QueryEngineError")throw new oe(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ft(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new je(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Gt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Jt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Kt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,gt(Vn,n));if(e.status===404)return new zt(r,gt($n,n));if(e.status===429)throw new Zt(r,gt(jn,n));if(e.status===504)throw new Wt(r,gt(Un,n));if(e.status>=500)throw new ft(r,gt(qn,n));if(e.status>=400)throw new jt(r,gt(Bn,n))}function gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function ys(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ws(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}d();u();c();p();m();function Es(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();function wc(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(wc(e))}d();u();c();p();m();var bs={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var er=class extends ie{constructor(r,n){super(`Cannot fetch data from service: -${r}`,B(n,!0));this.name="RequestError";this.code="P5010"}};_(er,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var bc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,xs=X("prisma:client:dataproxyEngine");async function xc(e,t){let r=bs["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&bc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=Pc(`<=${a}.${l}.${f}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();xs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ps(e,t){let r=await xc(e,t);return xs("version",r),r}function Pc(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var vs=3,$r=X("prisma:client:dataproxyEngine"),Gn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},tr=class{constructor(t){this.name="DataProxyEngine";Es(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=ws(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Gn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ps(t,this.config),$r("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":$r(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$r("schema response status",r.status);let n=await Xt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=_r(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$r("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,v=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Xt(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=mt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=vs)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${vs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ys(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof je)throw await this.uploadSchema(),new dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Fr(t[0],this.config.clientVersion,this.config.activeProvider):new se(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ts({copyEngine:e=!0},t){let r;try{r=mt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&mr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Pt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let f;throw f=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new ee(f.join(` -`),{clientVersion:t.clientVersion})}if(o)return new tr(t);throw new ee("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();u();c();p();m();function qr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var Cs=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var As=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function ht(e){try{return Rs(e,"fast")}catch{return Rs(e,"slow")}}function Rs(e,t){return JSON.stringify(e.map(r=>Is(r,t)))}function Is(e,t){if(Array.isArray(e))return e.map(r=>Is(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(tt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(vc(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Os(e):e}function vc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Os(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ss);let t={};for(let r of Object.keys(e))t[r]=Ss(e[r]);return t}function Ss(e){return typeof e=="bigint"?e.toString():Os(e)}d();u();c();p();m();var Tc=["$connect","$disconnect","$on","$transaction","$use","$extends"],ks=Tc;var Cc=/^(\s*alter\s)/i,Ds=X("prisma:client");function Qn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Cc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Wn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Lo(r))n=r.sql,i={values:ht(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:ht(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:ht(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:ht(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=As(r),i={values:ht(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ds(`prisma.${e}(${n}, ${i.values})`):Ds(`prisma.${e}(${n})`),{query:n,parameters:i}},Ms={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function Hn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=_s(r(o)):_s(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function _s(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var Ac={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Kn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Ac}};function Fs(){return new Kn}d();u();c();p();m();function Ls(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Bs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Vr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var $s=Le(Ki());d();u();c();p();m();function jr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Us(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(zn(e.query.arguments)),t.push(zn(e.query.selection)),t.join("")}function zn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${zn(n)})`:r}).join(" ")})`}d();u();c();p();m();var Rc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Yn(e){return Rc[e]}d();u();c();p();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function Zn(e){let t=[],r=Sc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>Yn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Oc(o),containsWrite:f,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?qs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Yn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Us(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ic(t),kc(t,i))throw t;if(t instanceof oe&&Dc(t)){let f=Vs(t.meta);Or({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=xr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new oe(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Se(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Se)throw new Se(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,$s.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=Mn(o,s),l=i==="queryRaw"?Zn(a):At(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Oc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:qs(e)};xe(e,"Unknown transaction kind")}}function qs(e){return{id:e.id,payload:e.payload}}function kc(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Dc(e){return e.code==="P2009"||e.code==="P2012"}function Vs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Vs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var js="6.2.1";var Js=js;d();u();c();p();m();var Ks=Le(yn());d();u();c();p();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_($,"PrismaClientConstructorValidationError");var Gs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Qs=["pretty","colorless","minimal"],Ws=["info","query","warn","error"],Nc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=yt(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!qr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Pt()==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Qs.includes(e)){let t=yt(e,Qs);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ws.includes(r)){let n=yt(r,Ws);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=yt(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Fc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(Lc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=yt(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function zs(e,t){for(let[r,n]of Object.entries(e)){if(!Gs.includes(r)){let i=yt(r,Gs);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Nc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function yt(e,t){if(t.length===0||typeof e!="string")return"";let r=_c(e,t);return r?` Did you mean "${r}"?`:""}function _c(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ks.default)(e,i)}));r.sort((i,o)=>i.distanceet(n)===t);if(r)return e[r]}function Lc(e,t){let r=lt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ir(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function Ys(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!jr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var _e=X("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Bc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Uc=Symbol.for("prisma.client.transaction.id"),$c={id:0,nextId(){return++this.id}};function qc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Hn();this.$extends=ts;e=n?.__internal?.configOverride?.(e)??e,fs(e),n&&zs(n,e);let i=new pr().on("error",()=>{});this._extensions=ut.empty(),this._previewFeatures=qr(e),this._clientVersion=e.clientVersion??Js,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Fs();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=kn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&X.enable("prisma:client");let h=xt.resolve(e.dirname,e.relativePath);vi.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:xt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Bs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:gs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:mt,getBatchRequestPayload:_r,prismaGraphQLToJSError:Fr,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:oe,debug:X("prisma:client:accelerateEngine"),engineVersion:Xs.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ts(e,this._engineConfig),this._requestHandler=new Gr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{Tt.log(`${Tt.tags[A]??""}`,R.message||R.query)})}this._metrics=new Bt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Bi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Wn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Zs(n,i);return Qn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Qn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Cs,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Wn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Zs(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=$c.nextId(),s=Ls(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Ys(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return qt(Ee(es(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Hn(n)),te(Uc,()=>n.id),ct(ks)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Bc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,D=>g(f,M=>(D?.end(),l(M))));let{runInTransaction:h,args:v,...S}=f,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await ls(this,A);return A.model?is({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=f?f(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Tn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return X.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Jo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Zs(e,t){return Vc(e)?[new le(e,t),Ms]:[e,Ns]}function Vc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var jc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Jc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!jc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();var export_warnEnvConflicts=void 0;export{Li as Debug,ve as Decimal,bi as Extensions,Bt as MetricsClient,Q as PrismaClientInitializationError,oe as PrismaClientKnownRequestError,Se as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,Pi as Public,le as Sql,Fu as defineDmmfProperty,At as deserializeJsonResponse,Zn as deserializeRawResult,_u as dmmfToRuntimeDataModel,Ju as empty,qc as getPrismaClient,Ln as getRuntime,ju as join,Jc as makeStrictEnum,Bu as makeTypedQueryFactory,En as objectEnumValues,$o as raw,Tn as serializeJsonQuery,Pn as skip,qo as sqltag,export_warnEnvConflicts as warnEnvConflicts,mr as warnOnce}; -//# sourceMappingURL=edge-esm.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge.js deleted file mode 100644 index 0acd43dc..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/edge.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict";var ua=Object.create;var sr=Object.defineProperty;var ca=Object.getOwnPropertyDescriptor;var pa=Object.getOwnPropertyNames;var ma=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)sr(e,r,{get:t[r],enumerable:!0})},ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pa(t))!da.call(e,i)&&i!==r&&sr(e,i,{get:()=>t[i],enumerable:!(n=ca(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?ua(ma(e)):{},ii(t||!e||!e.__esModule?sr(r,"default",{value:e,enumerable:!0}):r,e)),fa=e=>ii(sr({},"__esModule",{value:!0}),e);var y,u=Re(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,c=Re(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=Re(()=>{"use strict";E=()=>{};E.prototype=E});var m=Re(()=>{"use strict"});var vi=Fe(Ke=>{"use strict";d();u();c();p();m();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ga=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function l(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function f(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],U=D[1],k=new n(f(A,M,U)),F=0,L=U>0?M-4:M,G;for(G=0;G>16&255,k[F++]=R>>8&255,k[F++]=R&255;return U===2&&(R=r[A.charCodeAt(G)]<<2|r[A.charCodeAt(G+1)]>>4,k[F++]=R&255),U===1&&(R=r[A.charCodeAt(G)]<<10|r[A.charCodeAt(G+1)]<<4|r[A.charCodeAt(G+2)]>>2,k[F++]=R>>8&255,k[F++]=R&255),k}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,U=[],k=R;kL?L:F+k));return M===1?(R=A[D-1],U.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],U.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),U.join("")}}),ha=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+v>=1?r+=S/f:r+=S*Math.pow(2,1-v),r*f>=2&&(a++,f/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*f-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),rn=ga(),We=ha(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ke.Buffer=T;Ke.SlowBuffer=Pa;Ke.INSPECT_MAX_BYTES=50;var lr=2147483647;Ke.kMaxLength=lr;T.TYPED_ARRAY_SUPPORT=ya();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ya(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>lr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sn(e)}return ci(e,t,r)}T.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return Ea(e,t);if(ArrayBuffer.isView(e))return ba(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=xa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function pi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function wa(e,t,r){return pi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return wa(e,t,r)};function sn(e){return pi(e),xe(e<0?0:an(e)|0)}T.allocUnsafe=function(e){return sn(e)};T.allocUnsafeSlow=function(e){return sn(e)};function Ea(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function nn(e){let t=e.length<0?0:an(e.length)|0,r=xe(t);for(let n=0;n=lr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lr.toString(16)+" bytes");return e|0}function Pa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return on(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:on(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=di;function va(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ma(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return ka(this,t,r);case"latin1":case"binary":return Da(this,t,r);case"base64":return Ia(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Na(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};oi&&(T.prototype[oi]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,un(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:si(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ta(this,e,t,r);case"utf8":case"utf-8":return Ca(this,e,t,r);case"ascii":case"latin1":case"binary":return Aa(this,e,t,r);case"base64":return Ra(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ia(e,t,r){return t===0&&r===e.length?rn.fromByteArray(e):rn.fromByteArray(e.slice(t,r))}function gi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Oa(n)}var ai=4096;function Oa(e){let t=e.length;if(t<=ai)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function hi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function yi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Se(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Se(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Se(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Se(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function _a(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function xi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Qe.ERR_OUT_OF_RANGE("value",a,e)}_a(n,i,o)}function He(e,t){if(typeof e!="number")throw new Qe.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Qe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Fa=/[^+/0-9A-Za-z-_]/g;function La(e){if(e=e.split("=")[0],e=e.trim().replace(Fa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function on(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ba(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return rn.toByteArray(La(e))}function ur(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function un(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,d=Re(()=>{"use strict";w=Le(vi())});function Va(){return!1}var ja,Ja,Ri,Si=Re(()=>{"use strict";d();u();c();p();m();ja={},Ja={existsSync:Va,promises:ja},Ri=Ja});function za(...e){return e.join("/")}function Ya(...e){return e.join("/")}var Vi,Za,Xa,vt,ji=Re(()=>{"use strict";d();u();c();p();m();Vi="/",Za={sep:Vi},Xa={resolve:za,posix:Za,join:Ya,sep:Vi},vt=Xa});var fr,Gi=Re(()=>{"use strict";d();u();c();p();m();fr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Fe((ad,Qi)=>{"use strict";d();u();c();p();m();Qi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var zi=Fe((Ed,Ki)=>{"use strict";d();u();c();p();m();Ki.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Zi=Fe((Cd,Yi)=>{"use strict";d();u();c();p();m();var ol=zi();Yi.exports=e=>typeof e=="string"?e.replace(ol(),""):e});var Cn=Fe((mh,ho)=>{"use strict";d();u();c();p();m();ho.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Hu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Go=Fe(()=>{"use strict";d();u();c();p();m()});var Wc={};ar(Wc,{Debug:()=>fn,Decimal:()=>fe,Extensions:()=>cn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>ve,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>Z,Public:()=>pn,Sql:()=>se,defineDmmfProperty:()=>qo,deserializeJsonResponse:()=>et,deserializeRawResult:()=>Yr,dmmfToRuntimeDataModel:()=>$o,empty:()=>Wo,getPrismaClient:()=>sa,getRuntime:()=>Jr,join:()=>Qo,makeStrictEnum:()=>aa,makeTypedQueryFactory:()=>Vo,objectEnumValues:()=>Or,raw:()=>Ln,serializeJsonQuery:()=>Fr,skip:()=>_r,sqltag:()=>Bn,warnEnvConflicts:()=>void 0,warnOnce:()=>Rt});module.exports=fa(Wc);d();u();c();p();m();var cn={};ar(cn,{defineExtension:()=>Ti,getExtensionContext:()=>Ci});d();u();c();p();m();d();u();c();p();m();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ci(e){return e}var pn={};ar(pn,{validator:()=>Ai});d();u();c();p();m();d();u();c();p();m();function Ai(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var mn,Ii,Oi,ki,Di=!0;typeof y<"u"&&({FORCE_COLOR:mn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:ki}=y.env||{},Di=y.stdout&&y.stdout.isTTY);var Ga={enabled:!Ii&&Oi==null&&ki!=="dumb"&&(mn!=null&&mn!=="0"||Di)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ga.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=j(0,0),cr=j(1,22),pr=j(2,22),Gp=j(3,23),Mi=j(4,24),Qp=j(7,27),Wp=j(8,28),Hp=j(9,29),Kp=j(30,39),ze=j(31,39),Ni=j(32,39),_i=j(33,39),Fi=j(34,39),zp=j(35,39),Li=j(36,39),Yp=j(37,39),Bi=j(90,39),Zp=j(90,39),Xp=j(40,49),em=j(41,49),tm=j(42,49),rm=j(43,49),nm=j(44,49),im=j(45,49),om=j(46,49),sm=j(47,49);d();u();c();p();m();var Qa=100,Ui=["green","yellow","blue","magenta","cyan","red"],mr=[],$i=Date.now(),Wa=0,dn=typeof y<"u"?y.env:{};globalThis.DEBUG??=dn.DEBUG??"";globalThis.DEBUG_COLORS??=dn.DEBUG_COLORS?dn.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ha(e){let t={color:Ui[Wa++%Ui.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>Qa&&mr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),f=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var fn=new Proxy(Ha,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function Ka(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function qi(){mr.length=0}var ee=fn;d();u();c();p();m();d();u();c();p();m();var Ji="library";function Tt(e){let t=el();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ji)}function el(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();u();c();p();m();d();u();c();p();m();var dr;(t=>{let e;(L=>(L.findUnique="findUnique",L.findUniqueOrThrow="findUniqueOrThrow",L.findFirst="findFirst",L.findFirstOrThrow="findFirstOrThrow",L.findMany="findMany",L.create="create",L.createMany="createMany",L.createManyAndReturn="createManyAndReturn",L.update="update",L.updateMany="updateMany",L.updateManyAndReturn="updateManyAndReturn",L.upsert="upsert",L.delete="delete",L.deleteMany="deleteMany",L.groupBy="groupBy",L.count="count",L.aggregate="aggregate",L.findRaw="findRaw",L.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(dr||={});var At={};ar(At,{error:()=>nl,info:()=>rl,log:()=>tl,query:()=>il,should:()=>Hi,tags:()=>Ct,warn:()=>gn});d();u();c();p();m();var Ct={error:ze("prisma:error"),warn:_i("prisma:warn"),info:Li("prisma:info"),query:Fi("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function tl(...e){console.log(...e)}function gn(e,...t){Hi.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function rl(e,...t){console.info(`${Ct.info} ${e}`,...t)}function nl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function il(e,...t){console.log(`${Ct.query} ${e}`,...t)}d();u();c();p();m();function Pe(e,t){throw new Error(t)}d();u();c();p();m();function hn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();var yn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();u();c();p();m();function Ye(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function wn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Xi.has(e)||(Xi.add(e),gn(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(Q,"PrismaClientInitializationError");d();u();c();p();m();var ne=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(ne,"PrismaClientKnownRequestError");d();u();c();p();m();var ve=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(ve,"PrismaClientRustPanicError");d();u();c();p();m();var ie=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(ie,"PrismaClientUnknownRequestError");d();u();c();p();m();var Z=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(Z,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var Ze=9e15,De=1e9,En="0123456789abcdef",hr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",yr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",bn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ze,maxE:Ze,crypto:!1},io,Te,N=!0,Er="[DecimalError] ",ke=Er+"Invalid argument: ",oo=Er+"Precision limit exceeded",so=Er+"crypto unavailable",ao="[object Decimal]",X=Math.floor,W=Math.pow,sl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,al=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ll=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,lo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,ul=9007199254740991,cl=hr.length-1,xn=yr.length-1,C={toStringTag:ao};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};C.ceil=function(){return I(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=pl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te==2||Te==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=q(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,I(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return I(q(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return I(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/xr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Xe(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Xe(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/xr(5,e)),i=Xe(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=xn)return s=ce(g,h+4,v).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=xn)return s=ce(g,h+4,v).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/O),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+S,s=Oe(f,a),n=t?wr(g,a+10):Oe(e,a),l=q(s,n,a,1),St(l.d,i=h,v))do if(a+=10,s=Oe(f,a),n=t?wr(g,a+10):Oe(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(St(l.d,i+=10,v));return N=!0,I(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(f=S.d,v=e.d,a=A.precision,l=A.rounding,!f[0]||!v[0]){if(v[0])e.s=-e.s;else if(f[0])e=new A(S);else return new A(l===3?-0:0);return N?I(e,a,l):e}if(r=X(e.e/O),g=X(S.e/O),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=v.length):(t=v,r=g,s=f.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=v.length,h=n0;--n)f[s++]=0;for(n=v.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=br(f,n),N?I(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=uo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=dl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,I(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Te==2||Te==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/O)+X(e.e/O),l=v.length,f=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=br(o,r),N?I(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Tn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,De),t===void 0?t=n.rounding:oe(t,0,8),I(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,!0):(oe(e,0,De),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e+1,t),r=de(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=de(i):(oe(e,0,De),t===void 0?t=o.rounding:oe(t,0,8),n=I(new o(i),e+i.e+1,t),r=de(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(f=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=uo(A)-S.e-1,s=o%O,t.d[0]=W(10,s<0?O+s:s),e==null)e=o>0?t:f;else{if(a=new R(e),!a.isInt()||a.lt(f))throw Error(ke+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new R(z(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=S.s,v=q(f,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[f,n]:[l,r],R.precision=g,N=!0,v};C.toHexadecimal=C.toHex=function(e,t){return Tn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=q(r,e,0,t,1).times(e),N=!0,I(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Tn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=X(e.e/O),t>=e.d.length-1&&(r=f<0?-f:f)<=ul)return i=co(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Pn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),St(i.d,n,o)&&(t=n+10,i=I(Pn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,I(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,De),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e,t),r=de(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,De),t===void 0?t=n.rounding:oe(t,0,8)),I(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return I(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function St(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=W(10,O-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function gr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function pl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/xr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Xe(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,v,S,A,R,D,M,U,k,F,L,G,Xr,nr,bt,en,ue,ir,or=n.constructor,tn=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new or(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?tn*0:tn/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=O,g=X(n.e/S)-X(i.e/S)),ue=V.length,bt=Y.length,M=new or(tn),U=M.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(G=o=or.precision,s=or.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)U.push(1),A=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,V=V[0],G++;(h1&&(V=e(V,v,l),Y=e(Y,v,l),ue=V.length,bt=Y.length),nr=ue,k=Y.slice(0,ue),F=k.length;F=l/2&&++en;do v=0,f=t(V,k,ue,F),f<0?(L=k[0],ue!=F&&(L=L*l+(k[1]||0)),v=L/en|0,v>1?(v>=l&&(v=l-1),R=e(V,v,l),D=R.length,F=k.length,f=t(R,k,D,F),f==1&&(v--,r(R,ue=10;v/=10)h++;M.e=h+g*S-1,I(M,a?o+M.e+1:o,s,A)}return M}}();function I(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=O,s=t,g=h[v=0],l=g/W(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=W(10,O-o),h[v]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function br(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function wr(e,t,r){if(t>cl)throw N=!0,r&&(e.precision=r),Error(oo);return I(new e(hr),t,1,!0)}function ce(e,t,r){if(t>xn)throw Error(oo);return I(new e(yr),t,r,!0)}function uo(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function co(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/O+4);for(N=!1;;){if(r%2&&(o=o.times(t),ro(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),ro(t.d,s)}return N=!0,o}function to(e){return e.d[e.d.length-1]&1}function po(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(f<3&&St(s.d,l-n,S,f))v.precision=l+=10,r=o=a=new v(1),g=0,f++;else return I(s,v.precision=A,S,N=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,U=M.rounding,k=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(N=!1,g=k):g=t,M.precision=g+=A,r=z(D),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=z(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return f=wr(M,g+2,k).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(f),M.precision=k,t==null?I(R,k,U,N=!0):R;for(h=R,l=s=R=q(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),f=l.plus(q(s,new M(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(wr(M,g+2,k).times(o+""))),l=q(l,new M(S),g,1),t==null)if(St(l.d,g-A,U,a))M.precision=g+=A,f=s=R=q(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,M.precision=k,U,N=!0);else return M.precision=k,l;l=f,i+=2}}function mo(e){return String(e.s*e.s/0)}function vn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),lo.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(al.test(t))r=16,t=t.toLowerCase();else if(sl.test(t))r=2;else if(ll.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=co(n,new n(r),o,o*2)),f=gr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=br(f,g),e.d=f,N=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ue.pow(2,l))),N=!0,e)}function dl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Xe(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/xr(5,r)),t=Xe(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Xe(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/O);for(N=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function xr(e,t){for(var r=e;--t;)r*=e;return r}function fo(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Te=n?4:1,t;if(r=t.divToInt(i),r.isZero())Te=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Te=to(r)?n?2:3:n?4:1,t;Te=to(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Tn(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor,A=r!==void 0;if(A?(oe(r,1,De),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=mo(e);else{for(g=de(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=gr(de(v),10,i),v.e=v.d.length),h=gr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,f=io),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=gr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function fl(e){return new this(e).abs()}function gl(e){return new this(e).acos()}function hl(e){return new this(e).acosh()}function yl(e,t){return new this(e).plus(t)}function wl(e){return new this(e).asin()}function El(e){return new this(e).asinh()}function bl(e){return new this(e).atan()}function xl(e){return new this(e).atanh()}function Pl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function vl(e){return new this(e).cbrt()}function Tl(e){return I(e=new this(e),e.e+1,2)}function Cl(e,t,r){return new this(e).clamp(t,r)}function Al(e){if(!e||typeof e!="object")throw Error(Er+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-Ze,0,"toExpPos",0,Ze,"maxE",0,Ze,"minE",-Ze,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=bn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(so);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function Rl(e){return new this(e).cos()}function Sl(e){return new this(e).cosh()}function go(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,no(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(so);else for(;o=10;i/=10)n++;ne.highlight()},nu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function iu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ou({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(su(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function su(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function vr(e){let t=e.showColors?ru:nu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=iu(e),ou(r,t)}d();u();c();p();m();var Po=Le(Cn());d();u();c();p();m();function Eo(e,t,r){let n=bo(e),i=au(n),o=uu(i);o?Tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function bo(e){return e.errors.flatMap(t=>t.kind==="Union"?bo(t):[t])}function au(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:lu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function lu(e,t){return[...new Set(e.concat(t))]}function uu(e){return wn(e,(t,r)=>{let n=yo(t),i=yo(r);return n!==i?n-i:wo(t)-wo(r)})}function yo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function wo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();var it=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();u();c();p();m();d();u();c();p();m();var Cr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Ar=e=>e,Rr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},xo={bold:cr,red:ze,green:Ni,dim:pr,enabled:!0},ot={write(e){e.writeLine(",")}};d();u();c();p();m();var ge=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Me=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var st=class extends Me{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Cr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ge("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(ot,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var at=class e extends Me{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof st&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ge("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(ot,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var K=class extends Me{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var It=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(ot,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":pu(e,t);break;case"IncludeOnScalar":mu(e,t);break;case"EmptySelection":du(e,t,r);break;case"UnknownSelectionField":yu(e,t);break;case"InvalidSelectionValue":wu(e,t);break;case"UnknownArgument":Eu(e,t);break;case"UnknownInputField":bu(e,t);break;case"RequiredArgumentMissing":xu(e,t);break;case"InvalidArgumentType":Pu(e,t);break;case"InvalidArgumentValue":vu(e,t);break;case"ValueTooLarge":Tu(e,t);break;case"SomeFieldsMissing":Cu(e,t);break;case"TooManyFieldsGiven":Au(e,t);break;case"Union":Eo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function pu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function mu(e,t){let[r,n]=Ot(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${kt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function du(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){fu(e,t,i);return}if(n.hasField("select")){gu(e,t);return}}if(r?.[tt(e.outputType.name)]){hu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function fu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function gu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Co(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${kt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function hu(e,t){let r=new It;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Ot(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new at;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function yu(e,t){let r=Ao(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Co(n,e.outputType);break;case"include":Ru(n,e.outputType);break;case"omit":Su(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(kt(n)),i.join(" ")})}function wu(e,t){let r=Ao(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Eu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Iu(n,e.arguments)),t.addErrorMessage(i=>vo(i,r,e.arguments.map(o=>o.name)))}function bu(e,t){let[r,n]=Ot(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ro(o,e.inputType)}t.addErrorMessage(o=>vo(o,n,e.inputType.fields.map(s=>s.name)))}function vo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ku(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(kt(e)),n.join(" ")}function xu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Ot(e.argumentPath),s=new It,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(To).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function To(e){return e.kind==="list"?`${To(e.elementType)}[]`:e.name}function Pu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Tu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Cu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ro(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(kt(i)),o.join(" ")})}function Au(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Co(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Ru(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Su(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Iu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ao(e,t){let[r,n]=Ot(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ro(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ot(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function kt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ou=3;function ku(e,t){let r=1/0,n;for(let i of t){let o=(0,Po.default)(e,i);o>Ou||o`}};function lt(e){return e instanceof Dt}d();u();c();p();m();var Ir=Symbol(),An=new WeakMap,Ce=class{constructor(t){t===Ir?An.set(this,`Prisma.${this._getName()}`):An.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return An.get(this)}},Mt=class extends Ce{_getNamespace(){return"NullTypes"}},Nt=class extends Mt{};Rn(Nt,"DbNull");var _t=class extends Mt{};Rn(_t,"JsonNull");var Ft=class extends Mt{};Rn(Ft,"AnyNull");var Or={classes:{DbNull:Nt,JsonNull:_t,AnyNull:Ft},instances:{DbNull:new Nt(Ir),JsonNull:new _t(Ir),AnyNull:new Ft(Ir)}};function Rn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Io=": ",kr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Io.length}write(t){let r=new ge(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Io).write(this.value)}};var Sn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function ut(e){return new Sn(Oo(e))}function Oo(e){let t=new at;for(let[r,n]of Object.entries(e)){let i=new kr(r,ko(n));t.addField(i)}return t}function ko(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(nt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Pr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Ce?new K(`Prisma.${e._getName()}`):lt(e)?new K(`prisma.${So(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Du(e):typeof e=="object"?Oo(e):new K(Object.prototype.toString.call(e))}function Du(e){let t=new st;for(let r of e)t.addItem(ko(r));return t}function Dr(e,t){let r=t==="pretty"?xo:Rr,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Mr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Tr(h,a,s);let{message:l,args:f}=Dr(a,r),g=vr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new Z(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();var he=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};d();u();c();p();m();function Lt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}d();u();c();p();m();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Mo(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Mu({...e,...Do(t.name,e,t.result.$allModels),...Do(t.name,e,t.result[n])})}function Mu(e){let t=new he,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ye(e,n=>({...n,needs:r(n.name,new Set)}))}function Do(e,t,r){return r?Ye(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Nu(t,o,i)})):{}}function Nu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function _o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Nr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new he;this.modelExtensionsCache=new he;this.queryCallbacksCache=new he;this.clientExtensions=Lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Lt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Mo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ye(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Nr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Nr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();d();u();c();p();m();var Fo=Symbol(),Bt=class{constructor(t){if(t!==Fo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_r:t}},_r=new Bt(Fo);function we(e){return e instanceof Bt}var _u={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Lo="explicitly `undefined` values are not allowed";function Fr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new In({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:_u[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Uo(r,n),selection:Fu(e,t,i,n)}}function Fu(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),$u(e,n)):Lu(n,t,r)}function Lu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Bu(n,t,e),Uu(n,r,e),n}function Bu(e,t,r){for(let[n,i]of Object.entries(t)){if(we(i))continue;let o=r.nestSelection(n);if(On(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function Uu(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=_o(i,n);for(let[s,a]of Object.entries(o)){if(we(a))continue;On(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function $u(e,t){let r={},n=t.getComputedFields(),i=No(e,n);for(let[o,s]of Object.entries(i)){if(we(s))continue;let a=t.nestSelection(o);On(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||we(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Bo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(rt(e)){if(Pr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return qu(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Vu(e))return e.values;if(nt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Or.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ju(e))return e.toJSON();if(typeof e=="object")return Uo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Uo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);we(i)||(i!==void 0?r[n]=Bo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Lo}))}return r}function qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[tt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();var pt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();u();c();p();m();function $o(e){return{models:kn(e.models),enums:kn(e.enums),types:kn(e.types)}}function kn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function qo(e,t){let r=Lt(()=>Ju(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ju(e){return{datamodel:{models:Dn(e.models),enums:Dn(e.enums),types:Dn(e.types)}}}function Dn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Mn=new WeakMap,Lr="$$PrismaTypedSql",Nn=class{constructor(t,r){Mn.set(this,{sql:t,values:r}),Object.defineProperty(this,Lr,{value:Lr})}get sql(){return Mn.get(this).sql}get values(){return Mn.get(this).values}};function Vo(e){return(...t)=>new Nn(e,t)}function jo(e){return e!=null&&e[Lr]===Lr}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function $t(e){return{ok:!1,error:e,map(){return $t(e)},flatMap(){return $t(e)}}}var _n=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new _n,r=Ee(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ee(t,e.queryRaw.bind(e)),executeRaw:Ee(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Gu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Wu(t,e.getConnectionInfo.bind(e))),n},Gu=(e,t)=>{let r=Ee(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Qu(e,o))}},Qu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),commit:Ee(e,t.commit.bind(t)),rollback:Ee(e,t.rollback.bind(t))});function Ee(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return $t({kind:"GenericJs",id:i})}}}function Wu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return $t({kind:"GenericJs",id:i})}}}var oa=Le(Jo());var Ak=Le(Go());Gi();Si();ji();d();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Br={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Br,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ho=Symbol.for("nodejs.util.inspect.custom");function be(e,t){let r=Ku(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ko(Reflect.ownKeys(o),r),a=Ko(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Br,...l?.getPropertyDescriptor(s)}:Br:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ho]=function(){let o={...this};return delete o[Ho],o},i}function Ku(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ko(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function $r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function zo(e){if(e===void 0)return"";let t=ut(e);return new it(0,{colors:Rr}).write(t).toString()}d();u();c();p();m();var zu="P2037";function qr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Yu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Yu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===zu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Un=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Un}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Yo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Xu(e);return Object.entries(t).reduce((n,[i,o])=>(Yo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Xu(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Vr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Zo(e,t){let r=Vr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}d();u();c();p();m();function ec(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function tc(e={}){return typeof e.select=="object"?t=>Vr(e)(t)._count:t=>Vr(e)(t)._count._all}function Xo(e,t){return t({action:"count",unpacker:tc(e),argsMapper:ec})(e)}d();u();c();p();m();function rc(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function es(e,t){return t({action:"groupBy",unpacker:nc(e),argsMapper:rc})(e)}function ts(e,t,r){if(t==="aggregate")return n=>Zo(n,r);if(t==="count")return n=>Xo(n,r);if(t==="groupBy")return n=>es(n,r)}d();u();c();p();m();function rs(e,t){let r=t.fields.filter(i=>!i.relationName),n=yn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Dt(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var ns=e=>Array.isArray(e)?e:e.split("."),$n=(e,t)=>ns(t).reduce((r,n)=>r&&r[n],e),is=(e,t,r)=>ns(t).reduceRight((n,i,o,s)=>Object.assign({},$n(e,s.slice(0,o)),{[i]:n}),r);function ic(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function oc(e,t,r){return t===void 0?e??{}:is(t,r,e||!0)}function qn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Ne(e._errorFormat),g=ic(n,i),h=oc(l,o,g),v=r({dataPath:g,callsite:f})(h),S=sc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],U=[g,h];return qn(e,...M,...U)},...Ur([...S,...Object.getOwnPropertyNames(v)])})}}function sc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var ac=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],lc=["aggregate","count","groupBy"];function Vn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[uc(e,t),pc(e,t),qt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return be({},n)}function uc(e,t){let r=ye(t),n=Object.keys(dr.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})})};return ac.includes(o)?qn(e,t,s):cc(i)?ts(e,i,s):s({})}}}function cc(e){return lc.includes(e)}function pc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return rs(t,r)}))}d();u();c();p();m();function os(e){return e.replace(/^./,t=>t.toUpperCase())}var jn=Symbol();function Vt(e){let t=[mc(e),te(jn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(qt(r)),be(e,t)}function mc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=os(i);if(e._runtimeDataModel.models[o]!==void 0)return Vn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Vn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ss(e){return e[jn]?e[jn]:e}function as(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Vt(t)}d();u();c();p();m();d();u();c();p();m();function ls({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(mt(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(mt(f))}dc(e,l.needs)&&s.push(fc(l,be(e,s)))}return s.length>0||a.length>0?be(e,[...s,...a]):e}function dc(e,t){return t.every(r=>hn(e,r))}function fc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=jr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function cs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=ye(l);return ls({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();function ps(e){if(e instanceof se)return gc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ps(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ys(o,l),a.args=s,ds(e,a,r,n+1)}})})}function fs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ds(e,t,s)}function gs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?hs(r,n,0,e):e(r)}}function hs(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ys(i,l),hs(a,t,r+1,n)}})}var ms=e=>e;function ys(e=ms,t=ms){return r=>e(t(r))}d();u();c();p();m();var ws=ee("prisma:client"),Es={Vercel:"vercel","Netlify CI":"netlify"};function bs({postinstall:e,ciName:t,clientVersion:r}){if(ws("checkPlatformCaching:postinstall",e),ws("checkPlatformCaching:ciName",t),e===!0&&t&&t in Es){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Es[t]}-build`;throw console.error(n),new Q(n,r)}}d();u();c();p();m();function xs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var hc="Cloudflare-Workers",yc="node";function Ps(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===hc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===yc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var wc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Jr(){let e=Ps();return{id:e,prettyName:wc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Jr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();var Gr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Gr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();d();u();c();p();m();function B(e,t){return{...e,isRetryable:t}}var gt=class extends ae{constructor(r){super("This request must be retried",B(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(gt,"ForcedRetryError");d();u();c();p();m();var qe=class extends ae{constructor(r,n){super(r,B(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(qe,"InvalidDatasourceError");d();u();c();p();m();var Ve=class extends ae{constructor(r,n){super(r,B(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(Ve,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var J=class extends ae{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var je=class extends J{constructor(r){super("Schema needs to be uploaded",B(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(je,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Jn="This request could not be understood by the server",Jt=class extends J{constructor(r,n,i){super(n||Jn,B(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Jt,"BadRequestError");d();u();c();p();m();var Gt=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",B(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Gt,"HealthcheckTimeoutError");d();u();c();p();m();var Qt=class extends J{constructor(r,n,i){super(n,B(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Qt,"EngineStartupError");d();u();c();p();m();var Wt=class extends J{constructor(r){super("Engine version is not supported",B(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Wt,"EngineVersionNotSupportedError");d();u();c();p();m();var Gn="Request timed out",Ht=class extends J{constructor(r,n=Gn){super(n,B(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Ht,"GatewayTimeoutError");d();u();c();p();m();var Ec="Interactive transaction error",Kt=class extends J{constructor(r,n=Ec){super(n,B(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Kt,"InteractiveTransactionError");d();u();c();p();m();var bc="Request parameters are invalid",zt=class extends J{constructor(r,n=bc){super(n,B(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(zt,"InvalidRequestError");d();u();c();p();m();var Qn="Requested resource does not exist",Yt=class extends J{constructor(r,n=Qn){super(n,B(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Yt,"NotFoundError");d();u();c();p();m();var Wn="Unknown server error",ht=class extends J{constructor(r,n,i){super(n||Wn,B(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(ht,"ServerError");d();u();c();p();m();var Hn="Unauthorized, check your connection string",Zt=class extends J{constructor(r,n=Hn){super(n,B(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Zt,"UnauthorizedError");d();u();c();p();m();var Kn="Usage exceeded, retry again later",Xt=class extends J{constructor(r,n=Kn){super(n,B(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Xt,"UsageExceededError");async function xc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function er(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await xc(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new je(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Wt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Kt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Zt(r,yt(Hn,n));if(e.status===404)return new Yt(r,yt(Qn,n));if(e.status===429)throw new Xt(r,yt(Kn,n));if(e.status===504)throw new Ht(r,yt(Gn,n));if(e.status>=500)throw new ht(r,yt(Wn,n));if(e.status>=400)throw new Jt(r,yt(Jn,n))}function yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function vs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ts(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}d();u();c();p();m();function Cs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();function Pc(e){return e[0]*1e3+e[1]/1e6}function zn(e){return new Date(Pc(e))}d();u();c();p();m();var As={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var tr=class extends ae{constructor(r,n){super(`Cannot fetch data from service: -${r}`,B(n,!0));this.name="RequestError";this.code="P5010"}};_(tr,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new tr(a,{clientVersion:n,cause:s})}}var Tc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Rs=ee("prisma:client:dataproxyEngine");async function Cc(e,t){let r=As["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&Tc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=Ac(`<=${a}.${l}.${f}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Rs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ss(e,t){let r=await Cc(e,t);return Rs("version",r),r}function Ac(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Is=3,Qr=ee("prisma:client:dataproxyEngine"),Yn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},rr=class{constructor(t){this.name="DataProxyEngine";Cs(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=Ts(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Yn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ss(t,this.config),Qr("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Qr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:zn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:zn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Qr("schema response status",r.status);let n=await er(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=$r(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Qr("graphql response status",a.status),await this.handleError(await er(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await er(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,v=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await er(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=ft({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Is)throw i instanceof gt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Is} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await vs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof je)throw await this.uploadSchema(),new gt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?qr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Os({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Rt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Tt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let f;throw f=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new Z(f.join(` -`),{clientVersion:t.clientVersion})}if(o)return new rr(t);throw new Z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();u();c();p();m();function Wr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var ks=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var Ds=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function wt(e){try{return Ms(e,"fast")}catch{return Ms(e,"slow")}}function Ms(e,t){return JSON.stringify(e.map(r=>_s(r,t)))}function _s(e,t){if(Array.isArray(e))return e.map(r=>_s(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(rt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rc(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Fs(e):e}function Rc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Fs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ns);let t={};for(let r of Object.keys(e))t[r]=Ns(e[r]);return t}function Ns(e){return typeof e=="bigint"?e.toString():Fs(e)}d();u();c();p();m();var Sc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ls=Sc;var Ic=/^(\s*alter\s)/i,Bs=ee("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ic.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(jo(r))n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:wt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ds(r),i={values:wt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Bs(`prisma.${e}(${n}, ${i.values})`):Bs(`prisma.${e}(${n})`),{query:n,parameters:i}},Us={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},$s={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function ei(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=qs(r(o)):qs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function qs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var Oc={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Oc}};function Vs(){return new ti}d();u();c();p();m();function js(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Hr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var Qs=Le(Zi());d();u();c();p();m();function Kr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Gs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}d();u();c();p();m();var kc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return kc[e]}d();u();c();p();m();var zr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function Yr(e){let t=[],r=Dc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Nc(o),containsWrite:f,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ws(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Gs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Mc(t),_c(t,i))throw t;if(t instanceof ne&&Fc(t)){let f=Hs(t.meta);Mr({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=vr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ve(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ve)throw new ve(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=$n(o,s),l=i==="queryRaw"?Yr(a):et(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Nc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ws(e)};Pe(e,"Unknown transaction kind")}}function Ws(e){return{id:e.id,payload:e.payload}}function _c(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Fc(e){return e.code==="P2009"||e.code==="P2012"}function Hs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var Ks="6.2.1";var zs=Ks;d();u();c();p();m();var ta=Le(Cn());d();u();c();p();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_($,"PrismaClientConstructorValidationError");var Ys=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Zs=["pretty","colorless","minimal"],Xs=["info","query","warn","error"],Bc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Et(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Wr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Tt()==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Zs.includes(e)){let t=Et(e,Zs);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Xs.includes(r)){let n=Et(r,Xs);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Et(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=$c(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(qc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Et(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Ys.includes(r)){let i=Et(r,Ys);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Bc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Et(e,t){if(t.length===0||typeof e!="string")return"";let r=Uc(e,t);return r?` Did you mean "${r}"?`:""}function Uc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distancett(n)===t);if(r)return e[r]}function qc(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Dr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function na(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jc=Symbol.for("prisma.client.transaction.id"),Jc={id:0,nextId(){return++this.id}};function sa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Hr;this._createPrismaPromise=ei();this.$extends=as;e=n?.__internal?.configOverride?.(e)??e,bs(e),n&&ra(n,e);let i=new fr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??zs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Vs();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&vt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&vt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&ee.enable("prisma:client");let h=vt.resolve(e.dirname,e.relativePath);Ri.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:vt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:xs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:$r,prismaGraphQLToJSError:qr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ne,debug:ee("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Os(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{At.log(`${At.tags[A]??""}`,R.message||R.query)})}this._metrics=new pt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Vt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{qi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ks,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Jc.nextId(),s=js(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return na(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return Vt(be(ss(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ei(n)),te(jc,()=>n.id),mt(Ls)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Vc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,D=>g(f,M=>(D?.end(),l(M))));let{runInTransaction:h,args:v,...S}=f,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await fs(this,A);return A.model?cs({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=f?f(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Fr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${zo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Gc(e)?[new se(e,t),Us]:[e,$s]}function Gc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var Qc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function aa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=edge.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.d.ts deleted file mode 100644 index 8f6c3e24..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.d.ts +++ /dev/null @@ -1,365 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export { } diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.js deleted file mode 100644 index 8f0457df..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/index-browser.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";var de=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Me=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ge(n))!Je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=We(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Me(Xn,{Decimal:()=>je,Public:()=>he,getRuntime:()=>be,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Me(he,{validator:()=>Ce});function Ce(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},G=class extends ge{_getNamespace(){return"NullTypes"}},J=class extends G{};me(J,"DbNull");var X=class extends G{};me(X,"JsonNull");var K=class extends G{};me(K,"AnyNull");var Oe={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var xe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!xe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Qe="Cloudflare-Workers",Ye="node";function Re(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Qe?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===Ye?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function be(){let e=Re();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,$=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",V=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",b=Math.floor,C=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error(V+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*C(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-b(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),x(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(x(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=b(e.e/m),c=b(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(V+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=b((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=b(c.e/m)+b(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(_(e,0,$),n===void 0?n=t.rounding:_(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(_(e,0,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(_(e,0,$),n===void 0?n=s.rounding:_(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error(V+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:_(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(C(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=b(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),x(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(_(e,1,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(_(e,1,$),n===void 0?n=t.rounding:_(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error(V+e)}function x(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,A,M,q,E,P,Y,I,le,z,W,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,R=t.d,k=r.d;if(!R||!R[0]||!k||!k[0])return new ee(!t.s||!r.s||(R?k&&R[0]==k[0]:!k)?NaN:R&&R[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=b(t.e/g)-b(r.e/g)),T=k.length,W=R.length,M=new ee(ae),q=M.d=[],a=0;k[a]==(R[a]||0);a++);if(k[a]>(R[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),R=e(R,d,l),T=k.length,W=R.length),z=T,E=R.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(Y=E[0],T!=P&&(Y=Y*l+(E[1]||0)),d=Y/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+c*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%C(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(c/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),_e(s.d,o)&&(r=!0)),i=b(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),_e(n.d,o)}return w=!0,s}function Ae(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&x(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,q=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,c=E):c=n,M.precision=c+=v,i=O(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=se(M,c+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),c-v).plus(f),M.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new M(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(M,c+2,E).times(s+""))),l=S(l,new M(g),c,1),n==null)if(x(l.d,c-v,q,u))M.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,M.precision=E,q,w=!0);else return M.precision=E,l;l=f,r+=2}}function Ve(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error(V+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?C(2,l):Q.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function $e(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Ae(i)?t?2:3:t?4:1,n;Z=Ae(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(_(i,1,$),t===void 0?t=g.rounding:_(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=Ve(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,$,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error(V+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error(V+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.d.ts deleted file mode 100644 index 8ac1efcb..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.d.ts +++ /dev/null @@ -1,3395 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: EngineConfig['accelerateUtils']; -}; - -export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare type ActiveConnectorType = Exclude; - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} ? { - [P in K]: Record; -} : {}; - -declare class AnyNull extends NullTypesEnumValue { -} - -export declare type ApplyOmit = Compute<{ - [K in keyof T as OmitValue extends true ? never : K]: T[K]; -}>; - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -export declare type Args_3 = Args; - -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time'; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = string | number | boolean | Array | Array | Array; - -export declare type BaseDMMF = { - readonly datamodel: Omit; -}; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResultData | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -export declare type ClientOptionDef = undefined | { - [K in string]: any; -}; - -export declare type ClientOtherOps = { - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $queryRawTyped(query: TypedSql): PrismaPromise; - $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $runCommandRaw(command: InputJsonObject): PrismaPromise; -}; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -export declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -export declare type ComputeDeep = T extends Function ? T : { - [K in keyof T]: ComputeDeep; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; -}; - -declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb'; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} ? C & T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -} : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -}; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -/** - * Custom fetch function for `DataProxyEngine`. - * - * We can't use the actual type of `globalThis.fetch` because this will result - * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle - * for the client runtime. We can only use such types in internal types that - * don't end up exported anywhere. - - * It's also not possible to write a definition of `fetch` that would accept the - * actual `fetch` function from different environments such as Node.js and - * Cloudflare Workers (with their extensions to `RequestInit` and `Response`). - * `fetch` is used in both covariant and contravariant positions in - * `CustomDataProxyFetch`, making it invariant, so we need the exact same type. - * Even if we removed the argument and left `fetch` in covariant position only, - * then for an extension-supplied function to be assignable to `customDataProxyFetch`, - * the platform-specific (or custom) `fetch` function needs to be assignable - * to our `fetch` definition. This, in turn, requires the third-party `Response` - * to be a subtype of our `Response` (which is not a problem, we could declare - * a minimal `Response` type that only includes what we use) *and* requires the - * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we - * have to declare all properties any `RequestInit` implementation in existence - * could possibly have), which is not possible. - * - * Since `@prisma/extension-accelerate` redefines the type of - * `__internalParams.customDataProxyFetch` to its own type anyway (probably for - * exactly this reason), our definition is never actually used and is completely - * ignored, so it doesn't matter, and we can just use `unknown` as the type of - * `fetch` here. - */ -declare type CustomDataProxyFetch = (fetch: unknown) => unknown; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection = Args extends { - omit: infer LocalOmit; -} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; - -export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; - -declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; - -declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; - -declare type DeserializedResponse = Array>; - -export declare function deserializeJsonResponse(result: unknown): unknown; - -export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; - -export declare type DevTypeMapDef = { - meta: { - modelProps: string; - }; - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; - }; - other: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; -}; - -export declare type DevTypeMapFnDef = { - args: any; - result: any; - payload: OperationPayload; -}; - -export declare namespace DMMF { - export type Document = ReadonlyDeep_2<{ - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; - }>; - export type Mappings = ReadonlyDeep_2<{ - modelOperations: ModelMapping[]; - otherOperations: { - read: string[]; - write: string[]; - }; - }>; - export type OtherOperationMappings = ReadonlyDeep_2<{ - read: string[]; - write: string[]; - }>; - export type DatamodelEnum = ReadonlyDeep_2<{ - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; - }>; - export type SchemaEnum = ReadonlyDeep_2<{ - name: string; - values: string[]; - }>; - export type EnumValue = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - }>; - export type Datamodel = ReadonlyDeep_2<{ - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - indexes: Index[]; - }>; - export type uniqueIndex = ReadonlyDeep_2<{ - name: string; - fields: string[]; - }>; - export type PrimaryKey = ReadonlyDeep_2<{ - name: string | null; - fields: string[]; - }>; - export type Model = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - schema: string | null; - fields: Field[]; - uniqueFields: string[][]; - uniqueIndexes: uniqueIndex[]; - documentation?: string; - primaryKey: PrimaryKey | null; - isGenerated?: boolean; - }>; - export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; - export type FieldNamespace = 'model' | 'prisma'; - export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; - export type Field = ReadonlyDeep_2<{ - kind: FieldKind; - name: string; - isRequired: boolean; - isList: boolean; - isUnique: boolean; - isId: boolean; - isReadOnly: boolean; - isGenerated?: boolean; - isUpdatedAt?: boolean; - /** - * Describes the data type in the same the way it is defined in the Prisma schema: - * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName - */ - type: string; - /** - * Native database type, if specified. - * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, - * `@db.Text` is encoded as `['Text', []]`. - */ - nativeType?: [string, string[]] | null; - dbName?: string | null; - hasDefaultValue: boolean; - default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; - relationFromFields?: string[]; - relationToFields?: string[]; - relationOnDelete?: string; - relationName?: string; - documentation?: string; - }>; - export type FieldDefault = ReadonlyDeep_2<{ - name: string; - args: Array; - }>; - export type FieldDefaultScalar = string | boolean | number; - export type Index = ReadonlyDeep_2<{ - model: string; - type: IndexType; - isDefinedOnField: boolean; - name?: string; - dbName?: string; - algorithm?: string; - clustered?: boolean; - fields: IndexField[]; - }>; - export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; - export type IndexField = ReadonlyDeep_2<{ - name: string; - sortOrder?: SortOrder; - length?: number; - operatorClass?: string; - }>; - export type SortOrder = 'asc' | 'desc'; - export type Schema = ReadonlyDeep_2<{ - rootQueryType?: string; - rootMutationType?: string; - inputObjectTypes: { - model?: InputType[]; - prisma: InputType[]; - }; - outputObjectTypes: { - model: OutputType[]; - prisma: OutputType[]; - }; - enumTypes: { - model?: SchemaEnum[]; - prisma: SchemaEnum[]; - }; - fieldRefTypes: { - prisma?: FieldRefType[]; - }; - }>; - export type Query = ReadonlyDeep_2<{ - name: string; - args: SchemaArg[]; - output: QueryOutput; - }>; - export type QueryOutput = ReadonlyDeep_2<{ - name: string; - isRequired: boolean; - isList: boolean; - }>; - export type TypeRef = { - isList: boolean; - type: string; - location: AllowedLocations; - namespace?: FieldNamespace; - }; - export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - export type SchemaArg = ReadonlyDeep_2<{ - name: string; - comment?: string; - isNullable: boolean; - isRequired: boolean; - inputTypes: InputTypeRef[]; - deprecation?: Deprecation; - }>; - export type OutputType = ReadonlyDeep_2<{ - name: string; - fields: SchemaField[]; - }>; - export type SchemaField = ReadonlyDeep_2<{ - name: string; - isNullable?: boolean; - outputType: OutputTypeRef; - args: SchemaArg[]; - deprecation?: Deprecation; - documentation?: string; - }>; - export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; - export type Deprecation = ReadonlyDeep_2<{ - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; - }>; - export type InputType = ReadonlyDeep_2<{ - name: string; - constraints: { - maxNumFields: number | null; - minNumFields: number | null; - fields?: string[]; - }; - meta?: { - source?: string; - }; - fields: SchemaArg[]; - }>; - export type FieldRefType = ReadonlyDeep_2<{ - name: string; - allowTypes: FieldRefAllowType[]; - fields: SchemaArg[]; - }>; - export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - export type ModelMapping = ReadonlyDeep_2<{ - model: string; - plural: string; - findUnique?: string | null; - findUniqueOrThrow?: string | null; - findFirst?: string | null; - findFirstOrThrow?: string | null; - findMany?: string | null; - create?: string | null; - createMany?: string | null; - createManyAndReturn?: string | null; - update?: string | null; - updateMany?: string | null; - updateManyAndReturn?: string | null; - upsert?: string | null; - delete?: string | null; - deleteMany?: string | null; - aggregate?: string | null; - groupBy?: string | null; - count?: string | null; - findRaw?: string | null; - aggregateRaw?: string | null; - }>; - export enum ModelAction { - findUnique = "findUnique", - findUniqueOrThrow = "findUniqueOrThrow", - findFirst = "findFirst", - findFirstOrThrow = "findFirstOrThrow", - findMany = "findMany", - create = "create", - createMany = "createMany", - createManyAndReturn = "createManyAndReturn", - update = "update", - updateMany = "updateMany", - updateManyAndReturn = "updateManyAndReturn", - upsert = "upsert", - delete = "delete", - deleteMany = "deleteMany", - groupBy = "groupBy", - count = "count",// TODO: count does not actually exist, why? - aggregate = "aggregate", - findRaw = "findRaw", - aggregateRaw = "aggregateRaw" - } -} - -export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel; - -export declare interface DriverAdapter extends Queryable { - /** - * Starts new transaction. - */ - transactionContext(): Promise>; - /** - * Optional method that returns extra connection info - */ - getConnectionInfo?(): Result_4; -} - -/** Client */ -export declare type DynamicClientExtensionArgs, ClientOptions> = { - [P in keyof C_]: unknown; -} & { - [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; - }; - }; -}; - -export declare type DynamicClientExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['client']]: Return; -} & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; -} & { - [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; -} & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; -} & { - [K: symbol]: { - types: TypeMap['other']; - }; -}; - -export declare type DynamicClientExtensionThisBuiltin, ClientOptions> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call, ClientOptions>; - $transaction

[]>(arg: [...P], options?: { - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise>; - $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { - maxWait?: number; - timeout?: number; - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise; - $disconnect(): Promise; - $connect(): Promise; -}; - -/** Model */ -export declare type DynamicModelExtensionArgs, ClientOptions> = { - [K in keyof M_]: K extends '$allModels' ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: {}; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: { - ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { - $parent: DynamicClientExtensionThis; - } & { - $name: ModelKey; - } & { - /** - * @deprecated Use `$name` instead. - */ - name: ModelKey; - }; - }; - } : never; -}; - -export declare type DynamicModelExtensionFluentApi = { - [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; -}; - -export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; - -export declare type DynamicModelExtensionFnResultBase = GetResult; - -export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; - -export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; - -export declare type DynamicModelExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; -} & { - [P in Exclude]>]: DynamicModelExtensionOperationFn; -} & { - [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; -} & { - [K: symbol]: { - types: TypeMap['model'][M]; - }; -}; - -/** Query */ -export declare type DynamicQueryExtensionArgs = { - [K in keyof Q_]: K extends '$allOperations' ? (args: { - model?: string; - operation: string; - args: any; - query: (args: any) => PrismaPromise; - }) => Promise : K extends '$allModels' ? { - [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; - } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; -}; - -export declare type DynamicQueryExtensionCb = >(args: A) => Promise; - -export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { - args: DynamicQueryExtensionCbArgsArgs; - model: _0 extends 0 ? undefined : _1; - operation: _2; - query: >(args: A) => PrismaPromise; -} : never : never) & { - query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; -}; - -export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; - -/** Result */ -export declare type DynamicResultExtensionArgs = { - [K in keyof R_]: { - [P in keyof R_[K]]?: { - needs?: DynamicResultExtensionNeeds, R_[K][P]>; - compute(data: DynamicResultExtensionData, R_[K][P]>): any; - }; - }; -}; - -export declare type DynamicResultExtensionData = GetFindResult; - -export declare type DynamicResultExtensionNeeds = { - [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; -} & { - [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; -}; - -/** - * Placeholder value for "no text". - */ -export declare const empty: Sql; - -export declare type EmptyToUnknown = T; - -declare interface Engine { - /** The name of the engine. This is meant to be consumed externally */ - readonly name: string; - onBeforeExit(callback: () => Promise): void; - start(): Promise; - stop(): Promise; - version(forceRun?: boolean): Promise | string; - request(query: JsonQuery, options: RequestOptions): Promise>; - requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; - transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; - transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - metrics(options: MetricsOptionsJson): Promise; - metrics(options: MetricsOptionsPrometheus): Promise; - applyPendingMigrations(): Promise; -} - -declare interface EngineConfig { - cwd: string; - dirname: string; - datamodelPath: string; - enableDebugLogs?: boolean; - allowTriggerPanic?: boolean; - prismaPath?: string; - generator?: GeneratorConfig; - overrideDatasources: Datasources; - showColors?: boolean; - logQueries?: boolean; - logLevel?: 'info' | 'warn'; - env: Record; - flags?: string[]; - clientVersion: string; - engineVersion: string; - previewFeatures?: string[]; - engineEndpoint?: string; - activeProvider?: string; - logEmitter: LogEmitter; - transactionOptions: Transaction_2.Options; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. - * If set, this is only used in the library engine, and all queries would be performed through it, - * rather than Prisma's Rust drivers. - * @remarks only used by LibraryEngine.ts - */ - adapter?: ErrorCapturingDriverAdapter; - /** - * The contents of the schema encoded into a string - * @remarks only used by DataProxyEngine.ts - */ - inlineSchema: string; - /** - * The contents of the datasource url saved in a string - * @remarks only used by DataProxyEngine.ts - */ - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - /** - * The string hash that was produced for a given schema - * @remarks only used by DataProxyEngine.ts - */ - inlineSchemaHash: string; - /** - * The helper for interaction with OTEL tracing - * @remarks enabling is determined by the client and @prisma/instrumentation package - */ - tracingHelper: TracingHelper; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * Web Assembly module loading configuration - */ - engineWasm?: WasmLoadingConfig; - /** - * Allows Accelerate to use runtime utilities from the client. These are - * necessary for the AccelerateEngine to function correctly. - */ - accelerateUtils?: { - resolveDatasourceUrl: typeof resolveDatasourceUrl; - getBatchRequestPayload: typeof getBatchRequestPayload; - prismaGraphQLToJSError: typeof prismaGraphQLToJSError; - PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; - PrismaClientInitializationError: typeof PrismaClientInitializationError; - PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; - debug: (...args: any[]) => void; - engineVersion: string; - clientVersion: string; - }; -} - -declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; - -declare type EngineEventType = QueryEventType | LogEventType; - -declare type EngineProtocol = 'graphql' | 'json'; - -declare type EngineSpan = { - id: EngineSpanId; - parentId: string | null; - name: string; - startTime: HrTime; - endTime: HrTime; - kind: EngineSpanKind; - attributes?: Record; - links?: EngineSpanId[]; -}; - -declare type EngineSpanId = string; - -declare type EngineSpanKind = 'client' | 'internal'; - -declare type EnvPaths = { - rootEnvPath: string | null; - schemaEnvPath: string | undefined; -}; - -declare interface EnvValue { - fromEnvVar: null | string; - value: null | string; -} - -export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; - -declare type Error_2 = { - kind: 'GenericJs'; - id: number; -} | { - kind: 'UnsupportedNativeDataType'; - type: string; -} | { - kind: 'Postgres'; - code: string; - severity: string; - message: string; - detail: string | undefined; - column: string | undefined; - hint: string | undefined; -} | { - kind: 'Mysql'; - code: number; - message: string; - state: string; -} | { - kind: 'Sqlite'; - /** - * Sqlite extended error code: https://www.sqlite.org/rescode.html - */ - extendedCode: number; - message: string; -}; - -declare interface ErrorCapturingDriverAdapter extends DriverAdapter { - readonly errorRegistry: ErrorRegistry; -} - -declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - -declare type ErrorRecord = { - error: unknown; -}; - -declare interface ErrorRegistry { - consumeError(id: number): ErrorRecord | undefined; -} - -declare interface ErrorWithBatchIndex { - batchRequestIdx?: number; -} - -declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; - -export declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -/** - * Defines Exception. - * - * string or an object with one of (message or name or code) and optional stack - */ -declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; - -declare interface ExceptionWithCode { - code: string | number; - name?: string; - message?: string; - stack?: string; -} - -declare interface ExceptionWithMessage { - code?: string | number; - message: string; - name?: string; - stack?: string; -} - -declare interface ExceptionWithName { - code?: string | number; - message?: string; - name: string; - stack?: string; -} - -declare type ExtendedEventType = LogLevel | 'beforeExit'; - -declare type ExtendedSpanOptions = SpanOptions & { - /** The name of the span */ - name: string; - internal?: boolean; - middleware?: boolean; - /** Whether it propagates context (?=true) */ - active?: boolean; - /** The context to append the span to */ - context?: Context; -}; - -/** $extends, defineExtension */ -export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call, ClientOptions = {}> { - extArgs: ExtArgs; - , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { - $extends: { - extArgs: Args; - }; - }) | { - name?: string; - query?: DynamicQueryExtensionArgs; - result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; - }): { - extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs, ClientOptions>; - define: (client: any) => { - $extends: { - extArgs: Args; - }; - }; - }[Variant]; -} - -export declare type ExtensionArgs = Optional; - -declare namespace Extensions { - export { - defineExtension, - getExtensionContext - } -} -export { Extensions } - -declare namespace Extensions_2 { - export { - InternalArgs, - DefaultArgs, - GetPayloadResultExtensionKeys, - GetPayloadResultExtensionObject, - GetPayloadResult, - GetSelect, - GetOmit, - DynamicQueryExtensionArgs, - DynamicQueryExtensionCb, - DynamicQueryExtensionCbArgs, - DynamicQueryExtensionCbArgsArgs, - DynamicResultExtensionArgs, - DynamicResultExtensionNeeds, - DynamicResultExtensionData, - DynamicModelExtensionArgs, - DynamicModelExtensionThis, - DynamicModelExtensionOperationFn, - DynamicModelExtensionFnResult, - DynamicModelExtensionFnResultBase, - DynamicModelExtensionFluentApi, - DynamicModelExtensionFnResultNull, - DynamicClientExtensionArgs, - DynamicClientExtensionThis, - ClientBuiltInProp, - DynamicClientExtensionThisBuiltin, - ExtendsHook, - MergeExtArgs, - AllModelsToStringIndex, - TypeMapDef, - DevTypeMapDef, - DevTypeMapFnDef, - ClientOptionDef, - ClientOtherOps, - TypeMapCbDef, - ModelKey, - RequiredExtensionArgs as UserArgs - } -} - -export declare type ExtractGlobalOmit = Options extends { - omit: { - [K in ModelName]: infer GlobalOmit; - }; -} ? GlobalOmit : {}; - -/** - * A reference to a specific field of a specific model - */ -export declare interface FieldRef { - readonly modelName: Model; - readonly name: string; - readonly typeName: FieldType; - readonly isList: boolean; -} - -export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; - -export declare interface Fn { - params: Params; - returns: Returns; -} - -declare interface GeneratorConfig { - name: string; - output: EnvValue | null; - isCustomOutput?: boolean; - provider: EnvValue; - config: { - /** `output` is a reserved name and will only be available directly at `generator.output` */ - output?: never; - /** `provider` is a reserved name and will only be available directly at `generator.provider` */ - provider?: never; - /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ - binaryTargets?: never; - /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ - previewFeatures?: never; - } & { - [key: string]: string | string[] | undefined; - }; - binaryTargets: BinaryTargetsEnvValue[]; - previewFeatures: string[]; - envPaths?: EnvPaths; - sourceFilePath: string; -} - -export declare type GetAggregateResult

= { - [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { - [J in keyof A[K] & string]: P['scalars'][J] | null; - }; -}; - -declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; - -export declare type GetBatchResult = { - count: number; -}; - -export declare type GetCountResult = A extends { - select: infer S; -} ? (S extends true ? number : Count) : number; - -declare function getExtensionContext(that: T): Context_2; - -export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { - select: infer S extends object; -} & Record | { - include: infer I extends object; -} & Record ? { - [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { - scalars: { - [k in K]: infer O; - }; - } ? O : K extends '_count' ? Count : never; -} & (A extends { - include: any; -} & Record ? DefaultSelection : unknown) : DefaultSelection; - -export declare type GetGroupByResult

= A extends { - by: string[]; -} ? Array & { - [K in A['by'][number]]: P['scalars'][K]; -}> : A extends { - by: string; -} ? Array & { - [K in A['by']]: P['scalars'][K]; -}> : {}[]; - -export declare type GetOmit = { - [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; -}; - -export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; - -export declare type GetPayloadResultExtensionKeys = KR; - -export declare type GetPayloadResultExtensionObject = { - [K in GetPayloadResultExtensionKeys]: R[K] extends () => { - compute: (...args: any) => infer C; - } ? C : never; -}; - -export declare function getPrismaClient(config: GetPrismaClientConfig): { - new (optionsArg?: PrismaClientOptions): { - _originalClient: any; - _runtimeDataModel: RuntimeDataModel; - _requestHandler: RequestHandler; - _connectionPromise?: Promise | undefined; - _disconnectionPromise?: Promise | undefined; - _engineConfig: EngineConfig; - _accelerateEngineConfig: AccelerateEngineConfig; - _clientVersion: string; - _errorFormat: ErrorFormat; - _tracingHelper: TracingHelper; - _metrics: MetricsClient; - _middlewares: MiddlewareHandler; - _previewFeatures: string[]; - _activeProvider: string; - _globalOmit?: GlobalOmitOptions | undefined; - _extensions: MergedExtensionsList; - _engine: Engine; - /** - * A fully constructed/applied Client that references the parent - * PrismaClient. This is used for Client extensions only. - */ - _appliedParent: any; - _createPrismaPromise: PrismaPromiseFactory; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(middleware: QueryMiddleware): void; - $on(eventType: E, callback: EventCallback): void; - $connect(): Promise; - /** - * Disconnect from the database - */ - $disconnect(): Promise; - /** - * Executes a raw query and always returns a number - */ - $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Executes a raw command only for MongoDB - * - * @param command - * @returns - */ - $runCommandRaw(command: Record): PrismaPromise_2; - /** - * Executes a raw query and returns selected data - */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Counterpart to $queryRaw, that returns strongly typed results - * @param typedSql - */ - $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; - /** - * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Execute a batch of requests in a transaction - * @param requests - * @param options - */ - _transactionWithArray({ promises, options, }: { - promises: Array>; - options?: BatchTransactionOptions; - }): Promise; - /** - * Perform a long-running transaction - * @param callback - * @param options - * @returns - */ - _transactionWithCallback({ callback, options, }: { - callback: (client: Client) => Promise; - options?: Options; - }): Promise; - _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; - /** - * Execute queries within a transaction - * @param input a callback or a query list - * @param options to set timeouts (callback) - * @returns - */ - $transaction(input: any, options?: any): Promise; - /** - * Runs the middlewares over params before executing a request - * @param internalParams - * @returns - */ - _request(internalParams: InternalRequestParams): Promise; - _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; - readonly $metrics: MetricsClient; - /** - * Shortcut for checking a preview flag - * @param feature preview flag - * @returns - */ - _hasPreviewFlag(feature: string): boolean; - $applyPendingMigrations(): Promise; - $extends: typeof $extends; - readonly [Symbol.toStringTag]: string; - }; -}; - -/** - * Config that is stored into the generated client. When the generated client is - * loaded, this same config is passed to {@link getPrismaClient} which creates a - * closure with that config around a non-instantiated [[PrismaClient]]. - */ -declare type GetPrismaClientConfig = { - runtimeDataModel: RuntimeDataModel; - generator?: GeneratorConfig; - relativeEnvPaths: { - rootEnvPath?: string | null; - schemaEnvPath?: string | null; - }; - relativePath: string; - dirname: string; - filename?: string; - clientVersion: string; - engineVersion: string; - datasourceNames: string[]; - activeProvider: ActiveConnectorType; - /** - * The contents of the schema encoded into a string - * @remarks only used for the purpose of data proxy - */ - inlineSchema: string; - /** - * A special env object just for the data proxy edge runtime. - * Allows bundlers to inject their own env variables (Vercel). - * Allows platforms to declare global variables as env (Workers). - * @remarks only used for the purpose of data proxy - */ - injectableEdgeEnv?: () => LoadedEnv; - /** - * The contents of the datasource url saved in a string. - * This can either be an env var name or connection string. - * It is needed by the client to connect to the Data Proxy. - * @remarks only used for the purpose of data proxy - */ - inlineDatasources: { - [name in string]: { - url: EnvValue; - }; - }; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash: string; - /** - * A marker to indicate that the client was not generated via `prisma - * generate` but was generated via `generate --postinstall` script instead. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - postinstall?: boolean; - /** - * Information about the CI where the Prisma Client has been generated. The - * name of the CI environment is stored at generation time because CI - * information is not always available at runtime. Moreover, the edge client - * has no notion of environment variables, so this works around that. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - ciName?: string; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * A boolean that is `false` when the client was generated with --no-engine. At - * runtime, this means the client will be bound to be using the Data Proxy. - */ - copyEngine?: boolean; - /** - * Optional wasm loading configuration - */ - engineWasm?: WasmLoadingConfig; -}; - -export declare type GetResult = { - findUnique: GetFindResult | null; - findUniqueOrThrow: GetFindResult; - findFirst: GetFindResult | null; - findFirstOrThrow: GetFindResult; - findMany: GetFindResult[]; - create: GetFindResult; - createMany: GetBatchResult; - createManyAndReturn: GetFindResult[]; - update: GetFindResult; - updateMany: GetBatchResult; - updateManyAndReturn: GetFindResult[]; - upsert: GetFindResult; - delete: GetFindResult; - deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; - $queryRaw: unknown; - $queryRawTyped: unknown; - $executeRaw: number; - $queryRawUnsafe: unknown; - $executeRawUnsafe: number; - $runCommandRaw: JsonObject; - findRaw: JsonObject; - aggregateRaw: JsonObject; -}[OperationName]; - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { - [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; -}; - -declare type GlobalOmitOptions = { - [modelName: string]: { - [fieldName: string]: boolean; - }; -}; - -declare type HandleErrorParams = { - args: JsArgs; - error: any; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - modelName?: string; - globalOmit?: GlobalOmitOptions; -}; - -declare type HrTime = [number, number]; - -/** - * Defines High-Resolution Time. - * - * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - */ -declare type HrTime_2 = [number, number]; - -/** - * Matches a JSON array. - * Unlike \`JsonArray\`, readonly arrays are assignable to this type. - */ -export declare interface InputJsonArray extends ReadonlyArray { -} - -/** - * Matches a JSON object. - * Unlike \`JsonObject\`, this type allows undefined and read-only properties. - */ -export declare type InputJsonObject = { - readonly [Key in string]?: InputJsonValue | null; -}; - -/** - * Matches any valid value that can be used as an input for operations like - * create and update as the value of a JSON field. Unlike \`JsonValue\`, this - * type allows read-only arrays and read-only object properties and disallows - * \`null\` at the top level. - * - * \`null\` cannot be used as the value of a JSON field because its meaning - * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or - * \`Prisma.DbNull\` to clear the JSON value and set the field to the database - * NULL value instead. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values - */ -export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { - toJSON(): unknown; -}; - -declare type InteractiveTransactionInfo = { - /** - * Transaction ID returned by the query engine. - */ - id: string; - /** - * Arbitrary payload the meaning of which depends on the `Engine` implementation. - * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. - * In `LibraryEngine` and `BinaryEngine` it is currently not used. - */ - payload: Payload; -}; - -declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; - -export declare type InternalArgs = { - result: { - [K in keyof R]: { - [P in keyof R[K]]: () => R[K][P]; - }; - }; - model: { - [K in keyof M]: { - [P in keyof M[K]]: () => M[K][P]; - }; - }; - query: { - [K in keyof Q]: { - [P in keyof Q[K]]: () => Q[K][P]; - }; - }; - client: { - [K in keyof C]: () => C[K]; - }; -}; - -declare type InternalRequestParams = { - /** - * The original client method being called. - * Even though the rootField / operation can be changed, - * this method stays as it is, as it's what the user's - * code looks like - */ - clientMethod: string; - /** - * Name of js model that triggered the request. Might be used - * for warnings or error messages - */ - jsModelName?: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - unpacker?: Unpacker; - otelParentCtx?: Context; - /** Used to "desugar" a user input into an "expanded" one */ - argsMapper?: (args?: UserArgs_2) => UserArgs_2; - /** Used to convert args for middleware and back */ - middlewareArgsMapper?: MiddlewareArgsMapper; - /** Used for Accelerate client extension via Data Proxy */ - customDataProxyFetch?: CustomDataProxyFetch; -} & Omit; - -declare enum IsolationLevel { - ReadUncommitted = "ReadUncommitted", - ReadCommitted = "ReadCommitted", - RepeatableRead = "RepeatableRead", - Snapshot = "Snapshot", - Serializable = "Serializable" -} - -declare function isSkip(value: unknown): value is Skip; - -export declare function isTypedSql(value: unknown): value is UnknownTypedSql; - -export declare type ITXClientDenyList = (typeof denylist)[number]; - -export declare const itxClientDenyList: readonly (string | symbol)[]; - -declare interface Job { - resolve: (data: any) => void; - reject: (data: any) => void; - request: any; -} - -/** - * Create a SQL query for a list of values. - */ -export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; - -export declare type JsArgs = { - select?: Selection_2; - include?: Selection_2; - omit?: Omission; - [argName: string]: JsInputValue; -}; - -export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { - [key: string]: JsInputValue; -}; - -declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { - [key: string]: JsonArgumentValue; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ -export declare interface JsonArray extends Array { -} - -export declare type JsonBatchQuery = { - batch: JsonQuery[]; - transaction?: { - isolationLevel?: Transaction_2.IsolationLevel; - }; -}; - -export declare interface JsonConvertible { - toJSON(): unknown; -} - -declare type JsonFieldSelection = { - arguments?: Record | RawTaggedValue; - selection: JsonSelectionSet; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. - */ -export declare type JsonObject = { - [Key in string]?: JsonValue; -}; - -export declare type JsonQuery = { - modelName?: string; - action: JsonQueryAction; - query: JsonFieldSelection; -}; - -declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; - -declare type JsonSelectionSet = { - $scalars?: boolean; - $composites?: boolean; -} & { - [fieldName: string]: boolean | JsonFieldSelection; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ -export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; - -export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { - [key: string]: JsOutputValue; -}; - -export declare type JsPromise = Promise & {}; - -declare type KnownErrorParams = { - code: string; - clientVersion: string; - meta?: Record; - batchRequestIdx?: number; -}; - -/** - * A pointer from the current {@link Span} to another span in the same trace or - * in a different trace. - * Few examples of Link usage. - * 1. Batch Processing: A batch of elements may contain elements associated - * with one or more traces/spans. Since there can only be one parent - * SpanContext, Link is used to keep reference to SpanContext of all - * elements in the batch. - * 2. Public Endpoint: A SpanContext in incoming client request on a public - * endpoint is untrusted from service provider perspective. In such case it - * is advisable to start a new trace with appropriate sampling decision. - * However, it is desirable to associate incoming SpanContext to new trace - * initiated on service provider side so two traces (from Client and from - * Service Provider) can be correlated. - */ -declare interface Link { - /** The {@link SpanContext} of a linked span. */ - context: SpanContext; - /** A set of {@link SpanAttributes} on the link. */ - attributes?: SpanAttributes; - /** Count of attributes of the link that were dropped due to collection limits */ - droppedAttributesCount?: number; -} - -declare type LoadedEnv = { - message?: string; - parsed: { - [x: string]: string; - }; -} | undefined; - -declare type LocationInFile = { - fileName: string; - lineNumber: number | null; - columnNumber: number | null; -}; - -declare type LogDefinition = { - level: LogLevel; - emit: 'stdout' | 'event'; -}; - -/** - * Typings for the events we emit. - * - * @remarks - * If this is updated, our edge runtime shim needs to be updated as well. - */ -declare type LogEmitter = { - on(event: E, listener: (event: EngineEvent) => void): LogEmitter; - emit(event: QueryEventType, payload: QueryEvent): boolean; - emit(event: LogEventType, payload: LogEvent): boolean; -}; - -declare type LogEvent = { - timestamp: Date; - message: string; - target: string; -}; - -declare type LogEventType = 'info' | 'warn' | 'error'; - -declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; - -/** - * Class that holds the list of all extensions, applied to particular instance, - * as well as resolved versions of the components that need to apply on - * different levels. Main idea of this class: avoid re-resolving as much of the - * stuff as possible when new extensions are added while also delaying the - * resolve until the point it is actually needed. For example, computed fields - * of the model won't be resolved unless the model is actually queried. Neither - * adding extensions with `client` component only cause other components to - * recompute. - */ -declare class MergedExtensionsList { - private head?; - private constructor(); - static empty(): MergedExtensionsList; - static single(extension: ExtensionArgs): MergedExtensionsList; - isEmpty(): boolean; - append(extension: ExtensionArgs): MergedExtensionsList; - getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; - getAllClientExtensions(): ClientArg | undefined; - getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; - getAllQueryCallbacks(jsModelName: string, operation: string): any; - getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; -} - -export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; - -export declare type Metric = { - key: string; - value: T; - labels: Record; - description: string; -}; - -export declare type MetricHistogram = { - buckets: MetricHistogramBucket[]; - sum: number; - count: number; -}; - -export declare type MetricHistogramBucket = [maxValue: number, count: number]; - -export declare type Metrics = { - counters: Metric[]; - gauges: Metric[]; - histograms: Metric[]; -}; - -export declare class MetricsClient { - private _engine; - constructor(engine: Engine); - /** - * Returns all metrics gathered up to this point in prometheus format. - * Result of this call can be exposed directly to prometheus scraping endpoint - * - * @param options - * @returns - */ - prometheus(options?: MetricsOptions): Promise; - /** - * Returns all metrics gathered up to this point in prometheus format. - * - * @param options - * @returns - */ - json(options?: MetricsOptions): Promise; -} - -declare type MetricsOptions = { - /** - * Labels to add to every metrics in key-value format - */ - globalLabels?: Record; -}; - -declare type MetricsOptionsCommon = { - globalLabels?: Record; -}; - -declare type MetricsOptionsJson = { - format: 'json'; -} & MetricsOptionsCommon; - -declare type MetricsOptionsPrometheus = { - format: 'prometheus'; -} & MetricsOptionsCommon; - -declare type MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; - middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; -}; - -declare class MiddlewareHandler { - private _middlewares; - use(middleware: M): void; - get(id: number): M | undefined; - has(id: number): boolean; - length(): number; -} - -export declare type ModelArg = { - [MethodName in string]: unknown; -}; - -export declare type ModelArgs = { - model: { - [ModelName in string]: ModelArg; - }; -}; - -export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; - -export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; - -export declare type ModelQueryOptionsCbArgs = { - model: string; - operation: string; - args: JsArgs; - query: (args: JsArgs) => Promise; -}; - -export declare type NameArgs = { - name?: string; -}; - -export declare type Narrow = { - [K in keyof A]: A[K] extends Function ? A[K] : Narrow; -} | (A extends Narrowable ? A : never); - -export declare type Narrowable = string | number | bigint | boolean | []; - -export declare type NeverToUnknown = [T] extends [never] ? unknown : T; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * List of Prisma enums that must use unique objects instead of strings as their values. - */ -export declare const objectEnumNames: string[]; - -/** - * Base class for unique values of object-valued enums. - */ -export declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; - -export declare type Omission = Record; - -declare type Omit_2 = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; -export { Omit_2 as Omit } - -export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; - -export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -export declare type OperationPayload = { - name: string; - scalars: { - [ScalarName in string]: unknown; - }; - objects: { - [ObjectName in string]: unknown; - }; - composites: { - [CompositeName in string]: unknown; - }; -}; - -export declare type Optional = { - [P in K & keyof O]?: O[P]; -} & { - [P in Exclude]: O[P]; -}; - -export declare type OptionalFlat = { - [K in keyof T]?: T[K]; -}; - -export declare type OptionalKeys = { - [K in keyof O]-?: {} extends Pick_2 ? K : never; -}[keyof O]; - -declare type Options = { - maxWait?: number; - timeout?: number; - isolationLevel?: IsolationLevel; -}; - -declare type Options_2 = { - clientVersion: string; -}; - -export declare type Or = { - 0: { - 0: 0; - 1: 1; - }; - 1: { - 0: 1; - 1: 1; - }; -}[A][B]; - -export declare type PatchFlat = O1 & Omit_2; - -export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; - -export declare type Payload = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? T[symbol]['types']['payload'] : any; - -export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { - [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; -}; - -declare type Pick_2 = { - [P in keyof T as P extends K ? P : never]: T[P]; -}; -export { Pick_2 as Pick } - -export declare class PrismaClientInitializationError extends Error { - clientVersion: string; - errorCode?: string; - retryable?: boolean; - constructor(message: string, clientVersion: string, errorCode?: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { - code: string; - meta?: Record; - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare type PrismaClientOptions = { - /** - * Overwrites the primary datasource url from your schema.prisma file - */ - datasourceUrl?: string; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. - */ - adapter?: DriverAdapter | null; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * The default values for Transaction options - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: Transaction_2.Options; - /** - * @example - * \`\`\` - * // Defaults to stdout - * log: ['query', 'info', 'warn'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * ] - * \`\`\` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: Array; - omit?: GlobalOmitOptions; - /** - * @internal - * You probably don't want to use this. \`__internal\` is used by internal tooling. - */ - __internal?: { - debug?: boolean; - engine?: { - cwd?: string; - binaryPath?: string; - endpoint?: string; - allowTriggerPanic?: boolean; - }; - /** This can be used for testing purposes */ - configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; - }; -}; - -export declare class PrismaClientRustPanicError extends Error { - clientVersion: string; - constructor(message: string, clientVersion: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientValidationError extends Error { - name: string; - clientVersion: string; - constructor(message: string, { clientVersion }: Options_2); - get [Symbol.toStringTag](): string; -} - -declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; - -export declare interface PrismaPromise extends Promise { - [Symbol.toStringTag]: 'PrismaPromise'; -} - -/** - * Prisma's `Promise` that is backwards-compatible. All additions on top of the - * original `Promise` are optional so that it can be backwards-compatible. - * @see [[createPrismaPromise]] - */ -declare interface PrismaPromise_2 extends Promise { - /** - * Extension of the original `.then` function - * @param onfulfilled same as regular promises - * @param onrejected same as regular promises - * @param transaction transaction options - */ - then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.catch` function - * @param onrejected same as regular promises - * @param transaction transaction options - */ - catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.finally` function - * @param onfinally same as regular promises - * @param transaction transaction options - */ - finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Called when executing a batch of regular tx - * @param transaction transaction options for batch tx - */ - requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; -} - -declare type PrismaPromiseBatchTransaction = { - kind: 'batch'; - id: number; - isolationLevel?: IsolationLevel; - index: number; - lock: PromiseLike; -}; - -declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; - -/** - * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which - * is essentially a proxy for `Promise`. All the transaction-compatible client - * methods return one, this allows for pre-preparing queries without executing - * them until `.then` is called. It's the foundation of Prisma's query batching. - * @param callback that will be wrapped within our promise implementation - * @see [[PrismaPromise]] - * @returns - */ -declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; - -declare type PrismaPromiseInteractiveTransaction = { - kind: 'itx'; - id: string; - payload: PayloadType; -}; - -declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; - -export declare const PrivateResultType: unique symbol; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare namespace Public_2 { - export { - Args, - Result, - Payload, - PrismaPromise, - Operation, - Exact - } -} - -declare type Query = { - sql: string; - args: Array; - argTypes: Array; -}; - -declare interface Queryable { - readonly provider: 'mysql' | 'postgres' | 'sqlite'; - readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the type-aware result set of the query. - * - * This is the preferred way of executing `SELECT` queries. - */ - queryRaw(params: Query): Promise>; - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the number of affected rows. - * - * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, - * as well as transactional queries. - */ - executeRaw(params: Query): Promise>; -} - -declare type QueryEngineBatchGraphQLRequest = { - batch: QueryEngineRequest[]; - transaction?: boolean; - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; - -declare type QueryEngineConfig = { - datamodel: string; - configDir: string; - logQueries: boolean; - ignoreEnvVarErrors: boolean; - datasourceOverrides: Record; - env: Record; - logLevel: QueryEngineLogLevel; - engineProtocol: EngineProtocol; - enableTracing: boolean; -}; - -declare interface QueryEngineConstructor { - new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; -} - -declare type QueryEngineInstance = { - connect(headers: string, requestId: string): Promise; - disconnect(headers: string, requestId: string): Promise; - /** - * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` - * @param headersStr JSON.stringified `QueryEngineRequestHeaders` - */ - query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; - sdlSchema?(): Promise; - startTransaction(options: string, traceHeaders: string, requestId: string): Promise; - commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; - rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; - metrics?(options: string): Promise; - applyPendingMigrations?(): Promise; - trace(requestId: string): Promise; -}; - -declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; - -declare type QueryEngineRequest = { - query: string; - variables: Object; -}; - -declare type QueryEngineResultData = { - data: T; -}; - -declare type QueryEvent = { - timestamp: Date; - query: string; - params: string; - duration: number; - target: string; -}; - -declare type QueryEventType = 'query'; - -declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; - -declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; - -declare type QueryMiddlewareParams = { - /** The model this is executed on */ - model?: string; - /** The action that is being handled */ - action: Action; - /** TODO what is this */ - dataPath: string[]; - /** TODO what is this */ - runInTransaction: boolean; - args?: UserArgs_2; -}; - -export declare type QueryOptions = { - query: { - [ModelName in string]: { - [ModelAction in string]: ModelQueryOptionsCb; - } | QueryOptionsCb; - }; -}; - -export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; - -export declare type QueryOptionsCbArgs = { - model?: string; - operation: string; - args: JsArgs | RawQueryArgs; - query: (args: JsArgs | RawQueryArgs) => Promise; -}; - -/** - * Create raw SQL statement. - */ -export declare function raw(value: string): Sql; - -export declare type RawParameters = { - __prismaRawParameters__: true; - values: string; -}; - -export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; - -declare type RawResponse = { - columns: string[]; - types: QueryIntrospectionBuiltinType[]; - rows: unknown[][]; -}; - -declare type RawTaggedValue = { - $type: 'Raw'; - value: unknown; -}; - -/** - * Supported value or SQL instance. - */ -export declare type RawValue = Value | Sql; - -export declare type ReadonlyDeep = { - readonly [K in keyof T]: ReadonlyDeep; -}; - -declare type ReadonlyDeep_2 = { - +readonly [K in keyof O]: ReadonlyDeep_2; -}; - -declare type Record_2 = { - [P in T]: U; -}; -export { Record_2 as Record } - -export declare type RenameAndNestPayloadKeys

= { - [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; -}; - -declare type RequestBatchOptions = { - transaction?: TransactionOptions_2; - traceparent?: string; - numTry?: number; - containsWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare interface RequestError { - error: string; - user_facing_error: { - is_panic: boolean; - message: string; - meta?: Record; - error_code?: string; - batch_request_idx?: number; - }; -} - -declare class RequestHandler { - client: Client; - dataloader: DataLoader; - private logEmitter?; - constructor(client: Client, logEmitter?: LogEmitter); - request(params: RequestParams): Promise; - mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; - /** - * Handles the error and logs it, logging the error is done synchronously waiting for the event - * handlers to finish. - */ - handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; - sanitizeMessage(message: any): any; - unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; - get [Symbol.toStringTag](): string; -} - -declare type RequestOptions = { - traceparent?: string; - numTry?: number; - interactiveTransaction?: InteractiveTransactionOptions; - isWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequestParams = { - modelName?: string; - action: Action; - protocolQuery: JsonQuery; - dataPath: string[]; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - extensions: MergedExtensionsList; - args?: any; - headers?: Record; - unpacker?: Unpacker; - otelParentCtx?: Context; - otelChildCtx?: Context; - globalOmit?: GlobalOmitOptions; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; -export { RequiredExtensionArgs } -export { RequiredExtensionArgs as UserArgs } - -export declare type RequiredKeys = { - [K in keyof O]-?: {} extends Pick_2 ? never : K; -}[keyof O]; - -declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - overrideDatasources: Datasources; - env: Record; - clientVersion: string; -}): string; - -export declare type Result = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? GetResult : GetResult<{ - composites: {}; - objects: {}; - scalars: {}; - name: ''; -}, {}, F>; - -export declare type Result_2 = Result; - -declare namespace Result_3 { - export { - Operation, - FluentOperation, - Count, - GetFindResult, - SelectablePayloadFields, - SelectField, - DefaultSelection, - UnwrapPayload, - ApplyOmit, - OmitValue, - GetCountResult, - Aggregate, - GetAggregateResult, - GetBatchResult, - GetGroupByResult, - GetResult, - ExtractGlobalOmit - } -} - -declare type Result_4 = { - map(fn: (value: T) => U): Result_4; - flatMap(fn: (value: T) => Result_4): Result_4; -} & ({ - readonly ok: true; - readonly value: T; -} | { - readonly ok: false; - readonly error: Error_2; -}); - -export declare type ResultArg = { - [FieldName in string]: ResultFieldDefinition; -}; - -export declare type ResultArgs = { - result: { - [ModelName in string]: ResultArg; - }; -}; - -export declare type ResultArgsFieldCompute = (model: any) => unknown; - -export declare type ResultFieldDefinition = { - needs?: { - [FieldName in string]: boolean; - }; - compute: ResultArgsFieldCompute; -}; - -declare interface ResultSet { - /** - * List of column types appearing in a database query, in the same order as `columnNames`. - * They are used within the Query Engine to convert values from JS to Quaint values. - */ - columnTypes: Array; - /** - * List of column names appearing in a database query, in the same order as `columnTypes`. - */ - columnNames: Array; - /** - * List of rows retrieved from a database query. - * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. - */ - rows: Array>; - /** - * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. - */ - lastInsertId?: string; -} - -export declare type Return = T extends (...args: any[]) => infer R ? R : T; - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -export declare type RuntimeDataModel = { - readonly models: Record; - readonly enums: Record; - readonly types: Record; -}; - -declare type RuntimeEnum = Omit; - -declare type RuntimeModel = Omit; - -export declare type Select = T extends U ? T : never; - -export declare type SelectablePayloadFields = { - objects: { - [k in K]: O; - }; -} | { - composites: { - [k in K]: O; - }; -}; - -export declare type SelectField

, K extends PropertyKey> = P extends { - objects: Record; -} ? P['objects'][K] : P extends { - composites: Record; -} ? P['composites'][K] : never; - -declare type Selection_2 = Record; -export { Selection_2 as Selection } - -export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; - -declare type SerializeParams = { - runtimeDataModel: RuntimeDataModel; - modelName?: string; - action: Action; - args?: JsArgs; - extensions?: MergedExtensionsList; - callsite?: CallSite; - clientMethod: string; - clientVersion: string; - errorFormat: ErrorFormat; - previewFeatures: string[]; - globalOmit?: GlobalOmitOptions; -}; - -declare class Skip { - constructor(param?: symbol); - ifUndefined(value: T | undefined): T | Skip; -} - -export declare const skip: Skip; - -/** - * An interface that represents a span. A span represents a single operation - * within a trace. Examples of span might include remote procedure calls or a - * in-process function calls to sub-components. A Trace has a single, top-level - * "root" Span that in turn may have zero or more child Spans, which in turn - * may have children. - * - * Spans are created by the {@link Tracer.startSpan} method. - */ -declare interface Span { - /** - * Returns the {@link SpanContext} object associated with this Span. - * - * Get an immutable, serializable identifier for this span that can be used - * to create new child spans. Returned SpanContext is usable even after the - * span ends. - * - * @returns the SpanContext object associated with this Span. - */ - spanContext(): SpanContext; - /** - * Sets an attribute to the span. - * - * Sets a single Attribute with the key and value passed as arguments. - * - * @param key the key for this attribute. - * @param value the value for this attribute. Setting a value null or - * undefined is invalid and will result in undefined behavior. - */ - setAttribute(key: string, value: SpanAttributeValue): this; - /** - * Sets attributes to the span. - * - * @param attributes the attributes that will be added. - * null or undefined attribute values - * are invalid and will result in undefined behavior. - */ - setAttributes(attributes: SpanAttributes): this; - /** - * Adds an event to the Span. - * - * @param name the name of the event. - * @param [attributesOrStartTime] the attributes that will be added; these are - * associated with this event. Can be also a start time - * if type is {@type TimeInput} and 3rd param is undefined - * @param [startTime] start time of the event. - */ - addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; - /** - * Adds a single link to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param link the link to add. - */ - addLink(link: Link): this; - /** - * Adds multiple links to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param links the links to add. - */ - addLinks(links: Link[]): this; - /** - * Sets a status to the span. If used, this will override the default Span - * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value - * of previous calls to SetStatus on the Span. - * - * @param status the SpanStatus to set. - */ - setStatus(status: SpanStatus): this; - /** - * Updates the Span name. - * - * This will override the name provided via {@link Tracer.startSpan}. - * - * Upon this update, any sampling behavior based on Span name will depend on - * the implementation. - * - * @param name the Span name. - */ - updateName(name: string): this; - /** - * Marks the end of Span execution. - * - * Call to End of a Span MUST not have any effects on child spans. Those may - * still be running and can be ended later. - * - * Do not return `this`. The Span generally should not be used after it - * is ended so chaining is not desired in this context. - * - * @param [endTime] the time to set as Span's end time. If not provided, - * use the current time as the span's end time. - */ - end(endTime?: TimeInput): void; - /** - * Returns the flag whether this span will be recorded. - * - * @returns true if this Span is active and recording information like events - * with the `AddEvent` operation and attributes using `setAttributes`. - */ - isRecording(): boolean; - /** - * Sets exception as a span event - * @param exception the exception the only accepted values are string or Error - * @param [time] the time to set as Span's event time. If not provided, - * use the current time. - */ - recordException(exception: Exception, time?: TimeInput): void; -} - -/** - * @deprecated please use {@link Attributes} - */ -declare type SpanAttributes = Attributes; - -/** - * @deprecated please use {@link AttributeValue} - */ -declare type SpanAttributeValue = AttributeValue; - -declare type SpanCallback = (span?: Span, context?: Context) => R; - -/** - * A SpanContext represents the portion of a {@link Span} which must be - * serialized and propagated along side of a {@link Baggage}. - */ -declare interface SpanContext { - /** - * The ID of the trace that this span belongs to. It is worldwide unique - * with practically sufficient probability by being made as 16 randomly - * generated bytes, encoded as a 32 lowercase hex characters corresponding to - * 128 bits. - */ - traceId: string; - /** - * The ID of the Span. It is globally unique with practically sufficient - * probability by being made as 8 randomly generated bytes, encoded as a 16 - * lowercase hex characters corresponding to 64 bits. - */ - spanId: string; - /** - * Only true if the SpanContext was propagated from a remote parent. - */ - isRemote?: boolean; - /** - * Trace flags to propagate. - * - * It is represented as 1 byte (bitmap). Bit to represent whether trace is - * sampled or not. When set, the least significant bit documents that the - * caller may have recorded trace data. A caller who does not record trace - * data out-of-band leaves this flag unset. - * - * see {@link TraceFlags} for valid flag values. - */ - traceFlags: number; - /** - * Tracing-system-specific info to propagate. - * - * The tracestate field value is a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * More Info: https://www.w3.org/TR/trace-context/#tracestate-field - * - * Examples: - * Single tracing system (generic format): - * tracestate: rojo=00f067aa0ba902b7 - * Multiple tracing systems (with different formatting): - * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE - */ - traceState?: TraceState; -} - -declare enum SpanKind { - /** Default value. Indicates that the span is used internally. */ - INTERNAL = 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER = 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT = 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER = 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER = 4 -} - -/** - * Options needed for span creation - */ -declare interface SpanOptions { - /** - * The SpanKind of a span - * @default {@link SpanKind.INTERNAL} - */ - kind?: SpanKind; - /** A span's attributes */ - attributes?: SpanAttributes; - /** {@link Link}s span to other spans */ - links?: Link[]; - /** A manually specified start time for the created `Span` object. */ - startTime?: TimeInput; - /** The new span should be a root span. (Ignore parent from context). */ - root?: boolean; -} - -declare interface SpanStatus { - /** The status code of this message. */ - code: SpanStatusCode; - /** A developer-facing error message. */ - message?: string; -} - -/** - * An enumeration of status codes. - */ -declare enum SpanStatusCode { - /** - * The default status. - */ - UNSET = 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK = 1, - /** - * The operation contains an error. - */ - ERROR = 2 -} - -/** - * A SQL instance can be nested within each other to build SQL strings. - */ -export declare class Sql { - readonly values: Value[]; - readonly strings: string[]; - constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get sql(): string; - get statement(): string; - get text(): string; - inspect(): { - sql: string; - statement: string; - text: string; - values: unknown[]; - }; -} - -/** - * Create a SQL object from a template string. - */ -export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; - -/** - * Defines TimeInput. - * - * hrtime, epoch milliseconds, performance.now() or Date - */ -declare type TimeInput = HrTime_2 | number | Date; - -export declare type ToTuple = T extends any[] ? T : [T]; - -declare interface TraceState { - /** - * Create a new TraceState which inherits from this TraceState and has the - * given key set. - * The new entry will always be added in the front of the list of states. - * - * @param key key of the TraceState entry. - * @param value value of the TraceState entry. - */ - set(key: string, value: string): TraceState; - /** - * Return a new TraceState which inherits from this TraceState but does not - * contain the given key. - * - * @param key the key for the TraceState entry to be removed. - */ - unset(key: string): TraceState; - /** - * Returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - * - * @param key with which the specified value is to be associated. - * @returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - */ - get(key: string): string | undefined; - /** - * Serializes the TraceState to a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * - * @returns the serialized string. - */ - serialize(): string; -} - -declare interface TracingHelper { - isEnabled(): boolean; - getTraceParent(context?: Context): string; - dispatchEngineSpans(spans: EngineSpan[]): void; - getActiveContext(): Context | undefined; - runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; -} - -declare interface Transaction extends Queryable { - /** - * Transaction options. - */ - readonly options: TransactionOptions; - /** - * Commit the transaction. - */ - commit(): Promise>; - /** - * Rolls back the transaction. - */ - rollback(): Promise>; -} - -declare namespace Transaction_2 { - export { - IsolationLevel, - Options, - InteractiveTransactionInfo, - TransactionHeaders - } -} - -declare interface TransactionContext extends Queryable { - /** - * Starts new transaction. - */ - startTransaction(): Promise>; -} - -declare type TransactionHeaders = { - traceparent?: string; -}; - -declare type TransactionOptions = { - usePhantomQuery: boolean; -}; - -declare type TransactionOptions_2 = { - kind: 'itx'; - options: InteractiveTransactionOptions; -} | { - kind: 'batch'; - options: BatchTransactionOptions; -}; - -export declare class TypedSql { - [PrivateResultType]: Result; - constructor(sql: string, values: Values); - get sql(): string; - get values(): Values; -} - -export declare type TypeMapCbDef = Fn<{ - extArgs: InternalArgs; - clientOptions: ClientOptionDef; -}, TypeMapDef>; - -/** Shared */ -export declare type TypeMapDef = Record; - -declare namespace Types { - export { - Result_3 as Result, - Extensions_2 as Extensions, - Utils, - Public_2 as Public, - isSkip, - Skip, - skip, - UnknownTypedSql, - OperationPayload as Payload - } -} -export { Types } - -declare type UnknownErrorParams = { - clientVersion: string; - batchRequestIdx?: number; -}; - -export declare type UnknownTypedSql = TypedSql; - -declare type Unpacker = (data: any) => any; - -export declare type UnwrapPayload

= {} extends P ? unknown : { - [K in keyof P]: P[K] extends { - scalars: infer S; - composites: infer C; - }[] ? Array> : P[K] extends { - scalars: infer S; - composites: infer C; - } | null ? S & UnwrapPayload | Select : never; -}; - -export declare type UnwrapPromise

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise - } -} - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -declare type WasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => { - __wbg_set_wasm(exports: unknown): any; - QueryEngine: QueryEngineConstructor; - }; - /** - * Loads the raw wasm module for the wasm query engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by LibraryEngine.ts - */ - getQueryEngineWasmModule: () => Promise; -}; - -export { } diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.js deleted file mode 100644 index 5bde1d3d..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/library.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict";var ru=Object.create;var Fr=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)Fr(e,r,{get:t[r],enumerable:!0})},wo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&Fr(e,i,{get:()=>t[i],enumerable:!(n=nu(t,i))||n.enumerable});return e};var D=(e,t,r)=>(r=e!=null?ru(ou(e)):{},wo(t||!e||!e.__esModule?Fr(r,"default",{value:e,enumerable:!0}):r,e)),au=e=>wo(Fr({},"__esModule",{value:!0}),e);var Qo=Z((yf,ti)=>{"use strict";var v=ti.exports;ti.exports.default=v;var _="\x1B[",Ht="\x1B]",mt="\x07",Jr=";",Uo=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?_+(e+1)+"G":_+(t+1)+";"+(e+1)+"H"};v.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=_+-e+"D":e>0&&(r+=_+e+"C"),t<0?r+=_+-t+"A":t>0&&(r+=_+t+"B"),r};v.cursorUp=(e=1)=>_+e+"A";v.cursorDown=(e=1)=>_+e+"B";v.cursorForward=(e=1)=>_+e+"C";v.cursorBackward=(e=1)=>_+e+"D";v.cursorLeft=_+"G";v.cursorSavePosition=Uo?"\x1B7":_+"s";v.cursorRestorePosition=Uo?"\x1B8":_+"u";v.cursorGetPosition=_+"6n";v.cursorNextLine=_+"E";v.cursorPrevLine=_+"F";v.cursorHide=_+"?25l";v.cursorShow=_+"?25h";v.eraseLines=e=>{let t="";for(let r=0;r[Ht,"8",Jr,Jr,t,mt,e,Ht,"8",Jr,Jr,mt].join("");v.image=(e,t={})=>{let r=`${Ht}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+mt};v.iTerm={setCwd:(e=process.cwd())=>`${Ht}50;CurrentDir=${e}${mt}`,annotation:(e,t={})=>{let r=`${Ht}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+mt}}});var ri=Z((Ef,Go)=>{"use strict";Go.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Ju=require("os"),Jo=require("tty"),fe=ri(),{env:J}=process,Je;fe("no-color")||fe("no-colors")||fe("color=false")||fe("color=never")?Je=0:(fe("color")||fe("colors")||fe("color=true")||fe("color=always"))&&(Je=1);"FORCE_COLOR"in J&&(J.FORCE_COLOR==="true"?Je=1:J.FORCE_COLOR==="false"?Je=0:Je=J.FORCE_COLOR.length===0?1:Math.min(parseInt(J.FORCE_COLOR,10),3));function ni(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ii(e,t){if(Je===0)return 0;if(fe("color=16m")||fe("color=full")||fe("color=truecolor"))return 3;if(fe("color=256"))return 2;if(e&&!t&&Je===void 0)return 0;let r=Je||0;if(J.TERM==="dumb")return r;if(process.platform==="win32"){let n=Ju.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in J)||J.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let n=parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:r}function Hu(e){let t=ii(e,e&&e.isTTY);return ni(t)}Ho.exports={supportsColor:Hu,stdout:ni(ii(!0,Jo.isatty(1))),stderr:ni(ii(!0,Jo.isatty(2)))}});var zo=Z((wf,Yo)=>{"use strict";var Wu=Wo(),ft=ri();function Ko(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function oi(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(ft("no-hyperlink")||ft("no-hyperlinks")||ft("hyperlink=false")||ft("hyperlink=never"))return!1;if(ft("hyperlink=true")||ft("hyperlink=always")||"NETLIFY"in t)return!0;if(!Wu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Ko(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=Ko(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Yo.exports={supportsHyperlink:oi,stdout:oi(process.stdout),stderr:oi(process.stderr)}});var Xo=Z((xf,Wt)=>{"use strict";var Ku=Qo(),si=zo(),Zo=(e,t,{target:r="stdout",...n}={})=>si[r]?Ku.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Wt.exports=(e,t,r={})=>Zo(e,t,r);Wt.exports.stderr=(e,t,r={})=>Zo(e,t,{target:"stderr",...r});Wt.exports.isSupported=si.stdout;Wt.exports.stderr.isSupported=si.stderr});var li=Z((kf,Yu)=>{Yu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ui=Z(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.enginesVersion=void 0;Hr.enginesVersion=li().prisma.enginesVersion});var ns=Z((Yf,Xu)=>{Xu.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var as=Z((zf,Le)=>{"use strict";var mi=require("fs"),fi=require("path"),ec=require("os"),tc=require("crypto"),rc=ns(),gi=rc.version,nc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ic(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` -`);let n;for(;(n=nc.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function oc(e){let t=ss(e),r=Q.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=os(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return Q.parse(o)}function sc(e){console.log(`[dotenv@${gi}][INFO] ${e}`)}function ac(e){console.log(`[dotenv@${gi}][WARN] ${e}`)}function Wr(e){console.log(`[dotenv@${gi}][DEBUG] ${e}`)}function os(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function lc(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function ss(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)mi.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=fi.resolve(process.cwd(),".env.vault");return mi.existsSync(t)?t:null}function is(e){return e[0]==="~"?fi.join(ec.homedir(),e.slice(1)):e}function uc(e){sc("Loading env from encrypted .env.vault");let t=Q._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Q.populate(r,t,e),{parsed:t}}function cc(e){let t=fi.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&Wr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[is(e.path)];else{i=[];for(let l of e.path)i.push(is(l))}let o,s={};for(let l of i)try{let u=Q.parse(mi.readFileSync(l,{encoding:r}));Q.populate(s,u,e)}catch(u){n&&Wr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),Q.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function pc(e){if(os(e).length===0)return Q.configDotenv(e);let t=ss(e);return t?Q._configVault(e):(ac(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Q.configDotenv(e))}function dc(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=tc.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function mc(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&Wr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var Q={configDotenv:cc,_configVault:uc,_parseVault:oc,config:pc,decrypt:dc,parse:ic,populate:mc};Le.exports.configDotenv=Q.configDotenv;Le.exports._configVault=Q._configVault;Le.exports._parseVault=Q._parseVault;Le.exports.config=Q.config;Le.exports.decrypt=Q.decrypt;Le.exports.parse=Q.parse;Le.exports.populate=Q.populate;Le.exports=Q});var ms=Z((ig,ds)=>{"use strict";ds.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var gs=Z((og,fs)=>{"use strict";var yc=ms();fs.exports=e=>{let t=yc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var bi=Z((pg,hs)=>{"use strict";hs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var ws=Z((fg,bs)=>{"use strict";bs.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Pi=Z((gg,xs)=>{"use strict";var Rc=ws();xs.exports=e=>typeof e=="string"?e.replace(Rc(),""):e});var vs=Z((Eg,zr)=>{"use strict";zr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};zr.exports.default=zr.exports});var _i=Z((Sh,Qs)=>{"use strict";Qs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sJn,Decimal:()=>ve,Extensions:()=>Bn,MetricsClient:()=>Ot,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>ee,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>te,Public:()=>Un,Sql:()=>ae,defineDmmfProperty:()=>ga,deserializeJsonResponse:()=>bt,deserializeRawResult:()=>qn,dmmfToRuntimeDataModel:()=>fa,empty:()=>ba,getPrismaClient:()=>Xl,getRuntime:()=>In,join:()=>Ea,makeStrictEnum:()=>eu,makeTypedQueryFactory:()=>ha,objectEnumValues:()=>yn,raw:()=>Gi,serializeJsonQuery:()=>Pn,skip:()=>vn,sqltag:()=>Ji,warnEnvConflicts:()=>tu,warnOnce:()=>tr});module.exports=au(Bm);var Bn={};Bt(Bn,{defineExtension:()=>xo,getExtensionContext:()=>vo});function xo(e){return typeof e=="function"?e:t=>t.$extends(e)}function vo(e){return e}var Un={};Bt(Un,{validator:()=>Po});function Po(...e){return t=>t}var Mr={};Bt(Mr,{$:()=>Ao,bgBlack:()=>yu,bgBlue:()=>xu,bgCyan:()=>Pu,bgGreen:()=>bu,bgMagenta:()=>vu,bgRed:()=>Eu,bgWhite:()=>Tu,bgYellow:()=>wu,black:()=>mu,blue:()=>rt,bold:()=>W,cyan:()=>_e,dim:()=>ke,gray:()=>Ut,green:()=>Ve,grey:()=>hu,hidden:()=>pu,inverse:()=>cu,italic:()=>uu,magenta:()=>fu,red:()=>de,reset:()=>lu,strikethrough:()=>du,underline:()=>X,white:()=>gu,yellow:()=>De});var Qn,To,Ro,Co,So=!0;typeof process<"u"&&({FORCE_COLOR:Qn,NODE_DISABLE_COLORS:To,NO_COLOR:Ro,TERM:Co}=process.env||{},So=process.stdout&&process.stdout.isTTY);var Ao={enabled:!To&&Ro==null&&Co!=="dumb"&&(Qn!=null&&Qn!=="0"||So)};function $(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ao.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var lu=$(0,0),W=$(1,22),ke=$(2,22),uu=$(3,23),X=$(4,24),cu=$(7,27),pu=$(8,28),du=$(9,29),mu=$(30,39),de=$(31,39),Ve=$(32,39),De=$(33,39),rt=$(34,39),fu=$(35,39),_e=$(36,39),gu=$(37,39),Ut=$(90,39),hu=$(90,39),yu=$(40,49),Eu=$(41,49),bu=$(42,49),wu=$(43,49),xu=$(44,49),vu=$(45,49),Pu=$(46,49),Tu=$(47,49);var Ru=100,Io=["green","yellow","blue","magenta","cyan","red"],Qt=[],Oo=Date.now(),Cu=0,Gn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Gn.DEBUG??"";globalThis.DEBUG_COLORS??=Gn.DEBUG_COLORS?Gn.DEBUG_COLORS==="true":!0;var Gt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Su(e){let t={color:Io[Cu++%Io.length],enabled:Gt.enabled(e),namespace:e,log:Gt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Qt.push([o,...n]),Qt.length>Ru&&Qt.shift(),Gt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Au(c)),u=`+${Date.now()-Oo}ms`;Oo=Date.now(),globalThis.DEBUG_COLORS?a(Mr[s](W(o)),...l,Mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Jn=new Proxy(Su,{get:(e,t)=>Gt[t],set:(e,t,r)=>Gt[t]=r});function Au(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ko(e=7500){let t=Qt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length!!(e&&typeof e=="object"),Vr=e=>e&&!!e[Ne],we=(e,t,r)=>{if(Vr(e)){let n=e[Ne](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Kn(e)){if(!Kn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Vr(a)&&a[Iu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthwe(u,s[c],r))&&i.every((u,c)=>we(u,a[c],r))&&(o.length===0||we(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>we(s,t[a],r))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in t||Vr(o=i)&&o[Ne]().matcherType==="optional")&&we(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return Kn(e)?Vr(e)?(t=(r=(n=e[Ne]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Jt(e,Ge):Jt(Object.values(e),Ge):[]},Jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function me(e){return Object.assign(e,{optional:()=>Ou(e),and:t=>j(e,t),or:t=>ku(e,t),select:t=>t===void 0?No(e):No(t,e)})}function Ou(e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:we(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Jt(e,Ge),matcherType:"and"})})}function ku(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Jt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Jt(e,Ge),matcherType:"or"})})}function I(e){return{[Ne]:()=>({match:t=>({matched:!!e(t)})})}}function No(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return me({[Ne]:()=>({match:n=>{let i={[t??jr]:n};return{matched:r===void 0||we(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??jr].concat(r===void 0?[]:Ge(r))})})}function Ee(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Be(e){return typeof e=="bigint"}var tf=me(I(function(e){return!0}));var Ue=e=>Object.assign(me(e),{startsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),rf=Ue(I(je)),be=e=>Object.assign(me(e),{between:(t,r)=>be(j(e,((n,i)=>I(o=>Ee(o)&&n<=o&&i>=o))(t,r))),lt:t=>be(j(e,(r=>I(n=>Ee(n)&&nbe(j(e,(r=>I(n=>Ee(n)&&n>r))(t))),lte:t=>be(j(e,(r=>I(n=>Ee(n)&&n<=r))(t))),gte:t=>be(j(e,(r=>I(n=>Ee(n)&&n>=r))(t))),int:()=>be(j(e,I(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>be(j(e,I(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>be(j(e,I(t=>Ee(t)&&t>0))),negative:()=>be(j(e,I(t=>Ee(t)&&t<0)))}),nf=be(I(Ee)),Qe=e=>Object.assign(me(e),{between:(t,r)=>Qe(j(e,((n,i)=>I(o=>Be(o)&&n<=o&&i>=o))(t,r))),lt:t=>Qe(j(e,(r=>I(n=>Be(n)&&nQe(j(e,(r=>I(n=>Be(n)&&n>r))(t))),lte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<=r))(t))),gte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>=r))(t))),positive:()=>Qe(j(e,I(t=>Be(t)&&t>0))),negative:()=>Qe(j(e,I(t=>Be(t)&&t<0)))}),of=Qe(I(Be)),sf=me(I(function(e){return typeof e=="boolean"})),af=me(I(function(e){return typeof e=="symbol"})),lf=me(I(function(e){return e==null})),uf=me(I(function(e){return e!=null}));var Yn=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}},zn={matched:!1,value:void 0};function dt(e){return new Zn(e,zn)}var Zn=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>we(u,this.input,a))||i&&!i(this.input)?zn:{matched:!0,value:r(o?jr in s?s[jr]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:zn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Yn(this.input)}run(){return this.exhaustive()}returnType(){return this}};var $o=require("util");var Du={warn:De("prisma:warn")},_u={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Br(e,...t){_u.warn()&&console.warn(`${Du.warn} ${e}`,...t)}var Nu=(0,$o.promisify)(Mo.default.exec),ne=F("prisma:get-platform"),Lu=["1.0.x","1.1.x","3.0.x"];async function qo(){let e=Qr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Gr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Mu(),n=await Gu(),i=qu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Vu(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Fu(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=dt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ne(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Mu(){let e="/etc/os-release";try{let t=await Xn.default.readFile(e,{encoding:"utf-8"});return Fu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function $u(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return Vo(r)}}function Lo(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return Vo(r)}}function Vo(e){let t=(()=>{if(Bo(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(Lu.includes(t))return t}function qu(e){return dt(e).with({familyDistro:"musl"},()=>(ne('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(ne('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ne('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(ne(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function Vu(e){let t='grep -v "libssl.so.0"',r=await Fo(e);if(r){ne(`Found libssl.so file using platform-specific paths: ${r}`);let o=Lo(r);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ne('Falling back to "ldconfig" and other generic paths');let n=await Gr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Fo(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ne(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Lo(n);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Gr("openssl version -v");if(i){ne(`Found openssl binary with version: ${i}`);let o=$u(i);if(ne(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ne("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Fo(e){for(let t of e){let r=await ju(t);if(r)return r}}async function ju(e){try{return(await Xn.default.readdir(e)).find(r=>r.startsWith("libssl.so.")&&!r.startsWith("libssl.so.0"))}catch(t){if(t.code==="ENOENT")return;throw t}}async function nt(){let{binaryTarget:e}=await jo();return e}function Bu(e){return e.binaryTarget!==void 0}async function ei(){let{memoized:e,...t}=await jo();return t}var Ur={};async function jo(){if(Bu(Ur))return Promise.resolve({...Ur,memoized:!0});let e=await qo(),t=Uu(e);return Ur={...e,binaryTarget:t},{...Ur,memoized:!1}}function Uu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Br(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${r}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(t==="linux"&&i===void 0){let c=dt({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Br(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(t==="linux"&&o===void 0&&ne(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),t==="darwin"&&r==="arm64")return"darwin-arm64";if(t==="darwin")return"darwin";if(t==="win32")return"windows";if(t==="freebsd")return o;if(t==="openbsd")return"openbsd";if(t==="netbsd")return"netbsd";if(t==="linux"&&o==="nixos")return"linux-nixos";if(t==="linux"&&r==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(t==="linux"&&r==="arm")return`linux-arm-openssl-${i||l}`;if(t==="linux"&&o==="musl"){let c="linux-musl";return!i||Bo(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Br(`Prisma detected unknown OS "${t}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Qu(e){try{return await e()}catch{return}}function Gr(e){return Qu(async()=>{let t=await Nu(e);return ne(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Gu(){return typeof Qr.default.machine=="function"?Qr.default.machine():(await Gr("uname -m"))?.trim()}function Bo(e){return e.startsWith("1.")}var es=D(Xo());function ai(e){return(0,es.default)(e,e,{fallback:X})}var zu=D(ui());var q=D(require("path")),Zu=D(ui()),jf=F("prisma:engines");function ts(){return q.default.join(__dirname,"../")}var Bf="libquery-engine";q.default.join(__dirname,"../query-engine-darwin");q.default.join(__dirname,"../query-engine-darwin-arm64");q.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");q.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");q.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");q.default.join(__dirname,"../query-engine-linux-static-x64");q.default.join(__dirname,"../query-engine-linux-static-arm64");q.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");q.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");q.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");q.default.join(__dirname,"../libquery_engine-darwin.dylib.node");q.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");q.default.join(__dirname,"../query_engine-windows.dll.node");var ci=D(require("fs")),rs=F("chmodPlusX");function pi(e){if(process.platform==="win32")return;let t=ci.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){rs(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);rs(`Have to call chmodPlusX on ${e}`),ci.default.chmodSync(e,n)}function di(e){let t=e.e,r=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=t.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${ai("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${ke(e.id)}\`).`,s=dt({message:t.message,code:t.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${r("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${r("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${r("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} -${s} - -Details: ${t.message}`}var yi=D(as()),Kr=D(require("fs"));var gt=D(require("path"));function ls(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var hi=F("prisma:tryLoadEnv");function Kt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=us(e);r.conflictCheck!=="none"&&fc(n,t,r.conflictCheck);let i=null;return cs(n?.path,t)||(i=us(t)),!n&&!i&&hi("No Environment variables loaded"),i?.dotenvResult.error?console.error(de(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function fc(e,t,r){let n=e?.dotenvResult.parsed,i=!cs(e?.path,t);if(n&&t&&i&&Kr.default.existsSync(t)){let o=yi.default.parse(Kr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gt.default.relative(process.cwd(),e.path),l=gt.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} -Conflicting env vars: -${s.map(c=>` ${W(c)}`).join(` -`)} - -We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. -`;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${X(a)} and ${X(l)} -Env vars from ${X(l)} overwrite the ones from ${X(a)} - `;console.warn(`${De("warn(prisma)")} ${u}`)}}}}function us(e){if(gc(e)){hi(`Environment variables loaded from ${e}`);let t=yi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ls(t),message:ke(`Environment variables loaded from ${gt.default.relative(process.cwd(),e)}`),path:e}}else hi(`Environment variables not found at ${e}`);return null}function cs(e,t){return e&&t&>.default.resolve(e)===gt.default.resolve(t)}function gc(e){return!!(e&&Kr.default.existsSync(e))}var ps="library";function Yt(e){let t=hc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":ps)}function hc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var zt;(t=>{let e;(A=>(A.findUnique="findUnique",A.findUniqueOrThrow="findUniqueOrThrow",A.findFirst="findFirst",A.findFirstOrThrow="findFirstOrThrow",A.findMany="findMany",A.create="create",A.createMany="createMany",A.createManyAndReturn="createManyAndReturn",A.update="update",A.updateMany="updateMany",A.updateManyAndReturn="updateManyAndReturn",A.upsert="upsert",A.delete="delete",A.deleteMany="deleteMany",A.groupBy="groupBy",A.count="count",A.aggregate="aggregate",A.findRaw="findRaw",A.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(zt||={});var Zt=D(require("path"));function Ei(e){return Zt.default.sep===Zt.default.posix.sep?e:e.split(Zt.default.sep).join(Zt.default.posix.sep)}var ys=D(bi());function xi(e){return String(new wi(e))}var wi=class{constructor(t){this.config=t}toString(){let{config:t}=this,r=t.provider.fromEnvVar?`env("${t.provider.fromEnvVar}")`:t.provider.value,n=JSON.parse(JSON.stringify({provider:r,binaryTargets:Ec(t.binaryTargets)}));return`generator ${t.name} { -${(0,ys.default)(bc(n),2)} -}`}};function Ec(e){let t;if(e.length>0){let r=e.find(n=>n.fromEnvVar!==null);r?t=`env("${r.fromEnvVar}")`:t=e.map(n=>n.native?"native":n.value)}else t=void 0;return t}function bc(e){let t=Object.keys(e).reduce((r,n)=>Math.max(r,n.length),0);return Object.entries(e).map(([r,n])=>`${r.padEnd(t)} = ${wc(n)}`).join(` -`)}function wc(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var er={};Bt(er,{error:()=>Pc,info:()=>vc,log:()=>xc,query:()=>Tc,should:()=>Es,tags:()=>Xt,warn:()=>vi});var Xt={error:de("prisma:error"),warn:De("prisma:warn"),info:_e("prisma:info"),query:rt("prisma:query")},Es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function xc(...e){console.log(...e)}function vi(e,...t){Es.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function vc(e,...t){console.info(`${Xt.info} ${e}`,...t)}function Pc(e,...t){console.error(`${Xt.error} ${e}`,...t)}function Tc(e,...t){console.log(`${Xt.query} ${e}`,...t)}function Yr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Fe(e,t){throw new Error(t)}function Ti(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ri=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ps.has(e)||(Ps.add(e),vi(t,...r))};var T=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(T,"PrismaClientInitializationError");var ee=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(ee,"PrismaClientKnownRequestError");var ce=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(ce,"PrismaClientRustPanicError");var B=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var te=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(te,"PrismaClientValidationError");var yt=9e15,Ye=1e9,Si="0123456789abcdef",en="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",tn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ai={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-yt,maxE:yt,crypto:!1},Ss,Me,b=!0,nn="[DecimalError] ",Ke=nn+"Invalid argument: ",As=nn+"Precision limit exceeded",Is=nn+"crypto unavailable",Os="[object Decimal]",re=Math.floor,G=Math.pow,Cc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Sc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ac=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ks=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,E=7,Ic=9007199254740991,Oc=en.length-1,Ii=tn.length-1,m={toStringTag:Os};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};m.comparedTo=m.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=kc(n,Fs(n,r)),n.precision=e,n.rounding=t,y(Me==2||Me==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(b=!1,o=c.s*G(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=K(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=M(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(r=K(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return b=!0,y(n,e,p.rounding,t)};m.decimalPlaces=m.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/E))*E,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};m.dividedBy=m.div=function(e){return M(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(M(t,new r(e),0,1,1),r.precision,r.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0};m.hyperbolicCosine=m.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/sn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Et(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Et(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/sn(5,e)),i=Et(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};m.hyperbolicTangent=m.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,M(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ge(r,i,o):new r(0):new r(NaN):t.isZero()?ge(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ge(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};m.inverseHyperbolicCosine=m.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,b=!1,r=r.times(r).minus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};m.inverseHyperbolicSine=m.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,b=!1,r=r.times(r).plus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=M(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Ii)return s=ge(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Ii)return s=ge(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/E+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(b=!1,t=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(b=!1,a=p+f,s=We(u,a),n=t?rn(c,a+10):We(e,a),l=M(s,n,a,1),rr(l.d,i=p,d))do if(a+=10,s=We(u,a),n=t?rn(c,a+10):We(e,a),l=M(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rr(l.d,i+=10,d));return b=!0,y(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return b?y(e,a,l):e}if(r=re(e.e/E),c=re(f.e/E),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/he|0,u[i]%=he;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=on(u,n),b?y(e,a,l):e};m.precision=m.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ke+e);return r.d?(t=Ds(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};m.sine=m.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=_c(n,Fs(n,r)),n.precision=e,n.rounding=t,y(Me>2?r.neg():r,e,t,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(b=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=K(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(M(s,o,r+2,1)).times(.5),K(o.d).slice(0,r)===(t=K(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return b=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=M(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Me==2||Me==4?r.neg():r,e,t,!0)):new n(NaN)};m.times=m.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(r=re(c.e/E)+re(e.e/E),l=d.length,u=f.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+t,o[i--]=a%he|0,t=a/he|0;o[i]=(o[i]+t)%he|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=on(o,r),b?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Di(this,2,e,t)};m.toDecimalPlaces=m.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(se(e,0,Ye),t===void 0?t=n.rounding:se(t,0,8),y(r,e+r.e+1,t))};m.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,!0):(se(e,0,Ye),t===void 0?t=i.rounding:se(t,0,8),n=y(new i(n),e+1,t),r=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=xe(i):(se(e,0,Ye),t===void 0?t=o.rounding:se(t,0,8),n=y(new o(i),e+i.e+1,t),r=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};m.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=Ds(g)-f.e-1,s=o%E,t.d[0]=G(10,s<0?E+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Ke+a);e=a.gt(t)?o>0?t:u:a}for(b=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*E*2;p=M(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=M(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=M(u,n,o,1).minus(f).abs().cmp(M(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,b=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Di(this,16,e,t)};m.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:se(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(b=!1,r=M(r,e,0,t,1).times(e),b=!0,y(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Di(this,8,e,t)};m.toPower=m.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=re(e.e/E),t>=e.d.length-1&&(r=u<0?-u:u)<=Ic)return i=_s(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(b=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Oi(e.times(We(a,n+r)),n),i.d&&(i=y(i,n+5,1),rr(i.d,n,o)&&(t=n+10,i=y(Oi(e.times(We(a,t+r)),t),t+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,b=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(se(e,1,Ye),t===void 0?t=i.rounding:se(t,0,8),n=y(new i(n),e,t),r=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toSignificantDigits=m.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(se(e,1,Ye),t===void 0?t=n.rounding:se(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function K(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Ke+e)}function rr(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=E,i=0):(i=Math.ceil((t+1)/E),t%=E),o=G(10,E-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function Xr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function kc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/sn(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Et(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var M=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,O,P,C,R,k,A,ue,jt,U,oe,Oe,Y,pt,Lr=n.constructor,jn=n.s==i.s?1:-1,z=n.d,N=i.d;if(!z||!z[0]||!N||!N[0])return new Lr(!n.s||!i.s||(z?N&&z[0]==N[0]:!N)?NaN:z&&z[0]==0||!N?jn*0:jn/0);for(l?(f=1,c=n.e-i.e):(l=he,f=E,c=re(n.e/f)-re(i.e/f)),Y=N.length,oe=z.length,P=new Lr(jn),C=P.d=[],p=0;N[p]==(z[p]||0);p++);if(N[p]>(z[p]||0)&&c--,o==null?(ue=o=Lr.precision,s=Lr.rounding):a?ue=o+(n.e-i.e)+1:ue=o,ue<0)C.push(1),g=!0;else{if(ue=ue/f+2|0,p=0,Y==1){for(d=0,N=N[0],ue++;(p1&&(N=e(N,d,l),z=e(z,d,l),Y=N.length,oe=z.length),U=Y,R=z.slice(0,Y),k=R.length;k=l/2&&++Oe;do d=0,u=t(N,R,Y,k),u<0?(A=R[0],Y!=k&&(A=A*l+(R[1]||0)),d=A/Oe|0,d>1?(d>=l&&(d=l-1),h=e(N,d,l),O=h.length,k=R.length,u=t(h,R,O,k),u==1&&(d--,r(h,Y=10;d/=10)p++;P.e=p+c*f-1,y(P,a?o+P.e+1:o,s,g)}return P}}();function y(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=E,s=t,c=p[d=0],l=c/G(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/G(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?c/G(10,i-s):0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,u?(t-=e.e+1,p[0]=G(10,(E-t%E)%E),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=G(10,E-o),p[d]=s>0?(c/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==he&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=he)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return b&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+He(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+He(-i-1)+o,r&&(n=r-s)>0&&(o+=He(n))):i>=s?(o+=He(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+He(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=He(n))),o}function on(e,t){var r=e[0];for(t*=E;r>=10;r/=10)t++;return t}function rn(e,t,r){if(t>Oc)throw b=!0,r&&(e.precision=r),Error(As);return y(new e(en),t,1,!0)}function ge(e,t,r){if(t>Ii)throw Error(As);return y(new e(tn),t,r,!0)}function Ds(e){var t=e.length-1,r=t*E+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function He(e){for(var t="";e--;)t+="0";return t}function _s(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(b=!1;;){if(r%2&&(o=o.times(t),Rs(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Rs(t.d,s)}return b=!0,o}function Ts(e){return e.d[e.d.length-1]&1}function Ns(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(b=!1,l=g):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(G(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),r=r.times(++c),a=s.plus(M(o,r,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(t==null)if(u<3&&rr(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,b=!0);else return d.precision=g,s}s=a}}function We(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,O=h.d,P=h.constructor,C=P.rounding,R=P.precision;if(h.s<0||!O||!O[0]||!h.e&&O[0]==1&&O.length==1)return new P(O&&!O[0]?-1/0:h.s!=1?NaN:O?0:h);if(t==null?(b=!1,c=R):c=t,P.precision=c+=g,r=K(O),n=r.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=K(h.d),n=r.charAt(0),f++;o=h.e,n>1?(h=new P("0."+r),o++):h=new P(n+"."+r.slice(1))}else return u=rn(P,c+2,R).times(o+""),h=We(new P(n+"."+r.slice(1)),c-g).plus(u),P.precision=R,t==null?y(h,R,C,b=!0):h;for(p=h,l=s=h=M(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(M(s,new P(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(rn(P,c+2,R).times(o+""))),l=M(l,new P(f),c,1),t==null)if(rr(l.d,c-g,C,a))P.precision=c+=g,u=s=h=M(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,P.precision=R,C,b=!0);else return P.precision=R,l;l=u,i+=2}}function Ls(e){return String(e.s*e.s/0)}function ki(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%E,r<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ks.test(t))return ki(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Sc.test(t))r=16,t=t.toLowerCase();else if(Cc.test(t))r=2;else if(Ac.test(t))r=8;else throw Error(Ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=_s(n,new n(r),o,o*2)),u=Xr(t,r,he),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=on(u,c),e.d=u,b=!1,s&&(e=M(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):it.pow(2,l))),b=!0,e)}function _c(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Et(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/sn(5,r)),t=Et(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Et(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(b=!1,l=r.times(r),a=new e(n);;){if(s=M(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=M(s.times(l),new e(t++*t++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return b=!0,s.d.length=p+1,s}function sn(e,t){for(var r=e;--t;)r*=e;return r}function Fs(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Ts(r)?n?2:3:n?4:1,t;Me=Ts(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Di(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(se(r,1,Ye),n===void 0?n=f.rounding:se(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Ls(e);else{for(c=xe(e),s=c.indexOf("."),g?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=Xr(xe(d),10,i),d.e=d.d.length),p=Xr(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=M(e,d,r,n,0,i),p=e.d,o=e.e,u=Ss),s=p[r],a=i/2,u=u||p[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,u)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)c+="0";for(p=Xr(c,i,t),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else ot)return e.length=t,!0}function Nc(e){return new this(e).abs()}function Lc(e){return new this(e).acos()}function Fc(e){return new this(e).acosh()}function Mc(e,t){return new this(e).plus(t)}function $c(e){return new this(e).asin()}function qc(e){return new this(e).asinh()}function Vc(e){return new this(e).atan()}function jc(e){return new this(e).atanh()}function Bc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(M(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(M(e,t,o,1)),r}function Uc(e){return new this(e).cbrt()}function Qc(e){return y(e=new this(e),e.e+1,2)}function Gc(e,t,r){return new this(e).clamp(t,r)}function Jc(e){if(!e||typeof e!="object")throw Error(nn+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-yt,0,"toExpPos",0,yt,"maxE",0,yt,"minE",-yt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ke+r+": "+n);if(r="crypto",i&&(this[r]=Ai[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Is);else this[r]=!1;else throw Error(Ke+r+": "+n);return this}function Hc(e){return new this(e).cos()}function Wc(e){return new this(e).cosh()}function Ms(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Cs(o)){u.s=o.s,b?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;b?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Is);else for(;o=10;i/=10)n++;nW(rt(e)),punctuation:rt,directive:_e,function:_e,variable:e=>W(rt(e)),string:e=>W(Ve(e)),boolean:De,number:_e,comment:Ut};var xp=e=>e,ln={},vp=0,x={manual:ln.Prism&&ln.Prism.manual,disableWorkerMessageHandler:ln.Prism&&ln.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let t=e;return new ye(t.type,x.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(x.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Oe instanceof ye)continue;if(A&&U!=t.length-1){C.lastIndex=oe;var p=C.exec(e);if(!p)break;var c=p.index+(k?p[1].length:0),d=p.index+p[0].length,a=U,l=oe;for(let N=t.length;a=l&&(++U,oe=l);if(t[U]instanceof ye)continue;u=a-U,Oe=e.slice(oe,l),p.index-=oe}else{C.lastIndex=0;var p=C.exec(Oe),u=1}if(!p){if(o)break;continue}k&&(ue=p[1]?p[1].length:0);var c=p.index+ue,p=p[0].slice(ue),d=c+p.length,f=Oe.slice(0,c),g=Oe.slice(d);let Y=[U,u];f&&(++U,oe+=f.length,Y.push(f));let pt=new ye(h,R?x.tokenize(p,R):p,jt,p,A);if(Y.push(pt),g&&Y.push(g),Array.prototype.splice.apply(t,Y),u!=1&&x.matchGrammar(e,t,r,U,oe,!0,h),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return x.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=x.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=x.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:ye};x.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};x.languages.javascript=x.languages.extend("clike",{"class-name":[x.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});x.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;x.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:x.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:x.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:x.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:x.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});x.languages.markup&&x.languages.markup.tag.addInlined("script","javascript");x.languages.js=x.languages.javascript;x.languages.typescript=x.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});x.languages.ts=x.languages.typescript;function ye(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return ye.stringify(r,t)}).join(""):Pp(e.type)(e.content)};function Pp(e){return $s[e]||xp}function qs(e){return Tp(e,x.languages.javascript)}function Tp(e,t){return x.tokenize(e,t).map(n=>ye.stringify(n)).join("")}var Vs=D(gs());function js(e){return(0,Vs.default)(e)}var un=class e{static read(t){let r;try{r=Bs.default.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,js(n).split(` -`))}highlight(){let t=qs(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Rp={red:de,gray:Ut,dim:ke,bold:W,underline:X,highlightSource:e=>e.highlight()},Cp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Sp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Ap({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Sp({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=un.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Op(c),d=Ip(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Us.default)(i,g).slice(g)}}return s}function Ip(e){let t=Object.keys(zt.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Op(e){let t=0;for(let r=0;r"Unknown error")}function Ws(e){return e.errors.flatMap(t=>t.kind==="Union"?Ws(t):[t])}function _p(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Np(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Np(e,t){return[...new Set(e.concat(t))]}function Lp(e){return Ci(e,(t,r)=>{let n=Gs(t),i=Gs(r);return n!==i?n-i:Js(t)-Js(r)})}function Gs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Js(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var pe=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};var Pt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};var dn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var mn=e=>e,fn={bold:mn,red:mn,green:mn,dim:mn,enabled:!1},Ks={bold:W,red:de,green:Ve,dim:ke,enabled:!0},Tt={write(e){e.writeLine(",")}};var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Rt=class extends ze{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new dn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Tt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ct=class e extends ze{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof Rt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Tt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var H=class extends ze{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var nr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Tt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mp(e,t);break;case"IncludeOnScalar":$p(e,t);break;case"EmptySelection":qp(e,t,r);break;case"UnknownSelectionField":Up(e,t);break;case"InvalidSelectionValue":Qp(e,t);break;case"UnknownArgument":Gp(e,t);break;case"UnknownInputField":Jp(e,t);break;case"RequiredArgumentMissing":Hp(e,t);break;case"InvalidArgumentType":Wp(e,t);break;case"InvalidArgumentValue":Kp(e,t);break;case"ValueTooLarge":Yp(e,t);break;case"SomeFieldsMissing":zp(e,t);break;case"TooManyFieldsGiven":Zp(e,t);break;case"Union":Hs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function $p(e,t){let[r,n]=ir(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${or(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function qp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Vp(e,t,i);return}if(n.hasField("select")){jp(e,t);return}}if(r?.[wt(e.outputType.name)]){Bp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Vp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function jp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Xs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${or(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Bp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ir(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Up(e,t){let r=ea(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Xs(n,e.outputType);break;case"include":Xp(n,e.outputType);break;case"omit":ed(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(or(n)),i.join(" ")})}function Qp(e,t){let r=ea(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Gp(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),td(n,e.arguments)),t.addErrorMessage(i=>zs(i,r,e.arguments.map(o=>o.name)))}function Jp(e,t){let[r,n]=ir(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ta(o,e.inputType)}t.addErrorMessage(o=>zs(o,n,e.inputType.fields.map(s=>s.name)))}function zs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=nd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(or(e)),n.join(" ")}function Hp(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ir(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Zs).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}}function Zs(e){return e.kind==="list"?`${Zs(e.elementType)}[]`:e.name}function Wp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Kp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Yp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function zp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ta(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(or(i)),o.join(" ")})}function Zp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Xs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function Xp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function ed(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function td(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ea(e,t){let[r,n]=ir(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ta(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ir(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function or({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var rd=3;function nd(e,t){let r=1/0,n;for(let i of t){let o=(0,Ys.default)(e,i);o>rd||o`}};function St(e){return e instanceof sr}var hn=Symbol(),Ni=new WeakMap,$e=class{constructor(t){t===hn?Ni.set(this,`Prisma.${this._getName()}`):Ni.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ni.get(this)}},ar=class extends $e{_getNamespace(){return"NullTypes"}},lr=class extends ar{};Li(lr,"DbNull");var ur=class extends ar{};Li(ur,"JsonNull");var cr=class extends ar{};Li(cr,"AnyNull");var yn={classes:{DbNull:lr,JsonNull:ur,AnyNull:cr},instances:{DbNull:new lr(hn),JsonNull:new ur(hn),AnyNull:new cr(hn)}};function Li(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var na=": ",En=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+na.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(na).write(this.value)}};var Fi=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function At(e){return new Fi(ia(e))}function ia(e){let t=new Ct;for(let[r,n]of Object.entries(e)){let i=new En(r,oa(n));t.addField(i)}return t}function oa(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(vt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=an(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof $e?new H(`Prisma.${e._getName()}`):St(e)?new H(`prisma.${ra(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?id(e):typeof e=="object"?ia(e):new H(Object.prototype.toString.call(e))}function id(e){let t=new Rt;for(let r of e)t.addItem(oa(r));return t}function bn(e,t){let r=t==="pretty"?Ks:fn,n=e.renderAllMessages(r),i=new Pt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function wn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let p of t)pn(p,a,s);let{message:l,args:u}=bn(a,r),c=cn({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(c,{clientVersion:o})}var Te=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function pr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Re(e){return e.replace(/^./,t=>t.toLowerCase())}function aa(e,t,r){let n=Re(r);return!t.result||!(t.result.$allModels||t.result[n])?e:od({...e,...sa(t.name,e,t.result.$allModels),...sa(t.name,e,t.result[n])})}function od(e){let t=new Te,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ht(e,n=>({...n,needs:r(n.name,new Set)}))}function sa(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:sd(t,o,i)})):{}}function sd(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function la(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ua(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new Te;this.modelExtensionsCache=new Te;this.queryCallbacksCache=new Te;this.clientExtensions=pr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=pr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>aa(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Re(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},It=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var ca=Symbol(),dr=class{constructor(t){if(t!==ca)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?vn:t}},vn=new dr(ca);function Ce(e){return e instanceof dr}var ad={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},pa="explicitly `undefined` values are not allowed";function Pn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=It.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:ad[t],query:mr(r,p)}}function mr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:ma(r,n),selection:ld(e,t,i,n)}}function ld(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),dd(e,n)):ud(n,t,r)}function ud(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&cd(n,t,e),pd(n,r,e),n}function cd(e,t,r){for(let[n,i]of Object.entries(t)){if(Ce(i))continue;let o=r.nestSelection(n);if($i(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=mr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=mr(i,o)}}function pd(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ua(i,n);for(let[s,a]of Object.entries(o)){if(Ce(a))continue;$i(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function dd(e,t){let r={},n=t.getComputedFields(),i=la(e,n);for(let[o,s]of Object.entries(i)){if(Ce(s))continue;let a=t.nestSelection(o);$i(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Ce(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=mr({},a):r[o]=!0;continue}r[o]=mr(s,a)}}return r}function da(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(xt(e)){if(an(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(St(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return md(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(r,n,i).toString("base64")}}if(fd(e))return e.values;if(vt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof $e){if(e!==yn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(gd(e))return e.toJSON();if(typeof e=="object")return ma(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function ma(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Ce(i)||(i!==void 0?r[n]=da(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:pa}))}return r}function md(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[wt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var Ot=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};function fa(e){return{models:qi(e.models),enums:qi(e.enums),types:qi(e.types)}}function qi(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function ga(e,t){let r=pr(()=>hd(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function hd(e){return{datamodel:{models:Vi(e.models),enums:Vi(e.enums),types:Vi(e.types)}}}function Vi(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var ji=new WeakMap,Tn="$$PrismaTypedSql",Bi=class{constructor(t,r){ji.set(this,{sql:t,values:r}),Object.defineProperty(this,Tn,{value:Tn})}get sql(){return ji.get(this).sql}get values(){return ji.get(this).values}};function ha(e){return(...t)=>new Bi(e,t)}function ya(e){return e!=null&&e[Tn]===Tn}function fr(e){return{ok:!1,error:e,map(){return fr(e)},flatMap(){return fr(e)}}}var Ui=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Qi=e=>{let t=new Ui,r=Se(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Se(t,e.queryRaw.bind(e)),executeRaw:Se(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>yd(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=bd(t,e.getConnectionInfo.bind(e))),n},yd=(e,t)=>{let r=Se(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Se(e,t.queryRaw.bind(t)),executeRaw:Se(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Ed(e,o))}},Ed=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Se(e,t.queryRaw.bind(t)),executeRaw:Se(e,t.executeRaw.bind(t)),commit:Se(e,t.commit.bind(t)),rollback:Se(e,t.rollback.bind(t))});function Se(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}function bd(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}var Kl=D(li());var Yl=require("async_hooks"),zl=require("events"),Zl=D(require("fs")),Nr=D(require("path"));var ae=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}var Rn={enumerable:!0,configurable:!0,writable:!0};function Cn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Rn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var wa=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=wd(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=xa(Reflect.ownKeys(o),r),a=xa(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Rn,...l?.getPropertyDescriptor(s)}:Rn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[wa]=function(){let o={...this};return delete o[wa],o},i}function wd(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function xa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function kt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Dt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}function va(e){if(e===void 0)return"";let t=At(e);return new Pt(0,{colors:fn}).write(t).toString()}var xd="P2037";function _t({error:e,user_facing_error:t},r,n){return t.error_code?new ee(vd(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new B(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function vd(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===xd&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var hr="";function Pa(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=Rd(n)||Sd(n)||Od(n)||Nd(n)||Dd(n);return i&&r.push(i),r},[])}var Pd=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Td=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Rd(e){var t=Pd.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Td.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||hr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Cd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sd(e){var t=Cd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Ad=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Id=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Od(e){var t=Ad.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Id.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||hr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var kd=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Dd(e){var t=kd.exec(e);return t?{file:t[3],methodName:t[1]||hr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var _d=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Nd(e){var t=_d.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Hi=class{getLocation(){return null}},Wi=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Pa(t).find(i=>{if(!i.file)return!1;let o=Ei(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Hi:new Wi}var Ta={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Nt(e={}){let t=Fd(e);return Object.entries(t).reduce((n,[i,o])=>(Ta[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Fd(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Sn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ra(e,t){let r=Sn(e);return t({action:"aggregate",unpacker:r,argsMapper:Nt})(e)}function Md(e={}){let{select:t,...r}=e;return typeof t=="object"?Nt({...r,_count:t}):Nt({...r,_count:{_all:!0}})}function $d(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function Ca(e,t){return t({action:"count",unpacker:$d(e),argsMapper:Md})(e)}function qd(e={}){let t=Nt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Vd(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Sa(e,t){return t({action:"groupBy",unpacker:Vd(e),argsMapper:qd})(e)}function Aa(e,t,r){if(t==="aggregate")return n=>Ra(n,r);if(t==="count")return n=>Ca(n,r);if(t==="groupBy")return n=>Sa(n,r)}function Ia(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ri(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new sr(e,o,s.type,s.isList,s.kind==="enum")},...Cn(Object.keys(n))})}var Oa=e=>Array.isArray(e)?e:e.split("."),Ki=(e,t)=>Oa(t).reduce((r,n)=>r&&r[n],e),ka=(e,t,r)=>Oa(t).reduceRight((n,i,o,s)=>Object.assign({},Ki(e,s.slice(0,o)),{[i]:n}),r);function jd(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Bd(e,t,r){return t===void 0?e??{}:ka(t,r,e||!0)}function Yi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=jd(n,i),p=Bd(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Ud(e,t);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let P=[a[h].type,r,h],C=[c,p];return Yi(e,...P,...C)},...Cn([...f,...Object.getOwnPropertyNames(d)])})}}function Ud(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Qd=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Gd=["aggregate","count","groupBy"];function zi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Jd(e,t),Wd(e,t),gr(r),ie("name",()=>t),ie("$name",()=>t),ie("$parent",()=>e._appliedParent)];return Ae({},n)}function Jd(e,t){let r=Re(t),n=Object.keys(zt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:c,callsite:u};return e._request({...p,...a})})};return Qd.includes(o)?Yi(e,t,s):Hd(i)?Aa(e,i,s):s({})}}}function Hd(e){return Gd.includes(e)}function Wd(e,t){return ot(ie("fields",()=>{let r=e._runtimeDataModel.models[t];return Ia(t,r)}))}function Da(e){return e.replace(/^./,t=>t.toUpperCase())}var Zi=Symbol();function yr(e){let t=[Kd(e),ie(Zi,()=>e),ie("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Ae(e,t)}function Kd(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Re),n=[...new Set(t.concat(r))];return ot({getKeys(){return n},getPropertyValue(i){let o=Da(i);if(e._runtimeDataModel.models[o]!==void 0)return zi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return zi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function _a(e){return e[Zi]?e[Zi]:e}function Na(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return yr(t)}function La({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(kt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(kt(u))}Yd(e,l.needs)&&s.push(zd(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Yd(e,t){return t.every(r=>Ti(e,r))}function zd(e,t){return ot(ie(e.name,()=>e.compute(t)))}function An({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=An({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Ma({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:An({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Re(l);return La({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function $a(e){if(e instanceof ae)return Zd(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$a(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Qa(o,l),a.args=s,Va(e,a,r,n+1)}})})}function ja(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Va(e,t,s)}function Ba(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ua(r,n,0,e):e(r)}}function Ua(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Qa(i,l),Ua(a,t,r+1,n)}})}var qa=e=>e;function Qa(e=qa,t=qa){return r=>e(t(r))}var Ga=F("prisma:client"),Ja={Vercel:"vercel","Netlify CI":"netlify"};function Ha({postinstall:e,ciName:t,clientVersion:r}){if(Ga("checkPlatformCaching:postinstall",e),Ga("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ja){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Ja[t]}-build`;throw console.error(n),new T(n,r)}}function Wa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Xd="Cloudflare-Workers",em="node";function Ka(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Xd?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===em?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var tm={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function In(){let e=Ka();return{id:e,prettyName:tm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var el=D(require("fs")),br=D(require("path"));function On(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${rm(e)}`}function rm(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return xi({...t,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function et(e){let{searchedLocations:t}=e;return`The following locations have been searched: -${[...new Set(t)].map(i=>` ${i}`).join(` -`)}`}function Ya(e){let{runtimeBinaryTarget:t}=e;return`${Xe(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". -${On(e)} - -${et(e)}`}function kn(e){return`We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`}function Dn(e){let{errorStack:t}=e;return t?.match(/\/\.next|\/next@|\/next\//)?` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function za(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by a bundler that has not copied "${t}" next to the resulting bundle. -Ensure that "${t}" has been copied next to the bundle or in "${e.expectedLocation}". - -${kn("engine-not-found-bundler-investigation")} - -${et(e)}`}function Za(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Xe(e)} - -This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". -${On(e)} - -${et(e)}`}function Xa(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by tooling that has not copied "${t}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${t}" has been copied to "${e.expectedLocation}". - -${kn("engine-not-found-tooling-investigation")} - -${et(e)}`}var nm=F("prisma:client:engines:resolveEnginePath"),im=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function tl(e,t){let r={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??t.prismaPath;if(r!==void 0)return r;let{enginePath:n,searchedLocations:i}=await om(e,t);if(nm("enginePath",n),n!==void 0&&e==="binary"&&pi(n),n!==void 0)return t.prismaPath=n;let o=await nt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(im())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:rl(e,o),expectedLocation:br.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=Za(c):l?p=Ya(c):u?p=za(c):p=Xa(c),new T(p,t.clientVersion)}async function om(engineType,config){let binaryTarget=await nt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,br.default.resolve(dirname,".."),config.generator?.output?.value??dirname,br.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(ts());for(let e of searchLocations){let t=rl(engineType,binaryTarget),r=br.default.join(e,t);if(searchedLocations.push(e),el.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function rl(e,t){return e==="library"?qr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Xi=D(Pi());function nl(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function il(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var ol=D(vs());function sl({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ol.default)({user:t,repo:r,template:n,title:e,body:i})}function al({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ko(6e3-(s?.length??0)),l=il((0,Xi.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",c=(0,Xi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?nl(s):""} -\`\`\` -`),p=sl({title:r,body:c});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${X(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}function Lt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var _n=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var le=class extends _n{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function S(e,t){return{...e,isRetryable:t}}var Ft=class extends le{constructor(r){super("This request must be retried",S(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(Ft,"ForcedRetryError");var st=class extends le{constructor(r,n){super(r,S(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(st,"InvalidDatasourceError");var at=class extends le{constructor(r,n){super(r,S(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(at,"NotImplementedYetError");var V=class extends le{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends V{constructor(r){super("Schema needs to be uploaded",S(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lt,"SchemaMissingError");var eo="This request could not be understood by the server",wr=class extends V{constructor(r,n,i){super(n||eo,S(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(wr,"BadRequestError");var xr=class extends V{constructor(r,n){super("Engine not started: healthcheck timeout",S(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(xr,"HealthcheckTimeoutError");var vr=class extends V{constructor(r,n,i){super(n,S(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(vr,"EngineStartupError");var Pr=class extends V{constructor(r){super("Engine version is not supported",S(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(Pr,"EngineVersionNotSupportedError");var to="Request timed out",Tr=class extends V{constructor(r,n=to){super(n,S(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(Tr,"GatewayTimeoutError");var sm="Interactive transaction error",Rr=class extends V{constructor(r,n=sm){super(n,S(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(Rr,"InteractiveTransactionError");var am="Request parameters are invalid",Cr=class extends V{constructor(r,n=am){super(n,S(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(Cr,"InvalidRequestError");var ro="Requested resource does not exist",Sr=class extends V{constructor(r,n=ro){super(n,S(r,!1));this.name="NotFoundError";this.code="P5003"}};w(Sr,"NotFoundError");var no="Unknown server error",Mt=class extends V{constructor(r,n,i){super(n||no,S(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(Mt,"ServerError");var io="Unauthorized, check your connection string",Ar=class extends V{constructor(r,n=io){super(n,S(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Ar,"UnauthorizedError");var oo="Usage exceeded, retry again later",Ir=class extends V{constructor(r,n=oo){super(n,S(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(Ir,"UsageExceededError");async function lm(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Or(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await lm(e);if(n.type==="QueryEngineError")throw new ee(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Mt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Pr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new vr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new xr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Rr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Cr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ar(r,$t(io,n));if(e.status===404)return new Sr(r,$t(ro,n));if(e.status===429)throw new Ir(r,$t(oo,n));if(e.status===504)throw new Tr(r,$t(to,n));if(e.status>=500)throw new Mt(r,$t(no,n));if(e.status>=400)throw new wr(r,$t(eo,n))}function $t(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function ll(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}var qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ul(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,r+=qe[s]+qe[a]+qe[l]+qe[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=qe[s]+qe[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=qe[s]+qe[a]+qe[l]+"="),r}function cl(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function um(e){return e[0]*1e3+e[1]/1e6}function so(e){return new Date(um(e))}var pl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var kr=class extends le{constructor(r,n){super(`Cannot fetch data from service: -${r}`,S(n,!0));this.name="RequestError";this.code="P5010"}};w(kr,"RequestError");async function ut(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new kr(a,{clientVersion:n,cause:s})}}var pm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,dl=F("prisma:client:dataproxyEngine");async function dm(e,t){let r=pl["@prisma/engines-version"],n=t.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&pm.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),c=mm(`<=${a}.${l}.${u}`),p=await ut(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();dl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ml(e,t){let r=await dm(e,t);return dl("version",r),r}function mm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var fl=3,Nn=F("prisma:client:dataproxyEngine"),ao=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Dr=class{constructor(t){this.name="DataProxyEngine";cl(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=ul(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new ao({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ml(t,this.config),Nn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Nn(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:so(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:so(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ut(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Nn("schema response status",r.status);let n=await Or(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Dt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Nn("graphql response status",a.status),await this.handleError(await Or(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Or(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Or(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=Lt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof le)||!i.isRetryable)throw i;if(r>=fl)throw i instanceof Ft?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${fl} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ll(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new Ft({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_t(t[0],this.config.clientVersion,this.config.activeProvider):new B(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function gl(e){if(e?.kind==="itx")return e.options.id}var uo=D(require("os")),hl=D(require("path"));var lo=Symbol("PrismaLibraryEngineCache");function fm(){let e=globalThis;return e[lo]===void 0&&(e[lo]={}),e[lo]}function gm(e){let t=fm();if(t[e]!==void 0)return t[e];let r=hl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=uo.default.constants.dlopen.RTLD_LAZY|uo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var yl={async loadLibrary(e){let t=await ei(),r=await tl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>gm(r))}catch(n){let i=di({e:n,platformInfo:t,id:r});throw new T(i,e.clientVersion)}}};var co,El={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new T(`The \`adapter\` option for \`PrismaClient\` is required in this context (${In().prettyName})`,t);if(n===void 0)throw new T("WASM engine was unexpectedly `undefined`",t);co===void 0&&(co=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new T("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await co;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var hm="P2036",Ie=F("prisma:client:libraryEngine");function ym(e){return e.item_type==="query"&&"query"in e}function Em(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var bl=[...Wn,"native"],bm=0xffffffffffffffffn,po=1n;function wm(){let e=po++;return po>bm&&(po=1n),e}var _r=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??yl,t.engineWasm!==void 0&&(this.libraryLoader=r??El),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=wm().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(xm(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new ee(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ie("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Hn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await this.tracingHelper.runInChildSpan("detect_platform",()=>nt());if(!bl.includes(t))throw new T(`Unknown ${de("PRISMA_QUERY_ENGINE_LIBRARY")} ${de(W(t))}. Possible binaryTargets: ${Ve(bl.join(", "))} or a path to the query engine library. -You may have to run ${Ve("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return t}}parseEngineResponse(t){if(!t)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new WeakRef(this),{adapter:r}=this.config;r&&Ie("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new T(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",ym(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):Em(r)?this.loggerRustPanic=new ce(mo(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ie(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ie("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ie("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new T(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ie("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ie("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ie("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ie(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof T)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(mo(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ie("requestBatch");let i=Dt(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),gl(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ce(mo(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:_t(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===hm&&this.config.adapter){let r=t.meta?.id;Yr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Yr(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function xm(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function mo(e,t){return al({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function wl({copyEngine:e=!0},t){let r;try{r=Lt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&tr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Yt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new te(u.join(` -`),{clientVersion:t.clientVersion})}if(o)return new Dr(t);if(a)return new _r(t);throw new te("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Ln({generator:e}){return e?.previewFeatures??[]}var xl=e=>({command:e});var vl=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function qt(e){try{return Pl(e,"fast")}catch{return Pl(e,"slow")}}function Pl(e,t){return JSON.stringify(e.map(r=>Rl(r,t)))}function Rl(e,t){if(Array.isArray(e))return e.map(r=>Rl(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(xt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(vm(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Cl(e):e}function vm(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Cl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Tl);let t={};for(let r of Object.keys(e))t[r]=Tl(e[r]);return t}function Tl(e){return typeof e=="bigint"?e.toString():Cl(e)}var Pm=["$connect","$disconnect","$on","$transaction","$use","$extends"],Sl=Pm;var Tm=/^(\s*alter\s)/i,Al=F("prisma:client");function fo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Tm.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var go=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(ya(r))n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=vl(r),i={values:qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Al(`prisma.${e}(${n}, ${i.values})`):Al(`prisma.${e}(${n})`),{query:n,parameters:i}},Il={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ol={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function ho(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=kl(r(o)):kl(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function kl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Rm={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},yo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Rm}};function Dl(){return new yo}function _l(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function Nl(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Fn=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Fl=D(Pi());function Mn(e){return typeof e.batchRequestIdx=="number"}function Ll(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Eo(e.query.arguments)),t.push(Eo(e.query.selection)),t.join("")}function Eo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Eo(n)})`:r}).join(" ")})`}var Cm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function bo(e){return Cm[e]}var $n=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ict("bigint",r));case"bytes-array":return t.map(r=>ct("bytes",r));case"decimal-array":return t.map(r=>ct("decimal",r));case"datetime-array":return t.map(r=>ct("datetime",r));case"date-array":return t.map(r=>ct("date",r));case"time-array":return t.map(r=>ct("time",r));default:return t}}function qn(e){let t=[],r=Sm(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>bo(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Im(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ml(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:bo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ll(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Am(t),Om(t,i))throw t;if(t instanceof ee&&km(t)){let u=$l(t.meta);wn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=cn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new ee(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof T)throw new T(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Fl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Ki(o,s),l=i==="queryRaw"?qn(a):bt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Im(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ml(e)};Fe(e,"Unknown transaction kind")}}function Ml(e){return{id:e.id,payload:e.payload}}function Om(e,t){return Mn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function km(e){return e.code==="P2009"||e.code==="P2012"}function $l(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map($l)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var ql="6.2.1";var Vl=ql;var Gl=D(_i());var L=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(L,"PrismaClientConstructorValidationError");var jl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bl=["pretty","colorless","minimal"],Ul=["info","query","warn","error"],_m={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Vt(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new L(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Ln(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Yt()==="binary")throw new L('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Bl.includes(e)){let t=Vt(e,Bl);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ul.includes(r)){let n=Vt(r,Ul);throw new L(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Vt(i,o);throw new L(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new L(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new L(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new L(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Lm(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new L(Fm(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Vt(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Jl(e,t){for(let[r,n]of Object.entries(e)){if(!jl.includes(r)){let i=Vt(r,jl);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}_m[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vt(e,t){if(t.length===0||typeof e!="string")return"";let r=Nm(e,t);return r?` Did you mean "${r}"?`:""}function Nm(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Gl.default)(e,i)}));r.sort((i,o)=>i.distancewt(n)===t);if(r)return e[r]}function Fm(e,t){let r=At(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=bn(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}function Hl(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Mn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var tt=F("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Mm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},$m=Symbol.for("prisma.client.transaction.id"),qm={id:0,nextId(){return++this.id}};function Xl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Fn;this._createPrismaPromise=ho();this.$extends=Na;e=n?.__internal?.configOverride?.(e)??e,Ha(e),n&&Jl(n,e);let i=new zl.EventEmitter().on("error",()=>{});this._extensions=It.empty(),this._previewFeatures=Ln(e),this._clientVersion=e.clientVersion??Vl,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Dl();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Nr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Nr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Qi(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new T(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new T("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&Kt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&F.enable("prisma:client");let p=Nr.default.resolve(e.dirname,e.relativePath);Zl.default.existsSync(p)||(p=e.dirname),tt("dirname",e.dirname),tt("relativePath",e.relativePath),tt("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:Nr.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Nl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Wa(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Lt,getBatchRequestPayload:Dt,prismaGraphQLToJSError:_t,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:T,PrismaClientKnownRequestError:ee,debug:F("prisma:client:accelerateEngine"),engineVersion:Kl.version,clientVersion:e.clientVersion}},tt("clientVersion",e.clientVersion),this._engine=wl(e,this._engineConfig),this._requestHandler=new Vn(this,i),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{er.log(`${er.tags[g]??""}`,h.message||h.query)})}this._metrics=new Ot(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Do()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:go({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Wl(n,i);return fo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(fo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:go({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Wl(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=qm.nextId(),s=_l(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Hl(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return yr(Ae(_a(this),[ie("_appliedParent",()=>this._appliedParent._createItxClient(n)),ie("_createPrismaPromise",()=>ho(n)),ie($m,()=>n.id),kt(Sl)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Mm,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,O=>c(u,P=>(O?.end(),l(P))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await ja(this,g);return g.model?Ma({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new Yl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>Pn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return F.enabled("prisma:client")&&(tt("Prisma Client call:"),tt(`prisma.${i}(${va(n)})`),tt("Generated request:"),tt(JSON.stringify(h,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Wl(e,t){return Vm(e)?[new ae(e,t),Il]:[e,Ol]}function Vm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var jm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function eu(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!jm.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function tu(e){Kt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.4.3 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/react-native.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/react-native.js deleted file mode 100644 index 3691bcd4..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/react-native.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict";var oa=Object.create;var Xt=Object.defineProperty;var sa=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var la=Object.getPrototypeOf,ua=Object.prototype.hasOwnProperty;var _e=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(e,t)=>{for(var r in t)Xt(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aa(t))!ua.call(e,i)&&i!==r&&Xt(e,i,{get:()=>t[i],enumerable:!(n=sa(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?oa(la(e)):{},zn(t||!e||!e.__esModule?Xt(r,"default",{value:e,enumerable:!0}):r,e)),ca=e=>zn(Xt({},"__esModule",{value:!0}),e);var y,c=_e(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=_e(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=_e(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=_e(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var gi=ge(Xe=>{"use strict";m();c();p();d();f();var ti=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pa=ti(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var I=k===A?0:4-k%4;return[k,I]}function l(C){var A=a(C),k=A[0],I=A[1];return(k+I)*3/4-I}function u(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),I=k[0],L=k[1],M=new n(u(C,I,L)),D=0,$=L>0?I-4:I,U;for(U=0;U<$;U+=4)A=r[C.charCodeAt(U)]<<18|r[C.charCodeAt(U+1)]<<12|r[C.charCodeAt(U+2)]<<6|r[C.charCodeAt(U+3)],M[D++]=A>>16&255,M[D++]=A>>8&255,M[D++]=A&255;return L===2&&(A=r[C.charCodeAt(U)]<<2|r[C.charCodeAt(U+1)]>>4,M[D++]=A&255),L===1&&(A=r[C.charCodeAt(U)]<<10|r[C.charCodeAt(U+1)]<<4|r[C.charCodeAt(U+2)]>>2,M[D++]=A>>8&255,M[D++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function P(C,A,k){for(var I,L=[],M=A;M$?$:D+M));return I===1?(A=C[k-1],L.push(t[A>>2]+t[A<<4&63]+"==")):I===2&&(A=(C[k-2]<<8)+C[k-1],L.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),L.join("")}}),da=ti(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,P=n?o-1:0,S=n?-1:1,C=t[r+P];for(P+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+P],P+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+P],P+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+P>=1?r+=S/u:r+=S*Math.pow(2,1-P),r*u>=2&&(a++,u/=2),a+P>=h?(l=0,a=h):a+P>=1?(l=(r*u-1)*Math.pow(2,o),a=a+P):(l=r*Math.pow(2,P-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Gr=pa(),Ye=da(),Yn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Xe.Buffer=T;Xe.SlowBuffer=wa;Xe.INSPECT_MAX_BYTES=50;var er=2147483647;Xe.kMaxLength=er;T.TYPED_ARRAY_SUPPORT=fa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function fa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Oe(e){if(e>er)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Hr(e)}return ri(e,t,r)}T.poolSize=8192;function ri(e,t,r){if(typeof e=="string")return ga(e,t);if(ArrayBuffer.isView(e))return ha(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return ii(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ya(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ri(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ni(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ma(e,t,r){return ni(e),e<=0?Oe(e):t!==void 0?typeof r=="string"?Oe(e).fill(t,r):Oe(e).fill(t):Oe(e)}T.alloc=function(e,t,r){return ma(e,t,r)};function Hr(e){return ni(e),Oe(e<0?0:zr(e)|0)}T.allocUnsafe=function(e){return Hr(e)};T.allocUnsafeSlow=function(e){return Hr(e)};function ga(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oi(e,t)|0,n=Oe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:zr(e.length)|0,r=Oe(t);for(let n=0;n=er)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+er.toString(16)+" bytes");return e|0}function wa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function oi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return mi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=oi;function ba(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return ai(this,t,r);case"ascii":return Ra(this,t,r);case"latin1":case"binary":return Sa(this,t,r);case"base64":return Ca(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Yn&&(T.prototype[Yn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Zr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Zn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Zn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ea(this,e,t,r);case"utf8":case"utf-8":return xa(this,e,t,r);case"ascii":case"latin1":case"binary":return va(this,e,t,r);case"base64":return Pa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ca(e,t,r){return t===0&&r===e.length?Gr.fromByteArray(e):Gr.fromByteArray(e.slice(t,r))}function ai(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Aa(n)}var Xn=4096;function Aa(e){let t=e.length;if(t<=Xn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Le(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),Ye.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),Ye.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Ye.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Ye.read(this,e,!1,52,8)};function ne(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ne(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ne(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function li(e,t,r,n,i){fi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function ui(e,t,r,n,i){fi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Le(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Le(function(e,t=0){return ui(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ne(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ne(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Le(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Le(function(e,t=0){return ui(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ci(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ye.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return pi(this,e,t,!1,r)};function di(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ye.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return di(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return di(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ei(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ei(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ei(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ma(e,t,r){Ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function fi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new ze.ERR_OUT_OF_RANGE("value",a,e)}Ma(n,i,o)}function Ze(e,t){if(typeof e!="number")throw new ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(Ze(e,r),new ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ze.ERR_BUFFER_OUT_OF_BOUNDS:new ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Fa=/[^+/0-9A-Za-z-_]/g;function Ia(e){if(e=e.split("=")[0],e=e.trim().replace(Fa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function _a(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function mi(e){return Gr.toByteArray(Ia(e))}function tr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Zr(e){return e!==e}var Na=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Le(e){return typeof BigInt>"u"?Da:e}function Da(){throw new Error("BigInt not supported")}});var w,m=_e(()=>{"use strict";w=he(gi())});function $a(){return!1}var Ba,ja,rr,tn=_e(()=>{"use strict";m();c();p();d();f();Ba={},ja={existsSync:$a,promises:Ba},rr=ja});function ll(...e){return e.join("/")}function ul(...e){return e.join("/")}var Si,cl,pl,we,an=_e(()=>{"use strict";m();c();p();d();f();Si="/",cl={sep:Si},pl={resolve:ll,posix:cl,join:ul,sep:Si},we=pl});var Mi=ge((nf,ki)=>{"use strict";m();c();p();d();f();ki.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ii=ge((cf,Fi)=>{"use strict";m();c();p();d();f();var fl=Mi();Fi.exports=e=>{let t=fl(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ir,_i=_e(()=>{"use strict";m();c();p();d();f();ir=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ni=ge((Vf,Li)=>{"use strict";m();c();p();d();f();Li.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bi=ge((tm,$i)=>{"use strict";m();c();p();d();f();$i.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var cn=ge((am,ji)=>{"use strict";m();c();p();d();f();var wl=Bi();ji.exports=e=>typeof e=="string"?e.replace(wl(),""):e});var qi=ge((Cm,sr)=>{"use strict";m();c();p();d();f();sr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};sr.exports.default=sr.exports});var En=ge((Jy,uo)=>{"use strict";m();c();p();d();f();uo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{fc.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Bo=ge(()=>{"use strict";m();c();p();d();f()});var vp={};Et(vp,{Debug:()=>on,Decimal:()=>Ee,Extensions:()=>Xr,MetricsClient:()=>mt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ie,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>X,Public:()=>en,Sql:()=>se,defineDmmfProperty:()=>Lo,deserializeJsonResponse:()=>nt,deserializeRawResult:()=>Vr,dmmfToRuntimeDataModel:()=>_o,empty:()=>qo,getPrismaClient:()=>ra,getRuntime:()=>ws,join:()=>jo,makeStrictEnum:()=>na,makeTypedQueryFactory:()=>No,objectEnumValues:()=>Tr,raw:()=>Fn,serializeJsonQuery:()=>kr,skip:()=>Or,sqltag:()=>In,warnEnvConflicts:()=>void 0,warnOnce:()=>It});module.exports=ca(vp);m();c();p();d();f();var Xr={};Et(Xr,{defineExtension:()=>hi,getExtensionContext:()=>yi});m();c();p();d();f();m();c();p();d();f();function hi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function yi(e){return e}var en={};Et(en,{validator:()=>wi});m();c();p();d();f();m();c();p();d();f();function wi(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var nr={};Et(nr,{$:()=>Pi,bgBlack:()=>za,bgBlue:()=>el,bgCyan:()=>rl,bgGreen:()=>Za,bgMagenta:()=>tl,bgRed:()=>Ya,bgWhite:()=>nl,bgYellow:()=>Xa,black:()=>Ga,blue:()=>Je,bold:()=>pe,cyan:()=>ke,dim:()=>vt,gray:()=>At,green:()=>Tt,grey:()=>Ha,hidden:()=>Qa,inverse:()=>Va,italic:()=>Ua,magenta:()=>Wa,red:()=>Qe,reset:()=>qa,strikethrough:()=>Ja,underline:()=>Pt,white:()=>Ka,yellow:()=>Ct});m();c();p();d();f();var rn,bi,Ei,xi,vi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:bi,NO_COLOR:Ei,TERM:xi}=y.env||{},vi=y.stdout&&y.stdout.isTTY);var Pi={enabled:!bi&&Ei==null&&xi!=="dumb"&&(rn!=null&&rn!=="0"||vi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Pi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var qa=V(0,0),pe=V(1,22),vt=V(2,22),Ua=V(3,23),Pt=V(4,24),Va=V(7,27),Qa=V(8,28),Ja=V(9,29),Ga=V(30,39),Qe=V(31,39),Tt=V(32,39),Ct=V(33,39),Je=V(34,39),Wa=V(35,39),ke=V(36,39),Ka=V(37,39),At=V(90,39),Ha=V(90,39),za=V(40,49),Ya=V(41,49),Za=V(42,49),Xa=V(43,49),el=V(44,49),tl=V(45,49),rl=V(46,49),nl=V(47,49);m();c();p();d();f();var il=100,Ti=["green","yellow","blue","magenta","cyan","red"],Rt=[],Ci=Date.now(),ol=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var St={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function sl(e){let t={color:Ti[ol++%Ti.length],enabled:St.enabled(e),namespace:e,log:St.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Rt.push([o,...n]),Rt.length>il&&Rt.shift(),St.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:al(g)),u=`+${Date.now()-Ci}ms`;Ci=Date.now(),globalThis.DEBUG_COLORS?a(nr[s](pe(o)),...l,nr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var on=new Proxy(sl,{get:(e,t)=>St[t],set:(e,t,r)=>St[t]=r});function al(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ai(e=7500){let t=Rt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let e;($=>($.findUnique="findUnique",$.findUniqueOrThrow="findUniqueOrThrow",$.findFirst="findFirst",$.findFirstOrThrow="findFirstOrThrow",$.findMany="findMany",$.create="create",$.createMany="createMany",$.createManyAndReturn="createManyAndReturn",$.update="update",$.updateMany="updateMany",$.updateManyAndReturn="updateManyAndReturn",$.upsert="upsert",$.delete="delete",$.deleteMany="deleteMany",$.groupBy="groupBy",$.count="count",$.aggregate="aggregate",$.findRaw="findRaw",$.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(kt||={});m();c();p();d();f();an();function ln(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var Ft={};Et(Ft,{error:()=>hl,info:()=>gl,log:()=>ml,query:()=>yl,should:()=>Di,tags:()=>Mt,warn:()=>un});m();c();p();d();f();var Mt={error:Qe("prisma:error"),warn:Ct("prisma:warn"),info:ke("prisma:info"),query:Je("prisma:query")},Di={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ml(...e){console.log(...e)}function un(e,...t){Di.warn()&&console.warn(`${Mt.warn} ${e}`,...t)}function gl(e,...t){console.info(`${Mt.info} ${e}`,...t)}function hl(e,...t){console.error(`${Mt.error} ${e}`,...t)}function yl(e,...t){console.log(`${Mt.query} ${e}`,...t)}m();c();p();d();f();function or(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function Me(e,t){throw new Error(t)}m();c();p();d();f();function pn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var dn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function et(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function fn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ui.has(e)||(Ui.add(e),un(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};le(Q,"PrismaClientInitializationError");m();c();p();d();f();var ie=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};le(ie,"PrismaClientKnownRequestError");m();c();p();d();f();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};le(ue,"PrismaClientRustPanicError");m();c();p();d();f();var K=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};le(K,"PrismaClientUnknownRequestError");m();c();p();d();f();var X=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};le(X,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();var tt=9e15,Be=1e9,mn="0123456789abcdef",lr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ur="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",gn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-tt,maxE:tt,crypto:!1},Wi,Fe,_=!0,pr="[DecimalError] ",$e=pr+"Invalid argument: ",Ki=pr+"Precision limit exceeded",Hi=pr+"crypto unavailable",zi="[object Decimal]",ee=Math.floor,G=Math.pow,bl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,El=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Yi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,F=7,vl=9007199254740991,Pl=lr.length-1,hn=ur.length-1,R={toStringTag:zi};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error($e+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+F,n.rounding=1,r=Tl(n,ro(n,r)),n.precision=e,n.rounding=t,O(Fe==2||Fe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*G(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=q(u.plus(g).times(a),u.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/F))*F,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/fr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=rt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=rt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/fr(5,e)),i=rt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?de(r,i,o):new r(0):new r(NaN):t.isZero()?de(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=de(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=de(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=hn)return s=de(g,h+4,P).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=hn)return s=de(g,h+4,P).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/F+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/F),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=De(u,a),n=t?cr(g,a+10):De(e,a),l=q(s,n,a,1),_t(l.d,i=h,P))do if(a+=10,s=De(u,a),n=t?cr(g,a+10):De(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(_t(l.d,i+=10,P));return _=!0,O(l,h,P)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,P=e.d,a=C.precision,l=C.rounding,!u[0]||!P[0]){if(P[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?O(e,a,l):e}if(r=ee(e.e/F),g=ee(S.e/F),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=P.length):(t=P,r=g,s=u.length),n=Math.max(Math.ceil(a/F),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=P.length,h=n0;--n)u[s++]=0;for(n=P.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=dr(u,n),_?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($e+e);return r.d?(t=Zi(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+F,n.rounding=1,r=Al(n,ro(n,r)),n.precision=e,n.rounding=t,O(Fe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Fe==2||Fe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,P=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!P||!P[0]||!S||!S[0])return new h(!e.s||P&&!P[0]&&!S||S&&!S[0]&&!P?NaN:!P||!S?e.s/0:e.s*0);for(r=ee(g.e/F)+ee(e.e/F),l=P.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*P[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=dr(o,r),_?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return bn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Be),t===void 0?t=n.rounding:oe(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(oe(e,0,Be),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(oe(e,0,Be),t===void 0?t=o.rounding:oe(t,0,8),n=O(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=Zi(C)-S.e-1,s=o%F,t.d[0]=G(10,s<0?F+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new A(z(C)),g=A.precision,A.precision=o=C.length*F*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,P=q(u,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],A.precision=g,_=!0,P};R.toHexadecimal=R.toHex=function(e,t){return bn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=q(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return bn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=ee(e.e/F),t>=e.d.length-1&&(r=u<0?-u:u)<=vl)return i=Xi(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=yn(e.times(De(a,n+r)),n),i.d&&(i=O(i,n+5,1),_t(i.d,n,o)&&(t=n+10,i=O(yn(e.times(De(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Be),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Be),t===void 0?t=n.rounding:oe(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error($e+e)}function _t(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=F,i=0):(i=Math.ceil((t+1)/F),t%=F),o=G(10,F-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function ar(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Tl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/fr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=rt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,P,S,C,A,k,I,L,M,D,$,U,bt,J,re,Se,Y,He,Zt=n.constructor,Jr=n.s==i.s?1:-1,Z=n.d,B=i.d;if(!Z||!Z[0]||!B||!B[0])return new Zt(!n.s||!i.s||(Z?B&&Z[0]==B[0]:!B)?NaN:Z&&Z[0]==0||!B?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=fe,S=F,g=ee(n.e/S)-ee(i.e/S)),Y=B.length,re=Z.length,I=new Zt(Jr),L=I.d=[],h=0;B[h]==(Z[h]||0);h++);if(B[h]>(Z[h]||0)&&g--,o==null?(U=o=Zt.precision,s=Zt.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)L.push(1),C=!0;else{if(U=U/S+2|0,h=0,Y==1){for(P=0,B=B[0],U++;(h1&&(B=e(B,P,l),Z=e(Z,P,l),Y=B.length,re=Z.length),J=Y,M=Z.slice(0,Y),D=M.length;D=l/2&&++Se;do P=0,u=t(B,M,Y,D),u<0?($=M[0],Y!=D&&($=$*l+(M[1]||0)),P=$/Se|0,P>1?(P>=l&&(P=l-1),A=e(B,P,l),k=A.length,D=M.length,u=t(A,M,k,D),u==1&&(P--,r(A,Y=10;P/=10)h++;I.e=h+g*S-1,O(I,a?o+I.e+1:o,s,C)}return I}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=F,s=t,g=h[P=0],l=g/G(10,i-s-1)%10|0;else if(P=Math.ceil((o+1)/F),a=h.length,P>=a)if(n){for(;a++<=P;)h.push(0);g=l=0,i=1,o%=F,s=o-F+1}else break e;else{for(g=a=h[P],i=1;a>=10;a/=10)i++;o%=F,s=o-F+i,l=s<0?0:g/G(10,i-s-1)%10|0}if(n=n||t<0||h[P+1]!==void 0||(s<0?g:g%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/G(10,i-s):0:h[P-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=G(10,(F-t%F)%F),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=P,a=1,P--):(h.length=P+1,a=G(10,F-o),h[P]=s>0?(g/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(P==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[P]+=a,h[P]!=fe)break;h[P--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function dr(e,t){var r=e[0];for(t*=F;r>=10;r/=10)t++;return t}function cr(e,t,r){if(t>Pl)throw _=!0,r&&(e.precision=r),Error(Ki);return O(new e(lr),t,1,!0)}function de(e,t,r){if(t>hn)throw Error(Ki);return O(new e(ur),t,r,!0)}function Zi(e){var t=e.length-1,r=t*F+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ne(e){for(var t="";e--;)t+="0";return t}function Xi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/F+4);for(_=!1;;){if(r%2&&(o=o.times(t),Ji(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Ji(t.d,s)}return _=!0,o}function Qi(e){return e.d[e.d.length-1]&1}function eo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new P(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=C):l=t,a=new P(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(G(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new P(1),P.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&_t(s.d,l-n,S,u))P.precision=l+=10,r=o=a=new P(1),g=0,u++;else return O(s,P.precision=C,S,_=!0);else return P.precision=C,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,u,g,h,P,S=1,C=10,A=e,k=A.d,I=A.constructor,L=I.rounding,M=I.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new I(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(_=!1,g=M):g=t,I.precision=g+=C,r=z(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new I("0."+r),o++):A=new I(n+"."+r.slice(1))}else return u=cr(I,g+2,M).times(o+""),A=De(new I(n+"."+r.slice(1)),g-C).plus(u),I.precision=M,t==null?O(A,M,L,_=!0):A;for(h=A,l=s=A=q(A.minus(1),A.plus(1),g,1),P=O(A.times(A),g,1),i=3;;){if(s=O(s.times(P),g,1),u=l.plus(q(s,new I(i),g,1)),z(u.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(cr(I,g+2,M).times(o+""))),l=q(l,new I(S),g,1),t==null)if(_t(l.d,g-C,L,a))I.precision=g+=C,u=s=A=q(h.minus(1),h.plus(1),g,1),P=O(A.times(A),g,1),i=a=1;else return O(l,I.precision=M,L,_=!0);else return I.precision=M,l;l=u,i+=2}}function to(e){return String(e.s*e.s/0)}function wn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%F,r<0&&(n+=F),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Yi.test(t))return wn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(El.test(t))r=16,t=t.toLowerCase();else if(bl.test(t))r=2;else if(xl.test(t))r=8;else throw Error($e+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Xi(n,new n(r),o,o*2)),u=ar(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=dr(u,g),e.d=u,_=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):Ge.pow(2,l))),_=!0,e)}function Al(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:rt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/fr(5,r)),t=rt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function rt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/F);for(_=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function fr(e,t){for(var r=e;--t;)r*=e;return r}function ro(e,t){var r,n=t.s<0,i=de(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Fe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Fe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Fe=Qi(r)?n?2:3:n?4:1,t;Fe=Qi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function bn(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,Be),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=to(e);else{for(g=be(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),P=new S(1),P.e=g.length-s,P.d=ar(be(P),10,i),P.e=P.d.length),h=ar(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,P,r,n,0,i),h=e.d,o=e.e,u=Wi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ar(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Rl(e){return new this(e).abs()}function Sl(e){return new this(e).acos()}function Ol(e){return new this(e).acosh()}function kl(e,t){return new this(e).plus(t)}function Ml(e){return new this(e).asin()}function Fl(e){return new this(e).asinh()}function Il(e){return new this(e).atan()}function _l(e){return new this(e).atanh()}function Ll(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=de(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?de(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=de(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=de(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Nl(e){return new this(e).cbrt()}function Dl(e){return O(e=new this(e),e.e+1,2)}function $l(e,t,r){return new this(e).clamp(t,r)}function Bl(e){if(!e||typeof e!="object")throw Error(pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-tt,0,"toExpPos",0,tt,"maxE",0,tt,"minE",-tt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=gn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Hi);else this[r]=!1;else throw Error($e+r+": "+n);return this}function jl(e){return new this(e).cos()}function ql(e){return new this(e).cosh()}function no(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Gi(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Hi);else for(;o=10;i/=10)n++;npe(Je(e)),punctuation:Je,directive:ke,function:ke,variable:e=>pe(Je(e)),string:e=>pe(Tt(e)),boolean:Ct,number:ke,comment:At};var mu=e=>e,gr={},gu=0,N={manual:gr.Prism&&gr.Prism.manual,disableWorkerMessageHandler:gr.Prism&&gr.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Se instanceof me)continue;if($&&J!=t.length-1){L.lastIndex=re;var h=L.exec(e);if(!h)break;var g=h.index+(D?h[1].length:0),P=h.index+h[0].length,a=J,l=re;for(let B=t.length;a=l&&(++J,re=l);if(t[J]instanceof me)continue;u=a-J,Se=e.slice(re,l),h.index-=re}else{L.lastIndex=0;var h=L.exec(Se),u=1}if(!h){if(o)break;continue}D&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),P=g+h.length,S=Se.slice(0,g),C=Se.slice(P);let Y=[J,u];S&&(++J,re+=S.length,Y.push(S));let He=new me(A,M?N.tokenize(h,M):h,bt,h,$);if(Y.push(He),C&&Y.push(C),Array.prototype.splice.apply(t,Y),u!=1&&N.matchGrammar(e,t,r,J,re,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):hu(e.type)(e.content)};function hu(e){return io[e]||mu}function oo(e){return yu(e,N.languages.javascript)}function yu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var so=he(Ii());function ao(e){return(0,so.default)(e)}var hr=class e{static read(t){let r;try{r=rr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,ao(n).split(` -`))}highlight(){let t=oo(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var wu={red:Qe,gray:At,dim:vt,bold:pe,underline:Pt,highlightSource:e=>e.highlight()},bu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Eu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function xu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Eu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=hr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Pu(g),P=vu(g);if(!P)return s;s.functionName=`${P.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,P.openingBraceIndex))),u=o.highlightSource(u);let S=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(S))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+S+1;C+=2,s.callArguments=(0,lo.default)(i,C).slice(C)}}return s}function vu(e){let t=Object.keys(kt.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Pu(e){let t=0;for(let r=0;r"Unknown error")}function mo(e){return e.errors.flatMap(t=>t.kind==="Union"?mo(t):[t])}function Au(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ru(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ru(e,t){return[...new Set(e.concat(t))]}function Su(e){return fn(e,(t,r)=>{let n=co(t),i=co(r);return n!==i?n-i:po(t)-po(r)})}function co(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function po(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var ce=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();d();f();m();c();p();d();f();var br=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Er=e=>e,xr={bold:Er,red:Er,green:Er,dim:Er,enabled:!1},go={bold:pe,red:Qe,green:Tt,dim:vt,enabled:!0},lt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ut=class extends je{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new br(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new xe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(lt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ct=class e extends je{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ut&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new xe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(lt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Lt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(lt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function wr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ku(e,t);break;case"IncludeOnScalar":Mu(e,t);break;case"EmptySelection":Fu(e,t,r);break;case"UnknownSelectionField":Nu(e,t);break;case"InvalidSelectionValue":Du(e,t);break;case"UnknownArgument":$u(e,t);break;case"UnknownInputField":Bu(e,t);break;case"RequiredArgumentMissing":ju(e,t);break;case"InvalidArgumentType":qu(e,t);break;case"InvalidArgumentValue":Uu(e,t);break;case"ValueTooLarge":Vu(e,t);break;case"SomeFieldsMissing":Qu(e,t);break;case"TooManyFieldsGiven":Ju(e,t);break;case"Union":fo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ku(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Mu(e,t){let[r,n]=Nt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ce(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Fu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Iu(e,t,i);return}if(n.hasField("select")){_u(e,t);return}}if(r?.[it(e.outputType.name)]){Lu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Iu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ce(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function _u(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),bo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Lu(e,t){let r=new Lt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ce("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Nt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Nu(e,t){let r=Eo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":bo(n,e.outputType);break;case"include":Gu(n,e.outputType);break;case"omit":Wu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Dt(n)),i.join(" ")})}function Du(e,t){let r=Eo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function $u(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ku(n,e.arguments)),t.addErrorMessage(i=>yo(i,r,e.arguments.map(o=>o.name)))}function Bu(e,t){let[r,n]=Nt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&xo(o,e.inputType)}t.addErrorMessage(o=>yo(o,n,e.inputType.fields.map(s=>s.name)))}function yo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=zu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Dt(e)),n.join(" ")}function ju(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Nt(e.argumentPath),s=new Lt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ce(o,s).makeRequired())}else{let l=e.inputTypes.map(wo).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function wo(e){return e.kind==="list"?`${wo(e.elementType)}[]`:e.name}function qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=vr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Uu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=vr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Qu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&xo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${vr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Dt(i)),o.join(" ")})}function Ju(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${vr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function bo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Gu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Wu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function Ku(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function Eo(e,t){let[r,n]=Nt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function xo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function Nt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function vr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Hu=3;function zu(e,t){let r=1/0,n;for(let i of t){let o=(0,ho.default)(e,i);o>Hu||o`}};function pt(e){return e instanceof $t}m();c();p();d();f();var Pr=Symbol(),xn=new WeakMap,Ie=class{constructor(t){t===Pr?xn.set(this,`Prisma.${this._getName()}`):xn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return xn.get(this)}},Bt=class extends Ie{_getNamespace(){return"NullTypes"}},jt=class extends Bt{};vn(jt,"DbNull");var qt=class extends Bt{};vn(qt,"JsonNull");var Ut=class extends Bt{};vn(Ut,"AnyNull");var Tr={classes:{DbNull:jt,JsonNull:qt,AnyNull:Ut},instances:{DbNull:new jt(Pr),JsonNull:new qt(Pr),AnyNull:new Ut(Pr)}};function vn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Po=": ",Cr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Po.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Po).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function dt(e){return new Pn(To(e))}function To(e){let t=new ct;for(let[r,n]of Object.entries(e)){let i=new Cr(r,Co(n));t.addField(i)}return t}function Co(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(st(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ie?new H(`Prisma.${e._getName()}`):pt(e)?new H(`prisma.${vo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Yu(e):typeof e=="object"?To(e):new H(Object.prototype.toString.call(e))}function Yu(e){let t=new ut;for(let r of e)t.addItem(Co(r));return t}function Ar(e,t){let r=t==="pretty"?go:xr,n=e.renderAllMessages(r),i=new at(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Rr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=dt(e);for(let h of t)wr(h,a,s);let{message:l,args:u}=Ar(a,r),g=yr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new X(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Vt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Ro(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Zu({...e,...Ao(t.name,e,t.result.$allModels),...Ao(t.name,e,t.result[n])})}function Zu(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return et(e,n=>({...n,needs:r(n.name,new Set)}))}function Ao(e,t,r){return r?et(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Xu(t,o,i)})):{}}function Xu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function So(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Oo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Sr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=Vt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Vt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ro(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ft=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Sr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Sr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();m();c();p();d();f();var ko=Symbol(),Qt=class{constructor(t){if(t!==ko)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Or:t}},Or=new Qt(ko);function Te(e){return e instanceof Qt}var ec={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Mo="explicitly `undefined` values are not allowed";function kr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ft.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:ec[t],query:Jt(r,h)}}function Jt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Io(r,n),selection:tc(e,t,i,n)}}function tc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),oc(e,n)):rc(n,t,r)}function rc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&nc(n,t,e),ic(n,r,e),n}function nc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Jt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Jt(i,o)}}function ic(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Oo(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function oc(e,t){let r={},n=t.getComputedFields(),i=So(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Jt({},a):r[o]=!0;continue}r[o]=Jt(s,a)}}return r}function Fo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ot(e)){if(mr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(pt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return sc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(ac(e))return e.values;if(st(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ie){if(e!==Tr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(lc(e))return e.toJSON();if(typeof e=="object")return Io(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Io(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Fo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Mo}))}return r}function sc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[it(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var mt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();d();f();function _o(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Lo(e,t){let r=Vt(()=>uc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function uc(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Sn=new WeakMap,Mr="$$PrismaTypedSql",On=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Mr,{value:Mr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function No(e){return(...t)=>new On(e,t)}function Do(e){return e!=null&&e[Mr]===Mr}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Gt(e){return{ok:!1,error:e,map(){return Gt(e)},flatMap(){return Gt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Mn=e=>{let t=new kn,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>cc(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=dc(t,e.getConnectionInfo.bind(e))),n},cc=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>pc(e,o))}},pc=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Gt({kind:"GenericJs",id:i})}}}function dc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Gt({kind:"GenericJs",id:i})}}}var ta=he($o());var MO=he(Bo());_i();tn();an();m();c();p();d();f();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var Fr={enumerable:!0,configurable:!0,writable:!0};function Ir(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Uo=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=mc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Vo(Reflect.ownKeys(o),r),a=Vo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Fr,...l?.getPropertyDescriptor(s)}:Fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Uo]=function(){let o={...this};return delete o[Uo],o},i}function mc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Vo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function _r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function Qo(e){if(e===void 0)return"";let t=dt(e);return new at(0,{colors:xr}).write(t).toString()}m();c();p();d();f();var gc="P2037";function Lr({error:e,user_facing_error:t},r,n){return t.error_code?new ie(hc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function hc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===gc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Kt="";function Jo(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=bc(n)||xc(n)||Tc(n)||Sc(n)||Ac(n);return i&&r.push(i),r},[])}var yc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bc(e){var t=yc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=wc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Kt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Ec=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function xc(e){var t=Ec.exec(e);return t?{file:t[2],methodName:t[1]||Kt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Pc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tc(e){var t=vc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Pc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Kt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Cc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Ac(e){var t=Cc.exec(e);return t?{file:t[3],methodName:t[1]||Kt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Rc=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sc(e){var t=Rc.exec(e);return t?{file:t[2],methodName:t[1]||Kt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var _n=class{getLocation(){return null}},Ln=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Jo(t).find(i=>{if(!i.file)return!1;let o=ln(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function qe(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new _n:new Ln}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Go={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=kc(e);return Object.entries(t).reduce((n,[i,o])=>(Go[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function kc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Nr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Wo(e,t){let r=Nr(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}m();c();p();d();f();function Mc(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function Fc(e={}){return typeof e.select=="object"?t=>Nr(e)(t)._count:t=>Nr(e)(t)._count._all}function Ko(e,t){return t({action:"count",unpacker:Fc(e),argsMapper:Mc})(e)}m();c();p();d();f();function Ic(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function _c(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ho(e,t){return t({action:"groupBy",unpacker:_c(e),argsMapper:Ic})(e)}function zo(e,t,r){if(t==="aggregate")return n=>Wo(n,r);if(t==="count")return n=>Ko(n,r);if(t==="groupBy")return n=>Ho(n,r)}m();c();p();d();f();function Yo(e,t){let r=t.fields.filter(i=>!i.relationName),n=dn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new $t(e,o,s.type,s.isList,s.kind==="enum")},...Ir(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var Zo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Zo(t).reduce((r,n)=>r&&r[n],e),Xo=(e,t,r)=>Zo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function Lc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nc(e,t,r){return t===void 0?e??{}:Xo(t,r,e||!0)}function Dn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=qe(e._errorFormat),g=Lc(n,i),h=Nc(l,o,g),P=r({dataPath:g,callsite:u})(h),S=Dc(e,t);return new Proxy(P,{get(C,A){if(!S.includes(A))return C[A];let I=[a[A].type,r,A],L=[g,h];return Dn(e,...I,...L)},...Ir([...S,...Object.getOwnPropertyNames(P)])})}}function Dc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var $c=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Bc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[jc(e,t),Uc(e,t),Wt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ae({},n)}function jc(e,t){let r=Pe(t),n=Object.keys(kt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=qe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})})};return $c.includes(o)?Dn(e,t,s):qc(i)?zo(e,i,s):s({})}}}function qc(e){return Bc.includes(e)}function Uc(e,t){return We(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Yo(t,r)}))}m();c();p();d();f();function es(e){return e.replace(/^./,t=>t.toUpperCase())}var Bn=Symbol();function Ht(e){let t=[Vc(e),te(Bn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Wt(r)),Ae(e,t)}function Vc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=es(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ts(e){return e[Bn]?e[Bn]:e}function rs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Ht(t)}m();c();p();d();f();m();c();p();d();f();function ns({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(gt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(gt(u))}Qc(e,l.needs)&&s.push(Jc(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Qc(e,t){return t.every(r=>pn(e,r))}function Jc(e,t){return We(te(e.name,()=>e.compute(t)))}m();c();p();d();f();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function os({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ns({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();function ss(e){if(e instanceof se)return Gc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ss(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(o,l),a.args=s,ls(e,a,r,n+1)}})})}function us(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ls(e,t,s)}function cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ps(r,n,0,e):e(r)}}function ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(i,l),ps(a,t,r+1,n)}})}var as=e=>e;function ds(e=as,t=as){return r=>e(t(r))}m();c();p();d();f();var fs=ae("prisma:client"),ms={Vercel:"vercel","Netlify CI":"netlify"};function gs({postinstall:e,ciName:t,clientVersion:r}){if(fs("checkPlatformCaching:postinstall",e),fs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ms){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ms[t]}-build`;throw console.error(n),new Q(n,r)}}m();c();p();d();f();function hs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Wc="Cloudflare-Workers",Kc="node";function ys(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Wc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Kc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Hc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ws(){let e=ys();return{id:e,prettyName:Hc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var jn=he(cn());m();c();p();d();f();function bs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Es(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}m();c();p();d();f();var xs=he(qi());function vs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,xs.default)({user:t,repo:r,template:n,title:e,body:i})}function Ps({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Ai(6e3-(s?.length??0)),l=Es((0,jn.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",g=(0,jn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?bs(s):""} -\`\`\` -`),h=vs({title:r,body:g});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${Pt(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}m();c();p();d();f();function $r({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ts(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var qn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Cs={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:qn}}};var zc="P2036",Re=ae("prisma:client:libraryEngine");function Yc(e){return e.item_type==="query"&&"query"in e}function Zc(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var eR=[...sn,"native"],Xc=0xffffffffffffffffn,Un=1n;function ep(){let e=Un++;return Un>Xc&&(Un=1n),e}var Yt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Cs,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=ep().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(tp(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new ie(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new K("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Re("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Yc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):Zc(r)?this.loggerRustPanic=new ue(Vn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Re("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Re("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(Vn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new K(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Re("requestBatch");let i=_r(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ts(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(Vn(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Lr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===zc&&this.config.adapter){let r=t.meta?.id;or(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return or(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function tp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Vn(e,t){return Ps({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function As({copyEngine:e=!0},t){let r;try{r=$r({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&It("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Ot(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new X(u.join(` -`),{clientVersion:t.clientVersion})}return new Yt(t)}m();c();p();d();f();function Br({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Rs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Ss=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function yt(e){try{return Os(e,"fast")}catch{return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Ms(r,t)))}function Ms(e,t){if(Array.isArray(e))return e.map(r=>Ms(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ot(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ee.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(rp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Fs(e):e}function rp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Fs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Fs(e)}m();c();p();d();f();var np=["$connect","$disconnect","$on","$transaction","$use","$extends"],Is=np;var ip=/^(\s*alter\s)/i,_s=ae("prisma:client");function Qn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&ip.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Jn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Do(r))n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:yt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ss(r),i={values:yt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Gn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ds(r(o)):Ds(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ds(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var op={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Wn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??op}};function $s(){return new Wn}m();c();p();d();f();function Bs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();var jr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();d();f();var Us=he(cn());m();c();p();d();f();function qr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function qs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Kn(e.query.arguments)),t.push(Kn(e.query.selection)),t.join("")}function Kn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Kn(n)})`:r}).join(" ")})`}m();c();p();d();f();var sp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Hn(e){return sp[e]}m();c();p();d();f();var Ur=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iKe("bigint",r));case"bytes-array":return t.map(r=>Ke("bytes",r));case"decimal-array":return t.map(r=>Ke("decimal",r));case"datetime-array":return t.map(r=>Ke("datetime",r));case"date-array":return t.map(r=>Ke("date",r));case"time-array":return t.map(r=>Ke("time",r));default:return t}}function Vr(e){let t=[],r=ap(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>Hn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:up(o),containsWrite:u,customDataProxyFetch:i})).map((h,P)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[P],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Vs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Hn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:qs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(lp(t),cp(t,i))throw t;if(t instanceof ie&&pp(t)){let u=Qs(t.meta);Rr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=yr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new ie(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(l,this.client._clientVersion);if(t instanceof K)throw new K(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ue)throw new ue(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Us.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Vr(a):nt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function up(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Vs(e)};Me(e,"Unknown transaction kind")}}function Vs(e){return{id:e.id,payload:e.payload}}function cp(e,t){return qr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function pp(e){return e.code==="P2009"||e.code==="P2012"}function Qs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Js="6.2.1";var Gs=Js;m();c();p();d();f();var Ys=he(En());m();c();p();d();f();var j=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};le(j,"PrismaClientConstructorValidationError");var Ws=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Ks=["pretty","colorless","minimal"],Hs=["info","query","warn","error"],fp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new j(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new j(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new j('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Br(t).includes("driverAdapters"))throw new j('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ot()==="binary")throw new j('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ks.includes(e)){let t=wt(e,Ks);throw new j(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Hs.includes(r)){let n=wt(r,Hs);throw new j(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=wt(i,o);throw new j(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new j(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new j(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new j(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new j('"omit" option is expected to be an object.');if(e===null)throw new j('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=gp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new j(hp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new j(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=wt(r,t);throw new j(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Zs(e,t){for(let[r,n]of Object.entries(e)){if(!Ws.includes(r)){let i=wt(r,Ws);throw new j(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}fp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new j('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function wt(e,t){if(t.length===0||typeof e!="string")return"";let r=mp(e,t);return r?` Did you mean "${r}"?`:""}function mp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ys.default)(e,i)}));r.sort((i,o)=>i.distanceit(n)===t);if(r)return e[r]}function hp(e,t){let r=dt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ar(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}m();c();p();d();f();function Xs(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!qr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Ue=ae("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var yp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},wp=Symbol.for("prisma.client.transaction.id"),bp={id:0,nextId(){return++this.id}};function ra(e){class t{constructor(n){this._originalClient=this;this._middlewares=new jr;this._createPrismaPromise=Gn();this.$extends=rs;e=n?.__internal?.configOverride?.(e)??e,gs(e),n&&Zs(n,e);let i=new ir().on("error",()=>{});this._extensions=ft.empty(),this._previewFeatures=Br(e),this._clientVersion=e.clientVersion??Gs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$s();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Mn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ae.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);rr.existsSync(h)||(h=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("cwd",h);let P=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:P.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:P.binaryPath??void 0,engineEndpoint:P.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:hs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:$r,getBatchRequestPayload:_r,prismaGraphQLToJSError:Lr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ie,debug:ae("prisma:client:accelerateEngine"),engineVersion:ta.version,clientVersion:e.clientVersion}},Ue("clientVersion",e.clientVersion),this._engine=As(e,this._engineConfig),this._requestHandler=new Qr(this,i),l.log)for(let S of l.log){let C=typeof S=="string"?S:S.emit==="stdout"?S.level:null;C&&this.$on(C,A=>{Ft.log(`${Ft.tags[C]??""}`,A.message||A.query)})}this._metrics=new mt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Ht(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ri()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ea(n,i);return Qn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Qn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Rs,callsite:qe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ea(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=bp.nextId(),s=Bs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Xs(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Ht(Ae(ts(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Gn(n)),te(wp,()=>n.id),gt(Is)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??yp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,k=>g(u,I=>(k?.end(),l(I))));let{runInTransaction:h,args:P,...S}=u,C={...n,...S};P&&(C.args=i.middlewareArgsToRequestArgs(P)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await us(this,C);return C.model?os({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:P,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>kr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ae.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${Qo(n)})`),Ue("Generated request:"),Ue(JSON.stringify(A,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:P,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ea(e,t){return Ep(e)?[new se(e,t),Ls]:[e,Ns]}function Ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var xp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function na(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!xp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=react-native.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/runtime/wasm.js b/charybdis/cloud-prisma/cloud-prisma-client/runtime/wasm.js deleted file mode 100644 index c4ba6733..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/runtime/wasm.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict";var Fo=Object.create;var At=Object.defineProperty;var No=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Bo=Object.prototype.hasOwnProperty;var ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),St=(e,t)=>{for(var r in t)At(e,r,{get:t[r],enumerable:!0})},nn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uo(t))!Bo.call(e,i)&&i!==r&&At(e,i,{get:()=>t[i],enumerable:!(n=No(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Fo(qo(e)):{},nn(t||!e||!e.__esModule?At(r,"default",{value:e,enumerable:!0}):r,e)),$o=e=>nn(At({},"__esModule",{value:!0}),e);function gr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new y(Jo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new y([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new y(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,u)=>function(g=0){return B(g,"offset"),z(g,"offset"),V(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,u)},o=(a,u)=>function(g,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Qo[C];return B(T,"offset"),z(T,"offset"),V(T,"offset",this.length-1),jo(g,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,g,u),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(u=>{u.includes("Uint")&&(e[u.replace("Uint","UInt")]=e[u]),u.includes("Float64")&&(e[u.replace("Float64","Double")]=e[u]),u.includes("Float32")&&(e[u.replace("Float32","Float")]=e[u])})};n.forEach((a,u)=>{a.startsWith("read")&&(e[a]=i(u,!1),e[a+"LE"]=i(u,!0),e[a+"BE"]=i(u,!1)),a.startsWith("write")&&(e[a]=o(u,!1),e[a+"LE"]=o(u,!0),e[a+"BE"]=o(u,!1)),s([a,a+"LE",a+"BE"])})}function sn(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Ot(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function V(e,t,r=Ko+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function B(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function z(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function jo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function on(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Ho(e,t="utf8"){return y.from(e,t)}var y,Qo,Jo,Go,Wo,Ko,b,hr,c=ae(()=>{"use strict";y=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return on(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return gr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return Wo.includes(r)}static compare(r,n){Ot(r,"buff1"),Ot(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return gr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){B(r,"offset"),z(r,"offset"),V(r,"offset",this.length-1),B(n,"byteLength"),z(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){B(n,"offset"),z(n,"offset"),V(n,"offset",this.length-1),B(i,"byteLength"),z(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){V(n,"targetStart"),V(i,"sourceStart",this.length),V(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-u:r.length),u);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),u=typeof n=="string"?0:n;return u=typeof n=="number"?u:null,u=Number.isNaN(u)?null:u,u??=o?this.length:0,u=u<0?this.length+u:u,a.length===0&&o===!1?u>=this.length?this.length:u:a.length===0&&o===!0?(u>=this.length?this.length:u)||this.length:s((g,T)=>(o?T<=u:T>=u)&&this[T]===a[0]&&a.every((O,A)=>this[T+A]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Go.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+hr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+hr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");sn(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Qo={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Jo=new TextEncoder,Go=new TextDecoder,Wo=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Ko=4294967295;Vo(y.prototype);b=new Proxy(Ho,{construct(e,[t,r]){return y.from(t,r)},get(e,t){return y[t]}}),hr=String.fromCodePoint});var h,m=ae(()=>{"use strict";h={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=ae(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=ae(()=>{"use strict";E=()=>{};E.prototype=E});var w,f=ae(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function cn(e,t){var r,n,i,o,s,a,u,g,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(u=e.d,g=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=g.length):(n=g,i=s,a=u.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=u.length,o=g.length,a-o<0&&(o=a,n=g,g=u,u=n),r=0;o;)r=(u[--o]=u[o]+g[o]+r)/j|0,u[o]%=j;for(r&&(u.unshift(r),++i),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=i,U?D(t,C):t}function ue(e,t,r){if(e!==~~e||er)throw Error(Se+e)}function le(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(br+$(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),g+=5;for(n=Math.log(Ae(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++u),s=o.plus(be(i,r,a)),le(s.d).slice(0,a)===le(o.d).slice(0,a)){for(;g--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function $(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(ne+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function Pe(e){for(var t="";e--;)t+="0";return t}function tt(e,t){var r,n,i,o,s,a,u,g,T,C=1,O=10,A=e,k=A.d,S=A.constructor,M=S.precision;if(A.s<1)throw Error(ne+(A.s?"NaN":"-Infinity"));if(A.eq(Z))return new S(0);if(t==null?(U=!1,g=M):g=t,A.eq(10))return t==null&&(U=!0),yr(S,g);if(g+=O,S.precision=g,r=le(k),n=r.charAt(0),o=$(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=le(A.d),n=r.charAt(0),C++;o=$(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=yr(S,g+2,M).times(o+""),A=tt(new S(n+"."+r.slice(1)),g-O).plus(u),S.precision=M,t==null?(U=!0,D(A,M)):A;for(a=s=A=be(A.minus(Z),A.plus(Z),g),T=D(A.times(A),g),i=3;;){if(s=D(s.times(T),g),u=a.plus(be(s,new S(i),g)),le(u.d).slice(0,g)===le(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(yr(S,g+2,M).times(o+""))),a=be(a,new S(C),g),S.precision=M,t==null?(U=!0,D(a,M)):a;a=u,i+=2}}function an(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nkt||e.e<-kt))throw Error(br+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,u,g,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,g=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(g=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Ae(10,s-i-1),a=g/o%10|0,u=t<0||C[T+1]!==void 0||g%o,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(n>0?i>0?g/Ae(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=$(e),C.length=1,t=t-o-1,C[0]=Ae(10,(N-t%N)%N),e.e=Fe(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Ae(10,N-n),C[T]=i>0?(g/Ae(10,s-i)%Ae(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>kt||e.e<-kt))throw Error(br+$(e));return e}function pn(e,t){var r,n,i,o,s,a,u,g,T,C,O=e.constructor,A=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,A):t;if(u=e.d,C=t.d,n=t.e,g=e.e,u=u.slice(),s=g-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=g,a=u.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,a=C.length,T=i0;--i)u[a++]=0;for(i=C.length;i>s;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),e.s<0?"-"+o:o}function ln(e,t){if(e.length>t)return e.length=t,!0}function dn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Se+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return an(s,o.toString())}else if(typeof o!="string")throw Error(Se+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Yo.test(o))an(s,o);else throw Error(Se+o)}if(i.prototype=R,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=dn,i.config=i.set=Xo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Se+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Se+r+": "+n);return this}var De,zo,wr,U,ne,Se,br,Fe,Ae,Yo,Z,j,N,un,kt,R,be,wr,Mt,fn=ae(()=>{"use strict";c();m();p();d();f();l();De=1e9,zo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,ne="[DecimalError] ",Se=ne+"Invalid argument: ",br=ne+"Exponent out of range: ",Fe=Math.floor,Ae=Math.pow,Yo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,un=9007199254740991,kt=Fe(un/N),R={};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};R.decimalPlaces=R.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};R.dividedBy=R.div=function(e){return be(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(be(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return $(this)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){return this.cmp(e)>=0};R.isInteger=R.isint=function(){return this.e>this.d.length-2};R.isNegative=R.isneg=function(){return this.s<0};R.isPositive=R.ispos=function(){return this.s>0};R.isZero=function(){return this.s===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(ne+"NaN");if(r.s<1)throw Error(ne+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=be(tt(r,o),tt(e,o),o),U=!0,D(t,i))};R.minus=R.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pn(t,e):cn(t,(e.s=-e.s,e))};R.modulo=R.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ne+"NaN");return r.s?(U=!1,t=be(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return mn(this)};R.naturalLogarithm=R.ln=function(){return tt(this)};R.negated=R.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};R.plus=R.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?cn(t,e):pn(t,(e.s=-e.s,e))};R.precision=R.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Se+e);if(t=$(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(ne+"NaN")}for(e=$(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=le(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=s=r+3;;)if(o=n,n=o.plus(be(a,o,s+2)).times(.5),le(o.d).slice(0,s)===(t=le(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,g,T=this,C=T.constructor,O=T.d,A=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,u=O.length,g=A.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+A[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};R.toDecimalPlaces=R.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ue(e,0,De),t===void 0?t=n.rounding:ue(t,0,8),D(r,e+$(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Oe(n,!0):(ue(e,0,De),t===void 0?t=i.rounding:ue(t,0,8),n=D(new i(n),e+1,t),r=Oe(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Oe(i):(ue(e,0,De),t===void 0?t=o.rounding:ue(t,0,8),n=D(new o(i),e+$(i)+1,t),r=Oe(n.abs(),!1,e+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),$(e)+1,t.rounding)};R.toNumber=function(){return+this};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,g=12,T=+(e=new u(e));if(!e.s)return new u(Z);if(a=new u(a),!a.s){if(e.s<1)throw Error(ne+"Infinity");return a}if(a.eq(Z))return a;if(n=u.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=un){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),ln(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),ln(a.d,t);return U=!0,e.s<0?new u(Z).div(i):D(i,n)}}else if(o<0)throw Error(ne+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(tt(a,n+g)),U=!0,i=mn(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=$(i),n=Oe(i,r<=o.toExpNeg||r>=o.toExpPos)):(ue(e,1,De),t===void 0?t=o.rounding:ue(t,0,8),i=D(new o(i),e,t),r=$(i),n=Oe(i,e<=r||r<=o.toExpNeg,e)),n};R.toSignificantDigits=R.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ue(e,1,De),t===void 0?t=n.rounding:ue(t,0,8)),D(new n(r),e,t)};R.toString=R.valueOf=R.val=R.toJSON=R[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$(e),r=e.constructor;return Oe(e,t<=r.toExpNeg||t>=r.toExpPos)};be=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,u,g,T,C,O,A,k,S,M,ie,K,Ie,H,_,fr,oe,Ct,Rt=n.constructor,Do=n.s==i.s?1:-1,se=n.d,q=i.d;if(!n.s)return new Rt(n);if(!i.s)throw Error(ne+"Division by zero");for(u=n.e-i.e,oe=q.length,_=se.length,A=new Rt(Do),k=A.d=[],g=0;q[g]==(se[g]||0);)++g;if(q[g]>(se[g]||0)&&--u,o==null?K=o=Rt.precision:s?K=o+($(n)-$(i))+1:K=o,K<0)return new Rt(0);if(K=K/N+2|0,g=0,oe==1)for(T=0,q=q[0],K++;(g<_||T)&&K--;g++)Ie=T*j+(se[g]||0),k[g]=Ie/q|0,T=Ie%q|0;else{for(T=j/(q[0]+1)|0,T>1&&(q=e(q,T),se=e(se,T),oe=q.length,_=se.length),H=oe,S=se.slice(0,oe),M=S.length;M=j/2&&++fr;do T=0,a=t(q,S,oe,M),a<0?(ie=S[0],oe!=M&&(ie=ie*j+(S[1]||0)),T=ie/fr|0,T>1?(T>=j&&(T=j-1),C=e(q,T),O=C.length,M=S.length,a=t(C,S,O,M),a==1&&(T--,r(C,oe{"use strict";fn();v=class extends Mt{static isDecimal(t){return t instanceof Mt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,t)}`)}}},ce=v});function Zo(){return!1}var es,ts,bn,wn=ae(()=>{"use strict";c();m();p();d();f();l();es={},ts={existsSync:Zo,promises:es},bn=ts});function as(...e){return e.join("/")}function ls(...e){return e.join("/")}var Ln,us,cs,nt,_n=ae(()=>{"use strict";c();m();p();d();f();l();Ln="/",us={sep:Ln},cs={resolve:as,posix:us,join:ls,sep:Ln},nt=cs});var Ft,Fn=ae(()=>{"use strict";c();m();p();d();f();l();Ft=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Un=Le((Wc,Nn)=>{"use strict";c();m();p();d();f();l();Nn.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var $n=Le((am,Bn)=>{"use strict";c();m();p();d();f();l();Bn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var jn=Le((fm,Vn)=>{"use strict";c();m();p();d();f();l();var hs=$n();Vn.exports=e=>typeof e=="string"?e.replace(hs(),""):e});var kr=Le((Pf,Gn)=>{"use strict";c();m();p();d();f();l();Gn.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{pa.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var xi=Le(()=>{"use strict";c();m();p();d();f();l()});var ul={};St(ul,{Debug:()=>Tr,Decimal:()=>ce,Extensions:()=>Er,MetricsClient:()=>ze,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Y,PrismaClientRustPanicError:()=>Ee,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>G,Public:()=>xr,Sql:()=>X,defineDmmfProperty:()=>yi,deserializeJsonResponse:()=>qe,deserializeRawResult:()=>pr,dmmfToRuntimeDataModel:()=>hi,empty:()=>vi,getPrismaClient:()=>Io,getRuntime:()=>Ce,join:()=>Pi,makeStrictEnum:()=>Lo,makeTypedQueryFactory:()=>bi,objectEnumValues:()=>Gt,raw:()=>Vr,serializeJsonQuery:()=>Xt,skip:()=>Yt,sqltag:()=>jr,warnEnvConflicts:()=>void 0,warnOnce:()=>at});module.exports=$o(ul);c();m();p();d();f();l();var Er={};St(Er,{defineExtension:()=>gn,getExtensionContext:()=>hn});c();m();p();d();f();l();c();m();p();d();f();l();function gn(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function hn(e){return e}var xr={};St(xr,{validator:()=>yn});c();m();p();d();f();l();c();m();p();d();f();l();function yn(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Pr,En,xn,Pn,vn=!0;typeof h<"u"&&({FORCE_COLOR:Pr,NODE_DISABLE_COLORS:En,NO_COLOR:xn,TERM:Pn}=h.env||{},vn=h.stdout&&h.stdout.isTTY);var rs={enabled:!En&&xn==null&&Pn!=="dumb"&&(Pr!=null&&Pr!=="0"||vn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var fu=F(0,0),It=F(1,22),Lt=F(2,22),gu=F(3,23),Tn=F(4,24),hu=F(7,27),yu=F(8,28),bu=F(9,29),wu=F(30,39),Ne=F(31,39),Cn=F(32,39),Rn=F(33,39),An=F(34,39),Eu=F(35,39),Sn=F(36,39),xu=F(37,39),On=F(90,39),Pu=F(90,39),vu=F(40,49),Tu=F(41,49),Cu=F(42,49),Ru=F(43,49),Au=F(44,49),Su=F(45,49),Ou=F(46,49),ku=F(47,49);c();m();p();d();f();l();var ns=100,kn=["green","yellow","blue","magenta","cyan","red"],_t=[],Mn=Date.now(),is=0,vr=typeof h<"u"?h.env:{};globalThis.DEBUG??=vr.DEBUG??"";globalThis.DEBUG_COLORS??=vr.DEBUG_COLORS?vr.DEBUG_COLORS==="true":!0;var rt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function os(e){let t={color:kn[is++%kn.length],enabled:rt.enabled(e),namespace:e,log:rt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&_t.push([o,...n]),_t.length>ns&&_t.shift(),rt.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:ss(T)),g=`+${Date.now()-Mn}ms`;Mn=Date.now(),a(o,...u,g)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Tr=new Proxy(os,{get:(e,t)=>rt[t],set:(e,t,r)=>rt[t]=r});function ss(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function In(){_t.length=0}var ee=Tr;c();m();p();d();f();l();c();m();p();d();f();l();var Cr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];c();m();p();d();f();l();var Dn="library";function it(e){let t=ms();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Dn)}function ms(){let e=h.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}c();m();p();d();f();l();c();m();p();d();f();l();var Dt;(t=>{let e;(_=>(_.findUnique="findUnique",_.findUniqueOrThrow="findUniqueOrThrow",_.findFirst="findFirst",_.findFirstOrThrow="findFirstOrThrow",_.findMany="findMany",_.create="create",_.createMany="createMany",_.createManyAndReturn="createManyAndReturn",_.update="update",_.updateMany="updateMany",_.updateManyAndReturn="updateManyAndReturn",_.upsert="upsert",_.delete="delete",_.deleteMany="deleteMany",_.groupBy="groupBy",_.count="count",_.aggregate="aggregate",_.findRaw="findRaw",_.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Dt||={});var st={};St(st,{error:()=>fs,info:()=>ds,log:()=>ps,query:()=>gs,should:()=>qn,tags:()=>ot,warn:()=>Rr});c();m();p();d();f();l();var ot={error:Ne("prisma:error"),warn:Rn("prisma:warn"),info:Sn("prisma:info"),query:An("prisma:query")},qn={warn:()=>!h.env.PRISMA_DISABLE_WARNINGS};function ps(...e){console.log(...e)}function Rr(e,...t){qn.warn()&&console.warn(`${ot.warn} ${e}`,...t)}function ds(e,...t){console.info(`${ot.info} ${e}`,...t)}function fs(e,...t){console.error(`${ot.error} ${e}`,...t)}function gs(e,...t){console.log(`${ot.query} ${e}`,...t)}c();m();p();d();f();l();function Nt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}c();m();p();d();f();l();function we(e,t){throw new Error(t)}c();m();p();d();f();l();function Ar(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var Sr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});c();m();p();d();f();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();m();p();d();f();l();function Or(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Qn.has(e)||(Qn.add(e),Rr(t,...r))};var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};te(I,"PrismaClientInitializationError");c();m();p();d();f();l();var Y=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};te(Y,"PrismaClientKnownRequestError");c();m();p();d();f();l();var Ee=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};te(Ee,"PrismaClientRustPanicError");c();m();p();d();f();l();var Q=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};te(Q,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};te(G,"PrismaClientValidationError");c();m();p();d();f();l();l();function qe(e){return e===null?e:Array.isArray(e)?e.map(qe):typeof e=="object"?ys(e)?bs(e):Ue(e,qe):e}function ys(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function bs({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ce(t);case"Json":return JSON.parse(t);default:we(t,"Unknown tagged value")}}c();m();p();d();f();l();c();m();p();d();f();l();function Be(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();function $e(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Ut(e){return e.toString()!=="Invalid Date"}c();m();p();d();f();l();l();function Ve(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();m();p();d();f();l();c();m();p();d();f();l();var ws=_e(Un());var Es={red:Ne,gray:On,dim:Lt,bold:It,underline:Tn,highlightSource:e=>e.highlight()},xs={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ps({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function vs({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Ts(t))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Ts(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function qt(e){let t=e.showColors?Es:xs,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ps(e),vs(r,t)}c();m();p();d();f();l();var Xn=_e(kr());c();m();p();d();f();l();function Hn(e,t,r){let n=zn(e),i=Cs(n),o=As(i);o?Bt(o,t,r):t.addErrorMessage(()=>"Unknown error")}function zn(e){return e.errors.flatMap(t=>t.kind==="Union"?zn(t):[t])}function Cs(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Rs(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Rs(e,t){return[...new Set(e.concat(t))]}function As(e){return Or(e,(t,r)=>{let n=Wn(t),i=Wn(r);return n!==i?n-i:Kn(t)-Kn(r)})}function Wn(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Kn(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();m();p();d();f();l();var re=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();m();p();d();f();l();c();m();p();d();f();l();var je=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};c();m();p();d();f();l();c();m();p();d();f();l();var $t=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();m();p();d();f();l();var Vt=e=>e,jt={bold:Vt,red:Vt,green:Vt,dim:Vt,enabled:!1},Yn={bold:It,red:Ne,green:Cn,dim:Lt,enabled:!0},Qe={write(e){e.writeLine(",")}};c();m();p();d();f();l();var me=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();m();p();d();f();l();var ve=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Je=class extends ve{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new $t(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new me("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Qe,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ge=class e extends ve{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Je&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new me("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Qe,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();m();p();d();f();l();var J=class extends ve{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new me(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();m();p();d();f();l();var lt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Qe,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Bt(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Os(e,t);break;case"IncludeOnScalar":ks(e,t);break;case"EmptySelection":Ms(e,t,r);break;case"UnknownSelectionField":Ds(e,t);break;case"InvalidSelectionValue":Fs(e,t);break;case"UnknownArgument":Ns(e,t);break;case"UnknownInputField":Us(e,t);break;case"RequiredArgumentMissing":qs(e,t);break;case"InvalidArgumentType":Bs(e,t);break;case"InvalidArgumentValue":$s(e,t);break;case"ValueTooLarge":Vs(e,t);break;case"SomeFieldsMissing":js(e,t);break;case"TooManyFieldsGiven":Qs(e,t);break;case"Union":Hn(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Os(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ks(e,t){let[r,n]=ut(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new re(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ct(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ms(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Is(e,t,i);return}if(n.hasField("select")){Ls(e,t);return}}if(r?.[Be(e.outputType.name)]){_s(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Is(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new re(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ls(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ti(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ct(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function _s(e,t){let r=new lt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new re("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ut(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new Ge;u.addSuggestion(n),a.value=u}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ds(e,t){let r=ri(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":ti(n,e.outputType);break;case"include":Js(n,e.outputType);break;case"omit":Gs(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ct(n)),i.join(" ")})}function Fs(e,t){let r=ri(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ns(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ws(n,e.arguments)),t.addErrorMessage(i=>Zn(i,r,e.arguments.map(o=>o.name)))}function Us(e,t){let[r,n]=ut(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ni(o,e.inputType)}t.addErrorMessage(o=>Zn(o,n,e.inputType.fields.map(s=>s.name)))}function Zn(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Hs(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ct(e)),n.join(" ")}function qs(e,t){let r;t.addErrorMessage(u=>r?.value instanceof J&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ut(e.argumentPath),s=new lt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new re(o,s).makeRequired())}else{let u=e.inputTypes.map(ei).join(" | ");a.addSuggestion(new re(o,u).makeRequired())}}function ei(e){return e.kind==="list"?`${ei(e.elementType)}[]`:e.name}function Bs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Qt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function $s(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Qt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Vs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof J&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function js(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ni(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Qt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ct(i)),o.join(" ")})}function Qs(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Qt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ti(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,"true"))}function Js(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new re(r.name,"true"))}function Gs(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new re(r.name,"true"))}function Ws(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function ri(e,t){let[r,n]=ut(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),u=o?.getField(n);return o&&u?{parentKind:"select",parent:o,field:u,fieldName:n}:(u=s?.getField(n),s&&u?{parentKind:"include",field:u,parent:s,fieldName:n}:(u=a?.getField(n),a&&u?{parentKind:"omit",field:u,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ni(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function ut(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ct({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Qt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ks=3;function Hs(e,t){let r=1/0,n;for(let i of t){let o=(0,Xn.default)(e,i);o>Ks||o`}};function We(e){return e instanceof mt}c();m();p();d();f();l();var Jt=Symbol(),Mr=new WeakMap,xe=class{constructor(t){t===Jt?Mr.set(this,`Prisma.${this._getName()}`):Mr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mr.get(this)}},pt=class extends xe{_getNamespace(){return"NullTypes"}},dt=class extends pt{};Ir(dt,"DbNull");var ft=class extends pt{};Ir(ft,"JsonNull");var gt=class extends pt{};Ir(gt,"AnyNull");var Gt={classes:{DbNull:dt,JsonNull:ft,AnyNull:gt},instances:{DbNull:new dt(Jt),JsonNull:new ft(Jt),AnyNull:new gt(Jt)}};function Ir(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();var oi=": ",Wt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+oi.length}write(t){let r=new me(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(oi).write(this.value)}};var Lr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ke(e){return new Lr(si(e))}function si(e){let t=new Ge;for(let[r,n]of Object.entries(e)){let i=new Wt(r,ai(n));t.addField(i)}return t}function ai(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(Ve(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return b.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Ut(e)?e.toISOString():"Invalid Date";return new J(`new Date("${t}")`)}return e instanceof xe?new J(`Prisma.${e._getName()}`):We(e)?new J(`prisma.${ii(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?zs(e):typeof e=="object"?si(e):new J(Object.prototype.toString.call(e))}function zs(e){let t=new Je;for(let r of e)t.addItem(ai(r));return t}function Kt(e,t){let r=t==="pretty"?Yn:jt,n=e.renderAllMessages(r),i=new je(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ht({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ke(e);for(let C of t)Bt(C,a,s);let{message:u,args:g}=Kt(a,r),T=qt({message:u,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new G(T,{clientVersion:o})}c();m();p();d();f();l();c();m();p();d();f();l();var pe=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();m();p();d();f();l();function ht(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();m();p();d();f();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}c();m();p();d();f();l();function ui(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ys({...e,...li(t.name,e,t.result.$allModels),...li(t.name,e,t.result[n])})}function Ys(e){let t=new pe,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function li(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Xs(t,o,i)})):{}}function Xs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ci(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function mi(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var zt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new pe;this.modelExtensionsCache=new pe;this.queryCallbacksCache=new pe;this.clientExtensions=ht(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=ht(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ui(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},He=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new zt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new zt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();m();p();d();f();l();c();m();p();d();f();l();var pi=Symbol(),yt=class{constructor(t){if(t!==pi)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Yt:t}},Yt=new yt(pi);function fe(e){return e instanceof yt}var Zs={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},di="explicitly `undefined` values are not allowed";function Xt({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=He.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T}){let C=new _r({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T});return{modelName:e,action:Zs[t],query:bt(r,C)}}function bt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:gi(r,n),selection:ea(e,t,i,n)}}function ea(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ia(e,n)):ta(n,t,r)}function ta(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ra(n,t,e),na(n,r,e),n}function ra(e,t,r){for(let[n,i]of Object.entries(t)){if(fe(i))continue;let o=r.nestSelection(n);if(Dr(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=bt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=bt(i,o)}}function na(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=mi(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Dr(a,r.nestSelection(s));let u=r.findField(s);n?.[s]&&!u||(e[s]=!a)}}function ia(e,t){let r={},n=t.getComputedFields(),i=ci(e,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=t.nestSelection(o);Dr(s,a);let u=t.findField(o);if(!(n?.[o]&&!u)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){u?.kind==="object"?r[o]=bt({},a):r[o]=!0;continue}r[o]=bt(s,a)}}return r}function fi(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if($e(e)){if(Ut(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(We(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return oa(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if(sa(e))return e.values;if(Ve(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof xe){if(e!==Gt.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(aa(e))return e.toJSON();if(typeof e=="object")return gi(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function gi(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);fe(i)||(i!==void 0?r[n]=fi(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:di}))}return r}function oa(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Be(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:we(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();m();p();d();f();l();var ze=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};c();m();p();d();f();l();function hi(e){return{models:Fr(e.models),enums:Fr(e.enums),types:Fr(e.types)}}function Fr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function yi(e,t){let r=ht(()=>la(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function la(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Nr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ur=new WeakMap,Zt="$$PrismaTypedSql",qr=class{constructor(t,r){Ur.set(this,{sql:t,values:r}),Object.defineProperty(this,Zt,{value:Zt})}get sql(){return Ur.get(this).sql}get values(){return Ur.get(this).values}};function bi(e){return(...t)=>new qr(e,t)}function wi(e){return e!=null&&e[Zt]===Zt}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();function wt(e){return{ok:!1,error:e,map(){return wt(e)},flatMap(){return wt(e)}}}var Br=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},$r=e=>{let t=new Br,r=ge(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:ge(t,e.queryRaw.bind(e)),executeRaw:ge(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ua(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ma(t,e.getConnectionInfo.bind(e))),n},ua=(e,t)=>{let r=ge(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>ca(e,o))}},ca=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),commit:ge(e,t.commit.bind(t)),rollback:ge(e,t.rollback.bind(t))});function ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return wt({kind:"GenericJs",id:i})}}}function ma(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return wt({kind:"GenericJs",id:i})}}}var Mo=_e(Ei());var IO=_e(xi());Fn();wn();_n();c();m();p();d();f();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();m();p();d();f();l();c();m();p();d();f();l();var er={enumerable:!0,configurable:!0,writable:!0};function tr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>er,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ti=Symbol.for("nodejs.util.inspect.custom");function he(e,t){let r=da(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ci(Reflect.ownKeys(o),r),a=Ci(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...er,...u?.getPropertyDescriptor(s)}:er:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ti]=function(){let o={...this};return delete o[Ti],o},i}function da(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ci(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function Ye(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function rr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();function Ri(e){if(e===void 0)return"";let t=Ke(e);return new je(0,{colors:jt}).write(t).toString()}c();m();p();d();f();l();var fa="P2037";function nr({error:e,user_facing_error:t},r,n){return t.error_code?new Y(ga(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Q(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ga(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===fa&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Qr=class{getLocation(){return null}};function Te(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qr}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Ai={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Xe(e={}){let t=ya(e);return Object.entries(t).reduce((n,[i,o])=>(Ai[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ya(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Si(e,t){let r=ir(e);return t({action:"aggregate",unpacker:r,argsMapper:Xe})(e)}c();m();p();d();f();l();function ba(e={}){let{select:t,...r}=e;return typeof t=="object"?Xe({...r,_count:t}):Xe({...r,_count:{_all:!0}})}function wa(e={}){return typeof e.select=="object"?t=>ir(e)(t)._count:t=>ir(e)(t)._count._all}function Oi(e,t){return t({action:"count",unpacker:wa(e),argsMapper:ba})(e)}c();m();p();d();f();l();function Ea(e={}){let t=Xe(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function xa(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ki(e,t){return t({action:"groupBy",unpacker:xa(e),argsMapper:Ea})(e)}function Mi(e,t,r){if(t==="aggregate")return n=>Si(n,r);if(t==="count")return n=>Oi(n,r);if(t==="groupBy")return n=>ki(n,r)}c();m();p();d();f();l();function Ii(e,t){let r=t.fields.filter(i=>!i.relationName),n=Sr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...tr(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var Li=e=>Array.isArray(e)?e:e.split("."),Jr=(e,t)=>Li(t).reduce((r,n)=>r&&r[n],e),_i=(e,t,r)=>Li(t).reduceRight((n,i,o,s)=>Object.assign({},Jr(e,s.slice(0,o)),{[i]:n}),r);function Pa(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function va(e,t,r){return t===void 0?e??{}:_i(t,r,e||!0)}function Gr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,g)=>({...u,[g.name]:g}),{});return u=>{let g=Te(e._errorFormat),T=Pa(n,i),C=va(u,o,T),O=r({dataPath:T,callsite:g})(C),A=Ta(e,t);return new Proxy(O,{get(k,S){if(!A.includes(S))return k[S];let ie=[a[S].type,r,S],K=[T,C];return Gr(e,...ie,...K)},...tr([...A,...Object.getOwnPropertyNames(O)])})}}function Ta(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Ca=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Ra=["aggregate","count","groupBy"];function Wr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Aa(e,t),Oa(e,t),Et(r),W("name",()=>t),W("$name",()=>t),W("$parent",()=>e._appliedParent)];return he({},n)}function Aa(e,t){let r=de(t),n=Object.keys(Dt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>u=>{let g=Te(e._errorFormat);return e._createPrismaPromise(T=>{let C={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:T,callsite:g};return e._request({...C,...a})})};return Ca.includes(o)?Gr(e,t,s):Sa(i)?Mi(e,i,s):s({})}}}function Sa(e){return Ra.includes(e)}function Oa(e,t){return ke(W("fields",()=>{let r=e._runtimeDataModel.models[t];return Ii(t,r)}))}c();m();p();d();f();l();function Di(e){return e.replace(/^./,t=>t.toUpperCase())}var Kr=Symbol();function xt(e){let t=[ka(e),W(Kr,()=>e),W("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Et(r)),he(e,t)}function ka(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return ke({getKeys(){return n},getPropertyValue(i){let o=Di(i);if(e._runtimeDataModel.models[o]!==void 0)return Wr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fi(e){return e[Kr]?e[Kr]:e}function Ni(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return xt(t)}c();m();p();d();f();l();c();m();p();d();f();l();function Ui({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let g=u.needs.filter(T=>n[T]);g.length>0&&a.push(Ye(g))}else if(r){if(!r[u.name])continue;let g=u.needs.filter(T=>!r[T]);g.length>0&&a.push(Ye(g))}Ma(e,u.needs)&&s.push(Ia(u,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Ma(e,t){return t.every(r=>Ar(e,r))}function Ia(e,t){return ke(W(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function or({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sT.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let g=typeof s=="object"?s:{};t[o]=or({visitor:i,result:t[o],args:g,modelName:u.type,runtimeDataModel:n})}}function Bi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:or({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,g)=>{let T=de(u);return Ui({result:a,modelName:T,select:g.select,omit:g.select?void 0:{...o?.[T],...g.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function $i(e){if(e instanceof X)return La(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$i(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(o,u),a.args=s,ji(e,a,r,n+1)}})})}function Qi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ji(e,t,s)}function Ji(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Gi(r,n,0,e):e(r)}}function Gi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(i,u),Gi(a,t,r+1,n)}})}var Vi=e=>e;function Wi(e=Vi,t=Vi){return r=>e(t(r))}c();m();p();d();f();l();var Ki=ee("prisma:client"),Hi={Vercel:"vercel","Netlify CI":"netlify"};function zi({postinstall:e,ciName:t,clientVersion:r}){if(Ki("checkPlatformCaching:postinstall",e),Ki("checkPlatformCaching:ciName",t),e===!0&&t&&t in Hi){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Hi[t]}-build`;throw console.error(n),new I(n,r)}}c();m();p();d();f();l();function Yi(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var _a="Cloudflare-Workers",Da="node";function Xi(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===_a?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Da?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Fa={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ce(){let e=Xi();return{id:e,prettyName:Fa[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function sr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ce().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Zi(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Hr,eo={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ce().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Hr===void 0&&(Hr=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},u=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(u.exports),o.QueryEngine})());let i=await Hr;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Na="P2036",ye=ee("prisma:client:libraryEngine");function Ua(e){return e.item_type==="query"&&"query"in e}function qa(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var xR=[...Cr,"native"],Ba=0xffffffffffffffffn,zr=1n;function $a(){let e=zr++;return zr>Ba&&(zr=1n),e}var vt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??eo,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=$a().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(Va(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Y(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(ye("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&ye("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:h.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Ua(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(qa(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ye(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{ye("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,ye("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ye("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),ye("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,ye("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){ye(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new Q(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){ye("requestBatch");let i=rr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Zi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new Q(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0]):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:nr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Na&&this.config.adapter){let r=t.meta?.id;Nt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Nt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Va(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var Tt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",ar=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(Tt,this.config.clientVersion)}metrics(t){throw new I(Tt,this.config.clientVersion)}request(t,r){throw new I(Tt,this.config.clientVersion)}requestBatch(t,r){throw new I(Tt,this.config.clientVersion)}applyPendingMigrations(){throw new I(Tt,this.config.clientVersion)}};function to({copyEngine:e=!0},t){let r;try{r=sr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...h.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&at("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=it(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",u=i==="binary";if(o&&s||s&&!1){let g;throw e?r?.startsWith("prisma://")?g=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:g=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:g=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new G(g.join(` -`),{clientVersion:t.clientVersion})}if(s)return new vt(t);if(o)return new ar(t);{let g=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ce().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new G(g.join(` -`),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function lr({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();var ro=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var no=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function Ze(e){try{return io(e,"fast")}catch{return io(e,"slow")}}function io(e,t){return JSON.stringify(e.map(r=>so(r,t)))}function so(e,t){if(Array.isArray(e))return e.map(r=>so(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if($e(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ce.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(b.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(ja(e))return{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?ao(e):e}function ja(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ao(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(oo);let t={};for(let r of Object.keys(e))t[r]=oo(e[r]);return t}function oo(e){return typeof e=="bigint"?e.toString():ao(e)}c();m();p();d();f();l();var Qa=["$connect","$disconnect","$on","$transaction","$use","$extends"],lo=Qa;var Ja=/^(\s*alter\s)/i,uo=ee("prisma:client");function Yr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ja.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Xr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(wi(r))n=r.sql,i={values:Ze(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ze(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ze(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ze(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=no(r),i={values:Ze(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?uo(`prisma.${e}(${n}, ${i.values})`):uo(`prisma.${e}(${n})`),{query:n,parameters:i}},co={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},mo={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function Zr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=po(r(o)):po(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function po(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var Ga={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},en=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Ga}};function fo(){return new en}c();m();p();d();f();l();function go(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();m();p();d();f();l();function ho(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();m();p();d();f();l();var ur=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();m();p();d();f();l();var bo=_e(jn());c();m();p();d();f();l();function cr(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();function yo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(tn(e.query.arguments)),t.push(tn(e.query.selection)),t.join("")}function tn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${tn(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Wa={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function rn(e){return Wa[e]}c();m();p();d();f();l();var mr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,h.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iMe("bigint",r));case"bytes-array":return t.map(r=>Me("bytes",r));case"decimal-array":return t.map(r=>Me("decimal",r));case"datetime-array":return t.map(r=>Me("datetime",r));case"date-array":return t.map(r=>Me("date",r));case"time-array":return t.map(r=>Me("time",r));default:return t}}function pr(e){let t=[],r=Ka(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),g=n.some(C=>rn(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:za(o),containsWrite:g,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?wo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:rn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return h.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ha(t),Ya(t,i))throw t;if(t instanceof Y&&Xa(t)){let g=Eo(t.meta);Ht({args:o,errors:[g],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=qt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let g=s?{modelName:s,...t.meta}:t.meta;throw new Y(u,{code:t.code,clientVersion:this.client._clientVersion,meta:g,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ee(u,this.client._clientVersion);if(t instanceof Q)throw new Q(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(u,this.client._clientVersion);if(t instanceof Ee)throw new Ee(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,bo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(g=>g!=="select"&&g!=="include"),a=Jr(o,s),u=i==="queryRaw"?pr(a):qe(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function za(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:wo(e)};we(e,"Unknown transaction kind")}}function wo(e){return{id:e.id,payload:e.payload}}function Ya(e,t){return cr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Xa(e){return e.code==="P2009"||e.code==="P2012"}function Eo(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Eo)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var xo="6.2.1";var Po=xo;c();m();p();d();f();l();var Ao=_e(kr());c();m();p();d();f();l();var L=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};te(L,"PrismaClientConstructorValidationError");var vo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],To=["pretty","colorless","minimal"],Co=["info","query","warn","error"],el={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=et(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new L(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!lr(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(it()==="binary")throw new L('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!To.includes(e)){let t=et(e,To);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Co.includes(r)){let n=et(r,Co);throw new L(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=et(i,o);throw new L(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new L(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new L(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new L(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=rl(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let u=o.fields.find(g=>g.name===s);if(!u){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(u.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new L(nl(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=et(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function So(e,t){for(let[r,n]of Object.entries(e)){if(!vo.includes(r)){let i=et(r,vo);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}el[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function et(e,t){if(t.length===0||typeof e!="string")return"";let r=tl(e,t);return r?` Did you mean "${r}"?`:""}function tl(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ao.default)(e,i)}));r.sort((i,o)=>i.distanceBe(n)===t);if(r)return e[r]}function nl(e,t){let r=Ke(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Kt(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}c();m();p();d();f();l();function Oo(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=g=>{o||(o=!0,r(g))};for(let g=0;g{n[g]=T,a()},T=>{if(!cr(T)){u(T);return}T.batchRequestIdx===g?u(T):(i||(i=T),a())})})}var Re=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var il={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ol=Symbol.for("prisma.client.transaction.id"),sl={id:0,nextId(){return++this.id}};function Io(e){class t{constructor(n){this._originalClient=this;this._middlewares=new ur;this._createPrismaPromise=Zr();this.$extends=Ni;e=n?.__internal?.configOverride?.(e)??e,zi(e),n&&So(n,e);let i=new Ft().on("error",()=>{});this._extensions=He.empty(),this._previewFeatures=lr(e),this._clientVersion=e.clientVersion??Po,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=fo();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&nt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&nt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=$r(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${u}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let u=n??{},g=u.__internal??{},T=g.debug===!0;T&&ee.enable("prisma:client");let C=nt.resolve(e.dirname,e.relativePath);bn.existsSync(C)||(C=e.dirname),Re("dirname",e.dirname),Re("relativePath",e.relativePath),Re("cwd",C);let O=g.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:h.env.NODE_ENV==="production"?this._errorFormat="minimal":h.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:nt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&ho(u.log),logQueries:u.log&&!!(typeof u.log=="string"?u.log==="query":u.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Yi(u,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:u.transactionOptions?.maxWait??2e3,timeout:u.transactionOptions?.timeout??5e3,isolationLevel:u.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:sr,getBatchRequestPayload:rr,prismaGraphQLToJSError:nr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Y,debug:ee("prisma:client:accelerateEngine"),engineVersion:Mo.version,clientVersion:e.clientVersion}},Re("clientVersion",e.clientVersion),this._engine=to(e,this._engineConfig),this._requestHandler=new dr(this,i),u.log)for(let A of u.log){let k=typeof A=="string"?A:A.emit==="stdout"?A.level:null;k&&this.$on(k,S=>{st.log(`${st.tags[k]??""}`,S.message||S.query)})}this._metrics=new ze(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}return this._appliedParent=xt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{In()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ko(n,i);return Yr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Yr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ro,callsite:Te(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ko(n,i));throw new G("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new G("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=sl.nextId(),s=go(n.length),a=n.map((u,g)=>{if(u?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:g,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return Oo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let g={kind:"itx",...a};u=await n(this._createItxClient(g)),await this._engine.transaction("commit",o,a)}catch(g){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),g}return u}_createItxClient(n){return xt(he(Fi(this),[W("_appliedParent",()=>this._appliedParent._createItxClient(n)),W("_createPrismaPromise",()=>Zr(n)),W(ol,()=>n.id),Ye(lo)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??il,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,M=>T(g,ie=>(M?.end(),u(ie))));let{runInTransaction:C,args:O,...A}=g,k={...n,...A};O&&(k.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete k.transaction;let S=await Qi(this,k);return k.model?Bi({result:S,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:g,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=g?g(n):n;let k={name:"serialize"},S=this._tracingHelper.runInChildSpan(k,()=>Xt({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(Re("Prisma Client call:"),Re(`prisma.${i}(${Ri(n)})`),Re("Generated request:"),Re(JSON.stringify(S,null,2)+` -`)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(k){throw k.clientVersion=this._clientVersion,k}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new G("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ko(e,t){return al(e)?[new X(e,t),co]:[e,mo]}function al(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var ll=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Lo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ll.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();m();p();d();f();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm.js.map diff --git a/charybdis/cloud-prisma/cloud-prisma-client/schema.prisma b/charybdis/cloud-prisma/cloud-prisma-client/schema.prisma deleted file mode 100644 index 3c42ba3b..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/schema.prisma +++ /dev/null @@ -1,42 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" - output = "cloud-prisma-client" -} - -datasource db { - provider = "postgresql" - url = env("CLOUD_DATABASE_URL") -} - -model run { - id String @id @default(uuid()) - runId Int @default(autoincrement()) - driverName String - notes String - time DateTime @db.Timestamptz() - - data data[] -} - -model data { - values Float[] - time DateTime @db.Timestamptz() - - dataTypeName String - dataType data_type @relation(fields: [dataTypeName], references: [name]) - runId String - run run @relation(fields: [runId], references: [id]) - - @@id([time, dataTypeName]) -} - -model data_type { - name String @id - unit String - nodeName String - - data data[] -} diff --git a/charybdis/cloud-prisma/cloud-prisma-client/wasm.d.ts b/charybdis/cloud-prisma/cloud-prisma-client/wasm.d.ts deleted file mode 100644 index bc20c6c1..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/charybdis/cloud-prisma/cloud-prisma-client/wasm.js b/charybdis/cloud-prisma/cloud-prisma-client/wasm.js deleted file mode 100644 index 0d417148..00000000 --- a/charybdis/cloud-prisma/cloud-prisma-client/wasm.js +++ /dev/null @@ -1,187 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/charybdis/local-prisma/local-prisma-client/default.d.ts b/charybdis/local-prisma/local-prisma-client/default.d.ts deleted file mode 100644 index bc20c6c1..00000000 --- a/charybdis/local-prisma/local-prisma-client/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/default.js b/charybdis/local-prisma/local-prisma-client/default.js deleted file mode 100644 index fa52f0cd..00000000 --- a/charybdis/local-prisma/local-prisma-client/default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/edge.d.ts b/charybdis/local-prisma/local-prisma-client/edge.d.ts deleted file mode 100644 index 274b8fa6..00000000 --- a/charybdis/local-prisma/local-prisma-client/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./default" \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/edge.js b/charybdis/local-prisma/local-prisma-client/edge.js deleted file mode 100644 index f296717d..00000000 --- a/charybdis/local-prisma/local-prisma-client/edge.js +++ /dev/null @@ -1,198 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/edge.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/local-prisma/local-prisma-client", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin-arm64", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/local-prisma/schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "6.2.1", - "engineVersion": "4123509d24aa4dede1e864b46351bf2790323b69", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "LOCAL_DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"local-prisma-client\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"LOCAL_DATABASE_URL\")\n}\n\nmodel run {\n id String @id @default(uuid())\n runId Int @default(autoincrement())\n driverName String\n notes String\n time DateTime @db.Timestamptz()\n\n data data[]\n}\n\nmodel data {\n values Float[]\n time DateTime @db.Timestamptz()\n\n dataTypeName String\n dataType data_type @relation(fields: [dataTypeName], references: [name])\n runId String\n run run @relation(fields: [runId], references: [id])\n\n @@id([time, dataTypeName])\n}\n\nmodel data_type {\n name String @id\n unit String\n nodeName String\n\n data data[]\n}\n", - "inlineSchemaHash": "fc61965166ac92fef8954516a9a2a31c11a230ac242cb534a2ddf7fd55700d79", - "copyEngine": true -} -config.dirname = '/' - -config.runtimeDataModel = JSON.parse("{\"models\":{\"run\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driverName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"values\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataTypeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data_type\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[\"dataTypeName\"],\"relationToFields\":[\"name\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"run\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"run\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[\"runId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"time\",\"dataTypeName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data_type\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"unit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nodeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - -config.injectableEdgeEnv = () => ({ - parsed: { - LOCAL_DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['LOCAL_DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.LOCAL_DATABASE_URL || undefined - } -}) - -if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { - Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) -} - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - diff --git a/charybdis/local-prisma/local-prisma-client/index-browser.js b/charybdis/local-prisma/local-prisma-client/index-browser.js deleted file mode 100644 index 0d417148..00000000 --- a/charybdis/local-prisma/local-prisma-client/index-browser.js +++ /dev/null @@ -1,187 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/charybdis/local-prisma/local-prisma-client/index.d.ts b/charybdis/local-prisma/local-prisma-client/index.d.ts deleted file mode 100644 index 8e905be1..00000000 --- a/charybdis/local-prisma/local-prisma-client/index.d.ts +++ /dev/null @@ -1,5404 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions -import $Result = runtime.Types.Result - -export type PrismaPromise = $Public.PrismaPromise - - -/** - * Model run - * - */ -export type run = $Result.DefaultSelection -/** - * Model data - * - */ -export type data = $Result.DefaultSelection -/** - * Model data_type - * - */ -export type data_type = $Result.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg ?: Prisma.Subset); - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - -/** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> - - $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - - - $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, ClientOptions> - - /** - * `prisma.run`: Exposes CRUD operations for the **run** model. - * Example usage: - * ```ts - * // Fetch zero or more Runs - * const runs = await prisma.run.findMany() - * ``` - */ - get run(): Prisma.runDelegate; - - /** - * `prisma.data`: Exposes CRUD operations for the **data** model. - * Example usage: - * ```ts - * // Fetch zero or more Data - * const data = await prisma.data.findMany() - * ``` - */ - get data(): Prisma.dataDelegate; - - /** - * `prisma.data_type`: Exposes CRUD operations for the **data_type** model. - * Example usage: - * ```ts - * // Fetch zero or more Data_types - * const data_types = await prisma.data_type.findMany() - * ``` - */ - get data_type(): Prisma.data_typeDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError - export import PrismaClientValidationError = runtime.PrismaClientValidationError - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag - export import empty = runtime.empty - export import join = runtime.join - export import raw = runtime.raw - export import Sql = runtime.Sql - - - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal - - export type DecimalJsLike = runtime.DecimalJsLike - - /** - * Metrics - */ - export type Metrics = runtime.Metrics - export type Metric = runtime.Metric - export type MetricHistogram = runtime.MetricHistogram - export type MetricHistogramBucket = runtime.MetricHistogramBucket - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = $Public.Args - export import Payload = $Public.Payload - export import Result = $Public.Result - export import Exact = $Public.Exact - - /** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - - export import JsonObject = runtime.JsonObject - export import JsonArray = runtime.JsonArray - export import JsonValue = runtime.JsonValue - export import InputJsonObject = runtime.InputJsonObject - export import InputJsonArray = runtime.InputJsonArray - export import InputJsonValue = runtime.InputJsonValue - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never - private constructor() - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never - private constructor() - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never - private constructor() - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull - - type SelectAndInclude = { - select: any - include: any - } - - type SelectAndOmit = { - select: any - omit: any - } - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType> - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K - }[keyof T] - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K - } - - export type TrueKeys = TruthyKeys>> - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}) - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - K - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - - - /** - * Is T a Record? - */ - type IsObject = T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False - - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick // With K possibilities - }[K] - - type EitherStrict = Strict<__Either> - - type EitherLoose = ComputeRaw<__Either> - - type _Either< - O extends object, - K extends Key, - strict extends Boolean - > = { - 1: EitherStrict - 0: EitherLoose - }[strict] - - type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 - > = O extends unknown ? _Either : never - - export type Union = any - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K] - } & {} - - /** Helper Types for "Merge" **/ - export type IntersectOf = ( - U extends unknown ? (k: U) => void : never - ) extends (k: infer I) => void - ? I - : never - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf; - }>>; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O - : never>; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False - - // /** - // 1 - // */ - export type True = 1 - - /** - 0 - */ - export type False = 0 - - export type Not = { - 0: 1 - 1: 0 - }[B] - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0 - - export type Has = Not< - Extends, U1> - > - - export type Or = { - 0: { - 0: 0 - 1: 1 - } - 1: { - 0: 1 - 1: 1 - } - }[B1][B2] - - export type Keys = U extends unknown ? keyof U : never - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - - - /** - * Used by group by - */ - - export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never - } : never - - type FieldPaths< - T, - U = Omit - > = IsObject extends True ? U : T - - type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K - }[keyof T] - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never - type TupleToUnion = _TupleToUnion - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick> - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - - - export type FieldRef = runtime.FieldRef - - type FieldRefInputType = Model extends never ? never : FieldRef - - - export const ModelName: { - run: 'run', - data: 'data', - data_type: 'data_type' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: "run" | "data" | "data_type" - txIsolationLevel: Prisma.TransactionIsolationLevel - } - model: { - run: { - payload: Prisma.$runPayload - fields: Prisma.runFieldRefs - operations: { - findUnique: { - args: Prisma.runFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.runFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.runFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.runFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.runFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.runCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.runCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.runCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.runDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.runUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.runDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.runUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.runUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.runUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.RunAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.runGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.runCountArgs - result: $Utils.Optional | number - } - } - } - data: { - payload: Prisma.$dataPayload - fields: Prisma.dataFieldRefs - operations: { - findUnique: { - args: Prisma.dataFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.dataFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.dataFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.dataFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.dataFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.dataCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.dataCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.dataCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.dataDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.dataUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.dataDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.dataUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.dataUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.dataUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.DataAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.dataGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.dataCountArgs - result: $Utils.Optional | number - } - } - } - data_type: { - payload: Prisma.$data_typePayload - fields: Prisma.data_typeFieldRefs - operations: { - findUnique: { - args: Prisma.data_typeFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.data_typeFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.data_typeFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.data_typeFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.data_typeFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.data_typeCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.data_typeCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.data_typeCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.data_typeDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.data_typeUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.data_typeDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.data_typeUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.data_typeUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.data_typeUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Data_typeAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.data_typeGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.data_typeCountArgs - result: $Utils.Optional | number - } - } - } - } - } & { - other: { - payload: any - operations: { - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - } - } - } - export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> - export type DefaultPrismaClient = PrismaClient - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat - /** - * @example - * ``` - * // Defaults to stdout - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * ] - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[] - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number - timeout?: number - isolationLevel?: Prisma.TransactionIsolationLevel - } - /** - * Global configuration for omitting model fields by default. - * - * @example - * ``` - * const prisma = new PrismaClient({ - * omit: { - * user: { - * password: true - * } - * } - * }) - * ``` - */ - omit?: Prisma.GlobalOmitConfig - } - export type GlobalOmitConfig = { - run?: runOmit - data?: dataOmit - data_type?: data_typeOmit - } - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error' - export type LogDefinition = { - level: LogLevel - emit: 'stdout' | 'event' - } - - export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never - export type GetEvents = T extends Array ? - GetLogType | GetLogType | GetLogType | GetLogType - : never - - export type QueryEvent = { - timestamp: Date - query: string - params: string - duration: number - target: string - } - - export type LogEvent = { - timestamp: Date - message: string - target: string - } - /* End Types for Logging */ - - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy' - - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit - - export type Datasource = { - url?: string - } - - /** - * Count Types - */ - - - /** - * Count Type RunCountOutputType - */ - - export type RunCountOutputType = { - data: number - } - - export type RunCountOutputTypeSelect = { - data?: boolean | RunCountOutputTypeCountDataArgs - } - - // Custom InputTypes - /** - * RunCountOutputType without action - */ - export type RunCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the RunCountOutputType - */ - select?: RunCountOutputTypeSelect | null - } - - /** - * RunCountOutputType without action - */ - export type RunCountOutputTypeCountDataArgs = { - where?: dataWhereInput - } - - - /** - * Count Type Data_typeCountOutputType - */ - - export type Data_typeCountOutputType = { - data: number - } - - export type Data_typeCountOutputTypeSelect = { - data?: boolean | Data_typeCountOutputTypeCountDataArgs - } - - // Custom InputTypes - /** - * Data_typeCountOutputType without action - */ - export type Data_typeCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the Data_typeCountOutputType - */ - select?: Data_typeCountOutputTypeSelect | null - } - - /** - * Data_typeCountOutputType without action - */ - export type Data_typeCountOutputTypeCountDataArgs = { - where?: dataWhereInput - } - - - /** - * Models - */ - - /** - * Model run - */ - - export type AggregateRun = { - _count: RunCountAggregateOutputType | null - _avg: RunAvgAggregateOutputType | null - _sum: RunSumAggregateOutputType | null - _min: RunMinAggregateOutputType | null - _max: RunMaxAggregateOutputType | null - } - - export type RunAvgAggregateOutputType = { - runId: number | null - } - - export type RunSumAggregateOutputType = { - runId: number | null - } - - export type RunMinAggregateOutputType = { - id: string | null - runId: number | null - driverName: string | null - notes: string | null - time: Date | null - } - - export type RunMaxAggregateOutputType = { - id: string | null - runId: number | null - driverName: string | null - notes: string | null - time: Date | null - } - - export type RunCountAggregateOutputType = { - id: number - runId: number - driverName: number - notes: number - time: number - _all: number - } - - - export type RunAvgAggregateInputType = { - runId?: true - } - - export type RunSumAggregateInputType = { - runId?: true - } - - export type RunMinAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - } - - export type RunMaxAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - } - - export type RunCountAggregateInputType = { - id?: true - runId?: true - driverName?: true - notes?: true - time?: true - _all?: true - } - - export type RunAggregateArgs = { - /** - * Filter which run to aggregate. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned runs - **/ - _count?: true | RunCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: RunAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: RunSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: RunMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: RunMaxAggregateInputType - } - - export type GetRunAggregateType = { - [P in keyof T & keyof AggregateRun]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type runGroupByArgs = { - where?: runWhereInput - orderBy?: runOrderByWithAggregationInput | runOrderByWithAggregationInput[] - by: RunScalarFieldEnum[] | RunScalarFieldEnum - having?: runScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: RunCountAggregateInputType | true - _avg?: RunAvgAggregateInputType - _sum?: RunSumAggregateInputType - _min?: RunMinAggregateInputType - _max?: RunMaxAggregateInputType - } - - export type RunGroupByOutputType = { - id: string - runId: number - driverName: string - notes: string - time: Date - _count: RunCountAggregateOutputType | null - _avg: RunAvgAggregateOutputType | null - _sum: RunSumAggregateOutputType | null - _min: RunMinAggregateOutputType | null - _max: RunMaxAggregateOutputType | null - } - - type GetRunGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof RunGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type runSelect = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - data?: boolean | run$dataArgs - _count?: boolean | RunCountOutputTypeDefaultArgs - }, ExtArgs["result"]["run"]> - - export type runSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - }, ExtArgs["result"]["run"]> - - export type runSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - }, ExtArgs["result"]["run"]> - - export type runSelectScalar = { - id?: boolean - runId?: boolean - driverName?: boolean - notes?: boolean - time?: boolean - } - - export type runOmit = $Extensions.GetOmit<"id" | "runId" | "driverName" | "notes" | "time", ExtArgs["result"]["run"]> - export type runInclude = { - data?: boolean | run$dataArgs - _count?: boolean | RunCountOutputTypeDefaultArgs - } - export type runIncludeCreateManyAndReturn = {} - export type runIncludeUpdateManyAndReturn = {} - - export type $runPayload = { - name: "run" - objects: { - data: Prisma.$dataPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: string - runId: number - driverName: string - notes: string - time: Date - }, ExtArgs["result"]["run"]> - composites: {} - } - - type runGetPayload = $Result.GetResult - - type runCountArgs = - Omit & { - select?: RunCountAggregateInputType | true - } - - export interface runDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['run'], meta: { name: 'run' } } - /** - * Find zero or one Run that matches the filter. - * @param {runFindUniqueArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Run that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {runFindUniqueOrThrowArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Run that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindFirstArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Run that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindFirstOrThrowArgs} args - Arguments to find a Run - * @example - * // Get one Run - * const run = await prisma.run.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Runs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Runs - * const runs = await prisma.run.findMany() - * - * // Get first 10 Runs - * const runs = await prisma.run.findMany({ take: 10 }) - * - * // Only select the `id` - * const runWithIdOnly = await prisma.run.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Run. - * @param {runCreateArgs} args - Arguments to create a Run. - * @example - * // Create one Run - * const Run = await prisma.run.create({ - * data: { - * // ... data to create a Run - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Runs. - * @param {runCreateManyArgs} args - Arguments to create many Runs. - * @example - * // Create many Runs - * const run = await prisma.run.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Runs and returns the data saved in the database. - * @param {runCreateManyAndReturnArgs} args - Arguments to create many Runs. - * @example - * // Create many Runs - * const run = await prisma.run.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Runs and only return the `id` - * const runWithIdOnly = await prisma.run.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Run. - * @param {runDeleteArgs} args - Arguments to delete one Run. - * @example - * // Delete one Run - * const Run = await prisma.run.delete({ - * where: { - * // ... filter to delete one Run - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Run. - * @param {runUpdateArgs} args - Arguments to update one Run. - * @example - * // Update one Run - * const run = await prisma.run.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Runs. - * @param {runDeleteManyArgs} args - Arguments to filter Runs to delete. - * @example - * // Delete a few Runs - * const { count } = await prisma.run.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Runs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Runs - * const run = await prisma.run.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Runs and returns the data updated in the database. - * @param {runUpdateManyAndReturnArgs} args - Arguments to update many Runs. - * @example - * // Update many Runs - * const run = await prisma.run.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Runs and only return the `id` - * const runWithIdOnly = await prisma.run.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Run. - * @param {runUpsertArgs} args - Arguments to update or create a Run. - * @example - * // Update or create a Run - * const run = await prisma.run.upsert({ - * create: { - * // ... data to create a Run - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Run we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__runClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Runs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runCountArgs} args - Arguments to filter Runs to count. - * @example - * // Count the number of Runs - * const count = await prisma.run.count({ - * where: { - * // ... the filter for the Runs we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Run. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RunAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Run. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {runGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends runGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: runGroupByArgs['orderBy'] } - : { orderBy?: runGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetRunGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the run model - */ - readonly fields: runFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for run. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__runClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - data = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the run model - */ - interface runFieldRefs { - readonly id: FieldRef<"run", 'String'> - readonly runId: FieldRef<"run", 'Int'> - readonly driverName: FieldRef<"run", 'String'> - readonly notes: FieldRef<"run", 'String'> - readonly time: FieldRef<"run", 'DateTime'> - } - - - // Custom InputTypes - /** - * run findUnique - */ - export type runFindUniqueArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where: runWhereUniqueInput - } - - /** - * run findUniqueOrThrow - */ - export type runFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where: runWhereUniqueInput - } - - /** - * run findFirst - */ - export type runFindFirstArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of runs. - */ - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run findFirstOrThrow - */ - export type runFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which run to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of runs. - */ - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run findMany - */ - export type runFindManyArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter, which runs to fetch. - */ - where?: runWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of runs to fetch. - */ - orderBy?: runOrderByWithRelationInput | runOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing runs. - */ - cursor?: runWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` runs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` runs. - */ - skip?: number - distinct?: RunScalarFieldEnum | RunScalarFieldEnum[] - } - - /** - * run create - */ - export type runCreateArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The data needed to create a run. - */ - data: XOR - } - - /** - * run createMany - */ - export type runCreateManyArgs = { - /** - * The data used to create many runs. - */ - data: runCreateManyInput | runCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * run createManyAndReturn - */ - export type runCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelectCreateManyAndReturn | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * The data used to create many runs. - */ - data: runCreateManyInput | runCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * run update - */ - export type runUpdateArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The data needed to update a run. - */ - data: XOR - /** - * Choose, which run to update. - */ - where: runWhereUniqueInput - } - - /** - * run updateMany - */ - export type runUpdateManyArgs = { - /** - * The data used to update runs. - */ - data: XOR - /** - * Filter which runs to update - */ - where?: runWhereInput - } - - /** - * run updateManyAndReturn - */ - export type runUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * The data used to update runs. - */ - data: XOR - /** - * Filter which runs to update - */ - where?: runWhereInput - } - - /** - * run upsert - */ - export type runUpsertArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * The filter to search for the run to update in case it exists. - */ - where: runWhereUniqueInput - /** - * In case the run found by the `where` argument doesn't exist, create a new run with this data. - */ - create: XOR - /** - * In case the run was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * run delete - */ - export type runDeleteArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - /** - * Filter which run to delete. - */ - where: runWhereUniqueInput - } - - /** - * run deleteMany - */ - export type runDeleteManyArgs = { - /** - * Filter which runs to delete - */ - where?: runWhereInput - } - - /** - * run.data - */ - export type run$dataArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - where?: dataWhereInput - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - cursor?: dataWhereUniqueInput - take?: number - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * run without action - */ - export type runDefaultArgs = { - /** - * Select specific fields to fetch from the run - */ - select?: runSelect | null - /** - * Omit specific fields from the run - */ - omit?: runOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: runInclude | null - } - - - /** - * Model data - */ - - export type AggregateData = { - _count: DataCountAggregateOutputType | null - _avg: DataAvgAggregateOutputType | null - _sum: DataSumAggregateOutputType | null - _min: DataMinAggregateOutputType | null - _max: DataMaxAggregateOutputType | null - } - - export type DataAvgAggregateOutputType = { - values: number | null - } - - export type DataSumAggregateOutputType = { - values: number[] - } - - export type DataMinAggregateOutputType = { - time: Date | null - dataTypeName: string | null - runId: string | null - } - - export type DataMaxAggregateOutputType = { - time: Date | null - dataTypeName: string | null - runId: string | null - } - - export type DataCountAggregateOutputType = { - values: number - time: number - dataTypeName: number - runId: number - _all: number - } - - - export type DataAvgAggregateInputType = { - values?: true - } - - export type DataSumAggregateInputType = { - values?: true - } - - export type DataMinAggregateInputType = { - time?: true - dataTypeName?: true - runId?: true - } - - export type DataMaxAggregateInputType = { - time?: true - dataTypeName?: true - runId?: true - } - - export type DataCountAggregateInputType = { - values?: true - time?: true - dataTypeName?: true - runId?: true - _all?: true - } - - export type DataAggregateArgs = { - /** - * Filter which data to aggregate. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned data - **/ - _count?: true | DataCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: DataAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: DataSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: DataMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: DataMaxAggregateInputType - } - - export type GetDataAggregateType = { - [P in keyof T & keyof AggregateData]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type dataGroupByArgs = { - where?: dataWhereInput - orderBy?: dataOrderByWithAggregationInput | dataOrderByWithAggregationInput[] - by: DataScalarFieldEnum[] | DataScalarFieldEnum - having?: dataScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: DataCountAggregateInputType | true - _avg?: DataAvgAggregateInputType - _sum?: DataSumAggregateInputType - _min?: DataMinAggregateInputType - _max?: DataMaxAggregateInputType - } - - export type DataGroupByOutputType = { - values: number[] - time: Date - dataTypeName: string - runId: string - _count: DataCountAggregateOutputType | null - _avg: DataAvgAggregateOutputType | null - _sum: DataSumAggregateOutputType | null - _min: DataMinAggregateOutputType | null - _max: DataMaxAggregateOutputType | null - } - - type GetDataGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof DataGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type dataSelect = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectCreateManyAndReturn = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - }, ExtArgs["result"]["data"]> - - export type dataSelectScalar = { - values?: boolean - time?: boolean - dataTypeName?: boolean - runId?: boolean - } - - export type dataOmit = $Extensions.GetOmit<"values" | "time" | "dataTypeName" | "runId", ExtArgs["result"]["data"]> - export type dataInclude = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - export type dataIncludeCreateManyAndReturn = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - export type dataIncludeUpdateManyAndReturn = { - dataType?: boolean | data_typeDefaultArgs - run?: boolean | runDefaultArgs - } - - export type $dataPayload = { - name: "data" - objects: { - dataType: Prisma.$data_typePayload - run: Prisma.$runPayload - } - scalars: $Extensions.GetPayloadResult<{ - values: number[] - time: Date - dataTypeName: string - runId: string - }, ExtArgs["result"]["data"]> - composites: {} - } - - type dataGetPayload = $Result.GetResult - - type dataCountArgs = - Omit & { - select?: DataCountAggregateInputType | true - } - - export interface dataDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['data'], meta: { name: 'data' } } - /** - * Find zero or one Data that matches the filter. - * @param {dataFindUniqueArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Data that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {dataFindUniqueOrThrowArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Data that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindFirstArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Data that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindFirstOrThrowArgs} args - Arguments to find a Data - * @example - * // Get one Data - * const data = await prisma.data.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Data that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Data - * const data = await prisma.data.findMany() - * - * // Get first 10 Data - * const data = await prisma.data.findMany({ take: 10 }) - * - * // Only select the `values` - * const dataWithValuesOnly = await prisma.data.findMany({ select: { values: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Data. - * @param {dataCreateArgs} args - Arguments to create a Data. - * @example - * // Create one Data - * const Data = await prisma.data.create({ - * data: { - * // ... data to create a Data - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Data. - * @param {dataCreateManyArgs} args - Arguments to create many Data. - * @example - * // Create many Data - * const data = await prisma.data.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Data and returns the data saved in the database. - * @param {dataCreateManyAndReturnArgs} args - Arguments to create many Data. - * @example - * // Create many Data - * const data = await prisma.data.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Data and only return the `values` - * const dataWithValuesOnly = await prisma.data.createManyAndReturn({ - * select: { values: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Data. - * @param {dataDeleteArgs} args - Arguments to delete one Data. - * @example - * // Delete one Data - * const Data = await prisma.data.delete({ - * where: { - * // ... filter to delete one Data - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Data. - * @param {dataUpdateArgs} args - Arguments to update one Data. - * @example - * // Update one Data - * const data = await prisma.data.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Data. - * @param {dataDeleteManyArgs} args - Arguments to filter Data to delete. - * @example - * // Delete a few Data - * const { count } = await prisma.data.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Data - * const data = await prisma.data.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data and returns the data updated in the database. - * @param {dataUpdateManyAndReturnArgs} args - Arguments to update many Data. - * @example - * // Update many Data - * const data = await prisma.data.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Data and only return the `values` - * const dataWithValuesOnly = await prisma.data.updateManyAndReturn({ - * select: { values: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Data. - * @param {dataUpsertArgs} args - Arguments to update or create a Data. - * @example - * // Update or create a Data - * const data = await prisma.data.upsert({ - * create: { - * // ... data to create a Data - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Data we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__dataClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataCountArgs} args - Arguments to filter Data to count. - * @example - * // Count the number of Data - * const count = await prisma.data.count({ - * where: { - * // ... the filter for the Data we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DataAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Data. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {dataGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends dataGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: dataGroupByArgs['orderBy'] } - : { orderBy?: dataGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetDataGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the data model - */ - readonly fields: dataFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for data. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__dataClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - dataType = {}>(args?: Subset>): Prisma__data_typeClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> - run = {}>(args?: Subset>): Prisma__runClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the data model - */ - interface dataFieldRefs { - readonly values: FieldRef<"data", 'Float[]'> - readonly time: FieldRef<"data", 'DateTime'> - readonly dataTypeName: FieldRef<"data", 'String'> - readonly runId: FieldRef<"data", 'String'> - } - - - // Custom InputTypes - /** - * data findUnique - */ - export type dataFindUniqueArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where: dataWhereUniqueInput - } - - /** - * data findUniqueOrThrow - */ - export type dataFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where: dataWhereUniqueInput - } - - /** - * data findFirst - */ - export type dataFindFirstArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data. - */ - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data findFirstOrThrow - */ - export type dataFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data. - */ - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data findMany - */ - export type dataFindManyArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter, which data to fetch. - */ - where?: dataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data to fetch. - */ - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing data. - */ - cursor?: dataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data. - */ - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data create - */ - export type dataCreateArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The data needed to create a data. - */ - data: XOR - } - - /** - * data createMany - */ - export type dataCreateManyArgs = { - /** - * The data used to create many data. - */ - data: dataCreateManyInput | dataCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data createManyAndReturn - */ - export type dataCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelectCreateManyAndReturn | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * The data used to create many data. - */ - data: dataCreateManyInput | dataCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: dataIncludeCreateManyAndReturn | null - } - - /** - * data update - */ - export type dataUpdateArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The data needed to update a data. - */ - data: XOR - /** - * Choose, which data to update. - */ - where: dataWhereUniqueInput - } - - /** - * data updateMany - */ - export type dataUpdateManyArgs = { - /** - * The data used to update data. - */ - data: XOR - /** - * Filter which data to update - */ - where?: dataWhereInput - } - - /** - * data updateManyAndReturn - */ - export type dataUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * The data used to update data. - */ - data: XOR - /** - * Filter which data to update - */ - where?: dataWhereInput - /** - * Choose, which related nodes to fetch as well - */ - include?: dataIncludeUpdateManyAndReturn | null - } - - /** - * data upsert - */ - export type dataUpsertArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * The filter to search for the data to update in case it exists. - */ - where: dataWhereUniqueInput - /** - * In case the data found by the `where` argument doesn't exist, create a new data with this data. - */ - create: XOR - /** - * In case the data was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * data delete - */ - export type dataDeleteArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - /** - * Filter which data to delete. - */ - where: dataWhereUniqueInput - } - - /** - * data deleteMany - */ - export type dataDeleteManyArgs = { - /** - * Filter which data to delete - */ - where?: dataWhereInput - } - - /** - * data without action - */ - export type dataDefaultArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - } - - - /** - * Model data_type - */ - - export type AggregateData_type = { - _count: Data_typeCountAggregateOutputType | null - _min: Data_typeMinAggregateOutputType | null - _max: Data_typeMaxAggregateOutputType | null - } - - export type Data_typeMinAggregateOutputType = { - name: string | null - unit: string | null - nodeName: string | null - } - - export type Data_typeMaxAggregateOutputType = { - name: string | null - unit: string | null - nodeName: string | null - } - - export type Data_typeCountAggregateOutputType = { - name: number - unit: number - nodeName: number - _all: number - } - - - export type Data_typeMinAggregateInputType = { - name?: true - unit?: true - nodeName?: true - } - - export type Data_typeMaxAggregateInputType = { - name?: true - unit?: true - nodeName?: true - } - - export type Data_typeCountAggregateInputType = { - name?: true - unit?: true - nodeName?: true - _all?: true - } - - export type Data_typeAggregateArgs = { - /** - * Filter which data_type to aggregate. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned data_types - **/ - _count?: true | Data_typeCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Data_typeMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Data_typeMaxAggregateInputType - } - - export type GetData_typeAggregateType = { - [P in keyof T & keyof AggregateData_type]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type data_typeGroupByArgs = { - where?: data_typeWhereInput - orderBy?: data_typeOrderByWithAggregationInput | data_typeOrderByWithAggregationInput[] - by: Data_typeScalarFieldEnum[] | Data_typeScalarFieldEnum - having?: data_typeScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Data_typeCountAggregateInputType | true - _min?: Data_typeMinAggregateInputType - _max?: Data_typeMaxAggregateInputType - } - - export type Data_typeGroupByOutputType = { - name: string - unit: string - nodeName: string - _count: Data_typeCountAggregateOutputType | null - _min: Data_typeMinAggregateOutputType | null - _max: Data_typeMaxAggregateOutputType | null - } - - type GetData_typeGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof Data_typeGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type data_typeSelect = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - data?: boolean | data_type$dataArgs - _count?: boolean | Data_typeCountOutputTypeDefaultArgs - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectCreateManyAndReturn = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - name?: boolean - unit?: boolean - nodeName?: boolean - }, ExtArgs["result"]["data_type"]> - - export type data_typeSelectScalar = { - name?: boolean - unit?: boolean - nodeName?: boolean - } - - export type data_typeOmit = $Extensions.GetOmit<"name" | "unit" | "nodeName", ExtArgs["result"]["data_type"]> - export type data_typeInclude = { - data?: boolean | data_type$dataArgs - _count?: boolean | Data_typeCountOutputTypeDefaultArgs - } - export type data_typeIncludeCreateManyAndReturn = {} - export type data_typeIncludeUpdateManyAndReturn = {} - - export type $data_typePayload = { - name: "data_type" - objects: { - data: Prisma.$dataPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - name: string - unit: string - nodeName: string - }, ExtArgs["result"]["data_type"]> - composites: {} - } - - type data_typeGetPayload = $Result.GetResult - - type data_typeCountArgs = - Omit & { - select?: Data_typeCountAggregateInputType | true - } - - export interface data_typeDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['data_type'], meta: { name: 'data_type' } } - /** - * Find zero or one Data_type that matches the filter. - * @param {data_typeFindUniqueArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find one Data_type that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {data_typeFindUniqueOrThrowArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find the first Data_type that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindFirstArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> - - /** - * Find the first Data_type that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindFirstOrThrowArgs} args - Arguments to find a Data_type - * @example - * // Get one Data_type - * const data_type = await prisma.data_type.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Find zero or more Data_types that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Data_types - * const data_types = await prisma.data_type.findMany() - * - * // Get first 10 Data_types - * const data_types = await prisma.data_type.findMany({ take: 10 }) - * - * // Only select the `name` - * const data_typeWithNameOnly = await prisma.data_type.findMany({ select: { name: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> - - /** - * Create a Data_type. - * @param {data_typeCreateArgs} args - Arguments to create a Data_type. - * @example - * // Create one Data_type - * const Data_type = await prisma.data_type.create({ - * data: { - * // ... data to create a Data_type - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Create many Data_types. - * @param {data_typeCreateManyArgs} args - Arguments to create many Data_types. - * @example - * // Create many Data_types - * const data_type = await prisma.data_type.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Data_types and returns the data saved in the database. - * @param {data_typeCreateManyAndReturnArgs} args - Arguments to create many Data_types. - * @example - * // Create many Data_types - * const data_type = await prisma.data_type.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Data_types and only return the `name` - * const data_typeWithNameOnly = await prisma.data_type.createManyAndReturn({ - * select: { name: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> - - /** - * Delete a Data_type. - * @param {data_typeDeleteArgs} args - Arguments to delete one Data_type. - * @example - * // Delete one Data_type - * const Data_type = await prisma.data_type.delete({ - * where: { - * // ... filter to delete one Data_type - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Update one Data_type. - * @param {data_typeUpdateArgs} args - Arguments to update one Data_type. - * @example - * // Update one Data_type - * const data_type = await prisma.data_type.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> - - /** - * Delete zero or more Data_types. - * @param {data_typeDeleteManyArgs} args - Arguments to filter Data_types to delete. - * @example - * // Delete a few Data_types - * const { count } = await prisma.data_type.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data_types. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Data_types - * const data_type = await prisma.data_type.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Data_types and returns the data updated in the database. - * @param {data_typeUpdateManyAndReturnArgs} args - Arguments to update many Data_types. - * @example - * // Update many Data_types - * const data_type = await prisma.data_type.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Data_types and only return the `name` - * const data_typeWithNameOnly = await prisma.data_type.updateManyAndReturn({ - * select: { name: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> - - /** - * Create or update one Data_type. - * @param {data_typeUpsertArgs} args - Arguments to update or create a Data_type. - * @example - * // Update or create a Data_type - * const data_type = await prisma.data_type.upsert({ - * create: { - * // ... data to create a Data_type - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Data_type we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__data_typeClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> - - - /** - * Count the number of Data_types. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeCountArgs} args - Arguments to filter Data_types to count. - * @example - * // Count the number of Data_types - * const count = await prisma.data_type.count({ - * where: { - * // ... the filter for the Data_types we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Data_type. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Data_typeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Data_type. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {data_typeGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends data_typeGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: data_typeGroupByArgs['orderBy'] } - : { orderBy?: data_typeGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetData_typeGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the data_type model - */ - readonly fields: data_typeFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for data_type. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__data_typeClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - data = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the data_type model - */ - interface data_typeFieldRefs { - readonly name: FieldRef<"data_type", 'String'> - readonly unit: FieldRef<"data_type", 'String'> - readonly nodeName: FieldRef<"data_type", 'String'> - } - - - // Custom InputTypes - /** - * data_type findUnique - */ - export type data_typeFindUniqueArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type findUniqueOrThrow - */ - export type data_typeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type findFirst - */ - export type data_typeFindFirstArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data_types. - */ - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type findFirstOrThrow - */ - export type data_typeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_type to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of data_types. - */ - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type findMany - */ - export type data_typeFindManyArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter, which data_types to fetch. - */ - where?: data_typeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of data_types to fetch. - */ - orderBy?: data_typeOrderByWithRelationInput | data_typeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing data_types. - */ - cursor?: data_typeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` data_types from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` data_types. - */ - skip?: number - distinct?: Data_typeScalarFieldEnum | Data_typeScalarFieldEnum[] - } - - /** - * data_type create - */ - export type data_typeCreateArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The data needed to create a data_type. - */ - data: XOR - } - - /** - * data_type createMany - */ - export type data_typeCreateManyArgs = { - /** - * The data used to create many data_types. - */ - data: data_typeCreateManyInput | data_typeCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data_type createManyAndReturn - */ - export type data_typeCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelectCreateManyAndReturn | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * The data used to create many data_types. - */ - data: data_typeCreateManyInput | data_typeCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * data_type update - */ - export type data_typeUpdateArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The data needed to update a data_type. - */ - data: XOR - /** - * Choose, which data_type to update. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type updateMany - */ - export type data_typeUpdateManyArgs = { - /** - * The data used to update data_types. - */ - data: XOR - /** - * Filter which data_types to update - */ - where?: data_typeWhereInput - } - - /** - * data_type updateManyAndReturn - */ - export type data_typeUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * The data used to update data_types. - */ - data: XOR - /** - * Filter which data_types to update - */ - where?: data_typeWhereInput - } - - /** - * data_type upsert - */ - export type data_typeUpsertArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * The filter to search for the data_type to update in case it exists. - */ - where: data_typeWhereUniqueInput - /** - * In case the data_type found by the `where` argument doesn't exist, create a new data_type with this data. - */ - create: XOR - /** - * In case the data_type was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * data_type delete - */ - export type data_typeDeleteArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - /** - * Filter which data_type to delete. - */ - where: data_typeWhereUniqueInput - } - - /** - * data_type deleteMany - */ - export type data_typeDeleteManyArgs = { - /** - * Filter which data_types to delete - */ - where?: data_typeWhereInput - } - - /** - * data_type.data - */ - export type data_type$dataArgs = { - /** - * Select specific fields to fetch from the data - */ - select?: dataSelect | null - /** - * Omit specific fields from the data - */ - omit?: dataOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: dataInclude | null - where?: dataWhereInput - orderBy?: dataOrderByWithRelationInput | dataOrderByWithRelationInput[] - cursor?: dataWhereUniqueInput - take?: number - skip?: number - distinct?: DataScalarFieldEnum | DataScalarFieldEnum[] - } - - /** - * data_type without action - */ - export type data_typeDefaultArgs = { - /** - * Select specific fields to fetch from the data_type - */ - select?: data_typeSelect | null - /** - * Omit specific fields from the data_type - */ - omit?: data_typeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: data_typeInclude | null - } - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const RunScalarFieldEnum: { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' - }; - - export type RunScalarFieldEnum = (typeof RunScalarFieldEnum)[keyof typeof RunScalarFieldEnum] - - - export const DataScalarFieldEnum: { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' - }; - - export type DataScalarFieldEnum = (typeof DataScalarFieldEnum)[keyof typeof DataScalarFieldEnum] - - - export const Data_typeScalarFieldEnum: { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' - }; - - export type Data_typeScalarFieldEnum = (typeof Data_typeScalarFieldEnum)[keyof typeof Data_typeScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - - /** - * Field references - */ - - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - - /** - * Reference to a field of type 'String[]' - */ - export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> - - - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - - - - /** - * Reference to a field of type 'Int[]' - */ - export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> - - - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - - - /** - * Reference to a field of type 'DateTime[]' - */ - export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> - - - - /** - * Reference to a field of type 'Float[]' - */ - export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> - - - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> - - /** - * Deep Input Types - */ - - - export type runWhereInput = { - AND?: runWhereInput | runWhereInput[] - OR?: runWhereInput[] - NOT?: runWhereInput | runWhereInput[] - id?: StringFilter<"run"> | string - runId?: IntFilter<"run"> | number - driverName?: StringFilter<"run"> | string - notes?: StringFilter<"run"> | string - time?: DateTimeFilter<"run"> | Date | string - data?: DataListRelationFilter - } - - export type runOrderByWithRelationInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - data?: dataOrderByRelationAggregateInput - } - - export type runWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: runWhereInput | runWhereInput[] - OR?: runWhereInput[] - NOT?: runWhereInput | runWhereInput[] - runId?: IntFilter<"run"> | number - driverName?: StringFilter<"run"> | string - notes?: StringFilter<"run"> | string - time?: DateTimeFilter<"run"> | Date | string - data?: DataListRelationFilter - }, "id"> - - export type runOrderByWithAggregationInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - _count?: runCountOrderByAggregateInput - _avg?: runAvgOrderByAggregateInput - _max?: runMaxOrderByAggregateInput - _min?: runMinOrderByAggregateInput - _sum?: runSumOrderByAggregateInput - } - - export type runScalarWhereWithAggregatesInput = { - AND?: runScalarWhereWithAggregatesInput | runScalarWhereWithAggregatesInput[] - OR?: runScalarWhereWithAggregatesInput[] - NOT?: runScalarWhereWithAggregatesInput | runScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"run"> | string - runId?: IntWithAggregatesFilter<"run"> | number - driverName?: StringWithAggregatesFilter<"run"> | string - notes?: StringWithAggregatesFilter<"run"> | string - time?: DateTimeWithAggregatesFilter<"run"> | Date | string - } - - export type dataWhereInput = { - AND?: dataWhereInput | dataWhereInput[] - OR?: dataWhereInput[] - NOT?: dataWhereInput | dataWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - dataType?: XOR - run?: XOR - } - - export type dataOrderByWithRelationInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - dataType?: data_typeOrderByWithRelationInput - run?: runOrderByWithRelationInput - } - - export type dataWhereUniqueInput = Prisma.AtLeast<{ - time_dataTypeName?: dataTimeDataTypeNameCompoundUniqueInput - AND?: dataWhereInput | dataWhereInput[] - OR?: dataWhereInput[] - NOT?: dataWhereInput | dataWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - dataType?: XOR - run?: XOR - }, "time_dataTypeName"> - - export type dataOrderByWithAggregationInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - _count?: dataCountOrderByAggregateInput - _avg?: dataAvgOrderByAggregateInput - _max?: dataMaxOrderByAggregateInput - _min?: dataMinOrderByAggregateInput - _sum?: dataSumOrderByAggregateInput - } - - export type dataScalarWhereWithAggregatesInput = { - AND?: dataScalarWhereWithAggregatesInput | dataScalarWhereWithAggregatesInput[] - OR?: dataScalarWhereWithAggregatesInput[] - NOT?: dataScalarWhereWithAggregatesInput | dataScalarWhereWithAggregatesInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeWithAggregatesFilter<"data"> | Date | string - dataTypeName?: StringWithAggregatesFilter<"data"> | string - runId?: StringWithAggregatesFilter<"data"> | string - } - - export type data_typeWhereInput = { - AND?: data_typeWhereInput | data_typeWhereInput[] - OR?: data_typeWhereInput[] - NOT?: data_typeWhereInput | data_typeWhereInput[] - name?: StringFilter<"data_type"> | string - unit?: StringFilter<"data_type"> | string - nodeName?: StringFilter<"data_type"> | string - data?: DataListRelationFilter - } - - export type data_typeOrderByWithRelationInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - data?: dataOrderByRelationAggregateInput - } - - export type data_typeWhereUniqueInput = Prisma.AtLeast<{ - name?: string - AND?: data_typeWhereInput | data_typeWhereInput[] - OR?: data_typeWhereInput[] - NOT?: data_typeWhereInput | data_typeWhereInput[] - unit?: StringFilter<"data_type"> | string - nodeName?: StringFilter<"data_type"> | string - data?: DataListRelationFilter - }, "name"> - - export type data_typeOrderByWithAggregationInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - _count?: data_typeCountOrderByAggregateInput - _max?: data_typeMaxOrderByAggregateInput - _min?: data_typeMinOrderByAggregateInput - } - - export type data_typeScalarWhereWithAggregatesInput = { - AND?: data_typeScalarWhereWithAggregatesInput | data_typeScalarWhereWithAggregatesInput[] - OR?: data_typeScalarWhereWithAggregatesInput[] - NOT?: data_typeScalarWhereWithAggregatesInput | data_typeScalarWhereWithAggregatesInput[] - name?: StringWithAggregatesFilter<"data_type"> | string - unit?: StringWithAggregatesFilter<"data_type"> | string - nodeName?: StringWithAggregatesFilter<"data_type"> | string - } - - export type runCreateInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - data?: dataCreateNestedManyWithoutRunInput - } - - export type runUncheckedCreateInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - data?: dataUncheckedCreateNestedManyWithoutRunInput - } - - export type runUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - data?: dataUpdateManyWithoutRunNestedInput - } - - export type runUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - data?: dataUncheckedUpdateManyWithoutRunNestedInput - } - - export type runCreateManyInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type runUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataCreateInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataType: data_typeCreateNestedOneWithoutDataInput - run: runCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - runId: string - } - - export type dataUpdateInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataType?: data_typeUpdateOneRequiredWithoutDataNestedInput - run?: runUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type dataCreateManyInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - runId: string - } - - export type dataUpdateManyMutationInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataUncheckedUpdateManyInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type data_typeCreateInput = { - name: string - unit: string - nodeName: string - data?: dataCreateNestedManyWithoutDataTypeInput - } - - export type data_typeUncheckedCreateInput = { - name: string - unit: string - nodeName: string - data?: dataUncheckedCreateNestedManyWithoutDataTypeInput - } - - export type data_typeUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - data?: dataUpdateManyWithoutDataTypeNestedInput - } - - export type data_typeUncheckedUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - data?: dataUncheckedUpdateManyWithoutDataTypeNestedInput - } - - export type data_typeCreateManyInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type data_typeUncheckedUpdateManyInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringFilter<$PrismaModel> | string - } - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type DataListRelationFilter = { - every?: dataWhereInput - some?: dataWhereInput - none?: dataWhereInput - } - - export type dataOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type runCountOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runAvgOrderByAggregateInput = { - runId?: SortOrder - } - - export type runMaxOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runMinOrderByAggregateInput = { - id?: SortOrder - runId?: SortOrder - driverName?: SortOrder - notes?: SortOrder - time?: SortOrder - } - - export type runSumOrderByAggregateInput = { - runId?: SortOrder - } - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type FloatNullableListFilter<$PrismaModel = never> = { - equals?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - has?: number | FloatFieldRefInput<$PrismaModel> | null - hasEvery?: number[] | ListFloatFieldRefInput<$PrismaModel> - hasSome?: number[] | ListFloatFieldRefInput<$PrismaModel> - isEmpty?: boolean - } - - export type Data_typeScalarRelationFilter = { - is?: data_typeWhereInput - isNot?: data_typeWhereInput - } - - export type RunScalarRelationFilter = { - is?: runWhereInput - isNot?: runWhereInput - } - - export type dataTimeDataTypeNameCompoundUniqueInput = { - time: Date | string - dataTypeName: string - } - - export type dataCountOrderByAggregateInput = { - values?: SortOrder - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataAvgOrderByAggregateInput = { - values?: SortOrder - } - - export type dataMaxOrderByAggregateInput = { - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataMinOrderByAggregateInput = { - time?: SortOrder - dataTypeName?: SortOrder - runId?: SortOrder - } - - export type dataSumOrderByAggregateInput = { - values?: SortOrder - } - - export type data_typeCountOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type data_typeMaxOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type data_typeMinOrderByAggregateInput = { - name?: SortOrder - unit?: SortOrder - nodeName?: SortOrder - } - - export type dataCreateNestedManyWithoutRunInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUncheckedCreateNestedManyWithoutRunInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type dataUpdateManyWithoutRunNestedInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - upsert?: dataUpsertWithWhereUniqueWithoutRunInput | dataUpsertWithWhereUniqueWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutRunInput | dataUpdateWithWhereUniqueWithoutRunInput[] - updateMany?: dataUpdateManyWithWhereWithoutRunInput | dataUpdateManyWithWhereWithoutRunInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataUncheckedUpdateManyWithoutRunNestedInput = { - create?: XOR | dataCreateWithoutRunInput[] | dataUncheckedCreateWithoutRunInput[] - connectOrCreate?: dataCreateOrConnectWithoutRunInput | dataCreateOrConnectWithoutRunInput[] - upsert?: dataUpsertWithWhereUniqueWithoutRunInput | dataUpsertWithWhereUniqueWithoutRunInput[] - createMany?: dataCreateManyRunInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutRunInput | dataUpdateWithWhereUniqueWithoutRunInput[] - updateMany?: dataUpdateManyWithWhereWithoutRunInput | dataUpdateManyWithWhereWithoutRunInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataCreatevaluesInput = { - set: number[] - } - - export type data_typeCreateNestedOneWithoutDataInput = { - create?: XOR - connectOrCreate?: data_typeCreateOrConnectWithoutDataInput - connect?: data_typeWhereUniqueInput - } - - export type runCreateNestedOneWithoutDataInput = { - create?: XOR - connectOrCreate?: runCreateOrConnectWithoutDataInput - connect?: runWhereUniqueInput - } - - export type dataUpdatevaluesInput = { - set?: number[] - push?: number | number[] - } - - export type data_typeUpdateOneRequiredWithoutDataNestedInput = { - create?: XOR - connectOrCreate?: data_typeCreateOrConnectWithoutDataInput - upsert?: data_typeUpsertWithoutDataInput - connect?: data_typeWhereUniqueInput - update?: XOR, data_typeUncheckedUpdateWithoutDataInput> - } - - export type runUpdateOneRequiredWithoutDataNestedInput = { - create?: XOR - connectOrCreate?: runCreateOrConnectWithoutDataInput - upsert?: runUpsertWithoutDataInput - connect?: runWhereUniqueInput - update?: XOR, runUncheckedUpdateWithoutDataInput> - } - - export type dataCreateNestedManyWithoutDataTypeInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUncheckedCreateNestedManyWithoutDataTypeInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - } - - export type dataUpdateManyWithoutDataTypeNestedInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - upsert?: dataUpsertWithWhereUniqueWithoutDataTypeInput | dataUpsertWithWhereUniqueWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutDataTypeInput | dataUpdateWithWhereUniqueWithoutDataTypeInput[] - updateMany?: dataUpdateManyWithWhereWithoutDataTypeInput | dataUpdateManyWithWhereWithoutDataTypeInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type dataUncheckedUpdateManyWithoutDataTypeNestedInput = { - create?: XOR | dataCreateWithoutDataTypeInput[] | dataUncheckedCreateWithoutDataTypeInput[] - connectOrCreate?: dataCreateOrConnectWithoutDataTypeInput | dataCreateOrConnectWithoutDataTypeInput[] - upsert?: dataUpsertWithWhereUniqueWithoutDataTypeInput | dataUpsertWithWhereUniqueWithoutDataTypeInput[] - createMany?: dataCreateManyDataTypeInputEnvelope - set?: dataWhereUniqueInput | dataWhereUniqueInput[] - disconnect?: dataWhereUniqueInput | dataWhereUniqueInput[] - delete?: dataWhereUniqueInput | dataWhereUniqueInput[] - connect?: dataWhereUniqueInput | dataWhereUniqueInput[] - update?: dataUpdateWithWhereUniqueWithoutDataTypeInput | dataUpdateWithWhereUniqueWithoutDataTypeInput[] - updateMany?: dataUpdateManyWithWhereWithoutDataTypeInput | dataUpdateManyWithWhereWithoutDataTypeInput[] - deleteMany?: dataScalarWhereInput | dataScalarWhereInput[] - } - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type dataCreateWithoutRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataType: data_typeCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateWithoutRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - } - - export type dataCreateOrConnectWithoutRunInput = { - where: dataWhereUniqueInput - create: XOR - } - - export type dataCreateManyRunInputEnvelope = { - data: dataCreateManyRunInput | dataCreateManyRunInput[] - skipDuplicates?: boolean - } - - export type dataUpsertWithWhereUniqueWithoutRunInput = { - where: dataWhereUniqueInput - update: XOR - create: XOR - } - - export type dataUpdateWithWhereUniqueWithoutRunInput = { - where: dataWhereUniqueInput - data: XOR - } - - export type dataUpdateManyWithWhereWithoutRunInput = { - where: dataScalarWhereInput - data: XOR - } - - export type dataScalarWhereInput = { - AND?: dataScalarWhereInput | dataScalarWhereInput[] - OR?: dataScalarWhereInput[] - NOT?: dataScalarWhereInput | dataScalarWhereInput[] - values?: FloatNullableListFilter<"data"> - time?: DateTimeFilter<"data"> | Date | string - dataTypeName?: StringFilter<"data"> | string - runId?: StringFilter<"data"> | string - } - - export type data_typeCreateWithoutDataInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeUncheckedCreateWithoutDataInput = { - name: string - unit: string - nodeName: string - } - - export type data_typeCreateOrConnectWithoutDataInput = { - where: data_typeWhereUniqueInput - create: XOR - } - - export type runCreateWithoutDataInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runUncheckedCreateWithoutDataInput = { - id?: string - runId?: number - driverName: string - notes: string - time: Date | string - } - - export type runCreateOrConnectWithoutDataInput = { - where: runWhereUniqueInput - create: XOR - } - - export type data_typeUpsertWithoutDataInput = { - update: XOR - create: XOR - where?: data_typeWhereInput - } - - export type data_typeUpdateToOneWithWhereWithoutDataInput = { - where?: data_typeWhereInput - data: XOR - } - - export type data_typeUpdateWithoutDataInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type data_typeUncheckedUpdateWithoutDataInput = { - name?: StringFieldUpdateOperationsInput | string - unit?: StringFieldUpdateOperationsInput | string - nodeName?: StringFieldUpdateOperationsInput | string - } - - export type runUpsertWithoutDataInput = { - update: XOR - create: XOR - where?: runWhereInput - } - - export type runUpdateToOneWithWhereWithoutDataInput = { - where?: runWhereInput - data: XOR - } - - export type runUpdateWithoutDataInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type runUncheckedUpdateWithoutDataInput = { - id?: StringFieldUpdateOperationsInput | string - runId?: IntFieldUpdateOperationsInput | number - driverName?: StringFieldUpdateOperationsInput | string - notes?: StringFieldUpdateOperationsInput | string - time?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type dataCreateWithoutDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - run: runCreateNestedOneWithoutDataInput - } - - export type dataUncheckedCreateWithoutDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - runId: string - } - - export type dataCreateOrConnectWithoutDataTypeInput = { - where: dataWhereUniqueInput - create: XOR - } - - export type dataCreateManyDataTypeInputEnvelope = { - data: dataCreateManyDataTypeInput | dataCreateManyDataTypeInput[] - skipDuplicates?: boolean - } - - export type dataUpsertWithWhereUniqueWithoutDataTypeInput = { - where: dataWhereUniqueInput - update: XOR - create: XOR - } - - export type dataUpdateWithWhereUniqueWithoutDataTypeInput = { - where: dataWhereUniqueInput - data: XOR - } - - export type dataUpdateManyWithWhereWithoutDataTypeInput = { - where: dataScalarWhereInput - data: XOR - } - - export type dataCreateManyRunInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - dataTypeName: string - } - - export type dataUpdateWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataType?: data_typeUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - } - - export type dataUncheckedUpdateManyWithoutRunInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - dataTypeName?: StringFieldUpdateOperationsInput | string - } - - export type dataCreateManyDataTypeInput = { - values?: dataCreatevaluesInput | number[] - time: Date | string - runId: string - } - - export type dataUpdateWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - run?: runUpdateOneRequiredWithoutDataNestedInput - } - - export type dataUncheckedUpdateWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - runId?: StringFieldUpdateOperationsInput | string - } - - export type dataUncheckedUpdateManyWithoutDataTypeInput = { - values?: dataUpdatevaluesInput | number[] - time?: DateTimeFieldUpdateOperationsInput | Date | string - runId?: StringFieldUpdateOperationsInput | string - } - - - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number - } - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF -} \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/index.js b/charybdis/local-prisma/local-prisma-client/index.js deleted file mode 100644 index 05fe9a0e..00000000 --- a/charybdis/local-prisma/local-prisma-client/index.js +++ /dev/null @@ -1,219 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/library.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - const path = require('path') - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/local-prisma/local-prisma-client", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin-arm64", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "/Users/peytonmckee/Documents/GitHub/Argos/charybdis/local-prisma/schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "6.2.1", - "engineVersion": "4123509d24aa4dede1e864b46351bf2790323b69", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "LOCAL_DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"local-prisma-client\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"LOCAL_DATABASE_URL\")\n}\n\nmodel run {\n id String @id @default(uuid())\n runId Int @default(autoincrement())\n driverName String\n notes String\n time DateTime @db.Timestamptz()\n\n data data[]\n}\n\nmodel data {\n values Float[]\n time DateTime @db.Timestamptz()\n\n dataTypeName String\n dataType data_type @relation(fields: [dataTypeName], references: [name])\n runId String\n run run @relation(fields: [runId], references: [id])\n\n @@id([time, dataTypeName])\n}\n\nmodel data_type {\n name String @id\n unit String\n nodeName String\n\n data data[]\n}\n", - "inlineSchemaHash": "fc61965166ac92fef8954516a9a2a31c11a230ac242cb534a2ddf7fd55700d79", - "copyEngine": true -} - -const fs = require('fs') - -config.dirname = __dirname -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = [ - "local-prisma/local-prisma-client", - "local-prisma-client", - ] - - const alternativePath = alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) - }) ?? alternativePaths[0] - - config.dirname = path.join(process.cwd(), alternativePath) - config.isBundled = true -} - -config.runtimeDataModel = JSON.parse("{\"models\":{\"run\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driverName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"values\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Timestamptz\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataTypeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data_type\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[\"dataTypeName\"],\"relationToFields\":[\"name\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"runId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"run\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"run\",\"nativeType\":null,\"relationName\":\"dataTorun\",\"relationFromFields\":[\"runId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"time\",\"dataTypeName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"data_type\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"unit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nodeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"data\",\"nativeType\":null,\"relationName\":\"dataTodata_type\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - - -const { warnEnvConflicts } = require('./runtime/library.js') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -// file annotations for bundling tools to include these files -path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node"); -path.join(process.cwd(), "local-prisma/local-prisma-client/libquery_engine-darwin-arm64.dylib.node") -// file annotations for bundling tools to include these files -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "local-prisma/local-prisma-client/schema.prisma") diff --git a/charybdis/local-prisma/local-prisma-client/libquery_engine-darwin-arm64.dylib.node b/charybdis/local-prisma/local-prisma-client/libquery_engine-darwin-arm64.dylib.node deleted file mode 100755 index a25a1ba8..00000000 Binary files a/charybdis/local-prisma/local-prisma-client/libquery_engine-darwin-arm64.dylib.node and /dev/null differ diff --git a/charybdis/local-prisma/local-prisma-client/package.json b/charybdis/local-prisma/local-prisma-client/package.json deleted file mode 100644 index b18d9b2b..00000000 --- a/charybdis/local-prisma/local-prisma-client/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "prisma-client-1f2c052f943c267fc6b3dbfa9e6b1a7562c3442e0d4a2d0783c618183a83e9b9", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.js", - "default": "./wasm.js" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.js", - "default": "./runtime/library.js" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.js", - "default": "./runtime/binary.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./sql": { - "require": { - "types": "./sql.d.ts", - "node": "./sql.js", - "default": "./sql.js" - }, - "import": { - "types": "./sql.d.ts", - "node": "./sql.mjs", - "default": "./sql.mjs" - }, - "default": "./sql.js" - }, - "./*": "./*" - }, - "version": "6.2.1", - "sideEffects": false -} \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/runtime/edge-esm.js b/charybdis/local-prisma/local-prisma-client/runtime/edge-esm.js deleted file mode 100644 index 9b9b5739..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/edge-esm.js +++ /dev/null @@ -1,31 +0,0 @@ -var ea=Object.create;var Kr=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty;var Ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zr=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},oa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ra(t))!ia.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=ta(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?ea(na(e)):{},oa(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e));var y,u=Ae(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,c=Ae(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=Ae(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ae(()=>{"use strict"});var yi=Fe(Ke=>{"use strict";d();u();c();p();m();var ni=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sa=ni(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function l(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function f(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],U=D[1],k=new n(f(A,M,U)),F=0,L=U>0?M-4:M,G;for(G=0;G>16&255,k[F++]=R>>8&255,k[F++]=R&255;return U===2&&(R=r[A.charCodeAt(G)]<<2|r[A.charCodeAt(G+1)]>>4,k[F++]=R&255),U===1&&(R=r[A.charCodeAt(G)]<<10|r[A.charCodeAt(G+1)]<<4|r[A.charCodeAt(G+2)]>>2,k[F++]=R>>8&255,k[F++]=R&255),k}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,U=[],k=R;kL?L:F+k));return M===1?(R=A[D-1],U.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],U.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),U.join("")}}),aa=ni(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+v>=1?r+=S/f:r+=S*Math.pow(2,1-v),r*f>=2&&(a++,f/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*f-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),Yr=sa(),We=aa(),Xn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ke.Buffer=T;Ke.SlowBuffer=da;Ke.INSPECT_MAX_BYTES=50;var or=2147483647;Ke.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=la();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function la(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>or)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return en(e)}return ii(e,t,r)}T.poolSize=8192;function ii(e,t,r){if(typeof e=="string")return ca(e,t);if(ArrayBuffer.isView(e))return pa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return si(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ma(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ii(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function oi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ua(e,t,r){return oi(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return ua(e,t,r)};function en(e){return oi(e),be(e<0?0:tn(e)|0)}T.allocUnsafe=function(e){return en(e)};T.allocUnsafeSlow=function(e){return en(e)};function ca(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ai(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Zr(e){let t=e.length<0?0:tn(e.length)|0,r=be(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function da(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ai(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Xr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return hi(e).length;default:if(i)return n?-1:Xr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ai;function fa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ta(this,t,r);case"utf8":case"utf-8":return ui(this,t,r);case"ascii":return Pa(this,t,r);case"latin1":case"binary":return va(this,t,r);case"base64":return ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ca(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Xn&&(T.prototype[Xn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,nn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ei(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ei(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ei(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return ga(this,e,t,r);case"utf8":case"utf-8":return ha(this,e,t,r);case"ascii":case"latin1":case"binary":return ya(this,e,t,r);case"base64":return wa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ea(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ba(e,t,r){return t===0&&r===e.length?Yr.fromByteArray(e):Yr.fromByteArray(e.slice(t,r))}function ui(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return xa(n)}var ti=4096;function xa(e){let t=e.length;if(t<=ti)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function ci(e,t,r,n,i){gi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function pi(e,t,r,n,i){gi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return ci(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return ci(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function mi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function di(e,t,r,n,i){return t=+t,r=r>>>0,i||mi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return di(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return di(this,e,t,!1,r)};function fi(e,t,r,n,i){return t=+t,r=r>>>0,i||mi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return fi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return fi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ri(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ri(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ri(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Aa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function gi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Qe.ERR_OUT_OF_RANGE("value",a,e)}Aa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Qe.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Qe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ra=/[^+/0-9A-Za-z-_]/g;function Sa(e){if(e=e.split("=")[0],e=e.trim().replace(Ra,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Xr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ia(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function hi(e){return Yr.toByteArray(Sa(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function nn(e){return e!==e}var ka=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?Da:e}function Da(){throw new Error("BigInt not supported")}});var w,d=Ae(()=>{"use strict";w=Le(yi())});function Ma(){return!1}var Na,_a,vi,Ti=Ae(()=>{"use strict";d();u();c();p();m();Na={},_a={existsSync:Ma,promises:Na},vi=_a});function qa(...e){return e.join("/")}function Va(...e){return e.join("/")}var Ui,ja,Ja,xt,$i=Ae(()=>{"use strict";d();u();c();p();m();Ui="/",ja={sep:Ui},Ja={resolve:qa,posix:ja,join:Va,sep:Ui},xt=Ja});var pr,Vi=Ae(()=>{"use strict";d();u();c();p();m();pr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ji=Fe((od,ji)=>{"use strict";d();u();c();p();m();ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Wi=Fe((yd,Qi)=>{"use strict";d();u();c();p();m();Qi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ki=Fe((vd,Hi)=>{"use strict";d();u();c();p();m();var za=Wi();Hi.exports=e=>typeof e=="string"?e.replace(za(),""):e});var yn=Fe((ch,mo)=>{"use strict";d();u();c();p();m();mo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Vu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Uo=Fe(()=>{"use strict";d();u();c();p();m()});d();u();c();p();m();var bi={};zr(bi,{defineExtension:()=>wi,getExtensionContext:()=>Ei});d();u();c();p();m();d();u();c();p();m();function wi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ei(e){return e}var Pi={};zr(Pi,{validator:()=>xi});d();u();c();p();m();d();u();c();p();m();function xi(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var on,Ci,Ai,Ri,Si=!0;typeof y<"u"&&({FORCE_COLOR:on,NODE_DISABLE_COLORS:Ci,NO_COLOR:Ai,TERM:Ri}=y.env||{},Si=y.stdout&&y.stdout.isTTY);var Fa={enabled:!Ci&&Ai==null&&Ri!=="dumb"&&(on!=null&&on!=="0"||Si)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Vp=j(0,0),ar=j(1,22),lr=j(2,22),jp=j(3,23),Ii=j(4,24),Jp=j(7,27),Gp=j(8,28),Qp=j(9,29),Wp=j(30,39),ze=j(31,39),Oi=j(32,39),ki=j(33,39),Di=j(34,39),Hp=j(35,39),Mi=j(36,39),Kp=j(37,39),Ni=j(90,39),zp=j(90,39),Yp=j(40,49),Zp=j(41,49),Xp=j(42,49),em=j(43,49),tm=j(44,49),rm=j(45,49),nm=j(46,49),im=j(47,49);d();u();c();p();m();var La=100,_i=["green","yellow","blue","magenta","cyan","red"],ur=[],Fi=Date.now(),Ba=0,sn=typeof y<"u"?y.env:{};globalThis.DEBUG??=sn.DEBUG??"";globalThis.DEBUG_COLORS??=sn.DEBUG_COLORS?sn.DEBUG_COLORS==="true":!0;var bt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ua(e){let t={color:_i[Ba++%_i.length],enabled:bt.enabled(e),namespace:e,log:bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>La&&ur.shift(),bt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:$a(g)),f=`+${Date.now()-Fi}ms`;Fi=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Li=new Proxy(Ua,{get:(e,t)=>bt[t],set:(e,t,r)=>bt[t]=r});function $a(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Bi(){ur.length=0}var X=Li;d();u();c();p();m();d();u();c();p();m();var qi="library";function Pt(e){let t=Ga();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":qi)}function Ga(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();u();c();p();m();d();u();c();p();m();var cr;(t=>{let e;(L=>(L.findUnique="findUnique",L.findUniqueOrThrow="findUniqueOrThrow",L.findFirst="findFirst",L.findFirstOrThrow="findFirstOrThrow",L.findMany="findMany",L.create="create",L.createMany="createMany",L.createManyAndReturn="createManyAndReturn",L.update="update",L.updateMany="updateMany",L.updateManyAndReturn="updateManyAndReturn",L.upsert="upsert",L.delete="delete",L.deleteMany="deleteMany",L.groupBy="groupBy",L.count="count",L.aggregate="aggregate",L.findRaw="findRaw",L.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(cr||={});var Tt={};zr(Tt,{error:()=>Ha,info:()=>Wa,log:()=>Qa,query:()=>Ka,should:()=>Gi,tags:()=>vt,warn:()=>an});d();u();c();p();m();var vt={error:ze("prisma:error"),warn:ki("prisma:warn"),info:Mi("prisma:info"),query:Di("prisma:query")},Gi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Qa(...e){console.log(...e)}function an(e,...t){Gi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Wa(e,...t){console.info(`${vt.info} ${e}`,...t)}function Ha(e,...t){console.error(`${vt.error} ${e}`,...t)}function Ka(e,...t){console.log(`${vt.query} ${e}`,...t)}d();u();c();p();m();function xe(e,t){throw new Error(t)}d();u();c();p();m();function ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();var un=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();u();c();p();m();function Ye(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function cn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{zi.has(e)||(zi.add(e),an(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(Q,"PrismaClientInitializationError");d();u();c();p();m();var oe=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(oe,"PrismaClientKnownRequestError");d();u();c();p();m();var Se=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(Se,"PrismaClientRustPanicError");d();u();c();p();m();var se=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(se,"PrismaClientUnknownRequestError");d();u();c();p();m();var ee=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(ee,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var Ze=9e15,De=1e9,pn="0123456789abcdef",fr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",mn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ze,maxE:Ze,crypto:!1},to,Pe,N=!0,yr="[DecimalError] ",ke=yr+"Invalid argument: ",ro=yr+"Precision limit exceeded",no=yr+"crypto unavailable",io="[object Decimal]",Z=Math.floor,W=Math.pow,Ya=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Za=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Xa=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,oo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,el=9007199254740991,tl=fr.length-1,dn=gr.length-1,C={toStringTag:io};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};C.ceil=function(){return I(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=rl(n,co(n,r)),n.precision=e,n.rounding=t,I(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=Z((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=q(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,I(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-Z(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return I(q(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return I(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Er(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Xe(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Xe(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Er(5,e)),i=Xe(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=dn)return s=ce(g,h+4,v).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=dn)return s=ce(g,h+4,v).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/O),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+S,s=Oe(f,a),n=t?hr(g,a+10):Oe(e,a),l=q(s,n,a,1),Ct(l.d,i=h,v))do if(a+=10,s=Oe(f,a),n=t?hr(g,a+10):Oe(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Ct(l.d,i+=10,v));return N=!0,I(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(f=S.d,v=e.d,a=A.precision,l=A.rounding,!f[0]||!v[0]){if(v[0])e.s=-e.s;else if(f[0])e=new A(S);else return new A(l===3?-0:0);return N?I(e,a,l):e}if(r=Z(e.e/O),g=Z(S.e/O),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=v.length):(t=v,r=g,s=f.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=v.length,h=n0;--n)f[s++]=0;for(n=v.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=wr(f,n),N?I(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=so(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=il(n,co(n,r)),n.precision=e,n.rounding=t,I(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=Z((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,I(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=Z(g.e/O)+Z(e.e/O),l=v.length,f=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=wr(o,r),N?I(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return hn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,De),t===void 0?t=n.rounding:ne(t,0,8),I(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,!0):(ne(e,0,De),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e+1,t),r=de(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=de(i):(ne(e,0,De),t===void 0?t=o.rounding:ne(t,0,8),n=I(new o(i),e+i.e+1,t),r=de(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(f=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=so(A)-S.e-1,s=o%O,t.d[0]=W(10,s<0?O+s:s),e==null)e=o>0?t:f;else{if(a=new R(e),!a.isInt()||a.lt(f))throw Error(ke+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new R(z(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=S.s,v=q(f,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[f,n]:[l,r],R.precision=g,N=!0,v};C.toHexadecimal=C.toHex=function(e,t){return hn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=q(r,e,0,t,1).times(e),N=!0,I(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return hn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=Z(e.e/O),t>=e.d.length-1&&(r=f<0?-f:f)<=el)return i=ao(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=fn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=I(fn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,I(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,De),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e,t),r=de(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,De),t===void 0?t=n.rounding:ne(t,0,8)),I(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return I(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=W(10,O-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function dr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function rl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Er(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Xe(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,v,S,A,R,D,M,U,k,F,L,G,Qr,rr,wt,Wr,ue,nr,ir=n.constructor,Hr=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new ir(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?Hr*0:Hr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=O,g=Z(n.e/S)-Z(i.e/S)),ue=V.length,wt=Y.length,M=new ir(Hr),U=M.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(G=o=ir.precision,s=ir.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)U.push(1),A=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,V=V[0],G++;(h1&&(V=e(V,v,l),Y=e(Y,v,l),ue=V.length,wt=Y.length),rr=ue,k=Y.slice(0,ue),F=k.length;F=l/2&&++Wr;do v=0,f=t(V,k,ue,F),f<0?(L=k[0],ue!=F&&(L=L*l+(k[1]||0)),v=L/Wr|0,v>1?(v>=l&&(v=l-1),R=e(V,v,l),D=R.length,F=k.length,f=t(R,k,D,F),f==1&&(v--,r(R,ue=10;v/=10)h++;M.e=h+g*S-1,I(M,a?o+M.e+1:o,s,A)}return M}}();function I(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=O,s=t,g=h[v=0],l=g/W(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=W(10,O-o),h[v]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function wr(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function hr(e,t,r){if(t>tl)throw N=!0,r&&(e.precision=r),Error(ro);return I(new e(fr),t,1,!0)}function ce(e,t,r){if(t>dn)throw Error(ro);return I(new e(gr),t,r,!0)}function so(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function ao(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/O+4);for(N=!1;;){if(r%2&&(o=o.times(t),Xi(o.d,s)&&(i=!0)),r=Z(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Xi(t.d,s)}return N=!0,o}function Zi(e){return e.d[e.d.length-1]&1}function lo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(f<3&&Ct(s.d,l-n,S,f))v.precision=l+=10,r=o=a=new v(1),g=0,f++;else return I(s,v.precision=A,S,N=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,U=M.rounding,k=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(N=!1,g=k):g=t,M.precision=g+=A,r=z(D),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=z(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return f=hr(M,g+2,k).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(f),M.precision=k,t==null?I(R,k,U,N=!0):R;for(h=R,l=s=R=q(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),f=l.plus(q(s,new M(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(hr(M,g+2,k).times(o+""))),l=q(l,new M(S),g,1),t==null)if(Ct(l.d,g-A,U,a))M.precision=g+=A,f=s=R=q(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,M.precision=k,U,N=!0);else return M.precision=k,l;l=f,i+=2}}function uo(e){return String(e.s*e.s/0)}function gn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),oo.test(t))return gn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Za.test(t))r=16,t=t.toLowerCase();else if(Ya.test(t))r=2;else if(Xa.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=ao(n,new n(r),o,o*2)),f=dr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=wr(f,g),e.d=f,N=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ue.pow(2,l))),N=!0,e)}function il(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Xe(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Er(5,r)),t=Xe(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Xe(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/O);for(N=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Er(e,t){for(var r=e;--t;)r*=e;return r}function co(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=Zi(r)?n?2:3:n?4:1,t;Pe=Zi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function hn(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ne(r,1,De),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=uo(e);else{for(g=de(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=dr(de(v),10,i),v.e=v.d.length),h=dr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,f=to),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=dr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function ol(e){return new this(e).abs()}function sl(e){return new this(e).acos()}function al(e){return new this(e).acosh()}function ll(e,t){return new this(e).plus(t)}function ul(e){return new this(e).asin()}function cl(e){return new this(e).asinh()}function pl(e){return new this(e).atan()}function ml(e){return new this(e).atanh()}function dl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function fl(e){return new this(e).cbrt()}function gl(e){return I(e=new this(e),e.e+1,2)}function hl(e,t,r){return new this(e).clamp(t,r)}function yl(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-Ze,0,"toExpPos",0,Ze,"maxE",0,Ze,"minE",-Ze,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=mn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(no);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function wl(e){return new this(e).cos()}function El(e){return new this(e).cosh()}function po(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,eo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(no);else for(;o=10;i/=10)n++;ne.highlight()},Hl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Kl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function zl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Yl(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Yl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function xr(e){let t=e.showColors?Wl:Hl,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Kl(e),zl(r,t)}d();u();c();p();m();var Eo=Le(yn());d();u();c();p();m();function ho(e,t,r){let n=yo(e),i=Zl(n),o=eu(i);o?Pr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function yo(e){return e.errors.flatMap(t=>t.kind==="Union"?yo(t):[t])}function Zl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Xl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Xl(e,t){return[...new Set(e.concat(t))]}function eu(e){return cn(e,(t,r)=>{let n=fo(t),i=fo(r);return n!==i?n-i:go(t)-go(r)})}function fo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function go(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var ae=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();u();c();p();m();d();u();c();p();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},wo={bold:ar,red:ze,green:Oi,dim:lr,enabled:!0},it={write(e){e.writeLine(",")}};d();u();c();p();m();var fe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Me=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ot=class extends Me{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new fe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Me{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ot&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new fe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(it,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var K=class extends Me{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var Rt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Pr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ru(e,t);break;case"IncludeOnScalar":nu(e,t);break;case"EmptySelection":iu(e,t,r);break;case"UnknownSelectionField":lu(e,t);break;case"InvalidSelectionValue":uu(e,t);break;case"UnknownArgument":cu(e,t);break;case"UnknownInputField":pu(e,t);break;case"RequiredArgumentMissing":mu(e,t);break;case"InvalidArgumentType":du(e,t);break;case"InvalidArgumentValue":fu(e,t);break;case"ValueTooLarge":gu(e,t);break;case"SomeFieldsMissing":hu(e,t);break;case"TooManyFieldsGiven":yu(e,t);break;case"Union":ho(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ru(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function nu(e,t){let[r,n]=St(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ae(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${It(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function iu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ou(e,t,i);return}if(n.hasField("select")){su(e,t);return}}if(r?.[et(e.outputType.name)]){au(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function ou(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ae(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function su(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Po(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function au(e,t){let r=new Rt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ae("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=St(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function lu(e,t){let r=vo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Po(n,e.outputType);break;case"include":wu(n,e.outputType);break;case"omit":Eu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function uu(e,t){let r=vo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function cu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),bu(n,e.arguments)),t.addErrorMessage(i=>bo(i,r,e.arguments.map(o=>o.name)))}function pu(e,t){let[r,n]=St(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&To(o,e.inputType)}t.addErrorMessage(o=>bo(o,n,e.inputType.fields.map(s=>s.name)))}function bo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Pu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function mu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=St(e.argumentPath),s=new Rt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(xo).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function xo(e){return e.kind==="list"?`${xo(e.elementType)}[]`:e.name}function du(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Ar("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function fu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Ar("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function gu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function hu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&To(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Ar("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(It(i)),o.join(" ")})}function yu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Ar("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Po(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,"true"))}function wu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ae(r.name,"true"))}function Eu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ae(r.name,"true"))}function bu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function vo(e,t){let[r,n]=St(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function To(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function St(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Ar(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var xu=3;function Pu(e,t){let r=1/0,n;for(let i of t){let o=(0,Eo.default)(e,i);o>xu||o`}};function at(e){return e instanceof Ot}d();u();c();p();m();var Rr=Symbol(),wn=new WeakMap,Te=class{constructor(t){t===Rr?wn.set(this,`Prisma.${this._getName()}`):wn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return wn.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{};bn(Dt,"DbNull");var Mt=class extends kt{};bn(Mt,"JsonNull");var Nt=class extends kt{};bn(Nt,"AnyNull");var En={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:Nt},instances:{DbNull:new Dt(Rr),JsonNull:new Mt(Rr),AnyNull:new Nt(Rr)}};function bn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Ao=": ",Sr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ao.length}write(t){let r=new fe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ao).write(this.value)}};var xn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function lt(e){return new xn(Ro(e))}function Ro(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Sr(r,So(n));t.addField(i)}return t}function So(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(rt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=br(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Te?new K(`Prisma.${e._getName()}`):at(e)?new K(`prisma.${Co(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?vu(e):typeof e=="object"?Ro(e):new K(Object.prototype.toString.call(e))}function vu(e){let t=new ot;for(let r of e)t.addItem(So(r));return t}function Ir(e,t){let r=t==="pretty"?wo:Cr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Or({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=lt(e);for(let h of t)Pr(h,a,s);let{message:l,args:f}=Ir(a,r),g=xr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new ee(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();var ge=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};d();u();c();p();m();function _t(e){let t;return{get(){return t||(t={value:e()}),t.value}}}d();u();c();p();m();function he(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Oo(e,t,r){let n=he(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Tu({...e,...Io(t.name,e,t.result.$allModels),...Io(t.name,e,t.result[n])})}function Tu(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ye(e,n=>({...n,needs:r(n.name,new Set)}))}function Io(e,t,r){return r?Ye(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Cu(t,o,i)})):{}}function Cu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ko(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Do(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ge;this.modelExtensionsCache=new ge;this.queryCallbacksCache=new ge;this.clientExtensions=_t(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=_t(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Oo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=he(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ut=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();d();u();c();p();m();var Mo=Symbol(),Ft=class{constructor(t){if(t!==Mo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Pn:t}},Pn=new Ft(Mo);function ye(e){return e instanceof Ft}var Au={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},No="explicitly `undefined` values are not allowed";function Tn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ut.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new vn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:Au[t],query:Lt(r,h)}}function Lt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Fo(r,n),selection:Ru(e,t,i,n)}}function Ru(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ku(e,n)):Su(n,t,r)}function Su(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Iu(n,t,e),Ou(n,r,e),n}function Iu(e,t,r){for(let[n,i]of Object.entries(t)){if(ye(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Lt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Lt(i,o)}}function Ou(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Do(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function ku(e,t){let r={},n=t.getComputedFields(),i=ko(e,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Lt({},a):r[o]=!0;continue}r[o]=Lt(s,a)}}return r}function _o(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(tt(e)){if(br(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(at(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Du(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Mu(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Nu(e))return e.toJSON();if(typeof e=="object")return Fo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Fo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ye(i)||(i!==void 0?r[n]=_o(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:No}))}return r}function Du(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[et(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:xe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();var Bt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();u();c();p();m();function _u(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Fu(e,t){let r=_t(()=>Lu(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Lu(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Sn=new WeakMap,Dr="$$PrismaTypedSql",In=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Dr,{value:Dr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function Bu(e){return(...t)=>new In(e,t)}function Lo(e){return e!=null&&e[Dr]===Dr}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function Ut(e){return{ok:!1,error:e,map(){return Ut(e)},flatMap(){return Ut(e)}}}var On=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},kn=e=>{let t=new On,r=we(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Uu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=qu(t,e.getConnectionInfo.bind(e))),n},Uu=(e,t)=>{let r=we(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>$u(e,o))}},$u=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),commit:we(e,t.commit.bind(t)),rollback:we(e,t.rollback.bind(t))});function we(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Ut({kind:"GenericJs",id:i})}}}function qu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Ut({kind:"GenericJs",id:i})}}}var Xs=Le(Bo());var Tk=Le(Uo());Vi();Ti();$i();d();u();c();p();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Mr={enumerable:!0,configurable:!0,writable:!0};function Nr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Mr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Vo=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=Gu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=jo(Reflect.ownKeys(o),r),a=jo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Mr,...l?.getPropertyDescriptor(s)}:Mr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Vo]=function(){let o={...this};return delete o[Vo],o},i}function Gu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function jo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function ct(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function _r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function Jo(e){if(e===void 0)return"";let t=lt(e);return new nt(0,{colors:Cr}).write(t).toString()}d();u();c();p();m();var Qu="P2037";function Fr({error:e,user_facing_error:t},r,n){return t.error_code?new oe(Wu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Wu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Qu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Dn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Dn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Go={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function pt(e={}){let t=Ku(e);return Object.entries(t).reduce((n,[i,o])=>(Go[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ku(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Lr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Qo(e,t){let r=Lr(e);return t({action:"aggregate",unpacker:r,argsMapper:pt})(e)}d();u();c();p();m();function zu(e={}){let{select:t,...r}=e;return typeof t=="object"?pt({...r,_count:t}):pt({...r,_count:{_all:!0}})}function Yu(e={}){return typeof e.select=="object"?t=>Lr(e)(t)._count:t=>Lr(e)(t)._count._all}function Wo(e,t){return t({action:"count",unpacker:Yu(e),argsMapper:zu})(e)}d();u();c();p();m();function Zu(e={}){let t=pt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Xu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ho(e,t){return t({action:"groupBy",unpacker:Xu(e),argsMapper:Zu})(e)}function Ko(e,t,r){if(t==="aggregate")return n=>Qo(n,r);if(t==="count")return n=>Wo(n,r);if(t==="groupBy")return n=>Ho(n,r)}d();u();c();p();m();function zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=un(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ot(e,o,s.type,s.isList,s.kind==="enum")},...Nr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var Yo=e=>Array.isArray(e)?e:e.split("."),Mn=(e,t)=>Yo(t).reduce((r,n)=>r&&r[n],e),Zo=(e,t,r)=>Yo(t).reduceRight((n,i,o,s)=>Object.assign({},Mn(e,s.slice(0,o)),{[i]:n}),r);function ec(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function tc(e,t,r){return t===void 0?e??{}:Zo(t,r,e||!0)}function Nn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Ne(e._errorFormat),g=ec(n,i),h=tc(l,o,g),v=r({dataPath:g,callsite:f})(h),S=rc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],U=[g,h];return Nn(e,...M,...U)},...Nr([...S,...Object.getOwnPropertyNames(v)])})}}function rc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var nc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ic=["aggregate","count","groupBy"];function _n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[oc(e,t),ac(e,t),$t(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ee({},n)}function oc(e,t){let r=he(t),n=Object.keys(cr.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})})};return nc.includes(o)?Nn(e,t,s):sc(i)?Ko(e,i,s):s({})}}}function sc(e){return ic.includes(e)}function ac(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return zo(t,r)}))}d();u();c();p();m();function Xo(e){return e.replace(/^./,t=>t.toUpperCase())}var Fn=Symbol();function qt(e){let t=[lc(e),te(Fn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),Ee(e,t)}function lc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(he),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Xo(i);if(e._runtimeDataModel.models[o]!==void 0)return _n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return _n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function es(e){return e[Fn]?e[Fn]:e}function ts(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return qt(t)}d();u();c();p();m();d();u();c();p();m();function rs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(ct(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(ct(f))}uc(e,l.needs)&&s.push(cc(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function uc(e,t){return t.every(r=>ln(e,r))}function cc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Br({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Br({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function is({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Br({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=he(l);return rs({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();function os(e){if(e instanceof le)return pc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:os(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ps(o,l),a.args=s,as(e,a,r,n+1)}})})}function ls(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return as(e,t,s)}function us(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?cs(r,n,0,e):e(r)}}function cs(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ps(i,l),cs(a,t,r+1,n)}})}var ss=e=>e;function ps(e=ss,t=ss){return r=>e(t(r))}d();u();c();p();m();var ms=X("prisma:client"),ds={Vercel:"vercel","Netlify CI":"netlify"};function fs({postinstall:e,ciName:t,clientVersion:r}){if(ms("checkPlatformCaching:postinstall",e),ms("checkPlatformCaching:ciName",t),e===!0&&t&&t in ds){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ds[t]}-build`;throw console.error(n),new Q(n,r)}}d();u();c();p();m();function gs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var mc="Cloudflare-Workers",dc="node";function hs(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===mc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===dc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var fc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ln(){let e=hs();return{id:e,prettyName:fc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function mt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ln().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();var Ur=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Ur{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();d();u();c();p();m();function B(e,t){return{...e,isRetryable:t}}var dt=class extends ie{constructor(r){super("This request must be retried",B(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(dt,"ForcedRetryError");d();u();c();p();m();var qe=class extends ie{constructor(r,n){super(r,B(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(qe,"InvalidDatasourceError");d();u();c();p();m();var Ve=class extends ie{constructor(r,n){super(r,B(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(Ve,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var J=class extends ie{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var je=class extends J{constructor(r){super("Schema needs to be uploaded",B(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(je,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Bn="This request could not be understood by the server",jt=class extends J{constructor(r,n,i){super(n||Bn,B(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(jt,"BadRequestError");d();u();c();p();m();var Jt=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",B(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Jt,"HealthcheckTimeoutError");d();u();c();p();m();var Gt=class extends J{constructor(r,n,i){super(n,B(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Gt,"EngineStartupError");d();u();c();p();m();var Qt=class extends J{constructor(r){super("Engine version is not supported",B(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Qt,"EngineVersionNotSupportedError");d();u();c();p();m();var Un="Request timed out",Wt=class extends J{constructor(r,n=Un){super(n,B(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Wt,"GatewayTimeoutError");d();u();c();p();m();var gc="Interactive transaction error",Ht=class extends J{constructor(r,n=gc){super(n,B(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Ht,"InteractiveTransactionError");d();u();c();p();m();var hc="Request parameters are invalid",Kt=class extends J{constructor(r,n=hc){super(n,B(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Kt,"InvalidRequestError");d();u();c();p();m();var $n="Requested resource does not exist",zt=class extends J{constructor(r,n=$n){super(n,B(r,!1));this.name="NotFoundError";this.code="P5003"}};_(zt,"NotFoundError");d();u();c();p();m();var qn="Unknown server error",ft=class extends J{constructor(r,n,i){super(n||qn,B(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(ft,"ServerError");d();u();c();p();m();var Vn="Unauthorized, check your connection string",Yt=class extends J{constructor(r,n=Vn){super(n,B(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Yt,"UnauthorizedError");d();u();c();p();m();var jn="Usage exceeded, retry again later",Zt=class extends J{constructor(r,n=jn){super(n,B(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Zt,"UsageExceededError");async function yc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await yc(e);if(n.type==="QueryEngineError")throw new oe(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ft(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new je(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Gt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Jt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Kt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,gt(Vn,n));if(e.status===404)return new zt(r,gt($n,n));if(e.status===429)throw new Zt(r,gt(jn,n));if(e.status===504)throw new Wt(r,gt(Un,n));if(e.status>=500)throw new ft(r,gt(qn,n));if(e.status>=400)throw new jt(r,gt(Bn,n))}function gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function ys(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ws(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}d();u();c();p();m();function Es(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();function wc(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(wc(e))}d();u();c();p();m();var bs={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var er=class extends ie{constructor(r,n){super(`Cannot fetch data from service: -${r}`,B(n,!0));this.name="RequestError";this.code="P5010"}};_(er,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var bc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,xs=X("prisma:client:dataproxyEngine");async function xc(e,t){let r=bs["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&bc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=Pc(`<=${a}.${l}.${f}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();xs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ps(e,t){let r=await xc(e,t);return xs("version",r),r}function Pc(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var vs=3,$r=X("prisma:client:dataproxyEngine"),Gn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},tr=class{constructor(t){this.name="DataProxyEngine";Es(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=ws(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Gn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ps(t,this.config),$r("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":$r(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$r("schema response status",r.status);let n=await Xt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=_r(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$r("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,v=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Xt(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=mt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=vs)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${vs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ys(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof je)throw await this.uploadSchema(),new dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Fr(t[0],this.config.clientVersion,this.config.activeProvider):new se(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ts({copyEngine:e=!0},t){let r;try{r=mt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&mr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Pt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let f;throw f=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new ee(f.join(` -`),{clientVersion:t.clientVersion})}if(o)return new tr(t);throw new ee("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();u();c();p();m();function qr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var Cs=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var As=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function ht(e){try{return Rs(e,"fast")}catch{return Rs(e,"slow")}}function Rs(e,t){return JSON.stringify(e.map(r=>Is(r,t)))}function Is(e,t){if(Array.isArray(e))return e.map(r=>Is(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(tt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(vc(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Os(e):e}function vc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Os(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ss);let t={};for(let r of Object.keys(e))t[r]=Ss(e[r]);return t}function Ss(e){return typeof e=="bigint"?e.toString():Os(e)}d();u();c();p();m();var Tc=["$connect","$disconnect","$on","$transaction","$use","$extends"],ks=Tc;var Cc=/^(\s*alter\s)/i,Ds=X("prisma:client");function Qn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Cc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Wn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Lo(r))n=r.sql,i={values:ht(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:ht(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:ht(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:ht(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=As(r),i={values:ht(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ds(`prisma.${e}(${n}, ${i.values})`):Ds(`prisma.${e}(${n})`),{query:n,parameters:i}},Ms={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function Hn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=_s(r(o)):_s(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function _s(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var Ac={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Kn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Ac}};function Fs(){return new Kn}d();u();c();p();m();function Ls(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Bs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Vr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var $s=Le(Ki());d();u();c();p();m();function jr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Us(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(zn(e.query.arguments)),t.push(zn(e.query.selection)),t.join("")}function zn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${zn(n)})`:r}).join(" ")})`}d();u();c();p();m();var Rc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Yn(e){return Rc[e]}d();u();c();p();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function Zn(e){let t=[],r=Sc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>Yn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Oc(o),containsWrite:f,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?qs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Yn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Us(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ic(t),kc(t,i))throw t;if(t instanceof oe&&Dc(t)){let f=Vs(t.meta);Or({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=xr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new oe(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Se(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Se)throw new Se(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,$s.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=Mn(o,s),l=i==="queryRaw"?Zn(a):At(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Oc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:qs(e)};xe(e,"Unknown transaction kind")}}function qs(e){return{id:e.id,payload:e.payload}}function kc(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Dc(e){return e.code==="P2009"||e.code==="P2012"}function Vs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Vs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var js="6.2.1";var Js=js;d();u();c();p();m();var Ks=Le(yn());d();u();c();p();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_($,"PrismaClientConstructorValidationError");var Gs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Qs=["pretty","colorless","minimal"],Ws=["info","query","warn","error"],Nc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=yt(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!qr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Pt()==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Qs.includes(e)){let t=yt(e,Qs);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ws.includes(r)){let n=yt(r,Ws);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=yt(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Fc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(Lc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=yt(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function zs(e,t){for(let[r,n]of Object.entries(e)){if(!Gs.includes(r)){let i=yt(r,Gs);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Nc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function yt(e,t){if(t.length===0||typeof e!="string")return"";let r=_c(e,t);return r?` Did you mean "${r}"?`:""}function _c(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ks.default)(e,i)}));r.sort((i,o)=>i.distanceet(n)===t);if(r)return e[r]}function Lc(e,t){let r=lt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ir(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function Ys(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!jr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var _e=X("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Bc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Uc=Symbol.for("prisma.client.transaction.id"),$c={id:0,nextId(){return++this.id}};function qc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Hn();this.$extends=ts;e=n?.__internal?.configOverride?.(e)??e,fs(e),n&&zs(n,e);let i=new pr().on("error",()=>{});this._extensions=ut.empty(),this._previewFeatures=qr(e),this._clientVersion=e.clientVersion??Js,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Fs();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=kn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&X.enable("prisma:client");let h=xt.resolve(e.dirname,e.relativePath);vi.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:xt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Bs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:gs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:mt,getBatchRequestPayload:_r,prismaGraphQLToJSError:Fr,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:oe,debug:X("prisma:client:accelerateEngine"),engineVersion:Xs.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ts(e,this._engineConfig),this._requestHandler=new Gr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{Tt.log(`${Tt.tags[A]??""}`,R.message||R.query)})}this._metrics=new Bt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Bi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Wn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Zs(n,i);return Qn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Qn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Cs,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Wn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Zs(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=$c.nextId(),s=Ls(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Ys(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return qt(Ee(es(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Hn(n)),te(Uc,()=>n.id),ct(ks)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Bc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,D=>g(f,M=>(D?.end(),l(M))));let{runInTransaction:h,args:v,...S}=f,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await ls(this,A);return A.model?is({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=f?f(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Tn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return X.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Jo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Zs(e,t){return Vc(e)?[new le(e,t),Ms]:[e,Ns]}function Vc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var jc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Jc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!jc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();var export_warnEnvConflicts=void 0;export{Li as Debug,ve as Decimal,bi as Extensions,Bt as MetricsClient,Q as PrismaClientInitializationError,oe as PrismaClientKnownRequestError,Se as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,Pi as Public,le as Sql,Fu as defineDmmfProperty,At as deserializeJsonResponse,Zn as deserializeRawResult,_u as dmmfToRuntimeDataModel,Ju as empty,qc as getPrismaClient,Ln as getRuntime,ju as join,Jc as makeStrictEnum,Bu as makeTypedQueryFactory,En as objectEnumValues,$o as raw,Tn as serializeJsonQuery,Pn as skip,qo as sqltag,export_warnEnvConflicts as warnEnvConflicts,mr as warnOnce}; -//# sourceMappingURL=edge-esm.js.map diff --git a/charybdis/local-prisma/local-prisma-client/runtime/edge.js b/charybdis/local-prisma/local-prisma-client/runtime/edge.js deleted file mode 100644 index 0acd43dc..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/edge.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict";var ua=Object.create;var sr=Object.defineProperty;var ca=Object.getOwnPropertyDescriptor;var pa=Object.getOwnPropertyNames;var ma=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)sr(e,r,{get:t[r],enumerable:!0})},ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pa(t))!da.call(e,i)&&i!==r&&sr(e,i,{get:()=>t[i],enumerable:!(n=ca(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?ua(ma(e)):{},ii(t||!e||!e.__esModule?sr(r,"default",{value:e,enumerable:!0}):r,e)),fa=e=>ii(sr({},"__esModule",{value:!0}),e);var y,u=Re(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,c=Re(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=Re(()=>{"use strict";E=()=>{};E.prototype=E});var m=Re(()=>{"use strict"});var vi=Fe(Ke=>{"use strict";d();u();c();p();m();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ga=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function l(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function f(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],U=D[1],k=new n(f(A,M,U)),F=0,L=U>0?M-4:M,G;for(G=0;G>16&255,k[F++]=R>>8&255,k[F++]=R&255;return U===2&&(R=r[A.charCodeAt(G)]<<2|r[A.charCodeAt(G+1)]>>4,k[F++]=R&255),U===1&&(R=r[A.charCodeAt(G)]<<10|r[A.charCodeAt(G+1)]<<4|r[A.charCodeAt(G+2)]>>2,k[F++]=R>>8&255,k[F++]=R&255),k}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,U=[],k=R;kL?L:F+k));return M===1?(R=A[D-1],U.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],U.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),U.join("")}}),ha=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+v>=1?r+=S/f:r+=S*Math.pow(2,1-v),r*f>=2&&(a++,f/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*f-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),rn=ga(),We=ha(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ke.Buffer=T;Ke.SlowBuffer=Pa;Ke.INSPECT_MAX_BYTES=50;var lr=2147483647;Ke.kMaxLength=lr;T.TYPED_ARRAY_SUPPORT=ya();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ya(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>lr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sn(e)}return ci(e,t,r)}T.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return Ea(e,t);if(ArrayBuffer.isView(e))return ba(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=xa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function pi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function wa(e,t,r){return pi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return wa(e,t,r)};function sn(e){return pi(e),xe(e<0?0:an(e)|0)}T.allocUnsafe=function(e){return sn(e)};T.allocUnsafeSlow=function(e){return sn(e)};function Ea(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function nn(e){let t=e.length<0?0:an(e.length)|0,r=xe(t);for(let n=0;n=lr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lr.toString(16)+" bytes");return e|0}function Pa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return on(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:on(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=di;function va(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ma(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return ka(this,t,r);case"latin1":case"binary":return Da(this,t,r);case"base64":return Ia(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Na(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};oi&&(T.prototype[oi]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,un(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:si(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ta(this,e,t,r);case"utf8":case"utf-8":return Ca(this,e,t,r);case"ascii":case"latin1":case"binary":return Aa(this,e,t,r);case"base64":return Ra(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ia(e,t,r){return t===0&&r===e.length?rn.fromByteArray(e):rn.fromByteArray(e.slice(t,r))}function gi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Oa(n)}var ai=4096;function Oa(e){let t=e.length;if(t<=ai)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function hi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function yi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Se(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Se(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Se(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Se(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function _a(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function xi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Qe.ERR_OUT_OF_RANGE("value",a,e)}_a(n,i,o)}function He(e,t){if(typeof e!="number")throw new Qe.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Qe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Fa=/[^+/0-9A-Za-z-_]/g;function La(e){if(e=e.split("=")[0],e=e.trim().replace(Fa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function on(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ba(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return rn.toByteArray(La(e))}function ur(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function un(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,d=Re(()=>{"use strict";w=Le(vi())});function Va(){return!1}var ja,Ja,Ri,Si=Re(()=>{"use strict";d();u();c();p();m();ja={},Ja={existsSync:Va,promises:ja},Ri=Ja});function za(...e){return e.join("/")}function Ya(...e){return e.join("/")}var Vi,Za,Xa,vt,ji=Re(()=>{"use strict";d();u();c();p();m();Vi="/",Za={sep:Vi},Xa={resolve:za,posix:Za,join:Ya,sep:Vi},vt=Xa});var fr,Gi=Re(()=>{"use strict";d();u();c();p();m();fr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Fe((ad,Qi)=>{"use strict";d();u();c();p();m();Qi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var zi=Fe((Ed,Ki)=>{"use strict";d();u();c();p();m();Ki.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Zi=Fe((Cd,Yi)=>{"use strict";d();u();c();p();m();var ol=zi();Yi.exports=e=>typeof e=="string"?e.replace(ol(),""):e});var Cn=Fe((mh,ho)=>{"use strict";d();u();c();p();m();ho.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Hu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Go=Fe(()=>{"use strict";d();u();c();p();m()});var Wc={};ar(Wc,{Debug:()=>fn,Decimal:()=>fe,Extensions:()=>cn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>ve,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>Z,Public:()=>pn,Sql:()=>se,defineDmmfProperty:()=>qo,deserializeJsonResponse:()=>et,deserializeRawResult:()=>Yr,dmmfToRuntimeDataModel:()=>$o,empty:()=>Wo,getPrismaClient:()=>sa,getRuntime:()=>Jr,join:()=>Qo,makeStrictEnum:()=>aa,makeTypedQueryFactory:()=>Vo,objectEnumValues:()=>Or,raw:()=>Ln,serializeJsonQuery:()=>Fr,skip:()=>_r,sqltag:()=>Bn,warnEnvConflicts:()=>void 0,warnOnce:()=>Rt});module.exports=fa(Wc);d();u();c();p();m();var cn={};ar(cn,{defineExtension:()=>Ti,getExtensionContext:()=>Ci});d();u();c();p();m();d();u();c();p();m();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ci(e){return e}var pn={};ar(pn,{validator:()=>Ai});d();u();c();p();m();d();u();c();p();m();function Ai(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var mn,Ii,Oi,ki,Di=!0;typeof y<"u"&&({FORCE_COLOR:mn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:ki}=y.env||{},Di=y.stdout&&y.stdout.isTTY);var Ga={enabled:!Ii&&Oi==null&&ki!=="dumb"&&(mn!=null&&mn!=="0"||Di)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ga.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=j(0,0),cr=j(1,22),pr=j(2,22),Gp=j(3,23),Mi=j(4,24),Qp=j(7,27),Wp=j(8,28),Hp=j(9,29),Kp=j(30,39),ze=j(31,39),Ni=j(32,39),_i=j(33,39),Fi=j(34,39),zp=j(35,39),Li=j(36,39),Yp=j(37,39),Bi=j(90,39),Zp=j(90,39),Xp=j(40,49),em=j(41,49),tm=j(42,49),rm=j(43,49),nm=j(44,49),im=j(45,49),om=j(46,49),sm=j(47,49);d();u();c();p();m();var Qa=100,Ui=["green","yellow","blue","magenta","cyan","red"],mr=[],$i=Date.now(),Wa=0,dn=typeof y<"u"?y.env:{};globalThis.DEBUG??=dn.DEBUG??"";globalThis.DEBUG_COLORS??=dn.DEBUG_COLORS?dn.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ha(e){let t={color:Ui[Wa++%Ui.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>Qa&&mr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),f=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var fn=new Proxy(Ha,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function Ka(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function qi(){mr.length=0}var ee=fn;d();u();c();p();m();d();u();c();p();m();var Ji="library";function Tt(e){let t=el();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ji)}function el(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();u();c();p();m();d();u();c();p();m();var dr;(t=>{let e;(L=>(L.findUnique="findUnique",L.findUniqueOrThrow="findUniqueOrThrow",L.findFirst="findFirst",L.findFirstOrThrow="findFirstOrThrow",L.findMany="findMany",L.create="create",L.createMany="createMany",L.createManyAndReturn="createManyAndReturn",L.update="update",L.updateMany="updateMany",L.updateManyAndReturn="updateManyAndReturn",L.upsert="upsert",L.delete="delete",L.deleteMany="deleteMany",L.groupBy="groupBy",L.count="count",L.aggregate="aggregate",L.findRaw="findRaw",L.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(dr||={});var At={};ar(At,{error:()=>nl,info:()=>rl,log:()=>tl,query:()=>il,should:()=>Hi,tags:()=>Ct,warn:()=>gn});d();u();c();p();m();var Ct={error:ze("prisma:error"),warn:_i("prisma:warn"),info:Li("prisma:info"),query:Fi("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function tl(...e){console.log(...e)}function gn(e,...t){Hi.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function rl(e,...t){console.info(`${Ct.info} ${e}`,...t)}function nl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function il(e,...t){console.log(`${Ct.query} ${e}`,...t)}d();u();c();p();m();function Pe(e,t){throw new Error(t)}d();u();c();p();m();function hn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();var yn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();u();c();p();m();function Ye(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function wn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Xi.has(e)||(Xi.add(e),gn(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(Q,"PrismaClientInitializationError");d();u();c();p();m();var ne=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(ne,"PrismaClientKnownRequestError");d();u();c();p();m();var ve=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(ve,"PrismaClientRustPanicError");d();u();c();p();m();var ie=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(ie,"PrismaClientUnknownRequestError");d();u();c();p();m();var Z=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(Z,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var Ze=9e15,De=1e9,En="0123456789abcdef",hr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",yr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",bn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ze,maxE:Ze,crypto:!1},io,Te,N=!0,Er="[DecimalError] ",ke=Er+"Invalid argument: ",oo=Er+"Precision limit exceeded",so=Er+"crypto unavailable",ao="[object Decimal]",X=Math.floor,W=Math.pow,sl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,al=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ll=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,lo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,ul=9007199254740991,cl=hr.length-1,xn=yr.length-1,C={toStringTag:ao};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};C.ceil=function(){return I(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=pl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te==2||Te==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=q(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,I(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return I(q(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return I(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/xr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Xe(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Xe(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/xr(5,e)),i=Xe(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=xn)return s=ce(g,h+4,v).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=xn)return s=ce(g,h+4,v).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/O),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+S,s=Oe(f,a),n=t?wr(g,a+10):Oe(e,a),l=q(s,n,a,1),St(l.d,i=h,v))do if(a+=10,s=Oe(f,a),n=t?wr(g,a+10):Oe(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(St(l.d,i+=10,v));return N=!0,I(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(f=S.d,v=e.d,a=A.precision,l=A.rounding,!f[0]||!v[0]){if(v[0])e.s=-e.s;else if(f[0])e=new A(S);else return new A(l===3?-0:0);return N?I(e,a,l):e}if(r=X(e.e/O),g=X(S.e/O),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=v.length):(t=v,r=g,s=f.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=v.length,h=n0;--n)f[s++]=0;for(n=v.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=br(f,n),N?I(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=uo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+O,n.rounding=1,r=dl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,I(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Te==2||Te==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/O)+X(e.e/O),l=v.length,f=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=br(o,r),N?I(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Tn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,De),t===void 0?t=n.rounding:oe(t,0,8),I(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,!0):(oe(e,0,De),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e+1,t),r=de(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=de(i):(oe(e,0,De),t===void 0?t=o.rounding:oe(t,0,8),n=I(new o(i),e+i.e+1,t),r=de(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(f=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=uo(A)-S.e-1,s=o%O,t.d[0]=W(10,s<0?O+s:s),e==null)e=o>0?t:f;else{if(a=new R(e),!a.isInt()||a.lt(f))throw Error(ke+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new R(z(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=S.s,v=q(f,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[f,n]:[l,r],R.precision=g,N=!0,v};C.toHexadecimal=C.toHex=function(e,t){return Tn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=q(r,e,0,t,1).times(e),N=!0,I(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Tn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=X(e.e/O),t>=e.d.length-1&&(r=f<0?-f:f)<=ul)return i=co(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Pn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),St(i.d,n,o)&&(t=n+10,i=I(Pn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,I(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=de(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,De),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e,t),r=de(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,De),t===void 0?t=n.rounding:oe(t,0,8)),I(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return I(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=de(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function St(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=W(10,O-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function gr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function pl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/xr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Xe(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,v,S,A,R,D,M,U,k,F,L,G,Xr,nr,bt,en,ue,ir,or=n.constructor,tn=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new or(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?tn*0:tn/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=O,g=X(n.e/S)-X(i.e/S)),ue=V.length,bt=Y.length,M=new or(tn),U=M.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(G=o=or.precision,s=or.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)U.push(1),A=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,V=V[0],G++;(h1&&(V=e(V,v,l),Y=e(Y,v,l),ue=V.length,bt=Y.length),nr=ue,k=Y.slice(0,ue),F=k.length;F=l/2&&++en;do v=0,f=t(V,k,ue,F),f<0?(L=k[0],ue!=F&&(L=L*l+(k[1]||0)),v=L/en|0,v>1?(v>=l&&(v=l-1),R=e(V,v,l),D=R.length,F=k.length,f=t(R,k,D,F),f==1&&(v--,r(R,ue=10;v/=10)h++;M.e=h+g*S-1,I(M,a?o+M.e+1:o,s,A)}return M}}();function I(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=O,s=t,g=h[v=0],l=g/W(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=W(10,O-o),h[v]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function br(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function wr(e,t,r){if(t>cl)throw N=!0,r&&(e.precision=r),Error(oo);return I(new e(hr),t,1,!0)}function ce(e,t,r){if(t>xn)throw Error(oo);return I(new e(yr),t,r,!0)}function uo(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function co(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/O+4);for(N=!1;;){if(r%2&&(o=o.times(t),ro(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),ro(t.d,s)}return N=!0,o}function to(e){return e.d[e.d.length-1]&1}function po(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(f<3&&St(s.d,l-n,S,f))v.precision=l+=10,r=o=a=new v(1),g=0,f++;else return I(s,v.precision=A,S,N=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,U=M.rounding,k=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(N=!1,g=k):g=t,M.precision=g+=A,r=z(D),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=z(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return f=wr(M,g+2,k).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(f),M.precision=k,t==null?I(R,k,U,N=!0):R;for(h=R,l=s=R=q(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),f=l.plus(q(s,new M(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(wr(M,g+2,k).times(o+""))),l=q(l,new M(S),g,1),t==null)if(St(l.d,g-A,U,a))M.precision=g+=A,f=s=R=q(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,M.precision=k,U,N=!0);else return M.precision=k,l;l=f,i+=2}}function mo(e){return String(e.s*e.s/0)}function vn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),lo.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(al.test(t))r=16,t=t.toLowerCase();else if(sl.test(t))r=2;else if(ll.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=co(n,new n(r),o,o*2)),f=gr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=br(f,g),e.d=f,N=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ue.pow(2,l))),N=!0,e)}function dl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Xe(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/xr(5,r)),t=Xe(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Xe(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/O);for(N=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function xr(e,t){for(var r=e;--t;)r*=e;return r}function fo(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Te=n?4:1,t;if(r=t.divToInt(i),r.isZero())Te=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Te=to(r)?n?2:3:n?4:1,t;Te=to(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Tn(e,t,r,n){var i,o,s,a,l,f,g,h,v,S=e.constructor,A=r!==void 0;if(A?(oe(r,1,De),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=mo(e);else{for(g=de(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=gr(de(v),10,i),v.e=v.d.length),h=gr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,f=io),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=gr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function fl(e){return new this(e).abs()}function gl(e){return new this(e).acos()}function hl(e){return new this(e).acosh()}function yl(e,t){return new this(e).plus(t)}function wl(e){return new this(e).asin()}function El(e){return new this(e).asinh()}function bl(e){return new this(e).atan()}function xl(e){return new this(e).atanh()}function Pl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function vl(e){return new this(e).cbrt()}function Tl(e){return I(e=new this(e),e.e+1,2)}function Cl(e,t,r){return new this(e).clamp(t,r)}function Al(e){if(!e||typeof e!="object")throw Error(Er+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-Ze,0,"toExpPos",0,Ze,"maxE",0,Ze,"minE",-Ze,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=bn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(so);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function Rl(e){return new this(e).cos()}function Sl(e){return new this(e).cosh()}function go(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,no(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(so);else for(;o=10;i/=10)n++;ne.highlight()},nu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function iu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ou({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(su(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function su(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function vr(e){let t=e.showColors?ru:nu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=iu(e),ou(r,t)}d();u();c();p();m();var Po=Le(Cn());d();u();c();p();m();function Eo(e,t,r){let n=bo(e),i=au(n),o=uu(i);o?Tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function bo(e){return e.errors.flatMap(t=>t.kind==="Union"?bo(t):[t])}function au(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:lu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function lu(e,t){return[...new Set(e.concat(t))]}function uu(e){return wn(e,(t,r)=>{let n=yo(t),i=yo(r);return n!==i?n-i:wo(t)-wo(r)})}function yo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function wo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();var it=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();u();c();p();m();d();u();c();p();m();var Cr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Ar=e=>e,Rr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},xo={bold:cr,red:ze,green:Ni,dim:pr,enabled:!0},ot={write(e){e.writeLine(",")}};d();u();c();p();m();var ge=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Me=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var st=class extends Me{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Cr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ge("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(ot,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var at=class e extends Me{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof st&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ge("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(ot,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var K=class extends Me{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var It=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(ot,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":pu(e,t);break;case"IncludeOnScalar":mu(e,t);break;case"EmptySelection":du(e,t,r);break;case"UnknownSelectionField":yu(e,t);break;case"InvalidSelectionValue":wu(e,t);break;case"UnknownArgument":Eu(e,t);break;case"UnknownInputField":bu(e,t);break;case"RequiredArgumentMissing":xu(e,t);break;case"InvalidArgumentType":Pu(e,t);break;case"InvalidArgumentValue":vu(e,t);break;case"ValueTooLarge":Tu(e,t);break;case"SomeFieldsMissing":Cu(e,t);break;case"TooManyFieldsGiven":Au(e,t);break;case"Union":Eo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function pu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function mu(e,t){let[r,n]=Ot(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${kt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function du(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){fu(e,t,i);return}if(n.hasField("select")){gu(e,t);return}}if(r?.[tt(e.outputType.name)]){hu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function fu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function gu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Co(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${kt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function hu(e,t){let r=new It;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Ot(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new at;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function yu(e,t){let r=Ao(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Co(n,e.outputType);break;case"include":Ru(n,e.outputType);break;case"omit":Su(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(kt(n)),i.join(" ")})}function wu(e,t){let r=Ao(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Eu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Iu(n,e.arguments)),t.addErrorMessage(i=>vo(i,r,e.arguments.map(o=>o.name)))}function bu(e,t){let[r,n]=Ot(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ro(o,e.inputType)}t.addErrorMessage(o=>vo(o,n,e.inputType.fields.map(s=>s.name)))}function vo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ku(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(kt(e)),n.join(" ")}function xu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Ot(e.argumentPath),s=new It,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(To).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function To(e){return e.kind==="list"?`${To(e.elementType)}[]`:e.name}function Pu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Tu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Cu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ro(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(kt(i)),o.join(" ")})}function Au(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Co(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Ru(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Su(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Iu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ao(e,t){let[r,n]=Ot(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ro(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ot(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function kt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ou=3;function ku(e,t){let r=1/0,n;for(let i of t){let o=(0,Po.default)(e,i);o>Ou||o`}};function lt(e){return e instanceof Dt}d();u();c();p();m();var Ir=Symbol(),An=new WeakMap,Ce=class{constructor(t){t===Ir?An.set(this,`Prisma.${this._getName()}`):An.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return An.get(this)}},Mt=class extends Ce{_getNamespace(){return"NullTypes"}},Nt=class extends Mt{};Rn(Nt,"DbNull");var _t=class extends Mt{};Rn(_t,"JsonNull");var Ft=class extends Mt{};Rn(Ft,"AnyNull");var Or={classes:{DbNull:Nt,JsonNull:_t,AnyNull:Ft},instances:{DbNull:new Nt(Ir),JsonNull:new _t(Ir),AnyNull:new Ft(Ir)}};function Rn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Io=": ",kr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Io.length}write(t){let r=new ge(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Io).write(this.value)}};var Sn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function ut(e){return new Sn(Oo(e))}function Oo(e){let t=new at;for(let[r,n]of Object.entries(e)){let i=new kr(r,ko(n));t.addField(i)}return t}function ko(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(nt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Pr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Ce?new K(`Prisma.${e._getName()}`):lt(e)?new K(`prisma.${So(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Du(e):typeof e=="object"?Oo(e):new K(Object.prototype.toString.call(e))}function Du(e){let t=new st;for(let r of e)t.addItem(ko(r));return t}function Dr(e,t){let r=t==="pretty"?xo:Rr,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Mr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Tr(h,a,s);let{message:l,args:f}=Dr(a,r),g=vr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new Z(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();var he=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};d();u();c();p();m();function Lt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}d();u();c();p();m();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Mo(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Mu({...e,...Do(t.name,e,t.result.$allModels),...Do(t.name,e,t.result[n])})}function Mu(e){let t=new he,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ye(e,n=>({...n,needs:r(n.name,new Set)}))}function Do(e,t,r){return r?Ye(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Nu(t,o,i)})):{}}function Nu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function _o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Nr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new he;this.modelExtensionsCache=new he;this.queryCallbacksCache=new he;this.clientExtensions=Lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Lt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Mo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ye(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Nr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Nr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();d();u();c();p();m();var Fo=Symbol(),Bt=class{constructor(t){if(t!==Fo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_r:t}},_r=new Bt(Fo);function we(e){return e instanceof Bt}var _u={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Lo="explicitly `undefined` values are not allowed";function Fr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new In({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:_u[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Uo(r,n),selection:Fu(e,t,i,n)}}function Fu(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),$u(e,n)):Lu(n,t,r)}function Lu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Bu(n,t,e),Uu(n,r,e),n}function Bu(e,t,r){for(let[n,i]of Object.entries(t)){if(we(i))continue;let o=r.nestSelection(n);if(On(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function Uu(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=_o(i,n);for(let[s,a]of Object.entries(o)){if(we(a))continue;On(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function $u(e,t){let r={},n=t.getComputedFields(),i=No(e,n);for(let[o,s]of Object.entries(i)){if(we(s))continue;let a=t.nestSelection(o);On(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||we(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Bo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(rt(e)){if(Pr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return qu(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Vu(e))return e.values;if(nt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Or.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ju(e))return e.toJSON();if(typeof e=="object")return Uo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Uo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);we(i)||(i!==void 0?r[n]=Bo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Lo}))}return r}function qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[tt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();var pt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();u();c();p();m();function $o(e){return{models:kn(e.models),enums:kn(e.enums),types:kn(e.types)}}function kn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function qo(e,t){let r=Lt(()=>Ju(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ju(e){return{datamodel:{models:Dn(e.models),enums:Dn(e.enums),types:Dn(e.types)}}}function Dn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Mn=new WeakMap,Lr="$$PrismaTypedSql",Nn=class{constructor(t,r){Mn.set(this,{sql:t,values:r}),Object.defineProperty(this,Lr,{value:Lr})}get sql(){return Mn.get(this).sql}get values(){return Mn.get(this).values}};function Vo(e){return(...t)=>new Nn(e,t)}function jo(e){return e!=null&&e[Lr]===Lr}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function $t(e){return{ok:!1,error:e,map(){return $t(e)},flatMap(){return $t(e)}}}var _n=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new _n,r=Ee(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ee(t,e.queryRaw.bind(e)),executeRaw:Ee(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Gu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Wu(t,e.getConnectionInfo.bind(e))),n},Gu=(e,t)=>{let r=Ee(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Qu(e,o))}},Qu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),commit:Ee(e,t.commit.bind(t)),rollback:Ee(e,t.rollback.bind(t))});function Ee(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return $t({kind:"GenericJs",id:i})}}}function Wu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return $t({kind:"GenericJs",id:i})}}}var oa=Le(Jo());var Ak=Le(Go());Gi();Si();ji();d();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Br={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Br,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ho=Symbol.for("nodejs.util.inspect.custom");function be(e,t){let r=Ku(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ko(Reflect.ownKeys(o),r),a=Ko(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Br,...l?.getPropertyDescriptor(s)}:Br:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ho]=function(){let o={...this};return delete o[Ho],o},i}function Ku(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ko(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function $r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function zo(e){if(e===void 0)return"";let t=ut(e);return new it(0,{colors:Rr}).write(t).toString()}d();u();c();p();m();var zu="P2037";function qr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Yu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Yu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===zu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Un=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Un}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Yo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Xu(e);return Object.entries(t).reduce((n,[i,o])=>(Yo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Xu(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Vr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Zo(e,t){let r=Vr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}d();u();c();p();m();function ec(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function tc(e={}){return typeof e.select=="object"?t=>Vr(e)(t)._count:t=>Vr(e)(t)._count._all}function Xo(e,t){return t({action:"count",unpacker:tc(e),argsMapper:ec})(e)}d();u();c();p();m();function rc(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function es(e,t){return t({action:"groupBy",unpacker:nc(e),argsMapper:rc})(e)}function ts(e,t,r){if(t==="aggregate")return n=>Zo(n,r);if(t==="count")return n=>Xo(n,r);if(t==="groupBy")return n=>es(n,r)}d();u();c();p();m();function rs(e,t){let r=t.fields.filter(i=>!i.relationName),n=yn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Dt(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var ns=e=>Array.isArray(e)?e:e.split("."),$n=(e,t)=>ns(t).reduce((r,n)=>r&&r[n],e),is=(e,t,r)=>ns(t).reduceRight((n,i,o,s)=>Object.assign({},$n(e,s.slice(0,o)),{[i]:n}),r);function ic(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function oc(e,t,r){return t===void 0?e??{}:is(t,r,e||!0)}function qn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Ne(e._errorFormat),g=ic(n,i),h=oc(l,o,g),v=r({dataPath:g,callsite:f})(h),S=sc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],U=[g,h];return qn(e,...M,...U)},...Ur([...S,...Object.getOwnPropertyNames(v)])})}}function sc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var ac=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],lc=["aggregate","count","groupBy"];function Vn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[uc(e,t),pc(e,t),qt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return be({},n)}function uc(e,t){let r=ye(t),n=Object.keys(dr.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})})};return ac.includes(o)?qn(e,t,s):cc(i)?ts(e,i,s):s({})}}}function cc(e){return lc.includes(e)}function pc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return rs(t,r)}))}d();u();c();p();m();function os(e){return e.replace(/^./,t=>t.toUpperCase())}var jn=Symbol();function Vt(e){let t=[mc(e),te(jn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(qt(r)),be(e,t)}function mc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=os(i);if(e._runtimeDataModel.models[o]!==void 0)return Vn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Vn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ss(e){return e[jn]?e[jn]:e}function as(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Vt(t)}d();u();c();p();m();d();u();c();p();m();function ls({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(mt(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(mt(f))}dc(e,l.needs)&&s.push(fc(l,be(e,s)))}return s.length>0||a.length>0?be(e,[...s,...a]):e}function dc(e,t){return t.every(r=>hn(e,r))}function fc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=jr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function cs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=ye(l);return ls({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();function ps(e){if(e instanceof se)return gc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ps(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ys(o,l),a.args=s,ds(e,a,r,n+1)}})})}function fs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ds(e,t,s)}function gs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?hs(r,n,0,e):e(r)}}function hs(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ys(i,l),hs(a,t,r+1,n)}})}var ms=e=>e;function ys(e=ms,t=ms){return r=>e(t(r))}d();u();c();p();m();var ws=ee("prisma:client"),Es={Vercel:"vercel","Netlify CI":"netlify"};function bs({postinstall:e,ciName:t,clientVersion:r}){if(ws("checkPlatformCaching:postinstall",e),ws("checkPlatformCaching:ciName",t),e===!0&&t&&t in Es){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Es[t]}-build`;throw console.error(n),new Q(n,r)}}d();u();c();p();m();function xs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var hc="Cloudflare-Workers",yc="node";function Ps(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===hc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===yc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var wc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Jr(){let e=Ps();return{id:e,prettyName:wc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Jr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();var Gr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Gr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();d();u();c();p();m();function B(e,t){return{...e,isRetryable:t}}var gt=class extends ae{constructor(r){super("This request must be retried",B(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(gt,"ForcedRetryError");d();u();c();p();m();var qe=class extends ae{constructor(r,n){super(r,B(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(qe,"InvalidDatasourceError");d();u();c();p();m();var Ve=class extends ae{constructor(r,n){super(r,B(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(Ve,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var J=class extends ae{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var je=class extends J{constructor(r){super("Schema needs to be uploaded",B(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(je,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Jn="This request could not be understood by the server",Jt=class extends J{constructor(r,n,i){super(n||Jn,B(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Jt,"BadRequestError");d();u();c();p();m();var Gt=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",B(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Gt,"HealthcheckTimeoutError");d();u();c();p();m();var Qt=class extends J{constructor(r,n,i){super(n,B(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Qt,"EngineStartupError");d();u();c();p();m();var Wt=class extends J{constructor(r){super("Engine version is not supported",B(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Wt,"EngineVersionNotSupportedError");d();u();c();p();m();var Gn="Request timed out",Ht=class extends J{constructor(r,n=Gn){super(n,B(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Ht,"GatewayTimeoutError");d();u();c();p();m();var Ec="Interactive transaction error",Kt=class extends J{constructor(r,n=Ec){super(n,B(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Kt,"InteractiveTransactionError");d();u();c();p();m();var bc="Request parameters are invalid",zt=class extends J{constructor(r,n=bc){super(n,B(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(zt,"InvalidRequestError");d();u();c();p();m();var Qn="Requested resource does not exist",Yt=class extends J{constructor(r,n=Qn){super(n,B(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Yt,"NotFoundError");d();u();c();p();m();var Wn="Unknown server error",ht=class extends J{constructor(r,n,i){super(n||Wn,B(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(ht,"ServerError");d();u();c();p();m();var Hn="Unauthorized, check your connection string",Zt=class extends J{constructor(r,n=Hn){super(n,B(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Zt,"UnauthorizedError");d();u();c();p();m();var Kn="Usage exceeded, retry again later",Xt=class extends J{constructor(r,n=Kn){super(n,B(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Xt,"UsageExceededError");async function xc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function er(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await xc(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new je(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Wt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Kt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Zt(r,yt(Hn,n));if(e.status===404)return new Yt(r,yt(Qn,n));if(e.status===429)throw new Xt(r,yt(Kn,n));if(e.status===504)throw new Ht(r,yt(Gn,n));if(e.status>=500)throw new ht(r,yt(Wn,n));if(e.status>=400)throw new Jt(r,yt(Jn,n))}function yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function vs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ts(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}d();u();c();p();m();function Cs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();function Pc(e){return e[0]*1e3+e[1]/1e6}function zn(e){return new Date(Pc(e))}d();u();c();p();m();var As={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var tr=class extends ae{constructor(r,n){super(`Cannot fetch data from service: -${r}`,B(n,!0));this.name="RequestError";this.code="P5010"}};_(tr,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new tr(a,{clientVersion:n,cause:s})}}var Tc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Rs=ee("prisma:client:dataproxyEngine");async function Cc(e,t){let r=As["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&Tc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=Ac(`<=${a}.${l}.${f}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Rs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ss(e,t){let r=await Cc(e,t);return Rs("version",r),r}function Ac(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Is=3,Qr=ee("prisma:client:dataproxyEngine"),Yn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},rr=class{constructor(t){this.name="DataProxyEngine";Cs(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=Ts(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Yn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ss(t,this.config),Qr("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Qr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:zn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:zn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Qr("schema response status",r.status);let n=await er(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=$r(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Qr("graphql response status",a.status),await this.handleError(await er(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await er(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,v=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await er(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=ft({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Is)throw i instanceof gt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Is} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await vs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof je)throw await this.uploadSchema(),new gt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?qr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Os({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Rt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Tt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let f;throw f=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new Z(f.join(` -`),{clientVersion:t.clientVersion})}if(o)return new rr(t);throw new Z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();u();c();p();m();function Wr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var ks=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var Ds=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function wt(e){try{return Ms(e,"fast")}catch{return Ms(e,"slow")}}function Ms(e,t){return JSON.stringify(e.map(r=>_s(r,t)))}function _s(e,t){if(Array.isArray(e))return e.map(r=>_s(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(rt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rc(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Fs(e):e}function Rc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Fs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ns);let t={};for(let r of Object.keys(e))t[r]=Ns(e[r]);return t}function Ns(e){return typeof e=="bigint"?e.toString():Fs(e)}d();u();c();p();m();var Sc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ls=Sc;var Ic=/^(\s*alter\s)/i,Bs=ee("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ic.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(jo(r))n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:wt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ds(r),i={values:wt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Bs(`prisma.${e}(${n}, ${i.values})`):Bs(`prisma.${e}(${n})`),{query:n,parameters:i}},Us={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},$s={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function ei(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=qs(r(o)):qs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function qs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var Oc={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Oc}};function Vs(){return new ti}d();u();c();p();m();function js(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Hr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var Qs=Le(Zi());d();u();c();p();m();function Kr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Gs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}d();u();c();p();m();var kc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return kc[e]}d();u();c();p();m();var zr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function Yr(e){let t=[],r=Dc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Nc(o),containsWrite:f,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ws(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Gs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Mc(t),_c(t,i))throw t;if(t instanceof ne&&Fc(t)){let f=Hs(t.meta);Mr({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=vr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ve(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ve)throw new ve(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=$n(o,s),l=i==="queryRaw"?Yr(a):et(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Nc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ws(e)};Pe(e,"Unknown transaction kind")}}function Ws(e){return{id:e.id,payload:e.payload}}function _c(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Fc(e){return e.code==="P2009"||e.code==="P2012"}function Hs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var Ks="6.2.1";var zs=Ks;d();u();c();p();m();var ta=Le(Cn());d();u();c();p();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_($,"PrismaClientConstructorValidationError");var Ys=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Zs=["pretty","colorless","minimal"],Xs=["info","query","warn","error"],Bc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Et(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Wr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Tt()==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Zs.includes(e)){let t=Et(e,Zs);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Xs.includes(r)){let n=Et(r,Xs);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Et(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=$c(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(qc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Et(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Ys.includes(r)){let i=Et(r,Ys);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Bc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Et(e,t){if(t.length===0||typeof e!="string")return"";let r=Uc(e,t);return r?` Did you mean "${r}"?`:""}function Uc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distancett(n)===t);if(r)return e[r]}function qc(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Dr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function na(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jc=Symbol.for("prisma.client.transaction.id"),Jc={id:0,nextId(){return++this.id}};function sa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Hr;this._createPrismaPromise=ei();this.$extends=as;e=n?.__internal?.configOverride?.(e)??e,bs(e),n&&ra(n,e);let i=new fr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??zs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Vs();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&vt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&vt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&ee.enable("prisma:client");let h=vt.resolve(e.dirname,e.relativePath);Ri.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:vt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:xs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:$r,prismaGraphQLToJSError:qr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ne,debug:ee("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Os(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{At.log(`${At.tags[A]??""}`,R.message||R.query)})}this._metrics=new pt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Vt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{qi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ks,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Jc.nextId(),s=js(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return na(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return Vt(be(ss(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ei(n)),te(jc,()=>n.id),mt(Ls)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Vc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,D=>g(f,M=>(D?.end(),l(M))));let{runInTransaction:h,args:v,...S}=f,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await fs(this,A);return A.model?cs({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=f?f(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Fr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${zo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Gc(e)?[new se(e,t),Us]:[e,$s]}function Gc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var Qc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function aa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=edge.js.map diff --git a/charybdis/local-prisma/local-prisma-client/runtime/index-browser.d.ts b/charybdis/local-prisma/local-prisma-client/runtime/index-browser.d.ts deleted file mode 100644 index 8f6c3e24..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/index-browser.d.ts +++ /dev/null @@ -1,365 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export { } diff --git a/charybdis/local-prisma/local-prisma-client/runtime/index-browser.js b/charybdis/local-prisma/local-prisma-client/runtime/index-browser.js deleted file mode 100644 index 8f0457df..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/index-browser.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";var de=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Me=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ge(n))!Je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=We(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Me(Xn,{Decimal:()=>je,Public:()=>he,getRuntime:()=>be,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Me(he,{validator:()=>Ce});function Ce(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},G=class extends ge{_getNamespace(){return"NullTypes"}},J=class extends G{};me(J,"DbNull");var X=class extends G{};me(X,"JsonNull");var K=class extends G{};me(K,"AnyNull");var Oe={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var xe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!xe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Qe="Cloudflare-Workers",Ye="node";function Re(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Qe?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===Ye?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function be(){let e=Re();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,$=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",V=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",b=Math.floor,C=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error(V+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*C(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-b(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),x(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(x(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=b(e.e/m),c=b(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(V+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=b((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=b(c.e/m)+b(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(_(e,0,$),n===void 0?n=t.rounding:_(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(_(e,0,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(_(e,0,$),n===void 0?n=s.rounding:_(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error(V+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:_(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(C(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=b(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),x(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(_(e,1,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(_(e,1,$),n===void 0?n=t.rounding:_(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error(V+e)}function x(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,A,M,q,E,P,Y,I,le,z,W,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,R=t.d,k=r.d;if(!R||!R[0]||!k||!k[0])return new ee(!t.s||!r.s||(R?k&&R[0]==k[0]:!k)?NaN:R&&R[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=b(t.e/g)-b(r.e/g)),T=k.length,W=R.length,M=new ee(ae),q=M.d=[],a=0;k[a]==(R[a]||0);a++);if(k[a]>(R[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),R=e(R,d,l),T=k.length,W=R.length),z=T,E=R.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(Y=E[0],T!=P&&(Y=Y*l+(E[1]||0)),d=Y/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+c*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%C(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(c/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),_e(s.d,o)&&(r=!0)),i=b(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),_e(n.d,o)}return w=!0,s}function Ae(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&x(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,q=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,c=E):c=n,M.precision=c+=v,i=O(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=se(M,c+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),c-v).plus(f),M.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new M(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(M,c+2,E).times(s+""))),l=S(l,new M(g),c,1),n==null)if(x(l.d,c-v,q,u))M.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,M.precision=E,q,w=!0);else return M.precision=E,l;l=f,r+=2}}function Ve(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error(V+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?C(2,l):Q.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function $e(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Ae(i)?t?2:3:t?4:1,n;Z=Ae(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(_(i,1,$),t===void 0?t=g.rounding:_(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=Ve(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,$,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error(V+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error(V+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/charybdis/local-prisma/local-prisma-client/runtime/library.d.ts b/charybdis/local-prisma/local-prisma-client/runtime/library.d.ts deleted file mode 100644 index 8ac1efcb..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/library.d.ts +++ /dev/null @@ -1,3395 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: EngineConfig['accelerateUtils']; -}; - -export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare type ActiveConnectorType = Exclude; - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} ? { - [P in K]: Record; -} : {}; - -declare class AnyNull extends NullTypesEnumValue { -} - -export declare type ApplyOmit = Compute<{ - [K in keyof T as OmitValue extends true ? never : K]: T[K]; -}>; - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -export declare type Args_3 = Args; - -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time'; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = string | number | boolean | Array | Array | Array; - -export declare type BaseDMMF = { - readonly datamodel: Omit; -}; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResultData | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -export declare type ClientOptionDef = undefined | { - [K in string]: any; -}; - -export declare type ClientOtherOps = { - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $queryRawTyped(query: TypedSql): PrismaPromise; - $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $runCommandRaw(command: InputJsonObject): PrismaPromise; -}; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -export declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -export declare type ComputeDeep = T extends Function ? T : { - [K in keyof T]: ComputeDeep; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; -}; - -declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb'; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} ? C & T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -} : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -}; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -/** - * Custom fetch function for `DataProxyEngine`. - * - * We can't use the actual type of `globalThis.fetch` because this will result - * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle - * for the client runtime. We can only use such types in internal types that - * don't end up exported anywhere. - - * It's also not possible to write a definition of `fetch` that would accept the - * actual `fetch` function from different environments such as Node.js and - * Cloudflare Workers (with their extensions to `RequestInit` and `Response`). - * `fetch` is used in both covariant and contravariant positions in - * `CustomDataProxyFetch`, making it invariant, so we need the exact same type. - * Even if we removed the argument and left `fetch` in covariant position only, - * then for an extension-supplied function to be assignable to `customDataProxyFetch`, - * the platform-specific (or custom) `fetch` function needs to be assignable - * to our `fetch` definition. This, in turn, requires the third-party `Response` - * to be a subtype of our `Response` (which is not a problem, we could declare - * a minimal `Response` type that only includes what we use) *and* requires the - * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we - * have to declare all properties any `RequestInit` implementation in existence - * could possibly have), which is not possible. - * - * Since `@prisma/extension-accelerate` redefines the type of - * `__internalParams.customDataProxyFetch` to its own type anyway (probably for - * exactly this reason), our definition is never actually used and is completely - * ignored, so it doesn't matter, and we can just use `unknown` as the type of - * `fetch` here. - */ -declare type CustomDataProxyFetch = (fetch: unknown) => unknown; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection = Args extends { - omit: infer LocalOmit; -} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; - -export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; - -declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; - -declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; - -declare type DeserializedResponse = Array>; - -export declare function deserializeJsonResponse(result: unknown): unknown; - -export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; - -export declare type DevTypeMapDef = { - meta: { - modelProps: string; - }; - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; - }; - other: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; -}; - -export declare type DevTypeMapFnDef = { - args: any; - result: any; - payload: OperationPayload; -}; - -export declare namespace DMMF { - export type Document = ReadonlyDeep_2<{ - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; - }>; - export type Mappings = ReadonlyDeep_2<{ - modelOperations: ModelMapping[]; - otherOperations: { - read: string[]; - write: string[]; - }; - }>; - export type OtherOperationMappings = ReadonlyDeep_2<{ - read: string[]; - write: string[]; - }>; - export type DatamodelEnum = ReadonlyDeep_2<{ - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; - }>; - export type SchemaEnum = ReadonlyDeep_2<{ - name: string; - values: string[]; - }>; - export type EnumValue = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - }>; - export type Datamodel = ReadonlyDeep_2<{ - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - indexes: Index[]; - }>; - export type uniqueIndex = ReadonlyDeep_2<{ - name: string; - fields: string[]; - }>; - export type PrimaryKey = ReadonlyDeep_2<{ - name: string | null; - fields: string[]; - }>; - export type Model = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - schema: string | null; - fields: Field[]; - uniqueFields: string[][]; - uniqueIndexes: uniqueIndex[]; - documentation?: string; - primaryKey: PrimaryKey | null; - isGenerated?: boolean; - }>; - export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; - export type FieldNamespace = 'model' | 'prisma'; - export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; - export type Field = ReadonlyDeep_2<{ - kind: FieldKind; - name: string; - isRequired: boolean; - isList: boolean; - isUnique: boolean; - isId: boolean; - isReadOnly: boolean; - isGenerated?: boolean; - isUpdatedAt?: boolean; - /** - * Describes the data type in the same the way it is defined in the Prisma schema: - * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName - */ - type: string; - /** - * Native database type, if specified. - * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, - * `@db.Text` is encoded as `['Text', []]`. - */ - nativeType?: [string, string[]] | null; - dbName?: string | null; - hasDefaultValue: boolean; - default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; - relationFromFields?: string[]; - relationToFields?: string[]; - relationOnDelete?: string; - relationName?: string; - documentation?: string; - }>; - export type FieldDefault = ReadonlyDeep_2<{ - name: string; - args: Array; - }>; - export type FieldDefaultScalar = string | boolean | number; - export type Index = ReadonlyDeep_2<{ - model: string; - type: IndexType; - isDefinedOnField: boolean; - name?: string; - dbName?: string; - algorithm?: string; - clustered?: boolean; - fields: IndexField[]; - }>; - export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; - export type IndexField = ReadonlyDeep_2<{ - name: string; - sortOrder?: SortOrder; - length?: number; - operatorClass?: string; - }>; - export type SortOrder = 'asc' | 'desc'; - export type Schema = ReadonlyDeep_2<{ - rootQueryType?: string; - rootMutationType?: string; - inputObjectTypes: { - model?: InputType[]; - prisma: InputType[]; - }; - outputObjectTypes: { - model: OutputType[]; - prisma: OutputType[]; - }; - enumTypes: { - model?: SchemaEnum[]; - prisma: SchemaEnum[]; - }; - fieldRefTypes: { - prisma?: FieldRefType[]; - }; - }>; - export type Query = ReadonlyDeep_2<{ - name: string; - args: SchemaArg[]; - output: QueryOutput; - }>; - export type QueryOutput = ReadonlyDeep_2<{ - name: string; - isRequired: boolean; - isList: boolean; - }>; - export type TypeRef = { - isList: boolean; - type: string; - location: AllowedLocations; - namespace?: FieldNamespace; - }; - export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - export type SchemaArg = ReadonlyDeep_2<{ - name: string; - comment?: string; - isNullable: boolean; - isRequired: boolean; - inputTypes: InputTypeRef[]; - deprecation?: Deprecation; - }>; - export type OutputType = ReadonlyDeep_2<{ - name: string; - fields: SchemaField[]; - }>; - export type SchemaField = ReadonlyDeep_2<{ - name: string; - isNullable?: boolean; - outputType: OutputTypeRef; - args: SchemaArg[]; - deprecation?: Deprecation; - documentation?: string; - }>; - export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; - export type Deprecation = ReadonlyDeep_2<{ - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; - }>; - export type InputType = ReadonlyDeep_2<{ - name: string; - constraints: { - maxNumFields: number | null; - minNumFields: number | null; - fields?: string[]; - }; - meta?: { - source?: string; - }; - fields: SchemaArg[]; - }>; - export type FieldRefType = ReadonlyDeep_2<{ - name: string; - allowTypes: FieldRefAllowType[]; - fields: SchemaArg[]; - }>; - export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - export type ModelMapping = ReadonlyDeep_2<{ - model: string; - plural: string; - findUnique?: string | null; - findUniqueOrThrow?: string | null; - findFirst?: string | null; - findFirstOrThrow?: string | null; - findMany?: string | null; - create?: string | null; - createMany?: string | null; - createManyAndReturn?: string | null; - update?: string | null; - updateMany?: string | null; - updateManyAndReturn?: string | null; - upsert?: string | null; - delete?: string | null; - deleteMany?: string | null; - aggregate?: string | null; - groupBy?: string | null; - count?: string | null; - findRaw?: string | null; - aggregateRaw?: string | null; - }>; - export enum ModelAction { - findUnique = "findUnique", - findUniqueOrThrow = "findUniqueOrThrow", - findFirst = "findFirst", - findFirstOrThrow = "findFirstOrThrow", - findMany = "findMany", - create = "create", - createMany = "createMany", - createManyAndReturn = "createManyAndReturn", - update = "update", - updateMany = "updateMany", - updateManyAndReturn = "updateManyAndReturn", - upsert = "upsert", - delete = "delete", - deleteMany = "deleteMany", - groupBy = "groupBy", - count = "count",// TODO: count does not actually exist, why? - aggregate = "aggregate", - findRaw = "findRaw", - aggregateRaw = "aggregateRaw" - } -} - -export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel; - -export declare interface DriverAdapter extends Queryable { - /** - * Starts new transaction. - */ - transactionContext(): Promise>; - /** - * Optional method that returns extra connection info - */ - getConnectionInfo?(): Result_4; -} - -/** Client */ -export declare type DynamicClientExtensionArgs, ClientOptions> = { - [P in keyof C_]: unknown; -} & { - [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; - }; - }; -}; - -export declare type DynamicClientExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['client']]: Return; -} & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; -} & { - [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; -} & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; -} & { - [K: symbol]: { - types: TypeMap['other']; - }; -}; - -export declare type DynamicClientExtensionThisBuiltin, ClientOptions> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call, ClientOptions>; - $transaction

[]>(arg: [...P], options?: { - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise>; - $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { - maxWait?: number; - timeout?: number; - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise; - $disconnect(): Promise; - $connect(): Promise; -}; - -/** Model */ -export declare type DynamicModelExtensionArgs, ClientOptions> = { - [K in keyof M_]: K extends '$allModels' ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: {}; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: { - ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { - $parent: DynamicClientExtensionThis; - } & { - $name: ModelKey; - } & { - /** - * @deprecated Use `$name` instead. - */ - name: ModelKey; - }; - }; - } : never; -}; - -export declare type DynamicModelExtensionFluentApi = { - [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; -}; - -export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; - -export declare type DynamicModelExtensionFnResultBase = GetResult; - -export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; - -export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; - -export declare type DynamicModelExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; -} & { - [P in Exclude]>]: DynamicModelExtensionOperationFn; -} & { - [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; -} & { - [K: symbol]: { - types: TypeMap['model'][M]; - }; -}; - -/** Query */ -export declare type DynamicQueryExtensionArgs = { - [K in keyof Q_]: K extends '$allOperations' ? (args: { - model?: string; - operation: string; - args: any; - query: (args: any) => PrismaPromise; - }) => Promise : K extends '$allModels' ? { - [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; - } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; -}; - -export declare type DynamicQueryExtensionCb = >(args: A) => Promise; - -export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { - args: DynamicQueryExtensionCbArgsArgs; - model: _0 extends 0 ? undefined : _1; - operation: _2; - query: >(args: A) => PrismaPromise; -} : never : never) & { - query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; -}; - -export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; - -/** Result */ -export declare type DynamicResultExtensionArgs = { - [K in keyof R_]: { - [P in keyof R_[K]]?: { - needs?: DynamicResultExtensionNeeds, R_[K][P]>; - compute(data: DynamicResultExtensionData, R_[K][P]>): any; - }; - }; -}; - -export declare type DynamicResultExtensionData = GetFindResult; - -export declare type DynamicResultExtensionNeeds = { - [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; -} & { - [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; -}; - -/** - * Placeholder value for "no text". - */ -export declare const empty: Sql; - -export declare type EmptyToUnknown = T; - -declare interface Engine { - /** The name of the engine. This is meant to be consumed externally */ - readonly name: string; - onBeforeExit(callback: () => Promise): void; - start(): Promise; - stop(): Promise; - version(forceRun?: boolean): Promise | string; - request(query: JsonQuery, options: RequestOptions): Promise>; - requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; - transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; - transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - metrics(options: MetricsOptionsJson): Promise; - metrics(options: MetricsOptionsPrometheus): Promise; - applyPendingMigrations(): Promise; -} - -declare interface EngineConfig { - cwd: string; - dirname: string; - datamodelPath: string; - enableDebugLogs?: boolean; - allowTriggerPanic?: boolean; - prismaPath?: string; - generator?: GeneratorConfig; - overrideDatasources: Datasources; - showColors?: boolean; - logQueries?: boolean; - logLevel?: 'info' | 'warn'; - env: Record; - flags?: string[]; - clientVersion: string; - engineVersion: string; - previewFeatures?: string[]; - engineEndpoint?: string; - activeProvider?: string; - logEmitter: LogEmitter; - transactionOptions: Transaction_2.Options; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. - * If set, this is only used in the library engine, and all queries would be performed through it, - * rather than Prisma's Rust drivers. - * @remarks only used by LibraryEngine.ts - */ - adapter?: ErrorCapturingDriverAdapter; - /** - * The contents of the schema encoded into a string - * @remarks only used by DataProxyEngine.ts - */ - inlineSchema: string; - /** - * The contents of the datasource url saved in a string - * @remarks only used by DataProxyEngine.ts - */ - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - /** - * The string hash that was produced for a given schema - * @remarks only used by DataProxyEngine.ts - */ - inlineSchemaHash: string; - /** - * The helper for interaction with OTEL tracing - * @remarks enabling is determined by the client and @prisma/instrumentation package - */ - tracingHelper: TracingHelper; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * Web Assembly module loading configuration - */ - engineWasm?: WasmLoadingConfig; - /** - * Allows Accelerate to use runtime utilities from the client. These are - * necessary for the AccelerateEngine to function correctly. - */ - accelerateUtils?: { - resolveDatasourceUrl: typeof resolveDatasourceUrl; - getBatchRequestPayload: typeof getBatchRequestPayload; - prismaGraphQLToJSError: typeof prismaGraphQLToJSError; - PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; - PrismaClientInitializationError: typeof PrismaClientInitializationError; - PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; - debug: (...args: any[]) => void; - engineVersion: string; - clientVersion: string; - }; -} - -declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; - -declare type EngineEventType = QueryEventType | LogEventType; - -declare type EngineProtocol = 'graphql' | 'json'; - -declare type EngineSpan = { - id: EngineSpanId; - parentId: string | null; - name: string; - startTime: HrTime; - endTime: HrTime; - kind: EngineSpanKind; - attributes?: Record; - links?: EngineSpanId[]; -}; - -declare type EngineSpanId = string; - -declare type EngineSpanKind = 'client' | 'internal'; - -declare type EnvPaths = { - rootEnvPath: string | null; - schemaEnvPath: string | undefined; -}; - -declare interface EnvValue { - fromEnvVar: null | string; - value: null | string; -} - -export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; - -declare type Error_2 = { - kind: 'GenericJs'; - id: number; -} | { - kind: 'UnsupportedNativeDataType'; - type: string; -} | { - kind: 'Postgres'; - code: string; - severity: string; - message: string; - detail: string | undefined; - column: string | undefined; - hint: string | undefined; -} | { - kind: 'Mysql'; - code: number; - message: string; - state: string; -} | { - kind: 'Sqlite'; - /** - * Sqlite extended error code: https://www.sqlite.org/rescode.html - */ - extendedCode: number; - message: string; -}; - -declare interface ErrorCapturingDriverAdapter extends DriverAdapter { - readonly errorRegistry: ErrorRegistry; -} - -declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - -declare type ErrorRecord = { - error: unknown; -}; - -declare interface ErrorRegistry { - consumeError(id: number): ErrorRecord | undefined; -} - -declare interface ErrorWithBatchIndex { - batchRequestIdx?: number; -} - -declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; - -export declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -/** - * Defines Exception. - * - * string or an object with one of (message or name or code) and optional stack - */ -declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; - -declare interface ExceptionWithCode { - code: string | number; - name?: string; - message?: string; - stack?: string; -} - -declare interface ExceptionWithMessage { - code?: string | number; - message: string; - name?: string; - stack?: string; -} - -declare interface ExceptionWithName { - code?: string | number; - message?: string; - name: string; - stack?: string; -} - -declare type ExtendedEventType = LogLevel | 'beforeExit'; - -declare type ExtendedSpanOptions = SpanOptions & { - /** The name of the span */ - name: string; - internal?: boolean; - middleware?: boolean; - /** Whether it propagates context (?=true) */ - active?: boolean; - /** The context to append the span to */ - context?: Context; -}; - -/** $extends, defineExtension */ -export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call, ClientOptions = {}> { - extArgs: ExtArgs; - , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { - $extends: { - extArgs: Args; - }; - }) | { - name?: string; - query?: DynamicQueryExtensionArgs; - result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; - }): { - extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs, ClientOptions>; - define: (client: any) => { - $extends: { - extArgs: Args; - }; - }; - }[Variant]; -} - -export declare type ExtensionArgs = Optional; - -declare namespace Extensions { - export { - defineExtension, - getExtensionContext - } -} -export { Extensions } - -declare namespace Extensions_2 { - export { - InternalArgs, - DefaultArgs, - GetPayloadResultExtensionKeys, - GetPayloadResultExtensionObject, - GetPayloadResult, - GetSelect, - GetOmit, - DynamicQueryExtensionArgs, - DynamicQueryExtensionCb, - DynamicQueryExtensionCbArgs, - DynamicQueryExtensionCbArgsArgs, - DynamicResultExtensionArgs, - DynamicResultExtensionNeeds, - DynamicResultExtensionData, - DynamicModelExtensionArgs, - DynamicModelExtensionThis, - DynamicModelExtensionOperationFn, - DynamicModelExtensionFnResult, - DynamicModelExtensionFnResultBase, - DynamicModelExtensionFluentApi, - DynamicModelExtensionFnResultNull, - DynamicClientExtensionArgs, - DynamicClientExtensionThis, - ClientBuiltInProp, - DynamicClientExtensionThisBuiltin, - ExtendsHook, - MergeExtArgs, - AllModelsToStringIndex, - TypeMapDef, - DevTypeMapDef, - DevTypeMapFnDef, - ClientOptionDef, - ClientOtherOps, - TypeMapCbDef, - ModelKey, - RequiredExtensionArgs as UserArgs - } -} - -export declare type ExtractGlobalOmit = Options extends { - omit: { - [K in ModelName]: infer GlobalOmit; - }; -} ? GlobalOmit : {}; - -/** - * A reference to a specific field of a specific model - */ -export declare interface FieldRef { - readonly modelName: Model; - readonly name: string; - readonly typeName: FieldType; - readonly isList: boolean; -} - -export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; - -export declare interface Fn { - params: Params; - returns: Returns; -} - -declare interface GeneratorConfig { - name: string; - output: EnvValue | null; - isCustomOutput?: boolean; - provider: EnvValue; - config: { - /** `output` is a reserved name and will only be available directly at `generator.output` */ - output?: never; - /** `provider` is a reserved name and will only be available directly at `generator.provider` */ - provider?: never; - /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ - binaryTargets?: never; - /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ - previewFeatures?: never; - } & { - [key: string]: string | string[] | undefined; - }; - binaryTargets: BinaryTargetsEnvValue[]; - previewFeatures: string[]; - envPaths?: EnvPaths; - sourceFilePath: string; -} - -export declare type GetAggregateResult

= { - [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { - [J in keyof A[K] & string]: P['scalars'][J] | null; - }; -}; - -declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; - -export declare type GetBatchResult = { - count: number; -}; - -export declare type GetCountResult = A extends { - select: infer S; -} ? (S extends true ? number : Count) : number; - -declare function getExtensionContext(that: T): Context_2; - -export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { - select: infer S extends object; -} & Record | { - include: infer I extends object; -} & Record ? { - [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { - scalars: { - [k in K]: infer O; - }; - } ? O : K extends '_count' ? Count : never; -} & (A extends { - include: any; -} & Record ? DefaultSelection : unknown) : DefaultSelection; - -export declare type GetGroupByResult

= A extends { - by: string[]; -} ? Array & { - [K in A['by'][number]]: P['scalars'][K]; -}> : A extends { - by: string; -} ? Array & { - [K in A['by']]: P['scalars'][K]; -}> : {}[]; - -export declare type GetOmit = { - [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; -}; - -export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; - -export declare type GetPayloadResultExtensionKeys = KR; - -export declare type GetPayloadResultExtensionObject = { - [K in GetPayloadResultExtensionKeys]: R[K] extends () => { - compute: (...args: any) => infer C; - } ? C : never; -}; - -export declare function getPrismaClient(config: GetPrismaClientConfig): { - new (optionsArg?: PrismaClientOptions): { - _originalClient: any; - _runtimeDataModel: RuntimeDataModel; - _requestHandler: RequestHandler; - _connectionPromise?: Promise | undefined; - _disconnectionPromise?: Promise | undefined; - _engineConfig: EngineConfig; - _accelerateEngineConfig: AccelerateEngineConfig; - _clientVersion: string; - _errorFormat: ErrorFormat; - _tracingHelper: TracingHelper; - _metrics: MetricsClient; - _middlewares: MiddlewareHandler; - _previewFeatures: string[]; - _activeProvider: string; - _globalOmit?: GlobalOmitOptions | undefined; - _extensions: MergedExtensionsList; - _engine: Engine; - /** - * A fully constructed/applied Client that references the parent - * PrismaClient. This is used for Client extensions only. - */ - _appliedParent: any; - _createPrismaPromise: PrismaPromiseFactory; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(middleware: QueryMiddleware): void; - $on(eventType: E, callback: EventCallback): void; - $connect(): Promise; - /** - * Disconnect from the database - */ - $disconnect(): Promise; - /** - * Executes a raw query and always returns a number - */ - $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Executes a raw command only for MongoDB - * - * @param command - * @returns - */ - $runCommandRaw(command: Record): PrismaPromise_2; - /** - * Executes a raw query and returns selected data - */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Counterpart to $queryRaw, that returns strongly typed results - * @param typedSql - */ - $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; - /** - * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Execute a batch of requests in a transaction - * @param requests - * @param options - */ - _transactionWithArray({ promises, options, }: { - promises: Array>; - options?: BatchTransactionOptions; - }): Promise; - /** - * Perform a long-running transaction - * @param callback - * @param options - * @returns - */ - _transactionWithCallback({ callback, options, }: { - callback: (client: Client) => Promise; - options?: Options; - }): Promise; - _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; - /** - * Execute queries within a transaction - * @param input a callback or a query list - * @param options to set timeouts (callback) - * @returns - */ - $transaction(input: any, options?: any): Promise; - /** - * Runs the middlewares over params before executing a request - * @param internalParams - * @returns - */ - _request(internalParams: InternalRequestParams): Promise; - _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; - readonly $metrics: MetricsClient; - /** - * Shortcut for checking a preview flag - * @param feature preview flag - * @returns - */ - _hasPreviewFlag(feature: string): boolean; - $applyPendingMigrations(): Promise; - $extends: typeof $extends; - readonly [Symbol.toStringTag]: string; - }; -}; - -/** - * Config that is stored into the generated client. When the generated client is - * loaded, this same config is passed to {@link getPrismaClient} which creates a - * closure with that config around a non-instantiated [[PrismaClient]]. - */ -declare type GetPrismaClientConfig = { - runtimeDataModel: RuntimeDataModel; - generator?: GeneratorConfig; - relativeEnvPaths: { - rootEnvPath?: string | null; - schemaEnvPath?: string | null; - }; - relativePath: string; - dirname: string; - filename?: string; - clientVersion: string; - engineVersion: string; - datasourceNames: string[]; - activeProvider: ActiveConnectorType; - /** - * The contents of the schema encoded into a string - * @remarks only used for the purpose of data proxy - */ - inlineSchema: string; - /** - * A special env object just for the data proxy edge runtime. - * Allows bundlers to inject their own env variables (Vercel). - * Allows platforms to declare global variables as env (Workers). - * @remarks only used for the purpose of data proxy - */ - injectableEdgeEnv?: () => LoadedEnv; - /** - * The contents of the datasource url saved in a string. - * This can either be an env var name or connection string. - * It is needed by the client to connect to the Data Proxy. - * @remarks only used for the purpose of data proxy - */ - inlineDatasources: { - [name in string]: { - url: EnvValue; - }; - }; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash: string; - /** - * A marker to indicate that the client was not generated via `prisma - * generate` but was generated via `generate --postinstall` script instead. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - postinstall?: boolean; - /** - * Information about the CI where the Prisma Client has been generated. The - * name of the CI environment is stored at generation time because CI - * information is not always available at runtime. Moreover, the edge client - * has no notion of environment variables, so this works around that. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - ciName?: string; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * A boolean that is `false` when the client was generated with --no-engine. At - * runtime, this means the client will be bound to be using the Data Proxy. - */ - copyEngine?: boolean; - /** - * Optional wasm loading configuration - */ - engineWasm?: WasmLoadingConfig; -}; - -export declare type GetResult = { - findUnique: GetFindResult | null; - findUniqueOrThrow: GetFindResult; - findFirst: GetFindResult | null; - findFirstOrThrow: GetFindResult; - findMany: GetFindResult[]; - create: GetFindResult; - createMany: GetBatchResult; - createManyAndReturn: GetFindResult[]; - update: GetFindResult; - updateMany: GetBatchResult; - updateManyAndReturn: GetFindResult[]; - upsert: GetFindResult; - delete: GetFindResult; - deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; - $queryRaw: unknown; - $queryRawTyped: unknown; - $executeRaw: number; - $queryRawUnsafe: unknown; - $executeRawUnsafe: number; - $runCommandRaw: JsonObject; - findRaw: JsonObject; - aggregateRaw: JsonObject; -}[OperationName]; - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { - [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; -}; - -declare type GlobalOmitOptions = { - [modelName: string]: { - [fieldName: string]: boolean; - }; -}; - -declare type HandleErrorParams = { - args: JsArgs; - error: any; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - modelName?: string; - globalOmit?: GlobalOmitOptions; -}; - -declare type HrTime = [number, number]; - -/** - * Defines High-Resolution Time. - * - * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - */ -declare type HrTime_2 = [number, number]; - -/** - * Matches a JSON array. - * Unlike \`JsonArray\`, readonly arrays are assignable to this type. - */ -export declare interface InputJsonArray extends ReadonlyArray { -} - -/** - * Matches a JSON object. - * Unlike \`JsonObject\`, this type allows undefined and read-only properties. - */ -export declare type InputJsonObject = { - readonly [Key in string]?: InputJsonValue | null; -}; - -/** - * Matches any valid value that can be used as an input for operations like - * create and update as the value of a JSON field. Unlike \`JsonValue\`, this - * type allows read-only arrays and read-only object properties and disallows - * \`null\` at the top level. - * - * \`null\` cannot be used as the value of a JSON field because its meaning - * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or - * \`Prisma.DbNull\` to clear the JSON value and set the field to the database - * NULL value instead. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values - */ -export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { - toJSON(): unknown; -}; - -declare type InteractiveTransactionInfo = { - /** - * Transaction ID returned by the query engine. - */ - id: string; - /** - * Arbitrary payload the meaning of which depends on the `Engine` implementation. - * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. - * In `LibraryEngine` and `BinaryEngine` it is currently not used. - */ - payload: Payload; -}; - -declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; - -export declare type InternalArgs = { - result: { - [K in keyof R]: { - [P in keyof R[K]]: () => R[K][P]; - }; - }; - model: { - [K in keyof M]: { - [P in keyof M[K]]: () => M[K][P]; - }; - }; - query: { - [K in keyof Q]: { - [P in keyof Q[K]]: () => Q[K][P]; - }; - }; - client: { - [K in keyof C]: () => C[K]; - }; -}; - -declare type InternalRequestParams = { - /** - * The original client method being called. - * Even though the rootField / operation can be changed, - * this method stays as it is, as it's what the user's - * code looks like - */ - clientMethod: string; - /** - * Name of js model that triggered the request. Might be used - * for warnings or error messages - */ - jsModelName?: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - unpacker?: Unpacker; - otelParentCtx?: Context; - /** Used to "desugar" a user input into an "expanded" one */ - argsMapper?: (args?: UserArgs_2) => UserArgs_2; - /** Used to convert args for middleware and back */ - middlewareArgsMapper?: MiddlewareArgsMapper; - /** Used for Accelerate client extension via Data Proxy */ - customDataProxyFetch?: CustomDataProxyFetch; -} & Omit; - -declare enum IsolationLevel { - ReadUncommitted = "ReadUncommitted", - ReadCommitted = "ReadCommitted", - RepeatableRead = "RepeatableRead", - Snapshot = "Snapshot", - Serializable = "Serializable" -} - -declare function isSkip(value: unknown): value is Skip; - -export declare function isTypedSql(value: unknown): value is UnknownTypedSql; - -export declare type ITXClientDenyList = (typeof denylist)[number]; - -export declare const itxClientDenyList: readonly (string | symbol)[]; - -declare interface Job { - resolve: (data: any) => void; - reject: (data: any) => void; - request: any; -} - -/** - * Create a SQL query for a list of values. - */ -export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; - -export declare type JsArgs = { - select?: Selection_2; - include?: Selection_2; - omit?: Omission; - [argName: string]: JsInputValue; -}; - -export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { - [key: string]: JsInputValue; -}; - -declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { - [key: string]: JsonArgumentValue; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ -export declare interface JsonArray extends Array { -} - -export declare type JsonBatchQuery = { - batch: JsonQuery[]; - transaction?: { - isolationLevel?: Transaction_2.IsolationLevel; - }; -}; - -export declare interface JsonConvertible { - toJSON(): unknown; -} - -declare type JsonFieldSelection = { - arguments?: Record | RawTaggedValue; - selection: JsonSelectionSet; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. - */ -export declare type JsonObject = { - [Key in string]?: JsonValue; -}; - -export declare type JsonQuery = { - modelName?: string; - action: JsonQueryAction; - query: JsonFieldSelection; -}; - -declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; - -declare type JsonSelectionSet = { - $scalars?: boolean; - $composites?: boolean; -} & { - [fieldName: string]: boolean | JsonFieldSelection; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ -export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; - -export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { - [key: string]: JsOutputValue; -}; - -export declare type JsPromise = Promise & {}; - -declare type KnownErrorParams = { - code: string; - clientVersion: string; - meta?: Record; - batchRequestIdx?: number; -}; - -/** - * A pointer from the current {@link Span} to another span in the same trace or - * in a different trace. - * Few examples of Link usage. - * 1. Batch Processing: A batch of elements may contain elements associated - * with one or more traces/spans. Since there can only be one parent - * SpanContext, Link is used to keep reference to SpanContext of all - * elements in the batch. - * 2. Public Endpoint: A SpanContext in incoming client request on a public - * endpoint is untrusted from service provider perspective. In such case it - * is advisable to start a new trace with appropriate sampling decision. - * However, it is desirable to associate incoming SpanContext to new trace - * initiated on service provider side so two traces (from Client and from - * Service Provider) can be correlated. - */ -declare interface Link { - /** The {@link SpanContext} of a linked span. */ - context: SpanContext; - /** A set of {@link SpanAttributes} on the link. */ - attributes?: SpanAttributes; - /** Count of attributes of the link that were dropped due to collection limits */ - droppedAttributesCount?: number; -} - -declare type LoadedEnv = { - message?: string; - parsed: { - [x: string]: string; - }; -} | undefined; - -declare type LocationInFile = { - fileName: string; - lineNumber: number | null; - columnNumber: number | null; -}; - -declare type LogDefinition = { - level: LogLevel; - emit: 'stdout' | 'event'; -}; - -/** - * Typings for the events we emit. - * - * @remarks - * If this is updated, our edge runtime shim needs to be updated as well. - */ -declare type LogEmitter = { - on(event: E, listener: (event: EngineEvent) => void): LogEmitter; - emit(event: QueryEventType, payload: QueryEvent): boolean; - emit(event: LogEventType, payload: LogEvent): boolean; -}; - -declare type LogEvent = { - timestamp: Date; - message: string; - target: string; -}; - -declare type LogEventType = 'info' | 'warn' | 'error'; - -declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; - -/** - * Class that holds the list of all extensions, applied to particular instance, - * as well as resolved versions of the components that need to apply on - * different levels. Main idea of this class: avoid re-resolving as much of the - * stuff as possible when new extensions are added while also delaying the - * resolve until the point it is actually needed. For example, computed fields - * of the model won't be resolved unless the model is actually queried. Neither - * adding extensions with `client` component only cause other components to - * recompute. - */ -declare class MergedExtensionsList { - private head?; - private constructor(); - static empty(): MergedExtensionsList; - static single(extension: ExtensionArgs): MergedExtensionsList; - isEmpty(): boolean; - append(extension: ExtensionArgs): MergedExtensionsList; - getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; - getAllClientExtensions(): ClientArg | undefined; - getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; - getAllQueryCallbacks(jsModelName: string, operation: string): any; - getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; -} - -export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; - -export declare type Metric = { - key: string; - value: T; - labels: Record; - description: string; -}; - -export declare type MetricHistogram = { - buckets: MetricHistogramBucket[]; - sum: number; - count: number; -}; - -export declare type MetricHistogramBucket = [maxValue: number, count: number]; - -export declare type Metrics = { - counters: Metric[]; - gauges: Metric[]; - histograms: Metric[]; -}; - -export declare class MetricsClient { - private _engine; - constructor(engine: Engine); - /** - * Returns all metrics gathered up to this point in prometheus format. - * Result of this call can be exposed directly to prometheus scraping endpoint - * - * @param options - * @returns - */ - prometheus(options?: MetricsOptions): Promise; - /** - * Returns all metrics gathered up to this point in prometheus format. - * - * @param options - * @returns - */ - json(options?: MetricsOptions): Promise; -} - -declare type MetricsOptions = { - /** - * Labels to add to every metrics in key-value format - */ - globalLabels?: Record; -}; - -declare type MetricsOptionsCommon = { - globalLabels?: Record; -}; - -declare type MetricsOptionsJson = { - format: 'json'; -} & MetricsOptionsCommon; - -declare type MetricsOptionsPrometheus = { - format: 'prometheus'; -} & MetricsOptionsCommon; - -declare type MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; - middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; -}; - -declare class MiddlewareHandler { - private _middlewares; - use(middleware: M): void; - get(id: number): M | undefined; - has(id: number): boolean; - length(): number; -} - -export declare type ModelArg = { - [MethodName in string]: unknown; -}; - -export declare type ModelArgs = { - model: { - [ModelName in string]: ModelArg; - }; -}; - -export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; - -export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; - -export declare type ModelQueryOptionsCbArgs = { - model: string; - operation: string; - args: JsArgs; - query: (args: JsArgs) => Promise; -}; - -export declare type NameArgs = { - name?: string; -}; - -export declare type Narrow = { - [K in keyof A]: A[K] extends Function ? A[K] : Narrow; -} | (A extends Narrowable ? A : never); - -export declare type Narrowable = string | number | bigint | boolean | []; - -export declare type NeverToUnknown = [T] extends [never] ? unknown : T; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * List of Prisma enums that must use unique objects instead of strings as their values. - */ -export declare const objectEnumNames: string[]; - -/** - * Base class for unique values of object-valued enums. - */ -export declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; - -export declare type Omission = Record; - -declare type Omit_2 = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; -export { Omit_2 as Omit } - -export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; - -export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -export declare type OperationPayload = { - name: string; - scalars: { - [ScalarName in string]: unknown; - }; - objects: { - [ObjectName in string]: unknown; - }; - composites: { - [CompositeName in string]: unknown; - }; -}; - -export declare type Optional = { - [P in K & keyof O]?: O[P]; -} & { - [P in Exclude]: O[P]; -}; - -export declare type OptionalFlat = { - [K in keyof T]?: T[K]; -}; - -export declare type OptionalKeys = { - [K in keyof O]-?: {} extends Pick_2 ? K : never; -}[keyof O]; - -declare type Options = { - maxWait?: number; - timeout?: number; - isolationLevel?: IsolationLevel; -}; - -declare type Options_2 = { - clientVersion: string; -}; - -export declare type Or = { - 0: { - 0: 0; - 1: 1; - }; - 1: { - 0: 1; - 1: 1; - }; -}[A][B]; - -export declare type PatchFlat = O1 & Omit_2; - -export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; - -export declare type Payload = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? T[symbol]['types']['payload'] : any; - -export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { - [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; -}; - -declare type Pick_2 = { - [P in keyof T as P extends K ? P : never]: T[P]; -}; -export { Pick_2 as Pick } - -export declare class PrismaClientInitializationError extends Error { - clientVersion: string; - errorCode?: string; - retryable?: boolean; - constructor(message: string, clientVersion: string, errorCode?: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { - code: string; - meta?: Record; - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare type PrismaClientOptions = { - /** - * Overwrites the primary datasource url from your schema.prisma file - */ - datasourceUrl?: string; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. - */ - adapter?: DriverAdapter | null; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * The default values for Transaction options - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: Transaction_2.Options; - /** - * @example - * \`\`\` - * // Defaults to stdout - * log: ['query', 'info', 'warn'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * ] - * \`\`\` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: Array; - omit?: GlobalOmitOptions; - /** - * @internal - * You probably don't want to use this. \`__internal\` is used by internal tooling. - */ - __internal?: { - debug?: boolean; - engine?: { - cwd?: string; - binaryPath?: string; - endpoint?: string; - allowTriggerPanic?: boolean; - }; - /** This can be used for testing purposes */ - configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; - }; -}; - -export declare class PrismaClientRustPanicError extends Error { - clientVersion: string; - constructor(message: string, clientVersion: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientValidationError extends Error { - name: string; - clientVersion: string; - constructor(message: string, { clientVersion }: Options_2); - get [Symbol.toStringTag](): string; -} - -declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; - -export declare interface PrismaPromise extends Promise { - [Symbol.toStringTag]: 'PrismaPromise'; -} - -/** - * Prisma's `Promise` that is backwards-compatible. All additions on top of the - * original `Promise` are optional so that it can be backwards-compatible. - * @see [[createPrismaPromise]] - */ -declare interface PrismaPromise_2 extends Promise { - /** - * Extension of the original `.then` function - * @param onfulfilled same as regular promises - * @param onrejected same as regular promises - * @param transaction transaction options - */ - then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.catch` function - * @param onrejected same as regular promises - * @param transaction transaction options - */ - catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.finally` function - * @param onfinally same as regular promises - * @param transaction transaction options - */ - finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Called when executing a batch of regular tx - * @param transaction transaction options for batch tx - */ - requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; -} - -declare type PrismaPromiseBatchTransaction = { - kind: 'batch'; - id: number; - isolationLevel?: IsolationLevel; - index: number; - lock: PromiseLike; -}; - -declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; - -/** - * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which - * is essentially a proxy for `Promise`. All the transaction-compatible client - * methods return one, this allows for pre-preparing queries without executing - * them until `.then` is called. It's the foundation of Prisma's query batching. - * @param callback that will be wrapped within our promise implementation - * @see [[PrismaPromise]] - * @returns - */ -declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; - -declare type PrismaPromiseInteractiveTransaction = { - kind: 'itx'; - id: string; - payload: PayloadType; -}; - -declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; - -export declare const PrivateResultType: unique symbol; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare namespace Public_2 { - export { - Args, - Result, - Payload, - PrismaPromise, - Operation, - Exact - } -} - -declare type Query = { - sql: string; - args: Array; - argTypes: Array; -}; - -declare interface Queryable { - readonly provider: 'mysql' | 'postgres' | 'sqlite'; - readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the type-aware result set of the query. - * - * This is the preferred way of executing `SELECT` queries. - */ - queryRaw(params: Query): Promise>; - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the number of affected rows. - * - * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, - * as well as transactional queries. - */ - executeRaw(params: Query): Promise>; -} - -declare type QueryEngineBatchGraphQLRequest = { - batch: QueryEngineRequest[]; - transaction?: boolean; - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; - -declare type QueryEngineConfig = { - datamodel: string; - configDir: string; - logQueries: boolean; - ignoreEnvVarErrors: boolean; - datasourceOverrides: Record; - env: Record; - logLevel: QueryEngineLogLevel; - engineProtocol: EngineProtocol; - enableTracing: boolean; -}; - -declare interface QueryEngineConstructor { - new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; -} - -declare type QueryEngineInstance = { - connect(headers: string, requestId: string): Promise; - disconnect(headers: string, requestId: string): Promise; - /** - * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` - * @param headersStr JSON.stringified `QueryEngineRequestHeaders` - */ - query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; - sdlSchema?(): Promise; - startTransaction(options: string, traceHeaders: string, requestId: string): Promise; - commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; - rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; - metrics?(options: string): Promise; - applyPendingMigrations?(): Promise; - trace(requestId: string): Promise; -}; - -declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; - -declare type QueryEngineRequest = { - query: string; - variables: Object; -}; - -declare type QueryEngineResultData = { - data: T; -}; - -declare type QueryEvent = { - timestamp: Date; - query: string; - params: string; - duration: number; - target: string; -}; - -declare type QueryEventType = 'query'; - -declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; - -declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; - -declare type QueryMiddlewareParams = { - /** The model this is executed on */ - model?: string; - /** The action that is being handled */ - action: Action; - /** TODO what is this */ - dataPath: string[]; - /** TODO what is this */ - runInTransaction: boolean; - args?: UserArgs_2; -}; - -export declare type QueryOptions = { - query: { - [ModelName in string]: { - [ModelAction in string]: ModelQueryOptionsCb; - } | QueryOptionsCb; - }; -}; - -export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; - -export declare type QueryOptionsCbArgs = { - model?: string; - operation: string; - args: JsArgs | RawQueryArgs; - query: (args: JsArgs | RawQueryArgs) => Promise; -}; - -/** - * Create raw SQL statement. - */ -export declare function raw(value: string): Sql; - -export declare type RawParameters = { - __prismaRawParameters__: true; - values: string; -}; - -export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; - -declare type RawResponse = { - columns: string[]; - types: QueryIntrospectionBuiltinType[]; - rows: unknown[][]; -}; - -declare type RawTaggedValue = { - $type: 'Raw'; - value: unknown; -}; - -/** - * Supported value or SQL instance. - */ -export declare type RawValue = Value | Sql; - -export declare type ReadonlyDeep = { - readonly [K in keyof T]: ReadonlyDeep; -}; - -declare type ReadonlyDeep_2 = { - +readonly [K in keyof O]: ReadonlyDeep_2; -}; - -declare type Record_2 = { - [P in T]: U; -}; -export { Record_2 as Record } - -export declare type RenameAndNestPayloadKeys

= { - [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; -}; - -declare type RequestBatchOptions = { - transaction?: TransactionOptions_2; - traceparent?: string; - numTry?: number; - containsWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare interface RequestError { - error: string; - user_facing_error: { - is_panic: boolean; - message: string; - meta?: Record; - error_code?: string; - batch_request_idx?: number; - }; -} - -declare class RequestHandler { - client: Client; - dataloader: DataLoader; - private logEmitter?; - constructor(client: Client, logEmitter?: LogEmitter); - request(params: RequestParams): Promise; - mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; - /** - * Handles the error and logs it, logging the error is done synchronously waiting for the event - * handlers to finish. - */ - handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; - sanitizeMessage(message: any): any; - unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; - get [Symbol.toStringTag](): string; -} - -declare type RequestOptions = { - traceparent?: string; - numTry?: number; - interactiveTransaction?: InteractiveTransactionOptions; - isWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequestParams = { - modelName?: string; - action: Action; - protocolQuery: JsonQuery; - dataPath: string[]; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - extensions: MergedExtensionsList; - args?: any; - headers?: Record; - unpacker?: Unpacker; - otelParentCtx?: Context; - otelChildCtx?: Context; - globalOmit?: GlobalOmitOptions; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; -export { RequiredExtensionArgs } -export { RequiredExtensionArgs as UserArgs } - -export declare type RequiredKeys = { - [K in keyof O]-?: {} extends Pick_2 ? never : K; -}[keyof O]; - -declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - overrideDatasources: Datasources; - env: Record; - clientVersion: string; -}): string; - -export declare type Result = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? GetResult : GetResult<{ - composites: {}; - objects: {}; - scalars: {}; - name: ''; -}, {}, F>; - -export declare type Result_2 = Result; - -declare namespace Result_3 { - export { - Operation, - FluentOperation, - Count, - GetFindResult, - SelectablePayloadFields, - SelectField, - DefaultSelection, - UnwrapPayload, - ApplyOmit, - OmitValue, - GetCountResult, - Aggregate, - GetAggregateResult, - GetBatchResult, - GetGroupByResult, - GetResult, - ExtractGlobalOmit - } -} - -declare type Result_4 = { - map(fn: (value: T) => U): Result_4; - flatMap(fn: (value: T) => Result_4): Result_4; -} & ({ - readonly ok: true; - readonly value: T; -} | { - readonly ok: false; - readonly error: Error_2; -}); - -export declare type ResultArg = { - [FieldName in string]: ResultFieldDefinition; -}; - -export declare type ResultArgs = { - result: { - [ModelName in string]: ResultArg; - }; -}; - -export declare type ResultArgsFieldCompute = (model: any) => unknown; - -export declare type ResultFieldDefinition = { - needs?: { - [FieldName in string]: boolean; - }; - compute: ResultArgsFieldCompute; -}; - -declare interface ResultSet { - /** - * List of column types appearing in a database query, in the same order as `columnNames`. - * They are used within the Query Engine to convert values from JS to Quaint values. - */ - columnTypes: Array; - /** - * List of column names appearing in a database query, in the same order as `columnTypes`. - */ - columnNames: Array; - /** - * List of rows retrieved from a database query. - * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. - */ - rows: Array>; - /** - * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. - */ - lastInsertId?: string; -} - -export declare type Return = T extends (...args: any[]) => infer R ? R : T; - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -export declare type RuntimeDataModel = { - readonly models: Record; - readonly enums: Record; - readonly types: Record; -}; - -declare type RuntimeEnum = Omit; - -declare type RuntimeModel = Omit; - -export declare type Select = T extends U ? T : never; - -export declare type SelectablePayloadFields = { - objects: { - [k in K]: O; - }; -} | { - composites: { - [k in K]: O; - }; -}; - -export declare type SelectField

, K extends PropertyKey> = P extends { - objects: Record; -} ? P['objects'][K] : P extends { - composites: Record; -} ? P['composites'][K] : never; - -declare type Selection_2 = Record; -export { Selection_2 as Selection } - -export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; - -declare type SerializeParams = { - runtimeDataModel: RuntimeDataModel; - modelName?: string; - action: Action; - args?: JsArgs; - extensions?: MergedExtensionsList; - callsite?: CallSite; - clientMethod: string; - clientVersion: string; - errorFormat: ErrorFormat; - previewFeatures: string[]; - globalOmit?: GlobalOmitOptions; -}; - -declare class Skip { - constructor(param?: symbol); - ifUndefined(value: T | undefined): T | Skip; -} - -export declare const skip: Skip; - -/** - * An interface that represents a span. A span represents a single operation - * within a trace. Examples of span might include remote procedure calls or a - * in-process function calls to sub-components. A Trace has a single, top-level - * "root" Span that in turn may have zero or more child Spans, which in turn - * may have children. - * - * Spans are created by the {@link Tracer.startSpan} method. - */ -declare interface Span { - /** - * Returns the {@link SpanContext} object associated with this Span. - * - * Get an immutable, serializable identifier for this span that can be used - * to create new child spans. Returned SpanContext is usable even after the - * span ends. - * - * @returns the SpanContext object associated with this Span. - */ - spanContext(): SpanContext; - /** - * Sets an attribute to the span. - * - * Sets a single Attribute with the key and value passed as arguments. - * - * @param key the key for this attribute. - * @param value the value for this attribute. Setting a value null or - * undefined is invalid and will result in undefined behavior. - */ - setAttribute(key: string, value: SpanAttributeValue): this; - /** - * Sets attributes to the span. - * - * @param attributes the attributes that will be added. - * null or undefined attribute values - * are invalid and will result in undefined behavior. - */ - setAttributes(attributes: SpanAttributes): this; - /** - * Adds an event to the Span. - * - * @param name the name of the event. - * @param [attributesOrStartTime] the attributes that will be added; these are - * associated with this event. Can be also a start time - * if type is {@type TimeInput} and 3rd param is undefined - * @param [startTime] start time of the event. - */ - addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; - /** - * Adds a single link to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param link the link to add. - */ - addLink(link: Link): this; - /** - * Adds multiple links to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param links the links to add. - */ - addLinks(links: Link[]): this; - /** - * Sets a status to the span. If used, this will override the default Span - * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value - * of previous calls to SetStatus on the Span. - * - * @param status the SpanStatus to set. - */ - setStatus(status: SpanStatus): this; - /** - * Updates the Span name. - * - * This will override the name provided via {@link Tracer.startSpan}. - * - * Upon this update, any sampling behavior based on Span name will depend on - * the implementation. - * - * @param name the Span name. - */ - updateName(name: string): this; - /** - * Marks the end of Span execution. - * - * Call to End of a Span MUST not have any effects on child spans. Those may - * still be running and can be ended later. - * - * Do not return `this`. The Span generally should not be used after it - * is ended so chaining is not desired in this context. - * - * @param [endTime] the time to set as Span's end time. If not provided, - * use the current time as the span's end time. - */ - end(endTime?: TimeInput): void; - /** - * Returns the flag whether this span will be recorded. - * - * @returns true if this Span is active and recording information like events - * with the `AddEvent` operation and attributes using `setAttributes`. - */ - isRecording(): boolean; - /** - * Sets exception as a span event - * @param exception the exception the only accepted values are string or Error - * @param [time] the time to set as Span's event time. If not provided, - * use the current time. - */ - recordException(exception: Exception, time?: TimeInput): void; -} - -/** - * @deprecated please use {@link Attributes} - */ -declare type SpanAttributes = Attributes; - -/** - * @deprecated please use {@link AttributeValue} - */ -declare type SpanAttributeValue = AttributeValue; - -declare type SpanCallback = (span?: Span, context?: Context) => R; - -/** - * A SpanContext represents the portion of a {@link Span} which must be - * serialized and propagated along side of a {@link Baggage}. - */ -declare interface SpanContext { - /** - * The ID of the trace that this span belongs to. It is worldwide unique - * with practically sufficient probability by being made as 16 randomly - * generated bytes, encoded as a 32 lowercase hex characters corresponding to - * 128 bits. - */ - traceId: string; - /** - * The ID of the Span. It is globally unique with practically sufficient - * probability by being made as 8 randomly generated bytes, encoded as a 16 - * lowercase hex characters corresponding to 64 bits. - */ - spanId: string; - /** - * Only true if the SpanContext was propagated from a remote parent. - */ - isRemote?: boolean; - /** - * Trace flags to propagate. - * - * It is represented as 1 byte (bitmap). Bit to represent whether trace is - * sampled or not. When set, the least significant bit documents that the - * caller may have recorded trace data. A caller who does not record trace - * data out-of-band leaves this flag unset. - * - * see {@link TraceFlags} for valid flag values. - */ - traceFlags: number; - /** - * Tracing-system-specific info to propagate. - * - * The tracestate field value is a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * More Info: https://www.w3.org/TR/trace-context/#tracestate-field - * - * Examples: - * Single tracing system (generic format): - * tracestate: rojo=00f067aa0ba902b7 - * Multiple tracing systems (with different formatting): - * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE - */ - traceState?: TraceState; -} - -declare enum SpanKind { - /** Default value. Indicates that the span is used internally. */ - INTERNAL = 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER = 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT = 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER = 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER = 4 -} - -/** - * Options needed for span creation - */ -declare interface SpanOptions { - /** - * The SpanKind of a span - * @default {@link SpanKind.INTERNAL} - */ - kind?: SpanKind; - /** A span's attributes */ - attributes?: SpanAttributes; - /** {@link Link}s span to other spans */ - links?: Link[]; - /** A manually specified start time for the created `Span` object. */ - startTime?: TimeInput; - /** The new span should be a root span. (Ignore parent from context). */ - root?: boolean; -} - -declare interface SpanStatus { - /** The status code of this message. */ - code: SpanStatusCode; - /** A developer-facing error message. */ - message?: string; -} - -/** - * An enumeration of status codes. - */ -declare enum SpanStatusCode { - /** - * The default status. - */ - UNSET = 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK = 1, - /** - * The operation contains an error. - */ - ERROR = 2 -} - -/** - * A SQL instance can be nested within each other to build SQL strings. - */ -export declare class Sql { - readonly values: Value[]; - readonly strings: string[]; - constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get sql(): string; - get statement(): string; - get text(): string; - inspect(): { - sql: string; - statement: string; - text: string; - values: unknown[]; - }; -} - -/** - * Create a SQL object from a template string. - */ -export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; - -/** - * Defines TimeInput. - * - * hrtime, epoch milliseconds, performance.now() or Date - */ -declare type TimeInput = HrTime_2 | number | Date; - -export declare type ToTuple = T extends any[] ? T : [T]; - -declare interface TraceState { - /** - * Create a new TraceState which inherits from this TraceState and has the - * given key set. - * The new entry will always be added in the front of the list of states. - * - * @param key key of the TraceState entry. - * @param value value of the TraceState entry. - */ - set(key: string, value: string): TraceState; - /** - * Return a new TraceState which inherits from this TraceState but does not - * contain the given key. - * - * @param key the key for the TraceState entry to be removed. - */ - unset(key: string): TraceState; - /** - * Returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - * - * @param key with which the specified value is to be associated. - * @returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - */ - get(key: string): string | undefined; - /** - * Serializes the TraceState to a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * - * @returns the serialized string. - */ - serialize(): string; -} - -declare interface TracingHelper { - isEnabled(): boolean; - getTraceParent(context?: Context): string; - dispatchEngineSpans(spans: EngineSpan[]): void; - getActiveContext(): Context | undefined; - runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; -} - -declare interface Transaction extends Queryable { - /** - * Transaction options. - */ - readonly options: TransactionOptions; - /** - * Commit the transaction. - */ - commit(): Promise>; - /** - * Rolls back the transaction. - */ - rollback(): Promise>; -} - -declare namespace Transaction_2 { - export { - IsolationLevel, - Options, - InteractiveTransactionInfo, - TransactionHeaders - } -} - -declare interface TransactionContext extends Queryable { - /** - * Starts new transaction. - */ - startTransaction(): Promise>; -} - -declare type TransactionHeaders = { - traceparent?: string; -}; - -declare type TransactionOptions = { - usePhantomQuery: boolean; -}; - -declare type TransactionOptions_2 = { - kind: 'itx'; - options: InteractiveTransactionOptions; -} | { - kind: 'batch'; - options: BatchTransactionOptions; -}; - -export declare class TypedSql { - [PrivateResultType]: Result; - constructor(sql: string, values: Values); - get sql(): string; - get values(): Values; -} - -export declare type TypeMapCbDef = Fn<{ - extArgs: InternalArgs; - clientOptions: ClientOptionDef; -}, TypeMapDef>; - -/** Shared */ -export declare type TypeMapDef = Record; - -declare namespace Types { - export { - Result_3 as Result, - Extensions_2 as Extensions, - Utils, - Public_2 as Public, - isSkip, - Skip, - skip, - UnknownTypedSql, - OperationPayload as Payload - } -} -export { Types } - -declare type UnknownErrorParams = { - clientVersion: string; - batchRequestIdx?: number; -}; - -export declare type UnknownTypedSql = TypedSql; - -declare type Unpacker = (data: any) => any; - -export declare type UnwrapPayload

= {} extends P ? unknown : { - [K in keyof P]: P[K] extends { - scalars: infer S; - composites: infer C; - }[] ? Array> : P[K] extends { - scalars: infer S; - composites: infer C; - } | null ? S & UnwrapPayload | Select : never; -}; - -export declare type UnwrapPromise

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise - } -} - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -declare type WasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => { - __wbg_set_wasm(exports: unknown): any; - QueryEngine: QueryEngineConstructor; - }; - /** - * Loads the raw wasm module for the wasm query engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by LibraryEngine.ts - */ - getQueryEngineWasmModule: () => Promise; -}; - -export { } diff --git a/charybdis/local-prisma/local-prisma-client/runtime/library.js b/charybdis/local-prisma/local-prisma-client/runtime/library.js deleted file mode 100644 index 5bde1d3d..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/library.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict";var ru=Object.create;var Fr=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)Fr(e,r,{get:t[r],enumerable:!0})},wo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&Fr(e,i,{get:()=>t[i],enumerable:!(n=nu(t,i))||n.enumerable});return e};var D=(e,t,r)=>(r=e!=null?ru(ou(e)):{},wo(t||!e||!e.__esModule?Fr(r,"default",{value:e,enumerable:!0}):r,e)),au=e=>wo(Fr({},"__esModule",{value:!0}),e);var Qo=Z((yf,ti)=>{"use strict";var v=ti.exports;ti.exports.default=v;var _="\x1B[",Ht="\x1B]",mt="\x07",Jr=";",Uo=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?_+(e+1)+"G":_+(t+1)+";"+(e+1)+"H"};v.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=_+-e+"D":e>0&&(r+=_+e+"C"),t<0?r+=_+-t+"A":t>0&&(r+=_+t+"B"),r};v.cursorUp=(e=1)=>_+e+"A";v.cursorDown=(e=1)=>_+e+"B";v.cursorForward=(e=1)=>_+e+"C";v.cursorBackward=(e=1)=>_+e+"D";v.cursorLeft=_+"G";v.cursorSavePosition=Uo?"\x1B7":_+"s";v.cursorRestorePosition=Uo?"\x1B8":_+"u";v.cursorGetPosition=_+"6n";v.cursorNextLine=_+"E";v.cursorPrevLine=_+"F";v.cursorHide=_+"?25l";v.cursorShow=_+"?25h";v.eraseLines=e=>{let t="";for(let r=0;r[Ht,"8",Jr,Jr,t,mt,e,Ht,"8",Jr,Jr,mt].join("");v.image=(e,t={})=>{let r=`${Ht}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+mt};v.iTerm={setCwd:(e=process.cwd())=>`${Ht}50;CurrentDir=${e}${mt}`,annotation:(e,t={})=>{let r=`${Ht}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+mt}}});var ri=Z((Ef,Go)=>{"use strict";Go.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Ju=require("os"),Jo=require("tty"),fe=ri(),{env:J}=process,Je;fe("no-color")||fe("no-colors")||fe("color=false")||fe("color=never")?Je=0:(fe("color")||fe("colors")||fe("color=true")||fe("color=always"))&&(Je=1);"FORCE_COLOR"in J&&(J.FORCE_COLOR==="true"?Je=1:J.FORCE_COLOR==="false"?Je=0:Je=J.FORCE_COLOR.length===0?1:Math.min(parseInt(J.FORCE_COLOR,10),3));function ni(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ii(e,t){if(Je===0)return 0;if(fe("color=16m")||fe("color=full")||fe("color=truecolor"))return 3;if(fe("color=256"))return 2;if(e&&!t&&Je===void 0)return 0;let r=Je||0;if(J.TERM==="dumb")return r;if(process.platform==="win32"){let n=Ju.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in J)||J.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let n=parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:r}function Hu(e){let t=ii(e,e&&e.isTTY);return ni(t)}Ho.exports={supportsColor:Hu,stdout:ni(ii(!0,Jo.isatty(1))),stderr:ni(ii(!0,Jo.isatty(2)))}});var zo=Z((wf,Yo)=>{"use strict";var Wu=Wo(),ft=ri();function Ko(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function oi(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(ft("no-hyperlink")||ft("no-hyperlinks")||ft("hyperlink=false")||ft("hyperlink=never"))return!1;if(ft("hyperlink=true")||ft("hyperlink=always")||"NETLIFY"in t)return!0;if(!Wu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Ko(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=Ko(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Yo.exports={supportsHyperlink:oi,stdout:oi(process.stdout),stderr:oi(process.stderr)}});var Xo=Z((xf,Wt)=>{"use strict";var Ku=Qo(),si=zo(),Zo=(e,t,{target:r="stdout",...n}={})=>si[r]?Ku.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Wt.exports=(e,t,r={})=>Zo(e,t,r);Wt.exports.stderr=(e,t,r={})=>Zo(e,t,{target:"stderr",...r});Wt.exports.isSupported=si.stdout;Wt.exports.stderr.isSupported=si.stderr});var li=Z((kf,Yu)=>{Yu.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ui=Z(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.enginesVersion=void 0;Hr.enginesVersion=li().prisma.enginesVersion});var ns=Z((Yf,Xu)=>{Xu.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var as=Z((zf,Le)=>{"use strict";var mi=require("fs"),fi=require("path"),ec=require("os"),tc=require("crypto"),rc=ns(),gi=rc.version,nc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ic(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` -`);let n;for(;(n=nc.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function oc(e){let t=ss(e),r=Q.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=os(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return Q.parse(o)}function sc(e){console.log(`[dotenv@${gi}][INFO] ${e}`)}function ac(e){console.log(`[dotenv@${gi}][WARN] ${e}`)}function Wr(e){console.log(`[dotenv@${gi}][DEBUG] ${e}`)}function os(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function lc(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function ss(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)mi.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=fi.resolve(process.cwd(),".env.vault");return mi.existsSync(t)?t:null}function is(e){return e[0]==="~"?fi.join(ec.homedir(),e.slice(1)):e}function uc(e){sc("Loading env from encrypted .env.vault");let t=Q._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Q.populate(r,t,e),{parsed:t}}function cc(e){let t=fi.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&Wr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[is(e.path)];else{i=[];for(let l of e.path)i.push(is(l))}let o,s={};for(let l of i)try{let u=Q.parse(mi.readFileSync(l,{encoding:r}));Q.populate(s,u,e)}catch(u){n&&Wr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),Q.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function pc(e){if(os(e).length===0)return Q.configDotenv(e);let t=ss(e);return t?Q._configVault(e):(ac(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Q.configDotenv(e))}function dc(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=tc.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function mc(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&Wr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var Q={configDotenv:cc,_configVault:uc,_parseVault:oc,config:pc,decrypt:dc,parse:ic,populate:mc};Le.exports.configDotenv=Q.configDotenv;Le.exports._configVault=Q._configVault;Le.exports._parseVault=Q._parseVault;Le.exports.config=Q.config;Le.exports.decrypt=Q.decrypt;Le.exports.parse=Q.parse;Le.exports.populate=Q.populate;Le.exports=Q});var ms=Z((ig,ds)=>{"use strict";ds.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var gs=Z((og,fs)=>{"use strict";var yc=ms();fs.exports=e=>{let t=yc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var bi=Z((pg,hs)=>{"use strict";hs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var ws=Z((fg,bs)=>{"use strict";bs.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Pi=Z((gg,xs)=>{"use strict";var Rc=ws();xs.exports=e=>typeof e=="string"?e.replace(Rc(),""):e});var vs=Z((Eg,zr)=>{"use strict";zr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};zr.exports.default=zr.exports});var _i=Z((Sh,Qs)=>{"use strict";Qs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sJn,Decimal:()=>ve,Extensions:()=>Bn,MetricsClient:()=>Ot,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>ee,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>te,Public:()=>Un,Sql:()=>ae,defineDmmfProperty:()=>ga,deserializeJsonResponse:()=>bt,deserializeRawResult:()=>qn,dmmfToRuntimeDataModel:()=>fa,empty:()=>ba,getPrismaClient:()=>Xl,getRuntime:()=>In,join:()=>Ea,makeStrictEnum:()=>eu,makeTypedQueryFactory:()=>ha,objectEnumValues:()=>yn,raw:()=>Gi,serializeJsonQuery:()=>Pn,skip:()=>vn,sqltag:()=>Ji,warnEnvConflicts:()=>tu,warnOnce:()=>tr});module.exports=au(Bm);var Bn={};Bt(Bn,{defineExtension:()=>xo,getExtensionContext:()=>vo});function xo(e){return typeof e=="function"?e:t=>t.$extends(e)}function vo(e){return e}var Un={};Bt(Un,{validator:()=>Po});function Po(...e){return t=>t}var Mr={};Bt(Mr,{$:()=>Ao,bgBlack:()=>yu,bgBlue:()=>xu,bgCyan:()=>Pu,bgGreen:()=>bu,bgMagenta:()=>vu,bgRed:()=>Eu,bgWhite:()=>Tu,bgYellow:()=>wu,black:()=>mu,blue:()=>rt,bold:()=>W,cyan:()=>_e,dim:()=>ke,gray:()=>Ut,green:()=>Ve,grey:()=>hu,hidden:()=>pu,inverse:()=>cu,italic:()=>uu,magenta:()=>fu,red:()=>de,reset:()=>lu,strikethrough:()=>du,underline:()=>X,white:()=>gu,yellow:()=>De});var Qn,To,Ro,Co,So=!0;typeof process<"u"&&({FORCE_COLOR:Qn,NODE_DISABLE_COLORS:To,NO_COLOR:Ro,TERM:Co}=process.env||{},So=process.stdout&&process.stdout.isTTY);var Ao={enabled:!To&&Ro==null&&Co!=="dumb"&&(Qn!=null&&Qn!=="0"||So)};function $(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ao.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var lu=$(0,0),W=$(1,22),ke=$(2,22),uu=$(3,23),X=$(4,24),cu=$(7,27),pu=$(8,28),du=$(9,29),mu=$(30,39),de=$(31,39),Ve=$(32,39),De=$(33,39),rt=$(34,39),fu=$(35,39),_e=$(36,39),gu=$(37,39),Ut=$(90,39),hu=$(90,39),yu=$(40,49),Eu=$(41,49),bu=$(42,49),wu=$(43,49),xu=$(44,49),vu=$(45,49),Pu=$(46,49),Tu=$(47,49);var Ru=100,Io=["green","yellow","blue","magenta","cyan","red"],Qt=[],Oo=Date.now(),Cu=0,Gn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Gn.DEBUG??"";globalThis.DEBUG_COLORS??=Gn.DEBUG_COLORS?Gn.DEBUG_COLORS==="true":!0;var Gt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Su(e){let t={color:Io[Cu++%Io.length],enabled:Gt.enabled(e),namespace:e,log:Gt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Qt.push([o,...n]),Qt.length>Ru&&Qt.shift(),Gt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Au(c)),u=`+${Date.now()-Oo}ms`;Oo=Date.now(),globalThis.DEBUG_COLORS?a(Mr[s](W(o)),...l,Mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Jn=new Proxy(Su,{get:(e,t)=>Gt[t],set:(e,t,r)=>Gt[t]=r});function Au(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ko(e=7500){let t=Qt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length!!(e&&typeof e=="object"),Vr=e=>e&&!!e[Ne],we=(e,t,r)=>{if(Vr(e)){let n=e[Ne](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Kn(e)){if(!Kn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Vr(a)&&a[Iu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthwe(u,s[c],r))&&i.every((u,c)=>we(u,a[c],r))&&(o.length===0||we(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>we(s,t[a],r))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in t||Vr(o=i)&&o[Ne]().matcherType==="optional")&&we(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return Kn(e)?Vr(e)?(t=(r=(n=e[Ne]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Jt(e,Ge):Jt(Object.values(e),Ge):[]},Jt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function me(e){return Object.assign(e,{optional:()=>Ou(e),and:t=>j(e,t),or:t=>ku(e,t),select:t=>t===void 0?No(e):No(t,e)})}function Ou(e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:we(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Jt(e,Ge),matcherType:"and"})})}function ku(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Jt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Jt(e,Ge),matcherType:"or"})})}function I(e){return{[Ne]:()=>({match:t=>({matched:!!e(t)})})}}function No(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return me({[Ne]:()=>({match:n=>{let i={[t??jr]:n};return{matched:r===void 0||we(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??jr].concat(r===void 0?[]:Ge(r))})})}function Ee(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Be(e){return typeof e=="bigint"}var tf=me(I(function(e){return!0}));var Ue=e=>Object.assign(me(e),{startsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),rf=Ue(I(je)),be=e=>Object.assign(me(e),{between:(t,r)=>be(j(e,((n,i)=>I(o=>Ee(o)&&n<=o&&i>=o))(t,r))),lt:t=>be(j(e,(r=>I(n=>Ee(n)&&nbe(j(e,(r=>I(n=>Ee(n)&&n>r))(t))),lte:t=>be(j(e,(r=>I(n=>Ee(n)&&n<=r))(t))),gte:t=>be(j(e,(r=>I(n=>Ee(n)&&n>=r))(t))),int:()=>be(j(e,I(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>be(j(e,I(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>be(j(e,I(t=>Ee(t)&&t>0))),negative:()=>be(j(e,I(t=>Ee(t)&&t<0)))}),nf=be(I(Ee)),Qe=e=>Object.assign(me(e),{between:(t,r)=>Qe(j(e,((n,i)=>I(o=>Be(o)&&n<=o&&i>=o))(t,r))),lt:t=>Qe(j(e,(r=>I(n=>Be(n)&&nQe(j(e,(r=>I(n=>Be(n)&&n>r))(t))),lte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<=r))(t))),gte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>=r))(t))),positive:()=>Qe(j(e,I(t=>Be(t)&&t>0))),negative:()=>Qe(j(e,I(t=>Be(t)&&t<0)))}),of=Qe(I(Be)),sf=me(I(function(e){return typeof e=="boolean"})),af=me(I(function(e){return typeof e=="symbol"})),lf=me(I(function(e){return e==null})),uf=me(I(function(e){return e!=null}));var Yn=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}},zn={matched:!1,value:void 0};function dt(e){return new Zn(e,zn)}var Zn=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>we(u,this.input,a))||i&&!i(this.input)?zn:{matched:!0,value:r(o?jr in s?s[jr]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:zn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Yn(this.input)}run(){return this.exhaustive()}returnType(){return this}};var $o=require("util");var Du={warn:De("prisma:warn")},_u={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Br(e,...t){_u.warn()&&console.warn(`${Du.warn} ${e}`,...t)}var Nu=(0,$o.promisify)(Mo.default.exec),ne=F("prisma:get-platform"),Lu=["1.0.x","1.1.x","3.0.x"];async function qo(){let e=Qr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Gr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Mu(),n=await Gu(),i=qu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Vu(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Fu(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=dt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ne(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Mu(){let e="/etc/os-release";try{let t=await Xn.default.readFile(e,{encoding:"utf-8"});return Fu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function $u(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return Vo(r)}}function Lo(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return Vo(r)}}function Vo(e){let t=(()=>{if(Bo(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(Lu.includes(t))return t}function qu(e){return dt(e).with({familyDistro:"musl"},()=>(ne('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(ne('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ne('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(ne(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function Vu(e){let t='grep -v "libssl.so.0"',r=await Fo(e);if(r){ne(`Found libssl.so file using platform-specific paths: ${r}`);let o=Lo(r);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ne('Falling back to "ldconfig" and other generic paths');let n=await Gr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Fo(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ne(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Lo(n);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Gr("openssl version -v");if(i){ne(`Found openssl binary with version: ${i}`);let o=$u(i);if(ne(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ne("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Fo(e){for(let t of e){let r=await ju(t);if(r)return r}}async function ju(e){try{return(await Xn.default.readdir(e)).find(r=>r.startsWith("libssl.so.")&&!r.startsWith("libssl.so.0"))}catch(t){if(t.code==="ENOENT")return;throw t}}async function nt(){let{binaryTarget:e}=await jo();return e}function Bu(e){return e.binaryTarget!==void 0}async function ei(){let{memoized:e,...t}=await jo();return t}var Ur={};async function jo(){if(Bu(Ur))return Promise.resolve({...Ur,memoized:!0});let e=await qo(),t=Uu(e);return Ur={...e,binaryTarget:t},{...Ur,memoized:!1}}function Uu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Br(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${r}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(t==="linux"&&i===void 0){let c=dt({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Br(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(t==="linux"&&o===void 0&&ne(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),t==="darwin"&&r==="arm64")return"darwin-arm64";if(t==="darwin")return"darwin";if(t==="win32")return"windows";if(t==="freebsd")return o;if(t==="openbsd")return"openbsd";if(t==="netbsd")return"netbsd";if(t==="linux"&&o==="nixos")return"linux-nixos";if(t==="linux"&&r==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(t==="linux"&&r==="arm")return`linux-arm-openssl-${i||l}`;if(t==="linux"&&o==="musl"){let c="linux-musl";return!i||Bo(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Br(`Prisma detected unknown OS "${t}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Qu(e){try{return await e()}catch{return}}function Gr(e){return Qu(async()=>{let t=await Nu(e);return ne(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Gu(){return typeof Qr.default.machine=="function"?Qr.default.machine():(await Gr("uname -m"))?.trim()}function Bo(e){return e.startsWith("1.")}var es=D(Xo());function ai(e){return(0,es.default)(e,e,{fallback:X})}var zu=D(ui());var q=D(require("path")),Zu=D(ui()),jf=F("prisma:engines");function ts(){return q.default.join(__dirname,"../")}var Bf="libquery-engine";q.default.join(__dirname,"../query-engine-darwin");q.default.join(__dirname,"../query-engine-darwin-arm64");q.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");q.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");q.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");q.default.join(__dirname,"../query-engine-linux-static-x64");q.default.join(__dirname,"../query-engine-linux-static-arm64");q.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");q.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");q.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");q.default.join(__dirname,"../libquery_engine-darwin.dylib.node");q.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");q.default.join(__dirname,"../query_engine-windows.dll.node");var ci=D(require("fs")),rs=F("chmodPlusX");function pi(e){if(process.platform==="win32")return;let t=ci.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){rs(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);rs(`Have to call chmodPlusX on ${e}`),ci.default.chmodSync(e,n)}function di(e){let t=e.e,r=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=t.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${ai("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${ke(e.id)}\`).`,s=dt({message:t.message,code:t.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${r("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${r("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${r("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} -${s} - -Details: ${t.message}`}var yi=D(as()),Kr=D(require("fs"));var gt=D(require("path"));function ls(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var hi=F("prisma:tryLoadEnv");function Kt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=us(e);r.conflictCheck!=="none"&&fc(n,t,r.conflictCheck);let i=null;return cs(n?.path,t)||(i=us(t)),!n&&!i&&hi("No Environment variables loaded"),i?.dotenvResult.error?console.error(de(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function fc(e,t,r){let n=e?.dotenvResult.parsed,i=!cs(e?.path,t);if(n&&t&&i&&Kr.default.existsSync(t)){let o=yi.default.parse(Kr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gt.default.relative(process.cwd(),e.path),l=gt.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} -Conflicting env vars: -${s.map(c=>` ${W(c)}`).join(` -`)} - -We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. -`;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${X(a)} and ${X(l)} -Env vars from ${X(l)} overwrite the ones from ${X(a)} - `;console.warn(`${De("warn(prisma)")} ${u}`)}}}}function us(e){if(gc(e)){hi(`Environment variables loaded from ${e}`);let t=yi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ls(t),message:ke(`Environment variables loaded from ${gt.default.relative(process.cwd(),e)}`),path:e}}else hi(`Environment variables not found at ${e}`);return null}function cs(e,t){return e&&t&>.default.resolve(e)===gt.default.resolve(t)}function gc(e){return!!(e&&Kr.default.existsSync(e))}var ps="library";function Yt(e){let t=hc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":ps)}function hc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var zt;(t=>{let e;(A=>(A.findUnique="findUnique",A.findUniqueOrThrow="findUniqueOrThrow",A.findFirst="findFirst",A.findFirstOrThrow="findFirstOrThrow",A.findMany="findMany",A.create="create",A.createMany="createMany",A.createManyAndReturn="createManyAndReturn",A.update="update",A.updateMany="updateMany",A.updateManyAndReturn="updateManyAndReturn",A.upsert="upsert",A.delete="delete",A.deleteMany="deleteMany",A.groupBy="groupBy",A.count="count",A.aggregate="aggregate",A.findRaw="findRaw",A.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(zt||={});var Zt=D(require("path"));function Ei(e){return Zt.default.sep===Zt.default.posix.sep?e:e.split(Zt.default.sep).join(Zt.default.posix.sep)}var ys=D(bi());function xi(e){return String(new wi(e))}var wi=class{constructor(t){this.config=t}toString(){let{config:t}=this,r=t.provider.fromEnvVar?`env("${t.provider.fromEnvVar}")`:t.provider.value,n=JSON.parse(JSON.stringify({provider:r,binaryTargets:Ec(t.binaryTargets)}));return`generator ${t.name} { -${(0,ys.default)(bc(n),2)} -}`}};function Ec(e){let t;if(e.length>0){let r=e.find(n=>n.fromEnvVar!==null);r?t=`env("${r.fromEnvVar}")`:t=e.map(n=>n.native?"native":n.value)}else t=void 0;return t}function bc(e){let t=Object.keys(e).reduce((r,n)=>Math.max(r,n.length),0);return Object.entries(e).map(([r,n])=>`${r.padEnd(t)} = ${wc(n)}`).join(` -`)}function wc(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var er={};Bt(er,{error:()=>Pc,info:()=>vc,log:()=>xc,query:()=>Tc,should:()=>Es,tags:()=>Xt,warn:()=>vi});var Xt={error:de("prisma:error"),warn:De("prisma:warn"),info:_e("prisma:info"),query:rt("prisma:query")},Es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function xc(...e){console.log(...e)}function vi(e,...t){Es.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function vc(e,...t){console.info(`${Xt.info} ${e}`,...t)}function Pc(e,...t){console.error(`${Xt.error} ${e}`,...t)}function Tc(e,...t){console.log(`${Xt.query} ${e}`,...t)}function Yr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Fe(e,t){throw new Error(t)}function Ti(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ri=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ps.has(e)||(Ps.add(e),vi(t,...r))};var T=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(T,"PrismaClientInitializationError");var ee=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(ee,"PrismaClientKnownRequestError");var ce=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(ce,"PrismaClientRustPanicError");var B=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var te=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(te,"PrismaClientValidationError");var yt=9e15,Ye=1e9,Si="0123456789abcdef",en="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",tn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ai={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-yt,maxE:yt,crypto:!1},Ss,Me,b=!0,nn="[DecimalError] ",Ke=nn+"Invalid argument: ",As=nn+"Precision limit exceeded",Is=nn+"crypto unavailable",Os="[object Decimal]",re=Math.floor,G=Math.pow,Cc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Sc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ac=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ks=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,E=7,Ic=9007199254740991,Oc=en.length-1,Ii=tn.length-1,m={toStringTag:Os};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};m.comparedTo=m.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=kc(n,Fs(n,r)),n.precision=e,n.rounding=t,y(Me==2||Me==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(b=!1,o=c.s*G(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=K(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=M(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(r=K(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return b=!0,y(n,e,p.rounding,t)};m.decimalPlaces=m.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/E))*E,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};m.dividedBy=m.div=function(e){return M(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(M(t,new r(e),0,1,1),r.precision,r.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0};m.hyperbolicCosine=m.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/sn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Et(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Et(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/sn(5,e)),i=Et(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};m.hyperbolicTangent=m.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,M(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ge(r,i,o):new r(0):new r(NaN):t.isZero()?ge(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ge(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};m.inverseHyperbolicCosine=m.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,b=!1,r=r.times(r).minus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};m.inverseHyperbolicSine=m.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,b=!1,r=r.times(r).plus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=M(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Ii)return s=ge(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Ii)return s=ge(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/E+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(b=!1,t=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(b=!1,a=p+f,s=We(u,a),n=t?rn(c,a+10):We(e,a),l=M(s,n,a,1),rr(l.d,i=p,d))do if(a+=10,s=We(u,a),n=t?rn(c,a+10):We(e,a),l=M(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rr(l.d,i+=10,d));return b=!0,y(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return b?y(e,a,l):e}if(r=re(e.e/E),c=re(f.e/E),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/he|0,u[i]%=he;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=on(u,n),b?y(e,a,l):e};m.precision=m.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ke+e);return r.d?(t=Ds(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};m.sine=m.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=_c(n,Fs(n,r)),n.precision=e,n.rounding=t,y(Me>2?r.neg():r,e,t,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(b=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=K(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(M(s,o,r+2,1)).times(.5),K(o.d).slice(0,r)===(t=K(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return b=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=M(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Me==2||Me==4?r.neg():r,e,t,!0)):new n(NaN)};m.times=m.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(r=re(c.e/E)+re(e.e/E),l=d.length,u=f.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+t,o[i--]=a%he|0,t=a/he|0;o[i]=(o[i]+t)%he|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=on(o,r),b?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Di(this,2,e,t)};m.toDecimalPlaces=m.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(se(e,0,Ye),t===void 0?t=n.rounding:se(t,0,8),y(r,e+r.e+1,t))};m.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,!0):(se(e,0,Ye),t===void 0?t=i.rounding:se(t,0,8),n=y(new i(n),e+1,t),r=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=xe(i):(se(e,0,Ye),t===void 0?t=o.rounding:se(t,0,8),n=y(new o(i),e+i.e+1,t),r=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};m.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=Ds(g)-f.e-1,s=o%E,t.d[0]=G(10,s<0?E+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Ke+a);e=a.gt(t)?o>0?t:u:a}for(b=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*E*2;p=M(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=M(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=M(u,n,o,1).minus(f).abs().cmp(M(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,b=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Di(this,16,e,t)};m.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:se(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(b=!1,r=M(r,e,0,t,1).times(e),b=!0,y(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Di(this,8,e,t)};m.toPower=m.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=re(e.e/E),t>=e.d.length-1&&(r=u<0?-u:u)<=Ic)return i=_s(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(b=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Oi(e.times(We(a,n+r)),n),i.d&&(i=y(i,n+5,1),rr(i.d,n,o)&&(t=n+10,i=y(Oi(e.times(We(a,t+r)),t),t+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,b=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(se(e,1,Ye),t===void 0?t=i.rounding:se(t,0,8),n=y(new i(n),e,t),r=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toSignificantDigits=m.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(se(e,1,Ye),t===void 0?t=n.rounding:se(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function K(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Ke+e)}function rr(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=E,i=0):(i=Math.ceil((t+1)/E),t%=E),o=G(10,E-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function Xr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function kc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/sn(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Et(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var M=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,O,P,C,R,k,A,ue,jt,U,oe,Oe,Y,pt,Lr=n.constructor,jn=n.s==i.s?1:-1,z=n.d,N=i.d;if(!z||!z[0]||!N||!N[0])return new Lr(!n.s||!i.s||(z?N&&z[0]==N[0]:!N)?NaN:z&&z[0]==0||!N?jn*0:jn/0);for(l?(f=1,c=n.e-i.e):(l=he,f=E,c=re(n.e/f)-re(i.e/f)),Y=N.length,oe=z.length,P=new Lr(jn),C=P.d=[],p=0;N[p]==(z[p]||0);p++);if(N[p]>(z[p]||0)&&c--,o==null?(ue=o=Lr.precision,s=Lr.rounding):a?ue=o+(n.e-i.e)+1:ue=o,ue<0)C.push(1),g=!0;else{if(ue=ue/f+2|0,p=0,Y==1){for(d=0,N=N[0],ue++;(p1&&(N=e(N,d,l),z=e(z,d,l),Y=N.length,oe=z.length),U=Y,R=z.slice(0,Y),k=R.length;k=l/2&&++Oe;do d=0,u=t(N,R,Y,k),u<0?(A=R[0],Y!=k&&(A=A*l+(R[1]||0)),d=A/Oe|0,d>1?(d>=l&&(d=l-1),h=e(N,d,l),O=h.length,k=R.length,u=t(h,R,O,k),u==1&&(d--,r(h,Y=10;d/=10)p++;P.e=p+c*f-1,y(P,a?o+P.e+1:o,s,g)}return P}}();function y(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=E,s=t,c=p[d=0],l=c/G(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/G(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?c/G(10,i-s):0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,u?(t-=e.e+1,p[0]=G(10,(E-t%E)%E),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=G(10,E-o),p[d]=s>0?(c/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==he&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=he)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return b&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+He(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+He(-i-1)+o,r&&(n=r-s)>0&&(o+=He(n))):i>=s?(o+=He(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+He(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=He(n))),o}function on(e,t){var r=e[0];for(t*=E;r>=10;r/=10)t++;return t}function rn(e,t,r){if(t>Oc)throw b=!0,r&&(e.precision=r),Error(As);return y(new e(en),t,1,!0)}function ge(e,t,r){if(t>Ii)throw Error(As);return y(new e(tn),t,r,!0)}function Ds(e){var t=e.length-1,r=t*E+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function He(e){for(var t="";e--;)t+="0";return t}function _s(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(b=!1;;){if(r%2&&(o=o.times(t),Rs(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Rs(t.d,s)}return b=!0,o}function Ts(e){return e.d[e.d.length-1]&1}function Ns(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(b=!1,l=g):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(G(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),r=r.times(++c),a=s.plus(M(o,r,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(t==null)if(u<3&&rr(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,b=!0);else return d.precision=g,s}s=a}}function We(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,O=h.d,P=h.constructor,C=P.rounding,R=P.precision;if(h.s<0||!O||!O[0]||!h.e&&O[0]==1&&O.length==1)return new P(O&&!O[0]?-1/0:h.s!=1?NaN:O?0:h);if(t==null?(b=!1,c=R):c=t,P.precision=c+=g,r=K(O),n=r.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=K(h.d),n=r.charAt(0),f++;o=h.e,n>1?(h=new P("0."+r),o++):h=new P(n+"."+r.slice(1))}else return u=rn(P,c+2,R).times(o+""),h=We(new P(n+"."+r.slice(1)),c-g).plus(u),P.precision=R,t==null?y(h,R,C,b=!0):h;for(p=h,l=s=h=M(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(M(s,new P(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(rn(P,c+2,R).times(o+""))),l=M(l,new P(f),c,1),t==null)if(rr(l.d,c-g,C,a))P.precision=c+=g,u=s=h=M(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,P.precision=R,C,b=!0);else return P.precision=R,l;l=u,i+=2}}function Ls(e){return String(e.s*e.s/0)}function ki(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%E,r<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ks.test(t))return ki(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Sc.test(t))r=16,t=t.toLowerCase();else if(Cc.test(t))r=2;else if(Ac.test(t))r=8;else throw Error(Ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=_s(n,new n(r),o,o*2)),u=Xr(t,r,he),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=on(u,c),e.d=u,b=!1,s&&(e=M(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):it.pow(2,l))),b=!0,e)}function _c(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Et(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/sn(5,r)),t=Et(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Et(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(b=!1,l=r.times(r),a=new e(n);;){if(s=M(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=M(s.times(l),new e(t++*t++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return b=!0,s.d.length=p+1,s}function sn(e,t){for(var r=e;--t;)r*=e;return r}function Fs(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Ts(r)?n?2:3:n?4:1,t;Me=Ts(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Di(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(se(r,1,Ye),n===void 0?n=f.rounding:se(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Ls(e);else{for(c=xe(e),s=c.indexOf("."),g?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=Xr(xe(d),10,i),d.e=d.d.length),p=Xr(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=M(e,d,r,n,0,i),p=e.d,o=e.e,u=Ss),s=p[r],a=i/2,u=u||p[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,u)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)c+="0";for(p=Xr(c,i,t),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else ot)return e.length=t,!0}function Nc(e){return new this(e).abs()}function Lc(e){return new this(e).acos()}function Fc(e){return new this(e).acosh()}function Mc(e,t){return new this(e).plus(t)}function $c(e){return new this(e).asin()}function qc(e){return new this(e).asinh()}function Vc(e){return new this(e).atan()}function jc(e){return new this(e).atanh()}function Bc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(M(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(M(e,t,o,1)),r}function Uc(e){return new this(e).cbrt()}function Qc(e){return y(e=new this(e),e.e+1,2)}function Gc(e,t,r){return new this(e).clamp(t,r)}function Jc(e){if(!e||typeof e!="object")throw Error(nn+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-yt,0,"toExpPos",0,yt,"maxE",0,yt,"minE",-yt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ke+r+": "+n);if(r="crypto",i&&(this[r]=Ai[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Is);else this[r]=!1;else throw Error(Ke+r+": "+n);return this}function Hc(e){return new this(e).cos()}function Wc(e){return new this(e).cosh()}function Ms(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Cs(o)){u.s=o.s,b?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;b?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Is);else for(;o=10;i/=10)n++;nW(rt(e)),punctuation:rt,directive:_e,function:_e,variable:e=>W(rt(e)),string:e=>W(Ve(e)),boolean:De,number:_e,comment:Ut};var xp=e=>e,ln={},vp=0,x={manual:ln.Prism&&ln.Prism.manual,disableWorkerMessageHandler:ln.Prism&&ln.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let t=e;return new ye(t.type,x.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(x.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Oe instanceof ye)continue;if(A&&U!=t.length-1){C.lastIndex=oe;var p=C.exec(e);if(!p)break;var c=p.index+(k?p[1].length:0),d=p.index+p[0].length,a=U,l=oe;for(let N=t.length;a=l&&(++U,oe=l);if(t[U]instanceof ye)continue;u=a-U,Oe=e.slice(oe,l),p.index-=oe}else{C.lastIndex=0;var p=C.exec(Oe),u=1}if(!p){if(o)break;continue}k&&(ue=p[1]?p[1].length:0);var c=p.index+ue,p=p[0].slice(ue),d=c+p.length,f=Oe.slice(0,c),g=Oe.slice(d);let Y=[U,u];f&&(++U,oe+=f.length,Y.push(f));let pt=new ye(h,R?x.tokenize(p,R):p,jt,p,A);if(Y.push(pt),g&&Y.push(g),Array.prototype.splice.apply(t,Y),u!=1&&x.matchGrammar(e,t,r,U,oe,!0,h),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return x.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=x.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=x.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:ye};x.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};x.languages.javascript=x.languages.extend("clike",{"class-name":[x.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});x.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;x.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:x.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:x.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:x.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:x.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});x.languages.markup&&x.languages.markup.tag.addInlined("script","javascript");x.languages.js=x.languages.javascript;x.languages.typescript=x.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});x.languages.ts=x.languages.typescript;function ye(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return ye.stringify(r,t)}).join(""):Pp(e.type)(e.content)};function Pp(e){return $s[e]||xp}function qs(e){return Tp(e,x.languages.javascript)}function Tp(e,t){return x.tokenize(e,t).map(n=>ye.stringify(n)).join("")}var Vs=D(gs());function js(e){return(0,Vs.default)(e)}var un=class e{static read(t){let r;try{r=Bs.default.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,js(n).split(` -`))}highlight(){let t=qs(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Rp={red:de,gray:Ut,dim:ke,bold:W,underline:X,highlightSource:e=>e.highlight()},Cp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Sp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Ap({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Sp({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=un.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Op(c),d=Ip(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Us.default)(i,g).slice(g)}}return s}function Ip(e){let t=Object.keys(zt.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Op(e){let t=0;for(let r=0;r"Unknown error")}function Ws(e){return e.errors.flatMap(t=>t.kind==="Union"?Ws(t):[t])}function _p(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Np(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Np(e,t){return[...new Set(e.concat(t))]}function Lp(e){return Ci(e,(t,r)=>{let n=Gs(t),i=Gs(r);return n!==i?n-i:Js(t)-Js(r)})}function Gs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Js(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var pe=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};var Pt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};var dn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var mn=e=>e,fn={bold:mn,red:mn,green:mn,dim:mn,enabled:!1},Ks={bold:W,red:de,green:Ve,dim:ke,enabled:!0},Tt={write(e){e.writeLine(",")}};var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Rt=class extends ze{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new dn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Tt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ct=class e extends ze{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof Rt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Tt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var H=class extends ze{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var nr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Tt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mp(e,t);break;case"IncludeOnScalar":$p(e,t);break;case"EmptySelection":qp(e,t,r);break;case"UnknownSelectionField":Up(e,t);break;case"InvalidSelectionValue":Qp(e,t);break;case"UnknownArgument":Gp(e,t);break;case"UnknownInputField":Jp(e,t);break;case"RequiredArgumentMissing":Hp(e,t);break;case"InvalidArgumentType":Wp(e,t);break;case"InvalidArgumentValue":Kp(e,t);break;case"ValueTooLarge":Yp(e,t);break;case"SomeFieldsMissing":zp(e,t);break;case"TooManyFieldsGiven":Zp(e,t);break;case"Union":Hs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function $p(e,t){let[r,n]=ir(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${or(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function qp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Vp(e,t,i);return}if(n.hasField("select")){jp(e,t);return}}if(r?.[wt(e.outputType.name)]){Bp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Vp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function jp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Xs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${or(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Bp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ir(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Up(e,t){let r=ea(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Xs(n,e.outputType);break;case"include":Xp(n,e.outputType);break;case"omit":ed(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(or(n)),i.join(" ")})}function Qp(e,t){let r=ea(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Gp(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),td(n,e.arguments)),t.addErrorMessage(i=>zs(i,r,e.arguments.map(o=>o.name)))}function Jp(e,t){let[r,n]=ir(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ta(o,e.inputType)}t.addErrorMessage(o=>zs(o,n,e.inputType.fields.map(s=>s.name)))}function zs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=nd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(or(e)),n.join(" ")}function Hp(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ir(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Zs).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}}function Zs(e){return e.kind==="list"?`${Zs(e.elementType)}[]`:e.name}function Wp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Kp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Yp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function zp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ta(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(or(i)),o.join(" ")})}function Zp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Xs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function Xp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function ed(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function td(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ea(e,t){let[r,n]=ir(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ta(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ir(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function or({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var rd=3;function nd(e,t){let r=1/0,n;for(let i of t){let o=(0,Ys.default)(e,i);o>rd||o`}};function St(e){return e instanceof sr}var hn=Symbol(),Ni=new WeakMap,$e=class{constructor(t){t===hn?Ni.set(this,`Prisma.${this._getName()}`):Ni.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ni.get(this)}},ar=class extends $e{_getNamespace(){return"NullTypes"}},lr=class extends ar{};Li(lr,"DbNull");var ur=class extends ar{};Li(ur,"JsonNull");var cr=class extends ar{};Li(cr,"AnyNull");var yn={classes:{DbNull:lr,JsonNull:ur,AnyNull:cr},instances:{DbNull:new lr(hn),JsonNull:new ur(hn),AnyNull:new cr(hn)}};function Li(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var na=": ",En=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+na.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(na).write(this.value)}};var Fi=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function At(e){return new Fi(ia(e))}function ia(e){let t=new Ct;for(let[r,n]of Object.entries(e)){let i=new En(r,oa(n));t.addField(i)}return t}function oa(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(vt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=an(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof $e?new H(`Prisma.${e._getName()}`):St(e)?new H(`prisma.${ra(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?id(e):typeof e=="object"?ia(e):new H(Object.prototype.toString.call(e))}function id(e){let t=new Rt;for(let r of e)t.addItem(oa(r));return t}function bn(e,t){let r=t==="pretty"?Ks:fn,n=e.renderAllMessages(r),i=new Pt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function wn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let p of t)pn(p,a,s);let{message:l,args:u}=bn(a,r),c=cn({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(c,{clientVersion:o})}var Te=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function pr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Re(e){return e.replace(/^./,t=>t.toLowerCase())}function aa(e,t,r){let n=Re(r);return!t.result||!(t.result.$allModels||t.result[n])?e:od({...e,...sa(t.name,e,t.result.$allModels),...sa(t.name,e,t.result[n])})}function od(e){let t=new Te,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ht(e,n=>({...n,needs:r(n.name,new Set)}))}function sa(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:sd(t,o,i)})):{}}function sd(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function la(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ua(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new Te;this.modelExtensionsCache=new Te;this.queryCallbacksCache=new Te;this.clientExtensions=pr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=pr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>aa(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Re(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},It=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var ca=Symbol(),dr=class{constructor(t){if(t!==ca)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?vn:t}},vn=new dr(ca);function Ce(e){return e instanceof dr}var ad={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},pa="explicitly `undefined` values are not allowed";function Pn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=It.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:ad[t],query:mr(r,p)}}function mr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:ma(r,n),selection:ld(e,t,i,n)}}function ld(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),dd(e,n)):ud(n,t,r)}function ud(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&cd(n,t,e),pd(n,r,e),n}function cd(e,t,r){for(let[n,i]of Object.entries(t)){if(Ce(i))continue;let o=r.nestSelection(n);if($i(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=mr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=mr(i,o)}}function pd(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ua(i,n);for(let[s,a]of Object.entries(o)){if(Ce(a))continue;$i(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function dd(e,t){let r={},n=t.getComputedFields(),i=la(e,n);for(let[o,s]of Object.entries(i)){if(Ce(s))continue;let a=t.nestSelection(o);$i(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Ce(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=mr({},a):r[o]=!0;continue}r[o]=mr(s,a)}}return r}function da(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(xt(e)){if(an(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(St(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return md(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(r,n,i).toString("base64")}}if(fd(e))return e.values;if(vt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof $e){if(e!==yn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(gd(e))return e.toJSON();if(typeof e=="object")return ma(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function ma(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Ce(i)||(i!==void 0?r[n]=da(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:pa}))}return r}function md(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[wt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var Ot=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};function fa(e){return{models:qi(e.models),enums:qi(e.enums),types:qi(e.types)}}function qi(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function ga(e,t){let r=pr(()=>hd(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function hd(e){return{datamodel:{models:Vi(e.models),enums:Vi(e.enums),types:Vi(e.types)}}}function Vi(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var ji=new WeakMap,Tn="$$PrismaTypedSql",Bi=class{constructor(t,r){ji.set(this,{sql:t,values:r}),Object.defineProperty(this,Tn,{value:Tn})}get sql(){return ji.get(this).sql}get values(){return ji.get(this).values}};function ha(e){return(...t)=>new Bi(e,t)}function ya(e){return e!=null&&e[Tn]===Tn}function fr(e){return{ok:!1,error:e,map(){return fr(e)},flatMap(){return fr(e)}}}var Ui=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Qi=e=>{let t=new Ui,r=Se(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Se(t,e.queryRaw.bind(e)),executeRaw:Se(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>yd(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=bd(t,e.getConnectionInfo.bind(e))),n},yd=(e,t)=>{let r=Se(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Se(e,t.queryRaw.bind(t)),executeRaw:Se(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Ed(e,o))}},Ed=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Se(e,t.queryRaw.bind(t)),executeRaw:Se(e,t.executeRaw.bind(t)),commit:Se(e,t.commit.bind(t)),rollback:Se(e,t.rollback.bind(t))});function Se(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}function bd(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}var Kl=D(li());var Yl=require("async_hooks"),zl=require("events"),Zl=D(require("fs")),Nr=D(require("path"));var ae=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}var Rn={enumerable:!0,configurable:!0,writable:!0};function Cn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Rn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var wa=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=wd(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=xa(Reflect.ownKeys(o),r),a=xa(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Rn,...l?.getPropertyDescriptor(s)}:Rn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[wa]=function(){let o={...this};return delete o[wa],o},i}function wd(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function xa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function kt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Dt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}function va(e){if(e===void 0)return"";let t=At(e);return new Pt(0,{colors:fn}).write(t).toString()}var xd="P2037";function _t({error:e,user_facing_error:t},r,n){return t.error_code?new ee(vd(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new B(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function vd(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===xd&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var hr="";function Pa(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=Rd(n)||Sd(n)||Od(n)||Nd(n)||Dd(n);return i&&r.push(i),r},[])}var Pd=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Td=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Rd(e){var t=Pd.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Td.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||hr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Cd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sd(e){var t=Cd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Ad=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Id=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Od(e){var t=Ad.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Id.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||hr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var kd=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Dd(e){var t=kd.exec(e);return t?{file:t[3],methodName:t[1]||hr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var _d=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Nd(e){var t=_d.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Hi=class{getLocation(){return null}},Wi=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Pa(t).find(i=>{if(!i.file)return!1;let o=Ei(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Hi:new Wi}var Ta={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Nt(e={}){let t=Fd(e);return Object.entries(t).reduce((n,[i,o])=>(Ta[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Fd(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Sn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ra(e,t){let r=Sn(e);return t({action:"aggregate",unpacker:r,argsMapper:Nt})(e)}function Md(e={}){let{select:t,...r}=e;return typeof t=="object"?Nt({...r,_count:t}):Nt({...r,_count:{_all:!0}})}function $d(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function Ca(e,t){return t({action:"count",unpacker:$d(e),argsMapper:Md})(e)}function qd(e={}){let t=Nt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Vd(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Sa(e,t){return t({action:"groupBy",unpacker:Vd(e),argsMapper:qd})(e)}function Aa(e,t,r){if(t==="aggregate")return n=>Ra(n,r);if(t==="count")return n=>Ca(n,r);if(t==="groupBy")return n=>Sa(n,r)}function Ia(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ri(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new sr(e,o,s.type,s.isList,s.kind==="enum")},...Cn(Object.keys(n))})}var Oa=e=>Array.isArray(e)?e:e.split("."),Ki=(e,t)=>Oa(t).reduce((r,n)=>r&&r[n],e),ka=(e,t,r)=>Oa(t).reduceRight((n,i,o,s)=>Object.assign({},Ki(e,s.slice(0,o)),{[i]:n}),r);function jd(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Bd(e,t,r){return t===void 0?e??{}:ka(t,r,e||!0)}function Yi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=jd(n,i),p=Bd(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Ud(e,t);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let P=[a[h].type,r,h],C=[c,p];return Yi(e,...P,...C)},...Cn([...f,...Object.getOwnPropertyNames(d)])})}}function Ud(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Qd=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Gd=["aggregate","count","groupBy"];function zi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Jd(e,t),Wd(e,t),gr(r),ie("name",()=>t),ie("$name",()=>t),ie("$parent",()=>e._appliedParent)];return Ae({},n)}function Jd(e,t){let r=Re(t),n=Object.keys(zt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:c,callsite:u};return e._request({...p,...a})})};return Qd.includes(o)?Yi(e,t,s):Hd(i)?Aa(e,i,s):s({})}}}function Hd(e){return Gd.includes(e)}function Wd(e,t){return ot(ie("fields",()=>{let r=e._runtimeDataModel.models[t];return Ia(t,r)}))}function Da(e){return e.replace(/^./,t=>t.toUpperCase())}var Zi=Symbol();function yr(e){let t=[Kd(e),ie(Zi,()=>e),ie("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Ae(e,t)}function Kd(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Re),n=[...new Set(t.concat(r))];return ot({getKeys(){return n},getPropertyValue(i){let o=Da(i);if(e._runtimeDataModel.models[o]!==void 0)return zi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return zi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function _a(e){return e[Zi]?e[Zi]:e}function Na(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return yr(t)}function La({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(kt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(kt(u))}Yd(e,l.needs)&&s.push(zd(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Yd(e,t){return t.every(r=>Ti(e,r))}function zd(e,t){return ot(ie(e.name,()=>e.compute(t)))}function An({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=An({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Ma({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:An({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Re(l);return La({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function $a(e){if(e instanceof ae)return Zd(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$a(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Qa(o,l),a.args=s,Va(e,a,r,n+1)}})})}function ja(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Va(e,t,s)}function Ba(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ua(r,n,0,e):e(r)}}function Ua(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Qa(i,l),Ua(a,t,r+1,n)}})}var qa=e=>e;function Qa(e=qa,t=qa){return r=>e(t(r))}var Ga=F("prisma:client"),Ja={Vercel:"vercel","Netlify CI":"netlify"};function Ha({postinstall:e,ciName:t,clientVersion:r}){if(Ga("checkPlatformCaching:postinstall",e),Ga("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ja){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Ja[t]}-build`;throw console.error(n),new T(n,r)}}function Wa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Xd="Cloudflare-Workers",em="node";function Ka(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Xd?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===em?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var tm={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function In(){let e=Ka();return{id:e,prettyName:tm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var el=D(require("fs")),br=D(require("path"));function On(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${rm(e)}`}function rm(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return xi({...t,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function et(e){let{searchedLocations:t}=e;return`The following locations have been searched: -${[...new Set(t)].map(i=>` ${i}`).join(` -`)}`}function Ya(e){let{runtimeBinaryTarget:t}=e;return`${Xe(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". -${On(e)} - -${et(e)}`}function kn(e){return`We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`}function Dn(e){let{errorStack:t}=e;return t?.match(/\/\.next|\/next@|\/next\//)?` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function za(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by a bundler that has not copied "${t}" next to the resulting bundle. -Ensure that "${t}" has been copied next to the bundle or in "${e.expectedLocation}". - -${kn("engine-not-found-bundler-investigation")} - -${et(e)}`}function Za(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Xe(e)} - -This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". -${On(e)} - -${et(e)}`}function Xa(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by tooling that has not copied "${t}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${t}" has been copied to "${e.expectedLocation}". - -${kn("engine-not-found-tooling-investigation")} - -${et(e)}`}var nm=F("prisma:client:engines:resolveEnginePath"),im=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function tl(e,t){let r={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??t.prismaPath;if(r!==void 0)return r;let{enginePath:n,searchedLocations:i}=await om(e,t);if(nm("enginePath",n),n!==void 0&&e==="binary"&&pi(n),n!==void 0)return t.prismaPath=n;let o=await nt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(im())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:rl(e,o),expectedLocation:br.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=Za(c):l?p=Ya(c):u?p=za(c):p=Xa(c),new T(p,t.clientVersion)}async function om(engineType,config){let binaryTarget=await nt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,br.default.resolve(dirname,".."),config.generator?.output?.value??dirname,br.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(ts());for(let e of searchLocations){let t=rl(engineType,binaryTarget),r=br.default.join(e,t);if(searchedLocations.push(e),el.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function rl(e,t){return e==="library"?qr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Xi=D(Pi());function nl(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function il(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var ol=D(vs());function sl({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ol.default)({user:t,repo:r,template:n,title:e,body:i})}function al({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ko(6e3-(s?.length??0)),l=il((0,Xi.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",c=(0,Xi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?nl(s):""} -\`\`\` -`),p=sl({title:r,body:c});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${X(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}function Lt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var _n=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var le=class extends _n{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function S(e,t){return{...e,isRetryable:t}}var Ft=class extends le{constructor(r){super("This request must be retried",S(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(Ft,"ForcedRetryError");var st=class extends le{constructor(r,n){super(r,S(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(st,"InvalidDatasourceError");var at=class extends le{constructor(r,n){super(r,S(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(at,"NotImplementedYetError");var V=class extends le{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends V{constructor(r){super("Schema needs to be uploaded",S(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lt,"SchemaMissingError");var eo="This request could not be understood by the server",wr=class extends V{constructor(r,n,i){super(n||eo,S(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(wr,"BadRequestError");var xr=class extends V{constructor(r,n){super("Engine not started: healthcheck timeout",S(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(xr,"HealthcheckTimeoutError");var vr=class extends V{constructor(r,n,i){super(n,S(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(vr,"EngineStartupError");var Pr=class extends V{constructor(r){super("Engine version is not supported",S(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(Pr,"EngineVersionNotSupportedError");var to="Request timed out",Tr=class extends V{constructor(r,n=to){super(n,S(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(Tr,"GatewayTimeoutError");var sm="Interactive transaction error",Rr=class extends V{constructor(r,n=sm){super(n,S(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(Rr,"InteractiveTransactionError");var am="Request parameters are invalid",Cr=class extends V{constructor(r,n=am){super(n,S(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(Cr,"InvalidRequestError");var ro="Requested resource does not exist",Sr=class extends V{constructor(r,n=ro){super(n,S(r,!1));this.name="NotFoundError";this.code="P5003"}};w(Sr,"NotFoundError");var no="Unknown server error",Mt=class extends V{constructor(r,n,i){super(n||no,S(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(Mt,"ServerError");var io="Unauthorized, check your connection string",Ar=class extends V{constructor(r,n=io){super(n,S(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Ar,"UnauthorizedError");var oo="Usage exceeded, retry again later",Ir=class extends V{constructor(r,n=oo){super(n,S(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(Ir,"UsageExceededError");async function lm(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Or(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await lm(e);if(n.type==="QueryEngineError")throw new ee(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Mt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Pr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new vr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new xr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Rr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Cr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ar(r,$t(io,n));if(e.status===404)return new Sr(r,$t(ro,n));if(e.status===429)throw new Ir(r,$t(oo,n));if(e.status===504)throw new Tr(r,$t(to,n));if(e.status>=500)throw new Mt(r,$t(no,n));if(e.status>=400)throw new wr(r,$t(eo,n))}function $t(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function ll(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}var qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ul(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,r+=qe[s]+qe[a]+qe[l]+qe[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=qe[s]+qe[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=qe[s]+qe[a]+qe[l]+"="),r}function cl(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function um(e){return e[0]*1e3+e[1]/1e6}function so(e){return new Date(um(e))}var pl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var kr=class extends le{constructor(r,n){super(`Cannot fetch data from service: -${r}`,S(n,!0));this.name="RequestError";this.code="P5010"}};w(kr,"RequestError");async function ut(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new kr(a,{clientVersion:n,cause:s})}}var pm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,dl=F("prisma:client:dataproxyEngine");async function dm(e,t){let r=pl["@prisma/engines-version"],n=t.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&pm.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),c=mm(`<=${a}.${l}.${u}`),p=await ut(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();dl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ml(e,t){let r=await dm(e,t);return dl("version",r),r}function mm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var fl=3,Nn=F("prisma:client:dataproxyEngine"),ao=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Dr=class{constructor(t){this.name="DataProxyEngine";cl(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=ul(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new ao({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ml(t,this.config),Nn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Nn(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:so(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:so(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ut(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Nn("schema response status",r.status);let n=await Or(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Dt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Nn("graphql response status",a.status),await this.handleError(await Or(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Or(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Or(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=Lt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof le)||!i.isRetryable)throw i;if(r>=fl)throw i instanceof Ft?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${fl} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ll(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new Ft({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_t(t[0],this.config.clientVersion,this.config.activeProvider):new B(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function gl(e){if(e?.kind==="itx")return e.options.id}var uo=D(require("os")),hl=D(require("path"));var lo=Symbol("PrismaLibraryEngineCache");function fm(){let e=globalThis;return e[lo]===void 0&&(e[lo]={}),e[lo]}function gm(e){let t=fm();if(t[e]!==void 0)return t[e];let r=hl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=uo.default.constants.dlopen.RTLD_LAZY|uo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var yl={async loadLibrary(e){let t=await ei(),r=await tl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>gm(r))}catch(n){let i=di({e:n,platformInfo:t,id:r});throw new T(i,e.clientVersion)}}};var co,El={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new T(`The \`adapter\` option for \`PrismaClient\` is required in this context (${In().prettyName})`,t);if(n===void 0)throw new T("WASM engine was unexpectedly `undefined`",t);co===void 0&&(co=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new T("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await co;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var hm="P2036",Ie=F("prisma:client:libraryEngine");function ym(e){return e.item_type==="query"&&"query"in e}function Em(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var bl=[...Wn,"native"],bm=0xffffffffffffffffn,po=1n;function wm(){let e=po++;return po>bm&&(po=1n),e}var _r=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??yl,t.engineWasm!==void 0&&(this.libraryLoader=r??El),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=wm().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(xm(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new ee(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ie("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Hn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await this.tracingHelper.runInChildSpan("detect_platform",()=>nt());if(!bl.includes(t))throw new T(`Unknown ${de("PRISMA_QUERY_ENGINE_LIBRARY")} ${de(W(t))}. Possible binaryTargets: ${Ve(bl.join(", "))} or a path to the query engine library. -You may have to run ${Ve("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return t}}parseEngineResponse(t){if(!t)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new WeakRef(this),{adapter:r}=this.config;r&&Ie("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new T(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",ym(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):Em(r)?this.loggerRustPanic=new ce(mo(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ie(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ie("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ie("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new T(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ie("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ie("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ie("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ie(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof T)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(mo(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ie("requestBatch");let i=Dt(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),gl(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ce(mo(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:_t(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===hm&&this.config.adapter){let r=t.meta?.id;Yr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Yr(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function xm(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function mo(e,t){return al({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function wl({copyEngine:e=!0},t){let r;try{r=Lt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&tr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Yt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new te(u.join(` -`),{clientVersion:t.clientVersion})}if(o)return new Dr(t);if(a)return new _r(t);throw new te("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Ln({generator:e}){return e?.previewFeatures??[]}var xl=e=>({command:e});var vl=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function qt(e){try{return Pl(e,"fast")}catch{return Pl(e,"slow")}}function Pl(e,t){return JSON.stringify(e.map(r=>Rl(r,t)))}function Rl(e,t){if(Array.isArray(e))return e.map(r=>Rl(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(xt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(vm(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Cl(e):e}function vm(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Cl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Tl);let t={};for(let r of Object.keys(e))t[r]=Tl(e[r]);return t}function Tl(e){return typeof e=="bigint"?e.toString():Cl(e)}var Pm=["$connect","$disconnect","$on","$transaction","$use","$extends"],Sl=Pm;var Tm=/^(\s*alter\s)/i,Al=F("prisma:client");function fo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Tm.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var go=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(ya(r))n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=vl(r),i={values:qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Al(`prisma.${e}(${n}, ${i.values})`):Al(`prisma.${e}(${n})`),{query:n,parameters:i}},Il={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ol={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function ho(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=kl(r(o)):kl(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function kl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Rm={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},yo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Rm}};function Dl(){return new yo}function _l(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function Nl(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Fn=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Fl=D(Pi());function Mn(e){return typeof e.batchRequestIdx=="number"}function Ll(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Eo(e.query.arguments)),t.push(Eo(e.query.selection)),t.join("")}function Eo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Eo(n)})`:r}).join(" ")})`}var Cm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function bo(e){return Cm[e]}var $n=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ict("bigint",r));case"bytes-array":return t.map(r=>ct("bytes",r));case"decimal-array":return t.map(r=>ct("decimal",r));case"datetime-array":return t.map(r=>ct("datetime",r));case"date-array":return t.map(r=>ct("date",r));case"time-array":return t.map(r=>ct("time",r));default:return t}}function qn(e){let t=[],r=Sm(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>bo(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Im(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ml(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:bo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ll(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Am(t),Om(t,i))throw t;if(t instanceof ee&&km(t)){let u=$l(t.meta);wn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=cn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new ee(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof T)throw new T(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Fl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Ki(o,s),l=i==="queryRaw"?qn(a):bt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Im(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ml(e)};Fe(e,"Unknown transaction kind")}}function Ml(e){return{id:e.id,payload:e.payload}}function Om(e,t){return Mn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function km(e){return e.code==="P2009"||e.code==="P2012"}function $l(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map($l)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var ql="6.2.1";var Vl=ql;var Gl=D(_i());var L=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(L,"PrismaClientConstructorValidationError");var jl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bl=["pretty","colorless","minimal"],Ul=["info","query","warn","error"],_m={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Vt(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new L(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Ln(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Yt()==="binary")throw new L('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Bl.includes(e)){let t=Vt(e,Bl);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ul.includes(r)){let n=Vt(r,Ul);throw new L(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Vt(i,o);throw new L(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new L(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new L(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new L(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Lm(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new L(Fm(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Vt(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Jl(e,t){for(let[r,n]of Object.entries(e)){if(!jl.includes(r)){let i=Vt(r,jl);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}_m[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vt(e,t){if(t.length===0||typeof e!="string")return"";let r=Nm(e,t);return r?` Did you mean "${r}"?`:""}function Nm(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Gl.default)(e,i)}));r.sort((i,o)=>i.distancewt(n)===t);if(r)return e[r]}function Fm(e,t){let r=At(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=bn(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}function Hl(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Mn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var tt=F("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Mm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},$m=Symbol.for("prisma.client.transaction.id"),qm={id:0,nextId(){return++this.id}};function Xl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Fn;this._createPrismaPromise=ho();this.$extends=Na;e=n?.__internal?.configOverride?.(e)??e,Ha(e),n&&Jl(n,e);let i=new zl.EventEmitter().on("error",()=>{});this._extensions=It.empty(),this._previewFeatures=Ln(e),this._clientVersion=e.clientVersion??Vl,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Dl();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Nr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Nr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Qi(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new T(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new T("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&Kt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&F.enable("prisma:client");let p=Nr.default.resolve(e.dirname,e.relativePath);Zl.default.existsSync(p)||(p=e.dirname),tt("dirname",e.dirname),tt("relativePath",e.relativePath),tt("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:Nr.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Nl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Wa(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Lt,getBatchRequestPayload:Dt,prismaGraphQLToJSError:_t,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:T,PrismaClientKnownRequestError:ee,debug:F("prisma:client:accelerateEngine"),engineVersion:Kl.version,clientVersion:e.clientVersion}},tt("clientVersion",e.clientVersion),this._engine=wl(e,this._engineConfig),this._requestHandler=new Vn(this,i),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{er.log(`${er.tags[g]??""}`,h.message||h.query)})}this._metrics=new Ot(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Do()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:go({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Wl(n,i);return fo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(fo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:go({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Wl(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=qm.nextId(),s=_l(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Hl(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return yr(Ae(_a(this),[ie("_appliedParent",()=>this._appliedParent._createItxClient(n)),ie("_createPrismaPromise",()=>ho(n)),ie($m,()=>n.id),kt(Sl)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Mm,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,O=>c(u,P=>(O?.end(),l(P))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await ja(this,g);return g.model?Ma({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new Yl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>Pn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return F.enabled("prisma:client")&&(tt("Prisma Client call:"),tt(`prisma.${i}(${va(n)})`),tt("Generated request:"),tt(JSON.stringify(h,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Wl(e,t){return Vm(e)?[new ae(e,t),Il]:[e,Ol]}function Vm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var jm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function eu(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!jm.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function tu(e){Kt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.4.3 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/charybdis/local-prisma/local-prisma-client/runtime/react-native.js b/charybdis/local-prisma/local-prisma-client/runtime/react-native.js deleted file mode 100644 index 3691bcd4..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/react-native.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict";var oa=Object.create;var Xt=Object.defineProperty;var sa=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var la=Object.getPrototypeOf,ua=Object.prototype.hasOwnProperty;var _e=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(e,t)=>{for(var r in t)Xt(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aa(t))!ua.call(e,i)&&i!==r&&Xt(e,i,{get:()=>t[i],enumerable:!(n=sa(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?oa(la(e)):{},zn(t||!e||!e.__esModule?Xt(r,"default",{value:e,enumerable:!0}):r,e)),ca=e=>zn(Xt({},"__esModule",{value:!0}),e);var y,c=_e(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=_e(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=_e(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=_e(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var gi=ge(Xe=>{"use strict";m();c();p();d();f();var ti=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pa=ti(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var I=k===A?0:4-k%4;return[k,I]}function l(C){var A=a(C),k=A[0],I=A[1];return(k+I)*3/4-I}function u(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),I=k[0],L=k[1],M=new n(u(C,I,L)),D=0,$=L>0?I-4:I,U;for(U=0;U<$;U+=4)A=r[C.charCodeAt(U)]<<18|r[C.charCodeAt(U+1)]<<12|r[C.charCodeAt(U+2)]<<6|r[C.charCodeAt(U+3)],M[D++]=A>>16&255,M[D++]=A>>8&255,M[D++]=A&255;return L===2&&(A=r[C.charCodeAt(U)]<<2|r[C.charCodeAt(U+1)]>>4,M[D++]=A&255),L===1&&(A=r[C.charCodeAt(U)]<<10|r[C.charCodeAt(U+1)]<<4|r[C.charCodeAt(U+2)]>>2,M[D++]=A>>8&255,M[D++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function P(C,A,k){for(var I,L=[],M=A;M$?$:D+M));return I===1?(A=C[k-1],L.push(t[A>>2]+t[A<<4&63]+"==")):I===2&&(A=(C[k-2]<<8)+C[k-1],L.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),L.join("")}}),da=ti(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,P=n?o-1:0,S=n?-1:1,C=t[r+P];for(P+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+P],P+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+P],P+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+P>=1?r+=S/u:r+=S*Math.pow(2,1-P),r*u>=2&&(a++,u/=2),a+P>=h?(l=0,a=h):a+P>=1?(l=(r*u-1)*Math.pow(2,o),a=a+P):(l=r*Math.pow(2,P-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Gr=pa(),Ye=da(),Yn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Xe.Buffer=T;Xe.SlowBuffer=wa;Xe.INSPECT_MAX_BYTES=50;var er=2147483647;Xe.kMaxLength=er;T.TYPED_ARRAY_SUPPORT=fa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function fa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Oe(e){if(e>er)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Hr(e)}return ri(e,t,r)}T.poolSize=8192;function ri(e,t,r){if(typeof e=="string")return ga(e,t);if(ArrayBuffer.isView(e))return ha(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return ii(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ya(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ri(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ni(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ma(e,t,r){return ni(e),e<=0?Oe(e):t!==void 0?typeof r=="string"?Oe(e).fill(t,r):Oe(e).fill(t):Oe(e)}T.alloc=function(e,t,r){return ma(e,t,r)};function Hr(e){return ni(e),Oe(e<0?0:zr(e)|0)}T.allocUnsafe=function(e){return Hr(e)};T.allocUnsafeSlow=function(e){return Hr(e)};function ga(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oi(e,t)|0,n=Oe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:zr(e.length)|0,r=Oe(t);for(let n=0;n=er)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+er.toString(16)+" bytes");return e|0}function wa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function oi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return mi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=oi;function ba(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return ai(this,t,r);case"ascii":return Ra(this,t,r);case"latin1":case"binary":return Sa(this,t,r);case"base64":return Ca(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Yn&&(T.prototype[Yn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Zr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Zn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Zn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ea(this,e,t,r);case"utf8":case"utf-8":return xa(this,e,t,r);case"ascii":case"latin1":case"binary":return va(this,e,t,r);case"base64":return Pa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ca(e,t,r){return t===0&&r===e.length?Gr.fromByteArray(e):Gr.fromByteArray(e.slice(t,r))}function ai(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Aa(n)}var Xn=4096;function Aa(e){let t=e.length;if(t<=Xn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Le(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,Ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),Ye.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),Ye.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Ye.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Ye.read(this,e,!1,52,8)};function ne(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ne(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ne(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function li(e,t,r,n,i){fi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function ui(e,t,r,n,i){fi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Le(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Le(function(e,t=0){return ui(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ne(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ne(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ne(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Le(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Le(function(e,t=0){return ui(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ci(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ye.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return pi(this,e,t,!1,r)};function di(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ye.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return di(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return di(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ei(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ei(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ei(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ma(e,t,r){Ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function fi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new ze.ERR_OUT_OF_RANGE("value",a,e)}Ma(n,i,o)}function Ze(e,t){if(typeof e!="number")throw new ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(Ze(e,r),new ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ze.ERR_BUFFER_OUT_OF_BOUNDS:new ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Fa=/[^+/0-9A-Za-z-_]/g;function Ia(e){if(e=e.split("=")[0],e=e.trim().replace(Fa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function _a(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function mi(e){return Gr.toByteArray(Ia(e))}function tr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Zr(e){return e!==e}var Na=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Le(e){return typeof BigInt>"u"?Da:e}function Da(){throw new Error("BigInt not supported")}});var w,m=_e(()=>{"use strict";w=he(gi())});function $a(){return!1}var Ba,ja,rr,tn=_e(()=>{"use strict";m();c();p();d();f();Ba={},ja={existsSync:$a,promises:Ba},rr=ja});function ll(...e){return e.join("/")}function ul(...e){return e.join("/")}var Si,cl,pl,we,an=_e(()=>{"use strict";m();c();p();d();f();Si="/",cl={sep:Si},pl={resolve:ll,posix:cl,join:ul,sep:Si},we=pl});var Mi=ge((nf,ki)=>{"use strict";m();c();p();d();f();ki.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ii=ge((cf,Fi)=>{"use strict";m();c();p();d();f();var fl=Mi();Fi.exports=e=>{let t=fl(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ir,_i=_e(()=>{"use strict";m();c();p();d();f();ir=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ni=ge((Vf,Li)=>{"use strict";m();c();p();d();f();Li.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bi=ge((tm,$i)=>{"use strict";m();c();p();d();f();$i.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var cn=ge((am,ji)=>{"use strict";m();c();p();d();f();var wl=Bi();ji.exports=e=>typeof e=="string"?e.replace(wl(),""):e});var qi=ge((Cm,sr)=>{"use strict";m();c();p();d();f();sr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};sr.exports.default=sr.exports});var En=ge((Jy,uo)=>{"use strict";m();c();p();d();f();uo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{fc.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Bo=ge(()=>{"use strict";m();c();p();d();f()});var vp={};Et(vp,{Debug:()=>on,Decimal:()=>Ee,Extensions:()=>Xr,MetricsClient:()=>mt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ie,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>X,Public:()=>en,Sql:()=>se,defineDmmfProperty:()=>Lo,deserializeJsonResponse:()=>nt,deserializeRawResult:()=>Vr,dmmfToRuntimeDataModel:()=>_o,empty:()=>qo,getPrismaClient:()=>ra,getRuntime:()=>ws,join:()=>jo,makeStrictEnum:()=>na,makeTypedQueryFactory:()=>No,objectEnumValues:()=>Tr,raw:()=>Fn,serializeJsonQuery:()=>kr,skip:()=>Or,sqltag:()=>In,warnEnvConflicts:()=>void 0,warnOnce:()=>It});module.exports=ca(vp);m();c();p();d();f();var Xr={};Et(Xr,{defineExtension:()=>hi,getExtensionContext:()=>yi});m();c();p();d();f();m();c();p();d();f();function hi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function yi(e){return e}var en={};Et(en,{validator:()=>wi});m();c();p();d();f();m();c();p();d();f();function wi(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var nr={};Et(nr,{$:()=>Pi,bgBlack:()=>za,bgBlue:()=>el,bgCyan:()=>rl,bgGreen:()=>Za,bgMagenta:()=>tl,bgRed:()=>Ya,bgWhite:()=>nl,bgYellow:()=>Xa,black:()=>Ga,blue:()=>Je,bold:()=>pe,cyan:()=>ke,dim:()=>vt,gray:()=>At,green:()=>Tt,grey:()=>Ha,hidden:()=>Qa,inverse:()=>Va,italic:()=>Ua,magenta:()=>Wa,red:()=>Qe,reset:()=>qa,strikethrough:()=>Ja,underline:()=>Pt,white:()=>Ka,yellow:()=>Ct});m();c();p();d();f();var rn,bi,Ei,xi,vi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:bi,NO_COLOR:Ei,TERM:xi}=y.env||{},vi=y.stdout&&y.stdout.isTTY);var Pi={enabled:!bi&&Ei==null&&xi!=="dumb"&&(rn!=null&&rn!=="0"||vi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Pi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var qa=V(0,0),pe=V(1,22),vt=V(2,22),Ua=V(3,23),Pt=V(4,24),Va=V(7,27),Qa=V(8,28),Ja=V(9,29),Ga=V(30,39),Qe=V(31,39),Tt=V(32,39),Ct=V(33,39),Je=V(34,39),Wa=V(35,39),ke=V(36,39),Ka=V(37,39),At=V(90,39),Ha=V(90,39),za=V(40,49),Ya=V(41,49),Za=V(42,49),Xa=V(43,49),el=V(44,49),tl=V(45,49),rl=V(46,49),nl=V(47,49);m();c();p();d();f();var il=100,Ti=["green","yellow","blue","magenta","cyan","red"],Rt=[],Ci=Date.now(),ol=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var St={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function sl(e){let t={color:Ti[ol++%Ti.length],enabled:St.enabled(e),namespace:e,log:St.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Rt.push([o,...n]),Rt.length>il&&Rt.shift(),St.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:al(g)),u=`+${Date.now()-Ci}ms`;Ci=Date.now(),globalThis.DEBUG_COLORS?a(nr[s](pe(o)),...l,nr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var on=new Proxy(sl,{get:(e,t)=>St[t],set:(e,t,r)=>St[t]=r});function al(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ai(e=7500){let t=Rt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let e;($=>($.findUnique="findUnique",$.findUniqueOrThrow="findUniqueOrThrow",$.findFirst="findFirst",$.findFirstOrThrow="findFirstOrThrow",$.findMany="findMany",$.create="create",$.createMany="createMany",$.createManyAndReturn="createManyAndReturn",$.update="update",$.updateMany="updateMany",$.updateManyAndReturn="updateManyAndReturn",$.upsert="upsert",$.delete="delete",$.deleteMany="deleteMany",$.groupBy="groupBy",$.count="count",$.aggregate="aggregate",$.findRaw="findRaw",$.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(kt||={});m();c();p();d();f();an();function ln(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var Ft={};Et(Ft,{error:()=>hl,info:()=>gl,log:()=>ml,query:()=>yl,should:()=>Di,tags:()=>Mt,warn:()=>un});m();c();p();d();f();var Mt={error:Qe("prisma:error"),warn:Ct("prisma:warn"),info:ke("prisma:info"),query:Je("prisma:query")},Di={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ml(...e){console.log(...e)}function un(e,...t){Di.warn()&&console.warn(`${Mt.warn} ${e}`,...t)}function gl(e,...t){console.info(`${Mt.info} ${e}`,...t)}function hl(e,...t){console.error(`${Mt.error} ${e}`,...t)}function yl(e,...t){console.log(`${Mt.query} ${e}`,...t)}m();c();p();d();f();function or(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function Me(e,t){throw new Error(t)}m();c();p();d();f();function pn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var dn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function et(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function fn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ui.has(e)||(Ui.add(e),un(t,...r))};var Q=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};le(Q,"PrismaClientInitializationError");m();c();p();d();f();var ie=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};le(ie,"PrismaClientKnownRequestError");m();c();p();d();f();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};le(ue,"PrismaClientRustPanicError");m();c();p();d();f();var K=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};le(K,"PrismaClientUnknownRequestError");m();c();p();d();f();var X=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};le(X,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();var tt=9e15,Be=1e9,mn="0123456789abcdef",lr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ur="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",gn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-tt,maxE:tt,crypto:!1},Wi,Fe,_=!0,pr="[DecimalError] ",$e=pr+"Invalid argument: ",Ki=pr+"Precision limit exceeded",Hi=pr+"crypto unavailable",zi="[object Decimal]",ee=Math.floor,G=Math.pow,bl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,El=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Yi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,F=7,vl=9007199254740991,Pl=lr.length-1,hn=ur.length-1,R={toStringTag:zi};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error($e+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+F,n.rounding=1,r=Tl(n,ro(n,r)),n.precision=e,n.rounding=t,O(Fe==2||Fe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*G(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=q(u.plus(g).times(a),u.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/F))*F,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/fr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=rt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=rt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/fr(5,e)),i=rt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?de(r,i,o):new r(0):new r(NaN):t.isZero()?de(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=de(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=de(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=hn)return s=de(g,h+4,P).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=hn)return s=de(g,h+4,P).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/F+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/F),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=De(u,a),n=t?cr(g,a+10):De(e,a),l=q(s,n,a,1),_t(l.d,i=h,P))do if(a+=10,s=De(u,a),n=t?cr(g,a+10):De(e,a),l=q(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(_t(l.d,i+=10,P));return _=!0,O(l,h,P)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,P=e.d,a=C.precision,l=C.rounding,!u[0]||!P[0]){if(P[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?O(e,a,l):e}if(r=ee(e.e/F),g=ee(S.e/F),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=P.length):(t=P,r=g,s=u.length),n=Math.max(Math.ceil(a/F),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=P.length,h=n0;--n)u[s++]=0;for(n=P.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=dr(u,n),_?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($e+e);return r.d?(t=Zi(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+F,n.rounding=1,r=Al(n,ro(n,r)),n.precision=e,n.rounding=t,O(Fe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Fe==2||Fe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,P=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!P||!P[0]||!S||!S[0])return new h(!e.s||P&&!P[0]&&!S||S&&!S[0]&&!P?NaN:!P||!S?e.s/0:e.s*0);for(r=ee(g.e/F)+ee(e.e/F),l=P.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*P[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=dr(o,r),_?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return bn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Be),t===void 0?t=n.rounding:oe(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(oe(e,0,Be),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(oe(e,0,Be),t===void 0?t=o.rounding:oe(t,0,8),n=O(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=Zi(C)-S.e-1,s=o%F,t.d[0]=G(10,s<0?F+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new A(z(C)),g=A.precision,A.precision=o=C.length*F*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,P=q(u,n,o,1).minus(S).abs().cmp(q(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],A.precision=g,_=!0,P};R.toHexadecimal=R.toHex=function(e,t){return bn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=q(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return bn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=ee(e.e/F),t>=e.d.length-1&&(r=u<0?-u:u)<=vl)return i=Xi(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=yn(e.times(De(a,n+r)),n),i.d&&(i=O(i,n+5,1),_t(i.d,n,o)&&(t=n+10,i=O(yn(e.times(De(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Be),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Be),t===void 0?t=n.rounding:oe(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error($e+e)}function _t(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=F,i=0):(i=Math.ceil((t+1)/F),t%=F),o=G(10,F-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function ar(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Tl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/fr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=rt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,P,S,C,A,k,I,L,M,D,$,U,bt,J,re,Se,Y,He,Zt=n.constructor,Jr=n.s==i.s?1:-1,Z=n.d,B=i.d;if(!Z||!Z[0]||!B||!B[0])return new Zt(!n.s||!i.s||(Z?B&&Z[0]==B[0]:!B)?NaN:Z&&Z[0]==0||!B?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=fe,S=F,g=ee(n.e/S)-ee(i.e/S)),Y=B.length,re=Z.length,I=new Zt(Jr),L=I.d=[],h=0;B[h]==(Z[h]||0);h++);if(B[h]>(Z[h]||0)&&g--,o==null?(U=o=Zt.precision,s=Zt.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)L.push(1),C=!0;else{if(U=U/S+2|0,h=0,Y==1){for(P=0,B=B[0],U++;(h1&&(B=e(B,P,l),Z=e(Z,P,l),Y=B.length,re=Z.length),J=Y,M=Z.slice(0,Y),D=M.length;D=l/2&&++Se;do P=0,u=t(B,M,Y,D),u<0?($=M[0],Y!=D&&($=$*l+(M[1]||0)),P=$/Se|0,P>1?(P>=l&&(P=l-1),A=e(B,P,l),k=A.length,D=M.length,u=t(A,M,k,D),u==1&&(P--,r(A,Y=10;P/=10)h++;I.e=h+g*S-1,O(I,a?o+I.e+1:o,s,C)}return I}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=F,s=t,g=h[P=0],l=g/G(10,i-s-1)%10|0;else if(P=Math.ceil((o+1)/F),a=h.length,P>=a)if(n){for(;a++<=P;)h.push(0);g=l=0,i=1,o%=F,s=o-F+1}else break e;else{for(g=a=h[P],i=1;a>=10;a/=10)i++;o%=F,s=o-F+i,l=s<0?0:g/G(10,i-s-1)%10|0}if(n=n||t<0||h[P+1]!==void 0||(s<0?g:g%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/G(10,i-s):0:h[P-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=G(10,(F-t%F)%F),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=P,a=1,P--):(h.length=P+1,a=G(10,F-o),h[P]=s>0?(g/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(P==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[P]+=a,h[P]!=fe)break;h[P--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function dr(e,t){var r=e[0];for(t*=F;r>=10;r/=10)t++;return t}function cr(e,t,r){if(t>Pl)throw _=!0,r&&(e.precision=r),Error(Ki);return O(new e(lr),t,1,!0)}function de(e,t,r){if(t>hn)throw Error(Ki);return O(new e(ur),t,r,!0)}function Zi(e){var t=e.length-1,r=t*F+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ne(e){for(var t="";e--;)t+="0";return t}function Xi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/F+4);for(_=!1;;){if(r%2&&(o=o.times(t),Ji(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Ji(t.d,s)}return _=!0,o}function Qi(e){return e.d[e.d.length-1]&1}function eo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new P(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=C):l=t,a=new P(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(G(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new P(1),P.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(q(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&_t(s.d,l-n,S,u))P.precision=l+=10,r=o=a=new P(1),g=0,u++;else return O(s,P.precision=C,S,_=!0);else return P.precision=C,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,u,g,h,P,S=1,C=10,A=e,k=A.d,I=A.constructor,L=I.rounding,M=I.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new I(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(_=!1,g=M):g=t,I.precision=g+=C,r=z(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new I("0."+r),o++):A=new I(n+"."+r.slice(1))}else return u=cr(I,g+2,M).times(o+""),A=De(new I(n+"."+r.slice(1)),g-C).plus(u),I.precision=M,t==null?O(A,M,L,_=!0):A;for(h=A,l=s=A=q(A.minus(1),A.plus(1),g,1),P=O(A.times(A),g,1),i=3;;){if(s=O(s.times(P),g,1),u=l.plus(q(s,new I(i),g,1)),z(u.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(cr(I,g+2,M).times(o+""))),l=q(l,new I(S),g,1),t==null)if(_t(l.d,g-C,L,a))I.precision=g+=C,u=s=A=q(h.minus(1),h.plus(1),g,1),P=O(A.times(A),g,1),i=a=1;else return O(l,I.precision=M,L,_=!0);else return I.precision=M,l;l=u,i+=2}}function to(e){return String(e.s*e.s/0)}function wn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%F,r<0&&(n+=F),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Yi.test(t))return wn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(El.test(t))r=16,t=t.toLowerCase();else if(bl.test(t))r=2;else if(xl.test(t))r=8;else throw Error($e+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Xi(n,new n(r),o,o*2)),u=ar(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=dr(u,g),e.d=u,_=!1,s&&(e=q(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):Ge.pow(2,l))),_=!0,e)}function Al(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:rt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/fr(5,r)),t=rt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function rt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/F);for(_=!1,l=r.times(r),a=new e(n);;){if(s=q(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function fr(e,t){for(var r=e;--t;)r*=e;return r}function ro(e,t){var r,n=t.s<0,i=de(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Fe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Fe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Fe=Qi(r)?n?2:3:n?4:1,t;Fe=Qi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function bn(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,Be),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=to(e);else{for(g=be(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),P=new S(1),P.e=g.length-s,P.d=ar(be(P),10,i),P.e=P.d.length),h=ar(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,P,r,n,0,i),h=e.d,o=e.e,u=Wi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ar(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Rl(e){return new this(e).abs()}function Sl(e){return new this(e).acos()}function Ol(e){return new this(e).acosh()}function kl(e,t){return new this(e).plus(t)}function Ml(e){return new this(e).asin()}function Fl(e){return new this(e).asinh()}function Il(e){return new this(e).atan()}function _l(e){return new this(e).atanh()}function Ll(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=de(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?de(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=de(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=de(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Nl(e){return new this(e).cbrt()}function Dl(e){return O(e=new this(e),e.e+1,2)}function $l(e,t,r){return new this(e).clamp(t,r)}function Bl(e){if(!e||typeof e!="object")throw Error(pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-tt,0,"toExpPos",0,tt,"maxE",0,tt,"minE",-tt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=gn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Hi);else this[r]=!1;else throw Error($e+r+": "+n);return this}function jl(e){return new this(e).cos()}function ql(e){return new this(e).cosh()}function no(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Gi(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Hi);else for(;o=10;i/=10)n++;npe(Je(e)),punctuation:Je,directive:ke,function:ke,variable:e=>pe(Je(e)),string:e=>pe(Tt(e)),boolean:Ct,number:ke,comment:At};var mu=e=>e,gr={},gu=0,N={manual:gr.Prism&&gr.Prism.manual,disableWorkerMessageHandler:gr.Prism&&gr.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Se instanceof me)continue;if($&&J!=t.length-1){L.lastIndex=re;var h=L.exec(e);if(!h)break;var g=h.index+(D?h[1].length:0),P=h.index+h[0].length,a=J,l=re;for(let B=t.length;a=l&&(++J,re=l);if(t[J]instanceof me)continue;u=a-J,Se=e.slice(re,l),h.index-=re}else{L.lastIndex=0;var h=L.exec(Se),u=1}if(!h){if(o)break;continue}D&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),P=g+h.length,S=Se.slice(0,g),C=Se.slice(P);let Y=[J,u];S&&(++J,re+=S.length,Y.push(S));let He=new me(A,M?N.tokenize(h,M):h,bt,h,$);if(Y.push(He),C&&Y.push(C),Array.prototype.splice.apply(t,Y),u!=1&&N.matchGrammar(e,t,r,J,re,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):hu(e.type)(e.content)};function hu(e){return io[e]||mu}function oo(e){return yu(e,N.languages.javascript)}function yu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var so=he(Ii());function ao(e){return(0,so.default)(e)}var hr=class e{static read(t){let r;try{r=rr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,ao(n).split(` -`))}highlight(){let t=oo(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var wu={red:Qe,gray:At,dim:vt,bold:pe,underline:Pt,highlightSource:e=>e.highlight()},bu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Eu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function xu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Eu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=hr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Pu(g),P=vu(g);if(!P)return s;s.functionName=`${P.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,P.openingBraceIndex))),u=o.highlightSource(u);let S=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(S))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+S+1;C+=2,s.callArguments=(0,lo.default)(i,C).slice(C)}}return s}function vu(e){let t=Object.keys(kt.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Pu(e){let t=0;for(let r=0;r"Unknown error")}function mo(e){return e.errors.flatMap(t=>t.kind==="Union"?mo(t):[t])}function Au(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ru(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ru(e,t){return[...new Set(e.concat(t))]}function Su(e){return fn(e,(t,r)=>{let n=co(t),i=co(r);return n!==i?n-i:po(t)-po(r)})}function co(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function po(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var ce=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();d();f();m();c();p();d();f();var br=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Er=e=>e,xr={bold:Er,red:Er,green:Er,dim:Er,enabled:!1},go={bold:pe,red:Qe,green:Tt,dim:vt,enabled:!0},lt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ut=class extends je{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new br(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new xe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(lt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ct=class e extends je{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ut&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new xe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(lt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Lt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(lt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function wr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ku(e,t);break;case"IncludeOnScalar":Mu(e,t);break;case"EmptySelection":Fu(e,t,r);break;case"UnknownSelectionField":Nu(e,t);break;case"InvalidSelectionValue":Du(e,t);break;case"UnknownArgument":$u(e,t);break;case"UnknownInputField":Bu(e,t);break;case"RequiredArgumentMissing":ju(e,t);break;case"InvalidArgumentType":qu(e,t);break;case"InvalidArgumentValue":Uu(e,t);break;case"ValueTooLarge":Vu(e,t);break;case"SomeFieldsMissing":Qu(e,t);break;case"TooManyFieldsGiven":Ju(e,t);break;case"Union":fo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ku(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Mu(e,t){let[r,n]=Nt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ce(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Fu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Iu(e,t,i);return}if(n.hasField("select")){_u(e,t);return}}if(r?.[it(e.outputType.name)]){Lu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Iu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ce(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function _u(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),bo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Lu(e,t){let r=new Lt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ce("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Nt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Nu(e,t){let r=Eo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":bo(n,e.outputType);break;case"include":Gu(n,e.outputType);break;case"omit":Wu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Dt(n)),i.join(" ")})}function Du(e,t){let r=Eo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function $u(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ku(n,e.arguments)),t.addErrorMessage(i=>yo(i,r,e.arguments.map(o=>o.name)))}function Bu(e,t){let[r,n]=Nt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&xo(o,e.inputType)}t.addErrorMessage(o=>yo(o,n,e.inputType.fields.map(s=>s.name)))}function yo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=zu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Dt(e)),n.join(" ")}function ju(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Nt(e.argumentPath),s=new Lt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ce(o,s).makeRequired())}else{let l=e.inputTypes.map(wo).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function wo(e){return e.kind==="list"?`${wo(e.elementType)}[]`:e.name}function qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=vr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Uu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=vr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Qu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&xo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${vr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Dt(i)),o.join(" ")})}function Ju(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${vr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function bo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Gu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Wu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function Ku(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function Eo(e,t){let[r,n]=Nt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function xo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function Nt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function vr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Hu=3;function zu(e,t){let r=1/0,n;for(let i of t){let o=(0,ho.default)(e,i);o>Hu||o`}};function pt(e){return e instanceof $t}m();c();p();d();f();var Pr=Symbol(),xn=new WeakMap,Ie=class{constructor(t){t===Pr?xn.set(this,`Prisma.${this._getName()}`):xn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return xn.get(this)}},Bt=class extends Ie{_getNamespace(){return"NullTypes"}},jt=class extends Bt{};vn(jt,"DbNull");var qt=class extends Bt{};vn(qt,"JsonNull");var Ut=class extends Bt{};vn(Ut,"AnyNull");var Tr={classes:{DbNull:jt,JsonNull:qt,AnyNull:Ut},instances:{DbNull:new jt(Pr),JsonNull:new qt(Pr),AnyNull:new Ut(Pr)}};function vn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Po=": ",Cr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Po.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Po).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function dt(e){return new Pn(To(e))}function To(e){let t=new ct;for(let[r,n]of Object.entries(e)){let i=new Cr(r,Co(n));t.addField(i)}return t}function Co(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(st(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ie?new H(`Prisma.${e._getName()}`):pt(e)?new H(`prisma.${vo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Yu(e):typeof e=="object"?To(e):new H(Object.prototype.toString.call(e))}function Yu(e){let t=new ut;for(let r of e)t.addItem(Co(r));return t}function Ar(e,t){let r=t==="pretty"?go:xr,n=e.renderAllMessages(r),i=new at(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Rr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=dt(e);for(let h of t)wr(h,a,s);let{message:l,args:u}=Ar(a,r),g=yr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new X(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Vt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Ro(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Zu({...e,...Ao(t.name,e,t.result.$allModels),...Ao(t.name,e,t.result[n])})}function Zu(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return et(e,n=>({...n,needs:r(n.name,new Set)}))}function Ao(e,t,r){return r?et(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Xu(t,o,i)})):{}}function Xu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function So(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Oo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Sr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=Vt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Vt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ro(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ft=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Sr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Sr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();m();c();p();d();f();var ko=Symbol(),Qt=class{constructor(t){if(t!==ko)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Or:t}},Or=new Qt(ko);function Te(e){return e instanceof Qt}var ec={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Mo="explicitly `undefined` values are not allowed";function kr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ft.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:ec[t],query:Jt(r,h)}}function Jt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Io(r,n),selection:tc(e,t,i,n)}}function tc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),oc(e,n)):rc(n,t,r)}function rc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&nc(n,t,e),ic(n,r,e),n}function nc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Jt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Jt(i,o)}}function ic(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Oo(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function oc(e,t){let r={},n=t.getComputedFields(),i=So(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Jt({},a):r[o]=!0;continue}r[o]=Jt(s,a)}}return r}function Fo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ot(e)){if(mr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(pt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return sc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(ac(e))return e.values;if(st(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ie){if(e!==Tr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(lc(e))return e.toJSON();if(typeof e=="object")return Io(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Io(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Fo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Mo}))}return r}function sc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[it(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var mt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();d();f();function _o(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Lo(e,t){let r=Vt(()=>uc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function uc(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Sn=new WeakMap,Mr="$$PrismaTypedSql",On=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Mr,{value:Mr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function No(e){return(...t)=>new On(e,t)}function Do(e){return e!=null&&e[Mr]===Mr}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Gt(e){return{ok:!1,error:e,map(){return Gt(e)},flatMap(){return Gt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Mn=e=>{let t=new kn,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>cc(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=dc(t,e.getConnectionInfo.bind(e))),n},cc=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>pc(e,o))}},pc=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Gt({kind:"GenericJs",id:i})}}}function dc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Gt({kind:"GenericJs",id:i})}}}var ta=he($o());var MO=he(Bo());_i();tn();an();m();c();p();d();f();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var Fr={enumerable:!0,configurable:!0,writable:!0};function Ir(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Uo=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=mc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Vo(Reflect.ownKeys(o),r),a=Vo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Fr,...l?.getPropertyDescriptor(s)}:Fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Uo]=function(){let o={...this};return delete o[Uo],o},i}function mc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Vo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function _r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function Qo(e){if(e===void 0)return"";let t=dt(e);return new at(0,{colors:xr}).write(t).toString()}m();c();p();d();f();var gc="P2037";function Lr({error:e,user_facing_error:t},r,n){return t.error_code?new ie(hc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function hc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===gc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Kt="";function Jo(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=bc(n)||xc(n)||Tc(n)||Sc(n)||Ac(n);return i&&r.push(i),r},[])}var yc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bc(e){var t=yc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=wc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Kt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Ec=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function xc(e){var t=Ec.exec(e);return t?{file:t[2],methodName:t[1]||Kt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Pc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tc(e){var t=vc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Pc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Kt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Cc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Ac(e){var t=Cc.exec(e);return t?{file:t[3],methodName:t[1]||Kt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Rc=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sc(e){var t=Rc.exec(e);return t?{file:t[2],methodName:t[1]||Kt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var _n=class{getLocation(){return null}},Ln=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Jo(t).find(i=>{if(!i.file)return!1;let o=ln(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function qe(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new _n:new Ln}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Go={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=kc(e);return Object.entries(t).reduce((n,[i,o])=>(Go[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function kc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Nr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Wo(e,t){let r=Nr(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}m();c();p();d();f();function Mc(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function Fc(e={}){return typeof e.select=="object"?t=>Nr(e)(t)._count:t=>Nr(e)(t)._count._all}function Ko(e,t){return t({action:"count",unpacker:Fc(e),argsMapper:Mc})(e)}m();c();p();d();f();function Ic(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function _c(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ho(e,t){return t({action:"groupBy",unpacker:_c(e),argsMapper:Ic})(e)}function zo(e,t,r){if(t==="aggregate")return n=>Wo(n,r);if(t==="count")return n=>Ko(n,r);if(t==="groupBy")return n=>Ho(n,r)}m();c();p();d();f();function Yo(e,t){let r=t.fields.filter(i=>!i.relationName),n=dn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new $t(e,o,s.type,s.isList,s.kind==="enum")},...Ir(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var Zo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Zo(t).reduce((r,n)=>r&&r[n],e),Xo=(e,t,r)=>Zo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function Lc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nc(e,t,r){return t===void 0?e??{}:Xo(t,r,e||!0)}function Dn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=qe(e._errorFormat),g=Lc(n,i),h=Nc(l,o,g),P=r({dataPath:g,callsite:u})(h),S=Dc(e,t);return new Proxy(P,{get(C,A){if(!S.includes(A))return C[A];let I=[a[A].type,r,A],L=[g,h];return Dn(e,...I,...L)},...Ir([...S,...Object.getOwnPropertyNames(P)])})}}function Dc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var $c=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Bc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[jc(e,t),Uc(e,t),Wt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ae({},n)}function jc(e,t){let r=Pe(t),n=Object.keys(kt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=qe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})})};return $c.includes(o)?Dn(e,t,s):qc(i)?zo(e,i,s):s({})}}}function qc(e){return Bc.includes(e)}function Uc(e,t){return We(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Yo(t,r)}))}m();c();p();d();f();function es(e){return e.replace(/^./,t=>t.toUpperCase())}var Bn=Symbol();function Ht(e){let t=[Vc(e),te(Bn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Wt(r)),Ae(e,t)}function Vc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=es(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ts(e){return e[Bn]?e[Bn]:e}function rs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Ht(t)}m();c();p();d();f();m();c();p();d();f();function ns({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(gt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(gt(u))}Qc(e,l.needs)&&s.push(Jc(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Qc(e,t){return t.every(r=>pn(e,r))}function Jc(e,t){return We(te(e.name,()=>e.compute(t)))}m();c();p();d();f();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function os({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ns({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();function ss(e){if(e instanceof se)return Gc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ss(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(o,l),a.args=s,ls(e,a,r,n+1)}})})}function us(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ls(e,t,s)}function cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ps(r,n,0,e):e(r)}}function ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(i,l),ps(a,t,r+1,n)}})}var as=e=>e;function ds(e=as,t=as){return r=>e(t(r))}m();c();p();d();f();var fs=ae("prisma:client"),ms={Vercel:"vercel","Netlify CI":"netlify"};function gs({postinstall:e,ciName:t,clientVersion:r}){if(fs("checkPlatformCaching:postinstall",e),fs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ms){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ms[t]}-build`;throw console.error(n),new Q(n,r)}}m();c();p();d();f();function hs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Wc="Cloudflare-Workers",Kc="node";function ys(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Wc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Kc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Hc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ws(){let e=ys();return{id:e,prettyName:Hc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var jn=he(cn());m();c();p();d();f();function bs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Es(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}m();c();p();d();f();var xs=he(qi());function vs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,xs.default)({user:t,repo:r,template:n,title:e,body:i})}function Ps({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Ai(6e3-(s?.length??0)),l=Es((0,jn.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",g=(0,jn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?bs(s):""} -\`\`\` -`),h=vs({title:r,body:g});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${Pt(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}m();c();p();d();f();function $r({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ts(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var qn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Cs={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:qn}}};var zc="P2036",Re=ae("prisma:client:libraryEngine");function Yc(e){return e.item_type==="query"&&"query"in e}function Zc(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var eR=[...sn,"native"],Xc=0xffffffffffffffffn,Un=1n;function ep(){let e=Un++;return Un>Xc&&(Un=1n),e}var Yt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Cs,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=ep().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(tp(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new ie(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new K("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Re("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Yc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):Zc(r)?this.loggerRustPanic=new ue(Vn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Re("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Re("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(Vn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new K(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Re("requestBatch");let i=_r(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ts(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(Vn(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Lr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===zc&&this.config.adapter){let r=t.meta?.id;or(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return or(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function tp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Vn(e,t){return Ps({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function As({copyEngine:e=!0},t){let r;try{r=$r({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&It("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Ot(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new X(u.join(` -`),{clientVersion:t.clientVersion})}return new Yt(t)}m();c();p();d();f();function Br({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Rs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Ss=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function yt(e){try{return Os(e,"fast")}catch{return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Ms(r,t)))}function Ms(e,t){if(Array.isArray(e))return e.map(r=>Ms(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ot(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ee.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(rp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Fs(e):e}function rp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Fs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Fs(e)}m();c();p();d();f();var np=["$connect","$disconnect","$on","$transaction","$use","$extends"],Is=np;var ip=/^(\s*alter\s)/i,_s=ae("prisma:client");function Qn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&ip.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Jn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Do(r))n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:yt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ss(r),i={values:yt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Gn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ds(r(o)):Ds(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ds(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var op={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Wn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??op}};function $s(){return new Wn}m();c();p();d();f();function Bs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();var jr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();d();f();var Us=he(cn());m();c();p();d();f();function qr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function qs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Kn(e.query.arguments)),t.push(Kn(e.query.selection)),t.join("")}function Kn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Kn(n)})`:r}).join(" ")})`}m();c();p();d();f();var sp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Hn(e){return sp[e]}m();c();p();d();f();var Ur=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iKe("bigint",r));case"bytes-array":return t.map(r=>Ke("bytes",r));case"decimal-array":return t.map(r=>Ke("decimal",r));case"datetime-array":return t.map(r=>Ke("datetime",r));case"date-array":return t.map(r=>Ke("date",r));case"time-array":return t.map(r=>Ke("time",r));default:return t}}function Vr(e){let t=[],r=ap(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>Hn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:up(o),containsWrite:u,customDataProxyFetch:i})).map((h,P)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[P],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Vs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Hn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:qs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(lp(t),cp(t,i))throw t;if(t instanceof ie&&pp(t)){let u=Qs(t.meta);Rr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=yr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new ie(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(l,this.client._clientVersion);if(t instanceof K)throw new K(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ue)throw new ue(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Us.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Vr(a):nt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function up(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Vs(e)};Me(e,"Unknown transaction kind")}}function Vs(e){return{id:e.id,payload:e.payload}}function cp(e,t){return qr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function pp(e){return e.code==="P2009"||e.code==="P2012"}function Qs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Js="6.2.1";var Gs=Js;m();c();p();d();f();var Ys=he(En());m();c();p();d();f();var j=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};le(j,"PrismaClientConstructorValidationError");var Ws=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Ks=["pretty","colorless","minimal"],Hs=["info","query","warn","error"],fp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new j(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new j(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new j('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Br(t).includes("driverAdapters"))throw new j('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ot()==="binary")throw new j('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ks.includes(e)){let t=wt(e,Ks);throw new j(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Hs.includes(r)){let n=wt(r,Hs);throw new j(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=wt(i,o);throw new j(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new j(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new j(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new j(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new j('"omit" option is expected to be an object.');if(e===null)throw new j('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=gp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new j(hp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new j(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=wt(r,t);throw new j(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Zs(e,t){for(let[r,n]of Object.entries(e)){if(!Ws.includes(r)){let i=wt(r,Ws);throw new j(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}fp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new j('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function wt(e,t){if(t.length===0||typeof e!="string")return"";let r=mp(e,t);return r?` Did you mean "${r}"?`:""}function mp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ys.default)(e,i)}));r.sort((i,o)=>i.distanceit(n)===t);if(r)return e[r]}function hp(e,t){let r=dt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ar(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}m();c();p();d();f();function Xs(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!qr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Ue=ae("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var yp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},wp=Symbol.for("prisma.client.transaction.id"),bp={id:0,nextId(){return++this.id}};function ra(e){class t{constructor(n){this._originalClient=this;this._middlewares=new jr;this._createPrismaPromise=Gn();this.$extends=rs;e=n?.__internal?.configOverride?.(e)??e,gs(e),n&&Zs(n,e);let i=new ir().on("error",()=>{});this._extensions=ft.empty(),this._previewFeatures=Br(e),this._clientVersion=e.clientVersion??Gs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$s();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Mn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ae.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);rr.existsSync(h)||(h=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("cwd",h);let P=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:P.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:P.binaryPath??void 0,engineEndpoint:P.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:hs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:$r,getBatchRequestPayload:_r,prismaGraphQLToJSError:Lr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ie,debug:ae("prisma:client:accelerateEngine"),engineVersion:ta.version,clientVersion:e.clientVersion}},Ue("clientVersion",e.clientVersion),this._engine=As(e,this._engineConfig),this._requestHandler=new Qr(this,i),l.log)for(let S of l.log){let C=typeof S=="string"?S:S.emit==="stdout"?S.level:null;C&&this.$on(C,A=>{Ft.log(`${Ft.tags[C]??""}`,A.message||A.query)})}this._metrics=new mt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Ht(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ri()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ea(n,i);return Qn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Qn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Rs,callsite:qe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ea(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=bp.nextId(),s=Bs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Xs(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Ht(Ae(ts(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Gn(n)),te(wp,()=>n.id),gt(Is)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??yp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,k=>g(u,I=>(k?.end(),l(I))));let{runInTransaction:h,args:P,...S}=u,C={...n,...S};P&&(C.args=i.middlewareArgsToRequestArgs(P)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await us(this,C);return C.model?os({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:P,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>kr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ae.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${Qo(n)})`),Ue("Generated request:"),Ue(JSON.stringify(A,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:P,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ea(e,t){return Ep(e)?[new se(e,t),Ls]:[e,Ns]}function Ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var xp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function na(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!xp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=react-native.js.map diff --git a/charybdis/local-prisma/local-prisma-client/runtime/wasm.js b/charybdis/local-prisma/local-prisma-client/runtime/wasm.js deleted file mode 100644 index c4ba6733..00000000 --- a/charybdis/local-prisma/local-prisma-client/runtime/wasm.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict";var Fo=Object.create;var At=Object.defineProperty;var No=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Bo=Object.prototype.hasOwnProperty;var ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),St=(e,t)=>{for(var r in t)At(e,r,{get:t[r],enumerable:!0})},nn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uo(t))!Bo.call(e,i)&&i!==r&&At(e,i,{get:()=>t[i],enumerable:!(n=No(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Fo(qo(e)):{},nn(t||!e||!e.__esModule?At(r,"default",{value:e,enumerable:!0}):r,e)),$o=e=>nn(At({},"__esModule",{value:!0}),e);function gr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new y(Jo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new y([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new y(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,u)=>function(g=0){return B(g,"offset"),z(g,"offset"),V(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,u)},o=(a,u)=>function(g,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Qo[C];return B(T,"offset"),z(T,"offset"),V(T,"offset",this.length-1),jo(g,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,g,u),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(u=>{u.includes("Uint")&&(e[u.replace("Uint","UInt")]=e[u]),u.includes("Float64")&&(e[u.replace("Float64","Double")]=e[u]),u.includes("Float32")&&(e[u.replace("Float32","Float")]=e[u])})};n.forEach((a,u)=>{a.startsWith("read")&&(e[a]=i(u,!1),e[a+"LE"]=i(u,!0),e[a+"BE"]=i(u,!1)),a.startsWith("write")&&(e[a]=o(u,!1),e[a+"LE"]=o(u,!0),e[a+"BE"]=o(u,!1)),s([a,a+"LE",a+"BE"])})}function sn(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Ot(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function V(e,t,r=Ko+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function B(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function z(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function jo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function on(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Ho(e,t="utf8"){return y.from(e,t)}var y,Qo,Jo,Go,Wo,Ko,b,hr,c=ae(()=>{"use strict";y=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return on(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return gr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return Wo.includes(r)}static compare(r,n){Ot(r,"buff1"),Ot(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return gr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){B(r,"offset"),z(r,"offset"),V(r,"offset",this.length-1),B(n,"byteLength"),z(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){B(n,"offset"),z(n,"offset"),V(n,"offset",this.length-1),B(i,"byteLength"),z(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){V(n,"targetStart"),V(i,"sourceStart",this.length),V(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-u:r.length),u);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),u=typeof n=="string"?0:n;return u=typeof n=="number"?u:null,u=Number.isNaN(u)?null:u,u??=o?this.length:0,u=u<0?this.length+u:u,a.length===0&&o===!1?u>=this.length?this.length:u:a.length===0&&o===!0?(u>=this.length?this.length:u)||this.length:s((g,T)=>(o?T<=u:T>=u)&&this[T]===a[0]&&a.every((O,A)=>this[T+A]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Go.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+hr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+hr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");sn(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Qo={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Jo=new TextEncoder,Go=new TextDecoder,Wo=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Ko=4294967295;Vo(y.prototype);b=new Proxy(Ho,{construct(e,[t,r]){return y.from(t,r)},get(e,t){return y[t]}}),hr=String.fromCodePoint});var h,m=ae(()=>{"use strict";h={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=ae(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=ae(()=>{"use strict";E=()=>{};E.prototype=E});var w,f=ae(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function cn(e,t){var r,n,i,o,s,a,u,g,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(u=e.d,g=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=g.length):(n=g,i=s,a=u.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=u.length,o=g.length,a-o<0&&(o=a,n=g,g=u,u=n),r=0;o;)r=(u[--o]=u[o]+g[o]+r)/j|0,u[o]%=j;for(r&&(u.unshift(r),++i),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=i,U?D(t,C):t}function ue(e,t,r){if(e!==~~e||er)throw Error(Se+e)}function le(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(br+$(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),g+=5;for(n=Math.log(Ae(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++u),s=o.plus(be(i,r,a)),le(s.d).slice(0,a)===le(o.d).slice(0,a)){for(;g--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function $(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(ne+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function Pe(e){for(var t="";e--;)t+="0";return t}function tt(e,t){var r,n,i,o,s,a,u,g,T,C=1,O=10,A=e,k=A.d,S=A.constructor,M=S.precision;if(A.s<1)throw Error(ne+(A.s?"NaN":"-Infinity"));if(A.eq(Z))return new S(0);if(t==null?(U=!1,g=M):g=t,A.eq(10))return t==null&&(U=!0),yr(S,g);if(g+=O,S.precision=g,r=le(k),n=r.charAt(0),o=$(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=le(A.d),n=r.charAt(0),C++;o=$(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=yr(S,g+2,M).times(o+""),A=tt(new S(n+"."+r.slice(1)),g-O).plus(u),S.precision=M,t==null?(U=!0,D(A,M)):A;for(a=s=A=be(A.minus(Z),A.plus(Z),g),T=D(A.times(A),g),i=3;;){if(s=D(s.times(T),g),u=a.plus(be(s,new S(i),g)),le(u.d).slice(0,g)===le(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(yr(S,g+2,M).times(o+""))),a=be(a,new S(C),g),S.precision=M,t==null?(U=!0,D(a,M)):a;a=u,i+=2}}function an(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nkt||e.e<-kt))throw Error(br+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,u,g,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,g=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(g=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Ae(10,s-i-1),a=g/o%10|0,u=t<0||C[T+1]!==void 0||g%o,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(n>0?i>0?g/Ae(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=$(e),C.length=1,t=t-o-1,C[0]=Ae(10,(N-t%N)%N),e.e=Fe(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Ae(10,N-n),C[T]=i>0?(g/Ae(10,s-i)%Ae(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>kt||e.e<-kt))throw Error(br+$(e));return e}function pn(e,t){var r,n,i,o,s,a,u,g,T,C,O=e.constructor,A=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,A):t;if(u=e.d,C=t.d,n=t.e,g=e.e,u=u.slice(),s=g-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=g,a=u.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,a=C.length,T=i0;--i)u[a++]=0;for(i=C.length;i>s;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),e.s<0?"-"+o:o}function ln(e,t){if(e.length>t)return e.length=t,!0}function dn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Se+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return an(s,o.toString())}else if(typeof o!="string")throw Error(Se+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Yo.test(o))an(s,o);else throw Error(Se+o)}if(i.prototype=R,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=dn,i.config=i.set=Xo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Se+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Se+r+": "+n);return this}var De,zo,wr,U,ne,Se,br,Fe,Ae,Yo,Z,j,N,un,kt,R,be,wr,Mt,fn=ae(()=>{"use strict";c();m();p();d();f();l();De=1e9,zo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,ne="[DecimalError] ",Se=ne+"Invalid argument: ",br=ne+"Exponent out of range: ",Fe=Math.floor,Ae=Math.pow,Yo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,un=9007199254740991,kt=Fe(un/N),R={};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};R.decimalPlaces=R.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};R.dividedBy=R.div=function(e){return be(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(be(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return $(this)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){return this.cmp(e)>=0};R.isInteger=R.isint=function(){return this.e>this.d.length-2};R.isNegative=R.isneg=function(){return this.s<0};R.isPositive=R.ispos=function(){return this.s>0};R.isZero=function(){return this.s===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(ne+"NaN");if(r.s<1)throw Error(ne+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=be(tt(r,o),tt(e,o),o),U=!0,D(t,i))};R.minus=R.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pn(t,e):cn(t,(e.s=-e.s,e))};R.modulo=R.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ne+"NaN");return r.s?(U=!1,t=be(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return mn(this)};R.naturalLogarithm=R.ln=function(){return tt(this)};R.negated=R.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};R.plus=R.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?cn(t,e):pn(t,(e.s=-e.s,e))};R.precision=R.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Se+e);if(t=$(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(ne+"NaN")}for(e=$(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=le(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=s=r+3;;)if(o=n,n=o.plus(be(a,o,s+2)).times(.5),le(o.d).slice(0,s)===(t=le(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,g,T=this,C=T.constructor,O=T.d,A=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,u=O.length,g=A.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+A[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};R.toDecimalPlaces=R.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ue(e,0,De),t===void 0?t=n.rounding:ue(t,0,8),D(r,e+$(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Oe(n,!0):(ue(e,0,De),t===void 0?t=i.rounding:ue(t,0,8),n=D(new i(n),e+1,t),r=Oe(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Oe(i):(ue(e,0,De),t===void 0?t=o.rounding:ue(t,0,8),n=D(new o(i),e+$(i)+1,t),r=Oe(n.abs(),!1,e+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),$(e)+1,t.rounding)};R.toNumber=function(){return+this};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,g=12,T=+(e=new u(e));if(!e.s)return new u(Z);if(a=new u(a),!a.s){if(e.s<1)throw Error(ne+"Infinity");return a}if(a.eq(Z))return a;if(n=u.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=un){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),ln(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),ln(a.d,t);return U=!0,e.s<0?new u(Z).div(i):D(i,n)}}else if(o<0)throw Error(ne+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(tt(a,n+g)),U=!0,i=mn(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=$(i),n=Oe(i,r<=o.toExpNeg||r>=o.toExpPos)):(ue(e,1,De),t===void 0?t=o.rounding:ue(t,0,8),i=D(new o(i),e,t),r=$(i),n=Oe(i,e<=r||r<=o.toExpNeg,e)),n};R.toSignificantDigits=R.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ue(e,1,De),t===void 0?t=n.rounding:ue(t,0,8)),D(new n(r),e,t)};R.toString=R.valueOf=R.val=R.toJSON=R[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$(e),r=e.constructor;return Oe(e,t<=r.toExpNeg||t>=r.toExpPos)};be=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,u,g,T,C,O,A,k,S,M,ie,K,Ie,H,_,fr,oe,Ct,Rt=n.constructor,Do=n.s==i.s?1:-1,se=n.d,q=i.d;if(!n.s)return new Rt(n);if(!i.s)throw Error(ne+"Division by zero");for(u=n.e-i.e,oe=q.length,_=se.length,A=new Rt(Do),k=A.d=[],g=0;q[g]==(se[g]||0);)++g;if(q[g]>(se[g]||0)&&--u,o==null?K=o=Rt.precision:s?K=o+($(n)-$(i))+1:K=o,K<0)return new Rt(0);if(K=K/N+2|0,g=0,oe==1)for(T=0,q=q[0],K++;(g<_||T)&&K--;g++)Ie=T*j+(se[g]||0),k[g]=Ie/q|0,T=Ie%q|0;else{for(T=j/(q[0]+1)|0,T>1&&(q=e(q,T),se=e(se,T),oe=q.length,_=se.length),H=oe,S=se.slice(0,oe),M=S.length;M=j/2&&++fr;do T=0,a=t(q,S,oe,M),a<0?(ie=S[0],oe!=M&&(ie=ie*j+(S[1]||0)),T=ie/fr|0,T>1?(T>=j&&(T=j-1),C=e(q,T),O=C.length,M=S.length,a=t(C,S,O,M),a==1&&(T--,r(C,oe{"use strict";fn();v=class extends Mt{static isDecimal(t){return t instanceof Mt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,t)}`)}}},ce=v});function Zo(){return!1}var es,ts,bn,wn=ae(()=>{"use strict";c();m();p();d();f();l();es={},ts={existsSync:Zo,promises:es},bn=ts});function as(...e){return e.join("/")}function ls(...e){return e.join("/")}var Ln,us,cs,nt,_n=ae(()=>{"use strict";c();m();p();d();f();l();Ln="/",us={sep:Ln},cs={resolve:as,posix:us,join:ls,sep:Ln},nt=cs});var Ft,Fn=ae(()=>{"use strict";c();m();p();d();f();l();Ft=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Un=Le((Wc,Nn)=>{"use strict";c();m();p();d();f();l();Nn.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var $n=Le((am,Bn)=>{"use strict";c();m();p();d();f();l();Bn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var jn=Le((fm,Vn)=>{"use strict";c();m();p();d();f();l();var hs=$n();Vn.exports=e=>typeof e=="string"?e.replace(hs(),""):e});var kr=Le((Pf,Gn)=>{"use strict";c();m();p();d();f();l();Gn.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{pa.exports={name:"@prisma/engines-version",version:"6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4123509d24aa4dede1e864b46351bf2790323b69"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var xi=Le(()=>{"use strict";c();m();p();d();f();l()});var ul={};St(ul,{Debug:()=>Tr,Decimal:()=>ce,Extensions:()=>Er,MetricsClient:()=>ze,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Y,PrismaClientRustPanicError:()=>Ee,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>G,Public:()=>xr,Sql:()=>X,defineDmmfProperty:()=>yi,deserializeJsonResponse:()=>qe,deserializeRawResult:()=>pr,dmmfToRuntimeDataModel:()=>hi,empty:()=>vi,getPrismaClient:()=>Io,getRuntime:()=>Ce,join:()=>Pi,makeStrictEnum:()=>Lo,makeTypedQueryFactory:()=>bi,objectEnumValues:()=>Gt,raw:()=>Vr,serializeJsonQuery:()=>Xt,skip:()=>Yt,sqltag:()=>jr,warnEnvConflicts:()=>void 0,warnOnce:()=>at});module.exports=$o(ul);c();m();p();d();f();l();var Er={};St(Er,{defineExtension:()=>gn,getExtensionContext:()=>hn});c();m();p();d();f();l();c();m();p();d();f();l();function gn(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function hn(e){return e}var xr={};St(xr,{validator:()=>yn});c();m();p();d();f();l();c();m();p();d();f();l();function yn(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Pr,En,xn,Pn,vn=!0;typeof h<"u"&&({FORCE_COLOR:Pr,NODE_DISABLE_COLORS:En,NO_COLOR:xn,TERM:Pn}=h.env||{},vn=h.stdout&&h.stdout.isTTY);var rs={enabled:!En&&xn==null&&Pn!=="dumb"&&(Pr!=null&&Pr!=="0"||vn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var fu=F(0,0),It=F(1,22),Lt=F(2,22),gu=F(3,23),Tn=F(4,24),hu=F(7,27),yu=F(8,28),bu=F(9,29),wu=F(30,39),Ne=F(31,39),Cn=F(32,39),Rn=F(33,39),An=F(34,39),Eu=F(35,39),Sn=F(36,39),xu=F(37,39),On=F(90,39),Pu=F(90,39),vu=F(40,49),Tu=F(41,49),Cu=F(42,49),Ru=F(43,49),Au=F(44,49),Su=F(45,49),Ou=F(46,49),ku=F(47,49);c();m();p();d();f();l();var ns=100,kn=["green","yellow","blue","magenta","cyan","red"],_t=[],Mn=Date.now(),is=0,vr=typeof h<"u"?h.env:{};globalThis.DEBUG??=vr.DEBUG??"";globalThis.DEBUG_COLORS??=vr.DEBUG_COLORS?vr.DEBUG_COLORS==="true":!0;var rt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function os(e){let t={color:kn[is++%kn.length],enabled:rt.enabled(e),namespace:e,log:rt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&_t.push([o,...n]),_t.length>ns&&_t.shift(),rt.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:ss(T)),g=`+${Date.now()-Mn}ms`;Mn=Date.now(),a(o,...u,g)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Tr=new Proxy(os,{get:(e,t)=>rt[t],set:(e,t,r)=>rt[t]=r});function ss(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function In(){_t.length=0}var ee=Tr;c();m();p();d();f();l();c();m();p();d();f();l();var Cr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];c();m();p();d();f();l();var Dn="library";function it(e){let t=ms();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Dn)}function ms(){let e=h.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}c();m();p();d();f();l();c();m();p();d();f();l();var Dt;(t=>{let e;(_=>(_.findUnique="findUnique",_.findUniqueOrThrow="findUniqueOrThrow",_.findFirst="findFirst",_.findFirstOrThrow="findFirstOrThrow",_.findMany="findMany",_.create="create",_.createMany="createMany",_.createManyAndReturn="createManyAndReturn",_.update="update",_.updateMany="updateMany",_.updateManyAndReturn="updateManyAndReturn",_.upsert="upsert",_.delete="delete",_.deleteMany="deleteMany",_.groupBy="groupBy",_.count="count",_.aggregate="aggregate",_.findRaw="findRaw",_.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Dt||={});var st={};St(st,{error:()=>fs,info:()=>ds,log:()=>ps,query:()=>gs,should:()=>qn,tags:()=>ot,warn:()=>Rr});c();m();p();d();f();l();var ot={error:Ne("prisma:error"),warn:Rn("prisma:warn"),info:Sn("prisma:info"),query:An("prisma:query")},qn={warn:()=>!h.env.PRISMA_DISABLE_WARNINGS};function ps(...e){console.log(...e)}function Rr(e,...t){qn.warn()&&console.warn(`${ot.warn} ${e}`,...t)}function ds(e,...t){console.info(`${ot.info} ${e}`,...t)}function fs(e,...t){console.error(`${ot.error} ${e}`,...t)}function gs(e,...t){console.log(`${ot.query} ${e}`,...t)}c();m();p();d();f();l();function Nt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}c();m();p();d();f();l();function we(e,t){throw new Error(t)}c();m();p();d();f();l();function Ar(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var Sr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});c();m();p();d();f();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();m();p();d();f();l();function Or(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Qn.has(e)||(Qn.add(e),Rr(t,...r))};var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};te(I,"PrismaClientInitializationError");c();m();p();d();f();l();var Y=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};te(Y,"PrismaClientKnownRequestError");c();m();p();d();f();l();var Ee=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};te(Ee,"PrismaClientRustPanicError");c();m();p();d();f();l();var Q=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};te(Q,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};te(G,"PrismaClientValidationError");c();m();p();d();f();l();l();function qe(e){return e===null?e:Array.isArray(e)?e.map(qe):typeof e=="object"?ys(e)?bs(e):Ue(e,qe):e}function ys(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function bs({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ce(t);case"Json":return JSON.parse(t);default:we(t,"Unknown tagged value")}}c();m();p();d();f();l();c();m();p();d();f();l();function Be(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();function $e(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Ut(e){return e.toString()!=="Invalid Date"}c();m();p();d();f();l();l();function Ve(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();m();p();d();f();l();c();m();p();d();f();l();var ws=_e(Un());var Es={red:Ne,gray:On,dim:Lt,bold:It,underline:Tn,highlightSource:e=>e.highlight()},xs={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ps({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function vs({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Ts(t))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Ts(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function qt(e){let t=e.showColors?Es:xs,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ps(e),vs(r,t)}c();m();p();d();f();l();var Xn=_e(kr());c();m();p();d();f();l();function Hn(e,t,r){let n=zn(e),i=Cs(n),o=As(i);o?Bt(o,t,r):t.addErrorMessage(()=>"Unknown error")}function zn(e){return e.errors.flatMap(t=>t.kind==="Union"?zn(t):[t])}function Cs(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Rs(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Rs(e,t){return[...new Set(e.concat(t))]}function As(e){return Or(e,(t,r)=>{let n=Wn(t),i=Wn(r);return n!==i?n-i:Kn(t)-Kn(r)})}function Wn(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Kn(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();m();p();d();f();l();var re=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();m();p();d();f();l();c();m();p();d();f();l();var je=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};c();m();p();d();f();l();c();m();p();d();f();l();var $t=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();m();p();d();f();l();var Vt=e=>e,jt={bold:Vt,red:Vt,green:Vt,dim:Vt,enabled:!1},Yn={bold:It,red:Ne,green:Cn,dim:Lt,enabled:!0},Qe={write(e){e.writeLine(",")}};c();m();p();d();f();l();var me=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();m();p();d();f();l();var ve=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Je=class extends ve{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new $t(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new me("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Qe,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ge=class e extends ve{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Je&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new me("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Qe,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();m();p();d();f();l();var J=class extends ve{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new me(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();m();p();d();f();l();var lt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Qe,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Bt(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Os(e,t);break;case"IncludeOnScalar":ks(e,t);break;case"EmptySelection":Ms(e,t,r);break;case"UnknownSelectionField":Ds(e,t);break;case"InvalidSelectionValue":Fs(e,t);break;case"UnknownArgument":Ns(e,t);break;case"UnknownInputField":Us(e,t);break;case"RequiredArgumentMissing":qs(e,t);break;case"InvalidArgumentType":Bs(e,t);break;case"InvalidArgumentValue":$s(e,t);break;case"ValueTooLarge":Vs(e,t);break;case"SomeFieldsMissing":js(e,t);break;case"TooManyFieldsGiven":Qs(e,t);break;case"Union":Hn(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Os(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ks(e,t){let[r,n]=ut(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new re(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ct(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ms(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Is(e,t,i);return}if(n.hasField("select")){Ls(e,t);return}}if(r?.[Be(e.outputType.name)]){_s(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Is(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new re(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ls(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ti(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ct(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function _s(e,t){let r=new lt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new re("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ut(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new Ge;u.addSuggestion(n),a.value=u}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ds(e,t){let r=ri(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":ti(n,e.outputType);break;case"include":Js(n,e.outputType);break;case"omit":Gs(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ct(n)),i.join(" ")})}function Fs(e,t){let r=ri(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ns(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ws(n,e.arguments)),t.addErrorMessage(i=>Zn(i,r,e.arguments.map(o=>o.name)))}function Us(e,t){let[r,n]=ut(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ni(o,e.inputType)}t.addErrorMessage(o=>Zn(o,n,e.inputType.fields.map(s=>s.name)))}function Zn(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Hs(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ct(e)),n.join(" ")}function qs(e,t){let r;t.addErrorMessage(u=>r?.value instanceof J&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ut(e.argumentPath),s=new lt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new re(o,s).makeRequired())}else{let u=e.inputTypes.map(ei).join(" | ");a.addSuggestion(new re(o,u).makeRequired())}}function ei(e){return e.kind==="list"?`${ei(e.elementType)}[]`:e.name}function Bs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Qt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function $s(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Qt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Vs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof J&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function js(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ni(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Qt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ct(i)),o.join(" ")})}function Qs(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Qt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ti(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,"true"))}function Js(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new re(r.name,"true"))}function Gs(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new re(r.name,"true"))}function Ws(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function ri(e,t){let[r,n]=ut(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),u=o?.getField(n);return o&&u?{parentKind:"select",parent:o,field:u,fieldName:n}:(u=s?.getField(n),s&&u?{parentKind:"include",field:u,parent:s,fieldName:n}:(u=a?.getField(n),a&&u?{parentKind:"omit",field:u,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ni(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function ut(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ct({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Qt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ks=3;function Hs(e,t){let r=1/0,n;for(let i of t){let o=(0,Xn.default)(e,i);o>Ks||o`}};function We(e){return e instanceof mt}c();m();p();d();f();l();var Jt=Symbol(),Mr=new WeakMap,xe=class{constructor(t){t===Jt?Mr.set(this,`Prisma.${this._getName()}`):Mr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mr.get(this)}},pt=class extends xe{_getNamespace(){return"NullTypes"}},dt=class extends pt{};Ir(dt,"DbNull");var ft=class extends pt{};Ir(ft,"JsonNull");var gt=class extends pt{};Ir(gt,"AnyNull");var Gt={classes:{DbNull:dt,JsonNull:ft,AnyNull:gt},instances:{DbNull:new dt(Jt),JsonNull:new ft(Jt),AnyNull:new gt(Jt)}};function Ir(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();var oi=": ",Wt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+oi.length}write(t){let r=new me(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(oi).write(this.value)}};var Lr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ke(e){return new Lr(si(e))}function si(e){let t=new Ge;for(let[r,n]of Object.entries(e)){let i=new Wt(r,ai(n));t.addField(i)}return t}function ai(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(Ve(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return b.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Ut(e)?e.toISOString():"Invalid Date";return new J(`new Date("${t}")`)}return e instanceof xe?new J(`Prisma.${e._getName()}`):We(e)?new J(`prisma.${ii(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?zs(e):typeof e=="object"?si(e):new J(Object.prototype.toString.call(e))}function zs(e){let t=new Je;for(let r of e)t.addItem(ai(r));return t}function Kt(e,t){let r=t==="pretty"?Yn:jt,n=e.renderAllMessages(r),i=new je(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ht({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ke(e);for(let C of t)Bt(C,a,s);let{message:u,args:g}=Kt(a,r),T=qt({message:u,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new G(T,{clientVersion:o})}c();m();p();d();f();l();c();m();p();d();f();l();var pe=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();m();p();d();f();l();function ht(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();m();p();d();f();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}c();m();p();d();f();l();function ui(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ys({...e,...li(t.name,e,t.result.$allModels),...li(t.name,e,t.result[n])})}function Ys(e){let t=new pe,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function li(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Xs(t,o,i)})):{}}function Xs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ci(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function mi(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var zt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new pe;this.modelExtensionsCache=new pe;this.queryCallbacksCache=new pe;this.clientExtensions=ht(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=ht(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ui(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},He=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new zt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new zt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();m();p();d();f();l();c();m();p();d();f();l();var pi=Symbol(),yt=class{constructor(t){if(t!==pi)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Yt:t}},Yt=new yt(pi);function fe(e){return e instanceof yt}var Zs={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},di="explicitly `undefined` values are not allowed";function Xt({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=He.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T}){let C=new _r({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T});return{modelName:e,action:Zs[t],query:bt(r,C)}}function bt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:gi(r,n),selection:ea(e,t,i,n)}}function ea(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ia(e,n)):ta(n,t,r)}function ta(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ra(n,t,e),na(n,r,e),n}function ra(e,t,r){for(let[n,i]of Object.entries(t)){if(fe(i))continue;let o=r.nestSelection(n);if(Dr(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=bt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=bt(i,o)}}function na(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=mi(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Dr(a,r.nestSelection(s));let u=r.findField(s);n?.[s]&&!u||(e[s]=!a)}}function ia(e,t){let r={},n=t.getComputedFields(),i=ci(e,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=t.nestSelection(o);Dr(s,a);let u=t.findField(o);if(!(n?.[o]&&!u)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){u?.kind==="object"?r[o]=bt({},a):r[o]=!0;continue}r[o]=bt(s,a)}}return r}function fi(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if($e(e)){if(Ut(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(We(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return oa(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if(sa(e))return e.values;if(Ve(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof xe){if(e!==Gt.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(aa(e))return e.toJSON();if(typeof e=="object")return gi(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function gi(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);fe(i)||(i!==void 0?r[n]=fi(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:di}))}return r}function oa(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Be(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:we(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();m();p();d();f();l();var ze=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};c();m();p();d();f();l();function hi(e){return{models:Fr(e.models),enums:Fr(e.enums),types:Fr(e.types)}}function Fr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function yi(e,t){let r=ht(()=>la(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function la(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Nr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ur=new WeakMap,Zt="$$PrismaTypedSql",qr=class{constructor(t,r){Ur.set(this,{sql:t,values:r}),Object.defineProperty(this,Zt,{value:Zt})}get sql(){return Ur.get(this).sql}get values(){return Ur.get(this).values}};function bi(e){return(...t)=>new qr(e,t)}function wi(e){return e!=null&&e[Zt]===Zt}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();function wt(e){return{ok:!1,error:e,map(){return wt(e)},flatMap(){return wt(e)}}}var Br=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},$r=e=>{let t=new Br,r=ge(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:ge(t,e.queryRaw.bind(e)),executeRaw:ge(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ua(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ma(t,e.getConnectionInfo.bind(e))),n},ua=(e,t)=>{let r=ge(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>ca(e,o))}},ca=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),commit:ge(e,t.commit.bind(t)),rollback:ge(e,t.rollback.bind(t))});function ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return wt({kind:"GenericJs",id:i})}}}function ma(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return wt({kind:"GenericJs",id:i})}}}var Mo=_e(Ei());var IO=_e(xi());Fn();wn();_n();c();m();p();d();f();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();m();p();d();f();l();c();m();p();d();f();l();var er={enumerable:!0,configurable:!0,writable:!0};function tr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>er,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ti=Symbol.for("nodejs.util.inspect.custom");function he(e,t){let r=da(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ci(Reflect.ownKeys(o),r),a=Ci(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...er,...u?.getPropertyDescriptor(s)}:er:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ti]=function(){let o={...this};return delete o[Ti],o},i}function da(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ci(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function Ye(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function rr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();function Ri(e){if(e===void 0)return"";let t=Ke(e);return new je(0,{colors:jt}).write(t).toString()}c();m();p();d();f();l();var fa="P2037";function nr({error:e,user_facing_error:t},r,n){return t.error_code?new Y(ga(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Q(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ga(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===fa&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Qr=class{getLocation(){return null}};function Te(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qr}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Ai={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Xe(e={}){let t=ya(e);return Object.entries(t).reduce((n,[i,o])=>(Ai[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ya(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Si(e,t){let r=ir(e);return t({action:"aggregate",unpacker:r,argsMapper:Xe})(e)}c();m();p();d();f();l();function ba(e={}){let{select:t,...r}=e;return typeof t=="object"?Xe({...r,_count:t}):Xe({...r,_count:{_all:!0}})}function wa(e={}){return typeof e.select=="object"?t=>ir(e)(t)._count:t=>ir(e)(t)._count._all}function Oi(e,t){return t({action:"count",unpacker:wa(e),argsMapper:ba})(e)}c();m();p();d();f();l();function Ea(e={}){let t=Xe(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function xa(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ki(e,t){return t({action:"groupBy",unpacker:xa(e),argsMapper:Ea})(e)}function Mi(e,t,r){if(t==="aggregate")return n=>Si(n,r);if(t==="count")return n=>Oi(n,r);if(t==="groupBy")return n=>ki(n,r)}c();m();p();d();f();l();function Ii(e,t){let r=t.fields.filter(i=>!i.relationName),n=Sr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...tr(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var Li=e=>Array.isArray(e)?e:e.split("."),Jr=(e,t)=>Li(t).reduce((r,n)=>r&&r[n],e),_i=(e,t,r)=>Li(t).reduceRight((n,i,o,s)=>Object.assign({},Jr(e,s.slice(0,o)),{[i]:n}),r);function Pa(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function va(e,t,r){return t===void 0?e??{}:_i(t,r,e||!0)}function Gr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,g)=>({...u,[g.name]:g}),{});return u=>{let g=Te(e._errorFormat),T=Pa(n,i),C=va(u,o,T),O=r({dataPath:T,callsite:g})(C),A=Ta(e,t);return new Proxy(O,{get(k,S){if(!A.includes(S))return k[S];let ie=[a[S].type,r,S],K=[T,C];return Gr(e,...ie,...K)},...tr([...A,...Object.getOwnPropertyNames(O)])})}}function Ta(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Ca=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Ra=["aggregate","count","groupBy"];function Wr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Aa(e,t),Oa(e,t),Et(r),W("name",()=>t),W("$name",()=>t),W("$parent",()=>e._appliedParent)];return he({},n)}function Aa(e,t){let r=de(t),n=Object.keys(Dt.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>u=>{let g=Te(e._errorFormat);return e._createPrismaPromise(T=>{let C={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:T,callsite:g};return e._request({...C,...a})})};return Ca.includes(o)?Gr(e,t,s):Sa(i)?Mi(e,i,s):s({})}}}function Sa(e){return Ra.includes(e)}function Oa(e,t){return ke(W("fields",()=>{let r=e._runtimeDataModel.models[t];return Ii(t,r)}))}c();m();p();d();f();l();function Di(e){return e.replace(/^./,t=>t.toUpperCase())}var Kr=Symbol();function xt(e){let t=[ka(e),W(Kr,()=>e),W("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Et(r)),he(e,t)}function ka(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return ke({getKeys(){return n},getPropertyValue(i){let o=Di(i);if(e._runtimeDataModel.models[o]!==void 0)return Wr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fi(e){return e[Kr]?e[Kr]:e}function Ni(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return xt(t)}c();m();p();d();f();l();c();m();p();d();f();l();function Ui({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let g=u.needs.filter(T=>n[T]);g.length>0&&a.push(Ye(g))}else if(r){if(!r[u.name])continue;let g=u.needs.filter(T=>!r[T]);g.length>0&&a.push(Ye(g))}Ma(e,u.needs)&&s.push(Ia(u,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Ma(e,t){return t.every(r=>Ar(e,r))}function Ia(e,t){return ke(W(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function or({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sT.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let g=typeof s=="object"?s:{};t[o]=or({visitor:i,result:t[o],args:g,modelName:u.type,runtimeDataModel:n})}}function Bi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:or({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,g)=>{let T=de(u);return Ui({result:a,modelName:T,select:g.select,omit:g.select?void 0:{...o?.[T],...g.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function $i(e){if(e instanceof X)return La(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$i(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(o,u),a.args=s,ji(e,a,r,n+1)}})})}function Qi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ji(e,t,s)}function Ji(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Gi(r,n,0,e):e(r)}}function Gi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(i,u),Gi(a,t,r+1,n)}})}var Vi=e=>e;function Wi(e=Vi,t=Vi){return r=>e(t(r))}c();m();p();d();f();l();var Ki=ee("prisma:client"),Hi={Vercel:"vercel","Netlify CI":"netlify"};function zi({postinstall:e,ciName:t,clientVersion:r}){if(Ki("checkPlatformCaching:postinstall",e),Ki("checkPlatformCaching:ciName",t),e===!0&&t&&t in Hi){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Hi[t]}-build`;throw console.error(n),new I(n,r)}}c();m();p();d();f();l();function Yi(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var _a="Cloudflare-Workers",Da="node";function Xi(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===_a?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Da?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Fa={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ce(){let e=Xi();return{id:e,prettyName:Fa[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function sr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ce().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Zi(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Hr,eo={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ce().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Hr===void 0&&(Hr=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},u=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(u.exports),o.QueryEngine})());let i=await Hr;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Na="P2036",ye=ee("prisma:client:libraryEngine");function Ua(e){return e.item_type==="query"&&"query"in e}function qa(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var xR=[...Cr,"native"],Ba=0xffffffffffffffffn,zr=1n;function $a(){let e=zr++;return zr>Ba&&(zr=1n),e}var vt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??eo,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t)}}withRequestId(t){return async(...r)=>{let n=$a().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(Va(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Y(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(ye("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&ye("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:h.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Ua(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(qa(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ye(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{ye("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,ye("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ye("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),ye("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,ye("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){ye(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new Q(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){ye("requestBatch");let i=rr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Zi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new Q(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0]):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:nr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Na&&this.config.adapter){let r=t.meta?.id;Nt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Nt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Va(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var Tt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",ar=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(Tt,this.config.clientVersion)}metrics(t){throw new I(Tt,this.config.clientVersion)}request(t,r){throw new I(Tt,this.config.clientVersion)}requestBatch(t,r){throw new I(Tt,this.config.clientVersion)}applyPendingMigrations(){throw new I(Tt,this.config.clientVersion)}};function to({copyEngine:e=!0},t){let r;try{r=sr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...h.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&at("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=it(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",u=i==="binary";if(o&&s||s&&!1){let g;throw e?r?.startsWith("prisma://")?g=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:g=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:g=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new G(g.join(` -`),{clientVersion:t.clientVersion})}if(s)return new vt(t);if(o)return new ar(t);{let g=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ce().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new G(g.join(` -`),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function lr({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();var ro=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var no=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function Ze(e){try{return io(e,"fast")}catch{return io(e,"slow")}}function io(e,t){return JSON.stringify(e.map(r=>so(r,t)))}function so(e,t){if(Array.isArray(e))return e.map(r=>so(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if($e(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ce.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(b.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(ja(e))return{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?ao(e):e}function ja(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ao(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(oo);let t={};for(let r of Object.keys(e))t[r]=oo(e[r]);return t}function oo(e){return typeof e=="bigint"?e.toString():ao(e)}c();m();p();d();f();l();var Qa=["$connect","$disconnect","$on","$transaction","$use","$extends"],lo=Qa;var Ja=/^(\s*alter\s)/i,uo=ee("prisma:client");function Yr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ja.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Xr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(wi(r))n=r.sql,i={values:Ze(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ze(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ze(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ze(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=no(r),i={values:Ze(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?uo(`prisma.${e}(${n}, ${i.values})`):uo(`prisma.${e}(${n})`),{query:n,parameters:i}},co={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},mo={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function Zr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=po(r(o)):po(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function po(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var Ga={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},en=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Ga}};function fo(){return new en}c();m();p();d();f();l();function go(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();m();p();d();f();l();function ho(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();m();p();d();f();l();var ur=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();m();p();d();f();l();var bo=_e(jn());c();m();p();d();f();l();function cr(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();function yo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(tn(e.query.arguments)),t.push(tn(e.query.selection)),t.join("")}function tn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${tn(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Wa={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function rn(e){return Wa[e]}c();m();p();d();f();l();var mr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,h.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iMe("bigint",r));case"bytes-array":return t.map(r=>Me("bytes",r));case"decimal-array":return t.map(r=>Me("decimal",r));case"datetime-array":return t.map(r=>Me("datetime",r));case"date-array":return t.map(r=>Me("date",r));case"time-array":return t.map(r=>Me("time",r));default:return t}}function pr(e){let t=[],r=Ka(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),g=n.some(C=>rn(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:za(o),containsWrite:g,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?wo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:rn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return h.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ha(t),Ya(t,i))throw t;if(t instanceof Y&&Xa(t)){let g=Eo(t.meta);Ht({args:o,errors:[g],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=qt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let g=s?{modelName:s,...t.meta}:t.meta;throw new Y(u,{code:t.code,clientVersion:this.client._clientVersion,meta:g,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ee(u,this.client._clientVersion);if(t instanceof Q)throw new Q(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(u,this.client._clientVersion);if(t instanceof Ee)throw new Ee(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,bo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(g=>g!=="select"&&g!=="include"),a=Jr(o,s),u=i==="queryRaw"?pr(a):qe(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function za(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:wo(e)};we(e,"Unknown transaction kind")}}function wo(e){return{id:e.id,payload:e.payload}}function Ya(e,t){return cr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Xa(e){return e.code==="P2009"||e.code==="P2012"}function Eo(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Eo)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var xo="6.2.1";var Po=xo;c();m();p();d();f();l();var Ao=_e(kr());c();m();p();d();f();l();var L=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};te(L,"PrismaClientConstructorValidationError");var vo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],To=["pretty","colorless","minimal"],Co=["info","query","warn","error"],el={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=et(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new L(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new L(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!lr(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(it()==="binary")throw new L('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!To.includes(e)){let t=et(e,To);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Co.includes(r)){let n=et(r,Co);throw new L(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=et(i,o);throw new L(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new L(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new L(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new L(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=rl(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let u=o.fields.find(g=>g.name===s);if(!u){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(u.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new L(nl(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=et(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function So(e,t){for(let[r,n]of Object.entries(e)){if(!vo.includes(r)){let i=et(r,vo);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}el[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function et(e,t){if(t.length===0||typeof e!="string")return"";let r=tl(e,t);return r?` Did you mean "${r}"?`:""}function tl(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ao.default)(e,i)}));r.sort((i,o)=>i.distanceBe(n)===t);if(r)return e[r]}function nl(e,t){let r=Ke(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Kt(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}c();m();p();d();f();l();function Oo(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=g=>{o||(o=!0,r(g))};for(let g=0;g{n[g]=T,a()},T=>{if(!cr(T)){u(T);return}T.batchRequestIdx===g?u(T):(i||(i=T),a())})})}var Re=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var il={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ol=Symbol.for("prisma.client.transaction.id"),sl={id:0,nextId(){return++this.id}};function Io(e){class t{constructor(n){this._originalClient=this;this._middlewares=new ur;this._createPrismaPromise=Zr();this.$extends=Ni;e=n?.__internal?.configOverride?.(e)??e,zi(e),n&&So(n,e);let i=new Ft().on("error",()=>{});this._extensions=He.empty(),this._previewFeatures=lr(e),this._clientVersion=e.clientVersion??Po,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=fo();let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&nt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&nt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=$r(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${u}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let u=n??{},g=u.__internal??{},T=g.debug===!0;T&&ee.enable("prisma:client");let C=nt.resolve(e.dirname,e.relativePath);bn.existsSync(C)||(C=e.dirname),Re("dirname",e.dirname),Re("relativePath",e.relativePath),Re("cwd",C);let O=g.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:h.env.NODE_ENV==="production"?this._errorFormat="minimal":h.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:nt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&ho(u.log),logQueries:u.log&&!!(typeof u.log=="string"?u.log==="query":u.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Yi(u,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:u.transactionOptions?.maxWait??2e3,timeout:u.transactionOptions?.timeout??5e3,isolationLevel:u.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:sr,getBatchRequestPayload:rr,prismaGraphQLToJSError:nr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Y,debug:ee("prisma:client:accelerateEngine"),engineVersion:Mo.version,clientVersion:e.clientVersion}},Re("clientVersion",e.clientVersion),this._engine=to(e,this._engineConfig),this._requestHandler=new dr(this,i),u.log)for(let A of u.log){let k=typeof A=="string"?A:A.emit==="stdout"?A.level:null;k&&this.$on(k,S=>{st.log(`${st.tags[k]??""}`,S.message||S.query)})}this._metrics=new ze(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}return this._appliedParent=xt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{In()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ko(n,i);return Yr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Yr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ro,callsite:Te(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ko(n,i));throw new G("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new G("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=sl.nextId(),s=go(n.length),a=n.map((u,g)=>{if(u?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:g,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return Oo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let g={kind:"itx",...a};u=await n(this._createItxClient(g)),await this._engine.transaction("commit",o,a)}catch(g){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),g}return u}_createItxClient(n){return xt(he(Fi(this),[W("_appliedParent",()=>this._appliedParent._createItxClient(n)),W("_createPrismaPromise",()=>Zr(n)),W(ol,()=>n.id),Ye(lo)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??il,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,M=>T(g,ie=>(M?.end(),u(ie))));let{runInTransaction:C,args:O,...A}=g,k={...n,...A};O&&(k.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete k.transaction;let S=await Qi(this,k);return k.model?Bi({result:S,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:g,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=g?g(n):n;let k={name:"serialize"},S=this._tracingHelper.runInChildSpan(k,()=>Xt({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(Re("Prisma Client call:"),Re(`prisma.${i}(${Ri(n)})`),Re("Generated request:"),Re(JSON.stringify(S,null,2)+` -`)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(k){throw k.clientVersion=this._clientVersion,k}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new G("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ko(e,t){return al(e)?[new X(e,t),co]:[e,mo]}function al(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var ll=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Lo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ll.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();m();p();d();f();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm.js.map diff --git a/charybdis/local-prisma/local-prisma-client/schema.prisma b/charybdis/local-prisma/local-prisma-client/schema.prisma deleted file mode 100644 index 5b0b98e5..00000000 --- a/charybdis/local-prisma/local-prisma-client/schema.prisma +++ /dev/null @@ -1,45 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? -// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init - -generator client { - provider = "prisma-client-js" - output = "local-prisma-client" -} - -datasource db { - provider = "postgresql" - url = env("LOCAL_DATABASE_URL") -} - -model run { - id String @id @default(uuid()) - runId Int @default(autoincrement()) - driverName String - notes String - time DateTime @db.Timestamptz() - - data data[] -} - -model data { - values Float[] - time DateTime @db.Timestamptz() - - dataTypeName String - dataType data_type @relation(fields: [dataTypeName], references: [name]) - runId String - run run @relation(fields: [runId], references: [id]) - - @@id([time, dataTypeName]) -} - -model data_type { - name String @id - unit String - nodeName String - - data data[] -} diff --git a/charybdis/local-prisma/local-prisma-client/wasm.d.ts b/charybdis/local-prisma/local-prisma-client/wasm.d.ts deleted file mode 100644 index bc20c6c1..00000000 --- a/charybdis/local-prisma/local-prisma-client/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/charybdis/local-prisma/local-prisma-client/wasm.js b/charybdis/local-prisma/local-prisma-client/wasm.js deleted file mode 100644 index 0d417148..00000000 --- a/charybdis/local-prisma/local-prisma-client/wasm.js +++ /dev/null @@ -1,187 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.2.1 - * Query Engine version: 4123509d24aa4dede1e864b46351bf2790323b69 - */ -Prisma.prismaVersion = { - client: "6.2.1", - engine: "4123509d24aa4dede1e864b46351bf2790323b69" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.RunScalarFieldEnum = { - id: 'id', - runId: 'runId', - driverName: 'driverName', - notes: 'notes', - time: 'time' -}; - -exports.Prisma.DataScalarFieldEnum = { - values: 'values', - time: 'time', - dataTypeName: 'dataTypeName', - runId: 'runId' -}; - -exports.Prisma.Data_typeScalarFieldEnum = { - name: 'name', - unit: 'unit', - nodeName: 'nodeName' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - - -exports.Prisma.ModelName = { - run: 'run', - data: 'data', - data_type: 'data_type' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma)