diff --git a/packages/desktop/.electron-builder.config.js b/packages/desktop/.electron-builder.config.js index 4fa52b9..6769757 100644 --- a/packages/desktop/.electron-builder.config.js +++ b/packages/desktop/.electron-builder.config.js @@ -5,13 +5,12 @@ const pkg = require('./package.json') const electronVersion = pkg.devDependencies.electron.replaceAll('^', '') -const isDev = process.env.NODE_ENV === 'development' module.exports = { appId: 'app.r3play', productName: pkg.productName, copyright: 'Copyright © 2022 qier222', - asar: isDev ? true : false, + asar: true, directories: { output: 'release', buildResources: 'build', diff --git a/packages/desktop/main/appServer/appServer.ts b/packages/desktop/main/appServer/appServer.ts index 775fbe7..70e6a29 100644 --- a/packages/desktop/main/appServer/appServer.ts +++ b/packages/desktop/main/appServer/appServer.ts @@ -9,27 +9,32 @@ import netease from './routes/netease/netease' import appleMusic from './routes/r3play/appleMusic' import audio from './routes/r3play/audio' -const server = fastify({ - ignoreTrailingSlash: true, -}) - -server.register(fastifyCookie) -server.register(fastifyMultipart) -if (isProd) { - server.register(fastifyStatic, { - root: path.join(__dirname, '../web'), +const initAppServer = async () => { + const server = fastify({ + ignoreTrailingSlash: true, }) + + server.register(fastifyCookie) + server.register(fastifyMultipart) + if (isProd) { + server.register(fastifyStatic, { + root: path.join(__dirname, '../web'), + }) + } + + server.register(netease) + server.register(audio) + server.register(appleMusic) + + const port = Number( + isProd + ? process.env.ELECTRON_WEB_SERVER_PORT || 42710 + : process.env.ELECTRON_DEV_NETEASE_API_PORT || 30001 + ) + await server.listen({ port }) + log.info(`[appServer] http server listening on port ${port}`) + + return server } -server.register(netease) -server.register(audio) -server.register(appleMusic) - -const port = Number( - isProd - ? process.env.ELECTRON_WEB_SERVER_PORT || 42710 - : process.env.ELECTRON_DEV_NETEASE_API_PORT || 30001 -) -server.listen({ port }) - -log.info(`[appServer] http server listening on port ${port}`) +export default initAppServer diff --git a/packages/desktop/main/appServer/routes/netease/netease.ts b/packages/desktop/main/appServer/routes/netease/netease.ts index 5f734ad..e14b17e 100644 --- a/packages/desktop/main/appServer/routes/netease/netease.ts +++ b/packages/desktop/main/appServer/routes/netease/netease.ts @@ -11,7 +11,8 @@ async function netease(fastify: FastifyInstance) { req: FastifyRequest<{ Querystring: { [key: string]: string } }>, reply: FastifyReply ) => { - // // Get track details from cache + console.log(req.routerPath) + // Get track details from cache if (name === CacheAPIs.Track) { const cacheData = await cache.get(name, req.query as any) if (cacheData) { diff --git a/packages/desktop/main/index.ts b/packages/desktop/main/index.ts index a1132bb..c53bf93 100644 --- a/packages/desktop/main/index.ts +++ b/packages/desktop/main/index.ts @@ -11,7 +11,8 @@ import { createTaskbar, Thumbar } from './windowsTaskbar' import { createMenu } from './menu' import { isDev, isWindows, isLinux, isMac, appName } from './env' import store from './store' -import './appServer/appServer' +import initAppServer from './appServer/appServer' +import { initDatabase } from './prisma' class Main { win: BrowserWindow | null = null @@ -32,8 +33,10 @@ class Main { process.exit(0) } - app.whenReady().then(() => { + app.whenReady().then(async () => { log.info('[index] App ready') + await initDatabase() + await initAppServer() this.createWindow() this.handleAppEvents() this.handleWindowEvents() diff --git a/packages/desktop/main/prisma.ts b/packages/desktop/main/prisma.ts index ee67cb4..73c771b 100644 --- a/packages/desktop/main/prisma.ts +++ b/packages/desktop/main/prisma.ts @@ -1,13 +1,15 @@ import { app } from 'electron' import path from 'path' import { PrismaClient } from '../prisma/client' -import { isDev } from './env' +import { isDev, isWindows } from './env' import log from './log' import { createFileIfNotExist, dirname, isFileExist } from './utils' import fs from 'fs' +import { dialog } from 'electron' export const dbPath = path.join(app.getPath('userData'), 'r3play.db') -export const dbUrl = 'file://' + dbPath +export const dbUrl = 'file:' + (isWindows ? '' : '//') + dbPath +log.info('[prisma] dbUrl', dbUrl) const extraResourcesPath = app.getAppPath().replace('app.asar', '') // impacted by extraResources setting in electron-builder.yml function getPlatformName(): string { @@ -49,16 +51,9 @@ log.info('[prisma] dbUrl', dbUrl) // the dbUrl into the prisma client constructor in datasources.db.url process.env.DATABASE_URL = dbUrl -const isInitialized = isFileExist(dbPath) -if (!isInitialized) { - const from = isDev ? path.join(dirname, './prisma/r3play.db') : path.join(dirname, './r3play.db') - log.info(`[prisma] copy r3play.db file from ${from} to ${dbPath}`) - fs.copyFileSync(from, dbPath) - log.info('[prisma] Database tables initialized.') -} else { - log.info('[prisma] Database tables already initialized before.') -} +createFileIfNotExist(dbPath) +// @ts-expect-error let prisma: PrismaClient = null try { prisma = new PrismaClient({ @@ -79,6 +74,29 @@ try { log.info('[prisma] prisma initialized') } catch (e) { log.error('[prisma] failed to init prisma', e) + dialog.showErrorBox('Failed to init prisma', String(e)) + app.exit() +} + +export const initDatabase = async () => { + try { + const initSQLFile = fs + .readFileSync(path.join(dirname, 'migrations/init.sql'), 'utf-8') + .toString() + const tables = initSQLFile.split(';') + await Promise.all( + tables.map(sql => { + if (!sql.trim()) return + return prisma.$executeRawUnsafe(sql.trim()).catch(() => { + log.error('[prisma] failed to execute init sql >>> ', sql.trim()) + }) + }) + ) + } catch (e) { + dialog.showErrorBox('Failed to init prisma database', String(e)) + app.exit() + } + log.info('[prisma] database initialized') } export default prisma diff --git a/packages/desktop/migrations/init.sql b/packages/desktop/migrations/init.sql index e65b929..c4a5a54 100644 --- a/packages/desktop/migrations/init.sql +++ b/packages/desktop/migrations/init.sql @@ -1,58 +1,51 @@ --- CreateTable -CREATE TABLE "AccountData" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "AccountData" ( "id" TEXT NOT NULL PRIMARY KEY, "json" TEXT NOT NULL, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "AppData" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "AppData" ( "id" TEXT NOT NULL PRIMARY KEY, "value" TEXT NOT NULL ); --- CreateTable -CREATE TABLE "Track" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Track" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "Album" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Album" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "Artist" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Artist" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "ArtistAlbum" IF NOT EXISTS ( + +CREATE TABLE IF NOT EXISTS "ArtistAlbum" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "hotAlbums" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "Playlist" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Playlist" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "Audio" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Audio" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "bitRate" INTEGER NOT NULL, "format" TEXT NOT NULL, @@ -62,59 +55,23 @@ CREATE TABLE "Audio" IF NOT EXISTS ( "queriedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ); --- CreateTable -CREATE TABLE "Lyrics" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "Lyrics" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "AppleMusicAlbum" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "AppleMusicAlbum" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); --- CreateTable -CREATE TABLE "AppleMusicArtist" IF NOT EXISTS ( +CREATE TABLE IF NOT EXISTS "AppleMusicArtist" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "json" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "AccountData_id_key" ON "AccountData"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "AppData_id_key" ON "AppData"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Track_id_key" ON "Track"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Album_id_key" ON "Album"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Artist_id_key" ON "Artist"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "ArtistAlbum_id_key" ON "ArtistAlbum"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Playlist_id_key" ON "Playlist"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Audio_id_key" ON "Audio"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "Lyrics_id_key" ON "Lyrics"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "AppleMusicAlbum_id_key" ON "AppleMusicAlbum"("id"); - --- CreateIndex -CREATE UNIQUE INDEX IF NOT EXISTS "AppleMusicArtist_id_key" ON "AppleMusicArtist"("id"); diff --git a/packages/desktop/package.json b/packages/desktop/package.json index f38b128..7dcae2f 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -6,7 +6,7 @@ "main": "./main/index.js", "author": "*", "scripts": { - "post-install": "tsx scripts/build.sqlite3.ts", + "postinstall": "prisma generate", "dev": "tsx scripts/build.main.ts --watch", "build": "tsx scripts/build.main.ts", "pack": "electron-builder build -c .electron-builder.config.js", @@ -25,6 +25,7 @@ "@fastify/cookie": "^8.3.0", "@fastify/http-proxy": "^8.4.0", "@fastify/multipart": "^7.4.0", + "@fastify/static": "^6.6.1", "@prisma/client": "^4.8.1", "@prisma/engines": "^4.9.0", "@sentry/electron": "^3.0.7", @@ -35,6 +36,7 @@ "electron-log": "^4.4.8", "electron-store": "^8.1.0", "fast-folder-size": "^1.7.1", + "fastify": "^4.5.3", "pretty-bytes": "^6.0.0", "prisma": "^4.8.1", "ytdl-core": "^4.11.2" @@ -44,7 +46,7 @@ "axios": "^1.2.1", "cross-env": "^7.0.3", "dotenv": "^16.0.3", - "electron": "^22.0.0", + "electron": "^22.1.0", "electron-builder": "23.6.0", "electron-devtools-installer": "^3.2.0", "electron-rebuild": "^3.2.9", diff --git a/packages/desktop/prisma/client/index-browser.js b/packages/desktop/prisma/client/index-browser.js deleted file mode 100644 index 2eb7bf6..0000000 --- a/packages/desktop/prisma/client/index-browser.js +++ /dev/null @@ -1,206 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum -} = require('./runtime/index-browser') - - -const Prisma = {} - -exports.Prisma = Prisma - -/** - * Prisma Client JS version: 4.8.1 - * Query Engine version: d6e67a83f971b175a593ccc12e15c4a757f93ffe - */ -Prisma.prismaVersion = { - client: "4.8.1", - engine: "d6e67a83f971b175a593ccc12e15c4a757f93ffe" -} - -Prisma.PrismaClientKnownRequestError = () => { - throw new Error(`PrismaClientKnownRequestError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - throw new Error(`PrismaClientUnknownRequestError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.PrismaClientRustPanicError = () => { - throw new Error(`PrismaClientRustPanicError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.PrismaClientInitializationError = () => { - throw new Error(`PrismaClientInitializationError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.PrismaClientValidationError = () => { - throw new Error(`PrismaClientValidationError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.NotFoundError = () => { - throw new Error(`NotFoundError is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - throw new Error(`sqltag is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.empty = () => { - throw new Error(`empty is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.join = () => { - throw new Error(`join is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.raw = () => { - throw new Error(`raw is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, -)} -Prisma.validator = () => (val) => val - - -/** - * 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 - */ -// Based on -// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275 -function makeEnum(x) { return x; } - -exports.Prisma.AccountDataScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AlbumScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AppDataScalarFieldEnum = makeEnum({ - id: 'id', - value: 'value' -}); - -exports.Prisma.AppleMusicAlbumScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AppleMusicArtistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.ArtistAlbumScalarFieldEnum = makeEnum({ - id: 'id', - hotAlbums: 'hotAlbums', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.ArtistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AudioScalarFieldEnum = makeEnum({ - id: 'id', - bitRate: 'bitRate', - format: 'format', - source: 'source', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - queriedAt: 'queriedAt' -}); - -exports.Prisma.LyricsScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.PlaylistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.SortOrder = makeEnum({ - asc: 'asc', - desc: 'desc' -}); - -exports.Prisma.TrackScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - - -exports.Prisma.ModelName = makeEnum({ - AccountData: 'AccountData', - AppData: 'AppData', - Track: 'Track', - Album: 'Album', - Artist: 'Artist', - ArtistAlbum: 'ArtistAlbum', - Playlist: 'Playlist', - Audio: 'Audio', - Lyrics: 'Lyrics', - AppleMusicAlbum: 'AppleMusicAlbum', - AppleMusicArtist: 'AppleMusicArtist' -}); - -/** - * Create the Client - */ -class PrismaClient { - constructor() { - throw new Error( - `PrismaClient is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, - ) - } -} -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/packages/desktop/prisma/client/index.d.ts b/packages/desktop/prisma/client/index.d.ts deleted file mode 100644 index fe1f465..0000000 --- a/packages/desktop/prisma/client/index.d.ts +++ /dev/null @@ -1,12729 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/index'; -declare const prisma: unique symbol -export type PrismaPromise = Promise & {[prisma]: true} -type UnwrapPromise

= P extends Promise ? R : P -type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise -}; - - -/** - * Model AccountData - * - */ -export type AccountData = { - id: string - json: string - updatedAt: Date -} - -/** - * Model AppData - * - */ -export type AppData = { - id: string - value: string -} - -/** - * Model Track - * - */ -export type Track = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model Album - * - */ -export type Album = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model Artist - * - */ -export type Artist = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model ArtistAlbum - * - */ -export type ArtistAlbum = { - id: number - hotAlbums: string - createdAt: Date - updatedAt: Date -} - -/** - * Model Playlist - * - */ -export type Playlist = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model Audio - * - */ -export type Audio = { - id: number - bitRate: number - format: string - source: string - createdAt: Date - updatedAt: Date - queriedAt: Date -} - -/** - * Model Lyrics - * - */ -export type Lyrics = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model AppleMusicAlbum - * - */ -export type AppleMusicAlbum = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - -/** - * Model AppleMusicArtist - * - */ -export type AppleMusicArtist = { - id: number - json: string - createdAt: Date - updatedAt: Date -} - - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more AccountData - * const accountData = await prisma.accountData.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, - GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T - ? T['rejectOnNotFound'] - : false - > { - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more AccountData - * const accountData = await prisma.accountData.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 : V extends 'beforeExit' ? () => Promise : Prisma.LogEvent) => void): void; - - /** - * Connect with the database - */ - $connect(): Promise; - - /** - * Disconnect from the database - */ - $disconnect(): Promise; - - /** - * Add a middleware - */ - $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[]): 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[]): 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[]): 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[]): 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 }): Promise>; - - $transaction(fn: (prisma: Prisma.TransactionClient) => Promise, options?: {maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel}): Promise; - - /** - * `prisma.accountData`: Exposes CRUD operations for the **AccountData** model. - * Example usage: - * ```ts - * // Fetch zero or more AccountData - * const accountData = await prisma.accountData.findMany() - * ``` - */ - get accountData(): Prisma.AccountDataDelegate; - - /** - * `prisma.appData`: Exposes CRUD operations for the **AppData** model. - * Example usage: - * ```ts - * // Fetch zero or more AppData - * const appData = await prisma.appData.findMany() - * ``` - */ - get appData(): Prisma.AppDataDelegate; - - /** - * `prisma.track`: Exposes CRUD operations for the **Track** model. - * Example usage: - * ```ts - * // Fetch zero or more Tracks - * const tracks = await prisma.track.findMany() - * ``` - */ - get track(): Prisma.TrackDelegate; - - /** - * `prisma.album`: Exposes CRUD operations for the **Album** model. - * Example usage: - * ```ts - * // Fetch zero or more Albums - * const albums = await prisma.album.findMany() - * ``` - */ - get album(): Prisma.AlbumDelegate; - - /** - * `prisma.artist`: Exposes CRUD operations for the **Artist** model. - * Example usage: - * ```ts - * // Fetch zero or more Artists - * const artists = await prisma.artist.findMany() - * ``` - */ - get artist(): Prisma.ArtistDelegate; - - /** - * `prisma.artistAlbum`: Exposes CRUD operations for the **ArtistAlbum** model. - * Example usage: - * ```ts - * // Fetch zero or more ArtistAlbums - * const artistAlbums = await prisma.artistAlbum.findMany() - * ``` - */ - get artistAlbum(): Prisma.ArtistAlbumDelegate; - - /** - * `prisma.playlist`: Exposes CRUD operations for the **Playlist** model. - * Example usage: - * ```ts - * // Fetch zero or more Playlists - * const playlists = await prisma.playlist.findMany() - * ``` - */ - get playlist(): Prisma.PlaylistDelegate; - - /** - * `prisma.audio`: Exposes CRUD operations for the **Audio** model. - * Example usage: - * ```ts - * // Fetch zero or more Audio - * const audio = await prisma.audio.findMany() - * ``` - */ - get audio(): Prisma.AudioDelegate; - - /** - * `prisma.lyrics`: Exposes CRUD operations for the **Lyrics** model. - * Example usage: - * ```ts - * // Fetch zero or more Lyrics - * const lyrics = await prisma.lyrics.findMany() - * ``` - */ - get lyrics(): Prisma.LyricsDelegate; - - /** - * `prisma.appleMusicAlbum`: Exposes CRUD operations for the **AppleMusicAlbum** model. - * Example usage: - * ```ts - * // Fetch zero or more AppleMusicAlbums - * const appleMusicAlbums = await prisma.appleMusicAlbum.findMany() - * ``` - */ - get appleMusicAlbum(): Prisma.AppleMusicAlbumDelegate; - - /** - * `prisma.appleMusicArtist`: Exposes CRUD operations for the **AppleMusicArtist** model. - * Example usage: - * ```ts - * // Fetch zero or more AppleMusicArtists - * const appleMusicArtists = await prisma.appleMusicArtist.findMany() - * ``` - */ - get appleMusicArtist(): Prisma.AppleMusicArtistDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - /** - * 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 - export import NotFoundError = runtime.NotFoundError - - /** - * 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 - - - /** - * Prisma Client JS version: 4.8.1 - * Query Engine version: d6e67a83f971b175a593ccc12e15c4a757f93ffe - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - /** - * 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 type JsonObject = {[Key in string]?: JsonValue} - - /** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ - export interface JsonArray extends Array {} - - /** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ - export type JsonValue = string | number | boolean | JsonObject | JsonArray | null - - /** - * Matches a JSON object. - * Unlike `JsonObject`, this type allows undefined and read-only properties. - */ - export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} - - /** - * Matches a JSON array. - * Unlike `JsonArray`, readonly arrays are assignable to this type. - */ - export interface InputJsonArray extends ReadonlyArray {} - - /** - * 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 type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray - - /** - * 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 HasSelect = { - select: any - } - type HasInclude = { - include: any - } - type CheckSelect = T extends SelectAndInclude - ? 'Please either choose `select` or `include`' - : T extends HasSelect - ? U - : T extends HasInclude - ? U - : S - - /** - * 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 Promise> = 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`.' - : {}) - - /** - * 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 Exact = - W extends unknown ? A extends Narrowable ? Cast : Cast< - {[K in keyof A]: K extends keyof W ? Exact : never}, - {[K in keyof W]: K extends keyof A ? Exact : W[K]}> - : never; - - type Narrowable = string | number | boolean | bigint; - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - export function validator(): (select: Exact) => S; - - /** - * 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 with an array - */ - type PickArray> = 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 - - class PrismaClientFetcher { - private readonly prisma; - private readonly debug; - private readonly hooks?; - constructor(prisma: PrismaClient, debug?: boolean, hooks?: Hooks | undefined); - request(document: any, dataPath?: string[], rootField?: string, typeName?: string, isList?: boolean, callsite?: string): Promise; - sanitizeMessage(message: string): string; - protected unpack(document: any, data: any, path: string[], rootField?: string, isList?: boolean): any; - } - - export const ModelName: { - AccountData: 'AccountData', - AppData: 'AppData', - Track: 'Track', - Album: 'Album', - Artist: 'Artist', - ArtistAlbum: 'ArtistAlbum', - Playlist: 'Playlist', - Audio: 'Audio', - Lyrics: 'Lyrics', - AppleMusicAlbum: 'AppleMusicAlbum', - AppleMusicArtist: 'AppleMusicArtist' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - export type DefaultPrismaClient = PrismaClient - export type RejectOnNotFound = boolean | ((error: Error) => Error) - export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } - export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound } - type IsReject = T extends true ? True : T extends (err: Error) => Error ? True : False - export type HasReject< - GlobalRejectSettings extends Prisma.PrismaClientOptions['rejectOnNotFound'], - LocalRejectSettings, - Action extends PrismaAction, - Model extends ModelName - > = LocalRejectSettings extends RejectOnNotFound - ? IsReject - : GlobalRejectSettings extends RejectPerOperation - ? Action extends keyof GlobalRejectSettings - ? GlobalRejectSettings[Action] extends RejectOnNotFound - ? IsReject - : GlobalRejectSettings[Action] extends RejectPerModel - ? Model extends keyof GlobalRejectSettings[Action] - ? IsReject - : False - : False - : False - : IsReject - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - - export interface PrismaClientOptions { - /** - * Configure findUnique/findFirst to throw an error if the query returns null. - * @deprecated since 4.0.0. Use `findUniqueOrThrow`/`findFirstOrThrow` methods instead. - * @example - * ``` - * // Reject on both findUnique/findFirst - * rejectOnNotFound: true - * // Reject only on findFirst with a custom error - * rejectOnNotFound: { findFirst: (err) => new Error("Custom Error")} - * // Reject on user.findUnique with a custom error - * rejectOnNotFound: { findUnique: {User: (err) => new Error("User not found")}} - * ``` - */ - rejectOnNotFound?: RejectOnNotFound | RejectPerOperation - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - - /** - * @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?: Array - } - - export type Hooks = { - beforeRequest?: (options: { query: string, path: string[], rootField?: string, typeName?: string, document: any }) => any - } - - /* 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' - | 'findMany' - | 'findFirst' - | 'create' - | 'createMany' - | 'update' - | 'updateMany' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - - /** - * 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) => Promise, - ) => Promise - - // 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 - */ - - - - /** - * Models - */ - - /** - * Model AccountData - */ - - - export type AggregateAccountData = { - _count: AccountDataCountAggregateOutputType | null - _min: AccountDataMinAggregateOutputType | null - _max: AccountDataMaxAggregateOutputType | null - } - - export type AccountDataMinAggregateOutputType = { - id: string | null - json: string | null - updatedAt: Date | null - } - - export type AccountDataMaxAggregateOutputType = { - id: string | null - json: string | null - updatedAt: Date | null - } - - export type AccountDataCountAggregateOutputType = { - id: number - json: number - updatedAt: number - _all: number - } - - - export type AccountDataMinAggregateInputType = { - id?: true - json?: true - updatedAt?: true - } - - export type AccountDataMaxAggregateInputType = { - id?: true - json?: true - updatedAt?: true - } - - export type AccountDataCountAggregateInputType = { - id?: true - json?: true - updatedAt?: true - _all?: true - } - - export type AccountDataAggregateArgs = { - /** - * Filter which AccountData to aggregate. - * - **/ - where?: AccountDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AccountData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AccountDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AccountData 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` AccountData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AccountData - **/ - _count?: true | AccountDataCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AccountDataMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AccountDataMaxAggregateInputType - } - - export type GetAccountDataAggregateType = { - [P in keyof T & keyof AggregateAccountData]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AccountDataGroupByArgs = { - where?: AccountDataWhereInput - orderBy?: Enumerable - by: Array - having?: AccountDataScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AccountDataCountAggregateInputType | true - _min?: AccountDataMinAggregateInputType - _max?: AccountDataMaxAggregateInputType - } - - - export type AccountDataGroupByOutputType = { - id: string - json: string - updatedAt: Date - _count: AccountDataCountAggregateOutputType | null - _min: AccountDataMinAggregateOutputType | null - _max: AccountDataMaxAggregateOutputType | null - } - - type GetAccountDataGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AccountDataGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AccountDataSelect = { - id?: boolean - json?: boolean - updatedAt?: boolean - } - - - export type AccountDataGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? AccountData : - S extends undefined ? never : - S extends { include: any } & (AccountDataArgs | AccountDataFindManyArgs) - ? AccountData - : S extends { select: any } & (AccountDataArgs | AccountDataFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof AccountData ? AccountData[P] : never - } - : AccountData - - - type AccountDataCountArgs = Merge< - Omit & { - select?: AccountDataCountAggregateInputType | true - } - > - - export interface AccountDataDelegate { - /** - * Find zero or one AccountData that matches the filter. - * @param {AccountDataFindUniqueArgs} args - Arguments to find a AccountData - * @example - * // Get one AccountData - * const accountData = await prisma.accountData.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AccountDataClient> : Prisma__AccountDataClient | null, null> - - /** - * Find one AccountData that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AccountDataFindUniqueOrThrowArgs} args - Arguments to find a AccountData - * @example - * // Get one AccountData - * const accountData = await prisma.accountData.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Find the first AccountData 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 {AccountDataFindFirstArgs} args - Arguments to find a AccountData - * @example - * // Get one AccountData - * const accountData = await prisma.accountData.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AccountDataClient> : Prisma__AccountDataClient | null, null> - - /** - * Find the first AccountData that matches the filter or - * throw `NotFoundError` 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 {AccountDataFindFirstOrThrowArgs} args - Arguments to find a AccountData - * @example - * // Get one AccountData - * const accountData = await prisma.accountData.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Find zero or more AccountData 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 {AccountDataFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all AccountData - * const accountData = await prisma.accountData.findMany() - * - * // Get first 10 AccountData - * const accountData = await prisma.accountData.findMany({ take: 10 }) - * - * // Only select the `id` - * const accountDataWithIdOnly = await prisma.accountData.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a AccountData. - * @param {AccountDataCreateArgs} args - Arguments to create a AccountData. - * @example - * // Create one AccountData - * const AccountData = await prisma.accountData.create({ - * data: { - * // ... data to create a AccountData - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Delete a AccountData. - * @param {AccountDataDeleteArgs} args - Arguments to delete one AccountData. - * @example - * // Delete one AccountData - * const AccountData = await prisma.accountData.delete({ - * where: { - * // ... filter to delete one AccountData - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Update one AccountData. - * @param {AccountDataUpdateArgs} args - Arguments to update one AccountData. - * @example - * // Update one AccountData - * const accountData = await prisma.accountData.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Delete zero or more AccountData. - * @param {AccountDataDeleteManyArgs} args - Arguments to filter AccountData to delete. - * @example - * // Delete a few AccountData - * const { count } = await prisma.accountData.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more AccountData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountDataUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AccountData - * const accountData = await prisma.accountData.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one AccountData. - * @param {AccountDataUpsertArgs} args - Arguments to update or create a AccountData. - * @example - * // Update or create a AccountData - * const accountData = await prisma.accountData.upsert({ - * create: { - * // ... data to create a AccountData - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AccountData we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AccountDataClient> - - /** - * Count the number of AccountData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountDataCountArgs} args - Arguments to filter AccountData to count. - * @example - * // Count the number of AccountData - * const count = await prisma.accountData.count({ - * where: { - * // ... the filter for the AccountData we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AccountData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountDataAggregateArgs} 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): PrismaPromise> - - /** - * Group by AccountData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountDataGroupByArgs} 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 AccountDataGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AccountDataGroupByArgs['orderBy'] } - : { orderBy?: AccountDataGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAccountDataGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for AccountData. - * 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 class Prisma__AccountDataClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * AccountData base type for findUnique actions - */ - export type AccountDataFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter, which AccountData to fetch. - * - **/ - where: AccountDataWhereUniqueInput - } - - /** - * AccountData findUnique - */ - export interface AccountDataFindUniqueArgs extends AccountDataFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AccountData findUniqueOrThrow - */ - export type AccountDataFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter, which AccountData to fetch. - * - **/ - where: AccountDataWhereUniqueInput - } - - - /** - * AccountData base type for findFirst actions - */ - export type AccountDataFindFirstArgsBase = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter, which AccountData to fetch. - * - **/ - where?: AccountDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AccountData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AccountData. - * - **/ - cursor?: AccountDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AccountData 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` AccountData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AccountData. - * - **/ - distinct?: Enumerable - } - - /** - * AccountData findFirst - */ - export interface AccountDataFindFirstArgs extends AccountDataFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AccountData findFirstOrThrow - */ - export type AccountDataFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter, which AccountData to fetch. - * - **/ - where?: AccountDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AccountData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AccountData. - * - **/ - cursor?: AccountDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AccountData 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` AccountData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AccountData. - * - **/ - distinct?: Enumerable - } - - - /** - * AccountData findMany - */ - export type AccountDataFindManyArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter, which AccountData to fetch. - * - **/ - where?: AccountDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AccountData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AccountData. - * - **/ - cursor?: AccountDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AccountData 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` AccountData. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * AccountData create - */ - export type AccountDataCreateArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * The data needed to create a AccountData. - * - **/ - data: XOR - } - - - /** - * AccountData update - */ - export type AccountDataUpdateArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * The data needed to update a AccountData. - * - **/ - data: XOR - /** - * Choose, which AccountData to update. - * - **/ - where: AccountDataWhereUniqueInput - } - - - /** - * AccountData updateMany - */ - export type AccountDataUpdateManyArgs = { - /** - * The data used to update AccountData. - * - **/ - data: XOR - /** - * Filter which AccountData to update - * - **/ - where?: AccountDataWhereInput - } - - - /** - * AccountData upsert - */ - export type AccountDataUpsertArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * The filter to search for the AccountData to update in case it exists. - * - **/ - where: AccountDataWhereUniqueInput - /** - * In case the AccountData found by the `where` argument doesn't exist, create a new AccountData with this data. - * - **/ - create: XOR - /** - * In case the AccountData was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * AccountData delete - */ - export type AccountDataDeleteArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - /** - * Filter which AccountData to delete. - * - **/ - where: AccountDataWhereUniqueInput - } - - - /** - * AccountData deleteMany - */ - export type AccountDataDeleteManyArgs = { - /** - * Filter which AccountData to delete - * - **/ - where?: AccountDataWhereInput - } - - - /** - * AccountData without action - */ - export type AccountDataArgs = { - /** - * Select specific fields to fetch from the AccountData - * - **/ - select?: AccountDataSelect | null - } - - - - /** - * Model AppData - */ - - - export type AggregateAppData = { - _count: AppDataCountAggregateOutputType | null - _min: AppDataMinAggregateOutputType | null - _max: AppDataMaxAggregateOutputType | null - } - - export type AppDataMinAggregateOutputType = { - id: string | null - value: string | null - } - - export type AppDataMaxAggregateOutputType = { - id: string | null - value: string | null - } - - export type AppDataCountAggregateOutputType = { - id: number - value: number - _all: number - } - - - export type AppDataMinAggregateInputType = { - id?: true - value?: true - } - - export type AppDataMaxAggregateInputType = { - id?: true - value?: true - } - - export type AppDataCountAggregateInputType = { - id?: true - value?: true - _all?: true - } - - export type AppDataAggregateArgs = { - /** - * Filter which AppData to aggregate. - * - **/ - where?: AppDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AppDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppData 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` AppData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AppData - **/ - _count?: true | AppDataCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AppDataMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AppDataMaxAggregateInputType - } - - export type GetAppDataAggregateType = { - [P in keyof T & keyof AggregateAppData]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AppDataGroupByArgs = { - where?: AppDataWhereInput - orderBy?: Enumerable - by: Array - having?: AppDataScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AppDataCountAggregateInputType | true - _min?: AppDataMinAggregateInputType - _max?: AppDataMaxAggregateInputType - } - - - export type AppDataGroupByOutputType = { - id: string - value: string - _count: AppDataCountAggregateOutputType | null - _min: AppDataMinAggregateOutputType | null - _max: AppDataMaxAggregateOutputType | null - } - - type GetAppDataGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AppDataGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AppDataSelect = { - id?: boolean - value?: boolean - } - - - export type AppDataGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? AppData : - S extends undefined ? never : - S extends { include: any } & (AppDataArgs | AppDataFindManyArgs) - ? AppData - : S extends { select: any } & (AppDataArgs | AppDataFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof AppData ? AppData[P] : never - } - : AppData - - - type AppDataCountArgs = Merge< - Omit & { - select?: AppDataCountAggregateInputType | true - } - > - - export interface AppDataDelegate { - /** - * Find zero or one AppData that matches the filter. - * @param {AppDataFindUniqueArgs} args - Arguments to find a AppData - * @example - * // Get one AppData - * const appData = await prisma.appData.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AppDataClient> : Prisma__AppDataClient | null, null> - - /** - * Find one AppData that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AppDataFindUniqueOrThrowArgs} args - Arguments to find a AppData - * @example - * // Get one AppData - * const appData = await prisma.appData.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AppDataClient> - - /** - * Find the first AppData 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 {AppDataFindFirstArgs} args - Arguments to find a AppData - * @example - * // Get one AppData - * const appData = await prisma.appData.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AppDataClient> : Prisma__AppDataClient | null, null> - - /** - * Find the first AppData that matches the filter or - * throw `NotFoundError` 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 {AppDataFindFirstOrThrowArgs} args - Arguments to find a AppData - * @example - * // Get one AppData - * const appData = await prisma.appData.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AppDataClient> - - /** - * Find zero or more AppData 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 {AppDataFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all AppData - * const appData = await prisma.appData.findMany() - * - * // Get first 10 AppData - * const appData = await prisma.appData.findMany({ take: 10 }) - * - * // Only select the `id` - * const appDataWithIdOnly = await prisma.appData.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a AppData. - * @param {AppDataCreateArgs} args - Arguments to create a AppData. - * @example - * // Create one AppData - * const AppData = await prisma.appData.create({ - * data: { - * // ... data to create a AppData - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AppDataClient> - - /** - * Delete a AppData. - * @param {AppDataDeleteArgs} args - Arguments to delete one AppData. - * @example - * // Delete one AppData - * const AppData = await prisma.appData.delete({ - * where: { - * // ... filter to delete one AppData - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AppDataClient> - - /** - * Update one AppData. - * @param {AppDataUpdateArgs} args - Arguments to update one AppData. - * @example - * // Update one AppData - * const appData = await prisma.appData.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AppDataClient> - - /** - * Delete zero or more AppData. - * @param {AppDataDeleteManyArgs} args - Arguments to filter AppData to delete. - * @example - * // Delete a few AppData - * const { count } = await prisma.appData.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more AppData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppDataUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AppData - * const appData = await prisma.appData.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one AppData. - * @param {AppDataUpsertArgs} args - Arguments to update or create a AppData. - * @example - * // Update or create a AppData - * const appData = await prisma.appData.upsert({ - * create: { - * // ... data to create a AppData - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AppData we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AppDataClient> - - /** - * Count the number of AppData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppDataCountArgs} args - Arguments to filter AppData to count. - * @example - * // Count the number of AppData - * const count = await prisma.appData.count({ - * where: { - * // ... the filter for the AppData we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AppData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppDataAggregateArgs} 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): PrismaPromise> - - /** - * Group by AppData. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppDataGroupByArgs} 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 AppDataGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AppDataGroupByArgs['orderBy'] } - : { orderBy?: AppDataGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAppDataGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for AppData. - * 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 class Prisma__AppDataClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * AppData base type for findUnique actions - */ - export type AppDataFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter, which AppData to fetch. - * - **/ - where: AppDataWhereUniqueInput - } - - /** - * AppData findUnique - */ - export interface AppDataFindUniqueArgs extends AppDataFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppData findUniqueOrThrow - */ - export type AppDataFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter, which AppData to fetch. - * - **/ - where: AppDataWhereUniqueInput - } - - - /** - * AppData base type for findFirst actions - */ - export type AppDataFindFirstArgsBase = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter, which AppData to fetch. - * - **/ - where?: AppDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppData. - * - **/ - cursor?: AppDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppData 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` AppData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppData. - * - **/ - distinct?: Enumerable - } - - /** - * AppData findFirst - */ - export interface AppDataFindFirstArgs extends AppDataFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppData findFirstOrThrow - */ - export type AppDataFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter, which AppData to fetch. - * - **/ - where?: AppDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppData. - * - **/ - cursor?: AppDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppData 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` AppData. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppData. - * - **/ - distinct?: Enumerable - } - - - /** - * AppData findMany - */ - export type AppDataFindManyArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter, which AppData to fetch. - * - **/ - where?: AppDataWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppData to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AppData. - * - **/ - cursor?: AppDataWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppData 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` AppData. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * AppData create - */ - export type AppDataCreateArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * The data needed to create a AppData. - * - **/ - data: XOR - } - - - /** - * AppData update - */ - export type AppDataUpdateArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * The data needed to update a AppData. - * - **/ - data: XOR - /** - * Choose, which AppData to update. - * - **/ - where: AppDataWhereUniqueInput - } - - - /** - * AppData updateMany - */ - export type AppDataUpdateManyArgs = { - /** - * The data used to update AppData. - * - **/ - data: XOR - /** - * Filter which AppData to update - * - **/ - where?: AppDataWhereInput - } - - - /** - * AppData upsert - */ - export type AppDataUpsertArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * The filter to search for the AppData to update in case it exists. - * - **/ - where: AppDataWhereUniqueInput - /** - * In case the AppData found by the `where` argument doesn't exist, create a new AppData with this data. - * - **/ - create: XOR - /** - * In case the AppData was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * AppData delete - */ - export type AppDataDeleteArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - /** - * Filter which AppData to delete. - * - **/ - where: AppDataWhereUniqueInput - } - - - /** - * AppData deleteMany - */ - export type AppDataDeleteManyArgs = { - /** - * Filter which AppData to delete - * - **/ - where?: AppDataWhereInput - } - - - /** - * AppData without action - */ - export type AppDataArgs = { - /** - * Select specific fields to fetch from the AppData - * - **/ - select?: AppDataSelect | null - } - - - - /** - * Model Track - */ - - - export type AggregateTrack = { - _count: TrackCountAggregateOutputType | null - _avg: TrackAvgAggregateOutputType | null - _sum: TrackSumAggregateOutputType | null - _min: TrackMinAggregateOutputType | null - _max: TrackMaxAggregateOutputType | null - } - - export type TrackAvgAggregateOutputType = { - id: number | null - } - - export type TrackSumAggregateOutputType = { - id: number | null - } - - export type TrackMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type TrackMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type TrackCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type TrackAvgAggregateInputType = { - id?: true - } - - export type TrackSumAggregateInputType = { - id?: true - } - - export type TrackMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type TrackMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type TrackCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type TrackAggregateArgs = { - /** - * Filter which Track to aggregate. - * - **/ - where?: TrackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tracks to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: TrackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tracks 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` Tracks. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Tracks - **/ - _count?: true | TrackCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: TrackAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: TrackSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: TrackMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: TrackMaxAggregateInputType - } - - export type GetTrackAggregateType = { - [P in keyof T & keyof AggregateTrack]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type TrackGroupByArgs = { - where?: TrackWhereInput - orderBy?: Enumerable - by: Array - having?: TrackScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: TrackCountAggregateInputType | true - _avg?: TrackAvgAggregateInputType - _sum?: TrackSumAggregateInputType - _min?: TrackMinAggregateInputType - _max?: TrackMaxAggregateInputType - } - - - export type TrackGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: TrackCountAggregateOutputType | null - _avg: TrackAvgAggregateOutputType | null - _sum: TrackSumAggregateOutputType | null - _min: TrackMinAggregateOutputType | null - _max: TrackMaxAggregateOutputType | null - } - - type GetTrackGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof TrackGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type TrackSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type TrackGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Track : - S extends undefined ? never : - S extends { include: any } & (TrackArgs | TrackFindManyArgs) - ? Track - : S extends { select: any } & (TrackArgs | TrackFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Track ? Track[P] : never - } - : Track - - - type TrackCountArgs = Merge< - Omit & { - select?: TrackCountAggregateInputType | true - } - > - - export interface TrackDelegate { - /** - * Find zero or one Track that matches the filter. - * @param {TrackFindUniqueArgs} args - Arguments to find a Track - * @example - * // Get one Track - * const track = await prisma.track.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__TrackClient> : Prisma__TrackClient | null, null> - - /** - * Find one Track that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {TrackFindUniqueOrThrowArgs} args - Arguments to find a Track - * @example - * // Get one Track - * const track = await prisma.track.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__TrackClient> - - /** - * Find the first Track 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 {TrackFindFirstArgs} args - Arguments to find a Track - * @example - * // Get one Track - * const track = await prisma.track.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__TrackClient> : Prisma__TrackClient | null, null> - - /** - * Find the first Track that matches the filter or - * throw `NotFoundError` 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 {TrackFindFirstOrThrowArgs} args - Arguments to find a Track - * @example - * // Get one Track - * const track = await prisma.track.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__TrackClient> - - /** - * Find zero or more Tracks 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 {TrackFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Tracks - * const tracks = await prisma.track.findMany() - * - * // Get first 10 Tracks - * const tracks = await prisma.track.findMany({ take: 10 }) - * - * // Only select the `id` - * const trackWithIdOnly = await prisma.track.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Track. - * @param {TrackCreateArgs} args - Arguments to create a Track. - * @example - * // Create one Track - * const Track = await prisma.track.create({ - * data: { - * // ... data to create a Track - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__TrackClient> - - /** - * Delete a Track. - * @param {TrackDeleteArgs} args - Arguments to delete one Track. - * @example - * // Delete one Track - * const Track = await prisma.track.delete({ - * where: { - * // ... filter to delete one Track - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__TrackClient> - - /** - * Update one Track. - * @param {TrackUpdateArgs} args - Arguments to update one Track. - * @example - * // Update one Track - * const track = await prisma.track.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__TrackClient> - - /** - * Delete zero or more Tracks. - * @param {TrackDeleteManyArgs} args - Arguments to filter Tracks to delete. - * @example - * // Delete a few Tracks - * const { count } = await prisma.track.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Tracks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {TrackUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Tracks - * const track = await prisma.track.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Track. - * @param {TrackUpsertArgs} args - Arguments to update or create a Track. - * @example - * // Update or create a Track - * const track = await prisma.track.upsert({ - * create: { - * // ... data to create a Track - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Track we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__TrackClient> - - /** - * Count the number of Tracks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {TrackCountArgs} args - Arguments to filter Tracks to count. - * @example - * // Count the number of Tracks - * const count = await prisma.track.count({ - * where: { - * // ... the filter for the Tracks we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Track. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {TrackAggregateArgs} 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): PrismaPromise> - - /** - * Group by Track. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {TrackGroupByArgs} 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 TrackGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: TrackGroupByArgs['orderBy'] } - : { orderBy?: TrackGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetTrackGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Track. - * 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 class Prisma__TrackClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Track base type for findUnique actions - */ - export type TrackFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter, which Track to fetch. - * - **/ - where: TrackWhereUniqueInput - } - - /** - * Track findUnique - */ - export interface TrackFindUniqueArgs extends TrackFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Track findUniqueOrThrow - */ - export type TrackFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter, which Track to fetch. - * - **/ - where: TrackWhereUniqueInput - } - - - /** - * Track base type for findFirst actions - */ - export type TrackFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter, which Track to fetch. - * - **/ - where?: TrackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tracks to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Tracks. - * - **/ - cursor?: TrackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tracks 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` Tracks. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Tracks. - * - **/ - distinct?: Enumerable - } - - /** - * Track findFirst - */ - export interface TrackFindFirstArgs extends TrackFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Track findFirstOrThrow - */ - export type TrackFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter, which Track to fetch. - * - **/ - where?: TrackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tracks to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Tracks. - * - **/ - cursor?: TrackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tracks 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` Tracks. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Tracks. - * - **/ - distinct?: Enumerable - } - - - /** - * Track findMany - */ - export type TrackFindManyArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter, which Tracks to fetch. - * - **/ - where?: TrackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tracks to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Tracks. - * - **/ - cursor?: TrackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tracks 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` Tracks. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Track create - */ - export type TrackCreateArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * The data needed to create a Track. - * - **/ - data: XOR - } - - - /** - * Track update - */ - export type TrackUpdateArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * The data needed to update a Track. - * - **/ - data: XOR - /** - * Choose, which Track to update. - * - **/ - where: TrackWhereUniqueInput - } - - - /** - * Track updateMany - */ - export type TrackUpdateManyArgs = { - /** - * The data used to update Tracks. - * - **/ - data: XOR - /** - * Filter which Tracks to update - * - **/ - where?: TrackWhereInput - } - - - /** - * Track upsert - */ - export type TrackUpsertArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * The filter to search for the Track to update in case it exists. - * - **/ - where: TrackWhereUniqueInput - /** - * In case the Track found by the `where` argument doesn't exist, create a new Track with this data. - * - **/ - create: XOR - /** - * In case the Track was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Track delete - */ - export type TrackDeleteArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - /** - * Filter which Track to delete. - * - **/ - where: TrackWhereUniqueInput - } - - - /** - * Track deleteMany - */ - export type TrackDeleteManyArgs = { - /** - * Filter which Tracks to delete - * - **/ - where?: TrackWhereInput - } - - - /** - * Track without action - */ - export type TrackArgs = { - /** - * Select specific fields to fetch from the Track - * - **/ - select?: TrackSelect | null - } - - - - /** - * Model Album - */ - - - export type AggregateAlbum = { - _count: AlbumCountAggregateOutputType | null - _avg: AlbumAvgAggregateOutputType | null - _sum: AlbumSumAggregateOutputType | null - _min: AlbumMinAggregateOutputType | null - _max: AlbumMaxAggregateOutputType | null - } - - export type AlbumAvgAggregateOutputType = { - id: number | null - } - - export type AlbumSumAggregateOutputType = { - id: number | null - } - - export type AlbumMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AlbumMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AlbumCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type AlbumAvgAggregateInputType = { - id?: true - } - - export type AlbumSumAggregateInputType = { - id?: true - } - - export type AlbumMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AlbumMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AlbumCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type AlbumAggregateArgs = { - /** - * Filter which Album to aggregate. - * - **/ - where?: AlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Albums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Albums 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` Albums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Albums - **/ - _count?: true | AlbumCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AlbumAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AlbumSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AlbumMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AlbumMaxAggregateInputType - } - - export type GetAlbumAggregateType = { - [P in keyof T & keyof AggregateAlbum]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AlbumGroupByArgs = { - where?: AlbumWhereInput - orderBy?: Enumerable - by: Array - having?: AlbumScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AlbumCountAggregateInputType | true - _avg?: AlbumAvgAggregateInputType - _sum?: AlbumSumAggregateInputType - _min?: AlbumMinAggregateInputType - _max?: AlbumMaxAggregateInputType - } - - - export type AlbumGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: AlbumCountAggregateOutputType | null - _avg: AlbumAvgAggregateOutputType | null - _sum: AlbumSumAggregateOutputType | null - _min: AlbumMinAggregateOutputType | null - _max: AlbumMaxAggregateOutputType | null - } - - type GetAlbumGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AlbumGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AlbumSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type AlbumGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Album : - S extends undefined ? never : - S extends { include: any } & (AlbumArgs | AlbumFindManyArgs) - ? Album - : S extends { select: any } & (AlbumArgs | AlbumFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Album ? Album[P] : never - } - : Album - - - type AlbumCountArgs = Merge< - Omit & { - select?: AlbumCountAggregateInputType | true - } - > - - export interface AlbumDelegate { - /** - * Find zero or one Album that matches the filter. - * @param {AlbumFindUniqueArgs} args - Arguments to find a Album - * @example - * // Get one Album - * const album = await prisma.album.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AlbumClient> : Prisma__AlbumClient | null, null> - - /** - * Find one Album that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AlbumFindUniqueOrThrowArgs} args - Arguments to find a Album - * @example - * // Get one Album - * const album = await prisma.album.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AlbumClient> - - /** - * Find the first Album 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 {AlbumFindFirstArgs} args - Arguments to find a Album - * @example - * // Get one Album - * const album = await prisma.album.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AlbumClient> : Prisma__AlbumClient | null, null> - - /** - * Find the first Album that matches the filter or - * throw `NotFoundError` 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 {AlbumFindFirstOrThrowArgs} args - Arguments to find a Album - * @example - * // Get one Album - * const album = await prisma.album.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AlbumClient> - - /** - * Find zero or more Albums 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 {AlbumFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Albums - * const albums = await prisma.album.findMany() - * - * // Get first 10 Albums - * const albums = await prisma.album.findMany({ take: 10 }) - * - * // Only select the `id` - * const albumWithIdOnly = await prisma.album.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Album. - * @param {AlbumCreateArgs} args - Arguments to create a Album. - * @example - * // Create one Album - * const Album = await prisma.album.create({ - * data: { - * // ... data to create a Album - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AlbumClient> - - /** - * Delete a Album. - * @param {AlbumDeleteArgs} args - Arguments to delete one Album. - * @example - * // Delete one Album - * const Album = await prisma.album.delete({ - * where: { - * // ... filter to delete one Album - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AlbumClient> - - /** - * Update one Album. - * @param {AlbumUpdateArgs} args - Arguments to update one Album. - * @example - * // Update one Album - * const album = await prisma.album.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AlbumClient> - - /** - * Delete zero or more Albums. - * @param {AlbumDeleteManyArgs} args - Arguments to filter Albums to delete. - * @example - * // Delete a few Albums - * const { count } = await prisma.album.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Albums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AlbumUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Albums - * const album = await prisma.album.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Album. - * @param {AlbumUpsertArgs} args - Arguments to update or create a Album. - * @example - * // Update or create a Album - * const album = await prisma.album.upsert({ - * create: { - * // ... data to create a Album - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Album we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AlbumClient> - - /** - * Count the number of Albums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AlbumCountArgs} args - Arguments to filter Albums to count. - * @example - * // Count the number of Albums - * const count = await prisma.album.count({ - * where: { - * // ... the filter for the Albums we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Album. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AlbumAggregateArgs} 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): PrismaPromise> - - /** - * Group by Album. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AlbumGroupByArgs} 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 AlbumGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AlbumGroupByArgs['orderBy'] } - : { orderBy?: AlbumGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAlbumGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Album. - * 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 class Prisma__AlbumClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Album base type for findUnique actions - */ - export type AlbumFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter, which Album to fetch. - * - **/ - where: AlbumWhereUniqueInput - } - - /** - * Album findUnique - */ - export interface AlbumFindUniqueArgs extends AlbumFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Album findUniqueOrThrow - */ - export type AlbumFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter, which Album to fetch. - * - **/ - where: AlbumWhereUniqueInput - } - - - /** - * Album base type for findFirst actions - */ - export type AlbumFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter, which Album to fetch. - * - **/ - where?: AlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Albums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Albums. - * - **/ - cursor?: AlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Albums 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` Albums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Albums. - * - **/ - distinct?: Enumerable - } - - /** - * Album findFirst - */ - export interface AlbumFindFirstArgs extends AlbumFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Album findFirstOrThrow - */ - export type AlbumFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter, which Album to fetch. - * - **/ - where?: AlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Albums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Albums. - * - **/ - cursor?: AlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Albums 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` Albums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Albums. - * - **/ - distinct?: Enumerable - } - - - /** - * Album findMany - */ - export type AlbumFindManyArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter, which Albums to fetch. - * - **/ - where?: AlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Albums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Albums. - * - **/ - cursor?: AlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Albums 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` Albums. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Album create - */ - export type AlbumCreateArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * The data needed to create a Album. - * - **/ - data: XOR - } - - - /** - * Album update - */ - export type AlbumUpdateArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * The data needed to update a Album. - * - **/ - data: XOR - /** - * Choose, which Album to update. - * - **/ - where: AlbumWhereUniqueInput - } - - - /** - * Album updateMany - */ - export type AlbumUpdateManyArgs = { - /** - * The data used to update Albums. - * - **/ - data: XOR - /** - * Filter which Albums to update - * - **/ - where?: AlbumWhereInput - } - - - /** - * Album upsert - */ - export type AlbumUpsertArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * The filter to search for the Album to update in case it exists. - * - **/ - where: AlbumWhereUniqueInput - /** - * In case the Album found by the `where` argument doesn't exist, create a new Album with this data. - * - **/ - create: XOR - /** - * In case the Album was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Album delete - */ - export type AlbumDeleteArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - /** - * Filter which Album to delete. - * - **/ - where: AlbumWhereUniqueInput - } - - - /** - * Album deleteMany - */ - export type AlbumDeleteManyArgs = { - /** - * Filter which Albums to delete - * - **/ - where?: AlbumWhereInput - } - - - /** - * Album without action - */ - export type AlbumArgs = { - /** - * Select specific fields to fetch from the Album - * - **/ - select?: AlbumSelect | null - } - - - - /** - * Model Artist - */ - - - export type AggregateArtist = { - _count: ArtistCountAggregateOutputType | null - _avg: ArtistAvgAggregateOutputType | null - _sum: ArtistSumAggregateOutputType | null - _min: ArtistMinAggregateOutputType | null - _max: ArtistMaxAggregateOutputType | null - } - - export type ArtistAvgAggregateOutputType = { - id: number | null - } - - export type ArtistSumAggregateOutputType = { - id: number | null - } - - export type ArtistMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type ArtistMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type ArtistCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type ArtistAvgAggregateInputType = { - id?: true - } - - export type ArtistSumAggregateInputType = { - id?: true - } - - export type ArtistMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type ArtistMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type ArtistCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type ArtistAggregateArgs = { - /** - * Filter which Artist to aggregate. - * - **/ - where?: ArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Artists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: ArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Artists 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` Artists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Artists - **/ - _count?: true | ArtistCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ArtistAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ArtistSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ArtistMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ArtistMaxAggregateInputType - } - - export type GetArtistAggregateType = { - [P in keyof T & keyof AggregateArtist]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ArtistGroupByArgs = { - where?: ArtistWhereInput - orderBy?: Enumerable - by: Array - having?: ArtistScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ArtistCountAggregateInputType | true - _avg?: ArtistAvgAggregateInputType - _sum?: ArtistSumAggregateInputType - _min?: ArtistMinAggregateInputType - _max?: ArtistMaxAggregateInputType - } - - - export type ArtistGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: ArtistCountAggregateOutputType | null - _avg: ArtistAvgAggregateOutputType | null - _sum: ArtistSumAggregateOutputType | null - _min: ArtistMinAggregateOutputType | null - _max: ArtistMaxAggregateOutputType | null - } - - type GetArtistGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof ArtistGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ArtistSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type ArtistGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Artist : - S extends undefined ? never : - S extends { include: any } & (ArtistArgs | ArtistFindManyArgs) - ? Artist - : S extends { select: any } & (ArtistArgs | ArtistFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Artist ? Artist[P] : never - } - : Artist - - - type ArtistCountArgs = Merge< - Omit & { - select?: ArtistCountAggregateInputType | true - } - > - - export interface ArtistDelegate { - /** - * Find zero or one Artist that matches the filter. - * @param {ArtistFindUniqueArgs} args - Arguments to find a Artist - * @example - * // Get one Artist - * const artist = await prisma.artist.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__ArtistClient> : Prisma__ArtistClient | null, null> - - /** - * Find one Artist that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ArtistFindUniqueOrThrowArgs} args - Arguments to find a Artist - * @example - * // Get one Artist - * const artist = await prisma.artist.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__ArtistClient> - - /** - * Find the first Artist 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 {ArtistFindFirstArgs} args - Arguments to find a Artist - * @example - * // Get one Artist - * const artist = await prisma.artist.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__ArtistClient> : Prisma__ArtistClient | null, null> - - /** - * Find the first Artist that matches the filter or - * throw `NotFoundError` 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 {ArtistFindFirstOrThrowArgs} args - Arguments to find a Artist - * @example - * // Get one Artist - * const artist = await prisma.artist.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__ArtistClient> - - /** - * Find zero or more Artists 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 {ArtistFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Artists - * const artists = await prisma.artist.findMany() - * - * // Get first 10 Artists - * const artists = await prisma.artist.findMany({ take: 10 }) - * - * // Only select the `id` - * const artistWithIdOnly = await prisma.artist.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Artist. - * @param {ArtistCreateArgs} args - Arguments to create a Artist. - * @example - * // Create one Artist - * const Artist = await prisma.artist.create({ - * data: { - * // ... data to create a Artist - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__ArtistClient> - - /** - * Delete a Artist. - * @param {ArtistDeleteArgs} args - Arguments to delete one Artist. - * @example - * // Delete one Artist - * const Artist = await prisma.artist.delete({ - * where: { - * // ... filter to delete one Artist - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__ArtistClient> - - /** - * Update one Artist. - * @param {ArtistUpdateArgs} args - Arguments to update one Artist. - * @example - * // Update one Artist - * const artist = await prisma.artist.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__ArtistClient> - - /** - * Delete zero or more Artists. - * @param {ArtistDeleteManyArgs} args - Arguments to filter Artists to delete. - * @example - * // Delete a few Artists - * const { count } = await prisma.artist.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Artists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Artists - * const artist = await prisma.artist.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Artist. - * @param {ArtistUpsertArgs} args - Arguments to update or create a Artist. - * @example - * // Update or create a Artist - * const artist = await prisma.artist.upsert({ - * create: { - * // ... data to create a Artist - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Artist we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__ArtistClient> - - /** - * Count the number of Artists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistCountArgs} args - Arguments to filter Artists to count. - * @example - * // Count the number of Artists - * const count = await prisma.artist.count({ - * where: { - * // ... the filter for the Artists we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Artist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistAggregateArgs} 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): PrismaPromise> - - /** - * Group by Artist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistGroupByArgs} 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 ArtistGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ArtistGroupByArgs['orderBy'] } - : { orderBy?: ArtistGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetArtistGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Artist. - * 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 class Prisma__ArtistClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Artist base type for findUnique actions - */ - export type ArtistFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter, which Artist to fetch. - * - **/ - where: ArtistWhereUniqueInput - } - - /** - * Artist findUnique - */ - export interface ArtistFindUniqueArgs extends ArtistFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Artist findUniqueOrThrow - */ - export type ArtistFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter, which Artist to fetch. - * - **/ - where: ArtistWhereUniqueInput - } - - - /** - * Artist base type for findFirst actions - */ - export type ArtistFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter, which Artist to fetch. - * - **/ - where?: ArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Artists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Artists. - * - **/ - cursor?: ArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Artists 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` Artists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Artists. - * - **/ - distinct?: Enumerable - } - - /** - * Artist findFirst - */ - export interface ArtistFindFirstArgs extends ArtistFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Artist findFirstOrThrow - */ - export type ArtistFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter, which Artist to fetch. - * - **/ - where?: ArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Artists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Artists. - * - **/ - cursor?: ArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Artists 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` Artists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Artists. - * - **/ - distinct?: Enumerable - } - - - /** - * Artist findMany - */ - export type ArtistFindManyArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter, which Artists to fetch. - * - **/ - where?: ArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Artists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Artists. - * - **/ - cursor?: ArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Artists 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` Artists. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Artist create - */ - export type ArtistCreateArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * The data needed to create a Artist. - * - **/ - data: XOR - } - - - /** - * Artist update - */ - export type ArtistUpdateArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * The data needed to update a Artist. - * - **/ - data: XOR - /** - * Choose, which Artist to update. - * - **/ - where: ArtistWhereUniqueInput - } - - - /** - * Artist updateMany - */ - export type ArtistUpdateManyArgs = { - /** - * The data used to update Artists. - * - **/ - data: XOR - /** - * Filter which Artists to update - * - **/ - where?: ArtistWhereInput - } - - - /** - * Artist upsert - */ - export type ArtistUpsertArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * The filter to search for the Artist to update in case it exists. - * - **/ - where: ArtistWhereUniqueInput - /** - * In case the Artist found by the `where` argument doesn't exist, create a new Artist with this data. - * - **/ - create: XOR - /** - * In case the Artist was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Artist delete - */ - export type ArtistDeleteArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - /** - * Filter which Artist to delete. - * - **/ - where: ArtistWhereUniqueInput - } - - - /** - * Artist deleteMany - */ - export type ArtistDeleteManyArgs = { - /** - * Filter which Artists to delete - * - **/ - where?: ArtistWhereInput - } - - - /** - * Artist without action - */ - export type ArtistArgs = { - /** - * Select specific fields to fetch from the Artist - * - **/ - select?: ArtistSelect | null - } - - - - /** - * Model ArtistAlbum - */ - - - export type AggregateArtistAlbum = { - _count: ArtistAlbumCountAggregateOutputType | null - _avg: ArtistAlbumAvgAggregateOutputType | null - _sum: ArtistAlbumSumAggregateOutputType | null - _min: ArtistAlbumMinAggregateOutputType | null - _max: ArtistAlbumMaxAggregateOutputType | null - } - - export type ArtistAlbumAvgAggregateOutputType = { - id: number | null - } - - export type ArtistAlbumSumAggregateOutputType = { - id: number | null - } - - export type ArtistAlbumMinAggregateOutputType = { - id: number | null - hotAlbums: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type ArtistAlbumMaxAggregateOutputType = { - id: number | null - hotAlbums: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type ArtistAlbumCountAggregateOutputType = { - id: number - hotAlbums: number - createdAt: number - updatedAt: number - _all: number - } - - - export type ArtistAlbumAvgAggregateInputType = { - id?: true - } - - export type ArtistAlbumSumAggregateInputType = { - id?: true - } - - export type ArtistAlbumMinAggregateInputType = { - id?: true - hotAlbums?: true - createdAt?: true - updatedAt?: true - } - - export type ArtistAlbumMaxAggregateInputType = { - id?: true - hotAlbums?: true - createdAt?: true - updatedAt?: true - } - - export type ArtistAlbumCountAggregateInputType = { - id?: true - hotAlbums?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type ArtistAlbumAggregateArgs = { - /** - * Filter which ArtistAlbum to aggregate. - * - **/ - where?: ArtistAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ArtistAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: ArtistAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ArtistAlbums 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` ArtistAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ArtistAlbums - **/ - _count?: true | ArtistAlbumCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ArtistAlbumAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ArtistAlbumSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ArtistAlbumMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ArtistAlbumMaxAggregateInputType - } - - export type GetArtistAlbumAggregateType = { - [P in keyof T & keyof AggregateArtistAlbum]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ArtistAlbumGroupByArgs = { - where?: ArtistAlbumWhereInput - orderBy?: Enumerable - by: Array - having?: ArtistAlbumScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ArtistAlbumCountAggregateInputType | true - _avg?: ArtistAlbumAvgAggregateInputType - _sum?: ArtistAlbumSumAggregateInputType - _min?: ArtistAlbumMinAggregateInputType - _max?: ArtistAlbumMaxAggregateInputType - } - - - export type ArtistAlbumGroupByOutputType = { - id: number - hotAlbums: string - createdAt: Date - updatedAt: Date - _count: ArtistAlbumCountAggregateOutputType | null - _avg: ArtistAlbumAvgAggregateOutputType | null - _sum: ArtistAlbumSumAggregateOutputType | null - _min: ArtistAlbumMinAggregateOutputType | null - _max: ArtistAlbumMaxAggregateOutputType | null - } - - type GetArtistAlbumGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof ArtistAlbumGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ArtistAlbumSelect = { - id?: boolean - hotAlbums?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type ArtistAlbumGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? ArtistAlbum : - S extends undefined ? never : - S extends { include: any } & (ArtistAlbumArgs | ArtistAlbumFindManyArgs) - ? ArtistAlbum - : S extends { select: any } & (ArtistAlbumArgs | ArtistAlbumFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof ArtistAlbum ? ArtistAlbum[P] : never - } - : ArtistAlbum - - - type ArtistAlbumCountArgs = Merge< - Omit & { - select?: ArtistAlbumCountAggregateInputType | true - } - > - - export interface ArtistAlbumDelegate { - /** - * Find zero or one ArtistAlbum that matches the filter. - * @param {ArtistAlbumFindUniqueArgs} args - Arguments to find a ArtistAlbum - * @example - * // Get one ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__ArtistAlbumClient> : Prisma__ArtistAlbumClient | null, null> - - /** - * Find one ArtistAlbum that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ArtistAlbumFindUniqueOrThrowArgs} args - Arguments to find a ArtistAlbum - * @example - * // Get one ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Find the first ArtistAlbum 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 {ArtistAlbumFindFirstArgs} args - Arguments to find a ArtistAlbum - * @example - * // Get one ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__ArtistAlbumClient> : Prisma__ArtistAlbumClient | null, null> - - /** - * Find the first ArtistAlbum that matches the filter or - * throw `NotFoundError` 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 {ArtistAlbumFindFirstOrThrowArgs} args - Arguments to find a ArtistAlbum - * @example - * // Get one ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Find zero or more ArtistAlbums 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 {ArtistAlbumFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all ArtistAlbums - * const artistAlbums = await prisma.artistAlbum.findMany() - * - * // Get first 10 ArtistAlbums - * const artistAlbums = await prisma.artistAlbum.findMany({ take: 10 }) - * - * // Only select the `id` - * const artistAlbumWithIdOnly = await prisma.artistAlbum.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a ArtistAlbum. - * @param {ArtistAlbumCreateArgs} args - Arguments to create a ArtistAlbum. - * @example - * // Create one ArtistAlbum - * const ArtistAlbum = await prisma.artistAlbum.create({ - * data: { - * // ... data to create a ArtistAlbum - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Delete a ArtistAlbum. - * @param {ArtistAlbumDeleteArgs} args - Arguments to delete one ArtistAlbum. - * @example - * // Delete one ArtistAlbum - * const ArtistAlbum = await prisma.artistAlbum.delete({ - * where: { - * // ... filter to delete one ArtistAlbum - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Update one ArtistAlbum. - * @param {ArtistAlbumUpdateArgs} args - Arguments to update one ArtistAlbum. - * @example - * // Update one ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Delete zero or more ArtistAlbums. - * @param {ArtistAlbumDeleteManyArgs} args - Arguments to filter ArtistAlbums to delete. - * @example - * // Delete a few ArtistAlbums - * const { count } = await prisma.artistAlbum.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more ArtistAlbums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistAlbumUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ArtistAlbums - * const artistAlbum = await prisma.artistAlbum.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one ArtistAlbum. - * @param {ArtistAlbumUpsertArgs} args - Arguments to update or create a ArtistAlbum. - * @example - * // Update or create a ArtistAlbum - * const artistAlbum = await prisma.artistAlbum.upsert({ - * create: { - * // ... data to create a ArtistAlbum - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ArtistAlbum we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__ArtistAlbumClient> - - /** - * Count the number of ArtistAlbums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistAlbumCountArgs} args - Arguments to filter ArtistAlbums to count. - * @example - * // Count the number of ArtistAlbums - * const count = await prisma.artistAlbum.count({ - * where: { - * // ... the filter for the ArtistAlbums we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ArtistAlbum. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistAlbumAggregateArgs} 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): PrismaPromise> - - /** - * Group by ArtistAlbum. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ArtistAlbumGroupByArgs} 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 ArtistAlbumGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ArtistAlbumGroupByArgs['orderBy'] } - : { orderBy?: ArtistAlbumGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetArtistAlbumGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for ArtistAlbum. - * 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 class Prisma__ArtistAlbumClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * ArtistAlbum base type for findUnique actions - */ - export type ArtistAlbumFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter, which ArtistAlbum to fetch. - * - **/ - where: ArtistAlbumWhereUniqueInput - } - - /** - * ArtistAlbum findUnique - */ - export interface ArtistAlbumFindUniqueArgs extends ArtistAlbumFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * ArtistAlbum findUniqueOrThrow - */ - export type ArtistAlbumFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter, which ArtistAlbum to fetch. - * - **/ - where: ArtistAlbumWhereUniqueInput - } - - - /** - * ArtistAlbum base type for findFirst actions - */ - export type ArtistAlbumFindFirstArgsBase = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter, which ArtistAlbum to fetch. - * - **/ - where?: ArtistAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ArtistAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ArtistAlbums. - * - **/ - cursor?: ArtistAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ArtistAlbums 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` ArtistAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ArtistAlbums. - * - **/ - distinct?: Enumerable - } - - /** - * ArtistAlbum findFirst - */ - export interface ArtistAlbumFindFirstArgs extends ArtistAlbumFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * ArtistAlbum findFirstOrThrow - */ - export type ArtistAlbumFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter, which ArtistAlbum to fetch. - * - **/ - where?: ArtistAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ArtistAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ArtistAlbums. - * - **/ - cursor?: ArtistAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ArtistAlbums 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` ArtistAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ArtistAlbums. - * - **/ - distinct?: Enumerable - } - - - /** - * ArtistAlbum findMany - */ - export type ArtistAlbumFindManyArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter, which ArtistAlbums to fetch. - * - **/ - where?: ArtistAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ArtistAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ArtistAlbums. - * - **/ - cursor?: ArtistAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ArtistAlbums 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` ArtistAlbums. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * ArtistAlbum create - */ - export type ArtistAlbumCreateArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * The data needed to create a ArtistAlbum. - * - **/ - data: XOR - } - - - /** - * ArtistAlbum update - */ - export type ArtistAlbumUpdateArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * The data needed to update a ArtistAlbum. - * - **/ - data: XOR - /** - * Choose, which ArtistAlbum to update. - * - **/ - where: ArtistAlbumWhereUniqueInput - } - - - /** - * ArtistAlbum updateMany - */ - export type ArtistAlbumUpdateManyArgs = { - /** - * The data used to update ArtistAlbums. - * - **/ - data: XOR - /** - * Filter which ArtistAlbums to update - * - **/ - where?: ArtistAlbumWhereInput - } - - - /** - * ArtistAlbum upsert - */ - export type ArtistAlbumUpsertArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * The filter to search for the ArtistAlbum to update in case it exists. - * - **/ - where: ArtistAlbumWhereUniqueInput - /** - * In case the ArtistAlbum found by the `where` argument doesn't exist, create a new ArtistAlbum with this data. - * - **/ - create: XOR - /** - * In case the ArtistAlbum was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * ArtistAlbum delete - */ - export type ArtistAlbumDeleteArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - /** - * Filter which ArtistAlbum to delete. - * - **/ - where: ArtistAlbumWhereUniqueInput - } - - - /** - * ArtistAlbum deleteMany - */ - export type ArtistAlbumDeleteManyArgs = { - /** - * Filter which ArtistAlbums to delete - * - **/ - where?: ArtistAlbumWhereInput - } - - - /** - * ArtistAlbum without action - */ - export type ArtistAlbumArgs = { - /** - * Select specific fields to fetch from the ArtistAlbum - * - **/ - select?: ArtistAlbumSelect | null - } - - - - /** - * Model Playlist - */ - - - export type AggregatePlaylist = { - _count: PlaylistCountAggregateOutputType | null - _avg: PlaylistAvgAggregateOutputType | null - _sum: PlaylistSumAggregateOutputType | null - _min: PlaylistMinAggregateOutputType | null - _max: PlaylistMaxAggregateOutputType | null - } - - export type PlaylistAvgAggregateOutputType = { - id: number | null - } - - export type PlaylistSumAggregateOutputType = { - id: number | null - } - - export type PlaylistMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type PlaylistMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type PlaylistCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type PlaylistAvgAggregateInputType = { - id?: true - } - - export type PlaylistSumAggregateInputType = { - id?: true - } - - export type PlaylistMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type PlaylistMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type PlaylistCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type PlaylistAggregateArgs = { - /** - * Filter which Playlist to aggregate. - * - **/ - where?: PlaylistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Playlists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: PlaylistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Playlists 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` Playlists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Playlists - **/ - _count?: true | PlaylistCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PlaylistAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PlaylistSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PlaylistMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PlaylistMaxAggregateInputType - } - - export type GetPlaylistAggregateType = { - [P in keyof T & keyof AggregatePlaylist]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type PlaylistGroupByArgs = { - where?: PlaylistWhereInput - orderBy?: Enumerable - by: Array - having?: PlaylistScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PlaylistCountAggregateInputType | true - _avg?: PlaylistAvgAggregateInputType - _sum?: PlaylistSumAggregateInputType - _min?: PlaylistMinAggregateInputType - _max?: PlaylistMaxAggregateInputType - } - - - export type PlaylistGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: PlaylistCountAggregateOutputType | null - _avg: PlaylistAvgAggregateOutputType | null - _sum: PlaylistSumAggregateOutputType | null - _min: PlaylistMinAggregateOutputType | null - _max: PlaylistMaxAggregateOutputType | null - } - - type GetPlaylistGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof PlaylistGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type PlaylistSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type PlaylistGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Playlist : - S extends undefined ? never : - S extends { include: any } & (PlaylistArgs | PlaylistFindManyArgs) - ? Playlist - : S extends { select: any } & (PlaylistArgs | PlaylistFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Playlist ? Playlist[P] : never - } - : Playlist - - - type PlaylistCountArgs = Merge< - Omit & { - select?: PlaylistCountAggregateInputType | true - } - > - - export interface PlaylistDelegate { - /** - * Find zero or one Playlist that matches the filter. - * @param {PlaylistFindUniqueArgs} args - Arguments to find a Playlist - * @example - * // Get one Playlist - * const playlist = await prisma.playlist.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__PlaylistClient> : Prisma__PlaylistClient | null, null> - - /** - * Find one Playlist that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PlaylistFindUniqueOrThrowArgs} args - Arguments to find a Playlist - * @example - * // Get one Playlist - * const playlist = await prisma.playlist.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Find the first Playlist 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 {PlaylistFindFirstArgs} args - Arguments to find a Playlist - * @example - * // Get one Playlist - * const playlist = await prisma.playlist.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__PlaylistClient> : Prisma__PlaylistClient | null, null> - - /** - * Find the first Playlist that matches the filter or - * throw `NotFoundError` 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 {PlaylistFindFirstOrThrowArgs} args - Arguments to find a Playlist - * @example - * // Get one Playlist - * const playlist = await prisma.playlist.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Find zero or more Playlists 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 {PlaylistFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Playlists - * const playlists = await prisma.playlist.findMany() - * - * // Get first 10 Playlists - * const playlists = await prisma.playlist.findMany({ take: 10 }) - * - * // Only select the `id` - * const playlistWithIdOnly = await prisma.playlist.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Playlist. - * @param {PlaylistCreateArgs} args - Arguments to create a Playlist. - * @example - * // Create one Playlist - * const Playlist = await prisma.playlist.create({ - * data: { - * // ... data to create a Playlist - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Delete a Playlist. - * @param {PlaylistDeleteArgs} args - Arguments to delete one Playlist. - * @example - * // Delete one Playlist - * const Playlist = await prisma.playlist.delete({ - * where: { - * // ... filter to delete one Playlist - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Update one Playlist. - * @param {PlaylistUpdateArgs} args - Arguments to update one Playlist. - * @example - * // Update one Playlist - * const playlist = await prisma.playlist.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Delete zero or more Playlists. - * @param {PlaylistDeleteManyArgs} args - Arguments to filter Playlists to delete. - * @example - * // Delete a few Playlists - * const { count } = await prisma.playlist.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Playlists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PlaylistUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Playlists - * const playlist = await prisma.playlist.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Playlist. - * @param {PlaylistUpsertArgs} args - Arguments to update or create a Playlist. - * @example - * // Update or create a Playlist - * const playlist = await prisma.playlist.upsert({ - * create: { - * // ... data to create a Playlist - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Playlist we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__PlaylistClient> - - /** - * Count the number of Playlists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PlaylistCountArgs} args - Arguments to filter Playlists to count. - * @example - * // Count the number of Playlists - * const count = await prisma.playlist.count({ - * where: { - * // ... the filter for the Playlists we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Playlist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PlaylistAggregateArgs} 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): PrismaPromise> - - /** - * Group by Playlist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PlaylistGroupByArgs} 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 PlaylistGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: PlaylistGroupByArgs['orderBy'] } - : { orderBy?: PlaylistGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetPlaylistGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Playlist. - * 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 class Prisma__PlaylistClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Playlist base type for findUnique actions - */ - export type PlaylistFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter, which Playlist to fetch. - * - **/ - where: PlaylistWhereUniqueInput - } - - /** - * Playlist findUnique - */ - export interface PlaylistFindUniqueArgs extends PlaylistFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Playlist findUniqueOrThrow - */ - export type PlaylistFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter, which Playlist to fetch. - * - **/ - where: PlaylistWhereUniqueInput - } - - - /** - * Playlist base type for findFirst actions - */ - export type PlaylistFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter, which Playlist to fetch. - * - **/ - where?: PlaylistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Playlists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Playlists. - * - **/ - cursor?: PlaylistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Playlists 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` Playlists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Playlists. - * - **/ - distinct?: Enumerable - } - - /** - * Playlist findFirst - */ - export interface PlaylistFindFirstArgs extends PlaylistFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Playlist findFirstOrThrow - */ - export type PlaylistFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter, which Playlist to fetch. - * - **/ - where?: PlaylistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Playlists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Playlists. - * - **/ - cursor?: PlaylistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Playlists 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` Playlists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Playlists. - * - **/ - distinct?: Enumerable - } - - - /** - * Playlist findMany - */ - export type PlaylistFindManyArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter, which Playlists to fetch. - * - **/ - where?: PlaylistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Playlists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Playlists. - * - **/ - cursor?: PlaylistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Playlists 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` Playlists. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Playlist create - */ - export type PlaylistCreateArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * The data needed to create a Playlist. - * - **/ - data: XOR - } - - - /** - * Playlist update - */ - export type PlaylistUpdateArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * The data needed to update a Playlist. - * - **/ - data: XOR - /** - * Choose, which Playlist to update. - * - **/ - where: PlaylistWhereUniqueInput - } - - - /** - * Playlist updateMany - */ - export type PlaylistUpdateManyArgs = { - /** - * The data used to update Playlists. - * - **/ - data: XOR - /** - * Filter which Playlists to update - * - **/ - where?: PlaylistWhereInput - } - - - /** - * Playlist upsert - */ - export type PlaylistUpsertArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * The filter to search for the Playlist to update in case it exists. - * - **/ - where: PlaylistWhereUniqueInput - /** - * In case the Playlist found by the `where` argument doesn't exist, create a new Playlist with this data. - * - **/ - create: XOR - /** - * In case the Playlist was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Playlist delete - */ - export type PlaylistDeleteArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - /** - * Filter which Playlist to delete. - * - **/ - where: PlaylistWhereUniqueInput - } - - - /** - * Playlist deleteMany - */ - export type PlaylistDeleteManyArgs = { - /** - * Filter which Playlists to delete - * - **/ - where?: PlaylistWhereInput - } - - - /** - * Playlist without action - */ - export type PlaylistArgs = { - /** - * Select specific fields to fetch from the Playlist - * - **/ - select?: PlaylistSelect | null - } - - - - /** - * Model Audio - */ - - - export type AggregateAudio = { - _count: AudioCountAggregateOutputType | null - _avg: AudioAvgAggregateOutputType | null - _sum: AudioSumAggregateOutputType | null - _min: AudioMinAggregateOutputType | null - _max: AudioMaxAggregateOutputType | null - } - - export type AudioAvgAggregateOutputType = { - id: number | null - bitRate: number | null - } - - export type AudioSumAggregateOutputType = { - id: number | null - bitRate: number | null - } - - export type AudioMinAggregateOutputType = { - id: number | null - bitRate: number | null - format: string | null - source: string | null - createdAt: Date | null - updatedAt: Date | null - queriedAt: Date | null - } - - export type AudioMaxAggregateOutputType = { - id: number | null - bitRate: number | null - format: string | null - source: string | null - createdAt: Date | null - updatedAt: Date | null - queriedAt: Date | null - } - - export type AudioCountAggregateOutputType = { - id: number - bitRate: number - format: number - source: number - createdAt: number - updatedAt: number - queriedAt: number - _all: number - } - - - export type AudioAvgAggregateInputType = { - id?: true - bitRate?: true - } - - export type AudioSumAggregateInputType = { - id?: true - bitRate?: true - } - - export type AudioMinAggregateInputType = { - id?: true - bitRate?: true - format?: true - source?: true - createdAt?: true - updatedAt?: true - queriedAt?: true - } - - export type AudioMaxAggregateInputType = { - id?: true - bitRate?: true - format?: true - source?: true - createdAt?: true - updatedAt?: true - queriedAt?: true - } - - export type AudioCountAggregateInputType = { - id?: true - bitRate?: true - format?: true - source?: true - createdAt?: true - updatedAt?: true - queriedAt?: true - _all?: true - } - - export type AudioAggregateArgs = { - /** - * Filter which Audio to aggregate. - * - **/ - where?: AudioWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Audio to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AudioWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Audio 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` Audio. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Audio - **/ - _count?: true | AudioCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AudioAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AudioSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AudioMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AudioMaxAggregateInputType - } - - export type GetAudioAggregateType = { - [P in keyof T & keyof AggregateAudio]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AudioGroupByArgs = { - where?: AudioWhereInput - orderBy?: Enumerable - by: Array - having?: AudioScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AudioCountAggregateInputType | true - _avg?: AudioAvgAggregateInputType - _sum?: AudioSumAggregateInputType - _min?: AudioMinAggregateInputType - _max?: AudioMaxAggregateInputType - } - - - export type AudioGroupByOutputType = { - id: number - bitRate: number - format: string - source: string - createdAt: Date - updatedAt: Date - queriedAt: Date - _count: AudioCountAggregateOutputType | null - _avg: AudioAvgAggregateOutputType | null - _sum: AudioSumAggregateOutputType | null - _min: AudioMinAggregateOutputType | null - _max: AudioMaxAggregateOutputType | null - } - - type GetAudioGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AudioGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AudioSelect = { - id?: boolean - bitRate?: boolean - format?: boolean - source?: boolean - createdAt?: boolean - updatedAt?: boolean - queriedAt?: boolean - } - - - export type AudioGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Audio : - S extends undefined ? never : - S extends { include: any } & (AudioArgs | AudioFindManyArgs) - ? Audio - : S extends { select: any } & (AudioArgs | AudioFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Audio ? Audio[P] : never - } - : Audio - - - type AudioCountArgs = Merge< - Omit & { - select?: AudioCountAggregateInputType | true - } - > - - export interface AudioDelegate { - /** - * Find zero or one Audio that matches the filter. - * @param {AudioFindUniqueArgs} args - Arguments to find a Audio - * @example - * // Get one Audio - * const audio = await prisma.audio.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AudioClient> : Prisma__AudioClient | null, null> - - /** - * Find one Audio that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AudioFindUniqueOrThrowArgs} args - Arguments to find a Audio - * @example - * // Get one Audio - * const audio = await prisma.audio.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AudioClient> - - /** - * Find the first Audio 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 {AudioFindFirstArgs} args - Arguments to find a Audio - * @example - * // Get one Audio - * const audio = await prisma.audio.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AudioClient> : Prisma__AudioClient | null, null> - - /** - * Find the first Audio that matches the filter or - * throw `NotFoundError` 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 {AudioFindFirstOrThrowArgs} args - Arguments to find a Audio - * @example - * // Get one Audio - * const audio = await prisma.audio.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AudioClient> - - /** - * Find zero or more Audio 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 {AudioFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Audio - * const audio = await prisma.audio.findMany() - * - * // Get first 10 Audio - * const audio = await prisma.audio.findMany({ take: 10 }) - * - * // Only select the `id` - * const audioWithIdOnly = await prisma.audio.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Audio. - * @param {AudioCreateArgs} args - Arguments to create a Audio. - * @example - * // Create one Audio - * const Audio = await prisma.audio.create({ - * data: { - * // ... data to create a Audio - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AudioClient> - - /** - * Delete a Audio. - * @param {AudioDeleteArgs} args - Arguments to delete one Audio. - * @example - * // Delete one Audio - * const Audio = await prisma.audio.delete({ - * where: { - * // ... filter to delete one Audio - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AudioClient> - - /** - * Update one Audio. - * @param {AudioUpdateArgs} args - Arguments to update one Audio. - * @example - * // Update one Audio - * const audio = await prisma.audio.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AudioClient> - - /** - * Delete zero or more Audio. - * @param {AudioDeleteManyArgs} args - Arguments to filter Audio to delete. - * @example - * // Delete a few Audio - * const { count } = await prisma.audio.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Audio. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AudioUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Audio - * const audio = await prisma.audio.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Audio. - * @param {AudioUpsertArgs} args - Arguments to update or create a Audio. - * @example - * // Update or create a Audio - * const audio = await prisma.audio.upsert({ - * create: { - * // ... data to create a Audio - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Audio we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AudioClient> - - /** - * Count the number of Audio. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AudioCountArgs} args - Arguments to filter Audio to count. - * @example - * // Count the number of Audio - * const count = await prisma.audio.count({ - * where: { - * // ... the filter for the Audio we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Audio. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AudioAggregateArgs} 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): PrismaPromise> - - /** - * Group by Audio. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AudioGroupByArgs} 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 AudioGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AudioGroupByArgs['orderBy'] } - : { orderBy?: AudioGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAudioGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Audio. - * 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 class Prisma__AudioClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Audio base type for findUnique actions - */ - export type AudioFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter, which Audio to fetch. - * - **/ - where: AudioWhereUniqueInput - } - - /** - * Audio findUnique - */ - export interface AudioFindUniqueArgs extends AudioFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Audio findUniqueOrThrow - */ - export type AudioFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter, which Audio to fetch. - * - **/ - where: AudioWhereUniqueInput - } - - - /** - * Audio base type for findFirst actions - */ - export type AudioFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter, which Audio to fetch. - * - **/ - where?: AudioWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Audio to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Audio. - * - **/ - cursor?: AudioWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Audio 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` Audio. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Audio. - * - **/ - distinct?: Enumerable - } - - /** - * Audio findFirst - */ - export interface AudioFindFirstArgs extends AudioFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Audio findFirstOrThrow - */ - export type AudioFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter, which Audio to fetch. - * - **/ - where?: AudioWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Audio to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Audio. - * - **/ - cursor?: AudioWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Audio 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` Audio. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Audio. - * - **/ - distinct?: Enumerable - } - - - /** - * Audio findMany - */ - export type AudioFindManyArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter, which Audio to fetch. - * - **/ - where?: AudioWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Audio to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Audio. - * - **/ - cursor?: AudioWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Audio 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` Audio. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Audio create - */ - export type AudioCreateArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * The data needed to create a Audio. - * - **/ - data: XOR - } - - - /** - * Audio update - */ - export type AudioUpdateArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * The data needed to update a Audio. - * - **/ - data: XOR - /** - * Choose, which Audio to update. - * - **/ - where: AudioWhereUniqueInput - } - - - /** - * Audio updateMany - */ - export type AudioUpdateManyArgs = { - /** - * The data used to update Audio. - * - **/ - data: XOR - /** - * Filter which Audio to update - * - **/ - where?: AudioWhereInput - } - - - /** - * Audio upsert - */ - export type AudioUpsertArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * The filter to search for the Audio to update in case it exists. - * - **/ - where: AudioWhereUniqueInput - /** - * In case the Audio found by the `where` argument doesn't exist, create a new Audio with this data. - * - **/ - create: XOR - /** - * In case the Audio was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Audio delete - */ - export type AudioDeleteArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - /** - * Filter which Audio to delete. - * - **/ - where: AudioWhereUniqueInput - } - - - /** - * Audio deleteMany - */ - export type AudioDeleteManyArgs = { - /** - * Filter which Audio to delete - * - **/ - where?: AudioWhereInput - } - - - /** - * Audio without action - */ - export type AudioArgs = { - /** - * Select specific fields to fetch from the Audio - * - **/ - select?: AudioSelect | null - } - - - - /** - * Model Lyrics - */ - - - export type AggregateLyrics = { - _count: LyricsCountAggregateOutputType | null - _avg: LyricsAvgAggregateOutputType | null - _sum: LyricsSumAggregateOutputType | null - _min: LyricsMinAggregateOutputType | null - _max: LyricsMaxAggregateOutputType | null - } - - export type LyricsAvgAggregateOutputType = { - id: number | null - } - - export type LyricsSumAggregateOutputType = { - id: number | null - } - - export type LyricsMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type LyricsMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type LyricsCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type LyricsAvgAggregateInputType = { - id?: true - } - - export type LyricsSumAggregateInputType = { - id?: true - } - - export type LyricsMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type LyricsMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type LyricsCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type LyricsAggregateArgs = { - /** - * Filter which Lyrics to aggregate. - * - **/ - where?: LyricsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Lyrics to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: LyricsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Lyrics 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` Lyrics. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Lyrics - **/ - _count?: true | LyricsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: LyricsAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: LyricsSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: LyricsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: LyricsMaxAggregateInputType - } - - export type GetLyricsAggregateType = { - [P in keyof T & keyof AggregateLyrics]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type LyricsGroupByArgs = { - where?: LyricsWhereInput - orderBy?: Enumerable - by: Array - having?: LyricsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: LyricsCountAggregateInputType | true - _avg?: LyricsAvgAggregateInputType - _sum?: LyricsSumAggregateInputType - _min?: LyricsMinAggregateInputType - _max?: LyricsMaxAggregateInputType - } - - - export type LyricsGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: LyricsCountAggregateOutputType | null - _avg: LyricsAvgAggregateOutputType | null - _sum: LyricsSumAggregateOutputType | null - _min: LyricsMinAggregateOutputType | null - _max: LyricsMaxAggregateOutputType | null - } - - type GetLyricsGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof LyricsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type LyricsSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type LyricsGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? Lyrics : - S extends undefined ? never : - S extends { include: any } & (LyricsArgs | LyricsFindManyArgs) - ? Lyrics - : S extends { select: any } & (LyricsArgs | LyricsFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof Lyrics ? Lyrics[P] : never - } - : Lyrics - - - type LyricsCountArgs = Merge< - Omit & { - select?: LyricsCountAggregateInputType | true - } - > - - export interface LyricsDelegate { - /** - * Find zero or one Lyrics that matches the filter. - * @param {LyricsFindUniqueArgs} args - Arguments to find a Lyrics - * @example - * // Get one Lyrics - * const lyrics = await prisma.lyrics.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__LyricsClient> : Prisma__LyricsClient | null, null> - - /** - * Find one Lyrics that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {LyricsFindUniqueOrThrowArgs} args - Arguments to find a Lyrics - * @example - * // Get one Lyrics - * const lyrics = await prisma.lyrics.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__LyricsClient> - - /** - * Find the first Lyrics 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 {LyricsFindFirstArgs} args - Arguments to find a Lyrics - * @example - * // Get one Lyrics - * const lyrics = await prisma.lyrics.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__LyricsClient> : Prisma__LyricsClient | null, null> - - /** - * Find the first Lyrics that matches the filter or - * throw `NotFoundError` 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 {LyricsFindFirstOrThrowArgs} args - Arguments to find a Lyrics - * @example - * // Get one Lyrics - * const lyrics = await prisma.lyrics.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__LyricsClient> - - /** - * Find zero or more Lyrics 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 {LyricsFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Lyrics - * const lyrics = await prisma.lyrics.findMany() - * - * // Get first 10 Lyrics - * const lyrics = await prisma.lyrics.findMany({ take: 10 }) - * - * // Only select the `id` - * const lyricsWithIdOnly = await prisma.lyrics.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a Lyrics. - * @param {LyricsCreateArgs} args - Arguments to create a Lyrics. - * @example - * // Create one Lyrics - * const Lyrics = await prisma.lyrics.create({ - * data: { - * // ... data to create a Lyrics - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__LyricsClient> - - /** - * Delete a Lyrics. - * @param {LyricsDeleteArgs} args - Arguments to delete one Lyrics. - * @example - * // Delete one Lyrics - * const Lyrics = await prisma.lyrics.delete({ - * where: { - * // ... filter to delete one Lyrics - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__LyricsClient> - - /** - * Update one Lyrics. - * @param {LyricsUpdateArgs} args - Arguments to update one Lyrics. - * @example - * // Update one Lyrics - * const lyrics = await prisma.lyrics.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__LyricsClient> - - /** - * Delete zero or more Lyrics. - * @param {LyricsDeleteManyArgs} args - Arguments to filter Lyrics to delete. - * @example - * // Delete a few Lyrics - * const { count } = await prisma.lyrics.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more Lyrics. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LyricsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Lyrics - * const lyrics = await prisma.lyrics.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one Lyrics. - * @param {LyricsUpsertArgs} args - Arguments to update or create a Lyrics. - * @example - * // Update or create a Lyrics - * const lyrics = await prisma.lyrics.upsert({ - * create: { - * // ... data to create a Lyrics - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Lyrics we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__LyricsClient> - - /** - * Count the number of Lyrics. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LyricsCountArgs} args - Arguments to filter Lyrics to count. - * @example - * // Count the number of Lyrics - * const count = await prisma.lyrics.count({ - * where: { - * // ... the filter for the Lyrics we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Lyrics. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LyricsAggregateArgs} 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): PrismaPromise> - - /** - * Group by Lyrics. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LyricsGroupByArgs} 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 LyricsGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: LyricsGroupByArgs['orderBy'] } - : { orderBy?: LyricsGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetLyricsGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Lyrics. - * 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 class Prisma__LyricsClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * Lyrics base type for findUnique actions - */ - export type LyricsFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter, which Lyrics to fetch. - * - **/ - where: LyricsWhereUniqueInput - } - - /** - * Lyrics findUnique - */ - export interface LyricsFindUniqueArgs extends LyricsFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Lyrics findUniqueOrThrow - */ - export type LyricsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter, which Lyrics to fetch. - * - **/ - where: LyricsWhereUniqueInput - } - - - /** - * Lyrics base type for findFirst actions - */ - export type LyricsFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter, which Lyrics to fetch. - * - **/ - where?: LyricsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Lyrics to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Lyrics. - * - **/ - cursor?: LyricsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Lyrics 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` Lyrics. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Lyrics. - * - **/ - distinct?: Enumerable - } - - /** - * Lyrics findFirst - */ - export interface LyricsFindFirstArgs extends LyricsFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Lyrics findFirstOrThrow - */ - export type LyricsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter, which Lyrics to fetch. - * - **/ - where?: LyricsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Lyrics to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Lyrics. - * - **/ - cursor?: LyricsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Lyrics 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` Lyrics. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Lyrics. - * - **/ - distinct?: Enumerable - } - - - /** - * Lyrics findMany - */ - export type LyricsFindManyArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter, which Lyrics to fetch. - * - **/ - where?: LyricsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Lyrics to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Lyrics. - * - **/ - cursor?: LyricsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Lyrics 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` Lyrics. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * Lyrics create - */ - export type LyricsCreateArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * The data needed to create a Lyrics. - * - **/ - data: XOR - } - - - /** - * Lyrics update - */ - export type LyricsUpdateArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * The data needed to update a Lyrics. - * - **/ - data: XOR - /** - * Choose, which Lyrics to update. - * - **/ - where: LyricsWhereUniqueInput - } - - - /** - * Lyrics updateMany - */ - export type LyricsUpdateManyArgs = { - /** - * The data used to update Lyrics. - * - **/ - data: XOR - /** - * Filter which Lyrics to update - * - **/ - where?: LyricsWhereInput - } - - - /** - * Lyrics upsert - */ - export type LyricsUpsertArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * The filter to search for the Lyrics to update in case it exists. - * - **/ - where: LyricsWhereUniqueInput - /** - * In case the Lyrics found by the `where` argument doesn't exist, create a new Lyrics with this data. - * - **/ - create: XOR - /** - * In case the Lyrics was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * Lyrics delete - */ - export type LyricsDeleteArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - /** - * Filter which Lyrics to delete. - * - **/ - where: LyricsWhereUniqueInput - } - - - /** - * Lyrics deleteMany - */ - export type LyricsDeleteManyArgs = { - /** - * Filter which Lyrics to delete - * - **/ - where?: LyricsWhereInput - } - - - /** - * Lyrics without action - */ - export type LyricsArgs = { - /** - * Select specific fields to fetch from the Lyrics - * - **/ - select?: LyricsSelect | null - } - - - - /** - * Model AppleMusicAlbum - */ - - - export type AggregateAppleMusicAlbum = { - _count: AppleMusicAlbumCountAggregateOutputType | null - _avg: AppleMusicAlbumAvgAggregateOutputType | null - _sum: AppleMusicAlbumSumAggregateOutputType | null - _min: AppleMusicAlbumMinAggregateOutputType | null - _max: AppleMusicAlbumMaxAggregateOutputType | null - } - - export type AppleMusicAlbumAvgAggregateOutputType = { - id: number | null - } - - export type AppleMusicAlbumSumAggregateOutputType = { - id: number | null - } - - export type AppleMusicAlbumMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AppleMusicAlbumMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AppleMusicAlbumCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type AppleMusicAlbumAvgAggregateInputType = { - id?: true - } - - export type AppleMusicAlbumSumAggregateInputType = { - id?: true - } - - export type AppleMusicAlbumMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AppleMusicAlbumMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AppleMusicAlbumCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type AppleMusicAlbumAggregateArgs = { - /** - * Filter which AppleMusicAlbum to aggregate. - * - **/ - where?: AppleMusicAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AppleMusicAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicAlbums 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` AppleMusicAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AppleMusicAlbums - **/ - _count?: true | AppleMusicAlbumCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AppleMusicAlbumAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AppleMusicAlbumSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AppleMusicAlbumMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AppleMusicAlbumMaxAggregateInputType - } - - export type GetAppleMusicAlbumAggregateType = { - [P in keyof T & keyof AggregateAppleMusicAlbum]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AppleMusicAlbumGroupByArgs = { - where?: AppleMusicAlbumWhereInput - orderBy?: Enumerable - by: Array - having?: AppleMusicAlbumScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AppleMusicAlbumCountAggregateInputType | true - _avg?: AppleMusicAlbumAvgAggregateInputType - _sum?: AppleMusicAlbumSumAggregateInputType - _min?: AppleMusicAlbumMinAggregateInputType - _max?: AppleMusicAlbumMaxAggregateInputType - } - - - export type AppleMusicAlbumGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: AppleMusicAlbumCountAggregateOutputType | null - _avg: AppleMusicAlbumAvgAggregateOutputType | null - _sum: AppleMusicAlbumSumAggregateOutputType | null - _min: AppleMusicAlbumMinAggregateOutputType | null - _max: AppleMusicAlbumMaxAggregateOutputType | null - } - - type GetAppleMusicAlbumGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AppleMusicAlbumGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AppleMusicAlbumSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type AppleMusicAlbumGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? AppleMusicAlbum : - S extends undefined ? never : - S extends { include: any } & (AppleMusicAlbumArgs | AppleMusicAlbumFindManyArgs) - ? AppleMusicAlbum - : S extends { select: any } & (AppleMusicAlbumArgs | AppleMusicAlbumFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof AppleMusicAlbum ? AppleMusicAlbum[P] : never - } - : AppleMusicAlbum - - - type AppleMusicAlbumCountArgs = Merge< - Omit & { - select?: AppleMusicAlbumCountAggregateInputType | true - } - > - - export interface AppleMusicAlbumDelegate { - /** - * Find zero or one AppleMusicAlbum that matches the filter. - * @param {AppleMusicAlbumFindUniqueArgs} args - Arguments to find a AppleMusicAlbum - * @example - * // Get one AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AppleMusicAlbumClient> : Prisma__AppleMusicAlbumClient | null, null> - - /** - * Find one AppleMusicAlbum that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AppleMusicAlbumFindUniqueOrThrowArgs} args - Arguments to find a AppleMusicAlbum - * @example - * // Get one AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Find the first AppleMusicAlbum 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 {AppleMusicAlbumFindFirstArgs} args - Arguments to find a AppleMusicAlbum - * @example - * // Get one AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AppleMusicAlbumClient> : Prisma__AppleMusicAlbumClient | null, null> - - /** - * Find the first AppleMusicAlbum that matches the filter or - * throw `NotFoundError` 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 {AppleMusicAlbumFindFirstOrThrowArgs} args - Arguments to find a AppleMusicAlbum - * @example - * // Get one AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Find zero or more AppleMusicAlbums 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 {AppleMusicAlbumFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all AppleMusicAlbums - * const appleMusicAlbums = await prisma.appleMusicAlbum.findMany() - * - * // Get first 10 AppleMusicAlbums - * const appleMusicAlbums = await prisma.appleMusicAlbum.findMany({ take: 10 }) - * - * // Only select the `id` - * const appleMusicAlbumWithIdOnly = await prisma.appleMusicAlbum.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a AppleMusicAlbum. - * @param {AppleMusicAlbumCreateArgs} args - Arguments to create a AppleMusicAlbum. - * @example - * // Create one AppleMusicAlbum - * const AppleMusicAlbum = await prisma.appleMusicAlbum.create({ - * data: { - * // ... data to create a AppleMusicAlbum - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Delete a AppleMusicAlbum. - * @param {AppleMusicAlbumDeleteArgs} args - Arguments to delete one AppleMusicAlbum. - * @example - * // Delete one AppleMusicAlbum - * const AppleMusicAlbum = await prisma.appleMusicAlbum.delete({ - * where: { - * // ... filter to delete one AppleMusicAlbum - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Update one AppleMusicAlbum. - * @param {AppleMusicAlbumUpdateArgs} args - Arguments to update one AppleMusicAlbum. - * @example - * // Update one AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Delete zero or more AppleMusicAlbums. - * @param {AppleMusicAlbumDeleteManyArgs} args - Arguments to filter AppleMusicAlbums to delete. - * @example - * // Delete a few AppleMusicAlbums - * const { count } = await prisma.appleMusicAlbum.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more AppleMusicAlbums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicAlbumUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AppleMusicAlbums - * const appleMusicAlbum = await prisma.appleMusicAlbum.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one AppleMusicAlbum. - * @param {AppleMusicAlbumUpsertArgs} args - Arguments to update or create a AppleMusicAlbum. - * @example - * // Update or create a AppleMusicAlbum - * const appleMusicAlbum = await prisma.appleMusicAlbum.upsert({ - * create: { - * // ... data to create a AppleMusicAlbum - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AppleMusicAlbum we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AppleMusicAlbumClient> - - /** - * Count the number of AppleMusicAlbums. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicAlbumCountArgs} args - Arguments to filter AppleMusicAlbums to count. - * @example - * // Count the number of AppleMusicAlbums - * const count = await prisma.appleMusicAlbum.count({ - * where: { - * // ... the filter for the AppleMusicAlbums we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AppleMusicAlbum. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicAlbumAggregateArgs} 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): PrismaPromise> - - /** - * Group by AppleMusicAlbum. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicAlbumGroupByArgs} 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 AppleMusicAlbumGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AppleMusicAlbumGroupByArgs['orderBy'] } - : { orderBy?: AppleMusicAlbumGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAppleMusicAlbumGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for AppleMusicAlbum. - * 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 class Prisma__AppleMusicAlbumClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * AppleMusicAlbum base type for findUnique actions - */ - export type AppleMusicAlbumFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter, which AppleMusicAlbum to fetch. - * - **/ - where: AppleMusicAlbumWhereUniqueInput - } - - /** - * AppleMusicAlbum findUnique - */ - export interface AppleMusicAlbumFindUniqueArgs extends AppleMusicAlbumFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppleMusicAlbum findUniqueOrThrow - */ - export type AppleMusicAlbumFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter, which AppleMusicAlbum to fetch. - * - **/ - where: AppleMusicAlbumWhereUniqueInput - } - - - /** - * AppleMusicAlbum base type for findFirst actions - */ - export type AppleMusicAlbumFindFirstArgsBase = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter, which AppleMusicAlbum to fetch. - * - **/ - where?: AppleMusicAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppleMusicAlbums. - * - **/ - cursor?: AppleMusicAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicAlbums 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` AppleMusicAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppleMusicAlbums. - * - **/ - distinct?: Enumerable - } - - /** - * AppleMusicAlbum findFirst - */ - export interface AppleMusicAlbumFindFirstArgs extends AppleMusicAlbumFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppleMusicAlbum findFirstOrThrow - */ - export type AppleMusicAlbumFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter, which AppleMusicAlbum to fetch. - * - **/ - where?: AppleMusicAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppleMusicAlbums. - * - **/ - cursor?: AppleMusicAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicAlbums 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` AppleMusicAlbums. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppleMusicAlbums. - * - **/ - distinct?: Enumerable - } - - - /** - * AppleMusicAlbum findMany - */ - export type AppleMusicAlbumFindManyArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter, which AppleMusicAlbums to fetch. - * - **/ - where?: AppleMusicAlbumWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicAlbums to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AppleMusicAlbums. - * - **/ - cursor?: AppleMusicAlbumWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicAlbums 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` AppleMusicAlbums. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * AppleMusicAlbum create - */ - export type AppleMusicAlbumCreateArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * The data needed to create a AppleMusicAlbum. - * - **/ - data: XOR - } - - - /** - * AppleMusicAlbum update - */ - export type AppleMusicAlbumUpdateArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * The data needed to update a AppleMusicAlbum. - * - **/ - data: XOR - /** - * Choose, which AppleMusicAlbum to update. - * - **/ - where: AppleMusicAlbumWhereUniqueInput - } - - - /** - * AppleMusicAlbum updateMany - */ - export type AppleMusicAlbumUpdateManyArgs = { - /** - * The data used to update AppleMusicAlbums. - * - **/ - data: XOR - /** - * Filter which AppleMusicAlbums to update - * - **/ - where?: AppleMusicAlbumWhereInput - } - - - /** - * AppleMusicAlbum upsert - */ - export type AppleMusicAlbumUpsertArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * The filter to search for the AppleMusicAlbum to update in case it exists. - * - **/ - where: AppleMusicAlbumWhereUniqueInput - /** - * In case the AppleMusicAlbum found by the `where` argument doesn't exist, create a new AppleMusicAlbum with this data. - * - **/ - create: XOR - /** - * In case the AppleMusicAlbum was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * AppleMusicAlbum delete - */ - export type AppleMusicAlbumDeleteArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - /** - * Filter which AppleMusicAlbum to delete. - * - **/ - where: AppleMusicAlbumWhereUniqueInput - } - - - /** - * AppleMusicAlbum deleteMany - */ - export type AppleMusicAlbumDeleteManyArgs = { - /** - * Filter which AppleMusicAlbums to delete - * - **/ - where?: AppleMusicAlbumWhereInput - } - - - /** - * AppleMusicAlbum without action - */ - export type AppleMusicAlbumArgs = { - /** - * Select specific fields to fetch from the AppleMusicAlbum - * - **/ - select?: AppleMusicAlbumSelect | null - } - - - - /** - * Model AppleMusicArtist - */ - - - export type AggregateAppleMusicArtist = { - _count: AppleMusicArtistCountAggregateOutputType | null - _avg: AppleMusicArtistAvgAggregateOutputType | null - _sum: AppleMusicArtistSumAggregateOutputType | null - _min: AppleMusicArtistMinAggregateOutputType | null - _max: AppleMusicArtistMaxAggregateOutputType | null - } - - export type AppleMusicArtistAvgAggregateOutputType = { - id: number | null - } - - export type AppleMusicArtistSumAggregateOutputType = { - id: number | null - } - - export type AppleMusicArtistMinAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AppleMusicArtistMaxAggregateOutputType = { - id: number | null - json: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AppleMusicArtistCountAggregateOutputType = { - id: number - json: number - createdAt: number - updatedAt: number - _all: number - } - - - export type AppleMusicArtistAvgAggregateInputType = { - id?: true - } - - export type AppleMusicArtistSumAggregateInputType = { - id?: true - } - - export type AppleMusicArtistMinAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AppleMusicArtistMaxAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - } - - export type AppleMusicArtistCountAggregateInputType = { - id?: true - json?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type AppleMusicArtistAggregateArgs = { - /** - * Filter which AppleMusicArtist to aggregate. - * - **/ - where?: AppleMusicArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicArtists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - * - **/ - cursor?: AppleMusicArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicArtists 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` AppleMusicArtists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AppleMusicArtists - **/ - _count?: true | AppleMusicArtistCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AppleMusicArtistAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AppleMusicArtistSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AppleMusicArtistMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AppleMusicArtistMaxAggregateInputType - } - - export type GetAppleMusicArtistAggregateType = { - [P in keyof T & keyof AggregateAppleMusicArtist]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AppleMusicArtistGroupByArgs = { - where?: AppleMusicArtistWhereInput - orderBy?: Enumerable - by: Array - having?: AppleMusicArtistScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AppleMusicArtistCountAggregateInputType | true - _avg?: AppleMusicArtistAvgAggregateInputType - _sum?: AppleMusicArtistSumAggregateInputType - _min?: AppleMusicArtistMinAggregateInputType - _max?: AppleMusicArtistMaxAggregateInputType - } - - - export type AppleMusicArtistGroupByOutputType = { - id: number - json: string - createdAt: Date - updatedAt: Date - _count: AppleMusicArtistCountAggregateOutputType | null - _avg: AppleMusicArtistAvgAggregateOutputType | null - _sum: AppleMusicArtistSumAggregateOutputType | null - _min: AppleMusicArtistMinAggregateOutputType | null - _max: AppleMusicArtistMaxAggregateOutputType | null - } - - type GetAppleMusicArtistGroupByPayload = PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof AppleMusicArtistGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AppleMusicArtistSelect = { - id?: boolean - json?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type AppleMusicArtistGetPayload = - S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : - S extends true ? AppleMusicArtist : - S extends undefined ? never : - S extends { include: any } & (AppleMusicArtistArgs | AppleMusicArtistFindManyArgs) - ? AppleMusicArtist - : S extends { select: any } & (AppleMusicArtistArgs | AppleMusicArtistFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof AppleMusicArtist ? AppleMusicArtist[P] : never - } - : AppleMusicArtist - - - type AppleMusicArtistCountArgs = Merge< - Omit & { - select?: AppleMusicArtistCountAggregateInputType | true - } - > - - export interface AppleMusicArtistDelegate { - /** - * Find zero or one AppleMusicArtist that matches the filter. - * @param {AppleMusicArtistFindUniqueArgs} args - Arguments to find a AppleMusicArtist - * @example - * // Get one AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AppleMusicArtistClient> : Prisma__AppleMusicArtistClient | null, null> - - /** - * Find one AppleMusicArtist that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AppleMusicArtistFindUniqueOrThrowArgs} args - Arguments to find a AppleMusicArtist - * @example - * // Get one AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Find the first AppleMusicArtist 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 {AppleMusicArtistFindFirstArgs} args - Arguments to find a AppleMusicArtist - * @example - * // Get one AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AppleMusicArtistClient> : Prisma__AppleMusicArtistClient | null, null> - - /** - * Find the first AppleMusicArtist that matches the filter or - * throw `NotFoundError` 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 {AppleMusicArtistFindFirstOrThrowArgs} args - Arguments to find a AppleMusicArtist - * @example - * // Get one AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Find zero or more AppleMusicArtists 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 {AppleMusicArtistFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all AppleMusicArtists - * const appleMusicArtists = await prisma.appleMusicArtist.findMany() - * - * // Get first 10 AppleMusicArtists - * const appleMusicArtists = await prisma.appleMusicArtist.findMany({ take: 10 }) - * - * // Only select the `id` - * const appleMusicArtistWithIdOnly = await prisma.appleMusicArtist.findMany({ select: { id: true } }) - * - **/ - findMany( - args?: SelectSubset - ): PrismaPromise>> - - /** - * Create a AppleMusicArtist. - * @param {AppleMusicArtistCreateArgs} args - Arguments to create a AppleMusicArtist. - * @example - * // Create one AppleMusicArtist - * const AppleMusicArtist = await prisma.appleMusicArtist.create({ - * data: { - * // ... data to create a AppleMusicArtist - * } - * }) - * - **/ - create( - args: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Delete a AppleMusicArtist. - * @param {AppleMusicArtistDeleteArgs} args - Arguments to delete one AppleMusicArtist. - * @example - * // Delete one AppleMusicArtist - * const AppleMusicArtist = await prisma.appleMusicArtist.delete({ - * where: { - * // ... filter to delete one AppleMusicArtist - * } - * }) - * - **/ - delete( - args: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Update one AppleMusicArtist. - * @param {AppleMusicArtistUpdateArgs} args - Arguments to update one AppleMusicArtist. - * @example - * // Update one AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update( - args: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Delete zero or more AppleMusicArtists. - * @param {AppleMusicArtistDeleteManyArgs} args - Arguments to filter AppleMusicArtists to delete. - * @example - * // Delete a few AppleMusicArtists - * const { count } = await prisma.appleMusicArtist.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany( - args?: SelectSubset - ): PrismaPromise - - /** - * Update zero or more AppleMusicArtists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicArtistUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AppleMusicArtists - * const appleMusicArtist = await prisma.appleMusicArtist.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany( - args: SelectSubset - ): PrismaPromise - - /** - * Create or update one AppleMusicArtist. - * @param {AppleMusicArtistUpsertArgs} args - Arguments to update or create a AppleMusicArtist. - * @example - * // Update or create a AppleMusicArtist - * const appleMusicArtist = await prisma.appleMusicArtist.upsert({ - * create: { - * // ... data to create a AppleMusicArtist - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AppleMusicArtist we want to update - * } - * }) - **/ - upsert( - args: SelectSubset - ): Prisma__AppleMusicArtistClient> - - /** - * Count the number of AppleMusicArtists. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicArtistCountArgs} args - Arguments to filter AppleMusicArtists to count. - * @example - * // Count the number of AppleMusicArtists - * const count = await prisma.appleMusicArtist.count({ - * where: { - * // ... the filter for the AppleMusicArtists we want to count - * } - * }) - **/ - count( - args?: Subset, - ): PrismaPromise< - T extends _Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AppleMusicArtist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicArtistAggregateArgs} 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): PrismaPromise> - - /** - * Group by AppleMusicArtist. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AppleMusicArtistGroupByArgs} 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 AppleMusicArtistGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AppleMusicArtistGroupByArgs['orderBy'] } - : { orderBy?: AppleMusicArtistGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - 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 ? GetAppleMusicArtistGroupByPayload : PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for AppleMusicArtist. - * 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 class Prisma__AppleMusicArtistClient implements PrismaPromise { - [prisma]: true; - private readonly _dmmf; - private readonly _fetcher; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - readonly [Symbol.toStringTag]: 'PrismaClientPromise'; - - - private get _document(); - /** - * 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): Promise; - /** - * 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): Promise; - /** - * 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): Promise; - } - - - - // Custom InputTypes - - /** - * AppleMusicArtist base type for findUnique actions - */ - export type AppleMusicArtistFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter, which AppleMusicArtist to fetch. - * - **/ - where: AppleMusicArtistWhereUniqueInput - } - - /** - * AppleMusicArtist findUnique - */ - export interface AppleMusicArtistFindUniqueArgs extends AppleMusicArtistFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppleMusicArtist findUniqueOrThrow - */ - export type AppleMusicArtistFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter, which AppleMusicArtist to fetch. - * - **/ - where: AppleMusicArtistWhereUniqueInput - } - - - /** - * AppleMusicArtist base type for findFirst actions - */ - export type AppleMusicArtistFindFirstArgsBase = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter, which AppleMusicArtist to fetch. - * - **/ - where?: AppleMusicArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicArtists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppleMusicArtists. - * - **/ - cursor?: AppleMusicArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicArtists 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` AppleMusicArtists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppleMusicArtists. - * - **/ - distinct?: Enumerable - } - - /** - * AppleMusicArtist findFirst - */ - export interface AppleMusicArtistFindFirstArgs extends AppleMusicArtistFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * AppleMusicArtist findFirstOrThrow - */ - export type AppleMusicArtistFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter, which AppleMusicArtist to fetch. - * - **/ - where?: AppleMusicArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicArtists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AppleMusicArtists. - * - **/ - cursor?: AppleMusicArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicArtists 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` AppleMusicArtists. - * - **/ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AppleMusicArtists. - * - **/ - distinct?: Enumerable - } - - - /** - * AppleMusicArtist findMany - */ - export type AppleMusicArtistFindManyArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter, which AppleMusicArtists to fetch. - * - **/ - where?: AppleMusicArtistWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AppleMusicArtists to fetch. - * - **/ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AppleMusicArtists. - * - **/ - cursor?: AppleMusicArtistWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AppleMusicArtists 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` AppleMusicArtists. - * - **/ - skip?: number - distinct?: Enumerable - } - - - /** - * AppleMusicArtist create - */ - export type AppleMusicArtistCreateArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * The data needed to create a AppleMusicArtist. - * - **/ - data: XOR - } - - - /** - * AppleMusicArtist update - */ - export type AppleMusicArtistUpdateArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * The data needed to update a AppleMusicArtist. - * - **/ - data: XOR - /** - * Choose, which AppleMusicArtist to update. - * - **/ - where: AppleMusicArtistWhereUniqueInput - } - - - /** - * AppleMusicArtist updateMany - */ - export type AppleMusicArtistUpdateManyArgs = { - /** - * The data used to update AppleMusicArtists. - * - **/ - data: XOR - /** - * Filter which AppleMusicArtists to update - * - **/ - where?: AppleMusicArtistWhereInput - } - - - /** - * AppleMusicArtist upsert - */ - export type AppleMusicArtistUpsertArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * The filter to search for the AppleMusicArtist to update in case it exists. - * - **/ - where: AppleMusicArtistWhereUniqueInput - /** - * In case the AppleMusicArtist found by the `where` argument doesn't exist, create a new AppleMusicArtist with this data. - * - **/ - create: XOR - /** - * In case the AppleMusicArtist was found with the provided `where` argument, update it with this data. - * - **/ - update: XOR - } - - - /** - * AppleMusicArtist delete - */ - export type AppleMusicArtistDeleteArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - /** - * Filter which AppleMusicArtist to delete. - * - **/ - where: AppleMusicArtistWhereUniqueInput - } - - - /** - * AppleMusicArtist deleteMany - */ - export type AppleMusicArtistDeleteManyArgs = { - /** - * Filter which AppleMusicArtists to delete - * - **/ - where?: AppleMusicArtistWhereInput - } - - - /** - * AppleMusicArtist without action - */ - export type AppleMusicArtistArgs = { - /** - * Select specific fields to fetch from the AppleMusicArtist - * - **/ - select?: AppleMusicArtistSelect | null - } - - - - /** - * Enums - */ - - // Based on - // https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275 - - export const AccountDataScalarFieldEnum: { - id: 'id', - json: 'json', - updatedAt: 'updatedAt' - }; - - export type AccountDataScalarFieldEnum = (typeof AccountDataScalarFieldEnum)[keyof typeof AccountDataScalarFieldEnum] - - - export const AlbumScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type AlbumScalarFieldEnum = (typeof AlbumScalarFieldEnum)[keyof typeof AlbumScalarFieldEnum] - - - export const AppDataScalarFieldEnum: { - id: 'id', - value: 'value' - }; - - export type AppDataScalarFieldEnum = (typeof AppDataScalarFieldEnum)[keyof typeof AppDataScalarFieldEnum] - - - export const AppleMusicAlbumScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type AppleMusicAlbumScalarFieldEnum = (typeof AppleMusicAlbumScalarFieldEnum)[keyof typeof AppleMusicAlbumScalarFieldEnum] - - - export const AppleMusicArtistScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type AppleMusicArtistScalarFieldEnum = (typeof AppleMusicArtistScalarFieldEnum)[keyof typeof AppleMusicArtistScalarFieldEnum] - - - export const ArtistAlbumScalarFieldEnum: { - id: 'id', - hotAlbums: 'hotAlbums', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type ArtistAlbumScalarFieldEnum = (typeof ArtistAlbumScalarFieldEnum)[keyof typeof ArtistAlbumScalarFieldEnum] - - - export const ArtistScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type ArtistScalarFieldEnum = (typeof ArtistScalarFieldEnum)[keyof typeof ArtistScalarFieldEnum] - - - export const AudioScalarFieldEnum: { - id: 'id', - bitRate: 'bitRate', - format: 'format', - source: 'source', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - queriedAt: 'queriedAt' - }; - - export type AudioScalarFieldEnum = (typeof AudioScalarFieldEnum)[keyof typeof AudioScalarFieldEnum] - - - export const LyricsScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type LyricsScalarFieldEnum = (typeof LyricsScalarFieldEnum)[keyof typeof LyricsScalarFieldEnum] - - - export const PlaylistScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type PlaylistScalarFieldEnum = (typeof PlaylistScalarFieldEnum)[keyof typeof PlaylistScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const TrackScalarFieldEnum: { - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type TrackScalarFieldEnum = (typeof TrackScalarFieldEnum)[keyof typeof TrackScalarFieldEnum] - - - export const TransactionIsolationLevel: { - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - /** - * Deep Input Types - */ - - - export type AccountDataWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - json?: StringFilter | string - updatedAt?: DateTimeFilter | Date | string - } - - export type AccountDataOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - updatedAt?: SortOrder - } - - export type AccountDataWhereUniqueInput = { - id?: string - } - - export type AccountDataOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - updatedAt?: SortOrder - _count?: AccountDataCountOrderByAggregateInput - _max?: AccountDataMaxOrderByAggregateInput - _min?: AccountDataMinOrderByAggregateInput - } - - export type AccountDataScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - json?: StringWithAggregatesFilter | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AppDataWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - value?: StringFilter | string - } - - export type AppDataOrderByWithRelationInput = { - id?: SortOrder - value?: SortOrder - } - - export type AppDataWhereUniqueInput = { - id?: string - } - - export type AppDataOrderByWithAggregationInput = { - id?: SortOrder - value?: SortOrder - _count?: AppDataCountOrderByAggregateInput - _max?: AppDataMaxOrderByAggregateInput - _min?: AppDataMinOrderByAggregateInput - } - - export type AppDataScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - value?: StringWithAggregatesFilter | string - } - - export type TrackWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type TrackOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type TrackWhereUniqueInput = { - id?: number - } - - export type TrackOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: TrackCountOrderByAggregateInput - _avg?: TrackAvgOrderByAggregateInput - _max?: TrackMaxOrderByAggregateInput - _min?: TrackMinOrderByAggregateInput - _sum?: TrackSumOrderByAggregateInput - } - - export type TrackScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AlbumWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type AlbumOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AlbumWhereUniqueInput = { - id?: number - } - - export type AlbumOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: AlbumCountOrderByAggregateInput - _avg?: AlbumAvgOrderByAggregateInput - _max?: AlbumMaxOrderByAggregateInput - _min?: AlbumMinOrderByAggregateInput - _sum?: AlbumSumOrderByAggregateInput - } - - export type AlbumScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type ArtistWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type ArtistOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistWhereUniqueInput = { - id?: number - } - - export type ArtistOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: ArtistCountOrderByAggregateInput - _avg?: ArtistAvgOrderByAggregateInput - _max?: ArtistMaxOrderByAggregateInput - _min?: ArtistMinOrderByAggregateInput - _sum?: ArtistSumOrderByAggregateInput - } - - export type ArtistScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type ArtistAlbumWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - hotAlbums?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type ArtistAlbumOrderByWithRelationInput = { - id?: SortOrder - hotAlbums?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistAlbumWhereUniqueInput = { - id?: number - } - - export type ArtistAlbumOrderByWithAggregationInput = { - id?: SortOrder - hotAlbums?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: ArtistAlbumCountOrderByAggregateInput - _avg?: ArtistAlbumAvgOrderByAggregateInput - _max?: ArtistAlbumMaxOrderByAggregateInput - _min?: ArtistAlbumMinOrderByAggregateInput - _sum?: ArtistAlbumSumOrderByAggregateInput - } - - export type ArtistAlbumScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - hotAlbums?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type PlaylistWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type PlaylistOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type PlaylistWhereUniqueInput = { - id?: number - } - - export type PlaylistOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: PlaylistCountOrderByAggregateInput - _avg?: PlaylistAvgOrderByAggregateInput - _max?: PlaylistMaxOrderByAggregateInput - _min?: PlaylistMinOrderByAggregateInput - _sum?: PlaylistSumOrderByAggregateInput - } - - export type PlaylistScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AudioWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - bitRate?: IntFilter | number - format?: StringFilter | string - source?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - queriedAt?: DateTimeFilter | Date | string - } - - export type AudioOrderByWithRelationInput = { - id?: SortOrder - bitRate?: SortOrder - format?: SortOrder - source?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - queriedAt?: SortOrder - } - - export type AudioWhereUniqueInput = { - id?: number - } - - export type AudioOrderByWithAggregationInput = { - id?: SortOrder - bitRate?: SortOrder - format?: SortOrder - source?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - queriedAt?: SortOrder - _count?: AudioCountOrderByAggregateInput - _avg?: AudioAvgOrderByAggregateInput - _max?: AudioMaxOrderByAggregateInput - _min?: AudioMinOrderByAggregateInput - _sum?: AudioSumOrderByAggregateInput - } - - export type AudioScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - bitRate?: IntWithAggregatesFilter | number - format?: StringWithAggregatesFilter | string - source?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - queriedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type LyricsWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type LyricsOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LyricsWhereUniqueInput = { - id?: number - } - - export type LyricsOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: LyricsCountOrderByAggregateInput - _avg?: LyricsAvgOrderByAggregateInput - _max?: LyricsMaxOrderByAggregateInput - _min?: LyricsMinOrderByAggregateInput - _sum?: LyricsSumOrderByAggregateInput - } - - export type LyricsScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AppleMusicAlbumWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type AppleMusicAlbumOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicAlbumWhereUniqueInput = { - id?: number - } - - export type AppleMusicAlbumOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: AppleMusicAlbumCountOrderByAggregateInput - _avg?: AppleMusicAlbumAvgOrderByAggregateInput - _max?: AppleMusicAlbumMaxOrderByAggregateInput - _min?: AppleMusicAlbumMinOrderByAggregateInput - _sum?: AppleMusicAlbumSumOrderByAggregateInput - } - - export type AppleMusicAlbumScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AppleMusicArtistWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - json?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - } - - export type AppleMusicArtistOrderByWithRelationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicArtistWhereUniqueInput = { - id?: number - } - - export type AppleMusicArtistOrderByWithAggregationInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: AppleMusicArtistCountOrderByAggregateInput - _avg?: AppleMusicArtistAvgOrderByAggregateInput - _max?: AppleMusicArtistMaxOrderByAggregateInput - _min?: AppleMusicArtistMinOrderByAggregateInput - _sum?: AppleMusicArtistSumOrderByAggregateInput - } - - export type AppleMusicArtistScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - json?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - } - - export type AccountDataCreateInput = { - id: string - json: string - updatedAt?: Date | string - } - - export type AccountDataUncheckedCreateInput = { - id: string - json: string - updatedAt?: Date | string - } - - export type AccountDataUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - json?: StringFieldUpdateOperationsInput | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountDataUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - json?: StringFieldUpdateOperationsInput | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountDataUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - json?: StringFieldUpdateOperationsInput | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountDataUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - json?: StringFieldUpdateOperationsInput | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppDataCreateInput = { - id: string - value: string - } - - export type AppDataUncheckedCreateInput = { - id: string - value: string - } - - export type AppDataUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type AppDataUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type AppDataUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type AppDataUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type TrackCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type TrackUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type TrackUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type TrackUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type TrackUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type TrackUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AlbumCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AlbumUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AlbumUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AlbumUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AlbumUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AlbumUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type ArtistUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type ArtistUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistAlbumCreateInput = { - id: number - hotAlbums: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type ArtistAlbumUncheckedCreateInput = { - id: number - hotAlbums: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type ArtistAlbumUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - hotAlbums?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistAlbumUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - hotAlbums?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistAlbumUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - hotAlbums?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type ArtistAlbumUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - hotAlbums?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type PlaylistCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type PlaylistUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type PlaylistUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type PlaylistUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type PlaylistUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type PlaylistUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AudioCreateInput = { - id: number - bitRate: number - format: string - source: string - createdAt?: Date | string - updatedAt?: Date | string - queriedAt?: Date | string - } - - export type AudioUncheckedCreateInput = { - id: number - bitRate: number - format: string - source: string - createdAt?: Date | string - updatedAt?: Date | string - queriedAt?: Date | string - } - - export type AudioUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - bitRate?: IntFieldUpdateOperationsInput | number - format?: StringFieldUpdateOperationsInput | string - source?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - queriedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AudioUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - bitRate?: IntFieldUpdateOperationsInput | number - format?: StringFieldUpdateOperationsInput | string - source?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - queriedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AudioUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - bitRate?: IntFieldUpdateOperationsInput | number - format?: StringFieldUpdateOperationsInput | string - source?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - queriedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AudioUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - bitRate?: IntFieldUpdateOperationsInput | number - format?: StringFieldUpdateOperationsInput | string - source?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - queriedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LyricsCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type LyricsUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type LyricsUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LyricsUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LyricsUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LyricsUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicAlbumCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AppleMusicAlbumUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AppleMusicAlbumUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicAlbumUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicAlbumUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicAlbumUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicArtistCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AppleMusicArtistUncheckedCreateInput = { - id: number - json: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AppleMusicArtistUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicArtistUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicArtistUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AppleMusicArtistUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - json?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type StringFilter = { - equals?: string - in?: Enumerable - notIn?: Enumerable - lt?: string - lte?: string - gt?: string - gte?: string - contains?: string - startsWith?: string - endsWith?: string - not?: NestedStringFilter | string - } - - export type DateTimeFilter = { - equals?: Date | string - in?: Enumerable | Enumerable - notIn?: Enumerable | Enumerable - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeFilter | Date | string - } - - export type AccountDataCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - updatedAt?: SortOrder - } - - export type AccountDataMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - updatedAt?: SortOrder - } - - export type AccountDataMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - updatedAt?: SortOrder - } - - export type StringWithAggregatesFilter = { - equals?: string - in?: Enumerable - notIn?: Enumerable - lt?: string - lte?: string - gt?: string - gte?: string - contains?: string - startsWith?: string - endsWith?: string - not?: NestedStringWithAggregatesFilter | string - _count?: NestedIntFilter - _min?: NestedStringFilter - _max?: NestedStringFilter - } - - export type DateTimeWithAggregatesFilter = { - equals?: Date | string - in?: Enumerable | Enumerable - notIn?: Enumerable | Enumerable - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeWithAggregatesFilter | Date | string - _count?: NestedIntFilter - _min?: NestedDateTimeFilter - _max?: NestedDateTimeFilter - } - - export type AppDataCountOrderByAggregateInput = { - id?: SortOrder - value?: SortOrder - } - - export type AppDataMaxOrderByAggregateInput = { - id?: SortOrder - value?: SortOrder - } - - export type AppDataMinOrderByAggregateInput = { - id?: SortOrder - value?: SortOrder - } - - export type IntFilter = { - equals?: number - in?: Enumerable - notIn?: Enumerable - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntFilter | number - } - - export type TrackCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type TrackAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type TrackMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type TrackMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type TrackSumOrderByAggregateInput = { - id?: SortOrder - } - - export type IntWithAggregatesFilter = { - equals?: number - in?: Enumerable - notIn?: Enumerable - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntWithAggregatesFilter | number - _count?: NestedIntFilter - _avg?: NestedFloatFilter - _sum?: NestedIntFilter - _min?: NestedIntFilter - _max?: NestedIntFilter - } - - export type AlbumCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AlbumAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type AlbumMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AlbumMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AlbumSumOrderByAggregateInput = { - id?: SortOrder - } - - export type ArtistCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type ArtistMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistSumOrderByAggregateInput = { - id?: SortOrder - } - - export type ArtistAlbumCountOrderByAggregateInput = { - id?: SortOrder - hotAlbums?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistAlbumAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type ArtistAlbumMaxOrderByAggregateInput = { - id?: SortOrder - hotAlbums?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistAlbumMinOrderByAggregateInput = { - id?: SortOrder - hotAlbums?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type ArtistAlbumSumOrderByAggregateInput = { - id?: SortOrder - } - - export type PlaylistCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type PlaylistAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type PlaylistMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type PlaylistMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type PlaylistSumOrderByAggregateInput = { - id?: SortOrder - } - - export type AudioCountOrderByAggregateInput = { - id?: SortOrder - bitRate?: SortOrder - format?: SortOrder - source?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - queriedAt?: SortOrder - } - - export type AudioAvgOrderByAggregateInput = { - id?: SortOrder - bitRate?: SortOrder - } - - export type AudioMaxOrderByAggregateInput = { - id?: SortOrder - bitRate?: SortOrder - format?: SortOrder - source?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - queriedAt?: SortOrder - } - - export type AudioMinOrderByAggregateInput = { - id?: SortOrder - bitRate?: SortOrder - format?: SortOrder - source?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - queriedAt?: SortOrder - } - - export type AudioSumOrderByAggregateInput = { - id?: SortOrder - bitRate?: SortOrder - } - - export type LyricsCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LyricsAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type LyricsMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LyricsMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LyricsSumOrderByAggregateInput = { - id?: SortOrder - } - - export type AppleMusicAlbumCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicAlbumAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type AppleMusicAlbumMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicAlbumMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicAlbumSumOrderByAggregateInput = { - id?: SortOrder - } - - export type AppleMusicArtistCountOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicArtistAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type AppleMusicArtistMaxOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicArtistMinOrderByAggregateInput = { - id?: SortOrder - json?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AppleMusicArtistSumOrderByAggregateInput = { - id?: SortOrder - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type NestedStringFilter = { - equals?: string - in?: Enumerable - notIn?: Enumerable - lt?: string - lte?: string - gt?: string - gte?: string - contains?: string - startsWith?: string - endsWith?: string - not?: NestedStringFilter | string - } - - export type NestedDateTimeFilter = { - equals?: Date | string - in?: Enumerable | Enumerable - notIn?: Enumerable | Enumerable - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeFilter | Date | string - } - - export type NestedStringWithAggregatesFilter = { - equals?: string - in?: Enumerable - notIn?: Enumerable - lt?: string - lte?: string - gt?: string - gte?: string - contains?: string - startsWith?: string - endsWith?: string - not?: NestedStringWithAggregatesFilter | string - _count?: NestedIntFilter - _min?: NestedStringFilter - _max?: NestedStringFilter - } - - export type NestedIntFilter = { - equals?: number - in?: Enumerable - notIn?: Enumerable - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntFilter | number - } - - export type NestedDateTimeWithAggregatesFilter = { - equals?: Date | string - in?: Enumerable | Enumerable - notIn?: Enumerable | Enumerable - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeWithAggregatesFilter | Date | string - _count?: NestedIntFilter - _min?: NestedDateTimeFilter - _max?: NestedDateTimeFilter - } - - export type NestedIntWithAggregatesFilter = { - equals?: number - in?: Enumerable - notIn?: Enumerable - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntWithAggregatesFilter | number - _count?: NestedIntFilter - _avg?: NestedFloatFilter - _sum?: NestedIntFilter - _min?: NestedIntFilter - _max?: NestedIntFilter - } - - export type NestedFloatFilter = { - equals?: number - in?: Enumerable - notIn?: Enumerable - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedFloatFilter | number - } - - - - /** - * 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/packages/desktop/prisma/client/index.js b/packages/desktop/prisma/client/index.js deleted file mode 100644 index f143919..0000000 --- a/packages/desktop/prisma/client/index.js +++ /dev/null @@ -1,271 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - NotFoundError, - decompressFromBase64, - getPrismaClient, - sqltag, - empty, - join, - raw, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions -} = require('./runtime/index') - - -const Prisma = {} - -exports.Prisma = Prisma - -/** - * Prisma Client JS version: 4.8.1 - * Query Engine version: d6e67a83f971b175a593ccc12e15c4a757f93ffe - */ -Prisma.prismaVersion = { - client: "4.8.1", - engine: "d6e67a83f971b175a593ccc12e15c4a757f93ffe" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.NotFoundError = NotFoundError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = () => (val) => val - - -/** - * 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') - -const { findSync } = require('./runtime') -const fs = require('fs') - -// some frameworks or bundlers replace or totally remove __dirname -const hasDirname = typeof __dirname !== 'undefined' && __dirname !== '/' - -// will work in most cases, ie. if the client has not been bundled -const regularDirname = hasDirname && fs.existsSync(path.join(__dirname, 'schema.prisma')) && __dirname - -// if the client has been bundled, we need to look for the folders -const foundDirname = !regularDirname && findSync(process.cwd(), [ - "prisma/client", - "client", -], ['d'], ['d'], 1)[0] - -const dirname = regularDirname || foundDirname || __dirname - -/** - * Enums - */ -// Based on -// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275 -function makeEnum(x) { return x; } - -exports.Prisma.AccountDataScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AlbumScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AppDataScalarFieldEnum = makeEnum({ - id: 'id', - value: 'value' -}); - -exports.Prisma.AppleMusicAlbumScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AppleMusicArtistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.ArtistAlbumScalarFieldEnum = makeEnum({ - id: 'id', - hotAlbums: 'hotAlbums', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.ArtistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.AudioScalarFieldEnum = makeEnum({ - id: 'id', - bitRate: 'bitRate', - format: 'format', - source: 'source', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - queriedAt: 'queriedAt' -}); - -exports.Prisma.LyricsScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.PlaylistScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.SortOrder = makeEnum({ - asc: 'asc', - desc: 'desc' -}); - -exports.Prisma.TrackScalarFieldEnum = makeEnum({ - id: 'id', - json: 'json', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}); - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - - -exports.Prisma.ModelName = makeEnum({ - AccountData: 'AccountData', - AppData: 'AppData', - Track: 'Track', - Album: 'Album', - Artist: 'Artist', - ArtistAlbum: 'ArtistAlbum', - Playlist: 'Playlist', - Audio: 'Audio', - Lyrics: 'Lyrics', - AppleMusicAlbum: 'AppleMusicAlbum', - AppleMusicArtist: 'AppleMusicArtist' -}); - -const dmmfString = "{\"datamodel\":{\"enums\":[],\"models\":[{\"name\":\"AccountData\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"AppData\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Track\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Album\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Artist\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"ArtistAlbum\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"hotAlbums\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Playlist\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Audio\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bitRate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"format\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"queriedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"Lyrics\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"AppleMusicAlbum\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},{\"name\":\"AppleMusicArtist\",\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"json\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}],\"types\":[]},\"mappings\":{\"modelOperations\":[{\"model\":\"AccountData\",\"plural\":\"accountData\",\"findUnique\":\"findUniqueAccountData\",\"findUniqueOrThrow\":\"findUniqueAccountDataOrThrow\",\"findFirst\":\"findFirstAccountData\",\"findFirstOrThrow\":\"findFirstAccountDataOrThrow\",\"findMany\":\"findManyAccountData\",\"create\":\"createOneAccountData\",\"delete\":\"deleteOneAccountData\",\"update\":\"updateOneAccountData\",\"deleteMany\":\"deleteManyAccountData\",\"updateMany\":\"updateManyAccountData\",\"upsert\":\"upsertOneAccountData\",\"aggregate\":\"aggregateAccountData\",\"groupBy\":\"groupByAccountData\"},{\"model\":\"AppData\",\"plural\":\"appData\",\"findUnique\":\"findUniqueAppData\",\"findUniqueOrThrow\":\"findUniqueAppDataOrThrow\",\"findFirst\":\"findFirstAppData\",\"findFirstOrThrow\":\"findFirstAppDataOrThrow\",\"findMany\":\"findManyAppData\",\"create\":\"createOneAppData\",\"delete\":\"deleteOneAppData\",\"update\":\"updateOneAppData\",\"deleteMany\":\"deleteManyAppData\",\"updateMany\":\"updateManyAppData\",\"upsert\":\"upsertOneAppData\",\"aggregate\":\"aggregateAppData\",\"groupBy\":\"groupByAppData\"},{\"model\":\"Track\",\"plural\":\"tracks\",\"findUnique\":\"findUniqueTrack\",\"findUniqueOrThrow\":\"findUniqueTrackOrThrow\",\"findFirst\":\"findFirstTrack\",\"findFirstOrThrow\":\"findFirstTrackOrThrow\",\"findMany\":\"findManyTrack\",\"create\":\"createOneTrack\",\"delete\":\"deleteOneTrack\",\"update\":\"updateOneTrack\",\"deleteMany\":\"deleteManyTrack\",\"updateMany\":\"updateManyTrack\",\"upsert\":\"upsertOneTrack\",\"aggregate\":\"aggregateTrack\",\"groupBy\":\"groupByTrack\"},{\"model\":\"Album\",\"plural\":\"albums\",\"findUnique\":\"findUniqueAlbum\",\"findUniqueOrThrow\":\"findUniqueAlbumOrThrow\",\"findFirst\":\"findFirstAlbum\",\"findFirstOrThrow\":\"findFirstAlbumOrThrow\",\"findMany\":\"findManyAlbum\",\"create\":\"createOneAlbum\",\"delete\":\"deleteOneAlbum\",\"update\":\"updateOneAlbum\",\"deleteMany\":\"deleteManyAlbum\",\"updateMany\":\"updateManyAlbum\",\"upsert\":\"upsertOneAlbum\",\"aggregate\":\"aggregateAlbum\",\"groupBy\":\"groupByAlbum\"},{\"model\":\"Artist\",\"plural\":\"artists\",\"findUnique\":\"findUniqueArtist\",\"findUniqueOrThrow\":\"findUniqueArtistOrThrow\",\"findFirst\":\"findFirstArtist\",\"findFirstOrThrow\":\"findFirstArtistOrThrow\",\"findMany\":\"findManyArtist\",\"create\":\"createOneArtist\",\"delete\":\"deleteOneArtist\",\"update\":\"updateOneArtist\",\"deleteMany\":\"deleteManyArtist\",\"updateMany\":\"updateManyArtist\",\"upsert\":\"upsertOneArtist\",\"aggregate\":\"aggregateArtist\",\"groupBy\":\"groupByArtist\"},{\"model\":\"ArtistAlbum\",\"plural\":\"artistAlbums\",\"findUnique\":\"findUniqueArtistAlbum\",\"findUniqueOrThrow\":\"findUniqueArtistAlbumOrThrow\",\"findFirst\":\"findFirstArtistAlbum\",\"findFirstOrThrow\":\"findFirstArtistAlbumOrThrow\",\"findMany\":\"findManyArtistAlbum\",\"create\":\"createOneArtistAlbum\",\"delete\":\"deleteOneArtistAlbum\",\"update\":\"updateOneArtistAlbum\",\"deleteMany\":\"deleteManyArtistAlbum\",\"updateMany\":\"updateManyArtistAlbum\",\"upsert\":\"upsertOneArtistAlbum\",\"aggregate\":\"aggregateArtistAlbum\",\"groupBy\":\"groupByArtistAlbum\"},{\"model\":\"Playlist\",\"plural\":\"playlists\",\"findUnique\":\"findUniquePlaylist\",\"findUniqueOrThrow\":\"findUniquePlaylistOrThrow\",\"findFirst\":\"findFirstPlaylist\",\"findFirstOrThrow\":\"findFirstPlaylistOrThrow\",\"findMany\":\"findManyPlaylist\",\"create\":\"createOnePlaylist\",\"delete\":\"deleteOnePlaylist\",\"update\":\"updateOnePlaylist\",\"deleteMany\":\"deleteManyPlaylist\",\"updateMany\":\"updateManyPlaylist\",\"upsert\":\"upsertOnePlaylist\",\"aggregate\":\"aggregatePlaylist\",\"groupBy\":\"groupByPlaylist\"},{\"model\":\"Audio\",\"plural\":\"audio\",\"findUnique\":\"findUniqueAudio\",\"findUniqueOrThrow\":\"findUniqueAudioOrThrow\",\"findFirst\":\"findFirstAudio\",\"findFirstOrThrow\":\"findFirstAudioOrThrow\",\"findMany\":\"findManyAudio\",\"create\":\"createOneAudio\",\"delete\":\"deleteOneAudio\",\"update\":\"updateOneAudio\",\"deleteMany\":\"deleteManyAudio\",\"updateMany\":\"updateManyAudio\",\"upsert\":\"upsertOneAudio\",\"aggregate\":\"aggregateAudio\",\"groupBy\":\"groupByAudio\"},{\"model\":\"Lyrics\",\"plural\":\"lyrics\",\"findUnique\":\"findUniqueLyrics\",\"findUniqueOrThrow\":\"findUniqueLyricsOrThrow\",\"findFirst\":\"findFirstLyrics\",\"findFirstOrThrow\":\"findFirstLyricsOrThrow\",\"findMany\":\"findManyLyrics\",\"create\":\"createOneLyrics\",\"delete\":\"deleteOneLyrics\",\"update\":\"updateOneLyrics\",\"deleteMany\":\"deleteManyLyrics\",\"updateMany\":\"updateManyLyrics\",\"upsert\":\"upsertOneLyrics\",\"aggregate\":\"aggregateLyrics\",\"groupBy\":\"groupByLyrics\"},{\"model\":\"AppleMusicAlbum\",\"plural\":\"appleMusicAlbums\",\"findUnique\":\"findUniqueAppleMusicAlbum\",\"findUniqueOrThrow\":\"findUniqueAppleMusicAlbumOrThrow\",\"findFirst\":\"findFirstAppleMusicAlbum\",\"findFirstOrThrow\":\"findFirstAppleMusicAlbumOrThrow\",\"findMany\":\"findManyAppleMusicAlbum\",\"create\":\"createOneAppleMusicAlbum\",\"delete\":\"deleteOneAppleMusicAlbum\",\"update\":\"updateOneAppleMusicAlbum\",\"deleteMany\":\"deleteManyAppleMusicAlbum\",\"updateMany\":\"updateManyAppleMusicAlbum\",\"upsert\":\"upsertOneAppleMusicAlbum\",\"aggregate\":\"aggregateAppleMusicAlbum\",\"groupBy\":\"groupByAppleMusicAlbum\"},{\"model\":\"AppleMusicArtist\",\"plural\":\"appleMusicArtists\",\"findUnique\":\"findUniqueAppleMusicArtist\",\"findUniqueOrThrow\":\"findUniqueAppleMusicArtistOrThrow\",\"findFirst\":\"findFirstAppleMusicArtist\",\"findFirstOrThrow\":\"findFirstAppleMusicArtistOrThrow\",\"findMany\":\"findManyAppleMusicArtist\",\"create\":\"createOneAppleMusicArtist\",\"delete\":\"deleteOneAppleMusicArtist\",\"update\":\"updateOneAppleMusicArtist\",\"deleteMany\":\"deleteManyAppleMusicArtist\",\"updateMany\":\"updateManyAppleMusicArtist\",\"upsert\":\"upsertOneAppleMusicArtist\",\"aggregate\":\"aggregateAppleMusicArtist\",\"groupBy\":\"groupByAppleMusicArtist\"}],\"otherOperations\":{\"read\":[],\"write\":[\"executeRaw\",\"queryRaw\"]}}}" -const dmmf = JSON.parse(dmmfString) -exports.Prisma.dmmf = JSON.parse(dmmfString) - -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "/Users/max/Developer/GitHub/replay/packages/desktop/prisma/client", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "darwin-arm64" - }, - { - "fromEnvVar": null, - "value": "darwin" - }, - { - "fromEnvVar": null, - "value": "darwin-arm64" - } - ], - "previewFeatures": [], - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": "../../.env", - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "4.8.1", - "engineVersion": "d6e67a83f971b175a593ccc12e15c4a757f93ffe", - "datasourceNames": [ - "db" - ], - "activeProvider": "sqlite", - "dataProxy": false -} -config.document = dmmf -config.dirname = dirname - - - - -const { warnEnvConflicts } = require('./runtime/index') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node"); -path.join(process.cwd(), "prisma/client/libquery_engine-darwin-arm64.dylib.node") - -path.join(__dirname, "libquery_engine-darwin.dylib.node"); -path.join(process.cwd(), "prisma/client/libquery_engine-darwin.dylib.node") -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "prisma/client/schema.prisma") diff --git a/packages/desktop/prisma/client/libquery_engine-darwin-arm64.dylib.node b/packages/desktop/prisma/client/libquery_engine-darwin-arm64.dylib.node deleted file mode 100755 index fa484b3..0000000 Binary files a/packages/desktop/prisma/client/libquery_engine-darwin-arm64.dylib.node and /dev/null differ diff --git a/packages/desktop/prisma/client/libquery_engine-darwin.dylib.node b/packages/desktop/prisma/client/libquery_engine-darwin.dylib.node deleted file mode 100755 index 95e7684..0000000 Binary files a/packages/desktop/prisma/client/libquery_engine-darwin.dylib.node and /dev/null differ diff --git a/packages/desktop/prisma/client/package.json b/packages/desktop/prisma/client/package.json deleted file mode 100644 index 9e7a6db..0000000 --- a/packages/desktop/prisma/client/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": ".prisma/client", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js" -} \ No newline at end of file diff --git a/packages/desktop/prisma/client/runtime/edge-esm.js b/packages/desktop/prisma/client/runtime/edge-esm.js deleted file mode 100644 index 1365da7..0000000 --- a/packages/desktop/prisma/client/runtime/edge-esm.js +++ /dev/null @@ -1,98 +0,0 @@ -var Hl=Object.create;var vn=Object.defineProperty;var Wl=Object.getOwnPropertyDescriptor;var Ql=Object.getOwnPropertyNames;var Yl=Object.getPrototypeOf,Zl=Object.prototype.hasOwnProperty;var u=(e,t)=>vn(e,"name",{value:t,configurable:!0}),Tr=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Tn=(e,t)=>()=>(e&&(t=e(e=0)),t);var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ko=(e,t)=>{for(var r in t)vn(e,r,{get:t[r],enumerable:!0})},Xl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ql(t))!Zl.call(e,o)&&o!==r&&vn(e,o,{get:()=>t[o],enumerable:!(n=Wl(t,o))||n.enumerable});return e};var X=(e,t,r)=>(r=e!=null?Hl(Yl(e)):{},Xl(t||!e||!e.__esModule?vn(r,"default",{value:e,enumerable:!0}):r,e));function q(e){return()=>e}function De(){return w}var ep,w,f=Tn(()=>{"use strict";u(q,"noop");ep=Promise.resolve();u(De,"getProcess");w={abort:q(void 0),addListener:q(De()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:q(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:q(void 0),domain:{run:q(void 0),add:q(void 0),remove:q(void 0),bind:q(void 0),intercept:q(void 0),...De()},emit:q(De()),emitWarning:q(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:q(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:q(0),getegid:q(0),geteuid:q(0),getgid:q(0),getgroups:q([]),getuid:q(0),hasUncaughtExceptionCaptureCallback:q(!1),hrtime:q([0,0]),platform:"linux",kill:q(!0),listenerCount:q(0),listeners:q([]),memoryUsage:q({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{ep.then(()=>e(...t)).catch(r=>{setTimeout(()=>{throw r},0)})},off:q(De()),on:q(De()),once:q(De()),openStdin:q({}),pid:0,ppid:0,prependListener:q(De()),prependOnceListener:q(De()),rawListeners:q([]),release:{name:"node"},removeAllListeners:q(De()),removeListener:q(De()),resourceUsage:q({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:q(De()),setUncaughtExceptionCaptureCallback:q(void 0),setegid:q(void 0),seteuid:q(void 0),setgid:q(void 0),setgroups:q(void 0),setuid:q(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:q(0),uptime:q(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var E,m=Tn(()=>{"use strict";E=u(()=>{},"fn");E.prototype=E});var Us=W(Kt=>{"use strict";d();f();m();var Ss=u((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"q"),tp=Ss(e=>{"use strict";e.byteLength=c,e.toByteArray=p,e.fromByteArray=b;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=v.indexOf("=");T===-1&&(T=h);var O=T===h?0:4-T%4;return[T,O]}u(a,"j");function c(v){var h=a(v),T=h[0],O=h[1];return(T+O)*3/4-O}u(c,"sr");function l(v,h,T){return(h+T)*3/4-T}u(l,"lr");function p(v){var h,T=a(v),O=T[0],P=T[1],M=new n(l(v,O,P)),A=0,S=P>0?O-4:O,_;for(_=0;_>16&255,M[A++]=h>>8&255,M[A++]=h&255;return P===2&&(h=r[v.charCodeAt(_)]<<2|r[v.charCodeAt(_+1)]>>4,M[A++]=h&255),P===1&&(h=r[v.charCodeAt(_)]<<10|r[v.charCodeAt(_+1)]<<4|r[v.charCodeAt(_+2)]>>2,M[A++]=h>>8&255,M[A++]=h&255),M}u(p,"ar");function g(v){return t[v>>18&63]+t[v>>12&63]+t[v>>6&63]+t[v&63]}u(g,"yr");function y(v,h,T){for(var O,P=[],M=h;MS?S:A+M));return O===1?(h=v[T-1],P.push(t[h>>2]+t[h<<4&63]+"==")):O===2&&(h=(v[T-2]<<8)+v[T-1],P.push(t[h>>10]+t[h>>4&63]+t[h<<2&63]+"=")),P.join("")}u(b,"xr")}),rp=Ss(e=>{e.read=function(t,r,n,o,i){var s,a,c=i*8-o-1,l=(1<>1,g=-7,y=n?i-1:0,b=n?-1:1,v=t[r+y];for(y+=b,s=v&(1<<-g)-1,v>>=-g,g+=c;g>0;s=s*256+t[r+y],y+=b,g-=8);for(a=s&(1<<-g)-1,s>>=-g,g+=o;g>0;a=a*256+t[r+y],y+=b,g-=8);if(s===0)s=1-p;else{if(s===l)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-p}return(v?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,c,l,p=s*8-i-1,g=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=o?0:s-1,h=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,a=g):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+y>=1?r+=b/l:r+=b*Math.pow(2,1-y),r*l>=2&&(a++,l/=2),a+y>=g?(c=0,a=g):a+y>=1?(c=(r*l-1)*Math.pow(2,i),a=a+y):(c=r*Math.pow(2,y-1)*Math.pow(2,i),a=0));i>=8;t[n+v]=c&255,v+=h,c/=256,i-=8);for(a=a<0;t[n+v]=a&255,v+=h,a/=256,p-=8);t[n+v-h]|=T*128}}),No=tp(),Vt=rp(),As=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Kt.Buffer=C;Kt.SlowBuffer=up;Kt.INSPECT_MAX_BYTES=50;var An=2147483647;Kt.kMaxLength=An;C.TYPED_ARRAY_SUPPORT=np();!C.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 np(){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(e){return!1}}u(np,"Br");Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function Ze(e){if(e>An)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}u(Ze,"d");function C(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 Lo(e)}return Cs(e,t,r)}u(C,"h");C.poolSize=8192;function Cs(e,t,r){if(typeof e=="string")return ip(e,t);if(ArrayBuffer.isView(e))return sp(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(Ge(e,ArrayBuffer)||e&&Ge(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ge(e,SharedArrayBuffer)||e&&Ge(e.buffer,SharedArrayBuffer)))return Is(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 C.from(n,t,r);let o=ap(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.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)}u(Cs,"Z");C.from=function(e,t,r){return Cs(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function Rs(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"')}u(Rs,"Q");function op(e,t,r){return Rs(e),e<=0?Ze(e):t!==void 0?typeof r=="string"?Ze(e).fill(t,r):Ze(e).fill(t):Ze(e)}u(op,"Er");C.alloc=function(e,t,r){return op(e,t,r)};function Lo(e){return Rs(e),Ze(e<0?0:Bo(e)|0)}u(Lo,"P");C.allocUnsafe=function(e){return Lo(e)};C.allocUnsafeSlow=function(e){return Lo(e)};function ip(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=_s(e,t)|0,n=Ze(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}u(ip,"dr");function jo(e){let t=e.length<0?0:Bo(e.length)|0,r=Ze(t);for(let n=0;n=An)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+An.toString(16)+" bytes");return e|0}u(Bo,"O");function up(e){return+e!=e&&(e=0),C.alloc(+e)}u(up,"Ir");C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(Ge(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),Ge(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.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 o=0,i=Math.min(r,n);on.length?(C.isBuffer(i)||(i=C.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(C.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function _s(e,t){if(C.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ge(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $o(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return qs(e).length;default:if(o)return n?-1:$o(e).length;t=(""+t).toLowerCase(),o=!0}}u(_s,"v");C.byteLength=_s;function cp(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 wp(this,t,r);case"utf8":case"utf-8":return Ds(this,t,r);case"ascii":return hp(this,t,r);case"latin1":case"binary":return bp(this,t,r);case"base64":return gp(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xp(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}u(cp,"Fr");C.prototype._isBuffer=!0;function Ct(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}u(Ct,"I");C.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+=" ... "),""};As&&(C.prototype[As]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,o){if(Ge(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r);for(let p=0;p2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Uo(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:Ps(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ps(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}u(Fs,"rr");function Ps(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function c(p,g){return i===1?p[g]:p.readUInt16BE(g*i)}u(c,"c");let l;if(o){let p=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let p=!0;for(let g=0;go&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return lp(this,e,t,r);case"utf8":case"utf-8":return pp(this,e,t,r);case"ascii":case"latin1":case"binary":return fp(this,e,t,r);case"base64":return mp(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dp(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gp(e,t,r){return t===0&&r===e.length?No.fromByteArray(e):No.fromByteArray(e.slice(t,r))}u(gp,"Sr");function Ds(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let c,l,p,g;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(s=g));break;case 3:c=e[o+1],l=e[o+2],(c&192)===128&&(l&192)===128&&(g=(i&15)<<12|(c&63)<<6|l&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:c=e[o+1],l=e[o+2],p=e[o+3],(c&192)===128&&(l&192)===128&&(p&192)===128&&(g=(i&15)<<18|(c&63)<<12|(l&63)<<6|p&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return yp(n)}u(Ds,"tr");var Ms=4096;function yp(e){let t=e.length;if(t<=Ms)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}u(se,"a");C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||se(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||se(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||se(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||se(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=lt(function(e){e=e>>>0,Gt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Gt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||se(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};C.prototype.readInt8=function(e,t){return e=e>>>0,t||se(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||se(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||se(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=lt(function(e){e=e>>>0,Gt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(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,Gt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||se(e,4,this.length),Vt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||se(e,4,this.length),Vt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||se(e,8,this.length),Vt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||se(e,8,this.length),Vt.read(this,e,!1,52,8)};function Ee(e,t,r,n,o,i){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}u(Ee,"y");C.prototype.writeUintLE=C.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;Ee(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;Ee(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};C.prototype.writeUint8=C.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,1,255,0),this[t]=e&255,t+1};C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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 ks(e,t,r,n,o){Bs(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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}u(ks,"ir");function Ns(e,t,r,n,o){Bs(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}u(Ns,"nr");C.prototype.writeBigUInt64LE=lt(function(e,t=0){return ks(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=lt(function(e,t=0){return Ns(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Ee(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};C.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Ee(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};C.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};C.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeBigInt64LE=lt(function(e,t=0){return ks(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=lt(function(e,t=0){return Ns(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function js(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}u(js,"er");function $s(e,t,r,n,o){return t=+t,r=r>>>0,o||js(e,t,r,4,34028234663852886e22,-34028234663852886e22),Vt.write(e,t,r,n,23,4),r+4}u($s,"or");C.prototype.writeFloatLE=function(e,t,r){return $s(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return $s(this,e,t,!1,r)};function Ls(e,t,r,n,o){return t=+t,r=r>>>0,o||js(e,t,r,8,17976931348623157e292,-17976931348623157e292),Vt.write(e,t,r,n,52,8),r+8}u(Ls,"ur");C.prototype.writeDoubleLE=function(e,t,r){return Ls(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return Ls(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.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 o;if(typeof e=="number")for(o=t;o2**32?o=Os(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Os(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Os(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}`}u(Os,"K");function Ep(e,t,r){Gt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ar(t,e.length-(r+1))}u(Ep,"Dr");function Bs(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ut.ERR_OUT_OF_RANGE("value",a,e)}Ep(n,o,i)}u(Bs,"hr");function Gt(e,t){if(typeof e!="number")throw new Ut.ERR_INVALID_ARG_TYPE(t,"number",e)}u(Gt,"R");function Ar(e,t,r){throw Math.floor(e)!==e?(Gt(e,r),new Ut.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ut.ERR_BUFFER_OUT_OF_BOUNDS:new Ut.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}u(Ar,"T");var vp=/[^+/0-9A-Za-z-_]/g;function Tp(e){if(e=e.split("=")[0],e=e.trim().replace(vp,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}u(Tp,"br");function $o(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}u($o,"b");function Ap(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}u(Pp,"Or");function qs(e){return No.toByteArray(Tp(e))}u(qs,"fr");function Pn(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}u(Pn,"_");function Ge(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}u(Ge,"E");function Uo(e){return e!==e}u(Uo,"Y");var Mp=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function lt(e){return typeof BigInt>"u"?Op:e}u(lt,"g");function Op(){throw new Error("BigInt not supported")}u(Op,"Yr");});var x,d=Tn(()=>{"use strict";x=X(Us())});var Vs=W((_y,Mn)=>{d();f();m();var Sp=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function o(s,a){if(!n[s]){n[s]={};for(var c=0;c>>8,c[l*2+1]=g%256}return c},decompressFromUint8Array:function(s){if(s==null)return i.decompress(s);for(var a=new Array(s.length/2),c=0,l=a.length;c>1}else{for(p=1,l=0;l>1}T--,T==0&&(T=Math.pow(2,P),P++),delete y[h]}else for(p=g[h],l=0;l>1;T--,T==0&&(T=Math.pow(2,P),P++),g[v]=O++,h=String(b)}if(h!==""){if(Object.prototype.hasOwnProperty.call(y,h)){if(h.charCodeAt(0)<256){for(l=0;l>1}else{for(p=1,l=0;l>1}T--,T==0&&(T=Math.pow(2,P),P++),delete y[h]}else for(p=g[h],l=0;l>1;T--,T==0&&(T=Math.pow(2,P),P++)}for(p=2,l=0;l>1;for(;;)if(A=A<<1,S==a-1){M.push(c(A));break}else S++;return M.join("")},decompress:function(s){return s==null?"":s==""?null:i._decompress(s.length,32768,function(a){return s.charCodeAt(a)})},_decompress:function(s,a,c){var l=[],p,g=4,y=4,b=3,v="",h=[],T,O,P,M,A,S,_,F={val:c(0),position:a,index:1};for(T=0;T<3;T+=1)l[T]=T;for(P=0,A=Math.pow(2,2),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;switch(p=P){case 0:for(P=0,A=Math.pow(2,8),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;_=e(P);break;case 1:for(P=0,A=Math.pow(2,16),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;_=e(P);break;case 2:return""}for(l[3]=_,O=_,h.push(_);;){if(F.index>s)return"";for(P=0,A=Math.pow(2,b),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;switch(_=P){case 0:for(P=0,A=Math.pow(2,8),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;l[y++]=e(P),_=y-1,g--;break;case 1:for(P=0,A=Math.pow(2,16),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;l[y++]=e(P),_=y-1,g--;break;case 2:return h.join("")}if(g==0&&(g=Math.pow(2,b),b++),l[_])v=l[_];else if(_===y)v=O+O.charAt(0);else return null;h.push(v),l[y++]=O+v.charAt(0),g--,O=v,g==0&&(g=Math.pow(2,b),b++)}}};return i}();typeof Mn!="undefined"&&Mn!=null&&(Mn.exports=Sp)});var Ys=W((ah,Qs)=>{"use strict";d();f();m();Qs.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Vo=W((ph,Xs)=>{d();f();m();var Pr=Ys(),Zs={};for(let e of Object.keys(Pr))Zs[Pr[e]]=e;var k={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Xs.exports=k;for(let e of Object.keys(k)){if(!("channels"in k[e]))throw new Error("missing channels property: "+e);if(!("labels"in k[e]))throw new Error("missing channel labels property: "+e);if(k[e].labels.length!==k[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=k[e];delete k[e].channels,delete k[e].labels,Object.defineProperty(k[e],"channels",{value:t}),Object.defineProperty(k[e],"labels",{value:r})}k.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o,a,c;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let l=(o+i)/2;return i===o?c=0:l<=.5?c=s/(i+o):c=s/(2-i-o),[a,c*100,l*100]};k.rgb.hsv=function(e){let t,r,n,o,i,s=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(s,a,c),p=l-Math.min(s,a,c),g=u(function(y){return(l-y)/6/p+1/2},"diffc");return p===0?(o=0,i=0):(i=p/l,t=g(s),r=g(a),n=g(c),s===l?o=n-r:a===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,l*100]};k.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=k.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};k.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0;return[i*100,s*100,a*100,o*100]};function Cp(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u(Cp,"comparativeDistance");k.rgb.keyword=function(e){let t=Zs[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(Pr)){let i=Pr[o],s=Cp(e,i);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,s=t*.0193+r*.1192+n*.9505;return[o*100,i*100,s*100]};k.rgb.lab=function(e){let t=k.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let i=116*n-16,s=500*(r-n),a=200*(n-o);return[i,s,a]};k.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,i,s;if(r===0)return s=n*255,[s,s,s];n<.5?o=n*(1+r):o=n+r-n*r;let a=2*n-o,c=[0,0,0];for(let l=0;l<3;l++)i=t+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?s=a+(o-a)*6*i:2*i<1?s=o:3*i<2?s=a+(o-a)*(2/3-i)*6:s=a,c[l]=s*255;return c};k.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;let s=(n+r)/2,a=n===0?2*o/(i+o):2*r/(n+r);return[t,a*100,s*100]};k.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};k.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01),i,s;s=(2-r)*n;let a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,i*100,s*100]};k.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,i;o>1&&(r/=o,n/=o);let s=Math.floor(6*t),a=1-n;i=6*t-s,(s&1)!==0&&(i=1-i);let c=r+i*(a-r),l,p,g;switch(s){default:case 6:case 0:l=a,p=c,g=r;break;case 1:l=c,p=a,g=r;break;case 2:l=r,p=a,g=c;break;case 3:l=r,p=c,g=a;break;case 4:l=c,p=r,g=a;break;case 5:l=a,p=r,g=c;break}return[l*255,p*255,g*255]};k.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o);return[i*255,s*255,a*255]};k.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,s=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]};k.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let o=116*r-16,i=500*(t-r),s=200*(r-n);return[o,i,s]};k.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-n/200;let a=i**3,c=o**3,l=s**3;return i=a>.008856?a:(i-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]};k.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(r*r+n*n);return[t,s,o]};k.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o);return[t,i,s]};k.rgb.ansi16=function(e,t=null){let[r,n,o]=e,i=t===null?k.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(s+=60),s};k.hsv.ansi16=function(e){return k.rgb.ansi16(k.hsv.rgb(e),e[2])};k.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};k.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};k.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};k.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};k.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),o=n>>16&255,i=n>>8&255,s=n&255;return[o,i,s]};k.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i,a,c;return s<1?a=i/(1-s):a=0,s<=0?c=0:o===t?c=(r-n)/s%6:o===r?c=2+(n-t)/s:c=4+(t-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};k.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};k.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};k.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],i=t%1*6,s=i%1,a=1-s,c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};k.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};k.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};k.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};k.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,o=n-t,i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};k.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};k.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};k.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};k.gray.hsl=function(e){return[0,0,e[0]]};k.gray.hsv=k.gray.hsl;k.gray.hwb=function(e){return[0,100,e[0]]};k.gray.cmyk=function(e){return[0,0,0,e[0]]};k.gray.lab=function(e){return[e[0],0,0]};k.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};k.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var ta=W((yh,ea)=>{d();f();m();var On=Vo();function Rp(){let e={},t=Object.keys(On);for(let r=t.length,n=0;n{d();f();m();var Go=Vo(),Dp=ta(),Jt={},kp=Object.keys(Go);function Np(e){let t=u(function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))},"wrappedFn");return"conversion"in e&&(t.conversion=e.conversion),t}u(Np,"wrapRaw");function jp(e){let t=u(function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let o=e(r);if(typeof o=="object")for(let i=o.length,s=0;s{Jt[e]={},Object.defineProperty(Jt[e],"channels",{value:Go[e].channels}),Object.defineProperty(Jt[e],"labels",{value:Go[e].labels});let t=Dp(e);Object.keys(t).forEach(n=>{let o=t[n];Jt[e][n]=jp(o),Jt[e][n].raw=Np(o)})});ra.exports=Jt});var ca=W((Mh,ua)=>{"use strict";d();f();m();var oa=u((e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,"wrapAnsi16"),ia=u((e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},"wrapAnsi256"),sa=u((e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m"),Sn=u(e=>e,"ansi2ansi"),aa=u((e,t,r)=>[e,t,r],"rgb2rgb"),zt=u((e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},"setLazyProperty"),Ko,Ht=u((e,t,r,n)=>{Ko===void 0&&(Ko=na());let o=n?10:0,i={};for(let[s,a]of Object.entries(Ko)){let c=s==="ansi16"?"ansi":s;s===t?i[c]=e(r,o):typeof a=="object"&&(i[c]=e(a[t],o))}return i},"makeDynamicStyles");function $p(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,i]of Object.entries(n))t[o]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[o]=t[o],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",zt(t.color,"ansi",()=>Ht(oa,"ansi16",Sn,!1)),zt(t.color,"ansi256",()=>Ht(ia,"ansi256",Sn,!1)),zt(t.color,"ansi16m",()=>Ht(sa,"rgb",aa,!1)),zt(t.bgColor,"ansi",()=>Ht(oa,"ansi16",Sn,!0)),zt(t.bgColor,"ansi256",()=>Ht(ia,"ansi256",Sn,!0)),zt(t.bgColor,"ansi16m",()=>Ht(sa,"rgb",aa,!0)),t}u($p,"assembleStyles");Object.defineProperty(ua,"exports",{enumerable:!0,get:$p})});var Jo=W(()=>{d();f();m()});var pa=W((Nh,la)=>{"use strict";d();f();m();var Lp=u((e,t,r)=>{let n=e.indexOf(t);if(n===-1)return e;let o=t.length,i=0,s="";do s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i);while(n!==-1);return s+=e.substr(i),s},"stringReplaceAll"),Bp=u((e,t,r,n)=>{let o=0,i="";do{let s=e[n-1]==="\r";i+=e.substr(o,(s?n-1:n)-o)+t+(s?`\r -`:` -`)+r,o=n+1,n=e.indexOf(` -`,o)}while(n!==-1);return i+=e.substr(o),i},"stringEncaseCRLFWithFirstIndex");la.exports={stringReplaceAll:Lp,stringEncaseCRLFWithFirstIndex:Bp}});var ya=W((qh,ga)=>{"use strict";d();f();m();var qp=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,fa=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Up=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Vp=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Gp=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function da(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):Gp.get(e)||e}u(da,"unescape");function Kp(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),o;for(let i of n){let s=Number(i);if(!Number.isNaN(s))r.push(s);else if(o=i.match(Up))r.push(o[2].replace(Vp,(a,c,l)=>c?da(c):l));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`)}return r}u(Kp,"parseArguments");function Jp(e){fa.lastIndex=0;let t=[],r;for(;(r=fa.exec(e))!==null;){let n=r[1];if(r[2]){let o=Kp(n,r[2]);t.push([n].concat(o))}else t.push([n])}return t}u(Jp,"parseStyle");function ma(e,t){let r={};for(let o of t)for(let i of o.styles)r[i[0]]=o.inverse?null:i.slice(1);let n=e;for(let[o,i]of Object.entries(r))if(!!Array.isArray(i)){if(!(o in n))throw new Error(`Unknown Chalk style: ${o}`);n=i.length>0?n[o](...i):n[o]}return n}u(ma,"buildStyle");ga.exports=(e,t)=>{let r=[],n=[],o=[];if(t.replace(qp,(i,s,a,c,l,p)=>{if(s)o.push(da(s));else if(c){let g=o.join("");o=[],n.push(r.length===0?g:ma(e,r)(g)),r.push({inverse:a,styles:Jp(c)})}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(ma(e,r)(o.join(""))),o=[],r.pop()}else o.push(p)}),n.push(o.join("")),r.length>0){let i=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(i)}return n.join("")}});var Rt=W((Jh,va)=>{"use strict";d();f();m();var Mr=ca(),{stdout:Ho,stderr:Wo}=Jo(),{stringReplaceAll:zp,stringEncaseCRLFWithFirstIndex:Hp}=pa(),{isArray:Rn}=Array,ba=["ansi","ansi","ansi256","ansi16m"],Wt=Object.create(null),Wp=u((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ho?Ho.level:0;e.level=t.level===void 0?r:t.level},"applyOptions"),Cn=class{constructor(t){return wa(t)}};u(Cn,"ChalkClass");var wa=u(e=>{let t={};return Wp(t,e),t.template=(...r)=>Ea(t.template,...r),Object.setPrototypeOf(t,In.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Cn,t.template},"chalkFactory");function In(e){return wa(e)}u(In,"Chalk");for(let[e,t]of Object.entries(Mr))Wt[e]={get(){let r=_n(this,Qo(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};Wt.visible={get(){let e=_n(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var xa=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of xa)Wt[e]={get(){let{level:t}=this;return function(...r){let n=Qo(Mr.color[ba[t]][e](...r),Mr.color.close,this._styler);return _n(this,n,this._isEmpty)}}};for(let e of xa){let t="bg"+e[0].toUpperCase()+e.slice(1);Wt[t]={get(){let{level:r}=this;return function(...n){let o=Qo(Mr.bgColor[ba[r]][e](...n),Mr.bgColor.close,this._styler);return _n(this,o,this._isEmpty)}}}}var Qp=Object.defineProperties(()=>{},{...Wt,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),Qo=u((e,t,r)=>{let n,o;return r===void 0?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},"createStyler"),_n=u((e,t,r)=>{let n=u((...o)=>Rn(o[0])&&Rn(o[0].raw)?ha(n,Ea(n,...o)):ha(n,o.length===1?""+o[0]:o.join(" ")),"builder");return Object.setPrototypeOf(n,Qp),n._generator=e,n._styler=t,n._isEmpty=r,n},"createBuilder"),ha=u((e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:n,closeAll:o}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=zp(t,r.close,r.open),r=r.parent;let i=t.indexOf(` -`);return i!==-1&&(t=Hp(t,o,n,i)),n+t+o},"applyStyle"),zo,Ea=u((e,...t)=>{let[r]=t;if(!Rn(r)||!Rn(r.raw))return t.join(" ");let n=t.slice(1),o=[r.raw[0]];for(let i=1;i{d();f();m();Yp={existsSync(){return!1}},Dn=Yp});var Aa=W((r0,Ta)=>{d();f();m();var Qt=1e3,Yt=Qt*60,Zt=Yt*60,It=Zt*24,Zp=It*7,Xp=It*365.25;Ta.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ef(e);if(r==="number"&&isFinite(e))return t.long?rf(e):tf(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ef(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Xp;case"weeks":case"week":case"w":return r*Zp;case"days":case"day":case"d":return r*It;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}u(ef,"parse");function tf(e){var t=Math.abs(e);return t>=It?Math.round(e/It)+"d":t>=Zt?Math.round(e/Zt)+"h":t>=Yt?Math.round(e/Yt)+"m":t>=Qt?Math.round(e/Qt)+"s":e+"ms"}u(tf,"fmtShort");function rf(e){var t=Math.abs(e);return t>=It?kn(e,t,It,"day"):t>=Zt?kn(e,t,Zt,"hour"):t>=Yt?kn(e,t,Yt,"minute"):t>=Qt?kn(e,t,Qt,"second"):e+" ms"}u(rf,"fmtLong");function kn(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}u(kn,"plural")});var Zo=W((a0,Pa)=>{d();f();m();function nf(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=s,r.humanize=Aa(),r.destroy=l,Object.keys(e).forEach(p=>{r[p]=e[p]}),r.names=[],r.skips=[],r.formatters={};function t(p){let g=0;for(let y=0;y{if(_==="%%")return"%";A++;let j=r.formatters[F];if(typeof j=="function"){let V=T[A];_=j.call(O,V),T.splice(A,1),A--}return _}),r.formatArgs.call(O,T),(O.log||r.log).apply(O,T)}return u(h,"debug"),h.namespace=p,h.useColors=r.useColors(),h.color=r.selectColor(p),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(b!==r.namespaces&&(b=r.namespaces,v=r.enabled(p)),v),set:T=>{y=T}}),typeof r.init=="function"&&r.init(h),h}u(r,"createDebug");function n(p,g){let y=r(this.namespace+(typeof g=="undefined"?":":g)+p);return y.log=this.log,y}u(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let g,y=(typeof p=="string"?p:"").split(/[\s,]+/),b=y.length;for(g=0;g"-"+g)].join(",");return r.enable(""),p}u(i,"disable");function s(p){if(p[p.length-1]==="*")return!0;let g,y;for(g=0,y=r.skips.length;g{d();f();m();Ae.formatArgs=sf;Ae.save=af;Ae.load=uf;Ae.useColors=of;Ae.storage=cf();Ae.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function of(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}u(of,"useColors");function sf(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Nn.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}u(sf,"formatArgs");Ae.log=console.debug||console.log||(()=>{});function af(e){try{e?Ae.storage.setItem("debug",e):Ae.storage.removeItem("debug")}catch(t){}}u(af,"save");function uf(){let e;try{e=Ae.storage.getItem("debug")}catch(t){}return!e&&typeof w!="undefined"&&"env"in w&&(e=w.env.DEBUG),e}u(uf,"load");function cf(){try{return localStorage}catch(e){}}u(cf,"localstorage");Nn.exports=Zo()(Ae);var{formatters:lf}=Nn.exports;lf.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Oa=W(jn=>{d();f();m();jn.isatty=function(){return!1};function pf(){throw new Error("tty.ReadStream is not implemented")}u(pf,"t");jn.ReadStream=pf;function ff(){throw new Error("tty.WriteStream is not implemented")}u(ff,"e");jn.WriteStream=ff});var ai=W(J=>{d();f();m();var re=u((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"p"),Sa=re((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Vn=re((e,t)=>{"use strict";var r=Sa();t.exports=function(){return r()&&!!Symbol.toStringTag}}),mf=re((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=Sa();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),df=re((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var c=n.call(arguments,1),l,p=function(){if(this instanceof l){var h=a.apply(this,c.concat(n.call(arguments)));return Object(h)===h?h:this}else return a.apply(s,c.concat(n.call(arguments)))},g=Math.max(0,a.length-c.length),y=[],b=0;b{"use strict";var r=df();t.exports=E.prototype.bind||r}),gf=re((e,t)=>{"use strict";var r=ri();t.exports=r.call(E.call,Object.prototype.hasOwnProperty)}),ni=re((e,t)=>{"use strict";var r,n=SyntaxError,o=E,i=TypeError,s=u(function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch(ee){}},"lr"),a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(K){a=null}var c=u(function(){throw new i},"gr"),l=a?function(){try{return arguments.callee,c}catch(K){try{return a(arguments,"callee").get}catch(ee){return c}}}():c,p=mf()(),g=Object.getPrototypeOf||function(K){return K.__proto__},y={},b=typeof Uint8Array>"u"?r:g(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?g(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":b,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet},h=u(function K(ee){var z;if(ee==="%AsyncFunction%")z=s("async function () {}");else if(ee==="%GeneratorFunction%")z=s("function* () {}");else if(ee==="%AsyncGeneratorFunction%")z=s("async function* () {}");else if(ee==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(z=H.prototype)}else if(ee==="%AsyncIteratorPrototype%"){var L=K("%AsyncGenerator%");L&&(z=g(L.prototype))}return v[ee]=z,z},"r"),T={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=ri(),P=gf(),M=O.call(E.call,Array.prototype.concat),A=O.call(E.apply,Array.prototype.splice),S=O.call(E.call,String.prototype.replace),_=O.call(E.call,String.prototype.slice),F=O.call(E.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,te=u(function(K){var ee=_(K,0,1),z=_(K,-1);if(ee==="%"&&z!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&ee!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var H=[];return S(K,j,function(L,at,ie,qt){H[H.length]=ie?S(qt,V,"$1"):at||L}),H},"At"),G=u(function(K,ee){var z=K,H;if(P(T,z)&&(H=T[z],z="%"+H[0]+"%"),P(v,z)){var L=v[z];if(L===y&&(L=h(z)),typeof L>"u"&&!ee)throw new i("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:H,name:z,value:L}}throw new n("intrinsic "+K+" does not exist!")},"ht");t.exports=function(K,ee){if(typeof K!="string"||K.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ee!="boolean")throw new i('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,K)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=te(K),H=z.length>0?z[0]:"",L=G("%"+H+"%",ee),at=L.name,ie=L.value,qt=!1,ut=L.alias;ut&&(H=ut[0],A(z,M([0,1],ut)));for(var Ot=1,Ue=!0;Ot=z.length){var St=a(ie,Se);Ue=!!St,Ue&&"get"in St&&!("originalValue"in St.get)?ie=St.get:ie=ie[Se]}else Ue=P(ie,Se),ie=ie[Se];Ue&&!qt&&(v[at]=ie)}}return ie}}),yf=re((e,t)=>{"use strict";var r=ri(),n=ni(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(g){c=null}t.exports=function(g){var y=s(r,i,arguments);if(a&&c){var b=a(y,"length");b.configurable&&c(y,"length",{value:1+l(0,g.length-(arguments.length-1))})}return y};var p=u(function(){return s(r,o,arguments)},"ee");c?c(t.exports,"apply",{value:p}):t.exports.apply=p}),oi=re((e,t)=>{"use strict";var r=ni(),n=yf(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),hf=re((e,t)=>{"use strict";var r=Vn()(),n=oi(),o=n("Object.prototype.toString"),i=u(function(c){return r&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:o(c)==="[object Arguments]"},"H"),s=u(function(c){return i(c)?!0:c!==null&&typeof c=="object"&&typeof c.length=="number"&&c.length>=0&&o(c)!=="[object Array]"&&o(c.callee)==="[object Function]"},"se"),a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),bf=re((e,t)=>{"use strict";var r=Object.prototype.toString,n=E.prototype.toString,o=/^\s*(?:function)?\*/,i=Vn()(),s=Object.getPrototypeOf,a=u(function(){if(!i)return!1;try{return E("return function*() {}")()}catch(l){}},"Ft"),c;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var p=r.call(l);return p==="[object GeneratorFunction]"}if(!s)return!1;if(typeof c>"u"){var g=a();c=g?s(g):!1}return s(l)===c}}),wf=re((e,t)=>{"use strict";var r=E.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(A){A!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=u(function(A){try{var S=r.call(A);return s.test(S)}catch(_){return!1}},"vr"),c=u(function(A){try{return a(A)?!1:(r.call(A),!0)}catch(S){return!1}},"hr"),l=Object.prototype.toString,p="[object Object]",g="[object Function]",y="[object GeneratorFunction]",b="[object HTMLAllCollection]",v="[object HTML document.all class]",h="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,O=!(0 in[,]),P=u(function(){return!1},"Or");typeof document=="object"&&(M=document.all,l.call(M)===l.call(document.all)&&(P=u(function(A){if((O||!A)&&(typeof A>"u"||typeof A=="object"))try{var S=l.call(A);return(S===b||S===v||S===h||S===p)&&A("")==null}catch(_){}return!1},"Or")));var M;t.exports=n?function(A){if(P(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{n(A,null,o)}catch(S){if(S!==i)return!1}return!a(A)&&c(A)}:function(A){if(P(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(T)return c(A);if(a(A))return!1;var S=l.call(A);return S!==g&&S!==y&&!/^\[object HTML/.test(S)?!1:c(A)}}),Ca=re((e,t)=>{"use strict";var r=wf(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=u(function(l,p,g){for(var y=0,b=l.length;y=3&&(y=g),n.call(l)==="[object Array]"?i(l,p,y):typeof l=="string"?s(l,p,y):a(l,p,y)},"_t");t.exports=c}),Ra=re((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=ni(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),_a=re((e,t)=>{"use strict";var r=Ca(),n=Ra(),o=oi(),i=o("Object.prototype.toString"),s=Vn()(),a=typeof globalThis>"u"?global:globalThis,c=n(),l=o("Array.prototype.indexOf",!0)||function(h,T){for(var O=0;O-1}return y?v(h):!1}}),xf=re((e,t)=>{"use strict";var r=Ca(),n=Ra(),o=oi(),i=o("Object.prototype.toString"),s=Vn()(),a=typeof globalThis>"u"?global:globalThis,c=n(),l=o("String.prototype.slice"),p={},g=Ia(),y=Object.getPrototypeOf;s&&g&&y&&r(c,function(h){if(typeof a[h]=="function"){var T=new a[h];if(Symbol.toStringTag in T){var O=y(T),P=g(O,Symbol.toStringTag);if(!P){var M=y(O);P=g(M,Symbol.toStringTag)}p[h]=P.get}}});var b=u(function(h){var T=!1;return r(p,function(O,P){if(!T)try{var M=O.call(h);M===P&&(T=M)}catch(A){}}),T},"tn"),v=_a();t.exports=function(h){return v(h)?!s||!(Symbol.toStringTag in h)?l(i(h),8,-1):b(h):!1}}),Ef=re(e=>{"use strict";var t=hf(),r=bf(),n=xf(),o=_a();function i(I){return I.call.bind(I)}u(i,"R");var s=typeof BigInt<"u",a=typeof Symbol<"u",c=i(Object.prototype.toString),l=i(Number.prototype.valueOf),p=i(String.prototype.valueOf),g=i(Boolean.prototype.valueOf);s&&(y=i(BigInt.prototype.valueOf));var y;a&&(b=i(Symbol.prototype.valueOf));var b;function v(I,zl){if(typeof I!="object")return!1;try{return zl(I),!0}catch(wy){return!1}}u(v,"N"),e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function h(I){return typeof Promise<"u"&&I instanceof Promise||I!==null&&typeof I=="object"&&typeof I.then=="function"&&typeof I.catch=="function"}u(h,"yn"),e.isPromise=h;function T(I){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(I):o(I)||Se(I)}u(T,"cn"),e.isArrayBufferView=T;function O(I){return n(I)==="Uint8Array"}u(O,"pn"),e.isUint8Array=O;function P(I){return n(I)==="Uint8ClampedArray"}u(P,"ln"),e.isUint8ClampedArray=P;function M(I){return n(I)==="Uint16Array"}u(M,"gn"),e.isUint16Array=M;function A(I){return n(I)==="Uint32Array"}u(A,"dn"),e.isUint32Array=A;function S(I){return n(I)==="Int8Array"}u(S,"bn"),e.isInt8Array=S;function _(I){return n(I)==="Int16Array"}u(_,"mn"),e.isInt16Array=_;function F(I){return n(I)==="Int32Array"}u(F,"An"),e.isInt32Array=F;function j(I){return n(I)==="Float32Array"}u(j,"hn"),e.isFloat32Array=j;function V(I){return n(I)==="Float64Array"}u(V,"Sn"),e.isFloat64Array=V;function te(I){return n(I)==="BigInt64Array"}u(te,"vn"),e.isBigInt64Array=te;function G(I){return n(I)==="BigUint64Array"}u(G,"On"),e.isBigUint64Array=G;function K(I){return c(I)==="[object Map]"}u(K,"X"),K.working=typeof Map<"u"&&K(new Map);function ee(I){return typeof Map>"u"?!1:K.working?K(I):I instanceof Map}u(ee,"jn"),e.isMap=ee;function z(I){return c(I)==="[object Set]"}u(z,"rr"),z.working=typeof Set<"u"&&z(new Set);function H(I){return typeof Set>"u"?!1:z.working?z(I):I instanceof Set}u(H,"Pn"),e.isSet=H;function L(I){return c(I)==="[object WeakMap]"}u(L,"er"),L.working=typeof WeakMap<"u"&&L(new WeakMap);function at(I){return typeof WeakMap>"u"?!1:L.working?L(I):I instanceof WeakMap}u(at,"wn"),e.isWeakMap=at;function ie(I){return c(I)==="[object WeakSet]"}u(ie,"Dr"),ie.working=typeof WeakSet<"u"&&ie(new WeakSet);function qt(I){return ie(I)}u(qt,"En"),e.isWeakSet=qt;function ut(I){return c(I)==="[object ArrayBuffer]"}u(ut,"tr"),ut.working=typeof ArrayBuffer<"u"&&ut(new ArrayBuffer);function Ot(I){return typeof ArrayBuffer>"u"?!1:ut.working?ut(I):I instanceof ArrayBuffer}u(Ot,"qe"),e.isArrayBuffer=Ot;function Ue(I){return c(I)==="[object DataView]"}u(Ue,"nr"),Ue.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Ue(new DataView(new ArrayBuffer(1),0,1));function Se(I){return typeof DataView>"u"?!1:Ue.working?Ue(I):I instanceof DataView}u(Se,"Ge"),e.isDataView=Se;var ct=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Ve(I){return c(I)==="[object SharedArrayBuffer]"}u(Ve,"M");function St(I){return typeof ct>"u"?!1:(typeof Ve.working>"u"&&(Ve.working=Ve(new ct)),Ve.working?Ve(I):I instanceof ct)}u(St,"We"),e.isSharedArrayBuffer=St;function Bl(I){return c(I)==="[object AsyncFunction]"}u(Bl,"Tn"),e.isAsyncFunction=Bl;function ql(I){return c(I)==="[object Map Iterator]"}u(ql,"Fn"),e.isMapIterator=ql;function Ul(I){return c(I)==="[object Set Iterator]"}u(Ul,"In"),e.isSetIterator=Ul;function Vl(I){return c(I)==="[object Generator]"}u(Vl,"Bn"),e.isGeneratorObject=Vl;function Gl(I){return c(I)==="[object WebAssembly.Module]"}u(Gl,"Un"),e.isWebAssemblyCompiledModule=Gl;function ws(I){return v(I,l)}u(ws,"_e"),e.isNumberObject=ws;function xs(I){return v(I,p)}u(xs,"ze"),e.isStringObject=xs;function Es(I){return v(I,g)}u(Es,"Ve"),e.isBooleanObject=Es;function vs(I){return s&&v(I,y)}u(vs,"Je"),e.isBigIntObject=vs;function Ts(I){return a&&v(I,b)}u(Ts,"Le"),e.isSymbolObject=Ts;function Kl(I){return ws(I)||xs(I)||Es(I)||vs(I)||Ts(I)}u(Kl,"Rn"),e.isBoxedPrimitive=Kl;function Jl(I){return typeof Uint8Array<"u"&&(Ot(I)||St(I))}u(Jl,"Dn"),e.isAnyArrayBuffer=Jl,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(I){Object.defineProperty(e,I,{enumerable:!1,value:function(){throw new Error(I+" is not supported in userland")}})})}),vf=re((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),Tf=re((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=u(function(){},"n");o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),Fa=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return c;switch(c){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return c}}),s=n[r];r"u")return function(){return J.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(w.throwDeprecation)throw new Error(t);w.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return u(n,"n"),n};var $n={},Da=/^$/;w.env.NODE_DEBUG&&(Ln=w.env.NODE_DEBUG,Ln=Ln.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Da=new RegExp("^"+Ln+"$","i"));var Ln;J.debuglog=function(e){if(e=e.toUpperCase(),!$n[e])if(Da.test(e)){var t=w.pid;$n[e]=function(){var r=J.format.apply(J,arguments);console.error("%s %d: %s",e,t,r)}}else $n[e]=function(){};return $n[e]};function pt(e,t){var r={seen:[],stylize:Mf};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ii(t)?r.showHidden=t:t&&J._extend(r,t),Ft(r.showHidden)&&(r.showHidden=!1),Ft(r.depth)&&(r.depth=2),Ft(r.colors)&&(r.colors=!1),Ft(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Pf),qn(r,e,r.depth)}u(pt,"A");J.inspect=pt;pt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};pt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Pf(e,t){var r=pt.styles[t];return r?"\x1B["+pt.colors[r][0]+"m"+e+"\x1B["+pt.colors[r][1]+"m":e}u(Pf,"xn");function Mf(e,t){return e}u(Mf,"Mn");function Of(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}u(Of,"Nn");function qn(e,t,r){if(e.customInspect&&t&&Bn(t.inspect)&&t.inspect!==J.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Kn(n)||(n=qn(e,n,r)),n}var o=Sf(e,t);if(o)return o;var i=Object.keys(t),s=Of(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),Sr(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Xo(t);if(i.length===0){if(Bn(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Or(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Un(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Sr(t))return Xo(t)}var c="",l=!1,p=["{","}"];if(ka(t)&&(l=!0,p=["[","]"]),Bn(t)){var g=t.name?": "+t.name:"";c=" [Function"+g+"]"}if(Or(t)&&(c=" "+RegExp.prototype.toString.call(t)),Un(t)&&(c=" "+Date.prototype.toUTCString.call(t)),Sr(t)&&(c=" "+Xo(t)),i.length===0&&(!l||t.length==0))return p[0]+c+p[1];if(r<0)return Or(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var y;return l?y=Cf(e,t,r,s,i):y=i.map(function(b){return ti(e,t,r,s,b,l)}),e.seen.pop(),Rf(y,c,p)}u(qn,"fr");function Sf(e,t){if(Ft(t))return e.stylize("undefined","undefined");if(Kn(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(Na(t))return e.stylize(""+t,"number");if(ii(t))return e.stylize(""+t,"boolean");if(Gn(t))return e.stylize("null","null")}u(Sf,"Cn");function Xo(e){return"["+Error.prototype.toString.call(e)+"]"}u(Xo,"xr");function Cf(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),Ft(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}u(ti,"Nr");function Rf(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}u(Rf,"qn");J.types=Ef();function ka(e){return Array.isArray(e)}u(ka,"rt");J.isArray=ka;function ii(e){return typeof e=="boolean"}u(ii,"Cr");J.isBoolean=ii;function Gn(e){return e===null}u(Gn,"sr");J.isNull=Gn;function If(e){return e==null}u(If,"Gn");J.isNullOrUndefined=If;function Na(e){return typeof e=="number"}u(Na,"et");J.isNumber=Na;function Kn(e){return typeof e=="string"}u(Kn,"yr");J.isString=Kn;function _f(e){return typeof e=="symbol"}u(_f,"Wn");J.isSymbol=_f;function Ft(e){return e===void 0}u(Ft,"j");J.isUndefined=Ft;function Or(e){return Xt(e)&&si(e)==="[object RegExp]"}u(Or,"C");J.isRegExp=Or;J.types.isRegExp=Or;function Xt(e){return typeof e=="object"&&e!==null}u(Xt,"D");J.isObject=Xt;function Un(e){return Xt(e)&&si(e)==="[object Date]"}u(Un,"ur");J.isDate=Un;J.types.isDate=Un;function Sr(e){return Xt(e)&&(si(e)==="[object Error]"||e instanceof Error)}u(Sr,"$");J.isError=Sr;J.types.isNativeError=Sr;function Bn(e){return typeof e=="function"}u(Bn,"ar");J.isFunction=Bn;function Ff(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}u(Ff,"_n");J.isPrimitive=Ff;J.isBuffer=vf();function si(e){return Object.prototype.toString.call(e)}u(si,"$r");function ei(e){return e<10?"0"+e.toString(10):e.toString(10)}u(ei,"Mr");var Df=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kf(){var e=new Date,t=[ei(e.getHours()),ei(e.getMinutes()),ei(e.getSeconds())].join(":");return[e.getDate(),Df[e.getMonth()],t].join(" ")}u(kf,"Vn");J.log=function(){console.log("%s - %s",kf(),J.format.apply(J,arguments))};J.inherits=Tf();J._extend=function(e,t){if(!t||!Xt(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function ja(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u(ja,"tt");var _t=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(_t&&e[_t]){var t=e[_t];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,_t,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,c){r=a,n=c}),i=[],s=0;s{d();f();m();var $f=Oa(),Jn=ai();ae.init=Kf;ae.log=Uf;ae.formatArgs=Bf;ae.save=Vf;ae.load=Gf;ae.useColors=Lf;ae.destroy=Jn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let e=Jo();e&&(e.stderr||e).level>=2&&(ae.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}ae.inspectOpts=Object.keys(w.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=w.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Lf(){return"colors"in ae.inspectOpts?Boolean(ae.inspectOpts.colors):$f.isatty(w.stderr.fd)}u(Lf,"useColors");function Bf(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+zn.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=qf()+t+" "+e[0]}u(Bf,"formatArgs");function qf(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}u(qf,"getDate");function Uf(...e){return w.stderr.write(Jn.format(...e)+` -`)}u(Uf,"log");function Vf(e){e?w.env.DEBUG=e:delete w.env.DEBUG}u(Vf,"save");function Gf(){return w.env.DEBUG}u(Gf,"load");function Kf(e){e.inspectOpts={};let t=Object.keys(ae.inspectOpts);for(let r=0;rt.trim()).join(" ")};$a.O=function(e){return this.inspectOpts.colors=this.useColors,Jn.inspect(e,this.inspectOpts)}});var Ba=W((R0,ui)=>{d();f();m();typeof w=="undefined"||w.type==="renderer"||w.browser===!0||w.__nwjs?ui.exports=Ma():ui.exports=La()});var za=W((L0,Ja)=>{"use strict";d();f();m();function Je(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}u(Je,"c");function Ka(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){c===-1?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}u(Ka,"A");function Hf(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}u(Hf,"b");var er={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=w.cwd()),o=r),Je(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ka(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(Je(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ka(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return Je(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":er.normalize(e)},relative:function(e,t){if(Je(e),Je(t),e===t||(e=er.resolve(e),t=er.resolve(t),e===t))return"";for(var r=1;rc){if(t.charCodeAt(i+p)===47)return t.slice(i+p+1);if(p===0)return t.slice(i+p)}else o>c&&(e.charCodeAt(r+p)===47?l=p:p===0&&(l=0));break}var g=e.charCodeAt(r+p),y=t.charCodeAt(i+p);if(g!==y)break;g===47&&(l=p)}var b="";for(p=r+l+1;p<=n;++p)(p===n||e.charCodeAt(p)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(Je(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Je(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(c===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){Je(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return Hf("/",e)},parse:function(e){Je(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,c=!0,l=e.length-1,p=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!c){s=l+1;break}continue}a===-1&&(c=!1,a=l+1),r===46?i===-1?i=l:p!==1&&(p=1):i!==-1&&(p=-1)}return i===-1||a===-1||p===0||p===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};er.posix=er;Ja.exports=er});var Qa=W((W0,Wa)=>{d();f();m();var li=Symbol("arg flag"),ye=class extends Error{constructor(t,r){super(t),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,ye.prototype)}};u(ye,"ArgError");function Cr(e,{argv:t=w.argv.slice(2),permissive:r=!1,stopAtPositional:n=!1}={}){if(!e)throw new ye("argument specification object is required","ARG_CONFIG_NO_SPEC");let o={_:[]},i={},s={};for(let a of Object.keys(e)){if(!a)throw new ye("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(a[0]!=="-")throw new ye(`argument key must start with '-' but found: '${a}'`,"ARG_CONFIG_NONOPT_KEY");if(a.length===1)throw new ye(`argument key must have a name; singular '-' keys are not allowed: ${a}`,"ARG_CONFIG_NONAME_KEY");if(typeof e[a]=="string"){i[a]=e[a];continue}let c=e[a],l=!1;if(Array.isArray(c)&&c.length===1&&typeof c[0]=="function"){let[p]=c;c=u((g,y,b=[])=>(b.push(p(g,y,b[b.length-1])),b),"type"),l=p===Boolean||p[li]===!0}else if(typeof c=="function")l=c===Boolean||c[li]===!0;else throw new ye(`type missing or not a function or valid array type: ${a}`,"ARG_CONFIG_VAD_TYPE");if(a[1]!=="-"&&a.length>2)throw new ye(`short argument keys (with a single hyphen) must have only one character: ${a}`,"ARG_CONFIG_SHORTOPT_TOOLONG");s[a]=[c,l]}for(let a=0,c=t.length;a0){o._=o._.concat(t.slice(a));break}if(l==="--"){o._=o._.concat(t.slice(a+1));break}if(l.length>1&&l[0]==="-"){let p=l[1]==="-"||l.length===2?[l]:l.slice(1).split("").map(g=>`-${g}`);for(let g=0;g1&&t[a+1][0]==="-"&&!(t[a+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(T===Number||typeof BigInt!="undefined"&&T===BigInt))){let P=b===h?"":` (alias for ${h})`;throw new ye(`option requires argument: ${b}${P}`,"ARG_MISSING_REQUIRED_LONGARG")}o[h]=T(t[a+1],h,o[h]),++a}else o[h]=T(v,h,o[h])}}else o._.push(l)}return o}u(Cr,"arg");Cr.flag=e=>(e[li]=!0,e);Cr.COUNT=Cr.flag((e,t,r)=>(r||0)+1);Cr.ArgError=ye;Wa.exports=Cr});var Za=W((e1,Ya)=>{"use strict";d();f();m();Ya.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var pi=W((o1,Xa)=>{"use strict";d();f();m();var Qf=Za();Xa.exports=e=>{let t=Qf(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var tu=W((q1,eu)=>{"use strict";d();f();m();eu.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 Qn=W((K1,ru)=>{"use strict";d();f();m();var Xf=tu();ru.exports=e=>typeof e=="string"?e.replace(Xf(),""):e});var Yn=W((rb,nu)=>{"use strict";d();f();m();nu.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 Ki=W((GS,ac)=>{"use strict";d();f();m();ac.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?r:r+1}return u(e,"_min"),function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s{d();f();m()});var gc=W((jC,Qi)=>{"use strict";d();f();m();var Ld=Object.prototype.hasOwnProperty,we="~";function cn(){}u(cn,"_");Object.create&&(cn.prototype=Object.create(null),new cn().__proto__||(we=!1));function Bd(e,t,r){this.fn=e,this.context=t,this.once=r||!1}u(Bd,"g");function dc(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new Bd(r,n||e,o),s=we?we+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}u(dc,"w");function wo(e,t){--e._eventsCount===0?e._events=new cn:delete e._events[t]}u(wo,"y");function pe(){this._events=new cn,this._eventsCount=0}u(pe,"u");pe.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Ld.call(t,r)&&e.push(we?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};pe.prototype.listeners=function(e){var t=we?we+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{d();f();m();(function(e,t){typeof Tr=="function"&&typeof Yi=="object"&&typeof Zi=="object"?Zi.exports=t():e.pluralize=t()})(Yi,function(){var e=[],t=[],r={},n={},o={};function i(b){return typeof b=="string"?new RegExp("^"+b+"$","i"):b}u(i,"sanitizeRule");function s(b,v){return b===v?v:b===b.toLowerCase()?v.toLowerCase():b===b.toUpperCase()?v.toUpperCase():b[0]===b[0].toUpperCase()?v.charAt(0).toUpperCase()+v.substr(1).toLowerCase():v.toLowerCase()}u(s,"restoreCase");function a(b,v){return b.replace(/\$(\d{1,2})/g,function(h,T){return v[T]||""})}u(a,"interpolate");function c(b,v){return b.replace(v[0],function(h,T){var O=a(v[1],arguments);return s(h===""?b[T-1]:h,O)})}u(c,"replace");function l(b,v,h){if(!b.length||r.hasOwnProperty(b))return v;for(var T=h.length;T--;){var O=h[T];if(O[0].test(v))return c(v,O)}return v}u(l,"sanitizeWord");function p(b,v,h){return function(T){var O=T.toLowerCase();return v.hasOwnProperty(O)?s(T,O):b.hasOwnProperty(O)?s(T,b[O]):l(O,T,h)}}u(p,"replaceWord");function g(b,v,h,T){return function(O){var P=O.toLowerCase();return v.hasOwnProperty(P)?!0:b.hasOwnProperty(P)?!1:l(P,P,h)===P}}u(g,"checkWord");function y(b,v,h){var T=v===1?y.singular(b):y.plural(b);return(h?v+" ":"")+T}return u(y,"pluralize"),y.plural=p(o,n,e),y.isPlural=g(o,n,e),y.singular=p(n,o,t),y.isSingular=g(n,o,t),y.addPluralRule=function(b,v){e.push([i(b),v])},y.addSingularRule=function(b,v){t.push([i(b),v])},y.addUncountableRule=function(b){if(typeof b=="string"){r[b.toLowerCase()]=!0;return}y.addPluralRule(b,"$0"),y.addSingularRule(b,"$0")},y.addIrregularRule=function(b,v){v=v.toLowerCase(),b=b.toLowerCase(),o[b]=v,n[v]=b},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(b){return y.addIrregularRule(b[0],b[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(b){return y.addPluralRule(b[0],b[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(b){return y.addSingularRule(b[0],b[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})});var qc=W((jR,Bc)=>{"use strict";d();f();m();Bc.exports=e=>Object.prototype.toString.call(e)==="[object RegExp]"});var Vc=W((qR,Uc)=>{"use strict";d();f();m();Uc.exports=e=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")}});var Gc=W(es=>{"use strict";d();f();m();Object.defineProperty(es,"__esModule",{value:!0});es.default=e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))});var ul=W((TF,Ug)=>{Ug.exports={name:"@prisma/client",version:"4.8.1",description:"Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports MySQL, PostgreSQL, MariaDB, SQLite databases.",keywords:["orm","prisma2","prisma","client","query","database","sql","postgres","postgresql","mysql","sqlite","mariadb","mssql","typescript","query-builder"],main:"index.js",browser:"index-browser.js",types:"index.d.ts",license:"Apache-2.0",engines:{node:">=14.17"},homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/client"},author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true node -r esbuild-register helpers/build.ts",build:"node -r esbuild-register helpers/build.ts",test:"jest --verbose","test:functional":"node -r esbuild-register helpers/functional-test/run-tests.ts","test:memory":"node -r esbuild-register helpers/memory-tests.ts","test:functional:code":"node -r esbuild-register helpers/functional-test/run-tests.ts --no-types","test:functional:types":"node -r esbuild-register helpers/functional-test/run-tests.ts --types-only","test-notypes":"jest --verbose --testPathIgnorePatterns src/__tests__/types/types.test.ts",generate:"node scripts/postinstall.js",postinstall:"node scripts/postinstall.js",prepublishOnly:"pnpm run build","new-test":"NODE_OPTIONS='-r ts-node/register' yo ./helpers/generator-test/index.ts"},files:["README.md","runtime","scripts","generator-build","edge.js","edge.d.ts","index.js","index.d.ts","index-browser.js"],devDependencies:{"@faker-js/faker":"7.6.0","@fast-check/jest":"1.4.0","@jest/globals":"29.3.1","@jest/test-sequencer":"29.3.1","@opentelemetry/api":"1.2.0","@opentelemetry/context-async-hooks":"1.7.0","@opentelemetry/instrumentation":"0.33.0","@opentelemetry/resources":"1.7.0","@opentelemetry/sdk-trace-base":"1.7.0","@opentelemetry/semantic-conventions":"1.7.0","@prisma/debug":"workspace:*","@prisma/engine-core":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/instrumentation":"workspace:*","@prisma/internals":"workspace:*","@prisma/migrate":"workspace:*","@prisma/mini-proxy":"0.3.0","@swc-node/register":"1.5.4","@swc/core":"1.3.14","@swc/jest":"0.2.23","@timsuchanek/copy":"1.4.5","@types/debug":"4.1.7","@types/fs-extra":"9.0.13","@types/jest":"29.2.4","@types/js-levenshtein":"1.1.1","@types/mssql":"8.1.1","@types/node":"14.18.34","@types/pg":"8.6.5","@types/yeoman-generator":"5.2.11",arg:"5.0.2",benchmark:"2.1.4",chalk:"4.1.2",cuid:"2.1.8","decimal.js":"10.4.2",esbuild:"0.15.13",execa:"5.1.1","expect-type":"0.15.0","flat-map-polyfill":"0.3.8","fs-extra":"11.1.0","fs-monkey":"1.0.3","get-own-enumerable-property-symbols":"3.0.2",globby:"11.1.0","indent-string":"4.0.0","is-obj":"2.0.0","is-regexp":"2.1.0",jest:"29.3.1","jest-junit":"15.0.0","jest-snapshot":"29.3.1","js-levenshtein":"1.1.6",klona:"2.0.5","lz-string":"1.4.4","make-dir":"3.1.0",mariadb:"3.0.2",memfs:"3.4.10",mssql:"9.0.1","node-fetch":"2.6.7",pg:"8.8.0","pkg-up":"3.1.0",pluralize:"8.0.0","replace-string":"3.1.0",resolve:"1.22.1",rimraf:"3.0.2","simple-statistics":"7.8.0","sort-keys":"4.2.0","source-map-support":"0.5.21","sql-template-tag":"5.0.3","stacktrace-parser":"0.1.10","strip-ansi":"6.0.1","strip-indent":"3.0.0","ts-jest":"29.0.3","ts-node":"10.9.1","ts-pattern":"4.0.5",tsd:"0.21.0",typescript:"4.8.4","yeoman-generator":"5.7.0",yo:"4.3.1"},peerDependencies:{prisma:"*"},peerDependenciesMeta:{prisma:{optional:!0}},dependencies:{"@prisma/engines-version":"4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe"},sideEffects:!1}});d();f();m();var Ll=X(Vs());var Js={};ko(Js,{defineExtension:()=>Gs,getExtensionContext:()=>Ks});d();f();m();d();f();m();function Gs(e){return typeof e=="function"?e:t=>t.$extends(e)}u(Gs,"defineExtension");d();f();m();function Ks(e){return e}u(Ks,"getExtensionContext");var Ws={};ko(Ws,{Extensions:()=>zs,Utils:()=>Hs});d();f();m();var zs={};d();f();m();var Hs={};d();f();m();d();f();m();d();f();m();d();f();m();var Wn=X(Ba());var Jf=100,Hn=[],qa,Ua;typeof w!="undefined"&&typeof((qa=w.stderr)==null?void 0:qa.write)!="function"&&(Wn.default.log=(Ua=console.debug)!=null?Ua:console.log);function zf(e){let t=(0,Wn.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&Hn.push([e,...n]),Hn.length>Jf&&Hn.shift(),t("",...n)),t);return r}u(zf,"debugCall");var Va=Object.assign(zf,Wn.default);function Ga(){Hn.length=0}u(Ga,"clearLogs");var Ke=Va;d();f();m();var Ha="library";function ci(e){let t=Wf();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Ha)}u(ci,"getClientEngineType");function Wf(){let e=w.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u(Wf,"getEngineTypeFromEnvVar");d();f();m();var Yf=X(Qa()),Zf=X(pi());function Rr(e){return e instanceof Error}u(Rr,"isError");d();f();m();d();f();m();d();f();m();var Dt=class{};u(Dt,"Engine");d();f();m();var Ce=class extends Error{constructor(r,n,o){super(r);this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(Ce)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};u(Ce,"PrismaClientInitializationError");d();f();m();var he=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.code=n,this.clientVersion=o,this.meta=i,this.batchRequestIdx=s}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};u(he,"PrismaClientKnownRequestError");d();f();m();var Xe=class extends Error{constructor(r,n){super(r);this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};u(Xe,"PrismaClientRustPanicError");d();f();m();var Re=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.clientVersion=n,this.batchRequestIdx=o}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};u(Re,"PrismaClientUnknownRequestError");d();f();m();function fi({error:e,user_facing_error:t},r){return t.error_code?new he(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Re(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}u(fi,"prismaGraphQLToJSError");d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();var ou=typeof globalThis=="object"?globalThis:global;d();f();m();var ft="1.2.0";d();f();m();var iu=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function em(e){var t=new Set([e]),r=new Set,n=e.match(iu);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return u(function(c){return c===e},"isExactmatch");function i(a){return r.add(a),!1}u(i,"_reject");function s(a){return t.add(a),!0}return u(s,"_accept"),u(function(c){if(t.has(c))return!0;if(r.has(c))return!1;var l=c.match(iu);if(!l)return i(c);var p={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return p.prerelease!=null||o.major!==p.major?i(c):o.major===0?o.minor===p.minor&&o.patch<=p.patch?s(c):i(c):o.minor<=p.minor?s(c):i(c)},"isCompatible")}u(em,"_makeCompatibilityCheck");var su=em(ft);var tm=ft.split(".")[0],Ir=Symbol.for("opentelemetry.js.api."+tm),_r=ou;function mt(e,t,r,n){var o;n===void 0&&(n=!1);var i=_r[Ir]=(o=_r[Ir])!==null&&o!==void 0?o:{version:ft};if(!n&&i[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(s.stack||s.message),!1}if(i.version!==ft){var s=new Error("@opentelemetry/api: All API registration versions must match");return r.error(s.stack||s.message),!1}return i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+ft+"."),!0}u(mt,"registerGlobal");function ke(e){var t,r,n=(t=_r[Ir])===null||t===void 0?void 0:t.version;if(!(!n||!su(n)))return(r=_r[Ir])===null||r===void 0?void 0:r[e]}u(ke,"getGlobal");function dt(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+ft+".");var r=_r[Ir];r&&delete r[e]}u(dt,"unregisterGlobal");var au=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return u(e,"DiagComponentLogger"),e.prototype.debug=function(){for(var t=[],r=0;rve.ALL&&(e=ve.ALL),t=t||{};function r(n,o){var i=t[n];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return u(r,"_filterFunc"),{error:r("error",ve.ERROR),warn:r("warn",ve.WARN),info:r("info",ve.INFO),debug:r("debug",ve.DEBUG),verbose:r("verbose",ve.VERBOSE)}}u(uu,"createLogLevelDiagLogger");var rm="diag",Pe=function(){function e(){function t(n){return function(){for(var o=[],i=0;i";c.warn("Current logger will be overwritten from "+p),l.warn("Current logger will overwrite one already registered from "+p)}return mt("diag",l,r,!0)},r.disable=function(){dt(rm,r)},r.createComponentLogger=function(n){return new au(n)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return u(e,"DiagAPI"),e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();d();f();m();var cu=function(){function e(t){this._entries=t?new Map(t):new Map}return u(e,"BaggageImpl"),e.prototype.getEntry=function(t){var r=this._entries.get(t);if(!!r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=t[0],n=t[1];return[r,n]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t=[],r=0;rbm||(this._internalState=t.split(Ru).reverse().reduce(function(r,n){var o=n.trim(),i=o.indexOf(Iu);if(i!==-1){var s=o.slice(0,i),a=o.slice(i+1,n.length);Ou(s)&&Su(a)&&r.set(s,a)}return r},new Map),this._internalState.size>Cu&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Cu))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();var wi="trace",_u=function(){function e(){this._proxyTracerProvider=new hi,this.wrapSpanContext=xu,this.isSpanContextValid=kr,this.deleteSpan=yu,this.getSpan=ro,this.getActiveSpan=gu,this.getSpanContext=no,this.setSpan=Dr,this.setSpanContext=hu}return u(e,"TraceAPI"),e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=mt(wi,this._proxyTracerProvider,Pe.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return ke(wi)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){dt(wi,Pe.instance()),this._proxyTracerProvider=new hi},e}();d();f();m();d();f();m();var Fu=function(){function e(){}return u(e,"NoopTextMapPropagator"),e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}();d();f();m();var xi=Zn("OpenTelemetry Baggage Key");function Du(e){return e.getValue(xi)||void 0}u(Du,"getBaggage");function ku(e,t){return e.setValue(xi,t)}u(ku,"setBaggage");function Nu(e){return e.deleteValue(xi)}u(Nu,"deleteBaggage");var Ei="propagation",xm=new Fu,ju=function(){function e(){this.createBaggage=lu,this.getBaggage=Du,this.setBaggage=ku,this.deleteBaggage=Nu}return u(e,"PropagationAPI"),e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return mt(Ei,t,Pe.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=fu),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=pu),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){dt(Ei,Pe.instance())},e.prototype._getGlobalPropagator=function(){return ke(Ei)||xm},e}();var yt=tr.getInstance(),io=_u.getInstance(),g2=ju.getInstance(),h2=Pe.instance();d();f();m();function rr({context:e,tracingConfig:t}){let r=io.getSpanContext(e!=null?e:yt.active());return(t==null?void 0:t.enabled)&&r?`00-${r.traceId}-${r.spanId}-0${r.traceFlags}`:"00-10-10-00"}u(rr,"getTraceParent");d();f();m();function vi(e){let t=e.includes("tracing");return{get enabled(){return Boolean(globalThis.PRISMA_INSTRUMENTATION&&t)},get middleware(){return Boolean(globalThis.PRISMA_INSTRUMENTATION&&globalThis.PRISMA_INSTRUMENTATION.middleware)}}}u(vi,"getTracingConfig");d();f();m();async function nr(e,t){var o;if(e.enabled===!1)return t();let r=io.getTracer("prisma"),n=(o=e.context)!=null?o:yt.active();if(e.active===!1){let i=r.startSpan(`prisma:client:${e.name}`,e,n);try{return await t(i,n)}finally{i.end()}}return r.startActiveSpan(`prisma:client:${e.name}`,e,n,async i=>{try{return await t(i,yt.active())}finally{i.end()}})}u(nr,"runInChildSpan");d();f();m();function Nr(e){return typeof e.batchRequestIdx=="number"}u(Nr,"hasBatchIndex");d();f();m();d();f();m();d();f();m();var jr=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};u(jr,"PrismaClientError");var be=class extends jr{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};u(be,"DataProxyError");d();f();m();d();f();m();function Q(e,t){return{...e,isRetryable:t}}u(Q,"setRetryable");var or=class extends be{constructor(r){super("This request must be retried",Q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};u(or,"ForcedRetryError");d();f();m();var et=class extends be{constructor(r,n){super(r,Q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};u(et,"InvalidDatasourceError");d();f();m();var tt=class extends be{constructor(r,n){super(r,Q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};u(tt,"NotImplementedYetError");d();f();m();d();f();m();var Y=class extends be{constructor(r,n){var i;super(r,n);this.response=n.response;let o=(i=this.response.headers)==null?void 0:i["Prisma-Request-Id"];if(o){let s=`(The request id was: ${o})`;this.message=this.message+" "+s}}};u(Y,"DataProxyAPIError");var kt=class extends Y{constructor(r){super("Schema needs to be uploaded",Q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};u(kt,"SchemaMissingError");d();f();m();d();f();m();var Ti="This request could not be understood by the server",$r=class extends Y{constructor(r,n,o){super(n||Ti,Q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};u($r,"BadRequestError");d();f();m();var Lr=class extends Y{constructor(r,n){super("Engine not started: healthcheck timeout",Q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};u(Lr,"HealthcheckTimeoutError");d();f();m();var Br=class extends Y{constructor(r,n,o){super(n,Q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};u(Br,"EngineStartupError");d();f();m();var qr=class extends Y{constructor(r){super("Engine version is not supported",Q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};u(qr,"EngineVersionNotSupportedError");d();f();m();var Ai="Request timed out",Ur=class extends Y{constructor(r,n=Ai){super(n,Q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};u(Ur,"GatewayTimeoutError");d();f();m();var Em="Interactive transaction error",Vr=class extends Y{constructor(r,n=Em){super(n,Q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};u(Vr,"InteractiveTransactionError");d();f();m();var vm="Request parameters are invalid",Gr=class extends Y{constructor(r,n=vm){super(n,Q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};u(Gr,"InvalidRequestError");d();f();m();var Pi="Requested resource does not exist",Kr=class extends Y{constructor(r,n=Pi){super(n,Q(r,!1));this.name="NotFoundError";this.code="P5003"}};u(Kr,"NotFoundError");d();f();m();var Mi="Unknown server error",ir=class extends Y{constructor(r,n,o){super(n||Mi,Q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};u(ir,"ServerError");d();f();m();var Oi="Unauthorized, check your connection string",Jr=class extends Y{constructor(r,n=Oi){super(n,Q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};u(Jr,"UnauthorizedError");d();f();m();var Si="Usage exceeded, retry again later",zr=class extends Y{constructor(r,n=Si){super(n,Q(r,!0));this.name="UsageExceededError";this.code="P5008"}};u(zr,"UsageExceededError");async function Tm(e){let t;try{t=await e.text()}catch(r){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(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}u(Tm,"getResponseErrorBody");async function Hr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Tm(e);if(n.type==="QueryEngineError")throw new he(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ir(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new kt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new qr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Br(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Ce(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Lr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Vr(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Gr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Jr(r,sr(Oi,n));if(e.status===404)return new Kr(r,sr(Pi,n));if(e.status===429)throw new zr(r,sr(Si,n));if(e.status===504)throw new Ur(r,sr(Ai,n));if(e.status>=500)throw new ir(r,sr(Mi,n));if(e.status>=400)throw new $r(r,sr(Ti,n))}u(Hr,"responseToError");function sr(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}u(sr,"buildErrorMessage");d();f();m();function $u(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}u($u,"backOff");d();f();m();var Lu={"@prisma/debug":"workspace:*","@prisma/engines-version":"4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.14","@swc/jest":"0.2.23","@types/jest":"29.2.4","@types/node":"16.18.9",execa:"5.1.1",jest:"29.3.1",typescript:"4.8.4"};d();f();m();d();f();m();var Wr=class extends be{constructor(r,n){super(`Cannot fetch data from service: -${r}`,Q(n,!0));this.name="RequestError";this.code="P5010"}};u(Wr,"RequestError");d();f();m();function Bu(){return typeof self=="undefined"?"node":"browser"}u(Bu,"getJSRuntimeName");async function Nt(e,t){var o;let r=t.clientVersion,n=Bu();try{return n==="browser"?await fetch(e,t):await Ci(e,t)}catch(i){let s=(o=i.message)!=null?o:"Unknown error";throw new Wr(s,{clientVersion:r})}}u(Nt,"request");function Pm(e){return{...e.headers,"Content-Type":"application/json"}}u(Pm,"buildHeaders");function Mm(e){return{method:e.method,headers:Pm(e)}}u(Mm,"buildOptions");function Om(e,t){return{text:()=>x.Buffer.concat(e).toString(),json:()=>JSON.parse(x.Buffer.concat(e).toString()),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:t.headers}}u(Om,"buildResponse");async function Ci(e,t={}){let r=Sm("https"),n=Mm(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let c=r.request(e,n,p=>{let{statusCode:g,headers:{location:y}}=p;g>=301&&g<=399&&y&&(y.startsWith("http")===!1?s(Ci(`${i}${y}`,t)):s(Ci(y,t))),p.on("data",b=>o.push(b)),p.on("end",()=>s(Om(o,p))),p.on("error",a)});c.on("error",a),c.end((l=t.body)!=null?l:"")})}u(Ci,"nodeFetch");var Sm=typeof Tr!="undefined"?Tr:()=>{};var Cm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,qu=Ke("prisma:client:dataproxyEngine");async function Rm(e){var i,s,a;let t=Lu["@prisma/engines-version"],r=(i=e.clientVersion)!=null?i:"unknown";if(w.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return w.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;let[n,o]=(s=r==null?void 0:r.split("-"))!=null?s:[];if(o===void 0&&Cm.test(n))return n;if(o!==void 0||r==="0.0.0"){let[c]=(a=t.split("-"))!=null?a:[],[l,p,g]=c.split("."),y=Im(`<=${l}.${p}.${g}`),b=await Nt(y,{clientVersion:r});if(!b.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${b.status} ${b.statusText}, response body: ${await b.text()||""}`);let v=await b.text();qu("length of body fetched from unpkg.com",v.length);let h;try{h=JSON.parse(v)}catch(T){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),T}return h.version}throw new tt("Only `major.minor.patch` versions are supported by Prisma Data Proxy.",{clientVersion:r})}u(Rm,"_getClientVersion");async function Uu(e){let t=await Rm(e);return qu("version",t),t}u(Uu,"getClientVersion");function Im(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}u(Im,"prismaPkgURL");var Vu=10,_m=Promise.resolve(),Ri=Ke("prisma:client:dataproxyEngine"),ar=class extends Dt{constructor(r){var i,s,a,c;super();this.config=r,this.env={...this.config.env,...w.env},this.inlineSchema=(i=r.inlineSchema)!=null?i:"",this.inlineDatasources=(s=r.inlineDatasources)!=null?s:{},this.inlineSchemaHash=(a=r.inlineSchemaHash)!=null?a:"",this.clientVersion=(c=r.clientVersion)!=null?c:"unknown",this.logEmitter=r.logEmitter;let[n,o]=this.extractHostAndApiKey();this.remoteClientVersion=_m.then(()=>Uu(this.config)),this.headers={Authorization:`Bearer ${o}`},this.host=n,Ri("host",this.host)}version(){return"unknown"}async start(){}async stop(){}on(r,n){if(r==="beforeExit")throw new tt("beforeExit event is not yet supported",{clientVersion:this.clientVersion});this.logEmitter.on(r,n)}async url(r){return`https://${this.host}/${await this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async getConfig(){return Promise.resolve({datasources:[{activeProvider:this.config.activeProvider}]})}getDmmf(){throw new tt("getDmmf is not yet supported",{clientVersion:this.clientVersion})}async uploadSchema(){let r=await Nt(await this.url("schema"),{method:"PUT",headers:this.headers,body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Ri("schema response status",r.status);let n=await Hr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})}request({query:r,headers:n={},transaction:o}){return this.logEmitter.emit("query",{query:r}),this.requestInternal({query:r,variables:{}},n,o)}async requestBatch({queries:r,headers:n={},transaction:o}){let i=Boolean(o);this.logEmitter.emit("query",{query:`Batch${i?" in transaction":""} (${r.length}): -${r.join(` -`)}`});let s={batch:r.map(l=>({query:l,variables:{}})),transaction:i,isolationLevel:o==null?void 0:o.isolationLevel},{batchResult:a,elapsed:c}=await this.requestInternal(s,n);return a.map(l=>"errors"in l&&l.errors.length>0?fi(l.errors[0],this.clientVersion):{data:l,elapsed:c})}requestInternal(r,n,o){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=o?`${o.payload.endpoint}/graphql`:await this.url("graphql");i(s);let a=await Nt(s,{method:"POST",headers:{...Ii(n),...this.headers},body:JSON.stringify(r),clientVersion:this.clientVersion});a.ok||Ri("graphql response status",a.status);let c=await Hr(a,this.clientVersion);await this.handleError(c);let l=await a.json();if(l.errors)throw l.errors.length===1?fi(l.errors[0],this.config.clientVersion):new Re(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,c;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(c=o==null?void 0:o.timeout)!=null?c:5e3,isolation_level:o==null?void 0:o.isolationLevel}),p=await this.url("transaction/start");s(p);let g=await Nt(p,{method:"POST",headers:{...Ii(n),...this.headers},body:l,clientVersion:this.clientVersion}),y=await Hr(g,this.clientVersion);await this.handleError(y);let b=await g.json(),v=b.id,h=b["data-proxy"].endpoint;return{id:v,payload:{endpoint:h}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let p=await Nt(l,{method:"POST",headers:{...Ii(n),...this.headers},clientVersion:this.clientVersion}),g=await Hr(p,this.clientVersion);await this.handleError(g);return}}})}extractHostAndApiKey(){let r=this.mergeOverriddenDatasources(),n=Object.keys(r)[0],o=r[n],i=this.resolveDatasourceURL(n,o),s;try{s=new URL(i)}catch(g){throw new et("Could not parse URL of the datasource",{clientVersion:this.clientVersion})}let{protocol:a,host:c,searchParams:l}=s;if(a!=="prisma:")throw new et("Datasource URL must use prisma:// protocol when --data-proxy is used",{clientVersion:this.clientVersion});let p=l.get("api_key");if(p===null||p.length<1)throw new et("No valid API key found in the datasource URL",{clientVersion:this.clientVersion});return[c,p]}mergeOverriddenDatasources(){if(this.config.datasources===void 0)return this.inlineDatasources;let r={...this.inlineDatasources};for(let n of this.config.datasources){if(!this.inlineDatasources[n.name])throw new Error(`Unknown datasource: ${n.name}`);r[n.name]={url:{fromEnvVar:null,value:n.url}}}return r}resolveDatasourceURL(r,n){if(n.url.value)return n.url.value;if(n.url.fromEnvVar){let o=n.url.fromEnvVar,i=this.env[o];if(i===void 0)throw new et(`Datasource "${r}" references an environment variable "${o}" that is not set`,{clientVersion:this.clientVersion});return i}throw new et(`Datasource "${r}" specification is invalid: both value and fromEnvVar are null`,{clientVersion:this.clientVersion})}metrics(r){throw new tt("Metric are not yet supported for Data Proxy",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=u(s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})},"logHttpCall");try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof be)||!s.isRetryable)throw s;if(o>=Vu)throw s instanceof or?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${Vu} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await $u(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof kt)throw await this.uploadSchema(),new or({clientVersion:this.clientVersion,cause:r});if(r)throw r}};u(ar,"DataProxyEngine");function Ii(e){if(e.transactionId){let t={...e};return delete t.transactionId,t}return e}u(Ii,"runtimeHeadersToHttpHeaders");d();f();m();var rt;(t=>{let e;(M=>(M.findUnique="findUnique",M.findUniqueOrThrow="findUniqueOrThrow",M.findFirst="findFirst",M.findFirstOrThrow="findFirstOrThrow",M.findMany="findMany",M.create="create",M.createMany="createMany",M.update="update",M.updateMany="updateMany",M.upsert="upsert",M.delete="delete",M.deleteMany="deleteMany",M.groupBy="groupBy",M.count="count",M.aggregate="aggregate",M.findRaw="findRaw",M.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(rt||(rt={}));var ur={};ko(ur,{error:()=>km,info:()=>Dm,log:()=>Fm,query:()=>Nm,should:()=>Gu,tags:()=>Yr,warn:()=>_i});d();f();m();var Qr=X(Rt());var Yr={error:Qr.default.red("prisma:error"),warn:Qr.default.yellow("prisma:warn"),info:Qr.default.cyan("prisma:info"),query:Qr.default.blue("prisma:query")},Gu={warn:()=>!w.env.PRISMA_DISABLE_WARNINGS};function Fm(...e){console.log(...e)}u(Fm,"log");function _i(e,...t){Gu.warn()&&console.warn(`${Yr.warn} ${e}`,...t)}u(_i,"warn");function Dm(e,...t){console.info(`${Yr.info} ${e}`,...t)}u(Dm,"info");function km(e,...t){console.error(`${Yr.error} ${e}`,...t)}u(km,"error");function Nm(e,...t){console.log(`${Yr.query} ${e}`,...t)}u(Nm,"query");d();f();m();function Fi(e){let t;return(...r)=>t!=null?t:t=e(...r)}u(Fi,"callOnce");d();f();m();function Di(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u(Di,"hasOwnProperty");d();f();m();function ki(e){return e!=null&&typeof e.then=="function"}u(ki,"isPromiseLike");d();f();m();var Ni=u((e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{}),"keyBy");d();f();m();function cr(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}u(cr,"mapObjectValues");d();f();m();var Ku=new Set,ji=u((e,t,...r)=>{Ku.has(e)||(Ku.add(e),_i(t,...r))},"warnOnce");var ht=class extends Error{constructor(r,n){super(`${$m(r)}: ${Lm(n)}`,{cause:n});this.extensionName=r;this.name="PrismaClientExtensionError",this.cause||(this.cause=n),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ht)}get[Symbol.toStringTag](){return"PrismaClientExtensionError"}};u(ht,"PrismaClientExtensionError");function $m(e){return e?`Error caused by extension "${e}"`:"Error caused by an extension"}u($m,"getTitleFromExtensionName");function Lm(e){return e instanceof Error?e.message:`${e}`}u(Lm,"getMessageFromCause");function Zr(e,t){return function(...r){try{let n=t.apply(this,r);return ki(n)?n.then(void 0,o=>Promise.reject(new ht(e,o))):n}catch(n){throw new ht(e,n)}}}u(Zr,"wrapExtensionCallback");function so(e,t){return t&&cr(t,r=>typeof r=="function"?Zr(e,r):r)}u(so,"wrapAllExtensionCallbacks");d();f();m();var lr=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u(lr,"MetricsClient");d();f();m();d();f();m();function $i(e,t){var r;for(let n of t)for(let o of Object.getOwnPropertyNames(n.prototype))Object.defineProperty(e.prototype,o,(r=Object.getOwnPropertyDescriptor(n.prototype,o))!=null?r:Object.create(null))}u($i,"applyMixins");d();f();m();var vt=X(Rt());d();f();m();var pr=9e15,Et=1e9,Li="0123456789abcdef",uo="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",co="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Bi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-pr,maxE:pr,crypto:!1},Qu,nt,B=!0,po="[DecimalError] ",xt=po+"Invalid argument: ",Yu=po+"Precision limit exceeded",Zu=po+"crypto unavailable",Xu="[object Decimal]",ce=Math.floor,ne=Math.pow,Bm=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,qm=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Um=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ec=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,je=1e7,$=7,Vm=9007199254740991,Gm=uo.length-1,qi=co.length-1,R={toStringTag:Xu};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),N(e)};R.ceil=function(){return N(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(xt+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};R.comparedTo=R.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,c=i.s,l=e.s;if(!s||!a)return!c||!l?NaN:c!==l?c:s===a?0:!s^c<0?1:-1;if(!s[0]||!a[0])return s[0]?c:a[0]?-l:0;if(c!==l)return c;if(i.e!==e.e)return i.e>e.e^c<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^c<0?1:-1;return n===o?0:n>o^c<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())+$,n.rounding=1,r=Km(n,ic(n,r)),n.precision=e,n.rounding=t,N(nt==2||nt==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,o,i,s,a,c,l,p=this,g=p.constructor;if(!p.isFinite()||p.isZero())return new g(p);for(B=!1,i=p.s*ne(p.s*p,1/3),!i||Math.abs(i)==1/0?(r=ue(p.d),e=p.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=ne(r,1/3),e=ce((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new g(r),n.s=p.s):n=new g(i.toString()),s=(e=g.precision)+3;;)if(a=n,c=a.times(a).times(a),l=c.plus(p),n=Z(l.plus(p).times(a),l.plus(c),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(N(a,e+1,0),a.times(a).times(a).eq(p))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(N(n,e+1,1),t=!n.times(n).times(n).eq(p));break}return B=!0,N(n,e,g.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ce(this.e/$))*$,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return Z(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return N(Z(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 N(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,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/mo(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=fr(s,1,i.times(t),new s(1),!0);for(var c,l=e,p=new s(8);l--;)c=i.times(i),i=a.minus(c.times(p.minus(c.times(p))));return N(i,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=fr(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/mo(5,e)),o=fr(i,2,o,o,!0);for(var s,a=new i(5),c=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(c.times(s).plus(l))))}return i.precision=t,i.rounding=r,N(o,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,Z(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),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?Ne(r,o,i):new r(0):new r(NaN):t.isZero()?Ne(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=Ne(r,o+4,i).times(.5),r.precision=o,r.rounding=i,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,B=!1,r=r.times(r).minus(1).sqrt().plus(r),B=!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,B=!1,r=r.times(r).plus(1).sqrt().plus(r),B=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?N(new i(o),e,t,!0):(i.precision=r=n-o.e,o=Z(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=Ne(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,o,i,s,a,c,l=this,p=l.constructor,g=p.precision,y=p.rounding;if(l.isFinite()){if(l.isZero())return new p(l);if(l.abs().eq(1)&&g+4<=qi)return s=Ne(p,g+4,y).times(.25),s.s=l.s,s}else{if(!l.s)return new p(NaN);if(g+4<=qi)return s=Ne(p,g+4,y).times(.5),s.s=l.s,s}for(p.precision=a=g+10,p.rounding=1,r=Math.min(28,a/$+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(B=!1,t=Math.ceil(a/$),n=1,c=l.times(l),s=new p(l),o=l;e!==-1;)if(o=o.times(c),i=s.minus(o.div(n+=2)),o=o.times(c),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.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,o,i,s,a,c,l=this,p=l.constructor,g=p.precision,y=p.rounding,b=5;if(e==null)e=new p(10),t=!0;else{if(e=new p(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new p(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new p(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(B=!1,a=g+b,s=wt(l,a),n=t?lo(p,a+10):wt(e,a),c=Z(s,n,a,1),Xr(c.d,o=g,y))do if(a+=10,s=wt(l,a),n=t?lo(p,a+10):wt(e,a),c=Z(s,n,a,1),!i){+ue(c.d).slice(o+1,o+15)+1==1e14&&(c=N(c,g+1,0));break}while(Xr(c.d,o+=10,y));return B=!0,N(c,g,y)};R.minus=R.sub=function(e){var t,r,n,o,i,s,a,c,l,p,g,y,b=this,v=b.constructor;if(e=new v(e),!b.d||!e.d)return!b.s||!e.s?e=new v(NaN):b.d?e.s=-e.s:e=new v(e.d||b.s!==e.s?b:NaN),e;if(b.s!=e.s)return e.s=-e.s,b.plus(e);if(l=b.d,y=e.d,a=v.precision,c=v.rounding,!l[0]||!y[0]){if(y[0])e.s=-e.s;else if(l[0])e=new v(b);else return new v(c===3?-0:0);return B?N(e,a,c):e}if(r=ce(e.e/$),p=ce(b.e/$),l=l.slice(),i=p-r,i){for(g=i<0,g?(t=l,i=-i,s=y.length):(t=y,r=p,s=l.length),n=Math.max(Math.ceil(a/$),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=y.length,g=n0;--n)l[s++]=0;for(n=y.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=p.length,s-o<0&&(o=s,r=p,p=l,l=r),t=0;o;)t=(l[--o]=l[o]+p[o]+t)/je|0,l[o]%=je;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=fo(l,n),B?N(e,a,c):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(xt+e);return r.d?(t=tc(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return N(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())+$,n.rounding=1,r=zm(n,ic(n,r)),n.precision=e,n.rounding=t,N(nt>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,c=s.e,l=s.s,p=s.constructor;if(l!==1||!a||!a[0])return new p(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(B=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=ce((c+1)/2)-(c<0||c%2),l==1/0?t="5e"+c:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),n=new p(t)):n=new p(l.toString()),r=(c=p.precision)+3;;)if(i=n,n=i.plus(Z(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(N(i,c+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(N(n,c+1,1),e=!n.times(n).eq(s));break}return B=!0,N(n,c,p.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=Z(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,N(nt==2||nt==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,o,i,s,a,c,l,p=this,g=p.constructor,y=p.d,b=(e=new g(e)).d;if(e.s*=p.s,!y||!y[0]||!b||!b[0])return new g(!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?NaN:!y||!b?e.s/0:e.s*0);for(r=ce(p.e/$)+ce(e.e/$),c=y.length,l=b.length,c=0;){for(t=0,o=c+n;o>n;)a=i[o]+b[n]*y[o-n-1]+t,i[o--]=a%je|0,t=a/je|0;i[o]=(i[o]+t)%je|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=fo(i,r),B?N(e,g.precision,g.rounding):e};R.toBinary=function(e,t){return Gi(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:(Te(e,0,Et),t===void 0?t=n.rounding:Te(t,0,8),N(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=ze(n,!0):(Te(e,0,Et),t===void 0?t=o.rounding:Te(t,0,8),n=N(new o(n),e+1,t),r=ze(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=ze(o):(Te(e,0,Et),t===void 0?t=i.rounding:Te(t,0,8),n=N(new i(o),e+o.e+1,t),r=ze(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,o,i,s,a,c,l,p,g,y,b=this,v=b.d,h=b.constructor;if(!v)return new h(b);if(l=r=new h(1),n=c=new h(0),t=new h(n),i=t.e=tc(v)-b.e-1,s=i%$,t.d[0]=ne(10,s<0?$+s:s),e==null)e=i>0?t:l;else{if(a=new h(e),!a.isInt()||a.lt(l))throw Error(xt+a);e=a.gt(t)?i>0?t:l:a}for(B=!1,a=new h(ue(v)),p=h.precision,h.precision=i=v.length*$*2;g=Z(a,t,0,1,1),o=r.plus(g.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=c.plus(g.times(o)),c=o,o=t,t=a.minus(g.times(o)),a=o;return o=Z(e.minus(r),n,0,1,1),c=c.plus(o.times(l)),r=r.plus(o.times(n)),c.s=l.s=b.s,y=Z(l,n,i,1).minus(b).abs().cmp(Z(c,r,i,1).minus(b).abs())<1?[l,n]:[c,r],h.precision=p,B=!0,y};R.toHexadecimal=R.toHex=function(e,t){return Gi(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:Te(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=Z(r,e,0,t,1).times(e),B=!0,N(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Gi(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,o,i,s,a=this,c=a.constructor,l=+(e=new c(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new c(ne(+a,l));if(a=new c(a),a.eq(1))return a;if(n=c.precision,i=c.rounding,e.eq(1))return N(a,n,i);if(t=ce(e.e/$),t>=e.d.length-1&&(r=l<0?-l:l)<=Vm)return o=rc(c,a,r,n),e.s<0?new c(1).div(o):N(o,n,i);if(s=a.s,s<0){if(tc.maxE+1||t0?s/0:0):(B=!1,c.rounding=a.s=1,r=Math.min(12,(t+"").length),o=Ui(e.times(wt(a,n+r)),n),o.d&&(o=N(o,n+5,1),Xr(o.d,n,i)&&(t=n+10,o=N(Ui(e.times(wt(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=N(o,n+1,0)))),o.s=s,B=!0,c.rounding=i,N(o,n,i))};R.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=ze(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(Te(e,1,Et),t===void 0?t=o.rounding:Te(t,0,8),n=N(new o(n),e,t),r=ze(n,e<=n.e||n.e<=o.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):(Te(e,1,Et),t===void 0?t=n.rounding:Te(t,0,8)),N(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return N(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(xt+e)}u(Te,"checkInt32");function Xr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=$,o=0):(o=Math.ceil((t+1)/$),t%=$),i=ne(10,$-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==ne(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==ne(10,t-3)-1,s}u(Xr,"checkRoundingDigits");function ao(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}u(ao,"convertBase");function Km(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/mo(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=fr(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}u(Km,"cosine");var Z=function(){function e(n,o,i){var s,a=0,c=n.length;for(n=n.slice();c--;)s=n[c]*o+a,n[c]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}u(e,"multiplyInteger");function t(n,o,i,s){var a,c;if(i!=s)c=i>s?1:-1;else for(a=c=0;ao[a]?1:-1;break}return c}u(t,"compare");function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return u(r,"subtract"),function(n,o,i,s,a,c){var l,p,g,y,b,v,h,T,O,P,M,A,S,_,F,j,V,te,G,K,ee=n.constructor,z=n.s==o.s?1:-1,H=n.d,L=o.d;if(!H||!H[0]||!L||!L[0])return new ee(!n.s||!o.s||(H?L&&H[0]==L[0]:!L)?NaN:H&&H[0]==0||!L?z*0:z/0);for(c?(b=1,p=n.e-o.e):(c=je,b=$,p=ce(n.e/b)-ce(o.e/b)),G=L.length,V=H.length,O=new ee(z),P=O.d=[],g=0;L[g]==(H[g]||0);g++);if(L[g]>(H[g]||0)&&p--,i==null?(_=i=ee.precision,s=ee.rounding):a?_=i+(n.e-o.e)+1:_=i,_<0)P.push(1),v=!0;else{if(_=_/b+2|0,g=0,G==1){for(y=0,L=L[0],_++;(g1&&(L=e(L,y,c),H=e(H,y,c),G=L.length,V=H.length),j=G,M=H.slice(0,G),A=M.length;A=c/2&&++te;do y=0,l=t(L,M,G,A),l<0?(S=M[0],G!=A&&(S=S*c+(M[1]||0)),y=S/te|0,y>1?(y>=c&&(y=c-1),h=e(L,y,c),T=h.length,A=M.length,l=t(h,M,T,A),l==1&&(y--,r(h,G=10;y/=10)g++;O.e=g+p*b-1,N(O,a?i+O.e+1:i,s,v)}return O}}();function N(e,t,r,n){var o,i,s,a,c,l,p,g,y,b=e.constructor;e:if(t!=null){if(g=e.d,!g)return e;for(o=1,a=g[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=$,s=t,p=g[y=0],c=p/ne(10,o-s-1)%10|0;else if(y=Math.ceil((i+1)/$),a=g.length,y>=a)if(n){for(;a++<=y;)g.push(0);p=c=0,o=1,i%=$,s=i-$+1}else break e;else{for(p=a=g[y],o=1;a>=10;a/=10)o++;i%=$,s=i-$+o,c=s<0?0:p/ne(10,o-s-1)%10|0}if(n=n||t<0||g[y+1]!==void 0||(s<0?p:p%ne(10,o-s-1)),l=r<4?(c||n)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||n||r==6&&(i>0?s>0?p/ne(10,o-s):0:g[y-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,l?(t-=e.e+1,g[0]=ne(10,($-t%$)%$),e.e=-t||0):g[0]=e.e=0,e;if(i==0?(g.length=y,a=1,y--):(g.length=y+1,a=ne(10,$-i),g[y]=s>0?(p/ne(10,o-s)%ne(10,s)|0)*a:0),l)for(;;)if(y==0){for(i=1,s=g[0];s>=10;s/=10)i++;for(s=g[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,g[0]==je&&(g[0]=1));break}else{if(g[y]+=a,g[y]!=je)break;g[y--]=0,a=1}for(i=g.length;g[--i]===0;)g.pop()}return B&&(e.e>b.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+bt(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+bt(-o-1)+i,r&&(n=r-s)>0&&(i+=bt(n))):o>=s?(i+=bt(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+bt(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=bt(n))),i}u(ze,"finiteToString");function fo(e,t){var r=e[0];for(t*=$;r>=10;r/=10)t++;return t}u(fo,"getBase10Exponent");function lo(e,t,r){if(t>Gm)throw B=!0,r&&(e.precision=r),Error(Yu);return N(new e(uo),t,1,!0)}u(lo,"getLn10");function Ne(e,t,r){if(t>qi)throw Error(Yu);return N(new e(co),t,r,!0)}u(Ne,"getPi");function tc(e){var t=e.length-1,r=t*$+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}u(tc,"getPrecision");function bt(e){for(var t="";e--;)t+="0";return t}u(bt,"getZeroString");function rc(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/$+4);for(B=!1;;){if(r%2&&(i=i.times(t),Hu(i.d,s)&&(o=!0)),r=ce(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Hu(t.d,s)}return B=!0,i}u(rc,"intPow");function zu(e){return e.d[e.d.length-1]&1}u(zu,"isOdd");function nc(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new y(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(B=!1,c=v):c=t,a=new y(.03125);e.e>-2;)e=e.times(a),g+=5;for(n=Math.log(ne(2,g))/Math.LN10*2+5|0,c+=n,r=i=s=new y(1),y.precision=c;;){if(i=N(i.times(e),c,1),r=r.times(++p),a=s.plus(Z(i,r,c,1)),ue(a.d).slice(0,c)===ue(s.d).slice(0,c)){for(o=g;o--;)s=N(s.times(s),c,1);if(t==null)if(l<3&&Xr(s.d,c-n,b,l))y.precision=c+=10,r=i=a=new y(1),p=0,l++;else return N(s,y.precision=v,b,B=!0);else return y.precision=v,s}s=a}}u(Ui,"naturalExponential");function wt(e,t){var r,n,o,i,s,a,c,l,p,g,y,b=1,v=10,h=e,T=h.d,O=h.constructor,P=O.rounding,M=O.precision;if(h.s<0||!T||!T[0]||!h.e&&T[0]==1&&T.length==1)return new O(T&&!T[0]?-1/0:h.s!=1?NaN:T?0:h);if(t==null?(B=!1,p=M):p=t,O.precision=p+=v,r=ue(T),n=r.charAt(0),Math.abs(i=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=ue(h.d),n=r.charAt(0),b++;i=h.e,n>1?(h=new O("0."+r),i++):h=new O(n+"."+r.slice(1))}else return l=lo(O,p+2,M).times(i+""),h=wt(new O(n+"."+r.slice(1)),p-v).plus(l),O.precision=M,t==null?N(h,M,P,B=!0):h;for(g=h,c=s=h=Z(h.minus(1),h.plus(1),p,1),y=N(h.times(h),p,1),o=3;;){if(s=N(s.times(y),p,1),l=c.plus(Z(s,new O(o),p,1)),ue(l.d).slice(0,p)===ue(c.d).slice(0,p))if(c=c.times(2),i!==0&&(c=c.plus(lo(O,p+2,M).times(i+""))),c=Z(c,new O(b),p,1),t==null)if(Xr(c.d,p-v,P,a))O.precision=p+=v,l=s=h=Z(g.minus(1),g.plus(1),p,1),y=N(h.times(h),p,1),o=a=1;else return N(c,O.precision=M,P,B=!0);else return O.precision=M,c;c=l,o+=2}}u(wt,"naturalLogarithm");function oc(e){return String(e.s*e.s/0)}u(oc,"nonFiniteToString");function Vi(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%$,r<0&&(n+=$),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ec.test(t))return Vi(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(qm.test(t))r=16,t=t.toLowerCase();else if(Bm.test(t))r=2;else if(Um.test(t))r=8;else throw Error(xt+t);for(i=t.search(/p/i),i>0?(c=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=rc(n,new n(r),i,i*2)),l=ao(t,r,je),p=l.length-1,i=p;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=fo(l,p),e.d=l,B=!1,s&&(e=Z(e,o,a*4)),c&&(e=e.times(Math.abs(c)<54?ne(2,c):ot.pow(2,c))),B=!0,e)}u(Jm,"parseOther");function zm(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:fr(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/mo(5,r)),t=fr(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}u(zm,"sine");function fr(e,t,r,n,o){var i,s,a,c,l=1,p=e.precision,g=Math.ceil(p/$);for(B=!1,c=r.times(r),a=new e(n);;){if(s=Z(a.times(c),new e(t++*t++),p,1),a=o?n.plus(s):n.minus(s),n=Z(s.times(c),new e(t++*t++),p,1),s=a.plus(n),s.d[g]!==void 0){for(i=g;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return B=!0,s.d.length=g+1,s}u(fr,"taylorSeries");function mo(e,t){for(var r=e;--t;)r*=e;return r}u(mo,"tinyPow");function ic(e,t){var r,n=t.s<0,o=Ne(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return nt=n?4:1,t;if(r=t.divToInt(o),r.isZero())nt=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return nt=zu(r)?n?2:3:n?4:1,t;nt=zu(r)?n?1:4:n?3:2}return t.minus(o).abs()}u(ic,"toLessThanHalfPi");function Gi(e,t,r,n){var o,i,s,a,c,l,p,g,y,b=e.constructor,v=r!==void 0;if(v?(Te(r,1,Et),n===void 0?n=b.rounding:Te(n,0,8)):(r=b.precision,n=b.rounding),!e.isFinite())p=oc(e);else{for(p=ze(e),s=p.indexOf("."),v?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(p=p.replace(".",""),y=new b(1),y.e=p.length-s,y.d=ao(ze(y),10,o),y.e=y.d.length),g=ao(p,10,o),i=c=g.length;g[--c]==0;)g.pop();if(!g[0])p=v?"0p+0":"0";else{if(s<0?i--:(e=new b(e),e.d=g,e.e=i,e=Z(e,y,r,n,0,o),g=e.d,i=e.e,l=Qu),s=g[r],a=o/2,l=l||g[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&g[r-1]&1||n===(e.s<0?8:7)),g.length=r,l)for(;++g[--r]>o-1;)g[r]=0,r||(++i,g.unshift(1));for(c=g.length;!g[c-1];--c);for(s=0,p="";s1)if(t==16||t==8){for(s=t==16?4:3,--c;c%s;c++)p+="0";for(g=ao(p,o,t),c=g.length;!g[c-1];--c);for(s=1,p="1.";sc)for(i-=c;i--;)p+="0";else it)return e.length=t,!0}u(Hu,"truncate");function Hm(e){return new this(e).abs()}u(Hm,"abs");function Wm(e){return new this(e).acos()}u(Wm,"acos");function Qm(e){return new this(e).acosh()}u(Qm,"acosh");function Ym(e,t){return new this(e).plus(t)}u(Ym,"add");function Zm(e){return new this(e).asin()}u(Zm,"asin");function Xm(e){return new this(e).asinh()}u(Xm,"asinh");function ed(e){return new this(e).atan()}u(ed,"atan");function td(e){return new this(e).atanh()}u(td,"atanh");function rd(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Ne(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Ne(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Ne(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(Z(e,t,i,1)),t=Ne(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Z(e,t,i,1)),r}u(rd,"atan2");function nd(e){return new this(e).cbrt()}u(nd,"cbrt");function od(e){return N(e=new this(e),e.e+1,2)}u(od,"ceil");function id(e,t,r){return new this(e).clamp(t,r)}u(id,"clamp");function sd(e){if(!e||typeof e!="object")throw Error(po+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,Et,"rounding",0,8,"toExpNeg",-pr,0,"toExpPos",0,pr,"maxE",0,pr,"minE",-pr,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(xt+r+": "+n);if(r="crypto",o&&(this[r]=Bi[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Zu);else this[r]=!1;else throw Error(xt+r+": "+n);return this}u(sd,"config");function ad(e){return new this(e).cos()}u(ad,"cos");function ud(e){return new this(e).cosh()}u(ud,"cosh");function sc(e){var t,r,n;function o(i){var s,a,c,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,Wu(i)){l.s=i.s,B?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;B?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(Zu);else for(;i=10;o/=10)n++;n<$&&(r-=$-n)}return s.e=r,s.d=a,s}u(vd,"random");function Td(e){return N(e=new this(e),e.e+1,this.rounding)}u(Td,"round");function Ad(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}u(Ad,"sign");function Pd(e){return new this(e).sin()}u(Pd,"sin");function Md(e){return new this(e).sinh()}u(Md,"sinh");function Od(e){return new this(e).sqrt()}u(Od,"sqrt");function Sd(e,t){return new this(e).sub(t)}u(Sd,"sub");function Cd(){var e=0,t=arguments,r=new this(t[e]);for(B=!1;r.s&&++e`}};u(Ie,"FieldRefImpl");d();f();m();var uc=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],go=Symbol(),Ji=new WeakMap,Me=class{constructor(t){t===go?Ji.set(this,`Prisma.${this._getName()}`):Ji.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ji.get(this)}};u(Me,"ObjectEnumValue");var mr=class extends Me{_getNamespace(){return"NullTypes"}};u(mr,"NullTypesEnumValue");var en=class extends mr{};u(en,"DbNull");var tn=class extends mr{};u(tn,"JsonNull");var rn=class extends mr{};u(rn,"AnyNull");var zi={classes:{DbNull:en,JsonNull:tn,AnyNull:rn},instances:{DbNull:new en(go),JsonNull:new tn(go),AnyNull:new rn(go)}};d();f();m();function yo(e){return ot.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&Array.isArray(e.d)}u(yo,"isDecimalJsLike");function cc(e){if(ot.isDecimal(e))return JSON.stringify(String(e));let t=new ot(0);return t.d=e.d,t.e=e.e,t.s=e.s,JSON.stringify(String(t))}u(cc,"stringifyDecimalJsLike");var le=u((e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r},"keyBy"),dr={String:!0,Int:!0,Float:!0,Boolean:!0,Long:!0,DateTime:!0,ID:!0,UUID:!0,Json:!0,Bytes:!0,Decimal:!0,BigInt:!0};var Fd={string:"String",boolean:"Boolean",object:"Json",symbol:"Symbol"};function gr(e){return typeof e=="string"?e:e.name}u(gr,"stringifyGraphQLType");function on(e,t){return t?`List<${e}>`:e}u(on,"wrapWithList");var Dd=/^(\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60))(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/,kd=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function yr(e,t){let r=t==null?void 0:t.type;if(e===null)return"null";if(Object.prototype.toString.call(e)==="[object BigInt]")return"BigInt";if(He.isDecimal(e)||r==="Decimal"&&yo(e))return"Decimal";if(x.Buffer.isBuffer(e))return"Bytes";if(Nd(e,t))return r.name;if(e instanceof Me)return e._getName();if(e instanceof Ie)return e._toGraphQLInputType();if(Array.isArray(e)){let o=e.reduce((i,s)=>{let a=yr(s,t);return i.includes(a)||i.push(a),i},[]);return o.includes("Float")&&o.includes("Int")&&(o=["Float"]),`List<${o.join(" | ")}>`}let n=typeof e;if(n==="number")return Math.trunc(e)===e?"Int":"Float";if(Object.prototype.toString.call(e)==="[object Date]")return"DateTime";if(n==="string"){if(kd.test(e))return"UUID";if(new Date(e).toString()==="Invalid Date")return"String";if(Dd.test(e))return"DateTime"}return Fd[n]}u(yr,"getGraphQLType");function Nd(e,t){var n;let r=t==null?void 0:t.type;if(!$d(r))return!1;if((t==null?void 0:t.namespace)==="prisma"&&uc.includes(r.name)){let o=(n=e==null?void 0:e.constructor)==null?void 0:n.name;return typeof o=="string"&&zi.instances[o]===e&&r.values.includes(o)}return typeof e=="string"&&r.values.includes(e)}u(Nd,"isValidEnumValue");function ho(e,t){return t.reduce((n,o)=>{let i=(0,lc.default)(e,o);return in.length*3)),str:null}).str}u(ho,"getSuggestion");function hr(e,t=!1){if(typeof e=="string")return e;if(e.values)return`enum ${e.name} { -${(0,Hi.default)(e.values.join(", "),2)} -}`;{let r=(0,Hi.default)(e.fields.map(n=>{let o=`${n.name}`,i=`${t?vt.default.green(o):o}${n.isRequired?"":"?"}: ${vt.default.white(n.inputTypes.map(s=>on(jd(s.type)?s.type.name:gr(s.type),s.isList)).join(" | "))}`;return n.isRequired?i:vt.default.dim(i)}).join(` -`),2);return`${vt.default.dim("type")} ${vt.default.bold.dim(e.name)} ${vt.default.dim("{")} -${r} -${vt.default.dim("}")}`}}u(hr,"stringifyInputType");function jd(e){return typeof e!="string"}u(jd,"argIsInputType");function nn(e){return typeof e=="string"?e==="Null"?"null":e:e.name}u(nn,"getInputTypeName");function jt(e){return typeof e=="string"?e:e.name}u(jt,"getOutputTypeName");function Wi(e,t,r=!1){if(typeof e=="string")return e==="Null"?"null":e;if(e.values)return e.values.join(" | ");let n=e,o=t&&n.fields.every(i=>{var s;return i.inputTypes[0].location==="inputObjectTypes"||((s=i.inputTypes[1])==null?void 0:s.location)==="inputObjectTypes"});return r?nn(e):n.fields.reduce((i,s)=>{let a="";return!o&&!s.isRequired?a=s.inputTypes.map(c=>nn(c.type)).join(" | "):a=s.inputTypes.map(c=>Wi(c.type,s.isRequired,!0)).join(" | "),i[s.name+(s.isRequired?"":"?")]=a,i},{})}u(Wi,"inputTypeToJson");function pc(e,t,r){let n={};for(let o of e)n[r(o)]=o;for(let o of t){let i=r(o);n[i]||(n[i]=o)}return Object.values(n)}u(pc,"unionBy");function bo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u(bo,"lowerCase");function fc(e){return e.endsWith("GroupByOutputType")}u(fc,"isGroupByOutputName");function $d(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&Array.isArray(e.values)}u($d,"isSchemaEnum");var sn=class{constructor({datamodel:t}){this.datamodel=t,this.datamodelEnumMap=this.getDatamodelEnumMap(),this.modelMap=this.getModelMap(),this.typeMap=this.getTypeMap(),this.typeAndModelMap=this.getTypeModelMap()}getDatamodelEnumMap(){return le(this.datamodel.enums,"name")}getModelMap(){return{...le(this.datamodel.models,"name")}}getTypeMap(){return{...le(this.datamodel.types,"name")}}getTypeModelMap(){return{...this.getTypeMap(),...this.getModelMap()}}};u(sn,"DMMFDatamodelHelper");var an=class{constructor({mappings:t}){this.mappings=t,this.mappingsMap=this.getMappingsMap()}getMappingsMap(){return le(this.mappings.modelOperations,"model")}};u(an,"DMMFMappingsHelper");var un=class{constructor({schema:t}){this.outputTypeToMergedOutputType=u(t=>({...t,fields:t.fields}),"outputTypeToMergedOutputType");this.schema=t,this.enumMap=this.getEnumMap(),this.queryType=this.getQueryType(),this.mutationType=this.getMutationType(),this.outputTypes=this.getOutputTypes(),this.outputTypeMap=this.getMergedOutputTypeMap(),this.resolveOutputTypes(),this.inputObjectTypes=this.schema.inputObjectTypes,this.inputTypeMap=this.getInputTypeMap(),this.resolveInputTypes(),this.resolveFieldArgumentTypes(),this.queryType=this.outputTypeMap.Query,this.mutationType=this.outputTypeMap.Mutation,this.rootFieldMap=this.getRootFieldMap()}get[Symbol.toStringTag](){return"DMMFClass"}resolveOutputTypes(){for(let t of this.outputTypes.model){for(let r of t.fields)typeof r.outputType.type=="string"&&!dr[r.outputType.type]&&(r.outputType.type=this.outputTypeMap[r.outputType.type]||this.outputTypeMap[r.outputType.type]||this.enumMap[r.outputType.type]||r.outputType.type);t.fieldMap=le(t.fields,"name")}for(let t of this.outputTypes.prisma){for(let r of t.fields)typeof r.outputType.type=="string"&&!dr[r.outputType.type]&&(r.outputType.type=this.outputTypeMap[r.outputType.type]||this.outputTypeMap[r.outputType.type]||this.enumMap[r.outputType.type]||r.outputType.type);t.fieldMap=le(t.fields,"name")}}resolveInputTypes(){let t=this.inputObjectTypes.prisma;this.inputObjectTypes.model&&t.push(...this.inputObjectTypes.model);for(let r of t){for(let n of r.fields)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(this.inputTypeMap[i]||this.enumMap[i])&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||i)}r.fieldMap=le(r.fields,"name")}}resolveFieldArgumentTypes(){for(let t of this.outputTypes.prisma)for(let r of t.fields)for(let n of r.args)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||i)}for(let t of this.outputTypes.model)for(let r of t.fields)for(let n of r.args)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||o.type)}}getQueryType(){return this.schema.outputObjectTypes.prisma.find(t=>t.name==="Query")}getMutationType(){return this.schema.outputObjectTypes.prisma.find(t=>t.name==="Mutation")}getOutputTypes(){return{model:this.schema.outputObjectTypes.model.map(this.outputTypeToMergedOutputType),prisma:this.schema.outputObjectTypes.prisma.map(this.outputTypeToMergedOutputType)}}getEnumMap(){return{...le(this.schema.enumTypes.prisma,"name"),...this.schema.enumTypes.model?le(this.schema.enumTypes.model,"name"):void 0}}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}getMergedOutputTypeMap(){return{...le(this.outputTypes.model,"name"),...le(this.outputTypes.prisma,"name")}}getInputTypeMap(){return{...this.schema.inputObjectTypes.model?le(this.schema.inputObjectTypes.model,"name"):void 0,...le(this.schema.inputObjectTypes.prisma,"name")}}getRootFieldMap(){return{...le(this.queryType.fields,"name"),...le(this.mutationType.fields,"name")}}};u(un,"DMMFSchemaHelper");var Tt=class{constructor(t){return Object.assign(this,new sn(t),new an(t))}};u(Tt,"BaseDMMFHelper");$i(Tt,[sn,an]);var At=class{constructor(t){return Object.assign(this,new Tt(t),new un(t))}};u(At,"DMMFHelper");$i(At,[Tt,un]);d();f();m();d();f();m();var Yk=X(mc()),$l=X(gc());Yo();var En=X(za());d();f();m();var fe=class{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 fe?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let o=0,i=0;for(;o{let o=t.models.find(i=>i.name===n.model);if(!o)throw new Error(`Mapping without model ${n.model}`);return o.fields.some(i=>i.kind!=="object")}).map(n=>({model:n.model,plural:(0,wc.default)(bo(n.model)),findUnique:n.findUnique||n.findSingle,findUniqueOrThrow:n.findUniqueOrThrow,findFirst:n.findFirst,findFirstOrThrow:n.findFirstOrThrow,findMany:n.findMany,create:n.createOne||n.createSingle||n.create,createMany:n.createMany,delete:n.deleteOne||n.deleteSingle||n.delete,update:n.updateOne||n.updateSingle||n.update,deleteMany:n.deleteMany,updateMany:n.updateMany,upsert:n.upsertOne||n.upsertSingle||n.upsert,aggregate:n.aggregate,groupBy:n.groupBy,findRaw:n.findRaw,aggregateRaw:n.aggregateRaw})),otherOperations:e.otherOperations}}u(Vd,"getMappings");function Ec(e){return xc(e)}u(Ec,"getPrismaClientDMMF");d();f();m();d();f();m();var D=X(Rt());var $t=X(Yn()),is=X(Qn());d();f();m();d();f();m();var $e=class{constructor(){this._map=new Map}get(t){var r;return(r=this._map.get(t))==null?void 0:r.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 o=r();return this.set(t,o),o}};u($e,"Cache");d();f();m();function We(e){return e.replace(/^./,t=>t.toLowerCase())}u(We,"dmmfToJSModelName");function Tc(e,t,r){let n=We(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Gd({...e,...vc(t.name,t.result.$allModels),...vc(t.name,t.result[n])})}u(Tc,"getComputedFields");function Gd(e){let t=new $e,r=u(n=>t.getOrCreate(n,()=>e[n]?e[n].needs.flatMap(r):[n]),"resolveNeeds");return cr(e,n=>({...n,needs:r(n.name)}))}u(Gd,"resolveDependencies");function vc(e,t){return t?cr(t,({needs:r,compute:n},o)=>({name:o,needs:r?Object.keys(r).filter(i=>r[i]):[],compute:Zr(e,n)})):{}}u(vc,"getComputedFieldsFromModel");function Ac(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!!e[n.name])for(let o of n.needs)r[o]=!0;return r}u(Ac,"applyComputedFieldsToSelection");d();f();m();var br=X(Rt()),Ic=X(Yn());d();f();m();Yo();d();f();m();d();f();m();d();f();m();var Pt=X(Rt());var Kd=Pt.default.rgb(246,145,95),Jd=Pt.default.rgb(107,139,140),xo=Pt.default.cyan,Pc=Pt.default.rgb(127,155,155),Mc=u(e=>e,"identity"),Oc={keyword:xo,entity:xo,value:Pc,punctuation:Jd,directive:xo,function:xo,variable:Pc,string:Pt.default.greenBright,boolean:Kd,number:Pt.default.cyan,comment:Pt.default.grey};var Eo={},zd=0,U={manual:Eo.Prism&&Eo.Prism.manual,disableWorkerMessageHandler:Eo.Prism&&Eo.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Le){let t=e;return new Le(t.type,U.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(U.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(te instanceof Le)continue;if(S&&j!=t.length-1){P.lastIndex=V;var g=P.exec(e);if(!g)break;var p=g.index+(A?g[1].length:0),y=g.index+g[0].length,a=j,c=V;for(let L=t.length;a=c&&(++j,V=c);if(t[j]instanceof Le)continue;l=a-j,te=e.slice(V,c),g.index-=V}else{P.lastIndex=0;var g=P.exec(te),l=1}if(!g){if(i)break;continue}A&&(_=g[1]?g[1].length:0);var p=g.index+_,g=g[0].slice(_),y=p+g.length,b=te.slice(0,p),v=te.slice(y);let G=[j,l];b&&(++j,V+=b.length,G.push(b));let K=new Le(h,M?U.tokenize(g,M):g,F,g,S);if(G.push(K),v&&G.push(v),Array.prototype.splice.apply(t,G),l!=1&&U.matchGrammar(e,t,r,j,V,!0,h),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return U.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=U.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=U.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:Le};U.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:/[{}[\];(),.:]/};U.languages.javascript=U.languages.extend("clike",{"class-name":[U.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}/});U.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;U.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:U.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:U.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:U.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:U.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});U.languages.markup&&U.languages.markup.tag.addInlined("script","javascript");U.languages.js=U.languages.javascript;U.languages.typescript=U.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/});U.languages.ts=U.languages.typescript;function Le(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}u(Le,"Token");Le.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Le.stringify(r,t)}).join(""):Hd(e.type)(e.content)};function Hd(e){return Oc[e]||Mc}u(Hd,"getColorForSyntaxKind");function Sc(e){return Wd(e,U.languages.javascript)}u(Sc,"highlightTS");function Wd(e,t){return U.tokenize(e,t).map(n=>Le.stringify(n)).join("")}u(Wd,"highlight");d();f();m();var Cc=X(pi());function Rc(e){return(0,Cc.default)(e)}u(Rc,"dedent");var _e=class{static read(t){let r;try{r=Dn.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new _e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new _e(t,Rc(n).split(` -`))}highlight(){let t=Sc(this.toString());return new _e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};u(_e,"SourceFileSlice");var Qd={red:e=>br.default.red(e),gray:e=>br.default.gray(e),dim:e=>br.default.dim(e),bold:e=>br.default.bold(e),underline:e=>br.default.underline(e),highlightSource:e=>e.highlight()},Yd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Zd({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var g;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||w.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let c=Math.max(1,a.lineNumber-3),l=(g=_e.read(a.fileName))==null?void 0:g.slice(c,a.lineNumber),p=l==null?void 0:l.lineAt(a.lineNumber);if(l&&p){let y=eg(p),b=Xd(p);if(!b)return s;s.functionName=`${b.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,h=>h.slice(0,b.openingBraceIndex))),l=i.highlightSource(l);let v=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((h,T)=>i.gray(String(T).padStart(v))+" "+h).mapLines(h=>i.dim(h)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let h=y+v+1;h+=2,s.callArguments=(0,Ic.default)(o,h).slice(h)}}return s}u(Zd,"getTemplateParameters");function Xd(e){let t=Object.keys(rt.ModelAction).join("|"),n=new RegExp(String.raw`\S+(${t})\(`).exec(e);return n?{code:n[0],openingBraceIndex:n.index+n[0].length}:null}u(Xd,"findPrismaActionCall");function eg(e){let t=0;for(let r=0;rArray.isArray(e)?e:e.split("."),"keys"),Xi=u((e,t)=>Nc(t).reduce((r,n)=>r&&r[n],e),"deepGet"),vo=u((e,t,r)=>Nc(t).reduceRight((n,o,i,s)=>Object.assign({},Xi(e,s.slice(0,i)),{[o]:n}),r),"deepSet");d();f();m();function jc(e,t){if(!e||typeof e!="object"||typeof e.hasOwnProperty!="function")return e;let r={};for(let n in e){let o=e[n];Object.hasOwnProperty.call(e,n)&&t(n,o)&&(r[n]=o)}return r}u(jc,"filterObject");d();f();m();var ng={"[object Date]":!0,"[object Uint8Array]":!0,"[object Decimal]":!0};function $c(e){return e?typeof e=="object"&&!ng[Object.prototype.toString.call(e)]:!1}u($c,"isObject");d();f();m();function Lc(e,t){let r={},n=Array.isArray(t)?t:[t];for(let o in e)Object.hasOwnProperty.call(e,o)&&!n.includes(o)&&(r[o]=e[o]);return r}u(Lc,"omit");d();f();m();var Oe=X(Rt()),rs=X(Qn());d();f();m();var og=qc(),ig=Vc(),sg=Gc().default,ag=u((e,t,r)=>{let n=[];return u(function o(i,s={},a="",c=[]){s.indent=s.indent||" ";let l;s.inlineCharacterLimit===void 0?l={newLine:` -`,newLineOrSpace:` -`,pad:a,indent:a+s.indent}:l={newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};let p=u(g=>{if(s.inlineCharacterLimit===void 0)return g;let y=g.replace(new RegExp(l.newLine,"g"),"").replace(new RegExp(l.newLineOrSpace,"g")," ").replace(new RegExp(l.pad+"|"+l.indent,"g"),"");return y.length<=s.inlineCharacterLimit?y:g.replace(new RegExp(l.newLine+"|"+l.newLineOrSpace,"g"),` -`).replace(new RegExp(l.pad,"g"),a).replace(new RegExp(l.indent,"g"),a+s.indent)},"expandWhiteSpace");if(n.indexOf(i)!==-1)return'"[Circular]"';if(x.Buffer.isBuffer(i))return`Buffer(${x.Buffer.length})`;if(i==null||typeof i=="number"||typeof i=="boolean"||typeof i=="function"||typeof i=="symbol"||i instanceof Me||og(i))return String(i);if(i instanceof Date)return`new Date('${i.toISOString()}')`;if(i instanceof Ie)return`prisma.${bo(i.modelName)}.fields.${i.name}`;if(Array.isArray(i)){if(i.length===0)return"[]";n.push(i);let g="["+l.newLine+i.map((y,b)=>{let v=i.length-1===b?l.newLine:","+l.newLineOrSpace,h=o(y,s,a+s.indent,[...c,b]);return s.transformValue&&(h=s.transformValue(i,b,h)),l.indent+h+v}).join("")+l.pad+"]";return n.pop(),p(g)}if(ig(i)){let g=Object.keys(i).concat(sg(i));if(s.filter&&(g=g.filter(b=>s.filter(i,b))),g.length===0)return"{}";n.push(i);let y="{"+l.newLine+g.map((b,v)=>{let h=g.length-1===v?l.newLine:","+l.newLineOrSpace,T=typeof b=="symbol",O=!T&&/^[a-z$_][a-z$_0-9]*$/i.test(b),P=T||O?b:o(b,s,void 0,[...c,b]),M=o(i[b],s,a+s.indent,[...c,b]);s.transformValue&&(M=s.transformValue(i,b,M));let A=l.indent+String(P)+": "+M+h;return s.transformLine&&(A=s.transformLine({obj:i,indent:l.indent,key:P,stringifiedValue:M,value:i[b],eol:h,originalLine:A,path:c.concat(P)})),A}).join("")+l.pad+"}";return n.pop(),p(y)}return i=String(i).replace(/[\r\n]/g,g=>g===` -`?"\\n":"\\r"),s.singleQuotes===!1?(i=i.replace(/"/g,'\\"'),`"${i}"`):(i=i.replace(/\\?'/g,"\\'"),`'${i}'`)},"stringifyObject")(e,t,r)},"stringifyObject"),pn=ag;var ts="@@__DIM_POINTER__@@";function To({ast:e,keyPaths:t,valuePaths:r,missingItems:n}){let o=e;for(let{path:i,type:s}of n)o=vo(o,i,s);return pn(o,{indent:" ",transformLine:({indent:i,key:s,value:a,stringifiedValue:c,eol:l,path:p})=>{let g=p.join("."),y=t.includes(g),b=r.includes(g),v=n.find(T=>T.path===g),h=c;if(v){typeof a=="string"&&(h=h.slice(1,h.length-1));let T=v.isRequired?"":"?",O=v.isRequired?"+":"?",M=(v.isRequired?Oe.default.greenBright:Oe.default.green)(lg(s+T+": "+h+l,i,O));return v.isRequired||(M=Oe.default.dim(M)),M}else{let T=n.some(A=>g.startsWith(A.path)),O=s[s.length-2]==="?";O&&(s=s.slice(1,s.length-1)),O&&typeof a=="object"&&a!==null&&(h=h.split(` -`).map((A,S,_)=>S===_.length-1?A+ts:A).join(` -`)),T&&typeof a=="string"&&(h=h.slice(1,h.length-1),O||(h=Oe.default.bold(h))),(typeof a!="object"||a===null)&&!b&&!T&&(h=Oe.default.dim(h));let P=y?Oe.default.redBright(s):s;h=b?Oe.default.redBright(h):h;let M=i+P+": "+h+(T?l:Oe.default.dim(l));if(y||b){let A=M.split(` -`),S=String(s).length,_=y?Oe.default.redBright("~".repeat(S)):" ".repeat(S),F=b?ug(i,s,a,c):0,j=b&&Kc(a),V=b?" "+Oe.default.redBright("~".repeat(F)):"";_&&_.length>0&&!j&&A.splice(1,0,i+_+V),_&&_.length>0&&j&&A.splice(A.length-1,0,i.slice(0,i.length-2)+V),M=A.join(` -`)}return M}}})}u(To,"printJsonWithErrors");function ug(e,t,r,n){return r===null?4:typeof r=="string"?r.length+2:Kc(r)?Math.abs(cg(`${t}: ${(0,rs.default)(n)}`)-e.length):String(r).length}u(ug,"getValueLength");function Kc(e){return typeof e=="object"&&e!==null&&!(e instanceof Me)}u(Kc,"isRenderedAsObject");function cg(e){return e.split(` -`).reduce((t,r)=>r.length>t?r.length:t,0)}u(cg,"getLongestLine");function lg(e,t,r){return e.split(` -`).map((n,o,i)=>o===0?r+t.slice(1)+n:o(0,rs.default)(n).includes(ts)?Oe.default.dim(n.replace(ts,"")):n.includes("?")?Oe.default.dim(n):n).join(` -`)}u(lg,"prefixLines");var fn=2,Ao=class{constructor(t,r){this.type=t;this.children=r;this.printFieldError=u(({error:t},r,n)=>{if(t.type==="emptySelect"){let o=n?"":` Available options are listed in ${D.default.greenBright.dim("green")}.`;return`The ${D.default.redBright("`select`")} statement for type ${D.default.bold(jt(t.field.outputType.type))} must not be empty.${o}`}if(t.type==="emptyInclude"){if(r.length===0)return`${D.default.bold(jt(t.field.outputType.type))} does not have any relation and therefore can't have an ${D.default.redBright("`include`")} statement.`;let o=n?"":` Available options are listed in ${D.default.greenBright.dim("green")}.`;return`The ${D.default.redBright("`include`")} statement for type ${D.default.bold(jt(t.field.outputType.type))} must not be empty.${o}`}if(t.type==="noTrueSelect")return`The ${D.default.redBright("`select`")} statement for type ${D.default.bold(jt(t.field.outputType.type))} needs ${D.default.bold("at least one truthy value")}.`;if(t.type==="includeAndSelect")return`Please ${D.default.bold("either")} use ${D.default.greenBright("`include`")} or ${D.default.greenBright("`select`")}, but ${D.default.redBright("not both")} at the same time.`;if(t.type==="invalidFieldName"){let o=t.isInclude?"include":"select",i=t.isIncludeScalar?"Invalid scalar":"Unknown",s=n?"":t.isInclude&&r.length===0?` -This model has no relations, so you can't use ${D.default.redBright("include")} with it.`:` Available options are listed in ${D.default.greenBright.dim("green")}.`,a=`${i} field ${D.default.redBright(`\`${t.providedName}\``)} for ${D.default.bold(o)} statement on model ${D.default.bold.white(t.modelName)}.${s}`;return t.didYouMean&&(a+=` Did you mean ${D.default.greenBright(`\`${t.didYouMean}\``)}?`),t.isIncludeScalar&&(a+=` -Note, that ${D.default.bold("include")} statements only accept relation fields.`),a}if(t.type==="invalidFieldType")return`Invalid value ${D.default.redBright(`${pn(t.providedValue)}`)} of type ${D.default.redBright(yr(t.providedValue,void 0))} for field ${D.default.bold(`${t.fieldName}`)} on model ${D.default.bold.white(t.modelName)}. Expected either ${D.default.greenBright("true")} or ${D.default.greenBright("false")}.`},"printFieldError");this.printArgError=u(({error:t,path:r,id:n},o,i)=>{if(t.type==="invalidName"){let s=`Unknown arg ${D.default.redBright(`\`${t.providedName}\``)} in ${D.default.bold(r.join("."))} for type ${D.default.bold(t.outputType?t.outputType.name:nn(t.originalType))}.`;return t.didYouMeanField?s+=` -\u2192 Did you forget to wrap it with \`${D.default.greenBright("select")}\`? ${D.default.dim("e.g. "+D.default.greenBright(`{ select: { ${t.providedName}: ${t.providedValue} } }`))}`:t.didYouMeanArg?(s+=` Did you mean \`${D.default.greenBright(t.didYouMeanArg)}\`?`,!o&&!i&&(s+=` ${D.default.dim("Available args:")} -`+hr(t.originalType,!0))):t.originalType.fields.length===0?s+=` The field ${D.default.bold(t.originalType.name)} has no arguments.`:!o&&!i&&(s+=` Available args: - -`+hr(t.originalType,!0)),s}if(t.type==="invalidType"){let s=pn(t.providedValue,{indent:" "}),a=s.split(` -`).length>1;if(a&&(s=` -${s} -`),t.requiredType.bestFittingType.location==="enumTypes")return`Argument ${D.default.bold(t.argName)}: Provided value ${D.default.redBright(s)}${a?"":" "}of type ${D.default.redBright(yr(t.providedValue))} on ${D.default.bold(`prisma.${this.children[0].name}`)} is not a ${D.default.greenBright(on(gr(t.requiredType.bestFittingType.type),t.requiredType.bestFittingType.isList))}. -\u2192 Possible values: ${t.requiredType.bestFittingType.type.values.map(g=>D.default.greenBright(`${gr(t.requiredType.bestFittingType.type)}.${g}`)).join(", ")}`;let c=".";xr(t.requiredType.bestFittingType.type)&&(c=`: -`+hr(t.requiredType.bestFittingType.type));let l=`${t.requiredType.inputType.map(g=>D.default.greenBright(on(gr(g.type),t.requiredType.bestFittingType.isList))).join(" or ")}${c}`,p=t.requiredType.inputType.length===2&&t.requiredType.inputType.find(g=>xr(g.type))||null;return p&&(l+=` -`+hr(p.type,!0)),`Argument ${D.default.bold(t.argName)}: Got invalid value ${D.default.redBright(s)}${a?"":" "}on ${D.default.bold(`prisma.${this.children[0].name}`)}. Provided ${D.default.redBright(yr(t.providedValue))}, expected ${l}`}if(t.type==="invalidNullArg"){let s=r.length===1&&r[0]===t.name?"":` for ${D.default.bold(`${r.join(".")}`)}`,a=` Please use ${D.default.bold.greenBright("undefined")} instead.`;return`Argument ${D.default.greenBright(t.name)}${s} must not be ${D.default.bold("null")}.${a}`}if(t.type==="missingArg"){let s=r.length===1&&r[0]===t.missingName?"":` for ${D.default.bold(`${r.join(".")}`)}`;return`Argument ${D.default.greenBright(t.missingName)}${s} is missing.`}if(t.type==="atLeastOne"){let s=i?"":` Available args are listed in ${D.default.dim.green("green")}.`,a=t.atLeastFields?` and at least one argument for ${t.atLeastFields.map(c=>D.default.bold(c)).join(", or ")}`:"";return`Argument ${D.default.bold(r.join("."))} of type ${D.default.bold(t.inputType.name)} needs ${D.default.greenBright("at least one")} argument${D.default.bold(a)}.${s}`}if(t.type==="atMostOne"){let s=i?"":` Please choose one. ${D.default.dim("Available args:")} -${hr(t.inputType,!0)}`;return`Argument ${D.default.bold(r.join("."))} of type ${D.default.bold(t.inputType.name)} needs ${D.default.greenBright("exactly one")} argument, but you provided ${t.providedKeys.map(a=>D.default.redBright(a)).join(" and ")}.${s}`}},"printArgError");this.type=t,this.children=r}get[Symbol.toStringTag](){return"Document"}toString(){return`${this.type} { -${(0,$t.default)(this.children.map(String).join(` -`),fn)} -}`}validate(t,r=!1,n,o,i){var O;t||(t={});let s=this.children.filter(P=>P.hasInvalidChild||P.hasInvalidArg);if(s.length===0)return;let a=[],c=[],l=t&&t.select?"select":t.include?"include":void 0;for(let P of s){let M=P.collectErrors(l);a.push(...M.fieldErrors.map(A=>({...A,path:r?A.path:A.path.slice(1)}))),c.push(...M.argErrors.map(A=>({...A,path:r?A.path:A.path.slice(1)})))}let p=this.children[0].name,g=r?this.type:p,y=[],b=[],v=[];for(let P of a){let M=this.normalizePath(P.path,t).join(".");if(P.error.type==="invalidFieldName"){y.push(M);let A=P.error.outputType,{isInclude:S}=P.error;A.fields.filter(_=>S?_.outputType.location==="outputObjectTypes":!0).forEach(_=>{let F=M.split(".");v.push({path:`${F.slice(0,F.length-1).join(".")}.${_.name}`,type:"true",isRequired:!1})})}else P.error.type==="includeAndSelect"?(y.push("select"),y.push("include")):b.push(M);if(P.error.type==="emptySelect"||P.error.type==="noTrueSelect"||P.error.type==="emptyInclude"){let A=this.normalizePath(P.path,t),S=A.slice(0,A.length-1).join(".");(O=P.error.field.outputType.type.fields)==null||O.filter(F=>P.error.type==="emptyInclude"?F.outputType.location==="outputObjectTypes":!0).forEach(F=>{v.push({path:`${S}.${F.name}`,type:"true",isRequired:!1})})}}for(let P of c){let M=this.normalizePath(P.path,t).join(".");if(P.error.type==="invalidName")y.push(M);else if(P.error.type!=="missingArg"&&P.error.type!=="atLeastOne")b.push(M);else if(P.error.type==="missingArg"){let A=P.error.missingArg.inputTypes.length===1?P.error.missingArg.inputTypes[0].type:P.error.missingArg.inputTypes.map(S=>{let _=nn(S.type);return _==="Null"?"null":S.isList?_+"[]":_}).join(" | ");v.push({path:M,type:Wi(A,!0,M.split("where.").length===2),isRequired:P.error.missingArg.isRequired})}}let h=u(P=>{let M=c.some(G=>G.error.type==="missingArg"&&G.error.missingArg.isRequired),A=Boolean(c.find(G=>G.error.type==="missingArg"&&!G.error.missingArg.isRequired)),S=A||M,_="";M&&(_+=` -${D.default.dim("Note: Lines with ")}${D.default.reset.greenBright("+")} ${D.default.dim("are required")}`),A&&(_.length===0&&(_=` -`),M?_+=D.default.dim(`, lines with ${D.default.green("?")} are optional`):_+=D.default.dim(`Note: Lines with ${D.default.green("?")} are optional`),_+=D.default.dim("."));let j=c.filter(G=>G.error.type!=="missingArg"||G.error.missingArg.isRequired).map(G=>this.printArgError(G,S,o==="minimal")).join(` -`);if(j+=` -${a.map(G=>this.printFieldError(G,v,o==="minimal")).join(` -`)}`,o==="minimal")return(0,is.default)(j);let V={ast:r?{[p]:t}:t,keyPaths:y,valuePaths:b,missingItems:v};n!=null&&n.endsWith("aggregate")&&(V=wg(V));let te=wr({callsite:P,originalMethod:n||g,showColors:o&&o==="pretty",callArguments:To(V),message:`${j}${_} -`});return w.env.NO_COLOR||o==="colorless"?(0,is.default)(te):te},"renderErrorStr"),T=new xe(h(i));throw w.env.NODE_ENV!=="production"&&Object.defineProperty(T,"render",{get:()=>h,enumerable:!1}),T}normalizePath(t,r){let n=t.slice(),o=[],i,s=r;for(;(i=n.shift())!==void 0;)!Array.isArray(s)&&i===0||(i==="select"?s[i]?s=s[i]:s=s.include:s&&s[i]&&(s=s[i]),o.push(i));return o}};u(Ao,"Document");var xe=class extends Error{get[Symbol.toStringTag](){return"PrismaClientValidationError"}};u(xe,"PrismaClientValidationError");var oe=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`)}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};u(oe,"PrismaClientConstructorValidationError");var me=class{constructor({name:t,args:r,children:n,error:o,schemaField:i}){this.name=t,this.args=r,this.children=n,this.error=o,this.schemaField=i,this.hasInvalidChild=n?n.some(s=>Boolean(s.error||s.hasInvalidArg||s.hasInvalidChild)):!1,this.hasInvalidArg=r?r.hasInvalidArg:!1}get[Symbol.toStringTag](){return"Field"}toString(){let t=this.name;return this.error?t+" # INVALID_FIELD":(this.args&&this.args.args&&this.args.args.length>0&&(this.args.args.length===1?t+=`(${this.args.toString()})`:t+=`( -${(0,$t.default)(this.args.toString(),fn)} -)`),this.children&&(t+=` { -${(0,$t.default)(this.children.map(String).join(` -`),fn)} -}`),t)}collectErrors(t="select"){let r=[],n=[];if(this.error&&r.push({path:[this.name],error:this.error}),this.children)for(let o of this.children){let i=o.collectErrors(t);r.push(...i.fieldErrors.map(s=>({...s,path:[this.name,t,...s.path]}))),n.push(...i.argErrors.map(s=>({...s,path:[this.name,t,...s.path]})))}return this.args&&n.push(...this.args.collectErrors().map(o=>({...o,path:[this.name,...o.path]}))),{fieldErrors:r,argErrors:n}}};u(me,"Field");var de=class{constructor(t=[]){this.args=t,this.hasInvalidArg=t?t.some(r=>Boolean(r.hasError)):!1}get[Symbol.toStringTag](){return"Args"}toString(){return this.args.length===0?"":`${this.args.map(t=>t.toString()).filter(t=>t).join(` -`)}`}collectErrors(){return this.hasInvalidArg?this.args.flatMap(t=>t.collectErrors()):[]}};u(de,"Args");function ns(e,t){return x.Buffer.isBuffer(e)?JSON.stringify(e.toString("base64")):e instanceof Ie?`{ _ref: ${JSON.stringify(e.name)}}`:Object.prototype.toString.call(e)==="[object BigInt]"?e.toString():typeof(t==null?void 0:t.type)=="string"&&t.type==="Json"?e===null?"null":e&&e.values&&e.__prismaRawParameters__?JSON.stringify(e.values):(t==null?void 0:t.isList)&&Array.isArray(e)?JSON.stringify(e.map(r=>JSON.stringify(r))):JSON.stringify(JSON.stringify(e)):e===void 0?null:e===null?"null":He.isDecimal(e)||(t==null?void 0:t.type)==="Decimal"&&yo(e)?cc(e):(t==null?void 0:t.location)==="enumTypes"&&typeof e=="string"?Array.isArray(e)?`[${e.join(", ")}]`:e:typeof e=="number"&&(t==null?void 0:t.type)==="Float"?e.toExponential():JSON.stringify(e,null,2)}u(ns,"stringify");var Fe=class{constructor({key:t,value:r,isEnum:n=!1,error:o,schemaArg:i,inputType:s}){this.inputType=s,this.key=t,this.value=r instanceof Me?r._getName():r,this.isEnum=n,this.error=o,this.schemaArg=i,this.isNullable=(i==null?void 0:i.inputTypes.reduce(a=>a&&i.isNullable,!0))||!1,this.hasError=Boolean(o)||(r instanceof de?r.hasInvalidArg:!1)||Array.isArray(r)&&r.some(a=>a instanceof de?a.hasInvalidArg:!1)}get[Symbol.toStringTag](){return"Arg"}_toString(t,r){var n;if(typeof t!="undefined"){if(t instanceof de)return`${r}: { -${(0,$t.default)(t.toString(),2)} -}`;if(Array.isArray(t)){if(((n=this.inputType)==null?void 0:n.type)==="Json")return`${r}: ${ns(t,this.inputType)}`;let o=!t.some(i=>typeof i=="object");return`${r}: [${o?"":` -`}${(0,$t.default)(t.map(i=>i instanceof de?`{ -${(0,$t.default)(i.toString(),fn)} -}`:ns(i,this.inputType)).join(`,${o?" ":` -`}`),o?0:fn)}${o?"":` -`}]`}return`${r}: ${ns(t,this.inputType)}`}}toString(){return this._toString(this.value,this.key)}collectErrors(){var r;if(!this.hasError)return[];let t=[];if(this.error){let n=typeof((r=this.inputType)==null?void 0:r.type)=="object"?`${this.inputType.type.name}${this.inputType.isList?"[]":""}`:void 0;t.push({error:this.error,path:[this.key],id:n})}return Array.isArray(this.value)?t.concat(this.value.flatMap((n,o)=>n!=null&&n.collectErrors?n.collectErrors().map(i=>({...i,path:[this.key,o,...i.path]})):[])):this.value instanceof de?t.concat(this.value.collectErrors().map(n=>({...n,path:[this.key,...n.path]}))):t}};u(Fe,"Arg");function cs({dmmf:e,rootTypeName:t,rootField:r,select:n,modelName:o,extensions:i}){n||(n={});let s=t==="query"?e.queryType:e.mutationType,a={args:[],outputType:{isList:!1,type:s,location:"outputObjectTypes"},name:t},c={modelName:o},l=Hc({dmmf:e,selection:{[r]:n},schemaField:a,path:[t],context:c,extensions:i});return new Ao(t,l)}u(cs,"makeDocument");function zc(e){return e}u(zc,"transformDocument");function Hc({dmmf:e,selection:t,schemaField:r,path:n,context:o,extensions:i}){let s=r.outputType.type,a=o.modelName?i.getAllComputedFields(o.modelName):{};return t=Ac(t,a),Object.entries(t).reduce((c,[l,p])=>{let g=s.fieldMap?s.fieldMap[l]:s.fields.find(M=>M.name===l);if(a!=null&&a[l])return c;if(!g)return c.push(new me({name:l,children:[],error:{type:"invalidFieldName",modelName:s.name,providedName:l,didYouMean:ho(l,s.fields.map(M=>M.name).concat(Object.keys(a!=null?a:{}))),outputType:s}})),c;if(g.outputType.location==="scalar"&&g.args.length===0&&typeof p!="boolean")return c.push(new me({name:l,children:[],error:{type:"invalidFieldType",modelName:s.name,fieldName:l,providedValue:p}})),c;if(p===!1)return c;let y={name:g.name,fields:g.args,constraints:{minNumFields:null,maxNumFields:null}},b=typeof p=="object"?Lc(p,["include","select"]):void 0,v=b?Mo(b,y,o,[],typeof g=="string"?void 0:g.outputType.type):void 0,h=g.outputType.location==="outputObjectTypes";if(p){if(p.select&&p.include)c.push(new me({name:l,children:[new me({name:"include",args:new de,error:{type:"includeAndSelect",field:g}})]}));else if(p.include){let M=Object.keys(p.include);if(M.length===0)return c.push(new me({name:l,children:[new me({name:"include",args:new de,error:{type:"emptyInclude",field:g}})]})),c;if(g.outputType.location==="outputObjectTypes"){let A=g.outputType.type,S=A.fields.filter(F=>F.outputType.location==="outputObjectTypes").map(F=>F.name),_=M.filter(F=>!S.includes(F));if(_.length>0)return c.push(..._.map(F=>new me({name:F,children:[new me({name:F,args:new de,error:{type:"invalidFieldName",modelName:A.name,outputType:A,providedName:F,didYouMean:ho(F,S)||void 0,isInclude:!0,isIncludeScalar:A.fields.some(j=>j.name===F)}})]}))),c}}else if(p.select){let M=Object.values(p.select);if(M.length===0)return c.push(new me({name:l,children:[new me({name:"select",args:new de,error:{type:"emptySelect",field:g}})]})),c;if(M.filter(S=>S).length===0)return c.push(new me({name:l,children:[new me({name:"select",args:new de,error:{type:"noTrueSelect",field:g}})]})),c}}let T=h?fg(e,g.outputType.type):null,O=T;p&&(p.select?O=p.select:p.include?O=ln(T,p.include):p.by&&Array.isArray(p.by)&&g.outputType.namespace==="prisma"&&g.outputType.location==="outputObjectTypes"&&fc(g.outputType.type.name)&&(O=pg(p.by)));let P;if(O!==!1&&h){let M=o.modelName;typeof g.outputType.type=="object"&&g.outputType.namespace==="model"&&g.outputType.location==="outputObjectTypes"&&(M=g.outputType.type.name),P=Hc({dmmf:e,selection:O,schemaField:g,path:[...n,l],context:{modelName:M},extensions:i})}return c.push(new me({name:l,args:v,children:P,schemaField:g})),c},[])}u(Hc,"selectionToFields");function pg(e){let t=Object.create(null);for(let r of e)t[r]=!0;return t}u(pg,"byToSelect");function fg(e,t){let r=Object.create(null);for(let n of t.fields)e.typeMap[n.outputType.type.name]!==void 0&&(r[n.name]=!0),(n.outputType.location==="scalar"||n.outputType.location==="enumTypes")&&(r[n.name]=!0);return r}u(fg,"getDefaultSelection");function ss(e,t,r,n){return new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"invalidType",providedValue:t,argName:e,requiredType:{inputType:r.inputTypes,bestFittingType:n}}})}u(ss,"getInvalidTypeArg");function Wc(e,t,r){let{isList:n}=t,o=mg(t,r),i=yr(e,t);return i===o||n&&i==="List<>"||o==="Json"&&i!=="Symbol"&&!(e instanceof Me)&&!(e instanceof Ie)||i==="Int"&&o==="BigInt"||(i==="Int"||i==="Float")&&o==="Decimal"||i==="DateTime"&&o==="String"||i==="UUID"&&o==="String"||i==="String"&&o==="ID"||i==="Int"&&o==="Float"||i==="Int"&&o==="Long"||i==="String"&&o==="Decimal"&&dg(e)||e===null?!0:t.isList&&Array.isArray(e)?e.every(s=>Wc(s,{...t,isList:!1},r)):!1}u(Wc,"hasCorrectScalarType");function mg(e,t,r=e.isList){let n=gr(e.type);return e.location==="fieldRefTypes"&&t.modelName&&(n+=`<${t.modelName}>`),on(n,r)}u(mg,"getExpectedType");var Po=u(e=>jc(e,(t,r)=>r!==void 0),"cleanObject");function dg(e){return/^\-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i.test(e)}u(dg,"isDecimalString");function gg(e,t,r,n){let o=null,i=[];for(let s of r.inputTypes){if(o=hg(e,t,r,s,n),(o==null?void 0:o.collectErrors().length)===0)return o;if(o&&(o==null?void 0:o.collectErrors())){let a=o==null?void 0:o.collectErrors();a&&a.length>0&&i.push({arg:o,errors:a})}}if((o==null?void 0:o.hasError)&&i.length>0){let s=i.map(({arg:a,errors:c})=>{let l=c.map(p=>{let g=1;return p.error.type==="invalidType"&&(g=2*Math.exp(Qc(p.error.providedValue))+1),g+=Math.log(p.path.length),p.error.type==="missingArg"&&a.inputType&&xr(a.inputType.type)&&a.inputType.type.name.includes("Unchecked")&&(g*=2),p.error.type==="invalidName"&&xr(p.error.originalType)&&p.error.originalType.name.includes("Unchecked")&&(g*=2),g});return{score:c.length+yg(l),arg:a,errors:c}});return s.sort((a,c)=>a.scoret+r,0)}u(yg,"sum");function hg(e,t,r,n,o){var p,g,y,b,v;if(typeof t=="undefined")return r.isRequired?new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"missingArg",missingName:e,missingArg:r,atLeastOne:!1,atMostOne:!1}}):null;let{isNullable:i,isRequired:s}=r;if(t===null&&!i&&!s&&!(xr(n.type)?n.type.constraints.minNumFields!==null&&n.type.constraints.minNumFields>0:!1))return new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"invalidNullArg",name:e,invalidType:r.inputTypes,atLeastOne:!1,atMostOne:!1}});if(!n.isList)if(xr(n.type)){if(typeof t!="object"||Array.isArray(t)||n.location==="inputObjectTypes"&&!$c(t))return ss(e,t,r,n);{let h=Po(t),T,O=Object.keys(h||{}),P=O.length;return P===0&&typeof n.type.constraints.minNumFields=="number"&&n.type.constraints.minNumFields>0||((p=n.type.constraints.fields)==null?void 0:p.some(M=>O.includes(M)))===!1?T={type:"atLeastOne",key:e,inputType:n.type,atLeastFields:n.type.constraints.fields}:P>1&&typeof n.type.constraints.maxNumFields=="number"&&n.type.constraints.maxNumFields<2&&(T={type:"atMostOne",key:e,inputType:n.type,providedKeys:O}),new Fe({key:e,value:h===null?null:Mo(h,n.type,o,r.inputTypes),isEnum:n.location==="enumTypes",error:T,inputType:n,schemaArg:r})}}else return Jc(e,t,r,n,o);if(!Array.isArray(t)&&n.isList&&e!=="updateMany"&&(t=[t]),n.location==="enumTypes"||n.location==="scalar")return Jc(e,t,r,n,o);let a=n.type,l=(typeof((g=a.constraints)==null?void 0:g.minNumFields)=="number"&&((y=a.constraints)==null?void 0:y.minNumFields)>0?Array.isArray(t)&&t.some(h=>!h||Object.keys(Po(h)).length===0):!1)?{inputType:a,key:e,type:"atLeastOne"}:void 0;if(!l){let h=typeof((b=a.constraints)==null?void 0:b.maxNumFields)=="number"&&((v=a.constraints)==null?void 0:v.maxNumFields)<2?Array.isArray(t)&&t.find(T=>!T||Object.keys(Po(T)).length!==1):!1;h&&(l={inputType:a,key:e,type:"atMostOne",providedKeys:Object.keys(h)})}if(!Array.isArray(t))for(let h of r.inputTypes){let T=Mo(t,h.type,o);if(T.collectErrors().length===0)return new Fe({key:e,value:T,isEnum:!1,schemaArg:r,inputType:h})}return new Fe({key:e,value:t.map(h=>n.isList&&typeof h!="object"?h:typeof h!="object"||!t?ss(e,h,r,n):Mo(h,a,o)),isEnum:!1,inputType:n,schemaArg:r,error:l})}u(hg,"tryInferArgs");function xr(e){return!(typeof e=="string"||Object.hasOwnProperty.call(e,"values"))}u(xr,"isInputArgType");function Jc(e,t,r,n,o){return Wc(t,n,o)?new Fe({key:e,value:t,isEnum:n.location==="enumTypes",schemaArg:r,inputType:n}):ss(e,t,r,n)}u(Jc,"scalarToArg");function Mo(e,t,r,n,o){var y;(y=t.meta)!=null&&y.source&&(r={modelName:t.meta.source});let i=Po(e),{fields:s,fieldMap:a}=t,c=s.map(b=>[b.name,void 0]),l=Object.entries(i||{}),g=pc(l,c,b=>b[0]).reduce((b,[v,h])=>{let T=a?a[v]:s.find(P=>P.name===v);if(!T){let P=typeof h=="boolean"&&o&&o.fields.some(M=>M.name===v)?v:null;return b.push(new Fe({key:v,value:h,error:{type:"invalidName",providedName:v,providedValue:h,didYouMeanField:P,didYouMeanArg:!P&&ho(v,[...s.map(M=>M.name),"select"])||void 0,originalType:t,possibilities:n,outputType:o}})),b}let O=gg(v,h,T,r);return O&&b.push(O),b},[]);if(typeof t.constraints.minNumFields=="number"&&l.length{var v,h;return((v=b.error)==null?void 0:v.type)==="missingArg"||((h=b.error)==null?void 0:h.type)==="atLeastOne"})){let b=t.fields.filter(v=>!v.isRequired&&i&&(typeof i[v.name]=="undefined"||i[v.name]===null));g.push(...b.map(v=>{let h=v.inputTypes[0];return new Fe({key:v.name,value:void 0,isEnum:h.location==="enumTypes",error:{type:"missingArg",missingName:v.name,missingArg:v,atLeastOne:Boolean(t.constraints.minNumFields)||!1,atMostOne:t.constraints.maxNumFields===1||!1},inputType:h})}))}return new de(g)}u(Mo,"objectToArgs");function ls({document:e,path:t,data:r}){let n=Xi(r,t);if(n==="undefined")return null;if(typeof n!="object")return n;let o=bg(e,t);return as({field:o,data:n})}u(ls,"unpack");function as({field:e,data:t}){var n;if(!t||typeof t!="object"||!e.children||!e.schemaField)return t;let r={DateTime:o=>new Date(o),Json:o=>JSON.parse(o),Bytes:o=>x.Buffer.from(o,"base64"),Decimal:o=>new He(o),BigInt:o=>BigInt(o)};for(let o of e.children){let i=(n=o.schemaField)==null?void 0:n.outputType.type;if(i&&typeof i=="string"){let s=r[i];if(s)if(Array.isArray(t))for(let a of t)typeof a[o.name]!="undefined"&&a[o.name]!==null&&(Array.isArray(a[o.name])?a[o.name]=a[o.name].map(s):a[o.name]=s(a[o.name]));else typeof t[o.name]!="undefined"&&t[o.name]!==null&&(Array.isArray(t[o.name])?t[o.name]=t[o.name].map(s):t[o.name]=s(t[o.name]))}if(o.schemaField&&o.schemaField.outputType.location==="outputObjectTypes")if(Array.isArray(t))for(let s of t)as({field:o,data:s[o.name]});else as({field:o,data:t[o.name]})}return t}u(as,"mapScalars");function bg(e,t){let r=t.slice(),n=r.shift(),o=e.children.find(i=>i.name===n);if(!o)throw new Error(`Could not find field ${n} in document ${e}`);for(;r.length>0;){let i=r.shift();if(!o.children)throw new Error(`Can't get children for field ${o} with child ${i}`);let s=o.children.find(a=>a.name===i);if(!s)throw new Error(`Can't find child ${i} of field ${o}`);o=s}return o}u(bg,"getField");function os(e){return e.split(".").filter(t=>t!=="select").join(".")}u(os,"removeSelectFromPath");function us(e){if(Object.prototype.toString.call(e)==="[object Object]"){let r={};for(let n in e)if(n==="select")for(let o in e.select)r[o]=us(e.select[o]);else r[n]=us(e[n]);return r}return e}u(us,"removeSelectFromObject");function wg({ast:e,keyPaths:t,missingItems:r,valuePaths:n}){let o=t.map(os),i=n.map(os),s=r.map(c=>({path:os(c.path),isRequired:c.isRequired,type:c.type}));return{ast:us(e),keyPaths:o,missingItems:s,valuePaths:i}}u(wg,"transformAggregatePrintJsonArgs");d();f();m();d();f();m();d();f();m();function mn(e){return{getKeys(){return Object.keys(e)},getPropertyValue(t){return e[t]}}}u(mn,"addObjectProperties");d();f();m();function Lt(e,t){return{getKeys(){return[e]},getPropertyValue(){return t()}}}u(Lt,"addProperty");d();f();m();function Bt(e){let t=new $e;return{getKeys(){return e.getKeys()},getPropertyValue(r){return t.getOrCreate(r,()=>e.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}u(Bt,"cacheProperties");d();f();m();var Xc=X(ai());d();f();m();var Oo={enumerable:!0,configurable:!0,writable:!0};function So(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Oo,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}u(So,"defaultProxyHandlers");var Yc=Symbol.for("nodejs.util.inspect.custom");function Mt(e,t){let r=xg(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var c,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(c=a.has)==null?void 0:c.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=Zc(Reflect.ownKeys(i),r),a=Zc(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,p;let c=r.get(s);return((p=(l=c==null?void 0:c.getPropertyDescriptor)==null?void 0:l.call(c,s))==null?void 0:p.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=r.get(s);return a&&a.getPropertyDescriptor?{...Oo,...a.getPropertyDescriptor(s)}:Oo},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Yc]=function(i,s,a=Xc.inspect){let c={...this};return delete c[Yc],a(c,s)},o}u(Mt,"createCompositeProxy");function xg(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}u(xg,"mapKeysToLayers");function Zc(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}u(Zc,"getExistingKeys");d();f();m();function ps(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u(ps,"removeProperties");d();f();m();d();f();m();d();f();m();var dn="";function el(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=Tg(n)||Pg(n)||Sg(n)||_g(n)||Rg(n);return o&&r.push(o),r},[])}u(el,"parse");var Eg=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vg=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Tg(e){var t=Eg.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=vg.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||dn,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}u(Tg,"parseChrome");var Ag=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Pg(e){var t=Ag.exec(e);return t?{file:t[2],methodName:t[1]||dn,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}u(Pg,"parseWinjs");var Mg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Og=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Sg(e){var t=Mg.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Og.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||dn,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}u(Sg,"parseGecko");var Cg=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Rg(e){var t=Cg.exec(e);return t?{file:t[3],methodName:t[1]||dn,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}u(Rg,"parseJSC");var Ig=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function _g(e){var t=Ig.exec(e);return t?{file:t[2],methodName:t[1]||dn,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}u(_g,"parseNode");var Co=class{getLocation(){return null}};u(Co,"DisabledCallSite");var Ro=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=el(t).find(o=>o.file&&o.file!==""&&!o.file.includes("@prisma")&&!o.file.includes("getPrismaClient")&&!o.file.startsWith("internal/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4);return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};u(Ro,"EnabledCallSite");function it(e){return e==="minimal"?new Co:new Ro}u(it,"getCallSite");d();f();m();function Qe(e){let t,r=u((n,o,i=!0)=>{try{return i===!0?t!=null?t:t=tl(e(n,o)):tl(e(n,o))}catch(s){return Promise.reject(s)}},"_callback");return{then(n,o,i){return r(fs(i),void 0).then(n,o,i)},catch(n,o){return r(fs(o),void 0).catch(n,o)},finally(n,o){return r(fs(o),void 0).finally(n,o)},requestTransaction(n,o){let i={kind:"batch",...n},s=r(i,o,!1);return s.requestTransaction?s.requestTransaction(i,o):s},[Symbol.toStringTag]:"PrismaPromise"}}u(Qe,"createPrismaPromise");function fs(e){if(e)return{kind:"itx",...e}}u(fs,"createItx");function tl(e){return typeof e.then=="function"?e:Promise.resolve(e)}u(tl,"valueToPromise");d();f();m();d();f();m();d();f();m();var rl={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Er(e={}){let t=Dg(e);return Object.entries(t).reduce((n,[o,i])=>(rl[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}u(Er,"desugarUserArgs");function Dg(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}u(Dg,"desugarCountInUserArgs");function Io(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}u(Io,"createUnpacker");function nl(e,t){let r=Io(e);return t({action:"aggregate",unpacker:r,argsMapper:Er})(e)}u(nl,"aggregate");d();f();m();function kg(e={}){let{select:t,...r}=e;return typeof t=="object"?Er({...r,_count:t}):Er({...r,_count:{_all:!0}})}u(kg,"desugarUserArgs");function Ng(e={}){return typeof e.select=="object"?t=>Io(e)(t)._count:t=>Io(e)(t)._count._all}u(Ng,"createUnpacker");function ol(e,t){return t({action:"count",unpacker:Ng(e),argsMapper:kg})(e)}u(ol,"count");d();f();m();function jg(e={}){let t=Er(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);return t}u(jg,"desugarUserArgs");function $g(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}u($g,"createUnpacker");function il(e,t){return t({action:"groupBy",unpacker:$g(e),argsMapper:jg})(e)}u(il,"groupBy");function sl(e,t,r){if(t==="aggregate")return n=>nl(n,r);if(t==="count")return n=>ol(n,r);if(t==="groupBy")return n=>il(n,r)}u(sl,"applyAggregates");d();f();m();function al(e){let t=e.fields.filter(n=>!n.relationName),r=Ni(t,n=>n.name);return new Proxy({},{get(n,o){if(o in n||typeof o=="symbol")return n[o];let i=r[o];if(i)return new Ie(e.name,o,i.type,i.isList)},...So(Object.keys(r))})}u(al,"applyFieldsProxy");d();f();m();function Lg(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}u(Lg,"getNextDataPath");function Bg(e,t,r){return t===void 0?e!=null?e:{}:vo(t,r,e||!0)}u(Bg,"getNextUserArgs");function ms(e,t,r,n,o,i){let a=e._baseDmmf.modelMap[t].fields.reduce((c,l)=>({...c,[l.name]:l}),{});return c=>{let l=it(e._errorFormat),p=Lg(n,o),g=Bg(c,i,p),y=r({dataPath:p,callsite:l})(g),b=qg(e,t);return new Proxy(y,{get(v,h){if(!b.includes(h))return v[h];let O=[a[h].type,r,h],P=[p,g];return ms(e,...O,...P)},...So([...b,...Object.getOwnPropertyNames(y)])})}}u(ms,"applyFluent");function qg(e,t){return e._baseDmmf.modelMap[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u(qg,"getOwnKeys");d();f();m();d();f();m();d();f();m();var _o=ul().version;var Be=class extends he{constructor(t){super(t,{code:"P2025",clientVersion:_o}),this.name="NotFoundError"}};u(Be,"NotFoundError");function ds(e,t,r,n){let o;if(r&&typeof r=="object"&&"rejectOnNotFound"in r&&r.rejectOnNotFound!==void 0)o=r.rejectOnNotFound,delete r.rejectOnNotFound;else if(typeof n=="boolean")o=n;else if(n&&typeof n=="object"&&e in n){let i=n[e];if(i&&typeof i=="object")return t in i?i[t]:void 0;o=ds(e,t,r,i)}else typeof n=="function"?o=n:o=!1;return o}u(ds,"getRejectOnNotFound");var Vg=/(findUnique|findFirst)/;function cl(e,t,r,n){if(n&&!e&&Vg.exec(t))throw typeof n=="boolean"&&n?new Be(`No ${r} found`):typeof n=="function"?n(new Be(`No ${r} found`)):Rr(n)?n:new Be(`No ${r} found`)}u(cl,"throwIfNotFound");function ll(e,t,r){return e===rt.ModelAction.findFirstOrThrow||e===rt.ModelAction.findUniqueOrThrow?Gg(t,r):r}u(ll,"adaptErrors");function Gg(e,t){return async r=>{if("rejectOnNotFound"in r.args){let o=wr({originalMethod:r.clientMethod,callsite:r.callsite,message:"'rejectOnNotFound' option is not supported"});throw new xe(o)}return await t(r).catch(o=>{throw o instanceof he&&o.code==="P2025"?new Be(`No ${e} found`):o})}}u(Gg,"applyOrThrowWrapper");var Kg=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Jg=["aggregate","count","groupBy"];function gs(e,t){var o;let r=[zg(e,t)];(o=e._engineConfig.previewFeatures)!=null&&o.includes("fieldReference")&&r.push(Qg(e,t));let n=e._extensions.getAllModelExtensions(t);return n&&r.push(mn(n)),Mt({},r)}u(gs,"applyModel");function zg(e,t){let r=We(t),n=Hg(e,t);return{getKeys(){return n},getPropertyValue(o){let i=o,s=u(c=>e._request(c),"requestFn");s=ll(i,t,s);let a=u(c=>l=>{let p=it(e._errorFormat);return Qe((g,y)=>{let b={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:g,lock:y,callsite:p};return s({...b,...c})})},"action");return Kg.includes(i)?ms(e,t,a):Wg(o)?sl(e,o,a):a({})}}}u(zg,"modelActionsLayer");function Hg(e,t){let r=Object.keys(e._baseDmmf.mappingsMap[t]).filter(n=>n!=="model"&&n!=="plural");return r.push("count"),r}u(Hg,"getOwnKeys");function Wg(e){return Jg.includes(e)}u(Wg,"isValidAggregateName");function Qg(e,t){return Bt(Lt("fields",()=>{let r=e._baseDmmf.modelMap[t];return al(r)}))}u(Qg,"fieldsPropertyLayer");d();f();m();function pl(e){return e.replace(/^./,t=>t.toUpperCase())}u(pl,"jsToDMMFModelName");var ys=Symbol();function Fo(e){let t=[Yg(e),Lt(ys,()=>e)],r=e._extensions.getAllClientExtensions();return r&&t.push(mn(r)),Mt(e,t)}u(Fo,"applyModelsAndClientExtensions");function Yg(e){let t=Object.keys(e._baseDmmf.modelMap),r=t.map(We),n=[...new Set(t.concat(r))];return Bt({getKeys(){return n},getPropertyValue(o){let i=pl(o);if(e._baseDmmf.modelMap[i]!==void 0)return gs(e,i);if(e._baseDmmf.modelMap[o]!==void 0)return gs(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}u(Yg,"modelsLayer");function fl(e){return e[ys]?e[ys]:e}u(fl,"unapplyModelsAndClientExtensions");function ml(e){if(!this._hasPreviewFlag("clientExtensions"))throw new xe("Extensions are not yet generally available, please add `clientExtensions` to the `previewFeatures` field in the `generator` block in the `schema.prisma` file.");if(typeof e=="function")return e(this);let t=fl(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)}});return Fo(r)}u(ml,"$extends");d();f();m();d();f();m();function Ye(e){if(typeof e!="object")return e;var t,r,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){r=new e.constructor;for(t in e)e.hasOwnProperty(t)&&r[t]!==e[t]&&(r[t]=Ye(e[t]))}else{r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ye(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=Ye(e[t])}return r}if(n==="[object Array]"){for(t=e.length,r=Array(t);t--;)r[t]=Ye(e[t]);return r}return n==="[object Set]"?(r=new Set,e.forEach(function(o){r.add(Ye(o))}),r):n==="[object Map]"?(r=new Map,e.forEach(function(o,i){r.set(Ye(i),Ye(o))}),r):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(r=new RegExp(e.source,e.flags),r.lastIndex=e.lastIndex,r):n==="[object DataView]"?new e.constructor(Ye(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}u(Ye,"klona");function dl(e,t,r,n=0){return r.length===0?e._executeRequest(t):Qe((o,i)=>{var s,a;return o!==void 0&&((s=t.lock)==null||s.then(),t.transaction=o,t.lock=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.action,args:Ye((a=t.args)!=null?a:{}),query:c=>(t.args=c,dl(e,t,r,n+1))})})}u(dl,"iterateAndCallQueryCallbacks");function gl(e,t){let{jsModelName:r,action:n}=t;return r===void 0||e._extensions.isEmpty()?e._executeRequest(t):dl(e,t,e._extensions.getAllQueryCallbacks(r,n))}u(gl,"applyQueryExtensions");d();f();m();d();f();m();function yl(e){let t;return{get(){return t||(t={value:e()}),t.value}}}u(yl,"lazyProperty");var gn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new $e;this.modelExtensionsCache=new $e;this.queryCallbacksCache=new $e;this.clientExtensions=yl(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...so(this.extension.name,this.extension.client)}:(t=this.previous)==null?void 0:t.getAllClientExtensions()})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Tc((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=We(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...so(this.extension.name,this.extension.model.$allModels),...so(this.extension.name,this.extension.model[r])}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=this.extension.query;if(!o||!(o[t]||o.$allModels))return n;let i=[];return o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),n.concat(i.map(c=>Zr(this.extension.name,c)))})}};u(gn,"MergedExtensionsListNode");var st=class{constructor(t){this.head=t}static empty(){return new st}static single(t){return new st(new gn(t))}isEmpty(){return this.head===void 0}append(t){return new st(new gn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}};u(st,"MergedExtensionsList");d();f();m();function hl(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}u(hl,"getLockCountPromise");d();f();m();function bl(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)}u(bl,"getLogLevel");d();f();m();function xl(e,t,r){let n=wl(e,r),o=wl(t,r),i=Object.values(o).map(a=>a[a.length-1]),s=Object.keys(o);return Object.entries(n).forEach(([a,c])=>{s.includes(a)||i.push(c[c.length-1])}),i}u(xl,"mergeBy");var wl=u((e,t)=>e.reduce((r,n)=>{let o=t(n);return r[o]||(r[o]=[]),r[o].push(n),r},{}),"groupBy");d();f();m();var yn=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}};u(yn,"MiddlewareHandler");var hn=class{constructor(){this.query=new yn;this.engine=new yn}};u(hn,"Middlewares");d();f();m();var Al=X(Qn());d();f();m();function El({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let c=a.needs.filter(l=>!r[l]);c.length>0&&s.push(ps(c))}Zg(e,a.needs)&&i.push(Xg(a,Mt(e,i)))}return i.length>0||s.length>0?Mt(e,[...i,...s]):e}u(El,"applyResultExtensions");function Zg(e,t){return t.every(r=>Di(e,r))}u(Zg,"areNeedsMet");function Xg(e,t){return Bt(Lt(e.name,()=>e.compute(t)))}u(Xg,"computedPropertyLayer");d();f();m();function Do({visitor:e,result:t,args:r,dmmf:n,model:o}){var s;if(Array.isArray(t)){for(let a=0;al.name===i);if(!a||a.kind!=="object"||!a.relationName)continue;let c=typeof s=="object"?s:{};t[i]=Do({visitor:o,result:t[i],args:c,model:n.getModelMap()[a.type],dmmf:n})}}u(vl,"visitNested");d();f();m();var bn=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,w.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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)}):this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{var p;let i=Tl(o[0]),s=o.map(g=>String(g.document)),a=rr({context:o[0].otelParentCtx,tracingConfig:t._tracingConfig});a&&(i.headers.traceparent=a);let c=o.some(g=>g.document.type==="mutation"),l=((p=i.transaction)==null?void 0:p.kind)==="batch"?i.transaction:void 0;return this.client._engine.requestBatch({queries:s,headers:i.headers,transaction:l,containsWrite:c})},singleLoader:o=>{var c;let i=Tl(o),s=String(o.document),a=((c=i.transaction)==null?void 0:c.kind)==="itx"?i.transaction:void 0;return this.client._engine.request({query:s,headers:i.headers,transaction:a,isWrite:o.document.type==="mutation"})},batchBy:o=>{var i;return(i=o.transaction)!=null&&i.id?`transaction-${o.transaction.id}`:ry(o)}})}async request({document:t,dataPath:r=[],rootField:n,typeName:o,isList:i,callsite:s,rejectOnNotFound:a,clientMethod:c,engineHook:l,args:p,headers:g,transaction:y,unpacker:b,extensions:v,otelParentCtx:h,otelChildCtx:T}){if(this.hooks&&this.hooks.beforeRequest){let O=String(t);this.hooks.beforeRequest({query:O,path:r,rootField:n,typeName:o,document:t,isList:i,clientMethod:c,args:p})}try{let O,P;if(l){let S=await l({document:t,runInTransaction:Boolean(y)},_=>this.dataloader.request({..._,tracingConfig:this.client._tracingConfig}));O=S.data,P=S.elapsed}else{let S=await this.dataloader.request({document:t,headers:g,transaction:y,otelParentCtx:h,otelChildCtx:T,tracingConfig:this.client._tracingConfig});O=S==null?void 0:S.data,P=S==null?void 0:S.elapsed}let M=this.unpack(t,O,r,n,b);cl(M,c,o,a);let A=this.applyResultExtensions({result:M,modelName:o,args:p,extensions:v});return w.env.PRISMA_CLIENT_GET_TIME?{data:A,elapsed:P}:A}catch(O){this.handleAndLogRequestError({error:O,clientMethod:c,callsite:s,transaction:y})}}handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:o}){try{this.handleRequestError({error:t,clientMethod:r,callsite:n,transaction:o})}catch(i){throw this.logEmmitter&&this.logEmmitter.emit("error",{message:i.message,target:r,timestamp:new Date}),i}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:o}){if(ey(t),ty(t,o)||t instanceof Be)throw t;let i=t.message;throw n&&(i=wr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:i})),i=this.sanitizeMessage(i),t.code?new he(i,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new Xe(i,this.client._clientVersion):t instanceof Re?new Re(i,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof Ce?new Ce(i,this.client._clientVersion):t instanceof Xe?new Xe(i,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Al.default)(t):t}unpack(t,r,n,o,i){r!=null&&r.data&&(r=r.data),i&&(r[o]=i(r[o]));let s=[];return o&&s.push(o),s.push(...n.filter(a=>a!=="select"&&a!=="include")),ls({document:t,data:r,path:s})}applyResultExtensions({result:t,modelName:r,args:n,extensions:o}){if(o.isEmpty()||t==null)return t;let i=this.client._baseDmmf.getModelMap()[r];return i?Do({result:t,args:n!=null?n:{},model:i,dmmf:this.client._baseDmmf,visitor(s,a,c){let l=We(a.name);return El({result:s,modelName:l,select:c.select,extensions:o})}}):t}get[Symbol.toStringTag](){return"RequestHandler"}};u(wn,"RequestHandler");function ty(e,t){return Nr(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}u(ty,"isMismatchingBatchIndex");function ry(e){var n;if(!e.document.children[0].name.startsWith("findUnique"))return;let t=(n=e.document.children[0].args)==null?void 0:n.args.map(o=>o.value instanceof de?`${o.key}-${o.value.args.map(i=>i.key).join(",")}`:o.key).join(","),r=e.document.children[0].children.join(",");return`${e.document.children[0].name}|${t}|${r}`}u(ry,"batchFindUniqueBy");d();f();m();function Pl(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ml(t[n]);return r})}u(Pl,"deserializeRawResults");function Ml({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new He(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ml);default:return t}}u(Ml,"deserializeValue");d();f();m();var xn=u(e=>e.reduce((t,r,n)=>`${t}@P${n}${r}`),"mssqlPreparedStatement");d();f();m();function qe(e){try{return Ol(e,"fast")}catch(t){return Ol(e,"slow")}}u(qe,"serializeRawParameters");function Ol(e,t){return JSON.stringify(e.map(r=>ny(r,t)))}u(Ol,"serializeRawParametersInternal");function ny(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:oy(e)?{prisma__type:"date",prisma__value:e.toJSON()}:He.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:iy(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Cl(e):e}u(ny,"encodeParameter");function oy(e){return e instanceof Date?!0:Object.prototype.toString.call(e)==="[object Date]"&&typeof e.toJSON=="function"}u(oy,"isDate");function iy(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}u(iy,"isArrayBufferLike");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(Sl);let t={};for(let r of Object.keys(e))t[r]=Sl(e[r]);return t}u(Cl,"preprocessObject");function Sl(e){return typeof e=="bigint"?e.toString():Cl(e)}u(Sl,"preprocessValueInObject");d();f();m();var Fl=X(Ki());var Rl=["datasources","errorFormat","log","__internal","rejectOnNotFound"],Il=["pretty","colorless","minimal"],_l=["info","query","warn","error"],sy={datasources:(e,t)=>{if(!!e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=vr(r,t)||`Available datasources: ${t.join(", ")}`;throw new oe(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new oe(`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[o,i]of Object.entries(n)){if(o!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},errorFormat:e=>{if(!!e){if(typeof e!="string")throw new oe(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Il.includes(e)){let t=vr(e,Il);throw new oe(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!_l.includes(r)){let n=vr(r,_l);throw new oe(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}u(t,"validateLogLevel");for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=vr(o,i);throw new oe(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new oe(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new oe(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=vr(r,t);throw new oe(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}},rejectOnNotFound:e=>{if(!!e){if(Rr(e)||typeof e=="boolean"||typeof e=="object"||typeof e=="function")return e;throw new oe(`Invalid rejectOnNotFound expected a boolean/Error/{[modelName: Error | boolean]} but received ${JSON.stringify(e)}`)}}};function Dl(e,t){for(let[r,n]of Object.entries(e)){if(!Rl.includes(r)){let o=vr(r,Rl);throw new oe(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}sy[r](n,t)}}u(Dl,"validatePrismaClientOptions");function vr(e,t){if(t.length===0||typeof e!="string")return"";let r=ay(e,t);return r?` Did you mean "${r}"?`:""}u(vr,"getDidYouMean");function ay(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,Fl.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=u(()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},"settleOnePromise"),c=u(l=>{i||(i=!0,r(l))},"immediatelyReject");for(let l=0;l{n[l]=p,a()},p=>{if(!Nr(p)){c(p);return}p.batchRequestIdx===l?c(p):(o||(o=p),a())})})}u(kl,"waitForBatch");var ge=Ke("prisma:client"),uy=/^(\s*alter\s)/i;typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);function Nl(e){return Array.isArray(e)}u(Nl,"isReadonlyArray");function hs(e,t,r){if(t.length>0&&uy.exec(e))throw new Error(`Running ALTER using ${r} 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 -`)}u(hs,"checkAlter");var cy={findUnique:"query",findUniqueOrThrow:"query",findFirst:"query",findFirstOrThrow:"query",findMany:"query",count:"query",create:"mutation",createMany:"mutation",update:"mutation",updateMany:"mutation",upsert:"mutation",delete:"mutation",deleteMany:"mutation",executeRaw:"mutation",queryRaw:"mutation",aggregate:"query",groupBy:"query",runCommandRaw:"mutation",findRaw:"query",aggregateRaw:"query"},ly=Symbol.for("prisma.client.transaction.id"),py={id:0,nextId(){return++this.id}};function fy(e){class t{constructor(n){this._middlewares=new hn;this._getDmmf=Fi(async n=>{try{let o=await this._engine.getDmmf();return new At(Ec(o))}catch(o){this._fetcher.handleAndLogRequestError({...n,error:o})}});this.$extends=ml;var a,c,l,p,g,y,b,v,h;n&&Dl(n,e.datasourceNames);let o=new $l.EventEmitter().on("error",T=>{});this._extensions=st.empty(),this._previewFeatures=(c=(a=e.generator)==null?void 0:a.previewFeatures)!=null?c:[],this._rejectOnNotFound=n==null?void 0:n.rejectOnNotFound,this._clientVersion=(l=e.clientVersion)!=null?l:_o,this._activeProvider=e.activeProvider,this._dataProxy=e.dataProxy,this._tracingConfig=vi(this._previewFeatures),this._clientEngineType=ci(e.generator);let i={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&En.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&En.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s=!1;try{let T=n!=null?n:{},O=(p=T.__internal)!=null?p:{},P=O.debug===!0;P&&Ke.enable("prisma:client"),O.hooks&&(this._hooks=O.hooks);let M=En.default.resolve(e.dirname,e.relativePath);Dn.existsSync(M)||(M=e.dirname),ge("dirname",e.dirname),ge("relativePath",e.relativePath),ge("cwd",M);let A=T.datasources||{},S=Object.entries(A).filter(([j,V])=>V&&V.url).map(([j,{url:V}])=>({name:j,url:V})),_=xl([],S,j=>j.name),F=O.engine||{};if(T.errorFormat?this._errorFormat=T.errorFormat:w.env.NODE_ENV==="production"?this._errorFormat="minimal":w.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._baseDmmf=new Tt(e.document),this._dataProxy){let j=e.document;this._dmmf=new At(j)}if(this._engineConfig={cwd:M,dirname:e.dirname,enableDebugLogs:P,allowTriggerPanic:F.allowTriggerPanic,datamodelPath:En.default.join(e.dirname,(g=e.filename)!=null?g:"schema.prisma"),prismaPath:(y=F.binaryPath)!=null?y:void 0,engineEndpoint:F.endpoint,datasources:_,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:T.log&&bl(T.log),logQueries:T.log&&Boolean(typeof T.log=="string"?T.log==="query":T.log.find(j=>typeof j=="string"?j==="query":j.level==="query")),env:(h=(v=s==null?void 0:s.parsed)!=null?v:(b=e.injectableEdgeEnv)==null?void 0:b.parsed)!=null?h:{},flags:[],clientVersion:e.clientVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingConfig:this._tracingConfig,logEmitter:o},ge("clientVersion",e.clientVersion),ge("clientEngineType",this._dataProxy?"dataproxy":this._clientEngineType),this._dataProxy&&ge("using Data Proxy with edge runtime"),this._engine=this.getEngine(),this._getActiveProvider(),this._fetcher=new wn(this,this._hooks,o),T.log)for(let j of T.log){let V=typeof j=="string"?j:j.emit==="stdout"?j.level:null;V&&this.$on(V,te=>{var G;ur.log(`${(G=ur.tags[V])!=null?G:""}`,te.message||te.query)})}this._metrics=new lr(this._engine)}catch(T){throw T.clientVersion=this._clientVersion,T}return Fo(this)}get[Symbol.toStringTag](){return"PrismaClient"}getEngine(){if(this._dataProxy===!0)return new ar(this._engineConfig);if(this._clientEngineType==="library")return!1;if(this._clientEngineType==="binary")return!1;throw new xe("Invalid client engine type, please use `library` or `binary`")}$use(n,o){if(typeof n=="function")this._middlewares.query.use(n);else if(n==="all")this._middlewares.query.use(o);else if(n==="engine")this._middlewares.engine.use(o);else throw new Error(`Invalid middleware ${n}`)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,c,l,p;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(c=s==null?void 0:s.params)!=null?c:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(p=s==null?void 0:s.message)!=null?p:i.message,target:i.target})})}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async _runDisconnect(){await this._engine.stop(),delete this._connectionPromise,this._engine=this.getEngine(),delete this._disconnectionPromise,delete this._getConfigPromise}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ga(),this._dataProxy||(this._dmmf=void 0)}}async _getActiveProvider(){try{let n=await this._engine.getConfig();this._activeProvider=n.datasources[0].activeProvider}catch(n){}}$executeRawInternal(n,o,i,...s){let a="",c;if(typeof i=="string")a=i,c={values:qe(s||[]),__prismaRawParameters__:!0},hs(a,s,"prisma.$executeRawUnsafe(, [...values])");else if(Nl(i))switch(this._activeProvider){case"sqlite":case"mysql":{let p=new fe(i,s);a=p.sql,c={values:qe(p.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":{let p=new fe(i,s);a=p.text,hs(a,p.values,"prisma.$executeRaw``"),c={values:qe(p.values),__prismaRawParameters__:!0};break}case"sqlserver":{a=xn(i),c={values:qe(s),__prismaRawParameters__:!0};break}default:throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`)}else{switch(this._activeProvider){case"sqlite":case"mysql":a=i.sql;break;case"cockroachdb":case"postgresql":a=i.text,hs(a,i.values,"prisma.$executeRaw(sql``)");break;case"sqlserver":a=xn(i.strings);break;default:throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`)}c={values:qe(i.values),__prismaRawParameters__:!0}}c!=null&&c.values?ge(`prisma.$executeRaw(${a}, ${c.values})`):ge(`prisma.$executeRaw(${a})`);let l={query:a,parameters:c};return ge("Prisma Client call:"),this._request({args:l,clientMethod:"$executeRaw",dataPath:[],action:"executeRaw",callsite:it(this._errorFormat),transaction:n,lock:o})}$executeRaw(n,...o){return Qe((i,s)=>{if(n.raw!==void 0||n.sql!==void 0)return this.$executeRawInternal(i,s,n,...o);throw new xe("`$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")})}$executeRawUnsafe(n,...o){return Qe((i,s)=>this.$executeRawInternal(i,s,n,...o))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new xe(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`);return Qe((o,i)=>this._request({args:{command:n},clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",callsite:it(this._errorFormat),transaction:o,lock:i}))}async $queryRawInternal(n,o,i,...s){let a="",c;if(typeof i=="string")a=i,c={values:qe(s||[]),__prismaRawParameters__:!0};else if(Nl(i))switch(this._activeProvider){case"sqlite":case"mysql":{let p=new fe(i,s);a=p.sql,c={values:qe(p.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":{let p=new fe(i,s);a=p.text,c={values:qe(p.values),__prismaRawParameters__:!0};break}case"sqlserver":{let p=new fe(i,s);a=xn(p.strings),c={values:qe(p.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`)}else{switch(this._activeProvider){case"sqlite":case"mysql":a=i.sql;break;case"cockroachdb":case"postgresql":a=i.text;break;case"sqlserver":a=xn(i.strings);break;default:throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`)}c={values:qe(i.values),__prismaRawParameters__:!0}}c!=null&&c.values?ge(`prisma.queryRaw(${a}, ${c.values})`):ge(`prisma.queryRaw(${a})`);let l={query:a,parameters:c};return ge("Prisma Client call:"),this._request({args:l,clientMethod:"$queryRaw",dataPath:[],action:"queryRaw",callsite:it(this._errorFormat),transaction:n,lock:o}).then(Pl)}$queryRaw(n,...o){return Qe((i,s)=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,s,n,...o);throw new xe("`$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")})}$queryRawUnsafe(n,...o){return Qe((i,s)=>this.$queryRawInternal(i,s,n,...o))}__internal_triggerPanic(n){if(!this._engineConfig.allowTriggerPanic)throw new Error(`In order to use .__internal_triggerPanic(), please enable it like so: -new PrismaClient({ - __internal: { - engine: { - allowTriggerPanic: true - } - } -})`);let o=n?{"X-DEBUG-FATAL":"1"}:{"X-DEBUG-NON-FATAL":"1"};return this._request({action:"queryRaw",args:{query:"SELECT 1",parameters:void 0},clientMethod:"queryRaw",dataPath:[],headers:o,callsite:it(this._errorFormat)})}_transactionWithArray({promises:n,options:o}){let i=py.nextId(),s=hl(n.length),a=n.map((c,l)=>{var p,g;if((c==null?void 0:c[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.");return(g=(p=c.requestTransaction)==null?void 0:p.call(c,{id:i,index:l,isolationLevel:o==null?void 0:o.isolationLevel},s))!=null?g:c});return kl(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:rr({tracingConfig:this._tracingConfig})},s=await this._engine.transaction("start",i,o),a;try{a=await n(bs(this,{id:s.id,payload:s.payload})),await this._engine.transaction("commit",i,s)}catch(c){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),c}return a}$transaction(n,o){let i;typeof n=="function"?i=u(()=>this._transactionWithCallback({callback:n,options:o}),"callback"):i=u(()=>this._transactionWithArray({promises:n,options:o}),"callback");let s={name:"transaction",enabled:this._tracingConfig.enabled,attributes:{method:"$transaction"}};return nr(s,i)}async _request(n){n.otelParentCtx=yt.active();try{let o={args:n.args,dataPath:n.dataPath,runInTransaction:Boolean(n.transaction),action:n.action,model:n.model},i={middleware:{name:"middleware",enabled:this._tracingConfig.middleware,attributes:{method:"$use"},active:!1},operation:{name:"operation",enabled:this._tracingConfig.enabled,attributes:{method:o.action,model:o.model,name:`${o.model}.${o.action}`}}},s=-1,a=u(c=>{let l=this._middlewares.query.get(++s);if(l)return nr(i.middleware,async b=>l(c,v=>(b==null||b.end(),a(v))));let{runInTransaction:p,...g}=c,y={...n,...g};return p||(y.transaction=void 0),gl(this,y)},"consumer");return await nr(i.operation,()=>a(o))}catch(o){throw o.clientVersion=this._clientVersion,o}}async _executeRequest({args:n,clientMethod:o,jsModelName:i,dataPath:s,callsite:a,action:c,model:l,headers:p,argsMapper:g,transaction:y,lock:b,unpacker:v,otelParentCtx:h}){var te,G;this._dmmf===void 0&&(this._dmmf=await this._getDmmf({clientMethod:o,callsite:a})),n=g?g(n):n;let T,O=cy[c];(c==="executeRaw"||c==="queryRaw"||c==="runCommandRaw")&&(T=c);let P;if(l!==void 0){if(P=(te=this._dmmf)==null?void 0:te.mappingsMap[l],P===void 0)throw new Error(`Could not find mapping for model ${l}`);T=P[c==="count"?"aggregate":c]}if(O!=="query"&&O!=="mutation")throw new Error(`Invalid operation ${O} for action ${c}`);let M=(G=this._dmmf)==null?void 0:G.rootFieldMap[T];if(M===void 0)throw new Error(`Could not find rootField ${T} for action ${c} for model ${l} on rootType ${O}`);let{isList:A}=M.outputType,S=jt(M.outputType.type),_=ds(c,S,n,this._rejectOnNotFound);dy(_,i,c);let F=u(()=>{let K=cs({dmmf:this._dmmf,rootField:T,rootTypeName:O,select:n,modelName:l,extensions:this._extensions});return K.validate(n,!1,o,this._errorFormat,a),K},"serializationFn"),j={name:"serialize",enabled:this._tracingConfig.enabled},V=await nr(j,F);if(Ke.enabled("prisma:client")){let K=String(V);ge("Prisma Client call:"),ge(`prisma.${o}(${To({ast:n,keyPaths:[],valuePaths:[],missingItems:[]})})`),ge("Generated request:"),ge(K+` -`)}return await b,this._fetcher.request({document:V,clientMethod:o,typeName:S,dataPath:s,rejectOnNotFound:_,isList:A,rootField:T,callsite:a,args:n,engineHook:this._middlewares.engine.get(0),extensions:this._extensions,headers:p,transaction:y,unpacker:v,otelParentCtx:h,otelChildCtx:yt.active()})}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new xe("`metrics` preview feature must be enabled in order to access metrics API");return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return u(t,"PrismaClient"),t}u(fy,"getPrismaClient");var jl=["$connect","$disconnect","$on","$transaction","$use","$extends"];function bs(e,t){return typeof e!="object"?e:new Proxy(e,{get:(r,n)=>{if(!jl.includes(n))return n===ly?t==null?void 0:t.id:typeof r[n]=="function"?(...o)=>n==="then"?r[n](o[0],o[1],t):n==="catch"||n==="finally"?r[n](o[0],t):bs(r[n](...o),t):bs(r[n],t)},has(r,n){return jl.includes(n)?!1:Reflect.has(r,n)}})}u(bs,"transactionProxy");var my={findUnique:"findUniqueOrThrow",findFirst:"findFirstOrThrow"};function dy(e,t,r){if(e){let n=my[r],o=t?`prisma.${t}.${n}`:`prisma.${n}`,i=`rejectOnNotFound.${t!=null?t:""}.${r}`;ji(i,`\`rejectOnNotFound\` option is deprecated and will be removed in Prisma 5. Please use \`${o}\` method instead`)}}u(dy,"warnAboutRejectOnNotFound");d();f();m();var gy=new Set(["toJSON","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function yy(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!gy.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u(yy,"makeStrictEnum");d();f();m();d();f();m();var K6=Ll.decompressFromBase64;var export_findSync=void 0;var export_warnEnvConflicts=void 0;export{rt as DMMF,At as DMMFClass,Va as Debug,He as Decimal,Dt as Engine,Js as Extensions,lr as MetricsClient,Be as NotFoundError,ht as PrismaClientExtensionError,Ce as PrismaClientInitializationError,he as PrismaClientKnownRequestError,Xe as PrismaClientRustPanicError,Re as PrismaClientUnknownRequestError,xe as PrismaClientValidationError,fe as Sql,Ws as Types,K6 as decompressFromBase64,Ud as empty,export_findSync as findSync,fy as getPrismaClient,qd as join,cs as makeDocument,yy as makeStrictEnum,zi as objectEnumValues,yc as raw,hc as sqltag,zc as transformDocument,ls as unpack,export_warnEnvConflicts as warnEnvConflicts}; diff --git a/packages/desktop/prisma/client/runtime/edge.js b/packages/desktop/prisma/client/runtime/edge.js deleted file mode 100644 index ff9e372..0000000 --- a/packages/desktop/prisma/client/runtime/edge.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict";var ep=Object.create;var Tr=Object.defineProperty;var tp=Object.getOwnPropertyDescriptor;var rp=Object.getOwnPropertyNames;var np=Object.getPrototypeOf,op=Object.prototype.hasOwnProperty;var u=(e,t)=>Tr(e,"name",{value:t,configurable:!0});var vn=(e,t)=>()=>(e&&(t=e(e=0)),t);var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tn=(e,t)=>{for(var r in t)Tr(e,r,{get:t[r],enumerable:!0})},Cs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rp(t))!op.call(e,o)&&o!==r&&Tr(e,o,{get:()=>t[o],enumerable:!(n=tp(t,o))||n.enumerable});return e};var X=(e,t,r)=>(r=e!=null?ep(np(e)):{},Cs(t||!e||!e.__esModule?Tr(r,"default",{value:e,enumerable:!0}):r,e)),ip=e=>Cs(Tr({},"__esModule",{value:!0}),e);function q(e){return()=>e}function ke(){return w}var sp,w,f=vn(()=>{"use strict";u(q,"noop");sp=Promise.resolve();u(ke,"getProcess");w={abort:q(void 0),addListener:q(ke()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:q(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:q(void 0),domain:{run:q(void 0),add:q(void 0),remove:q(void 0),bind:q(void 0),intercept:q(void 0),...ke()},emit:q(ke()),emitWarning:q(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:q(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:q(0),getegid:q(0),geteuid:q(0),getgid:q(0),getgroups:q([]),getuid:q(0),hasUncaughtExceptionCaptureCallback:q(!1),hrtime:q([0,0]),platform:"linux",kill:q(!0),listenerCount:q(0),listeners:q([]),memoryUsage:q({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{sp.then(()=>e(...t)).catch(r=>{setTimeout(()=>{throw r},0)})},off:q(ke()),on:q(ke()),once:q(ke()),openStdin:q({}),pid:0,ppid:0,prependListener:q(ke()),prependOnceListener:q(ke()),rawListeners:q([]),release:{name:"node"},removeAllListeners:q(ke()),removeListener:q(ke()),resourceUsage:q({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:q(ke()),setUncaughtExceptionCaptureCallback:q(void 0),setegid:q(void 0),seteuid:q(void 0),setgid:q(void 0),setgroups:q(void 0),setuid:q(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:q(0),uptime:q(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var E,m=vn(()=>{"use strict";E=u(()=>{},"fn");E.prototype=E});var Hs=W(Jt=>{"use strict";d();f();m();var Ds=u((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"q"),ap=Ds(e=>{"use strict";e.byteLength=c,e.toByteArray=p,e.fromByteArray=b;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=v.indexOf("=");T===-1&&(T=h);var O=T===h?0:4-T%4;return[T,O]}u(a,"j");function c(v){var h=a(v),T=h[0],O=h[1];return(T+O)*3/4-O}u(c,"sr");function l(v,h,T){return(h+T)*3/4-T}u(l,"lr");function p(v){var h,T=a(v),O=T[0],P=T[1],M=new n(l(v,O,P)),A=0,S=P>0?O-4:O,_;for(_=0;_>16&255,M[A++]=h>>8&255,M[A++]=h&255;return P===2&&(h=r[v.charCodeAt(_)]<<2|r[v.charCodeAt(_+1)]>>4,M[A++]=h&255),P===1&&(h=r[v.charCodeAt(_)]<<10|r[v.charCodeAt(_+1)]<<4|r[v.charCodeAt(_+2)]>>2,M[A++]=h>>8&255,M[A++]=h&255),M}u(p,"ar");function g(v){return t[v>>18&63]+t[v>>12&63]+t[v>>6&63]+t[v&63]}u(g,"yr");function y(v,h,T){for(var O,P=[],M=h;MS?S:A+M));return O===1?(h=v[T-1],P.push(t[h>>2]+t[h<<4&63]+"==")):O===2&&(h=(v[T-2]<<8)+v[T-1],P.push(t[h>>10]+t[h>>4&63]+t[h<<2&63]+"=")),P.join("")}u(b,"xr")}),up=Ds(e=>{e.read=function(t,r,n,o,i){var s,a,c=i*8-o-1,l=(1<>1,g=-7,y=n?i-1:0,b=n?-1:1,v=t[r+y];for(y+=b,s=v&(1<<-g)-1,v>>=-g,g+=c;g>0;s=s*256+t[r+y],y+=b,g-=8);for(a=s&(1<<-g)-1,s>>=-g,g+=o;g>0;a=a*256+t[r+y],y+=b,g-=8);if(s===0)s=1-p;else{if(s===l)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-p}return(v?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,c,l,p=s*8-i-1,g=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=o?0:s-1,h=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,a=g):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+y>=1?r+=b/l:r+=b*Math.pow(2,1-y),r*l>=2&&(a++,l/=2),a+y>=g?(c=0,a=g):a+y>=1?(c=(r*l-1)*Math.pow(2,i),a=a+y):(c=r*Math.pow(2,y-1)*Math.pow(2,i),a=0));i>=8;t[n+v]=c&255,v+=h,c/=256,i-=8);for(a=a<0;t[n+v]=a&255,v+=h,a/=256,p-=8);t[n+v-h]|=T*128}}),$o=ap(),Gt=up(),Rs=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Jt.Buffer=C;Jt.SlowBuffer=dp;Jt.INSPECT_MAX_BYTES=50;var An=2147483647;Jt.kMaxLength=An;C.TYPED_ARRAY_SUPPORT=cp();!C.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 cp(){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(e){return!1}}u(cp,"Br");Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function et(e){if(e>An)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}u(et,"d");function C(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 qo(e)}return ks(e,t,r)}u(C,"h");C.poolSize=8192;function ks(e,t,r){if(typeof e=="string")return pp(e,t);if(ArrayBuffer.isView(e))return fp(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(Ke(e,ArrayBuffer)||e&&Ke(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ke(e,SharedArrayBuffer)||e&&Ke(e.buffer,SharedArrayBuffer)))return js(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 C.from(n,t,r);let o=mp(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.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)}u(ks,"Z");C.from=function(e,t,r){return ks(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function Ns(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"')}u(Ns,"Q");function lp(e,t,r){return Ns(e),e<=0?et(e):t!==void 0?typeof r=="string"?et(e).fill(t,r):et(e).fill(t):et(e)}u(lp,"Er");C.alloc=function(e,t,r){return lp(e,t,r)};function qo(e){return Ns(e),et(e<0?0:Uo(e)|0)}u(qo,"P");C.allocUnsafe=function(e){return qo(e)};C.allocUnsafeSlow=function(e){return qo(e)};function pp(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=$s(e,t)|0,n=et(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}u(pp,"dr");function Lo(e){let t=e.length<0?0:Uo(e.length)|0,r=et(t);for(let n=0;n=An)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+An.toString(16)+" bytes");return e|0}u(Uo,"O");function dp(e){return+e!=e&&(e=0),C.alloc(+e)}u(dp,"Ir");C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(Ke(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),Ke(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.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 o=0,i=Math.min(r,n);on.length?(C.isBuffer(i)||(i=C.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(C.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function $s(e,t){if(C.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ke(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Bo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return zs(e).length;default:if(o)return n?-1:Bo(e).length;t=(""+t).toLowerCase(),o=!0}}u($s,"v");C.byteLength=$s;function gp(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 Pp(this,t,r);case"utf8":case"utf-8":return Bs(this,t,r);case"ascii":return Tp(this,t,r);case"latin1":case"binary":return Ap(this,t,r);case"base64":return Ep(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mp(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}u(gp,"Fr");C.prototype._isBuffer=!0;function Rt(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}u(Rt,"I");C.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+=" ... "),""};Rs&&(C.prototype[Rs]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,o){if(Ke(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r);for(let p=0;p2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Go(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:Is(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Is(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}u(Ls,"rr");function Is(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function c(p,g){return i===1?p[g]:p.readUInt16BE(g*i)}u(c,"c");let l;if(o){let p=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let p=!0;for(let g=0;go&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return yp(this,e,t,r);case"utf8":case"utf-8":return hp(this,e,t,r);case"ascii":case"latin1":case"binary":return bp(this,e,t,r);case"base64":return wp(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xp(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ep(e,t,r){return t===0&&r===e.length?$o.fromByteArray(e):$o.fromByteArray(e.slice(t,r))}u(Ep,"Sr");function Bs(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let c,l,p,g;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(s=g));break;case 3:c=e[o+1],l=e[o+2],(c&192)===128&&(l&192)===128&&(g=(i&15)<<12|(c&63)<<6|l&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:c=e[o+1],l=e[o+2],p=e[o+3],(c&192)===128&&(l&192)===128&&(p&192)===128&&(g=(i&15)<<18|(c&63)<<12|(l&63)<<6|p&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return vp(n)}u(Bs,"tr");var _s=4096;function vp(e){let t=e.length;if(t<=_s)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}u(se,"a");C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||se(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||se(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||se(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||se(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=ft(function(e){e=e>>>0,Kt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Kt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||se(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||se(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};C.prototype.readInt8=function(e,t){return e=e>>>0,t||se(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||se(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||se(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||se(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=ft(function(e){e=e>>>0,Kt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(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,Kt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ar(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||se(e,4,this.length),Gt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||se(e,4,this.length),Gt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||se(e,8,this.length),Gt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||se(e,8,this.length),Gt.read(this,e,!1,52,8)};function Ee(e,t,r,n,o,i){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}u(Ee,"y");C.prototype.writeUintLE=C.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;Ee(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;Ee(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};C.prototype.writeUint8=C.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,1,255,0),this[t]=e&255,t+1};C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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 qs(e,t,r,n,o){Js(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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}u(qs,"ir");function Us(e,t,r,n,o){Js(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}u(Us,"nr");C.prototype.writeBigUInt64LE=ft(function(e,t=0){return qs(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=ft(function(e,t=0){return Us(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Ee(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};C.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Ee(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};C.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};C.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||Ee(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};C.prototype.writeBigInt64LE=ft(function(e,t=0){return qs(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=ft(function(e,t=0){return Us(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Vs(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}u(Vs,"er");function Gs(e,t,r,n,o){return t=+t,r=r>>>0,o||Vs(e,t,r,4,34028234663852886e22,-34028234663852886e22),Gt.write(e,t,r,n,23,4),r+4}u(Gs,"or");C.prototype.writeFloatLE=function(e,t,r){return Gs(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return Gs(this,e,t,!1,r)};function Ks(e,t,r,n,o){return t=+t,r=r>>>0,o||Vs(e,t,r,8,17976931348623157e292,-17976931348623157e292),Gt.write(e,t,r,n,52,8),r+8}u(Ks,"ur");C.prototype.writeDoubleLE=function(e,t,r){return Ks(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return Ks(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.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 o;if(typeof e=="number")for(o=t;o2**32?o=Fs(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Fs(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Fs(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}`}u(Fs,"K");function Op(e,t,r){Kt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ar(t,e.length-(r+1))}u(Op,"Dr");function Js(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Vt.ERR_OUT_OF_RANGE("value",a,e)}Op(n,o,i)}u(Js,"hr");function Kt(e,t){if(typeof e!="number")throw new Vt.ERR_INVALID_ARG_TYPE(t,"number",e)}u(Kt,"R");function Ar(e,t,r){throw Math.floor(e)!==e?(Kt(e,r),new Vt.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Vt.ERR_BUFFER_OUT_OF_BOUNDS:new Vt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}u(Ar,"T");var Sp=/[^+/0-9A-Za-z-_]/g;function Cp(e){if(e=e.split("=")[0],e=e.trim().replace(Sp,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}u(Cp,"br");function Bo(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}u(Bo,"b");function Rp(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}u(Ip,"Or");function zs(e){return $o.toByteArray(Cp(e))}u(zs,"fr");function Pn(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}u(Pn,"_");function Ke(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}u(Ke,"E");function Go(e){return e!==e}u(Go,"Y");var _p=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function ft(e){return typeof BigInt>"u"?Fp:e}u(ft,"g");function Fp(){throw new Error("BigInt not supported")}u(Fp,"Yr");});var x,d=vn(()=>{"use strict";x=X(Hs())});var Ws=W((Dy,Mn)=>{d();f();m();var Dp=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function o(s,a){if(!n[s]){n[s]={};for(var c=0;c>>8,c[l*2+1]=g%256}return c},decompressFromUint8Array:function(s){if(s==null)return i.decompress(s);for(var a=new Array(s.length/2),c=0,l=a.length;c>1}else{for(p=1,l=0;l>1}T--,T==0&&(T=Math.pow(2,P),P++),delete y[h]}else for(p=g[h],l=0;l>1;T--,T==0&&(T=Math.pow(2,P),P++),g[v]=O++,h=String(b)}if(h!==""){if(Object.prototype.hasOwnProperty.call(y,h)){if(h.charCodeAt(0)<256){for(l=0;l>1}else{for(p=1,l=0;l>1}T--,T==0&&(T=Math.pow(2,P),P++),delete y[h]}else for(p=g[h],l=0;l>1;T--,T==0&&(T=Math.pow(2,P),P++)}for(p=2,l=0;l>1;for(;;)if(A=A<<1,S==a-1){M.push(c(A));break}else S++;return M.join("")},decompress:function(s){return s==null?"":s==""?null:i._decompress(s.length,32768,function(a){return s.charCodeAt(a)})},_decompress:function(s,a,c){var l=[],p,g=4,y=4,b=3,v="",h=[],T,O,P,M,A,S,_,F={val:c(0),position:a,index:1};for(T=0;T<3;T+=1)l[T]=T;for(P=0,A=Math.pow(2,2),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;switch(p=P){case 0:for(P=0,A=Math.pow(2,8),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;_=e(P);break;case 1:for(P=0,A=Math.pow(2,16),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;_=e(P);break;case 2:return""}for(l[3]=_,O=_,h.push(_);;){if(F.index>s)return"";for(P=0,A=Math.pow(2,b),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;switch(_=P){case 0:for(P=0,A=Math.pow(2,8),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;l[y++]=e(P),_=y-1,g--;break;case 1:for(P=0,A=Math.pow(2,16),S=1;S!=A;)M=F.val&F.position,F.position>>=1,F.position==0&&(F.position=a,F.val=c(F.index++)),P|=(M>0?1:0)*S,S<<=1;l[y++]=e(P),_=y-1,g--;break;case 2:return h.join("")}if(g==0&&(g=Math.pow(2,b),b++),l[_])v=l[_];else if(_===y)v=O+O.charAt(0);else return null;h.push(v),l[y++]=O+v.charAt(0),g--,O=v,g==0&&(g=Math.pow(2,b),b++)}}};return i}();typeof Mn!="undefined"&&Mn!=null&&(Mn.exports=Dp)});var ta=W((ch,ea)=>{"use strict";d();f();m();ea.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var zo=W((mh,na)=>{d();f();m();var Pr=ta(),ra={};for(let e of Object.keys(Pr))ra[Pr[e]]=e;var k={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};na.exports=k;for(let e of Object.keys(k)){if(!("channels"in k[e]))throw new Error("missing channels property: "+e);if(!("labels"in k[e]))throw new Error("missing channel labels property: "+e);if(k[e].labels.length!==k[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=k[e];delete k[e].channels,delete k[e].labels,Object.defineProperty(k[e],"channels",{value:t}),Object.defineProperty(k[e],"labels",{value:r})}k.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o,a,c;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let l=(o+i)/2;return i===o?c=0:l<=.5?c=s/(i+o):c=s/(2-i-o),[a,c*100,l*100]};k.rgb.hsv=function(e){let t,r,n,o,i,s=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(s,a,c),p=l-Math.min(s,a,c),g=u(function(y){return(l-y)/6/p+1/2},"diffc");return p===0?(o=0,i=0):(i=p/l,t=g(s),r=g(a),n=g(c),s===l?o=n-r:a===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,l*100]};k.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=k.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};k.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0;return[i*100,s*100,a*100,o*100]};function kp(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u(kp,"comparativeDistance");k.rgb.keyword=function(e){let t=ra[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(Pr)){let i=Pr[o],s=kp(e,i);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,s=t*.0193+r*.1192+n*.9505;return[o*100,i*100,s*100]};k.rgb.lab=function(e){let t=k.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let i=116*n-16,s=500*(r-n),a=200*(n-o);return[i,s,a]};k.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,i,s;if(r===0)return s=n*255,[s,s,s];n<.5?o=n*(1+r):o=n+r-n*r;let a=2*n-o,c=[0,0,0];for(let l=0;l<3;l++)i=t+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?s=a+(o-a)*6*i:2*i<1?s=o:3*i<2?s=a+(o-a)*(2/3-i)*6:s=a,c[l]=s*255;return c};k.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;let s=(n+r)/2,a=n===0?2*o/(i+o):2*r/(n+r);return[t,a*100,s*100]};k.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};k.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01),i,s;s=(2-r)*n;let a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,i*100,s*100]};k.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,i;o>1&&(r/=o,n/=o);let s=Math.floor(6*t),a=1-n;i=6*t-s,(s&1)!==0&&(i=1-i);let c=r+i*(a-r),l,p,g;switch(s){default:case 6:case 0:l=a,p=c,g=r;break;case 1:l=c,p=a,g=r;break;case 2:l=r,p=a,g=c;break;case 3:l=r,p=c,g=a;break;case 4:l=c,p=r,g=a;break;case 5:l=a,p=r,g=c;break}return[l*255,p*255,g*255]};k.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o);return[i*255,s*255,a*255]};k.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,s=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]};k.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let o=116*r-16,i=500*(t-r),s=200*(r-n);return[o,i,s]};k.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-n/200;let a=i**3,c=o**3,l=s**3;return i=a>.008856?a:(i-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]};k.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(r*r+n*n);return[t,s,o]};k.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o);return[t,i,s]};k.rgb.ansi16=function(e,t=null){let[r,n,o]=e,i=t===null?k.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(s+=60),s};k.hsv.ansi16=function(e){return k.rgb.ansi16(k.hsv.rgb(e),e[2])};k.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};k.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};k.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};k.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};k.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),o=n>>16&255,i=n>>8&255,s=n&255;return[o,i,s]};k.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i,a,c;return s<1?a=i/(1-s):a=0,s<=0?c=0:o===t?c=(r-n)/s%6:o===r?c=2+(n-t)/s:c=4+(t-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};k.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};k.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};k.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],i=t%1*6,s=i%1,a=1-s,c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};k.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};k.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};k.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};k.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,o=n-t,i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};k.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};k.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};k.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};k.gray.hsl=function(e){return[0,0,e[0]]};k.gray.hsv=k.gray.hsl;k.gray.hwb=function(e){return[0,100,e[0]]};k.gray.cmyk=function(e){return[0,0,0,e[0]]};k.gray.lab=function(e){return[e[0],0,0]};k.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};k.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var ia=W((bh,oa)=>{d();f();m();var On=zo();function Np(){let e={},t=Object.keys(On);for(let r=t.length,n=0;n{d();f();m();var Ho=zo(),Bp=ia(),zt={},qp=Object.keys(Ho);function Up(e){let t=u(function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))},"wrappedFn");return"conversion"in e&&(t.conversion=e.conversion),t}u(Up,"wrapRaw");function Vp(e){let t=u(function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let o=e(r);if(typeof o=="object")for(let i=o.length,s=0;s{zt[e]={},Object.defineProperty(zt[e],"channels",{value:Ho[e].channels}),Object.defineProperty(zt[e],"labels",{value:Ho[e].labels});let t=Bp(e);Object.keys(t).forEach(n=>{let o=t[n];zt[e][n]=Vp(o),zt[e][n].raw=Up(o)})});sa.exports=zt});var ma=W((Sh,fa)=>{"use strict";d();f();m();var ua=u((e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,"wrapAnsi16"),ca=u((e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},"wrapAnsi256"),la=u((e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m"),Sn=u(e=>e,"ansi2ansi"),pa=u((e,t,r)=>[e,t,r],"rgb2rgb"),Ht=u((e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},"setLazyProperty"),Wo,Wt=u((e,t,r,n)=>{Wo===void 0&&(Wo=aa());let o=n?10:0,i={};for(let[s,a]of Object.entries(Wo)){let c=s==="ansi16"?"ansi":s;s===t?i[c]=e(r,o):typeof a=="object"&&(i[c]=e(a[t],o))}return i},"makeDynamicStyles");function Gp(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,i]of Object.entries(n))t[o]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[o]=t[o],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Ht(t.color,"ansi",()=>Wt(ua,"ansi16",Sn,!1)),Ht(t.color,"ansi256",()=>Wt(ca,"ansi256",Sn,!1)),Ht(t.color,"ansi16m",()=>Wt(la,"rgb",pa,!1)),Ht(t.bgColor,"ansi",()=>Wt(ua,"ansi16",Sn,!0)),Ht(t.bgColor,"ansi256",()=>Wt(ca,"ansi256",Sn,!0)),Ht(t.bgColor,"ansi16m",()=>Wt(la,"rgb",pa,!0)),t}u(Gp,"assembleStyles");Object.defineProperty(fa,"exports",{enumerable:!0,get:Gp})});var Qo=W(()=>{d();f();m()});var ga=W(($h,da)=>{"use strict";d();f();m();var Kp=u((e,t,r)=>{let n=e.indexOf(t);if(n===-1)return e;let o=t.length,i=0,s="";do s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i);while(n!==-1);return s+=e.substr(i),s},"stringReplaceAll"),Jp=u((e,t,r,n)=>{let o=0,i="";do{let s=e[n-1]==="\r";i+=e.substr(o,(s?n-1:n)-o)+t+(s?`\r -`:` -`)+r,o=n+1,n=e.indexOf(` -`,o)}while(n!==-1);return i+=e.substr(o),i},"stringEncaseCRLFWithFirstIndex");da.exports={stringReplaceAll:Kp,stringEncaseCRLFWithFirstIndex:Jp}});var xa=W((Vh,wa)=>{"use strict";d();f();m();var zp=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ya=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Hp=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Wp=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Qp=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ba(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):Qp.get(e)||e}u(ba,"unescape");function Yp(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),o;for(let i of n){let s=Number(i);if(!Number.isNaN(s))r.push(s);else if(o=i.match(Hp))r.push(o[2].replace(Wp,(a,c,l)=>c?ba(c):l));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`)}return r}u(Yp,"parseArguments");function Zp(e){ya.lastIndex=0;let t=[],r;for(;(r=ya.exec(e))!==null;){let n=r[1];if(r[2]){let o=Yp(n,r[2]);t.push([n].concat(o))}else t.push([n])}return t}u(Zp,"parseStyle");function ha(e,t){let r={};for(let o of t)for(let i of o.styles)r[i[0]]=o.inverse?null:i.slice(1);let n=e;for(let[o,i]of Object.entries(r))if(!!Array.isArray(i)){if(!(o in n))throw new Error(`Unknown Chalk style: ${o}`);n=i.length>0?n[o](...i):n[o]}return n}u(ha,"buildStyle");wa.exports=(e,t)=>{let r=[],n=[],o=[];if(t.replace(zp,(i,s,a,c,l,p)=>{if(s)o.push(ba(s));else if(c){let g=o.join("");o=[],n.push(r.length===0?g:ha(e,r)(g)),r.push({inverse:a,styles:Zp(c)})}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(ha(e,r)(o.join(""))),o=[],r.pop()}else o.push(p)}),n.push(o.join("")),r.length>0){let i=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(i)}return n.join("")}});var It=W((Hh,Ma)=>{"use strict";d();f();m();var Mr=ma(),{stdout:Zo,stderr:Xo}=Qo(),{stringReplaceAll:Xp,stringEncaseCRLFWithFirstIndex:ef}=ga(),{isArray:Rn}=Array,va=["ansi","ansi","ansi256","ansi16m"],Qt=Object.create(null),tf=u((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Zo?Zo.level:0;e.level=t.level===void 0?r:t.level},"applyOptions"),Cn=class{constructor(t){return Ta(t)}};u(Cn,"ChalkClass");var Ta=u(e=>{let t={};return tf(t,e),t.template=(...r)=>Pa(t.template,...r),Object.setPrototypeOf(t,In.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Cn,t.template},"chalkFactory");function In(e){return Ta(e)}u(In,"Chalk");for(let[e,t]of Object.entries(Mr))Qt[e]={get(){let r=_n(this,ei(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};Qt.visible={get(){let e=_n(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Aa=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of Aa)Qt[e]={get(){let{level:t}=this;return function(...r){let n=ei(Mr.color[va[t]][e](...r),Mr.color.close,this._styler);return _n(this,n,this._isEmpty)}}};for(let e of Aa){let t="bg"+e[0].toUpperCase()+e.slice(1);Qt[t]={get(){let{level:r}=this;return function(...n){let o=ei(Mr.bgColor[va[r]][e](...n),Mr.bgColor.close,this._styler);return _n(this,o,this._isEmpty)}}}}var rf=Object.defineProperties(()=>{},{...Qt,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),ei=u((e,t,r)=>{let n,o;return r===void 0?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},"createStyler"),_n=u((e,t,r)=>{let n=u((...o)=>Rn(o[0])&&Rn(o[0].raw)?Ea(n,Pa(n,...o)):Ea(n,o.length===1?""+o[0]:o.join(" ")),"builder");return Object.setPrototypeOf(n,rf),n._generator=e,n._styler=t,n._isEmpty=r,n},"createBuilder"),Ea=u((e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:n,closeAll:o}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=Xp(t,r.close,r.open),r=r.parent;let i=t.indexOf(` -`);return i!==-1&&(t=ef(t,o,n,i)),n+t+o},"applyStyle"),Yo,Pa=u((e,...t)=>{let[r]=t;if(!Rn(r)||!Rn(r.raw))return t.join(" ");let n=t.slice(1),o=[r.raw[0]];for(let i=1;i{d();f();m();nf={existsSync(){return!1}},Dn=nf});var Sa=W((o0,Oa)=>{d();f();m();var Yt=1e3,Zt=Yt*60,Xt=Zt*60,_t=Xt*24,of=_t*7,sf=_t*365.25;Oa.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return af(e);if(r==="number"&&isFinite(e))return t.long?cf(e):uf(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function af(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*sf;case"weeks":case"week":case"w":return r*of;case"days":case"day":case"d":return r*_t;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Xt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Yt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}u(af,"parse");function uf(e){var t=Math.abs(e);return t>=_t?Math.round(e/_t)+"d":t>=Xt?Math.round(e/Xt)+"h":t>=Zt?Math.round(e/Zt)+"m":t>=Yt?Math.round(e/Yt)+"s":e+"ms"}u(uf,"fmtShort");function cf(e){var t=Math.abs(e);return t>=_t?kn(e,t,_t,"day"):t>=Xt?kn(e,t,Xt,"hour"):t>=Zt?kn(e,t,Zt,"minute"):t>=Yt?kn(e,t,Yt,"second"):e+" ms"}u(cf,"fmtLong");function kn(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}u(kn,"plural")});var ri=W((c0,Ca)=>{d();f();m();function lf(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=s,r.humanize=Sa(),r.destroy=l,Object.keys(e).forEach(p=>{r[p]=e[p]}),r.names=[],r.skips=[],r.formatters={};function t(p){let g=0;for(let y=0;y{if(_==="%%")return"%";A++;let j=r.formatters[F];if(typeof j=="function"){let V=T[A];_=j.call(O,V),T.splice(A,1),A--}return _}),r.formatArgs.call(O,T),(O.log||r.log).apply(O,T)}return u(h,"debug"),h.namespace=p,h.useColors=r.useColors(),h.color=r.selectColor(p),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(b!==r.namespaces&&(b=r.namespaces,v=r.enabled(p)),v),set:T=>{y=T}}),typeof r.init=="function"&&r.init(h),h}u(r,"createDebug");function n(p,g){let y=r(this.namespace+(typeof g=="undefined"?":":g)+p);return y.log=this.log,y}u(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let g,y=(typeof p=="string"?p:"").split(/[\s,]+/),b=y.length;for(g=0;g"-"+g)].join(",");return r.enable(""),p}u(i,"disable");function s(p){if(p[p.length-1]==="*")return!0;let g,y;for(g=0,y=r.skips.length;g{d();f();m();Ae.formatArgs=ff;Ae.save=mf;Ae.load=df;Ae.useColors=pf;Ae.storage=gf();Ae.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function pf(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}u(pf,"useColors");function ff(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Nn.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}u(ff,"formatArgs");Ae.log=console.debug||console.log||(()=>{});function mf(e){try{e?Ae.storage.setItem("debug",e):Ae.storage.removeItem("debug")}catch(t){}}u(mf,"save");function df(){let e;try{e=Ae.storage.getItem("debug")}catch(t){}return!e&&typeof w!="undefined"&&"env"in w&&(e=w.env.DEBUG),e}u(df,"load");function gf(){try{return localStorage}catch(e){}}u(gf,"localstorage");Nn.exports=ri()(Ae);var{formatters:yf}=Nn.exports;yf.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Ia=W(jn=>{d();f();m();jn.isatty=function(){return!1};function hf(){throw new Error("tty.ReadStream is not implemented")}u(hf,"t");jn.ReadStream=hf;function bf(){throw new Error("tty.WriteStream is not implemented")}u(bf,"e");jn.WriteStream=bf});var pi=W(J=>{d();f();m();var re=u((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"p"),_a=re((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Vn=re((e,t)=>{"use strict";var r=_a();t.exports=function(){return r()&&!!Symbol.toStringTag}}),wf=re((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=_a();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),xf=re((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var c=n.call(arguments,1),l,p=function(){if(this instanceof l){var h=a.apply(this,c.concat(n.call(arguments)));return Object(h)===h?h:this}else return a.apply(s,c.concat(n.call(arguments)))},g=Math.max(0,a.length-c.length),y=[],b=0;b{"use strict";var r=xf();t.exports=E.prototype.bind||r}),Ef=re((e,t)=>{"use strict";var r=si();t.exports=r.call(E.call,Object.prototype.hasOwnProperty)}),ai=re((e,t)=>{"use strict";var r,n=SyntaxError,o=E,i=TypeError,s=u(function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch(ee){}},"lr"),a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(K){a=null}var c=u(function(){throw new i},"gr"),l=a?function(){try{return arguments.callee,c}catch(K){try{return a(arguments,"callee").get}catch(ee){return c}}}():c,p=wf()(),g=Object.getPrototypeOf||function(K){return K.__proto__},y={},b=typeof Uint8Array>"u"?r:g(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?g(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":b,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet},h=u(function K(ee){var z;if(ee==="%AsyncFunction%")z=s("async function () {}");else if(ee==="%GeneratorFunction%")z=s("function* () {}");else if(ee==="%AsyncGeneratorFunction%")z=s("async function* () {}");else if(ee==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(z=H.prototype)}else if(ee==="%AsyncIteratorPrototype%"){var L=K("%AsyncGenerator%");L&&(z=g(L.prototype))}return v[ee]=z,z},"r"),T={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=si(),P=Ef(),M=O.call(E.call,Array.prototype.concat),A=O.call(E.apply,Array.prototype.splice),S=O.call(E.call,String.prototype.replace),_=O.call(E.call,String.prototype.slice),F=O.call(E.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,te=u(function(K){var ee=_(K,0,1),z=_(K,-1);if(ee==="%"&&z!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&ee!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var H=[];return S(K,j,function(L,ct,ie,Ut){H[H.length]=ie?S(Ut,V,"$1"):ct||L}),H},"At"),G=u(function(K,ee){var z=K,H;if(P(T,z)&&(H=T[z],z="%"+H[0]+"%"),P(v,z)){var L=v[z];if(L===y&&(L=h(z)),typeof L>"u"&&!ee)throw new i("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:H,name:z,value:L}}throw new n("intrinsic "+K+" does not exist!")},"ht");t.exports=function(K,ee){if(typeof K!="string"||K.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ee!="boolean")throw new i('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,K)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=te(K),H=z.length>0?z[0]:"",L=G("%"+H+"%",ee),ct=L.name,ie=L.value,Ut=!1,lt=L.alias;lt&&(H=lt[0],A(z,M([0,1],lt)));for(var St=1,Ve=!0;St=z.length){var Ct=a(ie,Re);Ve=!!Ct,Ve&&"get"in Ct&&!("originalValue"in Ct.get)?ie=Ct.get:ie=ie[Re]}else Ve=P(ie,Re),ie=ie[Re];Ve&&!Ut&&(v[ct]=ie)}}return ie}}),vf=re((e,t)=>{"use strict";var r=si(),n=ai(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(g){c=null}t.exports=function(g){var y=s(r,i,arguments);if(a&&c){var b=a(y,"length");b.configurable&&c(y,"length",{value:1+l(0,g.length-(arguments.length-1))})}return y};var p=u(function(){return s(r,o,arguments)},"ee");c?c(t.exports,"apply",{value:p}):t.exports.apply=p}),ui=re((e,t)=>{"use strict";var r=ai(),n=vf(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),Tf=re((e,t)=>{"use strict";var r=Vn()(),n=ui(),o=n("Object.prototype.toString"),i=u(function(c){return r&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:o(c)==="[object Arguments]"},"H"),s=u(function(c){return i(c)?!0:c!==null&&typeof c=="object"&&typeof c.length=="number"&&c.length>=0&&o(c)!=="[object Array]"&&o(c.callee)==="[object Function]"},"se"),a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),Af=re((e,t)=>{"use strict";var r=Object.prototype.toString,n=E.prototype.toString,o=/^\s*(?:function)?\*/,i=Vn()(),s=Object.getPrototypeOf,a=u(function(){if(!i)return!1;try{return E("return function*() {}")()}catch(l){}},"Ft"),c;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var p=r.call(l);return p==="[object GeneratorFunction]"}if(!s)return!1;if(typeof c>"u"){var g=a();c=g?s(g):!1}return s(l)===c}}),Pf=re((e,t)=>{"use strict";var r=E.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(A){A!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=u(function(A){try{var S=r.call(A);return s.test(S)}catch(_){return!1}},"vr"),c=u(function(A){try{return a(A)?!1:(r.call(A),!0)}catch(S){return!1}},"hr"),l=Object.prototype.toString,p="[object Object]",g="[object Function]",y="[object GeneratorFunction]",b="[object HTMLAllCollection]",v="[object HTML document.all class]",h="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,O=!(0 in[,]),P=u(function(){return!1},"Or");typeof document=="object"&&(M=document.all,l.call(M)===l.call(document.all)&&(P=u(function(A){if((O||!A)&&(typeof A>"u"||typeof A=="object"))try{var S=l.call(A);return(S===b||S===v||S===h||S===p)&&A("")==null}catch(_){}return!1},"Or")));var M;t.exports=n?function(A){if(P(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{n(A,null,o)}catch(S){if(S!==i)return!1}return!a(A)&&c(A)}:function(A){if(P(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(T)return c(A);if(a(A))return!1;var S=l.call(A);return S!==g&&S!==y&&!/^\[object HTML/.test(S)?!1:c(A)}}),Fa=re((e,t)=>{"use strict";var r=Pf(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=u(function(l,p,g){for(var y=0,b=l.length;y=3&&(y=g),n.call(l)==="[object Array]"?i(l,p,y):typeof l=="string"?s(l,p,y):a(l,p,y)},"_t");t.exports=c}),Da=re((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=ai(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),Na=re((e,t)=>{"use strict";var r=Fa(),n=Da(),o=ui(),i=o("Object.prototype.toString"),s=Vn()(),a=typeof globalThis>"u"?global:globalThis,c=n(),l=o("Array.prototype.indexOf",!0)||function(h,T){for(var O=0;O-1}return y?v(h):!1}}),Mf=re((e,t)=>{"use strict";var r=Fa(),n=Da(),o=ui(),i=o("Object.prototype.toString"),s=Vn()(),a=typeof globalThis>"u"?global:globalThis,c=n(),l=o("String.prototype.slice"),p={},g=ka(),y=Object.getPrototypeOf;s&&g&&y&&r(c,function(h){if(typeof a[h]=="function"){var T=new a[h];if(Symbol.toStringTag in T){var O=y(T),P=g(O,Symbol.toStringTag);if(!P){var M=y(O);P=g(M,Symbol.toStringTag)}p[h]=P.get}}});var b=u(function(h){var T=!1;return r(p,function(O,P){if(!T)try{var M=O.call(h);M===P&&(T=M)}catch(A){}}),T},"tn"),v=Na();t.exports=function(h){return v(h)?!s||!(Symbol.toStringTag in h)?l(i(h),8,-1):b(h):!1}}),Of=re(e=>{"use strict";var t=Tf(),r=Af(),n=Mf(),o=Na();function i(I){return I.call.bind(I)}u(i,"R");var s=typeof BigInt<"u",a=typeof Symbol<"u",c=i(Object.prototype.toString),l=i(Number.prototype.valueOf),p=i(String.prototype.valueOf),g=i(Boolean.prototype.valueOf);s&&(y=i(BigInt.prototype.valueOf));var y;a&&(b=i(Symbol.prototype.valueOf));var b;function v(I,Xl){if(typeof I!="object")return!1;try{return Xl(I),!0}catch(Ey){return!1}}u(v,"N"),e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function h(I){return typeof Promise<"u"&&I instanceof Promise||I!==null&&typeof I=="object"&&typeof I.then=="function"&&typeof I.catch=="function"}u(h,"yn"),e.isPromise=h;function T(I){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(I):o(I)||Re(I)}u(T,"cn"),e.isArrayBufferView=T;function O(I){return n(I)==="Uint8Array"}u(O,"pn"),e.isUint8Array=O;function P(I){return n(I)==="Uint8ClampedArray"}u(P,"ln"),e.isUint8ClampedArray=P;function M(I){return n(I)==="Uint16Array"}u(M,"gn"),e.isUint16Array=M;function A(I){return n(I)==="Uint32Array"}u(A,"dn"),e.isUint32Array=A;function S(I){return n(I)==="Int8Array"}u(S,"bn"),e.isInt8Array=S;function _(I){return n(I)==="Int16Array"}u(_,"mn"),e.isInt16Array=_;function F(I){return n(I)==="Int32Array"}u(F,"An"),e.isInt32Array=F;function j(I){return n(I)==="Float32Array"}u(j,"hn"),e.isFloat32Array=j;function V(I){return n(I)==="Float64Array"}u(V,"Sn"),e.isFloat64Array=V;function te(I){return n(I)==="BigInt64Array"}u(te,"vn"),e.isBigInt64Array=te;function G(I){return n(I)==="BigUint64Array"}u(G,"On"),e.isBigUint64Array=G;function K(I){return c(I)==="[object Map]"}u(K,"X"),K.working=typeof Map<"u"&&K(new Map);function ee(I){return typeof Map>"u"?!1:K.working?K(I):I instanceof Map}u(ee,"jn"),e.isMap=ee;function z(I){return c(I)==="[object Set]"}u(z,"rr"),z.working=typeof Set<"u"&&z(new Set);function H(I){return typeof Set>"u"?!1:z.working?z(I):I instanceof Set}u(H,"Pn"),e.isSet=H;function L(I){return c(I)==="[object WeakMap]"}u(L,"er"),L.working=typeof WeakMap<"u"&&L(new WeakMap);function ct(I){return typeof WeakMap>"u"?!1:L.working?L(I):I instanceof WeakMap}u(ct,"wn"),e.isWeakMap=ct;function ie(I){return c(I)==="[object WeakSet]"}u(ie,"Dr"),ie.working=typeof WeakSet<"u"&&ie(new WeakSet);function Ut(I){return ie(I)}u(Ut,"En"),e.isWeakSet=Ut;function lt(I){return c(I)==="[object ArrayBuffer]"}u(lt,"tr"),lt.working=typeof ArrayBuffer<"u"&<(new ArrayBuffer);function St(I){return typeof ArrayBuffer>"u"?!1:lt.working?lt(I):I instanceof ArrayBuffer}u(St,"qe"),e.isArrayBuffer=St;function Ve(I){return c(I)==="[object DataView]"}u(Ve,"nr"),Ve.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Ve(new DataView(new ArrayBuffer(1),0,1));function Re(I){return typeof DataView>"u"?!1:Ve.working?Ve(I):I instanceof DataView}u(Re,"Ge"),e.isDataView=Re;var pt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Ge(I){return c(I)==="[object SharedArrayBuffer]"}u(Ge,"M");function Ct(I){return typeof pt>"u"?!1:(typeof Ge.working>"u"&&(Ge.working=Ge(new pt)),Ge.working?Ge(I):I instanceof pt)}u(Ct,"We"),e.isSharedArrayBuffer=Ct;function Jl(I){return c(I)==="[object AsyncFunction]"}u(Jl,"Tn"),e.isAsyncFunction=Jl;function zl(I){return c(I)==="[object Map Iterator]"}u(zl,"Fn"),e.isMapIterator=zl;function Hl(I){return c(I)==="[object Set Iterator]"}u(Hl,"In"),e.isSetIterator=Hl;function Wl(I){return c(I)==="[object Generator]"}u(Wl,"Bn"),e.isGeneratorObject=Wl;function Ql(I){return c(I)==="[object WebAssembly.Module]"}u(Ql,"Un"),e.isWebAssemblyCompiledModule=Ql;function As(I){return v(I,l)}u(As,"_e"),e.isNumberObject=As;function Ps(I){return v(I,p)}u(Ps,"ze"),e.isStringObject=Ps;function Ms(I){return v(I,g)}u(Ms,"Ve"),e.isBooleanObject=Ms;function Os(I){return s&&v(I,y)}u(Os,"Je"),e.isBigIntObject=Os;function Ss(I){return a&&v(I,b)}u(Ss,"Le"),e.isSymbolObject=Ss;function Yl(I){return As(I)||Ps(I)||Ms(I)||Os(I)||Ss(I)}u(Yl,"Rn"),e.isBoxedPrimitive=Yl;function Zl(I){return typeof Uint8Array<"u"&&(St(I)||Ct(I))}u(Zl,"Dn"),e.isAnyArrayBuffer=Zl,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(I){Object.defineProperty(e,I,{enumerable:!1,value:function(){throw new Error(I+" is not supported in userland")}})})}),Sf=re((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),Cf=re((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=u(function(){},"n");o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),ja=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return c;switch(c){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return c}}),s=n[r];r"u")return function(){return J.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(w.throwDeprecation)throw new Error(t);w.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return u(n,"n"),n};var $n={},$a=/^$/;w.env.NODE_DEBUG&&(Ln=w.env.NODE_DEBUG,Ln=Ln.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),$a=new RegExp("^"+Ln+"$","i"));var Ln;J.debuglog=function(e){if(e=e.toUpperCase(),!$n[e])if($a.test(e)){var t=w.pid;$n[e]=function(){var r=J.format.apply(J,arguments);console.error("%s %d: %s",e,t,r)}}else $n[e]=function(){};return $n[e]};function mt(e,t){var r={seen:[],stylize:_f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ci(t)?r.showHidden=t:t&&J._extend(r,t),Dt(r.showHidden)&&(r.showHidden=!1),Dt(r.depth)&&(r.depth=2),Dt(r.colors)&&(r.colors=!1),Dt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=If),qn(r,e,r.depth)}u(mt,"A");J.inspect=mt;mt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};mt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function If(e,t){var r=mt.styles[t];return r?"\x1B["+mt.colors[r][0]+"m"+e+"\x1B["+mt.colors[r][1]+"m":e}u(If,"xn");function _f(e,t){return e}u(_f,"Mn");function Ff(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}u(Ff,"Nn");function qn(e,t,r){if(e.customInspect&&t&&Bn(t.inspect)&&t.inspect!==J.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Kn(n)||(n=qn(e,n,r)),n}var o=Df(e,t);if(o)return o;var i=Object.keys(t),s=Ff(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),Sr(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return ni(t);if(i.length===0){if(Bn(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Or(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Un(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Sr(t))return ni(t)}var c="",l=!1,p=["{","}"];if(La(t)&&(l=!0,p=["[","]"]),Bn(t)){var g=t.name?": "+t.name:"";c=" [Function"+g+"]"}if(Or(t)&&(c=" "+RegExp.prototype.toString.call(t)),Un(t)&&(c=" "+Date.prototype.toUTCString.call(t)),Sr(t)&&(c=" "+ni(t)),i.length===0&&(!l||t.length==0))return p[0]+c+p[1];if(r<0)return Or(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var y;return l?y=kf(e,t,r,s,i):y=i.map(function(b){return ii(e,t,r,s,b,l)}),e.seen.pop(),Nf(y,c,p)}u(qn,"fr");function Df(e,t){if(Dt(t))return e.stylize("undefined","undefined");if(Kn(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(Ba(t))return e.stylize(""+t,"number");if(ci(t))return e.stylize(""+t,"boolean");if(Gn(t))return e.stylize("null","null")}u(Df,"Cn");function ni(e){return"["+Error.prototype.toString.call(e)+"]"}u(ni,"xr");function kf(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),Dt(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}u(ii,"Nr");function Nf(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}u(Nf,"qn");J.types=Of();function La(e){return Array.isArray(e)}u(La,"rt");J.isArray=La;function ci(e){return typeof e=="boolean"}u(ci,"Cr");J.isBoolean=ci;function Gn(e){return e===null}u(Gn,"sr");J.isNull=Gn;function jf(e){return e==null}u(jf,"Gn");J.isNullOrUndefined=jf;function Ba(e){return typeof e=="number"}u(Ba,"et");J.isNumber=Ba;function Kn(e){return typeof e=="string"}u(Kn,"yr");J.isString=Kn;function $f(e){return typeof e=="symbol"}u($f,"Wn");J.isSymbol=$f;function Dt(e){return e===void 0}u(Dt,"j");J.isUndefined=Dt;function Or(e){return er(e)&&li(e)==="[object RegExp]"}u(Or,"C");J.isRegExp=Or;J.types.isRegExp=Or;function er(e){return typeof e=="object"&&e!==null}u(er,"D");J.isObject=er;function Un(e){return er(e)&&li(e)==="[object Date]"}u(Un,"ur");J.isDate=Un;J.types.isDate=Un;function Sr(e){return er(e)&&(li(e)==="[object Error]"||e instanceof Error)}u(Sr,"$");J.isError=Sr;J.types.isNativeError=Sr;function Bn(e){return typeof e=="function"}u(Bn,"ar");J.isFunction=Bn;function Lf(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}u(Lf,"_n");J.isPrimitive=Lf;J.isBuffer=Sf();function li(e){return Object.prototype.toString.call(e)}u(li,"$r");function oi(e){return e<10?"0"+e.toString(10):e.toString(10)}u(oi,"Mr");var Bf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qf(){var e=new Date,t=[oi(e.getHours()),oi(e.getMinutes()),oi(e.getSeconds())].join(":");return[e.getDate(),Bf[e.getMonth()],t].join(" ")}u(qf,"Vn");J.log=function(){console.log("%s - %s",qf(),J.format.apply(J,arguments))};J.inherits=Cf();J._extend=function(e,t){if(!t||!er(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function qa(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u(qa,"tt");var Ft=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Ft&&e[Ft]){var t=e[Ft];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,Ft,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,c){r=a,n=c}),i=[],s=0;s{d();f();m();var Gf=Ia(),Jn=pi();ae.init=Yf;ae.log=Hf;ae.formatArgs=Jf;ae.save=Wf;ae.load=Qf;ae.useColors=Kf;ae.destroy=Jn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let e=Qo();e&&(e.stderr||e).level>=2&&(ae.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}ae.inspectOpts=Object.keys(w.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=w.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Kf(){return"colors"in ae.inspectOpts?Boolean(ae.inspectOpts.colors):Gf.isatty(w.stderr.fd)}u(Kf,"useColors");function Jf(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+zn.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=zf()+t+" "+e[0]}u(Jf,"formatArgs");function zf(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}u(zf,"getDate");function Hf(...e){return w.stderr.write(Jn.format(...e)+` -`)}u(Hf,"log");function Wf(e){e?w.env.DEBUG=e:delete w.env.DEBUG}u(Wf,"save");function Qf(){return w.env.DEBUG}u(Qf,"load");function Yf(e){e.inspectOpts={};let t=Object.keys(ae.inspectOpts);for(let r=0;rt.trim()).join(" ")};Ua.O=function(e){return this.inspectOpts.colors=this.useColors,Jn.inspect(e,this.inspectOpts)}});var Ga=W((_0,fi)=>{d();f();m();typeof w=="undefined"||w.type==="renderer"||w.browser===!0||w.__nwjs?fi.exports=Ra():fi.exports=Va()});var Qa=W((q0,Wa)=>{"use strict";d();f();m();function ze(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}u(ze,"c");function Ha(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){c===-1?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}u(Ha,"A");function em(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}u(em,"b");var tr={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=w.cwd()),o=r),ze(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ha(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ze(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ha(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return ze(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":tr.normalize(e)},relative:function(e,t){if(ze(e),ze(t),e===t||(e=tr.resolve(e),t=tr.resolve(t),e===t))return"";for(var r=1;rc){if(t.charCodeAt(i+p)===47)return t.slice(i+p+1);if(p===0)return t.slice(i+p)}else o>c&&(e.charCodeAt(r+p)===47?l=p:p===0&&(l=0));break}var g=e.charCodeAt(r+p),y=t.charCodeAt(i+p);if(g!==y)break;g===47&&(l=p)}var b="";for(p=r+l+1;p<=n;++p)(p===n||e.charCodeAt(p)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(ze(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ze(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(c===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){ze(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return em("/",e)},parse:function(e){ze(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,c=!0,l=e.length-1,p=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!c){s=l+1;break}continue}a===-1&&(c=!1,a=l+1),r===46?i===-1?i=l:p!==1&&(p=1):i!==-1&&(p=-1)}return i===-1||a===-1||p===0||p===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};tr.posix=tr;Wa.exports=tr});var Xa=W((Y0,Za)=>{d();f();m();var gi=Symbol("arg flag"),be=class extends Error{constructor(t,r){super(t),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,be.prototype)}};u(be,"ArgError");function Cr(e,{argv:t=w.argv.slice(2),permissive:r=!1,stopAtPositional:n=!1}={}){if(!e)throw new be("argument specification object is required","ARG_CONFIG_NO_SPEC");let o={_:[]},i={},s={};for(let a of Object.keys(e)){if(!a)throw new be("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(a[0]!=="-")throw new be(`argument key must start with '-' but found: '${a}'`,"ARG_CONFIG_NONOPT_KEY");if(a.length===1)throw new be(`argument key must have a name; singular '-' keys are not allowed: ${a}`,"ARG_CONFIG_NONAME_KEY");if(typeof e[a]=="string"){i[a]=e[a];continue}let c=e[a],l=!1;if(Array.isArray(c)&&c.length===1&&typeof c[0]=="function"){let[p]=c;c=u((g,y,b=[])=>(b.push(p(g,y,b[b.length-1])),b),"type"),l=p===Boolean||p[gi]===!0}else if(typeof c=="function")l=c===Boolean||c[gi]===!0;else throw new be(`type missing or not a function or valid array type: ${a}`,"ARG_CONFIG_VAD_TYPE");if(a[1]!=="-"&&a.length>2)throw new be(`short argument keys (with a single hyphen) must have only one character: ${a}`,"ARG_CONFIG_SHORTOPT_TOOLONG");s[a]=[c,l]}for(let a=0,c=t.length;a0){o._=o._.concat(t.slice(a));break}if(l==="--"){o._=o._.concat(t.slice(a+1));break}if(l.length>1&&l[0]==="-"){let p=l[1]==="-"||l.length===2?[l]:l.slice(1).split("").map(g=>`-${g}`);for(let g=0;g1&&t[a+1][0]==="-"&&!(t[a+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(T===Number||typeof BigInt!="undefined"&&T===BigInt))){let P=b===h?"":` (alias for ${h})`;throw new be(`option requires argument: ${b}${P}`,"ARG_MISSING_REQUIRED_LONGARG")}o[h]=T(t[a+1],h,o[h]),++a}else o[h]=T(v,h,o[h])}}else o._.push(l)}return o}u(Cr,"arg");Cr.flag=e=>(e[gi]=!0,e);Cr.COUNT=Cr.flag((e,t,r)=>(r||0)+1);Cr.ArgError=be;Za.exports=Cr});var tu=W((r1,eu)=>{"use strict";d();f();m();eu.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var yi=W((s1,ru)=>{"use strict";d();f();m();var rm=tu();ru.exports=e=>{let t=rm(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ou=W((V1,nu)=>{"use strict";d();f();m();nu.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 Qn=W((z1,iu)=>{"use strict";d();f();m();var im=ou();iu.exports=e=>typeof e=="string"?e.replace(im(),""):e});var Yn=W((ob,su)=>{"use strict";d();f();m();su.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 Qi=W((JS,lc)=>{"use strict";d();f();m();lc.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?r:r+1}return u(e,"_min"),function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s{d();f();m()});var bc=W((LC,es)=>{"use strict";d();f();m();var Kd=Object.prototype.hasOwnProperty,xe="~";function cn(){}u(cn,"_");Object.create&&(cn.prototype=Object.create(null),new cn().__proto__||(xe=!1));function Jd(e,t,r){this.fn=e,this.context=t,this.once=r||!1}u(Jd,"g");function hc(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new Jd(r,n||e,o),s=xe?xe+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}u(hc,"w");function xo(e,t){--e._eventsCount===0?e._events=new cn:delete e._events[t]}u(xo,"y");function me(){this._events=new cn,this._eventsCount=0}u(me,"u");me.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Kd.call(t,r)&&e.push(xe?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};me.prototype.listeners=function(e){var t=xe?xe+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{d();f();m();(function(e,t){typeof require=="function"&&typeof ns=="object"&&typeof os=="object"?os.exports=t():e.pluralize=t()})(ns,function(){var e=[],t=[],r={},n={},o={};function i(b){return typeof b=="string"?new RegExp("^"+b+"$","i"):b}u(i,"sanitizeRule");function s(b,v){return b===v?v:b===b.toLowerCase()?v.toLowerCase():b===b.toUpperCase()?v.toUpperCase():b[0]===b[0].toUpperCase()?v.charAt(0).toUpperCase()+v.substr(1).toLowerCase():v.toLowerCase()}u(s,"restoreCase");function a(b,v){return b.replace(/\$(\d{1,2})/g,function(h,T){return v[T]||""})}u(a,"interpolate");function c(b,v){return b.replace(v[0],function(h,T){var O=a(v[1],arguments);return s(h===""?b[T-1]:h,O)})}u(c,"replace");function l(b,v,h){if(!b.length||r.hasOwnProperty(b))return v;for(var T=h.length;T--;){var O=h[T];if(O[0].test(v))return c(v,O)}return v}u(l,"sanitizeWord");function p(b,v,h){return function(T){var O=T.toLowerCase();return v.hasOwnProperty(O)?s(T,O):b.hasOwnProperty(O)?s(T,b[O]):l(O,T,h)}}u(p,"replaceWord");function g(b,v,h,T){return function(O){var P=O.toLowerCase();return v.hasOwnProperty(P)?!0:b.hasOwnProperty(P)?!1:l(P,P,h)===P}}u(g,"checkWord");function y(b,v,h){var T=v===1?y.singular(b):y.plural(b);return(h?v+" ":"")+T}return u(y,"pluralize"),y.plural=p(o,n,e),y.isPlural=g(o,n,e),y.singular=p(n,o,t),y.isSingular=g(n,o,t),y.addPluralRule=function(b,v){e.push([i(b),v])},y.addSingularRule=function(b,v){t.push([i(b),v])},y.addUncountableRule=function(b){if(typeof b=="string"){r[b.toLowerCase()]=!0;return}y.addPluralRule(b,"$0"),y.addSingularRule(b,"$0")},y.addIrregularRule=function(b,v){v=v.toLowerCase(),b=b.toLowerCase(),o[b]=v,n[v]=b},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(b){return y.addIrregularRule(b[0],b[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(b){return y.addPluralRule(b[0],b[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(b){return y.addSingularRule(b[0],b[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})});var Gc=W((LR,Vc)=>{"use strict";d();f();m();Vc.exports=e=>Object.prototype.toString.call(e)==="[object RegExp]"});var Jc=W((VR,Kc)=>{"use strict";d();f();m();Kc.exports=e=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")}});var zc=W(ss=>{"use strict";d();f();m();Object.defineProperty(ss,"__esModule",{value:!0});ss.default=e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))});var ll=W((PF,Jg)=>{Jg.exports={name:"@prisma/client",version:"4.8.1",description:"Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports MySQL, PostgreSQL, MariaDB, SQLite databases.",keywords:["orm","prisma2","prisma","client","query","database","sql","postgres","postgresql","mysql","sqlite","mariadb","mssql","typescript","query-builder"],main:"index.js",browser:"index-browser.js",types:"index.d.ts",license:"Apache-2.0",engines:{node:">=14.17"},homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/client"},author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true node -r esbuild-register helpers/build.ts",build:"node -r esbuild-register helpers/build.ts",test:"jest --verbose","test:functional":"node -r esbuild-register helpers/functional-test/run-tests.ts","test:memory":"node -r esbuild-register helpers/memory-tests.ts","test:functional:code":"node -r esbuild-register helpers/functional-test/run-tests.ts --no-types","test:functional:types":"node -r esbuild-register helpers/functional-test/run-tests.ts --types-only","test-notypes":"jest --verbose --testPathIgnorePatterns src/__tests__/types/types.test.ts",generate:"node scripts/postinstall.js",postinstall:"node scripts/postinstall.js",prepublishOnly:"pnpm run build","new-test":"NODE_OPTIONS='-r ts-node/register' yo ./helpers/generator-test/index.ts"},files:["README.md","runtime","scripts","generator-build","edge.js","edge.d.ts","index.js","index.d.ts","index-browser.js"],devDependencies:{"@faker-js/faker":"7.6.0","@fast-check/jest":"1.4.0","@jest/globals":"29.3.1","@jest/test-sequencer":"29.3.1","@opentelemetry/api":"1.2.0","@opentelemetry/context-async-hooks":"1.7.0","@opentelemetry/instrumentation":"0.33.0","@opentelemetry/resources":"1.7.0","@opentelemetry/sdk-trace-base":"1.7.0","@opentelemetry/semantic-conventions":"1.7.0","@prisma/debug":"workspace:*","@prisma/engine-core":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/instrumentation":"workspace:*","@prisma/internals":"workspace:*","@prisma/migrate":"workspace:*","@prisma/mini-proxy":"0.3.0","@swc-node/register":"1.5.4","@swc/core":"1.3.14","@swc/jest":"0.2.23","@timsuchanek/copy":"1.4.5","@types/debug":"4.1.7","@types/fs-extra":"9.0.13","@types/jest":"29.2.4","@types/js-levenshtein":"1.1.1","@types/mssql":"8.1.1","@types/node":"14.18.34","@types/pg":"8.6.5","@types/yeoman-generator":"5.2.11",arg:"5.0.2",benchmark:"2.1.4",chalk:"4.1.2",cuid:"2.1.8","decimal.js":"10.4.2",esbuild:"0.15.13",execa:"5.1.1","expect-type":"0.15.0","flat-map-polyfill":"0.3.8","fs-extra":"11.1.0","fs-monkey":"1.0.3","get-own-enumerable-property-symbols":"3.0.2",globby:"11.1.0","indent-string":"4.0.0","is-obj":"2.0.0","is-regexp":"2.1.0",jest:"29.3.1","jest-junit":"15.0.0","jest-snapshot":"29.3.1","js-levenshtein":"1.1.6",klona:"2.0.5","lz-string":"1.4.4","make-dir":"3.1.0",mariadb:"3.0.2",memfs:"3.4.10",mssql:"9.0.1","node-fetch":"2.6.7",pg:"8.8.0","pkg-up":"3.1.0",pluralize:"8.0.0","replace-string":"3.1.0",resolve:"1.22.1",rimraf:"3.0.2","simple-statistics":"7.8.0","sort-keys":"4.2.0","source-map-support":"0.5.21","sql-template-tag":"5.0.3","stacktrace-parser":"0.1.10","strip-ansi":"6.0.1","strip-indent":"3.0.0","ts-jest":"29.0.3","ts-node":"10.9.1","ts-pattern":"4.0.5",tsd:"0.21.0",typescript:"4.8.4","yeoman-generator":"5.7.0",yo:"4.3.1"},peerDependencies:{prisma:"*"},peerDependenciesMeta:{prisma:{optional:!0}},dependencies:{"@prisma/engines-version":"4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe"},sideEffects:!1}});var xy={};Tn(xy,{DMMF:()=>We,DMMFClass:()=>st,Debug:()=>mi,Decimal:()=>Le,Engine:()=>dt,Extensions:()=>Ko,MetricsClient:()=>jt,NotFoundError:()=>De,PrismaClientExtensionError:()=>nt,PrismaClientInitializationError:()=>Pe,PrismaClientKnownRequestError:()=>le,PrismaClientRustPanicError:()=>He,PrismaClientUnknownRequestError:()=>Me,PrismaClientValidationError:()=>ye,Sql:()=>ce,Types:()=>Jo,decompressFromBase64:()=>wy,empty:()=>xc,findSync:()=>void 0,getPrismaClient:()=>ql,join:()=>wc,makeDocument:()=>So,makeStrictEnum:()=>Ul,objectEnumValues:()=>yo,raw:()=>ts,sqltag:()=>rs,transformDocument:()=>gs,unpack:()=>Co,warnEnvConflicts:()=>void 0});module.exports=ip(xy);d();f();m();var Vl=X(Ws());var Ko={};Tn(Ko,{defineExtension:()=>Qs,getExtensionContext:()=>Ys});d();f();m();d();f();m();function Qs(e){return typeof e=="function"?e:t=>t.$extends(e)}u(Qs,"defineExtension");d();f();m();function Ys(e){return e}u(Ys,"getExtensionContext");var Jo={};Tn(Jo,{Extensions:()=>Zs,Utils:()=>Xs});d();f();m();var Zs={};d();f();m();var Xs={};d();f();m();d();f();m();d();f();m();d();f();m();var Wn=X(Ga());var Zf=100,Hn=[],Ka,Ja;typeof w!="undefined"&&typeof((Ka=w.stderr)==null?void 0:Ka.write)!="function"&&(Wn.default.log=(Ja=console.debug)!=null?Ja:console.log);function Xf(e){let t=(0,Wn.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&Hn.push([e,...n]),Hn.length>Zf&&Hn.shift(),t("",...n)),t);return r}u(Xf,"debugCall");var mi=Object.assign(Xf,Wn.default);function za(){Hn.length=0}u(za,"clearLogs");var Je=mi;d();f();m();var Ya="library";function di(e){let t=tm();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Ya)}u(di,"getClientEngineType");function tm(){let e=w.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u(tm,"getEngineTypeFromEnvVar");d();f();m();var nm=X(Xa()),om=X(yi());function Rr(e){return e instanceof Error}u(Rr,"isError");d();f();m();d();f();m();d();f();m();var dt=class{};u(dt,"Engine");d();f();m();var Pe=class extends Error{constructor(r,n,o){super(r);this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(Pe)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};u(Pe,"PrismaClientInitializationError");d();f();m();var le=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.code=n,this.clientVersion=o,this.meta=i,this.batchRequestIdx=s}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};u(le,"PrismaClientKnownRequestError");d();f();m();var He=class extends Error{constructor(r,n){super(r);this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};u(He,"PrismaClientRustPanicError");d();f();m();var Me=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.clientVersion=n,this.batchRequestIdx=o}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};u(Me,"PrismaClientUnknownRequestError");d();f();m();function hi({error:e,user_facing_error:t},r){return t.error_code?new le(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Me(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}u(hi,"prismaGraphQLToJSError");d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();var au=typeof globalThis=="object"?globalThis:global;d();f();m();var gt="1.2.0";d();f();m();var uu=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function sm(e){var t=new Set([e]),r=new Set,n=e.match(uu);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return u(function(c){return c===e},"isExactmatch");function i(a){return r.add(a),!1}u(i,"_reject");function s(a){return t.add(a),!0}return u(s,"_accept"),u(function(c){if(t.has(c))return!0;if(r.has(c))return!1;var l=c.match(uu);if(!l)return i(c);var p={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return p.prerelease!=null||o.major!==p.major?i(c):o.major===0?o.minor===p.minor&&o.patch<=p.patch?s(c):i(c):o.minor<=p.minor?s(c):i(c)},"isCompatible")}u(sm,"_makeCompatibilityCheck");var cu=sm(gt);var am=gt.split(".")[0],Ir=Symbol.for("opentelemetry.js.api."+am),_r=au;function yt(e,t,r,n){var o;n===void 0&&(n=!1);var i=_r[Ir]=(o=_r[Ir])!==null&&o!==void 0?o:{version:gt};if(!n&&i[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(s.stack||s.message),!1}if(i.version!==gt){var s=new Error("@opentelemetry/api: All API registration versions must match");return r.error(s.stack||s.message),!1}return i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+gt+"."),!0}u(yt,"registerGlobal");function Ne(e){var t,r,n=(t=_r[Ir])===null||t===void 0?void 0:t.version;if(!(!n||!cu(n)))return(r=_r[Ir])===null||r===void 0?void 0:r[e]}u(Ne,"getGlobal");function ht(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+gt+".");var r=_r[Ir];r&&delete r[e]}u(ht,"unregisterGlobal");var lu=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return u(e,"DiagComponentLogger"),e.prototype.debug=function(){for(var t=[],r=0;rve.ALL&&(e=ve.ALL),t=t||{};function r(n,o){var i=t[n];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return u(r,"_filterFunc"),{error:r("error",ve.ERROR),warn:r("warn",ve.WARN),info:r("info",ve.INFO),debug:r("debug",ve.DEBUG),verbose:r("verbose",ve.VERBOSE)}}u(pu,"createLogLevelDiagLogger");var um="diag",Oe=function(){function e(){function t(n){return function(){for(var o=[],i=0;i";c.warn("Current logger will be overwritten from "+p),l.warn("Current logger will overwrite one already registered from "+p)}return yt("diag",l,r,!0)},r.disable=function(){ht(um,r)},r.createComponentLogger=function(n){return new lu(n)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return u(e,"DiagAPI"),e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();d();f();m();var fu=function(){function e(t){this._entries=t?new Map(t):new Map}return u(e,"BaggageImpl"),e.prototype.getEntry=function(t){var r=this._entries.get(t);if(!!r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=t[0],n=t[1];return[r,n]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t=[],r=0;rAm||(this._internalState=t.split(Fu).reverse().reduce(function(r,n){var o=n.trim(),i=o.indexOf(Du);if(i!==-1){var s=o.slice(0,i),a=o.slice(i+1,n.length);Ru(s)&&Iu(a)&&r.set(s,a)}return r},new Map),this._internalState.size>_u&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,_u))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();d();f();m();d();f();m();d();f();m();d();f();m();d();f();m();var Ai="trace",ku=function(){function e(){this._proxyTracerProvider=new vi,this.wrapSpanContext=Tu,this.isSpanContextValid=kr,this.deleteSpan=wu,this.getSpan=ro,this.getActiveSpan=bu,this.getSpanContext=no,this.setSpan=Dr,this.setSpanContext=xu}return u(e,"TraceAPI"),e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=yt(Ai,this._proxyTracerProvider,Oe.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return Ne(Ai)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){ht(Ai,Oe.instance()),this._proxyTracerProvider=new vi},e}();d();f();m();d();f();m();var Nu=function(){function e(){}return u(e,"NoopTextMapPropagator"),e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}();d();f();m();var Pi=Zn("OpenTelemetry Baggage Key");function ju(e){return e.getValue(Pi)||void 0}u(ju,"getBaggage");function $u(e,t){return e.setValue(Pi,t)}u($u,"setBaggage");function Lu(e){return e.deleteValue(Pi)}u(Lu,"deleteBaggage");var Mi="propagation",Mm=new Nu,Bu=function(){function e(){this.createBaggage=mu,this.getBaggage=ju,this.setBaggage=$u,this.deleteBaggage=Lu}return u(e,"PropagationAPI"),e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return yt(Mi,t,Oe.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=gu),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=du),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){ht(Mi,Oe.instance())},e.prototype._getGlobalPropagator=function(){return Ne(Mi)||Mm},e}();var wt=rr.getInstance(),io=ku.getInstance(),h2=Bu.getInstance(),w2=Oe.instance();d();f();m();function nr({context:e,tracingConfig:t}){let r=io.getSpanContext(e!=null?e:wt.active());return(t==null?void 0:t.enabled)&&r?`00-${r.traceId}-${r.spanId}-0${r.traceFlags}`:"00-10-10-00"}u(nr,"getTraceParent");d();f();m();function Oi(e){let t=e.includes("tracing");return{get enabled(){return Boolean(globalThis.PRISMA_INSTRUMENTATION&&t)},get middleware(){return Boolean(globalThis.PRISMA_INSTRUMENTATION&&globalThis.PRISMA_INSTRUMENTATION.middleware)}}}u(Oi,"getTracingConfig");d();f();m();async function or(e,t){var o;if(e.enabled===!1)return t();let r=io.getTracer("prisma"),n=(o=e.context)!=null?o:wt.active();if(e.active===!1){let i=r.startSpan(`prisma:client:${e.name}`,e,n);try{return await t(i,n)}finally{i.end()}}return r.startActiveSpan(`prisma:client:${e.name}`,e,n,async i=>{try{return await t(i,wt.active())}finally{i.end()}})}u(or,"runInChildSpan");d();f();m();function Nr(e){return typeof e.batchRequestIdx=="number"}u(Nr,"hasBatchIndex");d();f();m();d();f();m();d();f();m();var jr=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};u(jr,"PrismaClientError");var we=class extends jr{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};u(we,"DataProxyError");d();f();m();d();f();m();function Q(e,t){return{...e,isRetryable:t}}u(Q,"setRetryable");var ir=class extends we{constructor(r){super("This request must be retried",Q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};u(ir,"ForcedRetryError");d();f();m();var tt=class extends we{constructor(r,n){super(r,Q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};u(tt,"InvalidDatasourceError");d();f();m();var rt=class extends we{constructor(r,n){super(r,Q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};u(rt,"NotImplementedYetError");d();f();m();d();f();m();var Y=class extends we{constructor(r,n){var i;super(r,n);this.response=n.response;let o=(i=this.response.headers)==null?void 0:i["Prisma-Request-Id"];if(o){let s=`(The request id was: ${o})`;this.message=this.message+" "+s}}};u(Y,"DataProxyAPIError");var kt=class extends Y{constructor(r){super("Schema needs to be uploaded",Q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};u(kt,"SchemaMissingError");d();f();m();d();f();m();var Si="This request could not be understood by the server",$r=class extends Y{constructor(r,n,o){super(n||Si,Q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};u($r,"BadRequestError");d();f();m();var Lr=class extends Y{constructor(r,n){super("Engine not started: healthcheck timeout",Q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};u(Lr,"HealthcheckTimeoutError");d();f();m();var Br=class extends Y{constructor(r,n,o){super(n,Q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};u(Br,"EngineStartupError");d();f();m();var qr=class extends Y{constructor(r){super("Engine version is not supported",Q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};u(qr,"EngineVersionNotSupportedError");d();f();m();var Ci="Request timed out",Ur=class extends Y{constructor(r,n=Ci){super(n,Q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};u(Ur,"GatewayTimeoutError");d();f();m();var Om="Interactive transaction error",Vr=class extends Y{constructor(r,n=Om){super(n,Q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};u(Vr,"InteractiveTransactionError");d();f();m();var Sm="Request parameters are invalid",Gr=class extends Y{constructor(r,n=Sm){super(n,Q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};u(Gr,"InvalidRequestError");d();f();m();var Ri="Requested resource does not exist",Kr=class extends Y{constructor(r,n=Ri){super(n,Q(r,!1));this.name="NotFoundError";this.code="P5003"}};u(Kr,"NotFoundError");d();f();m();var Ii="Unknown server error",sr=class extends Y{constructor(r,n,o){super(n||Ii,Q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};u(sr,"ServerError");d();f();m();var _i="Unauthorized, check your connection string",Jr=class extends Y{constructor(r,n=_i){super(n,Q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};u(Jr,"UnauthorizedError");d();f();m();var Fi="Usage exceeded, retry again later",zr=class extends Y{constructor(r,n=Fi){super(n,Q(r,!0));this.name="UsageExceededError";this.code="P5008"}};u(zr,"UsageExceededError");async function Cm(e){let t;try{t=await e.text()}catch(r){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(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}u(Cm,"getResponseErrorBody");async function Hr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Cm(e);if(n.type==="QueryEngineError")throw new le(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new sr(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new kt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new qr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Br(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Pe(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Lr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Vr(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Gr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Jr(r,ar(_i,n));if(e.status===404)return new Kr(r,ar(Ri,n));if(e.status===429)throw new zr(r,ar(Fi,n));if(e.status===504)throw new Ur(r,ar(Ci,n));if(e.status>=500)throw new sr(r,ar(Ii,n));if(e.status>=400)throw new $r(r,ar(Si,n))}u(Hr,"responseToError");function ar(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}u(ar,"buildErrorMessage");d();f();m();function qu(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}u(qu,"backOff");d();f();m();var Uu={"@prisma/debug":"workspace:*","@prisma/engines-version":"4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.14","@swc/jest":"0.2.23","@types/jest":"29.2.4","@types/node":"16.18.9",execa:"5.1.1",jest:"29.3.1",typescript:"4.8.4"};d();f();m();d();f();m();var Wr=class extends we{constructor(r,n){super(`Cannot fetch data from service: -${r}`,Q(n,!0));this.name="RequestError";this.code="P5010"}};u(Wr,"RequestError");d();f();m();function Vu(){return typeof self=="undefined"?"node":"browser"}u(Vu,"getJSRuntimeName");async function Nt(e,t){var o;let r=t.clientVersion,n=Vu();try{return n==="browser"?await fetch(e,t):await Di(e,t)}catch(i){let s=(o=i.message)!=null?o:"Unknown error";throw new Wr(s,{clientVersion:r})}}u(Nt,"request");function Im(e){return{...e.headers,"Content-Type":"application/json"}}u(Im,"buildHeaders");function _m(e){return{method:e.method,headers:Im(e)}}u(_m,"buildOptions");function Fm(e,t){return{text:()=>x.Buffer.concat(e).toString(),json:()=>JSON.parse(x.Buffer.concat(e).toString()),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:t.headers}}u(Fm,"buildResponse");async function Di(e,t={}){let r=Dm("https"),n=_m(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let c=r.request(e,n,p=>{let{statusCode:g,headers:{location:y}}=p;g>=301&&g<=399&&y&&(y.startsWith("http")===!1?s(Di(`${i}${y}`,t)):s(Di(y,t))),p.on("data",b=>o.push(b)),p.on("end",()=>s(Fm(o,p))),p.on("error",a)});c.on("error",a),c.end((l=t.body)!=null?l:"")})}u(Di,"nodeFetch");var Dm=typeof require!="undefined"?require:()=>{};var km=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Gu=Je("prisma:client:dataproxyEngine");async function Nm(e){var i,s,a;let t=Uu["@prisma/engines-version"],r=(i=e.clientVersion)!=null?i:"unknown";if(w.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return w.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;let[n,o]=(s=r==null?void 0:r.split("-"))!=null?s:[];if(o===void 0&&km.test(n))return n;if(o!==void 0||r==="0.0.0"){let[c]=(a=t.split("-"))!=null?a:[],[l,p,g]=c.split("."),y=jm(`<=${l}.${p}.${g}`),b=await Nt(y,{clientVersion:r});if(!b.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${b.status} ${b.statusText}, response body: ${await b.text()||""}`);let v=await b.text();Gu("length of body fetched from unpkg.com",v.length);let h;try{h=JSON.parse(v)}catch(T){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),T}return h.version}throw new rt("Only `major.minor.patch` versions are supported by Prisma Data Proxy.",{clientVersion:r})}u(Nm,"_getClientVersion");async function Ku(e){let t=await Nm(e);return Gu("version",t),t}u(Ku,"getClientVersion");function jm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}u(jm,"prismaPkgURL");var Ju=10,$m=Promise.resolve(),ki=Je("prisma:client:dataproxyEngine"),ur=class extends dt{constructor(r){var i,s,a,c;super();this.config=r,this.env={...this.config.env,...w.env},this.inlineSchema=(i=r.inlineSchema)!=null?i:"",this.inlineDatasources=(s=r.inlineDatasources)!=null?s:{},this.inlineSchemaHash=(a=r.inlineSchemaHash)!=null?a:"",this.clientVersion=(c=r.clientVersion)!=null?c:"unknown",this.logEmitter=r.logEmitter;let[n,o]=this.extractHostAndApiKey();this.remoteClientVersion=$m.then(()=>Ku(this.config)),this.headers={Authorization:`Bearer ${o}`},this.host=n,ki("host",this.host)}version(){return"unknown"}async start(){}async stop(){}on(r,n){if(r==="beforeExit")throw new rt("beforeExit event is not yet supported",{clientVersion:this.clientVersion});this.logEmitter.on(r,n)}async url(r){return`https://${this.host}/${await this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async getConfig(){return Promise.resolve({datasources:[{activeProvider:this.config.activeProvider}]})}getDmmf(){throw new rt("getDmmf is not yet supported",{clientVersion:this.clientVersion})}async uploadSchema(){let r=await Nt(await this.url("schema"),{method:"PUT",headers:this.headers,body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||ki("schema response status",r.status);let n=await Hr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})}request({query:r,headers:n={},transaction:o}){return this.logEmitter.emit("query",{query:r}),this.requestInternal({query:r,variables:{}},n,o)}async requestBatch({queries:r,headers:n={},transaction:o}){let i=Boolean(o);this.logEmitter.emit("query",{query:`Batch${i?" in transaction":""} (${r.length}): -${r.join(` -`)}`});let s={batch:r.map(l=>({query:l,variables:{}})),transaction:i,isolationLevel:o==null?void 0:o.isolationLevel},{batchResult:a,elapsed:c}=await this.requestInternal(s,n);return a.map(l=>"errors"in l&&l.errors.length>0?hi(l.errors[0],this.clientVersion):{data:l,elapsed:c})}requestInternal(r,n,o){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=o?`${o.payload.endpoint}/graphql`:await this.url("graphql");i(s);let a=await Nt(s,{method:"POST",headers:{...Ni(n),...this.headers},body:JSON.stringify(r),clientVersion:this.clientVersion});a.ok||ki("graphql response status",a.status);let c=await Hr(a,this.clientVersion);await this.handleError(c);let l=await a.json();if(l.errors)throw l.errors.length===1?hi(l.errors[0],this.config.clientVersion):new Me(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,c;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(c=o==null?void 0:o.timeout)!=null?c:5e3,isolation_level:o==null?void 0:o.isolationLevel}),p=await this.url("transaction/start");s(p);let g=await Nt(p,{method:"POST",headers:{...Ni(n),...this.headers},body:l,clientVersion:this.clientVersion}),y=await Hr(g,this.clientVersion);await this.handleError(y);let b=await g.json(),v=b.id,h=b["data-proxy"].endpoint;return{id:v,payload:{endpoint:h}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let p=await Nt(l,{method:"POST",headers:{...Ni(n),...this.headers},clientVersion:this.clientVersion}),g=await Hr(p,this.clientVersion);await this.handleError(g);return}}})}extractHostAndApiKey(){let r=this.mergeOverriddenDatasources(),n=Object.keys(r)[0],o=r[n],i=this.resolveDatasourceURL(n,o),s;try{s=new URL(i)}catch(g){throw new tt("Could not parse URL of the datasource",{clientVersion:this.clientVersion})}let{protocol:a,host:c,searchParams:l}=s;if(a!=="prisma:")throw new tt("Datasource URL must use prisma:// protocol when --data-proxy is used",{clientVersion:this.clientVersion});let p=l.get("api_key");if(p===null||p.length<1)throw new tt("No valid API key found in the datasource URL",{clientVersion:this.clientVersion});return[c,p]}mergeOverriddenDatasources(){if(this.config.datasources===void 0)return this.inlineDatasources;let r={...this.inlineDatasources};for(let n of this.config.datasources){if(!this.inlineDatasources[n.name])throw new Error(`Unknown datasource: ${n.name}`);r[n.name]={url:{fromEnvVar:null,value:n.url}}}return r}resolveDatasourceURL(r,n){if(n.url.value)return n.url.value;if(n.url.fromEnvVar){let o=n.url.fromEnvVar,i=this.env[o];if(i===void 0)throw new tt(`Datasource "${r}" references an environment variable "${o}" that is not set`,{clientVersion:this.clientVersion});return i}throw new tt(`Datasource "${r}" specification is invalid: both value and fromEnvVar are null`,{clientVersion:this.clientVersion})}metrics(r){throw new rt("Metric are not yet supported for Data Proxy",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=u(s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})},"logHttpCall");try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof we)||!s.isRetryable)throw s;if(o>=Ju)throw s instanceof ir?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${Ju} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await qu(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof kt)throw await this.uploadSchema(),new ir({clientVersion:this.clientVersion,cause:r});if(r)throw r}};u(ur,"DataProxyEngine");function Ni(e){if(e.transactionId){let t={...e};return delete t.transactionId,t}return e}u(Ni,"runtimeHeadersToHttpHeaders");d();f();m();var We;(t=>{let e;(M=>(M.findUnique="findUnique",M.findUniqueOrThrow="findUniqueOrThrow",M.findFirst="findFirst",M.findFirstOrThrow="findFirstOrThrow",M.findMany="findMany",M.create="create",M.createMany="createMany",M.update="update",M.updateMany="updateMany",M.upsert="upsert",M.delete="delete",M.deleteMany="deleteMany",M.groupBy="groupBy",M.count="count",M.aggregate="aggregate",M.findRaw="findRaw",M.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(We||(We={}));var cr={};Tn(cr,{error:()=>qm,info:()=>Bm,log:()=>Lm,query:()=>Um,should:()=>zu,tags:()=>Yr,warn:()=>ji});d();f();m();var Qr=X(It());var Yr={error:Qr.default.red("prisma:error"),warn:Qr.default.yellow("prisma:warn"),info:Qr.default.cyan("prisma:info"),query:Qr.default.blue("prisma:query")},zu={warn:()=>!w.env.PRISMA_DISABLE_WARNINGS};function Lm(...e){console.log(...e)}u(Lm,"log");function ji(e,...t){zu.warn()&&console.warn(`${Yr.warn} ${e}`,...t)}u(ji,"warn");function Bm(e,...t){console.info(`${Yr.info} ${e}`,...t)}u(Bm,"info");function qm(e,...t){console.error(`${Yr.error} ${e}`,...t)}u(qm,"error");function Um(e,...t){console.log(`${Yr.query} ${e}`,...t)}u(Um,"query");d();f();m();function $i(e){let t;return(...r)=>t!=null?t:t=e(...r)}u($i,"callOnce");d();f();m();function Li(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u(Li,"hasOwnProperty");d();f();m();function Bi(e){return e!=null&&typeof e.then=="function"}u(Bi,"isPromiseLike");d();f();m();var qi=u((e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{}),"keyBy");d();f();m();function lr(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}u(lr,"mapObjectValues");d();f();m();var Hu=new Set,Ui=u((e,t,...r)=>{Hu.has(e)||(Hu.add(e),ji(t,...r))},"warnOnce");var nt=class extends Error{constructor(r,n){super(`${Gm(r)}: ${Km(n)}`,{cause:n});this.extensionName=r;this.name="PrismaClientExtensionError",this.cause||(this.cause=n),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,nt)}get[Symbol.toStringTag](){return"PrismaClientExtensionError"}};u(nt,"PrismaClientExtensionError");function Gm(e){return e?`Error caused by extension "${e}"`:"Error caused by an extension"}u(Gm,"getTitleFromExtensionName");function Km(e){return e instanceof Error?e.message:`${e}`}u(Km,"getMessageFromCause");function Zr(e,t){return function(...r){try{let n=t.apply(this,r);return Bi(n)?n.then(void 0,o=>Promise.reject(new nt(e,o))):n}catch(n){throw new nt(e,n)}}}u(Zr,"wrapExtensionCallback");function so(e,t){return t&&lr(t,r=>typeof r=="function"?Zr(e,r):r)}u(so,"wrapAllExtensionCallbacks");d();f();m();var jt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u(jt,"MetricsClient");d();f();m();d();f();m();function Vi(e,t){var r;for(let n of t)for(let o of Object.getOwnPropertyNames(n.prototype))Object.defineProperty(e.prototype,o,(r=Object.getOwnPropertyDescriptor(n.prototype,o))!=null?r:Object.create(null))}u(Vi,"applyMixins");d();f();m();var At=X(It());d();f();m();var pr=9e15,Tt=1e9,Gi="0123456789abcdef",uo="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",co="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ki={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-pr,maxE:pr,crypto:!1},Xu,ot,B=!0,po="[DecimalError] ",vt=po+"Invalid argument: ",ec=po+"Precision limit exceeded",tc=po+"crypto unavailable",rc="[object Decimal]",pe=Math.floor,ne=Math.pow,Jm=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,zm=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Hm=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,nc=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$e=1e7,$=7,Wm=9007199254740991,Qm=uo.length-1,Ji=co.length-1,R={toStringTag:rc};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),N(e)};R.ceil=function(){return N(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(vt+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};R.comparedTo=R.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,c=i.s,l=e.s;if(!s||!a)return!c||!l?NaN:c!==l?c:s===a?0:!s^c<0?1:-1;if(!s[0]||!a[0])return s[0]?c:a[0]?-l:0;if(c!==l)return c;if(i.e!==e.e)return i.e>e.e^c<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^c<0?1:-1;return n===o?0:n>o^c<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())+$,n.rounding=1,r=Ym(n,uc(n,r)),n.precision=e,n.rounding=t,N(ot==2||ot==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,o,i,s,a,c,l,p=this,g=p.constructor;if(!p.isFinite()||p.isZero())return new g(p);for(B=!1,i=p.s*ne(p.s*p,1/3),!i||Math.abs(i)==1/0?(r=ue(p.d),e=p.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=ne(r,1/3),e=pe((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new g(r),n.s=p.s):n=new g(i.toString()),s=(e=g.precision)+3;;)if(a=n,c=a.times(a).times(a),l=c.plus(p),n=Z(l.plus(p).times(a),l.plus(c),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(N(a,e+1,0),a.times(a).times(a).eq(p))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(N(n,e+1,1),t=!n.times(n).times(n).eq(p));break}return B=!0,N(n,e,g.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-pe(this.e/$))*$,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return Z(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return N(Z(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 N(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,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/mo(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=fr(s,1,i.times(t),new s(1),!0);for(var c,l=e,p=new s(8);l--;)c=i.times(i),i=a.minus(c.times(p.minus(c.times(p))));return N(i,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=fr(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/mo(5,e)),o=fr(i,2,o,o,!0);for(var s,a=new i(5),c=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(c.times(s).plus(l))))}return i.precision=t,i.rounding=r,N(o,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,Z(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),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?je(r,o,i):new r(0):new r(NaN):t.isZero()?je(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=je(r,o+4,i).times(.5),r.precision=o,r.rounding=i,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,B=!1,r=r.times(r).minus(1).sqrt().plus(r),B=!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,B=!1,r=r.times(r).plus(1).sqrt().plus(r),B=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?N(new i(o),e,t,!0):(i.precision=r=n-o.e,o=Z(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=je(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,o,i,s,a,c,l=this,p=l.constructor,g=p.precision,y=p.rounding;if(l.isFinite()){if(l.isZero())return new p(l);if(l.abs().eq(1)&&g+4<=Ji)return s=je(p,g+4,y).times(.25),s.s=l.s,s}else{if(!l.s)return new p(NaN);if(g+4<=Ji)return s=je(p,g+4,y).times(.5),s.s=l.s,s}for(p.precision=a=g+10,p.rounding=1,r=Math.min(28,a/$+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(B=!1,t=Math.ceil(a/$),n=1,c=l.times(l),s=new p(l),o=l;e!==-1;)if(o=o.times(c),i=s.minus(o.div(n+=2)),o=o.times(c),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.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,o,i,s,a,c,l=this,p=l.constructor,g=p.precision,y=p.rounding,b=5;if(e==null)e=new p(10),t=!0;else{if(e=new p(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new p(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new p(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(B=!1,a=g+b,s=Et(l,a),n=t?lo(p,a+10):Et(e,a),c=Z(s,n,a,1),Xr(c.d,o=g,y))do if(a+=10,s=Et(l,a),n=t?lo(p,a+10):Et(e,a),c=Z(s,n,a,1),!i){+ue(c.d).slice(o+1,o+15)+1==1e14&&(c=N(c,g+1,0));break}while(Xr(c.d,o+=10,y));return B=!0,N(c,g,y)};R.minus=R.sub=function(e){var t,r,n,o,i,s,a,c,l,p,g,y,b=this,v=b.constructor;if(e=new v(e),!b.d||!e.d)return!b.s||!e.s?e=new v(NaN):b.d?e.s=-e.s:e=new v(e.d||b.s!==e.s?b:NaN),e;if(b.s!=e.s)return e.s=-e.s,b.plus(e);if(l=b.d,y=e.d,a=v.precision,c=v.rounding,!l[0]||!y[0]){if(y[0])e.s=-e.s;else if(l[0])e=new v(b);else return new v(c===3?-0:0);return B?N(e,a,c):e}if(r=pe(e.e/$),p=pe(b.e/$),l=l.slice(),i=p-r,i){for(g=i<0,g?(t=l,i=-i,s=y.length):(t=y,r=p,s=l.length),n=Math.max(Math.ceil(a/$),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=y.length,g=n0;--n)l[s++]=0;for(n=y.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=p.length,s-o<0&&(o=s,r=p,p=l,l=r),t=0;o;)t=(l[--o]=l[o]+p[o]+t)/$e|0,l[o]%=$e;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=fo(l,n),B?N(e,a,c):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(vt+e);return r.d?(t=oc(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return N(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())+$,n.rounding=1,r=Xm(n,uc(n,r)),n.precision=e,n.rounding=t,N(ot>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,c=s.e,l=s.s,p=s.constructor;if(l!==1||!a||!a[0])return new p(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(B=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=pe((c+1)/2)-(c<0||c%2),l==1/0?t="5e"+c:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),n=new p(t)):n=new p(l.toString()),r=(c=p.precision)+3;;)if(i=n,n=i.plus(Z(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(N(i,c+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(N(n,c+1,1),e=!n.times(n).eq(s));break}return B=!0,N(n,c,p.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=Z(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,N(ot==2||ot==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,o,i,s,a,c,l,p=this,g=p.constructor,y=p.d,b=(e=new g(e)).d;if(e.s*=p.s,!y||!y[0]||!b||!b[0])return new g(!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?NaN:!y||!b?e.s/0:e.s*0);for(r=pe(p.e/$)+pe(e.e/$),c=y.length,l=b.length,c=0;){for(t=0,o=c+n;o>n;)a=i[o]+b[n]*y[o-n-1]+t,i[o--]=a%$e|0,t=a/$e|0;i[o]=(i[o]+t)%$e|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=fo(i,r),B?N(e,g.precision,g.rounding):e};R.toBinary=function(e,t){return Wi(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:(Te(e,0,Tt),t===void 0?t=n.rounding:Te(t,0,8),N(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Qe(n,!0):(Te(e,0,Tt),t===void 0?t=o.rounding:Te(t,0,8),n=N(new o(n),e+1,t),r=Qe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=Qe(o):(Te(e,0,Tt),t===void 0?t=i.rounding:Te(t,0,8),n=N(new i(o),e+o.e+1,t),r=Qe(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,o,i,s,a,c,l,p,g,y,b=this,v=b.d,h=b.constructor;if(!v)return new h(b);if(l=r=new h(1),n=c=new h(0),t=new h(n),i=t.e=oc(v)-b.e-1,s=i%$,t.d[0]=ne(10,s<0?$+s:s),e==null)e=i>0?t:l;else{if(a=new h(e),!a.isInt()||a.lt(l))throw Error(vt+a);e=a.gt(t)?i>0?t:l:a}for(B=!1,a=new h(ue(v)),p=h.precision,h.precision=i=v.length*$*2;g=Z(a,t,0,1,1),o=r.plus(g.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=c.plus(g.times(o)),c=o,o=t,t=a.minus(g.times(o)),a=o;return o=Z(e.minus(r),n,0,1,1),c=c.plus(o.times(l)),r=r.plus(o.times(n)),c.s=l.s=b.s,y=Z(l,n,i,1).minus(b).abs().cmp(Z(c,r,i,1).minus(b).abs())<1?[l,n]:[c,r],h.precision=p,B=!0,y};R.toHexadecimal=R.toHex=function(e,t){return Wi(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:Te(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=Z(r,e,0,t,1).times(e),B=!0,N(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Wi(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,o,i,s,a=this,c=a.constructor,l=+(e=new c(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new c(ne(+a,l));if(a=new c(a),a.eq(1))return a;if(n=c.precision,i=c.rounding,e.eq(1))return N(a,n,i);if(t=pe(e.e/$),t>=e.d.length-1&&(r=l<0?-l:l)<=Wm)return o=ic(c,a,r,n),e.s<0?new c(1).div(o):N(o,n,i);if(s=a.s,s<0){if(tc.maxE+1||t0?s/0:0):(B=!1,c.rounding=a.s=1,r=Math.min(12,(t+"").length),o=zi(e.times(Et(a,n+r)),n),o.d&&(o=N(o,n+5,1),Xr(o.d,n,i)&&(t=n+10,o=N(zi(e.times(Et(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=N(o,n+1,0)))),o.s=s,B=!0,c.rounding=i,N(o,n,i))};R.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Qe(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(Te(e,1,Tt),t===void 0?t=o.rounding:Te(t,0,8),n=N(new o(n),e,t),r=Qe(n,e<=n.e||n.e<=o.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):(Te(e,1,Tt),t===void 0?t=n.rounding:Te(t,0,8)),N(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=Qe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return N(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=Qe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(vt+e)}u(Te,"checkInt32");function Xr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=$,o=0):(o=Math.ceil((t+1)/$),t%=$),i=ne(10,$-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==ne(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==ne(10,t-3)-1,s}u(Xr,"checkRoundingDigits");function ao(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}u(ao,"convertBase");function Ym(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/mo(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=fr(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}u(Ym,"cosine");var Z=function(){function e(n,o,i){var s,a=0,c=n.length;for(n=n.slice();c--;)s=n[c]*o+a,n[c]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}u(e,"multiplyInteger");function t(n,o,i,s){var a,c;if(i!=s)c=i>s?1:-1;else for(a=c=0;ao[a]?1:-1;break}return c}u(t,"compare");function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return u(r,"subtract"),function(n,o,i,s,a,c){var l,p,g,y,b,v,h,T,O,P,M,A,S,_,F,j,V,te,G,K,ee=n.constructor,z=n.s==o.s?1:-1,H=n.d,L=o.d;if(!H||!H[0]||!L||!L[0])return new ee(!n.s||!o.s||(H?L&&H[0]==L[0]:!L)?NaN:H&&H[0]==0||!L?z*0:z/0);for(c?(b=1,p=n.e-o.e):(c=$e,b=$,p=pe(n.e/b)-pe(o.e/b)),G=L.length,V=H.length,O=new ee(z),P=O.d=[],g=0;L[g]==(H[g]||0);g++);if(L[g]>(H[g]||0)&&p--,i==null?(_=i=ee.precision,s=ee.rounding):a?_=i+(n.e-o.e)+1:_=i,_<0)P.push(1),v=!0;else{if(_=_/b+2|0,g=0,G==1){for(y=0,L=L[0],_++;(g1&&(L=e(L,y,c),H=e(H,y,c),G=L.length,V=H.length),j=G,M=H.slice(0,G),A=M.length;A=c/2&&++te;do y=0,l=t(L,M,G,A),l<0?(S=M[0],G!=A&&(S=S*c+(M[1]||0)),y=S/te|0,y>1?(y>=c&&(y=c-1),h=e(L,y,c),T=h.length,A=M.length,l=t(h,M,T,A),l==1&&(y--,r(h,G=10;y/=10)g++;O.e=g+p*b-1,N(O,a?i+O.e+1:i,s,v)}return O}}();function N(e,t,r,n){var o,i,s,a,c,l,p,g,y,b=e.constructor;e:if(t!=null){if(g=e.d,!g)return e;for(o=1,a=g[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=$,s=t,p=g[y=0],c=p/ne(10,o-s-1)%10|0;else if(y=Math.ceil((i+1)/$),a=g.length,y>=a)if(n){for(;a++<=y;)g.push(0);p=c=0,o=1,i%=$,s=i-$+1}else break e;else{for(p=a=g[y],o=1;a>=10;a/=10)o++;i%=$,s=i-$+o,c=s<0?0:p/ne(10,o-s-1)%10|0}if(n=n||t<0||g[y+1]!==void 0||(s<0?p:p%ne(10,o-s-1)),l=r<4?(c||n)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||n||r==6&&(i>0?s>0?p/ne(10,o-s):0:g[y-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,l?(t-=e.e+1,g[0]=ne(10,($-t%$)%$),e.e=-t||0):g[0]=e.e=0,e;if(i==0?(g.length=y,a=1,y--):(g.length=y+1,a=ne(10,$-i),g[y]=s>0?(p/ne(10,o-s)%ne(10,s)|0)*a:0),l)for(;;)if(y==0){for(i=1,s=g[0];s>=10;s/=10)i++;for(s=g[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,g[0]==$e&&(g[0]=1));break}else{if(g[y]+=a,g[y]!=$e)break;g[y--]=0,a=1}for(i=g.length;g[--i]===0;)g.pop()}return B&&(e.e>b.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+xt(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+xt(-o-1)+i,r&&(n=r-s)>0&&(i+=xt(n))):o>=s?(i+=xt(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+xt(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=xt(n))),i}u(Qe,"finiteToString");function fo(e,t){var r=e[0];for(t*=$;r>=10;r/=10)t++;return t}u(fo,"getBase10Exponent");function lo(e,t,r){if(t>Qm)throw B=!0,r&&(e.precision=r),Error(ec);return N(new e(uo),t,1,!0)}u(lo,"getLn10");function je(e,t,r){if(t>Ji)throw Error(ec);return N(new e(co),t,r,!0)}u(je,"getPi");function oc(e){var t=e.length-1,r=t*$+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}u(oc,"getPrecision");function xt(e){for(var t="";e--;)t+="0";return t}u(xt,"getZeroString");function ic(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/$+4);for(B=!1;;){if(r%2&&(i=i.times(t),Yu(i.d,s)&&(o=!0)),r=pe(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Yu(t.d,s)}return B=!0,i}u(ic,"intPow");function Qu(e){return e.d[e.d.length-1]&1}u(Qu,"isOdd");function sc(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new y(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(B=!1,c=v):c=t,a=new y(.03125);e.e>-2;)e=e.times(a),g+=5;for(n=Math.log(ne(2,g))/Math.LN10*2+5|0,c+=n,r=i=s=new y(1),y.precision=c;;){if(i=N(i.times(e),c,1),r=r.times(++p),a=s.plus(Z(i,r,c,1)),ue(a.d).slice(0,c)===ue(s.d).slice(0,c)){for(o=g;o--;)s=N(s.times(s),c,1);if(t==null)if(l<3&&Xr(s.d,c-n,b,l))y.precision=c+=10,r=i=a=new y(1),p=0,l++;else return N(s,y.precision=v,b,B=!0);else return y.precision=v,s}s=a}}u(zi,"naturalExponential");function Et(e,t){var r,n,o,i,s,a,c,l,p,g,y,b=1,v=10,h=e,T=h.d,O=h.constructor,P=O.rounding,M=O.precision;if(h.s<0||!T||!T[0]||!h.e&&T[0]==1&&T.length==1)return new O(T&&!T[0]?-1/0:h.s!=1?NaN:T?0:h);if(t==null?(B=!1,p=M):p=t,O.precision=p+=v,r=ue(T),n=r.charAt(0),Math.abs(i=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=ue(h.d),n=r.charAt(0),b++;i=h.e,n>1?(h=new O("0."+r),i++):h=new O(n+"."+r.slice(1))}else return l=lo(O,p+2,M).times(i+""),h=Et(new O(n+"."+r.slice(1)),p-v).plus(l),O.precision=M,t==null?N(h,M,P,B=!0):h;for(g=h,c=s=h=Z(h.minus(1),h.plus(1),p,1),y=N(h.times(h),p,1),o=3;;){if(s=N(s.times(y),p,1),l=c.plus(Z(s,new O(o),p,1)),ue(l.d).slice(0,p)===ue(c.d).slice(0,p))if(c=c.times(2),i!==0&&(c=c.plus(lo(O,p+2,M).times(i+""))),c=Z(c,new O(b),p,1),t==null)if(Xr(c.d,p-v,P,a))O.precision=p+=v,l=s=h=Z(g.minus(1),g.plus(1),p,1),y=N(h.times(h),p,1),o=a=1;else return N(c,O.precision=M,P,B=!0);else return O.precision=M,c;c=l,o+=2}}u(Et,"naturalLogarithm");function ac(e){return String(e.s*e.s/0)}u(ac,"nonFiniteToString");function Hi(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%$,r<0&&(n+=$),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),nc.test(t))return Hi(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(zm.test(t))r=16,t=t.toLowerCase();else if(Jm.test(t))r=2;else if(Hm.test(t))r=8;else throw Error(vt+t);for(i=t.search(/p/i),i>0?(c=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=ic(n,new n(r),i,i*2)),l=ao(t,r,$e),p=l.length-1,i=p;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=fo(l,p),e.d=l,B=!1,s&&(e=Z(e,o,a*4)),c&&(e=e.times(Math.abs(c)<54?ne(2,c):it.pow(2,c))),B=!0,e)}u(Zm,"parseOther");function Xm(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:fr(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/mo(5,r)),t=fr(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}u(Xm,"sine");function fr(e,t,r,n,o){var i,s,a,c,l=1,p=e.precision,g=Math.ceil(p/$);for(B=!1,c=r.times(r),a=new e(n);;){if(s=Z(a.times(c),new e(t++*t++),p,1),a=o?n.plus(s):n.minus(s),n=Z(s.times(c),new e(t++*t++),p,1),s=a.plus(n),s.d[g]!==void 0){for(i=g;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return B=!0,s.d.length=g+1,s}u(fr,"taylorSeries");function mo(e,t){for(var r=e;--t;)r*=e;return r}u(mo,"tinyPow");function uc(e,t){var r,n=t.s<0,o=je(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return ot=n?4:1,t;if(r=t.divToInt(o),r.isZero())ot=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return ot=Qu(r)?n?2:3:n?4:1,t;ot=Qu(r)?n?1:4:n?3:2}return t.minus(o).abs()}u(uc,"toLessThanHalfPi");function Wi(e,t,r,n){var o,i,s,a,c,l,p,g,y,b=e.constructor,v=r!==void 0;if(v?(Te(r,1,Tt),n===void 0?n=b.rounding:Te(n,0,8)):(r=b.precision,n=b.rounding),!e.isFinite())p=ac(e);else{for(p=Qe(e),s=p.indexOf("."),v?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(p=p.replace(".",""),y=new b(1),y.e=p.length-s,y.d=ao(Qe(y),10,o),y.e=y.d.length),g=ao(p,10,o),i=c=g.length;g[--c]==0;)g.pop();if(!g[0])p=v?"0p+0":"0";else{if(s<0?i--:(e=new b(e),e.d=g,e.e=i,e=Z(e,y,r,n,0,o),g=e.d,i=e.e,l=Xu),s=g[r],a=o/2,l=l||g[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&g[r-1]&1||n===(e.s<0?8:7)),g.length=r,l)for(;++g[--r]>o-1;)g[r]=0,r||(++i,g.unshift(1));for(c=g.length;!g[c-1];--c);for(s=0,p="";s1)if(t==16||t==8){for(s=t==16?4:3,--c;c%s;c++)p+="0";for(g=ao(p,o,t),c=g.length;!g[c-1];--c);for(s=1,p="1.";sc)for(i-=c;i--;)p+="0";else it)return e.length=t,!0}u(Yu,"truncate");function ed(e){return new this(e).abs()}u(ed,"abs");function td(e){return new this(e).acos()}u(td,"acos");function rd(e){return new this(e).acosh()}u(rd,"acosh");function nd(e,t){return new this(e).plus(t)}u(nd,"add");function od(e){return new this(e).asin()}u(od,"asin");function id(e){return new this(e).asinh()}u(id,"asinh");function sd(e){return new this(e).atan()}u(sd,"atan");function ad(e){return new this(e).atanh()}u(ad,"atanh");function ud(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=je(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?je(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=je(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(Z(e,t,i,1)),t=je(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Z(e,t,i,1)),r}u(ud,"atan2");function cd(e){return new this(e).cbrt()}u(cd,"cbrt");function ld(e){return N(e=new this(e),e.e+1,2)}u(ld,"ceil");function pd(e,t,r){return new this(e).clamp(t,r)}u(pd,"clamp");function fd(e){if(!e||typeof e!="object")throw Error(po+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,Tt,"rounding",0,8,"toExpNeg",-pr,0,"toExpPos",0,pr,"maxE",0,pr,"minE",-pr,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(vt+r+": "+n);if(r="crypto",o&&(this[r]=Ki[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(tc);else this[r]=!1;else throw Error(vt+r+": "+n);return this}u(fd,"config");function md(e){return new this(e).cos()}u(md,"cos");function dd(e){return new this(e).cosh()}u(dd,"cosh");function cc(e){var t,r,n;function o(i){var s,a,c,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,Zu(i)){l.s=i.s,B?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;B?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(tc);else for(;i=10;o/=10)n++;n<$&&(r-=$-n)}return s.e=r,s.d=a,s}u(Sd,"random");function Cd(e){return N(e=new this(e),e.e+1,this.rounding)}u(Cd,"round");function Rd(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}u(Rd,"sign");function Id(e){return new this(e).sin()}u(Id,"sin");function _d(e){return new this(e).sinh()}u(_d,"sinh");function Fd(e){return new this(e).sqrt()}u(Fd,"sqrt");function Dd(e,t){return new this(e).sub(t)}u(Dd,"sub");function kd(){var e=0,t=arguments,r=new this(t[e]);for(B=!1;r.s&&++e`}};u(Ie,"FieldRefImpl");d();f();m();var pc=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],go=Symbol(),Yi=new WeakMap,Se=class{constructor(t){t===go?Yi.set(this,`Prisma.${this._getName()}`):Yi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Yi.get(this)}};u(Se,"ObjectEnumValue");var mr=class extends Se{_getNamespace(){return"NullTypes"}};u(mr,"NullTypesEnumValue");var en=class extends mr{};u(en,"DbNull");var tn=class extends mr{};u(tn,"JsonNull");var rn=class extends mr{};u(rn,"AnyNull");var yo={classes:{DbNull:en,JsonNull:tn,AnyNull:rn},instances:{DbNull:new en(go),JsonNull:new tn(go),AnyNull:new rn(go)}};d();f();m();function ho(e){return it.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&Array.isArray(e.d)}u(ho,"isDecimalJsLike");function fc(e){if(it.isDecimal(e))return JSON.stringify(String(e));let t=new it(0);return t.d=e.d,t.e=e.e,t.s=e.s,JSON.stringify(String(t))}u(fc,"stringifyDecimalJsLike");var fe=u((e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r},"keyBy"),dr={String:!0,Int:!0,Float:!0,Boolean:!0,Long:!0,DateTime:!0,ID:!0,UUID:!0,Json:!0,Bytes:!0,Decimal:!0,BigInt:!0};var Ld={string:"String",boolean:"Boolean",object:"Json",symbol:"Symbol"};function gr(e){return typeof e=="string"?e:e.name}u(gr,"stringifyGraphQLType");function on(e,t){return t?`List<${e}>`:e}u(on,"wrapWithList");var Bd=/^(\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60))(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/,qd=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function yr(e,t){let r=t==null?void 0:t.type;if(e===null)return"null";if(Object.prototype.toString.call(e)==="[object BigInt]")return"BigInt";if(Le.isDecimal(e)||r==="Decimal"&&ho(e))return"Decimal";if(x.Buffer.isBuffer(e))return"Bytes";if(Ud(e,t))return r.name;if(e instanceof Se)return e._getName();if(e instanceof Ie)return e._toGraphQLInputType();if(Array.isArray(e)){let o=e.reduce((i,s)=>{let a=yr(s,t);return i.includes(a)||i.push(a),i},[]);return o.includes("Float")&&o.includes("Int")&&(o=["Float"]),`List<${o.join(" | ")}>`}let n=typeof e;if(n==="number")return Math.trunc(e)===e?"Int":"Float";if(Object.prototype.toString.call(e)==="[object Date]")return"DateTime";if(n==="string"){if(qd.test(e))return"UUID";if(new Date(e).toString()==="Invalid Date")return"String";if(Bd.test(e))return"DateTime"}return Ld[n]}u(yr,"getGraphQLType");function Ud(e,t){var n;let r=t==null?void 0:t.type;if(!Gd(r))return!1;if((t==null?void 0:t.namespace)==="prisma"&&pc.includes(r.name)){let o=(n=e==null?void 0:e.constructor)==null?void 0:n.name;return typeof o=="string"&&yo.instances[o]===e&&r.values.includes(o)}return typeof e=="string"&&r.values.includes(e)}u(Ud,"isValidEnumValue");function bo(e,t){return t.reduce((n,o)=>{let i=(0,mc.default)(e,o);return in.length*3)),str:null}).str}u(bo,"getSuggestion");function hr(e,t=!1){if(typeof e=="string")return e;if(e.values)return`enum ${e.name} { -${(0,Zi.default)(e.values.join(", "),2)} -}`;{let r=(0,Zi.default)(e.fields.map(n=>{let o=`${n.name}`,i=`${t?At.default.green(o):o}${n.isRequired?"":"?"}: ${At.default.white(n.inputTypes.map(s=>on(Vd(s.type)?s.type.name:gr(s.type),s.isList)).join(" | "))}`;return n.isRequired?i:At.default.dim(i)}).join(` -`),2);return`${At.default.dim("type")} ${At.default.bold.dim(e.name)} ${At.default.dim("{")} -${r} -${At.default.dim("}")}`}}u(hr,"stringifyInputType");function Vd(e){return typeof e!="string"}u(Vd,"argIsInputType");function nn(e){return typeof e=="string"?e==="Null"?"null":e:e.name}u(nn,"getInputTypeName");function $t(e){return typeof e=="string"?e:e.name}u($t,"getOutputTypeName");function Xi(e,t,r=!1){if(typeof e=="string")return e==="Null"?"null":e;if(e.values)return e.values.join(" | ");let n=e,o=t&&n.fields.every(i=>{var s;return i.inputTypes[0].location==="inputObjectTypes"||((s=i.inputTypes[1])==null?void 0:s.location)==="inputObjectTypes"});return r?nn(e):n.fields.reduce((i,s)=>{let a="";return!o&&!s.isRequired?a=s.inputTypes.map(c=>nn(c.type)).join(" | "):a=s.inputTypes.map(c=>Xi(c.type,s.isRequired,!0)).join(" | "),i[s.name+(s.isRequired?"":"?")]=a,i},{})}u(Xi,"inputTypeToJson");function dc(e,t,r){let n={};for(let o of e)n[r(o)]=o;for(let o of t){let i=r(o);n[i]||(n[i]=o)}return Object.values(n)}u(dc,"unionBy");function wo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u(wo,"lowerCase");function gc(e){return e.endsWith("GroupByOutputType")}u(gc,"isGroupByOutputName");function Gd(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&Array.isArray(e.values)}u(Gd,"isSchemaEnum");var sn=class{constructor({datamodel:t}){this.datamodel=t,this.datamodelEnumMap=this.getDatamodelEnumMap(),this.modelMap=this.getModelMap(),this.typeMap=this.getTypeMap(),this.typeAndModelMap=this.getTypeModelMap()}getDatamodelEnumMap(){return fe(this.datamodel.enums,"name")}getModelMap(){return{...fe(this.datamodel.models,"name")}}getTypeMap(){return{...fe(this.datamodel.types,"name")}}getTypeModelMap(){return{...this.getTypeMap(),...this.getModelMap()}}};u(sn,"DMMFDatamodelHelper");var an=class{constructor({mappings:t}){this.mappings=t,this.mappingsMap=this.getMappingsMap()}getMappingsMap(){return fe(this.mappings.modelOperations,"model")}};u(an,"DMMFMappingsHelper");var un=class{constructor({schema:t}){this.outputTypeToMergedOutputType=u(t=>({...t,fields:t.fields}),"outputTypeToMergedOutputType");this.schema=t,this.enumMap=this.getEnumMap(),this.queryType=this.getQueryType(),this.mutationType=this.getMutationType(),this.outputTypes=this.getOutputTypes(),this.outputTypeMap=this.getMergedOutputTypeMap(),this.resolveOutputTypes(),this.inputObjectTypes=this.schema.inputObjectTypes,this.inputTypeMap=this.getInputTypeMap(),this.resolveInputTypes(),this.resolveFieldArgumentTypes(),this.queryType=this.outputTypeMap.Query,this.mutationType=this.outputTypeMap.Mutation,this.rootFieldMap=this.getRootFieldMap()}get[Symbol.toStringTag](){return"DMMFClass"}resolveOutputTypes(){for(let t of this.outputTypes.model){for(let r of t.fields)typeof r.outputType.type=="string"&&!dr[r.outputType.type]&&(r.outputType.type=this.outputTypeMap[r.outputType.type]||this.outputTypeMap[r.outputType.type]||this.enumMap[r.outputType.type]||r.outputType.type);t.fieldMap=fe(t.fields,"name")}for(let t of this.outputTypes.prisma){for(let r of t.fields)typeof r.outputType.type=="string"&&!dr[r.outputType.type]&&(r.outputType.type=this.outputTypeMap[r.outputType.type]||this.outputTypeMap[r.outputType.type]||this.enumMap[r.outputType.type]||r.outputType.type);t.fieldMap=fe(t.fields,"name")}}resolveInputTypes(){let t=this.inputObjectTypes.prisma;this.inputObjectTypes.model&&t.push(...this.inputObjectTypes.model);for(let r of t){for(let n of r.fields)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(this.inputTypeMap[i]||this.enumMap[i])&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||i)}r.fieldMap=fe(r.fields,"name")}}resolveFieldArgumentTypes(){for(let t of this.outputTypes.prisma)for(let r of t.fields)for(let n of r.args)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||i)}for(let t of this.outputTypes.model)for(let r of t.fields)for(let n of r.args)for(let o of n.inputTypes){let i=o.type;typeof i=="string"&&!dr[i]&&(o.type=this.inputTypeMap[i]||this.enumMap[i]||o.type)}}getQueryType(){return this.schema.outputObjectTypes.prisma.find(t=>t.name==="Query")}getMutationType(){return this.schema.outputObjectTypes.prisma.find(t=>t.name==="Mutation")}getOutputTypes(){return{model:this.schema.outputObjectTypes.model.map(this.outputTypeToMergedOutputType),prisma:this.schema.outputObjectTypes.prisma.map(this.outputTypeToMergedOutputType)}}getEnumMap(){return{...fe(this.schema.enumTypes.prisma,"name"),...this.schema.enumTypes.model?fe(this.schema.enumTypes.model,"name"):void 0}}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}getMergedOutputTypeMap(){return{...fe(this.outputTypes.model,"name"),...fe(this.outputTypes.prisma,"name")}}getInputTypeMap(){return{...this.schema.inputObjectTypes.model?fe(this.schema.inputObjectTypes.model,"name"):void 0,...fe(this.schema.inputObjectTypes.prisma,"name")}}getRootFieldMap(){return{...fe(this.queryType.fields,"name"),...fe(this.mutationType.fields,"name")}}};u(un,"DMMFSchemaHelper");var Pt=class{constructor(t){return Object.assign(this,new sn(t),new an(t))}};u(Pt,"BaseDMMFHelper");Vi(Pt,[sn,an]);var st=class{constructor(t){return Object.assign(this,new Pt(t),new un(t))}};u(st,"DMMFHelper");Vi(st,[Pt,un]);d();f();m();d();f();m();var Xk=X(yc()),Bl=X(bc());ti();var En=X(Qa());d();f();m();var ce=class{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 ce?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let o=0,i=0;for(;o{let o=t.models.find(i=>i.name===n.model);if(!o)throw new Error(`Mapping without model ${n.model}`);return o.fields.some(i=>i.kind!=="object")}).map(n=>({model:n.model,plural:(0,vc.default)(wo(n.model)),findUnique:n.findUnique||n.findSingle,findUniqueOrThrow:n.findUniqueOrThrow,findFirst:n.findFirst,findFirstOrThrow:n.findFirstOrThrow,findMany:n.findMany,create:n.createOne||n.createSingle||n.create,createMany:n.createMany,delete:n.deleteOne||n.deleteSingle||n.delete,update:n.updateOne||n.updateSingle||n.update,deleteMany:n.deleteMany,updateMany:n.updateMany,upsert:n.upsertOne||n.upsertSingle||n.upsert,aggregate:n.aggregate,groupBy:n.groupBy,findRaw:n.findRaw,aggregateRaw:n.aggregateRaw})),otherOperations:e.otherOperations}}u(zd,"getMappings");function Ac(e){return Tc(e)}u(Ac,"getPrismaClientDMMF");d();f();m();d();f();m();var D=X(It());var Lt=X(Yn()),ps=X(Qn());d();f();m();d();f();m();var Be=class{constructor(){this._map=new Map}get(t){var r;return(r=this._map.get(t))==null?void 0:r.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 o=r();return this.set(t,o),o}};u(Be,"Cache");d();f();m();function Ye(e){return e.replace(/^./,t=>t.toLowerCase())}u(Ye,"dmmfToJSModelName");function Mc(e,t,r){let n=Ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Hd({...e,...Pc(t.name,t.result.$allModels),...Pc(t.name,t.result[n])})}u(Mc,"getComputedFields");function Hd(e){let t=new Be,r=u(n=>t.getOrCreate(n,()=>e[n]?e[n].needs.flatMap(r):[n]),"resolveNeeds");return lr(e,n=>({...n,needs:r(n.name)}))}u(Hd,"resolveDependencies");function Pc(e,t){return t?lr(t,({needs:r,compute:n},o)=>({name:o,needs:r?Object.keys(r).filter(i=>r[i]):[],compute:Zr(e,n)})):{}}u(Pc,"getComputedFieldsFromModel");function Oc(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!!e[n.name])for(let o of n.needs)r[o]=!0;return r}u(Oc,"applyComputedFieldsToSelection");d();f();m();var br=X(It()),Dc=X(Yn());d();f();m();ti();d();f();m();d();f();m();d();f();m();var Mt=X(It());var Wd=Mt.default.rgb(246,145,95),Qd=Mt.default.rgb(107,139,140),Eo=Mt.default.cyan,Sc=Mt.default.rgb(127,155,155),Cc=u(e=>e,"identity"),Rc={keyword:Eo,entity:Eo,value:Sc,punctuation:Qd,directive:Eo,function:Eo,variable:Sc,string:Mt.default.greenBright,boolean:Wd,number:Mt.default.cyan,comment:Mt.default.grey};var vo={},Yd=0,U={manual:vo.Prism&&vo.Prism.manual,disableWorkerMessageHandler:vo.Prism&&vo.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof qe){let t=e;return new qe(t.type,U.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(U.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(te instanceof qe)continue;if(S&&j!=t.length-1){P.lastIndex=V;var g=P.exec(e);if(!g)break;var p=g.index+(A?g[1].length:0),y=g.index+g[0].length,a=j,c=V;for(let L=t.length;a=c&&(++j,V=c);if(t[j]instanceof qe)continue;l=a-j,te=e.slice(V,c),g.index-=V}else{P.lastIndex=0;var g=P.exec(te),l=1}if(!g){if(i)break;continue}A&&(_=g[1]?g[1].length:0);var p=g.index+_,g=g[0].slice(_),y=p+g.length,b=te.slice(0,p),v=te.slice(y);let G=[j,l];b&&(++j,V+=b.length,G.push(b));let K=new qe(h,M?U.tokenize(g,M):g,F,g,S);if(G.push(K),v&&G.push(v),Array.prototype.splice.apply(t,G),l!=1&&U.matchGrammar(e,t,r,j,V,!0,h),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return U.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=U.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=U.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:qe};U.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:/[{}[\];(),.:]/};U.languages.javascript=U.languages.extend("clike",{"class-name":[U.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}/});U.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;U.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:U.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:U.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:U.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:U.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});U.languages.markup&&U.languages.markup.tag.addInlined("script","javascript");U.languages.js=U.languages.javascript;U.languages.typescript=U.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/});U.languages.ts=U.languages.typescript;function qe(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}u(qe,"Token");qe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return qe.stringify(r,t)}).join(""):Zd(e.type)(e.content)};function Zd(e){return Rc[e]||Cc}u(Zd,"getColorForSyntaxKind");function Ic(e){return Xd(e,U.languages.javascript)}u(Ic,"highlightTS");function Xd(e,t){return U.tokenize(e,t).map(n=>qe.stringify(n)).join("")}u(Xd,"highlight");d();f();m();var _c=X(yi());function Fc(e){return(0,_c.default)(e)}u(Fc,"dedent");var _e=class{static read(t){let r;try{r=Dn.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new _e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new _e(t,Fc(n).split(` -`))}highlight(){let t=Ic(this.toString());return new _e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};u(_e,"SourceFileSlice");var eg={red:e=>br.default.red(e),gray:e=>br.default.gray(e),dim:e=>br.default.dim(e),bold:e=>br.default.bold(e),underline:e=>br.default.underline(e),highlightSource:e=>e.highlight()},tg={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function rg({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var g;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||w.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let c=Math.max(1,a.lineNumber-3),l=(g=_e.read(a.fileName))==null?void 0:g.slice(c,a.lineNumber),p=l==null?void 0:l.lineAt(a.lineNumber);if(l&&p){let y=og(p),b=ng(p);if(!b)return s;s.functionName=`${b.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,h=>h.slice(0,b.openingBraceIndex))),l=i.highlightSource(l);let v=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((h,T)=>i.gray(String(T).padStart(v))+" "+h).mapLines(h=>i.dim(h)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let h=y+v+1;h+=2,s.callArguments=(0,Dc.default)(o,h).slice(h)}}return s}u(rg,"getTemplateParameters");function ng(e){let t=Object.keys(We.ModelAction).join("|"),n=new RegExp(String.raw`\S+(${t})\(`).exec(e);return n?{code:n[0],openingBraceIndex:n.index+n[0].length}:null}u(ng,"findPrismaActionCall");function og(e){let t=0;for(let r=0;rArray.isArray(e)?e:e.split("."),"keys"),is=u((e,t)=>Lc(t).reduce((r,n)=>r&&r[n],e),"deepGet"),To=u((e,t,r)=>Lc(t).reduceRight((n,o,i,s)=>Object.assign({},is(e,s.slice(0,i)),{[o]:n}),r),"deepSet");d();f();m();function Bc(e,t){if(!e||typeof e!="object"||typeof e.hasOwnProperty!="function")return e;let r={};for(let n in e){let o=e[n];Object.hasOwnProperty.call(e,n)&&t(n,o)&&(r[n]=o)}return r}u(Bc,"filterObject");d();f();m();var ag={"[object Date]":!0,"[object Uint8Array]":!0,"[object Decimal]":!0};function qc(e){return e?typeof e=="object"&&!ag[Object.prototype.toString.call(e)]:!1}u(qc,"isObject");d();f();m();function Uc(e,t){let r={},n=Array.isArray(t)?t:[t];for(let o in e)Object.hasOwnProperty.call(e,o)&&!n.includes(o)&&(r[o]=e[o]);return r}u(Uc,"omit");d();f();m();var Ce=X(It()),us=X(Qn());d();f();m();var ug=Gc(),cg=Jc(),lg=zc().default,pg=u((e,t,r)=>{let n=[];return u(function o(i,s={},a="",c=[]){s.indent=s.indent||" ";let l;s.inlineCharacterLimit===void 0?l={newLine:` -`,newLineOrSpace:` -`,pad:a,indent:a+s.indent}:l={newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};let p=u(g=>{if(s.inlineCharacterLimit===void 0)return g;let y=g.replace(new RegExp(l.newLine,"g"),"").replace(new RegExp(l.newLineOrSpace,"g")," ").replace(new RegExp(l.pad+"|"+l.indent,"g"),"");return y.length<=s.inlineCharacterLimit?y:g.replace(new RegExp(l.newLine+"|"+l.newLineOrSpace,"g"),` -`).replace(new RegExp(l.pad,"g"),a).replace(new RegExp(l.indent,"g"),a+s.indent)},"expandWhiteSpace");if(n.indexOf(i)!==-1)return'"[Circular]"';if(x.Buffer.isBuffer(i))return`Buffer(${x.Buffer.length})`;if(i==null||typeof i=="number"||typeof i=="boolean"||typeof i=="function"||typeof i=="symbol"||i instanceof Se||ug(i))return String(i);if(i instanceof Date)return`new Date('${i.toISOString()}')`;if(i instanceof Ie)return`prisma.${wo(i.modelName)}.fields.${i.name}`;if(Array.isArray(i)){if(i.length===0)return"[]";n.push(i);let g="["+l.newLine+i.map((y,b)=>{let v=i.length-1===b?l.newLine:","+l.newLineOrSpace,h=o(y,s,a+s.indent,[...c,b]);return s.transformValue&&(h=s.transformValue(i,b,h)),l.indent+h+v}).join("")+l.pad+"]";return n.pop(),p(g)}if(cg(i)){let g=Object.keys(i).concat(lg(i));if(s.filter&&(g=g.filter(b=>s.filter(i,b))),g.length===0)return"{}";n.push(i);let y="{"+l.newLine+g.map((b,v)=>{let h=g.length-1===v?l.newLine:","+l.newLineOrSpace,T=typeof b=="symbol",O=!T&&/^[a-z$_][a-z$_0-9]*$/i.test(b),P=T||O?b:o(b,s,void 0,[...c,b]),M=o(i[b],s,a+s.indent,[...c,b]);s.transformValue&&(M=s.transformValue(i,b,M));let A=l.indent+String(P)+": "+M+h;return s.transformLine&&(A=s.transformLine({obj:i,indent:l.indent,key:P,stringifiedValue:M,value:i[b],eol:h,originalLine:A,path:c.concat(P)})),A}).join("")+l.pad+"}";return n.pop(),p(y)}return i=String(i).replace(/[\r\n]/g,g=>g===` -`?"\\n":"\\r"),s.singleQuotes===!1?(i=i.replace(/"/g,'\\"'),`"${i}"`):(i=i.replace(/\\?'/g,"\\'"),`'${i}'`)},"stringifyObject")(e,t,r)},"stringifyObject"),pn=pg;var as="@@__DIM_POINTER__@@";function Ao({ast:e,keyPaths:t,valuePaths:r,missingItems:n}){let o=e;for(let{path:i,type:s}of n)o=To(o,i,s);return pn(o,{indent:" ",transformLine:({indent:i,key:s,value:a,stringifiedValue:c,eol:l,path:p})=>{let g=p.join("."),y=t.includes(g),b=r.includes(g),v=n.find(T=>T.path===g),h=c;if(v){typeof a=="string"&&(h=h.slice(1,h.length-1));let T=v.isRequired?"":"?",O=v.isRequired?"+":"?",M=(v.isRequired?Ce.default.greenBright:Ce.default.green)(dg(s+T+": "+h+l,i,O));return v.isRequired||(M=Ce.default.dim(M)),M}else{let T=n.some(A=>g.startsWith(A.path)),O=s[s.length-2]==="?";O&&(s=s.slice(1,s.length-1)),O&&typeof a=="object"&&a!==null&&(h=h.split(` -`).map((A,S,_)=>S===_.length-1?A+as:A).join(` -`)),T&&typeof a=="string"&&(h=h.slice(1,h.length-1),O||(h=Ce.default.bold(h))),(typeof a!="object"||a===null)&&!b&&!T&&(h=Ce.default.dim(h));let P=y?Ce.default.redBright(s):s;h=b?Ce.default.redBright(h):h;let M=i+P+": "+h+(T?l:Ce.default.dim(l));if(y||b){let A=M.split(` -`),S=String(s).length,_=y?Ce.default.redBright("~".repeat(S)):" ".repeat(S),F=b?fg(i,s,a,c):0,j=b&&Hc(a),V=b?" "+Ce.default.redBright("~".repeat(F)):"";_&&_.length>0&&!j&&A.splice(1,0,i+_+V),_&&_.length>0&&j&&A.splice(A.length-1,0,i.slice(0,i.length-2)+V),M=A.join(` -`)}return M}}})}u(Ao,"printJsonWithErrors");function fg(e,t,r,n){return r===null?4:typeof r=="string"?r.length+2:Hc(r)?Math.abs(mg(`${t}: ${(0,us.default)(n)}`)-e.length):String(r).length}u(fg,"getValueLength");function Hc(e){return typeof e=="object"&&e!==null&&!(e instanceof Se)}u(Hc,"isRenderedAsObject");function mg(e){return e.split(` -`).reduce((t,r)=>r.length>t?r.length:t,0)}u(mg,"getLongestLine");function dg(e,t,r){return e.split(` -`).map((n,o,i)=>o===0?r+t.slice(1)+n:o(0,us.default)(n).includes(as)?Ce.default.dim(n.replace(as,"")):n.includes("?")?Ce.default.dim(n):n).join(` -`)}u(dg,"prefixLines");var fn=2,Po=class{constructor(t,r){this.type=t;this.children=r;this.printFieldError=u(({error:t},r,n)=>{if(t.type==="emptySelect"){let o=n?"":` Available options are listed in ${D.default.greenBright.dim("green")}.`;return`The ${D.default.redBright("`select`")} statement for type ${D.default.bold($t(t.field.outputType.type))} must not be empty.${o}`}if(t.type==="emptyInclude"){if(r.length===0)return`${D.default.bold($t(t.field.outputType.type))} does not have any relation and therefore can't have an ${D.default.redBright("`include`")} statement.`;let o=n?"":` Available options are listed in ${D.default.greenBright.dim("green")}.`;return`The ${D.default.redBright("`include`")} statement for type ${D.default.bold($t(t.field.outputType.type))} must not be empty.${o}`}if(t.type==="noTrueSelect")return`The ${D.default.redBright("`select`")} statement for type ${D.default.bold($t(t.field.outputType.type))} needs ${D.default.bold("at least one truthy value")}.`;if(t.type==="includeAndSelect")return`Please ${D.default.bold("either")} use ${D.default.greenBright("`include`")} or ${D.default.greenBright("`select`")}, but ${D.default.redBright("not both")} at the same time.`;if(t.type==="invalidFieldName"){let o=t.isInclude?"include":"select",i=t.isIncludeScalar?"Invalid scalar":"Unknown",s=n?"":t.isInclude&&r.length===0?` -This model has no relations, so you can't use ${D.default.redBright("include")} with it.`:` Available options are listed in ${D.default.greenBright.dim("green")}.`,a=`${i} field ${D.default.redBright(`\`${t.providedName}\``)} for ${D.default.bold(o)} statement on model ${D.default.bold.white(t.modelName)}.${s}`;return t.didYouMean&&(a+=` Did you mean ${D.default.greenBright(`\`${t.didYouMean}\``)}?`),t.isIncludeScalar&&(a+=` -Note, that ${D.default.bold("include")} statements only accept relation fields.`),a}if(t.type==="invalidFieldType")return`Invalid value ${D.default.redBright(`${pn(t.providedValue)}`)} of type ${D.default.redBright(yr(t.providedValue,void 0))} for field ${D.default.bold(`${t.fieldName}`)} on model ${D.default.bold.white(t.modelName)}. Expected either ${D.default.greenBright("true")} or ${D.default.greenBright("false")}.`},"printFieldError");this.printArgError=u(({error:t,path:r,id:n},o,i)=>{if(t.type==="invalidName"){let s=`Unknown arg ${D.default.redBright(`\`${t.providedName}\``)} in ${D.default.bold(r.join("."))} for type ${D.default.bold(t.outputType?t.outputType.name:nn(t.originalType))}.`;return t.didYouMeanField?s+=` -\u2192 Did you forget to wrap it with \`${D.default.greenBright("select")}\`? ${D.default.dim("e.g. "+D.default.greenBright(`{ select: { ${t.providedName}: ${t.providedValue} } }`))}`:t.didYouMeanArg?(s+=` Did you mean \`${D.default.greenBright(t.didYouMeanArg)}\`?`,!o&&!i&&(s+=` ${D.default.dim("Available args:")} -`+hr(t.originalType,!0))):t.originalType.fields.length===0?s+=` The field ${D.default.bold(t.originalType.name)} has no arguments.`:!o&&!i&&(s+=` Available args: - -`+hr(t.originalType,!0)),s}if(t.type==="invalidType"){let s=pn(t.providedValue,{indent:" "}),a=s.split(` -`).length>1;if(a&&(s=` -${s} -`),t.requiredType.bestFittingType.location==="enumTypes")return`Argument ${D.default.bold(t.argName)}: Provided value ${D.default.redBright(s)}${a?"":" "}of type ${D.default.redBright(yr(t.providedValue))} on ${D.default.bold(`prisma.${this.children[0].name}`)} is not a ${D.default.greenBright(on(gr(t.requiredType.bestFittingType.type),t.requiredType.bestFittingType.isList))}. -\u2192 Possible values: ${t.requiredType.bestFittingType.type.values.map(g=>D.default.greenBright(`${gr(t.requiredType.bestFittingType.type)}.${g}`)).join(", ")}`;let c=".";xr(t.requiredType.bestFittingType.type)&&(c=`: -`+hr(t.requiredType.bestFittingType.type));let l=`${t.requiredType.inputType.map(g=>D.default.greenBright(on(gr(g.type),t.requiredType.bestFittingType.isList))).join(" or ")}${c}`,p=t.requiredType.inputType.length===2&&t.requiredType.inputType.find(g=>xr(g.type))||null;return p&&(l+=` -`+hr(p.type,!0)),`Argument ${D.default.bold(t.argName)}: Got invalid value ${D.default.redBright(s)}${a?"":" "}on ${D.default.bold(`prisma.${this.children[0].name}`)}. Provided ${D.default.redBright(yr(t.providedValue))}, expected ${l}`}if(t.type==="invalidNullArg"){let s=r.length===1&&r[0]===t.name?"":` for ${D.default.bold(`${r.join(".")}`)}`,a=` Please use ${D.default.bold.greenBright("undefined")} instead.`;return`Argument ${D.default.greenBright(t.name)}${s} must not be ${D.default.bold("null")}.${a}`}if(t.type==="missingArg"){let s=r.length===1&&r[0]===t.missingName?"":` for ${D.default.bold(`${r.join(".")}`)}`;return`Argument ${D.default.greenBright(t.missingName)}${s} is missing.`}if(t.type==="atLeastOne"){let s=i?"":` Available args are listed in ${D.default.dim.green("green")}.`,a=t.atLeastFields?` and at least one argument for ${t.atLeastFields.map(c=>D.default.bold(c)).join(", or ")}`:"";return`Argument ${D.default.bold(r.join("."))} of type ${D.default.bold(t.inputType.name)} needs ${D.default.greenBright("at least one")} argument${D.default.bold(a)}.${s}`}if(t.type==="atMostOne"){let s=i?"":` Please choose one. ${D.default.dim("Available args:")} -${hr(t.inputType,!0)}`;return`Argument ${D.default.bold(r.join("."))} of type ${D.default.bold(t.inputType.name)} needs ${D.default.greenBright("exactly one")} argument, but you provided ${t.providedKeys.map(a=>D.default.redBright(a)).join(" and ")}.${s}`}},"printArgError");this.type=t,this.children=r}get[Symbol.toStringTag](){return"Document"}toString(){return`${this.type} { -${(0,Lt.default)(this.children.map(String).join(` -`),fn)} -}`}validate(t,r=!1,n,o,i){var O;t||(t={});let s=this.children.filter(P=>P.hasInvalidChild||P.hasInvalidArg);if(s.length===0)return;let a=[],c=[],l=t&&t.select?"select":t.include?"include":void 0;for(let P of s){let M=P.collectErrors(l);a.push(...M.fieldErrors.map(A=>({...A,path:r?A.path:A.path.slice(1)}))),c.push(...M.argErrors.map(A=>({...A,path:r?A.path:A.path.slice(1)})))}let p=this.children[0].name,g=r?this.type:p,y=[],b=[],v=[];for(let P of a){let M=this.normalizePath(P.path,t).join(".");if(P.error.type==="invalidFieldName"){y.push(M);let A=P.error.outputType,{isInclude:S}=P.error;A.fields.filter(_=>S?_.outputType.location==="outputObjectTypes":!0).forEach(_=>{let F=M.split(".");v.push({path:`${F.slice(0,F.length-1).join(".")}.${_.name}`,type:"true",isRequired:!1})})}else P.error.type==="includeAndSelect"?(y.push("select"),y.push("include")):b.push(M);if(P.error.type==="emptySelect"||P.error.type==="noTrueSelect"||P.error.type==="emptyInclude"){let A=this.normalizePath(P.path,t),S=A.slice(0,A.length-1).join(".");(O=P.error.field.outputType.type.fields)==null||O.filter(F=>P.error.type==="emptyInclude"?F.outputType.location==="outputObjectTypes":!0).forEach(F=>{v.push({path:`${S}.${F.name}`,type:"true",isRequired:!1})})}}for(let P of c){let M=this.normalizePath(P.path,t).join(".");if(P.error.type==="invalidName")y.push(M);else if(P.error.type!=="missingArg"&&P.error.type!=="atLeastOne")b.push(M);else if(P.error.type==="missingArg"){let A=P.error.missingArg.inputTypes.length===1?P.error.missingArg.inputTypes[0].type:P.error.missingArg.inputTypes.map(S=>{let _=nn(S.type);return _==="Null"?"null":S.isList?_+"[]":_}).join(" | ");v.push({path:M,type:Xi(A,!0,M.split("where.").length===2),isRequired:P.error.missingArg.isRequired})}}let h=u(P=>{let M=c.some(G=>G.error.type==="missingArg"&&G.error.missingArg.isRequired),A=Boolean(c.find(G=>G.error.type==="missingArg"&&!G.error.missingArg.isRequired)),S=A||M,_="";M&&(_+=` -${D.default.dim("Note: Lines with ")}${D.default.reset.greenBright("+")} ${D.default.dim("are required")}`),A&&(_.length===0&&(_=` -`),M?_+=D.default.dim(`, lines with ${D.default.green("?")} are optional`):_+=D.default.dim(`Note: Lines with ${D.default.green("?")} are optional`),_+=D.default.dim("."));let j=c.filter(G=>G.error.type!=="missingArg"||G.error.missingArg.isRequired).map(G=>this.printArgError(G,S,o==="minimal")).join(` -`);if(j+=` -${a.map(G=>this.printFieldError(G,v,o==="minimal")).join(` -`)}`,o==="minimal")return(0,ps.default)(j);let V={ast:r?{[p]:t}:t,keyPaths:y,valuePaths:b,missingItems:v};n!=null&&n.endsWith("aggregate")&&(V=Tg(V));let te=wr({callsite:P,originalMethod:n||g,showColors:o&&o==="pretty",callArguments:Ao(V),message:`${j}${_} -`});return w.env.NO_COLOR||o==="colorless"?(0,ps.default)(te):te},"renderErrorStr"),T=new ye(h(i));throw w.env.NODE_ENV!=="production"&&Object.defineProperty(T,"render",{get:()=>h,enumerable:!1}),T}normalizePath(t,r){let n=t.slice(),o=[],i,s=r;for(;(i=n.shift())!==void 0;)!Array.isArray(s)&&i===0||(i==="select"?s[i]?s=s[i]:s=s.include:s&&s[i]&&(s=s[i]),o.push(i));return o}};u(Po,"Document");var ye=class extends Error{get[Symbol.toStringTag](){return"PrismaClientValidationError"}};u(ye,"PrismaClientValidationError");var oe=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`)}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};u(oe,"PrismaClientConstructorValidationError");var de=class{constructor({name:t,args:r,children:n,error:o,schemaField:i}){this.name=t,this.args=r,this.children=n,this.error=o,this.schemaField=i,this.hasInvalidChild=n?n.some(s=>Boolean(s.error||s.hasInvalidArg||s.hasInvalidChild)):!1,this.hasInvalidArg=r?r.hasInvalidArg:!1}get[Symbol.toStringTag](){return"Field"}toString(){let t=this.name;return this.error?t+" # INVALID_FIELD":(this.args&&this.args.args&&this.args.args.length>0&&(this.args.args.length===1?t+=`(${this.args.toString()})`:t+=`( -${(0,Lt.default)(this.args.toString(),fn)} -)`),this.children&&(t+=` { -${(0,Lt.default)(this.children.map(String).join(` -`),fn)} -}`),t)}collectErrors(t="select"){let r=[],n=[];if(this.error&&r.push({path:[this.name],error:this.error}),this.children)for(let o of this.children){let i=o.collectErrors(t);r.push(...i.fieldErrors.map(s=>({...s,path:[this.name,t,...s.path]}))),n.push(...i.argErrors.map(s=>({...s,path:[this.name,t,...s.path]})))}return this.args&&n.push(...this.args.collectErrors().map(o=>({...o,path:[this.name,...o.path]}))),{fieldErrors:r,argErrors:n}}};u(de,"Field");var ge=class{constructor(t=[]){this.args=t,this.hasInvalidArg=t?t.some(r=>Boolean(r.hasError)):!1}get[Symbol.toStringTag](){return"Args"}toString(){return this.args.length===0?"":`${this.args.map(t=>t.toString()).filter(t=>t).join(` -`)}`}collectErrors(){return this.hasInvalidArg?this.args.flatMap(t=>t.collectErrors()):[]}};u(ge,"Args");function cs(e,t){return x.Buffer.isBuffer(e)?JSON.stringify(e.toString("base64")):e instanceof Ie?`{ _ref: ${JSON.stringify(e.name)}}`:Object.prototype.toString.call(e)==="[object BigInt]"?e.toString():typeof(t==null?void 0:t.type)=="string"&&t.type==="Json"?e===null?"null":e&&e.values&&e.__prismaRawParameters__?JSON.stringify(e.values):(t==null?void 0:t.isList)&&Array.isArray(e)?JSON.stringify(e.map(r=>JSON.stringify(r))):JSON.stringify(JSON.stringify(e)):e===void 0?null:e===null?"null":Le.isDecimal(e)||(t==null?void 0:t.type)==="Decimal"&&ho(e)?fc(e):(t==null?void 0:t.location)==="enumTypes"&&typeof e=="string"?Array.isArray(e)?`[${e.join(", ")}]`:e:typeof e=="number"&&(t==null?void 0:t.type)==="Float"?e.toExponential():JSON.stringify(e,null,2)}u(cs,"stringify");var Fe=class{constructor({key:t,value:r,isEnum:n=!1,error:o,schemaArg:i,inputType:s}){this.inputType=s,this.key=t,this.value=r instanceof Se?r._getName():r,this.isEnum=n,this.error=o,this.schemaArg=i,this.isNullable=(i==null?void 0:i.inputTypes.reduce(a=>a&&i.isNullable,!0))||!1,this.hasError=Boolean(o)||(r instanceof ge?r.hasInvalidArg:!1)||Array.isArray(r)&&r.some(a=>a instanceof ge?a.hasInvalidArg:!1)}get[Symbol.toStringTag](){return"Arg"}_toString(t,r){var n;if(typeof t!="undefined"){if(t instanceof ge)return`${r}: { -${(0,Lt.default)(t.toString(),2)} -}`;if(Array.isArray(t)){if(((n=this.inputType)==null?void 0:n.type)==="Json")return`${r}: ${cs(t,this.inputType)}`;let o=!t.some(i=>typeof i=="object");return`${r}: [${o?"":` -`}${(0,Lt.default)(t.map(i=>i instanceof ge?`{ -${(0,Lt.default)(i.toString(),fn)} -}`:cs(i,this.inputType)).join(`,${o?" ":` -`}`),o?0:fn)}${o?"":` -`}]`}return`${r}: ${cs(t,this.inputType)}`}}toString(){return this._toString(this.value,this.key)}collectErrors(){var r;if(!this.hasError)return[];let t=[];if(this.error){let n=typeof((r=this.inputType)==null?void 0:r.type)=="object"?`${this.inputType.type.name}${this.inputType.isList?"[]":""}`:void 0;t.push({error:this.error,path:[this.key],id:n})}return Array.isArray(this.value)?t.concat(this.value.flatMap((n,o)=>n!=null&&n.collectErrors?n.collectErrors().map(i=>({...i,path:[this.key,o,...i.path]})):[])):this.value instanceof ge?t.concat(this.value.collectErrors().map(n=>({...n,path:[this.key,...n.path]}))):t}};u(Fe,"Arg");function So({dmmf:e,rootTypeName:t,rootField:r,select:n,modelName:o,extensions:i}){n||(n={});let s=t==="query"?e.queryType:e.mutationType,a={args:[],outputType:{isList:!1,type:s,location:"outputObjectTypes"},name:t},c={modelName:o},l=Qc({dmmf:e,selection:{[r]:n},schemaField:a,path:[t],context:c,extensions:i});return new Po(t,l)}u(So,"makeDocument");function gs(e){return e}u(gs,"transformDocument");function Qc({dmmf:e,selection:t,schemaField:r,path:n,context:o,extensions:i}){let s=r.outputType.type,a=o.modelName?i.getAllComputedFields(o.modelName):{};return t=Oc(t,a),Object.entries(t).reduce((c,[l,p])=>{let g=s.fieldMap?s.fieldMap[l]:s.fields.find(M=>M.name===l);if(a!=null&&a[l])return c;if(!g)return c.push(new de({name:l,children:[],error:{type:"invalidFieldName",modelName:s.name,providedName:l,didYouMean:bo(l,s.fields.map(M=>M.name).concat(Object.keys(a!=null?a:{}))),outputType:s}})),c;if(g.outputType.location==="scalar"&&g.args.length===0&&typeof p!="boolean")return c.push(new de({name:l,children:[],error:{type:"invalidFieldType",modelName:s.name,fieldName:l,providedValue:p}})),c;if(p===!1)return c;let y={name:g.name,fields:g.args,constraints:{minNumFields:null,maxNumFields:null}},b=typeof p=="object"?Uc(p,["include","select"]):void 0,v=b?Oo(b,y,o,[],typeof g=="string"?void 0:g.outputType.type):void 0,h=g.outputType.location==="outputObjectTypes";if(p){if(p.select&&p.include)c.push(new de({name:l,children:[new de({name:"include",args:new ge,error:{type:"includeAndSelect",field:g}})]}));else if(p.include){let M=Object.keys(p.include);if(M.length===0)return c.push(new de({name:l,children:[new de({name:"include",args:new ge,error:{type:"emptyInclude",field:g}})]})),c;if(g.outputType.location==="outputObjectTypes"){let A=g.outputType.type,S=A.fields.filter(F=>F.outputType.location==="outputObjectTypes").map(F=>F.name),_=M.filter(F=>!S.includes(F));if(_.length>0)return c.push(..._.map(F=>new de({name:F,children:[new de({name:F,args:new ge,error:{type:"invalidFieldName",modelName:A.name,outputType:A,providedName:F,didYouMean:bo(F,S)||void 0,isInclude:!0,isIncludeScalar:A.fields.some(j=>j.name===F)}})]}))),c}}else if(p.select){let M=Object.values(p.select);if(M.length===0)return c.push(new de({name:l,children:[new de({name:"select",args:new ge,error:{type:"emptySelect",field:g}})]})),c;if(M.filter(S=>S).length===0)return c.push(new de({name:l,children:[new de({name:"select",args:new ge,error:{type:"noTrueSelect",field:g}})]})),c}}let T=h?yg(e,g.outputType.type):null,O=T;p&&(p.select?O=p.select:p.include?O=ln(T,p.include):p.by&&Array.isArray(p.by)&&g.outputType.namespace==="prisma"&&g.outputType.location==="outputObjectTypes"&&gc(g.outputType.type.name)&&(O=gg(p.by)));let P;if(O!==!1&&h){let M=o.modelName;typeof g.outputType.type=="object"&&g.outputType.namespace==="model"&&g.outputType.location==="outputObjectTypes"&&(M=g.outputType.type.name),P=Qc({dmmf:e,selection:O,schemaField:g,path:[...n,l],context:{modelName:M},extensions:i})}return c.push(new de({name:l,args:v,children:P,schemaField:g})),c},[])}u(Qc,"selectionToFields");function gg(e){let t=Object.create(null);for(let r of e)t[r]=!0;return t}u(gg,"byToSelect");function yg(e,t){let r=Object.create(null);for(let n of t.fields)e.typeMap[n.outputType.type.name]!==void 0&&(r[n.name]=!0),(n.outputType.location==="scalar"||n.outputType.location==="enumTypes")&&(r[n.name]=!0);return r}u(yg,"getDefaultSelection");function fs(e,t,r,n){return new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"invalidType",providedValue:t,argName:e,requiredType:{inputType:r.inputTypes,bestFittingType:n}}})}u(fs,"getInvalidTypeArg");function Yc(e,t,r){let{isList:n}=t,o=hg(t,r),i=yr(e,t);return i===o||n&&i==="List<>"||o==="Json"&&i!=="Symbol"&&!(e instanceof Se)&&!(e instanceof Ie)||i==="Int"&&o==="BigInt"||(i==="Int"||i==="Float")&&o==="Decimal"||i==="DateTime"&&o==="String"||i==="UUID"&&o==="String"||i==="String"&&o==="ID"||i==="Int"&&o==="Float"||i==="Int"&&o==="Long"||i==="String"&&o==="Decimal"&&bg(e)||e===null?!0:t.isList&&Array.isArray(e)?e.every(s=>Yc(s,{...t,isList:!1},r)):!1}u(Yc,"hasCorrectScalarType");function hg(e,t,r=e.isList){let n=gr(e.type);return e.location==="fieldRefTypes"&&t.modelName&&(n+=`<${t.modelName}>`),on(n,r)}u(hg,"getExpectedType");var Mo=u(e=>Bc(e,(t,r)=>r!==void 0),"cleanObject");function bg(e){return/^\-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i.test(e)}u(bg,"isDecimalString");function wg(e,t,r,n){let o=null,i=[];for(let s of r.inputTypes){if(o=Eg(e,t,r,s,n),(o==null?void 0:o.collectErrors().length)===0)return o;if(o&&(o==null?void 0:o.collectErrors())){let a=o==null?void 0:o.collectErrors();a&&a.length>0&&i.push({arg:o,errors:a})}}if((o==null?void 0:o.hasError)&&i.length>0){let s=i.map(({arg:a,errors:c})=>{let l=c.map(p=>{let g=1;return p.error.type==="invalidType"&&(g=2*Math.exp(Zc(p.error.providedValue))+1),g+=Math.log(p.path.length),p.error.type==="missingArg"&&a.inputType&&xr(a.inputType.type)&&a.inputType.type.name.includes("Unchecked")&&(g*=2),p.error.type==="invalidName"&&xr(p.error.originalType)&&p.error.originalType.name.includes("Unchecked")&&(g*=2),g});return{score:c.length+xg(l),arg:a,errors:c}});return s.sort((a,c)=>a.scoret+r,0)}u(xg,"sum");function Eg(e,t,r,n,o){var p,g,y,b,v;if(typeof t=="undefined")return r.isRequired?new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"missingArg",missingName:e,missingArg:r,atLeastOne:!1,atMostOne:!1}}):null;let{isNullable:i,isRequired:s}=r;if(t===null&&!i&&!s&&!(xr(n.type)?n.type.constraints.minNumFields!==null&&n.type.constraints.minNumFields>0:!1))return new Fe({key:e,value:t,isEnum:n.location==="enumTypes",inputType:n,error:{type:"invalidNullArg",name:e,invalidType:r.inputTypes,atLeastOne:!1,atMostOne:!1}});if(!n.isList)if(xr(n.type)){if(typeof t!="object"||Array.isArray(t)||n.location==="inputObjectTypes"&&!qc(t))return fs(e,t,r,n);{let h=Mo(t),T,O=Object.keys(h||{}),P=O.length;return P===0&&typeof n.type.constraints.minNumFields=="number"&&n.type.constraints.minNumFields>0||((p=n.type.constraints.fields)==null?void 0:p.some(M=>O.includes(M)))===!1?T={type:"atLeastOne",key:e,inputType:n.type,atLeastFields:n.type.constraints.fields}:P>1&&typeof n.type.constraints.maxNumFields=="number"&&n.type.constraints.maxNumFields<2&&(T={type:"atMostOne",key:e,inputType:n.type,providedKeys:O}),new Fe({key:e,value:h===null?null:Oo(h,n.type,o,r.inputTypes),isEnum:n.location==="enumTypes",error:T,inputType:n,schemaArg:r})}}else return Wc(e,t,r,n,o);if(!Array.isArray(t)&&n.isList&&e!=="updateMany"&&(t=[t]),n.location==="enumTypes"||n.location==="scalar")return Wc(e,t,r,n,o);let a=n.type,l=(typeof((g=a.constraints)==null?void 0:g.minNumFields)=="number"&&((y=a.constraints)==null?void 0:y.minNumFields)>0?Array.isArray(t)&&t.some(h=>!h||Object.keys(Mo(h)).length===0):!1)?{inputType:a,key:e,type:"atLeastOne"}:void 0;if(!l){let h=typeof((b=a.constraints)==null?void 0:b.maxNumFields)=="number"&&((v=a.constraints)==null?void 0:v.maxNumFields)<2?Array.isArray(t)&&t.find(T=>!T||Object.keys(Mo(T)).length!==1):!1;h&&(l={inputType:a,key:e,type:"atMostOne",providedKeys:Object.keys(h)})}if(!Array.isArray(t))for(let h of r.inputTypes){let T=Oo(t,h.type,o);if(T.collectErrors().length===0)return new Fe({key:e,value:T,isEnum:!1,schemaArg:r,inputType:h})}return new Fe({key:e,value:t.map(h=>n.isList&&typeof h!="object"?h:typeof h!="object"||!t?fs(e,h,r,n):Oo(h,a,o)),isEnum:!1,inputType:n,schemaArg:r,error:l})}u(Eg,"tryInferArgs");function xr(e){return!(typeof e=="string"||Object.hasOwnProperty.call(e,"values"))}u(xr,"isInputArgType");function Wc(e,t,r,n,o){return Yc(t,n,o)?new Fe({key:e,value:t,isEnum:n.location==="enumTypes",schemaArg:r,inputType:n}):fs(e,t,r,n)}u(Wc,"scalarToArg");function Oo(e,t,r,n,o){var y;(y=t.meta)!=null&&y.source&&(r={modelName:t.meta.source});let i=Mo(e),{fields:s,fieldMap:a}=t,c=s.map(b=>[b.name,void 0]),l=Object.entries(i||{}),g=dc(l,c,b=>b[0]).reduce((b,[v,h])=>{let T=a?a[v]:s.find(P=>P.name===v);if(!T){let P=typeof h=="boolean"&&o&&o.fields.some(M=>M.name===v)?v:null;return b.push(new Fe({key:v,value:h,error:{type:"invalidName",providedName:v,providedValue:h,didYouMeanField:P,didYouMeanArg:!P&&bo(v,[...s.map(M=>M.name),"select"])||void 0,originalType:t,possibilities:n,outputType:o}})),b}let O=wg(v,h,T,r);return O&&b.push(O),b},[]);if(typeof t.constraints.minNumFields=="number"&&l.length{var v,h;return((v=b.error)==null?void 0:v.type)==="missingArg"||((h=b.error)==null?void 0:h.type)==="atLeastOne"})){let b=t.fields.filter(v=>!v.isRequired&&i&&(typeof i[v.name]=="undefined"||i[v.name]===null));g.push(...b.map(v=>{let h=v.inputTypes[0];return new Fe({key:v.name,value:void 0,isEnum:h.location==="enumTypes",error:{type:"missingArg",missingName:v.name,missingArg:v,atLeastOne:Boolean(t.constraints.minNumFields)||!1,atMostOne:t.constraints.maxNumFields===1||!1},inputType:h})}))}return new ge(g)}u(Oo,"objectToArgs");function Co({document:e,path:t,data:r}){let n=is(r,t);if(n==="undefined")return null;if(typeof n!="object")return n;let o=vg(e,t);return ms({field:o,data:n})}u(Co,"unpack");function ms({field:e,data:t}){var n;if(!t||typeof t!="object"||!e.children||!e.schemaField)return t;let r={DateTime:o=>new Date(o),Json:o=>JSON.parse(o),Bytes:o=>x.Buffer.from(o,"base64"),Decimal:o=>new Le(o),BigInt:o=>BigInt(o)};for(let o of e.children){let i=(n=o.schemaField)==null?void 0:n.outputType.type;if(i&&typeof i=="string"){let s=r[i];if(s)if(Array.isArray(t))for(let a of t)typeof a[o.name]!="undefined"&&a[o.name]!==null&&(Array.isArray(a[o.name])?a[o.name]=a[o.name].map(s):a[o.name]=s(a[o.name]));else typeof t[o.name]!="undefined"&&t[o.name]!==null&&(Array.isArray(t[o.name])?t[o.name]=t[o.name].map(s):t[o.name]=s(t[o.name]))}if(o.schemaField&&o.schemaField.outputType.location==="outputObjectTypes")if(Array.isArray(t))for(let s of t)ms({field:o,data:s[o.name]});else ms({field:o,data:t[o.name]})}return t}u(ms,"mapScalars");function vg(e,t){let r=t.slice(),n=r.shift(),o=e.children.find(i=>i.name===n);if(!o)throw new Error(`Could not find field ${n} in document ${e}`);for(;r.length>0;){let i=r.shift();if(!o.children)throw new Error(`Can't get children for field ${o} with child ${i}`);let s=o.children.find(a=>a.name===i);if(!s)throw new Error(`Can't find child ${i} of field ${o}`);o=s}return o}u(vg,"getField");function ls(e){return e.split(".").filter(t=>t!=="select").join(".")}u(ls,"removeSelectFromPath");function ds(e){if(Object.prototype.toString.call(e)==="[object Object]"){let r={};for(let n in e)if(n==="select")for(let o in e.select)r[o]=ds(e.select[o]);else r[n]=ds(e[n]);return r}return e}u(ds,"removeSelectFromObject");function Tg({ast:e,keyPaths:t,missingItems:r,valuePaths:n}){let o=t.map(ls),i=n.map(ls),s=r.map(c=>({path:ls(c.path),isRequired:c.isRequired,type:c.type}));return{ast:ds(e),keyPaths:o,missingItems:s,valuePaths:i}}u(Tg,"transformAggregatePrintJsonArgs");d();f();m();d();f();m();d();f();m();function mn(e){return{getKeys(){return Object.keys(e)},getPropertyValue(t){return e[t]}}}u(mn,"addObjectProperties");d();f();m();function Bt(e,t){return{getKeys(){return[e]},getPropertyValue(){return t()}}}u(Bt,"addProperty");d();f();m();function qt(e){let t=new Be;return{getKeys(){return e.getKeys()},getPropertyValue(r){return t.getOrCreate(r,()=>e.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}u(qt,"cacheProperties");d();f();m();var tl=X(pi());d();f();m();var Ro={enumerable:!0,configurable:!0,writable:!0};function Io(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ro,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}u(Io,"defaultProxyHandlers");var Xc=Symbol.for("nodejs.util.inspect.custom");function Ot(e,t){let r=Ag(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var c,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(c=a.has)==null?void 0:c.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=el(Reflect.ownKeys(i),r),a=el(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,p;let c=r.get(s);return((p=(l=c==null?void 0:c.getPropertyDescriptor)==null?void 0:l.call(c,s))==null?void 0:p.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=r.get(s);return a&&a.getPropertyDescriptor?{...Ro,...a.getPropertyDescriptor(s)}:Ro},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Xc]=function(i,s,a=tl.inspect){let c={...this};return delete c[Xc],a(c,s)},o}u(Ot,"createCompositeProxy");function Ag(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}u(Ag,"mapKeysToLayers");function el(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}u(el,"getExistingKeys");d();f();m();function ys(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u(ys,"removeProperties");d();f();m();d();f();m();d();f();m();var dn="";function rl(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=Og(n)||Cg(n)||_g(n)||Ng(n)||Dg(n);return o&&r.push(o),r},[])}u(rl,"parse");var Pg=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Mg=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Og(e){var t=Pg.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=Mg.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||dn,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}u(Og,"parseChrome");var Sg=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Cg(e){var t=Sg.exec(e);return t?{file:t[2],methodName:t[1]||dn,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}u(Cg,"parseWinjs");var Rg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ig=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function _g(e){var t=Rg.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Ig.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||dn,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}u(_g,"parseGecko");var Fg=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Dg(e){var t=Fg.exec(e);return t?{file:t[3],methodName:t[1]||dn,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}u(Dg,"parseJSC");var kg=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ng(e){var t=kg.exec(e);return t?{file:t[2],methodName:t[1]||dn,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}u(Ng,"parseNode");var _o=class{getLocation(){return null}};u(_o,"DisabledCallSite");var Fo=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=rl(t).find(o=>o.file&&o.file!==""&&!o.file.includes("@prisma")&&!o.file.includes("getPrismaClient")&&!o.file.startsWith("internal/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4);return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};u(Fo,"EnabledCallSite");function at(e){return e==="minimal"?new _o:new Fo}u(at,"getCallSite");d();f();m();function Ze(e){let t,r=u((n,o,i=!0)=>{try{return i===!0?t!=null?t:t=nl(e(n,o)):nl(e(n,o))}catch(s){return Promise.reject(s)}},"_callback");return{then(n,o,i){return r(hs(i),void 0).then(n,o,i)},catch(n,o){return r(hs(o),void 0).catch(n,o)},finally(n,o){return r(hs(o),void 0).finally(n,o)},requestTransaction(n,o){let i={kind:"batch",...n},s=r(i,o,!1);return s.requestTransaction?s.requestTransaction(i,o):s},[Symbol.toStringTag]:"PrismaPromise"}}u(Ze,"createPrismaPromise");function hs(e){if(e)return{kind:"itx",...e}}u(hs,"createItx");function nl(e){return typeof e.then=="function"?e:Promise.resolve(e)}u(nl,"valueToPromise");d();f();m();d();f();m();d();f();m();var ol={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Er(e={}){let t=$g(e);return Object.entries(t).reduce((n,[o,i])=>(ol[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}u(Er,"desugarUserArgs");function $g(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}u($g,"desugarCountInUserArgs");function Do(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}u(Do,"createUnpacker");function il(e,t){let r=Do(e);return t({action:"aggregate",unpacker:r,argsMapper:Er})(e)}u(il,"aggregate");d();f();m();function Lg(e={}){let{select:t,...r}=e;return typeof t=="object"?Er({...r,_count:t}):Er({...r,_count:{_all:!0}})}u(Lg,"desugarUserArgs");function Bg(e={}){return typeof e.select=="object"?t=>Do(e)(t)._count:t=>Do(e)(t)._count._all}u(Bg,"createUnpacker");function sl(e,t){return t({action:"count",unpacker:Bg(e),argsMapper:Lg})(e)}u(sl,"count");d();f();m();function qg(e={}){let t=Er(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);return t}u(qg,"desugarUserArgs");function Ug(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}u(Ug,"createUnpacker");function al(e,t){return t({action:"groupBy",unpacker:Ug(e),argsMapper:qg})(e)}u(al,"groupBy");function ul(e,t,r){if(t==="aggregate")return n=>il(n,r);if(t==="count")return n=>sl(n,r);if(t==="groupBy")return n=>al(n,r)}u(ul,"applyAggregates");d();f();m();function cl(e){let t=e.fields.filter(n=>!n.relationName),r=qi(t,n=>n.name);return new Proxy({},{get(n,o){if(o in n||typeof o=="symbol")return n[o];let i=r[o];if(i)return new Ie(e.name,o,i.type,i.isList)},...Io(Object.keys(r))})}u(cl,"applyFieldsProxy");d();f();m();function Vg(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}u(Vg,"getNextDataPath");function Gg(e,t,r){return t===void 0?e!=null?e:{}:To(t,r,e||!0)}u(Gg,"getNextUserArgs");function bs(e,t,r,n,o,i){let a=e._baseDmmf.modelMap[t].fields.reduce((c,l)=>({...c,[l.name]:l}),{});return c=>{let l=at(e._errorFormat),p=Vg(n,o),g=Gg(c,i,p),y=r({dataPath:p,callsite:l})(g),b=Kg(e,t);return new Proxy(y,{get(v,h){if(!b.includes(h))return v[h];let O=[a[h].type,r,h],P=[p,g];return bs(e,...O,...P)},...Io([...b,...Object.getOwnPropertyNames(y)])})}}u(bs,"applyFluent");function Kg(e,t){return e._baseDmmf.modelMap[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u(Kg,"getOwnKeys");d();f();m();d();f();m();d();f();m();var ko=ll().version;var De=class extends le{constructor(t){super(t,{code:"P2025",clientVersion:ko}),this.name="NotFoundError"}};u(De,"NotFoundError");function ws(e,t,r,n){let o;if(r&&typeof r=="object"&&"rejectOnNotFound"in r&&r.rejectOnNotFound!==void 0)o=r.rejectOnNotFound,delete r.rejectOnNotFound;else if(typeof n=="boolean")o=n;else if(n&&typeof n=="object"&&e in n){let i=n[e];if(i&&typeof i=="object")return t in i?i[t]:void 0;o=ws(e,t,r,i)}else typeof n=="function"?o=n:o=!1;return o}u(ws,"getRejectOnNotFound");var zg=/(findUnique|findFirst)/;function pl(e,t,r,n){if(n&&!e&&zg.exec(t))throw typeof n=="boolean"&&n?new De(`No ${r} found`):typeof n=="function"?n(new De(`No ${r} found`)):Rr(n)?n:new De(`No ${r} found`)}u(pl,"throwIfNotFound");function fl(e,t,r){return e===We.ModelAction.findFirstOrThrow||e===We.ModelAction.findUniqueOrThrow?Hg(t,r):r}u(fl,"adaptErrors");function Hg(e,t){return async r=>{if("rejectOnNotFound"in r.args){let o=wr({originalMethod:r.clientMethod,callsite:r.callsite,message:"'rejectOnNotFound' option is not supported"});throw new ye(o)}return await t(r).catch(o=>{throw o instanceof le&&o.code==="P2025"?new De(`No ${e} found`):o})}}u(Hg,"applyOrThrowWrapper");var Wg=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Qg=["aggregate","count","groupBy"];function xs(e,t){var o;let r=[Yg(e,t)];(o=e._engineConfig.previewFeatures)!=null&&o.includes("fieldReference")&&r.push(ey(e,t));let n=e._extensions.getAllModelExtensions(t);return n&&r.push(mn(n)),Ot({},r)}u(xs,"applyModel");function Yg(e,t){let r=Ye(t),n=Zg(e,t);return{getKeys(){return n},getPropertyValue(o){let i=o,s=u(c=>e._request(c),"requestFn");s=fl(i,t,s);let a=u(c=>l=>{let p=at(e._errorFormat);return Ze((g,y)=>{let b={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:g,lock:y,callsite:p};return s({...b,...c})})},"action");return Wg.includes(i)?bs(e,t,a):Xg(o)?ul(e,o,a):a({})}}}u(Yg,"modelActionsLayer");function Zg(e,t){let r=Object.keys(e._baseDmmf.mappingsMap[t]).filter(n=>n!=="model"&&n!=="plural");return r.push("count"),r}u(Zg,"getOwnKeys");function Xg(e){return Qg.includes(e)}u(Xg,"isValidAggregateName");function ey(e,t){return qt(Bt("fields",()=>{let r=e._baseDmmf.modelMap[t];return cl(r)}))}u(ey,"fieldsPropertyLayer");d();f();m();function ml(e){return e.replace(/^./,t=>t.toUpperCase())}u(ml,"jsToDMMFModelName");var Es=Symbol();function No(e){let t=[ty(e),Bt(Es,()=>e)],r=e._extensions.getAllClientExtensions();return r&&t.push(mn(r)),Ot(e,t)}u(No,"applyModelsAndClientExtensions");function ty(e){let t=Object.keys(e._baseDmmf.modelMap),r=t.map(Ye),n=[...new Set(t.concat(r))];return qt({getKeys(){return n},getPropertyValue(o){let i=ml(o);if(e._baseDmmf.modelMap[i]!==void 0)return xs(e,i);if(e._baseDmmf.modelMap[o]!==void 0)return xs(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}u(ty,"modelsLayer");function dl(e){return e[Es]?e[Es]:e}u(dl,"unapplyModelsAndClientExtensions");function gl(e){if(!this._hasPreviewFlag("clientExtensions"))throw new ye("Extensions are not yet generally available, please add `clientExtensions` to the `previewFeatures` field in the `generator` block in the `schema.prisma` file.");if(typeof e=="function")return e(this);let t=dl(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)}});return No(r)}u(gl,"$extends");d();f();m();d();f();m();function Xe(e){if(typeof e!="object")return e;var t,r,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){r=new e.constructor;for(t in e)e.hasOwnProperty(t)&&r[t]!==e[t]&&(r[t]=Xe(e[t]))}else{r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Xe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=Xe(e[t])}return r}if(n==="[object Array]"){for(t=e.length,r=Array(t);t--;)r[t]=Xe(e[t]);return r}return n==="[object Set]"?(r=new Set,e.forEach(function(o){r.add(Xe(o))}),r):n==="[object Map]"?(r=new Map,e.forEach(function(o,i){r.set(Xe(i),Xe(o))}),r):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(r=new RegExp(e.source,e.flags),r.lastIndex=e.lastIndex,r):n==="[object DataView]"?new e.constructor(Xe(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}u(Xe,"klona");function yl(e,t,r,n=0){return r.length===0?e._executeRequest(t):Ze((o,i)=>{var s,a;return o!==void 0&&((s=t.lock)==null||s.then(),t.transaction=o,t.lock=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.action,args:Xe((a=t.args)!=null?a:{}),query:c=>(t.args=c,yl(e,t,r,n+1))})})}u(yl,"iterateAndCallQueryCallbacks");function hl(e,t){let{jsModelName:r,action:n}=t;return r===void 0||e._extensions.isEmpty()?e._executeRequest(t):yl(e,t,e._extensions.getAllQueryCallbacks(r,n))}u(hl,"applyQueryExtensions");d();f();m();d();f();m();function bl(e){let t;return{get(){return t||(t={value:e()}),t.value}}}u(bl,"lazyProperty");var gn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new Be;this.modelExtensionsCache=new Be;this.queryCallbacksCache=new Be;this.clientExtensions=bl(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...so(this.extension.name,this.extension.client)}:(t=this.previous)==null?void 0:t.getAllClientExtensions()})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Mc((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=Ye(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...so(this.extension.name,this.extension.model.$allModels),...so(this.extension.name,this.extension.model[r])}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=this.extension.query;if(!o||!(o[t]||o.$allModels))return n;let i=[];return o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),n.concat(i.map(c=>Zr(this.extension.name,c)))})}};u(gn,"MergedExtensionsListNode");var ut=class{constructor(t){this.head=t}static empty(){return new ut}static single(t){return new ut(new gn(t))}isEmpty(){return this.head===void 0}append(t){return new ut(new gn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}};u(ut,"MergedExtensionsList");d();f();m();function wl(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}u(wl,"getLockCountPromise");d();f();m();function xl(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)}u(xl,"getLogLevel");d();f();m();function vl(e,t,r){let n=El(e,r),o=El(t,r),i=Object.values(o).map(a=>a[a.length-1]),s=Object.keys(o);return Object.entries(n).forEach(([a,c])=>{s.includes(a)||i.push(c[c.length-1])}),i}u(vl,"mergeBy");var El=u((e,t)=>e.reduce((r,n)=>{let o=t(n);return r[o]||(r[o]=[]),r[o].push(n),r},{}),"groupBy");d();f();m();var yn=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}};u(yn,"MiddlewareHandler");var hn=class{constructor(){this.query=new yn;this.engine=new yn}};u(hn,"Middlewares");d();f();m();var Ml=X(Qn());d();f();m();function Tl({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let c=a.needs.filter(l=>!r[l]);c.length>0&&s.push(ys(c))}ry(e,a.needs)&&i.push(ny(a,Ot(e,i)))}return i.length>0||s.length>0?Ot(e,[...i,...s]):e}u(Tl,"applyResultExtensions");function ry(e,t){return t.every(r=>Li(e,r))}u(ry,"areNeedsMet");function ny(e,t){return qt(Bt(e.name,()=>e.compute(t)))}u(ny,"computedPropertyLayer");d();f();m();function jo({visitor:e,result:t,args:r,dmmf:n,model:o}){var s;if(Array.isArray(t)){for(let a=0;al.name===i);if(!a||a.kind!=="object"||!a.relationName)continue;let c=typeof s=="object"?s:{};t[i]=jo({visitor:o,result:t[i],args:c,model:n.getModelMap()[a.type],dmmf:n})}}u(Al,"visitNested");d();f();m();var bn=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,w.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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)}):this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{var p;let i=Pl(o[0]),s=o.map(g=>String(g.document)),a=nr({context:o[0].otelParentCtx,tracingConfig:t._tracingConfig});a&&(i.headers.traceparent=a);let c=o.some(g=>g.document.type==="mutation"),l=((p=i.transaction)==null?void 0:p.kind)==="batch"?i.transaction:void 0;return this.client._engine.requestBatch({queries:s,headers:i.headers,transaction:l,containsWrite:c})},singleLoader:o=>{var c;let i=Pl(o),s=String(o.document),a=((c=i.transaction)==null?void 0:c.kind)==="itx"?i.transaction:void 0;return this.client._engine.request({query:s,headers:i.headers,transaction:a,isWrite:o.document.type==="mutation"})},batchBy:o=>{var i;return(i=o.transaction)!=null&&i.id?`transaction-${o.transaction.id}`:sy(o)}})}async request({document:t,dataPath:r=[],rootField:n,typeName:o,isList:i,callsite:s,rejectOnNotFound:a,clientMethod:c,engineHook:l,args:p,headers:g,transaction:y,unpacker:b,extensions:v,otelParentCtx:h,otelChildCtx:T}){if(this.hooks&&this.hooks.beforeRequest){let O=String(t);this.hooks.beforeRequest({query:O,path:r,rootField:n,typeName:o,document:t,isList:i,clientMethod:c,args:p})}try{let O,P;if(l){let S=await l({document:t,runInTransaction:Boolean(y)},_=>this.dataloader.request({..._,tracingConfig:this.client._tracingConfig}));O=S.data,P=S.elapsed}else{let S=await this.dataloader.request({document:t,headers:g,transaction:y,otelParentCtx:h,otelChildCtx:T,tracingConfig:this.client._tracingConfig});O=S==null?void 0:S.data,P=S==null?void 0:S.elapsed}let M=this.unpack(t,O,r,n,b);pl(M,c,o,a);let A=this.applyResultExtensions({result:M,modelName:o,args:p,extensions:v});return w.env.PRISMA_CLIENT_GET_TIME?{data:A,elapsed:P}:A}catch(O){this.handleAndLogRequestError({error:O,clientMethod:c,callsite:s,transaction:y})}}handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:o}){try{this.handleRequestError({error:t,clientMethod:r,callsite:n,transaction:o})}catch(i){throw this.logEmmitter&&this.logEmmitter.emit("error",{message:i.message,target:r,timestamp:new Date}),i}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:o}){if(oy(t),iy(t,o)||t instanceof De)throw t;let i=t.message;throw n&&(i=wr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:i})),i=this.sanitizeMessage(i),t.code?new le(i,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new He(i,this.client._clientVersion):t instanceof Me?new Me(i,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof Pe?new Pe(i,this.client._clientVersion):t instanceof He?new He(i,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ml.default)(t):t}unpack(t,r,n,o,i){r!=null&&r.data&&(r=r.data),i&&(r[o]=i(r[o]));let s=[];return o&&s.push(o),s.push(...n.filter(a=>a!=="select"&&a!=="include")),Co({document:t,data:r,path:s})}applyResultExtensions({result:t,modelName:r,args:n,extensions:o}){if(o.isEmpty()||t==null)return t;let i=this.client._baseDmmf.getModelMap()[r];return i?jo({result:t,args:n!=null?n:{},model:i,dmmf:this.client._baseDmmf,visitor(s,a,c){let l=Ye(a.name);return Tl({result:s,modelName:l,select:c.select,extensions:o})}}):t}get[Symbol.toStringTag](){return"RequestHandler"}};u(wn,"RequestHandler");function iy(e,t){return Nr(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}u(iy,"isMismatchingBatchIndex");function sy(e){var n;if(!e.document.children[0].name.startsWith("findUnique"))return;let t=(n=e.document.children[0].args)==null?void 0:n.args.map(o=>o.value instanceof ge?`${o.key}-${o.value.args.map(i=>i.key).join(",")}`:o.key).join(","),r=e.document.children[0].children.join(",");return`${e.document.children[0].name}|${t}|${r}`}u(sy,"batchFindUniqueBy");d();f();m();function Ol(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Sl(t[n]);return r})}u(Ol,"deserializeRawResults");function Sl({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new Le(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Sl);default:return t}}u(Sl,"deserializeValue");d();f();m();var xn=u(e=>e.reduce((t,r,n)=>`${t}@P${n}${r}`),"mssqlPreparedStatement");d();f();m();function Ue(e){try{return Cl(e,"fast")}catch(t){return Cl(e,"slow")}}u(Ue,"serializeRawParameters");function Cl(e,t){return JSON.stringify(e.map(r=>ay(r,t)))}u(Cl,"serializeRawParametersInternal");function ay(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:uy(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Le.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:cy(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Il(e):e}u(ay,"encodeParameter");function uy(e){return e instanceof Date?!0:Object.prototype.toString.call(e)==="[object Date]"&&typeof e.toJSON=="function"}u(uy,"isDate");function cy(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}u(cy,"isArrayBufferLike");function Il(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Rl);let t={};for(let r of Object.keys(e))t[r]=Rl(e[r]);return t}u(Il,"preprocessObject");function Rl(e){return typeof e=="bigint"?e.toString():Il(e)}u(Rl,"preprocessValueInObject");d();f();m();var kl=X(Qi());var _l=["datasources","errorFormat","log","__internal","rejectOnNotFound"],Fl=["pretty","colorless","minimal"],Dl=["info","query","warn","error"],ly={datasources:(e,t)=>{if(!!e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=vr(r,t)||`Available datasources: ${t.join(", ")}`;throw new oe(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new oe(`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[o,i]of Object.entries(n)){if(o!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},errorFormat:e=>{if(!!e){if(typeof e!="string")throw new oe(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Fl.includes(e)){let t=vr(e,Fl);throw new oe(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Dl.includes(r)){let n=vr(r,Dl);throw new oe(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}u(t,"validateLogLevel");for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=vr(o,i);throw new oe(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new oe(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new oe(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=vr(r,t);throw new oe(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}},rejectOnNotFound:e=>{if(!!e){if(Rr(e)||typeof e=="boolean"||typeof e=="object"||typeof e=="function")return e;throw new oe(`Invalid rejectOnNotFound expected a boolean/Error/{[modelName: Error | boolean]} but received ${JSON.stringify(e)}`)}}};function Nl(e,t){for(let[r,n]of Object.entries(e)){if(!_l.includes(r)){let o=vr(r,_l);throw new oe(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}ly[r](n,t)}}u(Nl,"validatePrismaClientOptions");function vr(e,t){if(t.length===0||typeof e!="string")return"";let r=py(e,t);return r?` Did you mean "${r}"?`:""}u(vr,"getDidYouMean");function py(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,kl.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=u(()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},"settleOnePromise"),c=u(l=>{i||(i=!0,r(l))},"immediatelyReject");for(let l=0;l{n[l]=p,a()},p=>{if(!Nr(p)){c(p);return}p.batchRequestIdx===l?c(p):(o||(o=p),a())})})}u(jl,"waitForBatch");var he=Je("prisma:client"),fy=/^(\s*alter\s)/i;typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);function $l(e){return Array.isArray(e)}u($l,"isReadonlyArray");function vs(e,t,r){if(t.length>0&&fy.exec(e))throw new Error(`Running ALTER using ${r} 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 -`)}u(vs,"checkAlter");var my={findUnique:"query",findUniqueOrThrow:"query",findFirst:"query",findFirstOrThrow:"query",findMany:"query",count:"query",create:"mutation",createMany:"mutation",update:"mutation",updateMany:"mutation",upsert:"mutation",delete:"mutation",deleteMany:"mutation",executeRaw:"mutation",queryRaw:"mutation",aggregate:"query",groupBy:"query",runCommandRaw:"mutation",findRaw:"query",aggregateRaw:"query"},dy=Symbol.for("prisma.client.transaction.id"),gy={id:0,nextId(){return++this.id}};function ql(e){class t{constructor(n){this._middlewares=new hn;this._getDmmf=$i(async n=>{try{let o=await this._engine.getDmmf();return new st(Ac(o))}catch(o){this._fetcher.handleAndLogRequestError({...n,error:o})}});this.$extends=gl;var a,c,l,p,g,y,b,v,h;n&&Nl(n,e.datasourceNames);let o=new Bl.EventEmitter().on("error",T=>{});this._extensions=ut.empty(),this._previewFeatures=(c=(a=e.generator)==null?void 0:a.previewFeatures)!=null?c:[],this._rejectOnNotFound=n==null?void 0:n.rejectOnNotFound,this._clientVersion=(l=e.clientVersion)!=null?l:ko,this._activeProvider=e.activeProvider,this._dataProxy=e.dataProxy,this._tracingConfig=Oi(this._previewFeatures),this._clientEngineType=di(e.generator);let i={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&En.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&En.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s=!1;try{let T=n!=null?n:{},O=(p=T.__internal)!=null?p:{},P=O.debug===!0;P&&Je.enable("prisma:client"),O.hooks&&(this._hooks=O.hooks);let M=En.default.resolve(e.dirname,e.relativePath);Dn.existsSync(M)||(M=e.dirname),he("dirname",e.dirname),he("relativePath",e.relativePath),he("cwd",M);let A=T.datasources||{},S=Object.entries(A).filter(([j,V])=>V&&V.url).map(([j,{url:V}])=>({name:j,url:V})),_=vl([],S,j=>j.name),F=O.engine||{};if(T.errorFormat?this._errorFormat=T.errorFormat:w.env.NODE_ENV==="production"?this._errorFormat="minimal":w.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._baseDmmf=new Pt(e.document),this._dataProxy){let j=e.document;this._dmmf=new st(j)}if(this._engineConfig={cwd:M,dirname:e.dirname,enableDebugLogs:P,allowTriggerPanic:F.allowTriggerPanic,datamodelPath:En.default.join(e.dirname,(g=e.filename)!=null?g:"schema.prisma"),prismaPath:(y=F.binaryPath)!=null?y:void 0,engineEndpoint:F.endpoint,datasources:_,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:T.log&&xl(T.log),logQueries:T.log&&Boolean(typeof T.log=="string"?T.log==="query":T.log.find(j=>typeof j=="string"?j==="query":j.level==="query")),env:(h=(v=s==null?void 0:s.parsed)!=null?v:(b=e.injectableEdgeEnv)==null?void 0:b.parsed)!=null?h:{},flags:[],clientVersion:e.clientVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingConfig:this._tracingConfig,logEmitter:o},he("clientVersion",e.clientVersion),he("clientEngineType",this._dataProxy?"dataproxy":this._clientEngineType),this._dataProxy&&he("using Data Proxy with edge runtime"),this._engine=this.getEngine(),this._getActiveProvider(),this._fetcher=new wn(this,this._hooks,o),T.log)for(let j of T.log){let V=typeof j=="string"?j:j.emit==="stdout"?j.level:null;V&&this.$on(V,te=>{var G;cr.log(`${(G=cr.tags[V])!=null?G:""}`,te.message||te.query)})}this._metrics=new jt(this._engine)}catch(T){throw T.clientVersion=this._clientVersion,T}return No(this)}get[Symbol.toStringTag](){return"PrismaClient"}getEngine(){if(this._dataProxy===!0)return new ur(this._engineConfig);if(this._clientEngineType==="library")return!1;if(this._clientEngineType==="binary")return!1;throw new ye("Invalid client engine type, please use `library` or `binary`")}$use(n,o){if(typeof n=="function")this._middlewares.query.use(n);else if(n==="all")this._middlewares.query.use(o);else if(n==="engine")this._middlewares.engine.use(o);else throw new Error(`Invalid middleware ${n}`)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,c,l,p;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(c=s==null?void 0:s.params)!=null?c:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(p=s==null?void 0:s.message)!=null?p:i.message,target:i.target})})}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async _runDisconnect(){await this._engine.stop(),delete this._connectionPromise,this._engine=this.getEngine(),delete this._disconnectionPromise,delete this._getConfigPromise}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{za(),this._dataProxy||(this._dmmf=void 0)}}async _getActiveProvider(){try{let n=await this._engine.getConfig();this._activeProvider=n.datasources[0].activeProvider}catch(n){}}$executeRawInternal(n,o,i,...s){let a="",c;if(typeof i=="string")a=i,c={values:Ue(s||[]),__prismaRawParameters__:!0},vs(a,s,"prisma.$executeRawUnsafe(, [...values])");else if($l(i))switch(this._activeProvider){case"sqlite":case"mysql":{let p=new ce(i,s);a=p.sql,c={values:Ue(p.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":{let p=new ce(i,s);a=p.text,vs(a,p.values,"prisma.$executeRaw``"),c={values:Ue(p.values),__prismaRawParameters__:!0};break}case"sqlserver":{a=xn(i),c={values:Ue(s),__prismaRawParameters__:!0};break}default:throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`)}else{switch(this._activeProvider){case"sqlite":case"mysql":a=i.sql;break;case"cockroachdb":case"postgresql":a=i.text,vs(a,i.values,"prisma.$executeRaw(sql``)");break;case"sqlserver":a=xn(i.strings);break;default:throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`)}c={values:Ue(i.values),__prismaRawParameters__:!0}}c!=null&&c.values?he(`prisma.$executeRaw(${a}, ${c.values})`):he(`prisma.$executeRaw(${a})`);let l={query:a,parameters:c};return he("Prisma Client call:"),this._request({args:l,clientMethod:"$executeRaw",dataPath:[],action:"executeRaw",callsite:at(this._errorFormat),transaction:n,lock:o})}$executeRaw(n,...o){return Ze((i,s)=>{if(n.raw!==void 0||n.sql!==void 0)return this.$executeRawInternal(i,s,n,...o);throw new ye("`$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")})}$executeRawUnsafe(n,...o){return Ze((i,s)=>this.$executeRawInternal(i,s,n,...o))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ye(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`);return Ze((o,i)=>this._request({args:{command:n},clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",callsite:at(this._errorFormat),transaction:o,lock:i}))}async $queryRawInternal(n,o,i,...s){let a="",c;if(typeof i=="string")a=i,c={values:Ue(s||[]),__prismaRawParameters__:!0};else if($l(i))switch(this._activeProvider){case"sqlite":case"mysql":{let p=new ce(i,s);a=p.sql,c={values:Ue(p.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":{let p=new ce(i,s);a=p.text,c={values:Ue(p.values),__prismaRawParameters__:!0};break}case"sqlserver":{let p=new ce(i,s);a=xn(p.strings),c={values:Ue(p.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`)}else{switch(this._activeProvider){case"sqlite":case"mysql":a=i.sql;break;case"cockroachdb":case"postgresql":a=i.text;break;case"sqlserver":a=xn(i.strings);break;default:throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`)}c={values:Ue(i.values),__prismaRawParameters__:!0}}c!=null&&c.values?he(`prisma.queryRaw(${a}, ${c.values})`):he(`prisma.queryRaw(${a})`);let l={query:a,parameters:c};return he("Prisma Client call:"),this._request({args:l,clientMethod:"$queryRaw",dataPath:[],action:"queryRaw",callsite:at(this._errorFormat),transaction:n,lock:o}).then(Ol)}$queryRaw(n,...o){return Ze((i,s)=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,s,n,...o);throw new ye("`$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")})}$queryRawUnsafe(n,...o){return Ze((i,s)=>this.$queryRawInternal(i,s,n,...o))}__internal_triggerPanic(n){if(!this._engineConfig.allowTriggerPanic)throw new Error(`In order to use .__internal_triggerPanic(), please enable it like so: -new PrismaClient({ - __internal: { - engine: { - allowTriggerPanic: true - } - } -})`);let o=n?{"X-DEBUG-FATAL":"1"}:{"X-DEBUG-NON-FATAL":"1"};return this._request({action:"queryRaw",args:{query:"SELECT 1",parameters:void 0},clientMethod:"queryRaw",dataPath:[],headers:o,callsite:at(this._errorFormat)})}_transactionWithArray({promises:n,options:o}){let i=gy.nextId(),s=wl(n.length),a=n.map((c,l)=>{var p,g;if((c==null?void 0:c[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.");return(g=(p=c.requestTransaction)==null?void 0:p.call(c,{id:i,index:l,isolationLevel:o==null?void 0:o.isolationLevel},s))!=null?g:c});return jl(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:nr({tracingConfig:this._tracingConfig})},s=await this._engine.transaction("start",i,o),a;try{a=await n(Ts(this,{id:s.id,payload:s.payload})),await this._engine.transaction("commit",i,s)}catch(c){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),c}return a}$transaction(n,o){let i;typeof n=="function"?i=u(()=>this._transactionWithCallback({callback:n,options:o}),"callback"):i=u(()=>this._transactionWithArray({promises:n,options:o}),"callback");let s={name:"transaction",enabled:this._tracingConfig.enabled,attributes:{method:"$transaction"}};return or(s,i)}async _request(n){n.otelParentCtx=wt.active();try{let o={args:n.args,dataPath:n.dataPath,runInTransaction:Boolean(n.transaction),action:n.action,model:n.model},i={middleware:{name:"middleware",enabled:this._tracingConfig.middleware,attributes:{method:"$use"},active:!1},operation:{name:"operation",enabled:this._tracingConfig.enabled,attributes:{method:o.action,model:o.model,name:`${o.model}.${o.action}`}}},s=-1,a=u(c=>{let l=this._middlewares.query.get(++s);if(l)return or(i.middleware,async b=>l(c,v=>(b==null||b.end(),a(v))));let{runInTransaction:p,...g}=c,y={...n,...g};return p||(y.transaction=void 0),hl(this,y)},"consumer");return await or(i.operation,()=>a(o))}catch(o){throw o.clientVersion=this._clientVersion,o}}async _executeRequest({args:n,clientMethod:o,jsModelName:i,dataPath:s,callsite:a,action:c,model:l,headers:p,argsMapper:g,transaction:y,lock:b,unpacker:v,otelParentCtx:h}){var te,G;this._dmmf===void 0&&(this._dmmf=await this._getDmmf({clientMethod:o,callsite:a})),n=g?g(n):n;let T,O=my[c];(c==="executeRaw"||c==="queryRaw"||c==="runCommandRaw")&&(T=c);let P;if(l!==void 0){if(P=(te=this._dmmf)==null?void 0:te.mappingsMap[l],P===void 0)throw new Error(`Could not find mapping for model ${l}`);T=P[c==="count"?"aggregate":c]}if(O!=="query"&&O!=="mutation")throw new Error(`Invalid operation ${O} for action ${c}`);let M=(G=this._dmmf)==null?void 0:G.rootFieldMap[T];if(M===void 0)throw new Error(`Could not find rootField ${T} for action ${c} for model ${l} on rootType ${O}`);let{isList:A}=M.outputType,S=$t(M.outputType.type),_=ws(c,S,n,this._rejectOnNotFound);hy(_,i,c);let F=u(()=>{let K=So({dmmf:this._dmmf,rootField:T,rootTypeName:O,select:n,modelName:l,extensions:this._extensions});return K.validate(n,!1,o,this._errorFormat,a),K},"serializationFn"),j={name:"serialize",enabled:this._tracingConfig.enabled},V=await or(j,F);if(Je.enabled("prisma:client")){let K=String(V);he("Prisma Client call:"),he(`prisma.${o}(${Ao({ast:n,keyPaths:[],valuePaths:[],missingItems:[]})})`),he("Generated request:"),he(K+` -`)}return await b,this._fetcher.request({document:V,clientMethod:o,typeName:S,dataPath:s,rejectOnNotFound:_,isList:A,rootField:T,callsite:a,args:n,engineHook:this._middlewares.engine.get(0),extensions:this._extensions,headers:p,transaction:y,unpacker:v,otelParentCtx:h,otelChildCtx:wt.active()})}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new ye("`metrics` preview feature must be enabled in order to access metrics API");return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return u(t,"PrismaClient"),t}u(ql,"getPrismaClient");var Ll=["$connect","$disconnect","$on","$transaction","$use","$extends"];function Ts(e,t){return typeof e!="object"?e:new Proxy(e,{get:(r,n)=>{if(!Ll.includes(n))return n===dy?t==null?void 0:t.id:typeof r[n]=="function"?(...o)=>n==="then"?r[n](o[0],o[1],t):n==="catch"||n==="finally"?r[n](o[0],t):Ts(r[n](...o),t):Ts(r[n],t)},has(r,n){return Ll.includes(n)?!1:Reflect.has(r,n)}})}u(Ts,"transactionProxy");var yy={findUnique:"findUniqueOrThrow",findFirst:"findFirstOrThrow"};function hy(e,t,r){if(e){let n=yy[r],o=t?`prisma.${t}.${n}`:`prisma.${n}`,i=`rejectOnNotFound.${t!=null?t:""}.${r}`;Ui(i,`\`rejectOnNotFound\` option is deprecated and will be removed in Prisma 5. Please use \`${o}\` method instead`)}}u(hy,"warnAboutRejectOnNotFound");d();f();m();var by=new Set(["toJSON","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ul(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!by.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u(Ul,"makeStrictEnum");d();f();m();d();f();m();var wy=Vl.decompressFromBase64;0&&(module.exports={DMMF,DMMFClass,Debug,Decimal,Engine,Extensions,MetricsClient,NotFoundError,PrismaClientExtensionError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Sql,Types,decompressFromBase64,empty,findSync,getPrismaClient,join,makeDocument,makeStrictEnum,objectEnumValues,raw,sqltag,transformDocument,unpack,warnEnvConflicts}); diff --git a/packages/desktop/prisma/client/runtime/index-browser.d.ts b/packages/desktop/prisma/client/runtime/index-browser.d.ts deleted file mode 100644 index 0c524a0..0000000 --- a/packages/desktop/prisma/client/runtime/index-browser.d.ts +++ /dev/null @@ -1,323 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { -} - -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; - private readonly toStringTag: string; - - 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 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 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; - }; -}; - -export { } diff --git a/packages/desktop/prisma/client/runtime/index-browser.js b/packages/desktop/prisma/client/runtime/index-browser.js deleted file mode 100644 index a4a94bd..0000000 --- a/packages/desktop/prisma/client/runtime/index-browser.js +++ /dev/null @@ -1,2479 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2); - -// src/runtime/index-browser.ts -var index_browser_exports = {}; -__export(index_browser_exports, { - Decimal: () => decimal_default, - makeStrictEnum: () => makeStrictEnum, - objectEnumValues: () => objectEnumValues -}); -module.exports = __toCommonJS(index_browser_exports); - -// src/runtime/object-enums.ts -var secret = Symbol(); -var representations = /* @__PURE__ */ new WeakMap(); -var ObjectEnumValue = class { - constructor(arg) { - if (arg === secret) { - representations.set(this, `Prisma.${this._getName()}`); - } else { - representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - } - _getName() { - return this.constructor.name; - } - toString() { - return representations.get(this); - } -}; -__name(ObjectEnumValue, "ObjectEnumValue"); -var NullTypesEnumValue = class extends ObjectEnumValue { - _getNamespace() { - return "NullTypes"; - } -}; -__name(NullTypesEnumValue, "NullTypesEnumValue"); -var DbNull = class extends NullTypesEnumValue { -}; -__name(DbNull, "DbNull"); -var JsonNull = class extends NullTypesEnumValue { -}; -__name(JsonNull, "JsonNull"); -var AnyNull = class extends NullTypesEnumValue { -}; -__name(AnyNull, "AnyNull"); -var objectEnumValues = { - classes: { - DbNull, - JsonNull, - AnyNull - }, - instances: { - DbNull: new DbNull(secret), - JsonNull: new JsonNull(secret), - AnyNull: new AnyNull(secret) - } -}; - -// src/runtime/strictEnum.ts -var allowList = /* @__PURE__ */ new Set([ - "toJSON", - "asymmetricMatch", - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive -]); -function makeStrictEnum(definition) { - return new Proxy(definition, { - get(target, property) { - if (property in target) { - return target[property]; - } - if (allowList.has(property)) { - return void 0; - } - throw new TypeError(`Invalid enum value: ${String(property)}`); - } - }); -} -__name(makeStrictEnum, "makeStrictEnum"); - -// ../../node_modules/.pnpm/decimal.js@10.4.2/node_modules/decimal.js/decimal.mjs -var EXP_LIMIT = 9e15; -var MAX_DIGITS = 1e9; -var NUMERALS = "0123456789abcdef"; -var LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058"; -var PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789"; -var DEFAULTS = { - precision: 20, - rounding: 4, - modulo: 1, - toExpNeg: -7, - toExpPos: 21, - minE: -EXP_LIMIT, - maxE: EXP_LIMIT, - crypto: false -}; -var inexact; -var quadrant; -var external = true; -var decimalError = "[DecimalError] "; -var invalidArgument = decimalError + "Invalid argument: "; -var precisionLimitExceeded = decimalError + "Precision limit exceeded"; -var cryptoUnavailable = decimalError + "crypto unavailable"; -var tag = "[object Decimal]"; -var mathfloor = Math.floor; -var mathpow = Math.pow; -var isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i; -var isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i; -var isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i; -var isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; -var BASE = 1e7; -var LOG_BASE = 7; -var MAX_SAFE_INTEGER = 9007199254740991; -var LN10_PRECISION = LN10.length - 1; -var PI_PRECISION = PI.length - 1; -var P = { toStringTag: tag }; -P.absoluteValue = P.abs = function() { - var x = new this.constructor(this); - if (x.s < 0) - x.s = 1; - return finalise(x); -}; -P.ceil = function() { - return finalise(new this.constructor(this), this.e + 1, 2); -}; -P.clampedTo = P.clamp = function(min2, max2) { - var k, x = this, Ctor = x.constructor; - min2 = new Ctor(min2); - max2 = new Ctor(max2); - if (!min2.s || !max2.s) - return new Ctor(NaN); - if (min2.gt(max2)) - throw Error(invalidArgument + max2); - k = x.cmp(min2); - return k < 0 ? min2 : x.cmp(max2) > 0 ? max2 : new Ctor(x); -}; -P.comparedTo = P.cmp = function(y) { - var i, j, xdL, ydL, x = this, xd = x.d, yd = (y = new x.constructor(y)).d, xs = x.s, ys = y.s; - if (!xd || !yd) { - return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; - } - if (!xd[0] || !yd[0]) - return xd[0] ? xs : yd[0] ? -ys : 0; - if (xs !== ys) - return xs; - if (x.e !== y.e) - return x.e > y.e ^ xs < 0 ? 1 : -1; - xdL = xd.length; - ydL = yd.length; - for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { - if (xd[i] !== yd[i]) - return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; - } - return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; -}; -P.cosine = P.cos = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.d) - return new Ctor(NaN); - if (!x.d[0]) - return new Ctor(1); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; - Ctor.rounding = 1; - x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); -}; -P.cubeRoot = P.cbrt = function() { - var e, m, n, r, rep, s, sd, t, t3, t3plusx, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - external = false; - s = x.s * mathpow(x.s * x, 1 / 3); - if (!s || Math.abs(s) == 1 / 0) { - n = digitsToString(x.d); - e = x.e; - if (s = (e - n.length + 1) % 3) - n += s == 1 || s == -2 ? "0" : "00"; - s = mathpow(n, 1 / 3); - e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)); - if (s == 1 / 0) { - n = "5e" + e; - } else { - n = s.toExponential(); - n = n.slice(0, n.indexOf("e") + 1) + e; - } - r = new Ctor(n); - r.s = x.s; - } else { - r = new Ctor(s.toString()); - } - sd = (e = Ctor.precision) + 3; - for (; ; ) { - t = r; - t3 = t.times(t).times(t); - t3plusx = t3.plus(x); - r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1); - if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { - n = n.slice(sd - 3, sd + 1); - if (n == "9999" || !rep && n == "4999") { - if (!rep) { - finalise(t, e + 1, 0); - if (t.times(t).times(t).eq(x)) { - r = t; - break; - } - } - sd += 4; - rep = 1; - } else { - if (!+n || !+n.slice(1) && n.charAt(0) == "5") { - finalise(r, e + 1, 1); - m = !r.times(r).times(r).eq(x); - } - break; - } - } - } - external = true; - return finalise(r, e, Ctor.rounding, m); -}; -P.decimalPlaces = P.dp = function() { - var w, d = this.d, n = NaN; - if (d) { - w = d.length - 1; - n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE; - w = d[w]; - if (w) - for (; w % 10 == 0; w /= 10) - n--; - if (n < 0) - n = 0; - } - return n; -}; -P.dividedBy = P.div = function(y) { - return divide(this, new this.constructor(y)); -}; -P.dividedToIntegerBy = P.divToInt = function(y) { - var x = this, Ctor = x.constructor; - return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); -}; -P.equals = P.eq = function(y) { - return this.cmp(y) === 0; -}; -P.floor = function() { - return finalise(new this.constructor(this), this.e + 1, 3); -}; -P.greaterThan = P.gt = function(y) { - return this.cmp(y) > 0; -}; -P.greaterThanOrEqualTo = P.gte = function(y) { - var k = this.cmp(y); - return k == 1 || k === 0; -}; -P.hyperbolicCosine = P.cosh = function() { - var k, n, pr, rm, len, x = this, Ctor = x.constructor, one = new Ctor(1); - if (!x.isFinite()) - return new Ctor(x.s ? 1 / 0 : NaN); - if (x.isZero()) - return one; - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; - Ctor.rounding = 1; - len = x.d.length; - if (len < 32) { - k = Math.ceil(len / 3); - n = (1 / tinyPow(4, k)).toString(); - } else { - k = 16; - n = "2.3283064365386962890625e-10"; - } - x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true); - var cosh2_x, i = k, d8 = new Ctor(8); - for (; i--; ) { - cosh2_x = x.times(x); - x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); - } - return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); -}; -P.hyperbolicSine = P.sinh = function() { - var k, pr, rm, len, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; - Ctor.rounding = 1; - len = x.d.length; - if (len < 3) { - x = taylorSeries(Ctor, 2, x, x, true); - } else { - k = 1.4 * Math.sqrt(len); - k = k > 16 ? 16 : k | 0; - x = x.times(1 / tinyPow(5, k)); - x = taylorSeries(Ctor, 2, x, x, true); - var sinh2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); - for (; k--; ) { - sinh2_x = x.times(x); - x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); - } - } - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(x, pr, rm, true); -}; -P.hyperbolicTangent = P.tanh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(x.s); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 7; - Ctor.rounding = 1; - return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); -}; -P.inverseCosine = P.acos = function() { - var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding; - if (k !== -1) { - return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN); - } - if (x.isZero()) - return getPi(Ctor, pr + 4, rm).times(0.5); - Ctor.precision = pr + 6; - Ctor.rounding = 1; - x = x.asin(); - halfPi = getPi(Ctor, pr + 4, rm).times(0.5); - Ctor.precision = pr; - Ctor.rounding = rm; - return halfPi.minus(x); -}; -P.inverseHyperbolicCosine = P.acosh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (x.lte(1)) - return new Ctor(x.eq(1) ? 0 : NaN); - if (!x.isFinite()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; - Ctor.rounding = 1; - external = false; - x = x.times(x).minus(1).sqrt().plus(x); - external = true; - Ctor.precision = pr; - Ctor.rounding = rm; - return x.ln(); -}; -P.inverseHyperbolicSine = P.asinh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; - Ctor.rounding = 1; - external = false; - x = x.times(x).plus(1).sqrt().plus(x); - external = true; - Ctor.precision = pr; - Ctor.rounding = rm; - return x.ln(); -}; -P.inverseHyperbolicTangent = P.atanh = function() { - var pr, rm, wpr, xsd, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.e >= 0) - return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); - pr = Ctor.precision; - rm = Ctor.rounding; - xsd = x.sd(); - if (Math.max(xsd, pr) < 2 * -x.e - 1) - return finalise(new Ctor(x), pr, rm, true); - Ctor.precision = wpr = xsd - x.e; - x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); - Ctor.precision = pr + 4; - Ctor.rounding = 1; - x = x.ln(); - Ctor.precision = pr; - Ctor.rounding = rm; - return x.times(0.5); -}; -P.inverseSine = P.asin = function() { - var halfPi, k, pr, rm, x = this, Ctor = x.constructor; - if (x.isZero()) - return new Ctor(x); - k = x.abs().cmp(1); - pr = Ctor.precision; - rm = Ctor.rounding; - if (k !== -1) { - if (k === 0) { - halfPi = getPi(Ctor, pr + 4, rm).times(0.5); - halfPi.s = x.s; - return halfPi; - } - return new Ctor(NaN); - } - Ctor.precision = pr + 6; - Ctor.rounding = 1; - x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); - Ctor.precision = pr; - Ctor.rounding = rm; - return x.times(2); -}; -P.inverseTangent = P.atan = function() { - var i, j, k, n, px, t, r, wpr, x2, x = this, Ctor = x.constructor, pr = Ctor.precision, rm = Ctor.rounding; - if (!x.isFinite()) { - if (!x.s) - return new Ctor(NaN); - if (pr + 4 <= PI_PRECISION) { - r = getPi(Ctor, pr + 4, rm).times(0.5); - r.s = x.s; - return r; - } - } else if (x.isZero()) { - return new Ctor(x); - } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { - r = getPi(Ctor, pr + 4, rm).times(0.25); - r.s = x.s; - return r; - } - Ctor.precision = wpr = pr + 10; - Ctor.rounding = 1; - k = Math.min(28, wpr / LOG_BASE + 2 | 0); - for (i = k; i; --i) - x = x.div(x.times(x).plus(1).sqrt().plus(1)); - external = false; - j = Math.ceil(wpr / LOG_BASE); - n = 1; - x2 = x.times(x); - r = new Ctor(x); - px = x; - for (; i !== -1; ) { - px = px.times(x2); - t = r.minus(px.div(n += 2)); - px = px.times(x2); - r = t.plus(px.div(n += 2)); - if (r.d[j] !== void 0) - for (i = j; r.d[i] === t.d[i] && i--; ) - ; - } - if (k) - r = r.times(2 << k - 1); - external = true; - return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true); -}; -P.isFinite = function() { - return !!this.d; -}; -P.isInteger = P.isInt = function() { - return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; -}; -P.isNaN = function() { - return !this.s; -}; -P.isNegative = P.isNeg = function() { - return this.s < 0; -}; -P.isPositive = P.isPos = function() { - return this.s > 0; -}; -P.isZero = function() { - return !!this.d && this.d[0] === 0; -}; -P.lessThan = P.lt = function(y) { - return this.cmp(y) < 0; -}; -P.lessThanOrEqualTo = P.lte = function(y) { - return this.cmp(y) < 1; -}; -P.logarithm = P.log = function(base) { - var isBase10, d, denominator, k, inf, num, sd, r, arg = this, Ctor = arg.constructor, pr = Ctor.precision, rm = Ctor.rounding, guard = 5; - if (base == null) { - base = new Ctor(10); - isBase10 = true; - } else { - base = new Ctor(base); - d = base.d; - if (base.s < 0 || !d || !d[0] || base.eq(1)) - return new Ctor(NaN); - isBase10 = base.eq(10); - } - d = arg.d; - if (arg.s < 0 || !d || !d[0] || arg.eq(1)) { - return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0); - } - if (isBase10) { - if (d.length > 1) { - inf = true; - } else { - for (k = d[0]; k % 10 === 0; ) - k /= 10; - inf = k !== 1; - } - } - external = false; - sd = pr + guard; - num = naturalLogarithm(arg, sd); - denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); - r = divide(num, denominator, sd, 1); - if (checkRoundingDigits(r.d, k = pr, rm)) { - do { - sd += 10; - num = naturalLogarithm(arg, sd); - denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); - r = divide(num, denominator, sd, 1); - if (!inf) { - if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) { - r = finalise(r, pr + 1, 0); - } - break; - } - } while (checkRoundingDigits(r.d, k += 10, rm)); - } - external = true; - return finalise(r, pr, rm); -}; -P.minus = P.sub = function(y) { - var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.d) { - if (!x.s || !y.s) - y = new Ctor(NaN); - else if (x.d) - y.s = -y.s; - else - y = new Ctor(y.d || x.s !== y.s ? x : NaN); - return y; - } - if (x.s != y.s) { - y.s = -y.s; - return x.plus(y); - } - xd = x.d; - yd = y.d; - pr = Ctor.precision; - rm = Ctor.rounding; - if (!xd[0] || !yd[0]) { - if (yd[0]) - y.s = -y.s; - else if (xd[0]) - y = new Ctor(x); - else - return new Ctor(rm === 3 ? -0 : 0); - return external ? finalise(y, pr, rm) : y; - } - e = mathfloor(y.e / LOG_BASE); - xe = mathfloor(x.e / LOG_BASE); - xd = xd.slice(); - k = xe - e; - if (k) { - xLTy = k < 0; - if (xLTy) { - d = xd; - k = -k; - len = yd.length; - } else { - d = yd; - e = xe; - len = xd.length; - } - i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; - if (k > i) { - k = i; - d.length = 1; - } - d.reverse(); - for (i = k; i--; ) - d.push(0); - d.reverse(); - } else { - i = xd.length; - len = yd.length; - xLTy = i < len; - if (xLTy) - len = i; - for (i = 0; i < len; i++) { - if (xd[i] != yd[i]) { - xLTy = xd[i] < yd[i]; - break; - } - } - k = 0; - } - if (xLTy) { - d = xd; - xd = yd; - yd = d; - y.s = -y.s; - } - len = xd.length; - for (i = yd.length - len; i > 0; --i) - xd[len++] = 0; - for (i = yd.length; i > k; ) { - if (xd[--i] < yd[i]) { - for (j = i; j && xd[--j] === 0; ) - xd[j] = BASE - 1; - --xd[j]; - xd[i] += BASE; - } - xd[i] -= yd[i]; - } - for (; xd[--len] === 0; ) - xd.pop(); - for (; xd[0] === 0; xd.shift()) - --e; - if (!xd[0]) - return new Ctor(rm === 3 ? -0 : 0); - y.d = xd; - y.e = getBase10Exponent(xd, e); - return external ? finalise(y, pr, rm) : y; -}; -P.modulo = P.mod = function(y) { - var q, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.s || y.d && !y.d[0]) - return new Ctor(NaN); - if (!y.d || x.d && !x.d[0]) { - return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); - } - external = false; - if (Ctor.modulo == 9) { - q = divide(x, y.abs(), 0, 3, 1); - q.s *= y.s; - } else { - q = divide(x, y, 0, Ctor.modulo, 1); - } - q = q.times(y); - external = true; - return x.minus(q); -}; -P.naturalExponential = P.exp = function() { - return naturalExponential(this); -}; -P.naturalLogarithm = P.ln = function() { - return naturalLogarithm(this); -}; -P.negated = P.neg = function() { - var x = new this.constructor(this); - x.s = -x.s; - return finalise(x); -}; -P.plus = P.add = function(y) { - var carry, d, e, i, k, len, pr, rm, xd, yd, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.d) { - if (!x.s || !y.s) - y = new Ctor(NaN); - else if (!x.d) - y = new Ctor(y.d || x.s === y.s ? x : NaN); - return y; - } - if (x.s != y.s) { - y.s = -y.s; - return x.minus(y); - } - xd = x.d; - yd = y.d; - pr = Ctor.precision; - rm = Ctor.rounding; - if (!xd[0] || !yd[0]) { - if (!yd[0]) - y = new Ctor(x); - return external ? finalise(y, pr, rm) : y; - } - k = mathfloor(x.e / LOG_BASE); - e = mathfloor(y.e / LOG_BASE); - xd = xd.slice(); - i = k - e; - if (i) { - if (i < 0) { - d = xd; - i = -i; - len = yd.length; - } else { - d = yd; - e = k; - len = xd.length; - } - k = Math.ceil(pr / LOG_BASE); - len = k > len ? k + 1 : len + 1; - if (i > len) { - i = len; - d.length = 1; - } - d.reverse(); - for (; i--; ) - d.push(0); - d.reverse(); - } - len = xd.length; - i = yd.length; - if (len - i < 0) { - i = len; - d = yd; - yd = xd; - xd = d; - } - for (carry = 0; i; ) { - carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; - xd[i] %= BASE; - } - if (carry) { - xd.unshift(carry); - ++e; - } - for (len = xd.length; xd[--len] == 0; ) - xd.pop(); - y.d = xd; - y.e = getBase10Exponent(xd, e); - return external ? finalise(y, pr, rm) : y; -}; -P.precision = P.sd = function(z) { - var k, x = this; - if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) - throw Error(invalidArgument + z); - if (x.d) { - k = getPrecision(x.d); - if (z && x.e + 1 > k) - k = x.e + 1; - } else { - k = NaN; - } - return k; -}; -P.round = function() { - var x = this, Ctor = x.constructor; - return finalise(new Ctor(x), x.e + 1, Ctor.rounding); -}; -P.sine = P.sin = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; - Ctor.rounding = 1; - x = sine(Ctor, toLessThanHalfPi(Ctor, x)); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); -}; -P.squareRoot = P.sqrt = function() { - var m, n, sd, r, rep, t, x = this, d = x.d, e = x.e, s = x.s, Ctor = x.constructor; - if (s !== 1 || !d || !d[0]) { - return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0); - } - external = false; - s = Math.sqrt(+x); - if (s == 0 || s == 1 / 0) { - n = digitsToString(d); - if ((n.length + e) % 2 == 0) - n += "0"; - s = Math.sqrt(n); - e = mathfloor((e + 1) / 2) - (e < 0 || e % 2); - if (s == 1 / 0) { - n = "5e" + e; - } else { - n = s.toExponential(); - n = n.slice(0, n.indexOf("e") + 1) + e; - } - r = new Ctor(n); - } else { - r = new Ctor(s.toString()); - } - sd = (e = Ctor.precision) + 3; - for (; ; ) { - t = r; - r = t.plus(divide(x, t, sd + 2, 1)).times(0.5); - if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { - n = n.slice(sd - 3, sd + 1); - if (n == "9999" || !rep && n == "4999") { - if (!rep) { - finalise(t, e + 1, 0); - if (t.times(t).eq(x)) { - r = t; - break; - } - } - sd += 4; - rep = 1; - } else { - if (!+n || !+n.slice(1) && n.charAt(0) == "5") { - finalise(r, e + 1, 1); - m = !r.times(r).eq(x); - } - break; - } - } - } - external = true; - return finalise(r, e, Ctor.rounding, m); -}; -P.tangent = P.tan = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 10; - Ctor.rounding = 1; - x = x.sin(); - x.s = 1; - x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); -}; -P.times = P.mul = function(y) { - var carry, e, i, k, r, rL, t, xdL, ydL, x = this, Ctor = x.constructor, xd = x.d, yd = (y = new Ctor(y)).d; - y.s *= x.s; - if (!xd || !xd[0] || !yd || !yd[0]) { - return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd ? NaN : !xd || !yd ? y.s / 0 : y.s * 0); - } - e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); - xdL = xd.length; - ydL = yd.length; - if (xdL < ydL) { - r = xd; - xd = yd; - yd = r; - rL = xdL; - xdL = ydL; - ydL = rL; - } - r = []; - rL = xdL + ydL; - for (i = rL; i--; ) - r.push(0); - for (i = ydL; --i >= 0; ) { - carry = 0; - for (k = xdL + i; k > i; ) { - t = r[k] + yd[i] * xd[k - i - 1] + carry; - r[k--] = t % BASE | 0; - carry = t / BASE | 0; - } - r[k] = (r[k] + carry) % BASE | 0; - } - for (; !r[--rL]; ) - r.pop(); - if (carry) - ++e; - else - r.shift(); - y.d = r; - y.e = getBase10Exponent(r, e); - return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; -}; -P.toBinary = function(sd, rm) { - return toStringBinary(this, 2, sd, rm); -}; -P.toDecimalPlaces = P.toDP = function(dp, rm) { - var x = this, Ctor = x.constructor; - x = new Ctor(x); - if (dp === void 0) - return x; - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - return finalise(x, dp + x.e + 1, rm); -}; -P.toExponential = function(dp, rm) { - var str, x = this, Ctor = x.constructor; - if (dp === void 0) { - str = finiteToString(x, true); - } else { - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - x = finalise(new Ctor(x), dp + 1, rm); - str = finiteToString(x, true, dp + 1); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P.toFixed = function(dp, rm) { - var str, y, x = this, Ctor = x.constructor; - if (dp === void 0) { - str = finiteToString(x); - } else { - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - y = finalise(new Ctor(x), dp + x.e + 1, rm); - str = finiteToString(y, false, dp + y.e + 1); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P.toFraction = function(maxD) { - var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r, x = this, xd = x.d, Ctor = x.constructor; - if (!xd) - return new Ctor(x); - n1 = d0 = new Ctor(1); - d1 = n0 = new Ctor(0); - d = new Ctor(d1); - e = d.e = getPrecision(xd) - x.e - 1; - k = e % LOG_BASE; - d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); - if (maxD == null) { - maxD = e > 0 ? d : n1; - } else { - n = new Ctor(maxD); - if (!n.isInt() || n.lt(n1)) - throw Error(invalidArgument + n); - maxD = n.gt(d) ? e > 0 ? d : n1 : n; - } - external = false; - n = new Ctor(digitsToString(xd)); - pr = Ctor.precision; - Ctor.precision = e = xd.length * LOG_BASE * 2; - for (; ; ) { - q = divide(n, d, 0, 1, 1); - d2 = d0.plus(q.times(d1)); - if (d2.cmp(maxD) == 1) - break; - d0 = d1; - d1 = d2; - d2 = n1; - n1 = n0.plus(q.times(d2)); - n0 = d2; - d2 = d; - d = n.minus(q.times(d2)); - n = d2; - } - d2 = divide(maxD.minus(d0), d1, 0, 1, 1); - n0 = n0.plus(d2.times(n1)); - d0 = d0.plus(d2.times(d1)); - n0.s = n1.s = x.s; - r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; - Ctor.precision = pr; - external = true; - return r; -}; -P.toHexadecimal = P.toHex = function(sd, rm) { - return toStringBinary(this, 16, sd, rm); -}; -P.toNearest = function(y, rm) { - var x = this, Ctor = x.constructor; - x = new Ctor(x); - if (y == null) { - if (!x.d) - return x; - y = new Ctor(1); - rm = Ctor.rounding; - } else { - y = new Ctor(y); - if (rm === void 0) { - rm = Ctor.rounding; - } else { - checkInt32(rm, 0, 8); - } - if (!x.d) - return y.s ? x : y; - if (!y.d) { - if (y.s) - y.s = x.s; - return y; - } - } - if (y.d[0]) { - external = false; - x = divide(x, y, 0, rm, 1).times(y); - external = true; - finalise(x); - } else { - y.s = x.s; - x = y; - } - return x; -}; -P.toNumber = function() { - return +this; -}; -P.toOctal = function(sd, rm) { - return toStringBinary(this, 8, sd, rm); -}; -P.toPower = P.pow = function(y) { - var e, k, pr, r, rm, s, x = this, Ctor = x.constructor, yn = +(y = new Ctor(y)); - if (!x.d || !y.d || !x.d[0] || !y.d[0]) - return new Ctor(mathpow(+x, yn)); - x = new Ctor(x); - if (x.eq(1)) - return x; - pr = Ctor.precision; - rm = Ctor.rounding; - if (y.eq(1)) - return finalise(x, pr, rm); - e = mathfloor(y.e / LOG_BASE); - if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { - r = intPow(Ctor, x, k, pr); - return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm); - } - s = x.s; - if (s < 0) { - if (e < y.d.length - 1) - return new Ctor(NaN); - if ((y.d[e] & 1) == 0) - s = 1; - if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { - x.s = s; - return x; - } - } - k = mathpow(+x, yn); - e = k == 0 || !isFinite(k) ? mathfloor(yn * (Math.log("0." + digitsToString(x.d)) / Math.LN10 + x.e + 1)) : new Ctor(k + "").e; - if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) - return new Ctor(e > 0 ? s / 0 : 0); - external = false; - Ctor.rounding = x.s = 1; - k = Math.min(12, (e + "").length); - r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); - if (r.d) { - r = finalise(r, pr + 5, 1); - if (checkRoundingDigits(r.d, pr, rm)) { - e = pr + 10; - r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1); - if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) { - r = finalise(r, pr + 1, 0); - } - } - } - r.s = s; - external = true; - Ctor.rounding = rm; - return finalise(r, pr, rm); -}; -P.toPrecision = function(sd, rm) { - var str, x = this, Ctor = x.constructor; - if (sd === void 0) { - str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - } else { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - x = finalise(new Ctor(x), sd, rm); - str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P.toSignificantDigits = P.toSD = function(sd, rm) { - var x = this, Ctor = x.constructor; - if (sd === void 0) { - sd = Ctor.precision; - rm = Ctor.rounding; - } else { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - } - return finalise(new Ctor(x), sd, rm); -}; -P.toString = function() { - var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P.truncated = P.trunc = function() { - return finalise(new this.constructor(this), this.e + 1, 1); -}; -P.valueOf = P.toJSON = function() { - var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - return x.isNeg() ? "-" + str : str; -}; -function digitsToString(d) { - var i, k, ws, indexOfLastWord = d.length - 1, str = "", w = d[0]; - if (indexOfLastWord > 0) { - str += w; - for (i = 1; i < indexOfLastWord; i++) { - ws = d[i] + ""; - k = LOG_BASE - ws.length; - if (k) - str += getZeroString(k); - str += ws; - } - w = d[i]; - ws = w + ""; - k = LOG_BASE - ws.length; - if (k) - str += getZeroString(k); - } else if (w === 0) { - return "0"; - } - for (; w % 10 === 0; ) - w /= 10; - return str + w; -} -__name(digitsToString, "digitsToString"); -function checkInt32(i, min2, max2) { - if (i !== ~~i || i < min2 || i > max2) { - throw Error(invalidArgument + i); - } -} -__name(checkInt32, "checkInt32"); -function checkRoundingDigits(d, i, rm, repeating) { - var di, k, r, rd; - for (k = d[0]; k >= 10; k /= 10) - --i; - if (--i < 0) { - i += LOG_BASE; - di = 0; - } else { - di = Math.ceil((i + 1) / LOG_BASE); - i %= LOG_BASE; - } - k = mathpow(10, LOG_BASE - i); - rd = d[di] % k | 0; - if (repeating == null) { - if (i < 3) { - if (i == 0) - rd = rd / 100 | 0; - else if (i == 1) - rd = rd / 10 | 0; - r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 5e4 || rd == 0; - } else { - r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0; - } - } else { - if (i < 4) { - if (i == 0) - rd = rd / 1e3 | 0; - else if (i == 1) - rd = rd / 100 | 0; - else if (i == 2) - rd = rd / 10 | 0; - r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; - } else { - r = ((repeating || rm < 4) && rd + 1 == k || !repeating && rm > 3 && rd + 1 == k / 2) && (d[di + 1] / k / 1e3 | 0) == mathpow(10, i - 3) - 1; - } - } - return r; -} -__name(checkRoundingDigits, "checkRoundingDigits"); -function convertBase(str, baseIn, baseOut) { - var j, arr = [0], arrL, i = 0, strL = str.length; - for (; i < strL; ) { - for (arrL = arr.length; arrL--; ) - arr[arrL] *= baseIn; - arr[0] += NUMERALS.indexOf(str.charAt(i++)); - for (j = 0; j < arr.length; j++) { - if (arr[j] > baseOut - 1) { - if (arr[j + 1] === void 0) - arr[j + 1] = 0; - arr[j + 1] += arr[j] / baseOut | 0; - arr[j] %= baseOut; - } - } - } - return arr.reverse(); -} -__name(convertBase, "convertBase"); -function cosine(Ctor, x) { - var k, len, y; - if (x.isZero()) - return x; - len = x.d.length; - if (len < 32) { - k = Math.ceil(len / 3); - y = (1 / tinyPow(4, k)).toString(); - } else { - k = 16; - y = "2.3283064365386962890625e-10"; - } - Ctor.precision += k; - x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); - for (var i = k; i--; ) { - var cos2x = x.times(x); - x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); - } - Ctor.precision -= k; - return x; -} -__name(cosine, "cosine"); -var divide = function() { - function multiplyInteger(x, k, base) { - var temp, carry = 0, i = x.length; - for (x = x.slice(); i--; ) { - temp = x[i] * k + carry; - x[i] = temp % base | 0; - carry = temp / base | 0; - } - if (carry) - x.unshift(carry); - return x; - } - __name(multiplyInteger, "multiplyInteger"); - function compare(a, b, aL, bL) { - var i, r; - if (aL != bL) { - r = aL > bL ? 1 : -1; - } else { - for (i = r = 0; i < aL; i++) { - if (a[i] != b[i]) { - r = a[i] > b[i] ? 1 : -1; - break; - } - } - } - return r; - } - __name(compare, "compare"); - function subtract(a, b, aL, base) { - var i = 0; - for (; aL--; ) { - a[aL] -= i; - i = a[aL] < b[aL] ? 1 : 0; - a[aL] = i * base + a[aL] - b[aL]; - } - for (; !a[0] && a.length > 1; ) - a.shift(); - } - __name(subtract, "subtract"); - return function(x, y, pr, rm, dp, base) { - var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, yL, yz, Ctor = x.constructor, sign2 = x.s == y.s ? 1 : -1, xd = x.d, yd = y.d; - if (!xd || !xd[0] || !yd || !yd[0]) { - return new Ctor( - !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : xd && xd[0] == 0 || !yd ? sign2 * 0 : sign2 / 0 - ); - } - if (base) { - logBase = 1; - e = x.e - y.e; - } else { - base = BASE; - logBase = LOG_BASE; - e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); - } - yL = yd.length; - xL = xd.length; - q = new Ctor(sign2); - qd = q.d = []; - for (i = 0; yd[i] == (xd[i] || 0); i++) - ; - if (yd[i] > (xd[i] || 0)) - e--; - if (pr == null) { - sd = pr = Ctor.precision; - rm = Ctor.rounding; - } else if (dp) { - sd = pr + (x.e - y.e) + 1; - } else { - sd = pr; - } - if (sd < 0) { - qd.push(1); - more = true; - } else { - sd = sd / logBase + 2 | 0; - i = 0; - if (yL == 1) { - k = 0; - yd = yd[0]; - sd++; - for (; (i < xL || k) && sd--; i++) { - t = k * base + (xd[i] || 0); - qd[i] = t / yd | 0; - k = t % yd | 0; - } - more = k || i < xL; - } else { - k = base / (yd[0] + 1) | 0; - if (k > 1) { - yd = multiplyInteger(yd, k, base); - xd = multiplyInteger(xd, k, base); - yL = yd.length; - xL = xd.length; - } - xi = yL; - rem = xd.slice(0, yL); - remL = rem.length; - for (; remL < yL; ) - rem[remL++] = 0; - yz = yd.slice(); - yz.unshift(0); - yd0 = yd[0]; - if (yd[1] >= base / 2) - ++yd0; - do { - k = 0; - cmp = compare(yd, rem, yL, remL); - if (cmp < 0) { - rem0 = rem[0]; - if (yL != remL) - rem0 = rem0 * base + (rem[1] || 0); - k = rem0 / yd0 | 0; - if (k > 1) { - if (k >= base) - k = base - 1; - prod = multiplyInteger(yd, k, base); - prodL = prod.length; - remL = rem.length; - cmp = compare(prod, rem, prodL, remL); - if (cmp == 1) { - k--; - subtract(prod, yL < prodL ? yz : yd, prodL, base); - } - } else { - if (k == 0) - cmp = k = 1; - prod = yd.slice(); - } - prodL = prod.length; - if (prodL < remL) - prod.unshift(0); - subtract(rem, prod, remL, base); - if (cmp == -1) { - remL = rem.length; - cmp = compare(yd, rem, yL, remL); - if (cmp < 1) { - k++; - subtract(rem, yL < remL ? yz : yd, remL, base); - } - } - remL = rem.length; - } else if (cmp === 0) { - k++; - rem = [0]; - } - qd[i++] = k; - if (cmp && rem[0]) { - rem[remL++] = xd[xi] || 0; - } else { - rem = [xd[xi]]; - remL = 1; - } - } while ((xi++ < xL || rem[0] !== void 0) && sd--); - more = rem[0] !== void 0; - } - if (!qd[0]) - qd.shift(); - } - if (logBase == 1) { - q.e = e; - inexact = more; - } else { - for (i = 1, k = qd[0]; k >= 10; k /= 10) - i++; - q.e = i + e * logBase - 1; - finalise(q, dp ? pr + q.e + 1 : pr, rm, more); - } - return q; - }; -}(); -function finalise(x, sd, rm, isTruncated) { - var digits, i, j, k, rd, roundUp, w, xd, xdi, Ctor = x.constructor; - out: - if (sd != null) { - xd = x.d; - if (!xd) - return x; - for (digits = 1, k = xd[0]; k >= 10; k /= 10) - digits++; - i = sd - digits; - if (i < 0) { - i += LOG_BASE; - j = sd; - w = xd[xdi = 0]; - rd = w / mathpow(10, digits - j - 1) % 10 | 0; - } else { - xdi = Math.ceil((i + 1) / LOG_BASE); - k = xd.length; - if (xdi >= k) { - if (isTruncated) { - for (; k++ <= xdi; ) - xd.push(0); - w = rd = 0; - digits = 1; - i %= LOG_BASE; - j = i - LOG_BASE + 1; - } else { - break out; - } - } else { - w = k = xd[xdi]; - for (digits = 1; k >= 10; k /= 10) - digits++; - i %= LOG_BASE; - j = i - LOG_BASE + digits; - rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; - } - } - isTruncated = isTruncated || sd < 0 || xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1)); - roundUp = rm < 4 ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && (i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7)); - if (sd < 1 || !xd[0]) { - xd.length = 0; - if (roundUp) { - sd -= x.e + 1; - xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); - x.e = -sd || 0; - } else { - xd[0] = x.e = 0; - } - return x; - } - if (i == 0) { - xd.length = xdi; - k = 1; - xdi--; - } else { - xd.length = xdi + 1; - k = mathpow(10, LOG_BASE - i); - xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; - } - if (roundUp) { - for (; ; ) { - if (xdi == 0) { - for (i = 1, j = xd[0]; j >= 10; j /= 10) - i++; - j = xd[0] += k; - for (k = 1; j >= 10; j /= 10) - k++; - if (i != k) { - x.e++; - if (xd[0] == BASE) - xd[0] = 1; - } - break; - } else { - xd[xdi] += k; - if (xd[xdi] != BASE) - break; - xd[xdi--] = 0; - k = 1; - } - } - } - for (i = xd.length; xd[--i] === 0; ) - xd.pop(); - } - if (external) { - if (x.e > Ctor.maxE) { - x.d = null; - x.e = NaN; - } else if (x.e < Ctor.minE) { - x.e = 0; - x.d = [0]; - } - } - return x; -} -__name(finalise, "finalise"); -function finiteToString(x, isExp, sd) { - if (!x.isFinite()) - return nonFiniteToString(x); - var k, e = x.e, str = digitsToString(x.d), len = str.length; - if (isExp) { - if (sd && (k = sd - len) > 0) { - str = str.charAt(0) + "." + str.slice(1) + getZeroString(k); - } else if (len > 1) { - str = str.charAt(0) + "." + str.slice(1); - } - str = str + (x.e < 0 ? "e" : "e+") + x.e; - } else if (e < 0) { - str = "0." + getZeroString(-e - 1) + str; - if (sd && (k = sd - len) > 0) - str += getZeroString(k); - } else if (e >= len) { - str += getZeroString(e + 1 - len); - if (sd && (k = sd - e - 1) > 0) - str = str + "." + getZeroString(k); - } else { - if ((k = e + 1) < len) - str = str.slice(0, k) + "." + str.slice(k); - if (sd && (k = sd - len) > 0) { - if (e + 1 === len) - str += "."; - str += getZeroString(k); - } - } - return str; -} -__name(finiteToString, "finiteToString"); -function getBase10Exponent(digits, e) { - var w = digits[0]; - for (e *= LOG_BASE; w >= 10; w /= 10) - e++; - return e; -} -__name(getBase10Exponent, "getBase10Exponent"); -function getLn10(Ctor, sd, pr) { - if (sd > LN10_PRECISION) { - external = true; - if (pr) - Ctor.precision = pr; - throw Error(precisionLimitExceeded); - } - return finalise(new Ctor(LN10), sd, 1, true); -} -__name(getLn10, "getLn10"); -function getPi(Ctor, sd, rm) { - if (sd > PI_PRECISION) - throw Error(precisionLimitExceeded); - return finalise(new Ctor(PI), sd, rm, true); -} -__name(getPi, "getPi"); -function getPrecision(digits) { - var w = digits.length - 1, len = w * LOG_BASE + 1; - w = digits[w]; - if (w) { - for (; w % 10 == 0; w /= 10) - len--; - for (w = digits[0]; w >= 10; w /= 10) - len++; - } - return len; -} -__name(getPrecision, "getPrecision"); -function getZeroString(k) { - var zs = ""; - for (; k--; ) - zs += "0"; - return zs; -} -__name(getZeroString, "getZeroString"); -function intPow(Ctor, x, n, pr) { - var isTruncated, r = new Ctor(1), k = Math.ceil(pr / LOG_BASE + 4); - external = false; - for (; ; ) { - if (n % 2) { - r = r.times(x); - if (truncate(r.d, k)) - isTruncated = true; - } - n = mathfloor(n / 2); - if (n === 0) { - n = r.d.length - 1; - if (isTruncated && r.d[n] === 0) - ++r.d[n]; - break; - } - x = x.times(x); - truncate(x.d, k); - } - external = true; - return r; -} -__name(intPow, "intPow"); -function isOdd(n) { - return n.d[n.d.length - 1] & 1; -} -__name(isOdd, "isOdd"); -function maxOrMin(Ctor, args, ltgt) { - var y, x = new Ctor(args[0]), i = 0; - for (; ++i < args.length; ) { - y = new Ctor(args[i]); - if (!y.s) { - x = y; - break; - } else if (x[ltgt](y)) { - x = y; - } - } - return x; -} -__name(maxOrMin, "maxOrMin"); -function naturalExponential(x, sd) { - var denominator, guard, j, pow2, sum2, t, wpr, rep = 0, i = 0, k = 0, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; - if (!x.d || !x.d[0] || x.e > 17) { - return new Ctor(x.d ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 : x.s ? x.s < 0 ? 0 : x : 0 / 0); - } - if (sd == null) { - external = false; - wpr = pr; - } else { - wpr = sd; - } - t = new Ctor(0.03125); - while (x.e > -2) { - x = x.times(t); - k += 5; - } - guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; - wpr += guard; - denominator = pow2 = sum2 = new Ctor(1); - Ctor.precision = wpr; - for (; ; ) { - pow2 = finalise(pow2.times(x), wpr, 1); - denominator = denominator.times(++i); - t = sum2.plus(divide(pow2, denominator, wpr, 1)); - if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum2.d).slice(0, wpr)) { - j = k; - while (j--) - sum2 = finalise(sum2.times(sum2), wpr, 1); - if (sd == null) { - if (rep < 3 && checkRoundingDigits(sum2.d, wpr - guard, rm, rep)) { - Ctor.precision = wpr += 10; - denominator = pow2 = t = new Ctor(1); - i = 0; - rep++; - } else { - return finalise(sum2, Ctor.precision = pr, rm, external = true); - } - } else { - Ctor.precision = pr; - return sum2; - } - } - sum2 = t; - } -} -__name(naturalExponential, "naturalExponential"); -function naturalLogarithm(y, sd) { - var c, c0, denominator, e, numerator, rep, sum2, t, wpr, x1, x2, n = 1, guard = 10, x = y, xd = x.d, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; - if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { - return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); - } - if (sd == null) { - external = false; - wpr = pr; - } else { - wpr = sd; - } - Ctor.precision = wpr += guard; - c = digitsToString(xd); - c0 = c.charAt(0); - if (Math.abs(e = x.e) < 15e14) { - while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { - x = x.times(y); - c = digitsToString(x.d); - c0 = c.charAt(0); - n++; - } - e = x.e; - if (c0 > 1) { - x = new Ctor("0." + c); - e++; - } else { - x = new Ctor(c0 + "." + c.slice(1)); - } - } else { - t = getLn10(Ctor, wpr + 2, pr).times(e + ""); - x = naturalLogarithm(new Ctor(c0 + "." + c.slice(1)), wpr - guard).plus(t); - Ctor.precision = pr; - return sd == null ? finalise(x, pr, rm, external = true) : x; - } - x1 = x; - sum2 = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); - x2 = finalise(x.times(x), wpr, 1); - denominator = 3; - for (; ; ) { - numerator = finalise(numerator.times(x2), wpr, 1); - t = sum2.plus(divide(numerator, new Ctor(denominator), wpr, 1)); - if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum2.d).slice(0, wpr)) { - sum2 = sum2.times(2); - if (e !== 0) - sum2 = sum2.plus(getLn10(Ctor, wpr + 2, pr).times(e + "")); - sum2 = divide(sum2, new Ctor(n), wpr, 1); - if (sd == null) { - if (checkRoundingDigits(sum2.d, wpr - guard, rm, rep)) { - Ctor.precision = wpr += guard; - t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); - x2 = finalise(x.times(x), wpr, 1); - denominator = rep = 1; - } else { - return finalise(sum2, Ctor.precision = pr, rm, external = true); - } - } else { - Ctor.precision = pr; - return sum2; - } - } - sum2 = t; - denominator += 2; - } -} -__name(naturalLogarithm, "naturalLogarithm"); -function nonFiniteToString(x) { - return String(x.s * x.s / 0); -} -__name(nonFiniteToString, "nonFiniteToString"); -function parseDecimal(x, str) { - var e, i, len; - if ((e = str.indexOf(".")) > -1) - str = str.replace(".", ""); - if ((i = str.search(/e/i)) > 0) { - if (e < 0) - e = i; - e += +str.slice(i + 1); - str = str.substring(0, i); - } else if (e < 0) { - e = str.length; - } - for (i = 0; str.charCodeAt(i) === 48; i++) - ; - for (len = str.length; str.charCodeAt(len - 1) === 48; --len) - ; - str = str.slice(i, len); - if (str) { - len -= i; - x.e = e = e - i - 1; - x.d = []; - i = (e + 1) % LOG_BASE; - if (e < 0) - i += LOG_BASE; - if (i < len) { - if (i) - x.d.push(+str.slice(0, i)); - for (len -= LOG_BASE; i < len; ) - x.d.push(+str.slice(i, i += LOG_BASE)); - str = str.slice(i); - i = LOG_BASE - str.length; - } else { - i -= len; - } - for (; i--; ) - str += "0"; - x.d.push(+str); - if (external) { - if (x.e > x.constructor.maxE) { - x.d = null; - x.e = NaN; - } else if (x.e < x.constructor.minE) { - x.e = 0; - x.d = [0]; - } - } - } else { - x.e = 0; - x.d = [0]; - } - return x; -} -__name(parseDecimal, "parseDecimal"); -function parseOther(x, str) { - var base, Ctor, divisor, i, isFloat, len, p, xd, xe; - if (str.indexOf("_") > -1) { - str = str.replace(/(\d)_(?=\d)/g, "$1"); - if (isDecimal.test(str)) - return parseDecimal(x, str); - } else if (str === "Infinity" || str === "NaN") { - if (!+str) - x.s = NaN; - x.e = NaN; - x.d = null; - return x; - } - if (isHex.test(str)) { - base = 16; - str = str.toLowerCase(); - } else if (isBinary.test(str)) { - base = 2; - } else if (isOctal.test(str)) { - base = 8; - } else { - throw Error(invalidArgument + str); - } - i = str.search(/p/i); - if (i > 0) { - p = +str.slice(i + 1); - str = str.substring(2, i); - } else { - str = str.slice(2); - } - i = str.indexOf("."); - isFloat = i >= 0; - Ctor = x.constructor; - if (isFloat) { - str = str.replace(".", ""); - len = str.length; - i = len - i; - divisor = intPow(Ctor, new Ctor(base), i, i * 2); - } - xd = convertBase(str, base, BASE); - xe = xd.length - 1; - for (i = xe; xd[i] === 0; --i) - xd.pop(); - if (i < 0) - return new Ctor(x.s * 0); - x.e = getBase10Exponent(xd, xe); - x.d = xd; - external = false; - if (isFloat) - x = divide(x, divisor, len * 4); - if (p) - x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p)); - external = true; - return x; -} -__name(parseOther, "parseOther"); -function sine(Ctor, x) { - var k, len = x.d.length; - if (len < 3) { - return x.isZero() ? x : taylorSeries(Ctor, 2, x, x); - } - k = 1.4 * Math.sqrt(len); - k = k > 16 ? 16 : k | 0; - x = x.times(1 / tinyPow(5, k)); - x = taylorSeries(Ctor, 2, x, x); - var sin2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); - for (; k--; ) { - sin2_x = x.times(x); - x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); - } - return x; -} -__name(sine, "sine"); -function taylorSeries(Ctor, n, x, y, isHyperbolic) { - var j, t, u, x2, i = 1, pr = Ctor.precision, k = Math.ceil(pr / LOG_BASE); - external = false; - x2 = x.times(x); - u = new Ctor(y); - for (; ; ) { - t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1); - u = isHyperbolic ? y.plus(t) : y.minus(t); - y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1); - t = u.plus(y); - if (t.d[k] !== void 0) { - for (j = k; t.d[j] === u.d[j] && j--; ) - ; - if (j == -1) - break; - } - j = u; - u = y; - y = t; - t = j; - i++; - } - external = true; - t.d.length = k + 1; - return t; -} -__name(taylorSeries, "taylorSeries"); -function tinyPow(b, e) { - var n = b; - while (--e) - n *= b; - return n; -} -__name(tinyPow, "tinyPow"); -function toLessThanHalfPi(Ctor, x) { - var t, isNeg = x.s < 0, pi = getPi(Ctor, Ctor.precision, 1), halfPi = pi.times(0.5); - x = x.abs(); - if (x.lte(halfPi)) { - quadrant = isNeg ? 4 : 1; - return x; - } - t = x.divToInt(pi); - if (t.isZero()) { - quadrant = isNeg ? 3 : 2; - } else { - x = x.minus(t.times(pi)); - if (x.lte(halfPi)) { - quadrant = isOdd(t) ? isNeg ? 2 : 3 : isNeg ? 4 : 1; - return x; - } - quadrant = isOdd(t) ? isNeg ? 1 : 4 : isNeg ? 3 : 2; - } - return x.minus(pi).abs(); -} -__name(toLessThanHalfPi, "toLessThanHalfPi"); -function toStringBinary(x, baseOut, sd, rm) { - var base, e, i, k, len, roundUp, str, xd, y, Ctor = x.constructor, isExp = sd !== void 0; - if (isExp) { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - } else { - sd = Ctor.precision; - rm = Ctor.rounding; - } - if (!x.isFinite()) { - str = nonFiniteToString(x); - } else { - str = finiteToString(x); - i = str.indexOf("."); - if (isExp) { - base = 2; - if (baseOut == 16) { - sd = sd * 4 - 3; - } else if (baseOut == 8) { - sd = sd * 3 - 2; - } - } else { - base = baseOut; - } - if (i >= 0) { - str = str.replace(".", ""); - y = new Ctor(1); - y.e = str.length - i; - y.d = convertBase(finiteToString(y), 10, base); - y.e = y.d.length; - } - xd = convertBase(str, 10, base); - e = len = xd.length; - for (; xd[--len] == 0; ) - xd.pop(); - if (!xd[0]) { - str = isExp ? "0p+0" : "0"; - } else { - if (i < 0) { - e--; - } else { - x = new Ctor(x); - x.d = xd; - x.e = e; - x = divide(x, y, sd, rm, 0, base); - xd = x.d; - e = x.e; - roundUp = inexact; - } - i = xd[sd]; - k = base / 2; - roundUp = roundUp || xd[sd + 1] !== void 0; - roundUp = rm < 4 ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || rm === (x.s < 0 ? 8 : 7)); - xd.length = sd; - if (roundUp) { - for (; ++xd[--sd] > base - 1; ) { - xd[sd] = 0; - if (!sd) { - ++e; - xd.unshift(1); - } - } - } - for (len = xd.length; !xd[len - 1]; --len) - ; - for (i = 0, str = ""; i < len; i++) - str += NUMERALS.charAt(xd[i]); - if (isExp) { - if (len > 1) { - if (baseOut == 16 || baseOut == 8) { - i = baseOut == 16 ? 4 : 3; - for (--len; len % i; len++) - str += "0"; - xd = convertBase(str, base, baseOut); - for (len = xd.length; !xd[len - 1]; --len) - ; - for (i = 1, str = "1."; i < len; i++) - str += NUMERALS.charAt(xd[i]); - } else { - str = str.charAt(0) + "." + str.slice(1); - } - } - str = str + (e < 0 ? "p" : "p+") + e; - } else if (e < 0) { - for (; ++e; ) - str = "0" + str; - str = "0." + str; - } else { - if (++e > len) - for (e -= len; e--; ) - str += "0"; - else if (e < len) - str = str.slice(0, e) + "." + str.slice(e); - } - } - str = (baseOut == 16 ? "0x" : baseOut == 2 ? "0b" : baseOut == 8 ? "0o" : "") + str; - } - return x.s < 0 ? "-" + str : str; -} -__name(toStringBinary, "toStringBinary"); -function truncate(arr, len) { - if (arr.length > len) { - arr.length = len; - return true; - } -} -__name(truncate, "truncate"); -function abs(x) { - return new this(x).abs(); -} -__name(abs, "abs"); -function acos(x) { - return new this(x).acos(); -} -__name(acos, "acos"); -function acosh(x) { - return new this(x).acosh(); -} -__name(acosh, "acosh"); -function add(x, y) { - return new this(x).plus(y); -} -__name(add, "add"); -function asin(x) { - return new this(x).asin(); -} -__name(asin, "asin"); -function asinh(x) { - return new this(x).asinh(); -} -__name(asinh, "asinh"); -function atan(x) { - return new this(x).atan(); -} -__name(atan, "atan"); -function atanh(x) { - return new this(x).atanh(); -} -__name(atanh, "atanh"); -function atan2(y, x) { - y = new this(y); - x = new this(x); - var r, pr = this.precision, rm = this.rounding, wpr = pr + 4; - if (!y.s || !x.s) { - r = new this(NaN); - } else if (!y.d && !x.d) { - r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); - r.s = y.s; - } else if (!x.d || y.isZero()) { - r = x.s < 0 ? getPi(this, pr, rm) : new this(0); - r.s = y.s; - } else if (!y.d || x.isZero()) { - r = getPi(this, wpr, 1).times(0.5); - r.s = y.s; - } else if (x.s < 0) { - this.precision = wpr; - this.rounding = 1; - r = this.atan(divide(y, x, wpr, 1)); - x = getPi(this, wpr, 1); - this.precision = pr; - this.rounding = rm; - r = y.s < 0 ? r.minus(x) : r.plus(x); - } else { - r = this.atan(divide(y, x, wpr, 1)); - } - return r; -} -__name(atan2, "atan2"); -function cbrt(x) { - return new this(x).cbrt(); -} -__name(cbrt, "cbrt"); -function ceil(x) { - return finalise(x = new this(x), x.e + 1, 2); -} -__name(ceil, "ceil"); -function clamp(x, min2, max2) { - return new this(x).clamp(min2, max2); -} -__name(clamp, "clamp"); -function config(obj) { - if (!obj || typeof obj !== "object") - throw Error(decimalError + "Object expected"); - var i, p, v, useDefaults = obj.defaults === true, ps = [ - "precision", - 1, - MAX_DIGITS, - "rounding", - 0, - 8, - "toExpNeg", - -EXP_LIMIT, - 0, - "toExpPos", - 0, - EXP_LIMIT, - "maxE", - 0, - EXP_LIMIT, - "minE", - -EXP_LIMIT, - 0, - "modulo", - 0, - 9 - ]; - for (i = 0; i < ps.length; i += 3) { - if (p = ps[i], useDefaults) - this[p] = DEFAULTS[p]; - if ((v = obj[p]) !== void 0) { - if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) - this[p] = v; - else - throw Error(invalidArgument + p + ": " + v); - } - } - if (p = "crypto", useDefaults) - this[p] = DEFAULTS[p]; - if ((v = obj[p]) !== void 0) { - if (v === true || v === false || v === 0 || v === 1) { - if (v) { - if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) { - this[p] = true; - } else { - throw Error(cryptoUnavailable); - } - } else { - this[p] = false; - } - } else { - throw Error(invalidArgument + p + ": " + v); - } - } - return this; -} -__name(config, "config"); -function cos(x) { - return new this(x).cos(); -} -__name(cos, "cos"); -function cosh(x) { - return new this(x).cosh(); -} -__name(cosh, "cosh"); -function clone(obj) { - var i, p, ps; - function Decimal2(v) { - var e, i2, t, x = this; - if (!(x instanceof Decimal2)) - return new Decimal2(v); - x.constructor = Decimal2; - if (isDecimalInstance(v)) { - x.s = v.s; - if (external) { - if (!v.d || v.e > Decimal2.maxE) { - x.e = NaN; - x.d = null; - } else if (v.e < Decimal2.minE) { - x.e = 0; - x.d = [0]; - } else { - x.e = v.e; - x.d = v.d.slice(); - } - } else { - x.e = v.e; - x.d = v.d ? v.d.slice() : v.d; - } - return; - } - t = typeof v; - if (t === "number") { - if (v === 0) { - x.s = 1 / v < 0 ? -1 : 1; - x.e = 0; - x.d = [0]; - return; - } - if (v < 0) { - v = -v; - x.s = -1; - } else { - x.s = 1; - } - if (v === ~~v && v < 1e7) { - for (e = 0, i2 = v; i2 >= 10; i2 /= 10) - e++; - if (external) { - if (e > Decimal2.maxE) { - x.e = NaN; - x.d = null; - } else if (e < Decimal2.minE) { - x.e = 0; - x.d = [0]; - } else { - x.e = e; - x.d = [v]; - } - } else { - x.e = e; - x.d = [v]; - } - return; - } else if (v * 0 !== 0) { - if (!v) - x.s = NaN; - x.e = NaN; - x.d = null; - return; - } - return parseDecimal(x, v.toString()); - } else if (t !== "string") { - throw Error(invalidArgument + v); - } - if ((i2 = v.charCodeAt(0)) === 45) { - v = v.slice(1); - x.s = -1; - } else { - if (i2 === 43) - v = v.slice(1); - x.s = 1; - } - return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); - } - __name(Decimal2, "Decimal"); - Decimal2.prototype = P; - Decimal2.ROUND_UP = 0; - Decimal2.ROUND_DOWN = 1; - Decimal2.ROUND_CEIL = 2; - Decimal2.ROUND_FLOOR = 3; - Decimal2.ROUND_HALF_UP = 4; - Decimal2.ROUND_HALF_DOWN = 5; - Decimal2.ROUND_HALF_EVEN = 6; - Decimal2.ROUND_HALF_CEIL = 7; - Decimal2.ROUND_HALF_FLOOR = 8; - Decimal2.EUCLID = 9; - Decimal2.config = Decimal2.set = config; - Decimal2.clone = clone; - Decimal2.isDecimal = isDecimalInstance; - Decimal2.abs = abs; - Decimal2.acos = acos; - Decimal2.acosh = acosh; - Decimal2.add = add; - Decimal2.asin = asin; - Decimal2.asinh = asinh; - Decimal2.atan = atan; - Decimal2.atanh = atanh; - Decimal2.atan2 = atan2; - Decimal2.cbrt = cbrt; - Decimal2.ceil = ceil; - Decimal2.clamp = clamp; - Decimal2.cos = cos; - Decimal2.cosh = cosh; - Decimal2.div = div; - Decimal2.exp = exp; - Decimal2.floor = floor; - Decimal2.hypot = hypot; - Decimal2.ln = ln; - Decimal2.log = log; - Decimal2.log10 = log10; - Decimal2.log2 = log2; - Decimal2.max = max; - Decimal2.min = min; - Decimal2.mod = mod; - Decimal2.mul = mul; - Decimal2.pow = pow; - Decimal2.random = random; - Decimal2.round = round; - Decimal2.sign = sign; - Decimal2.sin = sin; - Decimal2.sinh = sinh; - Decimal2.sqrt = sqrt; - Decimal2.sub = sub; - Decimal2.sum = sum; - Decimal2.tan = tan; - Decimal2.tanh = tanh; - Decimal2.trunc = trunc; - if (obj === void 0) - obj = {}; - if (obj) { - if (obj.defaults !== true) { - ps = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"]; - for (i = 0; i < ps.length; ) - if (!obj.hasOwnProperty(p = ps[i++])) - obj[p] = this[p]; - } - } - Decimal2.config(obj); - return Decimal2; -} -__name(clone, "clone"); -function div(x, y) { - return new this(x).div(y); -} -__name(div, "div"); -function exp(x) { - return new this(x).exp(); -} -__name(exp, "exp"); -function floor(x) { - return finalise(x = new this(x), x.e + 1, 3); -} -__name(floor, "floor"); -function hypot() { - var i, n, t = new this(0); - external = false; - for (i = 0; i < arguments.length; ) { - n = new this(arguments[i++]); - if (!n.d) { - if (n.s) { - external = true; - return new this(1 / 0); - } - t = n; - } else if (t.d) { - t = t.plus(n.times(n)); - } - } - external = true; - return t.sqrt(); -} -__name(hypot, "hypot"); -function isDecimalInstance(obj) { - return obj instanceof Decimal || obj && obj.toStringTag === tag || false; -} -__name(isDecimalInstance, "isDecimalInstance"); -function ln(x) { - return new this(x).ln(); -} -__name(ln, "ln"); -function log(x, y) { - return new this(x).log(y); -} -__name(log, "log"); -function log2(x) { - return new this(x).log(2); -} -__name(log2, "log2"); -function log10(x) { - return new this(x).log(10); -} -__name(log10, "log10"); -function max() { - return maxOrMin(this, arguments, "lt"); -} -__name(max, "max"); -function min() { - return maxOrMin(this, arguments, "gt"); -} -__name(min, "min"); -function mod(x, y) { - return new this(x).mod(y); -} -__name(mod, "mod"); -function mul(x, y) { - return new this(x).mul(y); -} -__name(mul, "mul"); -function pow(x, y) { - return new this(x).pow(y); -} -__name(pow, "pow"); -function random(sd) { - var d, e, k, n, i = 0, r = new this(1), rd = []; - if (sd === void 0) - sd = this.precision; - else - checkInt32(sd, 1, MAX_DIGITS); - k = Math.ceil(sd / LOG_BASE); - if (!this.crypto) { - for (; i < k; ) - rd[i++] = Math.random() * 1e7 | 0; - } else if (crypto.getRandomValues) { - d = crypto.getRandomValues(new Uint32Array(k)); - for (; i < k; ) { - n = d[i]; - if (n >= 429e7) { - d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; - } else { - rd[i++] = n % 1e7; - } - } - } else if (crypto.randomBytes) { - d = crypto.randomBytes(k *= 4); - for (; i < k; ) { - n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 127) << 24); - if (n >= 214e7) { - crypto.randomBytes(4).copy(d, i); - } else { - rd.push(n % 1e7); - i += 4; - } - } - i = k / 4; - } else { - throw Error(cryptoUnavailable); - } - k = rd[--i]; - sd %= LOG_BASE; - if (k && sd) { - n = mathpow(10, LOG_BASE - sd); - rd[i] = (k / n | 0) * n; - } - for (; rd[i] === 0; i--) - rd.pop(); - if (i < 0) { - e = 0; - rd = [0]; - } else { - e = -1; - for (; rd[0] === 0; e -= LOG_BASE) - rd.shift(); - for (k = 1, n = rd[0]; n >= 10; n /= 10) - k++; - if (k < LOG_BASE) - e -= LOG_BASE - k; - } - r.e = e; - r.d = rd; - return r; -} -__name(random, "random"); -function round(x) { - return finalise(x = new this(x), x.e + 1, this.rounding); -} -__name(round, "round"); -function sign(x) { - x = new this(x); - return x.d ? x.d[0] ? x.s : 0 * x.s : x.s || NaN; -} -__name(sign, "sign"); -function sin(x) { - return new this(x).sin(); -} -__name(sin, "sin"); -function sinh(x) { - return new this(x).sinh(); -} -__name(sinh, "sinh"); -function sqrt(x) { - return new this(x).sqrt(); -} -__name(sqrt, "sqrt"); -function sub(x, y) { - return new this(x).sub(y); -} -__name(sub, "sub"); -function sum() { - var i = 0, args = arguments, x = new this(args[i]); - external = false; - for (; x.s && ++i < args.length; ) - x = x.plus(args[i]); - external = true; - return finalise(x, this.precision, this.rounding); -} -__name(sum, "sum"); -function tan(x) { - return new this(x).tan(); -} -__name(tan, "tan"); -function tanh(x) { - return new this(x).tanh(); -} -__name(tanh, "tanh"); -function trunc(x) { - return finalise(x = new this(x), x.e + 1, 1); -} -__name(trunc, "trunc"); -P[Symbol.for("nodejs.util.inspect.custom")] = P.toString; -P[Symbol.toStringTag] = "Decimal"; -var Decimal = P.constructor = clone(DEFAULTS); -LN10 = new Decimal(LN10); -PI = new Decimal(PI); -var decimal_default = Decimal; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Decimal, - makeStrictEnum, - objectEnumValues -}); -/*! - * decimal.js v10.4.2 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - */ diff --git a/packages/desktop/prisma/client/runtime/index.d.ts b/packages/desktop/prisma/client/runtime/index.d.ts deleted file mode 100644 index 54f7d25..0000000 --- a/packages/desktop/prisma/client/runtime/index.d.ts +++ /dev/null @@ -1,2075 +0,0 @@ -/** - * TODO - * @param this - */ -declare function $extends(this: Client, extension: Args_2 | ((client: Client) => Client)): Client; - -declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare class AnyNull extends NullTypesEnumValue { -} - -declare type ApplyExtensionsParams = { - result: object; - modelName: string; - args: IncludeSelect; - extensions: MergedExtensionsList; -}; - -declare class Arg { - key: string; - value: ArgValue; - error?: InvalidArgError; - hasError: boolean; - isEnum: boolean; - schemaArg?: DMMF.SchemaArg; - isNullable: boolean; - inputType?: DMMF.SchemaArgInputType; - constructor({ key, value, isEnum, error, schemaArg, inputType }: ArgOptions); - get [Symbol.toStringTag](): string; - _toString(value: ArgValue, key: string): string | undefined; - toString(): string | undefined; - collectErrors(): ArgError[]; -} - -declare interface ArgError { - path: string[]; - id?: string; - error: InvalidArgError; -} - -declare interface ArgOptions { - key: string; - value: ArgValue; - isEnum?: boolean; - error?: InvalidArgError; - schemaArg?: DMMF.SchemaArg; - inputType?: DMMF.SchemaArgInputType; -} - -declare class Args { - args: Arg[]; - readonly hasInvalidArg: boolean; - constructor(args?: Arg[]); - get [Symbol.toStringTag](): string; - toString(): string; - collectErrors(): ArgError[]; -} - -declare type Args_2 = OptionalFlat; - -declare type ArgValue = string | boolean | number | undefined | Args | string[] | boolean[] | number[] | Args[] | null; - -declare interface AtLeastOneError { - type: 'atLeastOne'; - key: string; - inputType: DMMF.InputType; - atLeastFields?: string[]; -} - -declare interface AtMostOneError { - type: 'atMostOne'; - key: string; - inputType: DMMF.InputType; - providedKeys: string[]; -} - -export declare type BaseDMMF = Pick; - -declare interface BaseDMMFHelper extends DMMFDatamodelHelper, DMMFMappingsHelper { -} - -declare class BaseDMMFHelper { - constructor(dmmf: BaseDMMF); -} - -declare type BatchQueryEngineResult = QueryEngineResult | Error; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction.IsolationLevel; -}; - -declare type BatchTransactionOptions_2 = Omit; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: null | string; - value: string; -} - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -declare type Client = ReturnType extends new () => infer T ? T : never; - -declare type ClientArgs = { - client: ClientExtensionDefinition; -}; - -declare enum ClientEngineType { - Library = "library", - Binary = "binary" -} - -declare type ClientExtensionDefinition = { - [MethodName in string]: (...args: any[]) => any; -}; - -declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'sqlserver' | 'jdbc:sqlserver' | 'cockroachdb'; - -declare type ConnectorType_2 = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'sqlserver' | 'jdbc: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 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; -}; - -declare interface DataSource { - name: string; - activeProvider: ConnectorType; - provider: ConnectorType; - url: EnvValue; - config: { - [key: string]: string; - }; -} - -declare type Datasource = { - url?: string; -}; - -declare interface DatasourceOverwrite { - name: string; - url?: string; - env?: string; -} - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare interface Debug { - (namespace: string): Debugger; - disable: () => string; - enable: (namespace: string) => void; - enabled: (namespace: string) => boolean; - log: (...args: any[]) => any; - formatters: Record string) | undefined>; -} - -declare interface Debugger { - (format: any, ...args: any[]): void; - log: (...args: any[]) => any; - extend: (namespace: string, delimiter?: string) => Debugger; - color: string | number; - enabled: boolean; - namespace: string; -} - -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; - private readonly toStringTag: string; - - 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; -} - -export declare const decompressFromBase64: any; - -declare type DefaultArgs = { - result: {}; - model: {}; - query: {}; - client: {}; -}; - -declare function defineExtension(ext: Args_2 | ((client: Client) => Client)): (client: Client) => Client; - -declare type Dictionary = { - [key: string]: T; -}; - -declare interface Dictionary_2 { - [key: string]: T; -} - -export declare namespace DMMF { - export interface Document { - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; - } - export interface Mappings { - modelOperations: ModelMapping[]; - otherOperations: { - read: string[]; - write: string[]; - }; - } - export interface OtherOperationMappings { - read: string[]; - write: string[]; - } - export interface DatamodelEnum { - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; - } - export interface SchemaEnum { - name: string; - values: string[]; - } - export interface EnumValue { - name: string; - dbName: string | null; - } - export interface Datamodel { - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - } - export interface uniqueIndex { - name: string; - fields: string[]; - } - export interface PrimaryKey { - name: string | null; - fields: string[]; - } - export interface Model { - name: string; - dbName: string | null; - fields: Field[]; - uniqueFields: string[][]; - uniqueIndexes: uniqueIndex[]; - documentation?: string; - primaryKey: PrimaryKey | null; - [key: string]: any; - } - export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; - export type FieldNamespace = 'model' | 'prisma'; - export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; - export interface Field { - 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 is is defined in the Prisma schema: - * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName - */ - type: string; - dbNames?: string[] | null; - hasDefaultValue: boolean; - default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; - relationFromFields?: string[]; - relationToFields?: any[]; - relationOnDelete?: string; - relationName?: string; - documentation?: string; - [key: string]: any; - } - export interface FieldDefault { - name: string; - args: any[]; - } - export type FieldDefaultScalar = string | boolean | number; - export interface Schema { - rootQueryType?: string; - rootMutationType?: string; - inputObjectTypes: { - model?: InputType[]; - prisma: InputType[]; - }; - outputObjectTypes: { - model: OutputType[]; - prisma: OutputType[]; - }; - enumTypes: { - model?: SchemaEnum[]; - prisma: SchemaEnum[]; - }; - fieldRefTypes: { - prisma?: FieldRefType[]; - }; - } - export interface Query { - name: string; - args: SchemaArg[]; - output: QueryOutput; - } - export interface QueryOutput { - name: string; - isRequired: boolean; - isList: boolean; - } - export type ArgType = string | InputType | SchemaEnum; - export interface SchemaArgInputType { - isList: boolean; - type: ArgType; - location: FieldLocation; - namespace?: FieldNamespace; - } - export interface SchemaArg { - name: string; - comment?: string; - isNullable: boolean; - isRequired: boolean; - inputTypes: SchemaArgInputType[]; - deprecation?: Deprecation; - } - export interface OutputType { - name: string; - fields: SchemaField[]; - fieldMap?: Record; - } - export interface SchemaField { - name: string; - isNullable?: boolean; - outputType: OutputTypeRef; - args: SchemaArg[]; - deprecation?: Deprecation; - documentation?: string; - } - export type TypeRefCommon = { - isList: boolean; - namespace?: FieldNamespace; - }; - export type TypeRefScalar = TypeRefCommon & { - location: 'scalar'; - type: string; - }; - export type TypeRefOutputObject = TypeRefCommon & { - location: 'outputObjectTypes'; - type: OutputType | string; - }; - export type TypeRefEnum = TypeRefCommon & { - location: 'enumTypes'; - type: SchemaEnum | string; - }; - export type OutputTypeRef = TypeRefScalar | TypeRefOutputObject | TypeRefEnum; - export interface Deprecation { - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; - } - export interface InputType { - name: string; - constraints: { - maxNumFields: number | null; - minNumFields: number | null; - fields?: string[]; - }; - meta?: { - source?: string; - }; - fields: SchemaArg[]; - fieldMap?: Record; - } - export interface FieldRefType { - name: string; - allowTypes: FieldRefAllowType[]; - fields: SchemaArg[]; - } - export type FieldRefAllowType = TypeRefScalar | TypeRefEnum; - export interface ModelMapping { - 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; - update?: string | null; - updateMany?: 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", - update = "update", - updateMany = "updateMany", - upsert = "upsert", - delete = "delete", - deleteMany = "deleteMany", - groupBy = "groupBy", - count = "count", - aggregate = "aggregate", - findRaw = "findRaw", - aggregateRaw = "aggregateRaw" - } -} - -export declare interface DMMFClass extends BaseDMMFHelper, DMMFSchemaHelper { -} - -export declare class DMMFClass { - constructor(dmmf: DMMF.Document); -} - -declare class DMMFDatamodelHelper implements Pick { - datamodel: DMMF.Datamodel; - datamodelEnumMap: Dictionary_2; - modelMap: Dictionary_2; - typeMap: Dictionary_2; - typeAndModelMap: Dictionary_2; - constructor({ datamodel }: Pick); - getDatamodelEnumMap(): Dictionary_2; - getModelMap(): Dictionary_2; - getTypeMap(): Dictionary_2; - getTypeModelMap(): Dictionary_2; -} - -declare class DMMFMappingsHelper implements Pick { - mappings: DMMF.Mappings; - mappingsMap: Dictionary_2; - constructor({ mappings }: Pick); - getMappingsMap(): Dictionary_2; -} - -declare class DMMFSchemaHelper implements Pick { - schema: DMMF.Schema; - queryType: DMMF.OutputType; - mutationType: DMMF.OutputType; - outputTypes: { - model: DMMF.OutputType[]; - prisma: DMMF.OutputType[]; - }; - outputTypeMap: Dictionary_2; - inputObjectTypes: { - model?: DMMF.InputType[]; - prisma: DMMF.InputType[]; - }; - inputTypeMap: Dictionary_2; - enumMap: Dictionary_2; - rootFieldMap: Dictionary_2; - constructor({ schema }: Pick); - get [Symbol.toStringTag](): string; - outputTypeToMergedOutputType: (outputType: DMMF.OutputType) => DMMF.OutputType; - resolveOutputTypes(): void; - resolveInputTypes(): void; - resolveFieldArgumentTypes(): void; - getQueryType(): DMMF.OutputType; - getMutationType(): DMMF.OutputType; - getOutputTypes(): { - model: DMMF.OutputType[]; - prisma: DMMF.OutputType[]; - }; - getEnumMap(): Dictionary_2; - hasEnumInNamespace(enumName: string, namespace: 'prisma' | 'model'): boolean; - getMergedOutputTypeMap(): Dictionary_2; - getInputTypeMap(): Dictionary_2; - getRootFieldMap(): Dictionary_2; -} - -declare class Document_2 { - readonly type: 'query' | 'mutation'; - readonly children: Field[]; - constructor(type: 'query' | 'mutation', children: Field[]); - get [Symbol.toStringTag](): string; - toString(): string; - validate(select?: any, isTopLevelQuery?: boolean, originalMethod?: string, errorFormat?: 'pretty' | 'minimal' | 'colorless', validationCallsite?: any): void; - protected printFieldError: ({ error }: FieldError, missingItems: MissingItem[], minimal: boolean) => string | undefined; - protected printArgError: ({ error, path, id }: ArgError, hasMissingItems: boolean, minimal: boolean) => string | undefined; - /** - * As we're allowing both single objects and array of objects for list inputs, we need to remove incorrect - * zero indexes from the path - * @param inputPath e.g. ['where', 'AND', 0, 'id'] - * @param select select object - */ - private normalizePath; -} - -declare interface DocumentInput { - dmmf: DMMFClass; - rootTypeName: 'query' | 'mutation'; - rootField: string; - select?: any; - modelName?: string; - extensions: MergedExtensionsList; -} - -/** - * Placeholder value for "no text". - */ -export declare const empty: Sql; - -declare interface EmptyIncludeError { - type: 'emptyInclude'; - field: DMMF.SchemaField; -} - -declare interface EmptySelectError { - type: 'emptySelect'; - field: DMMF.SchemaField; -} - -declare type EmptyToUnknown = T; - -export declare abstract class Engine { - abstract on(event: EngineEventType, listener: (args?: any) => any): void; - abstract start(): Promise; - abstract stop(): Promise; - abstract getConfig(): Promise; - abstract getDmmf(): Promise; - abstract version(forceRun?: boolean): Promise | string; - abstract request(options: RequestOptions): Promise>; - abstract requestBatch(options: RequestBatchOptions): Promise[]>; - abstract transaction(action: 'start', headers: Transaction.TransactionHeaders, options?: Transaction.Options): Promise>; - abstract transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.Info): Promise; - abstract transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.Info): Promise; - abstract metrics(options: MetricsOptionsJson): Promise; - abstract metrics(options: MetricsOptionsPrometheus): Promise; -} - -declare interface EngineConfig { - cwd?: string; - dirname?: string; - datamodelPath: string; - enableDebugLogs?: boolean; - allowTriggerPanic?: boolean; - prismaPath?: string; - fetcher?: (query: string) => Promise<{ - data?: any; - error?: any; - }>; - generator?: GeneratorConfig; - datasources?: DatasourceOverwrite[]; - showColors?: boolean; - logQueries?: boolean; - logLevel?: 'info' | 'warn'; - env: Record; - flags?: string[]; - clientVersion?: string; - previewFeatures?: string[]; - engineEndpoint?: string; - activeProvider?: string; - logEmitter: EventEmitter; - /** - * The contents of the schema encoded into a string - * @remarks only used for the purpose of data proxy - */ - inlineSchema?: string; - /** - * The contents of the datasource url saved in a string - * @remarks only used for the purpose of data proxy - */ - inlineDatasources?: Record; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash?: string; - /** - * The configuration object for enabling tracing - * @remarks enabling is determined by the client - */ - tracingConfig: TracingConfig; -} - -declare type EngineEventType = 'query' | 'info' | 'warn' | 'error' | 'beforeExit'; - -declare type EngineMiddleware = (params: EngineMiddlewareParams, next: (params: EngineMiddlewareParams) => Promise<{ - data: T; - elapsed: number; -}>) => Promise<{ - data: T; - elapsed: number; -}>; - -declare type EngineMiddlewareParams = { - document: Document_2; - runInTransaction?: boolean; -}; - -declare interface EnvValue { - fromEnvVar: null | string; - value: string; -} - -declare interface EnvValue_2 { - fromEnvVar: string | null; - value: string | null; -} - -declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - -declare interface ErrorWithBatchIndex { - batchRequestIdx?: number; -} - -declare interface EventEmitter { - on(event: string, listener: (...args: any[]) => void): unknown; - emit(event: string, args?: any): boolean; -} - -declare namespace Extensions { - export { - defineExtension, - getExtensionContext - } -} -export { Extensions } - -declare namespace Extensions_2 { - export { - DefaultArgs, - GetResultPayload, - GetResultSelect, - GetModel, - GetClient, - ReadonlySelector, - RequiredArgs as Args - } -} - -declare class Field { - readonly name: string; - readonly args?: Args; - readonly children?: Field[]; - readonly error?: InvalidFieldError; - readonly hasInvalidChild: boolean; - readonly hasInvalidArg: boolean; - readonly schemaField?: DMMF.SchemaField; - constructor({ name, args, children, error, schemaField }: FieldArgs); - get [Symbol.toStringTag](): string; - toString(): string; - collectErrors(prefix?: string): { - fieldErrors: FieldError[]; - argErrors: ArgError[]; - }; -} - -declare interface FieldArgs { - name: string; - schemaField?: DMMF.SchemaField; - args?: Args; - children?: Field[]; - error?: InvalidFieldError; -} - -declare interface FieldError { - path: string[]; - error: InvalidFieldError; -} - -/** - * 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; -} - -/** - * Find paths that match a set of regexes - * @param root to start from - * @param match to match against - * @param types to select files, folders, links - * @param deep to recurse in the directory tree - * @param limit to limit the results - * @param handler to further filter results - * @param found to add to already found - * @param seen to add to already seen - * @returns found paths (symlinks preserved) - */ -export declare function findSync(root: string, match: (RegExp | string)[], types?: ('f' | 'd' | 'l')[], deep?: ('d' | 'l')[], limit?: number, handler?: Handler, found?: string[], seen?: Record): string[]; - -declare interface GeneratorConfig { - name: string; - output: EnvValue | null; - isCustomOutput?: boolean; - provider: EnvValue; - config: Dictionary; - binaryTargets: BinaryTargetsEnvValue[]; - previewFeatures: string[]; -} - -declare type GetClient = C & Omit_2 & Omit_2; - -declare type GetConfigResult = { - datasources: DataSource[]; - generators: GeneratorConfig[]; -}; - -declare function getExtensionContext(that: { - [K: symbol]: T; -}): T; - -declare type GetModel = M & Omit_2; - -export declare function getPrismaClient(config: GetPrismaClientConfig): { - new (optionsArg?: PrismaClientOptions): { - _baseDmmf: BaseDMMFHelper; - _dmmf?: DMMFClass | undefined; - _engine: Engine; - _fetcher: RequestHandler; - _connectionPromise?: Promise | undefined; - _disconnectionPromise?: Promise | undefined; - _engineConfig: EngineConfig; - _clientVersion: string; - _errorFormat: ErrorFormat; - _clientEngineType: ClientEngineType; - _tracingConfig: TracingConfig; - _hooks?: Hooks | undefined; - _metrics: MetricsClient; - _getConfigPromise?: Promise<{ - datasources: DataSource[]; - generators: GeneratorConfig[]; - }> | undefined; - _middlewares: Middlewares; - _previewFeatures: string[]; - _activeProvider: string; - _rejectOnNotFound?: InstanceRejectOnNotFound; - _dataProxy: boolean; - _extensions: MergedExtensionsList; - getEngine(): Engine; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(middleware: QueryMiddleware): any; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(namespace: 'all', cb: QueryMiddleware): any; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(namespace: 'engine', cb: EngineMiddleware): any; - $on(eventType: EngineEventType, callback: (event: any) => void): void; - $connect(): Promise; - /** - * @private - */ - _runDisconnect(): Promise; - /** - * Disconnect from the database - */ - $disconnect(): Promise; - _getActiveProvider(): Promise; - /** - * Executes a raw query and always returns a number - */ - $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, lock: PromiseLike | undefined, query: string | TemplateStringsArray | Sql, ...values: RawValue[]): 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; - /** - * 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; - /** - * Executes a raw command only for MongoDB - * - * @param command - * @returns - */ - $runCommandRaw(command: object): PrismaPromise; - /** - * Executes a raw query and returns selected data - */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, lock: PromiseLike | undefined, query: string | TemplateStringsArray | Sql, ...values: RawValue[]): 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; - /** - * 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; - __internal_triggerPanic(fatal: boolean): Promise; - /** - * Execute a batch of requests in a transaction - * @param requests - * @param options - */ - _transactionWithArray({ promises, options, }: { - promises: Array>; - options?: BatchTransactionOptions | undefined; - }): Promise; - /** - * Perform a long-running transaction - * @param callback - * @param options - * @returns - */ - _transactionWithCallback({ callback, options, }: { - callback: (client: Client) => Promise; - options?: Options | undefined; - }): Promise; - /** - * 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, jsModelName, dataPath, callsite, action, model, headers, argsMapper, transaction, lock, unpacker, otelParentCtx, }: InternalRequestParams): Promise; - _getDmmf: (params: Pick) => Promise; - readonly $metrics: MetricsClient; - /** - * Shortcut for checking a preview flag - * @param feature preview flag - * @returns - */ - _hasPreviewFlag(feature: string): boolean; - $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 interface GetPrismaClientConfig { - document: Omit; - generator?: GeneratorConfig; - sqliteDatasourceOverrides?: DatasourceOverwrite[]; - relativeEnvPaths: { - rootEnvPath?: string | null; - schemaEnvPath?: string | null; - }; - relativePath: string; - dirname: string; - filename?: string; - clientVersion?: string; - engineVersion?: string; - datasourceNames: string[]; - activeProvider: string; - /** - * True when `--data-proxy` is passed to `prisma generate` - * If enabled, we disregard the generator config engineType. - * It means that `--data-proxy` binds you to the Data Proxy. - */ - dataProxy: boolean; - /** - * 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?: InlineDatasources; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash?: string; -} - -declare type GetResultPayload = {} extends R ? Base : { - [K in keyof R]: ReturnType; -} & { - [K in Exclude]: Base[K]; -}; - -declare type GetResultSelect = R extends unknown ? Base & { - [K in keyof R]?: boolean; -} : never; - -declare type HandleErrorParams = { - error: any; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; -}; - -declare type Handler = (base: string, item: string, type: ItemType) => boolean | string; - -declare type HookParams = { - query: string; - path: string[]; - rootField?: string; - typeName?: string; - document: any; - clientMethod: string; - args: any; -}; - -declare type Hooks = { - beforeRequest?: (options: HookParams) => any; -}; - -declare interface IncludeAndSelectError { - type: 'includeAndSelect'; - field: DMMF.SchemaField; -} - -declare type IncludeSelect = { - select?: Selection_2; - include?: Selection_2; -}; - -declare type Info = { - /** - * 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 InlineDatasource = { - url: NullableEnvValue; -}; - -declare type InlineDatasources = { - [name in InternalDatasource['name']]: { - url: InternalDatasource['url']; - }; -}; - -declare type InstanceRejectOnNotFound = RejectOnNotFound | Record | Record>; - -declare type InteractiveTransactionOptions = Transaction.Info; - -declare type InteractiveTransactionOptions_2 = Omit; - -declare interface InternalDatasource { - name: string; - activeProvider: ConnectorType_2; - provider: ConnectorType_2; - url: EnvValue_2; - config: any; -} - -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; - /** Headers metadata that will be passed to the Engine */ - headers?: Record; - transaction?: PrismaPromiseTransaction; - unpacker?: Unpacker; - lock?: PromiseLike; - otelParentCtx?: Context; - /** Used to "desugar" a user input into an "expanded" one */ - argsMapper?: (args?: UserArgs) => UserArgs; -} & Omit; - -declare type InvalidArgError = InvalidArgNameError | MissingArgError | InvalidArgTypeError | AtLeastOneError | AtMostOneError | InvalidNullArgError; - -/** - * This error occurs if the user provides an arg name that doesn't exist - */ -declare interface InvalidArgNameError { - type: 'invalidName'; - providedName: string; - providedValue: any; - didYouMeanArg?: string; - didYouMeanField?: string; - originalType: DMMF.ArgType; - possibilities?: DMMF.SchemaArgInputType[]; - outputType?: DMMF.OutputType; -} - -/** - * If the scalar type of an arg is not matching what is required - */ -declare interface InvalidArgTypeError { - type: 'invalidType'; - argName: string; - requiredType: { - bestFittingType: DMMF.SchemaArgInputType; - inputType: DMMF.SchemaArgInputType[]; - }; - providedValue: any; -} - -declare type InvalidFieldError = InvalidFieldNameError | InvalidFieldTypeError | EmptySelectError | NoTrueSelectError | IncludeAndSelectError | EmptyIncludeError; - -declare interface InvalidFieldNameError { - type: 'invalidFieldName'; - modelName: string; - didYouMean?: string | null; - providedName: string; - isInclude?: boolean; - isIncludeScalar?: boolean; - outputType: DMMF.OutputType; -} - -declare interface InvalidFieldTypeError { - type: 'invalidFieldType'; - modelName: string; - fieldName: string; - providedValue: any; -} - -/** - * If a user incorrectly provided null where she shouldn't have - */ -declare interface InvalidNullArgError { - type: 'invalidNullArg'; - name: string; - invalidType: DMMF.SchemaArgInputType[]; - atLeastOne: boolean; - atMostOne: boolean; -} - -declare enum IsolationLevel { - ReadUncommitted = "ReadUncommitted", - ReadCommitted = "ReadCommitted", - RepeatableRead = "RepeatableRead", - Snapshot = "Snapshot", - Serializable = "Serializable" -} - -declare type ItemType = 'd' | 'f' | 'l'; - -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: RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; - -declare class JsonNull extends NullTypesEnumValue { -} - -declare type KnownErrorParams = { - code: string; - clientVersion: string; - meta?: Record; - batchRequestIdx?: 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'; -}; - -declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; - -export declare function makeDocument({ dmmf, rootTypeName, rootField, select, modelName, extensions, }: DocumentInput): Document_2; - -/** - * 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; - -/** - * 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: Args_2): MergedExtensionsList; - isEmpty(): boolean; - append(extension: Args_2): MergedExtensionsList; - getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; - getAllClientExtensions(): ClientExtensionDefinition | undefined; - getAllModelExtensions(dmmfModelName: string): ModelExtensionDefinition | undefined; - getAllQueryCallbacks(jsModelName: string, action: string): any; -} - -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 class MiddlewareHandler { - private _middlewares; - use(middleware: M): void; - get(id: number): M | undefined; - has(id: number): boolean; - length(): number; -} - -declare class Middlewares { - query: MiddlewareHandler>; - engine: MiddlewareHandler>; -} - -/** - * Opposite of InvalidArgNameError - if the user *doesn't* provide an arg that should be provided - * This error both happens with an implicit and explicit `undefined` - */ -declare interface MissingArgError { - type: 'missingArg'; - missingName: string; - missingArg: DMMF.SchemaArg; - atLeastOne: boolean; - atMostOne: boolean; -} - -declare interface MissingItem { - path: string; - isRequired: boolean; - type: string | object; -} - -declare type ModelArgs = { - model: { - [ModelName in string]: ModelExtensionDefinition; - }; -}; - -declare type ModelExtensionDefinition = { - [MethodName in string]: (...args: any[]) => any; -}; - -declare type NameArgs = { - name?: string; -}; - -declare type NeverToUnknown = [T] extends [never] ? unknown : T; - -/** - * @deprecated please don´t rely on type checks to this error anymore. - * This will become a PrismaClientKnownRequestError with code P2025 - * in the future major version of the client - */ -export declare class NotFoundError extends PrismaClientKnownRequestError { - constructor(message: string); -} - -declare interface NoTrueSelectError { - type: 'noTrueSelect'; - field: DMMF.SchemaField; -} - -declare type NullableEnvValue = { - fromEnvVar: string | null; - value?: string | null; -}; - -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 Omit_2 = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; - -declare type OptionalFlat = { - [K in keyof T]?: T[K]; -}; - -/** - * maxWait ?= 2000 - * timeout ?= 5000 - */ -declare type Options = { - maxWait?: number; - timeout?: number; - isolationLevel?: IsolationLevel; -}; - -declare type PatchDeep = { - [K in keyof O]: K extends keyof O1 ? K extends keyof O2 ? O1[K] extends object ? O2[K] extends object ? O1[K] extends Function ? O1[K] : O2[K] extends Function ? O1[K] : PatchDeep : O1[K] : O1[K] : O1[K] : O2[K & keyof O2]; -} & unknown; - -declare type PatchFlat = O1 & Omit_2; - -/** - * Patches 3 objects on top of each other with minimal looping. - * This is a more efficient way of doing `PatchFlat>` - */ -declare type PatchFlat3 = A & { - [K in Exclude]: K extends keyof B ? B[K] : C[K & keyof C]; -}; - -declare type Pick_2 = { - [P in keyof T as P extends K ? P : never]: T[P]; -}; - -export declare class PrismaClientExtensionError extends Error { - extensionName: string | undefined; - constructor(extensionName: string | undefined, cause: unknown); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientInitializationError extends Error { - clientVersion: string; - errorCode?: string; - 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 interface PrismaClientOptions { - /** - * Will throw an Error if findUnique returns null - */ - rejectOnNotFound?: InstanceRejectOnNotFound; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * @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; - /** - * @internal - * You probably don't want to use this. \`__internal\` is used by internal tooling. - */ - __internal?: { - debug?: boolean; - hooks?: Hooks; - engine?: { - cwd?: string; - binaryPath?: string; - endpoint?: string; - allowTriggerPanic?: boolean; - }; - }; -} - -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 { - get [Symbol.toStringTag](): string; -} - -/** - * 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 extends Promise { - /** - * Extension of the original `.then` function - * @param onfulfilled same as regular promises - * @param onrejected same as regular promises - * @param transaction interactive transaction options - */ - then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: InteractiveTransactionOptions_2): Promise; - /** - * Extension of the original `.catch` function - * @param onrejected same as regular promises - * @param transaction interactive transaction options - */ - catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: InteractiveTransactionOptions_2): Promise; - /** - * Extension of the original `.finally` function - * @param onfinally same as regular promises - * @param transaction interactive transaction options - */ - finally(onfinally?: (() => void) | undefined | null, transaction?: InteractiveTransactionOptions_2): Promise; - /** - * Called when executing a batch of regular tx - * @param transaction transaction options for regular tx - */ - requestTransaction?(transaction: BatchTransactionOptions_2, lock?: PromiseLike): PromiseLike; -} - -declare type PrismaPromiseBatchTransaction = { - kind: 'batch'; - id: number; - isolationLevel?: IsolationLevel; - index: number; -}; - -declare type PrismaPromiseInteractiveTransaction = { - kind: 'itx'; - id: string; - payload: unknown; -}; - -declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; - -declare type QueryEngineRequestHeaders = { - traceparent?: string; - transactionId?: string; - fatal?: string; -}; - -declare type QueryEngineResult = { - data: T; - elapsed: number; -}; - -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; - /** TODO what is this */ - args: any; -}; - -declare type QueryOptions = { - query: { - [ModelName in string]: { - [ModelAction in string]: QueryOptionsCb; - } & {}; - }; -}; - -declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; - -declare type QueryOptionsCbArgs = { - model?: string; - operation: string; - args: object; - query: (args: object) => Promise; -}; - -/** - * Create raw SQL statement. - */ -export declare function raw(value: string): Sql; - -/** - * Supported value or SQL instance. - */ -export declare type RawValue = Value | Sql; - -declare type ReadonlyDeep = { - readonly [K in keyof T]: ReadonlyDeep; -}; - -declare type ReadonlySelector = T extends unknown ? { - readonly [K in keyof T as K extends 'include' | 'select' ? K : never]: ReadonlyDeep; -} & { - [K in keyof T as K extends 'include' | 'select' ? never : K]: T[K]; -} : never; - -declare type RejectOnNotFound = boolean | ((error: Error) => Error) | undefined; - -declare type Request_2 = { - document: Document_2; - transaction?: PrismaPromiseTransaction; - headers?: Record; - otelParentCtx?: Context; - otelChildCtx?: Context; - tracingConfig?: TracingConfig; -}; - -declare type RequestBatchOptions = { - queries: string[]; - headers?: QueryEngineRequestHeaders; - transaction?: BatchTransactionOptions; - numTry?: number; - containsWrite: boolean; -}; - -declare class RequestHandler { - client: Client; - hooks: any; - dataloader: DataLoader; - private logEmmitter?; - constructor(client: Client, hooks?: any, logEmitter?: EventEmitter); - request({ document, dataPath, rootField, typeName, isList, callsite, rejectOnNotFound, clientMethod, engineHook, args, headers, transaction, unpacker, extensions, otelParentCtx, otelChildCtx, }: RequestParams): Promise; - /** - * Handles the error and logs it, logging the error is done synchronously waiting for the event - * handlers to finish. - */ - handleAndLogRequestError({ error, clientMethod, callsite, transaction }: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction }: HandleErrorParams): never; - sanitizeMessage(message: any): any; - unpack(document: any, data: any, path: any, rootField: any, unpacker?: Unpacker): any; - applyResultExtensions({ result, modelName, args, extensions }: ApplyExtensionsParams): object; - get [Symbol.toStringTag](): string; -} - -declare type RequestOptions = { - query: string; - headers?: QueryEngineRequestHeaders; - numTry?: number; - transaction?: InteractiveTransactionOptions; - isWrite: boolean; -}; - -declare type RequestParams = { - document: Document_2; - dataPath: string[]; - rootField: string; - typeName: string; - isList: boolean; - clientMethod: string; - callsite?: CallSite; - rejectOnNotFound?: RejectOnNotFound; - transaction?: PrismaPromiseTransaction; - engineHook?: EngineMiddleware; - extensions: MergedExtensionsList; - args?: any; - headers?: Record; - unpacker?: Unpacker; - otelParentCtx?: Context; - otelChildCtx?: Context; -}; - -declare type RequiredArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; - -declare type ResultArgs = { - result: { - [ModelName in string]: ResultModelArgs; - }; -}; - -declare type ResultArgsFieldCompute = (model: any) => unknown; - -declare type ResultFieldDefinition = { - needs?: { - [FieldName in string]: boolean; - }; - compute: ResultArgsFieldCompute; -}; - -declare type ResultModelArgs = { - [FieldName in string]: ResultFieldDefinition; -}; - -declare type Selection_2 = Record; - -/** - * A SQL instance can be nested within each other to build SQL strings. - */ -export declare class Sql { - values: Value[]; - strings: string[]; - constructor(rawStrings: ReadonlyArray, rawValues: ReadonlyArray); - get text(): string; - get sql(): string; - inspect(): { - text: string; - sql: string; - values: unknown[]; - }; -} - -/** - * Create a SQL object from a template string. - */ -export declare function sqltag(strings: ReadonlyArray, ...values: RawValue[]): Sql; - -declare type TracingConfig = { - enabled: boolean; - middleware: boolean; -}; - -declare namespace Transaction { - export { - IsolationLevel, - Options, - Info, - TransactionHeaders - } -} - -declare type TransactionHeaders = { - traceparent?: string; -}; - -export declare function transformDocument(document: Document_2): Document_2; - -declare namespace Types { - export { - Extensions_2 as Extensions, - Utils - } -} -export { Types } - -declare type UnknownErrorParams = { - clientVersion: string; - batchRequestIdx?: number; -}; - -/** - * Unpacks the result of a data object and maps DateTime fields to instances of `Date` in-place - * @param options: UnpackOptions - */ -export declare function unpack({ document, path, data }: UnpackOptions): any; - -declare type Unpacker = (data: any) => any; - -declare interface UnpackOptions { - document: Document_2; - path: string[]; - data: any; -} - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs = { - [K in string]: UserArgsProp | UserArgsProp[]; -}; - -declare type UserArgsProp = UserArgs | string | number | boolean | bigint | null | undefined; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - PatchDeep, - Omit_2 as Omit, - Pick_2 as Pick, - PatchFlat3, - Compute, - OptionalFlat, - ReadonlyDeep - } -} - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export { } diff --git a/packages/desktop/prisma/client/runtime/index.js b/packages/desktop/prisma/client/runtime/index.js deleted file mode 100644 index 5c18729..0000000 --- a/packages/desktop/prisma/client/runtime/index.js +++ /dev/null @@ -1,36419 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __commonJS = (cb, mod2) => function __require() { - return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps( - isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, - mod2 -)); -var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; - -// ../../node_modules/.pnpm/lz-string@1.4.4/node_modules/lz-string/libs/lz-string.js -var require_lz_string = __commonJS({ - "../../node_modules/.pnpm/lz-string@1.4.4/node_modules/lz-string/libs/lz-string.js"(exports, module2) { - var LZString = function() { - var f2 = String.fromCharCode; - var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; - var baseReverseDic = {}; - function getBaseValue(alphabet, character) { - if (!baseReverseDic[alphabet]) { - baseReverseDic[alphabet] = {}; - for (var i = 0; i < alphabet.length; i++) { - baseReverseDic[alphabet][alphabet.charAt(i)] = i; - } - } - return baseReverseDic[alphabet][character]; - } - __name(getBaseValue, "getBaseValue"); - var LZString2 = { - compressToBase64: function(input) { - if (input == null) - return ""; - var res = LZString2._compress(input, 6, function(a) { - return keyStrBase64.charAt(a); - }); - switch (res.length % 4) { - default: - case 0: - return res; - case 1: - return res + "==="; - case 2: - return res + "=="; - case 3: - return res + "="; - } - }, - decompressFromBase64: function(input) { - if (input == null) - return ""; - if (input == "") - return null; - return LZString2._decompress(input.length, 32, function(index) { - return getBaseValue(keyStrBase64, input.charAt(index)); - }); - }, - compressToUTF16: function(input) { - if (input == null) - return ""; - return LZString2._compress(input, 15, function(a) { - return f2(a + 32); - }) + " "; - }, - decompressFromUTF16: function(compressed) { - if (compressed == null) - return ""; - if (compressed == "") - return null; - return LZString2._decompress(compressed.length, 16384, function(index) { - return compressed.charCodeAt(index) - 32; - }); - }, - compressToUint8Array: function(uncompressed) { - var compressed = LZString2.compress(uncompressed); - var buf = new Uint8Array(compressed.length * 2); - for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) { - var current_value = compressed.charCodeAt(i); - buf[i * 2] = current_value >>> 8; - buf[i * 2 + 1] = current_value % 256; - } - return buf; - }, - decompressFromUint8Array: function(compressed) { - if (compressed === null || compressed === void 0) { - return LZString2.decompress(compressed); - } else { - var buf = new Array(compressed.length / 2); - for (var i = 0, TotalLen = buf.length; i < TotalLen; i++) { - buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1]; - } - var result = []; - buf.forEach(function(c) { - result.push(f2(c)); - }); - return LZString2.decompress(result.join("")); - } - }, - compressToEncodedURIComponent: function(input) { - if (input == null) - return ""; - return LZString2._compress(input, 6, function(a) { - return keyStrUriSafe.charAt(a); - }); - }, - decompressFromEncodedURIComponent: function(input) { - if (input == null) - return ""; - if (input == "") - return null; - input = input.replace(/ /g, "+"); - return LZString2._decompress(input.length, 32, function(index) { - return getBaseValue(keyStrUriSafe, input.charAt(index)); - }); - }, - compress: function(uncompressed) { - return LZString2._compress(uncompressed, 16, function(a) { - return f2(a); - }); - }, - _compress: function(uncompressed, bitsPerChar, getCharFromInt) { - if (uncompressed == null) - return ""; - var i, value, context_dictionary = {}, context_dictionaryToCreate = {}, context_c = "", context_wc = "", context_w = "", context_enlargeIn = 2, context_dictSize = 3, context_numBits = 2, context_data = [], context_data_val = 0, context_data_position = 0, ii; - for (ii = 0; ii < uncompressed.length; ii += 1) { - context_c = uncompressed.charAt(ii); - if (!Object.prototype.hasOwnProperty.call(context_dictionary, context_c)) { - context_dictionary[context_c] = context_dictSize++; - context_dictionaryToCreate[context_c] = true; - } - context_wc = context_w + context_c; - if (Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)) { - context_w = context_wc; - } else { - if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) { - if (context_w.charCodeAt(0) < 256) { - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - } - value = context_w.charCodeAt(0); - for (i = 0; i < 8; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } else { - value = 1; - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1 | value; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = 0; - } - value = context_w.charCodeAt(0); - for (i = 0; i < 16; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } - context_enlargeIn--; - if (context_enlargeIn == 0) { - context_enlargeIn = Math.pow(2, context_numBits); - context_numBits++; - } - delete context_dictionaryToCreate[context_w]; - } else { - value = context_dictionary[context_w]; - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } - context_enlargeIn--; - if (context_enlargeIn == 0) { - context_enlargeIn = Math.pow(2, context_numBits); - context_numBits++; - } - context_dictionary[context_wc] = context_dictSize++; - context_w = String(context_c); - } - } - if (context_w !== "") { - if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) { - if (context_w.charCodeAt(0) < 256) { - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - } - value = context_w.charCodeAt(0); - for (i = 0; i < 8; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } else { - value = 1; - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1 | value; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = 0; - } - value = context_w.charCodeAt(0); - for (i = 0; i < 16; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } - context_enlargeIn--; - if (context_enlargeIn == 0) { - context_enlargeIn = Math.pow(2, context_numBits); - context_numBits++; - } - delete context_dictionaryToCreate[context_w]; - } else { - value = context_dictionary[context_w]; - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - } - context_enlargeIn--; - if (context_enlargeIn == 0) { - context_enlargeIn = Math.pow(2, context_numBits); - context_numBits++; - } - } - value = 2; - for (i = 0; i < context_numBits; i++) { - context_data_val = context_data_val << 1 | value & 1; - if (context_data_position == bitsPerChar - 1) { - context_data_position = 0; - context_data.push(getCharFromInt(context_data_val)); - context_data_val = 0; - } else { - context_data_position++; - } - value = value >> 1; - } - while (true) { - context_data_val = context_data_val << 1; - if (context_data_position == bitsPerChar - 1) { - context_data.push(getCharFromInt(context_data_val)); - break; - } else - context_data_position++; - } - return context_data.join(""); - }, - decompress: function(compressed) { - if (compressed == null) - return ""; - if (compressed == "") - return null; - return LZString2._decompress(compressed.length, 32768, function(index) { - return compressed.charCodeAt(index); - }); - }, - _decompress: function(length, resetValue, getNextValue) { - var dictionary = [], next, enlargeIn = 4, dictSize = 4, numBits = 3, entry = "", result = [], i, w2, bits, resb, maxpower, power, c, data = { val: getNextValue(0), position: resetValue, index: 1 }; - for (i = 0; i < 3; i += 1) { - dictionary[i] = i; - } - bits = 0; - maxpower = Math.pow(2, 2); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - switch (next = bits) { - case 0: - bits = 0; - maxpower = Math.pow(2, 8); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - c = f2(bits); - break; - case 1: - bits = 0; - maxpower = Math.pow(2, 16); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - c = f2(bits); - break; - case 2: - return ""; - } - dictionary[3] = c; - w2 = c; - result.push(c); - while (true) { - if (data.index > length) { - return ""; - } - bits = 0; - maxpower = Math.pow(2, numBits); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - switch (c = bits) { - case 0: - bits = 0; - maxpower = Math.pow(2, 8); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - dictionary[dictSize++] = f2(bits); - c = dictSize - 1; - enlargeIn--; - break; - case 1: - bits = 0; - maxpower = Math.pow(2, 16); - power = 1; - while (power != maxpower) { - resb = data.val & data.position; - data.position >>= 1; - if (data.position == 0) { - data.position = resetValue; - data.val = getNextValue(data.index++); - } - bits |= (resb > 0 ? 1 : 0) * power; - power <<= 1; - } - dictionary[dictSize++] = f2(bits); - c = dictSize - 1; - enlargeIn--; - break; - case 2: - return result.join(""); - } - if (enlargeIn == 0) { - enlargeIn = Math.pow(2, numBits); - numBits++; - } - if (dictionary[c]) { - entry = dictionary[c]; - } else { - if (c === dictSize) { - entry = w2 + w2.charAt(0); - } else { - return null; - } - } - result.push(entry); - dictionary[dictSize++] = w2 + entry.charAt(0); - enlargeIn--; - w2 = entry; - if (enlargeIn == 0) { - enlargeIn = Math.pow(2, numBits); - numBits++; - } - } - } - }; - return LZString2; - }(); - if (typeof define === "function" && false) { - define(function() { - return LZString; - }); - } else if (typeof module2 !== "undefined" && module2 != null) { - module2.exports = LZString; - } - } -}); - -// ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js -var require_color_name = __commonJS({ - "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module2) { - "use strict"; - module2.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] - }; - } -}); - -// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js -var require_conversions = __commonJS({ - "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module2) { - var cssKeywords = require_color_name(); - var reverseKeywords = {}; - for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; - } - var convert = { - rgb: { channels: 3, labels: "rgb" }, - hsl: { channels: 3, labels: "hsl" }, - hsv: { channels: 3, labels: "hsv" }, - hwb: { channels: 3, labels: "hwb" }, - cmyk: { channels: 4, labels: "cmyk" }, - xyz: { channels: 3, labels: "xyz" }, - lab: { channels: 3, labels: "lab" }, - lch: { channels: 3, labels: "lch" }, - hex: { channels: 1, labels: ["hex"] }, - keyword: { channels: 1, labels: ["keyword"] }, - ansi16: { channels: 1, labels: ["ansi16"] }, - ansi256: { channels: 1, labels: ["ansi256"] }, - hcg: { channels: 3, labels: ["h", "c", "g"] }, - apple: { channels: 3, labels: ["r16", "g16", "b16"] }, - gray: { channels: 1, labels: ["gray"] } - }; - module2.exports = convert; - for (const model of Object.keys(convert)) { - if (!("channels" in convert[model])) { - throw new Error("missing channels property: " + model); - } - if (!("labels" in convert[model])) { - throw new Error("missing channel labels property: " + model); - } - if (convert[model].labels.length !== convert[model].channels) { - throw new Error("channel and label counts mismatch: " + model); - } - const { channels, labels } = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], "channels", { value: channels }); - Object.defineProperty(convert[model], "labels", { value: labels }); - } - convert.rgb.hsl = function(rgb) { - const r2 = rgb[0] / 255; - const g2 = rgb[1] / 255; - const b2 = rgb[2] / 255; - const min2 = Math.min(r2, g2, b2); - const max2 = Math.max(r2, g2, b2); - const delta = max2 - min2; - let h; - let s; - if (max2 === min2) { - h = 0; - } else if (r2 === max2) { - h = (g2 - b2) / delta; - } else if (g2 === max2) { - h = 2 + (b2 - r2) / delta; - } else if (b2 === max2) { - h = 4 + (r2 - g2) / delta; - } - h = Math.min(h * 60, 360); - if (h < 0) { - h += 360; - } - const l = (min2 + max2) / 2; - if (max2 === min2) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max2 + min2); - } else { - s = delta / (2 - max2 - min2); - } - return [h, s * 100, l * 100]; - }; - convert.rgb.hsv = function(rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - const r2 = rgb[0] / 255; - const g2 = rgb[1] / 255; - const b2 = rgb[2] / 255; - const v = Math.max(r2, g2, b2); - const diff = v - Math.min(r2, g2, b2); - const diffc = /* @__PURE__ */ __name(function(c) { - return (v - c) / 6 / diff + 1 / 2; - }, "diffc"); - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r2); - gdif = diffc(g2); - bdif = diffc(b2); - if (r2 === v) { - h = bdif - gdif; - } else if (g2 === v) { - h = 1 / 3 + rdif - bdif; - } else if (b2 === v) { - h = 2 / 3 + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - return [ - h * 360, - s * 100, - v * 100 - ]; - }; - convert.rgb.hwb = function(rgb) { - const r2 = rgb[0]; - const g2 = rgb[1]; - let b2 = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2)); - b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2)); - return [h, w2 * 100, b2 * 100]; - }; - convert.rgb.cmyk = function(rgb) { - const r2 = rgb[0] / 255; - const g2 = rgb[1] / 255; - const b2 = rgb[2] / 255; - const k = Math.min(1 - r2, 1 - g2, 1 - b2); - const c = (1 - r2 - k) / (1 - k) || 0; - const m2 = (1 - g2 - k) / (1 - k) || 0; - const y = (1 - b2 - k) / (1 - k) || 0; - return [c * 100, m2 * 100, y * 100, k * 100]; - }; - function comparativeDistance(x, y) { - return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; - } - __name(comparativeDistance, "comparativeDistance"); - convert.rgb.keyword = function(rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - let currentClosestDistance = Infinity; - let currentClosestKeyword; - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - const distance = comparativeDistance(rgb, value); - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - return currentClosestKeyword; - }; - convert.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; - }; - convert.rgb.xyz = function(rgb) { - let r2 = rgb[0] / 255; - let g2 = rgb[1] / 255; - let b2 = rgb[2] / 255; - r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92; - g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92; - b2 = b2 > 0.04045 ? ((b2 + 0.055) / 1.055) ** 2.4 : b2 / 12.92; - const x = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805; - const y = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722; - const z = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505; - return [x * 100, y * 100, z * 100]; - }; - convert.rgb.lab = function(rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; - const l = 116 * y - 16; - const a = 500 * (x - y); - const b2 = 200 * (y - z); - return [l, a, b2]; - }; - convert.hsl.rgb = function(hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - const t1 = 2 * l - t2; - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - rgb[i] = val * 255; - } - return rgb; - }; - convert.hsl.hsv = function(hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - l *= 2; - s *= l <= 1 ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); - return [h, sv * 100, v * 100]; - }; - convert.hsv.rgb = function(hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - const f2 = h - Math.floor(h); - const p2 = 255 * v * (1 - s); - const q = 255 * v * (1 - s * f2); - const t2 = 255 * v * (1 - s * (1 - f2)); - v *= 255; - switch (hi) { - case 0: - return [v, t2, p2]; - case 1: - return [q, v, p2]; - case 2: - return [p2, v, t2]; - case 3: - return [p2, q, v]; - case 4: - return [t2, p2, v]; - case 5: - return [v, p2, q]; - } - }; - convert.hsv.hsl = function(hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= lmin <= 1 ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - return [h, sl * 100, l * 100]; - }; - convert.hwb.rgb = function(hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f2; - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - const i = Math.floor(6 * h); - const v = 1 - bl; - f2 = 6 * h - i; - if ((i & 1) !== 0) { - f2 = 1 - f2; - } - const n2 = wh + f2 * (v - wh); - let r2; - let g2; - let b2; - switch (i) { - default: - case 6: - case 0: - r2 = v; - g2 = n2; - b2 = wh; - break; - case 1: - r2 = n2; - g2 = v; - b2 = wh; - break; - case 2: - r2 = wh; - g2 = v; - b2 = n2; - break; - case 3: - r2 = wh; - g2 = n2; - b2 = v; - break; - case 4: - r2 = n2; - g2 = wh; - b2 = v; - break; - case 5: - r2 = v; - g2 = wh; - b2 = n2; - break; - } - return [r2 * 255, g2 * 255, b2 * 255]; - }; - convert.cmyk.rgb = function(cmyk) { - const c = cmyk[0] / 100; - const m2 = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - const r2 = 1 - Math.min(1, c * (1 - k) + k); - const g2 = 1 - Math.min(1, m2 * (1 - k) + k); - const b2 = 1 - Math.min(1, y * (1 - k) + k); - return [r2 * 255, g2 * 255, b2 * 255]; - }; - convert.xyz.rgb = function(xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r2; - let g2; - let b2; - r2 = x * 3.2406 + y * -1.5372 + z * -0.4986; - g2 = x * -0.9689 + y * 1.8758 + z * 0.0415; - b2 = x * 0.0557 + y * -0.204 + z * 1.057; - r2 = r2 > 31308e-7 ? 1.055 * r2 ** (1 / 2.4) - 0.055 : r2 * 12.92; - g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92; - b2 = b2 > 31308e-7 ? 1.055 * b2 ** (1 / 2.4) - 0.055 : b2 * 12.92; - r2 = Math.min(Math.max(0, r2), 1); - g2 = Math.min(Math.max(0, g2), 1); - b2 = Math.min(Math.max(0, b2), 1); - return [r2 * 255, g2 * 255, b2 * 255]; - }; - convert.xyz.lab = function(xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; - const l = 116 * y - 16; - const a = 500 * (x - y); - const b2 = 200 * (y - z); - return [l, a, b2]; - }; - convert.lab.xyz = function(lab) { - const l = lab[0]; - const a = lab[1]; - const b2 = lab[2]; - let x; - let y; - let z; - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b2 / 200; - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; - x *= 95.047; - y *= 100; - z *= 108.883; - return [x, y, z]; - }; - convert.lab.lch = function(lab) { - const l = lab[0]; - const a = lab[1]; - const b2 = lab[2]; - let h; - const hr = Math.atan2(b2, a); - h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; - } - const c = Math.sqrt(a * a + b2 * b2); - return [l, c, h]; - }; - convert.lch.lab = function(lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b2 = c * Math.sin(hr); - return [l, a, b2]; - }; - convert.rgb.ansi16 = function(args, saturation = null) { - const [r2, g2, b2] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; - value = Math.round(value / 50); - if (value === 0) { - return 30; - } - let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255)); - if (value === 2) { - ansi += 60; - } - return ansi; - }; - convert.hsv.ansi16 = function(args) { - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); - }; - convert.rgb.ansi256 = function(args) { - const r2 = args[0]; - const g2 = args[1]; - const b2 = args[2]; - if (r2 === g2 && g2 === b2) { - if (r2 < 8) { - return 16; - } - if (r2 > 248) { - return 231; - } - return Math.round((r2 - 8) / 247 * 24) + 232; - } - const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5); - return ansi; - }; - convert.ansi16.rgb = function(args) { - let color = args % 10; - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - color = color / 10.5 * 255; - return [color, color, color]; - } - const mult = (~~(args > 50) + 1) * 0.5; - const r2 = (color & 1) * mult * 255; - const g2 = (color >> 1 & 1) * mult * 255; - const b2 = (color >> 2 & 1) * mult * 255; - return [r2, g2, b2]; - }; - convert.ansi256.rgb = function(args) { - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - args -= 16; - let rem; - const r2 = Math.floor(args / 36) / 5 * 255; - const g2 = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b2 = rem % 6 / 5 * 255; - return [r2, g2, b2]; - }; - convert.rgb.hex = function(args) { - const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.hex.rgb = function(args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - let colorString = match[0]; - if (match[0].length === 3) { - colorString = colorString.split("").map((char) => { - return char + char; - }).join(""); - } - const integer = parseInt(colorString, 16); - const r2 = integer >> 16 & 255; - const g2 = integer >> 8 & 255; - const b2 = integer & 255; - return [r2, g2, b2]; - }; - convert.rgb.hcg = function(rgb) { - const r2 = rgb[0] / 255; - const g2 = rgb[1] / 255; - const b2 = rgb[2] / 255; - const max2 = Math.max(Math.max(r2, g2), b2); - const min2 = Math.min(Math.min(r2, g2), b2); - const chroma = max2 - min2; - let grayscale; - let hue; - if (chroma < 1) { - grayscale = min2 / (1 - chroma); - } else { - grayscale = 0; - } - if (chroma <= 0) { - hue = 0; - } else if (max2 === r2) { - hue = (g2 - b2) / chroma % 6; - } else if (max2 === g2) { - hue = 2 + (b2 - r2) / chroma; - } else { - hue = 4 + (r2 - g2) / chroma; - } - hue /= 6; - hue %= 1; - return [hue * 360, chroma * 100, grayscale * 100]; - }; - convert.hsl.hcg = function(hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); - let f2 = 0; - if (c < 1) { - f2 = (l - 0.5 * c) / (1 - c); - } - return [hsl[0], c * 100, f2 * 100]; - }; - convert.hsv.hcg = function(hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const c = s * v; - let f2 = 0; - if (c < 1) { - f2 = (v - c) / (1 - c); - } - return [hsv[0], c * 100, f2 * 100]; - }; - convert.hcg.rgb = function(hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g2 = hcg[2] / 100; - if (c === 0) { - return [g2 * 255, g2 * 255, g2 * 255]; - } - const pure = [0, 0, 0]; - const hi = h % 1 * 6; - const v = hi % 1; - const w2 = 1 - v; - let mg = 0; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; - pure[1] = v; - pure[2] = 0; - break; - case 1: - pure[0] = w2; - pure[1] = 1; - pure[2] = 0; - break; - case 2: - pure[0] = 0; - pure[1] = 1; - pure[2] = v; - break; - case 3: - pure[0] = 0; - pure[1] = w2; - pure[2] = 1; - break; - case 4: - pure[0] = v; - pure[1] = 0; - pure[2] = 1; - break; - default: - pure[0] = 1; - pure[1] = 0; - pure[2] = w2; - } - mg = (1 - c) * g2; - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; - }; - convert.hcg.hsv = function(hcg) { - const c = hcg[1] / 100; - const g2 = hcg[2] / 100; - const v = c + g2 * (1 - c); - let f2 = 0; - if (v > 0) { - f2 = c / v; - } - return [hcg[0], f2 * 100, v * 100]; - }; - convert.hcg.hsl = function(hcg) { - const c = hcg[1] / 100; - const g2 = hcg[2] / 100; - const l = g2 * (1 - c) + 0.5 * c; - let s = 0; - if (l > 0 && l < 0.5) { - s = c / (2 * l); - } else if (l >= 0.5 && l < 1) { - s = c / (2 * (1 - l)); - } - return [hcg[0], s * 100, l * 100]; - }; - convert.hcg.hwb = function(hcg) { - const c = hcg[1] / 100; - const g2 = hcg[2] / 100; - const v = c + g2 * (1 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; - }; - convert.hwb.hcg = function(hwb) { - const w2 = hwb[1] / 100; - const b2 = hwb[2] / 100; - const v = 1 - b2; - const c = v - w2; - let g2 = 0; - if (c < 1) { - g2 = (v - c) / (1 - c); - } - return [hwb[0], c * 100, g2 * 100]; - }; - convert.apple.rgb = function(apple) { - return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; - }; - convert.rgb.apple = function(rgb) { - return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; - }; - convert.gray.rgb = function(args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; - }; - convert.gray.hsl = function(args) { - return [0, 0, args[0]]; - }; - convert.gray.hsv = convert.gray.hsl; - convert.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }; - convert.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }; - convert.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }; - convert.gray.hex = function(gray) { - const val = Math.round(gray[0] / 100 * 255) & 255; - const integer = (val << 16) + (val << 8) + val; - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.rgb.gray = function(rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; - }; - } -}); - -// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js -var require_route = __commonJS({ - "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module2) { - var conversions = require_conversions(); - function buildGraph() { - const graph = {}; - const models = Object.keys(conversions); - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - distance: -1, - parent: null - }; - } - return graph; - } - __name(buildGraph, "buildGraph"); - function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; - graph[fromModel].distance = 0; - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - return graph; - } - __name(deriveBFS, "deriveBFS"); - function link(from, to) { - return function(args) { - return to(from(args)); - }; - } - __name(link, "link"); - function wrapConversion(toModel, graph) { - const path7 = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path7.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - fn.conversion = path7; - return fn; - } - __name(wrapConversion, "wrapConversion"); - module2.exports = function(fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - if (node.parent === null) { - continue; - } - conversion[toModel] = wrapConversion(toModel, graph); - } - return conversion; - }; - } -}); - -// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js -var require_color_convert = __commonJS({ - "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module2) { - var conversions = require_conversions(); - var route = require_route(); - var convert = {}; - var models = Object.keys(conversions); - function wrapRaw(fn) { - const wrappedFn = /* @__PURE__ */ __name(function(...args) { - const arg0 = args[0]; - if (arg0 === void 0 || arg0 === null) { - return arg0; - } - if (arg0.length > 1) { - args = arg0; - } - return fn(args); - }, "wrappedFn"); - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - __name(wrapRaw, "wrapRaw"); - function wrapRounded(fn) { - const wrappedFn = /* @__PURE__ */ __name(function(...args) { - const arg0 = args[0]; - if (arg0 === void 0 || arg0 === null) { - return arg0; - } - if (arg0.length > 1) { - args = arg0; - } - const result = fn(args); - if (typeof result === "object") { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - return result; - }, "wrappedFn"); - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - __name(wrapRounded, "wrapRounded"); - models.forEach((fromModel) => { - convert[fromModel] = {}; - Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); - Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); - const routes = route(fromModel); - const routeModels = Object.keys(routes); - routeModels.forEach((toModel) => { - const fn = routes[toModel]; - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); - }); - module2.exports = convert; - } -}); - -// ../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js -var require_ansi_styles = __commonJS({ - "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module2) { - "use strict"; - var wrapAnsi16 = /* @__PURE__ */ __name((fn, offset) => (...args) => { - const code = fn(...args); - return `\x1B[${code + offset}m`; - }, "wrapAnsi16"); - var wrapAnsi256 = /* @__PURE__ */ __name((fn, offset) => (...args) => { - const code = fn(...args); - return `\x1B[${38 + offset};5;${code}m`; - }, "wrapAnsi256"); - var wrapAnsi16m = /* @__PURE__ */ __name((fn, offset) => (...args) => { - const rgb = fn(...args); - return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; - }, "wrapAnsi16m"); - var ansi2ansi = /* @__PURE__ */ __name((n2) => n2, "ansi2ansi"); - var rgb2rgb = /* @__PURE__ */ __name((r2, g2, b2) => [r2, g2, b2], "rgb2rgb"); - var setLazyProperty = /* @__PURE__ */ __name((object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - return value; - }, - enumerable: true, - configurable: true - }); - }, "setLazyProperty"); - var colorConvert; - var makeDynamicStyles = /* @__PURE__ */ __name((wrap, targetSpace, identity2, isBackground) => { - if (colorConvert === void 0) { - colorConvert = require_color_convert(); - } - const offset = isBackground ? 10 : 0; - const styles = {}; - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity2, offset); - } else if (typeof suite === "object") { - styles[name] = wrap(suite[targetSpace], offset); - } - } - return styles; - }, "makeDynamicStyles"); - function assembleStyles() { - const codes = /* @__PURE__ */ new Map(); - const styles = { - modifier: { - reset: [0, 0], - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles[styleName]; - codes.set(style[0], style[1]); - } - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - Object.defineProperty(styles, "codes", { - value: codes, - enumerable: false - }); - styles.color.close = "\x1B[39m"; - styles.bgColor.close = "\x1B[49m"; - setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); - setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); - setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); - setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); - setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); - setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); - return styles; - } - __name(assembleStyles, "assembleStyles"); - Object.defineProperty(module2, "exports", { - enumerable: true, - get: assembleStyles - }); - } -}); - -// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js -var require_has_flag = __commonJS({ - "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) { - "use strict"; - module2.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); - }; - } -}); - -// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js -var require_supports_color = __commonJS({ - "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) { - "use strict"; - var os3 = require("os"); - var tty = require("tty"); - var hasFlag = require_has_flag(); - var { env: env2 } = process; - var forceColor; - if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - forceColor = 0; - } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - forceColor = 1; - } - if ("FORCE_COLOR" in env2) { - if (env2.FORCE_COLOR === "true") { - forceColor = 1; - } else if (env2.FORCE_COLOR === "false") { - forceColor = 0; - } else { - forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3); - } - } - function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - __name(translateLevel, "translateLevel"); - function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min2 = forceColor || 0; - if (env2.TERM === "dumb") { - return min2; - } - if (process.platform === "win32") { - const osRelease = os3.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env2) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign2) => sign2 in env2) || env2.CI_NAME === "codeship") { - return 1; - } - return min2; - } - if ("TEAMCITY_VERSION" in env2) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0; - } - if (env2.COLORTERM === "truecolor") { - return 3; - } - if ("TERM_PROGRAM" in env2) { - const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env2.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; - } - } - if (/-256(color)?$/i.test(env2.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) { - return 1; - } - if ("COLORTERM" in env2) { - return 1; - } - return min2; - } - __name(supportsColor, "supportsColor"); - function getSupportLevel(stream2) { - const level = supportsColor(stream2, stream2 && stream2.isTTY); - return translateLevel(level); - } - __name(getSupportLevel, "getSupportLevel"); - module2.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) - }; - } -}); - -// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js -var require_util = __commonJS({ - "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module2) { - "use strict"; - var stringReplaceAll = /* @__PURE__ */ __name((string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ""; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - returnValue += string.substr(endIndex); - return returnValue; - }, "stringReplaceAll"); - var stringEncaseCRLFWithFirstIndex = /* @__PURE__ */ __name((string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ""; - do { - const gotCR = string[index - 1] === "\r"; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix; - endIndex = index + 1; - index = string.indexOf("\n", endIndex); - } while (index !== -1); - returnValue += string.substr(endIndex); - return returnValue; - }, "stringEncaseCRLFWithFirstIndex"); - module2.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex - }; - } -}); - -// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js -var require_templates = __commonJS({ - "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module2) { - "use strict"; - var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; - var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; - var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; - var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - var ESCAPES = /* @__PURE__ */ new Map([ - ["n", "\n"], - ["r", "\r"], - ["t", " "], - ["b", "\b"], - ["f", "\f"], - ["v", "\v"], - ["0", "\0"], - ["\\", "\\"], - ["e", "\x1B"], - ["a", "\x07"] - ]); - function unescape(c) { - const u = c[0] === "u"; - const bracket = c[1] === "{"; - if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - return ESCAPES.get(c) || c; - } - __name(unescape, "unescape"); - function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if (matches = chunk.match(STRING_REGEX)) { - results.push(matches[2].replace(ESCAPE_REGEX, (m2, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - return results; - } - __name(parseArguments, "parseArguments"); - function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - const results = []; - let matches; - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - return results; - } - __name(parseStyle, "parseStyle"); - function buildStyle(chalk12, styles) { - const enabled = {}; - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - let current = chalk12; - for (const [styleName, styles2] of Object.entries(enabled)) { - if (!Array.isArray(styles2)) { - continue; - } - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName]; - } - return current; - } - __name(buildStyle, "buildStyle"); - module2.exports = (chalk12, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - temporary.replace(TEMPLATE_REGEX, (m2, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(""); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk12, styles)(string)); - styles.push({ inverse, styles: parseStyle(style) }); - } else if (close) { - if (styles.length === 0) { - throw new Error("Found extraneous } in Chalk template literal"); - } - chunks.push(buildStyle(chalk12, styles)(chunk.join(""))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - chunks.push(chunk.join("")); - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; - throw new Error(errMessage); - } - return chunks.join(""); - }; - } -}); - -// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js -var require_source = __commonJS({ - "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module2) { - "use strict"; - var ansiStyles = require_ansi_styles(); - var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color(); - var { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex - } = require_util(); - var { isArray: isArray2 } = Array; - var levelMapping = [ - "ansi", - "ansi", - "ansi256", - "ansi16m" - ]; - var styles = /* @__PURE__ */ Object.create(null); - var applyOptions = /* @__PURE__ */ __name((object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error("The `level` option should be an integer from 0 to 3"); - } - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === void 0 ? colorLevel : options.level; - }, "applyOptions"); - var ChalkClass = class { - constructor(options) { - return chalkFactory(options); - } - }; - __name(ChalkClass, "ChalkClass"); - var chalkFactory = /* @__PURE__ */ __name((options) => { - const chalk13 = {}; - applyOptions(chalk13, options); - chalk13.template = (...arguments_) => chalkTag(chalk13.template, ...arguments_); - Object.setPrototypeOf(chalk13, Chalk.prototype); - Object.setPrototypeOf(chalk13.template, chalk13); - chalk13.template.constructor = () => { - throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead."); - }; - chalk13.template.Instance = ChalkClass; - return chalk13.template; - }, "chalkFactory"); - function Chalk(options) { - return chalkFactory(options); - } - __name(Chalk, "Chalk"); - for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, { value: builder }); - return builder; - } - }; - } - styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, "visible", { value: builder }); - return builder; - } - }; - var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"]; - for (const model of usedModels) { - styles[model] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; - } - for (const model of usedModels) { - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; - } - var proto = Object.defineProperties(() => { - }, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } - }); - var createStyler = /* @__PURE__ */ __name((open, close, parent) => { - let openAll; - let closeAll; - if (parent === void 0) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - return { - open, - close, - openAll, - closeAll, - parent - }; - }, "createStyler"); - var createBuilder = /* @__PURE__ */ __name((self2, _styler, _isEmpty) => { - const builder = /* @__PURE__ */ __name((...arguments_) => { - if (isArray2(arguments_[0]) && isArray2(arguments_[0].raw)) { - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); - }, "builder"); - Object.setPrototypeOf(builder, proto); - builder._generator = self2; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - return builder; - }, "createBuilder"); - var applyStyle = /* @__PURE__ */ __name((self2, string) => { - if (self2.level <= 0 || !string) { - return self2._isEmpty ? "" : string; - } - let styler = self2._styler; - if (styler === void 0) { - return string; - } - const { openAll, closeAll } = styler; - if (string.indexOf("\x1B") !== -1) { - while (styler !== void 0) { - string = stringReplaceAll(string, styler.close, styler.open); - styler = styler.parent; - } - } - const lfIndex = string.indexOf("\n"); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - return openAll + string + closeAll; - }, "applyStyle"); - var template; - var chalkTag = /* @__PURE__ */ __name((chalk13, ...strings) => { - const [firstString] = strings; - if (!isArray2(firstString) || !isArray2(firstString.raw)) { - return strings.join(" "); - } - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), - String(firstString.raw[i]) - ); - } - if (template === void 0) { - template = require_templates(); - } - return template(chalk13, parts.join("")); - }, "chalkTag"); - Object.defineProperties(Chalk.prototype, styles); - var chalk12 = Chalk(); - chalk12.supportsColor = stdoutColor; - chalk12.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 }); - chalk12.stderr.supportsColor = stderrColor; - module2.exports = chalk12; - } -}); - -// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js -var require_ms = __commonJS({ - "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) { - var s = 1e3; - var m2 = s * 60; - var h = m2 * 60; - var d2 = h * 24; - var w2 = d2 * 7; - var y = d2 * 365.25; - module2.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === "string" && val.length > 0) { - return parse2(val); - } else if (type === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) - ); - }; - function parse2(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n2 = parseFloat(match[1]); - var type = (match[2] || "ms").toLowerCase(); - switch (type) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n2 * y; - case "weeks": - case "week": - case "w": - return n2 * w2; - case "days": - case "day": - case "d": - return n2 * d2; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n2 * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n2 * m2; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n2 * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n2; - default: - return void 0; - } - } - __name(parse2, "parse"); - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d2) { - return Math.round(ms / d2) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; - } - if (msAbs >= m2) { - return Math.round(ms / m2) + "m"; - } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; - } - return ms + "ms"; - } - __name(fmtShort, "fmtShort"); - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d2) { - return plural(ms, msAbs, d2, "day"); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, "hour"); - } - if (msAbs >= m2) { - return plural(ms, msAbs, m2, "minute"); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, "second"); - } - return ms + " ms"; - } - __name(fmtLong, "fmtLong"); - function plural(ms, msAbs, n2, name) { - var isPlural = msAbs >= n2 * 1.5; - return Math.round(ms / n2) + " " + name + (isPlural ? "s" : ""); - } - __name(plural, "plural"); - } -}); - -// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js -var require_common = __commonJS({ - "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) { - function setup(env2) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env2).forEach((key) => { - createDebug[key] = env2[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - __name(selectColor, "selectColor"); - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug13(...args) { - if (!debug13.enabled) { - return; - } - const self2 = debug13; - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self2.diff = ms; - self2.prev = prevTime; - self2.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format2]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self2, args); - const logFn = self2.log || createDebug.log; - logFn.apply(self2, args); - } - __name(debug13, "debug"); - debug13.namespace = namespace; - debug13.useColors = createDebug.useColors(); - debug13.color = createDebug.selectColor(namespace); - debug13.extend = extend; - debug13.destroy = createDebug.destroy; - Object.defineProperty(debug13, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug13); - } - return debug13; - } - __name(createDebug, "createDebug"); - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - __name(extend, "extend"); - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - let i; - const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); - const len = split.length; - for (i = 0; i < len; i++) { - if (!split[i]) { - continue; - } - namespaces = split[i].replace(/\*/g, ".*?"); - if (namespaces[0] === "-") { - createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); - } else { - createDebug.names.push(new RegExp("^" + namespaces + "$")); - } - } - } - __name(enable, "enable"); - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - __name(disable, "disable"); - function enabled(name) { - if (name[name.length - 1] === "*") { - return true; - } - let i; - let len; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - return false; - } - __name(enabled, "enabled"); - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); - } - __name(toNamespace, "toNamespace"); - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - __name(coerce, "coerce"); - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - __name(destroy, "destroy"); - createDebug.enable(createDebug.load()); - return createDebug; - } - __name(setup, "setup"); - module2.exports = setup; - } -}); - -// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js -var require_browser = __commonJS({ - "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - __name(useColors, "useColors"); - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; - } - index++; - if (match === "%c") { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - __name(formatArgs, "formatArgs"); - exports.log = console.debug || console.log || (() => { - }); - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem("debug", namespaces); - } else { - exports.storage.removeItem("debug"); - } - } catch (error2) { - } - } - __name(save, "save"); - function load() { - let r2; - try { - r2 = exports.storage.getItem("debug"); - } catch (error2) { - } - if (!r2 && typeof process !== "undefined" && "env" in process) { - r2 = process.env.DEBUG; - } - return r2; - } - __name(load, "load"); - function localstorage() { - try { - return localStorage; - } catch (error2) { - } - } - __name(localstorage, "localstorage"); - module2.exports = require_common()(exports); - var { formatters } = module2.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error2) { - return "[UnexpectedJSONParseError]: " + error2.message; - } - }; - } -}); - -// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js -var require_node = __commonJS({ - "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) { - var tty = require("tty"); - var util2 = require("util"); - exports.init = init; - exports.log = log3; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util2.deprecate( - () => { - }, - "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." - ); - exports.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor = require_supports_color(); - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error2) { - } - exports.inspectOpts = Object.keys(process.env).filter((key) => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === "null") { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; - }, {}); - function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); - } - __name(useColors, "useColors"); - function formatArgs(args) { - const { namespace: name, useColors: useColors2 } = this; - if (useColors2) { - const c = this.color; - const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name} \x1B[0m`; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); - args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name + " " + args[0]; - } - } - __name(formatArgs, "formatArgs"); - function getDate() { - if (exports.inspectOpts.hideDate) { - return ""; - } - return new Date().toISOString() + " "; - } - __name(getDate, "getDate"); - function log3(...args) { - return process.stderr.write(util2.format(...args) + "\n"); - } - __name(log3, "log"); - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete process.env.DEBUG; - } - } - __name(save, "save"); - function load() { - return process.env.DEBUG; - } - __name(load, "load"); - function init(debug13) { - debug13.inspectOpts = {}; - const keys2 = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys2.length; i++) { - debug13.inspectOpts[keys2[i]] = exports.inspectOpts[keys2[i]]; - } - } - __name(init, "init"); - module2.exports = require_common()(exports); - var { formatters } = module2.exports; - formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); - }; - formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts); - }; - } -}); - -// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js -var require_src = __commonJS({ - "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) { - if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { - module2.exports = require_browser(); - } else { - module2.exports = require_node(); - } - } -}); - -// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js -var require_windows = __commonJS({ - "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs11 = require("fs"); - function checkPathExt(path7, options) { - var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; - if (!pathext) { - return true; - } - pathext = pathext.split(";"); - if (pathext.indexOf("") !== -1) { - return true; - } - for (var i = 0; i < pathext.length; i++) { - var p2 = pathext[i].toLowerCase(); - if (p2 && path7.substr(-p2.length).toLowerCase() === p2) { - return true; - } - } - return false; - } - __name(checkPathExt, "checkPathExt"); - function checkStat(stat, path7, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false; - } - return checkPathExt(path7, options); - } - __name(checkStat, "checkStat"); - function isexe(path7, options, cb) { - fs11.stat(path7, function(er, stat) { - cb(er, er ? false : checkStat(stat, path7, options)); - }); - } - __name(isexe, "isexe"); - function sync(path7, options) { - return checkStat(fs11.statSync(path7), path7, options); - } - __name(sync, "sync"); - } -}); - -// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js -var require_mode = __commonJS({ - "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs11 = require("fs"); - function isexe(path7, options, cb) { - fs11.stat(path7, function(er, stat) { - cb(er, er ? false : checkStat(stat, options)); - }); - } - __name(isexe, "isexe"); - function sync(path7, options) { - return checkStat(fs11.statSync(path7), options); - } - __name(sync, "sync"); - function checkStat(stat, options) { - return stat.isFile() && checkMode(stat, options); - } - __name(checkStat, "checkStat"); - function checkMode(stat, options) { - var mod2 = stat.mode; - var uid = stat.uid; - var gid = stat.gid; - var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); - var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); - var u = parseInt("100", 8); - var g2 = parseInt("010", 8); - var o2 = parseInt("001", 8); - var ug = u | g2; - var ret = mod2 & o2 || mod2 & g2 && gid === myGid || mod2 & u && uid === myUid || mod2 & ug && myUid === 0; - return ret; - } - __name(checkMode, "checkMode"); - } -}); - -// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js -var require_isexe = __commonJS({ - "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) { - var fs11 = require("fs"); - var core; - if (process.platform === "win32" || global.TESTING_WINDOWS) { - core = require_windows(); - } else { - core = require_mode(); - } - module2.exports = isexe; - isexe.sync = sync; - function isexe(path7, options, cb) { - if (typeof options === "function") { - cb = options; - options = {}; - } - if (!cb) { - if (typeof Promise !== "function") { - throw new TypeError("callback not provided"); - } - return new Promise(function(resolve, reject) { - isexe(path7, options || {}, function(er, is) { - if (er) { - reject(er); - } else { - resolve(is); - } - }); - }); - } - core(path7, options || {}, function(er, is) { - if (er) { - if (er.code === "EACCES" || options && options.ignoreErrors) { - er = null; - is = false; - } - } - cb(er, is); - }); - } - __name(isexe, "isexe"); - function sync(path7, options) { - try { - return core.sync(path7, options || {}); - } catch (er) { - if (options && options.ignoreErrors || er.code === "EACCES") { - return false; - } else { - throw er; - } - } - } - __name(sync, "sync"); - } -}); - -// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js -var require_which = __commonJS({ - "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) { - var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; - var path7 = require("path"); - var COLON = isWindows ? ";" : ":"; - var isexe = require_isexe(); - var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError"); - var getPathInfo = /* @__PURE__ */ __name((cmd, opt) => { - const colon = opt.colon || COLON; - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ - ...isWindows ? [process.cwd()] : [], - ...(opt.path || process.env.PATH || "").split(colon) - ]; - const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; - const pathExt = isWindows ? pathExtExe.split(colon) : [""]; - if (isWindows) { - if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") - pathExt.unshift(""); - } - return { - pathEnv, - pathExt, - pathExtExe - }; - }, "getPathInfo"); - var which = /* @__PURE__ */ __name((cmd, opt, cb) => { - if (typeof opt === "function") { - cb = opt; - opt = {}; - } - if (!opt) - opt = {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - const step = /* @__PURE__ */ __name((i) => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path7.join(pathPart, cmd); - const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - resolve(subStep(p2, i, 0)); - }), "step"); - const subStep = /* @__PURE__ */ __name((p2, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)); - const ext = pathExt[ii]; - isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p2 + ext); - else - return resolve(p2 + ext); - } - return resolve(subStep(p2, i, ii + 1)); - }); - }), "subStep"); - return cb ? step(0).then((res) => cb(null, res), cb) : step(0); - }, "which"); - var whichSync = /* @__PURE__ */ __name((cmd, opt) => { - opt = opt || {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (let i = 0; i < pathEnv.length; i++) { - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path7.join(pathPart, cmd); - const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - for (let j = 0; j < pathExt.length; j++) { - const cur = p2 + pathExt[j]; - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }); - if (is) { - if (opt.all) - found.push(cur); - else - return cur; - } - } catch (ex) { - } - } - } - if (opt.all && found.length) - return found; - if (opt.nothrow) - return null; - throw getNotFoundError(cmd); - }, "whichSync"); - module2.exports = which; - which.sync = whichSync; - } -}); - -// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js -var require_path_key = __commonJS({ - "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) { - "use strict"; - var pathKey = /* @__PURE__ */ __name((options = {}) => { - const environment = options.env || process.env; - const platform3 = options.platform || process.platform; - if (platform3 !== "win32") { - return "PATH"; - } - return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; - }, "pathKey"); - module2.exports = pathKey; - module2.exports.default = pathKey; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js -var require_resolveCommand = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { - "use strict"; - var path7 = require("path"); - var which = require_which(); - var getPathKey = require_path_key(); - function resolveCommandAttempt(parsed, withoutPathExt) { - const env2 = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - } - } - let resolved; - try { - resolved = which.sync(parsed.command, { - path: env2[getPathKey({ env: env2 })], - pathExt: withoutPathExt ? path7.delimiter : void 0 - }); - } catch (e2) { - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - if (resolved) { - resolved = path7.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); - } - return resolved; - } - __name(resolveCommandAttempt, "resolveCommandAttempt"); - function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); - } - __name(resolveCommand, "resolveCommand"); - module2.exports = resolveCommand; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js -var require_escape = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) { - "use strict"; - var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - function escapeCommand(arg2) { - arg2 = arg2.replace(metaCharsRegExp, "^$1"); - return arg2; - } - __name(escapeCommand, "escapeCommand"); - function escapeArgument(arg2, doubleEscapeMetaChars) { - arg2 = `${arg2}`; - arg2 = arg2.replace(/(\\*)"/g, '$1$1\\"'); - arg2 = arg2.replace(/(\\*)$/, "$1$1"); - arg2 = `"${arg2}"`; - arg2 = arg2.replace(metaCharsRegExp, "^$1"); - if (doubleEscapeMetaChars) { - arg2 = arg2.replace(metaCharsRegExp, "^$1"); - } - return arg2; - } - __name(escapeArgument, "escapeArgument"); - module2.exports.command = escapeCommand; - module2.exports.argument = escapeArgument; - } -}); - -// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js -var require_shebang_regex = __commonJS({ - "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) { - "use strict"; - module2.exports = /^#!(.*)/; - } -}); - -// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js -var require_shebang_command = __commonJS({ - "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) { - "use strict"; - var shebangRegex = require_shebang_regex(); - module2.exports = (string = "") => { - const match = string.match(shebangRegex); - if (!match) { - return null; - } - const [path7, argument] = match[0].replace(/#! ?/, "").split(" "); - const binary = path7.split("/").pop(); - if (binary === "env") { - return argument; - } - return argument ? `${binary} ${argument}` : binary; - }; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js -var require_readShebang = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) { - "use strict"; - var fs11 = require("fs"); - var shebangCommand = require_shebang_command(); - function readShebang(command) { - const size = 150; - const buffer = Buffer.alloc(size); - let fd; - try { - fd = fs11.openSync(command, "r"); - fs11.readSync(fd, buffer, 0, size, 0); - fs11.closeSync(fd); - } catch (e2) { - } - return shebangCommand(buffer.toString()); - } - __name(readShebang, "readShebang"); - module2.exports = readShebang; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js -var require_parse = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module2) { - "use strict"; - var path7 = require("path"); - var resolveCommand = require_resolveCommand(); - var escape = require_escape(); - var readShebang = require_readShebang(); - var isWin = process.platform === "win32"; - var isExecutableRegExp = /\.(?:com|exe)$/i; - var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - const shebang = parsed.file && readShebang(parsed.file); - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - return resolveCommand(parsed); - } - return parsed.file; - } - __name(detectShebang, "detectShebang"); - function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - const commandFile = detectShebang(parsed); - const needsShell = !isExecutableRegExp.test(commandFile); - if (parsed.options.forceShell || needsShell) { - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path7.normalize(parsed.command); - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg2) => escape.argument(arg2, needsDoubleEscapeMetaChars)); - const shellCommand = [parsed.command].concat(parsed.args).join(" "); - parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; - parsed.command = process.env.comspec || "cmd.exe"; - parsed.options.windowsVerbatimArguments = true; - } - return parsed; - } - __name(parseNonShell, "parseNonShell"); - function parse2(command, args, options) { - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - args = args ? args.slice(0) : []; - options = Object.assign({}, options); - const parsed = { - command, - args, - options, - file: void 0, - original: { - command, - args - } - }; - return options.shell ? parsed : parseNonShell(parsed); - } - __name(parse2, "parse"); - module2.exports = parse2; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js -var require_enoent = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module2) { - "use strict"; - var isWin = process.platform === "win32"; - function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: "ENOENT", - errno: "ENOENT", - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args - }); - } - __name(notFoundError, "notFoundError"); - function hookChildProcess(cp2, parsed) { - if (!isWin) { - return; - } - const originalEmit = cp2.emit; - cp2.emit = function(name, arg1) { - if (name === "exit") { - const err = verifyENOENT(arg1, parsed, "spawn"); - if (err) { - return originalEmit.call(cp2, "error", err); - } - } - return originalEmit.apply(cp2, arguments); - }; - } - __name(hookChildProcess, "hookChildProcess"); - function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawn"); - } - return null; - } - __name(verifyENOENT, "verifyENOENT"); - function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawnSync"); - } - return null; - } - __name(verifyENOENTSync, "verifyENOENTSync"); - module2.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError - }; - } -}); - -// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js -var require_cross_spawn = __commonJS({ - "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module2) { - "use strict"; - var cp2 = require("child_process"); - var parse2 = require_parse(); - var enoent = require_enoent(); - function spawn2(command, args, options) { - const parsed = parse2(command, args, options); - const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options); - enoent.hookChildProcess(spawned, parsed); - return spawned; - } - __name(spawn2, "spawn"); - function spawnSync(command, args, options) { - const parsed = parse2(command, args, options); - const result = cp2.spawnSync(parsed.command, parsed.args, parsed.options); - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - return result; - } - __name(spawnSync, "spawnSync"); - module2.exports = spawn2; - module2.exports.spawn = spawn2; - module2.exports.sync = spawnSync; - module2.exports._parse = parse2; - module2.exports._enoent = enoent; - } -}); - -// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js -var require_strip_final_newline = __commonJS({ - "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports, module2) { - "use strict"; - module2.exports = (input) => { - const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); - const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); - if (input[input.length - 1] === LF) { - input = input.slice(0, input.length - 1); - } - if (input[input.length - 1] === CR) { - input = input.slice(0, input.length - 1); - } - return input; - }; - } -}); - -// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js -var require_npm_run_path = __commonJS({ - "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports, module2) { - "use strict"; - var path7 = require("path"); - var pathKey = require_path_key(); - var npmRunPath = /* @__PURE__ */ __name((options) => { - options = { - cwd: process.cwd(), - path: process.env[pathKey()], - execPath: process.execPath, - ...options - }; - let previous; - let cwdPath = path7.resolve(options.cwd); - const result = []; - while (previous !== cwdPath) { - result.push(path7.join(cwdPath, "node_modules/.bin")); - previous = cwdPath; - cwdPath = path7.resolve(cwdPath, ".."); - } - const execPathDir = path7.resolve(options.cwd, options.execPath, ".."); - result.push(execPathDir); - return result.concat(options.path).join(path7.delimiter); - }, "npmRunPath"); - module2.exports = npmRunPath; - module2.exports.default = npmRunPath; - module2.exports.env = (options) => { - options = { - env: process.env, - ...options - }; - const env2 = { ...options.env }; - const path8 = pathKey({ env: env2 }); - options.path = env2[path8]; - env2[path8] = module2.exports(options); - return env2; - }; - } -}); - -// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js -var require_mimic_fn = __commonJS({ - "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports, module2) { - "use strict"; - var mimicFn = /* @__PURE__ */ __name((to, from) => { - for (const prop of Reflect.ownKeys(from)) { - Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); - } - return to; - }, "mimicFn"); - module2.exports = mimicFn; - module2.exports.default = mimicFn; - } -}); - -// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js -var require_onetime = __commonJS({ - "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports, module2) { - "use strict"; - var mimicFn = require_mimic_fn(); - var calledFunctions = /* @__PURE__ */ new WeakMap(); - var onetime = /* @__PURE__ */ __name((function_, options = {}) => { - if (typeof function_ !== "function") { - throw new TypeError("Expected a function"); - } - let returnValue; - let callCount = 0; - const functionName = function_.displayName || function_.name || ""; - const onetime2 = /* @__PURE__ */ __name(function(...arguments_) { - calledFunctions.set(onetime2, ++callCount); - if (callCount === 1) { - returnValue = function_.apply(this, arguments_); - function_ = null; - } else if (options.throw === true) { - throw new Error(`Function \`${functionName}\` can only be called once`); - } - return returnValue; - }, "onetime"); - mimicFn(onetime2, function_); - calledFunctions.set(onetime2, callCount); - return onetime2; - }, "onetime"); - module2.exports = onetime; - module2.exports.default = onetime; - module2.exports.callCount = (function_) => { - if (!calledFunctions.has(function_)) { - throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); - } - return calledFunctions.get(function_); - }; - } -}); - -// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js -var require_core = __commonJS({ - "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SIGNALS = void 0; - var SIGNALS = [ - { - name: "SIGHUP", - number: 1, - action: "terminate", - description: "Terminal closed", - standard: "posix" - }, - { - name: "SIGINT", - number: 2, - action: "terminate", - description: "User interruption with CTRL-C", - standard: "ansi" - }, - { - name: "SIGQUIT", - number: 3, - action: "core", - description: "User interruption with CTRL-\\", - standard: "posix" - }, - { - name: "SIGILL", - number: 4, - action: "core", - description: "Invalid machine instruction", - standard: "ansi" - }, - { - name: "SIGTRAP", - number: 5, - action: "core", - description: "Debugger breakpoint", - standard: "posix" - }, - { - name: "SIGABRT", - number: 6, - action: "core", - description: "Aborted", - standard: "ansi" - }, - { - name: "SIGIOT", - number: 6, - action: "core", - description: "Aborted", - standard: "bsd" - }, - { - name: "SIGBUS", - number: 7, - action: "core", - description: "Bus error due to misaligned, non-existing address or paging error", - standard: "bsd" - }, - { - name: "SIGEMT", - number: 7, - action: "terminate", - description: "Command should be emulated but is not implemented", - standard: "other" - }, - { - name: "SIGFPE", - number: 8, - action: "core", - description: "Floating point arithmetic error", - standard: "ansi" - }, - { - name: "SIGKILL", - number: 9, - action: "terminate", - description: "Forced termination", - standard: "posix", - forced: true - }, - { - name: "SIGUSR1", - number: 10, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGSEGV", - number: 11, - action: "core", - description: "Segmentation fault", - standard: "ansi" - }, - { - name: "SIGUSR2", - number: 12, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGPIPE", - number: 13, - action: "terminate", - description: "Broken pipe or socket", - standard: "posix" - }, - { - name: "SIGALRM", - number: 14, - action: "terminate", - description: "Timeout or timer", - standard: "posix" - }, - { - name: "SIGTERM", - number: 15, - action: "terminate", - description: "Termination", - standard: "ansi" - }, - { - name: "SIGSTKFLT", - number: 16, - action: "terminate", - description: "Stack is empty or overflowed", - standard: "other" - }, - { - name: "SIGCHLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "posix" - }, - { - name: "SIGCLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "other" - }, - { - name: "SIGCONT", - number: 18, - action: "unpause", - description: "Unpaused", - standard: "posix", - forced: true - }, - { - name: "SIGSTOP", - number: 19, - action: "pause", - description: "Paused", - standard: "posix", - forced: true - }, - { - name: "SIGTSTP", - number: 20, - action: "pause", - description: 'Paused using CTRL-Z or "suspend"', - standard: "posix" - }, - { - name: "SIGTTIN", - number: 21, - action: "pause", - description: "Background process cannot read terminal input", - standard: "posix" - }, - { - name: "SIGBREAK", - number: 21, - action: "terminate", - description: "User interruption with CTRL-BREAK", - standard: "other" - }, - { - name: "SIGTTOU", - number: 22, - action: "pause", - description: "Background process cannot write to terminal output", - standard: "posix" - }, - { - name: "SIGURG", - number: 23, - action: "ignore", - description: "Socket received out-of-band data", - standard: "bsd" - }, - { - name: "SIGXCPU", - number: 24, - action: "core", - description: "Process timed out", - standard: "bsd" - }, - { - name: "SIGXFSZ", - number: 25, - action: "core", - description: "File too big", - standard: "bsd" - }, - { - name: "SIGVTALRM", - number: 26, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGPROF", - number: 27, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGWINCH", - number: 28, - action: "ignore", - description: "Terminal window size changed", - standard: "bsd" - }, - { - name: "SIGIO", - number: 29, - action: "terminate", - description: "I/O is available", - standard: "other" - }, - { - name: "SIGPOLL", - number: 29, - action: "terminate", - description: "Watched event", - standard: "other" - }, - { - name: "SIGINFO", - number: 29, - action: "ignore", - description: "Request for process information", - standard: "other" - }, - { - name: "SIGPWR", - number: 30, - action: "terminate", - description: "Device running out of power", - standard: "systemv" - }, - { - name: "SIGSYS", - number: 31, - action: "core", - description: "Invalid system call", - standard: "other" - }, - { - name: "SIGUNUSED", - number: 31, - action: "terminate", - description: "Invalid system call", - standard: "other" - } - ]; - exports.SIGNALS = SIGNALS; - } -}); - -// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js -var require_realtime = __commonJS({ - "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SIGRTMAX = exports.getRealtimeSignals = void 0; - var getRealtimeSignals = /* @__PURE__ */ __name(function() { - const length = SIGRTMAX - SIGRTMIN + 1; - return Array.from({ length }, getRealtimeSignal); - }, "getRealtimeSignals"); - exports.getRealtimeSignals = getRealtimeSignals; - var getRealtimeSignal = /* @__PURE__ */ __name(function(value, index) { - return { - name: `SIGRT${index + 1}`, - number: SIGRTMIN + index, - action: "terminate", - description: "Application-specific signal (realtime)", - standard: "posix" - }; - }, "getRealtimeSignal"); - var SIGRTMIN = 34; - var SIGRTMAX = 64; - exports.SIGRTMAX = SIGRTMAX; - } -}); - -// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js -var require_signals = __commonJS({ - "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getSignals = void 0; - var _os = require("os"); - var _core = require_core(); - var _realtime = require_realtime(); - var getSignals = /* @__PURE__ */ __name(function() { - const realtimeSignals = (0, _realtime.getRealtimeSignals)(); - const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal); - return signals; - }, "getSignals"); - exports.getSignals = getSignals; - var normalizeSignal = /* @__PURE__ */ __name(function({ - name, - number: defaultNumber, - description, - action, - forced = false, - standard - }) { - const { - signals: { [name]: constantSignal } - } = _os.constants; - const supported = constantSignal !== void 0; - const number = supported ? constantSignal : defaultNumber; - return { name, number, description, supported, action, forced, standard }; - }, "normalizeSignal"); - } -}); - -// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js -var require_main = __commonJS({ - "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.signalsByNumber = exports.signalsByName = void 0; - var _os = require("os"); - var _signals = require_signals(); - var _realtime = require_realtime(); - var getSignalsByName = /* @__PURE__ */ __name(function() { - const signals = (0, _signals.getSignals)(); - return signals.reduce(getSignalByName, {}); - }, "getSignalsByName"); - var getSignalByName = /* @__PURE__ */ __name(function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) { - return { - ...signalByNameMemo, - [name]: { name, number, description, supported, action, forced, standard } - }; - }, "getSignalByName"); - var signalsByName = getSignalsByName(); - exports.signalsByName = signalsByName; - var getSignalsByNumber = /* @__PURE__ */ __name(function() { - const signals = (0, _signals.getSignals)(); - const length = _realtime.SIGRTMAX + 1; - const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); - return Object.assign({}, ...signalsA); - }, "getSignalsByNumber"); - var getSignalByNumber = /* @__PURE__ */ __name(function(number, signals) { - const signal = findSignalByNumber(number, signals); - if (signal === void 0) { - return {}; - } - const { name, description, supported, action, forced, standard } = signal; - return { - [number]: { - name, - number, - description, - supported, - action, - forced, - standard - } - }; - }, "getSignalByNumber"); - var findSignalByNumber = /* @__PURE__ */ __name(function(number, signals) { - const signal = signals.find(({ name }) => _os.constants.signals[name] === number); - if (signal !== void 0) { - return signal; - } - return signals.find((signalA) => signalA.number === number); - }, "findSignalByNumber"); - var signalsByNumber = getSignalsByNumber(); - exports.signalsByNumber = signalsByNumber; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js -var require_error = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports, module2) { - "use strict"; - var { signalsByName } = require_main(); - var getErrorPrefix = /* @__PURE__ */ __name(({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - if (isCanceled) { - return "was canceled"; - } - if (errorCode !== void 0) { - return `failed with ${errorCode}`; - } - if (signal !== void 0) { - return `was killed with ${signal} (${signalDescription})`; - } - if (exitCode !== void 0) { - return `failed with exit code ${exitCode}`; - } - return "failed"; - }, "getErrorPrefix"); - var makeError = /* @__PURE__ */ __name(({ - stdout, - stderr, - all, - error: error2, - signal, - exitCode, - command, - escapedCommand, - timedOut, - isCanceled, - killed, - parsed: { options: { timeout } } - }) => { - exitCode = exitCode === null ? void 0 : exitCode; - signal = signal === null ? void 0 : signal; - const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; - const errorCode = error2 && error2.code; - const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); - const execaMessage = `Command ${prefix}: ${command}`; - const isError2 = Object.prototype.toString.call(error2) === "[object Error]"; - const shortMessage = isError2 ? `${execaMessage} -${error2.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); - if (isError2) { - error2.originalMessage = error2.message; - error2.message = message; - } else { - error2 = new Error(message); - } - error2.shortMessage = shortMessage; - error2.command = command; - error2.escapedCommand = escapedCommand; - error2.exitCode = exitCode; - error2.signal = signal; - error2.signalDescription = signalDescription; - error2.stdout = stdout; - error2.stderr = stderr; - if (all !== void 0) { - error2.all = all; - } - if ("bufferedData" in error2) { - delete error2.bufferedData; - } - error2.failed = true; - error2.timedOut = Boolean(timedOut); - error2.isCanceled = isCanceled; - error2.killed = killed && !timedOut; - return error2; - }, "makeError"); - module2.exports = makeError; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js -var require_stdio = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports, module2) { - "use strict"; - var aliases = ["stdin", "stdout", "stderr"]; - var hasAlias = /* @__PURE__ */ __name((options) => aliases.some((alias) => options[alias] !== void 0), "hasAlias"); - var normalizeStdio = /* @__PURE__ */ __name((options) => { - if (!options) { - return; - } - const { stdio } = options; - if (stdio === void 0) { - return aliases.map((alias) => options[alias]); - } - if (hasAlias(options)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); - } - if (typeof stdio === "string") { - return stdio; - } - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - const length = Math.max(stdio.length, aliases.length); - return Array.from({ length }, (value, index) => stdio[index]); - }, "normalizeStdio"); - module2.exports = normalizeStdio; - module2.exports.node = (options) => { - const stdio = normalizeStdio(options); - if (stdio === "ipc") { - return "ipc"; - } - if (stdio === void 0 || typeof stdio === "string") { - return [stdio, stdio, stdio, "ipc"]; - } - if (stdio.includes("ipc")) { - return stdio; - } - return [...stdio, "ipc"]; - }; - } -}); - -// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js -var require_signals2 = __commonJS({ - "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) { - module2.exports = [ - "SIGABRT", - "SIGALRM", - "SIGHUP", - "SIGINT", - "SIGTERM" - ]; - if (process.platform !== "win32") { - module2.exports.push( - "SIGVTALRM", - "SIGXCPU", - "SIGXFSZ", - "SIGUSR2", - "SIGTRAP", - "SIGSYS", - "SIGQUIT", - "SIGIOT" - ); - } - if (process.platform === "linux") { - module2.exports.push( - "SIGIO", - "SIGPOLL", - "SIGPWR", - "SIGSTKFLT", - "SIGUNUSED" - ); - } - } -}); - -// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js -var require_signal_exit = __commonJS({ - "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) { - var process2 = global.process; - var processOk = /* @__PURE__ */ __name(function(process3) { - return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function"; - }, "processOk"); - if (!processOk(process2)) { - module2.exports = function() { - return function() { - }; - }; - } else { - assert = require("assert"); - signals = require_signals2(); - isWin = /^win/i.test(process2.platform); - EE = require("events"); - if (typeof EE !== "function") { - EE = EE.EventEmitter; - } - if (process2.__signal_exit_emitter__) { - emitter = process2.__signal_exit_emitter__; - } else { - emitter = process2.__signal_exit_emitter__ = new EE(); - emitter.count = 0; - emitter.emitted = {}; - } - if (!emitter.infinite) { - emitter.setMaxListeners(Infinity); - emitter.infinite = true; - } - module2.exports = function(cb, opts) { - if (!processOk(global.process)) { - return function() { - }; - } - assert.equal(typeof cb, "function", "a callback must be provided for exit handler"); - if (loaded === false) { - load(); - } - var ev = "exit"; - if (opts && opts.alwaysLast) { - ev = "afterexit"; - } - var remove = /* @__PURE__ */ __name(function() { - emitter.removeListener(ev, cb); - if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { - unload(); - } - }, "remove"); - emitter.on(ev, cb); - return remove; - }; - unload = /* @__PURE__ */ __name(function unload2() { - if (!loaded || !processOk(global.process)) { - return; - } - loaded = false; - signals.forEach(function(sig) { - try { - process2.removeListener(sig, sigListeners[sig]); - } catch (er) { - } - }); - process2.emit = originalProcessEmit; - process2.reallyExit = originalProcessReallyExit; - emitter.count -= 1; - }, "unload"); - module2.exports.unload = unload; - emit = /* @__PURE__ */ __name(function emit2(event, code, signal) { - if (emitter.emitted[event]) { - return; - } - emitter.emitted[event] = true; - emitter.emit(event, code, signal); - }, "emit"); - sigListeners = {}; - signals.forEach(function(sig) { - sigListeners[sig] = /* @__PURE__ */ __name(function listener() { - if (!processOk(global.process)) { - return; - } - var listeners = process2.listeners(sig); - if (listeners.length === emitter.count) { - unload(); - emit("exit", null, sig); - emit("afterexit", null, sig); - if (isWin && sig === "SIGHUP") { - sig = "SIGINT"; - } - process2.kill(process2.pid, sig); - } - }, "listener"); - }); - module2.exports.signals = function() { - return signals; - }; - loaded = false; - load = /* @__PURE__ */ __name(function load2() { - if (loaded || !processOk(global.process)) { - return; - } - loaded = true; - emitter.count += 1; - signals = signals.filter(function(sig) { - try { - process2.on(sig, sigListeners[sig]); - return true; - } catch (er) { - return false; - } - }); - process2.emit = processEmit; - process2.reallyExit = processReallyExit; - }, "load"); - module2.exports.load = load; - originalProcessReallyExit = process2.reallyExit; - processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code) { - if (!processOk(global.process)) { - return; - } - process2.exitCode = code || 0; - emit("exit", process2.exitCode, null); - emit("afterexit", process2.exitCode, null); - originalProcessReallyExit.call(process2, process2.exitCode); - }, "processReallyExit"); - originalProcessEmit = process2.emit; - processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg2) { - if (ev === "exit" && processOk(global.process)) { - if (arg2 !== void 0) { - process2.exitCode = arg2; - } - var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process2.exitCode, null); - emit("afterexit", process2.exitCode, null); - return ret; - } else { - return originalProcessEmit.apply(this, arguments); - } - }, "processEmit"); - } - var assert; - var signals; - var isWin; - var EE; - var emitter; - var unload; - var emit; - var sigListeners; - var loaded; - var load; - var originalProcessReallyExit; - var processReallyExit; - var originalProcessEmit; - var processEmit; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js -var require_kill = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports, module2) { - "use strict"; - var os3 = require("os"); - var onExit = require_signal_exit(); - var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; - var spawnedKill = /* @__PURE__ */ __name((kill, signal = "SIGTERM", options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; - }, "spawnedKill"); - var setKillTimeout = /* @__PURE__ */ __name((kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - const timeout = getForceKillAfterTimeout(options); - const t2 = setTimeout(() => { - kill("SIGKILL"); - }, timeout); - if (t2.unref) { - t2.unref(); - } - }, "setKillTimeout"); - var shouldForceKill = /* @__PURE__ */ __name((signal, { forceKillAfterTimeout }, killResult) => { - return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; - }, "shouldForceKill"); - var isSigterm = /* @__PURE__ */ __name((signal) => { - return signal === os3.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; - }, "isSigterm"); - var getForceKillAfterTimeout = /* @__PURE__ */ __name(({ forceKillAfterTimeout = true }) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - return forceKillAfterTimeout; - }, "getForceKillAfterTimeout"); - var spawnedCancel = /* @__PURE__ */ __name((spawned, context3) => { - const killResult = spawned.kill(); - if (killResult) { - context3.isCanceled = true; - } - }, "spawnedCancel"); - var timeoutKill = /* @__PURE__ */ __name((spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); - }, "timeoutKill"); - var setupTimeout = /* @__PURE__ */ __name((spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { - if (timeout === 0 || timeout === void 0) { - return spawnedPromise; - } - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - return Promise.race([timeoutPromise, safeSpawnedPromise]); - }, "setupTimeout"); - var validateTimeout = /* @__PURE__ */ __name(({ timeout }) => { - if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } - }, "validateTimeout"); - var setExitHandler = /* @__PURE__ */ __name(async (spawned, { cleanup, detached }, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - const removeExitHandler = onExit(() => { - spawned.kill(); - }); - return timedPromise.finally(() => { - removeExitHandler(); - }); - }, "setExitHandler"); - module2.exports = { - spawnedKill, - spawnedCancel, - setupTimeout, - validateTimeout, - setExitHandler - }; - } -}); - -// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js -var require_is_stream = __commonJS({ - "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports, module2) { - "use strict"; - var isStream = /* @__PURE__ */ __name((stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function", "isStream"); - isStream.writable = (stream2) => isStream(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object"; - isStream.readable = (stream2) => isStream(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object"; - isStream.duplex = (stream2) => isStream.writable(stream2) && isStream.readable(stream2); - isStream.transform = (stream2) => isStream.duplex(stream2) && typeof stream2._transform === "function"; - module2.exports = isStream; - } -}); - -// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js -var require_buffer_stream = __commonJS({ - "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports, module2) { - "use strict"; - var { PassThrough: PassThroughStream } = require("stream"); - module2.exports = (options) => { - options = { ...options }; - const { array } = options; - let { encoding } = options; - const isBuffer = encoding === "buffer"; - let objectMode = false; - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || "utf8"; - } - if (isBuffer) { - encoding = null; - } - const stream2 = new PassThroughStream({ objectMode }); - if (encoding) { - stream2.setEncoding(encoding); - } - let length = 0; - const chunks = []; - stream2.on("data", (chunk) => { - chunks.push(chunk); - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - stream2.getBufferedValue = () => { - if (array) { - return chunks; - } - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); - }; - stream2.getBufferedLength = () => length; - return stream2; - }; - } -}); - -// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js -var require_get_stream = __commonJS({ - "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module2) { - "use strict"; - var { constants: BufferConstants } = require("buffer"); - var stream2 = require("stream"); - var { promisify: promisify4 } = require("util"); - var bufferStream = require_buffer_stream(); - var streamPipelinePromisified = promisify4(stream2.pipeline); - var MaxBufferError = class extends Error { - constructor() { - super("maxBuffer exceeded"); - this.name = "MaxBufferError"; - } - }; - __name(MaxBufferError, "MaxBufferError"); - async function getStream2(inputStream, options) { - if (!inputStream) { - throw new Error("Expected a stream"); - } - options = { - maxBuffer: Infinity, - ...options - }; - const { maxBuffer } = options; - const stream3 = bufferStream(options); - await new Promise((resolve, reject) => { - const rejectPromise = /* @__PURE__ */ __name((error2) => { - if (error2 && stream3.getBufferedLength() <= BufferConstants.MAX_LENGTH) { - error2.bufferedData = stream3.getBufferedValue(); - } - reject(error2); - }, "rejectPromise"); - (async () => { - try { - await streamPipelinePromisified(inputStream, stream3); - resolve(); - } catch (error2) { - rejectPromise(error2); - } - })(); - stream3.on("data", () => { - if (stream3.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }); - return stream3.getBufferedValue(); - } - __name(getStream2, "getStream"); - module2.exports = getStream2; - module2.exports.buffer = (stream3, options) => getStream2(stream3, { ...options, encoding: "buffer" }); - module2.exports.array = (stream3, options) => getStream2(stream3, { ...options, array: true }); - module2.exports.MaxBufferError = MaxBufferError; - } -}); - -// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js -var require_merge_stream = __commonJS({ - "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) { - "use strict"; - var { PassThrough } = require("stream"); - module2.exports = function() { - var sources = []; - var output = new PassThrough({ objectMode: true }); - output.setMaxListeners(0); - output.add = add2; - output.isEmpty = isEmpty; - output.on("unpipe", remove); - Array.prototype.slice.call(arguments).forEach(add2); - return output; - function add2(source) { - if (Array.isArray(source)) { - source.forEach(add2); - return this; - } - sources.push(source); - source.once("end", remove.bind(null, source)); - source.once("error", output.emit.bind(output, "error")); - source.pipe(output, { end: false }); - return this; - } - __name(add2, "add"); - function isEmpty() { - return sources.length == 0; - } - __name(isEmpty, "isEmpty"); - function remove(source) { - sources = sources.filter(function(it) { - return it !== source; - }); - if (!sources.length && output.readable) { - output.end(); - } - } - __name(remove, "remove"); - }; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js -var require_stream = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports, module2) { - "use strict"; - var isStream = require_is_stream(); - var getStream2 = require_get_stream(); - var mergeStream = require_merge_stream(); - var handleInput = /* @__PURE__ */ __name((spawned, input) => { - if (input === void 0 || spawned.stdin === void 0) { - return; - } - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } - }, "handleInput"); - var makeAllStream = /* @__PURE__ */ __name((spawned, { all }) => { - if (!all || !spawned.stdout && !spawned.stderr) { - return; - } - const mixed = mergeStream(); - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - return mixed; - }, "makeAllStream"); - var getBufferedData = /* @__PURE__ */ __name(async (stream2, streamPromise) => { - if (!stream2) { - return; - } - stream2.destroy(); - try { - return await streamPromise; - } catch (error2) { - return error2.bufferedData; - } - }, "getBufferedData"); - var getStreamPromise = /* @__PURE__ */ __name((stream2, { encoding, buffer, maxBuffer }) => { - if (!stream2 || !buffer) { - return; - } - if (encoding) { - return getStream2(stream2, { encoding, maxBuffer }); - } - return getStream2.buffer(stream2, { maxBuffer }); - }, "getStreamPromise"); - var getSpawnedResult = /* @__PURE__ */ __name(async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { - const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); - const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); - const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error2) { - return Promise.all([ - { error: error2, signal: error2.signal, timedOut: error2.timedOut }, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all, allPromise) - ]); - } - }, "getSpawnedResult"); - var validateInputSync = /* @__PURE__ */ __name(({ input }) => { - if (isStream(input)) { - throw new TypeError("The `input` option cannot be a stream in sync mode"); - } - }, "validateInputSync"); - module2.exports = { - handleInput, - makeAllStream, - getSpawnedResult, - validateInputSync - }; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js -var require_promise = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports, module2) { - "use strict"; - var nativePromisePrototype = (async () => { - })().constructor.prototype; - var descriptors = ["then", "catch", "finally"].map((property) => [ - property, - Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) - ]); - var mergePromise = /* @__PURE__ */ __name((spawned, promise) => { - for (const [property, descriptor] of descriptors) { - const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); - Reflect.defineProperty(spawned, property, { ...descriptor, value }); - } - return spawned; - }, "mergePromise"); - var getSpawnedPromise = /* @__PURE__ */ __name((spawned) => { - return new Promise((resolve, reject) => { - spawned.on("exit", (exitCode, signal) => { - resolve({ exitCode, signal }); - }); - spawned.on("error", (error2) => { - reject(error2); - }); - if (spawned.stdin) { - spawned.stdin.on("error", (error2) => { - reject(error2); - }); - } - }); - }, "getSpawnedPromise"); - module2.exports = { - mergePromise, - getSpawnedPromise - }; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js -var require_command = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports, module2) { - "use strict"; - var normalizeArgs = /* @__PURE__ */ __name((file, args = []) => { - if (!Array.isArray(args)) { - return [file]; - } - return [file, ...args]; - }, "normalizeArgs"); - var NO_ESCAPE_REGEXP = /^[\w.-]+$/; - var DOUBLE_QUOTES_REGEXP = /"/g; - var escapeArg = /* @__PURE__ */ __name((arg2) => { - if (typeof arg2 !== "string" || NO_ESCAPE_REGEXP.test(arg2)) { - return arg2; - } - return `"${arg2.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; - }, "escapeArg"); - var joinCommand = /* @__PURE__ */ __name((file, args) => { - return normalizeArgs(file, args).join(" "); - }, "joinCommand"); - var getEscapedCommand = /* @__PURE__ */ __name((file, args) => { - return normalizeArgs(file, args).map((arg2) => escapeArg(arg2)).join(" "); - }, "getEscapedCommand"); - var SPACES_REGEXP = / +/g; - var parseCommand = /* @__PURE__ */ __name((command) => { - const tokens = []; - for (const token of command.trim().split(SPACES_REGEXP)) { - const previousToken = tokens[tokens.length - 1]; - if (previousToken && previousToken.endsWith("\\")) { - tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; - } else { - tokens.push(token); - } - } - return tokens; - }, "parseCommand"); - module2.exports = { - joinCommand, - getEscapedCommand, - parseCommand - }; - } -}); - -// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js -var require_execa = __commonJS({ - "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports, module2) { - "use strict"; - var path7 = require("path"); - var childProcess = require("child_process"); - var crossSpawn = require_cross_spawn(); - var stripFinalNewline = require_strip_final_newline(); - var npmRunPath = require_npm_run_path(); - var onetime = require_onetime(); - var makeError = require_error(); - var normalizeStdio = require_stdio(); - var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill(); - var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream(); - var { mergePromise, getSpawnedPromise } = require_promise(); - var { joinCommand, parseCommand, getEscapedCommand } = require_command(); - var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; - var getEnv2 = /* @__PURE__ */ __name(({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { - const env2 = extendEnv ? { ...process.env, ...envOption } : envOption; - if (preferLocal) { - return npmRunPath.env({ env: env2, cwd: localDir, execPath }); - } - return env2; - }, "getEnv"); - var handleArguments = /* @__PURE__ */ __name((file, args, options = {}) => { - const parsed = crossSpawn._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || process.cwd(), - execPath: process.execPath, - encoding: "utf8", - reject: true, - cleanup: true, - all: false, - windowsHide: true, - ...options - }; - options.env = getEnv2(options); - options.stdio = normalizeStdio(options); - if (process.platform === "win32" && path7.basename(file, ".exe") === "cmd") { - args.unshift("/q"); - } - return { file, args, options, parsed }; - }, "handleArguments"); - var handleOutput = /* @__PURE__ */ __name((options, value, error2) => { - if (typeof value !== "string" && !Buffer.isBuffer(value)) { - return error2 === void 0 ? void 0 : ""; - } - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - return value; - }, "handleOutput"); - var execa2 = /* @__PURE__ */ __name((file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - validateTimeout(parsed.options); - let spawned; - try { - spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); - } catch (error2) { - const dummySpawned = new childProcess.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error: error2, - stdout: "", - stderr: "", - all: "", - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - return mergePromise(dummySpawned, errorPromise); - } - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - const context3 = { isCanceled: false }; - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context3); - const handlePromise = /* @__PURE__ */ __name(async () => { - const [{ error: error2, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all = handleOutput(parsed.options, allResult); - if (error2 || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error: error2, - exitCode, - signal, - stdout, - stderr, - all, - command, - escapedCommand, - parsed, - timedOut, - isCanceled: context3.isCanceled, - killed: spawned.killed - }); - if (!parsed.options.reject) { - return returnedError; - } - throw returnedError; - } - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - all, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }, "handlePromise"); - const handlePromiseOnce = onetime(handlePromise); - handleInput(spawned, parsed.options.input); - spawned.all = makeAllStream(spawned, parsed.options); - return mergePromise(spawned, handlePromiseOnce); - }, "execa"); - module2.exports = execa2; - module2.exports.sync = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - validateInputSync(parsed.options); - let result; - try { - result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); - } catch (error2) { - throw makeError({ - error: error2, - stdout: "", - stderr: "", - all: "", - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - if (result.error || result.status !== 0 || result.signal !== null) { - const error2 = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command, - escapedCommand, - parsed, - timedOut: result.error && result.error.code === "ETIMEDOUT", - isCanceled: false, - killed: result.signal !== null - }); - if (!parsed.options.reject) { - return error2; - } - throw error2; - } - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - module2.exports.command = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa2(file, args, options); - }; - module2.exports.commandSync = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa2.sync(file, args, options); - }; - module2.exports.node = (scriptPath, args, options = {}) => { - if (args && !Array.isArray(args) && typeof args === "object") { - options = args; - args = []; - } - const stdio = normalizeStdio.node(options); - const defaultExecArgv = process.execArgv.filter((arg2) => !arg2.startsWith("--inspect")); - const { - nodePath = process.execPath, - nodeOptions = defaultExecArgv - } = options; - return execa2( - nodePath, - [ - ...nodeOptions, - scriptPath, - ...Array.isArray(args) ? args : [] - ], - { - ...options, - stdin: void 0, - stdout: void 0, - stderr: void 0, - stdio, - shell: false - } - ); - }; - } -}); - -// ../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/package.json -var require_package = __commonJS({ - "../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/package.json"(exports, module2) { - module2.exports = { - name: "dotenv", - version: "16.0.3", - description: "Loads environment variables from .env file", - main: "lib/main.js", - types: "lib/main.d.ts", - exports: { - ".": { - require: "./lib/main.js", - types: "./lib/main.d.ts", - 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", - "lint-readme": "standard-markdown", - pretest: "npm run lint && npm run dts-check", - test: "tap tests/*.js --100 -Rspec", - prerelease: "npm test", - release: "standard-version" - }, - repository: { - type: "git", - url: "git://github.com/motdotla/dotenv.git" - }, - keywords: [ - "dotenv", - "env", - ".env", - "environment", - "variables", - "config", - "settings" - ], - readmeFilename: "README.md", - license: "BSD-2-Clause", - devDependencies: { - "@types/node": "^17.0.9", - decache: "^4.6.1", - dtslint: "^3.7.0", - sinon: "^12.0.1", - standard: "^16.0.4", - "standard-markdown": "^7.1.0", - "standard-version": "^9.3.2", - tap: "^15.1.6", - tar: "^6.1.11", - typescript: "^4.5.4" - }, - engines: { - node: ">=12" - } - }; - } -}); - -// ../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js -var require_main2 = __commonJS({ - "../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js"(exports, module2) { - var fs11 = require("fs"); - var path7 = require("path"); - var os3 = require("os"); - var packageJson = require_package(); - var version = packageJson.version; - var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; - function parse2(src) { - const obj = {}; - let lines = src.toString(); - lines = lines.replace(/\r\n?/mg, "\n"); - let match; - while ((match = LINE.exec(lines)) != null) { - const key = match[1]; - let value = match[2] || ""; - value = value.trim(); - const maybeQuote = value[0]; - value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"); - if (maybeQuote === '"') { - value = value.replace(/\\n/g, "\n"); - value = value.replace(/\\r/g, "\r"); - } - obj[key] = value; - } - return obj; - } - __name(parse2, "parse"); - function _log(message) { - console.log(`[dotenv@${version}][DEBUG] ${message}`); - } - __name(_log, "_log"); - function _resolveHome(envPath) { - return envPath[0] === "~" ? path7.join(os3.homedir(), envPath.slice(1)) : envPath; - } - __name(_resolveHome, "_resolveHome"); - function config2(options) { - let dotenvPath = path7.resolve(process.cwd(), ".env"); - let encoding = "utf8"; - const debug13 = Boolean(options && options.debug); - const override = Boolean(options && options.override); - if (options) { - if (options.path != null) { - dotenvPath = _resolveHome(options.path); - } - if (options.encoding != null) { - encoding = options.encoding; - } - } - try { - const parsed = DotenvModule.parse(fs11.readFileSync(dotenvPath, { encoding })); - Object.keys(parsed).forEach(function(key) { - if (!Object.prototype.hasOwnProperty.call(process.env, key)) { - process.env[key] = parsed[key]; - } else { - if (override === true) { - process.env[key] = parsed[key]; - } - if (debug13) { - if (override === true) { - _log(`"${key}" is already defined in \`process.env\` and WAS overwritten`); - } else { - _log(`"${key}" is already defined in \`process.env\` and was NOT overwritten`); - } - } - } - }); - return { parsed }; - } catch (e2) { - if (debug13) { - _log(`Failed to load ${dotenvPath} ${e2.message}`); - } - return { error: e2 }; - } - } - __name(config2, "config"); - var DotenvModule = { - config: config2, - parse: parse2 - }; - module2.exports.config = DotenvModule.config; - module2.exports.parse = DotenvModule.parse; - module2.exports = DotenvModule; - } -}); - -// ../../node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.js -var require_arg = __commonJS({ - "../../node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.js"(exports, module2) { - var flagSymbol = Symbol("arg flag"); - var ArgError = class extends Error { - constructor(msg, code) { - super(msg); - this.name = "ArgError"; - this.code = code; - Object.setPrototypeOf(this, ArgError.prototype); - } - }; - __name(ArgError, "ArgError"); - function arg2(opts, { - argv = process.argv.slice(2), - permissive = false, - stopAtPositional = false - } = {}) { - if (!opts) { - throw new ArgError( - "argument specification object is required", - "ARG_CONFIG_NO_SPEC" - ); - } - const result = { _: [] }; - const aliases = {}; - const handlers = {}; - for (const key of Object.keys(opts)) { - if (!key) { - throw new ArgError( - "argument key cannot be an empty string", - "ARG_CONFIG_EMPTY_KEY" - ); - } - if (key[0] !== "-") { - throw new ArgError( - `argument key must start with '-' but found: '${key}'`, - "ARG_CONFIG_NONOPT_KEY" - ); - } - if (key.length === 1) { - throw new ArgError( - `argument key must have a name; singular '-' keys are not allowed: ${key}`, - "ARG_CONFIG_NONAME_KEY" - ); - } - if (typeof opts[key] === "string") { - aliases[key] = opts[key]; - continue; - } - let type = opts[key]; - let isFlag = false; - if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") { - const [fn] = type; - type = /* @__PURE__ */ __name((value, name, prev = []) => { - prev.push(fn(value, name, prev[prev.length - 1])); - return prev; - }, "type"); - isFlag = fn === Boolean || fn[flagSymbol] === true; - } else if (typeof type === "function") { - isFlag = type === Boolean || type[flagSymbol] === true; - } else { - throw new ArgError( - `type missing or not a function or valid array type: ${key}`, - "ARG_CONFIG_VAD_TYPE" - ); - } - if (key[1] !== "-" && key.length > 2) { - throw new ArgError( - `short argument keys (with a single hyphen) must have only one character: ${key}`, - "ARG_CONFIG_SHORTOPT_TOOLONG" - ); - } - handlers[key] = [type, isFlag]; - } - for (let i = 0, len = argv.length; i < len; i++) { - const wholeArg = argv[i]; - if (stopAtPositional && result._.length > 0) { - result._ = result._.concat(argv.slice(i)); - break; - } - if (wholeArg === "--") { - result._ = result._.concat(argv.slice(i + 1)); - break; - } - if (wholeArg.length > 1 && wholeArg[0] === "-") { - const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a) => `-${a}`); - for (let j = 0; j < separatedArguments.length; j++) { - const arg3 = separatedArguments[j]; - const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0]; - let argName = originalArgName; - while (argName in aliases) { - argName = aliases[argName]; - } - if (!(argName in handlers)) { - if (permissive) { - result._.push(arg3); - continue; - } else { - throw new ArgError( - `unknown or unexpected option: ${originalArgName}`, - "ARG_UNKNOWN_OPTION" - ); - } - } - const [type, isFlag] = handlers[argName]; - if (!isFlag && j + 1 < separatedArguments.length) { - throw new ArgError( - `option requires argument (but was followed by another short argument): ${originalArgName}`, - "ARG_MISSING_REQUIRED_SHORTARG" - ); - } - if (isFlag) { - result[argName] = type(true, argName, result[argName]); - } else if (argStr === void 0) { - if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || typeof BigInt !== "undefined" && type === BigInt))) { - const extended = originalArgName === argName ? "" : ` (alias for ${argName})`; - throw new ArgError( - `option requires argument: ${originalArgName}${extended}`, - "ARG_MISSING_REQUIRED_LONGARG" - ); - } - result[argName] = type(argv[i + 1], argName, result[argName]); - ++i; - } else { - result[argName] = type(argStr, argName, result[argName]); - } - } - } else { - result._.push(wholeArg); - } - } - return result; - } - __name(arg2, "arg"); - arg2.flag = (fn) => { - fn[flagSymbol] = true; - return fn; - }; - arg2.COUNT = arg2.flag((v, name, existingCount) => (existingCount || 0) + 1); - arg2.ArgError = ArgError; - module2.exports = arg2; - } -}); - -// ../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js -var require_min_indent = __commonJS({ - "../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports, module2) { - "use strict"; - module2.exports = (string) => { - const match = string.match(/^[ \t]*(?=\S)/gm); - if (!match) { - return 0; - } - return match.reduce((r2, a) => Math.min(r2, a.length), Infinity); - }; - } -}); - -// ../../node_modules/.pnpm/strip-indent@3.0.0/node_modules/strip-indent/index.js -var require_strip_indent = __commonJS({ - "../../node_modules/.pnpm/strip-indent@3.0.0/node_modules/strip-indent/index.js"(exports, module2) { - "use strict"; - var minIndent = require_min_indent(); - module2.exports = (string) => { - const indent4 = minIndent(string); - if (indent4 === 0) { - return string; - } - const regex = new RegExp(`^[ \\t]{${indent4}}`, "gm"); - return string.replace(regex, ""); - }; - } -}); - -// ../../node_modules/.pnpm/@prisma+engines-version@4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines-version/package.json -var require_package2 = __commonJS({ - "../../node_modules/.pnpm/@prisma+engines-version@4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines-version/package.json"(exports, module2) { - module2.exports = { - name: "@prisma/engines-version", - version: "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", - main: "index.js", - types: "index.d.ts", - license: "Apache-2.0", - author: "Tim Suchanek ", - prisma: { - enginesVersion: "d6e67a83f971b175a593ccc12e15c4a757f93ffe" - }, - repository: { - type: "git", - url: "https://github.com/prisma/engines-wrapper.git", - directory: "packages/engines-version" - }, - devDependencies: { - "@types/node": "16.11.64", - typescript: "4.8.4" - }, - files: [ - "index.js", - "index.d.ts" - ], - scripts: { - build: "tsc -d" - } - }; - } -}); - -// ../../node_modules/.pnpm/@prisma+engines-version@4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines-version/index.js -var require_engines_version = __commonJS({ - "../../node_modules/.pnpm/@prisma+engines-version@4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines-version/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.enginesVersion = void 0; - exports.enginesVersion = require_package2().prisma.enginesVersion; - } -}); - -// ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js -var require_retry_operation = __commonJS({ - "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js"(exports, module2) { - function RetryOperation(timeouts, options) { - if (typeof options === "boolean") { - options = { forever: options }; - } - this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); - this._timeouts = timeouts; - this._options = options || {}; - this._maxRetryTime = options && options.maxRetryTime || Infinity; - this._fn = null; - this._errors = []; - this._attempts = 1; - this._operationTimeout = null; - this._operationTimeoutCb = null; - this._timeout = null; - this._operationStart = null; - this._timer = null; - if (this._options.forever) { - this._cachedTimeouts = this._timeouts.slice(0); - } - } - __name(RetryOperation, "RetryOperation"); - module2.exports = RetryOperation; - RetryOperation.prototype.reset = function() { - this._attempts = 1; - this._timeouts = this._originalTimeouts.slice(0); - }; - RetryOperation.prototype.stop = function() { - if (this._timeout) { - clearTimeout(this._timeout); - } - if (this._timer) { - clearTimeout(this._timer); - } - this._timeouts = []; - this._cachedTimeouts = null; - }; - RetryOperation.prototype.retry = function(err) { - if (this._timeout) { - clearTimeout(this._timeout); - } - if (!err) { - return false; - } - var currentTime = new Date().getTime(); - if (err && currentTime - this._operationStart >= this._maxRetryTime) { - this._errors.push(err); - this._errors.unshift(new Error("RetryOperation timeout occurred")); - return false; - } - this._errors.push(err); - var timeout = this._timeouts.shift(); - if (timeout === void 0) { - if (this._cachedTimeouts) { - this._errors.splice(0, this._errors.length - 1); - timeout = this._cachedTimeouts.slice(-1); - } else { - return false; - } - } - var self2 = this; - this._timer = setTimeout(function() { - self2._attempts++; - if (self2._operationTimeoutCb) { - self2._timeout = setTimeout(function() { - self2._operationTimeoutCb(self2._attempts); - }, self2._operationTimeout); - if (self2._options.unref) { - self2._timeout.unref(); - } - } - self2._fn(self2._attempts); - }, timeout); - if (this._options.unref) { - this._timer.unref(); - } - return true; - }; - RetryOperation.prototype.attempt = function(fn, timeoutOps) { - this._fn = fn; - if (timeoutOps) { - if (timeoutOps.timeout) { - this._operationTimeout = timeoutOps.timeout; - } - if (timeoutOps.cb) { - this._operationTimeoutCb = timeoutOps.cb; - } - } - var self2 = this; - if (this._operationTimeoutCb) { - this._timeout = setTimeout(function() { - self2._operationTimeoutCb(); - }, self2._operationTimeout); - } - this._operationStart = new Date().getTime(); - this._fn(this._attempts); - }; - RetryOperation.prototype.try = function(fn) { - console.log("Using RetryOperation.try() is deprecated"); - this.attempt(fn); - }; - RetryOperation.prototype.start = function(fn) { - console.log("Using RetryOperation.start() is deprecated"); - this.attempt(fn); - }; - RetryOperation.prototype.start = RetryOperation.prototype.try; - RetryOperation.prototype.errors = function() { - return this._errors; - }; - RetryOperation.prototype.attempts = function() { - return this._attempts; - }; - RetryOperation.prototype.mainError = function() { - if (this._errors.length === 0) { - return null; - } - var counts = {}; - var mainError = null; - var mainErrorCount = 0; - for (var i = 0; i < this._errors.length; i++) { - var error2 = this._errors[i]; - var message = error2.message; - var count2 = (counts[message] || 0) + 1; - counts[message] = count2; - if (count2 >= mainErrorCount) { - mainError = error2; - mainErrorCount = count2; - } - } - return mainError; - }; - } -}); - -// ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js -var require_retry = __commonJS({ - "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js"(exports) { - var RetryOperation = require_retry_operation(); - exports.operation = function(options) { - var timeouts = exports.timeouts(options); - return new RetryOperation(timeouts, { - forever: options && (options.forever || options.retries === Infinity), - unref: options && options.unref, - maxRetryTime: options && options.maxRetryTime - }); - }; - exports.timeouts = function(options) { - if (options instanceof Array) { - return [].concat(options); - } - var opts = { - retries: 10, - factor: 2, - minTimeout: 1 * 1e3, - maxTimeout: Infinity, - randomize: false - }; - for (var key in options) { - opts[key] = options[key]; - } - if (opts.minTimeout > opts.maxTimeout) { - throw new Error("minTimeout is greater than maxTimeout"); - } - var timeouts = []; - for (var i = 0; i < opts.retries; i++) { - timeouts.push(this.createTimeout(i, opts)); - } - if (options && options.forever && !timeouts.length) { - timeouts.push(this.createTimeout(i, opts)); - } - timeouts.sort(function(a, b2) { - return a - b2; - }); - return timeouts; - }; - exports.createTimeout = function(attempt, opts) { - var random2 = opts.randomize ? Math.random() + 1 : 1; - var timeout = Math.round(random2 * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)); - timeout = Math.min(timeout, opts.maxTimeout); - return timeout; - }; - exports.wrap = function(obj, options, methods) { - if (options instanceof Array) { - methods = options; - options = null; - } - if (!methods) { - methods = []; - for (var key in obj) { - if (typeof obj[key] === "function") { - methods.push(key); - } - } - } - for (var i = 0; i < methods.length; i++) { - var method = methods[i]; - var original = obj[method]; - obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) { - var op = exports.operation(options); - var args = Array.prototype.slice.call(arguments, 1); - var callback = args.pop(); - args.push(function(err) { - if (op.retry(err)) { - return; - } - if (err) { - arguments[0] = op.mainError(); - } - callback.apply(this, arguments); - }); - op.attempt(function() { - original2.apply(obj, args); - }); - }, "retryWrapper")).bind(obj, original); - obj[method].options = options; - } - }; - } -}); - -// ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js -var require_retry2 = __commonJS({ - "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js"(exports, module2) { - module2.exports = require_retry(); - } -}); - -// ../../node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js -var require_p_retry = __commonJS({ - "../../node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js"(exports, module2) { - "use strict"; - var retry = require_retry2(); - var networkErrorMsgs = [ - "Failed to fetch", - "NetworkError when attempting to fetch resource.", - "The Internet connection appears to be offline.", - "Network request failed" - ]; - var AbortError = class extends Error { - constructor(message) { - super(); - if (message instanceof Error) { - this.originalError = message; - ({ message } = message); - } else { - this.originalError = new Error(message); - this.originalError.stack = this.stack; - } - this.name = "AbortError"; - this.message = message; - } - }; - __name(AbortError, "AbortError"); - var decorateErrorWithCounts = /* @__PURE__ */ __name((error2, attemptNumber, options) => { - const retriesLeft = options.retries - (attemptNumber - 1); - error2.attemptNumber = attemptNumber; - error2.retriesLeft = retriesLeft; - return error2; - }, "decorateErrorWithCounts"); - var isNetworkError = /* @__PURE__ */ __name((errorMessage) => networkErrorMsgs.includes(errorMessage), "isNetworkError"); - var pRetry2 = /* @__PURE__ */ __name((input, options) => new Promise((resolve, reject) => { - options = { - onFailedAttempt: () => { - }, - retries: 10, - ...options - }; - const operation = retry.operation(options); - operation.attempt(async (attemptNumber) => { - try { - resolve(await input(attemptNumber)); - } catch (error2) { - if (!(error2 instanceof Error)) { - reject(new TypeError(`Non-error was thrown: "${error2}". You should only throw errors.`)); - return; - } - if (error2 instanceof AbortError) { - operation.stop(); - reject(error2.originalError); - } else if (error2 instanceof TypeError && !isNetworkError(error2.message)) { - operation.stop(); - reject(error2); - } else { - decorateErrorWithCounts(error2, attemptNumber, options); - try { - await options.onFailedAttempt(error2); - } catch (error3) { - reject(error3); - return; - } - if (!operation.retry(error2)) { - reject(operation.mainError()); - } - } - } - }); - }), "pRetry"); - module2.exports = pRetry2; - module2.exports.default = pRetry2; - module2.exports.AbortError = AbortError; - } -}); - -// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js -var require_ansi_regex = __commonJS({ - "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module2) { - "use strict"; - module2.exports = ({ onlyFirst = false } = {}) => { - const pattern = [ - "[\\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(pattern, onlyFirst ? void 0 : "g"); - }; - } -}); - -// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js -var require_strip_ansi = __commonJS({ - "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module2) { - "use strict"; - var ansiRegex = require_ansi_regex(); - module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; - } -}); - -// ../../node_modules/.pnpm/new-github-issue-url@0.2.1/node_modules/new-github-issue-url/index.js -var require_new_github_issue_url = __commonJS({ - "../../node_modules/.pnpm/new-github-issue-url@0.2.1/node_modules/new-github-issue-url/index.js"(exports, module2) { - "use strict"; - module2.exports = (options = {}) => { - let repoUrl; - if (options.repoUrl) { - repoUrl = options.repoUrl; - } else if (options.user && options.repo) { - repoUrl = `https://github.com/${options.user}/${options.repo}`; - } else { - throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options"); - } - const url = new URL(`${repoUrl}/issues/new`); - const types = [ - "body", - "title", - "labels", - "template", - "milestone", - "assignee", - "projects" - ]; - for (const type of types) { - let value = options[type]; - if (value === void 0) { - continue; - } - if (type === "labels" || type === "projects") { - if (!Array.isArray(value)) { - throw new TypeError(`The \`${type}\` option should be an array`); - } - value = value.join(","); - } - url.searchParams.set(type, value); - } - return url.toString(); - }; - module2.exports.default = module2.exports; - } -}); - -// ../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) { - "use strict"; - module2.exports = (string, count2 = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count2 !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count2}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count2 === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count2)); - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/symbols.js -var require_symbols = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/symbols.js"(exports, module2) { - module2.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kHeadersList: Symbol("headers list"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol("destroyed"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelinig"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors") - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/errors.js -var require_errors = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/errors.js"(exports, module2) { - "use strict"; - var UndiciError = class extends Error { - constructor(message) { - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } - }; - __name(UndiciError, "UndiciError"); - var ConnectTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, ConnectTimeoutError); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } - }; - __name(ConnectTimeoutError, "ConnectTimeoutError"); - var HeadersTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersTimeoutError); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } - }; - __name(HeadersTimeoutError, "HeadersTimeoutError"); - var HeadersOverflowError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersOverflowError); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } - }; - __name(HeadersOverflowError, "HeadersOverflowError"); - var BodyTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, BodyTimeoutError); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } - }; - __name(BodyTimeoutError, "BodyTimeoutError"); - var ResponseStatusCodeError = class extends UndiciError { - constructor(message, statusCode, headers, body) { - super(message); - Error.captureStackTrace(this, ResponseStatusCodeError); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } - }; - __name(ResponseStatusCodeError, "ResponseStatusCodeError"); - var InvalidArgumentError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidArgumentError); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } - }; - __name(InvalidArgumentError, "InvalidArgumentError"); - var InvalidReturnValueError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidReturnValueError); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } - }; - __name(InvalidReturnValueError, "InvalidReturnValueError"); - var RequestAbortedError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestAbortedError); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } - }; - __name(RequestAbortedError, "RequestAbortedError"); - var InformationalError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, InformationalError); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } - }; - __name(InformationalError, "InformationalError"); - var RequestContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestContentLengthMismatchError); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } - }; - __name(RequestContentLengthMismatchError, "RequestContentLengthMismatchError"); - var ResponseContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, ResponseContentLengthMismatchError); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } - }; - __name(ResponseContentLengthMismatchError, "ResponseContentLengthMismatchError"); - var ClientDestroyedError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientDestroyedError); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } - }; - __name(ClientDestroyedError, "ClientDestroyedError"); - var ClientClosedError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientClosedError); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } - }; - __name(ClientClosedError, "ClientClosedError"); - var SocketError = class extends UndiciError { - constructor(message, socket) { - super(message); - Error.captureStackTrace(this, SocketError); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } - }; - __name(SocketError, "SocketError"); - var NotSupportedError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } - }; - __name(NotSupportedError, "NotSupportedError"); - var BalancedPoolMissingUpstreamError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } - }; - __name(BalancedPoolMissingUpstreamError, "BalancedPoolMissingUpstreamError"); - var HTTPParserError = class extends Error { - constructor(message, code, data) { - super(message); - Error.captureStackTrace(this, HTTPParserError); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : void 0; - this.data = data ? data.toString() : void 0; - } - }; - __name(HTTPParserError, "HTTPParserError"); - module2.exports = { - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/util.js -var require_util2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/util.js"(exports, module2) { - "use strict"; - var assert = require("assert"); - var { kDestroyed, kBodyUsed } = require_symbols(); - var { IncomingMessage } = require("http"); - var stream2 = require("stream"); - var net2 = require("net"); - var { InvalidArgumentError } = require_errors(); - var { Blob } = require("buffer"); - var nodeUtil = require("util"); - var { stringify: stringify2 } = require("querystring"); - function nop() { - } - __name(nop, "nop"); - function isStream(obj) { - return obj && typeof obj.pipe === "function"; - } - __name(isStream, "isStream"); - function isBlobLike(object) { - return Blob && object instanceof Blob || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); - } - __name(isBlobLike, "isBlobLike"); - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".'); - } - const stringified = stringify2(queryParams); - if (stringified) { - url += "?" + stringified; - } - return url; - } - __name(buildURL, "buildURL"); - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - } - if (!url || typeof url !== "object") { - throw new InvalidArgumentError("invalid url"); - } - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError("invalid port"); - } - if (url.path != null && typeof url.path !== "string") { - throw new InvalidArgumentError("invalid path"); - } - if (url.pathname != null && typeof url.pathname !== "string") { - throw new InvalidArgumentError("invalid pathname"); - } - if (url.hostname != null && typeof url.hostname !== "string") { - throw new InvalidArgumentError("invalid hostname"); - } - if (url.origin != null && typeof url.origin !== "string") { - throw new InvalidArgumentError("invalid origin"); - } - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError("invalid protocol"); - } - if (!(url instanceof URL)) { - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin.endsWith("/")) { - origin = origin.substring(0, origin.length - 1); - } - if (path7 && !path7.startsWith("/")) { - path7 = `/${path7}`; - } - url = new URL(origin + path7); - } - return url; - } - __name(parseURL, "parseURL"); - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { - throw new InvalidArgumentError("invalid url"); - } - return url; - } - __name(parseOrigin, "parseOrigin"); - function getHostname(host) { - if (host[0] === "[") { - const idx2 = host.indexOf("]"); - assert(idx2 !== -1); - return host.substr(1, idx2 - 1); - } - const idx = host.indexOf(":"); - if (idx === -1) - return host; - return host.substr(0, idx); - } - __name(getHostname, "getHostname"); - function getServerName(host) { - if (!host) { - return null; - } - assert.strictEqual(typeof host, "string"); - const servername = getHostname(host); - if (net2.isIP(servername)) { - return ""; - } - return servername; - } - __name(getServerName, "getServerName"); - function deepClone2(obj) { - return JSON.parse(JSON.stringify(obj)); - } - __name(deepClone2, "deepClone"); - function isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - __name(isAsyncIterable, "isAsyncIterable"); - function isIterable(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); - } - __name(isIterable, "isIterable"); - function bodyLength(body) { - if (body == null) { - return 0; - } else if (isStream(body)) { - const state = body._readableState; - return state && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null; - } else if (isBuffer(body)) { - return body.byteLength; - } - return null; - } - __name(bodyLength, "bodyLength"); - function isDestroyed(stream3) { - return !stream3 || !!(stream3.destroyed || stream3[kDestroyed]); - } - __name(isDestroyed, "isDestroyed"); - function isReadableAborted(stream3) { - const state = stream3 && stream3._readableState; - return isDestroyed(stream3) && state && !state.endEmitted; - } - __name(isReadableAborted, "isReadableAborted"); - function destroy(stream3, err) { - if (!isStream(stream3) || isDestroyed(stream3)) { - return; - } - if (typeof stream3.destroy === "function") { - if (Object.getPrototypeOf(stream3).constructor === IncomingMessage) { - stream3.socket = null; - } - stream3.destroy(err); - } else if (err) { - process.nextTick((stream4, err2) => { - stream4.emit("error", err2); - }, stream3, err); - } - if (stream3.destroyed !== true) { - stream3[kDestroyed] = true; - } - } - __name(destroy, "destroy"); - var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m2 = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); - return m2 ? parseInt(m2[1], 10) * 1e3 : null; - } - __name(parseKeepAliveTimeout, "parseKeepAliveTimeout"); - function parseHeaders(headers, obj = {}) { - for (let i = 0; i < headers.length; i += 2) { - const key = headers[i].toString().toLowerCase(); - let val = obj[key]; - if (!val) { - if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1]; - } else { - obj[key] = headers[i + 1].toString(); - } - } else { - if (!Array.isArray(val)) { - val = [val]; - obj[key] = val; - } - val.push(headers[i + 1].toString()); - } - } - return obj; - } - __name(parseHeaders, "parseHeaders"); - function parseRawHeaders(headers) { - return headers.map((header) => header.toString()); - } - __name(parseRawHeaders, "parseRawHeaders"); - function isBuffer(buffer) { - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); - } - __name(isBuffer, "isBuffer"); - function validateHandler(handler, method, upgrade) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - if (typeof handler.onConnect !== "function") { - throw new InvalidArgumentError("invalid onConnect method"); - } - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { - throw new InvalidArgumentError("invalid onBodySent method"); - } - if (upgrade || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") { - throw new InvalidArgumentError("invalid onUpgrade method"); - } - } else { - if (typeof handler.onHeaders !== "function") { - throw new InvalidArgumentError("invalid onHeaders method"); - } - if (typeof handler.onData !== "function") { - throw new InvalidArgumentError("invalid onData method"); - } - if (typeof handler.onComplete !== "function") { - throw new InvalidArgumentError("invalid onComplete method"); - } - } - } - __name(validateHandler, "validateHandler"); - function isDisturbed(body) { - return !!(body && (stream2.isDisturbed ? stream2.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); - } - __name(isDisturbed, "isDisturbed"); - function isErrored(body) { - return !!(body && (stream2.isErrored ? stream2.isErrored(body) : /state: 'errored'/.test( - nodeUtil.inspect(body) - ))); - } - __name(isErrored, "isErrored"); - function isReadable(body) { - return !!(body && (stream2.isReadable ? stream2.isReadable(body) : /state: 'readable'/.test( - nodeUtil.inspect(body) - ))); - } - __name(isReadable, "isReadable"); - function getSocketInfo(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - }; - } - __name(getSocketInfo, "getSocketInfo"); - var ReadableStream; - function ReadableStreamFrom(iterable) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; - } - if (ReadableStream.from) { - return ReadableStream.from(iterable); - } - let iterator; - return new ReadableStream( - { - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - }); - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - controller.enqueue(new Uint8Array(buf)); - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - } - }, - 0 - ); - } - __name(ReadableStreamFrom, "ReadableStreamFrom"); - function isFormDataLike(chunk) { - return chunk && chunk.constructor && chunk.constructor.name === "FormData"; - } - __name(isFormDataLike, "isFormDataLike"); - var kEnumerableProperty = /* @__PURE__ */ Object.create(null); - kEnumerableProperty.enumerable = true; - module2.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString: nodeUtil.toUSVString || ((val) => `${val}`), - isReadableAborted, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone: deepClone2, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL - }; - } -}); - -// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/utils.js -var require_utils = __commonJS({ - "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/utils.js"(exports, module2) { - "use strict"; - function parseContentType(str) { - if (str.length === 0) - return; - const params = /* @__PURE__ */ Object.create(null); - let i = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 47 || i === 0) - return; - break; - } - } - if (i === str.length) - return; - const type = str.slice(0, i).toLowerCase(); - const subtypeStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === subtypeStart) - return; - if (parseContentTypeParams(str, i, params) === void 0) - return; - break; - } - } - if (i === subtypeStart) - return; - const subtype = str.slice(subtypeStart, i).toLowerCase(); - return { type, subtype, params }; - } - __name(parseContentType, "parseContentType"); - function parseContentTypeParams(str, i, params) { - while (i < str.length) { - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - break; - if (str.charCodeAt(i++) !== 59) - return; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - return; - let name; - const nameStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 61) - return; - break; - } - } - if (i === str.length) - return; - name = str.slice(nameStart, i); - ++i; - if (i === str.length) - return; - let value = ""; - let valueStart; - if (str.charCodeAt(i) === 34) { - valueStart = ++i; - let escaping = false; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - if (QDTEXT[code] !== 1) - return; - } - if (i === str.length) - return; - ++i; - } else { - valueStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - name = name.toLowerCase(); - if (params[name] === void 0) - params[name] = value; - } - return params; - } - __name(parseContentTypeParams, "parseContentTypeParams"); - function parseDisposition(str, defDecoder) { - if (str.length === 0) - return; - const params = /* @__PURE__ */ Object.create(null); - let i = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (parseDispositionParams(str, i, params, defDecoder) === void 0) - return; - break; - } - } - const type = str.slice(0, i).toLowerCase(); - return { type, params }; - } - __name(parseDisposition, "parseDisposition"); - function parseDispositionParams(str, i, params, defDecoder) { - while (i < str.length) { - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - break; - if (str.charCodeAt(i++) !== 59) - return; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - return; - let name; - const nameStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code === 61) - break; - return; - } - } - if (i === str.length) - return; - let value = ""; - let valueStart; - let charset; - name = str.slice(nameStart, i); - if (name.charCodeAt(name.length - 1) === 42) { - const charsetStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (CHARSET[code] !== 1) { - if (code !== 39) - return; - break; - } - } - if (i === str.length) - return; - charset = str.slice(charsetStart, i); - ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 39) - break; - } - if (i === str.length) - return; - ++i; - if (i === str.length) - return; - valueStart = i; - let encode = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (EXTENDED_VALUE[code] !== 1) { - if (code === 37) { - let hexUpper; - let hexLower; - if (i + 2 < str.length && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { - const byteVal = (hexUpper << 4) + hexLower; - value += str.slice(valueStart, i); - value += String.fromCharCode(byteVal); - i += 2; - valueStart = i + 1; - if (byteVal >= 128) - encode = 2; - else if (encode === 0) - encode = 1; - continue; - } - return; - } - break; - } - } - value += str.slice(valueStart, i); - value = convertToUTF8(value, charset, encode); - if (value === void 0) - return; - } else { - ++i; - if (i === str.length) - return; - if (str.charCodeAt(i) === 34) { - valueStart = ++i; - let escaping = false; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - if (QDTEXT[code] !== 1) - return; - } - if (i === str.length) - return; - ++i; - } else { - valueStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - value = defDecoder(value, 2); - if (value === void 0) - return; - } - name = name.toLowerCase(); - if (params[name] === void 0) - params[name] = value; - } - return params; - } - __name(parseDispositionParams, "parseDispositionParams"); - function getDecoder(charset) { - let lc; - while (true) { - switch (charset) { - case "utf-8": - case "utf8": - return decoders.utf8; - case "latin1": - case "ascii": - case "us-ascii": - case "iso-8859-1": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "windows-1252": - case "iso_8859-1:1987": - case "cp1252": - case "x-cp1252": - return decoders.latin1; - case "utf16le": - case "utf-16le": - case "ucs2": - case "ucs-2": - return decoders.utf16le; - case "base64": - return decoders.base64; - default: - if (lc === void 0) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); - } - } - } - __name(getDecoder, "getDecoder"); - var decoders = { - utf8: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") { - if (hint < 2) - return data; - data = Buffer.from(data, "latin1"); - } - return data.utf8Slice(0, data.length); - }, - latin1: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - return data; - return data.latin1Slice(0, data.length); - }, - utf16le: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - return data.ucs2Slice(0, data.length); - }, - base64: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - return data.base64Slice(0, data.length); - }, - other: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - try { - const decoder = new TextDecoder(exports); - return decoder.decode(data); - } catch (e2) { - } - } - }; - function convertToUTF8(data, charset, hint) { - const decode = getDecoder(charset); - if (decode) - return decode(data, hint); - } - __name(convertToUTF8, "convertToUTF8"); - function basename(path7) { - if (typeof path7 !== "string") - return ""; - for (let i = path7.length - 1; i >= 0; --i) { - switch (path7.charCodeAt(i)) { - case 47: - case 92: - path7 = path7.slice(i + 1); - return path7 === ".." || path7 === "." ? "" : path7; - } - } - return path7 === ".." || path7 === "." ? "" : path7; - } - __name(basename, "basename"); - var TOKEN = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var QDTEXT = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ]; - var CHARSET = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var EXTENDED_VALUE = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var HEX_VALUES = [ - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ]; - module2.exports = { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition - }; - } -}); - -// ../../node_modules/.pnpm/streamsearch@1.1.0/node_modules/streamsearch/lib/sbmh.js -var require_sbmh = __commonJS({ - "../../node_modules/.pnpm/streamsearch@1.1.0/node_modules/streamsearch/lib/sbmh.js"(exports, module2) { - "use strict"; - function memcmp(buf1, pos1, buf2, pos2, num) { - for (let i = 0; i < num; ++i) { - if (buf1[pos1 + i] !== buf2[pos2 + i]) - return false; - } - return true; - } - __name(memcmp, "memcmp"); - var SBMH = class { - constructor(needle, cb) { - if (typeof cb !== "function") - throw new Error("Missing match callback"); - if (typeof needle === "string") - needle = Buffer.from(needle); - else if (!Buffer.isBuffer(needle)) - throw new Error(`Expected Buffer for needle, got ${typeof needle}`); - const needleLen = needle.length; - this.maxMatches = Infinity; - this.matches = 0; - this._cb = cb; - this._lookbehindSize = 0; - this._needle = needle; - this._bufPos = 0; - this._lookbehind = Buffer.allocUnsafe(needleLen); - this._occ = [ - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen - ]; - if (needleLen > 1) { - for (let i = 0; i < needleLen - 1; ++i) - this._occ[needle[i]] = needleLen - 1 - i; - } - } - reset() { - this.matches = 0; - this._lookbehindSize = 0; - this._bufPos = 0; - } - push(chunk, pos) { - let result; - if (!Buffer.isBuffer(chunk)) - chunk = Buffer.from(chunk, "latin1"); - const chunkLen = chunk.length; - this._bufPos = pos || 0; - while (result !== chunkLen && this.matches < this.maxMatches) - result = feed(this, chunk); - return result; - } - destroy() { - const lbSize = this._lookbehindSize; - if (lbSize) - this._cb(false, this._lookbehind, 0, lbSize, false); - this.reset(); - } - }; - __name(SBMH, "SBMH"); - function feed(self2, data) { - const len = data.length; - const needle = self2._needle; - const needleLen = needle.length; - let pos = -self2._lookbehindSize; - const lastNeedleCharPos = needleLen - 1; - const lastNeedleChar = needle[lastNeedleCharPos]; - const end = len - needleLen; - const occ = self2._occ; - const lookbehind = self2._lookbehind; - if (pos < 0) { - while (pos < 0 && pos <= end) { - const nextPos = pos + lastNeedleCharPos; - const ch = nextPos < 0 ? lookbehind[self2._lookbehindSize + nextPos] : data[nextPos]; - if (ch === lastNeedleChar && matchNeedle(self2, data, pos, lastNeedleCharPos)) { - self2._lookbehindSize = 0; - ++self2.matches; - if (pos > -self2._lookbehindSize) - self2._cb(true, lookbehind, 0, self2._lookbehindSize + pos, false); - else - self2._cb(true, void 0, 0, 0, true); - return self2._bufPos = pos + needleLen; - } - pos += occ[ch]; - } - while (pos < 0 && !matchNeedle(self2, data, pos, len - pos)) - ++pos; - if (pos < 0) { - const bytesToCutOff = self2._lookbehindSize + pos; - if (bytesToCutOff > 0) { - self2._cb(false, lookbehind, 0, bytesToCutOff, false); - } - self2._lookbehindSize -= bytesToCutOff; - lookbehind.copy(lookbehind, 0, bytesToCutOff, self2._lookbehindSize); - lookbehind.set(data, self2._lookbehindSize); - self2._lookbehindSize += len; - self2._bufPos = len; - return len; - } - self2._cb(false, lookbehind, 0, self2._lookbehindSize, false); - self2._lookbehindSize = 0; - } - pos += self2._bufPos; - const firstNeedleChar = needle[0]; - while (pos <= end) { - const ch = data[pos + lastNeedleCharPos]; - if (ch === lastNeedleChar && data[pos] === firstNeedleChar && memcmp(needle, 0, data, pos, lastNeedleCharPos)) { - ++self2.matches; - if (pos > 0) - self2._cb(true, data, self2._bufPos, pos, true); - else - self2._cb(true, void 0, 0, 0, true); - return self2._bufPos = pos + needleLen; - } - pos += occ[ch]; - } - while (pos < len) { - if (data[pos] !== firstNeedleChar || !memcmp(data, pos, needle, 0, len - pos)) { - ++pos; - continue; - } - data.copy(lookbehind, 0, pos, len); - self2._lookbehindSize = len - pos; - break; - } - if (pos > 0) - self2._cb(false, data, self2._bufPos, pos < len ? pos : len, true); - self2._bufPos = len; - return len; - } - __name(feed, "feed"); - function matchNeedle(self2, data, pos, len) { - const lb = self2._lookbehind; - const lbSize = self2._lookbehindSize; - const needle = self2._needle; - for (let i = 0; i < len; ++i, ++pos) { - const ch = pos < 0 ? lb[lbSize + pos] : data[pos]; - if (ch !== needle[i]) - return false; - } - return true; - } - __name(matchNeedle, "matchNeedle"); - module2.exports = SBMH; - } -}); - -// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/multipart.js -var require_multipart = __commonJS({ - "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/multipart.js"(exports, module2) { - "use strict"; - var { Readable, Writable } = require("stream"); - var StreamSearch = require_sbmh(); - var { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition - } = require_utils(); - var BUF_CRLF = Buffer.from("\r\n"); - var BUF_CR = Buffer.from("\r"); - var BUF_DASH = Buffer.from("-"); - function noop() { - } - __name(noop, "noop"); - var MAX_HEADER_PAIRS = 2e3; - var MAX_HEADER_SIZE = 16 * 1024; - var HPARSER_NAME = 0; - var HPARSER_PRE_OWS = 1; - var HPARSER_VALUE = 2; - var HeaderParser = class { - constructor(cb) { - this.header = /* @__PURE__ */ Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - this.crlf = 0; - this.cb = cb; - } - reset() { - this.header = /* @__PURE__ */ Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - this.crlf = 0; - } - push(chunk, pos, end) { - let start = pos; - while (pos < end) { - switch (this.state) { - case HPARSER_NAME: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (TOKEN[code] !== 1) { - if (code !== 58) - return -1; - this.name += chunk.latin1Slice(start, pos); - if (this.name.length === 0) - return -1; - ++pos; - done = true; - this.state = HPARSER_PRE_OWS; - break; - } - } - if (!done) { - this.name += chunk.latin1Slice(start, pos); - break; - } - } - case HPARSER_PRE_OWS: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code !== 32 && code !== 9) { - start = pos; - done = true; - this.state = HPARSER_VALUE; - break; - } - } - if (!done) - break; - } - case HPARSER_VALUE: - switch (this.crlf) { - case 0: - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (FIELD_VCHAR[code] !== 1) { - if (code !== 13) - return -1; - ++this.crlf; - break; - } - } - this.value += chunk.latin1Slice(start, pos++); - break; - case 1: - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10) - return -1; - ++this.crlf; - break; - case 2: { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code === 32 || code === 9) { - start = pos; - this.crlf = 0; - } else { - if (++this.pairCount < MAX_HEADER_PAIRS) { - this.name = this.name.toLowerCase(); - if (this.header[this.name] === void 0) - this.header[this.name] = [this.value]; - else - this.header[this.name].push(this.value); - } - if (code === 13) { - ++this.crlf; - ++pos; - } else { - start = pos; - this.crlf = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - } - } - break; - } - case 3: { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10) - return -1; - const header = this.header; - this.reset(); - this.cb(header); - return pos; - } - } - break; - } - } - return pos; - } - }; - __name(HeaderParser, "HeaderParser"); - var FileStream = class extends Readable { - constructor(opts, owner) { - super(opts); - this.truncated = false; - this._readcb = null; - this.once("end", () => { - this._read(); - if (--owner._fileEndsLeft === 0 && owner._finalcb) { - const cb = owner._finalcb; - owner._finalcb = null; - process.nextTick(cb); - } - }); - } - _read(n2) { - const cb = this._readcb; - if (cb) { - this._readcb = null; - cb(); - } - } - }; - __name(FileStream, "FileStream"); - var ignoreData = { - push: (chunk, pos) => { - }, - destroy: () => { - } - }; - function callAndUnsetCb(self2, err) { - const cb = self2._writecb; - self2._writecb = null; - if (err) - self2.destroy(err); - else if (cb) - cb(); - } - __name(callAndUnsetCb, "callAndUnsetCb"); - function nullDecoder(val, hint) { - return val; - } - __name(nullDecoder, "nullDecoder"); - var Multipart = class extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 - }; - super(streamOpts); - if (!cfg.conType.params || typeof cfg.conType.params.boundary !== "string") - throw new Error("Multipart: Boundary not found"); - const boundary = cfg.conType.params.boundary; - const paramDecoder = typeof cfg.defParamCharset === "string" && cfg.defParamCharset ? getDecoder(cfg.defParamCharset) : nullDecoder; - const defCharset = cfg.defCharset || "utf8"; - const preservePath = cfg.preservePath; - const fileOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.fileHwm === "number" ? cfg.fileHwm : void 0 - }; - const limits = cfg.limits; - const fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; - const fileSizeLimit = limits && typeof limits.fileSize === "number" ? limits.fileSize : Infinity; - const filesLimit = limits && typeof limits.files === "number" ? limits.files : Infinity; - const fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; - const partsLimit = limits && typeof limits.parts === "number" ? limits.parts : Infinity; - let parts = -1; - let fields = 0; - let files = 0; - let skipPart = false; - this._fileEndsLeft = 0; - this._fileStream = void 0; - this._complete = false; - let fileSize = 0; - let field; - let fieldSize = 0; - let partCharset; - let partEncoding; - let partType; - let partName; - let partTruncated = false; - let hitFilesLimit = false; - let hitFieldsLimit = false; - this._hparser = null; - const hparser = new HeaderParser((header) => { - this._hparser = null; - skipPart = false; - partType = "text/plain"; - partCharset = defCharset; - partEncoding = "7bit"; - partName = void 0; - partTruncated = false; - let filename; - if (!header["content-disposition"]) { - skipPart = true; - return; - } - const disp = parseDisposition( - header["content-disposition"][0], - paramDecoder - ); - if (!disp || disp.type !== "form-data") { - skipPart = true; - return; - } - if (disp.params) { - if (disp.params.name) - partName = disp.params.name; - if (disp.params["filename*"]) - filename = disp.params["filename*"]; - else if (disp.params.filename) - filename = disp.params.filename; - if (filename !== void 0 && !preservePath) - filename = basename(filename); - } - if (header["content-type"]) { - const conType = parseContentType(header["content-type"][0]); - if (conType) { - partType = `${conType.type}/${conType.subtype}`; - if (conType.params && typeof conType.params.charset === "string") - partCharset = conType.params.charset.toLowerCase(); - } - } - if (header["content-transfer-encoding"]) - partEncoding = header["content-transfer-encoding"][0].toLowerCase(); - if (partType === "application/octet-stream" || filename !== void 0) { - if (files === filesLimit) { - if (!hitFilesLimit) { - hitFilesLimit = true; - this.emit("filesLimit"); - } - skipPart = true; - return; - } - ++files; - if (this.listenerCount("file") === 0) { - skipPart = true; - return; - } - fileSize = 0; - this._fileStream = new FileStream(fileOpts, this); - ++this._fileEndsLeft; - this.emit( - "file", - partName, - this._fileStream, - { - filename, - encoding: partEncoding, - mimeType: partType - } - ); - } else { - if (fields === fieldsLimit) { - if (!hitFieldsLimit) { - hitFieldsLimit = true; - this.emit("fieldsLimit"); - } - skipPart = true; - return; - } - ++fields; - if (this.listenerCount("field") === 0) { - skipPart = true; - return; - } - field = []; - fieldSize = 0; - } - }); - let matchPostBoundary = 0; - const ssCb = /* @__PURE__ */ __name((isMatch, data, start, end, isDataSafe) => { - retrydata: - while (data) { - if (this._hparser !== null) { - const ret = this._hparser.push(data, start, end); - if (ret === -1) { - this._hparser = null; - hparser.reset(); - this.emit("error", new Error("Malformed part header")); - break; - } - start = ret; - } - if (start === end) - break; - if (matchPostBoundary !== 0) { - if (matchPostBoundary === 1) { - switch (data[start]) { - case 45: - matchPostBoundary = 2; - ++start; - break; - case 13: - matchPostBoundary = 3; - ++start; - break; - default: - matchPostBoundary = 0; - } - if (start === end) - return; - } - if (matchPostBoundary === 2) { - matchPostBoundary = 0; - if (data[start] === 45) { - this._complete = true; - this._bparser = ignoreData; - return; - } - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_DASH, 0, 1, false); - this._writecb = writecb; - } else if (matchPostBoundary === 3) { - matchPostBoundary = 0; - if (data[start] === 10) { - ++start; - if (parts >= partsLimit) - break; - this._hparser = hparser; - if (start === end) - break; - continue retrydata; - } else { - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_CR, 0, 1, false); - this._writecb = writecb; - } - } - } - if (!skipPart) { - if (this._fileStream) { - let chunk; - const actualLen = Math.min(end - start, fileSizeLimit - fileSize); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - fileSize += chunk.length; - if (fileSize === fileSizeLimit) { - if (chunk.length > 0) - this._fileStream.push(chunk); - this._fileStream.emit("limit"); - this._fileStream.truncated = true; - skipPart = true; - } else if (!this._fileStream.push(chunk)) { - if (this._writecb) - this._fileStream._readcb = this._writecb; - this._writecb = null; - } - } else if (field !== void 0) { - let chunk; - const actualLen = Math.min( - end - start, - fieldSizeLimit - fieldSize - ); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - fieldSize += actualLen; - field.push(chunk); - if (fieldSize === fieldSizeLimit) { - skipPart = true; - partTruncated = true; - } - } - } - break; - } - if (isMatch) { - matchPostBoundary = 1; - if (this._fileStream) { - this._fileStream.push(null); - this._fileStream = null; - } else if (field !== void 0) { - let data2; - switch (field.length) { - case 0: - data2 = ""; - break; - case 1: - data2 = convertToUTF8(field[0], partCharset, 0); - break; - default: - data2 = convertToUTF8( - Buffer.concat(field, fieldSize), - partCharset, - 0 - ); - } - field = void 0; - fieldSize = 0; - this.emit( - "field", - partName, - data2, - { - nameTruncated: false, - valueTruncated: partTruncated, - encoding: partEncoding, - mimeType: partType - } - ); - } - if (++parts === partsLimit) - this.emit("partsLimit"); - } - }, "ssCb"); - this._bparser = new StreamSearch(`\r ---${boundary}`, ssCb); - this._writecb = null; - this._finalcb = null; - this.write(BUF_CRLF); - } - static detect(conType) { - return conType.type === "multipart" && conType.subtype === "form-data"; - } - _write(chunk, enc, cb) { - this._writecb = cb; - this._bparser.push(chunk, 0); - if (this._writecb) - callAndUnsetCb(this); - } - _destroy(err, cb) { - this._hparser = null; - this._bparser = ignoreData; - if (!err) - err = checkEndState(this); - const fileStream = this._fileStream; - if (fileStream) { - this._fileStream = null; - fileStream.destroy(err); - } - cb(err); - } - _final(cb) { - this._bparser.destroy(); - if (!this._complete) - return cb(new Error("Unexpected end of form")); - if (this._fileEndsLeft) - this._finalcb = finalcb.bind(null, this, cb); - else - finalcb(this, cb); - } - }; - __name(Multipart, "Multipart"); - function finalcb(self2, cb, err) { - if (err) - return cb(err); - err = checkEndState(self2); - cb(err); - } - __name(finalcb, "finalcb"); - function checkEndState(self2) { - if (self2._hparser) - return new Error("Malformed part header"); - const fileStream = self2._fileStream; - if (fileStream) { - self2._fileStream = null; - fileStream.destroy(new Error("Unexpected end of file")); - } - if (!self2._complete) - return new Error("Unexpected end of form"); - } - __name(checkEndState, "checkEndState"); - var TOKEN = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var FIELD_VCHAR = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ]; - module2.exports = Multipart; - } -}); - -// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/urlencoded.js -var require_urlencoded = __commonJS({ - "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/urlencoded.js"(exports, module2) { - "use strict"; - var { Writable } = require("stream"); - var { getDecoder } = require_utils(); - var URLEncoded = class extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 - }; - super(streamOpts); - let charset = cfg.defCharset || "utf8"; - if (cfg.conType.params && typeof cfg.conType.params.charset === "string") - charset = cfg.conType.params.charset; - this.charset = charset; - const limits = cfg.limits; - this.fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; - this.fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; - this.fieldNameSizeLimit = limits && typeof limits.fieldNameSize === "number" ? limits.fieldNameSize : 100; - this._inKey = true; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - this._fields = 0; - this._key = ""; - this._val = ""; - this._byte = -2; - this._lastPos = 0; - this._encode = 0; - this._decoder = getDecoder(charset); - } - static detect(conType) { - return conType.type === "application" && conType.subtype === "x-www-form-urlencoded"; - } - _write(chunk, enc, cb) { - if (this._fields >= this.fieldsLimit) - return cb(); - let i = 0; - const len = chunk.length; - this._lastPos = 0; - if (this._byte !== -2) { - i = readPctEnc(this, chunk, i, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - if (this._inKey) - ++this._bytesKey; - else - ++this._bytesVal; - } - main: - while (i < len) { - if (this._inKey) { - i = skipKeyBytes(this, chunk, i, len); - while (i < len) { - switch (chunk[i]) { - case 61: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - this._inKey = false; - continue main; - case 38: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - if (this._bytesKey > 0) { - this.emit( - "field", - this._key, - "", - { - nameTruncated: this._keyTrunc, - valueTruncated: false, - encoding: this.charset, - mimeType: "text/plain" - } - ); - } - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit("fieldsLimit"); - return cb(); - } - continue; - case 43: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._key += " "; - this._lastPos = i + 1; - break; - case 37: - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - } else { - i = skipValBytes(this, chunk, i, len); - while (i < len) { - switch (chunk[i]) { - case 38: - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._inKey = true; - this._val = this._decoder(this._val, this._encode); - this._encode = 0; - if (this._bytesKey > 0 || this._bytesVal > 0) { - this.emit( - "field", - this._key, - this._val, - { - nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: "text/plain" - } - ); - } - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit("fieldsLimit"); - return cb(); - } - continue main; - case 43: - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._val += " "; - this._lastPos = i + 1; - break; - case 37: - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - } - } - cb(); - } - _final(cb) { - if (this._byte !== -2) - return cb(new Error("Malformed urlencoded form")); - if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { - if (this._inKey) - this._key = this._decoder(this._key, this._encode); - else - this._val = this._decoder(this._val, this._encode); - this.emit( - "field", - this._key, - this._val, - { - nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: "text/plain" - } - ); - } - cb(); - } - }; - __name(URLEncoded, "URLEncoded"); - function readPctEnc(self2, chunk, pos, len) { - if (pos >= len) - return len; - if (self2._byte === -1) { - const hexUpper = HEX_VALUES[chunk[pos++]]; - if (hexUpper === -1) - return -1; - if (hexUpper >= 8) - self2._encode = 2; - if (pos < len) { - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - if (self2._inKey) - self2._key += String.fromCharCode((hexUpper << 4) + hexLower); - else - self2._val += String.fromCharCode((hexUpper << 4) + hexLower); - self2._byte = -2; - self2._lastPos = pos; - } else { - self2._byte = hexUpper; - } - } else { - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - if (self2._inKey) - self2._key += String.fromCharCode((self2._byte << 4) + hexLower); - else - self2._val += String.fromCharCode((self2._byte << 4) + hexLower); - self2._byte = -2; - self2._lastPos = pos; - } - return pos; - } - __name(readPctEnc, "readPctEnc"); - function skipKeyBytes(self2, chunk, pos, len) { - if (self2._bytesKey > self2.fieldNameSizeLimit) { - if (!self2._keyTrunc) { - if (self2._lastPos < pos) - self2._key += chunk.latin1Slice(self2._lastPos, pos - 1); - } - self2._keyTrunc = true; - for (; pos < len; ++pos) { - const code = chunk[pos]; - if (code === 61 || code === 38) - break; - ++self2._bytesKey; - } - self2._lastPos = pos; - } - return pos; - } - __name(skipKeyBytes, "skipKeyBytes"); - function skipValBytes(self2, chunk, pos, len) { - if (self2._bytesVal > self2.fieldSizeLimit) { - if (!self2._valTrunc) { - if (self2._lastPos < pos) - self2._val += chunk.latin1Slice(self2._lastPos, pos - 1); - } - self2._valTrunc = true; - for (; pos < len; ++pos) { - if (chunk[pos] === 38) - break; - ++self2._bytesVal; - } - self2._lastPos = pos; - } - return pos; - } - __name(skipValBytes, "skipValBytes"); - var HEX_VALUES = [ - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ]; - module2.exports = URLEncoded; - } -}); - -// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js -var require_lib = __commonJS({ - "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js"(exports, module2) { - "use strict"; - var { parseContentType } = require_utils(); - function getInstance(cfg) { - const headers = cfg.headers; - const conType = parseContentType(headers["content-type"]); - if (!conType) - throw new Error("Malformed content type"); - for (const type of TYPES) { - const matched = type.detect(conType); - if (!matched) - continue; - const instanceCfg = { - limits: cfg.limits, - headers, - conType, - highWaterMark: void 0, - fileHwm: void 0, - defCharset: void 0, - defParamCharset: void 0, - preservePath: false - }; - if (cfg.highWaterMark) - instanceCfg.highWaterMark = cfg.highWaterMark; - if (cfg.fileHwm) - instanceCfg.fileHwm = cfg.fileHwm; - instanceCfg.defCharset = cfg.defCharset; - instanceCfg.defParamCharset = cfg.defParamCharset; - instanceCfg.preservePath = cfg.preservePath; - return new type(instanceCfg); - } - throw new Error(`Unsupported content type: ${headers["content-type"]}`); - } - __name(getInstance, "getInstance"); - var TYPES = [ - require_multipart(), - require_urlencoded() - ].filter(function(typemod) { - return typeof typemod.detect === "function"; - }); - module2.exports = (cfg) => { - if (typeof cfg !== "object" || cfg === null) - cfg = {}; - if (typeof cfg.headers !== "object" || cfg.headers === null || typeof cfg.headers["content-type"] !== "string") { - throw new Error("Missing Content-Type"); - } - return getInstance(cfg); - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/constants.js -var require_constants = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/constants.js"(exports, module2) { - "use strict"; - var corsSafeListedMethods = ["GET", "HEAD", "POST"]; - var nullBodyStatus = [101, 204, 205, 304]; - var redirectStatus = [301, 302, 303, 307, 308]; - var referrerPolicy = [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]; - var requestRedirect = ["follow", "manual", "error"]; - var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"]; - var requestMode = ["navigate", "same-origin", "no-cors", "cors"]; - var requestCredentials = ["omit", "same-origin", "include"]; - var requestCache = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ]; - var requestBodyHeader = [ - "content-encoding", - "content-language", - "content-location", - "content-type" - ]; - var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"]; - var subresource = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ]; - var _a3; - var DOMException = (_a3 = globalThis.DOMException) != null ? _a3 : (() => { - try { - atob("~"); - } catch (err) { - return Object.getPrototypeOf(err).constructor; - } - })(); - module2.exports = { - DOMException, - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/util.js -var require_util3 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/util.js"(exports, module2) { - "use strict"; - var { redirectStatus } = require_constants(); - var { performance: performance3 } = require("perf_hooks"); - var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util2(); - var assert = require("assert"); - var { isUint8Array } = require("util/types"); - var crypto2; - try { - crypto2 = require("crypto"); - } catch (e2) { - } - var badPorts = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6697", - "10080" - ]; - function responseURL(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); - } - __name(responseURL, "responseURL"); - function responseLocationURL(response, requestFragment) { - if (!redirectStatus.includes(response.status)) { - return null; - } - let location = response.headersList.get("location"); - location = location ? new URL(location, responseURL(response)) : null; - if (location && !location.hash) { - location.hash = requestFragment; - } - return location; - } - __name(responseLocationURL, "responseLocationURL"); - function requestCurrentURL(request2) { - return request2.urlList[request2.urlList.length - 1]; - } - __name(requestCurrentURL, "requestCurrentURL"); - function requestBadPort(request2) { - const url = requestCurrentURL(request2); - if (/^https?:/.test(url.protocol) && badPorts.includes(url.port)) { - return "blocked"; - } - return "allowed"; - } - __name(requestBadPort, "requestBadPort"); - function isErrorLike(object) { - var _a3, _b2; - return object instanceof Error || (((_a3 = object == null ? void 0 : object.constructor) == null ? void 0 : _a3.name) === "Error" || ((_b2 = object == null ? void 0 : object.constructor) == null ? void 0 : _b2.name) === "DOMException"); - } - __name(isErrorLike, "isErrorLike"); - function isValidReasonPhrase(statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i); - if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) { - return false; - } - } - return true; - } - __name(isValidReasonPhrase, "isValidReasonPhrase"); - function isTokenChar(c) { - return !(c >= 127 || c <= 32 || c === "(" || c === ")" || c === "<" || c === ">" || c === "@" || c === "," || c === ";" || c === ":" || c === "\\" || c === '"' || c === "/" || c === "[" || c === "]" || c === "?" || c === "=" || c === "{" || c === "}"); - } - __name(isTokenChar, "isTokenChar"); - function isValidHTTPToken(characters) { - if (!characters || typeof characters !== "string") { - return false; - } - for (let i = 0; i < characters.length; ++i) { - const c = characters.charCodeAt(i); - if (c > 127 || !isTokenChar(c)) { - return false; - } - } - return true; - } - __name(isValidHTTPToken, "isValidHTTPToken"); - function isValidHeaderName(potentialValue) { - if (potentialValue.length === 0) { - return false; - } - for (const char of potentialValue) { - if (!isValidHTTPToken(char)) { - return false; - } - } - return true; - } - __name(isValidHeaderName, "isValidHeaderName"); - function isValidHeaderValue(potentialValue) { - if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) { - return false; - } - if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) { - return false; - } - return true; - } - __name(isValidHeaderValue, "isValidHeaderValue"); - function setRequestReferrerPolicyOnRedirect(request2, actualResponse) { - const policy = ""; - if (policy !== "") { - request2.referrerPolicy = policy; - } - } - __name(setRequestReferrerPolicyOnRedirect, "setRequestReferrerPolicyOnRedirect"); - function crossOriginResourcePolicyCheck() { - return "allowed"; - } - __name(crossOriginResourcePolicyCheck, "crossOriginResourcePolicyCheck"); - function corsCheck() { - return "success"; - } - __name(corsCheck, "corsCheck"); - function TAOCheck() { - return "success"; - } - __name(TAOCheck, "TAOCheck"); - function appendFetchMetadata(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header); - } - __name(appendFetchMetadata, "appendFetchMetadata"); - function appendRequestOriginHeader(request2) { - let serializedOrigin = request2.origin; - if (request2.responseTainting === "cors" || request2.mode === "websocket") { - if (serializedOrigin) { - request2.headersList.append("Origin", serializedOrigin); - } - } else if (request2.method !== "GET" && request2.method !== "HEAD") { - switch (request2.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (/^https:/.test(request2.origin) && !/^https:/.test(requestCurrentURL(request2))) { - serializedOrigin = null; - } - break; - case "same-origin": - if (!sameOrigin(request2, requestCurrentURL(request2))) { - serializedOrigin = null; - } - break; - default: - } - if (serializedOrigin) { - request2.headersList.append("Origin", serializedOrigin); - } - } - } - __name(appendRequestOriginHeader, "appendRequestOriginHeader"); - function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { - return performance3.now(); - } - __name(coarsenedSharedCurrentTime, "coarsenedSharedCurrentTime"); - function createOpaqueTimingInfo(timingInfo) { - var _a3, _b2; - return { - startTime: (_a3 = timingInfo.startTime) != null ? _a3 : 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: (_b2 = timingInfo.startTime) != null ? _b2 : 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - __name(createOpaqueTimingInfo, "createOpaqueTimingInfo"); - function makePolicyContainer() { - return {}; - } - __name(makePolicyContainer, "makePolicyContainer"); - function clonePolicyContainer() { - return {}; - } - __name(clonePolicyContainer, "clonePolicyContainer"); - function determineRequestsReferrer(request2) { - var _a3, _b2, _c, _d, _e, _f, _g; - const policy = request2.referrerPolicy; - if (policy == null || policy === "" || policy === "no-referrer") { - return "no-referrer"; - } - const environment = request2.client; - let referrerSource = null; - if (request2.referrer === "client") { - if (((_c = (_b2 = (_a3 = request2.client) == null ? void 0 : _a3.globalObject) == null ? void 0 : _b2.constructor) == null ? void 0 : _c.name) === "Window") { - const origin = (_f = (_d = environment.globalObject.self) == null ? void 0 : _d.origin) != null ? _f : (_e = environment.globalObject.location) == null ? void 0 : _e.origin; - if (origin == null || origin === "null") - return "no-referrer"; - referrerSource = new URL(environment.globalObject.location.href); - } else { - if (((_g = environment == null ? void 0 : environment.globalObject) == null ? void 0 : _g.location) == null) { - return "no-referrer"; - } - referrerSource = new URL(environment.globalObject.location.href); - } - } else if (request2.referrer instanceof URL) { - referrerSource = request2.referrer; - } else { - return "no-referrer"; - } - const urlProtocol = referrerSource.protocol; - if (urlProtocol === "about:" || urlProtocol === "data:" || urlProtocol === "blob:") { - return "no-referrer"; - } - let temp; - let referrerOrigin; - const referrerUrl = (temp = stripURLForReferrer(referrerSource)).length > 4096 ? referrerOrigin = stripURLForReferrer(referrerSource, true) : temp; - const areSameOrigin = sameOrigin(request2, referrerUrl); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerUrl) && !isURLPotentiallyTrustworthy(request2.url); - switch (policy) { - case "origin": - return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); - case "unsafe-url": - return referrerUrl; - case "same-origin": - return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": - return areSameOrigin ? referrerUrl : referrerOrigin; - case "strict-origin-when-cross-origin": - if (areSameOrigin) - return referrerOrigin; - case "strict-origin": - case "no-referrer-when-downgrade": - default: - return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; - } - function stripURLForReferrer(url, originOnly = false) { - const urlObject = new URL(url.href); - urlObject.username = ""; - urlObject.password = ""; - urlObject.hash = ""; - return originOnly ? urlObject.origin : urlObject.href; - } - __name(stripURLForReferrer, "stripURLForReferrer"); - } - __name(determineRequestsReferrer, "determineRequestsReferrer"); - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { - return false; - } - if (url.href === "about:blank" || url.href === "about:srcdoc") { - return true; - } - if (url.protocol === "data:") - return true; - if (url.protocol === "file:") - return true; - return isOriginPotentiallyTrustworthy(url.origin); - function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") - return false; - const originAsURL = new URL(origin); - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { - return true; - } - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { - return true; - } - return false; - } - __name(isOriginPotentiallyTrustworthy, "isOriginPotentiallyTrustworthy"); - } - __name(isURLPotentiallyTrustworthy, "isURLPotentiallyTrustworthy"); - function bytesMatch(bytes, metadataList) { - if (crypto2 === void 0) { - return true; - } - const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata === "no metadata") { - return true; - } - if (parsedMetadata.length === 0) { - return true; - } - const metadata = parsedMetadata.sort((c, d2) => d2.algo.localeCompare(c.algo)); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - const actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue === expectedValue) { - return true; - } - } - return false; - } - __name(bytesMatch, "bytesMatch"); - var parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={1,2}))( +[\x21-\x7e]?)?/i; - function parseMetadata(metadata) { - const result = []; - let empty2 = true; - const supportedHashes = crypto2.getHashes(); - for (const token of metadata.split(" ")) { - empty2 = false; - const parsedToken = parseHashWithOptions.exec(token); - if (parsedToken === null || parsedToken.groups === void 0) { - continue; - } - const algorithm = parsedToken.groups.algo; - if (supportedHashes.includes(algorithm.toLowerCase())) { - result.push(parsedToken.groups); - } - } - if (empty2 === true) { - return "no metadata"; - } - return result; - } - __name(parseMetadata, "parseMetadata"); - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { - } - __name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL"); - function sameOrigin(A2, B) { - if (A2.protocol === B.protocol && A2.hostname === B.hostname && A2.port === B.port) { - return true; - } - return false; - } - __name(sameOrigin, "sameOrigin"); - function createDeferredPromise() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { promise, resolve: res, reject: rej }; - } - __name(createDeferredPromise, "createDeferredPromise"); - function isAborted(fetchParams) { - return fetchParams.controller.state === "aborted"; - } - __name(isAborted, "isAborted"); - function isCancelled(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; - } - __name(isCancelled, "isCancelled"); - function normalizeMethod(method) { - return /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(method) ? method.toUpperCase() : method; - } - __name(normalizeMethod, "normalizeMethod"); - function serializeJavascriptValueToJSONString(value) { - const result = JSON.stringify(value); - if (result === void 0) { - throw new TypeError("Value is not JSON serializable"); - } - assert(typeof result === "string"); - return result; - } - __name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString"); - var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - function makeIterator(iterator, name) { - const i = { - next() { - if (Object.getPrototypeOf(this) !== i) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ); - } - return iterator.next(); - }, - [Symbol.toStringTag]: `${name} Iterator` - }; - Object.setPrototypeOf(i, esIteratorPrototype); - return Object.setPrototypeOf({}, i); - } - __name(makeIterator, "makeIterator"); - async function fullyReadBody(body, processBody, processBodyError) { - try { - const chunks = []; - let length = 0; - const reader = body.stream.getReader(); - while (true) { - const { done, value } = await reader.read(); - if (done === true) { - break; - } - assert(isUint8Array(value)); - chunks.push(value); - length += value.byteLength; - } - const fulfilledSteps = /* @__PURE__ */ __name((bytes) => queueMicrotask(() => { - processBody(bytes); - }), "fulfilledSteps"); - fulfilledSteps(Buffer.concat(chunks, length)); - } catch (err) { - queueMicrotask(() => processBodyError(err)); - } - } - __name(fullyReadBody, "fullyReadBody"); - var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); - module2.exports = { - isAborted, - isCancelled, - createDeferredPromise, - ReadableStreamFrom, - toUSVString, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - makeIterator, - isValidHeaderName, - isValidHeaderValue, - hasOwn, - isErrorLike, - fullyReadBody, - bytesMatch - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/symbols.js -var require_symbols2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/symbols.js"(exports, module2) { - "use strict"; - module2.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kGuard: Symbol("guard"), - kRealm: Symbol("realm") - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/webidl.js -var require_webidl = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/webidl.js"(exports, module2) { - "use strict"; - var { types } = require("util"); - var { hasOwn, toUSVString } = require_util3(); - var webidl = {}; - webidl.converters = {}; - webidl.util = {}; - webidl.errors = {}; - webidl.errors.exception = function(message) { - throw new TypeError(`${message.header}: ${message.message}`); - }; - webidl.errors.conversionFailed = function(context3) { - const plural = context3.types.length === 1 ? "" : " one of"; - const message = `${context3.argument} could not be converted to${plural}: ${context3.types.join(", ")}.`; - return webidl.errors.exception({ - header: context3.prefix, - message - }); - }; - webidl.errors.invalidArgument = function(context3) { - return webidl.errors.exception({ - header: context3.prefix, - message: `"${context3.value}" is an invalid ${context3.type}.` - }); - }; - webidl.util.Type = function(V) { - switch (typeof V) { - case "undefined": - return "Undefined"; - case "boolean": - return "Boolean"; - case "string": - return "String"; - case "symbol": - return "Symbol"; - case "number": - return "Number"; - case "bigint": - return "BigInt"; - case "function": - case "object": { - if (V === null) { - return "Null"; - } - return "Object"; - } - } - }; - webidl.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") { - lowerBound = 0; - } else { - lowerBound = Math.pow(-2, 53) + 1; - } - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (Object.is(-0, x)) { - x = 0; - } - if (opts.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - webidl.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${V} to an integer.` - }); - } - x = webidl.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) { - webidl.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - } - return x; - } - if (!Number.isNaN(x) && opts.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x); - } else { - x = Math.ceil(x); - } - return x; - } - if (Number.isNaN(x) || Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - return 0; - } - x = webidl.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength); - } - return x; - }; - webidl.util.IntegerPart = function(n2) { - const r2 = Math.floor(Math.abs(n2)); - if (n2 < 0) { - return -1 * r2; - } - return r2; - }; - webidl.sequenceConverter = function(converter) { - return (V) => { - var _a3; - if (webidl.util.Type(V) !== "Object") { - webidl.errors.exception({ - header: "Sequence", - message: `Value of type ${webidl.util.Type(V)} is not an Object.` - }); - } - const method = (_a3 = V == null ? void 0 : V[Symbol.iterator]) == null ? void 0 : _a3.call(V); - const seq = []; - if (method === void 0 || typeof method.next !== "function") { - webidl.errors.exception({ - header: "Sequence", - message: "Object is not an iterator." - }); - } - while (true) { - const { done, value } = method.next(); - if (done) { - break; - } - seq.push(converter(value)); - } - return seq; - }; - }; - webidl.recordConverter = function(keyConverter, valueConverter) { - return (V) => { - const record = {}; - const type = webidl.util.Type(V); - if (type === "Undefined" || type === "Null") { - return record; - } - if (type !== "Object") { - webidl.errors.exception({ - header: "Record", - message: `Expected ${V} to be an Object type.` - }); - } - for (let [key, value] of Object.entries(V)) { - key = keyConverter(key); - value = valueConverter(value); - record[key] = value; - } - return record; - }; - }; - webidl.interfaceConverter = function(i) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i)) { - webidl.errors.exception({ - header: i.name, - message: `Expected ${V} to be an instance of ${i.name}.` - }); - } - return V; - }; - }; - webidl.dictionaryConverter = function(converters) { - return (dictionary) => { - const type = webidl.util.Type(dictionary); - const dict = {}; - if (type !== "Null" && type !== "Undefined" && type !== "Object") { - webidl.errors.exception({ - header: "Dictionary", - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - } - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (!hasOwn(dictionary, key)) { - webidl.errors.exception({ - header: "Dictionary", - message: `Missing required key "${key}".` - }); - } - } - let value = dictionary[key]; - const hasDefault = hasOwn(options, "defaultValue"); - if (hasDefault && value !== null) { - value = value != null ? value : defaultValue; - } - if (required || hasDefault || value !== void 0) { - value = converter(value); - if (options.allowedValues && !options.allowedValues.includes(value)) { - webidl.errors.exception({ - header: "Dictionary", - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - } - dict[key] = value; - } - } - return dict; - }; - }; - webidl.nullableConverter = function(converter) { - return (V) => { - if (V === null) { - return V; - } - return converter(V); - }; - }; - webidl.converters.DOMString = function(V, opts = {}) { - if (V === null && opts.legacyNullToEmptyString) { - return ""; - } - if (typeof V === "symbol") { - throw new TypeError("Could not convert argument of type symbol to string."); - } - return String(V); - }; - webidl.converters.ByteString = function(V) { - const x = webidl.converters.DOMString(V); - for (let index = 0; index < x.length; index++) { - const charCode = x.charCodeAt(index); - if (charCode > 255) { - throw new TypeError( - `Cannot convert argument to a ByteString because the character atindex ${index} has a value of ${charCode} which is greater than 255.` - ); - } - } - return x; - }; - webidl.converters.USVString = toUSVString; - webidl.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl.converters.any = function(V) { - return V; - }; - webidl.converters["long long"] = function(V, opts) { - const x = webidl.util.ConvertToInt(V, 64, "signed", opts); - return x; - }; - webidl.converters["unsigned short"] = function(V) { - const x = webidl.util.ConvertToInt(V, 16, "unsigned"); - return x; - }; - webidl.converters.ArrayBuffer = function(V, opts = {}) { - if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { - webidl.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ["ArrayBuffer"] - }); - } - if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { - webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - return V; - }; - webidl.converters.TypedArray = function(V, T, opts = {}) { - if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { - webidl.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [T.name] - }); - } - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - return V; - }; - webidl.converters.DataView = function(V, opts = {}) { - if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { - webidl.errors.exception({ - header: "DataView", - message: "Object is not a DataView." - }); - } - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - return V; - }; - webidl.converters.BufferSource = function(V, opts = {}) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, opts); - } - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor); - } - if (types.isDataView(V)) { - return webidl.converters.DataView(V, opts); - } - throw new TypeError(`Could not convert ${V} to a BufferSource.`); - }; - webidl.converters["sequence"] = webidl.sequenceConverter( - webidl.converters.ByteString - ); - webidl.converters["sequence>"] = webidl.sequenceConverter( - webidl.converters["sequence"] - ); - webidl.converters["record"] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString - ); - module2.exports = { - webidl - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/file.js -var require_file = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/file.js"(exports, module2) { - "use strict"; - var { Blob } = require("buffer"); - var { types } = require("util"); - var { kState } = require_symbols2(); - var { isBlobLike } = require_util3(); - var { webidl } = require_webidl(); - var File = class extends Blob { - constructor(fileBits, fileName, options = {}) { - if (arguments.length < 2) { - throw new TypeError("2 arguments required"); - } - fileBits = webidl.converters["sequence"](fileBits); - fileName = webidl.converters.USVString(fileName); - options = webidl.converters.FilePropertyBag(options); - const n2 = fileName; - const d2 = options.lastModified; - super(processBlobParts(fileBits, options), { type: options.type }); - this[kState] = { - name: n2, - lastModified: d2 - }; - } - get name() { - if (!(this instanceof File)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].name; - } - get lastModified() { - if (!(this instanceof File)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].lastModified; - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - }; - __name(File, "File"); - var FileLike = class { - constructor(blobLike, fileName, options = {}) { - var _a3; - const n2 = fileName; - const t2 = options.type; - const d2 = (_a3 = options.lastModified) != null ? _a3 : Date.now(); - this[kState] = { - blobLike, - name: n2, - type: t2, - lastModified: d2 - }; - } - stream(...args) { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.stream(...args); - } - arrayBuffer(...args) { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.arrayBuffer(...args); - } - slice(...args) { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.slice(...args); - } - text(...args) { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.text(...args); - } - get size() { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.size; - } - get type() { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].blobLike.type; - } - get name() { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].name; - } - get lastModified() { - if (!(this instanceof FileLike)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].lastModified; - } - get [Symbol.toStringTag]() { - return "File"; - } - }; - __name(FileLike, "FileLike"); - webidl.converters.Blob = webidl.interfaceConverter(Blob); - webidl.converters.BlobPart = function(V, opts) { - if (webidl.util.Type(V) === "Object") { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }); - } - return webidl.converters.BufferSource(V, opts); - } else { - return webidl.converters.USVString(V, opts); - } - }; - webidl.converters["sequence"] = webidl.sequenceConverter( - webidl.converters.BlobPart - ); - webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ - { - key: "lastModified", - converter: webidl.converters["long long"], - get defaultValue() { - return Date.now(); - } - }, - { - key: "type", - converter: webidl.converters.DOMString, - defaultValue: "" - }, - { - key: "endings", - converter: (value) => { - value = webidl.converters.DOMString(value); - value = value.toLowerCase(); - if (value !== "native") { - value = "transparent"; - } - return value; - }, - defaultValue: "transparent" - } - ]); - function processBlobParts(parts, options) { - const bytes = []; - for (const element of parts) { - if (typeof element === "string") { - let s = element; - if (options.endings === "native") { - s = convertLineEndingsNative(s); - } - bytes.push(new TextEncoder().encode(s)); - } else if (types.isAnyArrayBuffer(element) || types.isTypedArray(element)) { - if (!element.buffer) { - bytes.push(new Uint8Array(element)); - } else { - bytes.push( - new Uint8Array(element.buffer, element.byteOffset, element.byteLength) - ); - } - } else if (isBlobLike(element)) { - bytes.push(element); - } - } - return bytes; - } - __name(processBlobParts, "processBlobParts"); - function convertLineEndingsNative(s) { - let nativeLineEnding = "\n"; - if (process.platform === "win32") { - nativeLineEnding = "\r\n"; - } - return s.replace(/\r?\n/g, nativeLineEnding); - } - __name(convertLineEndingsNative, "convertLineEndingsNative"); - function isFileLike(object) { - return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; - } - __name(isFileLike, "isFileLike"); - module2.exports = { File, FileLike, isFileLike }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/formdata.js -var require_formdata = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/formdata.js"(exports, module2) { - "use strict"; - var { isBlobLike, toUSVString, makeIterator } = require_util3(); - var { kState } = require_symbols2(); - var { File, FileLike, isFileLike } = require_file(); - var { webidl } = require_webidl(); - var { Blob } = require("buffer"); - var _FormData = class { - constructor(form) { - if (arguments.length > 0 && form != null) { - webidl.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["null"] - }); - } - this[kState] = []; - } - append(name, value, filename = void 0) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'append' on 'FormData': 2 arguments required, but only ${arguments.length} present.` - ); - } - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ); - } - name = webidl.converters.USVString(name); - value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); - filename = arguments.length === 3 ? webidl.converters.USVString(filename) : void 0; - const entry = makeEntry(name, value, filename); - this[kState].push(entry); - } - delete(name) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'delete' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.USVString(name); - const next = []; - for (const entry of this[kState]) { - if (entry.name !== name) { - next.push(entry); - } - } - this[kState] = next; - } - get(name) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'get' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.USVString(name); - const idx = this[kState].findIndex((entry) => entry.name === name); - if (idx === -1) { - return null; - } - return this[kState][idx].value; - } - getAll(name) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'getAll' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.USVString(name); - return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); - } - has(name) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'has' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.USVString(name); - return this[kState].findIndex((entry) => entry.name === name) !== -1; - } - set(name, value, filename = void 0) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'set' on 'FormData': 2 arguments required, but only ${arguments.length} present.` - ); - } - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ); - } - name = webidl.converters.USVString(name); - value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); - filename = arguments.length === 3 ? toUSVString(filename) : void 0; - const entry = makeEntry(name, value, filename); - const idx = this[kState].findIndex((entry2) => entry2.name === name); - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) - ]; - } else { - this[kState].push(entry); - } - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - entries() { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator( - makeIterable(this[kState], "entries"), - "FormData" - ); - } - keys() { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator( - makeIterable(this[kState], "keys"), - "FormData" - ); - } - values() { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator( - makeIterable(this[kState], "values"), - "FormData" - ); - } - forEach(callbackFn, thisArg = globalThis) { - if (!(this instanceof _FormData)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'forEach' on 'FormData': 1 argument required, but only ${arguments.length} present.` - ); - } - if (typeof callbackFn !== "function") { - throw new TypeError( - "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." - ); - } - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]); - } - } - }; - var FormData = _FormData; - __name(FormData, "FormData"); - __publicField(FormData, "name", "FormData"); - FormData.prototype[Symbol.iterator] = FormData.prototype.entries; - function makeEntry(name, value, filename) { - name = Buffer.from(name).toString("utf8"); - if (typeof value === "string") { - value = Buffer.from(value).toString("utf8"); - } else { - if (!isFileLike(value)) { - value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); - } - if (filename !== void 0) { - value = value instanceof File ? new File([value], filename, { type: value.type }) : new FileLike(value, filename, { type: value.type }); - } - } - return { name, value }; - } - __name(makeEntry, "makeEntry"); - function* makeIterable(entries, type) { - for (const { name, value } of entries) { - if (type === "entries") { - yield [name, value]; - } else if (type === "values") { - yield value; - } else { - yield name; - } - } - } - __name(makeIterable, "makeIterable"); - module2.exports = { FormData }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/body.js -var require_body = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/body.js"(exports, module2) { - "use strict"; - var Busboy = require_lib(); - var util2 = require_util2(); - var { ReadableStreamFrom, toUSVString, isBlobLike } = require_util3(); - var { FormData } = require_formdata(); - var { kState } = require_symbols2(); - var { webidl } = require_webidl(); - var { DOMException } = require_constants(); - var { Blob } = require("buffer"); - var { kBodyUsed } = require_symbols(); - var assert = require("assert"); - var { isErrored } = require_util2(); - var { isUint8Array, isArrayBuffer } = require("util/types"); - var { File } = require_file(); - var ReadableStream; - async function* blobGen(blob) { - yield* blob.stream(); - } - __name(blobGen, "blobGen"); - function extractBody(object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; - } - let stream2 = null; - let action = null; - let source = null; - let length = null; - let contentType = null; - if (object == null) { - } else if (object instanceof URLSearchParams) { - source = object.toString(); - contentType = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) { - source = new Uint8Array(object.slice()); - } else if (ArrayBuffer.isView(object)) { - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - } else if (util2.isFormDataLike(object)) { - const boundary = "----formdata-undici-" + Math.random(); - const prefix = `--${boundary}\r -Content-Disposition: form-data`; - const escape = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), "escape"); - const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinefeeds"); - action = /* @__PURE__ */ __name(async function* (object2) { - const enc = new TextEncoder(); - for (const [name, value] of object2) { - if (typeof value === "string") { - yield enc.encode( - prefix + `; name="${escape(normalizeLinefeeds(name))}"\r -\r -${normalizeLinefeeds(value)}\r -` - ); - } else { - yield enc.encode( - prefix + `; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r -\r -` - ); - yield* blobGen(value); - yield enc.encode("\r\n"); - } - } - yield enc.encode(`--${boundary}--`); - }, "action"); - source = object; - contentType = "multipart/form-data; boundary=" + boundary; - } else if (isBlobLike(object)) { - action = blobGen; - source = object; - length = object.size; - if (object.type) { - contentType = object.type; - } - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) { - throw new TypeError("keepalive"); - } - if (util2.isDisturbed(object) || object.locked) { - throw new TypeError( - "Response body object should not be disturbed or locked" - ); - } - stream2 = object instanceof ReadableStream ? object : ReadableStreamFrom(object); - } else { - source = toUSVString(object); - contentType = "text/plain;charset=UTF-8"; - } - if (typeof source === "string" || util2.isBuffer(source)) { - length = Buffer.byteLength(source); - } - if (action != null) { - let iterator; - stream2 = new ReadableStream({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - }); - } else { - if (!isErrored(stream2)) { - controller.enqueue(new Uint8Array(value)); - } - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - } - }); - } else if (!stream2) { - stream2 = new ReadableStream({ - async pull(controller) { - controller.enqueue( - typeof source === "string" ? new TextEncoder().encode(source) : source - ); - queueMicrotask(() => { - controller.close(); - }); - } - }); - } - const body = { stream: stream2, source, length }; - return [body, contentType]; - } - __name(extractBody, "extractBody"); - function safelyExtractBody(object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; - } - if (object instanceof ReadableStream) { - assert(!util2.isDisturbed(object), "The body has already been consumed."); - assert(!object.locked, "The stream is locked."); - } - return extractBody(object, keepalive); - } - __name(safelyExtractBody, "safelyExtractBody"); - function cloneBody(body) { - const [out1, out2] = body.stream.tee(); - body.stream = out1; - return { - stream: out2, - length: body.length, - source: body.source - }; - } - __name(cloneBody, "cloneBody"); - async function* consumeBody(body) { - if (body) { - if (isUint8Array(body)) { - yield body; - } else { - const stream2 = body.stream; - if (util2.isDisturbed(stream2)) { - throw new TypeError("The body has already been consumed."); - } - if (stream2.locked) { - throw new TypeError("The stream is locked."); - } - stream2[kBodyUsed] = true; - yield* stream2; - } - } - } - __name(consumeBody, "consumeBody"); - function throwIfAborted(state) { - if (state.aborted) { - throw new DOMException("The operation was aborted.", "AbortError"); - } - } - __name(throwIfAborted, "throwIfAborted"); - function bodyMixinMethods(instance) { - const methods = { - async blob() { - if (!(this instanceof instance)) { - throw new TypeError("Illegal invocation"); - } - throwIfAborted(this[kState]); - const chunks = []; - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError("Expected Uint8Array chunk"); - } - chunks.push(new Blob([chunk])); - } - return new Blob(chunks, { type: this.headers.get("Content-Type") || "" }); - }, - async arrayBuffer() { - if (!(this instanceof instance)) { - throw new TypeError("Illegal invocation"); - } - throwIfAborted(this[kState]); - const contentLength = this.headers.get("content-length"); - const encoded = this.headers.has("content-encoding"); - if (!encoded && contentLength) { - const buffer2 = new Uint8Array(contentLength); - let offset2 = 0; - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError("Expected Uint8Array chunk"); - } - buffer2.set(chunk, offset2); - offset2 += chunk.length; - } - return buffer2.buffer; - } - const chunks = []; - let size = 0; - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError("Expected Uint8Array chunk"); - } - chunks.push(chunk); - size += chunk.byteLength; - } - const buffer = new Uint8Array(size); - let offset = 0; - for (const chunk of chunks) { - buffer.set(chunk, offset); - offset += chunk.byteLength; - } - return buffer.buffer; - }, - async text() { - if (!(this instanceof instance)) { - throw new TypeError("Illegal invocation"); - } - throwIfAborted(this[kState]); - let result = ""; - const textDecoder = new TextDecoder(); - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError("Expected Uint8Array chunk"); - } - result += textDecoder.decode(chunk, { stream: true }); - } - result += textDecoder.decode(); - return result; - }, - async json() { - if (!(this instanceof instance)) { - throw new TypeError("Illegal invocation"); - } - throwIfAborted(this[kState]); - return JSON.parse(await this.text()); - }, - async formData() { - if (!(this instanceof instance)) { - throw new TypeError("Illegal invocation"); - } - throwIfAborted(this[kState]); - const contentType = this.headers.get("Content-Type"); - if (/multipart\/form-data/.test(contentType)) { - const headers = {}; - for (const [key, value] of this.headers) - headers[key.toLowerCase()] = value; - const responseFormData = new FormData(); - let busboy; - try { - busboy = Busboy({ headers }); - } catch (err) { - throw Object.assign(new TypeError(), { cause: err }); - } - busboy.on("field", (name, value) => { - responseFormData.append(name, value); - }); - busboy.on("file", (name, value, info2) => { - const { filename, encoding, mimeType } = info2; - const chunks = []; - if (encoding.toLowerCase() === "base64") { - let base64chunk = ""; - value.on("data", (chunk) => { - base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); - const end = base64chunk.length - base64chunk.length % 4; - chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); - base64chunk = base64chunk.slice(end); - }); - value.on("end", () => { - chunks.push(Buffer.from(base64chunk, "base64")); - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); - }); - } else { - value.on("data", (chunk) => { - chunks.push(chunk); - }); - value.on("end", () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); - }); - } - }); - const busboyResolve = new Promise((resolve, reject) => { - busboy.on("finish", resolve); - busboy.on("error", (err) => reject(err)); - }); - if (this.body !== null) - for await (const chunk of consumeBody(this[kState].body)) - busboy.write(chunk); - busboy.end(); - await busboyResolve; - return responseFormData; - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - let entries; - try { - let text = ""; - const textDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError("Expected Uint8Array chunk"); - } - text += textDecoder.decode(chunk, { stream: true }); - } - text += textDecoder.decode(); - entries = new URLSearchParams(text); - } catch (err) { - throw Object.assign(new TypeError(), { cause: err }); - } - const formData = new FormData(); - for (const [name, value] of entries) { - formData.append(name, value); - } - return formData; - } else { - await Promise.resolve(); - throwIfAborted(this[kState]); - webidl.errors.exception({ - header: `${instance.name}.formData`, - message: "Could not parse content as FormData." - }); - } - } - }; - return methods; - } - __name(bodyMixinMethods, "bodyMixinMethods"); - var properties = { - body: { - enumerable: true, - get() { - if (!this || !this[kState]) { - throw new TypeError("Illegal invocation"); - } - return this[kState].body ? this[kState].body.stream : null; - } - }, - bodyUsed: { - enumerable: true, - get() { - if (!this || !this[kState]) { - throw new TypeError("Illegal invocation"); - } - return !!this[kState].body && util2.isDisturbed(this[kState].body.stream); - } - } - }; - function mixinBody(prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)); - Object.defineProperties(prototype.prototype, properties); - } - __name(mixinBody, "mixinBody"); - module2.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/request.js -var require_request = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/request.js"(exports, module2) { - "use strict"; - var { - InvalidArgumentError, - NotSupportedError - } = require_errors(); - var assert = require("assert"); - var util2 = require_util2(); - var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; - var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - var invalidPathRegex = /[^\u0021-\u00ff]/; - var kHandler = Symbol("handler"); - var channels = {}; - var extractBody; - var nodeVersion = process.versions.node.split("."); - var nodeMajor = Number(nodeVersion[0]); - var nodeMinor = Number(nodeVersion[1]); - try { - const diagnosticsChannel = require("diagnostics_channel"); - channels.create = diagnosticsChannel.channel("undici:request:create"); - channels.bodySent = diagnosticsChannel.channel("undici:request:bodySent"); - channels.headers = diagnosticsChannel.channel("undici:request:headers"); - channels.trailers = diagnosticsChannel.channel("undici:request:trailers"); - channels.error = diagnosticsChannel.channel("undici:request:error"); - } catch (e2) { - channels.create = { hasSubscribers: false }; - channels.bodySent = { hasSubscribers: false }; - channels.headers = { hasSubscribers: false }; - channels.trailers = { hasSubscribers: false }; - channels.error = { hasSubscribers: false }; - } - var Request = class { - constructor(origin, { - path: path7, - method, - body, - headers, - query: query2, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - throwOnError - }, handler) { - if (typeof path7 !== "string") { - throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { - throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path7) !== null) { - throw new InvalidArgumentError("invalid request path"); - } - if (typeof method !== "string") { - throw new InvalidArgumentError("method must be a string"); - } else if (tokenRegExp.exec(method) === null) { - throw new InvalidArgumentError("invalid request method"); - } - if (upgrade && typeof upgrade !== "string") { - throw new InvalidArgumentError("upgrade must be a string"); - } - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("invalid headersTimeout"); - } - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("invalid bodyTimeout"); - } - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - if (body == null) { - this.body = null; - } else if (util2.isStream(body)) { - this.body = body; - } else if (util2.isBuffer(body)) { - this.body = body.byteLength ? body : null; - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null; - } else if (typeof body === "string") { - this.body = body.length ? Buffer.from(body) : null; - } else if (util2.isFormDataLike(body) || util2.isIterable(body) || util2.isBlobLike(body)) { - this.body = body; - } else { - throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - } - this.completed = false; - this.aborted = false; - this.upgrade = upgrade || null; - this.path = query2 ? util2.buildURL(path7, query2) : path7; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = ""; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError("headers array must be even"); - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]); - } - } else if (headers && typeof headers === "object") { - const keys2 = Object.keys(headers); - for (let i = 0; i < keys2.length; i++) { - const key = keys2[i]; - processHeader(this, key, headers[key]); - } - } else if (headers != null) { - throw new InvalidArgumentError("headers must be an object or an array"); - } - if (util2.isFormDataLike(this.body)) { - if (nodeMajor < 16 || nodeMajor === 16 && nodeMinor < 8) { - throw new InvalidArgumentError("Form-Data bodies are only supported in node v16.8 and newer."); - } - if (!extractBody) { - extractBody = require_body().extractBody; - } - const [bodyStream, contentType] = extractBody(body); - if (this.contentType == null) { - this.contentType = contentType; - this.headers += `content-type: ${contentType}\r -`; - } - this.body = bodyStream.stream; - } else if (util2.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type; - this.headers += `content-type: ${body.type}\r -`; - } - util2.validateHandler(handler, method, upgrade); - this.servername = util2.getServerName(this.host); - this[kHandler] = handler; - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }); - } - } - onBodySent(chunk) { - if (this[kHandler].onBodySent) { - try { - this[kHandler].onBodySent(chunk); - } catch (err) { - this.onError(err); - } - } - } - onRequestSent() { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }); - } - } - onConnect(abort) { - assert(!this.aborted); - assert(!this.completed); - return this[kHandler].onConnect(abort); - } - onHeaders(statusCode, headers, resume, statusText) { - assert(!this.aborted); - assert(!this.completed); - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); - } - return this[kHandler].onHeaders(statusCode, headers, resume, statusText); - } - onData(chunk) { - assert(!this.aborted); - assert(!this.completed); - return this[kHandler].onData(chunk); - } - onUpgrade(statusCode, headers, socket) { - assert(!this.aborted); - assert(!this.completed); - return this[kHandler].onUpgrade(statusCode, headers, socket); - } - onComplete(trailers) { - assert(!this.aborted); - this.completed = true; - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }); - } - return this[kHandler].onComplete(trailers); - } - onError(error2) { - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error2 }); - } - if (this.aborted) { - return; - } - this.aborted = true; - return this[kHandler].onError(error2); - } - addHeader(key, value) { - processHeader(this, key, value); - return this; - } - }; - __name(Request, "Request"); - function processHeader(request2, key, val) { - if (val && typeof val === "object") { - throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === void 0) { - return; - } - if (request2.host === null && key.length === 4 && key.toLowerCase() === "host") { - request2.host = val; - } else if (request2.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request2.contentLength = parseInt(val, 10); - if (!Number.isFinite(request2.contentLength)) { - throw new InvalidArgumentError("invalid content-length header"); - } - } else if (request2.contentType === null && key.length === 12 && key.toLowerCase() === "content-type" && headerCharRegex.exec(val) === null) { - request2.contentType = val; - request2.headers += `${key}: ${val}\r -`; - } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { - throw new InvalidArgumentError("invalid transfer-encoding header"); - } else if (key.length === 10 && key.toLowerCase() === "connection") { - throw new InvalidArgumentError("invalid connection header"); - } else if (key.length === 10 && key.toLowerCase() === "keep-alive") { - throw new InvalidArgumentError("invalid keep-alive header"); - } else if (key.length === 7 && key.toLowerCase() === "upgrade") { - throw new InvalidArgumentError("invalid upgrade header"); - } else if (key.length === 6 && key.toLowerCase() === "expect") { - throw new NotSupportedError("expect header not supported"); - } else if (tokenRegExp.exec(key) === null) { - throw new InvalidArgumentError("invalid header key"); - } else if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`); - } else { - request2.headers += `${key}: ${val}\r -`; - } - } - __name(processHeader, "processHeader"); - module2.exports = Request; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/dispatcher.js -var require_dispatcher = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/dispatcher.js"(exports, module2) { - "use strict"; - var EventEmitter3 = require("events"); - var Dispatcher = class extends EventEmitter3 { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); - } - destroy() { - throw new Error("not implemented"); - } - }; - __name(Dispatcher, "Dispatcher"); - module2.exports = Dispatcher; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/dispatcher-base.js -var require_dispatcher_base = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/dispatcher-base.js"(exports, module2) { - "use strict"; - var Dispatcher = require_dispatcher(); - var { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError - } = require_errors(); - var { kDestroy, kClose, kDispatch, kInterceptors } = require_symbols(); - var kDestroyed = Symbol("destroyed"); - var kClosed = Symbol("closed"); - var kOnDestroyed = Symbol("onDestroyed"); - var kOnClosed = Symbol("onClosed"); - var kInterceptedDispatch = Symbol("Intercepted Dispatch"); - var DispatcherBase = class extends Dispatcher { - constructor() { - super(); - this[kDestroyed] = false; - this[kOnDestroyed] = []; - this[kClosed] = false; - this[kOnClosed] = []; - } - get destroyed() { - return this[kDestroyed]; - } - get closed() { - return this[kClosed]; - } - get interceptors() { - return this[kInterceptors]; - } - set interceptors(newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i]; - if (typeof interceptor !== "function") { - throw new InvalidArgumentError("interceptor must be an function"); - } - } - } - this[kInterceptors] = newInterceptors; - } - close(callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)); - return; - } - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - this[kClosed] = true; - this[kOnClosed].push(callback); - const onClosed = /* @__PURE__ */ __name(() => { - const callbacks = this[kOnClosed]; - this[kOnClosed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } - }, "onClosed"); - this[kClose]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); - } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.destroy(err, (err2, data) => { - return err2 ? reject(err2) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - if (!err) { - err = new ClientDestroyedError(); - } - this[kDestroyed] = true; - this[kOnDestroyed].push(callback); - const onDestroyed = /* @__PURE__ */ __name(() => { - const callbacks = this[kOnDestroyed]; - this[kOnDestroyed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } - }, "onDestroyed"); - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed); - }); - } - [kInterceptedDispatch](opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch]; - return this[kDispatch](opts, handler); - } - let dispatch = this[kDispatch].bind(this); - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch); - } - this[kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); - } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - try { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object."); - } - if (this[kDestroyed]) { - throw new ClientDestroyedError(); - } - if (this[kClosed]) { - throw new ClientClosedError(); - } - return this[kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - handler.onError(err); - return false; - } - } - }; - __name(DispatcherBase, "DispatcherBase"); - module2.exports = DispatcherBase; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/connect.js -var require_connect = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/core/connect.js"(exports, module2) { - "use strict"; - var net2 = require("net"); - var assert = require("assert"); - var util2 = require_util2(); - var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); - var tls; - function buildConnector({ maxCachedSessions, socketPath, timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); - } - const options = { path: socketPath, ...opts }; - const sessionCache = /* @__PURE__ */ new Map(); - timeout = timeout == null ? 1e4 : timeout; - maxCachedSessions = maxCachedSessions == null ? 100 : maxCachedSessions; - return /* @__PURE__ */ __name(function connect({ hostname: hostname3, host, protocol, port, servername, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls) { - tls = require("tls"); - } - servername = servername || options.servername || util2.getServerName(host) || null; - const sessionKey = servername || hostname3; - const session = sessionCache.get(sessionKey) || null; - assert(sessionKey); - socket = tls.connect({ - highWaterMark: 16384, - ...options, - servername, - session, - socket: httpSocket, - port: port || 443, - host: hostname3 - }); - socket.on("session", function(session2) { - if (maxCachedSessions === 0) { - return; - } - if (sessionCache.size >= maxCachedSessions) { - const { value: oldestKey } = sessionCache.keys().next(); - sessionCache.delete(oldestKey); - } - sessionCache.set(sessionKey, session2); - }).on("error", function(err) { - if (sessionKey && err.code !== "UND_ERR_INFO") { - sessionCache.delete(sessionKey); - } - }); - } else { - assert(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = net2.connect({ - highWaterMark: 64 * 1024, - ...options, - port: port || 80, - host: hostname3 - }); - } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }, "connect"); - } - __name(buildConnector, "buildConnector"); - function setupTimeout(onConnectTimeout2, timeout) { - if (!timeout) { - return () => { - }; - } - let s1 = null; - let s2 = null; - const timeoutId = setTimeout(() => { - s1 = setImmediate(() => { - if (process.platform === "win32") { - s2 = setImmediate(() => onConnectTimeout2()); - } else { - onConnectTimeout2(); - } - }); - }, timeout); - return () => { - clearTimeout(timeoutId); - clearImmediate(s1); - clearImmediate(s2); - }; - } - __name(setupTimeout, "setupTimeout"); - function onConnectTimeout(socket) { - util2.destroy(socket, new ConnectTimeoutError()); - } - __name(onConnectTimeout, "onConnectTimeout"); - module2.exports = buildConnector; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/utils.js -var require_utils2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/utils.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.enumToMap = void 0; - function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === "number") { - res[key] = value; - } - }); - return res; - } - __name(enumToMap, "enumToMap"); - exports.enumToMap = enumToMap; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/constants.js -var require_constants2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/constants.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; - var utils_1 = require_utils2(); - var ERROR; - (function(ERROR2) { - ERROR2[ERROR2["OK"] = 0] = "OK"; - ERROR2[ERROR2["INTERNAL"] = 1] = "INTERNAL"; - ERROR2[ERROR2["STRICT"] = 2] = "STRICT"; - ERROR2[ERROR2["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR2[ERROR2["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR2[ERROR2["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR2[ERROR2["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR2[ERROR2["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR2[ERROR2["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR2[ERROR2["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR2[ERROR2["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR2[ERROR2["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR2[ERROR2["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR2[ERROR2["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR2[ERROR2["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR2[ERROR2["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR2[ERROR2["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR2[ERROR2["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR2[ERROR2["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR2[ERROR2["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR2[ERROR2["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR2[ERROR2["PAUSED"] = 21] = "PAUSED"; - ERROR2[ERROR2["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR2[ERROR2["USER"] = 24] = "USER"; - })(ERROR = exports.ERROR || (exports.ERROR = {})); - var TYPE; - (function(TYPE2) { - TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; - TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; - TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE = exports.TYPE || (exports.TYPE = {})); - var FLAGS; - (function(FLAGS2) { - FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; - FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; - FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; - FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; - })(FLAGS = exports.FLAGS || (exports.FLAGS = {})); - var LENIENT_FLAGS; - (function(LENIENT_FLAGS2) { - LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; - })(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); - var METHODS; - (function(METHODS2) { - METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; - METHODS2[METHODS2["GET"] = 1] = "GET"; - METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; - METHODS2[METHODS2["POST"] = 3] = "POST"; - METHODS2[METHODS2["PUT"] = 4] = "PUT"; - METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; - METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; - METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; - METHODS2[METHODS2["COPY"] = 8] = "COPY"; - METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; - METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; - METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; - METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; - METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; - METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; - METHODS2[METHODS2["BIND"] = 16] = "BIND"; - METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; - METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; - METHODS2[METHODS2["ACL"] = 19] = "ACL"; - METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; - METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; - METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; - METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; - METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; - METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; - METHODS2[METHODS2["LINK"] = 31] = "LINK"; - METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; - METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; - METHODS2[METHODS2["PRI"] = 34] = "PRI"; - METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; - METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; - METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; - METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; - METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; - METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; - })(METHODS = exports.METHODS || (exports.METHODS = {})); - exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS["M-SEARCH"], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - METHODS.SOURCE - ]; - exports.METHODS_ICE = [ - METHODS.SOURCE - ]; - exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - METHODS.GET, - METHODS.POST - ]; - exports.METHOD_MAP = utils_1.enumToMap(METHODS); - exports.H_METHOD_MAP = {}; - Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } - }); - var FINISH; - (function(FINISH2) { - FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; - FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; - })(FINISH = exports.FINISH || (exports.FINISH = {})); - exports.ALPHA = []; - for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { - exports.ALPHA.push(String.fromCharCode(i)); - exports.ALPHA.push(String.fromCharCode(i + 32)); - } - exports.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 - }; - exports.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); - exports.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; - exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); - exports.STRICT_URL_CHAR = [ - "!", - '"', - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports.ALPHANUM); - exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i = 128; i <= 255; i++) { - exports.URL_CHAR.push(i); - } - exports.HEX = exports.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); - exports.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports.ALPHANUM); - exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); - exports.HEADER_CHARS = [" "]; - for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } - } - exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); - exports.MAJOR = exports.NUM_MAP; - exports.MINOR = exports.MAJOR; - var HEADER_STATE; - (function(HEADER_STATE2) { - HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; - })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); - exports.SPECIAL_HEADERS = { - "connection": HEADER_STATE.CONNECTION, - "content-length": HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": HEADER_STATE.CONNECTION, - "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, - "upgrade": HEADER_STATE.UPGRADE - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/handler/RedirectHandler.js -var require_RedirectHandler = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module2) { - "use strict"; - var util2 = require_util2(); - var { kBodyUsed } = require_symbols(); - var assert = require("assert"); - var { InvalidArgumentError } = require_errors(); - var EE = require("events"); - var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; - var kBody = Symbol("body"); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; - } - }; - __name(BodyAsyncIterable, "BodyAsyncIterable"); - var RedirectHandler = class { - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - util2.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { ...opts, maxRedirections: 0 }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - if (util2.isStream(this.opts.body)) { - if (util2.bodyLength(this.opts.body) === 0) { - this.opts.body.on("data", function() { - assert(false); - }); - } - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed] = false; - EE.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util2.isIterable(this.opts.body)) { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } - } - onConnect(abort) { - this.abort = abort; - this.handler.onConnect(abort, { history: this.history }); - } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); - } - onError(error2) { - this.handler.onError(error2); - } - onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util2.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)); - } - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText); - } - const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path7 = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; - } - } - onData(chunk) { - if (this.location) { - } else { - return this.handler.onData(chunk); - } - } - onComplete(trailers) { - if (this.location) { - this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else { - this.handler.onComplete(trailers); - } - } - onBodySent(chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk); - } - } - }; - __name(RedirectHandler, "RedirectHandler"); - function parseLocation(statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null; - } - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toString().toLowerCase() === "location") { - return headers[i + 1]; - } - } - } - __name(parseLocation, "parseLocation"); - function shouldRemoveHeader(header, removeContent, unknownOrigin) { - return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie"; - } - __name(shouldRemoveHeader, "shouldRemoveHeader"); - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]); - } - } - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]); - } - } - } else { - assert(headers == null, "headers must be an object or an array"); - } - return ret; - } - __name(cleanRequestHeaders, "cleanRequestHeaders"); - module2.exports = RedirectHandler; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/interceptor/redirectInterceptor.js -var require_redirectInterceptor = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module2) { - "use strict"; - var RedirectHandler = require_RedirectHandler(); - function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return /* @__PURE__ */ __name(function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) { - return dispatch(opts, handler); - } - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); - opts = { ...opts, maxRedirections: 0 }; - return dispatch(opts, redirectHandler); - }, "Intercept"); - }; - } - __name(createRedirectInterceptor, "createRedirectInterceptor"); - module2.exports = createRedirectInterceptor; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/llhttp.wasm.js -var require_llhttp_wasm = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/llhttp.wasm.js"(exports, module2) { - module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzk4AwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAYGAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAAMEBQFwAQ4OBQMBAAIGCAF/AUGAuAQLB/UEHwZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAJGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAKGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQA1DGxsaHR0cF9hbGxvYwAMBm1hbGxvYwA6C2xsaHR0cF9mcmVlAA0EZnJlZQA8D2xsaHR0cF9nZXRfdHlwZQAOFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAPFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAQEWxsaHR0cF9nZXRfbWV0aG9kABEWbGxodHRwX2dldF9zdGF0dXNfY29kZQASEmxsaHR0cF9nZXRfdXBncmFkZQATDGxsaHR0cF9yZXNldAAUDmxsaHR0cF9leGVjdXRlABUUbGxodHRwX3NldHRpbmdzX2luaXQAFg1sbGh0dHBfZmluaXNoABcMbGxodHRwX3BhdXNlABgNbGxodHRwX3Jlc3VtZQAZG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAaEGxsaHR0cF9nZXRfZXJybm8AGxdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAcF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uAB0UbGxodHRwX2dldF9lcnJvcl9wb3MAHhFsbGh0dHBfZXJybm9fbmFtZQAfEmxsaHR0cF9tZXRob2RfbmFtZQAgGmxsaHR0cF9zZXRfbGVu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f2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQYgEcUGABEYNAiAEQShxRQ0CC0EADwtBAEEDIAApAyBQGyEFCyAFC10BAn9BACEBAkAgAC0AKEEBRg0AIAAvATIiAkGcf2pB5ABJDQAgAkHMAUYNACACQbACRg0AIAAvATAiAEHAAHENAEEBIQEgAEGIBHFBgARGDQAgAEEocUUhAQsgAQuiAQEDfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEDIAAvATAiBEECcUUNAQwCC0EAIQMgAC8BMCIEQQFxRQ0BC0EBIQMgAC0AKEEBRg0AIAAvATIiBUGcf2pB5ABJDQAgBUHMAUYNACAFQbACRg0AIARBwABxDQBBACEDIARBiARxQYAERg0AIARBKHFBAEchAwsgAEEAOwEwIABBADoALyADC5QBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQEgAC8BMCICQQJxRQ0BDAILQQAhASAALwEwIgJBAXFFDQELQQEhASAALQAoQQFGDQAgAC8BMiIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC08AIABBGGpCADcDACAAQgA3AwAgAEEwakIANwMAIABBKGpCADcDACAAQSBqQgA3AwAgAEEQakIANwMAIABBCGpCADcDACAAQbwBNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQuICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC9POAQMcfwN+BX8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDyABIRAgASERIAEhEiABIRMgASEUIAEhFSABIRYgASEXIAEhGCABIRkgASEaIAEhGyABIRwgASEdAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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HgwTC0GZASEeDBILQZ0BIR4MEQtBmgEhHgwQC0EBIR4MDwtBmwEhHgwOC0GcASEeDA0LQZ4BIR4MDAtBoAEhHgwLC0GfASEeDAoLQaEBIR4MCQtBogEhHgwIC0GjASEeDAcLQaQBIR4MBgtBpQEhHgwFC0GmASEeDAQLQacBIR4MAwtBqAEhHgwCC0GpASEeDAELQa8BIR4LA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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AbsBuwG7AbsBuwG7AbsBuwG7AQG7AQsgCEEBaiEBQdQAIR4MmAILIAhBAWohAUHVACEeDJcCC0HnACEeIAEiIiACRg2mAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB7bOAgABqLQAARw25ASABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpwILIABBADYCACAiICZrQQNqIQFBECEeDLYBC0HoACEeIAEiIiACRg2lAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB9rKAgABqLQAARw24ASABQQVGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpgILIABBADYCACAiICZrQQZqIQFBFiEeDLUBC0HpACEeIAEiIiACRg2kAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB/LKAgABqLQAARw23ASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpQILIABBADYCACAiICZrQQRqIQFBBSEeDLQBCwJAIAEiCCACRw0AQeoAIR4MpAILIAgtAABB2QBHDbUBIAhBAWohAUEIIR4MswELAkAgASIIIAJHDQBB6wAhHgyjAgsCQAJAIAgtAABBsn9qDgMAtgEBtgELIAhBAWohAUHZACEeDJMCCyAIQQFqIQFB2gAhHgySAgsCQCABIgggAkcNAEHsACEeDKICCwJAAkAgCC0AAEG4f2oOCAC1AbUBtQG1AbUBtQEBtQELIAhBAWohAUHYACEeDJICCyAIQQFqIQFB2wAhHgyRAgtB7QAhHiABIiIgAkYNoAIgAiAiayAAKAIAIiZqISMgIiEIICYhAQJAA0AgCC0AACABQYCzgIAAai0AAEcNswEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADKECC0EAIR4gAEEANgIAICIgJmtBA2ohAQywAQtB7gAhHiABIiIgAkYNnwIgAiAiayAAKAIAIiZqISMgIiEIICYhAQJAA0AgCC0AACABQYOzgIAAai0AAEcNsgEgAUEERg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADKACCyAAQQA2AgAgIiAma0EFaiEBQSMhHgyvAQsCQCABIgggAkcNAEHvACEeDJ8CCwJAAkAgCC0AAEG0f2oOCACyAbIBsgGyAbIBsgEBsgELIAhBAWohAUHdACEeDI8CCyAIQQFqIQFB3gAhHgyOAgsCQCABIgggAkcNAEHwACEeDJ4CCyAILQAAQcUARw2vASAIQQFqIQEM3gELQfEAIR4gASIiIAJGDZwCIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUGIs4CAAGotAABHDa8BIAFBA0YNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAydAgsgAEEANgIAICIgJmtBBGohAUEtIR4MrAELQfIAIR4gASIiIAJGDZsCIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUHQs4CAAGotAABHDa4BIAFBCEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAycAgsgAEEANgIAICIgJmtBCWohAUEpIR4MqwELAkAgASIBIAJHDQBB8wAhHgybAgtBASEeIAEtAABB3wBHDaoBIAFBAWohAQzcAQtB9AAhHiABIiIgAkYNmQIgAiAiayAAKAIAIiZqISMgIiEIICYhAQNAIAgtAAAgAUGMs4CAAGotAABHDasBIAFBAUYN9wEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMmQILAkAgASIeIAJHDQBB9QAhHgyZAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQY6zgIAAai0AAEcNqwEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQfUAIR4MmQILIABBADYCACAeICJrQQNqIQFBAiEeDKgBCwJAIAEiHiACRw0AQfYAIR4MmAILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUHws4CAAGotAABHDaoBIAFBAUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEH2ACEeDJgCCyAAQQA2AgAgHiAia0ECaiEBQR8hHgynAQsCQCABIh4gAkcNAEH3ACEeDJcCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFB8rOAgABqLQAARw2pASABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBB9wAhHgyXAgsgAEEANgIAIB4gImtBAmohAUEJIR4MpgELAkAgASIIIAJHDQBB+AAhHgyWAgsCQAJAIAgtAABBt39qDgcAqQGpAakBqQGpAQGpAQsgCEEBaiEBQeYAIR4MhgILIAhBAWohAUHnACEeDIUCCwJAIAEiHiACRw0AQfkAIR4MlQILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUGRs4CAAGotAABHDacBIAFBBUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEH5ACEeDJUCCyAAQQA2AgAgHiAia0EGaiEBQRghHgykAQsCQCABIh4gAkcNAEH6ACEeDJQCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBl7OAgABqLQAARw2mASABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBB+gAhHgyUAgsgAEEANgIAIB4gImtBA2ohAUEXIR4MowELAkAgASIeIAJHDQBB+wAhHgyTAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQZqzgIAAai0AAEcNpQEgAUEGRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQfsAIR4MkwILIABBADYCACAeICJrQQdqIQFBFSEeDKIBCwJAIAEiHiACRw0AQfwAIR4MkgILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUGhs4CAAGotAABHDaQBIAFBBUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEH8ACEeDJICCyAAQQA2AgAgHiAia0EGaiEBQR4hHgyhAQsCQCABIgggAkcNAEH9ACEeDJECCyAILQAAQcwARw2iASAIQQFqIQFBCiEeDKABCwJAIAEiCCACRw0AQf4AIR4MkAILAkACQCAILQAAQb9/ag4PAKMBowGjAaMBowGjAaMBowGjAaMBowGjAaMBAaMBCyAIQQFqIQFB7AAhHgyAAgsgCEEBaiEBQe0AIR4M/wELAkAgASIIIAJHDQBB/wAhHgyPAgsCQAJAIAgtAABBv39qDgMAogEBogELIAhBAWohAUHrACEeDP8BCyAIQQFqIQFB7gAhHgz+AQsCQCABIh4gAkcNAEGAASEeDI4CCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBp7OAgABqLQAARw2gASABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBBgAEhHgyOAgsgAEEANgIAIB4gImtBAmohAUELIR4MnQELAkAgASIIIAJHDQBBgQEhHgyNAgsCQAJAAkACQCAILQAAQVNqDiMAogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAQGiAaIBogGiAaIBAqIBogGiAQOiAQsgCEEBaiEBQekAIR4M/wELIAhBAWohAUHqACEeDP4BCyAIQQFqIQFB7wAhHgz9AQsgCEEBaiEBQfAAIR4M/AELAkAgASIeIAJHDQBBggEhHgyMAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQamzgIAAai0AAEcNngEgAUEERg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQYIBIR4MjAILIABBADYCACAeICJrQQVqIQFBGSEeDJsBCwJAIAEiIiACRw0AQYMBIR4MiwILIAIgImsgACgCACImaiEeICIhCCAmIQECQANAIAgtAAAgAUGus4CAAGotAABHDZ0BIAFBBUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgHjYCAEGDASEeDIsCCyAAQQA2AgBBBiEeICIgJmtBBmohAQyaAQsCQCABIh4gAkcNAEGEASEeDIoCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBtLOAgABqLQAARw2cASABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBBhAEhHgyKAgsgAEEANgIAIB4gImtBAmohAUEcIR4MmQELAkAgASIeIAJHDQBBhQEhHgyJAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQbazgIAAai0AAEcNmwEgAUEBRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQYUBIR4MiQILIABBADYCACAeICJrQQJqIQFBJyEeDJgBCwJAIAEiCCACRw0AQYYBIR4MiAILAkACQCAILQAAQax/ag4CAAGbAQsgCEEBaiEBQfQAIR4M+AELIAhBAWohAUH1ACEeDPcBCwJAIAEiHiAC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IiEBDDELIABBxAA2AhwgACAiNgIUIAAgATYCDEEAIR4MeQsgACgCBCEBIABBADYCBAJAIAAgASAiEKSAgIAAIgENACAiIQEMMQsgAEHFADYCHCAAICI2AhQgACABNgIMQQAhHgx4CyAAKAIEIQEgAEEANgIEAkAgACABICIQpICAgAAiAQ0AICIhAQw1CyAAQdAANgIcIAAgIjYCFCAAIAE2AgxBACEeDHcLIABBADYCHCAAICI2AhQgAEHQjICAADYCECAAQQc2AgxBACEeDHYLIABBADYCHCAAIAE2AhQgAEHQjICAADYCECAAQQc2AgxBACEeDHULQQAhHiAAQQA2AhwgACAiNgIUIABBv5SAgAA2AhAgAEEHNgIMDHQLIABBADYCHCAAICI2AhQgAEG/lICAADYCECAAQQc2AgxBACEeDHMLIABBADYCHCAAICI2AhQgAEHUjoCAADYCECAAQQc2AgxBACEeDHILIABBADYCHCAAIAE2AhQgAEHBk4CAADYCECAAQQY2AgxBACEeDHELIABBADYCACAiICZrQQZqIQFBJCEeCyAAIB46ACkgASEBDE4LIABBADYCAAtBACEeIABBADYCHCAAIAg2AhQgAEGklICAADYCECAAQQY2AgwMbQsgACgCBCETIABBADYCBCAAIBMgHhCmgICAACITDQEgHkEBaiETC0GdASEeDFsLIABBqgE2AhwgACATNgIMIAAgHkEBajYCFEEAIR4MagsgACgCBCEUIABBADYCBCAAIBQgHhCmgICAACIUDQEgHkEBaiEUC0GaASEeDFgLIABBqwE2AhwgACAUNgIMIAAgHkEBajYCFEEAIR4MZwsgAEEANgIcIAAgFTYCFCAAQfOKgIAANgIQIABBDTYCDEEAIR4MZgsgAEEANgIcIAAgFjYCFCAAQc6NgIAANgIQIABBCTYCDEEAIR4MZQtBASEeCyAAIB46ACsgF0EBaiEWDC4LIABBADYCHCAAIBc2AhQgAEGijYCAADYCECAAQQk2AgxBACEeDGILIABBADYCHCAAIBg2AhQgAEHFioCAADYCECAAQQk2AgxBACEeDGELQQEhHgsgACAeOgAqIBlBAWohGAwsCyAAQQA2AhwgACAZNgIUIABBuI2AgAA2AhAgAEEJNgIMQQAhHgxeCyAAQQA2AhwgACAZNgIUIABB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QR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAFBGGogBDYCACABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQRhqQQA2AgAgASAENgIMIAEgADYCCAtBAEEAKAKotICAAEF/aiIBQX8gARs2Aqi0gIAACwtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+LeAgABBfw8LIABBEHQPCxC/gICAAAALBAAAAAsLjiwBAEGACAuGLAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgcGFyYW1ldGVycwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABNS0FDVElWSVRZAENPUFkATk9USUZZAFBMQVkAUFVUAENIRUNLT1VUAFBPU1QAUkVQT1JUAEhQRV9JTlZBTElEX0NPTlNUQU5UAEdFVABIUEVfU1RSSUNUAFJFRElSRUNUAENPTk5FQ1QASFBFX0lOVkFMSURfU1RBVFVTAE9QVElPTlMAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASFBFX0lOVkFMSURfVVJMAE1LQ09MAEFDTABIUEVfSU5URVJOQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBQQVVTRQBQVVJHRQBNRVJHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAFBST1BGSU5EAFVO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AAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/llhttp_simd.wasm.js -var require_llhttp_simd_wasm = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/llhttp/llhttp_simd.wasm.js"(exports, module2) { - module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzk4AwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAYGAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAAMEBQFwAQ4OBQMBAAIGCAF/AUGAuAQLB/UEHwZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAJGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAKGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQA1DGxsaHR0cF9hbGxvYwAMBm1hbGxvYwA6C2xsaHR0cF9mcmVlAA0EZnJlZQA8D2xsaHR0cF9nZXRfdHlwZQAOFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAPFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAQEWxsaHR0cF9nZXRfbWV0aG9kABEWbGxodHRwX2dldF9zdGF0dXNfY29kZQASEmxsaHR0cF9nZXRfdXBncmFkZQATDGxsaHR0cF9yZXNldAAUDmxsaHR0cF9leGVjdXRlABUUbGxodHRwX3NldHRpbmdzX2luaXQAFg1sbGh0dHBfZmluaXNoABcMbGxodHRwX3BhdXNlABgNbGxodHRwX3Jlc3VtZQAZG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAaEGxsaHR0cF9nZXRfZXJybm8AGxdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAcF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uAB0UbGxodHRwX2dldF9lcnJvcl9wb3MAHhFsbGh0dHBfZXJybm9fbmFtZQAfEmxsaHR0cF9tZXRob2RfbmFtZQAgGmxsaHR0cF9zZXRfbGVu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ASEeDBELQZoBIR4MEAtBASEeDA8LQZsBIR4MDgtBnAEhHgwNC0GeASEeDAwLQaABIR4MCwtBnwEhHgwKC0GhASEeDAkLQaIBIR4MCAtBowEhHgwHC0GkASEeDAYLQaUBIR4MBQtBpgEhHgwEC0GnASEeDAMLQagBIR4MAgtBqQEhHgwBC0GvASEeCwNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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IAgtAABBtH9qDggAsgGyAbIBsgGyAbIBAbIBCyAIQQFqIQFB3QAhHgyPAgsgCEEBaiEBQd4AIR4MjgILAkAgASIIIAJHDQBB8AAhHgyeAgsgCC0AAEHFAEcNrwEgCEEBaiEBDN4BC0HxACEeIAEiIiACRg2cAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFBiLOAgABqLQAARw2vASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMnQILIABBADYCACAiICZrQQRqIQFBLSEeDKwBC0HyACEeIAEiIiACRg2bAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB0LOAgABqLQAARw2uASABQQhGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMnAILIABBADYCACAiICZrQQlqIQFBKSEeDKsBCwJAIAEiASACRw0AQfMAIR4MmwILQQEhHiABLQAAQd8ARw2qASABQQFqIQEM3AELQfQAIR4gASIiIAJGDZkCIAIgImsgACgCACImaiEjICIhCCAmIQEDQCAILQAAIAFBjLOAgABqLQAARw2rASABQQFGDfcBIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADJkCCwJAIAEiHiACRw0AQfUAIR4MmQILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUGOs4CAAGotAABHDasBIAFBAkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEH1ACEeDJkCCyAAQQA2AgAgHiAia0EDaiEBQQIhHgyoAQsCQCABIh4gAkcNAEH2ACEeDJgCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFB8LOAgABqLQAARw2qASABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBB9gAhHgyYAgsgAEEANgIAIB4gImtBAmohAUEfIR4MpwELAkAgASIeIAJHDQBB9wAhHgyXAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQfKzgIAAai0AAEcNqQEgAUEBRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQfcAIR4MlwILIABBADYCACAeICJrQQJqIQFBCSEeDKYBCwJAIAEiCCACRw0AQfgAIR4MlgILAkACQCAILQAAQbd/ag4HAKkBqQGpAakBqQEBqQELIAhBAWohAUHmACEeDIYCCyAIQQFqIQFB5wAhHgyFAgsCQCABIh4gAkcNAEH5ACEeDJUCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBkbOAgABqLQAARw2nASABQQVGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBB+QAhHgyVAgsgAEEANgIAIB4gImtBBmohAUEYIR4MpAELAkAgASIeIAJHDQBB+gAhHgyUAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQZezgIAAai0AAEcNpgEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQfoAIR4MlAILIABBADYCACAeICJrQQNqIQFBFyEeDKMBCwJAIAEiHiACRw0AQfsAIR4MkwILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUGas4CAAGotAABHDaUBIAFBBkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEH7ACEeDJMCCyAAQQA2AgAgHiAia0EHaiEBQRUhHgyiAQsCQCABIh4gAkcNAEH8ACEeDJICCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBobOAgABqLQAARw2kASABQQVGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBB/AAhHgySAgsgAEEANgIAIB4gImtBBmohAUEeIR4MoQELAkAgASIIIAJHDQBB/QAhHgyRAgsgCC0AAEHMAEcNogEgCEEBaiEBQQohHgygAQsCQCABIgggAkcNAEH+ACEeDJACCwJAAkAgCC0AAEG/f2oODwCjAaMBowGjAaMBowGjAaMBowGjAaMBowGjAQGjAQsgCEEBaiEBQewAIR4MgAILIAhBAWohAUHtACEeDP8BCwJAIAEiCCACRw0AQf8AIR4MjwILAkACQCAILQAAQb9/ag4DAKIBAaIBCyAIQQFqIQFB6wAhHgz/AQsgCEEBaiEBQe4AIR4M/gELAkAgASIeIAJHDQBBgAEhHgyOAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQaezgIAAai0AAEcNoAEgAUEBRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQYABIR4MjgILIABBADYCACAeICJrQQJqIQFBCyEeDJ0BCwJAIAEiCCACRw0AQYEBIR4MjQILAkACQAJAAkAgCC0AAEFTag4jAKIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogGiAaIBogEBogGiAaIBogGiAQKiAaIBogEDogELIAhBAWohAUHpACEeDP8BCyAIQQFqIQFB6gAhHgz+AQsgCEEBaiEBQe8AIR4M/QELIAhBAWohAUHwACEeDPwBCwJAIAEiHiACRw0AQYIBIR4MjAILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUGps4CAAGotAABHDZ4BIAFBBEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEGCASEeDIwCCyAAQQA2AgAgHiAia0EFaiEBQRkhHgybAQsCQCABIiIgAkcNAEGDASEeDIsCCyACICJrIAAoAgAiJmohHiAiIQggJiEBAkADQCAILQAAIAFBrrOAgABqLQAARw2dASABQQVGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAIB42AgBBgwEhHgyLAgsgAEEANgIAQQYhHiAiICZrQQZqIQEMmgELAkAgASIeIAJHDQBBhAEhHgyKAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQbSzgIAAai0AAEcNnAEgAUEBRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQYQBIR4MigILIABBADYCACAeICJrQQJqIQFBHCEeDJkBCwJAIAEiHiACRw0AQYUBIR4MiQILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUG2s4CAAGotAABHDZsBIAFBAUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEGFASEeDIkCCyAAQQA2AgAgHiAia0ECaiEBQSchHgyYAQsCQCABIgggAkcNAEGGASEeDIgCCwJAAkAgCC0AAEGsf2oOAgABmwELIAhBAWohAUH0ACEeDPgBCyAIQQFqIQFB9QAhHgz3AQsCQCABIh4gAkcNAEGHASEeDIcCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBuLOAgABqLQAARw2ZASABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBBhwEhHgyHAgsgAEEANgIAIB4gImtBAmohAUEmIR4MlgELAkAgASIeIAJHDQBBiAEhHgyGAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQbqzgIAAai0AAEcNmAEgAUEBRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQYgBIR4MhgILIABBADYCACAeICJrQQJqIQFBAyEeDJUBCwJAIAEiHiACRw0AQYkBIR4MhQILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUHts4CAAGotAABHDZcBIAFBAkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEGJASEeDIUCCyAAQQA2AgAgHiAia0EDaiEBQQwhHgyUAQsCQCABIh4gAkcNAEGKASEeDIQCCyACIB5rIAAoAgAiImohJiAeIQggIiEBAkADQCAILQAAIAFBvLOAgABqLQAARw2WASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICY2AgBBigEhHgyEAgsgAEEANgIAIB4gImtBBGohAUENIR4MkwELAkAgASIIIAJHDQBBiwEhHgyDAgsCQAJAIAgtAABBun9qDgsAlgGWAZYBlgGWAZYBlgGWAZYBAZYBCyAIQQFqIQFB+QAhHgzzAQsgCEEBaiEBQfoAIR4M8gELAkAgASIIIAJHDQBBjAEhHgyCAgsgCC0AAEHQAEcNkwEgCEEBaiEBDMQBCwJAIAEiCCACRw0AQY0BIR4MgQILAkACQCAILQAAQbd/ag4HAZQBlAGUAZQBlAEAlAELIAhBAWohAUH8ACEeDPEBCyAIQQFqIQFBIiEeDJABCwJAIAEiHiACRw0AQY4BIR4MgAILIAIgHmsgACgCACIiaiEmIB4hCCAiIQECQANAIAgtAAAgAUHAs4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgJjYCAEGOASEeDIACCyAAQQA2AgAgHiAia0ECaiEBQR0hHgyPAQsCQCABIgggAkcNAEGPASEeDP8BCwJAAkAgCC0AAEGuf2oOAwCSAQGSAQsgCEEBaiEBQf4AIR4M7wELIAhBAWohAUEEIR4MjgELAkAgASIIIAJHDQBBkAEhHgz+AQsCQAJAAkACQAJAIAgtAABBv39qDhUAlAGUAZQBlAGUAZQBlAGUAZQBlAEBlAGUAQKUAZQBA5QBlAEElAELIAhBAWohAUH2ACEeDPEBCyAIQQFqIQFB9wAhHgzwAQsgCEEBaiEBQfgAIR4M7wELIAhBAWohAUH9ACEeDO4BCyAIQQFqIQFB/wAhHgztAQsCQCAEIAJHDQBBkQEhHgz9AQsgAiAEayAAKAIAIh5qISIgBCEIIB4hAQJAA0AgCC0AACABQe2zgIAAai0AAEcNjwEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAiNgIAQZEBIR4M/QELIABBADYCACAEIB5rQQNqIQFBESEeDIwBCwJAIAUgAkcNAEGSASEeDPwBCyACIAVrIAAoAgAiHmohIiAFIQggHiEBAkADQCAILQAAIAFBwrOAgABqLQAARw2OASABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBkgEhHgz8AQsgAEEANgIAIAUgHmtBA2ohAUEsIR4MiwELAkAgBiACRw0AQZMBIR4M+wELIAIgBmsgACgCACIeaiEiIAYhCCAeIQECQANAIAgtAAAgAUHFs4CAAGotAABHDY0BIAFBBEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEGTASEeDPsBCyAAQQA2AgAgBiAea0EFaiEBQSshHgyKAQsCQCAHIAJHDQBBlAEhHgz6AQsgAiAHayAAKAIAIh5qISIgByEIIB4hAQJAA0AgCC0AACABQcqzgIAAai0AAEcNjAEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAiNgIAQZQBIR4M+gELIABBADYCACAHIB5rQQNqIQFBFCEeDIkBCwJAIAggAkcNAEGVASEeDPkBCwJAAkACQAJAIAgtAABBvn9qDg8AAQKOAY4BjgGOAY4BjgGOAY4BjgGOAY4BA44BCyAIQQFqIQRBgQEhHgzrAQsgCEEBaiEFQYIBIR4M6gELIAhBAWohBkGDASEeDOkBCyAIQQFqIQdBhAEhHgzoAQsCQCAIIAJHDQBBlgEhHgz4AQsgCC0AAEHFAEcNiQEgCEEBaiEIDLsBCwJAIAkgAkcNAEGXASEeDPcBCyACIAlrIAAoAgAiHmohIiAJIQggHiEBAkADQCAILQAAIAFBzbOAgABqLQAARw2JASABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBlwEhHgz3AQsgAEEANgIAIAkgHmtBA2ohAUEOIR4MhgELAkAgCCACRw0AQZgBIR4M9gELIAgtAABB0ABHDYcBIAhBAWohAUElIR4MhQELAkAgCiACRw0AQZkBIR4M9QELIAIgCmsgACgCACIeaiEiIAohCCAeIQECQANAIAgtAAAgAUHQs4CAAGotAABHDYcBIAFBCEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEGZASEeDPUBCyAAQQA2AgAgCiAea0EJaiEBQSohHgyEAQsCQCAIIAJHDQBBmgEhHgz0AQsCQAJAIAgtAABBq39qDgsAhwGHAYcBhwGHAYcBhwGHAYcBAYcBCyAIQQFqIQhBiAEhHgzkAQsgCEEBaiEKQYkBIR4M4wELAkAgCCACRw0AQZsBIR4M8wELAkACQCAILQAAQb9/ag4UAIYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAQGGAQsgCEEBaiEJQYcBIR4M4wELIAhBAWohCEGKASEeDOIBCwJAIAsgAkcNAEGcASEeDPIBCyACIAtrIAAoAgAiHmohIiALIQggHiEBAkADQCAILQAAIAFB2bOAgABqLQAARw2EASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBnAEhHgzyAQsgAEEANgIAIAsgHmtBBGohAUEhIR4MgQELAkAgDCACRw0AQZ0BIR4M8QELIAIgDGsgACgCACIeaiEiIAwhCCAeIQECQANAIAgtAAAgAUHds4CAAGotAABHDYMBIAFBBkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEGdASEeDPEBCyAAQQA2AgAgDCAea0EHaiEBQRohHgyAAQsCQCAIIAJHDQBBngEhHgzwAQsCQAJAAkAgCC0AAEG7f2oOEQCEAYQBhAGEAYQBhAGEAYQBhAEBhAGEAYQBhAGEAQKEAQsgCEEBaiEIQYsBIR4M4QELIAhBAWohC0GMASEeDOABCyAIQQFqIQxBjQEhHgzfAQsCQCANIAJHDQBBnwEhHgzvAQsgAiANayAAKAIAIh5qISIgDSEIIB4hAQJAA0AgCC0AACABQeSzgIAAai0AAEcNgQEgAUEFRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAiNgIAQZ8BIR4M7wELIABBADYCACANIB5rQQZqIQFBKCEeDH4LAkAgDiACRw0AQaABIR4M7gELIAIgDmsgACgCACIeaiEiIA4hCCAeIQECQANAIAgtAAAgAUHqs4CAAGotAABHDYABIAFBAkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEGgASEeDO4BCyAAQQA2AgAgDiAea0EDaiEBQQchHgx9CwJAIAggAkcNAEGhASEeDO0BCwJAAkAgCC0AAEG7f2oODgCAAYABgAGAAYABgAGAAYABgAGAAYABgAEBgAELIAhBAWohDUGPASEeDN0BCyAIQQFqIQ5BkAEhHgzcAQsCQCAPIAJHDQBBogEhHgzsAQsgAiAPayAAKAIAIh5qISIgDyEIIB4hAQJAA0AgCC0AACABQe2zgIAAai0AAEcNfiABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBogEhHgzsAQsgAEEANgIAIA8gHmtBA2ohAUESIR4MewsCQCAQIAJHDQBBowEhHgzrAQsgAiAQayAAKAIAIh5qISIgECEIIB4hAQJAA0AgCC0AACABQfCzgIAAai0AAEcNfSABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBowEhHgzrAQsgAEEANgIAIBAgHmtBAmohAUEgIR4MegsCQCARIAJHDQBBpAEhHgzqAQsgAiARayAAKAIAIh5qISIgESEIIB4hAQJAA0AgCC0AACABQfKzgIAAai0AAEcNfCABQQFGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICI2AgBBpAEhHgzqAQsgAEEANgIAIBEgHmtBAmohAUEPIR4MeQsCQCAIIAJHDQBBpQEhHgzpAQsCQAJAIAgtAABBt39qDgcAfHx8fHwBfAsgCEEBaiEQQZMBIR4M2QELIAhBAWohEUGUASEeDNgBCwJAIBIgAkcNAEGmASEeDOgBCyACIBJrIAAoAgAiHmohIiASIQggHiEBAkADQCAILQAAIAFB9LOAgABqLQAARw16IAFBB0YNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEGmASEeDOgBCyAAQQA2AgAgEiAea0EIaiEBQRshHgx3CwJAIAggAkcNAEGnASEeDOcBCwJAAkACQCAILQAAQb5/ag4SAHt7e3t7e3t7ewF7e3t7e3sCewsgCEEBaiEPQZIBIR4M2AELIAhBAWohCEGVASEeDNcBCyAIQQFqIRJBlgEhHgzWAQsCQCAIIAJHDQBBqAEhHgzmAQsgCC0AAEHOAEcNdyAIQQFqIQgMqgELAkAgCCACRw0AQakBIR4M5QELAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgCC0AAEG/f2oOFQABAgOGAQQFBoYBhgGGAQcICQoLhgEMDQ4PhgELIAhBAWohAUHWACEeDOMBCyAIQQFqIQFB1wAhHgziAQsgCEEBaiEBQdwAIR4M4QELIAhBAWohAUHgACEeDOABCyAIQQFqIQFB4QAhHgzfAQsgCEEBaiEBQeQAIR4M3gELIAhBAWohAUHlACEeDN0BCyAIQQFqIQFB6AAhHgzcAQsgCEEBaiEBQfEAIR4M2wELIAhBAWohAUHyACEeDNoBCyAIQQFqIQFB8wAhHgzZAQsgCEEBaiEBQYABIR4M2AELIAhBAWohCEGGASEeDNcBCyAIQQFqIQhBjgEhHgzWAQsgCEEBaiEIQZEBIR4M1QELIAhBAWohCEGYASEeDNQBCwJAIBQgAkcNAEGrASEeDOQBCyAUQQFqIRMMdwsDQAJAIB4tAABBdmoOBHcAAHoACyAeQQFqIh4gAkcNAAtBrAEhHgziAQsCQCAVIAJGDQAgAEGNgICAADYCCCAAIBU2AgQgFSEBQQEhHgzSAQtBrQEhHgzhAQsCQCAVIAJHDQBBrgEhHgzhAQsCQAJAIBUtAABBdmoOBAGrAasBAKsBCyAVQQFqIRQMeAsgFUEBaiETDHQLIAAgEyACEKeAgIAAGiATIQEMRQsCQCAVIAJHDQBBrwEhHgzfAQsCQAJAIBUtAABBdmoOFwF5eQF5eXl5eXl5eXl5eXl5eXl5eXkAeQsgFUEBaiEVC0GcASEeDM4BCwJAIBYgAkcNAEGxASEeDN4BCyAWLQAAQSBHDXcgAEEAOwEyIBZBAWohAUGgASEeDM0BCyABISYCQANAICYiFSACRg0BIBUtAABBUGpB/wFxIh5BCk8NqAECQCAALwEyIiJBmTNLDQAgACAiQQpsIiI7ATIgHkH//wNzICJB/v8DcUkNACAVQQFqISYgACAiIB5qIh47ATIgHkH//wNxQegHSQ0BCwtBACEeIABBADYCHCAAQZ2JgIAANgIQIABBDTYCDCAAIBVBAWo2AhQM3QELQbABIR4M3AELAkAgFyACRw0AQbIBIR4M3AELQQAhHgJAAkACQAJAAkACQAJAAkAgFy0AAEFQag4Kf34AAQIDBAUGB4ABC0ECIR4MfgtBAyEeDH0LQQQhHgx8C0EFIR4MewtBBiEeDHoLQQchHgx5C0EIIR4MeAtBCSEeDHcLAkAgGCACRw0AQbMBIR4M2wELIBgtAABBLkcNeCAYQQFqIRcMpgELAkAgGSACRw0AQbQBIR4M2gELQQAhHgJAAkACQAJAAkACQAJAAkAgGS0AAEFQag4KgQGAAQABAgMEBQYHggELQQIhHgyAAQtBAyEeDH8LQQQhHgx+C0EFIR4MfQtBBiEeDHwLQQchHgx7C0EIIR4MegtBCSEeDHkLAkAgCCACRw0AQbUBIR4M2QELIAIgCGsgACgCACIiaiEmIAghGSAiIR4DQCAZLQAAIB5B/LOAgABqLQAARw17IB5BBEYNtAEgHkEBaiEeIBlBAWoiGSACRw0ACyAAICY2AgBBtQEhHgzYAQsCQCAaIAJHDQBBtgEhHgzYAQsgAiAaayAAKAIAIh5qISIgGiEIIB4hAQNAIAgtAAAgAUGBtICAAGotAABHDXsgAUEBRg22ASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIjYCAEG2ASEeDNcBCwJAIBsgAkcNAEG3ASEeDNcBCyACIBtrIAAoAgAiGWohIiAbIQggGSEeA0AgCC0AACAeQYO0gIAAai0AAEcNeiAeQQJGDXwgHkEBaiEeIAhBAWoiCCACRw0ACyAAICI2AgBBtwEhHgzWAQsCQCAIIAJHDQBBuAEhHgzWAQsCQAJAIAgtAABBu39qDhAAe3t7e3t7e3t7e3t7e3sBewsgCEEBaiEaQaUBIR4MxgELIAhBAWohG0GmASEeDMUBCwJAIAggAkcNAEG5ASEeDNUBCyAILQAAQcgARw14IAhBAWohCAyiAQsCQCAIIAJHDQBBugEhHgzUAQsgCC0AAEHIAEYNogEgAEEBOgAoDJkBCwNAAkAgCC0AAEF2ag4EAHp6AHoLIAhBAWoiCCACRw0AC0G8ASEeDNIBCyAAQQA6AC8gAC0ALUEEcUUNyAELIABBADoALyABIQEMeQsgHkEVRg2pASAAQQA2AhwgACABNgIUIABBq4yAgAA2AhAgAEESNgIMQQAhHgzPAQsCQCAAIB4gAhCtgICAACIBDQAgHiEBDMUBCwJAIAFBFUcNACAAQQM2AhwgACAeNgIUIABB1pKAgAA2AhAgAEEVNgIMQQAhHgzPAQsgAEEANgIcIAAgHjYCFCAAQauMgIAANgIQIABBEjYCDEEAIR4MzgELIB5BFUYNpQEgAEEANgIcIAAgATYCFCAAQYiMgIAANgIQIABBFDYCDEEAIR4MzQELIAAoAgQhJiAAQQA2AgQgHiAfp2oiIyEBIAAgJiAeICMgIhsiHhCugICAACIiRQ16IABBBzYCHCAAIB42AhQgACAiNgIMQQAhHgzMAQsgACAALwEwQYABcjsBMCABIQEMMQsgHkEVRg2hASAAQQA2AhwgACABNgIUIABBxYuAgAA2AhAgAEETNgIMQQAhHgzKAQsgAEEANgIcIAAgATYCFCAAQYuLgIAANgIQIABBAjYCDEEAIR4MyQELIB5BO0cNASABQQFqIQELQQghHgy3AQtBACEeIABBADYCHCAAIAE2AhQgAEGjkICAADYCECAAQQw2AgwMxgELQgEhHwsgHkEBaiEBAkAgACkDICIgQv//////////D1YNACAAICBCBIYgH4Q3AyAgASEBDHcLIABBADYCHCAAIAE2AhQgAEGJiYCAADYCECAAQQw2AgxBACEeDMQBCyAAQQA2AhwgACAeNgIUIABBo5CAgAA2AhAgAEEMNgIMQQAhHgzDAQsgACgCBCEmIABBADYCBCAeIB+naiIjIQEgACAmIB4gIyAiGyIeEK6AgIAAIiJFDW4gAEEFNgIcIAAgHjYCFCAAICI2AgxBACEeDMIBCyAAQQA2AhwgACAeNgIUIABB3ZSAgAA2AhAgAEEPNgIMQQAhHgzBAQsgACAeIAIQrYCAgAAiAQ0BIB4hAQtBDyEeDK8BCwJAIAFBFUcNACAAQQI2AhwgACAeNgIUIABB1pKAgAA2AhAgAEEVNgIMQQAhHgy/AQsgAEEANgIcIAAgHjYCFCAAQauMgIAANgIQIABBEjYCDEEAIR4MvgELIAFBAWohHgJAIAAvATAiAUGAAXFFDQACQCAAIB4gAhCwgICAACIBDQAgHiEBDGsLIAFBFUcNlwEgAEEFNgIcIAAgHjYCFCAAQb6SgIAANgIQIABBFTYCDEEAIR4MvgELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIB42AhQgAEHsj4CAADYCECAAQQQ2AgxBACEeDL4BCyAAIB4gAhCxgICAABogHiEBAkACQAJAAkACQCAAIB4gAhCsgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAeIQELQR0hHgyvAQsgAEEVNgIcIAAgHjYCFCAAQeGRgIAANgIQIABBFTYCDEEAIR4MvgELIABBADYCHCAAIB42AhQgAEGxi4CAADYCECAAQRE2AgxBACEeDL0BCyAALQAtQQFxRQ0BQaoBIR4MrAELAkAgHCACRg0AA0ACQCAcLQAAQSBGDQAgHCEBDKgBCyAcQQFqIhwgAkcNAAtBFyEeDLwBC0EXIR4MuwELIAAoAgQhASAAQQA2AgQgACABIBwQqICAgAAiAUUNkAEgAEEYNgIcIAAgATYCDCAAIBxBAWo2AhRBACEeDLoBCyAAQRk2AhwgACABNgIUIAAgHjYCDEEAIR4MuQELIB4hAUEBISICQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhIgwBC0EEISILIABBAToALCAAIAAvATAgInI7ATALIB4hAQtBICEeDKkBCyAAQQA2AhwgACAeNgIUIABBgY+AgAA2AhAgAEELNgIMQQAhHgy4AQsgHiEBQQEhIgJAAkACQAJAAkAgAC0ALEF7ag4EAgABAwULQQIhIgwBC0EEISILIABBAToALCAAIAAvATAgInI7ATAMAQsgACAALwEwQQhyOwEwCyAeIQELQasBIR4MpgELIAAgASACEKuAgIAAGgwbCwJAIAEiHiACRg0AIB4hAQJAAkAgHi0AAEF2ag4EAWpqAGoLIB5BAWohAQtBHiEeDKUBC0HDACEeDLQBCyAAQQA2AhwgACABNgIUIABBkZGAgAA2AhAgAEEDNgIMQQAhHgyzAQsCQCABLQAAQQ1HDQAgACgCBCEeIABBADYCBAJAIAAgHiABEKqAgIAAIh4NACABQQFqIQEMaQsgAEEeNgIcIAAgHjYCDCAAIAFBAWo2AhRBACEeDLMBCyABIQEgAC0ALUEBcUUNrgFBrQEhHgyiAQsCQCABIgEgAkcNAEEfIR4MsgELAkACQANAAkAgAS0AAEF2ag4EAgAAAwALIAFBAWoiASACRw0AC0EfIR4MswELIAAoAgQhHiAAQQA2AgQCQCAAIB4gARCqgICAACIeDQAgASEBDGgLIABBHjYCHCAAIAE2AhQgACAeNgIMQQAhHgyyAQsgACgCBCEeIABBADYCBAJAIAAgHiABEKqAgIAAIh4NACABQQFqIQEMZwsgAEEeNgIcIAAgHjYCDCAAIAFBAWo2AhRBACEeDLEBCyAeQSxHDQEgAUEBaiEeQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIB4hAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIB4hAQwBCyAAIAAvATBBCHI7ATAgHiEBC0EuIR4MnwELIABBADoALCABIQELQSkhHgydAQsgAEEANgIAICMgJGtBCWohAUEFIR4MmAELIABBADYCACAjICRrQQZqIQFBByEeDJcBCyAAIAAvATBBIHI7ATAgASEBDAILIAAoAgQhCCAAQQA2AgQCQCAAIAggARCqgICAACIIDQAgASEBDJ0BCyAAQSo2AhwgACABNgIUIAAgCDYCDEEAIR4MqQELIABBCDoALCABIQELQSUhHgyXAQsCQCAALQAoQQFGDQAgASEBDAQLIAAtAC1BCHFFDXggASEBDAMLIAAtADBBIHENeUGuASEeDJUBCwJAIB0gAkYNAAJAA0ACQCAdLQAAQVBqIgFB/wFxQQpJDQAgHSEBQSohHgyYAQsgACkDICIfQpmz5syZs+bMGVYNASAAIB9CCn4iHzcDICAfIAGtIiBCf4VCgH6EVg0BIAAgHyAgQv8Bg3w3AyAgHUEBaiIdIAJHDQALQSwhHgymAQsgACgCBCEIIABBADYCBCAAIAggHUEBaiIBEKqAgIAAIggNeiABIQEMmQELQSwhHgykAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDXULIAAgAUH3+wNxQYAEcjsBMCAdIQELQSwhHgySAQsgACAALwEwQRByOwEwDIcBCyAAQTY2AhwgACABNgIMIAAgHEEBajYCFEEAIR4MoAELIAEtAABBOkcNAiAAKAIEIR4gAEEANgIEIAAgHiABEKiAgIAAIh4NASABQQFqIQELQTEhHgyOAQsgAEE2NgIcIAAgHjYCDCAAIAFBAWo2AhRBACEeDJ0BCyAAQQA2AhwgACABNgIUIABBh46AgAA2AhAgAEEKNgIMQQAhHgycAQsgAUEBaiEBCyAAQYASOwEqIAAgASACEKWAgIAAGiABIQELQawBIR4MiQELIAAoAgQhHiAAQQA2AgQCQCAAIB4gARCkgICAACIeDQAgASEBDFALIABBxAA2AhwgACABNgIUIAAgHjYCDEEAIR4MmAELIABBADYCHCAAICI2AhQgAEHlmICAADYCECAAQQc2AgwgAEEANgIAQQAhHgyXAQsgACgCBCEeIABBADYCBAJAIAAgHiABEKSAgIAAIh4NACABIQEMTwsgAEHFADYCHCAAIAE2AhQgACAeNgIMQQAhHgyWAQtBACEeIABBADYCHCAAIAE2AhQgAEHrjYCAADYCECAAQQk2AgwMlQELQQEhHgsgACAeOgArIAFBAWohASAALQApQSJGDYsBDEwLIABBADYCHCAAIAE2AhQgAEGijYCAADYCECAAQQk2AgxBACEeDJIBCyAAQQA2AhwgACABNgIUIABBxYqAgAA2AhAgAEEJNgIMQQAhHgyRAQtBASEeCyAAIB46ACogAUEBaiEBDEoLIABBADYCHCAAIAE2AhQgAEG4jYCAADYCECAAQQk2AgxBACEeDI4BCyAAQQA2AgAgJiAja0EEaiEBAkAgAC0AKUEjTw0AIAEhAQxKCyAAQQA2AhwgACABNgIUIABBr4mAgAA2AhAgAEEINgIMQQAhHgyNAQsgAEEANgIAC0EAIR4gAEEANgIcIAAgATYCFCAAQbmbgIAANgIQIABBCDYCDAyLAQsgAEEANgIAICYgI2tBA2ohAQJAIAAtAClBIUcNACABIQEMRwsgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDEEAIR4MigELIABBADYCACAmICNrQQRqIQECQCAALQApIh5BXWpBC08NACABIQEMRgsCQCAeQQZLDQBBASAedEHKAHFFDQAgASEBDEYLQQAhHiAAQQA2AhwgACAB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HiAAQQA2AhwgACABNgIUIABB6pCAgAA2AhAgAEEZNgIMDAILIABBIDYCHCAAIAg2AgwgACABQQFqNgIUQQAhHgwBCwJAIAEiASACRw0AQRQhHgwBCyAAQYmAgIAANgIIIAAgATYCBEETIR4LIANBEGokgICAgAAgHguvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAELuAgIAAC5U3AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKgtICAAA0AQQAQvoCAgABBgLiEgABrIgJB2QBJDQBBACEDAkBBACgC4LeAgAAiBA0AQQBCfzcC7LeAgABBAEKAgISAgIDAADcC5LeAgABBACABQQhqQXBxQdiq1aoFcyIENgLgt4CAAEEAQQA2AvS3gIAAQQBBADYCxLeAgAALQQAgAjYCzLeAgABBAEGAuISAADYCyLeAgABBAEGAuISAADYCmLSAgABBACAENgKstICAAEEAQX82Aqi0gIAAA0AgA0HEtICAAGogA0G4tICAAGoiBDYCACAEIANBsLSAgABqIgU2AgAgA0G8tICAAGogBTYCACADQcy0gIAAaiADQcC0gIAAaiIFNgIAIAUgBDYCACADQdS0gIAAaiADQci0gIAAaiIENgIAIAQgBTYCACADQdC0gIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgLiEgABBeEGAuISAAGtBD3FBAEGAuISAAEEIakEPcRsiA2oiBEEEaiACIANrQUhqIgNBAXI2AgBBAEEAKALwt4CAADYCpLSAgABBACAENgKgtICAAEEAIAM2ApS0gIAAIAJBgLiEgABqQUxqQTg2AgALAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKItICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQAgA0EBcSAEckEBcyIFQQN0IgBBuLSAgABqKAIAIgRBCGohAwJA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AkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABQRhqIAQ2AgAgASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEYakEANgIAIAEgBDYCDCABIAA2AggLQQBBACgCqLSAgABBf2oiAUF/IAEbNgKotICAAAsLTgACQCAADQA/AEEQdA8LAkAgAEH//wNxDQAgAEF/TA0AAkAgAEEQdkAAIgBBf0cNAEEAQTA2Avi3gIAAQX8PCyAAQRB0DwsQv4CAgAAACwQAAAALC44sAQBBgAgLhiwBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHBhcmFtZXRlcnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AATUtBQ1RJVklUWQBDT1BZAE5PVElGWQBQTEFZAFBVVABDSEVDS09VVABQT1NUAFJFUE9SVABIUEVfSU5WQUxJRF9DT05TVEFOVABHRVQASFBFX1NUUklDVABSRURJUkVDVABDT05ORUNUAEhQRV9JTlZBTElEX1NUQVRVUwBPUFRJT05TAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAEhQRV9JTlZBTElEX1VSTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUAUEFVU0UAUFVSR0UATUVSR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABQUk9QRklORABVTkJJTkQAUkVCSU5EAEhQ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BQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAEAAAIAAAAAAAAAAAAAAAAAAAAAAAADBAAABAQEBAQEBAQEBAQFBAQEBAQEBAQEBAQEAAQABgcEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv"; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/client.js -var require_client = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/client.js"(exports, module2) { - "use strict"; - var assert = require("assert"); - var net2 = require("net"); - var util2 = require_util2(); - var Request = require_request(); - var DispatcherBase = require_dispatcher_base(); - var { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - InvalidArgumentError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError - } = require_errors(); - var buildConnector = require_connect(); - var { - kUrl, - kReset, - kServerName, - kClient, - kBusy, - kParser, - kConnect, - kBlocking, - kResuming, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors - } = require_symbols(); - var kClosedResolve = Symbol("kClosedResolve"); - var channels = {}; - try { - const diagnosticsChannel = require("diagnostics_channel"); - channels.sendHeaders = diagnosticsChannel.channel("undici:client:sendHeaders"); - channels.beforeConnect = diagnosticsChannel.channel("undici:client:beforeConnect"); - channels.connectError = diagnosticsChannel.channel("undici:client:connectError"); - channels.connected = diagnosticsChannel.channel("undici:client:connected"); - } catch (e2) { - channels.sendHeaders = { hasSubscribers: false }; - channels.beforeConnect = { hasSubscribers: false }; - channels.connectError = { hasSubscribers: false }; - channels.connected = { hasSubscribers: false }; - } - var Client = class extends DispatcherBase { - constructor(url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect: connect2, - maxRequestsPerClient - } = {}) { - super(); - if (keepAlive !== void 0) { - throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); - } - if (socketTimeout !== void 0) { - throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - } - if (requestTimeout !== void 0) { - throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - } - if (idleTimeout !== void 0) { - throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); - } - if (maxKeepAliveTimeout !== void 0) { - throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - } - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError("invalid maxHeaderSize"); - } - if (socketPath != null && typeof socketPath !== "string") { - throw new InvalidArgumentError("invalid socketPath"); - } - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError("invalid connectTimeout"); - } - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveTimeout"); - } - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); - } - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); - } - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); - } - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); - } - if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); - } - if (typeof connect2 !== "function") { - connect2 = buildConnector({ - ...tls, - maxCachedSessions, - socketPath, - timeout: connectTimeout, - ...connect2 - }); - } - this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util2.parseOrigin(url); - this[kConnector] = connect2; - this[kSocket] = null; - this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || 16384; - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; - this[kServerName] = null; - this[kResuming] = 0; - this[kNeedDrain] = 0; - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r -`; - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e4; - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e4; - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[kMaxRedirections] = maxRedirections; - this[kMaxRequests] = maxRequestsPerClient; - this[kClosedResolve] = null; - this[kQueue] = []; - this[kRunningIdx] = 0; - this[kPendingIdx] = 0; - } - get pipelining() { - return this[kPipelining]; - } - set pipelining(value) { - this[kPipelining] = value; - resume(this, true); - } - get [kPending]() { - return this[kQueue].length - this[kPendingIdx]; - } - get [kRunning]() { - return this[kPendingIdx] - this[kRunningIdx]; - } - get [kSize]() { - return this[kQueue].length - this[kRunningIdx]; - } - get [kConnected]() { - return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed; - } - get [kBusy]() { - const socket = this[kSocket]; - return socket && (socket[kReset] || socket[kWriting] || socket[kBlocking]) || this[kSize] >= (this[kPipelining] || 1) || this[kPending] > 0; - } - [kConnect](cb) { - connect(this); - this.once("connect", cb); - } - [kDispatch](opts, handler) { - const origin = opts.origin || this[kUrl].origin; - const request2 = new Request(origin, opts, handler); - this[kQueue].push(request2); - if (this[kResuming]) { - } else if (util2.bodyLength(request2.body) == null && util2.isIterable(request2.body)) { - this[kResuming] = 1; - process.nextTick(resume, this); - } else { - resume(this, true); - } - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2; - } - return this[kNeedDrain] < 2; - } - async [kClose]() { - return new Promise((resolve) => { - if (!this[kSize]) { - this.destroy(resolve); - } else { - this[kClosedResolve] = resolve; - } - }); - } - async [kDestroy](err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - errorRequest(this, request2, err); - } - const callback = /* @__PURE__ */ __name(() => { - if (this[kClosedResolve]) { - this[kClosedResolve](); - this[kClosedResolve] = null; - } - resolve(); - }, "callback"); - if (!this[kSocket]) { - queueMicrotask(callback); - } else { - util2.destroy(this[kSocket].on("close", callback), err); - } - resume(this); - }); - } - }; - __name(Client, "Client"); - var constants = require_constants2(); - var createRedirectInterceptor = require_redirectInterceptor(); - var EMPTY_BUF = Buffer.alloc(0); - async function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; - let mod2; - try { - mod2 = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); - } catch (e2) { - mod2 = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); - } - return await WebAssembly.instantiate(mod2, { - env: { - wasm_on_url: (p2, at, len) => { - return 0; - }, - wasm_on_status: (p2, at, len) => { - assert.strictEqual(currentParser.ptr, p2); - const start = at - currentBufferPtr; - const end = start + len; - return currentParser.onStatus(currentBufferRef.slice(start, end)) || 0; - }, - wasm_on_message_begin: (p2) => { - assert.strictEqual(currentParser.ptr, p2); - return currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p2, at, len) => { - assert.strictEqual(currentParser.ptr, p2); - const start = at - currentBufferPtr; - const end = start + len; - return currentParser.onHeaderField(currentBufferRef.slice(start, end)) || 0; - }, - wasm_on_header_value: (p2, at, len) => { - assert.strictEqual(currentParser.ptr, p2); - const start = at - currentBufferPtr; - const end = start + len; - return currentParser.onHeaderValue(currentBufferRef.slice(start, end)) || 0; - }, - wasm_on_headers_complete: (p2, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p2); - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p2, at, len) => { - assert.strictEqual(currentParser.ptr, p2); - const start = at - currentBufferPtr; - const end = start + len; - return currentParser.onBody(currentBufferRef.slice(start, end)) || 0; - }, - wasm_on_message_complete: (p2) => { - assert.strictEqual(currentParser.ptr, p2); - return currentParser.onMessageComplete() || 0; - } - } - }); - } - __name(lazyllhttp, "lazyllhttp"); - var llhttpInstance = null; - var llhttpPromise = lazyllhttp().catch(() => { - }); - var currentParser = null; - var currentBufferRef = null; - var currentBufferSize = 0; - var currentBufferPtr = null; - var TIMEOUT_HEADERS = 1; - var TIMEOUT_BODY = 2; - var TIMEOUT_IDLE = 3; - var Parser = class { - constructor(client, socket, { exports: exports2 }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); - this.llhttp = exports2; - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - } - setTimeout(value, type) { - this.timeoutType = type; - if (value !== this.timeoutValue) { - clearTimeout(this.timeout); - if (value) { - this.timeout = setTimeout(onParserTimeout, value, this); - if (this.timeout.unref) { - this.timeout.unref(); - } - } else { - this.timeout = null; - } - this.timeoutValue = value; - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - } - resume() { - if (this.socket.destroyed || !this.paused) { - return; - } - assert(this.ptr != null); - assert(currentParser == null); - this.llhttp.llhttp_resume(this.ptr); - assert(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF); - this.readMore(); - } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) { - break; - } - this.execute(chunk); - } - } - execute(data) { - assert(this.ptr != null); - assert(currentParser == null); - assert(!this.paused); - const { socket, llhttp } = this; - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr); - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096; - currentBufferPtr = llhttp.malloc(currentBufferSize); - } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); - try { - let ret; - try { - currentBufferRef = data; - currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); - } catch (err) { - throw err; - } finally { - currentParser = null; - currentBufferRef = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)); - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = Buffer.from(llhttp.memory.buffer, ptr, len).toString(); - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); - } - } catch (err) { - util2.destroy(socket, err); - } - } - finish() { - try { - try { - currentParser = this; - } finally { - currentParser = null; - } - } catch (err) { - util2.destroy(this.socket, err); - } - } - destroy() { - assert(this.ptr != null); - assert(currentParser == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - onStatus(buf) { - this.statusText = buf.toString(); - } - onMessageBegin() { - const { socket, client } = this; - if (socket.destroyed) { - return -1; - } - const request2 = client[kQueue][client[kRunningIdx]]; - if (!request2) { - return -1; - } - } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) { - this.headers.push(buf); - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } - this.trackHeader(buf.length); - } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } - const key = this.headers[len - 2]; - if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") { - this.keepAlive += buf.toString(); - } else if (key.length === 14 && key.toString().toLowerCase() === "content-length") { - this.contentLength += buf.toString(); - } - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) { - util2.destroy(this.socket, new HeadersOverflowError()); - } - } - onUpgrade(head) { - const { upgrade, client, socket, headers, statusCode } = this; - assert(upgrade); - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert(!socket.destroyed); - assert(socket === client[kSocket]); - assert(!this.paused); - assert(request2.upgrade || request2.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser].destroy(); - socket[kParser] = null; - socket[kClient] = null; - socket[kError] = null; - socket.removeListener("error", onSocketError).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose); - client[kSocket] = null; - client[kQueue][client[kRunningIdx]++] = null; - client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); - try { - request2.onUpgrade(statusCode, headers, socket); - } catch (err) { - util2.destroy(socket, err); - } - resume(client); - } - onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - if (socket.destroyed) { - return -1; - } - const request2 = client[kQueue][client[kRunningIdx]]; - if (!request2) { - return -1; - } - assert(!this.upgrade); - assert(this.statusCode < 200); - if (statusCode === 100) { - util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket))); - return -1; - } - if (upgrade && !request2.upgrade) { - util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket))); - return -1; - } - assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive; - if (this.statusCode >= 200) { - const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY); - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - if (request2.method === "CONNECT") { - assert(client[kRunning] === 1); - this.upgrade = true; - return 2; - } - if (upgrade) { - assert(client[kRunning] === 1); - this.upgrade = true; - return 2; - } - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util2.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ); - if (timeout <= 0) { - socket[kReset] = true; - } else { - client[kKeepAliveTimeoutValue] = timeout; - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; - } - } else { - socket[kReset] = true; - } - let pause; - try { - pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false; - } catch (err) { - util2.destroy(socket, err); - return -1; - } - if (request2.method === "HEAD") { - assert(socket[kReset]); - return 1; - } - if (statusCode < 200) { - return 1; - } - if (socket[kBlocking]) { - socket[kBlocking] = false; - resume(client); - } - return pause ? constants.ERROR.PAUSED : 0; - } - onBody(buf) { - const { client, socket, statusCode } = this; - if (socket.destroyed) { - return -1; - } - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert.strictEqual(this.timeoutType, TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - assert(statusCode >= 200); - this.bytesRead += buf.length; - try { - if (request2.onData(buf) === false) { - return constants.ERROR.PAUSED; - } - } catch (err) { - util2.destroy(socket, err); - return -1; - } - } - onMessageComplete() { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1; - } - if (upgrade) { - return; - } - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert(statusCode >= 100); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) { - return; - } - if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util2.destroy(socket, new ResponseContentLengthMismatchError()); - return -1; - } - try { - request2.onComplete(headers); - } catch (err) { - errorRequest(client, request2, err); - } - client[kQueue][client[kRunningIdx]++] = null; - if (socket[kWriting]) { - assert.strictEqual(client[kRunning], 0); - util2.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util2.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (socket[kReset] && client[kRunning] === 0) { - util2.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (client[kPipelining] === 1) { - setImmediate(resume, client); - } else { - resume(client); - } - } - }; - __name(Parser, "Parser"); - function onParserTimeout(parser) { - const { socket, timeoutType, client } = parser; - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!parser.paused, "cannot be paused while waiting for headers"); - util2.destroy(socket, new HeadersTimeoutError()); - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) { - util2.destroy(socket, new BodyTimeoutError()); - } - } else if (timeoutType === TIMEOUT_IDLE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); - util2.destroy(socket, new InformationalError("socket idle timeout")); - } - } - __name(onParserTimeout, "onParserTimeout"); - function onSocketReadable() { - const { [kParser]: parser } = this; - parser.readMore(); - } - __name(onSocketReadable, "onSocketReadable"); - function onSocketError(err) { - const { [kParser]: parser } = this; - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.finish(); - return; - } - this[kError] = err; - onError(this[kClient], err); - } - __name(onSocketError, "onSocketError"); - function onError(client, err) { - if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert(client[kPendingIdx] === client[kRunningIdx]); - const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - errorRequest(client, request2, err); - } - assert(client[kSize] === 0); - } - } - __name(onError, "onError"); - function onSocketEnd() { - const { [kParser]: parser } = this; - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.finish(); - return; - } - util2.destroy(this, new SocketError("other side closed", util2.getSocketInfo(this))); - } - __name(onSocketEnd, "onSocketEnd"); - function onSocketClose() { - const { [kClient]: client } = this; - this[kParser].destroy(); - this[kParser] = null; - const err = this[kError] || new SocketError("closed", util2.getSocketInfo(this)); - client[kSocket] = null; - if (client.destroyed) { - assert(client[kPending] === 0); - const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - errorRequest(client, request2, err); - } - } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { - const request2 = client[kQueue][client[kRunningIdx]]; - client[kQueue][client[kRunningIdx]++] = null; - errorRequest(client, request2, err); - } - client[kPendingIdx] = client[kRunningIdx]; - assert(client[kRunning] === 0); - client.emit("disconnect", client[kUrl], [client], err); - resume(client); - } - __name(onSocketClose, "onSocketClose"); - async function connect(client) { - assert(!client[kConnecting]); - assert(!client[kSocket]); - let { host, hostname: hostname3, protocol, port } = client[kUrl]; - if (hostname3[0] === "[") { - const idx = hostname3.indexOf("]"); - assert(idx !== -1); - const ip = hostname3.substr(1, idx - 1); - assert(net2.isIP(ip)); - hostname3 = ip; - } - client[kConnecting] = true; - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname: hostname3, - protocol, - port, - servername: client[kServerName] - }, - connector: client[kConnector] - }); - } - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname: hostname3, - protocol, - port, - servername: client[kServerName] - }, (err, socket2) => { - if (err) { - reject(err); - } else { - resolve(socket2); - } - }); - }); - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise; - llhttpPromise = null; - } - client[kConnecting] = false; - assert(socket); - client[kSocket] = socket; - socket[kNoRef] = false; - socket[kWriting] = false; - socket[kReset] = false; - socket[kBlocking] = false; - socket[kError] = null; - socket[kParser] = new Parser(client, socket, llhttpInstance); - socket[kClient] = client; - socket[kCounter] = 0; - socket[kMaxRequests] = client[kMaxRequests]; - socket.on("error", onSocketError).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose); - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname: hostname3, - protocol, - port, - servername: client[kServerName] - }, - connector: client[kConnector], - socket - }); - } - client.emit("connect", client[kUrl], [client]); - } catch (err) { - client[kConnecting] = false; - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname: hostname3, - protocol, - port, - servername: client[kServerName] - }, - connector: client[kConnector], - error: err - }); - } - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert(client[kRunning] === 0); - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request2 = client[kQueue][client[kPendingIdx]++]; - errorRequest(client, request2, err); - } - } else { - onError(client, err); - } - client.emit("connectionError", client[kUrl], [client], err); - } - resume(client); - } - __name(connect, "connect"); - function emitDrain(client) { - client[kNeedDrain] = 0; - client.emit("drain", client[kUrl], [client]); - } - __name(emitDrain, "emitDrain"); - function resume(client, sync) { - if (client[kResuming] === 2) { - return; - } - client[kResuming] = 2; - _resume(client, sync); - client[kResuming] = 0; - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]); - client[kPendingIdx] -= client[kRunningIdx]; - client[kRunningIdx] = 0; - } - } - __name(resume, "resume"); - function _resume(client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0); - return; - } - if (client.closed && !client[kSize]) { - client.destroy(); - return; - } - const socket = client[kSocket]; - if (socket) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref(); - socket[kNoRef] = true; - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref(); - socket[kNoRef] = false; - } - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request3 = client[kQueue][client[kRunningIdx]]; - const headersTimeout = request3.headersTimeout != null ? request3.headersTimeout : client[kHeadersTimeout]; - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); - } - } - } - if (client[kBusy]) { - client[kNeedDrain] = 2; - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1; - process.nextTick(emitDrain, client); - } else { - emitDrain(client); - } - continue; - } - if (client[kPending] === 0) { - return; - } - if (client[kRunning] >= (client[kPipelining] || 1)) { - return; - } - const request2 = client[kQueue][client[kPendingIdx]]; - if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) { - if (client[kRunning] > 0) { - return; - } - client[kServerName] = request2.servername; - if (socket && socket.servername !== request2.servername) { - util2.destroy(socket, new InformationalError("servername changed")); - return; - } - } - if (client[kConnecting]) { - return; - } - if (!socket) { - connect(client); - continue; - } - if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return; - } - if (client[kRunning] > 0 && !request2.idempotent) { - return; - } - if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) { - return; - } - if (util2.isStream(request2.body) && util2.bodyLength(request2.body) === 0) { - request2.body.on("data", function() { - assert(false); - }).on("error", function(err) { - errorRequest(client, request2, err); - }).on("end", function() { - util2.destroy(this); - }); - request2.body = null; - } - if (client[kRunning] > 0 && (util2.isStream(request2.body) || util2.isAsyncIterable(request2.body))) { - return; - } - if (!request2.aborted && write(client, request2)) { - client[kPendingIdx]++; - } else { - client[kQueue].splice(client[kPendingIdx], 1); - } - } - } - __name(_resume, "_resume"); - function write(client, request2) { - const { body, method, path: path7, host, upgrade, headers, blocking } = request2; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") { - body.read(0); - } - let contentLength = util2.bodyLength(body); - if (contentLength === null) { - contentLength = request2.contentLength; - } - if (contentLength === 0 && !expectsPayload) { - contentLength = null; - } - if (request2.contentLength !== null && request2.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request2, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - const socket = client[kSocket]; - try { - request2.onConnect((err) => { - if (request2.aborted || request2.completed) { - return; - } - errorRequest(client, request2, err || new RequestAbortedError()); - util2.destroy(socket, new InformationalError("aborted")); - }); - } catch (err) { - errorRequest(client, request2, err); - } - if (request2.aborted) { - return false; - } - if (method === "HEAD") { - socket[kReset] = true; - } - if (upgrade || method === "CONNECT") { - socket[kReset] = true; - } - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true; - } - if (blocking) { - socket[kBlocking] = true; - } - let header = `${method} ${path7} HTTP/1.1\r -`; - if (typeof host === "string") { - header += `host: ${host}\r -`; - } else { - header += client[kHostHeader]; - } - if (upgrade) { - header += `connection: upgrade\r -upgrade: ${upgrade}\r -`; - } else if (client[kPipelining]) { - header += "connection: keep-alive\r\n"; - } else { - header += "connection: close\r\n"; - } - if (headers) { - header += headers; - } - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request: request2, headers: header, socket }); - } - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r -\r -`, "ascii"); - } else { - assert(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r -`, "ascii"); - } - request2.onRequestSent(); - } else if (util2.isBuffer(body)) { - assert(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "ascii"); - socket.write(body); - socket.uncork(); - request2.onBodySent(body); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - } else if (util2.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable({ body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); - } else { - writeBlob({ body, client, request: request2, socket, contentLength, header, expectsPayload }); - } - } else if (util2.isStream(body)) { - writeStream({ body, client, request: request2, socket, contentLength, header, expectsPayload }); - } else if (util2.isIterable(body)) { - writeIterable({ body, client, request: request2, socket, contentLength, header, expectsPayload }); - } else { - assert(false); - } - return true; - } - __name(write, "write"); - function writeStream({ body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - let finished = false; - const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); - const onData = /* @__PURE__ */ __name(function(chunk) { - try { - assert(!finished); - if (!writer.write(chunk) && this.pause) { - this.pause(); - } - } catch (err) { - util2.destroy(this, err); - } - }, "onData"); - const onDrain = /* @__PURE__ */ __name(function() { - assert(!finished); - if (body.resume) { - body.resume(); - } - }, "onDrain"); - const onAbort = /* @__PURE__ */ __name(function() { - onFinished(new RequestAbortedError()); - }, "onAbort"); - const onFinished = /* @__PURE__ */ __name(function(err) { - if (finished) { - return; - } - finished = true; - assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); - if (!err) { - try { - writer.end(); - } catch (er) { - err = er; - } - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util2.destroy(body, err); - } else { - util2.destroy(body); - } - }, "onFinished"); - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); - if (body.resume) { - body.resume(); - } - socket.on("drain", onDrain).on("error", onFinished); - } - __name(writeStream, "writeStream"); - async function writeBlob({ body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } - const buffer = Buffer.from(await body.arrayBuffer()); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "ascii"); - socket.write(buffer); - socket.uncork(); - request2.onBodySent(buffer); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - resume(client); - } catch (err) { - util2.destroy(socket, err); - } - } - __name(writeBlob, "writeBlob"); - async function writeIterable({ body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - __name(onDrain, "onDrain"); - const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve, reject) => { - assert(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } - }), "waitForDrain"); - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); - try { - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - if (!writer.write(chunk)) { - await waitForDrain(); - } - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); - } - } - __name(writeIterable, "writeIterable"); - var AsyncWriter = class { - constructor({ socket, request: request2, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request2; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - socket[kWriting] = true; - } - write(chunk) { - const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return false; - } - const len = Buffer.byteLength(chunk); - if (!len) { - return true; - } - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - if (bytesWritten === 0) { - if (!expectsPayload) { - socket[kReset] = true; - } - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r -`, "ascii"); - } else { - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "ascii"); - } - } - if (contentLength === null) { - socket.write(`\r -${len.toString(16)}\r -`, "ascii"); - } - this.bytesWritten += len; - const ret = socket.write(chunk); - request2.onBodySent(chunk); - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - } - return ret; - } - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this; - request2.onRequestSent(); - socket[kWriting] = false; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return; - } - if (bytesWritten === 0) { - if (expectsPayload) { - socket.write(`${header}content-length: 0\r -\r -`, "ascii"); - } else { - socket.write(`${header}\r -`, "ascii"); - } - } else if (contentLength === null) { - socket.write("\r\n0\r\n\r\n", "ascii"); - } - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } else { - process.emitWarning(new RequestContentLengthMismatchError()); - } - } - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - resume(client); - } - destroy(err) { - const { socket, client } = this; - socket[kWriting] = false; - if (err) { - assert(client[kRunning] <= 1, "pipeline should only contain this request"); - util2.destroy(socket, err); - } - } - }; - __name(AsyncWriter, "AsyncWriter"); - function errorRequest(client, request2, err) { - try { - request2.onError(err); - assert(request2.aborted); - } catch (err2) { - client.emit("error", err2); - } - } - __name(errorRequest, "errorRequest"); - module2.exports = Client; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/node/fixed-queue.js -var require_fixed_queue = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module2) { - "use strict"; - var kSize = 2048; - var kMask = kSize - 1; - var FixedCircularBuffer = class { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - isEmpty() { - return this.top === this.bottom; - } - isFull() { - return (this.top + 1 & kMask) === this.bottom; - } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask; - } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) - return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask; - return nextItem; - } - }; - __name(FixedCircularBuffer, "FixedCircularBuffer"); - module2.exports = /* @__PURE__ */ __name(class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - isEmpty() { - return this.head.isEmpty(); - } - push(data) { - if (this.head.isFull()) { - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - this.tail = tail.next; - } - return next; - } - }, "FixedQueue"); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool-stats.js -var require_pool_stats = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool-stats.js"(exports, module2) { - var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); - var kPool = Symbol("pool"); - var PoolStats = class { - constructor(pool) { - this[kPool] = pool; - } - get connected() { - return this[kPool][kConnected]; - } - get free() { - return this[kPool][kFree]; - } - get pending() { - return this[kPool][kPending]; - } - get queued() { - return this[kPool][kQueued]; - } - get running() { - return this[kPool][kRunning]; - } - get size() { - return this[kPool][kSize]; - } - }; - __name(PoolStats, "PoolStats"); - module2.exports = PoolStats; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool-base.js -var require_pool_base = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool-base.js"(exports, module2) { - "use strict"; - var DispatcherBase = require_dispatcher_base(); - var FixedQueue = require_fixed_queue(); - var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols(); - var PoolStats = require_pool_stats(); - var kClients = Symbol("clients"); - var kNeedDrain = Symbol("needDrain"); - var kQueue = Symbol("queue"); - var kClosedResolve = Symbol("closed resolve"); - var kOnDrain = Symbol("onDrain"); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kGetDispatcher = Symbol("get dispatcher"); - var kAddClient = Symbol("add client"); - var kRemoveClient = Symbol("remove client"); - var kStats = Symbol("stats"); - var PoolBase = class extends DispatcherBase { - constructor() { - super(); - this[kQueue] = new FixedQueue(); - this[kClients] = []; - this[kQueued] = 0; - const pool = this; - this[kOnDrain] = /* @__PURE__ */ __name(function onDrain(origin, targets) { - const queue = pool[kQueue]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) { - break; - } - pool[kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain] = needDrain; - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false; - pool.emit("drain", origin, [pool, ...targets]); - } - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); - } - }, "onDrain"); - this[kOnConnect] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - this[kStats] = new PoolStats(this); - } - get [kBusy]() { - return this[kNeedDrain]; - } - get [kConnected]() { - return this[kClients].filter((client) => client[kConnected]).length; - } - get [kFree]() { - return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; - } - get [kPending]() { - let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients]) { - ret += pending; - } - return ret; - } - get [kRunning]() { - let ret = 0; - for (const { [kRunning]: running } of this[kClients]) { - ret += running; - } - return ret; - } - get [kSize]() { - let ret = this[kQueued]; - for (const { [kSize]: size } of this[kClients]) { - ret += size; - } - return ret; - } - get stats() { - return this[kStats]; - } - async [kClose]() { - if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map((c) => c.close())); - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); - } - } - async [kDestroy](err) { - while (true) { - const item = this[kQueue].shift(); - if (!item) { - break; - } - item.handler.onError(err); - } - return Promise.all(this[kClients].map((c) => c.destroy(err))); - } - [kDispatch](opts, handler) { - const dispatcher = this[kGetDispatcher](); - if (!dispatcher) { - this[kNeedDrain] = true; - this[kQueue].push({ opts, handler }); - this[kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true; - this[kNeedDrain] = !this[kGetDispatcher](); - } - return !this[kNeedDrain]; - } - [kAddClient](client) { - client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].push(client); - if (this[kNeedDrain]) { - process.nextTick(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]); - } - }); - } - return this; - } - [kRemoveClient](client) { - client.close(() => { - const idx = this[kClients].indexOf(client); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } - }); - this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); - } - }; - __name(PoolBase, "PoolBase"); - module2.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool.js -var require_pool = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/pool.js"(exports, module2) { - "use strict"; - var { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher - } = require_pool_base(); - var Client = require_client(); - var { - InvalidArgumentError - } = require_errors(); - var util2 = require_util2(); - var { kUrl, kInterceptors } = require_symbols(); - var buildConnector = require_connect(); - var kOptions = Symbol("options"); - var kConnections = Symbol("connections"); - var kFactory = Symbol("factory"); - function defaultFactory(origin, opts) { - return new Client(origin, opts); - } - __name(defaultFactory, "defaultFactory"); - var Pool = class extends PoolBase { - constructor(origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - ...options - } = {}) { - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError("invalid connections"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - socketPath, - timeout: connectTimeout == null ? 1e4 : connectTimeout, - ...connect - }); - } - this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[kConnections] = connections || null; - this[kUrl] = util2.parseOrigin(origin); - this[kOptions] = { ...util2.deepClone(options), connect }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory] = factory; - } - [kGetDispatcher]() { - let dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain]); - if (dispatcher) { - return dispatcher; - } - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - dispatcher = this[kFactory](this[kUrl], this[kOptions]); - this[kAddClient](dispatcher); - } - return dispatcher; - } - }; - __name(Pool, "Pool"); - module2.exports = Pool; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/balanced-pool.js -var require_balanced_pool = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/balanced-pool.js"(exports, module2) { - "use strict"; - var { - BalancedPoolMissingUpstreamError, - InvalidArgumentError - } = require_errors(); - var { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher - } = require_pool_base(); - var Pool = require_pool(); - var { kUrl, kInterceptors } = require_symbols(); - var { parseOrigin } = require_util2(); - var kFactory = Symbol("factory"); - var kOptions = Symbol("options"); - var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); - var kCurrentWeight = Symbol("kCurrentWeight"); - var kIndex = Symbol("kIndex"); - var kWeight = Symbol("kWeight"); - var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); - var kErrorPenalty = Symbol("kErrorPenalty"); - function getGreatestCommonDivisor(a, b2) { - if (b2 === 0) - return a; - return getGreatestCommonDivisor(b2, a % b2); - } - __name(getGreatestCommonDivisor, "getGreatestCommonDivisor"); - function defaultFactory(origin, opts) { - return new Pool(origin, opts); - } - __name(defaultFactory, "defaultFactory"); - var BalancedPool = class extends PoolBase { - constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super(); - this[kOptions] = opts; - this[kIndex] = -1; - this[kCurrentWeight] = 0; - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; - this[kErrorPenalty] = this[kOptions].errorPenalty || 15; - if (!Array.isArray(upstreams)) { - upstreams = [upstreams]; - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; - this[kFactory] = factory; - for (const upstream of upstreams) { - this.addUpstream(upstream); - } - this._updateBalancedPoolStats(); - } - addUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { - return this; - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); - this[kAddClient](pool); - pool.on("connect", () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); - }); - pool.on("connectionError", () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - }); - pool.on("disconnect", (...args) => { - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - } - }); - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer]; - } - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - this[kGreatestCommonDivisor] = this[kClients].map((p2) => p2[kWeight]).reduce(getGreatestCommonDivisor, 0); - } - removeUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); - if (pool) { - this[kRemoveClient](pool); - } - return this; - } - get upstreams() { - return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p2) => p2[kUrl].origin); - } - [kGetDispatcher]() { - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError(); - } - const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); - if (!dispatcher) { - return; - } - const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b2) => a && b2, true); - if (allClientsBusy) { - return; - } - let counter = 0; - let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length; - const pool = this[kClients][this[kIndex]]; - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex]; - } - if (this[kIndex] === 0) { - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer]; - } - } - if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { - return pool; - } - } - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; - this[kIndex] = maxWeightIndex; - return this[kClients][maxWeightIndex]; - } - }; - __name(BalancedPool, "BalancedPool"); - module2.exports = BalancedPool; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/compat/dispatcher-weakref.js -var require_dispatcher_weakref = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module2) { - "use strict"; - var { kConnected, kSize } = require_symbols(); - var CompatWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; - } - }; - __name(CompatWeakRef, "CompatWeakRef"); - var CompatFinalizer = class { - constructor(finalizer) { - this.finalizer = finalizer; - } - register(dispatcher, key) { - dispatcher.on("disconnect", () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key); - } - }); - } - }; - __name(CompatFinalizer, "CompatFinalizer"); - module2.exports = function() { - return { - WeakRef: global.WeakRef || CompatWeakRef, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer - }; - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/agent.js -var require_agent = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/agent.js"(exports, module2) { - "use strict"; - var { InvalidArgumentError } = require_errors(); - var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); - var DispatcherBase = require_dispatcher_base(); - var Pool = require_pool(); - var Client = require_client(); - var util2 = require_util2(); - var createRedirectInterceptor = require_redirectInterceptor(); - var { WeakRef: WeakRef2, FinalizationRegistry } = require_dispatcher_weakref()(); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kMaxRedirections = Symbol("maxRedirections"); - var kOnDrain = Symbol("onDrain"); - var kFactory = Symbol("factory"); - var kFinalizer = Symbol("finalizer"); - var kOptions = Symbol("options"); - function defaultFactory(origin, opts) { - return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); - } - __name(defaultFactory, "defaultFactory"); - var Agent = class extends DispatcherBase { - constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super(); - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - if (connect && typeof connect !== "function") { - connect = { ...connect }; - } - this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; - this[kOptions] = { ...util2.deepClone(options), connect }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kMaxRedirections] = maxRedirections; - this[kFactory] = factory; - this[kClients] = /* @__PURE__ */ new Map(); - this[kFinalizer] = new FinalizationRegistry((key) => { - const ref = this[kClients].get(key); - if (ref !== void 0 && ref.deref() === void 0) { - this[kClients].delete(key); - } - }); - const agent = this; - this[kOnDrain] = (origin, targets) => { - agent.emit("drain", origin, [agent, ...targets]); - }; - this[kOnConnect] = (origin, targets) => { - agent.emit("connect", origin, [agent, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - agent.emit("disconnect", origin, [agent, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - agent.emit("connectionError", origin, [agent, ...targets], err); - }; - } - get [kRunning]() { - let ret = 0; - for (const ref of this[kClients].values()) { - const client = ref.deref(); - if (client) { - ret += client[kRunning]; - } - } - return ret; - } - [kDispatch](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { - key = String(opts.origin); - } else { - throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); - } - const ref = this[kClients].get(key); - let dispatcher = ref ? ref.deref() : null; - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].set(key, new WeakRef2(dispatcher)); - this[kFinalizer].register(dispatcher, key); - } - return dispatcher.dispatch(opts, handler); - } - async [kClose]() { - const closePromises = []; - for (const ref of this[kClients].values()) { - const client = ref.deref(); - if (client) { - closePromises.push(client.close()); - } - } - await Promise.all(closePromises); - } - async [kDestroy](err) { - const destroyPromises = []; - for (const ref of this[kClients].values()) { - const client = ref.deref(); - if (client) { - destroyPromises.push(client.destroy(err)); - } - } - await Promise.all(destroyPromises); - } - }; - __name(Agent, "Agent"); - module2.exports = Agent; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/readable.js -var require_readable = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/readable.js"(exports, module2) { - "use strict"; - var assert = require("assert"); - var { Readable } = require("stream"); - var { RequestAbortedError, NotSupportedError } = require_errors(); - var util2 = require_util2(); - var { ReadableStreamFrom, toUSVString } = require_util2(); - var Blob; - var kConsume = Symbol("kConsume"); - var kReading = Symbol("kReading"); - var kBody = Symbol("kBody"); - var kAbort = Symbol("abort"); - var kContentType = Symbol("kContentType"); - module2.exports = /* @__PURE__ */ __name(class BodyReadable extends Readable { - constructor(resume, abort, contentType = "") { - super({ - autoDestroy: true, - read: resume, - highWaterMark: 64 * 1024 - }); - this._readableState.dataEmitted = false; - this[kAbort] = abort; - this[kConsume] = null; - this[kBody] = null; - this[kContentType] = contentType; - this[kReading] = false; - } - destroy(err) { - if (this.destroyed) { - return this; - } - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (err) { - this[kAbort](); - } - return super.destroy(err); - } - emit(ev, ...args) { - if (ev === "data") { - this._readableState.dataEmitted = true; - } else if (ev === "error") { - this._readableState.errorEmitted = true; - } - return super.emit(ev, ...args); - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") { - this[kReading] = true; - } - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") { - this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - } - return ret; - } - removeListener(ev, ...args) { - return this.off(ev, ...args); - } - push(chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { - consumePush(this[kConsume], chunk); - return this[kReading] ? super.push(chunk) : true; - } - return super.push(chunk); - } - async text() { - return consume(this, "text"); - } - async json() { - return consume(this, "json"); - } - async blob() { - return consume(this, "blob"); - } - async arrayBuffer() { - return consume(this, "arrayBuffer"); - } - async formData() { - throw new NotSupportedError(); - } - get bodyUsed() { - return util2.isDisturbed(this); - } - get body() { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this); - if (this[kConsume]) { - this[kBody].getReader(); - assert(this[kBody].locked); - } - } - return this[kBody]; - } - async dump(opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; - try { - for await (const chunk of this) { - limit -= Buffer.byteLength(chunk); - if (limit < 0) { - return; - } - } - } catch (e2) { - } - } - }, "BodyReadable"); - function isLocked(self2) { - return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; - } - __name(isLocked, "isLocked"); - function isUnusable(self2) { - return util2.isDisturbed(self2) || isLocked(self2); - } - __name(isUnusable, "isUnusable"); - async function consume(stream2, type) { - if (isUnusable(stream2)) { - throw new TypeError("unusable"); - } - assert(!stream2[kConsume]); - return new Promise((resolve, reject) => { - stream2[kConsume] = { - type, - stream: stream2, - resolve, - reject, - length: 0, - body: [] - }; - stream2.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()); - } - }); - process.nextTick(consumeStart, stream2[kConsume]); - }); - } - __name(consume, "consume"); - function consumeStart(consume2) { - if (consume2.body === null) { - return; - } - const { _readableState: state } = consume2.stream; - for (const chunk of state.buffer) { - consumePush(consume2, chunk); - } - if (state.endEmitted) { - consumeEnd(this[kConsume]); - } else { - consume2.stream.on("end", function() { - consumeEnd(this[kConsume]); - }); - } - consume2.stream.resume(); - while (consume2.stream.read() != null) { - } - } - __name(consumeStart, "consumeStart"); - function consumeEnd(consume2) { - const { type, body, resolve, stream: stream2, length } = consume2; - try { - if (type === "text") { - resolve(toUSVString(Buffer.concat(body))); - } else if (type === "json") { - resolve(JSON.parse(Buffer.concat(body))); - } else if (type === "arrayBuffer") { - const dst = new Uint8Array(length); - let pos = 0; - for (const buf of body) { - dst.set(buf, pos); - pos += buf.byteLength; - } - resolve(dst); - } else if (type === "blob") { - if (!Blob) { - Blob = require("buffer").Blob; - } - resolve(new Blob(body, { type: stream2[kContentType] })); - } - consumeFinish(consume2); - } catch (err) { - stream2.destroy(err); - } - } - __name(consumeEnd, "consumeEnd"); - function consumePush(consume2, chunk) { - consume2.length += chunk.length; - consume2.body.push(chunk); - } - __name(consumePush, "consumePush"); - function consumeFinish(consume2, err) { - if (consume2.body === null) { - return; - } - if (err) { - consume2.reject(err); - } else { - consume2.resolve(); - } - consume2.type = null; - consume2.stream = null; - consume2.resolve = null; - consume2.reject = null; - consume2.length = 0; - consume2.body = null; - } - __name(consumeFinish, "consumeFinish"); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/abort-signal.js -var require_abort_signal = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/abort-signal.js"(exports, module2) { - var { RequestAbortedError } = require_errors(); - var kListener = Symbol("kListener"); - var kSignal = Symbol("kSignal"); - function abort(self2) { - if (self2.abort) { - self2.abort(); - } else { - self2.onError(new RequestAbortedError()); - } - } - __name(abort, "abort"); - function addSignal(self2, signal) { - self2[kSignal] = null; - self2[kListener] = null; - if (!signal) { - return; - } - if (signal.aborted) { - abort(self2); - return; - } - self2[kSignal] = signal; - self2[kListener] = () => { - abort(self2); - }; - if ("addEventListener" in self2[kSignal]) { - self2[kSignal].addEventListener("abort", self2[kListener]); - } else { - self2[kSignal].addListener("abort", self2[kListener]); - } - } - __name(addSignal, "addSignal"); - function removeSignal(self2) { - if (!self2[kSignal]) { - return; - } - if ("removeEventListener" in self2[kSignal]) { - self2[kSignal].removeEventListener("abort", self2[kListener]); - } else { - self2[kSignal].removeListener("abort", self2[kListener]); - } - self2[kSignal] = null; - self2[kListener] = null; - } - __name(removeSignal, "removeSignal"); - module2.exports = { - addSignal, - removeSignal - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-request.js -var require_api_request = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-request.js"(exports, module2) { - "use strict"; - var Readable = require_readable(); - var { - InvalidArgumentError, - RequestAbortedError, - ResponseStatusCodeError - } = require_errors(); - var util2 = require_util2(); - var { AsyncResource: AsyncResource2 } = require("async_hooks"); - var { addSignal, removeSignal } = require_abort_signal(); - var RequestHandler2 = class extends AsyncResource2 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; - try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_REQUEST"); - } catch (err) { - if (util2.isStream(body)) { - util2.destroy(body.on("error", util2.nop), err); - } - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - if (util2.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } - addSignal(this, signal); - } - onConnect(abort, context3) { - if (!this.callback) { - throw new RequestAbortedError(); - } - this.abort = abort; - this.context = context3; - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context: context3 } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers2 = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - this.onInfo({ statusCode, headers: headers2 }); - } - return; - } - const parsedHeaders = util2.parseHeaders(rawHeaders); - const contentType = parsedHeaders["content-type"]; - const body = new Readable(resume, abort, contentType); - this.callback = null; - this.res = body; - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope( - getResolveErrorBodyCallback, - null, - { callback, body, contentType, statusCode, statusMessage, headers } - ); - return; - } - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context: context3 - }); - } - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - removeSignal(this); - util2.parseHeaders(trailers, this.trailers); - res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util2.destroy(res, err); - }); - } - if (body) { - this.body = null; - util2.destroy(body, err); - } - } - }; - __name(RequestHandler2, "RequestHandler"); - async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - if (statusCode === 204 || !contentType) { - body.dump(); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - return; - } - try { - if (contentType.startsWith("application/json")) { - const payload = await body.json(); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - if (contentType.startsWith("text/")) { - const payload = await body.text(); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - } catch (err) { - } - body.dump(); - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - } - __name(getResolveErrorBodyCallback, "getResolveErrorBodyCallback"); - function request2(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - this.dispatch(opts, new RequestHandler2(opts, callback)); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - __name(request2, "request"); - module2.exports = request2; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-stream.js -var require_api_stream = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-stream.js"(exports, module2) { - "use strict"; - var { finished } = require("stream"); - var { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError - } = require_errors(); - var util2 = require_util2(); - var { AsyncResource: AsyncResource2 } = require("async_hooks"); - var { addSignal, removeSignal } = require_abort_signal(); - var StreamHandler = class extends AsyncResource2 { - constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - const { signal, method, opaque, body, onInfo, responseHeaders } = opts; - try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("invalid factory"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_STREAM"); - } catch (err) { - if (util2.isStream(body)) { - util2.destroy(body.on("error", util2.nop), err); - } - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - if (util2.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } - addSignal(this, signal); - } - onConnect(abort, context3) { - if (!this.callback) { - throw new RequestAbortedError(); - } - this.abort = abort; - this.context = context3; - } - onHeaders(statusCode, rawHeaders, resume) { - const { factory, opaque, context: context3 } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers2 = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - this.onInfo({ statusCode, headers: headers2 }); - } - return; - } - this.factory = null; - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - const res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context: context3 - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { - throw new InvalidReturnValueError("expected Writable"); - } - res.on("drain", resume); - finished(res, { readable: false }, (err) => { - const { callback, res: res2, opaque: opaque2, trailers, abort } = this; - this.res = null; - if (err || !res2.readable) { - util2.destroy(res2, err); - } - this.callback = null; - this.runInAsyncScope(callback, null, err || null, { opaque: opaque2, trailers }); - if (err) { - abort(); - } - }); - this.res = res; - const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res } = this; - return res.write(chunk); - } - onComplete(trailers) { - const { res } = this; - removeSignal(this); - this.trailers = util2.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res, callback, opaque, body } = this; - removeSignal(this); - this.factory = null; - if (res) { - this.res = null; - util2.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (body) { - this.body = null; - util2.destroy(body, err); - } - } - }; - __name(StreamHandler, "StreamHandler"); - function stream2(opts, factory, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - stream2.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - __name(stream2, "stream"); - module2.exports = stream2; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-pipeline.js -var require_api_pipeline = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module2) { - "use strict"; - var { - Readable, - Duplex, - PassThrough - } = require("stream"); - var { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError - } = require_errors(); - var util2 = require_util2(); - var { AsyncResource: AsyncResource2 } = require("async_hooks"); - var { addSignal, removeSignal } = require_abort_signal(); - var assert = require("assert"); - var kResume = Symbol("resume"); - var PipelineRequest = class extends Readable { - constructor() { - super({ autoDestroy: true }); - this[kResume] = null; - } - _read() { - const { [kResume]: resume } = this; - if (resume) { - this[kResume] = null; - resume(); - } - } - _destroy(err, callback) { - this._read(); - callback(err); - } - }; - __name(PipelineRequest, "PipelineRequest"); - var PipelineResponse = class extends Readable { - constructor(resume) { - super({ autoDestroy: true }); - this[kResume] = resume; - } - _read() { - this[kResume](); - } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - callback(err); - } - }; - __name(PipelineResponse, "PipelineResponse"); - var PipelineHandler = class extends AsyncResource2 { - constructor(opts, handler) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof handler !== "function") { - throw new InvalidArgumentError("invalid handler"); - } - const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", util2.nop); - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this; - if (body && body.resume) { - body.resume(); - } - }, - write: (chunk, encoding, callback) => { - const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback(); - } else { - req[kResume] = callback; - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this; - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (abort && err) { - abort(); - } - util2.destroy(body, err); - util2.destroy(req, err); - util2.destroy(res, err); - removeSignal(this); - callback(err); - } - }).on("prefinish", () => { - const { req } = this; - req.push(null); - }); - this.res = null; - addSignal(this, signal); - } - onConnect(abort, context3) { - const { ret, res } = this; - assert(!res, "pipeline cannot be retried"); - if (ret.destroyed) { - throw new RequestAbortedError(); - } - this.abort = abort; - this.context = context3; - } - onHeaders(statusCode, rawHeaders, resume) { - const { opaque, handler, context: context3 } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - this.onInfo({ statusCode, headers }); - } - return; - } - this.res = new PipelineResponse(resume); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context: context3 - }); - } catch (err) { - this.res.on("error", util2.nop); - throw err; - } - if (!body || typeof body.on !== "function") { - throw new InvalidReturnValueError("expected Readable"); - } - body.on("data", (chunk) => { - const { ret, body: body2 } = this; - if (!ret.push(chunk) && body2.pause) { - body2.pause(); - } - }).on("error", (err) => { - const { ret } = this; - util2.destroy(ret, err); - }).on("end", () => { - const { ret } = this; - ret.push(null); - }).on("close", () => { - const { ret } = this; - if (!ret._readableState.ended) { - util2.destroy(ret, new RequestAbortedError()); - } - }); - this.body = body; - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - res.push(null); - } - onError(err) { - const { ret } = this; - this.handler = null; - util2.destroy(ret, err); - } - }; - __name(PipelineHandler, "PipelineHandler"); - function pipeline(opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler); - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new PassThrough().destroy(err); - } - } - __name(pipeline, "pipeline"); - module2.exports = pipeline; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-upgrade.js -var require_api_upgrade = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module2) { - "use strict"; - var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); - var { AsyncResource: AsyncResource2 } = require("async_hooks"); - var util2 = require_util2(); - var { addSignal, removeSignal } = require_abort_signal(); - var assert = require("assert"); - var UpgradeHandler = class extends AsyncResource2 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - addSignal(this, signal); - } - onConnect(abort, context3) { - if (!this.callback) { - throw new RequestAbortedError(); - } - this.abort = abort; - this.context = null; - } - onHeaders() { - throw new SocketError("bad upgrade", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context3 } = this; - assert.strictEqual(statusCode, 101); - removeSignal(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context: context3 - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - __name(UpgradeHandler, "UpgradeHandler"); - function upgrade(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - const upgradeHandler = new UpgradeHandler(opts, callback); - this.dispatch({ - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - __name(upgrade, "upgrade"); - module2.exports = upgrade; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-connect.js -var require_api_connect = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/api-connect.js"(exports, module2) { - "use strict"; - var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); - var { AsyncResource: AsyncResource2 } = require("async_hooks"); - var util2 = require_util2(); - var { addSignal, removeSignal } = require_abort_signal(); - var ConnectHandler = class extends AsyncResource2 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - addSignal(this, signal); - } - onConnect(abort, context3) { - if (!this.callback) { - throw new RequestAbortedError(); - } - this.abort = abort; - this.context = context3; - } - onHeaders() { - throw new SocketError("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context3 } = this; - removeSignal(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context: context3 - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - __name(ConnectHandler, "ConnectHandler"); - function connect(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - const connectHandler = new ConnectHandler(opts, callback); - this.dispatch({ ...opts, method: "CONNECT" }, connectHandler); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - __name(connect, "connect"); - module2.exports = connect; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/index.js -var require_api = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/api/index.js"(exports, module2) { - "use strict"; - module2.exports.request = require_api_request(); - module2.exports.stream = require_api_stream(); - module2.exports.pipeline = require_api_pipeline(); - module2.exports.upgrade = require_api_upgrade(); - module2.exports.connect = require_api_connect(); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-errors.js -var require_mock_errors = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module2) { - "use strict"; - var { UndiciError } = require_errors(); - var MockNotMatchedError = class extends UndiciError { - constructor(message) { - super(message); - Error.captureStackTrace(this, MockNotMatchedError); - this.name = "MockNotMatchedError"; - this.message = message || "The request does not match any registered mock dispatches"; - this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; - } - }; - __name(MockNotMatchedError, "MockNotMatchedError"); - module2.exports = { - MockNotMatchedError - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-symbols.js -var require_mock_symbols = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module2) { - "use strict"; - module2.exports = { - kAgent: Symbol("agent"), - kOptions: Symbol("options"), - kFactory: Symbol("factory"), - kDispatches: Symbol("dispatches"), - kDispatchKey: Symbol("dispatch key"), - kDefaultHeaders: Symbol("default headers"), - kDefaultTrailers: Symbol("default trailers"), - kContentLength: Symbol("content length"), - kMockAgent: Symbol("mock agent"), - kMockAgentSet: Symbol("mock agent set"), - kMockAgentGet: Symbol("mock agent get"), - kMockDispatch: Symbol("mock dispatch"), - kClose: Symbol("close"), - kOriginalClose: Symbol("original agent close"), - kOrigin: Symbol("origin"), - kIsMockActive: Symbol("is mock active"), - kNetConnect: Symbol("net connect"), - kGetNetConnect: Symbol("get net connect"), - kConnected: Symbol("connected") - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-utils.js -var require_mock_utils = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module2) { - "use strict"; - var { MockNotMatchedError } = require_mock_errors(); - var { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect - } = require_mock_symbols(); - var { buildURL, nop } = require_util2(); - var { STATUS_CODES } = require("http"); - function matchValue(match, value) { - if (typeof match === "string") { - return match === value; - } - if (match instanceof RegExp) { - return match.test(value); - } - if (typeof match === "function") { - return match(value) === true; - } - return false; - } - __name(matchValue, "matchValue"); - function lowerCaseEntries(headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue]; - }) - ); - } - __name(lowerCaseEntries, "lowerCaseEntries"); - function getHeaderByName(headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1]; - } - } - return void 0; - } else if (typeof headers.get === "function") { - return headers.get(key); - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; - } - } - __name(getHeaderByName, "getHeaderByName"); - function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); - const entries = []; - for (let index = 0; index < clone2.length; index += 2) { - entries.push([clone2[index], clone2[index + 1]]); - } - return Object.fromEntries(entries); - } - __name(buildHeadersFromArray, "buildHeadersFromArray"); - function matchHeaders(mockDispatch2, headers) { - if (typeof mockDispatch2.headers === "function") { - if (Array.isArray(headers)) { - headers = buildHeadersFromArray(headers); - } - return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {}); - } - if (typeof mockDispatch2.headers === "undefined") { - return true; - } - if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") { - return false; - } - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName); - if (!matchValue(matchHeaderValue, headerValue)) { - return false; - } - } - return true; - } - __name(matchHeaders, "matchHeaders"); - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; - } - const pathSegments = path7.split("?"); - if (pathSegments.length !== 2) { - return path7; - } - const qp = new URLSearchParams(pathSegments.pop()); - qp.sort(); - return [...pathSegments, qp.toString()].join("?"); - } - __name(safeUrl, "safeUrl"); - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); - const methodMatch = matchValue(mockDispatch2.method, method); - const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; - const headersMatch = matchHeaders(mockDispatch2, headers); - return pathMatch && methodMatch && bodyMatch && headersMatch; - } - __name(matchKey, "matchKey"); - function getResponseData(data) { - if (Buffer.isBuffer(data)) { - return data; - } else if (typeof data === "object") { - return JSON.stringify(data); - } else { - return data.toString(); - } - } - __name(getResponseData, "getResponseData"); - function getMockDispatch(mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path7 }) => matchValue(safeUrl(path7), resolvedPath)); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); - } - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); - } - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); - } - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers)); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); - } - return matchedMockDispatches[0]; - } - __name(getMockDispatch, "getMockDispatch"); - function addMockDispatch(mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }; - const replyData = typeof data === "function" ? { callback: data } : { ...data }; - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }; - mockDispatches.push(newMockDispatch); - return newMockDispatch; - } - __name(addMockDispatch, "addMockDispatch"); - function deleteMockDispatch(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch) => { - if (!dispatch.consumed) { - return false; - } - return matchKey(dispatch, key); - }); - if (index !== -1) { - mockDispatches.splice(index, 1); - } - } - __name(deleteMockDispatch, "deleteMockDispatch"); - function buildKey(opts) { - const { path: path7, method, body, headers, query: query2 } = opts; - return { - path: path7, - method, - body, - headers, - query: query2 - }; - } - __name(buildKey, "buildKey"); - function generateKeyValues(data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [...keyValuePairs, key, value], []); - } - __name(generateKeyValues, "generateKeyValues"); - function getStatusText(statusCode) { - return STATUS_CODES[statusCode] || "unknown"; - } - __name(getStatusText, "getStatusText"); - async function getResponse(body) { - const buffers = []; - for await (const data of body) { - buffers.push(data); - } - return Buffer.concat(buffers).toString("utf8"); - } - __name(getResponse, "getResponse"); - function mockDispatch(opts, handler) { - const key = buildKey(opts); - const mockDispatch2 = getMockDispatch(this[kDispatches], key); - mockDispatch2.timesInvoked++; - if (mockDispatch2.data.callback) { - mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; - } - const { data: { statusCode, data, headers, trailers, error: error2 }, delay, persist } = mockDispatch2; - const { timesInvoked, times } = mockDispatch2; - mockDispatch2.consumed = !persist && timesInvoked >= times; - mockDispatch2.pending = timesInvoked < times; - if (error2 !== null) { - deleteMockDispatch(this[kDispatches], key); - handler.onError(error2); - return true; - } - if (typeof delay === "number" && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]); - }, delay); - } else { - handleReply(this[kDispatches]); - } - function handleReply(mockDispatches) { - const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; - const responseData = getResponseData( - typeof data === "function" ? data({ ...opts, headers: optsHeaders }) : data - ); - const responseHeaders = generateKeyValues(headers); - const responseTrailers = generateKeyValues(trailers); - handler.abort = nop; - handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)); - handler.onData(Buffer.from(responseData)); - handler.onComplete(responseTrailers); - deleteMockDispatch(mockDispatches, key); - } - __name(handleReply, "handleReply"); - function resume() { - } - __name(resume, "resume"); - return true; - } - __name(mockDispatch, "mockDispatch"); - function buildMockDispatch() { - const agent = this[kMockAgent]; - const origin = this[kOrigin]; - const originalDispatch = this[kOriginalDispatch]; - return /* @__PURE__ */ __name(function dispatch(opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler); - } catch (error2) { - if (error2 instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect](); - if (netConnect === false) { - throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler); - } else { - throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } - } else { - throw error2; - } - } - } else { - originalDispatch.call(this, opts, handler); - } - }, "dispatch"); - } - __name(buildMockDispatch, "buildMockDispatch"); - function checkNetConnect(netConnect, origin) { - const url = new URL(origin); - if (netConnect === true) { - return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true; - } - return false; - } - __name(checkNetConnect, "checkNetConnect"); - function buildMockOptions(opts) { - if (opts) { - const { agent, ...mockOptions } = opts; - return mockOptions; - } - } - __name(buildMockOptions, "buildMockOptions"); - module2.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-interceptor.js -var require_mock_interceptor = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module2) { - "use strict"; - var { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); - var { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch - } = require_mock_symbols(); - var { InvalidArgumentError } = require_errors(); - var { buildURL } = require_util2(); - var MockScope = class { - constructor(mockDispatch) { - this[kMockDispatch] = mockDispatch; - } - delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); - } - this[kMockDispatch].delay = waitInMs; - return this; - } - persist() { - this[kMockDispatch].persist = true; - return this; - } - times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); - } - this[kMockDispatch].times = repeatTimes; - return this; - } - }; - __name(MockScope, "MockScope"); - var MockInterceptor = class { - constructor(opts, mockDispatches) { - if (typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object"); - } - if (typeof opts.path === "undefined") { - throw new InvalidArgumentError("opts.path must be defined"); - } - if (typeof opts.method === "undefined") { - opts.method = "GET"; - } - if (typeof opts.path === "string") { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query); - } else { - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - } - if (typeof opts.method === "string") { - opts.method = opts.method.toUpperCase(); - } - this[kDispatchKey] = buildKey(opts); - this[kDispatches] = mockDispatches; - this[kDefaultHeaders] = {}; - this[kDefaultTrailers] = {}; - this[kContentLength] = false; - } - createMockScopeDispatchData(statusCode, data, responseOptions = {}) { - const responseData = getResponseData(data); - const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; - return { statusCode, data, headers, trailers }; - } - validateReplyParameters(statusCode, data, responseOptions) { - if (typeof statusCode === "undefined") { - throw new InvalidArgumentError("statusCode must be defined"); - } - if (typeof data === "undefined") { - throw new InvalidArgumentError("data must be defined"); - } - if (typeof responseOptions !== "object") { - throw new InvalidArgumentError("responseOptions must be an object"); - } - } - reply(replyData) { - if (typeof replyData === "function") { - const wrappedDefaultsCallback = /* @__PURE__ */ __name((opts) => { - const resolvedData = replyData(opts); - if (typeof resolvedData !== "object") { - throw new InvalidArgumentError("reply options callback must return an object"); - } - const { statusCode: statusCode2, data: data2 = "", responseOptions: responseOptions2 = {} } = resolvedData; - this.validateReplyParameters(statusCode2, data2, responseOptions2); - return { - ...this.createMockScopeDispatchData(statusCode2, data2, responseOptions2) - }; - }, "wrappedDefaultsCallback"); - const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback); - return new MockScope(newMockDispatch2); - } - const [statusCode, data = "", responseOptions = {}] = [...arguments]; - this.validateReplyParameters(statusCode, data, responseOptions); - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData); - return new MockScope(newMockDispatch); - } - replyWithError(error2) { - if (typeof error2 === "undefined") { - throw new InvalidArgumentError("error must be defined"); - } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); - return new MockScope(newMockDispatch); - } - defaultReplyHeaders(headers) { - if (typeof headers === "undefined") { - throw new InvalidArgumentError("headers must be defined"); - } - this[kDefaultHeaders] = headers; - return this; - } - defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") { - throw new InvalidArgumentError("trailers must be defined"); - } - this[kDefaultTrailers] = trailers; - return this; - } - replyContentLength() { - this[kContentLength] = true; - return this; - } - }; - __name(MockInterceptor, "MockInterceptor"); - module2.exports.MockInterceptor = MockInterceptor; - module2.exports.MockScope = MockScope; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-client.js -var require_mock_client = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-client.js"(exports, module2) { - "use strict"; - var { promisify: promisify4 } = require("util"); - var Client = require_client(); - var { buildMockDispatch } = require_mock_utils(); - var { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected - } = require_mock_symbols(); - var { MockInterceptor } = require_mock_interceptor(); - var Symbols = require_symbols(); - var { InvalidArgumentError } = require_errors(); - var MockClient = class extends Client { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } - this[kMockAgent] = opts.agent; - this[kOrigin] = origin; - this[kDispatches] = []; - this[kConnected] = 1; - this[kOriginalDispatch] = this.dispatch; - this[kOriginalClose] = this.close.bind(this); - this.dispatch = buildMockDispatch.call(this); - this.close = this[kClose]; - } - get [Symbols.kConnected]() { - return this[kConnected]; - } - intercept(opts) { - return new MockInterceptor(opts, this[kDispatches]); - } - async [kClose]() { - await promisify4(this[kOriginalClose])(); - this[kConnected] = 0; - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); - } - }; - __name(MockClient, "MockClient"); - module2.exports = MockClient; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-pool.js -var require_mock_pool = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module2) { - "use strict"; - var { promisify: promisify4 } = require("util"); - var Pool = require_pool(); - var { buildMockDispatch } = require_mock_utils(); - var { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected - } = require_mock_symbols(); - var { MockInterceptor } = require_mock_interceptor(); - var Symbols = require_symbols(); - var { InvalidArgumentError } = require_errors(); - var MockPool = class extends Pool { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } - this[kMockAgent] = opts.agent; - this[kOrigin] = origin; - this[kDispatches] = []; - this[kConnected] = 1; - this[kOriginalDispatch] = this.dispatch; - this[kOriginalClose] = this.close.bind(this); - this.dispatch = buildMockDispatch.call(this); - this.close = this[kClose]; - } - get [Symbols.kConnected]() { - return this[kConnected]; - } - intercept(opts) { - return new MockInterceptor(opts, this[kDispatches]); - } - async [kClose]() { - await promisify4(this[kOriginalClose])(); - this[kConnected] = 0; - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); - } - }; - __name(MockPool, "MockPool"); - module2.exports = MockPool; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/pluralizer.js -var require_pluralizer = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module2) { - "use strict"; - var singulars = { - pronoun: "it", - is: "is", - was: "was", - this: "this" - }; - var plurals = { - pronoun: "they", - is: "are", - was: "were", - this: "these" - }; - module2.exports = /* @__PURE__ */ __name(class Pluralizer { - constructor(singular, plural) { - this.singular = singular; - this.plural = plural; - } - pluralize(count2) { - const one = count2 === 1; - const keys2 = one ? singulars : plurals; - const noun = one ? this.singular : this.plural; - return { ...keys2, count: count2, noun }; - } - }, "Pluralizer"); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js -var require_pending_interceptors_formatter = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module2) { - "use strict"; - var { Transform } = require("stream"); - var { Console } = require("console"); - module2.exports = /* @__PURE__ */ __name(class PendingInterceptorsFormatter { - constructor({ disableColors } = {}) { - this.transform = new Transform({ - transform(chunk, _enc, cb) { - cb(null, chunk); - } - }); - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }); - } - format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path7, - "Status code": statusCode, - Persistent: persist ? "\u2705" : "\u274C", - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - }) - ); - this.logger.table(withPrettyHeaders); - return this.transform.read().toString(); - } - }, "PendingInterceptorsFormatter"); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-agent.js -var require_mock_agent = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module2) { - "use strict"; - var { kClients } = require_symbols(); - var Agent = require_agent(); - var { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory - } = require_mock_symbols(); - var MockClient = require_mock_client(); - var MockPool = require_mock_pool(); - var { matchValue, buildMockOptions } = require_mock_utils(); - var { InvalidArgumentError, UndiciError } = require_errors(); - var Dispatcher = require_dispatcher(); - var Pluralizer = require_pluralizer(); - var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); - var FakeWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value; - } - }; - __name(FakeWeakRef, "FakeWeakRef"); - var MockAgent = class extends Dispatcher { - constructor(opts) { - super(opts); - this[kNetConnect] = true; - this[kIsMockActive] = true; - if (opts && opts.agent && typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } - const agent = opts && opts.agent ? opts.agent : new Agent(opts); - this[kAgent] = agent; - this[kClients] = agent[kClients]; - this[kOptions] = buildMockOptions(opts); - } - get(origin) { - let dispatcher = this[kMockAgentGet](origin); - if (!dispatcher) { - dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - } - return dispatcher; - } - dispatch(opts, handler) { - this.get(opts.origin); - return this[kAgent].dispatch(opts, handler); - } - async close() { - await this[kAgent].close(); - this[kClients].clear(); - } - deactivate() { - this[kIsMockActive] = false; - } - activate() { - this[kIsMockActive] = true; - } - enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher); - } else { - this[kNetConnect] = [matcher]; - } - } else if (typeof matcher === "undefined") { - this[kNetConnect] = true; - } else { - throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); - } - } - disableNetConnect() { - this[kNetConnect] = false; - } - get isMockActive() { - return this[kIsMockActive]; - } - [kMockAgentSet](origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)); - } - [kFactory](origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]); - return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); - } - [kMockAgentGet](origin) { - const ref = this[kClients].get(origin); - if (ref) { - return ref.deref(); - } - if (typeof origin !== "string") { - const dispatcher = this[kFactory]("http://localhost:9999"); - this[kMockAgentSet](origin, dispatcher); - return dispatcher; - } - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { - const nonExplicitDispatcher = nonExplicitRef.deref(); - if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; - return dispatcher; - } - } - } - [kGetNetConnect]() { - return this[kNetConnect]; - } - pendingInterceptors() { - const mockAgentClients = this[kClients]; - return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending); - } - assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors(); - if (pending.length === 0) { - return; - } - const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()); - } - }; - __name(MockAgent, "MockAgent"); - module2.exports = MockAgent; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/proxy-agent.js -var require_proxy_agent = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/proxy-agent.js"(exports, module2) { - "use strict"; - var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); - var { URL: URL3 } = require("url"); - var Agent = require_agent(); - var Client = require_client(); - var DispatcherBase = require_dispatcher_base(); - var { InvalidArgumentError, RequestAbortedError } = require_errors(); - var buildConnector = require_connect(); - var kAgent = Symbol("proxy agent"); - var kClient = Symbol("proxy client"); - var kProxyHeaders = Symbol("proxy headers"); - var kRequestTls = Symbol("request tls settings"); - var kProxyTls = Symbol("proxy tls settings"); - var kConnectEndpoint = Symbol("connect endpoint function"); - function defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; - } - __name(defaultProtocolPort, "defaultProtocolPort"); - function buildProxyOptions(opts) { - if (typeof opts === "string") { - opts = { uri: opts }; - } - if (!opts || !opts.uri) { - throw new InvalidArgumentError("Proxy opts.uri is mandatory"); - } - return { - uri: opts.uri, - protocol: opts.protocol || "https" - }; - } - __name(buildProxyOptions, "buildProxyOptions"); - var ProxyAgent = class extends DispatcherBase { - constructor(opts) { - super(opts); - this[kProxy] = buildProxyOptions(opts); - this[kAgent] = new Agent(opts); - this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - if (typeof opts === "string") { - opts = { uri: opts }; - } - if (!opts || !opts.uri) { - throw new InvalidArgumentError("Proxy opts.uri is mandatory"); - } - this[kRequestTls] = opts.requestTls; - this[kProxyTls] = opts.proxyTls; - this[kProxyHeaders] = {}; - if (opts.auth) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - } - const resolvedUrl = new URL3(opts.uri); - const { origin, port, host } = resolvedUrl; - const connect = buildConnector({ ...opts.proxyTls }); - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); - this[kClient] = new Client(resolvedUrl, { connect }); - this[kAgent] = new Agent({ - ...opts, - connect: async (opts2, callback) => { - let requestedHost = opts2.host; - if (!opts2.port) { - requestedHost += `:${defaultProtocolPort(opts2.protocol)}`; - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedHost, - signal: opts2.signal, - headers: { - ...this[kProxyHeaders], - host - } - }); - if (statusCode !== 200) { - socket.on("error", () => { - }).destroy(); - callback(new RequestAbortedError("Proxy response !== 200 when HTTP Tunneling")); - } - if (opts2.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls]) { - servername = this[kRequestTls].servername; - } else { - servername = opts2.servername; - } - this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); - } catch (err) { - callback(err); - } - } - }); - } - dispatch(opts, handler) { - const { host } = new URL3(opts.origin); - const headers = buildHeaders2(opts.headers); - throwIfProxyAuthIsSent(headers); - return this[kAgent].dispatch( - { - ...opts, - headers: { - ...headers, - host - } - }, - handler - ); - } - async [kClose]() { - await this[kAgent].close(); - await this[kClient].close(); - } - async [kDestroy]() { - await this[kAgent].destroy(); - await this[kClient].destroy(); - } - }; - __name(ProxyAgent, "ProxyAgent"); - function buildHeaders2(headers) { - if (Array.isArray(headers)) { - const headersPair = {}; - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1]; - } - return headersPair; - } - return headers; - } - __name(buildHeaders2, "buildHeaders"); - function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) { - throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); - } - } - __name(throwIfProxyAuthIsSent, "throwIfProxyAuthIsSent"); - module2.exports = ProxyAgent; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/global.js -var require_global = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/global.js"(exports, module2) { - "use strict"; - var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); - var { InvalidArgumentError } = require_errors(); - var Agent = require_agent(); - if (getGlobalDispatcher() === void 0) { - setGlobalDispatcher(new Agent()); - } - function setGlobalDispatcher(agent) { - if (!agent || typeof agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument agent must implement Agent"); - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }); - } - __name(setGlobalDispatcher, "setGlobalDispatcher"); - function getGlobalDispatcher() { - return globalThis[globalDispatcher]; - } - __name(getGlobalDispatcher, "getGlobalDispatcher"); - module2.exports = { - setGlobalDispatcher, - getGlobalDispatcher - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/handler/DecoratorHandler.js -var require_DecoratorHandler = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module2) { - "use strict"; - module2.exports = /* @__PURE__ */ __name(class DecoratorHandler { - constructor(handler) { - this.handler = handler; - } - onConnect(...args) { - return this.handler.onConnect(...args); - } - onError(...args) { - return this.handler.onError(...args); - } - onUpgrade(...args) { - return this.handler.onUpgrade(...args); - } - onHeaders(...args) { - return this.handler.onHeaders(...args); - } - onData(...args) { - return this.handler.onData(...args); - } - onComplete(...args) { - return this.handler.onComplete(...args); - } - onBodySent(...args) { - return this.handler.onBodySent(...args); - } - }, "DecoratorHandler"); - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/headers.js -var require_headers = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/headers.js"(exports, module2) { - "use strict"; - var { kHeadersList } = require_symbols(); - var { kGuard } = require_symbols2(); - var { kEnumerableProperty } = require_util2(); - var { - makeIterator, - isValidHeaderName, - isValidHeaderValue - } = require_util3(); - var { webidl } = require_webidl(); - var kHeadersMap = Symbol("headers map"); - var kHeadersSortedMap = Symbol("headers map sorted"); - function headerValueNormalize(potentialValue) { - return potentialValue.replace( - /^[\r\n\t ]+|[\r\n\t ]+$/g, - "" - ); - } - __name(headerValueNormalize, "headerValueNormalize"); - function fill(headers, object) { - if (Array.isArray(object)) { - for (const header of object) { - if (header.length !== 2) { - webidl.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - } - headers.append(header[0], header[1]); - } - } else if (typeof object === "object" && object !== null) { - for (const [key, value] of Object.entries(object)) { - headers.append(key, value); - } - } else { - webidl.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - } - } - __name(fill, "fill"); - var HeadersList = class { - constructor(init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]); - this[kHeadersSortedMap] = init[kHeadersSortedMap]; - } else { - this[kHeadersMap] = new Map(init); - this[kHeadersSortedMap] = null; - } - } - contains(name) { - name = name.toLowerCase(); - return this[kHeadersMap].has(name); - } - clear() { - this[kHeadersMap].clear(); - this[kHeadersSortedMap] = null; - } - append(name, value) { - this[kHeadersSortedMap] = null; - name = name.toLowerCase(); - const exists4 = this[kHeadersMap].get(name); - if (exists4) { - this[kHeadersMap].set(name, `${exists4}, ${value}`); - } else { - this[kHeadersMap].set(name, `${value}`); - } - } - set(name, value) { - this[kHeadersSortedMap] = null; - name = name.toLowerCase(); - return this[kHeadersMap].set(name, value); - } - delete(name) { - this[kHeadersSortedMap] = null; - name = name.toLowerCase(); - return this[kHeadersMap].delete(name); - } - get(name) { - var _a3; - name = name.toLowerCase(); - if (!this.contains(name)) { - return null; - } - return (_a3 = this[kHeadersMap].get(name)) != null ? _a3 : null; - } - has(name) { - name = name.toLowerCase(); - return this[kHeadersMap].has(name); - } - keys() { - return this[kHeadersMap].keys(); - } - values() { - return this[kHeadersMap].values(); - } - entries() { - return this[kHeadersMap].entries(); - } - [Symbol.iterator]() { - return this[kHeadersMap][Symbol.iterator](); - } - }; - __name(HeadersList, "HeadersList"); - var Headers = class { - constructor(init = void 0) { - this[kHeadersList] = new HeadersList(); - this[kGuard] = "none"; - if (init !== void 0) { - init = webidl.converters.HeadersInit(init); - fill(this, init); - } - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - append(name, value) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'append' on 'Headers': 2 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.ByteString(name); - value = webidl.converters.ByteString(value); - value = headerValueNormalize(value); - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - } else if (!isValidHeaderValue(value)) { - webidl.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - } - if (this[kGuard] === "immutable") { - throw new TypeError("immutable"); - } else if (this[kGuard] === "request-no-cors") { - } - return this[kHeadersList].append(name, value); - } - delete(name) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'delete' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.ByteString(name); - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - } - if (this[kGuard] === "immutable") { - throw new TypeError("immutable"); - } else if (this[kGuard] === "request-no-cors") { - } - if (!this[kHeadersList].contains(name)) { - return; - } - return this[kHeadersList].delete(name); - } - get(name) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'get' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.ByteString(name); - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: "Headers.get", - value: name, - type: "header name" - }); - } - return this[kHeadersList].get(name); - } - has(name) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'has' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.ByteString(name); - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: "Headers.has", - value: name, - type: "header name" - }); - } - return this[kHeadersList].contains(name); - } - set(name, value) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'set' on 'Headers': 2 arguments required, but only ${arguments.length} present.` - ); - } - name = webidl.converters.ByteString(name); - value = webidl.converters.ByteString(value); - value = headerValueNormalize(value); - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: "Headers.set", - value: name, - type: "header name" - }); - } else if (!isValidHeaderValue(value)) { - webidl.errors.invalidArgument({ - prefix: "Headers.set", - value, - type: "header value" - }); - } - if (this[kGuard] === "immutable") { - throw new TypeError("immutable"); - } else if (this[kGuard] === "request-no-cors") { - } - return this[kHeadersList].set(name, value); - } - get [kHeadersSortedMap]() { - if (!this[kHeadersList][kHeadersSortedMap]) { - this[kHeadersList][kHeadersSortedMap] = new Map([...this[kHeadersList]].sort((a, b2) => a[0] < b2[0] ? -1 : 1)); - } - return this[kHeadersList][kHeadersSortedMap]; - } - keys() { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator(this[kHeadersSortedMap].keys(), "Headers"); - } - values() { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator(this[kHeadersSortedMap].values(), "Headers"); - } - entries() { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - return makeIterator(this[kHeadersSortedMap].entries(), "Headers"); - } - forEach(callbackFn, thisArg = globalThis) { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'forEach' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ); - } - if (typeof callbackFn !== "function") { - throw new TypeError( - "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." - ); - } - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]); - } - } - [Symbol.for("nodejs.util.inspect.custom")]() { - if (!(this instanceof Headers)) { - throw new TypeError("Illegal invocation"); - } - return this[kHeadersList]; - } - }; - __name(Headers, "Headers"); - Headers.prototype[Symbol.iterator] = Headers.prototype.entries; - Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - keys: kEnumerableProperty, - values: kEnumerableProperty, - entries: kEnumerableProperty, - forEach: kEnumerableProperty - }); - webidl.converters.HeadersInit = function(V) { - if (webidl.util.Type(V) === "Object") { - if (V[Symbol.iterator]) { - return webidl.converters["sequence>"](V); - } - return webidl.converters["record"](V); - } - webidl.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - }; - module2.exports = { - fill, - Headers, - HeadersList - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/global.js -var require_global2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/global.js"(exports, module2) { - "use strict"; - var globalOrigin = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin() { - return globalThis[globalOrigin]; - } - __name(getGlobalOrigin, "getGlobalOrigin"); - function setGlobalOrigin(newOrigin) { - if (newOrigin !== void 0 && typeof newOrigin !== "string" && !(newOrigin instanceof URL)) { - throw new Error("Invalid base url"); - } - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - } - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - __name(setGlobalOrigin, "setGlobalOrigin"); - module2.exports = { - getGlobalOrigin, - setGlobalOrigin - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/response.js -var require_response = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/response.js"(exports, module2) { - "use strict"; - var { Headers, HeadersList, fill } = require_headers(); - var { extractBody, cloneBody, mixinBody } = require_body(); - var util2 = require_util2(); - var { kEnumerableProperty } = util2; - var { - responseURL, - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike - } = require_util3(); - var { - redirectStatus, - nullBodyStatus, - DOMException - } = require_constants(); - var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); - var { webidl } = require_webidl(); - var { FormData } = require_formdata(); - var { getGlobalOrigin } = require_global2(); - var { kHeadersList } = require_symbols(); - var assert = require("assert"); - var { types } = require("util"); - var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream; - var Response = class { - static error() { - const relevantRealm = { settingsObject: {} }; - const responseObject = new Response(); - responseObject[kState] = makeNetworkError(); - responseObject[kRealm] = relevantRealm; - responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList; - responseObject[kHeaders][kGuard] = "immutable"; - responseObject[kHeaders][kRealm] = relevantRealm; - return responseObject; - } - static json(data, init = {}) { - if (arguments.length === 0) { - throw new TypeError( - "Failed to execute 'json' on 'Response': 1 argument required, but 0 present." - ); - } - if (init !== null) { - init = webidl.converters.ResponseInit(init); - } - const bytes = new TextEncoder("utf-8").encode( - serializeJavascriptValueToJSONString(data) - ); - const body = extractBody(bytes); - const relevantRealm = { settingsObject: {} }; - const responseObject = new Response(); - responseObject[kRealm] = relevantRealm; - responseObject[kHeaders][kGuard] = "response"; - responseObject[kHeaders][kRealm] = relevantRealm; - initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); - return responseObject; - } - static redirect(url, status = 302) { - const relevantRealm = { settingsObject: {} }; - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'redirect' on 'Response': 1 argument required, but only ${arguments.length} present.` - ); - } - url = webidl.converters.USVString(url); - status = webidl.converters["unsigned short"](status); - let parsedURL; - try { - parsedURL = new URL(url, getGlobalOrigin()); - } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { - cause: err - }); - } - if (!redirectStatus.includes(status)) { - throw new RangeError("Invalid status code"); - } - const responseObject = new Response(); - responseObject[kRealm] = relevantRealm; - responseObject[kHeaders][kGuard] = "immutable"; - responseObject[kHeaders][kRealm] = relevantRealm; - responseObject[kState].status = status; - const value = parsedURL.toString(); - responseObject[kState].headersList.append("location", value); - return responseObject; - } - constructor(body = null, init = {}) { - if (body !== null) { - body = webidl.converters.BodyInit(body); - } - init = webidl.converters.ResponseInit(init); - this[kRealm] = { settingsObject: {} }; - this[kState] = makeResponse({}); - this[kHeaders] = new Headers(); - this[kHeaders][kGuard] = "response"; - this[kHeaders][kHeadersList] = this[kState].headersList; - this[kHeaders][kRealm] = this[kRealm]; - let bodyWithType = null; - if (body != null) { - const [extractedBody, type] = extractBody(body); - bodyWithType = { body: extractedBody, type }; - } - initializeResponse(this, init, bodyWithType); - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - get type() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].type; - } - get url() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - let url = responseURL(this[kState]); - if (url == null) { - return ""; - } - if (url.hash) { - url = new URL(url); - url.hash = ""; - } - return url.toString(); - } - get redirected() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].urlList.length > 1; - } - get status() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].status; - } - get ok() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].status >= 200 && this[kState].status <= 299; - } - get statusText() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].statusText; - } - get headers() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - return this[kHeaders]; - } - clone() { - if (!(this instanceof Response)) { - throw new TypeError("Illegal invocation"); - } - if (this.bodyUsed || this.body && this.body.locked) { - webidl.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - } - const clonedResponse = cloneResponse(this[kState]); - const clonedResponseObject = new Response(); - clonedResponseObject[kState] = clonedResponse; - clonedResponseObject[kRealm] = this[kRealm]; - clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList; - clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]; - clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]; - return clonedResponseObject; - } - }; - __name(Response, "Response"); - mixinBody(Response); - Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty - }); - function cloneResponse(response) { - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ); - } - const newResponse = makeResponse({ ...response, body: null }); - if (response.body != null) { - newResponse.body = cloneBody(response.body); - } - return newResponse; - } - __name(cloneResponse, "cloneResponse"); - function makeResponse(init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: "default", - status: 200, - timingInfo: null, - cacheState: "", - statusText: "", - ...init, - headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList(), - urlList: init.urlList ? [...init.urlList] : [] - }; - } - __name(makeResponse, "makeResponse"); - function makeNetworkError(reason) { - const isError2 = isErrorLike(reason); - return makeResponse({ - type: "error", - status: 0, - error: isError2 ? reason : new Error(reason ? String(reason) : reason, { - cause: isError2 ? reason : void 0 - }), - aborted: reason && reason.name === "AbortError" - }); - } - __name(makeNetworkError, "makeNetworkError"); - function makeFilteredResponse(response, state) { - state = { - internalResponse: response, - ...state - }; - return new Proxy(response, { - get(target, p2) { - return p2 in state ? state[p2] : target[p2]; - }, - set(target, p2, value) { - assert(!(p2 in state)); - target[p2] = value; - return true; - } - }); - } - __name(makeFilteredResponse, "makeFilteredResponse"); - function filterResponse(response, type) { - if (type === "basic") { - return makeFilteredResponse(response, { - type: "basic", - headersList: response.headersList - }); - } else if (type === "cors") { - return makeFilteredResponse(response, { - type: "cors", - headersList: response.headersList - }); - } else if (type === "opaque") { - return makeFilteredResponse(response, { - type: "opaque", - urlList: Object.freeze([]), - status: 0, - statusText: "", - body: null - }); - } else if (type === "opaqueredirect") { - return makeFilteredResponse(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - } else { - assert(false); - } - } - __name(filterResponse, "filterResponse"); - function makeAppropriateNetworkError(fetchParams) { - assert(isCancelled(fetchParams)); - return isAborted(fetchParams) ? makeNetworkError(new DOMException("The operation was aborted.", "AbortError")) : makeNetworkError(fetchParams.controller.terminated.reason); - } - __name(makeAppropriateNetworkError, "makeAppropriateNetworkError"); - function initializeResponse(response, init, body) { - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); - } - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError("Invalid statusText"); - } - } - if ("status" in init && init.status != null) { - response[kState].status = init.status; - } - if ("statusText" in init && init.statusText != null) { - response[kState].statusText = init.statusText; - } - if ("headers" in init && init.headers != null) { - fill(response[kState].headersList, init.headers); - } - if (body) { - if (nullBodyStatus.includes(response.status)) { - webidl.errors.exception({ - header: "Response constructor", - message: "Invalid response status code." - }); - } - response[kState].body = body.body; - if (body.type != null && !response[kState].headersList.has("Content-Type")) { - response[kState].headersList.append("content-type", body.type); - } - } - } - __name(initializeResponse, "initializeResponse"); - webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream - ); - webidl.converters.FormData = webidl.interfaceConverter( - FormData - ); - webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams - ); - webidl.converters.XMLHttpRequestBodyInit = function(V) { - if (typeof V === "string") { - return webidl.converters.USVString(V); - } - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }); - } - if (types.isAnyArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { - return webidl.converters.BufferSource(V); - } - if (util2.isFormDataLike(V)) { - return webidl.converters.FormData(V, { strict: false }); - } - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V); - } - return webidl.converters.DOMString(V); - }; - webidl.converters.BodyInit = function(V) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V); - } - if (V == null ? void 0 : V[Symbol.asyncIterator]) { - return V; - } - return webidl.converters.XMLHttpRequestBodyInit(V); - }; - webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: "status", - converter: webidl.converters["unsigned short"], - defaultValue: 200 - }, - { - key: "statusText", - converter: webidl.converters.ByteString, - defaultValue: "" - }, - { - key: "headers", - converter: webidl.converters.HeadersInit - } - ]); - module2.exports = { - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/request.js -var require_request2 = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/request.js"(exports, module2) { - "use strict"; - var { extractBody, mixinBody, cloneBody } = require_body(); - var { Headers, fill: fillHeaders, HeadersList } = require_headers(); - var { FinalizationRegistry } = require_dispatcher_weakref()(); - var util2 = require_util2(); - var { - isValidHTTPToken, - sameOrigin, - normalizeMethod - } = require_util3(); - var { - forbiddenMethods, - corsSafeListedMethods, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache - } = require_constants(); - var { kEnumerableProperty } = util2; - var { kHeaders, kSignal, kState, kGuard, kRealm } = require_symbols2(); - var { webidl } = require_webidl(); - var { getGlobalOrigin } = require_global2(); - var { kHeadersList } = require_symbols(); - var assert = require("assert"); - var TransformStream; - var kInit = Symbol("init"); - var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener("abort", abort); - }); - var Request = class { - constructor(input, init = {}) { - var _a3, _b2; - if (input === kInit) { - return; - } - if (arguments.length < 1) { - throw new TypeError( - `Failed to construct 'Request': 1 argument required, but only ${arguments.length} present.` - ); - } - input = webidl.converters.RequestInfo(input); - init = webidl.converters.RequestInit(init); - this[kRealm] = { - settingsObject: { - baseUrl: getGlobalOrigin() - } - }; - let request2 = null; - let fallbackMode = null; - const baseUrl = this[kRealm].settingsObject.baseUrl; - let signal = null; - if (typeof input === "string") { - let parsedURL; - try { - parsedURL = new URL(input, baseUrl); - } catch (err) { - throw new TypeError("Failed to parse URL from " + input, { cause: err }); - } - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - "Request cannot be constructed from a URL that includes credentials: " + input - ); - } - request2 = makeRequest({ urlList: [parsedURL] }); - fallbackMode = "cors"; - } else { - assert(input instanceof Request); - request2 = input[kState]; - signal = input[kSignal]; - } - const origin = this[kRealm].settingsObject.origin; - let window2 = "client"; - if (((_b2 = (_a3 = request2.window) == null ? void 0 : _a3.constructor) == null ? void 0 : _b2.name) === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) { - window2 = request2.window; - } - if (init.window !== void 0 && init.window != null) { - throw new TypeError(`'window' option '${window2}' must be null`); - } - if (init.window !== void 0) { - window2 = "no-window"; - } - request2 = makeRequest({ - method: request2.method, - headersList: request2.headersList, - unsafeRequest: request2.unsafeRequest, - client: this[kRealm].settingsObject, - window: window2, - priority: request2.priority, - origin: request2.origin, - referrer: request2.referrer, - referrerPolicy: request2.referrerPolicy, - mode: request2.mode, - credentials: request2.credentials, - cache: request2.cache, - redirect: request2.redirect, - integrity: request2.integrity, - keepalive: request2.keepalive, - reloadNavigation: request2.reloadNavigation, - historyNavigation: request2.historyNavigation, - urlList: [...request2.urlList] - }); - if (Object.keys(init).length > 0) { - if (request2.mode === "navigate") { - request2.mode = "same-origin"; - } - request2.reloadNavigation = false; - request2.historyNavigation = false; - request2.origin = "client"; - request2.referrer = "client"; - request2.referrerPolicy = ""; - request2.url = request2.urlList[request2.urlList.length - 1]; - request2.urlList = [request2.url]; - } - if (init.referrer !== void 0) { - const referrer = init.referrer; - if (referrer === "") { - request2.referrer = "no-referrer"; - } else { - let parsedReferrer; - try { - parsedReferrer = new URL(referrer, baseUrl); - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); - } - request2.referrer = parsedReferrer; - } - } - if (init.referrerPolicy !== void 0) { - request2.referrerPolicy = init.referrerPolicy; - if (!referrerPolicy.includes(request2.referrerPolicy)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request2.referrerPolicy}' is not a valid enum value of type ReferrerPolicy.` - ); - } - } - let mode; - if (init.mode !== void 0) { - mode = init.mode; - if (!requestMode.includes(mode)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request2.mode}' is not a valid enum value of type RequestMode.` - ); - } - } else { - mode = fallbackMode; - } - if (mode === "navigate") { - webidl.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." - }); - } - if (mode != null) { - request2.mode = mode; - } - if (init.credentials !== void 0) { - request2.credentials = init.credentials; - if (!requestCredentials.includes(request2.credentials)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request2.credentials}' is not a valid enum value of type RequestCredentials.` - ); - } - } - if (init.cache !== void 0) { - request2.cache = init.cache; - if (!requestCache.includes(request2.cache)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request2.cache}' is not a valid enum value of type RequestCache.` - ); - } - } - if (request2.cache === "only-if-cached" && request2.mode !== "same-origin") { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ); - } - if (init.redirect !== void 0) { - request2.redirect = init.redirect; - if (!requestRedirect.includes(request2.redirect)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request2.redirect}' is not a valid enum value of type RequestRedirect.` - ); - } - } - if (init.integrity !== void 0 && init.integrity != null) { - request2.integrity = String(init.integrity); - } - if (init.keepalive !== void 0) { - request2.keepalive = Boolean(init.keepalive); - } - if (init.method !== void 0) { - let method = init.method; - if (!isValidHTTPToken(init.method)) { - throw TypeError(`'${init.method}' is not a valid HTTP method.`); - } - if (forbiddenMethods.indexOf(method.toUpperCase()) !== -1) { - throw TypeError(`'${init.method}' HTTP method is unsupported.`); - } - method = normalizeMethod(init.method); - request2.method = method; - } - if (init.signal !== void 0) { - signal = init.signal; - } - this[kState] = request2; - const ac = new AbortController(); - this[kSignal] = ac.signal; - this[kSignal][kRealm] = this[kRealm]; - if (signal != null) { - if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ); - } - if (signal.aborted) { - ac.abort(signal.reason); - } else { - const abort = /* @__PURE__ */ __name(() => ac.abort(signal.reason), "abort"); - signal.addEventListener("abort", abort, { once: true }); - requestFinalizer.register(this, { signal, abort }); - } - } - this[kHeaders] = new Headers(); - this[kHeaders][kHeadersList] = request2.headersList; - this[kHeaders][kGuard] = "request"; - this[kHeaders][kRealm] = this[kRealm]; - if (mode === "no-cors") { - if (!corsSafeListedMethods.includes(request2.method)) { - throw new TypeError( - `'${request2.method} is unsupported in no-cors mode.` - ); - } - this[kHeaders][kGuard] = "request-no-cors"; - } - if (Object.keys(init).length !== 0) { - let headers = new Headers(this[kHeaders]); - if (init.headers !== void 0) { - headers = init.headers; - } - this[kHeaders][kHeadersList].clear(); - if (headers.constructor.name === "Headers") { - for (const [key, val] of headers) { - this[kHeaders].append(key, val); - } - } else { - fillHeaders(this[kHeaders], headers); - } - } - const inputBody = input instanceof Request ? input[kState].body : null; - if ((init.body !== void 0 && init.body != null || inputBody != null) && (request2.method === "GET" || request2.method === "HEAD")) { - throw new TypeError("Request with GET/HEAD method cannot have body."); - } - let initBody = null; - if (init.body !== void 0 && init.body != null) { - const [extractedBody, contentType] = extractBody( - init.body, - request2.keepalive - ); - initBody = extractedBody; - if (contentType && !this[kHeaders].has("content-type")) { - this[kHeaders].append("content-type", contentType); - } - } - const inputOrInitBody = initBody != null ? initBody : inputBody; - if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (request2.mode !== "same-origin" && request2.mode !== "cors") { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ); - } - request2.useCORSPreflightFlag = true; - } - let finalBody = inputOrInitBody; - if (initBody == null && inputBody != null) { - if (util2.isDisturbed(inputBody.stream) || inputBody.stream.locked) { - throw new TypeError( - "Cannot construct a Request with a Request object that has already been used." - ); - } - if (!TransformStream) { - TransformStream = require("stream/web").TransformStream; - } - const identityTransform = new TransformStream(); - inputBody.stream.pipeThrough(identityTransform); - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - }; - } - this[kState].body = finalBody; - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } - get method() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].method; - } - get url() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].url.toString(); - } - get headers() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kHeaders]; - } - get destination() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].destination; - } - get referrer() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - if (this[kState].referrer === "no-referrer") { - return ""; - } - if (this[kState].referrer === "client") { - return "about:client"; - } - return this[kState].referrer.toString(); - } - get referrerPolicy() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].referrerPolicy; - } - get mode() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].mode; - } - get credentials() { - return this[kState].credentials; - } - get cache() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].cache; - } - get redirect() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].redirect; - } - get integrity() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].integrity; - } - get keepalive() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].keepalive; - } - get isReloadNavigation() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].reloadNavigation; - } - get isHistoryNavigation() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kState].historyNavigation; - } - get signal() { - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - return this[kSignal]; - } - clone() { - var _a3; - if (!(this instanceof Request)) { - throw new TypeError("Illegal invocation"); - } - if (this.bodyUsed || ((_a3 = this.body) == null ? void 0 : _a3.locked)) { - throw new TypeError("unusable"); - } - const clonedRequest = cloneRequest(this[kState]); - const clonedRequestObject = new Request(kInit); - clonedRequestObject[kState] = clonedRequest; - clonedRequestObject[kRealm] = this[kRealm]; - clonedRequestObject[kHeaders] = new Headers(); - clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList; - clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]; - clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]; - const ac = new AbortController(); - if (this.signal.aborted) { - ac.abort(this.signal.reason); - } else { - this.signal.addEventListener( - "abort", - () => { - ac.abort(this.signal.reason); - }, - { once: true } - ); - } - clonedRequestObject[kSignal] = ac.signal; - return clonedRequestObject; - } - }; - __name(Request, "Request"); - mixinBody(Request); - function makeRequest(init) { - const request2 = { - method: "GET", - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: "", - window: "client", - keepalive: false, - serviceWorkers: "all", - initiator: "", - destination: "", - priority: null, - origin: "client", - policyContainer: "client", - referrer: "client", - referrerPolicy: "", - mode: "no-cors", - useCORSPreflightFlag: false, - credentials: "same-origin", - useCredentials: false, - cache: "default", - redirect: "follow", - integrity: "", - cryptoGraphicsNonceMetadata: "", - parserMetadata: "", - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: "basic", - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() - }; - request2.url = request2.urlList[0]; - return request2; - } - __name(makeRequest, "makeRequest"); - function cloneRequest(request2) { - const newRequest = makeRequest({ ...request2, body: null }); - if (request2.body != null) { - newRequest.body = cloneBody(request2.body); - } - return newRequest; - } - __name(cloneRequest, "cloneRequest"); - Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty - }); - webidl.converters.Request = webidl.interfaceConverter( - Request - ); - webidl.converters.RequestInfo = function(V) { - if (typeof V === "string") { - return webidl.converters.USVString(V); - } - if (V instanceof Request) { - return webidl.converters.Request(V); - } - return webidl.converters.USVString(V); - }; - webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal - ); - webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: "method", - converter: webidl.converters.ByteString - }, - { - key: "headers", - converter: webidl.converters.HeadersInit - }, - { - key: "body", - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: "referrer", - converter: webidl.converters.USVString - }, - { - key: "referrerPolicy", - converter: webidl.converters.DOMString, - allowedValues: [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ] - }, - { - key: "mode", - converter: webidl.converters.DOMString, - allowedValues: [ - "same-origin", - "cors", - "no-cors", - "navigate", - "websocket" - ] - }, - { - key: "credentials", - converter: webidl.converters.DOMString, - allowedValues: [ - "omit", - "same-origin", - "include" - ] - }, - { - key: "cache", - converter: webidl.converters.DOMString, - allowedValues: [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ] - }, - { - key: "redirect", - converter: webidl.converters.DOMString, - allowedValues: [ - "follow", - "error", - "manual" - ] - }, - { - key: "integrity", - converter: webidl.converters.DOMString - }, - { - key: "keepalive", - converter: webidl.converters.boolean - }, - { - key: "signal", - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - { strict: false } - ) - ) - }, - { - key: "window", - converter: webidl.converters.any - } - ]); - module2.exports = { Request, makeRequest }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/dataURL.js -var require_dataURL = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module2) { - var assert = require("assert"); - var { atob: atob2 } = require("buffer"); - var { isValidHTTPToken } = require_util3(); - var encoder = new TextEncoder(); - function dataURLProcessor(dataURL) { - assert(dataURL.protocol === "data:"); - let input = URLSerializer(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePoints( - (char) => char !== ",", - input, - position - ); - const mimeTypeLength = mimeType.length; - mimeType = mimeType.replace(/^(\u0020)+|(\u0020)+$/g, ""); - if (position.position >= input.length) { - return "failure"; - } - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = decodeURIComponent(new TextDecoder("utf-8").decode(body)); - body = forgivingBase64(stringBody); - if (body === "failure") { - return "failure"; - } - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); - } - if (mimeType.startsWith(";")) { - mimeType = "text/plain" + mimeType; - } - let mimeTypeRecord = parseMIMEType(mimeType); - if (mimeTypeRecord === "failure") { - mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); - } - return { mimeType: mimeTypeRecord, body }; - } - __name(dataURLProcessor, "dataURLProcessor"); - function URLSerializer(url, excludeFragment = false) { - let output = url.protocol; - if (url.host.length > 0) { - output += "//"; - if (url.username.length > 0 || url.password.length > 0) { - output += url.username; - if (url.password.length > 0) { - output += ":" + url.password; - } - output += "@"; - } - output += decodeURIComponent(url.host); - if (url.port.length > 0) { - output += ":" + url.port; - } - } - if (url.host.length === 0 && url.pathname.length > 1 && url.href.slice(url.protocol.length + 1)[0] === ".") { - output += "/."; - } - output += url.pathname; - if (url.search.length > 0) { - output += url.search; - } - if (excludeFragment === false && url.hash.length > 0) { - output += url.hash; - } - return output; - } - __name(URLSerializer, "URLSerializer"); - function collectASequenceOfCodePoints(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; - } - return result; - } - __name(collectASequenceOfCodePoints, "collectASequenceOfCodePoints"); - function stringPercentDecode(input) { - const bytes = encoder.encode(input); - return percentDecode(bytes); - } - __name(stringPercentDecode, "stringPercentDecode"); - function percentDecode(input) { - const output = []; - for (let i = 0; i < input.length; i++) { - const byte = input[i]; - if (byte !== 37) { - output.push(byte); - } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))) { - output.push(37); - } else { - const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]); - const bytePoint = Number.parseInt(nextTwoBytes, 16); - output.push(bytePoint); - i += 2; - } - } - return Uint8Array.from(output); - } - __name(percentDecode, "percentDecode"); - function parseMIMEType(input) { - input = input.trim(); - const position = { position: 0 }; - const type = collectASequenceOfCodePoints( - (char) => char !== "/", - input, - position - ); - if (type.length === 0 || !/^[!#$%&'*+-.^_|~A-z0-9]+$/.test(type)) { - return "failure"; - } - if (position.position > input.length) { - return "failure"; - } - position.position++; - let subtype = collectASequenceOfCodePoints( - (char) => char !== ";", - input, - position - ); - subtype = subtype.trim(); - if (subtype.length === 0 || !/^[!#$%&'*+-.^_|~A-z0-9]+$/.test(subtype)) { - return "failure"; - } - const mimeType = { - type: type.toLowerCase(), - subtype: subtype.toLowerCase(), - parameters: /* @__PURE__ */ new Map() - }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints( - (char) => /(\u000A|\u000D|\u0009|\u0020)/.test(char), - input, - position - ); - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ";" && char !== "=", - input, - position - ); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") { - continue; - } - position.position++; - } - if (position.position > input.length) { - break; - } - let parameterValue = null; - if (input[position.position] === '"') { - parameterValue = collectAnHTTPQuotedString(input, position, true); - collectASequenceOfCodePoints( - (char) => char !== ";", - input, - position - ); - } else { - parameterValue = collectASequenceOfCodePoints( - (char) => char !== ";", - input, - position - ); - parameterValue = parameterValue.trimEnd(); - if (parameterValue.length === 0) { - continue; - } - } - if (parameterName.length !== 0 && /^[!#$%&'*+-.^_|~A-z0-9]+$/.test(parameterName) && !/^(\u0009|\x{0020}-\x{007E}|\x{0080}-\x{00FF})+$/.test(parameterValue) && !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); - } - } - return mimeType; - } - __name(parseMIMEType, "parseMIMEType"); - function forgivingBase64(data) { - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); - if (data.length % 4 === 0) { - data = data.replace(/=?=$/, ""); - } - if (data.length % 4 === 1) { - return "failure"; - } - if (/[^+/0-9A-Za-z]/.test(data)) { - return "failure"; - } - const binary = atob2(data); - const bytes = new Uint8Array(binary.length); - for (let byte = 0; byte < binary.length; byte++) { - bytes[byte] = binary.charCodeAt(byte); - } - return bytes; - } - __name(forgivingBase64, "forgivingBase64"); - function collectAnHTTPQuotedString(input, position, extractValue) { - const positionStart = position.position; - let value = ""; - assert(input[position.position] === '"'); - position.position++; - while (true) { - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== "\\", - input, - position - ); - if (position.position >= input.length) { - break; - } - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert(quoteOrBackslash === '"'); - break; - } - } - if (extractValue) { - return value; - } - return input.slice(positionStart, position.position); - } - __name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString"); - function serializeAMimeType(mimeType) { - assert(mimeType !== "failure"); - const { type, subtype, parameters } = mimeType; - let serialization = `${type}/${subtype}`; - for (let [name, value] of parameters.entries()) { - serialization += ";"; - serialization += name; - serialization += "="; - if (!isValidHTTPToken(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = '"' + value; - value += '"'; - } - serialization += value; - } - return serialization; - } - __name(serializeAMimeType, "serializeAMimeType"); - module2.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/index.js -var require_fetch = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/lib/fetch/index.js"(exports, module2) { - "use strict"; - var { - Response, - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse - } = require_response(); - var { Headers } = require_headers(); - var { Request, makeRequest } = require_request2(); - var zlib = require("zlib"); - var { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody - } = require_util3(); - var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); - var assert = require("assert"); - var { safelyExtractBody, extractBody } = require_body(); - var { - redirectStatus, - nullBodyStatus, - safeMethods, - requestBodyHeader, - subresource, - DOMException - } = require_constants(); - var { kHeadersList } = require_symbols(); - var EE = require("events"); - var { Readable, pipeline } = require("stream"); - var { isErrored, isReadable } = require_util2(); - var { dataURLProcessor, serializeAMimeType } = require_dataURL(); - var { TransformStream } = require("stream/web"); - var resolveObjectURL; - var ReadableStream; - var nodeVersion = process.versions.node.split("."); - var nodeMajor = Number(nodeVersion[0]); - var nodeMinor = Number(nodeVersion[1]); - var Fetch = class extends EE { - constructor(dispatcher) { - super(); - this.dispatcher = dispatcher; - this.connection = null; - this.dump = false; - this.state = "ongoing"; - } - terminate(reason) { - var _a3; - if (this.state !== "ongoing") { - return; - } - this.state = "terminated"; - (_a3 = this.connection) == null ? void 0 : _a3.destroy(reason); - this.emit("terminated", reason); - } - abort() { - var _a3; - if (this.state !== "ongoing") { - return; - } - const reason = new DOMException("The operation was aborted.", "AbortError"); - this.state = "aborted"; - (_a3 = this.connection) == null ? void 0 : _a3.destroy(reason); - this.emit("terminated", reason); - } - }; - __name(Fetch, "Fetch"); - async function fetch2(input, init = {}) { - var _a3; - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'fetch' on 'Window': 1 argument required, but only ${arguments.length} present.` - ); - } - const p2 = createDeferredPromise(); - let requestObject; - try { - requestObject = new Request(input, init); - } catch (e2) { - p2.reject(e2); - return p2.promise; - } - const request2 = requestObject[kState]; - if (requestObject.signal.aborted) { - abortFetch(p2, request2, null); - return p2.promise; - } - const globalObject = request2.client.globalObject; - if (((_a3 = globalObject == null ? void 0 : globalObject.constructor) == null ? void 0 : _a3.name) === "ServiceWorkerGlobalScope") { - request2.serviceWorkers = "none"; - } - let responseObject = null; - const relevantRealm = null; - let locallyAborted = false; - let controller = null; - requestObject.signal.addEventListener( - "abort", - () => { - locallyAborted = true; - abortFetch(p2, request2, responseObject); - if (controller != null) { - controller.abort(); - } - }, - { once: true } - ); - const handleFetchDone = /* @__PURE__ */ __name((response) => finalizeAndReportTiming(response, "fetch"), "handleFetchDone"); - const processResponse = /* @__PURE__ */ __name((response) => { - if (locallyAborted) { - return; - } - if (response.aborted) { - abortFetch(p2, request2, responseObject); - return; - } - if (response.type === "error") { - p2.reject( - Object.assign(new TypeError("fetch failed"), { cause: response.error }) - ); - return; - } - responseObject = new Response(); - responseObject[kState] = response; - responseObject[kRealm] = relevantRealm; - responseObject[kHeaders][kHeadersList] = response.headersList; - responseObject[kHeaders][kGuard] = "immutable"; - responseObject[kHeaders][kRealm] = relevantRealm; - p2.resolve(responseObject); - }, "processResponse"); - controller = fetching({ - request: request2, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: this - }); - return p2.promise; - } - __name(fetch2, "fetch"); - function finalizeAndReportTiming(response, initiatorType = "other") { - var _a3; - if (response.type === "error" && response.aborted) { - return; - } - if (!((_a3 = response.urlList) == null ? void 0 : _a3.length)) { - return; - } - const originalURL = response.urlList[0]; - let timingInfo = response.timingInfo; - let cacheState = response.cacheState; - if (!/^https?:/.test(originalURL.protocol)) { - return; - } - if (timingInfo === null) { - return; - } - if (!timingInfo.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }); - cacheState = ""; - } - response.timingInfo.endTime = coarsenedSharedCurrentTime(); - response.timingInfo = timingInfo; - markResourceTiming( - timingInfo, - originalURL, - initiatorType, - globalThis, - cacheState - ); - } - __name(finalizeAndReportTiming, "finalizeAndReportTiming"); - function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState) { - if (nodeMajor >= 18 && nodeMinor >= 2) { - performance.markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState); - } - } - __name(markResourceTiming, "markResourceTiming"); - function abortFetch(p2, request2, responseObject) { - var _a3, _b2; - const error2 = new DOMException("The operation was aborted.", "AbortError"); - p2.reject(error2); - if (request2.body != null && isReadable((_a3 = request2.body) == null ? void 0 : _a3.stream)) { - request2.body.stream.cancel(error2).catch((err) => { - if (err.code === "ERR_INVALID_STATE") { - return; - } - throw err; - }); - } - if (responseObject == null) { - return; - } - const response = responseObject[kState]; - if (response.body != null && isReadable((_b2 = response.body) == null ? void 0 : _b2.stream)) { - response.body.stream.cancel(error2).catch((err) => { - if (err.code === "ERR_INVALID_STATE") { - return; - } - throw err; - }); - } - } - __name(abortFetch, "abortFetch"); - function fetching({ - request: request2, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher - }) { - var _a3, _b2, _c, _d; - let taskDestination = null; - let crossOriginIsolatedCapability = false; - if (request2.client != null) { - taskDestination = request2.client.globalObject; - crossOriginIsolatedCapability = request2.client.crossOriginIsolatedCapability; - } - const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); - const timingInfo = createOpaqueTimingInfo({ - startTime: currenTime - }); - const fetchParams = { - controller: new Fetch(dispatcher), - request: request2, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - }; - assert(!request2.body || request2.body.stream); - if (request2.window === "client") { - request2.window = ((_c = (_b2 = (_a3 = request2.client) == null ? void 0 : _a3.globalObject) == null ? void 0 : _b2.constructor) == null ? void 0 : _c.name) === "Window" ? request2.client : "no-window"; - } - if (request2.origin === "client") { - request2.origin = (_d = request2.client) == null ? void 0 : _d.origin; - } - if (request2.policyContainer === "client") { - if (request2.client != null) { - request2.policyContainer = clonePolicyContainer( - request2.client.policyContainer - ); - } else { - request2.policyContainer = makePolicyContainer(); - } - } - if (!request2.headersList.has("accept")) { - const value = "*/*"; - request2.headersList.append("accept", value); - } - if (!request2.headersList.has("accept-language")) { - request2.headersList.append("accept-language", "*"); - } - if (request2.priority === null) { - } - if (subresource.includes(request2.destination)) { - } - mainFetch(fetchParams).catch((err) => { - fetchParams.controller.terminate(err); - }); - return fetchParams.controller; - } - __name(fetching, "fetching"); - async function mainFetch(fetchParams, recursive = false) { - const request2 = fetchParams.request; - let response = null; - if (request2.localURLsOnly && !/^(about|blob|data):/.test(requestCurrentURL(request2).protocol)) { - response = makeNetworkError("local URLs only"); - } - tryUpgradeRequestToAPotentiallyTrustworthyURL(request2); - if (requestBadPort(request2) === "blocked") { - response = makeNetworkError("bad port"); - } - if (request2.referrerPolicy === "") { - request2.referrerPolicy = request2.policyContainer.referrerPolicy; - } - if (request2.referrer !== "no-referrer") { - request2.referrer = determineRequestsReferrer(request2); - } - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request2); - if (sameOrigin(currentURL, request2.url) && request2.responseTainting === "basic" || currentURL.protocol === "data:" || (request2.mode === "navigate" || request2.mode === "websocket")) { - request2.responseTainting = "basic"; - return await schemeFetch(fetchParams); - } - if (request2.mode === "same-origin") { - return makeNetworkError('request mode cannot be "same-origin"'); - } - if (request2.mode === "no-cors") { - if (request2.redirect !== "follow") { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ); - } - request2.responseTainting = "opaque"; - return await schemeFetch(fetchParams); - } - if (!/^https?:/.test(requestCurrentURL(request2).protocol)) { - return makeNetworkError("URL scheme must be a HTTP(S) scheme"); - } - request2.responseTainting = "cors"; - return await httpFetch(fetchParams); - })(); - } - if (recursive) { - return response; - } - if (response.status !== 0 && !response.internalResponse) { - if (request2.responseTainting === "cors") { - } - if (request2.responseTainting === "basic") { - response = filterResponse(response, "basic"); - } else if (request2.responseTainting === "cors") { - response = filterResponse(response, "cors"); - } else if (request2.responseTainting === "opaque") { - response = filterResponse(response, "opaque"); - } else { - assert(false); - } - } - let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request2.urlList); - } - if (!request2.timingAllowFailed) { - response.timingAllowPassed = true; - } - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request2.headers.has("range")) { - response = internalResponse = makeNetworkError(); - } - if (response.status !== 0 && (request2.method === "HEAD" || request2.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { - internalResponse.body = null; - fetchParams.controller.dump = true; - } - if (request2.integrity) { - const processBodyError = /* @__PURE__ */ __name((reason) => fetchFinale(fetchParams, makeNetworkError(reason)), "processBodyError"); - if (request2.responseTainting === "opaque" || response.body == null) { - processBodyError(response.error); - return; - } - const processBody = /* @__PURE__ */ __name((bytes) => { - if (!bytesMatch(bytes, request2.integrity)) { - processBodyError("integrity mismatch"); - return; - } - response.body = safelyExtractBody(bytes)[0]; - fetchFinale(fetchParams, response); - }, "processBody"); - await fullyReadBody(response.body, processBody, processBodyError); - } else { - fetchFinale(fetchParams, response); - } - } - __name(mainFetch, "mainFetch"); - async function schemeFetch(fetchParams) { - const { request: request2 } = fetchParams; - const { - protocol: scheme, - pathname: path7 - } = requestCurrentURL(request2); - switch (scheme) { - case "about:": { - if (path7 === "blank") { - const resp = makeResponse({ - statusText: "OK", - headersList: [ - ["content-type", "text/html;charset=utf-8"] - ] - }); - resp.urlList = [new URL("about:blank")]; - return resp; - } - return makeNetworkError("invalid path called"); - } - case "blob:": { - resolveObjectURL = resolveObjectURL || require("buffer").resolveObjectURL; - const currentURL = requestCurrentURL(request2); - if (currentURL.search.length !== 0) { - return makeNetworkError("NetworkError when attempting to fetch resource."); - } - const blob = resolveObjectURL(currentURL.toString()); - if (request2.method !== "GET" || !isBlobLike(blob)) { - return makeNetworkError("invalid method"); - } - const response = makeResponse({ statusText: "OK", urlList: [currentURL] }); - response.headersList.set("content-length", `${blob.size}`); - response.headersList.set("content-type", blob.type); - response.body = extractBody(blob)[0]; - return response; - } - case "data:": { - const currentURL = requestCurrentURL(request2); - const dataURLStruct = dataURLProcessor(currentURL); - if (dataURLStruct === "failure") { - return makeNetworkError("failed to fetch the data URL"); - } - const mimeType = serializeAMimeType(dataURLStruct.mimeType); - return makeResponse({ - statusText: "OK", - headersList: [ - ["content-type", mimeType] - ], - body: extractBody(dataURLStruct.body)[0] - }); - } - case "file:": { - return makeNetworkError("not implemented... yet..."); - } - case "http:": - case "https:": { - return await httpFetch(fetchParams).catch((err) => makeNetworkError(err)); - } - default: { - return makeNetworkError("unknown scheme"); - } - } - } - __name(schemeFetch, "schemeFetch"); - function finalizeResponse(fetchParams, response) { - fetchParams.request.done = true; - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)); - } - } - __name(finalizeResponse, "finalizeResponse"); - async function fetchFinale(fetchParams, response) { - if (response.type === "error") { - response.urlList = [fetchParams.request.urlList[0]]; - response.timingInfo = createOpaqueTimingInfo({ - startTime: fetchParams.timingInfo.startTime - }); - } - const processResponseEndOfBody = /* @__PURE__ */ __name(() => { - fetchParams.request.done = true; - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); - } - }, "processResponseEndOfBody"); - if (fetchParams.processResponse != null) { - queueMicrotask(() => fetchParams.processResponse(response)); - } - if (response.body == null) { - processResponseEndOfBody(); - } else { - const identityTransformAlgorithm = /* @__PURE__ */ __name((chunk, controller) => { - controller.enqueue(chunk); - }, "identityTransformAlgorithm"); - const transformStream = new TransformStream({ - start() { - }, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }); - response.body = { stream: response.body.stream.pipeThrough(transformStream) }; - } - if (fetchParams.processResponseConsumeBody != null) { - const processBody = /* @__PURE__ */ __name((nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes), "processBody"); - const processBodyError = /* @__PURE__ */ __name((failure) => fetchParams.processResponseConsumeBody(response, failure), "processBodyError"); - if (response.body == null) { - queueMicrotask(() => processBody(null)); - } else { - await fullyReadBody(response.body, processBody, processBodyError); - } - } - } - __name(fetchFinale, "fetchFinale"); - async function httpFetch(fetchParams) { - const request2 = fetchParams.request; - let response = null; - let actualResponse = null; - const timingInfo = fetchParams.timingInfo; - if (request2.serviceWorkers === "all") { - } - if (response === null) { - if (request2.redirect === "follow") { - request2.serviceWorkers = "none"; - } - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request2.responseTainting === "cors" && corsCheck(request2, response) === "failure") { - return makeNetworkError("cors failure"); - } - if (TAOCheck(request2, response) === "failure") { - request2.timingAllowFailed = true; - } - } - if ((request2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( - request2.origin, - request2.client, - request2.destination, - actualResponse - ) === "blocked") { - return makeNetworkError("blocked"); - } - if (redirectStatus.includes(actualResponse.status)) { - if (request2.redirect !== "manual") { - fetchParams.controller.connection.destroy(); - } - if (request2.redirect === "error") { - response = makeNetworkError("unexpected redirect"); - } else if (request2.redirect === "manual") { - response = actualResponse; - } else if (request2.redirect === "follow") { - response = await httpRedirectFetch(fetchParams, response); - } else { - assert(false); - } - } - response.timingInfo = timingInfo; - return response; - } - __name(httpFetch, "httpFetch"); - async function httpRedirectFetch(fetchParams, response) { - const request2 = fetchParams.request; - const actualResponse = response.internalResponse ? response.internalResponse : response; - let locationURL; - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request2).hash - ); - if (locationURL == null) { - return response; - } - } catch (err) { - return makeNetworkError(err); - } - if (!/^https?:/.test(locationURL.protocol)) { - return makeNetworkError("URL scheme must be a HTTP(S) scheme"); - } - if (request2.redirectCount === 20) { - return makeNetworkError("redirect count exceeded"); - } - request2.redirectCount += 1; - if (request2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request2, locationURL)) { - return makeNetworkError('cross origin not allowed for request mode "cors"'); - } - if (request2.responseTainting === "cors" && (locationURL.username || locationURL.password)) { - return makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - ); - } - if (actualResponse.status !== 303 && request2.body != null && request2.body.source == null) { - return makeNetworkError(); - } - if ([301, 302].includes(actualResponse.status) && request2.method === "POST" || actualResponse.status === 303 && !["GET", "HEAD"].includes(request2.method)) { - request2.method = "GET"; - request2.body = null; - for (const headerName of requestBodyHeader) { - request2.headersList.delete(headerName); - } - } - if (request2.body != null) { - assert(request2.body.source); - request2.body = safelyExtractBody(request2.body.source)[0]; - } - const timingInfo = fetchParams.timingInfo; - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime; - } - request2.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request2, actualResponse); - return mainFetch(fetchParams, true); - } - __name(httpRedirectFetch, "httpRedirectFetch"); - async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request2 = fetchParams.request; - let httpFetchParams = null; - let httpRequest = null; - let response = null; - const httpCache = null; - const revalidatingFlag = false; - if (request2.window === "no-window" && request2.redirect === "error") { - httpFetchParams = fetchParams; - httpRequest = request2; - } else { - httpRequest = makeRequest(request2); - httpFetchParams = { ...fetchParams }; - httpFetchParams.request = httpRequest; - } - const includeCredentials = request2.credentials === "include" || request2.credentials === "same-origin" && request2.responseTainting === "basic"; - const contentLength = httpRequest.body ? httpRequest.body.length : null; - let contentLengthHeaderValue = null; - if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { - contentLengthHeaderValue = "0"; - } - if (contentLength != null) { - contentLengthHeaderValue = String(contentLength); - } - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append("content-length", contentLengthHeaderValue); - } - if (contentLength != null && httpRequest.keepalive) { - } - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append("referer", httpRequest.referrer.href); - } - appendRequestOriginHeader(httpRequest); - appendFetchMetadata(httpRequest); - if (!httpRequest.headersList.has("user-agent")) { - httpRequest.headersList.append("user-agent", "undici"); - } - if (httpRequest.cache === "default" && (httpRequest.headersList.has("if-modified-since") || httpRequest.headersList.has("if-none-match") || httpRequest.headersList.has("if-unmodified-since") || httpRequest.headersList.has("if-match") || httpRequest.headersList.has("if-range"))) { - httpRequest.cache = "no-store"; - } - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.has("cache-control")) { - httpRequest.headersList.append("cache-control", "max-age=0"); - } - if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - if (!httpRequest.headersList.has("pragma")) { - httpRequest.headersList.append("pragma", "no-cache"); - } - if (!httpRequest.headersList.has("cache-control")) { - httpRequest.headersList.append("cache-control", "no-cache"); - } - } - if (httpRequest.headersList.has("range")) { - httpRequest.headersList.append("accept-encoding", "identity"); - } - if (!httpRequest.headersList.has("accept-encoding")) { - if (/^https:/.test(requestCurrentURL(httpRequest).protocol)) { - httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); - } else { - httpRequest.headersList.append("accept-encoding", "gzip, deflate"); - } - } - if (includeCredentials) { - } - if (httpCache == null) { - httpRequest.cache = "no-store"; - } - if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") { - } - if (response == null) { - if (httpRequest.mode === "only-if-cached") { - return makeNetworkError("only if cached"); - } - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ); - if (!safeMethods.includes(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) { - } - if (revalidatingFlag && forwardResponse.status === 304) { - } - if (response == null) { - response = forwardResponse; - } - } - response.urlList = [...httpRequest.urlList]; - if (httpRequest.headersList.has("range")) { - response.rangeRequested = true; - } - response.requestIncludesCredentials = includeCredentials; - if (response.status === 407) { - if (request2.window === "no-window") { - return makeNetworkError(); - } - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams); - } - return makeNetworkError("proxy authentication required"); - } - if (response.status === 421 && !isNewConnectionFetch && (request2.body == null || request2.body.source != null)) { - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams); - } - fetchParams.controller.connection.destroy(); - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ); - } - if (isAuthenticationFetch) { - } - return response; - } - __name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch"); - async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy(err) { - var _a3; - if (!this.destroyed) { - this.destroyed = true; - (_a3 = this.abort) == null ? void 0 : _a3.call(this, err != null ? err : new DOMException("The operation was aborted.", "AbortError")); - } - } - }; - const request2 = fetchParams.request; - let response = null; - const timingInfo = fetchParams.timingInfo; - const httpCache = null; - if (httpCache == null) { - request2.cache = "no-store"; - } - const newConnection = forceNewConnection ? "yes" : "no"; - if (request2.mode === "websocket") { - } else { - } - let requestBody = null; - if (request2.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()); - } else if (request2.body != null) { - const processBodyChunk = /* @__PURE__ */ __name(async function* (bytes) { - var _a3; - if (isCancelled(fetchParams)) { - return; - } - yield bytes; - (_a3 = fetchParams.processRequestBodyChunkLength) == null ? void 0 : _a3.call(fetchParams, bytes.byteLength); - }, "processBodyChunk"); - const processEndOfBody = /* @__PURE__ */ __name(() => { - if (isCancelled(fetchParams)) { - return; - } - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody(); - } - }, "processEndOfBody"); - const processBodyError = /* @__PURE__ */ __name((e2) => { - if (isCancelled(fetchParams)) { - return; - } - if (e2.name === "AbortError") { - fetchParams.controller.abort(); - } else { - fetchParams.controller.terminate(e2); - } - }, "processBodyError"); - requestBody = async function* () { - try { - for await (const bytes of request2.body.stream) { - yield* processBodyChunk(bytes); - } - processEndOfBody(); - } catch (err) { - processBodyError(err); - } - }(); - } - try { - const { body, status, statusText, headersList } = await dispatch({ body: requestBody }); - const iterator = body[Symbol.asyncIterator](); - fetchParams.controller.next = () => iterator.next(); - response = makeResponse({ status, statusText, headersList }); - } catch (err) { - if (err.name === "AbortError") { - fetchParams.controller.connection.destroy(); - return makeAppropriateNetworkError(fetchParams); - } - return makeNetworkError(err); - } - const pullAlgorithm = /* @__PURE__ */ __name(() => { - fetchParams.controller.resume(); - }, "pullAlgorithm"); - const cancelAlgorithm = /* @__PURE__ */ __name(() => { - fetchParams.controller.abort(); - }, "cancelAlgorithm"); - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; - } - const stream2 = new ReadableStream( - { - async start(controller) { - fetchParams.controller.controller = controller; - }, - async pull(controller) { - await pullAlgorithm(controller); - }, - async cancel(reason) { - await cancelAlgorithm(reason); - } - }, - { highWaterMark: 0 } - ); - response.body = { stream: stream2 }; - fetchParams.controller.on("terminated", onAborted); - fetchParams.controller.resume = async () => { - var _a3; - while (true) { - let bytes; - try { - const { done, value } = await fetchParams.controller.next(); - if (isAborted(fetchParams)) { - break; - } - bytes = done ? void 0 : value; - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - bytes = void 0; - } else { - bytes = err; - } - } - if (bytes === void 0) { - try { - fetchParams.controller.controller.close(); - } catch (err) { - if (!/Controller is already closed/.test(err)) { - throw err; - } - } - finalizeResponse(fetchParams, response); - return; - } - timingInfo.decodedBodySize += (_a3 = bytes == null ? void 0 : bytes.byteLength) != null ? _a3 : 0; - if (isErrorLike(bytes)) { - fetchParams.controller.terminate(bytes); - return; - } - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); - if (isErrored(stream2)) { - fetchParams.controller.terminate(); - return; - } - if (!fetchParams.controller.controller.desiredSize) { - return; - } - } - }; - function onAborted(reason) { - if (isAborted(fetchParams)) { - response.aborted = true; - if (isReadable(stream2)) { - fetchParams.controller.controller.error( - new DOMException("The operation was aborted.", "AbortError") - ); - } - } else { - if (isReadable(stream2)) { - fetchParams.controller.controller.error(new TypeError("terminated", { - cause: isErrorLike(reason) ? reason : void 0 - })); - } - } - fetchParams.controller.connection.destroy(); - } - __name(onAborted, "onAborted"); - return response; - async function dispatch({ body }) { - const url = requestCurrentURL(request2); - return new Promise((resolve, reject) => fetchParams.controller.dispatcher.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request2.method, - body: fetchParams.controller.dispatcher.isMockActive ? request2.body && request2.body.source : body, - headers: [...request2.headersList].flat(), - maxRedirections: 0, - bodyTimeout: 3e5, - headersTimeout: 3e5 - }, - { - body: null, - abort: null, - onConnect(abort) { - const { connection } = fetchParams.controller; - if (connection.destroyed) { - abort(new DOMException("The operation was aborted.", "AbortError")); - } else { - fetchParams.controller.on("terminated", abort); - this.abort = connection.abort = abort; - } - }, - onHeaders(status, headersList, resume, statusText) { - if (status < 200) { - return; - } - let codings = []; - let location = ""; - const headers = new Headers(); - for (let n2 = 0; n2 < headersList.length; n2 += 2) { - const key = headersList[n2 + 0].toString("latin1"); - const val = headersList[n2 + 1].toString("latin1"); - if (key.toLowerCase() === "content-encoding") { - codings = val.split(",").map((x) => x.trim()); - } else if (key.toLowerCase() === "location") { - location = val; - } - headers.append(key, val); - } - this.body = new Readable({ read: resume }); - const decoders = []; - const willFollow = request2.redirect === "follow" && location && redirectStatus.includes(status); - if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { - for (const coding of codings) { - if (/(x-)?gzip/.test(coding)) { - decoders.push(zlib.createGunzip()); - } else if (/(x-)?deflate/.test(coding)) { - decoders.push(zlib.createInflate()); - } else if (coding === "br") { - decoders.push(zlib.createBrotliDecompress()); - } else { - decoders.length = 0; - break; - } - } - } - resolve({ - status, - statusText, - headersList: headers[kHeadersList], - body: decoders.length ? pipeline(this.body, ...decoders, () => { - }) : this.body.on("error", () => { - }) - }); - return true; - }, - onData(chunk) { - if (fetchParams.controller.dump) { - return; - } - const bytes = chunk; - timingInfo.encodedBodySize += bytes.byteLength; - return this.body.push(bytes); - }, - onComplete() { - if (this.abort) { - fetchParams.controller.off("terminated", this.abort); - } - fetchParams.controller.ended = true; - this.body.push(null); - }, - onError(error2) { - var _a3; - if (this.abort) { - fetchParams.controller.off("terminated", this.abort); - } - (_a3 = this.body) == null ? void 0 : _a3.destroy(error2); - fetchParams.controller.terminate(error2); - reject(error2); - } - } - )); - } - __name(dispatch, "dispatch"); - } - __name(httpNetworkFetch, "httpNetworkFetch"); - module2.exports = { - fetch: fetch2, - Fetch, - fetching, - finalizeAndReportTiming - }; - } -}); - -// ../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/index.js -var require_undici = __commonJS({ - "../../node_modules/.pnpm/undici@5.11.0/node_modules/undici/index.js"(exports, module2) { - "use strict"; - var Client = require_client(); - var Dispatcher = require_dispatcher(); - var errors = require_errors(); - var Pool = require_pool(); - var BalancedPool = require_balanced_pool(); - var Agent = require_agent(); - var util2 = require_util2(); - var { InvalidArgumentError } = errors; - var api = require_api(); - var buildConnector = require_connect(); - var MockClient = require_mock_client(); - var MockAgent = require_mock_agent(); - var MockPool = require_mock_pool(); - var mockErrors = require_mock_errors(); - var ProxyAgent = require_proxy_agent(); - var { getGlobalDispatcher, setGlobalDispatcher } = require_global(); - var DecoratorHandler = require_DecoratorHandler(); - var RedirectHandler = require_RedirectHandler(); - var createRedirectInterceptor = require_redirectInterceptor(); - var nodeVersion = process.versions.node.split("."); - var nodeMajor = Number(nodeVersion[0]); - var nodeMinor = Number(nodeVersion[1]); - Object.assign(Dispatcher.prototype, api); - module2.exports.Dispatcher = Dispatcher; - module2.exports.Client = Client; - module2.exports.Pool = Pool; - module2.exports.BalancedPool = BalancedPool; - module2.exports.Agent = Agent; - module2.exports.ProxyAgent = ProxyAgent; - module2.exports.DecoratorHandler = DecoratorHandler; - module2.exports.RedirectHandler = RedirectHandler; - module2.exports.createRedirectInterceptor = createRedirectInterceptor; - module2.exports.buildConnector = buildConnector; - module2.exports.errors = errors; - function makeDispatcher(fn) { - return (url, opts, handler) => { - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { - throw new InvalidArgumentError("invalid url"); - } - if (opts != null && typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (opts && opts.path != null) { - if (typeof opts.path !== "string") { - throw new InvalidArgumentError("invalid opts.path"); - } - let path7 = opts.path; - if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; - } - url = new URL(util2.parseOrigin(url).origin + path7); - } else { - if (!opts) { - opts = typeof url === "object" ? url : {}; - } - url = util2.parseURL(url); - } - const { agent, dispatcher = getGlobalDispatcher() } = opts; - if (agent) { - throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - } - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); - }; - } - __name(makeDispatcher, "makeDispatcher"); - module2.exports.setGlobalDispatcher = setGlobalDispatcher; - module2.exports.getGlobalDispatcher = getGlobalDispatcher; - if (nodeMajor > 16 || nodeMajor === 16 && nodeMinor >= 8) { - let fetchImpl = null; - module2.exports.fetch = /* @__PURE__ */ __name(async function fetch2(resource) { - if (!fetchImpl) { - fetchImpl = require_fetch().fetch; - } - const dispatcher = arguments[1] && arguments[1].dispatcher || getGlobalDispatcher(); - try { - return await fetchImpl.apply(dispatcher, arguments); - } catch (err) { - Error.captureStackTrace(err, this); - throw err; - } - }, "fetch"); - module2.exports.Headers = require_headers().Headers; - module2.exports.Response = require_response().Response; - module2.exports.Request = require_request2().Request; - module2.exports.FormData = require_formdata().FormData; - module2.exports.File = require_file().File; - const { setGlobalOrigin, getGlobalOrigin } = require_global2(); - module2.exports.setGlobalOrigin = setGlobalOrigin; - module2.exports.getGlobalOrigin = getGlobalOrigin; - } - module2.exports.request = makeDispatcher(api.request); - module2.exports.stream = makeDispatcher(api.stream); - module2.exports.pipeline = makeDispatcher(api.pipeline); - module2.exports.connect = makeDispatcher(api.connect); - module2.exports.upgrade = makeDispatcher(api.upgrade); - module2.exports.MockClient = MockClient; - module2.exports.MockPool = MockPool; - module2.exports.MockAgent = MockAgent; - module2.exports.mockErrors = mockErrors; - } -}); - -// ../../node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js -var require_js_levenshtein = __commonJS({ - "../../node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js"(exports, module2) { - "use strict"; - module2.exports = function() { - function _min(d0, d1, d2, bx, ay) { - return d0 < d1 || d2 < d1 ? d0 > d2 ? d2 + 1 : d0 + 1 : bx === ay ? d1 : d1 + 1; - } - __name(_min, "_min"); - return function(a, b2) { - if (a === b2) { - return 0; - } - if (a.length > b2.length) { - var tmp = a; - a = b2; - b2 = tmp; - } - var la = a.length; - var lb = b2.length; - while (la > 0 && a.charCodeAt(la - 1) === b2.charCodeAt(lb - 1)) { - la--; - lb--; - } - var offset = 0; - while (offset < la && a.charCodeAt(offset) === b2.charCodeAt(offset)) { - offset++; - } - la -= offset; - lb -= offset; - if (la === 0 || lb < 3) { - return lb; - } - var x = 0; - var y; - var d0; - var d1; - var d2; - var d3; - var dd; - var dy; - var ay; - var bx0; - var bx1; - var bx2; - var bx3; - var vector = []; - for (y = 0; y < la; y++) { - vector.push(y + 1); - vector.push(a.charCodeAt(offset + y)); - } - var len = vector.length - 1; - for (; x < lb - 3; ) { - bx0 = b2.charCodeAt(offset + (d0 = x)); - bx1 = b2.charCodeAt(offset + (d1 = x + 1)); - bx2 = b2.charCodeAt(offset + (d2 = x + 2)); - bx3 = b2.charCodeAt(offset + (d3 = x + 3)); - dd = x += 4; - for (y = 0; y < len; y += 2) { - dy = vector[y]; - ay = vector[y + 1]; - d0 = _min(dy, d0, d1, bx0, ay); - d1 = _min(d0, d1, d2, bx1, ay); - d2 = _min(d1, d2, d3, bx2, ay); - dd = _min(d2, d3, dd, bx3, ay); - vector[y] = dd; - d3 = d2; - d2 = d1; - d1 = d0; - d0 = dy; - } - } - for (; x < lb; ) { - bx0 = b2.charCodeAt(offset + (d0 = x)); - dd = ++x; - for (y = 0; y < len; y += 2) { - dy = vector[y]; - vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]); - d0 = dy; - } - } - return dd; - }; - }(); - } -}); - -// ../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js -var require_pluralize = __commonJS({ - "../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js"(exports, module2) { - (function(root, pluralize2) { - if (typeof require === "function" && typeof exports === "object" && typeof module2 === "object") { - module2.exports = pluralize2(); - } else if (typeof define === "function" && false) { - define(function() { - return pluralize2(); - }); - } else { - root.pluralize = pluralize2(); - } - })(exports, function() { - var pluralRules = []; - var singularRules = []; - var uncountables = {}; - var irregularPlurals = {}; - var irregularSingles = {}; - function sanitizeRule(rule) { - if (typeof rule === "string") { - return new RegExp("^" + rule + "$", "i"); - } - return rule; - } - __name(sanitizeRule, "sanitizeRule"); - function restoreCase(word, token) { - if (word === token) - return token; - if (word === word.toLowerCase()) - return token.toLowerCase(); - if (word === word.toUpperCase()) - return token.toUpperCase(); - if (word[0] === word[0].toUpperCase()) { - return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); - } - return token.toLowerCase(); - } - __name(restoreCase, "restoreCase"); - function interpolate(str, args) { - return str.replace(/\$(\d{1,2})/g, function(match, index) { - return args[index] || ""; - }); - } - __name(interpolate, "interpolate"); - function replace(word, rule) { - return word.replace(rule[0], function(match, index) { - var result = interpolate(rule[1], arguments); - if (match === "") { - return restoreCase(word[index - 1], result); - } - return restoreCase(match, result); - }); - } - __name(replace, "replace"); - function sanitizeWord(token, word, rules) { - if (!token.length || uncountables.hasOwnProperty(token)) { - return word; - } - var len = rules.length; - while (len--) { - var rule = rules[len]; - if (rule[0].test(word)) - return replace(word, rule); - } - return word; - } - __name(sanitizeWord, "sanitizeWord"); - function replaceWord(replaceMap, keepMap, rules) { - return function(word) { - var token = word.toLowerCase(); - if (keepMap.hasOwnProperty(token)) { - return restoreCase(word, token); - } - if (replaceMap.hasOwnProperty(token)) { - return restoreCase(word, replaceMap[token]); - } - return sanitizeWord(token, word, rules); - }; - } - __name(replaceWord, "replaceWord"); - function checkWord(replaceMap, keepMap, rules, bool) { - return function(word) { - var token = word.toLowerCase(); - if (keepMap.hasOwnProperty(token)) - return true; - if (replaceMap.hasOwnProperty(token)) - return false; - return sanitizeWord(token, token, rules) === token; - }; - } - __name(checkWord, "checkWord"); - function pluralize2(word, count2, inclusive) { - var pluralized = count2 === 1 ? pluralize2.singular(word) : pluralize2.plural(word); - return (inclusive ? count2 + " " : "") + pluralized; - } - __name(pluralize2, "pluralize"); - pluralize2.plural = replaceWord( - irregularSingles, - irregularPlurals, - pluralRules - ); - pluralize2.isPlural = checkWord( - irregularSingles, - irregularPlurals, - pluralRules - ); - pluralize2.singular = replaceWord( - irregularPlurals, - irregularSingles, - singularRules - ); - pluralize2.isSingular = checkWord( - irregularPlurals, - irregularSingles, - singularRules - ); - pluralize2.addPluralRule = function(rule, replacement) { - pluralRules.push([sanitizeRule(rule), replacement]); - }; - pluralize2.addSingularRule = function(rule, replacement) { - singularRules.push([sanitizeRule(rule), replacement]); - }; - pluralize2.addUncountableRule = function(word) { - if (typeof word === "string") { - uncountables[word.toLowerCase()] = true; - return; - } - pluralize2.addPluralRule(word, "$0"); - pluralize2.addSingularRule(word, "$0"); - }; - pluralize2.addIrregularRule = function(single, plural) { - plural = plural.toLowerCase(); - single = single.toLowerCase(); - irregularSingles[single] = plural; - irregularPlurals[plural] = single; - }; - [ - ["I", "we"], - ["me", "us"], - ["he", "they"], - ["she", "they"], - ["them", "them"], - ["myself", "ourselves"], - ["yourself", "yourselves"], - ["itself", "themselves"], - ["herself", "themselves"], - ["himself", "themselves"], - ["themself", "themselves"], - ["is", "are"], - ["was", "were"], - ["has", "have"], - ["this", "these"], - ["that", "those"], - ["echo", "echoes"], - ["dingo", "dingoes"], - ["volcano", "volcanoes"], - ["tornado", "tornadoes"], - ["torpedo", "torpedoes"], - ["genus", "genera"], - ["viscus", "viscera"], - ["stigma", "stigmata"], - ["stoma", "stomata"], - ["dogma", "dogmata"], - ["lemma", "lemmata"], - ["schema", "schemata"], - ["anathema", "anathemata"], - ["ox", "oxen"], - ["axe", "axes"], - ["die", "dice"], - ["yes", "yeses"], - ["foot", "feet"], - ["eave", "eaves"], - ["goose", "geese"], - ["tooth", "teeth"], - ["quiz", "quizzes"], - ["human", "humans"], - ["proof", "proofs"], - ["carve", "carves"], - ["valve", "valves"], - ["looey", "looies"], - ["thief", "thieves"], - ["groove", "grooves"], - ["pickaxe", "pickaxes"], - ["passerby", "passersby"] - ].forEach(function(rule) { - return pluralize2.addIrregularRule(rule[0], rule[1]); - }); - [ - [/s?$/i, "s"], - [/[^\u0000-\u007F]$/i, "$0"], - [/([^aeiou]ese)$/i, "$1"], - [/(ax|test)is$/i, "$1es"], - [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"], - [/(e[mn]u)s?$/i, "$1s"], - [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"], - [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"], - [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"], - [/(seraph|cherub)(?:im)?$/i, "$1im"], - [/(her|at|gr)o$/i, "$1oes"], - [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"], - [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"], - [/sis$/i, "ses"], - [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"], - [/([^aeiouy]|qu)y$/i, "$1ies"], - [/([^ch][ieo][ln])ey$/i, "$1ies"], - [/(x|ch|ss|sh|zz)$/i, "$1es"], - [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"], - [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"], - [/(pe)(?:rson|ople)$/i, "$1ople"], - [/(child)(?:ren)?$/i, "$1ren"], - [/eaux$/i, "$0"], - [/m[ae]n$/i, "men"], - ["thou", "you"] - ].forEach(function(rule) { - return pluralize2.addPluralRule(rule[0], rule[1]); - }); - [ - [/s$/i, ""], - [/(ss)$/i, "$1"], - [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"], - [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"], - [/ies$/i, "y"], - [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"], - [/\b(mon|smil)ies$/i, "$1ey"], - [/\b((?:tit)?m|l)ice$/i, "$1ouse"], - [/(seraph|cherub)im$/i, "$1"], - [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"], - [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"], - [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"], - [/(test)(?:is|es)$/i, "$1is"], - [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"], - [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"], - [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"], - [/(alumn|alg|vertebr)ae$/i, "$1a"], - [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"], - [/(matr|append)ices$/i, "$1ix"], - [/(pe)(rson|ople)$/i, "$1rson"], - [/(child)ren$/i, "$1"], - [/(eau)x?$/i, "$1"], - [/men$/i, "man"] - ].forEach(function(rule) { - return pluralize2.addSingularRule(rule[0], rule[1]); - }); - [ - "adulthood", - "advice", - "agenda", - "aid", - "aircraft", - "alcohol", - "ammo", - "analytics", - "anime", - "athletics", - "audio", - "bison", - "blood", - "bream", - "buffalo", - "butter", - "carp", - "cash", - "chassis", - "chess", - "clothing", - "cod", - "commerce", - "cooperation", - "corps", - "debris", - "diabetes", - "digestion", - "elk", - "energy", - "equipment", - "excretion", - "expertise", - "firmware", - "flounder", - "fun", - "gallows", - "garbage", - "graffiti", - "hardware", - "headquarters", - "health", - "herpes", - "highjinks", - "homework", - "housework", - "information", - "jeans", - "justice", - "kudos", - "labour", - "literature", - "machinery", - "mackerel", - "mail", - "media", - "mews", - "moose", - "music", - "mud", - "manga", - "news", - "only", - "personnel", - "pike", - "plankton", - "pliers", - "police", - "pollution", - "premises", - "rain", - "research", - "rice", - "salmon", - "scissors", - "series", - "sewage", - "shambles", - "shrimp", - "software", - "species", - "staff", - "swine", - "tennis", - "traffic", - "transportation", - "trout", - "tuna", - "wealth", - "welfare", - "whiting", - "wildebeest", - "wildlife", - "you", - /pok[eé]mon$/i, - /[^aeiou]ese$/i, - /deer$/i, - /fish$/i, - /measles$/i, - /o[iu]s$/i, - /pox$/i, - /sheep$/i - ].forEach(pluralize2.addUncountableRule); - return pluralize2; - }); - } -}); - -// ../../node_modules/.pnpm/is-regexp@2.1.0/node_modules/is-regexp/index.js -var require_is_regexp = __commonJS({ - "../../node_modules/.pnpm/is-regexp@2.1.0/node_modules/is-regexp/index.js"(exports, module2) { - "use strict"; - module2.exports = (input) => Object.prototype.toString.call(input) === "[object RegExp]"; - } -}); - -// ../../node_modules/.pnpm/is-obj@2.0.0/node_modules/is-obj/index.js -var require_is_obj = __commonJS({ - "../../node_modules/.pnpm/is-obj@2.0.0/node_modules/is-obj/index.js"(exports, module2) { - "use strict"; - module2.exports = (value) => { - const type = typeof value; - return value !== null && (type === "object" || type === "function"); - }; - } -}); - -// ../../node_modules/.pnpm/get-own-enumerable-property-symbols@3.0.2/node_modules/get-own-enumerable-property-symbols/lib/index.js -var require_lib2 = __commonJS({ - "../../node_modules/.pnpm/get-own-enumerable-property-symbols@3.0.2/node_modules/get-own-enumerable-property-symbols/lib/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = (object) => Object.getOwnPropertySymbols(object).filter((keySymbol) => Object.prototype.propertyIsEnumerable.call(object, keySymbol)); - } -}); - -// package.json -var require_package3 = __commonJS({ - "package.json"(exports, module2) { - module2.exports = { - name: "@prisma/client", - version: "4.8.1", - description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports MySQL, PostgreSQL, MariaDB, SQLite databases.", - keywords: [ - "orm", - "prisma2", - "prisma", - "client", - "query", - "database", - "sql", - "postgres", - "postgresql", - "mysql", - "sqlite", - "mariadb", - "mssql", - "typescript", - "query-builder" - ], - main: "index.js", - browser: "index-browser.js", - types: "index.d.ts", - license: "Apache-2.0", - engines: { - node: ">=14.17" - }, - homepage: "https://www.prisma.io", - repository: { - type: "git", - url: "https://github.com/prisma/prisma.git", - directory: "packages/client" - }, - author: "Tim Suchanek ", - bugs: "https://github.com/prisma/prisma/issues", - scripts: { - dev: "DEV=true node -r esbuild-register helpers/build.ts", - build: "node -r esbuild-register helpers/build.ts", - test: "jest --verbose", - "test:functional": "node -r esbuild-register helpers/functional-test/run-tests.ts", - "test:memory": "node -r esbuild-register helpers/memory-tests.ts", - "test:functional:code": "node -r esbuild-register helpers/functional-test/run-tests.ts --no-types", - "test:functional:types": "node -r esbuild-register helpers/functional-test/run-tests.ts --types-only", - "test-notypes": "jest --verbose --testPathIgnorePatterns src/__tests__/types/types.test.ts", - generate: "node scripts/postinstall.js", - postinstall: "node scripts/postinstall.js", - prepublishOnly: "pnpm run build", - "new-test": "NODE_OPTIONS='-r ts-node/register' yo ./helpers/generator-test/index.ts" - }, - files: [ - "README.md", - "runtime", - "scripts", - "generator-build", - "edge.js", - "edge.d.ts", - "index.js", - "index.d.ts", - "index-browser.js" - ], - devDependencies: { - "@faker-js/faker": "7.6.0", - "@fast-check/jest": "1.4.0", - "@jest/globals": "29.3.1", - "@jest/test-sequencer": "29.3.1", - "@opentelemetry/api": "1.2.0", - "@opentelemetry/context-async-hooks": "1.7.0", - "@opentelemetry/instrumentation": "0.33.0", - "@opentelemetry/resources": "1.7.0", - "@opentelemetry/sdk-trace-base": "1.7.0", - "@opentelemetry/semantic-conventions": "1.7.0", - "@prisma/debug": "workspace:*", - "@prisma/engine-core": "workspace:*", - "@prisma/engines": "workspace:*", - "@prisma/fetch-engine": "workspace:*", - "@prisma/generator-helper": "workspace:*", - "@prisma/get-platform": "workspace:*", - "@prisma/instrumentation": "workspace:*", - "@prisma/internals": "workspace:*", - "@prisma/migrate": "workspace:*", - "@prisma/mini-proxy": "0.3.0", - "@swc-node/register": "1.5.4", - "@swc/core": "1.3.14", - "@swc/jest": "0.2.23", - "@timsuchanek/copy": "1.4.5", - "@types/debug": "4.1.7", - "@types/fs-extra": "9.0.13", - "@types/jest": "29.2.4", - "@types/js-levenshtein": "1.1.1", - "@types/mssql": "8.1.1", - "@types/node": "14.18.34", - "@types/pg": "8.6.5", - "@types/yeoman-generator": "5.2.11", - arg: "5.0.2", - benchmark: "2.1.4", - chalk: "4.1.2", - cuid: "2.1.8", - "decimal.js": "10.4.2", - esbuild: "0.15.13", - execa: "5.1.1", - "expect-type": "0.15.0", - "flat-map-polyfill": "0.3.8", - "fs-extra": "11.1.0", - "fs-monkey": "1.0.3", - "get-own-enumerable-property-symbols": "3.0.2", - globby: "11.1.0", - "indent-string": "4.0.0", - "is-obj": "2.0.0", - "is-regexp": "2.1.0", - jest: "29.3.1", - "jest-junit": "15.0.0", - "jest-snapshot": "29.3.1", - "js-levenshtein": "1.1.6", - klona: "2.0.5", - "lz-string": "1.4.4", - "make-dir": "3.1.0", - mariadb: "3.0.2", - memfs: "3.4.10", - mssql: "9.0.1", - "node-fetch": "2.6.7", - pg: "8.8.0", - "pkg-up": "3.1.0", - pluralize: "8.0.0", - "replace-string": "3.1.0", - resolve: "1.22.1", - rimraf: "3.0.2", - "simple-statistics": "7.8.0", - "sort-keys": "4.2.0", - "source-map-support": "0.5.21", - "sql-template-tag": "5.0.3", - "stacktrace-parser": "0.1.10", - "strip-ansi": "6.0.1", - "strip-indent": "3.0.0", - "ts-jest": "29.0.3", - "ts-node": "10.9.1", - "ts-pattern": "4.0.5", - tsd: "0.21.0", - typescript: "4.8.4", - "yeoman-generator": "5.7.0", - yo: "4.3.1" - }, - peerDependencies: { - prisma: "*" - }, - peerDependenciesMeta: { - prisma: { - optional: true - } - }, - dependencies: { - "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" - }, - sideEffects: false - }; - } -}); - -// src/runtime/index.ts -var runtime_exports = {}; -__export(runtime_exports, { - DMMF: () => DMMF, - DMMFClass: () => DMMFHelper, - Debug: () => Debug, - Decimal: () => decimal_default, - Engine: () => Engine, - Extensions: () => extensions_exports, - MetricsClient: () => MetricsClient, - NotFoundError: () => NotFoundError2, - PrismaClientExtensionError: () => PrismaClientExtensionError, - PrismaClientInitializationError: () => PrismaClientInitializationError, - PrismaClientKnownRequestError: () => PrismaClientKnownRequestError, - PrismaClientRustPanicError: () => PrismaClientRustPanicError, - PrismaClientUnknownRequestError: () => PrismaClientUnknownRequestError, - PrismaClientValidationError: () => PrismaClientValidationError, - Sql: () => Sql, - Types: () => types_exports, - decompressFromBase64: () => decompressFromBase642, - empty: () => empty, - findSync: () => findSync, - getPrismaClient: () => getPrismaClient, - join: () => join, - makeDocument: () => makeDocument, - makeStrictEnum: () => makeStrictEnum, - objectEnumValues: () => objectEnumValues, - raw: () => raw, - sqltag: () => sql, - transformDocument: () => transformDocument, - unpack: () => unpack, - warnEnvConflicts: () => warnEnvConflicts -}); -module.exports = __toCommonJS(runtime_exports); -var lzString = __toESM(require_lz_string()); - -// src/runtime/core/extensions/index.ts -var extensions_exports = {}; -__export(extensions_exports, { - defineExtension: () => defineExtension, - getExtensionContext: () => getExtensionContext -}); - -// src/runtime/core/extensions/defineExtension.ts -function defineExtension(ext) { - if (typeof ext === "function") { - return ext; - } - return (client) => client.$extends(ext); -} -__name(defineExtension, "defineExtension"); - -// src/runtime/core/extensions/getExtensionContext.ts -function getExtensionContext(that) { - return that; -} -__name(getExtensionContext, "getExtensionContext"); - -// src/runtime/core/types/index.ts -var types_exports = {}; -__export(types_exports, { - Extensions: () => Extensions_exports, - Utils: () => Utils_exports -}); - -// src/runtime/core/types/Extensions.ts -var Extensions_exports = {}; - -// src/runtime/core/types/Utils.ts -var Utils_exports = {}; - -// ../debug/src/index.ts -var import_debug = __toESM(require_src()); -var MAX_LOGS = 100; -var debugArgsHistory = []; -var _a, _b; -if (typeof process !== "undefined" && typeof ((_a = process.stderr) == null ? void 0 : _a.write) !== "function") { - import_debug.default.log = (_b = console.debug) != null ? _b : console.log; -} -function debugCall(namespace) { - const debugNamespace = (0, import_debug.default)(namespace); - const call = Object.assign((...args) => { - debugNamespace.log = call.log; - if (args.length !== 0) { - debugArgsHistory.push([namespace, ...args]); - } - if (debugArgsHistory.length > MAX_LOGS) { - debugArgsHistory.shift(); - } - return debugNamespace("", ...args); - }, debugNamespace); - return call; -} -__name(debugCall, "debugCall"); -var Debug = Object.assign(debugCall, import_debug.default); -function getLogs(numChars = 7500) { - const output = debugArgsHistory.map( - (c) => c.map((item) => { - if (typeof item === "string") { - return item; - } - return JSON.stringify(item); - }).join(" ") - ).join("\n"); - if (output.length < numChars) { - return output; - } - return output.slice(-numChars); -} -__name(getLogs, "getLogs"); -function clearLogs() { - debugArgsHistory.length = 0; -} -__name(clearLogs, "clearLogs"); -var src_default = Debug; - -// ../internals/src/utils/tryLoadEnvs.ts -var import_chalk = __toESM(require_source()); -var import_dotenv = __toESM(require_main2()); -var import_fs = __toESM(require("fs")); -var import_path = __toESM(require("path")); - -// ../internals/src/dotenvExpand.ts -function dotenvExpand(config2) { - const environment = config2.ignoreProcessEnv ? {} : process.env; - const interpolate = /* @__PURE__ */ __name((envValue) => { - const matches = envValue.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g) || []; - return matches.reduce(function(newEnv, match) { - const parts = /(.?)\${([a-zA-Z0-9_]+)?}/g.exec(match); - if (!parts) { - return newEnv; - } - const prefix = parts[1]; - let value, replacePart; - if (prefix === "\\") { - replacePart = parts[0]; - value = replacePart.replace("\\$", "$"); - } else { - const key = parts[2]; - replacePart = parts[0].substring(prefix.length); - value = Object.hasOwnProperty.call(environment, key) ? environment[key] : config2.parsed[key] || ""; - value = interpolate(value); - } - return newEnv.replace(replacePart, value); - }, envValue); - }, "interpolate"); - for (const configKey in config2.parsed) { - const value = Object.hasOwnProperty.call(environment, configKey) ? environment[configKey] : config2.parsed[configKey]; - config2.parsed[configKey] = interpolate(value); - } - for (const processKey in config2.parsed) { - environment[processKey] = config2.parsed[processKey]; - } - return config2; -} -__name(dotenvExpand, "dotenvExpand"); - -// ../internals/src/utils/tryLoadEnvs.ts -var debug2 = src_default("prisma:tryLoadEnv"); -function tryLoadEnvs({ - rootEnvPath, - schemaEnvPath -}, opts = { - conflictCheck: "none" -}) { - var _a3, _b2; - const rootEnvInfo = loadEnv(rootEnvPath); - if (opts.conflictCheck !== "none") { - checkForConflicts(rootEnvInfo, schemaEnvPath, opts.conflictCheck); - } - let schemaEnvInfo = null; - if (!pathsEqual(rootEnvInfo == null ? void 0 : rootEnvInfo.path, schemaEnvPath)) { - schemaEnvInfo = loadEnv(schemaEnvPath); - } - if (!rootEnvInfo && !schemaEnvInfo) { - debug2("No Environment variables loaded"); - } - if (schemaEnvInfo == null ? void 0 : schemaEnvInfo.dotenvResult.error) { - return console.error(import_chalk.default.redBright.bold("Schema Env Error: ") + schemaEnvInfo.dotenvResult.error); - } - const messages = [rootEnvInfo == null ? void 0 : rootEnvInfo.message, schemaEnvInfo == null ? void 0 : schemaEnvInfo.message].filter(Boolean); - return { - message: messages.join("\n"), - parsed: { - ...(_a3 = rootEnvInfo == null ? void 0 : rootEnvInfo.dotenvResult) == null ? void 0 : _a3.parsed, - ...(_b2 = schemaEnvInfo == null ? void 0 : schemaEnvInfo.dotenvResult) == null ? void 0 : _b2.parsed - } - }; -} -__name(tryLoadEnvs, "tryLoadEnvs"); -function checkForConflicts(rootEnvInfo, envPath, type) { - const parsedRootEnv = rootEnvInfo == null ? void 0 : rootEnvInfo.dotenvResult.parsed; - const areNotTheSame = !pathsEqual(rootEnvInfo == null ? void 0 : rootEnvInfo.path, envPath); - if (parsedRootEnv && envPath && areNotTheSame && import_fs.default.existsSync(envPath)) { - const envConfig = import_dotenv.default.parse(import_fs.default.readFileSync(envPath)); - const conflicts = []; - for (const k in envConfig) { - if (parsedRootEnv[k] === envConfig[k]) { - conflicts.push(k); - } - } - if (conflicts.length > 0) { - const relativeRootEnvPath = import_path.default.relative(process.cwd(), rootEnvInfo.path); - const relativeEnvPath = import_path.default.relative(process.cwd(), envPath); - if (type === "error") { - const message = `There is a conflict between env var${conflicts.length > 1 ? "s" : ""} in ${import_chalk.default.underline( - relativeRootEnvPath - )} and ${import_chalk.default.underline(relativeEnvPath)} -Conflicting env vars: -${conflicts.map((conflict) => ` ${import_chalk.default.bold(conflict)}`).join("\n")} - -We suggest to move the contents of ${import_chalk.default.underline(relativeEnvPath)} to ${import_chalk.default.underline( - relativeRootEnvPath - )} to consolidate your env vars. -`; - throw new Error(message); - } else if (type === "warn") { - const message = `Conflict for env var${conflicts.length > 1 ? "s" : ""} ${conflicts.map((c) => import_chalk.default.bold(c)).join(", ")} in ${import_chalk.default.underline(relativeRootEnvPath)} and ${import_chalk.default.underline(relativeEnvPath)} -Env vars from ${import_chalk.default.underline(relativeEnvPath)} overwrite the ones from ${import_chalk.default.underline(relativeRootEnvPath)} - `; - console.warn(`${import_chalk.default.yellow("warn(prisma)")} ${message}`); - } - } - } -} -__name(checkForConflicts, "checkForConflicts"); -function loadEnv(envPath) { - if (exists(envPath)) { - debug2(`Environment variables loaded from ${envPath}`); - return { - dotenvResult: dotenvExpand( - import_dotenv.default.config({ - path: envPath, - debug: process.env.DOTENV_CONFIG_DEBUG ? true : void 0 - }) - ), - message: import_chalk.default.dim(`Environment variables loaded from ${import_path.default.relative(process.cwd(), envPath)}`), - path: envPath - }; - } else { - debug2(`Environment variables not found at ${envPath}`); - } - return null; -} -__name(loadEnv, "loadEnv"); -function pathsEqual(path1, path22) { - return path1 && path22 && import_path.default.resolve(path1) === import_path.default.resolve(path22); -} -__name(pathsEqual, "pathsEqual"); -function exists(p2) { - return Boolean(p2 && import_fs.default.existsSync(p2)); -} -__name(exists, "exists"); - -// ../internals/src/client/getClientEngineType.ts -var DEFAULT_CLIENT_ENGINE_TYPE = "library" /* Library */; -function getClientEngineType(generatorConfig) { - const engineTypeFromEnvVar = getEngineTypeFromEnvVar(); - if (engineTypeFromEnvVar) - return engineTypeFromEnvVar; - if ((generatorConfig == null ? void 0 : generatorConfig.config.engineType) === "library" /* Library */) { - return "library" /* Library */; - } else if ((generatorConfig == null ? void 0 : generatorConfig.config.engineType) === "binary" /* Binary */) { - return "binary" /* Binary */; - } else { - return DEFAULT_CLIENT_ENGINE_TYPE; - } -} -__name(getClientEngineType, "getClientEngineType"); -function getEngineTypeFromEnvVar() { - const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE; - if (engineType === "library" /* Library */) { - return "library" /* Library */; - } else if (engineType === "binary" /* Binary */) { - return "binary" /* Binary */; - } else { - return void 0; - } -} -__name(getEngineTypeFromEnvVar, "getEngineTypeFromEnvVar"); - -// ../internals/src/cli/utils.ts -var import_arg = __toESM(require_arg()); -var import_strip_indent = __toESM(require_strip_indent()); -function isError(result) { - return result instanceof Error; -} -__name(isError, "isError"); - -// ../engines/src/index.ts -var import_engines_version = __toESM(require_engines_version()); - -// ../get-platform/src/getNodeAPIName.ts -var NODE_API_QUERY_ENGINE_URL_BASE = "libquery_engine"; -function getNodeAPIName(platform3, type) { - const isUrl = type === "url"; - if (platform3.includes("windows")) { - return isUrl ? `query_engine.dll.node` : `query_engine-${platform3}.dll.node`; - } else if (platform3.includes("darwin")) { - return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.dylib.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${platform3}.dylib.node`; - } else { - return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.so.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${platform3}.so.node`; - } -} -__name(getNodeAPIName, "getNodeAPIName"); - -// ../get-platform/src/getPlatform.ts -var import_child_process = __toESM(require("child_process")); -var import_fs2 = __toESM(require("fs")); -var import_os = __toESM(require("os")); - -// ../../node_modules/.pnpm/ts-pattern@4.0.6/node_modules/ts-pattern/dist/index.modern.js -var e = Symbol("@ts-pattern/matcher"); -var t = "@ts-pattern/anonymous-select-key"; -var n = /* @__PURE__ */ __name((e2) => Boolean(e2 && "object" == typeof e2), "n"); -var r = /* @__PURE__ */ __name((t2) => t2 && !!t2[e], "r"); -var o = /* @__PURE__ */ __name((t2, c, a) => { - if (n(t2)) { - if (r(t2)) { - const n2 = t2[e](), { matched: r2, selections: o2 } = n2.match(c); - return r2 && o2 && Object.keys(o2).forEach((e2) => a(e2, o2[e2])), r2; - } - if (!n(c)) - return false; - if (Array.isArray(t2)) - return !!Array.isArray(c) && t2.length === c.length && t2.every((e2, t3) => o(e2, c[t3], a)); - if (t2 instanceof Map) - return c instanceof Map && Array.from(t2.keys()).every((e2) => o(t2.get(e2), c.get(e2), a)); - if (t2 instanceof Set) { - if (!(c instanceof Set)) - return false; - if (0 === t2.size) - return 0 === c.size; - if (1 === t2.size) { - const [e2] = Array.from(t2.values()); - return r(e2) ? Array.from(c.values()).every((t3) => o(e2, t3, a)) : c.has(e2); - } - return Array.from(t2.values()).every((e2) => c.has(e2)); - } - return Object.keys(t2).every((n2) => { - const s = t2[n2]; - return (n2 in c || r(i = s) && "optional" === i[e]().matcherType) && o(s, c[n2], a); - var i; - }); - } - return Object.is(c, t2); -}, "o"); -function f(t2) { - return { [e]: () => ({ match: (e2) => ({ matched: Boolean(t2(e2)) }) }) }; -} -__name(f, "f"); -var m = f(function(e2) { - return true; -}); -var d = f(function(e2) { - return "string" == typeof e2; -}); -var g = f(function(e2) { - return "number" == typeof e2; -}); -var p = f(function(e2) { - return "boolean" == typeof e2; -}); -var b = f(function(e2) { - return "bigint" == typeof e2; -}); -var w = f(function(e2) { - return "symbol" == typeof e2; -}); -var A = f(function(e2) { - return null == e2; -}); -var K = /* @__PURE__ */ __name((e2) => new O(e2, []), "K"); -var O = class { - constructor(e2, t2) { - this.value = void 0, this.cases = void 0, this.value = e2, this.cases = t2; - } - with(...e2) { - const n2 = e2[e2.length - 1], r2 = [e2[0]], c = []; - return 3 === e2.length && "function" == typeof e2[1] ? (r2.push(e2[0]), c.push(e2[1])) : e2.length > 2 && r2.push(...e2.slice(1, e2.length - 1)), new O(this.value, this.cases.concat([{ match: (e3) => { - let n3 = {}; - const a = Boolean(r2.some((t2) => o(t2, e3, (e4, t3) => { - n3[e4] = t3; - })) && c.every((t2) => t2(e3))); - return { matched: a, value: a && Object.keys(n3).length ? t in n3 ? n3[t] : n3 : e3 }; - }, handler: n2 }])); - } - when(e2, t2) { - return new O(this.value, this.cases.concat([{ match: (t3) => ({ matched: Boolean(e2(t3)), value: t3 }), handler: t2 }])); - } - otherwise(e2) { - return new O(this.value, this.cases.concat([{ match: (e3) => ({ matched: true, value: e3 }), handler: e2 }])).run(); - } - exhaustive() { - return this.run(); - } - run() { - let e2, t2 = this.value; - for (let n2 = 0; n2 < this.cases.length; n2++) { - const r2 = this.cases[n2], o2 = r2.match(this.value); - if (o2.matched) { - t2 = o2.value, e2 = r2.handler; - break; - } - } - if (!e2) { - let e3; - try { - e3 = JSON.stringify(this.value); - } catch (t3) { - e3 = this.value; - } - throw new Error(`Pattern matching error: no pattern matches value ${e3}`); - } - return e2(t2, this.value); - } -}; -__name(O, "O"); - -// ../get-platform/src/getPlatform.ts -var import_util = require("util"); -var readFile = (0, import_util.promisify)(import_fs2.default.readFile); -var exists2 = (0, import_util.promisify)(import_fs2.default.exists); -var exec = (0, import_util.promisify)(import_child_process.default.exec); -async function getos() { - const platform3 = import_os.default.platform(); - const arch2 = process.arch; - if (platform3 === "freebsd") { - const version = await getFirstSuccessfulExec([`freebsd-version`]); - if (version && version.trim().length > 0) { - const regex = /^(\d+)\.?/; - const match = regex.exec(version); - if (match) { - return { - platform: "freebsd", - distro: `freebsd${match[1]}`, - arch: arch2 - }; - } - } - } - if (platform3 !== "linux") { - return { - platform: platform3, - arch: arch2 - }; - } - const distro = await resolveDistro(); - return { - platform: "linux", - libssl: await getSSLVersion({ arch: arch2, distro }), - distro, - arch: arch2 - }; -} -__name(getos, "getos"); -function parseDistro(input) { - const idRegex = /^ID="?([^"\n]*)"?$/im; - const idLikeRegex = /^ID_LIKE="?([^"\n]*)"?$/im; - const idMatch = idRegex.exec(input); - const id = idMatch && idMatch[1] && idMatch[1].toLowerCase() || ""; - const idLikeMatch = idLikeRegex.exec(input); - const idLike = idLikeMatch && idLikeMatch[1] && idLikeMatch[1].toLowerCase() || ""; - if (id === "raspbian") { - return "arm"; - } - if (id === "nixos") { - return "nixos"; - } - if (idLike.includes("centos") || idLike.includes("fedora") || idLike.includes("rhel") || id === "fedora") { - return "rhel"; - } - if (idLike.includes("debian") || idLike.includes("ubuntu") || id === "debian") { - return "debian"; - } - return; -} -__name(parseDistro, "parseDistro"); -async function resolveDistro() { - const osReleaseFile = "/etc/os-release"; - const alpineReleaseFile = "/etc/alpine-release"; - if (await exists2(alpineReleaseFile)) { - return "musl"; - } else if (await exists2(osReleaseFile)) { - return parseDistro(await readFile(osReleaseFile, "utf-8")); - } else { - return; - } -} -__name(resolveDistro, "resolveDistro"); -function parseOpenSSLVersion(input) { - const match = /^OpenSSL\s(\d+\.\d+)\.\d+/.exec(input); - if (match) { - const partialVersion = `${match[1]}.x`; - return sanitiseSSLVersion(partialVersion); - } - return void 0; -} -__name(parseOpenSSLVersion, "parseOpenSSLVersion"); -function parseLibSSLVersion(input) { - var _a3; - const match = /libssl\.so\.(\d)(\.\d)?/.exec(input); - if (match) { - const partialVersion = `${match[1]}${(_a3 = match[2]) != null ? _a3 : ".0"}.x`; - return sanitiseSSLVersion(partialVersion); - } - return void 0; -} -__name(parseLibSSLVersion, "parseLibSSLVersion"); -function sanitiseSSLVersion(version) { - if (isLibssl1x(version)) { - return version; - } - const versionSplit = version.split("."); - versionSplit[1] = "0"; - return versionSplit.join("."); -} -__name(sanitiseSSLVersion, "sanitiseSSLVersion"); -async function getSSLVersion(args) { - const libsslVersion = await K(args).with({ distro: "musl" }, () => { - return getFirstSuccessfulExec(["ls -l /lib/libssl.so.3", "ls -l /lib/libssl.so.1.1"]); - }).otherwise(() => { - return getFirstSuccessfulExec(["ls -l /lib64 | grep ssl", "ls -l /usr/lib64 | grep ssl"]); - }); - if (libsslVersion) { - const matchedVersion = parseLibSSLVersion(libsslVersion); - if (matchedVersion) { - return matchedVersion; - } - } - const openSSLVersion = await getFirstSuccessfulExec(["openssl version -v"]); - if (openSSLVersion) { - const matchedVersion = parseOpenSSLVersion(openSSLVersion); - if (matchedVersion) { - return matchedVersion; - } - } - return void 0; -} -__name(getSSLVersion, "getSSLVersion"); -async function getPlatform() { - const { platform: platform3, libssl, distro, arch: arch2 } = await getos(); - if (platform3 === "darwin" && arch2 === "arm64") { - return "darwin-arm64"; - } - if (platform3 === "darwin") { - return "darwin"; - } - if (platform3 === "win32") { - return "windows"; - } - if (platform3 === "freebsd") { - return distro; - } - if (platform3 === "openbsd") { - return "openbsd"; - } - if (platform3 === "netbsd") { - return "netbsd"; - } - if (platform3 === "linux" && distro === "nixos") { - return "linux-nixos"; - } - if (platform3 === "linux" && arch2 === "arm64") { - return `linux-arm64-openssl-${libssl}`; - } - if (platform3 === "linux" && arch2 === "arm") { - return `linux-arm-openssl-${libssl}`; - } - if (platform3 === "linux" && distro === "musl") { - const base = "linux-musl"; - if (!libssl) { - return base; - } - if (isLibssl1x(libssl)) { - return base; - } else { - return `${base}-openssl-${libssl}`; - } - } - if (platform3 === "linux" && distro && libssl) { - return distro + "-openssl-" + libssl; - } - if (libssl) { - return "debian-openssl-" + libssl; - } - if (distro) { - return distro + "-openssl-1.1.x"; - } - return "debian-openssl-1.1.x"; -} -__name(getPlatform, "getPlatform"); -async function discardError(runPromise) { - try { - return await runPromise(); - } catch (e2) { - return void 0; - } -} -__name(discardError, "discardError"); -function getFirstSuccessfulExec(commands) { - return discardError(async () => { - const results = await Promise.allSettled(commands.map((cmd) => exec(cmd))); - const { value } = results.find(({ status }) => status === "fulfilled"); - return String(value.stdout); - }); -} -__name(getFirstSuccessfulExec, "getFirstSuccessfulExec"); -function isLibssl1x(libssl) { - return libssl.startsWith("1."); -} -__name(isLibssl1x, "isLibssl1x"); - -// ../get-platform/src/isNodeAPISupported.ts -var import_fs3 = __toESM(require("fs")); -async function isNodeAPISupported() { - const customLibraryPath = process.env.PRISMA_QUERY_ENGINE_LIBRARY; - const customLibraryExists = customLibraryPath && import_fs3.default.existsSync(customLibraryPath); - const os3 = await getos(); - if (!customLibraryExists && (os3.arch === "x32" || os3.arch === "ia32")) { - throw new Error( - `The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set \`engineType = "binary"\` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)` - ); - } -} -__name(isNodeAPISupported, "isNodeAPISupported"); - -// ../get-platform/src/platforms.ts -var platforms = [ - "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-nixos", - "windows", - "freebsd11", - "freebsd12", - "freebsd13", - "openbsd", - "netbsd", - "arm" -]; - -// ../engines/src/index.ts -var import_path2 = __toESM(require("path")); -var import_engines_version2 = __toESM(require_engines_version()); -var debug3 = src_default("prisma:engines"); -function getEnginesPath() { - return import_path2.default.join(__dirname, "../"); -} -__name(getEnginesPath, "getEnginesPath"); -var DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE = "libquery-engine" /* libqueryEngine */; -import_path2.default.join(__dirname, "../query-engine-darwin"); -import_path2.default.join(__dirname, "../introspection-engine-darwin"); -import_path2.default.join(__dirname, "../prisma-fmt-darwin"); -import_path2.default.join(__dirname, "../query-engine-darwin-arm64"); -import_path2.default.join(__dirname, "../introspection-engine-darwin-arm64"); -import_path2.default.join(__dirname, "../prisma-fmt-darwin-arm64"); -import_path2.default.join(__dirname, "../query-engine-debian-openssl-1.0.x"); -import_path2.default.join(__dirname, "../introspection-engine-debian-openssl-1.0.x"); -import_path2.default.join(__dirname, "../prisma-fmt-debian-openssl-1.0.x"); -import_path2.default.join(__dirname, "../query-engine-debian-openssl-1.1.x"); -import_path2.default.join(__dirname, "../introspection-engine-debian-openssl-1.1.x"); -import_path2.default.join(__dirname, "../prisma-fmt-debian-openssl-1.1.x"); -import_path2.default.join(__dirname, "../query-engine-debian-openssl-3.0.x"); -import_path2.default.join(__dirname, "../introspection-engine-debian-openssl-3.0.x"); -import_path2.default.join(__dirname, "../prisma-fmt-debian-openssl-3.0.x"); -import_path2.default.join(__dirname, "../query-engine-rhel-openssl-1.0.x"); -import_path2.default.join(__dirname, "../introspection-engine-rhel-openssl-1.0.x"); -import_path2.default.join(__dirname, "../prisma-fmt-rhel-openssl-1.0.x"); -import_path2.default.join(__dirname, "../query-engine-rhel-openssl-1.1.x"); -import_path2.default.join(__dirname, "../introspection-engine-rhel-openssl-1.1.x"); -import_path2.default.join(__dirname, "../prisma-fmt-rhel-openssl-1.1.x"); -import_path2.default.join(__dirname, "../query-engine-rhel-openssl-3.0.x"); -import_path2.default.join(__dirname, "../introspection-engine-rhel-openssl-3.0.x"); -import_path2.default.join(__dirname, "../prisma-fmt-rhel-openssl-3.0.x"); -import_path2.default.join(__dirname, "../libquery_engine-darwin.dylib.node"); -import_path2.default.join(__dirname, "../libquery_engine-darwin-arm64.dylib.node"); -import_path2.default.join(__dirname, "../libquery_engine-debian-openssl-1.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-debian-openssl-1.1.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-debian-openssl-3.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.1.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-3.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-linux-musl.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-linux-musl-openssl-3.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-rhel-openssl-1.0.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-rhel-openssl-1.1.x.so.node"); -import_path2.default.join(__dirname, "../libquery_engine-rhel-openssl-3.0.x.so.node"); -import_path2.default.join(__dirname, "../query_engine-windows.dll.node"); - -// ../engine-core/src/binary/BinaryEngine.ts -var import_chalk3 = __toESM(require_source()); -var import_child_process2 = require("child_process"); -var import_execa = __toESM(require_execa()); -var import_fs5 = __toESM(require("fs")); -var import_net = __toESM(require("net")); -var import_p_retry = __toESM(require_p_retry()); -var import_path3 = __toESM(require("path")); -var import_url = require("url"); -var import_util4 = require("util"); - -// ../engine-core/src/common/Engine.ts -var Engine = class { -}; -__name(Engine, "Engine"); - -// ../engine-core/src/common/errors/PrismaClientInitializationError.ts -var PrismaClientInitializationError = class extends Error { - constructor(message, clientVersion2, errorCode) { - super(message); - this.clientVersion = clientVersion2; - this.errorCode = errorCode; - Error.captureStackTrace(PrismaClientInitializationError); - } - get [Symbol.toStringTag]() { - return "PrismaClientInitializationError"; - } -}; -__name(PrismaClientInitializationError, "PrismaClientInitializationError"); - -// ../engine-core/src/common/errors/PrismaClientKnownRequestError.ts -var PrismaClientKnownRequestError = class extends Error { - constructor(message, { code, clientVersion: clientVersion2, meta, batchRequestIdx }) { - super(message); - this.code = code; - this.clientVersion = clientVersion2; - this.meta = meta; - this.batchRequestIdx = batchRequestIdx; - } - get [Symbol.toStringTag]() { - return "PrismaClientKnownRequestError"; - } -}; -__name(PrismaClientKnownRequestError, "PrismaClientKnownRequestError"); - -// ../engine-core/src/common/errors/utils/log.ts -function getMessage(log3) { - if (typeof log3 === "string") { - return log3; - } else { - return log3.message; - } -} -__name(getMessage, "getMessage"); -function getBacktrace(log3) { - var _a3, _b2, _c, _d, _e, _f, _g; - if ((_a3 = log3.fields) == null ? void 0 : _a3.message) { - let str = (_b2 = log3.fields) == null ? void 0 : _b2.message; - if ((_c = log3.fields) == null ? void 0 : _c.file) { - str += ` in ${log3.fields.file}`; - if ((_d = log3.fields) == null ? void 0 : _d.line) { - str += `:${log3.fields.line}`; - } - if ((_e = log3.fields) == null ? void 0 : _e.column) { - str += `:${log3.fields.column}`; - } - } - if ((_f = log3.fields) == null ? void 0 : _f.reason) { - str += ` -${(_g = log3.fields) == null ? void 0 : _g.reason}`; - } - return str; - } - return "Unknown error"; -} -__name(getBacktrace, "getBacktrace"); -function isPanic(err) { - var _a3; - return ((_a3 = err.fields) == null ? void 0 : _a3.message) === "PANIC"; -} -__name(isPanic, "isPanic"); -function isRustLog(e2) { - return e2.timestamp && typeof e2.level === "string" && typeof e2.target === "string"; -} -__name(isRustLog, "isRustLog"); -function isRustErrorLog(e2) { - var _a3, _b2; - return isRustLog(e2) && (e2.level === "error" || ((_b2 = (_a3 = e2.fields) == null ? void 0 : _a3.message) == null ? void 0 : _b2.includes("fatal error"))); -} -__name(isRustErrorLog, "isRustErrorLog"); -function convertLog(rustLog) { - const isQuery = isQueryLog(rustLog.fields); - const level = isQuery ? "query" : rustLog.level.toLowerCase(); - return { - ...rustLog, - level, - timestamp: new Date(rustLog.timestamp) - }; -} -__name(convertLog, "convertLog"); -function isQueryLog(fields) { - return Boolean(fields.query); -} -__name(isQueryLog, "isQueryLog"); - -// ../engine-core/src/common/errors/PrismaClientRustError.ts -var PrismaClientRustError = class extends Error { - constructor({ clientVersion: clientVersion2, error: error2 }) { - const backtrace = getBacktrace(error2); - super(backtrace != null ? backtrace : "Unknown error"); - this._isPanic = isPanic(error2); - this.clientVersion = clientVersion2; - } - get [Symbol.toStringTag]() { - return "PrismaClientRustPanicError"; - } - isPanic() { - return this._isPanic; - } -}; -__name(PrismaClientRustError, "PrismaClientRustError"); - -// ../engine-core/src/common/errors/PrismaClientRustPanicError.ts -var PrismaClientRustPanicError = class extends Error { - constructor(message, clientVersion2) { - super(message); - this.clientVersion = clientVersion2; - } - get [Symbol.toStringTag]() { - return "PrismaClientRustPanicError"; - } -}; -__name(PrismaClientRustPanicError, "PrismaClientRustPanicError"); - -// ../engine-core/src/common/errors/PrismaClientUnknownRequestError.ts -var PrismaClientUnknownRequestError = class extends Error { - constructor(message, { clientVersion: clientVersion2, batchRequestIdx }) { - super(message); - this.clientVersion = clientVersion2; - this.batchRequestIdx = batchRequestIdx; - } - get [Symbol.toStringTag]() { - return "PrismaClientUnknownRequestError"; - } -}; -__name(PrismaClientUnknownRequestError, "PrismaClientUnknownRequestError"); - -// ../engine-core/src/common/errors/utils/getErrorMessageWithLink.ts -var import_chalk2 = __toESM(require_source()); -var import_strip_ansi = __toESM(require_strip_ansi()); - -// ../engine-core/src/common/utils/util.ts -var import_fs4 = __toESM(require("fs")); -var import_new_github_issue_url = __toESM(require_new_github_issue_url()); -var debug4 = src_default("plusX"); -function plusX(file) { - const s = import_fs4.default.statSync(file); - const newMode = s.mode | 64 | 8 | 1; - if (s.mode === newMode) { - debug4(`Execution permissions of ${file} are fine`); - return; - } - const base8 = newMode.toString(8).slice(-3); - debug4(`Have to call plusX on ${file}`); - import_fs4.default.chmodSync(file, base8); -} -__name(plusX, "plusX"); -function transformPlatformToEnvValue(platform3) { - return { fromEnvVar: null, value: platform3 }; -} -__name(transformPlatformToEnvValue, "transformPlatformToEnvValue"); -function fixBinaryTargets(binaryTargets, platform3) { - binaryTargets = binaryTargets || []; - if (!binaryTargets.find((object) => object.value === "native")) { - return [transformPlatformToEnvValue("native"), ...binaryTargets]; - } - return [...binaryTargets, transformPlatformToEnvValue(platform3)]; -} -__name(fixBinaryTargets, "fixBinaryTargets"); -function getGitHubIssueUrl({ - title, - user = "prisma", - repo = "prisma", - template = "bug_report.md", - body -}) { - return (0, import_new_github_issue_url.default)({ - user, - repo, - template, - title, - body - }); -} -__name(getGitHubIssueUrl, "getGitHubIssueUrl"); - -// ../engine-core/src/common/errors/utils/maskQuery.ts -function maskQuery(query2) { - if (!query2) { - return ""; - } - return query2.replace(/".*"/g, '"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g, (substr) => { - return `${substr[0]}5`; - }); -} -__name(maskQuery, "maskQuery"); - -// ../engine-core/src/common/errors/utils/normalizeLogs.ts -function normalizeLogs(logs) { - return logs.split("\n").map((l) => { - return l.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("\n"); -} -__name(normalizeLogs, "normalizeLogs"); - -// ../engine-core/src/common/errors/utils/getErrorMessageWithLink.ts -function getErrorMessageWithLink({ - version, - platform: platform3, - title, - description, - engineVersion, - database, - query: query2 -}) { - var _a3, _b2; - const gotLogs = getLogs(6e3 - ((_a3 = query2 == null ? void 0 : query2.length) != null ? _a3 : 0)); - const logs = normalizeLogs((0, import_strip_ansi.default)(gotLogs)); - const moreInfo = description ? `# Description -\`\`\` -${description} -\`\`\`` : ""; - const body = (0, import_strip_ansi.default)( - `Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${(_b2 = process.version) == null ? void 0 : _b2.padEnd(19)}| -| OS | ${platform3 == null ? void 0 : platform3.padEnd(19)}| -| Prisma Client | ${version == null ? void 0 : version.padEnd(19)}| -| Query Engine | ${engineVersion == null ? void 0 : engineVersion.padEnd(19)}| -| Database | ${database == null ? void 0 : database.padEnd(19)}| - -${moreInfo} - -## Logs -\`\`\` -${logs} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${query2 ? maskQuery(query2) : ""} -\`\`\` -` - ); - const url = getGitHubIssueUrl({ title, body }); - return `${title} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${import_chalk2.default.underline(url)} - -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. -`; -} -__name(getErrorMessageWithLink, "getErrorMessageWithLink"); - -// ../engine-core/src/common/errors/utils/prismaGraphQLToJSError.ts -function prismaGraphQLToJSError({ error: error2, user_facing_error }, clientVersion2) { - if (user_facing_error.error_code) { - return new PrismaClientKnownRequestError(user_facing_error.message, { - code: user_facing_error.error_code, - clientVersion: clientVersion2, - meta: user_facing_error.meta, - batchRequestIdx: user_facing_error.batch_request_idx - }); - } - return new PrismaClientUnknownRequestError(error2, { - clientVersion: clientVersion2, - batchRequestIdx: user_facing_error.batch_request_idx - }); -} -__name(prismaGraphQLToJSError, "prismaGraphQLToJSError"); - -// ../engine-core/src/common/utils/printGeneratorConfig.ts -var import_indent_string = __toESM(require_indent_string()); -function printGeneratorConfig(config2) { - return String(new GeneratorConfigClass(config2)); -} -__name(printGeneratorConfig, "printGeneratorConfig"); -var GeneratorConfigClass = class { - constructor(config2) { - this.config = config2; - } - toString() { - const { config: config2 } = this; - const provider = config2.provider.fromEnvVar ? `env("${config2.provider.fromEnvVar}")` : config2.provider.value; - const obj = JSON.parse( - JSON.stringify({ - provider, - binaryTargets: getOriginalBinaryTargetsValue(config2.binaryTargets) - }) - ); - return `generator ${config2.name} { -${(0, import_indent_string.default)(printDatamodelObject(obj), 2)} -}`; - } -}; -__name(GeneratorConfigClass, "GeneratorConfigClass"); -function getOriginalBinaryTargetsValue(binaryTargets) { - let value; - if (binaryTargets.length > 0) { - const binaryTargetsFromEnvVar = binaryTargets.find((object) => object.fromEnvVar !== null); - if (binaryTargetsFromEnvVar) { - value = `env("${binaryTargetsFromEnvVar.fromEnvVar}")`; - } else { - value = binaryTargets.map((object) => object.value); - } - } else { - value = void 0; - } - return value; -} -__name(getOriginalBinaryTargetsValue, "getOriginalBinaryTargetsValue"); -function printDatamodelObject(obj) { - const maxLength = Object.keys(obj).reduce((max2, curr) => Math.max(max2, curr.length), 0); - return Object.entries(obj).map(([key, value]) => `${key.padEnd(maxLength)} = ${niceStringify(value)}`).join("\n"); -} -__name(printDatamodelObject, "printDatamodelObject"); -function niceStringify(value) { - return JSON.parse( - JSON.stringify(value, (_, value2) => { - if (Array.isArray(value2)) { - return `[${value2.map((element) => JSON.stringify(element)).join(", ")}]`; - } - return JSON.stringify(value2); - }) - ); -} -__name(niceStringify, "niceStringify"); - -// ../engine-core/src/tools/byline.ts -var import_stream = __toESM(require("stream")); -var import_util3 = __toESM(require("util")); -function byline(readStream, options) { - return createStream(readStream, options); -} -__name(byline, "byline"); -function createStream(readStream, options) { - if (readStream) { - return createLineStream(readStream, options); - } else { - return new LineStream(options); - } -} -__name(createStream, "createStream"); -function createLineStream(readStream, options) { - if (!readStream) { - throw new Error("expected readStream"); - } - if (!readStream.readable) { - throw new Error("readStream must be readable"); - } - const ls = new LineStream(options); - readStream.pipe(ls); - return ls; -} -__name(createLineStream, "createLineStream"); -function LineStream(options) { - import_stream.default.Transform.call(this, options); - options = options || {}; - this._readableState.objectMode = true; - this._lineBuffer = []; - this._keepEmptyLines = options.keepEmptyLines || false; - this._lastChunkEndedWithCR = false; - this.on("pipe", function(src) { - if (!this.encoding) { - if (src instanceof import_stream.default.Readable) { - this.encoding = src._readableState.encoding; - } - } - }); -} -__name(LineStream, "LineStream"); -import_util3.default.inherits(LineStream, import_stream.default.Transform); -LineStream.prototype._transform = function(chunk, encoding, done) { - encoding = encoding || "utf8"; - if (Buffer.isBuffer(chunk)) { - if (encoding == "buffer") { - chunk = chunk.toString(); - encoding = "utf8"; - } else { - chunk = chunk.toString(encoding); - } - } - this._chunkEncoding = encoding; - const lines = chunk.split(/\r\n|\r|\n/g); - if (this._lastChunkEndedWithCR && chunk[0] == "\n") { - lines.shift(); - } - if (this._lineBuffer.length > 0) { - this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; - lines.shift(); - } - this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; - this._lineBuffer = this._lineBuffer.concat(lines); - this._pushBuffer(encoding, 1, done); -}; -LineStream.prototype._pushBuffer = function(encoding, keep, done) { - while (this._lineBuffer.length > keep) { - const line = this._lineBuffer.shift(); - if (this._keepEmptyLines || line.length > 0) { - if (!this.push(this._reencode(line, encoding))) { - const self2 = this; - setImmediate(function() { - self2._pushBuffer(encoding, keep, done); - }); - return; - } - } - } - done(); -}; -LineStream.prototype._flush = function(done) { - this._pushBuffer(this._chunkEncoding, 0, done); -}; -LineStream.prototype._reencode = function(line, chunkEncoding) { - if (this.encoding && this.encoding != chunkEncoding) { - return Buffer.from(line, chunkEncoding).toString(this.encoding); - } else if (this.encoding) { - return line; - } else { - return Buffer.from(line, chunkEncoding); - } -}; - -// ../engine-core/src/tools/omit.ts -function omit(obj, keys2) { - return Object.keys(obj).filter((key) => !keys2.includes(key)).reduce((result, key) => { - result[key] = obj[key]; - return result; - }, {}); -} -__name(omit, "omit"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js -var _globalThis = typeof globalThis === "object" ? globalThis : global; - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/version.js -var VERSION = "1.2.0"; - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/internal/semver.js -var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; -function _makeCompatibilityCheck(ownVersion) { - var acceptedVersions = /* @__PURE__ */ new Set([ownVersion]); - var rejectedVersions = /* @__PURE__ */ new Set(); - var myVersionMatch = ownVersion.match(re); - if (!myVersionMatch) { - return function() { - return false; - }; - } - var ownVersionParsed = { - major: +myVersionMatch[1], - minor: +myVersionMatch[2], - patch: +myVersionMatch[3], - prerelease: myVersionMatch[4] - }; - if (ownVersionParsed.prerelease != null) { - return /* @__PURE__ */ __name(function isExactmatch(globalVersion) { - return globalVersion === ownVersion; - }, "isExactmatch"); - } - function _reject(v) { - rejectedVersions.add(v); - return false; - } - __name(_reject, "_reject"); - function _accept(v) { - acceptedVersions.add(v); - return true; - } - __name(_accept, "_accept"); - return /* @__PURE__ */ __name(function isCompatible2(globalVersion) { - if (acceptedVersions.has(globalVersion)) { - return true; - } - if (rejectedVersions.has(globalVersion)) { - return false; - } - var globalVersionMatch = globalVersion.match(re); - if (!globalVersionMatch) { - return _reject(globalVersion); - } - var globalVersionParsed = { - major: +globalVersionMatch[1], - minor: +globalVersionMatch[2], - patch: +globalVersionMatch[3], - prerelease: globalVersionMatch[4] - }; - if (globalVersionParsed.prerelease != null) { - return _reject(globalVersion); - } - if (ownVersionParsed.major !== globalVersionParsed.major) { - return _reject(globalVersion); - } - if (ownVersionParsed.major === 0) { - if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) { - return _accept(globalVersion); - } - return _reject(globalVersion); - } - if (ownVersionParsed.minor <= globalVersionParsed.minor) { - return _accept(globalVersion); - } - return _reject(globalVersion); - }, "isCompatible"); -} -__name(_makeCompatibilityCheck, "_makeCompatibilityCheck"); -var isCompatible = _makeCompatibilityCheck(VERSION); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js -var major = VERSION.split(".")[0]; -var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major); -var _global = _globalThis; -function registerGlobal(type, instance, diag3, allowOverride) { - var _a3; - if (allowOverride === void 0) { - allowOverride = false; - } - var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : { - version: VERSION - }; - if (!allowOverride && api[type]) { - var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type); - diag3.error(err.stack || err.message); - return false; - } - if (api.version !== VERSION) { - var err = new Error("@opentelemetry/api: All API registration versions must match"); - diag3.error(err.stack || err.message); - return false; - } - api[type] = instance; - diag3.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + "."); - return true; -} -__name(registerGlobal, "registerGlobal"); -function getGlobal(type) { - var _a3, _b2; - var globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version; - if (!globalVersion || !isCompatible(globalVersion)) { - return; - } - return (_b2 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b2 === void 0 ? void 0 : _b2[type]; -} -__name(getGlobal, "getGlobal"); -function unregisterGlobal(type, diag3) { - diag3.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + "."); - var api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; - if (api) { - delete api[type]; - } -} -__name(unregisterGlobal, "unregisterGlobal"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js -var DiagComponentLogger = function() { - function DiagComponentLogger2(props) { - this._namespace = props.namespace || "DiagComponentLogger"; - } - __name(DiagComponentLogger2, "DiagComponentLogger"); - DiagComponentLogger2.prototype.debug = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy("debug", this._namespace, args); - }; - DiagComponentLogger2.prototype.error = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy("error", this._namespace, args); - }; - DiagComponentLogger2.prototype.info = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy("info", this._namespace, args); - }; - DiagComponentLogger2.prototype.warn = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy("warn", this._namespace, args); - }; - DiagComponentLogger2.prototype.verbose = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy("verbose", this._namespace, args); - }; - return DiagComponentLogger2; -}(); -function logProxy(funcName, namespace, args) { - var logger2 = getGlobal("diag"); - if (!logger2) { - return; - } - args.unshift(namespace); - return logger2[funcName].apply(logger2, args); -} -__name(logProxy, "logProxy"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/diag/types.js -var DiagLogLevel; -(function(DiagLogLevel2) { - DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE"; - DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR"; - DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN"; - DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO"; - DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG"; - DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE"; - DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL"; -})(DiagLogLevel || (DiagLogLevel = {})); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js -function createLogLevelDiagLogger(maxLevel, logger2) { - if (maxLevel < DiagLogLevel.NONE) { - maxLevel = DiagLogLevel.NONE; - } else if (maxLevel > DiagLogLevel.ALL) { - maxLevel = DiagLogLevel.ALL; - } - logger2 = logger2 || {}; - function _filterFunc(funcName, theLevel) { - var theFunc = logger2[funcName]; - if (typeof theFunc === "function" && maxLevel >= theLevel) { - return theFunc.bind(logger2); - } - return function() { - }; - } - __name(_filterFunc, "_filterFunc"); - return { - error: _filterFunc("error", DiagLogLevel.ERROR), - warn: _filterFunc("warn", DiagLogLevel.WARN), - info: _filterFunc("info", DiagLogLevel.INFO), - debug: _filterFunc("debug", DiagLogLevel.DEBUG), - verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE) - }; -} -__name(createLogLevelDiagLogger, "createLogLevelDiagLogger"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/api/diag.js -var API_NAME = "diag"; -var DiagAPI = function() { - function DiagAPI2() { - function _logProxy(funcName) { - return function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var logger2 = getGlobal("diag"); - if (!logger2) - return; - return logger2[funcName].apply(logger2, args); - }; - } - __name(_logProxy, "_logProxy"); - var self2 = this; - self2.setLogger = function(logger2, logLevel) { - var _a3, _b2; - if (logLevel === void 0) { - logLevel = DiagLogLevel.INFO; - } - if (logger2 === self2) { - var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation"); - self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message); - return false; - } - var oldLogger = getGlobal("diag"); - var newLogger = createLogLevelDiagLogger(logLevel, logger2); - if (oldLogger) { - var stack = (_b2 = new Error().stack) !== null && _b2 !== void 0 ? _b2 : ""; - oldLogger.warn("Current logger will be overwritten from " + stack); - newLogger.warn("Current logger will overwrite one already registered from " + stack); - } - return registerGlobal("diag", newLogger, self2, true); - }; - self2.disable = function() { - unregisterGlobal(API_NAME, self2); - }; - self2.createComponentLogger = function(options) { - return new DiagComponentLogger(options); - }; - self2.verbose = _logProxy("verbose"); - self2.debug = _logProxy("debug"); - self2.info = _logProxy("info"); - self2.warn = _logProxy("warn"); - self2.error = _logProxy("error"); - } - __name(DiagAPI2, "DiagAPI"); - DiagAPI2.instance = function() { - if (!this._instance) { - this._instance = new DiagAPI2(); - } - return this._instance; - }; - return DiagAPI2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js -var BaggageImpl = function() { - function BaggageImpl2(entries) { - this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map(); - } - __name(BaggageImpl2, "BaggageImpl"); - BaggageImpl2.prototype.getEntry = function(key) { - var entry = this._entries.get(key); - if (!entry) { - return void 0; - } - return Object.assign({}, entry); - }; - BaggageImpl2.prototype.getAllEntries = function() { - return Array.from(this._entries.entries()).map(function(_a3) { - var k = _a3[0], v = _a3[1]; - return [k, v]; - }); - }; - BaggageImpl2.prototype.setEntry = function(key, entry) { - var newBaggage = new BaggageImpl2(this._entries); - newBaggage._entries.set(key, entry); - return newBaggage; - }; - BaggageImpl2.prototype.removeEntry = function(key) { - var newBaggage = new BaggageImpl2(this._entries); - newBaggage._entries.delete(key); - return newBaggage; - }; - BaggageImpl2.prototype.removeEntries = function() { - var keys2 = []; - for (var _i = 0; _i < arguments.length; _i++) { - keys2[_i] = arguments[_i]; - } - var newBaggage = new BaggageImpl2(this._entries); - for (var _a3 = 0, keys_1 = keys2; _a3 < keys_1.length; _a3++) { - var key = keys_1[_a3]; - newBaggage._entries.delete(key); - } - return newBaggage; - }; - BaggageImpl2.prototype.clear = function() { - return new BaggageImpl2(); - }; - return BaggageImpl2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js -var baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/baggage/utils.js -var diag = DiagAPI.instance(); -function createBaggage(entries) { - if (entries === void 0) { - entries = {}; - } - return new BaggageImpl(new Map(Object.entries(entries))); -} -__name(createBaggage, "createBaggage"); -function baggageEntryMetadataFromString(str) { - if (typeof str !== "string") { - diag.error("Cannot create baggage metadata from unknown type: " + typeof str); - str = ""; - } - return { - __TYPE__: baggageEntryMetadataSymbol, - toString: function() { - return str; - } - }; -} -__name(baggageEntryMetadataFromString, "baggageEntryMetadataFromString"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js -var consoleMap = [ - { n: "error", c: "error" }, - { n: "warn", c: "warn" }, - { n: "info", c: "info" }, - { n: "debug", c: "debug" }, - { n: "verbose", c: "trace" } -]; -var DiagConsoleLogger = function() { - function DiagConsoleLogger2() { - function _consoleFunc(funcName) { - return function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (console) { - var theFunc = console[funcName]; - if (typeof theFunc !== "function") { - theFunc = console.log; - } - if (typeof theFunc === "function") { - return theFunc.apply(console, args); - } - } - }; - } - __name(_consoleFunc, "_consoleFunc"); - for (var i = 0; i < consoleMap.length; i++) { - this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); - } - } - __name(DiagConsoleLogger2, "DiagConsoleLogger"); - return DiagConsoleLogger2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js -var defaultTextMapGetter = { - get: function(carrier, key) { - if (carrier == null) { - return void 0; - } - return carrier[key]; - }, - keys: function(carrier) { - if (carrier == null) { - return []; - } - return Object.keys(carrier); - } -}; -var defaultTextMapSetter = { - set: function(carrier, key, value) { - if (carrier == null) { - return; - } - carrier[key] = value; - } -}; - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/context/context.js -function createContextKey(description) { - return Symbol.for(description); -} -__name(createContextKey, "createContextKey"); -var BaseContext = function() { - function BaseContext2(parentContext) { - var self2 = this; - self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map(); - self2.getValue = function(key) { - return self2._currentContext.get(key); - }; - self2.setValue = function(key, value) { - var context3 = new BaseContext2(self2._currentContext); - context3._currentContext.set(key, value); - return context3; - }; - self2.deleteValue = function(key) { - var context3 = new BaseContext2(self2._currentContext); - context3._currentContext.delete(key); - return context3; - }; - } - __name(BaseContext2, "BaseContext"); - return BaseContext2; -}(); -var ROOT_CONTEXT = new BaseContext(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js -var __spreadArray = function(to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -var NoopContextManager = function() { - function NoopContextManager2() { - } - __name(NoopContextManager2, "NoopContextManager"); - NoopContextManager2.prototype.active = function() { - return ROOT_CONTEXT; - }; - NoopContextManager2.prototype.with = function(_context, fn, thisArg) { - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return fn.call.apply(fn, __spreadArray([thisArg], args)); - }; - NoopContextManager2.prototype.bind = function(_context, target) { - return target; - }; - NoopContextManager2.prototype.enable = function() { - return this; - }; - NoopContextManager2.prototype.disable = function() { - return this; - }; - return NoopContextManager2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/api/context.js -var __spreadArray2 = function(to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -var API_NAME2 = "context"; -var NOOP_CONTEXT_MANAGER = new NoopContextManager(); -var ContextAPI = function() { - function ContextAPI2() { - } - __name(ContextAPI2, "ContextAPI"); - ContextAPI2.getInstance = function() { - if (!this._instance) { - this._instance = new ContextAPI2(); - } - return this._instance; - }; - ContextAPI2.prototype.setGlobalContextManager = function(contextManager) { - return registerGlobal(API_NAME2, contextManager, DiagAPI.instance()); - }; - ContextAPI2.prototype.active = function() { - return this._getContextManager().active(); - }; - ContextAPI2.prototype.with = function(context3, fn, thisArg) { - var _a3; - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return (_a3 = this._getContextManager()).with.apply(_a3, __spreadArray2([context3, fn, thisArg], args)); - }; - ContextAPI2.prototype.bind = function(context3, target) { - return this._getContextManager().bind(context3, target); - }; - ContextAPI2.prototype._getContextManager = function() { - return getGlobal(API_NAME2) || NOOP_CONTEXT_MANAGER; - }; - ContextAPI2.prototype.disable = function() { - this._getContextManager().disable(); - unregisterGlobal(API_NAME2, DiagAPI.instance()); - }; - return ContextAPI2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js -var TraceFlags; -(function(TraceFlags2) { - TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE"; - TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED"; -})(TraceFlags || (TraceFlags = {})); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js -var INVALID_SPANID = "0000000000000000"; -var INVALID_TRACEID = "00000000000000000000000000000000"; -var INVALID_SPAN_CONTEXT = { - traceId: INVALID_TRACEID, - spanId: INVALID_SPANID, - traceFlags: TraceFlags.NONE -}; - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js -var NonRecordingSpan = function() { - function NonRecordingSpan2(_spanContext) { - if (_spanContext === void 0) { - _spanContext = INVALID_SPAN_CONTEXT; - } - this._spanContext = _spanContext; - } - __name(NonRecordingSpan2, "NonRecordingSpan"); - NonRecordingSpan2.prototype.spanContext = function() { - return this._spanContext; - }; - NonRecordingSpan2.prototype.setAttribute = function(_key, _value) { - return this; - }; - NonRecordingSpan2.prototype.setAttributes = function(_attributes) { - return this; - }; - NonRecordingSpan2.prototype.addEvent = function(_name, _attributes) { - return this; - }; - NonRecordingSpan2.prototype.setStatus = function(_status) { - return this; - }; - NonRecordingSpan2.prototype.updateName = function(_name) { - return this; - }; - NonRecordingSpan2.prototype.end = function(_endTime) { - }; - NonRecordingSpan2.prototype.isRecording = function() { - return false; - }; - NonRecordingSpan2.prototype.recordException = function(_exception, _time) { - }; - return NonRecordingSpan2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js -var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN"); -function getSpan(context3) { - return context3.getValue(SPAN_KEY) || void 0; -} -__name(getSpan, "getSpan"); -function getActiveSpan() { - return getSpan(ContextAPI.getInstance().active()); -} -__name(getActiveSpan, "getActiveSpan"); -function setSpan(context3, span) { - return context3.setValue(SPAN_KEY, span); -} -__name(setSpan, "setSpan"); -function deleteSpan(context3) { - return context3.deleteValue(SPAN_KEY); -} -__name(deleteSpan, "deleteSpan"); -function setSpanContext(context3, spanContext) { - return setSpan(context3, new NonRecordingSpan(spanContext)); -} -__name(setSpanContext, "setSpanContext"); -function getSpanContext(context3) { - var _a3; - return (_a3 = getSpan(context3)) === null || _a3 === void 0 ? void 0 : _a3.spanContext(); -} -__name(getSpanContext, "getSpanContext"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js -var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; -var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; -function isValidTraceId(traceId) { - return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID; -} -__name(isValidTraceId, "isValidTraceId"); -function isValidSpanId(spanId) { - return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID; -} -__name(isValidSpanId, "isValidSpanId"); -function isSpanContextValid(spanContext) { - return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId); -} -__name(isSpanContextValid, "isSpanContextValid"); -function wrapSpanContext(spanContext) { - return new NonRecordingSpan(spanContext); -} -__name(wrapSpanContext, "wrapSpanContext"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js -var context = ContextAPI.getInstance(); -var NoopTracer = function() { - function NoopTracer2() { - } - __name(NoopTracer2, "NoopTracer"); - NoopTracer2.prototype.startSpan = function(name, options, context3) { - var root = Boolean(options === null || options === void 0 ? void 0 : options.root); - if (root) { - return new NonRecordingSpan(); - } - var parentFromContext = context3 && getSpanContext(context3); - if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) { - return new NonRecordingSpan(parentFromContext); - } else { - return new NonRecordingSpan(); - } - }; - NoopTracer2.prototype.startActiveSpan = function(name, arg2, arg3, arg4) { - var opts; - var ctx; - var fn; - if (arguments.length < 2) { - return; - } else if (arguments.length === 2) { - fn = arg2; - } else if (arguments.length === 3) { - opts = arg2; - fn = arg3; - } else { - opts = arg2; - ctx = arg3; - fn = arg4; - } - var parentContext = ctx !== null && ctx !== void 0 ? ctx : context.active(); - var span = this.startSpan(name, opts, parentContext); - var contextWithSpanSet = setSpan(parentContext, span); - return context.with(contextWithSpanSet, fn, void 0, span); - }; - return NoopTracer2; -}(); -function isSpanContext(spanContext) { - return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number"; -} -__name(isSpanContext, "isSpanContext"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js -var NOOP_TRACER = new NoopTracer(); -var ProxyTracer = function() { - function ProxyTracer2(_provider, name, version, options) { - this._provider = _provider; - this.name = name; - this.version = version; - this.options = options; - } - __name(ProxyTracer2, "ProxyTracer"); - ProxyTracer2.prototype.startSpan = function(name, options, context3) { - return this._getTracer().startSpan(name, options, context3); - }; - ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) { - var tracer = this._getTracer(); - return Reflect.apply(tracer.startActiveSpan, tracer, arguments); - }; - ProxyTracer2.prototype._getTracer = function() { - if (this._delegate) { - return this._delegate; - } - var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); - if (!tracer) { - return NOOP_TRACER; - } - this._delegate = tracer; - return this._delegate; - }; - return ProxyTracer2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js -var NoopTracerProvider = function() { - function NoopTracerProvider2() { - } - __name(NoopTracerProvider2, "NoopTracerProvider"); - NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) { - return new NoopTracer(); - }; - return NoopTracerProvider2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js -var NOOP_TRACER_PROVIDER = new NoopTracerProvider(); -var ProxyTracerProvider = function() { - function ProxyTracerProvider2() { - } - __name(ProxyTracerProvider2, "ProxyTracerProvider"); - ProxyTracerProvider2.prototype.getTracer = function(name, version, options) { - var _a3; - return (_a3 = this.getDelegateTracer(name, version, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version, options); - }; - ProxyTracerProvider2.prototype.getDelegate = function() { - var _a3; - return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER; - }; - ProxyTracerProvider2.prototype.setDelegate = function(delegate) { - this._delegate = delegate; - }; - ProxyTracerProvider2.prototype.getDelegateTracer = function(name, version, options) { - var _a3; - return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version, options); - }; - return ProxyTracerProvider2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js -var SamplingDecision; -(function(SamplingDecision3) { - SamplingDecision3[SamplingDecision3["NOT_RECORD"] = 0] = "NOT_RECORD"; - SamplingDecision3[SamplingDecision3["RECORD"] = 1] = "RECORD"; - SamplingDecision3[SamplingDecision3["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; -})(SamplingDecision || (SamplingDecision = {})); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js -var SpanKind; -(function(SpanKind2) { - SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL"; - SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER"; - SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT"; - SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER"; - SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER"; -})(SpanKind || (SpanKind = {})); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/status.js -var SpanStatusCode; -(function(SpanStatusCode2) { - SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET"; - SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK"; - SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR"; -})(SpanStatusCode || (SpanStatusCode = {})); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js -var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]"; -var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}"; -var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}"; -var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$"); -var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -__name(validateKey, "validateKey"); -function validateValue(value) { - return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value); -} -__name(validateValue, "validateValue"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js -var MAX_TRACE_STATE_ITEMS = 32; -var MAX_TRACE_STATE_LEN = 512; -var LIST_MEMBERS_SEPARATOR = ","; -var LIST_MEMBER_KEY_VALUE_SPLITTER = "="; -var TraceStateImpl = function() { - function TraceStateImpl2(rawTraceState) { - this._internalState = /* @__PURE__ */ new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - __name(TraceStateImpl2, "TraceStateImpl"); - TraceStateImpl2.prototype.set = function(key, value) { - var traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - }; - TraceStateImpl2.prototype.unset = function(key) { - var traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - }; - TraceStateImpl2.prototype.get = function(key) { - return this._internalState.get(key); - }; - TraceStateImpl2.prototype.serialize = function() { - var _this = this; - return this._keys().reduce(function(agg, key) { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key)); - return agg; - }, []).join(LIST_MEMBERS_SEPARATOR); - }; - TraceStateImpl2.prototype._parse = function(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) { - var listMember = part.trim(); - var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - var key = listMember.slice(0, i); - var value = listMember.slice(i + 1, part.length); - if (validateKey(key) && validateValue(value)) { - agg.set(key, value); - } else { - } - } - return agg; - }, /* @__PURE__ */ new Map()); - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS)); - } - }; - TraceStateImpl2.prototype._keys = function() { - return Array.from(this._internalState.keys()).reverse(); - }; - TraceStateImpl2.prototype._clone = function() { - var traceState = new TraceStateImpl2(); - traceState._internalState = new Map(this._internalState); - return traceState; - }; - return TraceStateImpl2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/api/trace.js -var API_NAME3 = "trace"; -var TraceAPI = function() { - function TraceAPI2() { - this._proxyTracerProvider = new ProxyTracerProvider(); - this.wrapSpanContext = wrapSpanContext; - this.isSpanContextValid = isSpanContextValid; - this.deleteSpan = deleteSpan; - this.getSpan = getSpan; - this.getActiveSpan = getActiveSpan; - this.getSpanContext = getSpanContext; - this.setSpan = setSpan; - this.setSpanContext = setSpanContext; - } - __name(TraceAPI2, "TraceAPI"); - TraceAPI2.getInstance = function() { - if (!this._instance) { - this._instance = new TraceAPI2(); - } - return this._instance; - }; - TraceAPI2.prototype.setGlobalTracerProvider = function(provider) { - var success = registerGlobal(API_NAME3, this._proxyTracerProvider, DiagAPI.instance()); - if (success) { - this._proxyTracerProvider.setDelegate(provider); - } - return success; - }; - TraceAPI2.prototype.getTracerProvider = function() { - return getGlobal(API_NAME3) || this._proxyTracerProvider; - }; - TraceAPI2.prototype.getTracer = function(name, version) { - return this.getTracerProvider().getTracer(name, version); - }; - TraceAPI2.prototype.disable = function() { - unregisterGlobal(API_NAME3, DiagAPI.instance()); - this._proxyTracerProvider = new ProxyTracerProvider(); - }; - return TraceAPI2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js -var NoopTextMapPropagator = function() { - function NoopTextMapPropagator2() { - } - __name(NoopTextMapPropagator2, "NoopTextMapPropagator"); - NoopTextMapPropagator2.prototype.inject = function(_context, _carrier) { - }; - NoopTextMapPropagator2.prototype.extract = function(context3, _carrier) { - return context3; - }; - NoopTextMapPropagator2.prototype.fields = function() { - return []; - }; - return NoopTextMapPropagator2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js -var BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key"); -function getBaggage(context3) { - return context3.getValue(BAGGAGE_KEY) || void 0; -} -__name(getBaggage, "getBaggage"); -function setBaggage(context3, baggage) { - return context3.setValue(BAGGAGE_KEY, baggage); -} -__name(setBaggage, "setBaggage"); -function deleteBaggage(context3) { - return context3.deleteValue(BAGGAGE_KEY); -} -__name(deleteBaggage, "deleteBaggage"); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/api/propagation.js -var API_NAME4 = "propagation"; -var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator(); -var PropagationAPI = function() { - function PropagationAPI2() { - this.createBaggage = createBaggage; - this.getBaggage = getBaggage; - this.setBaggage = setBaggage; - this.deleteBaggage = deleteBaggage; - } - __name(PropagationAPI2, "PropagationAPI"); - PropagationAPI2.getInstance = function() { - if (!this._instance) { - this._instance = new PropagationAPI2(); - } - return this._instance; - }; - PropagationAPI2.prototype.setGlobalPropagator = function(propagator) { - return registerGlobal(API_NAME4, propagator, DiagAPI.instance()); - }; - PropagationAPI2.prototype.inject = function(context3, carrier, setter) { - if (setter === void 0) { - setter = defaultTextMapSetter; - } - return this._getGlobalPropagator().inject(context3, carrier, setter); - }; - PropagationAPI2.prototype.extract = function(context3, carrier, getter) { - if (getter === void 0) { - getter = defaultTextMapGetter; - } - return this._getGlobalPropagator().extract(context3, carrier, getter); - }; - PropagationAPI2.prototype.fields = function() { - return this._getGlobalPropagator().fields(); - }; - PropagationAPI2.prototype.disable = function() { - unregisterGlobal(API_NAME4, DiagAPI.instance()); - }; - PropagationAPI2.prototype._getGlobalPropagator = function() { - return getGlobal(API_NAME4) || NOOP_TEXT_MAP_PROPAGATOR; - }; - return PropagationAPI2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+api@1.2.0/node_modules/@opentelemetry/api/build/esm/index.js -var context2 = ContextAPI.getInstance(); -var trace = TraceAPI.getInstance(); -var propagation = PropagationAPI.getInstance(); -var diag2 = DiagAPI.instance(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js -var SUPPRESS_TRACING_KEY = createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING"); -function suppressTracing(context3) { - return context3.setValue(SUPPRESS_TRACING_KEY, true); -} -__name(suppressTracing, "suppressTracing"); -function isTracingSuppressed(context3) { - return context3.getValue(SUPPRESS_TRACING_KEY) === true; -} -__name(isTracingSuppressed, "isTracingSuppressed"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/baggage/constants.js -var BAGGAGE_KEY_PAIR_SEPARATOR = "="; -var BAGGAGE_PROPERTIES_SEPARATOR = ";"; -var BAGGAGE_ITEMS_SEPARATOR = ","; -var BAGGAGE_HEADER = "baggage"; -var BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -var BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -var BAGGAGE_MAX_TOTAL_LENGTH = 8192; - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/baggage/utils.js -var __read = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce(function(hValue, current) { - var value = "" + hValue + (hValue !== "" ? BAGGAGE_ITEMS_SEPARATOR : "") + current; - return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ""); -} -__name(serializeKeyPairs, "serializeKeyPairs"); -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(function(_a3) { - var _b2 = __read(_a3, 2), key = _b2[0], value = _b2[1]; - var entry = encodeURIComponent(key) + "=" + encodeURIComponent(value.value); - if (value.metadata !== void 0) { - entry += BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -__name(getKeyPairs, "getKeyPairs"); -function parsePairKeyValue(entry) { - var valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - var keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - var keyPair = keyPairPart.split(BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - var key = decodeURIComponent(keyPair[0].trim()); - var value = decodeURIComponent(keyPair[1].trim()); - var metadata; - if (valueProps.length > 0) { - metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -__name(parsePairKeyValue, "parsePairKeyValue"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js -var W3CBaggagePropagator = function() { - function W3CBaggagePropagator2() { - } - __name(W3CBaggagePropagator2, "W3CBaggagePropagator"); - W3CBaggagePropagator2.prototype.inject = function(context3, carrier, setter) { - var baggage = propagation.getBaggage(context3); - if (!baggage || isTracingSuppressed(context3)) - return; - var keyPairs = getKeyPairs(baggage).filter(function(pair) { - return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }).slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS); - var headerValue = serializeKeyPairs(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, BAGGAGE_HEADER, headerValue); - } - }; - W3CBaggagePropagator2.prototype.extract = function(context3, carrier, getter) { - var headerValue = getter.get(carrier, BAGGAGE_HEADER); - var baggageString = Array.isArray(headerValue) ? headerValue.join(BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context3; - var baggage = {}; - if (baggageString.length === 0) { - return context3; - } - var pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(function(entry) { - var keyPair = parsePairKeyValue(entry); - if (keyPair) { - var baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context3; - } - return propagation.setBaggage(context3, propagation.createBaggage(baggage)); - }; - W3CBaggagePropagator2.prototype.fields = function() { - return [BAGGAGE_HEADER]; - }; - return W3CBaggagePropagator2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/common/anchored-clock.js -var AnchoredClock = function() { - function AnchoredClock2(systemClock, monotonicClock) { - this._monotonicClock = monotonicClock; - this._epochMillis = systemClock.now(); - this._performanceMillis = monotonicClock.now(); - } - __name(AnchoredClock2, "AnchoredClock"); - AnchoredClock2.prototype.now = function() { - var delta = this._monotonicClock.now() - this._performanceMillis; - return this._epochMillis + delta; - }; - return AnchoredClock2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/common/attributes.js -var __values = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read2 = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -function sanitizeAttributes(attributes) { - var e_1, _a3; - var out = {}; - if (typeof attributes !== "object" || attributes == null) { - return out; - } - try { - for (var _b2 = __values(Object.entries(attributes)), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var _d = __read2(_c.value, 2), key = _d[0], val = _d[1]; - if (!isAttributeKey(key)) { - diag2.warn("Invalid attribute key: " + key); - continue; - } - if (!isAttributeValue(val)) { - diag2.warn("Invalid attribute value set for key: " + key); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } else { - out[key] = val; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_1) - throw e_1.error; - } - } - return out; -} -__name(sanitizeAttributes, "sanitizeAttributes"); -function isAttributeKey(key) { - return typeof key === "string" && key.length > 0; -} -__name(isAttributeKey, "isAttributeKey"); -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -__name(isAttributeValue, "isAttributeValue"); -function isHomogeneousAttributeValueArray(arr) { - var e_2, _a3; - var type; - try { - for (var arr_1 = __values(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) { - var element = arr_1_1.value; - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (arr_1_1 && !arr_1_1.done && (_a3 = arr_1.return)) - _a3.call(arr_1); - } finally { - if (e_2) - throw e_2.error; - } - } - return true; -} -__name(isHomogeneousAttributeValueArray, "isHomogeneousAttributeValueArray"); -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case "number": - case "boolean": - case "string": - return true; - } - return false; -} -__name(isValidPrimitiveAttributeValue, "isValidPrimitiveAttributeValue"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js -function loggingErrorHandler() { - return function(ex) { - diag2.error(stringifyException(ex)); - }; -} -__name(loggingErrorHandler, "loggingErrorHandler"); -function stringifyException(ex) { - if (typeof ex === "string") { - return ex; - } else { - return JSON.stringify(flattenException(ex)); - } -} -__name(stringifyException, "stringifyException"); -function flattenException(ex) { - var result = {}; - var current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(function(propertyName) { - if (result[propertyName]) - return; - var value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -__name(flattenException, "flattenException"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js -var delegateHandler = loggingErrorHandler(); -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } catch (_a3) { - } -} -__name(globalErrorHandler, "globalErrorHandler"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/environment.js -var os2 = __toESM(require("os")); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/sampling.js -var TracesSamplerValues; -(function(TracesSamplerValues2) { - TracesSamplerValues2["AlwaysOff"] = "always_off"; - TracesSamplerValues2["AlwaysOn"] = "always_on"; - TracesSamplerValues2["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues2["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues2["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues2["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues || (TracesSamplerValues = {})); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/browser/globalThis.js -var _globalThis2 = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {}; - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/environment.js -var DEFAULT_LIST_SEPARATOR = ","; -var ENVIRONMENT_NUMBERS_KEYS = [ - "OTEL_BSP_EXPORT_TIMEOUT", - "OTEL_BSP_MAX_EXPORT_BATCH_SIZE", - "OTEL_BSP_MAX_QUEUE_SIZE", - "OTEL_BSP_SCHEDULE_DELAY", - "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT", - "OTEL_ATTRIBUTE_COUNT_LIMIT", - "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT", - "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT", - "OTEL_SPAN_EVENT_COUNT_LIMIT", - "OTEL_SPAN_LINK_COUNT_LIMIT", - "OTEL_EXPORTER_OTLP_TIMEOUT", - "OTEL_EXPORTER_OTLP_TRACES_TIMEOUT", - "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT", - "OTEL_EXPORTER_JAEGER_AGENT_PORT" -]; -function isEnvVarANumber(key) { - return ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1; -} -__name(isEnvVarANumber, "isEnvVarANumber"); -var ENVIRONMENT_LISTS_KEYS = [ - "OTEL_NO_PATCH_MODULES", - "OTEL_PROPAGATORS" -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -__name(isEnvVarAList, "isEnvVarAList"); -var DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -var DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -var DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: "", - ECS_CONTAINER_METADATA_URI_V4: "", - ECS_CONTAINER_METADATA_URI: "", - HOSTNAME: "", - KUBERNETES_SERVICE_HOST: "", - NAMESPACE: "", - OTEL_BSP_EXPORT_TIMEOUT: 3e4, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5e3, - OTEL_EXPORTER_JAEGER_AGENT_HOST: "", - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: "", - OTEL_EXPORTER_JAEGER_PASSWORD: "", - OTEL_EXPORTER_JAEGER_USER: "", - OTEL_EXPORTER_OTLP_ENDPOINT: "", - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "", - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "", - OTEL_EXPORTER_OTLP_HEADERS: "", - OTEL_EXPORTER_OTLP_TRACES_HEADERS: "", - OTEL_EXPORTER_OTLP_METRICS_HEADERS: "", - OTEL_EXPORTER_OTLP_TIMEOUT: 1e4, - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 1e4, - OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 1e4, - OTEL_EXPORTER_ZIPKIN_ENDPOINT: "http://localhost:9411/api/v2/spans", - OTEL_LOG_LEVEL: DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ["tracecontext", "baggage"], - OTEL_RESOURCE_ATTRIBUTES: "", - OTEL_SERVICE_NAME: "", - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: "none", - OTEL_TRACES_SAMPLER: TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: "", - OTEL_EXPORTER_OTLP_INSECURE: "", - OTEL_EXPORTER_OTLP_TRACES_INSECURE: "", - OTEL_EXPORTER_OTLP_METRICS_INSECURE: "", - OTEL_EXPORTER_OTLP_CERTIFICATE: "", - OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: "", - OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: "", - OTEL_EXPORTER_OTLP_COMPRESSION: "", - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "", - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: "", - OTEL_EXPORTER_OTLP_CLIENT_KEY: "", - OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: "", - OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: "", - OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: "", - OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: "", - OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: "" -}; -function parseNumber(name, environment, values, min2, max2) { - if (min2 === void 0) { - min2 = -Infinity; - } - if (max2 === void 0) { - max2 = Infinity; - } - if (typeof values[name] !== "undefined") { - var value = Number(values[name]); - if (!isNaN(value)) { - if (value < min2) { - environment[name] = min2; - } else if (value > max2) { - environment[name] = max2; - } else { - environment[name] = value; - } - } - } -} -__name(parseNumber, "parseNumber"); -function parseStringList(name, output, input, separator) { - if (separator === void 0) { - separator = DEFAULT_LIST_SEPARATOR; - } - var givenValue = input[name]; - if (typeof givenValue === "string") { - output[name] = givenValue.split(separator).map(function(v) { - return v.trim(); - }); - } -} -__name(parseStringList, "parseStringList"); -var logLevelMap = { - ALL: DiagLogLevel.ALL, - VERBOSE: DiagLogLevel.VERBOSE, - DEBUG: DiagLogLevel.DEBUG, - INFO: DiagLogLevel.INFO, - WARN: DiagLogLevel.WARN, - ERROR: DiagLogLevel.ERROR, - NONE: DiagLogLevel.NONE -}; -function setLogLevelFromEnv(key, environment, values) { - var value = values[key]; - if (typeof value === "string") { - var theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; - } - } -} -__name(setLogLevelFromEnv, "setLogLevelFromEnv"); -function parseEnvironment(values) { - var environment = {}; - for (var env2 in DEFAULT_ENVIRONMENT) { - var key = env2; - switch (key) { - case "OTEL_LOG_LEVEL": - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } else { - var value = values[key]; - if (typeof value !== "undefined" && value !== null) { - environment[key] = String(value); - } - } - } - } - return environment; -} -__name(parseEnvironment, "parseEnvironment"); -function getEnvWithoutDefaults() { - return typeof process !== "undefined" ? parseEnvironment(process.env) : parseEnvironment(_globalThis2); -} -__name(getEnvWithoutDefaults, "getEnvWithoutDefaults"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/environment.js -function getEnv() { - var processEnv = parseEnvironment(process.env); - return Object.assign({ - HOSTNAME: os2.hostname() - }, DEFAULT_ENVIRONMENT, processEnv); -} -__name(getEnv, "getEnv"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/globalThis.js -var _globalThis3 = typeof globalThis === "object" ? globalThis : global; - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/hex-to-base64.js -var buf8 = Buffer.alloc(8); -var buf16 = Buffer.alloc(16); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/RandomIdGenerator.js -var SPAN_ID_BYTES = 8; -var TRACE_ID_BYTES = 16; -var RandomIdGenerator = function() { - function RandomIdGenerator3() { - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } - __name(RandomIdGenerator3, "RandomIdGenerator"); - return RandomIdGenerator3; -}(); -var SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return /* @__PURE__ */ __name(function generateId() { - for (var i = 0; i < bytes / 4; i++) { - SHARED_BUFFER.writeUInt32BE(Math.random() * Math.pow(2, 32) >>> 0, i * 4); - } - for (var i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString("hex", 0, bytes); - }, "generateId"); -} -__name(getIdGenerator, "getIdGenerator"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/performance.js -var import_perf_hooks = require("perf_hooks"); -var otperformance = import_perf_hooks.performance; - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/version.js -var VERSION2 = "1.7.0"; - -// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.7.0/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js -var SemanticAttributes = { - AWS_LAMBDA_INVOKED_ARN: "aws.lambda.invoked_arn", - DB_SYSTEM: "db.system", - DB_CONNECTION_STRING: "db.connection_string", - DB_USER: "db.user", - DB_JDBC_DRIVER_CLASSNAME: "db.jdbc.driver_classname", - DB_NAME: "db.name", - DB_STATEMENT: "db.statement", - DB_OPERATION: "db.operation", - DB_MSSQL_INSTANCE_NAME: "db.mssql.instance_name", - DB_CASSANDRA_KEYSPACE: "db.cassandra.keyspace", - DB_CASSANDRA_PAGE_SIZE: "db.cassandra.page_size", - DB_CASSANDRA_CONSISTENCY_LEVEL: "db.cassandra.consistency_level", - DB_CASSANDRA_TABLE: "db.cassandra.table", - DB_CASSANDRA_IDEMPOTENCE: "db.cassandra.idempotence", - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: "db.cassandra.speculative_execution_count", - DB_CASSANDRA_COORDINATOR_ID: "db.cassandra.coordinator.id", - DB_CASSANDRA_COORDINATOR_DC: "db.cassandra.coordinator.dc", - DB_HBASE_NAMESPACE: "db.hbase.namespace", - DB_REDIS_DATABASE_INDEX: "db.redis.database_index", - DB_MONGODB_COLLECTION: "db.mongodb.collection", - DB_SQL_TABLE: "db.sql.table", - EXCEPTION_TYPE: "exception.type", - EXCEPTION_MESSAGE: "exception.message", - EXCEPTION_STACKTRACE: "exception.stacktrace", - EXCEPTION_ESCAPED: "exception.escaped", - FAAS_TRIGGER: "faas.trigger", - FAAS_EXECUTION: "faas.execution", - FAAS_DOCUMENT_COLLECTION: "faas.document.collection", - FAAS_DOCUMENT_OPERATION: "faas.document.operation", - FAAS_DOCUMENT_TIME: "faas.document.time", - FAAS_DOCUMENT_NAME: "faas.document.name", - FAAS_TIME: "faas.time", - FAAS_CRON: "faas.cron", - FAAS_COLDSTART: "faas.coldstart", - FAAS_INVOKED_NAME: "faas.invoked_name", - FAAS_INVOKED_PROVIDER: "faas.invoked_provider", - FAAS_INVOKED_REGION: "faas.invoked_region", - NET_TRANSPORT: "net.transport", - NET_PEER_IP: "net.peer.ip", - NET_PEER_PORT: "net.peer.port", - NET_PEER_NAME: "net.peer.name", - NET_HOST_IP: "net.host.ip", - NET_HOST_PORT: "net.host.port", - NET_HOST_NAME: "net.host.name", - NET_HOST_CONNECTION_TYPE: "net.host.connection.type", - NET_HOST_CONNECTION_SUBTYPE: "net.host.connection.subtype", - NET_HOST_CARRIER_NAME: "net.host.carrier.name", - NET_HOST_CARRIER_MCC: "net.host.carrier.mcc", - NET_HOST_CARRIER_MNC: "net.host.carrier.mnc", - NET_HOST_CARRIER_ICC: "net.host.carrier.icc", - PEER_SERVICE: "peer.service", - ENDUSER_ID: "enduser.id", - ENDUSER_ROLE: "enduser.role", - ENDUSER_SCOPE: "enduser.scope", - THREAD_ID: "thread.id", - THREAD_NAME: "thread.name", - CODE_FUNCTION: "code.function", - CODE_NAMESPACE: "code.namespace", - CODE_FILEPATH: "code.filepath", - CODE_LINENO: "code.lineno", - HTTP_METHOD: "http.method", - HTTP_URL: "http.url", - HTTP_TARGET: "http.target", - HTTP_HOST: "http.host", - HTTP_SCHEME: "http.scheme", - HTTP_STATUS_CODE: "http.status_code", - HTTP_FLAVOR: "http.flavor", - HTTP_USER_AGENT: "http.user_agent", - HTTP_REQUEST_CONTENT_LENGTH: "http.request_content_length", - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: "http.request_content_length_uncompressed", - HTTP_RESPONSE_CONTENT_LENGTH: "http.response_content_length", - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: "http.response_content_length_uncompressed", - HTTP_SERVER_NAME: "http.server_name", - HTTP_ROUTE: "http.route", - HTTP_CLIENT_IP: "http.client_ip", - AWS_DYNAMODB_TABLE_NAMES: "aws.dynamodb.table_names", - AWS_DYNAMODB_CONSUMED_CAPACITY: "aws.dynamodb.consumed_capacity", - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: "aws.dynamodb.item_collection_metrics", - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: "aws.dynamodb.provisioned_read_capacity", - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: "aws.dynamodb.provisioned_write_capacity", - AWS_DYNAMODB_CONSISTENT_READ: "aws.dynamodb.consistent_read", - AWS_DYNAMODB_PROJECTION: "aws.dynamodb.projection", - AWS_DYNAMODB_LIMIT: "aws.dynamodb.limit", - AWS_DYNAMODB_ATTRIBUTES_TO_GET: "aws.dynamodb.attributes_to_get", - AWS_DYNAMODB_INDEX_NAME: "aws.dynamodb.index_name", - AWS_DYNAMODB_SELECT: "aws.dynamodb.select", - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: "aws.dynamodb.global_secondary_indexes", - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: "aws.dynamodb.local_secondary_indexes", - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: "aws.dynamodb.exclusive_start_table", - AWS_DYNAMODB_TABLE_COUNT: "aws.dynamodb.table_count", - AWS_DYNAMODB_SCAN_FORWARD: "aws.dynamodb.scan_forward", - AWS_DYNAMODB_SEGMENT: "aws.dynamodb.segment", - AWS_DYNAMODB_TOTAL_SEGMENTS: "aws.dynamodb.total_segments", - AWS_DYNAMODB_COUNT: "aws.dynamodb.count", - AWS_DYNAMODB_SCANNED_COUNT: "aws.dynamodb.scanned_count", - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: "aws.dynamodb.attribute_definitions", - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: "aws.dynamodb.global_secondary_index_updates", - MESSAGING_SYSTEM: "messaging.system", - MESSAGING_DESTINATION: "messaging.destination", - MESSAGING_DESTINATION_KIND: "messaging.destination_kind", - MESSAGING_TEMP_DESTINATION: "messaging.temp_destination", - MESSAGING_PROTOCOL: "messaging.protocol", - MESSAGING_PROTOCOL_VERSION: "messaging.protocol_version", - MESSAGING_URL: "messaging.url", - MESSAGING_MESSAGE_ID: "messaging.message_id", - MESSAGING_CONVERSATION_ID: "messaging.conversation_id", - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: "messaging.message_payload_size_bytes", - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: "messaging.message_payload_compressed_size_bytes", - MESSAGING_OPERATION: "messaging.operation", - MESSAGING_CONSUMER_ID: "messaging.consumer_id", - MESSAGING_RABBITMQ_ROUTING_KEY: "messaging.rabbitmq.routing_key", - MESSAGING_KAFKA_MESSAGE_KEY: "messaging.kafka.message_key", - MESSAGING_KAFKA_CONSUMER_GROUP: "messaging.kafka.consumer_group", - MESSAGING_KAFKA_CLIENT_ID: "messaging.kafka.client_id", - MESSAGING_KAFKA_PARTITION: "messaging.kafka.partition", - MESSAGING_KAFKA_TOMBSTONE: "messaging.kafka.tombstone", - RPC_SYSTEM: "rpc.system", - RPC_SERVICE: "rpc.service", - RPC_METHOD: "rpc.method", - RPC_GRPC_STATUS_CODE: "rpc.grpc.status_code", - RPC_JSONRPC_VERSION: "rpc.jsonrpc.version", - RPC_JSONRPC_REQUEST_ID: "rpc.jsonrpc.request_id", - RPC_JSONRPC_ERROR_CODE: "rpc.jsonrpc.error_code", - RPC_JSONRPC_ERROR_MESSAGE: "rpc.jsonrpc.error_message", - MESSAGE_TYPE: "message.type", - MESSAGE_ID: "message.id", - MESSAGE_COMPRESSED_SIZE: "message.compressed_size", - MESSAGE_UNCOMPRESSED_SIZE: "message.uncompressed_size" -}; - -// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.7.0/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js -var SemanticResourceAttributes = { - CLOUD_PROVIDER: "cloud.provider", - CLOUD_ACCOUNT_ID: "cloud.account.id", - CLOUD_REGION: "cloud.region", - CLOUD_AVAILABILITY_ZONE: "cloud.availability_zone", - CLOUD_PLATFORM: "cloud.platform", - AWS_ECS_CONTAINER_ARN: "aws.ecs.container.arn", - AWS_ECS_CLUSTER_ARN: "aws.ecs.cluster.arn", - AWS_ECS_LAUNCHTYPE: "aws.ecs.launchtype", - AWS_ECS_TASK_ARN: "aws.ecs.task.arn", - AWS_ECS_TASK_FAMILY: "aws.ecs.task.family", - AWS_ECS_TASK_REVISION: "aws.ecs.task.revision", - AWS_EKS_CLUSTER_ARN: "aws.eks.cluster.arn", - AWS_LOG_GROUP_NAMES: "aws.log.group.names", - AWS_LOG_GROUP_ARNS: "aws.log.group.arns", - AWS_LOG_STREAM_NAMES: "aws.log.stream.names", - AWS_LOG_STREAM_ARNS: "aws.log.stream.arns", - CONTAINER_NAME: "container.name", - CONTAINER_ID: "container.id", - CONTAINER_RUNTIME: "container.runtime", - CONTAINER_IMAGE_NAME: "container.image.name", - CONTAINER_IMAGE_TAG: "container.image.tag", - DEPLOYMENT_ENVIRONMENT: "deployment.environment", - DEVICE_ID: "device.id", - DEVICE_MODEL_IDENTIFIER: "device.model.identifier", - DEVICE_MODEL_NAME: "device.model.name", - FAAS_NAME: "faas.name", - FAAS_ID: "faas.id", - FAAS_VERSION: "faas.version", - FAAS_INSTANCE: "faas.instance", - FAAS_MAX_MEMORY: "faas.max_memory", - HOST_ID: "host.id", - HOST_NAME: "host.name", - HOST_TYPE: "host.type", - HOST_ARCH: "host.arch", - HOST_IMAGE_NAME: "host.image.name", - HOST_IMAGE_ID: "host.image.id", - HOST_IMAGE_VERSION: "host.image.version", - K8S_CLUSTER_NAME: "k8s.cluster.name", - K8S_NODE_NAME: "k8s.node.name", - K8S_NODE_UID: "k8s.node.uid", - K8S_NAMESPACE_NAME: "k8s.namespace.name", - K8S_POD_UID: "k8s.pod.uid", - K8S_POD_NAME: "k8s.pod.name", - K8S_CONTAINER_NAME: "k8s.container.name", - K8S_REPLICASET_UID: "k8s.replicaset.uid", - K8S_REPLICASET_NAME: "k8s.replicaset.name", - K8S_DEPLOYMENT_UID: "k8s.deployment.uid", - K8S_DEPLOYMENT_NAME: "k8s.deployment.name", - K8S_STATEFULSET_UID: "k8s.statefulset.uid", - K8S_STATEFULSET_NAME: "k8s.statefulset.name", - K8S_DAEMONSET_UID: "k8s.daemonset.uid", - K8S_DAEMONSET_NAME: "k8s.daemonset.name", - K8S_JOB_UID: "k8s.job.uid", - K8S_JOB_NAME: "k8s.job.name", - K8S_CRONJOB_UID: "k8s.cronjob.uid", - K8S_CRONJOB_NAME: "k8s.cronjob.name", - OS_TYPE: "os.type", - OS_DESCRIPTION: "os.description", - OS_NAME: "os.name", - OS_VERSION: "os.version", - PROCESS_PID: "process.pid", - PROCESS_EXECUTABLE_NAME: "process.executable.name", - PROCESS_EXECUTABLE_PATH: "process.executable.path", - PROCESS_COMMAND: "process.command", - PROCESS_COMMAND_LINE: "process.command_line", - PROCESS_COMMAND_ARGS: "process.command_args", - PROCESS_OWNER: "process.owner", - PROCESS_RUNTIME_NAME: "process.runtime.name", - PROCESS_RUNTIME_VERSION: "process.runtime.version", - PROCESS_RUNTIME_DESCRIPTION: "process.runtime.description", - SERVICE_NAME: "service.name", - SERVICE_NAMESPACE: "service.namespace", - SERVICE_INSTANCE_ID: "service.instance.id", - SERVICE_VERSION: "service.version", - TELEMETRY_SDK_NAME: "telemetry.sdk.name", - TELEMETRY_SDK_LANGUAGE: "telemetry.sdk.language", - TELEMETRY_SDK_VERSION: "telemetry.sdk.version", - TELEMETRY_AUTO_VERSION: "telemetry.auto.version", - WEBENGINE_NAME: "webengine.name", - WEBENGINE_VERSION: "webengine.version", - WEBENGINE_DESCRIPTION: "webengine.description" -}; -var TelemetrySdkLanguageValues = { - CPP: "cpp", - DOTNET: "dotnet", - ERLANG: "erlang", - GO: "go", - JAVA: "java", - NODEJS: "nodejs", - PHP: "php", - PYTHON: "python", - RUBY: "ruby", - WEBJS: "webjs" -}; - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js -var _a2; -var SDK_INFO = (_a2 = {}, _a2[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a2[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a2[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues.NODEJS, _a2[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION2, _a2); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/platform/node/timer-util.js -function unrefTimer(timer) { - timer.unref(); -} -__name(unrefTimer, "unrefTimer"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/common/time.js -var NANOSECOND_DIGITS = 9; -var SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -function numberToHrtime(epochMillis) { - var epochSeconds = epochMillis / 1e3; - var seconds = Math.trunc(epochSeconds); - var nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -__name(numberToHrtime, "numberToHrtime"); -function getTimeOrigin() { - var timeOrigin = otperformance.timeOrigin; - if (typeof timeOrigin !== "number") { - var perf = otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -__name(getTimeOrigin, "getTimeOrigin"); -function hrTime(performanceNow) { - var timeOrigin = numberToHrtime(getTimeOrigin()); - var now = numberToHrtime(typeof performanceNow === "number" ? performanceNow : otperformance.now()); - var seconds = timeOrigin[0] + now[0]; - var nanos = timeOrigin[1] + now[1]; - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -__name(hrTime, "hrTime"); -function timeInputToHrTime(time) { - if (isTimeInputHrTime(time)) { - return time; - } else if (typeof time === "number") { - if (time < getTimeOrigin()) { - return hrTime(time); - } else { - return numberToHrtime(time); - } - } else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } else { - throw TypeError("Invalid input type"); - } -} -__name(timeInputToHrTime, "timeInputToHrTime"); -function hrTimeDuration(startTime, endTime) { - var seconds = endTime[0] - startTime[0]; - var nanos = endTime[1] - startTime[1]; - if (nanos < 0) { - seconds -= 1; - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -__name(hrTimeDuration, "hrTimeDuration"); -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -__name(hrTimeToMicroseconds, "hrTimeToMicroseconds"); -function isTimeInputHrTime(value) { - return Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number"; -} -__name(isTimeInputHrTime, "isTimeInputHrTime"); -function isTimeInput(value) { - return isTimeInputHrTime(value) || typeof value === "number" || value instanceof Date; -} -__name(isTimeInput, "isTimeInput"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/ExportResult.js -var ExportResultCode; -(function(ExportResultCode2) { - ExportResultCode2[ExportResultCode2["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode2[ExportResultCode2["FAILED"] = 1] = "FAILED"; -})(ExportResultCode || (ExportResultCode = {})); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/propagation/composite.js -var __values2 = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var CompositePropagator = function() { - function CompositePropagator2(config2) { - if (config2 === void 0) { - config2 = {}; - } - var _a3; - this._propagators = (_a3 = config2.propagators) !== null && _a3 !== void 0 ? _a3 : []; - this._fields = Array.from(new Set(this._propagators.map(function(p2) { - return typeof p2.fields === "function" ? p2.fields() : []; - }).reduce(function(x, y) { - return x.concat(y); - }, []))); - } - __name(CompositePropagator2, "CompositePropagator"); - CompositePropagator2.prototype.inject = function(context3, carrier, setter) { - var e_1, _a3; - try { - for (var _b2 = __values2(this._propagators), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var propagator = _c.value; - try { - propagator.inject(context3, carrier, setter); - } catch (err) { - diag2.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message); - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_1) - throw e_1.error; - } - } - }; - CompositePropagator2.prototype.extract = function(context3, carrier, getter) { - return this._propagators.reduce(function(ctx, propagator) { - try { - return propagator.extract(ctx, carrier, getter); - } catch (err) { - diag2.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message); - } - return ctx; - }, context3); - }; - CompositePropagator2.prototype.fields = function() { - return this._fields.slice(); - }; - return CompositePropagator2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/internal/validators.js -var VALID_KEY_CHAR_RANGE2 = "[_0-9a-z-*/]"; -var VALID_KEY2 = "[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,255}"; -var VALID_VENDOR_KEY2 = "[a-z0-9]" + VALID_KEY_CHAR_RANGE2 + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,13}"; -var VALID_KEY_REGEX2 = new RegExp("^(?:" + VALID_KEY2 + "|" + VALID_VENDOR_KEY2 + ")$"); -var VALID_VALUE_BASE_REGEX2 = /^[ -~]{0,255}[!-~]$/; -var INVALID_VALUE_COMMA_EQUAL_REGEX2 = /,|=/; -function validateKey2(key) { - return VALID_KEY_REGEX2.test(key); -} -__name(validateKey2, "validateKey"); -function validateValue2(value) { - return VALID_VALUE_BASE_REGEX2.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX2.test(value); -} -__name(validateValue2, "validateValue"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js -var MAX_TRACE_STATE_ITEMS2 = 32; -var MAX_TRACE_STATE_LEN2 = 512; -var LIST_MEMBERS_SEPARATOR2 = ","; -var LIST_MEMBER_KEY_VALUE_SPLITTER2 = "="; -var TraceState = function() { - function TraceState2(rawTraceState) { - this._internalState = /* @__PURE__ */ new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - __name(TraceState2, "TraceState"); - TraceState2.prototype.set = function(key, value) { - var traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - }; - TraceState2.prototype.unset = function(key) { - var traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - }; - TraceState2.prototype.get = function(key) { - return this._internalState.get(key); - }; - TraceState2.prototype.serialize = function() { - var _this = this; - return this._keys().reduce(function(agg, key) { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + _this.get(key)); - return agg; - }, []).join(LIST_MEMBERS_SEPARATOR2); - }; - TraceState2.prototype._parse = function(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN2) - return; - this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reverse().reduce(function(agg, part) { - var listMember = part.trim(); - var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2); - if (i !== -1) { - var key = listMember.slice(0, i); - var value = listMember.slice(i + 1, part.length); - if (validateKey2(key) && validateValue2(value)) { - agg.set(key, value); - } else { - } - } - return agg; - }, /* @__PURE__ */ new Map()); - if (this._internalState.size > MAX_TRACE_STATE_ITEMS2) { - this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS2)); - } - }; - TraceState2.prototype._keys = function() { - return Array.from(this._internalState.keys()).reverse(); - }; - TraceState2.prototype._clone = function() { - var traceState = new TraceState2(); - traceState._internalState = new Map(this._internalState); - return traceState; - }; - return TraceState2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js -var TRACE_PARENT_HEADER = "traceparent"; -var TRACE_STATE_HEADER = "tracestate"; -var VERSION3 = "00"; -var VERSION_PART = "(?!ff)[\\da-f]{2}"; -var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}"; -var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}"; -var FLAGS_PART = "[\\da-f]{2}"; -var TRACE_PARENT_REGEX = new RegExp("^\\s?(" + VERSION_PART + ")-(" + TRACE_ID_PART + ")-(" + PARENT_ID_PART + ")-(" + FLAGS_PART + ")(-.*)?\\s?$"); -function parseTraceParent(traceParent) { - var match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - if (match[1] === "00" && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16) - }; -} -__name(parseTraceParent, "parseTraceParent"); -var W3CTraceContextPropagator = function() { - function W3CTraceContextPropagator2() { - } - __name(W3CTraceContextPropagator2, "W3CTraceContextPropagator"); - W3CTraceContextPropagator2.prototype.inject = function(context3, carrier, setter) { - var spanContext = trace.getSpanContext(context3); - if (!spanContext || isTracingSuppressed(context3) || !isSpanContextValid(spanContext)) - return; - var traceParent = VERSION3 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || TraceFlags.NONE).toString(16); - setter.set(carrier, TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - }; - W3CTraceContextPropagator2.prototype.extract = function(context3, carrier, getter) { - var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context3; - var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader; - if (typeof traceParent !== "string") - return context3; - var spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context3; - spanContext.isRemote = true; - var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER); - if (traceStateHeader) { - var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader; - spanContext.traceState = new TraceState(typeof state === "string" ? state : void 0); - } - return trace.setSpanContext(context3, spanContext); - }; - W3CTraceContextPropagator2.prototype.fields = function() { - return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER]; - }; - return W3CTraceContextPropagator2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js -var RPC_METADATA_KEY = createContextKey("OpenTelemetry SDK Context Key RPC_METADATA"); -var RPCType; -(function(RPCType2) { - RPCType2["HTTP"] = "http"; -})(RPCType || (RPCType = {})); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js -var AlwaysOffSampler = function() { - function AlwaysOffSampler3() { - } - __name(AlwaysOffSampler3, "AlwaysOffSampler"); - AlwaysOffSampler3.prototype.shouldSample = function() { - return { - decision: SamplingDecision.NOT_RECORD - }; - }; - AlwaysOffSampler3.prototype.toString = function() { - return "AlwaysOffSampler"; - }; - return AlwaysOffSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js -var AlwaysOnSampler = function() { - function AlwaysOnSampler3() { - } - __name(AlwaysOnSampler3, "AlwaysOnSampler"); - AlwaysOnSampler3.prototype.shouldSample = function() { - return { - decision: SamplingDecision.RECORD_AND_SAMPLED - }; - }; - AlwaysOnSampler3.prototype.toString = function() { - return "AlwaysOnSampler"; - }; - return AlwaysOnSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js -var ParentBasedSampler = function() { - function ParentBasedSampler3(config2) { - var _a3, _b2, _c, _d; - this._root = config2.root; - if (!this._root) { - globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")); - this._root = new AlwaysOnSampler(); - } - this._remoteParentSampled = (_a3 = config2.remoteParentSampled) !== null && _a3 !== void 0 ? _a3 : new AlwaysOnSampler(); - this._remoteParentNotSampled = (_b2 = config2.remoteParentNotSampled) !== null && _b2 !== void 0 ? _b2 : new AlwaysOffSampler(); - this._localParentSampled = (_c = config2.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler(); - this._localParentNotSampled = (_d = config2.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler(); - } - __name(ParentBasedSampler3, "ParentBasedSampler"); - ParentBasedSampler3.prototype.shouldSample = function(context3, traceId, spanName, spanKind, attributes, links) { - var parentContext = trace.getSpanContext(context3); - if (!parentContext || !isSpanContextValid(parentContext)) { - return this._root.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - }; - ParentBasedSampler3.prototype.toString = function() { - return "ParentBased{root=" + this._root.toString() + ", remoteParentSampled=" + this._remoteParentSampled.toString() + ", remoteParentNotSampled=" + this._remoteParentNotSampled.toString() + ", localParentSampled=" + this._localParentSampled.toString() + ", localParentNotSampled=" + this._localParentNotSampled.toString() + "}"; - }; - return ParentBasedSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js -var TraceIdRatioBasedSampler = function() { - function TraceIdRatioBasedSampler3(_ratio) { - if (_ratio === void 0) { - _ratio = 0; - } - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 4294967295); - } - __name(TraceIdRatioBasedSampler3, "TraceIdRatioBasedSampler"); - TraceIdRatioBasedSampler3.prototype.shouldSample = function(context3, traceId) { - return { - decision: isValidTraceId(traceId) && this._accumulate(traceId) < this._upperBound ? SamplingDecision.RECORD_AND_SAMPLED : SamplingDecision.NOT_RECORD - }; - }; - TraceIdRatioBasedSampler3.prototype.toString = function() { - return "TraceIdRatioBased{" + this._ratio + "}"; - }; - TraceIdRatioBasedSampler3.prototype._normalize = function(ratio) { - if (typeof ratio !== "number" || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - }; - TraceIdRatioBasedSampler3.prototype._accumulate = function(traceId) { - var accumulation = 0; - for (var i = 0; i < traceId.length / 8; i++) { - var pos = i * 8; - var part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - }; - return TraceIdRatioBasedSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js -var objectTag = "[object Object]"; -var nullTag = "[object Null]"; -var undefinedTag = "[object Undefined]"; -var funcProto = Function.prototype; -var funcToString = funcProto.toString; -var objectCtorString = funcToString.call(Object); -var getPrototype = overArg(Object.getPrototypeOf, Object); -var objectProto = Object.prototype; -var hasOwnProperty = objectProto.hasOwnProperty; -var symToStringTag = Symbol ? Symbol.toStringTag : void 0; -var nativeObjectToString = objectProto.toString; -function overArg(func, transform) { - return function(arg2) { - return func(transform(arg2)); - }; -} -__name(overArg, "overArg"); -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) === objectCtorString; -} -__name(isPlainObject, "isPlainObject"); -function isObjectLike(value) { - return value != null && typeof value == "object"; -} -__name(isObjectLike, "isObjectLike"); -function baseGetTag(value) { - if (value == null) { - return value === void 0 ? undefinedTag : nullTag; - } - return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); -} -__name(baseGetTag, "baseGetTag"); -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), tag2 = value[symToStringTag]; - var unmasked = false; - try { - value[symToStringTag] = void 0; - unmasked = true; - } catch (e2) { - } - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag2; - } else { - delete value[symToStringTag]; - } - } - return result; -} -__name(getRawTag, "getRawTag"); -function objectToString(value) { - return nativeObjectToString.call(value); -} -__name(objectToString, "objectToString"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/merge.js -var MAX_LEVEL = 20; -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var result = args.shift(); - var objects = /* @__PURE__ */ new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -__name(merge, "merge"); -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -__name(takeValue, "takeValue"); -function mergeTwoObjects(one, two, level, objects) { - if (level === void 0) { - level = 0; - } - var result; - if (level > MAX_LEVEL) { - return void 0; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (var i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } else if (isObject(two)) { - var keys2 = Object.keys(two); - for (var i = 0, j = keys2.length; i < j; i++) { - var key = keys2[i]; - result[key] = takeValue(two[key]); - } - } - } else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - var keys2 = Object.keys(two); - for (var i = 0, j = keys2.length; i < j; i++) { - var key = keys2[i]; - var twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === "undefined") { - delete result[key]; - } else { - result[key] = twoValue; - } - } else { - var obj1 = result[key]; - var obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || wasObjectReferenced(two, key, objects)) { - delete result[key]; - } else { - if (isObject(obj1) && isObject(obj2)) { - var arr1 = objects.get(obj1) || []; - var arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } - } else { - result = two; - } - } - return result; -} -__name(mergeTwoObjects, "mergeTwoObjects"); -function wasObjectReferenced(obj, key, objects) { - var arr = objects.get(obj[key]) || []; - for (var i = 0, j = arr.length; i < j; i++) { - var info2 = arr[i]; - if (info2.key === key && info2.obj === obj) { - return true; - } - } - return false; -} -__name(wasObjectReferenced, "wasObjectReferenced"); -function isArray(value) { - return Array.isArray(value); -} -__name(isArray, "isArray"); -function isFunction(value) { - return typeof value === "function"; -} -__name(isFunction, "isFunction"); -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === "object"; -} -__name(isObject, "isObject"); -function isPrimitive(value) { - return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "undefined" || value instanceof Date || value instanceof RegExp || value === null; -} -__name(isPrimitive, "isPrimitive"); -function shouldMerge(one, two) { - if (!isPlainObject(one) || !isPlainObject(two)) { - return false; - } - return true; -} -__name(shouldMerge, "shouldMerge"); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/promise.js -var Deferred = function() { - function Deferred2() { - var _this = this; - this._promise = new Promise(function(resolve, reject) { - _this._resolve = resolve; - _this._reject = reject; - }); - } - __name(Deferred2, "Deferred"); - Object.defineProperty(Deferred2.prototype, "promise", { - get: function() { - return this._promise; - }, - enumerable: false, - configurable: true - }); - Deferred2.prototype.resolve = function(val) { - this._resolve(val); - }; - Deferred2.prototype.reject = function(err) { - this._reject(err); - }; - return Deferred2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+core@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/core/build/esm/utils/callback.js -var __read3 = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -var __spreadArray3 = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var BindOnceFuture = function() { - function BindOnceFuture2(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new Deferred(); - } - __name(BindOnceFuture2, "BindOnceFuture"); - Object.defineProperty(BindOnceFuture2.prototype, "isCalled", { - get: function() { - return this._isCalled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(BindOnceFuture2.prototype, "promise", { - get: function() { - return this._deferred.promise; - }, - enumerable: false, - configurable: true - }); - BindOnceFuture2.prototype.call = function() { - var _a3; - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve((_a3 = this._callback).call.apply(_a3, __spreadArray3([this._that], __read3(args), false))).then(function(val) { - return _this._deferred.resolve(val); - }, function(err) { - return _this._deferred.reject(err); - }); - } catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - }; - return BindOnceFuture2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/enums.js -var ExceptionEventName = "exception"; - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js -var __values3 = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read4 = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -var Span = function() { - function Span3(parentTracer, context3, spanName, spanContext, kind, parentSpanId, links, startTime, clock) { - if (links === void 0) { - links = []; - } - if (clock === void 0) { - clock = otperformance; - } - this.attributes = {}; - this.links = []; - this.events = []; - this.status = { - code: SpanStatusCode.UNSET - }; - this.endTime = [0, 0]; - this._ended = false; - this._duration = [-1, -1]; - this._clock = clock; - this.name = spanName; - this._spanContext = spanContext; - this.parentSpanId = parentSpanId; - this.kind = kind; - this.links = links; - this.startTime = timeInputToHrTime(startTime !== null && startTime !== void 0 ? startTime : clock.now()); - this.resource = parentTracer.resource; - this.instrumentationLibrary = parentTracer.instrumentationLibrary; - this._spanLimits = parentTracer.getSpanLimits(); - this._spanProcessor = parentTracer.getActiveSpanProcessor(); - this._spanProcessor.onStart(this, context3); - this._attributeValueLengthLimit = this._spanLimits.attributeValueLengthLimit || 0; - } - __name(Span3, "Span"); - Span3.prototype.spanContext = function() { - return this._spanContext; - }; - Span3.prototype.setAttribute = function(key, value) { - if (value == null || this._isSpanEnded()) - return this; - if (key.length === 0) { - diag2.warn("Invalid attribute key: " + key); - return this; - } - if (!isAttributeValue(value)) { - diag2.warn("Invalid attribute value set for key: " + key); - return this; - } - if (Object.keys(this.attributes).length >= this._spanLimits.attributeCountLimit && !Object.prototype.hasOwnProperty.call(this.attributes, key)) { - return this; - } - this.attributes[key] = this._truncateToSize(value); - return this; - }; - Span3.prototype.setAttributes = function(attributes) { - var e_1, _a3; - try { - for (var _b2 = __values3(Object.entries(attributes)), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var _d = __read4(_c.value, 2), k = _d[0], v = _d[1]; - this.setAttribute(k, v); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_1) - throw e_1.error; - } - } - return this; - }; - Span3.prototype.addEvent = function(name, attributesOrStartTime, startTime) { - if (this._isSpanEnded()) - return this; - if (this._spanLimits.eventCountLimit === 0) { - diag2.warn("No events allowed."); - return this; - } - if (this.events.length >= this._spanLimits.eventCountLimit) { - diag2.warn("Dropping extra events."); - this.events.shift(); - } - if (isTimeInput(attributesOrStartTime)) { - if (typeof startTime === "undefined") { - startTime = attributesOrStartTime; - } - attributesOrStartTime = void 0; - } - if (typeof startTime === "undefined") { - startTime = this._clock.now(); - } - var attributes = sanitizeAttributes(attributesOrStartTime); - this.events.push({ - name, - attributes, - time: timeInputToHrTime(startTime) - }); - return this; - }; - Span3.prototype.setStatus = function(status) { - if (this._isSpanEnded()) - return this; - this.status = status; - return this; - }; - Span3.prototype.updateName = function(name) { - if (this._isSpanEnded()) - return this; - this.name = name; - return this; - }; - Span3.prototype.end = function(endTime) { - if (this._isSpanEnded()) { - diag2.error("You can only call end() on a span once."); - return; - } - this._ended = true; - this.endTime = timeInputToHrTime(endTime !== null && endTime !== void 0 ? endTime : this._clock.now()); - this._duration = hrTimeDuration(this.startTime, this.endTime); - if (this._duration[0] < 0) { - diag2.warn("Inconsistent start and end time, startTime > endTime", this.startTime, this.endTime); - } - this._spanProcessor.onEnd(this); - }; - Span3.prototype.isRecording = function() { - return this._ended === false; - }; - Span3.prototype.recordException = function(exception, time) { - if (time === void 0) { - time = this._clock.now(); - } - var attributes = {}; - if (typeof exception === "string") { - attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception; - } else if (exception) { - if (exception.code) { - attributes[SemanticAttributes.EXCEPTION_TYPE] = exception.code.toString(); - } else if (exception.name) { - attributes[SemanticAttributes.EXCEPTION_TYPE] = exception.name; - } - if (exception.message) { - attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception.message; - } - if (exception.stack) { - attributes[SemanticAttributes.EXCEPTION_STACKTRACE] = exception.stack; - } - } - if (attributes[SemanticAttributes.EXCEPTION_TYPE] || attributes[SemanticAttributes.EXCEPTION_MESSAGE]) { - this.addEvent(ExceptionEventName, attributes, time); - } else { - diag2.warn("Failed to record an exception " + exception); - } - }; - Object.defineProperty(Span3.prototype, "duration", { - get: function() { - return this._duration; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Span3.prototype, "ended", { - get: function() { - return this._ended; - }, - enumerable: false, - configurable: true - }); - Span3.prototype._isSpanEnded = function() { - if (this._ended) { - diag2.warn("Can not execute the operation on ended Span {traceId: " + this._spanContext.traceId + ", spanId: " + this._spanContext.spanId + "}"); - } - return this._ended; - }; - Span3.prototype._truncateToLimitUtil = function(value, limit) { - if (value.length <= limit) { - return value; - } - return value.substr(0, limit); - }; - Span3.prototype._truncateToSize = function(value) { - var _this = this; - var limit = this._attributeValueLengthLimit; - if (limit <= 0) { - diag2.warn("Attribute value limit must be positive, got " + limit); - return value; - } - if (typeof value === "string") { - return this._truncateToLimitUtil(value, limit); - } - if (Array.isArray(value)) { - return value.map(function(val) { - return typeof val === "string" ? _this._truncateToLimitUtil(val, limit) : val; - }); - } - return value; - }; - return Span3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Sampler.js -var SamplingDecision2; -(function(SamplingDecision3) { - SamplingDecision3[SamplingDecision3["NOT_RECORD"] = 0] = "NOT_RECORD"; - SamplingDecision3[SamplingDecision3["RECORD"] = 1] = "RECORD"; - SamplingDecision3[SamplingDecision3["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; -})(SamplingDecision2 || (SamplingDecision2 = {})); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOffSampler.js -var AlwaysOffSampler2 = function() { - function AlwaysOffSampler3() { - } - __name(AlwaysOffSampler3, "AlwaysOffSampler"); - AlwaysOffSampler3.prototype.shouldSample = function() { - return { - decision: SamplingDecision2.NOT_RECORD - }; - }; - AlwaysOffSampler3.prototype.toString = function() { - return "AlwaysOffSampler"; - }; - return AlwaysOffSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOnSampler.js -var AlwaysOnSampler2 = function() { - function AlwaysOnSampler3() { - } - __name(AlwaysOnSampler3, "AlwaysOnSampler"); - AlwaysOnSampler3.prototype.shouldSample = function() { - return { - decision: SamplingDecision2.RECORD_AND_SAMPLED - }; - }; - AlwaysOnSampler3.prototype.toString = function() { - return "AlwaysOnSampler"; - }; - return AlwaysOnSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js -var ParentBasedSampler2 = function() { - function ParentBasedSampler3(config2) { - var _a3, _b2, _c, _d; - this._root = config2.root; - if (!this._root) { - globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")); - this._root = new AlwaysOnSampler2(); - } - this._remoteParentSampled = (_a3 = config2.remoteParentSampled) !== null && _a3 !== void 0 ? _a3 : new AlwaysOnSampler2(); - this._remoteParentNotSampled = (_b2 = config2.remoteParentNotSampled) !== null && _b2 !== void 0 ? _b2 : new AlwaysOffSampler2(); - this._localParentSampled = (_c = config2.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler2(); - this._localParentNotSampled = (_d = config2.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler2(); - } - __name(ParentBasedSampler3, "ParentBasedSampler"); - ParentBasedSampler3.prototype.shouldSample = function(context3, traceId, spanName, spanKind, attributes, links) { - var parentContext = trace.getSpanContext(context3); - if (!parentContext || !isSpanContextValid(parentContext)) { - return this._root.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links); - }; - ParentBasedSampler3.prototype.toString = function() { - return "ParentBased{root=" + this._root.toString() + ", remoteParentSampled=" + this._remoteParentSampled.toString() + ", remoteParentNotSampled=" + this._remoteParentNotSampled.toString() + ", localParentSampled=" + this._localParentSampled.toString() + ", localParentNotSampled=" + this._localParentNotSampled.toString() + "}"; - }; - return ParentBasedSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js -var TraceIdRatioBasedSampler2 = function() { - function TraceIdRatioBasedSampler3(_ratio) { - if (_ratio === void 0) { - _ratio = 0; - } - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 4294967295); - } - __name(TraceIdRatioBasedSampler3, "TraceIdRatioBasedSampler"); - TraceIdRatioBasedSampler3.prototype.shouldSample = function(context3, traceId) { - return { - decision: isValidTraceId(traceId) && this._accumulate(traceId) < this._upperBound ? SamplingDecision2.RECORD_AND_SAMPLED : SamplingDecision2.NOT_RECORD - }; - }; - TraceIdRatioBasedSampler3.prototype.toString = function() { - return "TraceIdRatioBased{" + this._ratio + "}"; - }; - TraceIdRatioBasedSampler3.prototype._normalize = function(ratio) { - if (typeof ratio !== "number" || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - }; - TraceIdRatioBasedSampler3.prototype._accumulate = function(traceId) { - var accumulation = 0; - for (var i = 0; i < traceId.length / 8; i++) { - var pos = i * 8; - var part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - }; - return TraceIdRatioBasedSampler3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js -var env = getEnv(); -var FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn; -var DEFAULT_RATIO = 1; -function loadDefaultConfig() { - return { - sampler: buildSamplerFromEnv(env), - forceFlushTimeoutMillis: 3e4, - generalLimits: { - attributeValueLengthLimit: getEnv().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: getEnv().OTEL_ATTRIBUTE_COUNT_LIMIT - }, - spanLimits: { - attributeValueLengthLimit: getEnv().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - linkCountLimit: getEnv().OTEL_SPAN_LINK_COUNT_LIMIT, - eventCountLimit: getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT - } - }; -} -__name(loadDefaultConfig, "loadDefaultConfig"); -function buildSamplerFromEnv(environment) { - if (environment === void 0) { - environment = getEnv(); - } - switch (environment.OTEL_TRACES_SAMPLER) { - case TracesSamplerValues.AlwaysOn: - return new AlwaysOnSampler2(); - case TracesSamplerValues.AlwaysOff: - return new AlwaysOffSampler2(); - case TracesSamplerValues.ParentBasedAlwaysOn: - return new ParentBasedSampler2({ - root: new AlwaysOnSampler2() - }); - case TracesSamplerValues.ParentBasedAlwaysOff: - return new ParentBasedSampler2({ - root: new AlwaysOffSampler2() - }); - case TracesSamplerValues.TraceIdRatio: - return new TraceIdRatioBasedSampler2(getSamplerProbabilityFromEnv(environment)); - case TracesSamplerValues.ParentBasedTraceIdRatio: - return new ParentBasedSampler2({ - root: new TraceIdRatioBasedSampler2(getSamplerProbabilityFromEnv(environment)) - }); - default: - diag2.error('OTEL_TRACES_SAMPLER value "' + environment.OTEL_TRACES_SAMPLER + " invalid, defaulting to " + FALLBACK_OTEL_TRACES_SAMPLER + '".'); - return new AlwaysOnSampler2(); - } -} -__name(buildSamplerFromEnv, "buildSamplerFromEnv"); -function getSamplerProbabilityFromEnv(environment) { - if (environment.OTEL_TRACES_SAMPLER_ARG === void 0 || environment.OTEL_TRACES_SAMPLER_ARG === "") { - diag2.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to " + DEFAULT_RATIO + "."); - return DEFAULT_RATIO; - } - var probability = Number(environment.OTEL_TRACES_SAMPLER_ARG); - if (isNaN(probability)) { - diag2.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is invalid, defaulting to " + DEFAULT_RATIO + "."); - return DEFAULT_RATIO; - } - if (probability < 0 || probability > 1) { - diag2.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is out of range ([0..1]), defaulting to " + DEFAULT_RATIO + "."); - return DEFAULT_RATIO; - } - return probability; -} -__name(getSamplerProbabilityFromEnv, "getSamplerProbabilityFromEnv"); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/utility.js -function mergeConfig(userConfig) { - var perInstanceDefaults = { - sampler: buildSamplerFromEnv() - }; - var DEFAULT_CONFIG = loadDefaultConfig(); - var target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig); - target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {}); - target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {}); - return target; -} -__name(mergeConfig, "mergeConfig"); -function reconfigureLimits(userConfig) { - var _a3, _b2, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - var spanLimits = Object.assign({}, userConfig.spanLimits); - var parsedEnvConfig = getEnvWithoutDefaults(); - spanLimits.attributeCountLimit = (_f = (_e = (_d = (_b2 = (_a3 = userConfig.spanLimits) === null || _a3 === void 0 ? void 0 : _a3.attributeCountLimit) !== null && _b2 !== void 0 ? _b2 : (_c = userConfig.generalLimits) === null || _c === void 0 ? void 0 : _c.attributeCountLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _f !== void 0 ? _f : DEFAULT_ATTRIBUTE_COUNT_LIMIT; - spanLimits.attributeValueLengthLimit = (_m = (_l = (_k = (_h = (_g = userConfig.spanLimits) === null || _g === void 0 ? void 0 : _g.attributeValueLengthLimit) !== null && _h !== void 0 ? _h : (_j = userConfig.generalLimits) === null || _j === void 0 ? void 0 : _j.attributeValueLengthLimit) !== null && _k !== void 0 ? _k : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _l !== void 0 ? _l : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _m !== void 0 ? _m : DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT; - return Object.assign({}, userConfig, { spanLimits }); -} -__name(reconfigureLimits, "reconfigureLimits"); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js -var BatchSpanProcessorBase = function() { - function BatchSpanProcessorBase2(_exporter, config2) { - this._exporter = _exporter; - this._finishedSpans = []; - var env2 = getEnv(); - this._maxExportBatchSize = typeof (config2 === null || config2 === void 0 ? void 0 : config2.maxExportBatchSize) === "number" ? config2.maxExportBatchSize : env2.OTEL_BSP_MAX_EXPORT_BATCH_SIZE; - this._maxQueueSize = typeof (config2 === null || config2 === void 0 ? void 0 : config2.maxQueueSize) === "number" ? config2.maxQueueSize : env2.OTEL_BSP_MAX_QUEUE_SIZE; - this._scheduledDelayMillis = typeof (config2 === null || config2 === void 0 ? void 0 : config2.scheduledDelayMillis) === "number" ? config2.scheduledDelayMillis : env2.OTEL_BSP_SCHEDULE_DELAY; - this._exportTimeoutMillis = typeof (config2 === null || config2 === void 0 ? void 0 : config2.exportTimeoutMillis) === "number" ? config2.exportTimeoutMillis : env2.OTEL_BSP_EXPORT_TIMEOUT; - this._shutdownOnce = new BindOnceFuture(this._shutdown, this); - } - __name(BatchSpanProcessorBase2, "BatchSpanProcessorBase"); - BatchSpanProcessorBase2.prototype.forceFlush = function() { - if (this._shutdownOnce.isCalled) { - return this._shutdownOnce.promise; - } - return this._flushAll(); - }; - BatchSpanProcessorBase2.prototype.onStart = function(_span, _parentContext) { - }; - BatchSpanProcessorBase2.prototype.onEnd = function(span) { - if (this._shutdownOnce.isCalled) { - return; - } - if ((span.spanContext().traceFlags & TraceFlags.SAMPLED) === 0) { - return; - } - this._addToBuffer(span); - }; - BatchSpanProcessorBase2.prototype.shutdown = function() { - return this._shutdownOnce.call(); - }; - BatchSpanProcessorBase2.prototype._shutdown = function() { - var _this = this; - return Promise.resolve().then(function() { - return _this.onShutdown(); - }).then(function() { - return _this._flushAll(); - }).then(function() { - return _this._exporter.shutdown(); - }); - }; - BatchSpanProcessorBase2.prototype._addToBuffer = function(span) { - if (this._finishedSpans.length >= this._maxQueueSize) { - return; - } - this._finishedSpans.push(span); - this._maybeStartTimer(); - }; - BatchSpanProcessorBase2.prototype._flushAll = function() { - var _this = this; - return new Promise(function(resolve, reject) { - var promises = []; - var count2 = Math.ceil(_this._finishedSpans.length / _this._maxExportBatchSize); - for (var i = 0, j = count2; i < j; i++) { - promises.push(_this._flushOneBatch()); - } - Promise.all(promises).then(function() { - resolve(); - }).catch(reject); - }); - }; - BatchSpanProcessorBase2.prototype._flushOneBatch = function() { - var _this = this; - this._clearTimer(); - if (this._finishedSpans.length === 0) { - return Promise.resolve(); - } - return new Promise(function(resolve, reject) { - var timer = setTimeout(function() { - reject(new Error("Timeout")); - }, _this._exportTimeoutMillis); - context2.with(suppressTracing(context2.active()), function() { - _this._exporter.export(_this._finishedSpans.splice(0, _this._maxExportBatchSize), function(result) { - var _a3; - clearTimeout(timer); - if (result.code === ExportResultCode.SUCCESS) { - resolve(); - } else { - reject((_a3 = result.error) !== null && _a3 !== void 0 ? _a3 : new Error("BatchSpanProcessor: span export failed")); - } - }); - }); - }); - }; - BatchSpanProcessorBase2.prototype._maybeStartTimer = function() { - var _this = this; - if (this._timer !== void 0) - return; - this._timer = setTimeout(function() { - _this._flushOneBatch().then(function() { - if (_this._finishedSpans.length > 0) { - _this._clearTimer(); - _this._maybeStartTimer(); - } - }).catch(function(e2) { - globalErrorHandler(e2); - }); - }, this._scheduledDelayMillis); - unrefTimer(this._timer); - }; - BatchSpanProcessorBase2.prototype._clearTimer = function() { - if (this._timer !== void 0) { - clearTimeout(this._timer); - this._timer = void 0; - } - }; - return BatchSpanProcessorBase2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/export/BatchSpanProcessor.js -var __extends = function() { - var extendStatics = /* @__PURE__ */ __name(function(d2, b2) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) { - d3.__proto__ = b3; - } || function(d3, b3) { - for (var p2 in b3) - if (Object.prototype.hasOwnProperty.call(b3, p2)) - d3[p2] = b3[p2]; - }; - return extendStatics(d2, b2); - }, "extendStatics"); - return function(d2, b2) { - if (typeof b2 !== "function" && b2 !== null) - throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null"); - extendStatics(d2, b2); - function __() { - this.constructor = d2; - } - __name(__, "__"); - d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); - }; -}(); -var BatchSpanProcessor = function(_super) { - __extends(BatchSpanProcessor2, _super); - function BatchSpanProcessor2() { - return _super !== null && _super.apply(this, arguments) || this; - } - __name(BatchSpanProcessor2, "BatchSpanProcessor"); - BatchSpanProcessor2.prototype.onShutdown = function() { - }; - return BatchSpanProcessor2; -}(BatchSpanProcessorBase); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/RandomIdGenerator.js -var SPAN_ID_BYTES2 = 8; -var TRACE_ID_BYTES2 = 16; -var RandomIdGenerator2 = function() { - function RandomIdGenerator3() { - this.generateTraceId = getIdGenerator2(TRACE_ID_BYTES2); - this.generateSpanId = getIdGenerator2(SPAN_ID_BYTES2); - } - __name(RandomIdGenerator3, "RandomIdGenerator"); - return RandomIdGenerator3; -}(); -var SHARED_BUFFER2 = Buffer.allocUnsafe(TRACE_ID_BYTES2); -function getIdGenerator2(bytes) { - return /* @__PURE__ */ __name(function generateId() { - for (var i = 0; i < bytes / 4; i++) { - SHARED_BUFFER2.writeUInt32BE(Math.random() * Math.pow(2, 32) >>> 0, i * 4); - } - for (var i = 0; i < bytes; i++) { - if (SHARED_BUFFER2[i] > 0) { - break; - } else if (i === bytes - 1) { - SHARED_BUFFER2[bytes - 1] = 1; - } - } - return SHARED_BUFFER2.toString("hex", 0, bytes); - }, "generateId"); -} -__name(getIdGenerator2, "getIdGenerator"); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js -var Tracer = function() { - function Tracer3(instrumentationLibrary, config2, _tracerProvider) { - this._tracerProvider = _tracerProvider; - var localConfig = mergeConfig(config2); - this._sampler = localConfig.sampler; - this._generalLimits = localConfig.generalLimits; - this._spanLimits = localConfig.spanLimits; - this._idGenerator = config2.idGenerator || new RandomIdGenerator2(); - this.resource = _tracerProvider.resource; - this.instrumentationLibrary = instrumentationLibrary; - } - __name(Tracer3, "Tracer"); - Tracer3.prototype.startSpan = function(name, options, context3) { - var _a3, _b2; - if (options === void 0) { - options = {}; - } - if (context3 === void 0) { - context3 = context2.active(); - } - if (options.root) { - context3 = trace.deleteSpan(context3); - } - var parentSpan = trace.getSpan(context3); - var clock; - if (parentSpan) { - clock = parentSpan["_clock"]; - } - if (!clock) { - clock = new AnchoredClock(Date, otperformance); - if (parentSpan) { - parentSpan["_clock"] = clock; - } - } - if (isTracingSuppressed(context3)) { - diag2.debug("Instrumentation suppressed, returning Noop Span"); - var nonRecordingSpan = trace.wrapSpanContext(INVALID_SPAN_CONTEXT); - nonRecordingSpan["_clock"] = clock; - return nonRecordingSpan; - } - var parentSpanContext = parentSpan === null || parentSpan === void 0 ? void 0 : parentSpan.spanContext(); - var spanId = this._idGenerator.generateSpanId(); - var traceId; - var traceState; - var parentSpanId; - if (!parentSpanContext || !trace.isSpanContextValid(parentSpanContext)) { - traceId = this._idGenerator.generateTraceId(); - } else { - traceId = parentSpanContext.traceId; - traceState = parentSpanContext.traceState; - parentSpanId = parentSpanContext.spanId; - } - var spanKind = (_a3 = options.kind) !== null && _a3 !== void 0 ? _a3 : SpanKind.INTERNAL; - var links = ((_b2 = options.links) !== null && _b2 !== void 0 ? _b2 : []).map(function(link) { - return { - context: link.context, - attributes: sanitizeAttributes(link.attributes) - }; - }); - var attributes = sanitizeAttributes(options.attributes); - var samplingResult = this._sampler.shouldSample(context3, traceId, name, spanKind, attributes, links); - var traceFlags = samplingResult.decision === SamplingDecision.RECORD_AND_SAMPLED ? TraceFlags.SAMPLED : TraceFlags.NONE; - var spanContext = { traceId, spanId, traceFlags, traceState }; - if (samplingResult.decision === SamplingDecision.NOT_RECORD) { - diag2.debug("Recording is off, propagating context in a non-recording span"); - var nonRecordingSpan = trace.wrapSpanContext(spanContext); - nonRecordingSpan["_clock"] = clock; - return nonRecordingSpan; - } - var span = new Span(this, context3, name, spanContext, spanKind, parentSpanId, links, options.startTime, clock); - var initAttributes = sanitizeAttributes(Object.assign(attributes, samplingResult.attributes)); - span.setAttributes(initAttributes); - return span; - }; - Tracer3.prototype.startActiveSpan = function(name, arg2, arg3, arg4) { - var opts; - var ctx; - var fn; - if (arguments.length < 2) { - return; - } else if (arguments.length === 2) { - fn = arg2; - } else if (arguments.length === 3) { - opts = arg2; - fn = arg3; - } else { - opts = arg2; - ctx = arg3; - fn = arg4; - } - var parentContext = ctx !== null && ctx !== void 0 ? ctx : context2.active(); - var span = this.startSpan(name, opts, parentContext); - var contextWithSpanSet = trace.setSpan(parentContext, span); - return context2.with(contextWithSpanSet, fn, void 0, span); - }; - Tracer3.prototype.getGeneralLimits = function() { - return this._generalLimits; - }; - Tracer3.prototype.getSpanLimits = function() { - return this._spanLimits; - }; - Tracer3.prototype.getActiveSpanProcessor = function() { - return this._tracerProvider.getActiveSpanProcessor(); - }; - return Tracer3; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/platform/node/default-service-name.js -function defaultServiceName() { - return "unknown_service:" + process.argv0; -} -__name(defaultServiceName, "defaultServiceName"); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/platform/node/HostDetector.js -var import_os2 = require("os"); -var __awaiter = function(thisArg, _arguments, P3, generator) { - function adopt(value) { - return value instanceof P3 ? value : new P3(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P3 || (P3 = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e2) { - reject(e2); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e2) { - reject(e2); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f2, y, t2, g2; - return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() { - return this; - }), g2; - function verb(n2) { - return function(v) { - return step([n2, v]); - }; - } - __name(verb, "verb"); - function step(op) { - if (f2) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f2 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t2[1]) { - _.label = t2[1]; - t2 = op; - break; - } - if (t2 && _.label < t2[2]) { - _.label = t2[2]; - _.ops.push(op); - break; - } - if (t2[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e2) { - op = [6, e2]; - y = 0; - } finally { - f2 = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - __name(step, "step"); -}; -var HostDetector = function() { - function HostDetector2() { - } - __name(HostDetector2, "HostDetector"); - HostDetector2.prototype.detect = function(_config) { - return __awaiter(this, void 0, void 0, function() { - var attributes; - var _a3; - return __generator(this, function(_b2) { - attributes = (_a3 = {}, _a3[SemanticResourceAttributes.HOST_NAME] = (0, import_os2.hostname)(), _a3[SemanticResourceAttributes.HOST_ARCH] = this._normalizeArch((0, import_os2.arch)()), _a3); - return [2, new Resource(attributes)]; - }); - }); - }; - HostDetector2.prototype._normalizeArch = function(nodeArchString) { - switch (nodeArchString) { - case "arm": - return "arm32"; - case "ppc": - return "ppc32"; - case "x64": - return "amd64"; - default: - return nodeArchString; - } - }; - return HostDetector2; -}(); -var hostDetector = new HostDetector(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/platform/node/OSDetector.js -var import_os3 = require("os"); -var __awaiter2 = function(thisArg, _arguments, P3, generator) { - function adopt(value) { - return value instanceof P3 ? value : new P3(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P3 || (P3 = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e2) { - reject(e2); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e2) { - reject(e2); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator2 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f2, y, t2, g2; - return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() { - return this; - }), g2; - function verb(n2) { - return function(v) { - return step([n2, v]); - }; - } - __name(verb, "verb"); - function step(op) { - if (f2) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f2 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t2[1]) { - _.label = t2[1]; - t2 = op; - break; - } - if (t2 && _.label < t2[2]) { - _.label = t2[2]; - _.ops.push(op); - break; - } - if (t2[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e2) { - op = [6, e2]; - y = 0; - } finally { - f2 = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - __name(step, "step"); -}; -var OSDetector = function() { - function OSDetector2() { - } - __name(OSDetector2, "OSDetector"); - OSDetector2.prototype.detect = function(_config) { - return __awaiter2(this, void 0, void 0, function() { - var attributes; - var _a3; - return __generator2(this, function(_b2) { - attributes = (_a3 = {}, _a3[SemanticResourceAttributes.OS_TYPE] = this._normalizeType((0, import_os3.platform)()), _a3[SemanticResourceAttributes.OS_VERSION] = (0, import_os3.release)(), _a3); - return [2, new Resource(attributes)]; - }); - }); - }; - OSDetector2.prototype._normalizeType = function(nodePlatform) { - switch (nodePlatform) { - case "sunos": - return "solaris"; - case "win32": - return "windows"; - default: - return nodePlatform; - } - }; - return OSDetector2; -}(); -var osDetector = new OSDetector(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/Resource.js -var Resource = function() { - function Resource2(attributes) { - this.attributes = attributes; - } - __name(Resource2, "Resource"); - Resource2.empty = function() { - return Resource2.EMPTY; - }; - Resource2.default = function() { - var _a3; - return new Resource2((_a3 = {}, _a3[SemanticResourceAttributes.SERVICE_NAME] = defaultServiceName(), _a3[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE], _a3[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_NAME], _a3[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_VERSION], _a3)); - }; - Resource2.prototype.merge = function(other) { - if (!other || !Object.keys(other.attributes).length) - return this; - var mergedAttributes = Object.assign({}, this.attributes, other.attributes); - return new Resource2(mergedAttributes); - }; - Resource2.EMPTY = new Resource2({}); - return Resource2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/detectors/BrowserDetector.js -var __assign = function() { - __assign = Object.assign || function(t2) { - for (var s, i = 1, n2 = arguments.length; i < n2; i++) { - s = arguments[i]; - for (var p2 in s) - if (Object.prototype.hasOwnProperty.call(s, p2)) - t2[p2] = s[p2]; - } - return t2; - }; - return __assign.apply(this, arguments); -}; -var __awaiter3 = function(thisArg, _arguments, P3, generator) { - function adopt(value) { - return value instanceof P3 ? value : new P3(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P3 || (P3 = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e2) { - reject(e2); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e2) { - reject(e2); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator3 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f2, y, t2, g2; - return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() { - return this; - }), g2; - function verb(n2) { - return function(v) { - return step([n2, v]); - }; - } - __name(verb, "verb"); - function step(op) { - if (f2) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f2 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t2[1]) { - _.label = t2[1]; - t2 = op; - break; - } - if (t2 && _.label < t2[2]) { - _.label = t2[2]; - _.ops.push(op); - break; - } - if (t2[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e2) { - op = [6, e2]; - y = 0; - } finally { - f2 = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - __name(step, "step"); -}; -var BrowserDetector = function() { - function BrowserDetector2() { - } - __name(BrowserDetector2, "BrowserDetector"); - BrowserDetector2.prototype.detect = function(config2) { - return __awaiter3(this, void 0, void 0, function() { - var isBrowser, browserResource; - var _a3; - return __generator3(this, function(_b2) { - isBrowser = typeof navigator !== "undefined"; - if (!isBrowser) { - return [2, Resource.empty()]; - } - browserResource = (_a3 = {}, _a3[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "browser", _a3[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = "Web Browser", _a3[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = navigator.userAgent, _a3); - return [2, this._getResourceAttributes(browserResource, config2)]; - }); - }); - }; - BrowserDetector2.prototype._getResourceAttributes = function(browserResource, _config) { - if (browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === "") { - diag2.debug("BrowserDetector failed: Unable to find required browser resources. "); - return Resource.empty(); - } else { - return new Resource(__assign({}, browserResource)); - } - }; - return BrowserDetector2; -}(); -var browserDetector = new BrowserDetector(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js -var __awaiter4 = function(thisArg, _arguments, P3, generator) { - function adopt(value) { - return value instanceof P3 ? value : new P3(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P3 || (P3 = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e2) { - reject(e2); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e2) { - reject(e2); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator4 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f2, y, t2, g2; - return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() { - return this; - }), g2; - function verb(n2) { - return function(v) { - return step([n2, v]); - }; - } - __name(verb, "verb"); - function step(op) { - if (f2) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f2 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t2[1]) { - _.label = t2[1]; - t2 = op; - break; - } - if (t2 && _.label < t2[2]) { - _.label = t2[2]; - _.ops.push(op); - break; - } - if (t2[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e2) { - op = [6, e2]; - y = 0; - } finally { - f2 = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - __name(step, "step"); -}; -var __values4 = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read5 = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -var EnvDetector = function() { - function EnvDetector2() { - this._MAX_LENGTH = 255; - this._COMMA_SEPARATOR = ","; - this._LABEL_KEY_VALUE_SPLITTER = "="; - this._ERROR_MESSAGE_INVALID_CHARS = "should be a ASCII string with a length greater than 0 and not exceed " + this._MAX_LENGTH + " characters."; - this._ERROR_MESSAGE_INVALID_VALUE = "should be a ASCII string with a length not exceed " + this._MAX_LENGTH + " characters."; - } - __name(EnvDetector2, "EnvDetector"); - EnvDetector2.prototype.detect = function(_config) { - return __awaiter4(this, void 0, void 0, function() { - var attributes, env2, rawAttributes, serviceName, parsedAttributes; - return __generator4(this, function(_a3) { - attributes = {}; - env2 = getEnv(); - rawAttributes = env2.OTEL_RESOURCE_ATTRIBUTES; - serviceName = env2.OTEL_SERVICE_NAME; - if (rawAttributes) { - try { - parsedAttributes = this._parseResourceAttributes(rawAttributes); - Object.assign(attributes, parsedAttributes); - } catch (e2) { - diag2.debug("EnvDetector failed: " + e2.message); - } - } - if (serviceName) { - attributes[SemanticResourceAttributes.SERVICE_NAME] = serviceName; - } - return [2, new Resource(attributes)]; - }); - }); - }; - EnvDetector2.prototype._parseResourceAttributes = function(rawEnvAttributes) { - var e_1, _a3; - if (!rawEnvAttributes) - return {}; - var attributes = {}; - var rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1); - try { - for (var rawAttributes_1 = __values4(rawAttributes), rawAttributes_1_1 = rawAttributes_1.next(); !rawAttributes_1_1.done; rawAttributes_1_1 = rawAttributes_1.next()) { - var rawAttribute = rawAttributes_1_1.value; - var keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1); - if (keyValuePair.length !== 2) { - continue; - } - var _b2 = __read5(keyValuePair, 2), key = _b2[0], value = _b2[1]; - key = key.trim(); - value = value.trim().split('^"|"$').join(""); - if (!this._isValidAndNotEmpty(key)) { - throw new Error("Attribute key " + this._ERROR_MESSAGE_INVALID_CHARS); - } - if (!this._isValid(value)) { - throw new Error("Attribute value " + this._ERROR_MESSAGE_INVALID_VALUE); - } - attributes[key] = value; - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (rawAttributes_1_1 && !rawAttributes_1_1.done && (_a3 = rawAttributes_1.return)) - _a3.call(rawAttributes_1); - } finally { - if (e_1) - throw e_1.error; - } - } - return attributes; - }; - EnvDetector2.prototype._isValid = function(name) { - return name.length <= this._MAX_LENGTH && this._isPrintableString(name); - }; - EnvDetector2.prototype._isPrintableString = function(str) { - for (var i = 0; i < str.length; i++) { - var ch = str.charAt(i); - if (ch <= " " || ch >= "~") { - return false; - } - } - return true; - }; - EnvDetector2.prototype._isValidAndNotEmpty = function(str) { - return str.length > 0 && this._isValid(str); - }; - return EnvDetector2; -}(); -var envDetector = new EnvDetector(); - -// ../../node_modules/.pnpm/@opentelemetry+resources@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/resources/build/esm/detectors/ProcessDetector.js -var __assign2 = function() { - __assign2 = Object.assign || function(t2) { - for (var s, i = 1, n2 = arguments.length; i < n2; i++) { - s = arguments[i]; - for (var p2 in s) - if (Object.prototype.hasOwnProperty.call(s, p2)) - t2[p2] = s[p2]; - } - return t2; - }; - return __assign2.apply(this, arguments); -}; -var __awaiter5 = function(thisArg, _arguments, P3, generator) { - function adopt(value) { - return value instanceof P3 ? value : new P3(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P3 || (P3 = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e2) { - reject(e2); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e2) { - reject(e2); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator5 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f2, y, t2, g2; - return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() { - return this; - }), g2; - function verb(n2) { - return function(v) { - return step([n2, v]); - }; - } - __name(verb, "verb"); - function step(op) { - if (f2) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f2 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t2[1]) { - _.label = t2[1]; - t2 = op; - break; - } - if (t2 && _.label < t2[2]) { - _.label = t2[2]; - _.ops.push(op); - break; - } - if (t2[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e2) { - op = [6, e2]; - y = 0; - } finally { - f2 = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - __name(step, "step"); -}; -var ProcessDetector = function() { - function ProcessDetector2() { - } - __name(ProcessDetector2, "ProcessDetector"); - ProcessDetector2.prototype.detect = function(config2) { - return __awaiter5(this, void 0, void 0, function() { - var processResource; - var _a3; - return __generator5(this, function(_b2) { - if (typeof process !== "object") { - return [2, Resource.empty()]; - } - processResource = (_a3 = {}, _a3[SemanticResourceAttributes.PROCESS_PID] = process.pid, _a3[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] = process.title || "", _a3[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1] || "", _a3[SemanticResourceAttributes.PROCESS_COMMAND_LINE] = process.argv.join(" ") || "", _a3[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = process.versions.node, _a3[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "nodejs", _a3[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = "Node.js", _a3); - return [2, this._getResourceAttributes(processResource, config2)]; - }); - }); - }; - ProcessDetector2.prototype._getResourceAttributes = function(processResource, _config) { - if (processResource[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] === "" || processResource[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] === "" || processResource[SemanticResourceAttributes.PROCESS_COMMAND] === "" || processResource[SemanticResourceAttributes.PROCESS_COMMAND_LINE] === "" || processResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === "") { - diag2.debug("ProcessDetector failed: Unable to find required process resources. "); - return Resource.empty(); - } else { - return new Resource(__assign2({}, processResource)); - } - }; - return ProcessDetector2; -}(); -var processDetector = new ProcessDetector(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js -var __values5 = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var MultiSpanProcessor = function() { - function MultiSpanProcessor2(_spanProcessors) { - this._spanProcessors = _spanProcessors; - } - __name(MultiSpanProcessor2, "MultiSpanProcessor"); - MultiSpanProcessor2.prototype.forceFlush = function() { - var e_1, _a3; - var promises = []; - try { - for (var _b2 = __values5(this._spanProcessors), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var spanProcessor = _c.value; - promises.push(spanProcessor.forceFlush()); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_1) - throw e_1.error; - } - } - return new Promise(function(resolve) { - Promise.all(promises).then(function() { - resolve(); - }).catch(function(error2) { - globalErrorHandler(error2 || new Error("MultiSpanProcessor: forceFlush failed")); - resolve(); - }); - }); - }; - MultiSpanProcessor2.prototype.onStart = function(span, context3) { - var e_2, _a3; - try { - for (var _b2 = __values5(this._spanProcessors), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var spanProcessor = _c.value; - spanProcessor.onStart(span, context3); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_2) - throw e_2.error; - } - } - }; - MultiSpanProcessor2.prototype.onEnd = function(span) { - var e_3, _a3; - try { - for (var _b2 = __values5(this._spanProcessors), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var spanProcessor = _c.value; - spanProcessor.onEnd(span); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_3) - throw e_3.error; - } - } - }; - MultiSpanProcessor2.prototype.shutdown = function() { - var e_4, _a3; - var promises = []; - try { - for (var _b2 = __values5(this._spanProcessors), _c = _b2.next(); !_c.done; _c = _b2.next()) { - var spanProcessor = _c.value; - promises.push(spanProcessor.shutdown()); - } - } catch (e_4_1) { - e_4 = { error: e_4_1 }; - } finally { - try { - if (_c && !_c.done && (_a3 = _b2.return)) - _a3.call(_b2); - } finally { - if (e_4) - throw e_4.error; - } - } - return new Promise(function(resolve, reject) { - Promise.all(promises).then(function() { - resolve(); - }, reject); - }); - }; - return MultiSpanProcessor2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/NoopSpanProcessor.js -var NoopSpanProcessor = function() { - function NoopSpanProcessor2() { - } - __name(NoopSpanProcessor2, "NoopSpanProcessor"); - NoopSpanProcessor2.prototype.onStart = function(_span, _context) { - }; - NoopSpanProcessor2.prototype.onEnd = function(_span) { - }; - NoopSpanProcessor2.prototype.shutdown = function() { - return Promise.resolve(); - }; - NoopSpanProcessor2.prototype.forceFlush = function() { - return Promise.resolve(); - }; - return NoopSpanProcessor2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js -var ForceFlushState; -(function(ForceFlushState2) { - ForceFlushState2[ForceFlushState2["resolved"] = 0] = "resolved"; - ForceFlushState2[ForceFlushState2["timeout"] = 1] = "timeout"; - ForceFlushState2[ForceFlushState2["error"] = 2] = "error"; - ForceFlushState2[ForceFlushState2["unresolved"] = 3] = "unresolved"; -})(ForceFlushState || (ForceFlushState = {})); -var BasicTracerProvider = function() { - function BasicTracerProvider2(config2) { - if (config2 === void 0) { - config2 = {}; - } - var _a3; - this._registeredSpanProcessors = []; - this._tracers = /* @__PURE__ */ new Map(); - var mergedConfig = merge({}, loadDefaultConfig(), reconfigureLimits(config2)); - this.resource = (_a3 = mergedConfig.resource) !== null && _a3 !== void 0 ? _a3 : Resource.empty(); - this.resource = Resource.default().merge(this.resource); - this._config = Object.assign({}, mergedConfig, { - resource: this.resource - }); - var defaultExporter = this._buildExporterFromEnv(); - if (defaultExporter !== void 0) { - var batchProcessor = new BatchSpanProcessor(defaultExporter); - this.activeSpanProcessor = batchProcessor; - } else { - this.activeSpanProcessor = new NoopSpanProcessor(); - } - } - __name(BasicTracerProvider2, "BasicTracerProvider"); - BasicTracerProvider2.prototype.getTracer = function(name, version, options) { - var key = name + "@" + (version || "") + ":" + ((options === null || options === void 0 ? void 0 : options.schemaUrl) || ""); - if (!this._tracers.has(key)) { - this._tracers.set(key, new Tracer({ name, version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._config, this)); - } - return this._tracers.get(key); - }; - BasicTracerProvider2.prototype.addSpanProcessor = function(spanProcessor) { - if (this._registeredSpanProcessors.length === 0) { - this.activeSpanProcessor.shutdown().catch(function(err) { - return diag2.error("Error while trying to shutdown current span processor", err); - }); - } - this._registeredSpanProcessors.push(spanProcessor); - this.activeSpanProcessor = new MultiSpanProcessor(this._registeredSpanProcessors); - }; - BasicTracerProvider2.prototype.getActiveSpanProcessor = function() { - return this.activeSpanProcessor; - }; - BasicTracerProvider2.prototype.register = function(config2) { - if (config2 === void 0) { - config2 = {}; - } - trace.setGlobalTracerProvider(this); - if (config2.propagator === void 0) { - config2.propagator = this._buildPropagatorFromEnv(); - } - if (config2.contextManager) { - context2.setGlobalContextManager(config2.contextManager); - } - if (config2.propagator) { - propagation.setGlobalPropagator(config2.propagator); - } - }; - BasicTracerProvider2.prototype.forceFlush = function() { - var timeout = this._config.forceFlushTimeoutMillis; - var promises = this._registeredSpanProcessors.map(function(spanProcessor) { - return new Promise(function(resolve) { - var state; - var timeoutInterval = setTimeout(function() { - resolve(new Error("Span processor did not completed within timeout period of " + timeout + " ms")); - state = ForceFlushState.timeout; - }, timeout); - spanProcessor.forceFlush().then(function() { - clearTimeout(timeoutInterval); - if (state !== ForceFlushState.timeout) { - state = ForceFlushState.resolved; - resolve(state); - } - }).catch(function(error2) { - clearTimeout(timeoutInterval); - state = ForceFlushState.error; - resolve(error2); - }); - }); - }); - return new Promise(function(resolve, reject) { - Promise.all(promises).then(function(results) { - var errors = results.filter(function(result) { - return result !== ForceFlushState.resolved; - }); - if (errors.length > 0) { - reject(errors); - } else { - resolve(); - } - }).catch(function(error2) { - return reject([error2]); - }); - }); - }; - BasicTracerProvider2.prototype.shutdown = function() { - return this.activeSpanProcessor.shutdown(); - }; - BasicTracerProvider2.prototype._getPropagator = function(name) { - var _a3; - return (_a3 = this.constructor._registeredPropagators.get(name)) === null || _a3 === void 0 ? void 0 : _a3(); - }; - BasicTracerProvider2.prototype._getSpanExporter = function(name) { - var _a3; - return (_a3 = this.constructor._registeredExporters.get(name)) === null || _a3 === void 0 ? void 0 : _a3(); - }; - BasicTracerProvider2.prototype._buildPropagatorFromEnv = function() { - var _this = this; - var uniquePropagatorNames = Array.from(new Set(getEnv().OTEL_PROPAGATORS)); - var propagators = uniquePropagatorNames.map(function(name) { - var propagator = _this._getPropagator(name); - if (!propagator) { - diag2.warn('Propagator "' + name + '" requested through environment variable is unavailable.'); - } - return propagator; - }); - var validPropagators = propagators.reduce(function(list, item) { - if (item) { - list.push(item); - } - return list; - }, []); - if (validPropagators.length === 0) { - return; - } else if (uniquePropagatorNames.length === 1) { - return validPropagators[0]; - } else { - return new CompositePropagator({ - propagators: validPropagators - }); - } - }; - BasicTracerProvider2.prototype._buildExporterFromEnv = function() { - var exporterName = getEnv().OTEL_TRACES_EXPORTER; - if (exporterName === "none") - return; - var exporter = this._getSpanExporter(exporterName); - if (!exporter) { - diag2.error('Exporter "' + exporterName + '" requested through environment variable is unavailable.'); - } - return exporter; - }; - BasicTracerProvider2._registeredPropagators = /* @__PURE__ */ new Map([ - ["tracecontext", function() { - return new W3CTraceContextPropagator(); - }], - ["baggage", function() { - return new W3CBaggagePropagator(); - }] - ]); - BasicTracerProvider2._registeredExporters = /* @__PURE__ */ new Map(); - return BasicTracerProvider2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/ConsoleSpanExporter.js -var __values6 = function(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m2 = s && o2[s], i = 0; - if (m2) - return m2.call(o2); - if (o2 && typeof o2.length === "number") - return { - next: function() { - if (o2 && i >= o2.length) - o2 = void 0; - return { value: o2 && o2[i++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var ConsoleSpanExporter = function() { - function ConsoleSpanExporter2() { - } - __name(ConsoleSpanExporter2, "ConsoleSpanExporter"); - ConsoleSpanExporter2.prototype.export = function(spans, resultCallback) { - return this._sendSpans(spans, resultCallback); - }; - ConsoleSpanExporter2.prototype.shutdown = function() { - this._sendSpans([]); - return Promise.resolve(); - }; - ConsoleSpanExporter2.prototype._exportInfo = function(span) { - return { - traceId: span.spanContext().traceId, - parentId: span.parentSpanId, - name: span.name, - id: span.spanContext().spanId, - kind: span.kind, - timestamp: hrTimeToMicroseconds(span.startTime), - duration: hrTimeToMicroseconds(span.duration), - attributes: span.attributes, - status: span.status, - events: span.events, - links: span.links - }; - }; - ConsoleSpanExporter2.prototype._sendSpans = function(spans, done) { - var e_1, _a3; - try { - for (var spans_1 = __values6(spans), spans_1_1 = spans_1.next(); !spans_1_1.done; spans_1_1 = spans_1.next()) { - var span = spans_1_1.value; - console.dir(this._exportInfo(span), { depth: 3 }); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (spans_1_1 && !spans_1_1.done && (_a3 = spans_1.return)) - _a3.call(spans_1); - } finally { - if (e_1) - throw e_1.error; - } - } - if (done) { - return done({ code: ExportResultCode.SUCCESS }); - } - }; - return ConsoleSpanExporter2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/InMemorySpanExporter.js -var __read6 = function(o2, n2) { - var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m2) - return o2; - var i = m2.call(o2), r2, ar = [], e2; - try { - while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) - ar.push(r2.value); - } catch (error2) { - e2 = { error: error2 }; - } finally { - try { - if (r2 && !r2.done && (m2 = i["return"])) - m2.call(i); - } finally { - if (e2) - throw e2.error; - } - } - return ar; -}; -var __spreadArray4 = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var InMemorySpanExporter = function() { - function InMemorySpanExporter2() { - this._finishedSpans = []; - this._stopped = false; - } - __name(InMemorySpanExporter2, "InMemorySpanExporter"); - InMemorySpanExporter2.prototype.export = function(spans, resultCallback) { - var _a3; - if (this._stopped) - return resultCallback({ - code: ExportResultCode.FAILED, - error: new Error("Exporter has been stopped") - }); - (_a3 = this._finishedSpans).push.apply(_a3, __spreadArray4([], __read6(spans), false)); - setTimeout(function() { - return resultCallback({ code: ExportResultCode.SUCCESS }); - }, 0); - }; - InMemorySpanExporter2.prototype.shutdown = function() { - this._stopped = true; - this._finishedSpans = []; - return Promise.resolve(); - }; - InMemorySpanExporter2.prototype.reset = function() { - this._finishedSpans = []; - }; - InMemorySpanExporter2.prototype.getFinishedSpans = function() { - return this._finishedSpans; - }; - return InMemorySpanExporter2; -}(); - -// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@1.7.0_@opentelemetry+api@1.2.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/SimpleSpanProcessor.js -var SimpleSpanProcessor = function() { - function SimpleSpanProcessor2(_exporter) { - this._exporter = _exporter; - this._shutdownOnce = new BindOnceFuture(this._shutdown, this); - } - __name(SimpleSpanProcessor2, "SimpleSpanProcessor"); - SimpleSpanProcessor2.prototype.forceFlush = function() { - return Promise.resolve(); - }; - SimpleSpanProcessor2.prototype.onStart = function(_span, _parentContext) { - }; - SimpleSpanProcessor2.prototype.onEnd = function(span) { - var _this = this; - if (this._shutdownOnce.isCalled) { - return; - } - if ((span.spanContext().traceFlags & TraceFlags.SAMPLED) === 0) { - return; - } - context2.with(suppressTracing(context2.active()), function() { - _this._exporter.export([span], function(result) { - var _a3; - if (result.code !== ExportResultCode.SUCCESS) { - globalErrorHandler((_a3 = result.error) !== null && _a3 !== void 0 ? _a3 : new Error("SimpleSpanProcessor: span export failed (status " + result + ")")); - } - }); - }); - }; - SimpleSpanProcessor2.prototype.shutdown = function() { - return this._shutdownOnce.call(); - }; - SimpleSpanProcessor2.prototype._shutdown = function() { - return this._exporter.shutdown(); - }; - return SimpleSpanProcessor2; -}(); - -// ../engine-core/src/tracing/createSpan.ts -async function createSpan(engineSpanEvent) { - await new Promise((res) => setTimeout(res, 0)); - const tracer = trace.getTracer("prisma"); - engineSpanEvent.spans.forEach((engineSpan) => { - var _a3; - const spanContext = { - traceId: engineSpan.trace_id, - spanId: engineSpan.span_id, - traceFlags: TraceFlags.SAMPLED - }; - const links = (_a3 = engineSpan.links) == null ? void 0 : _a3.map((link) => { - return { - context: { - traceId: link.trace_id, - spanId: link.span_id, - traceFlags: TraceFlags.SAMPLED - } - }; - }); - const span = new Span( - tracer, - ROOT_CONTEXT, - engineSpan.name, - spanContext, - SpanKind.INTERNAL, - engineSpan.parent_span_id, - links, - engineSpan.start_time - ); - if (engineSpan.attributes) { - span.setAttributes(engineSpan.attributes); - } - span.end(engineSpan.end_time); - }); -} -__name(createSpan, "createSpan"); - -// ../engine-core/src/tracing/getTraceParent.ts -function getTraceParent({ - context: context3, - tracingConfig -}) { - const span = trace.getSpanContext(context3 != null ? context3 : context2.active()); - if ((tracingConfig == null ? void 0 : tracingConfig.enabled) && span) { - return `00-${span.traceId}-${span.spanId}-0${span.traceFlags}`; - } else { - return `00-10-10-00`; - } -} -__name(getTraceParent, "getTraceParent"); - -// ../engine-core/src/tracing/getTracingConfig.ts -function getTracingConfig(previewFeatures) { - const hasTracingPreviewFeatureFlagEnabled = previewFeatures.includes("tracing"); - return { - get enabled() { - return Boolean(globalThis.PRISMA_INSTRUMENTATION && hasTracingPreviewFeatureFlagEnabled); - }, - get middleware() { - return Boolean(globalThis.PRISMA_INSTRUMENTATION && globalThis.PRISMA_INSTRUMENTATION.middleware); - } - }; -} -__name(getTracingConfig, "getTracingConfig"); - -// ../engine-core/src/tracing/runInChildSpan.ts -async function runInChildSpan(options, cb) { - var _a3; - if (options.enabled === false) - return cb(); - const tracer = trace.getTracer("prisma"); - const context3 = (_a3 = options.context) != null ? _a3 : context2.active(); - if (options.active === false) { - const span = tracer.startSpan(`prisma:client:${options.name}`, options, context3); - try { - return await cb(span, context3); - } finally { - span.end(); - } - } - return tracer.startActiveSpan(`prisma:client:${options.name}`, options, context3, async (span) => { - try { - return await cb(span, context2.active()); - } finally { - span.end(); - } - }); -} -__name(runInChildSpan, "runInChildSpan"); - -// ../engine-core/src/binary/Connection.ts -var import_get_stream = __toESM(require_get_stream()); -var undici = /* @__PURE__ */ __name(() => require_undici(), "undici"); -function assertHasPool(pool) { - if (pool === void 0) { - throw new Error("Connection has not been opened"); - } -} -__name(assertHasPool, "assertHasPool"); -var Connection = class { - constructor() { - } - static async onHttpError(response, handler) { - const _response = await response; - if (_response.statusCode >= 400) { - return handler(_response); - } - return _response; - } - open(url, options) { - if (this._pool) - return; - this._pool = new (undici()).Pool(url, { - connections: 1e3, - keepAliveMaxTimeout: 6e5, - headersTimeout: 0, - bodyTimeout: 0, - ...options - }); - } - async raw(method, endpoint, headers, body, parseResponse = true) { - assertHasPool(this._pool); - const response = await this._pool.request({ - path: endpoint, - method, - headers: { - "Content-Type": "application/json", - ...headers - }, - body - }); - const bodyString = await (0, import_get_stream.default)(response.body); - return { - statusCode: response.statusCode, - headers: response.headers, - data: parseResponse ? JSON.parse(bodyString) : bodyString - }; - } - post(endpoint, body, headers, parseResponse) { - return this.raw("POST", endpoint, headers, body, parseResponse); - } - get(path7, headers) { - return this.raw("GET", path7, headers); - } - close() { - if (this._pool) { - this._pool.close(() => { - }); - } - this._pool = void 0; - } -}; -__name(Connection, "Connection"); - -// ../engine-core/src/binary/BinaryEngine.ts -var debug5 = src_default("prisma:engine"); -var exists3 = (0, import_util4.promisify)(import_fs5.default.exists); -var logger = /* @__PURE__ */ __name((...args) => { -}, "logger"); -var knownPlatforms = [...platforms, "native"]; -var engines = []; -var socketPaths = []; -var MAX_STARTS = process.env.PRISMA_CLIENT_NO_RETRY ? 1 : 2; -var MAX_REQUEST_RETRIES = process.env.PRISMA_CLIENT_NO_RETRY ? 1 : 2; -var BinaryEngine = class extends Engine { - constructor({ - cwd, - datamodelPath, - prismaPath, - generator, - datasources, - showColors, - logQueries, - env: env2, - flags, - clientVersion: clientVersion2, - previewFeatures, - engineEndpoint, - enableDebugLogs, - allowTriggerPanic, - dirname: dirname2, - activeProvider, - tracingConfig, - logEmitter - }) { - var _a3; - super(); - this.startCount = 0; - this.previewFeatures = []; - this.stderrLogs = ""; - this.handleRequestError = /* @__PURE__ */ __name(async (error2) => { - var _a3, _b2; - debug5({ error: error2 }); - if (this.startPromise) { - await this.startPromise; - } - const isNetworkError = [ - "ECONNRESET", - "ECONNREFUSED", - "UND_ERR_CLOSED", - "UND_ERR_SOCKET", - "UND_ERR_DESTROYED", - "UND_ERR_ABORTED" - ].includes(error2.code); - if (error2 instanceof PrismaClientKnownRequestError) { - return { error: error2, shouldRetry: false }; - } - try { - this.throwAsyncErrorIfExists(); - if ((_a3 = this.currentRequestPromise) == null ? void 0 : _a3.isCanceled) { - this.throwAsyncErrorIfExists(); - } else if (isNetworkError) { - if (this.globalKillSignalReceived && !((_b2 = this.child) == null ? void 0 : _b2.connected)) { - throw new PrismaClientUnknownRequestError( - `The Node.js process already received a ${this.globalKillSignalReceived} signal, therefore the Prisma query engine exited - and your request can't be processed. - You probably have some open handle that prevents your process from exiting. - It could be an open http server or stream that didn't close yet. - We recommend using the \`wtfnode\` package to debug open handles.`, - { clientVersion: this.clientVersion } - ); - } - this.throwAsyncErrorIfExists(); - if (this.startCount > MAX_STARTS) { - for (let i = 0; i < 5; i++) { - await new Promise((r2) => setTimeout(r2, 50)); - this.throwAsyncErrorIfExists(true); - } - throw new Error(`Query engine is trying to restart, but can't. - Please look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.`); - } - } - this.throwAsyncErrorIfExists(true); - throw error2; - } catch (e2) { - return { error: e2, shouldRetry: isNetworkError }; - } - }, "handleRequestError"); - this.dirname = dirname2; - this.env = env2; - this.cwd = this.resolveCwd(cwd); - this.enableDebugLogs = enableDebugLogs != null ? enableDebugLogs : false; - this.allowTriggerPanic = allowTriggerPanic != null ? allowTriggerPanic : false; - this.datamodelPath = datamodelPath; - this.prismaPath = (_a3 = process.env.PRISMA_QUERY_ENGINE_BINARY) != null ? _a3 : prismaPath; - this.generator = generator; - this.datasources = datasources; - this.tracingConfig = tracingConfig; - this.logEmitter = logEmitter; - this.showColors = showColors != null ? showColors : false; - this.logQueries = logQueries != null ? logQueries : false; - this.clientVersion = clientVersion2; - this.flags = flags != null ? flags : []; - this.previewFeatures = previewFeatures != null ? previewFeatures : []; - this.activeProvider = activeProvider; - this.connection = new Connection(); - initHooks(); - const removedFlags = [ - "middlewares", - "aggregateApi", - "distinct", - "aggregations", - "insensitiveFilters", - "atomicNumberOperations", - "transactionApi", - "transaction", - "connectOrCreate", - "uncheckedScalarInputs", - "nativeTypes", - "createMany", - "groupBy", - "referentialActions", - "microsoftSqlServer" - ]; - const removedFlagsUsed = this.previewFeatures.filter((e2) => removedFlags.includes(e2)); - if (removedFlagsUsed.length > 0 && !process.env.PRISMA_HIDE_PREVIEW_FLAG_WARNINGS) { - console.log( - `${import_chalk3.default.blueBright("info")} The preview flags \`${removedFlagsUsed.join( - "`, `" - )}\` were removed, you can now safely remove them from your schema.prisma.` - ); - } - this.previewFeatures = this.previewFeatures.filter((e2) => !removedFlags.includes(e2)); - this.engineEndpoint = engineEndpoint; - if (engineEndpoint) { - const url = new import_url.URL(engineEndpoint); - this.port = Number(url.port); - } - if (this.platform) { - if (!knownPlatforms.includes(this.platform) && !import_fs5.default.existsSync(this.platform)) { - throw new PrismaClientInitializationError( - `Unknown ${import_chalk3.default.red("PRISMA_QUERY_ENGINE_BINARY")} ${import_chalk3.default.redBright.bold( - this.platform - )}. Possible binaryTargets: ${import_chalk3.default.greenBright( - knownPlatforms.join(", ") - )} or a path to the query engine binary. -You may have to run ${import_chalk3.default.greenBright("prisma generate")} for your changes to take effect.`, - this.clientVersion - ); - } - } else { - void this.getPlatform(); - } - if (this.enableDebugLogs) { - src_default.enable("*"); - } - engines.push(this); - this.checkForTooManyEngines(); - } - setError(err) { - var _a3; - if (isRustErrorLog(err)) { - this.lastError = new PrismaClientRustError({ - clientVersion: this.clientVersion, - error: err - }); - if (this.lastError.isPanic()) { - if (this.child) { - this.stopPromise = killProcessAndWait(this.child); - } - if ((_a3 = this.currentRequestPromise) == null ? void 0 : _a3.cancel) { - this.currentRequestPromise.cancel(); - } - } - } - } - checkForTooManyEngines() { - if (engines.length >= 10) { - const runningEngines = engines.filter((e2) => e2.child); - if (runningEngines.length === 10) { - console.warn( - `${import_chalk3.default.yellow("warn(prisma-client)")} There are already 10 instances of Prisma Client actively running.` - ); - } - } - } - resolveCwd(cwd) { - if (cwd && import_fs5.default.existsSync(cwd) && import_fs5.default.lstatSync(cwd).isDirectory()) { - return cwd; - } - return process.cwd(); - } - on(event, listener) { - if (event === "beforeExit") { - this.beforeExitListener = listener; - } else { - this.logEmitter.on(event, listener); - } - } - async emitExit() { - if (this.beforeExitListener) { - try { - await this.beforeExitListener(); - } catch (e2) { - console.error(e2); - } - } - } - async getPlatform() { - if (this.platformPromise) { - return this.platformPromise; - } - this.platformPromise = getPlatform(); - return this.platformPromise; - } - getQueryEnginePath(platform3, prefix = __dirname) { - let queryEnginePath = import_path3.default.join(prefix, `query-engine-${platform3}`); - if (platform3 === "windows") { - queryEnginePath = `${queryEnginePath}.exe`; - } - return queryEnginePath; - } - async resolvePrismaPath() { - var _a3, _b2, _c; - const searchedLocations = []; - let enginePath; - if (this.prismaPath) { - return { prismaPath: this.prismaPath, searchedLocations }; - } - const platform = await this.getPlatform(); - if (this.platform && this.platform !== platform) { - this.incorrectlyPinnedBinaryTarget = this.platform; - } - this.platform = this.platform || platform; - if (__filename.includes("BinaryEngine")) { - enginePath = this.getQueryEnginePath(this.platform, getEnginesPath()); - return { prismaPath: enginePath, searchedLocations }; - } - const searchLocations = [ - eval(`require('path').join(__dirname, '../../../.prisma/client')`), - (_c = (_b2 = (_a3 = this.generator) == null ? void 0 : _a3.output) == null ? void 0 : _b2.value) != null ? _c : eval("__dirname"), - import_path3.default.join(eval("__dirname"), ".."), - import_path3.default.dirname(this.datamodelPath), - this.cwd, - "/tmp/prisma-engines" - ]; - if (this.dirname) { - searchLocations.push(this.dirname); - } - for (const location of searchLocations) { - searchedLocations.push(location); - debug5(`Search for Query Engine in ${location}`); - enginePath = this.getQueryEnginePath(this.platform, location); - if (import_fs5.default.existsSync(enginePath)) { - return { prismaPath: enginePath, searchedLocations }; - } - } - enginePath = this.getQueryEnginePath(this.platform); - return { prismaPath: enginePath != null ? enginePath : "", searchedLocations }; - } - async getPrismaPath() { - const { prismaPath, searchedLocations: searchedLocations2 } = await this.resolvePrismaPath(); - const platform3 = await this.getPlatform(); - if (!await exists3(prismaPath)) { - const pinnedStr = this.incorrectlyPinnedBinaryTarget ? ` -You incorrectly pinned it to ${import_chalk3.default.redBright.bold(`${this.incorrectlyPinnedBinaryTarget}`)} -` : ""; - let errorText = `Query engine binary for current platform "${import_chalk3.default.bold( - platform3 - )}" could not be found.${pinnedStr} -This probably happens, because you built Prisma Client on a different platform. -(Prisma Client looked in "${import_chalk3.default.underline(prismaPath)}") - -Searched Locations: - -${searchedLocations2.map((f2) => { - let msg = ` ${f2}`; - if (process.env.DEBUG === "node-engine-search-locations" && import_fs5.default.existsSync(f2)) { - const dir = import_fs5.default.readdirSync(f2); - msg += dir.map((d2) => ` ${d2}`).join("\n"); - } - return msg; - }).join("\n" + (process.env.DEBUG === "node-engine-search-locations" ? "\n" : ""))} -`; - if (this.generator) { - if (this.generator.binaryTargets.find((object) => object.value === this.platform) || this.generator.binaryTargets.find((object) => object.value === "native")) { - errorText += ` -You already added the platform${this.generator.binaryTargets.length > 1 ? "s" : ""} ${this.generator.binaryTargets.map((t2) => `"${import_chalk3.default.bold(t2.value)}"`).join(", ")} to the "${import_chalk3.default.underline("generator")}" block -in the "schema.prisma" file as described in https://pris.ly/d/client-generator, -but something went wrong. That's suboptimal. - -Please create an issue at https://github.com/prisma/prisma/issues/new`; - errorText += ``; - } else { - errorText += ` - -To solve this problem, add the platform "${this.platform}" to the "${import_chalk3.default.underline( - "binaryTargets" - )}" attribute in the "${import_chalk3.default.underline("generator")}" block in the "schema.prisma" file: -${import_chalk3.default.greenBright(this.getFixedGenerator())} - -Then run "${import_chalk3.default.greenBright("prisma generate")}" for your changes to take effect. -Read more about deploying Prisma Client: https://pris.ly/d/client-generator`; - } - } else { - errorText += ` - -Read more about deploying Prisma Client: https://pris.ly/d/client-generator -`; - } - throw new PrismaClientInitializationError(errorText, this.clientVersion); - } - if (this.incorrectlyPinnedBinaryTarget) { - console.error(`${import_chalk3.default.yellow("Warning:")} You pinned the platform ${import_chalk3.default.bold( - this.incorrectlyPinnedBinaryTarget - )}, but Prisma Client detects ${import_chalk3.default.bold(await this.getPlatform())}. -This means you should very likely pin the platform ${import_chalk3.default.greenBright(await this.getPlatform())} instead. -${import_chalk3.default.dim("In case we're mistaken, please report this to us \u{1F64F}.")}`); - } - if (process.platform !== "win32") { - plusX(prismaPath); - } - return prismaPath; - } - getFixedGenerator() { - const fixedGenerator = { - ...this.generator, - binaryTargets: fixBinaryTargets(this.generator.binaryTargets, this.platform) - }; - return printGeneratorConfig(fixedGenerator); - } - printDatasources() { - if (this.datasources) { - return JSON.stringify(this.datasources); - } - return "[]"; - } - async start() { - if (this.stopPromise) { - await this.stopPromise; - } - const startFn = /* @__PURE__ */ __name(async () => { - if (!this.startPromise) { - this.startCount++; - this.startPromise = this.internalStart(); - } - await this.startPromise; - if (!this.child && !this.engineEndpoint) { - throw new PrismaClientUnknownRequestError(`Can't perform request, as the Engine has already been stopped`, { - clientVersion: this.clientVersion - }); - } - }, "startFn"); - const spanOptions = { - name: "connect", - enabled: this.tracingConfig.enabled && !this.startPromise - }; - return runInChildSpan(spanOptions, startFn); - } - getEngineEnvVars() { - var _a3, _b2; - const env2 = { - PRISMA_DML_PATH: this.datamodelPath - }; - if (this.logQueries) { - env2.LOG_QUERIES = "true"; - } - if (this.datasources) { - env2.OVERWRITE_DATASOURCES = this.printDatasources(); - } - if (!process.env.NO_COLOR && this.showColors) { - env2.CLICOLOR_FORCE = "1"; - } - return { - ...this.env, - ...process.env, - ...env2, - RUST_BACKTRACE: (_a3 = process.env.RUST_BACKTRACE) != null ? _a3 : "1", - RUST_LOG: (_b2 = process.env.RUST_LOG) != null ? _b2 : "info" - }; - } - internalStart() { - return new Promise(async (resolve, reject) => { - var _a3, _b2, _c; - await new Promise((r2) => process.nextTick(r2)); - if (this.stopPromise) { - await this.stopPromise; - } - if (this.engineEndpoint) { - try { - this.connection.open(this.engineEndpoint); - await (0, import_p_retry.default)(() => this.connection.get("/status"), { - retries: 10 - }); - } catch (e2) { - return reject(e2); - } - return resolve(); - } - try { - if (((_a3 = this.child) == null ? void 0 : _a3.connected) || this.child && !((_b2 = this.child) == null ? void 0 : _b2.killed)) { - debug5(`There is a child that still runs and we want to start again`); - } - this.lastError = void 0; - logger("startin & resettin"); - this.globalKillSignalReceived = void 0; - debug5({ cwd: this.cwd }); - const prismaPath = await this.getPrismaPath(); - const additionalFlag = this.allowTriggerPanic ? ["--debug"] : []; - const flags = [ - "--enable-raw-queries", - "--enable-metrics", - "--enable-open-telemetry", - ...this.flags, - ...additionalFlag - ]; - this.port = await this.getFreePort(); - flags.push("--port", String(this.port)); - debug5({ flags }); - const env2 = this.getEngineEnvVars(); - this.child = (0, import_child_process2.spawn)(prismaPath, flags, { - env: env2, - cwd: this.cwd, - windowsHide: true, - stdio: ["ignore", "pipe", "pipe"] - }); - byline(this.child.stderr).on("data", (msg) => { - const data = String(msg); - debug5("stderr", data); - try { - const json = JSON.parse(data); - if (typeof json.is_panic !== "undefined") { - debug5(json); - this.setError(json); - if (this.engineStartDeferred) { - const err = new PrismaClientInitializationError(json.message, this.clientVersion, json.error_code); - this.engineStartDeferred.reject(err); - } - } - } catch (e2) { - if (!data.includes("Printing to stderr") && !data.includes("Listening on ")) { - this.stderrLogs += "\n" + data; - } - } - }); - byline(this.child.stdout).on("data", (msg) => { - var _a4, _b3; - const data = String(msg); - try { - const json = JSON.parse(data); - debug5("stdout", getMessage(json)); - if (this.engineStartDeferred && json.level === "INFO" && json.target === "query_engine::server" && ((_b3 = (_a4 = json.fields) == null ? void 0 : _a4.message) == null ? void 0 : _b3.startsWith("Started query engine http server"))) { - this.connection.open(`http://127.0.0.1:${this.port}`); - this.engineStartDeferred.resolve(); - this.engineStartDeferred = void 0; - } - if (typeof json.is_panic === "undefined") { - if (json.span === true) { - if (this.tracingConfig.enabled === true) { - void createSpan(json); - } - return; - } - const log3 = convertLog(json); - const logIsRustErrorLog = isRustErrorLog(log3); - if (logIsRustErrorLog) { - this.setError(log3); - } else { - this.logEmitter.emit(log3.level, log3); - } - } else { - this.setError(json); - } - } catch (e2) { - debug5(e2, data); - } - }); - this.child.on("exit", (code) => { - var _a4; - logger("removing startPromise"); - this.startPromise = void 0; - if (this.engineStopDeferred) { - this.engineStopDeferred.resolve(code); - return; - } - this.connection.close(); - if (code !== 0 && this.engineStartDeferred && this.startCount === 1) { - let err; - let msg = this.stderrLogs; - if (this.lastError) { - msg = getMessage(this.lastError); - } - if (code !== null) { - err = new PrismaClientInitializationError( - `Query engine exited with code ${code} -` + msg, - this.clientVersion - ); - } else if ((_a4 = this.child) == null ? void 0 : _a4.signalCode) { - err = new PrismaClientInitializationError( - `Query engine process killed with signal ${this.child.signalCode} for unknown reason. -Make sure that the engine binary at ${prismaPath} is not corrupt. -` + msg, - this.clientVersion - ); - } else { - err = new PrismaClientInitializationError(msg, this.clientVersion); - } - this.engineStartDeferred.reject(err); - } - if (!this.child) { - return; - } - if (this.lastError) { - return; - } - if (code === 126) { - this.setError({ - timestamp: new Date(), - target: "binary engine process exit", - level: "error", - fields: { - message: `Couldn't start query engine as it's not executable on this operating system. -You very likely have the wrong "binaryTarget" defined in the schema.prisma file.` - } - }); - } - }); - this.child.on("error", (err) => { - this.setError({ - timestamp: new Date(), - target: "binary engine process error", - level: "error", - fields: { - message: `Couldn't start query engine: ${err}` - } - }); - reject(err); - }); - this.child.on("close", (code, signal) => { - this.connection.close(); - let toEmit; - if (code === null && signal === "SIGABRT" && this.child) { - toEmit = new PrismaClientRustPanicError( - this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"), - this.clientVersion - ); - } else if (code === 255 && signal === null && this.lastError) { - toEmit = this.lastError; - } - if (toEmit) { - this.logEmitter.emit("error", { - message: toEmit.message, - timestamp: new Date(), - target: "binary engine process close" - }); - } - }); - if (this.lastError) { - return reject(new PrismaClientInitializationError(getMessage(this.lastError), this.clientVersion)); - } - try { - await new Promise((resolve2, reject2) => { - this.engineStartDeferred = { resolve: resolve2, reject: reject2 }; - }); - } catch (err) { - (_c = this.child) == null ? void 0 : _c.kill(); - throw err; - } - void (async () => { - try { - const engineVersion = await this.version(true); - debug5(`Client Version: ${this.clientVersion}`); - debug5(`Engine Version: ${engineVersion}`); - debug5(`Active provider: ${this.activeProvider}`); - } catch (e2) { - debug5(e2); - } - })(); - this.stopPromise = void 0; - resolve(); - } catch (e2) { - reject(e2); - } - }); - } - async stop() { - const stopFn = /* @__PURE__ */ __name(async () => { - if (!this.stopPromise) { - this.stopPromise = this._stop(); - } - return this.stopPromise; - }, "stopFn"); - const spanOptions = { - name: "disconnect", - enabled: this.tracingConfig.enabled - }; - return runInChildSpan(spanOptions, stopFn); - } - async _stop() { - if (this.startPromise) { - await this.startPromise; - } - await new Promise((resolve) => process.nextTick(resolve)); - if (this.currentRequestPromise) { - try { - await this.currentRequestPromise; - } catch (e2) { - } - } - this.getConfigPromise = void 0; - let stopChildPromise; - if (this.child) { - debug5(`Stopping Prisma engine`); - if (this.startPromise) { - debug5(`Waiting for start promise`); - await this.startPromise; - } - debug5(`Done waiting for start promise`); - if (this.child.exitCode === null) { - stopChildPromise = new Promise((resolve, reject) => { - this.engineStopDeferred = { resolve, reject }; - }); - } else { - debug5("Child already exited with code", this.child.exitCode); - } - this.connection.close(); - this.child.kill(); - this.child = void 0; - } - if (stopChildPromise) { - await stopChildPromise; - } - await new Promise((r2) => process.nextTick(r2)); - this.startPromise = void 0; - this.engineStopDeferred = void 0; - } - kill(signal) { - var _a3; - this.getConfigPromise = void 0; - this.globalKillSignalReceived = signal; - (_a3 = this.child) == null ? void 0 : _a3.kill(); - this.connection.close(); - } - getFreePort() { - return new Promise((resolve, reject) => { - const server = import_net.default.createServer((s) => s.end("")); - server.unref(); - server.on("error", reject); - server.listen(0, () => { - const address = server.address(); - const port = typeof address === "string" ? parseInt(address.split(":").slice(-1)[0], 10) : address.port; - server.close((e2) => { - if (e2) { - reject(e2); - } - resolve(port); - }); - }); - }); - } - async getConfig() { - if (!this.getConfigPromise) { - this.getConfigPromise = this._getConfig(); - } - return this.getConfigPromise; - } - async _getConfig() { - const prismaPath = await this.getPrismaPath(); - const env2 = await this.getEngineEnvVars(); - const result = await (0, import_execa.default)(prismaPath, ["cli", "get-config"], { - env: omit(env2, ["PORT"]), - cwd: this.cwd - }); - return JSON.parse(result.stdout); - } - async getDmmf() { - if (!this.getDmmfPromise) { - this.getDmmfPromise = this._getDmmf(); - } - return this.getDmmfPromise; - } - async _getDmmf() { - const prismaPath = await this.getPrismaPath(); - const env2 = await this.getEngineEnvVars(); - const result = await (0, import_execa.default)(prismaPath, ["--enable-raw-queries", "cli", "dmmf"], { - env: omit(env2, ["PORT"]), - cwd: this.cwd - }); - return JSON.parse(result.stdout); - } - async version(forceRun = false) { - if (this.versionPromise && !forceRun) { - return this.versionPromise; - } - this.versionPromise = this.internalVersion(); - return this.versionPromise; - } - async internalVersion() { - const prismaPath = await this.getPrismaPath(); - const result = await (0, import_execa.default)(prismaPath, ["--version"]); - this.lastVersion = result.stdout; - return this.lastVersion; - } - async request({ - query: query2, - headers = {}, - numTry = 1, - isWrite, - transaction - }) { - await this.start(); - this.currentRequestPromise = this.connection.post("/", stringifyQuery(query2), runtimeHeadersToHttpHeaders(headers)); - this.lastQuery = query2; - try { - const { data, headers: headers2 } = await this.currentRequestPromise; - if (data.errors) { - if (data.errors.length === 1) { - throw prismaGraphQLToJSError(data.errors[0], this.clientVersion); - } - throw new PrismaClientUnknownRequestError(JSON.stringify(data.errors), { clientVersion: this.clientVersion }); - } - const elapsed = parseInt(headers2["x-elapsed"]) / 1e3; - if (this.startCount > 0) { - this.startCount = 0; - } - this.currentRequestPromise = void 0; - return { data, elapsed }; - } catch (e2) { - logger("req - e", e2); - const { error: error2, shouldRetry } = await this.handleRequestError(e2); - if (numTry <= MAX_REQUEST_RETRIES && shouldRetry && !isWrite) { - logger("trying a retry now"); - return this.request({ query: query2, headers, numTry: numTry + 1, isWrite, transaction }); - } - throw error2; - } - } - async requestBatch({ - queries, - headers = {}, - transaction, - numTry = 1, - containsWrite - }) { - await this.start(); - const request2 = { - batch: queries.map((query2) => ({ query: query2, variables: {} })), - transaction: Boolean(transaction), - isolationLevel: transaction == null ? void 0 : transaction.isolationLevel - }; - this.lastQuery = JSON.stringify(request2); - this.currentRequestPromise = this.connection.post("/", this.lastQuery, runtimeHeadersToHttpHeaders(headers)); - return this.currentRequestPromise.then(({ data, headers: headers2 }) => { - const elapsed = parseInt(headers2["x-elapsed"]) / 1e3; - const { batchResult, errors } = data; - if (Array.isArray(batchResult)) { - return batchResult.map((result) => { - if (result.errors && result.errors.length > 0) { - return prismaGraphQLToJSError(result.errors[0], this.clientVersion); - } - return { - data: result, - elapsed - }; - }); - } else { - throw prismaGraphQLToJSError(data.errors[0], this.clientVersion); - } - }).catch(async (e2) => { - const { error: error2, shouldRetry } = await this.handleRequestError(e2); - if (shouldRetry && !containsWrite) { - if (numTry <= MAX_REQUEST_RETRIES) { - return this.requestBatch({ - queries, - headers, - transaction, - numTry: numTry + 1, - containsWrite - }); - } - } - throw error2; - }); - } - async transaction(action, headers, arg2) { - var _a3, _b2; - await this.start(); - if (action === "start") { - const jsonOptions = JSON.stringify({ - max_wait: (_a3 = arg2 == null ? void 0 : arg2.maxWait) != null ? _a3 : 2e3, - timeout: (_b2 = arg2 == null ? void 0 : arg2.timeout) != null ? _b2 : 5e3, - isolation_level: arg2 == null ? void 0 : arg2.isolationLevel - }); - const result = await Connection.onHttpError( - this.connection.post( - "/transaction/start", - jsonOptions, - runtimeHeadersToHttpHeaders(headers) - ), - (result2) => this.transactionHttpErrorHandler(result2) - ); - return result.data; - } else if (action === "commit") { - await Connection.onHttpError( - this.connection.post(`/transaction/${arg2.id}/commit`), - (result) => this.transactionHttpErrorHandler(result) - ); - } else if (action === "rollback") { - await Connection.onHttpError( - this.connection.post(`/transaction/${arg2.id}/rollback`), - (result) => this.transactionHttpErrorHandler(result) - ); - } - return void 0; - } - get hasMaxRestarts() { - return this.startCount >= MAX_STARTS; - } - throwAsyncErrorIfExists(forceThrow = false) { - logger("throwAsyncErrorIfExists", this.startCount, this.hasMaxRestarts); - if (this.lastError && (this.hasMaxRestarts || forceThrow)) { - const lastError = this.lastError; - this.lastError = void 0; - if (lastError.isPanic()) { - throw new PrismaClientRustPanicError(this.getErrorMessageWithLink(getMessage(lastError)), this.clientVersion); - } else { - throw new PrismaClientUnknownRequestError(this.getErrorMessageWithLink(getMessage(lastError)), { - clientVersion: this.clientVersion - }); - } - } - } - getErrorMessageWithLink(title) { - return getErrorMessageWithLink({ - platform: this.platform, - title, - version: this.clientVersion, - engineVersion: this.lastVersion, - database: this.lastActiveProvider, - query: this.lastQuery - }); - } - async metrics({ format: format2, globalLabels }) { - await this.start(); - const parseResponse = format2 === "json"; - const response = await this.connection.post( - `/metrics?format=${encodeURIComponent(format2)}`, - JSON.stringify(globalLabels), - null, - parseResponse - ); - return response.data; - } - transactionHttpErrorHandler(result) { - const response = result.data; - throw new PrismaClientKnownRequestError(response.message, { - code: response.error_code, - clientVersion: this.clientVersion, - meta: response.meta - }); - } -}; -__name(BinaryEngine, "BinaryEngine"); -function stringifyQuery(q) { - return `{"variables":{},"query":${JSON.stringify(q)}}`; -} -__name(stringifyQuery, "stringifyQuery"); -function runtimeHeadersToHttpHeaders(headers) { - if (headers.transactionId) { - const { transactionId, ...httpHeaders } = headers; - httpHeaders["X-transaction-id"] = transactionId; - return httpHeaders; - } - return headers; -} -__name(runtimeHeadersToHttpHeaders, "runtimeHeadersToHttpHeaders"); -function hookProcess(handler, exit = false) { - process.once(handler, async () => { - for (const engine of engines) { - await engine.emitExit(); - engine.kill(handler); - } - engines.splice(0, engines.length); - if (socketPaths.length > 0) { - for (const socketPath of socketPaths) { - try { - import_fs5.default.unlinkSync(socketPath); - } catch (e2) { - } - } - } - if (exit && process.listenerCount(handler) === 0) { - process.exit(); - } - }); -} -__name(hookProcess, "hookProcess"); -var hooksInitialized = false; -function initHooks() { - if (!hooksInitialized) { - hookProcess("beforeExit"); - hookProcess("exit"); - hookProcess("SIGINT", true); - hookProcess("SIGUSR2", true); - hookProcess("SIGTERM", true); - hooksInitialized = true; - } -} -__name(initHooks, "initHooks"); -function killProcessAndWait(childProcess) { - return new Promise((resolve) => { - childProcess.once("exit", resolve); - childProcess.kill(); - }); -} -__name(killProcessAndWait, "killProcessAndWait"); - -// ../engine-core/src/common/errors/ErrorWithBatchIndex.ts -function hasBatchIndex(value) { - return typeof value["batchRequestIdx"] === "number"; -} -__name(hasBatchIndex, "hasBatchIndex"); - -// ../engine-core/src/common/errors/PrismaClientError.ts -var PrismaClientError = class extends Error { - constructor(message, info2) { - super(message); - this.clientVersion = info2.clientVersion; - this.cause = info2.cause; - } - get [Symbol.toStringTag]() { - return this.name; - } -}; -__name(PrismaClientError, "PrismaClientError"); - -// ../engine-core/src/data-proxy/errors/DataProxyError.ts -var DataProxyError = class extends PrismaClientError { - constructor(message, info2) { - var _a3; - super(message, info2); - this.isRetryable = (_a3 = info2.isRetryable) != null ? _a3 : true; - } -}; -__name(DataProxyError, "DataProxyError"); - -// ../engine-core/src/data-proxy/errors/utils/setRetryable.ts -function setRetryable(info2, retryable) { - return { - ...info2, - isRetryable: retryable - }; -} -__name(setRetryable, "setRetryable"); - -// ../engine-core/src/data-proxy/errors/ForcedRetryError.ts -var ForcedRetryError = class extends DataProxyError { - constructor(info2) { - super("This request must be retried", setRetryable(info2, true)); - this.name = "ForcedRetryError"; - this.code = "P5001"; - } -}; -__name(ForcedRetryError, "ForcedRetryError"); - -// ../engine-core/src/data-proxy/errors/InvalidDatasourceError.ts -var InvalidDatasourceError = class extends DataProxyError { - constructor(message, info2) { - super(message, setRetryable(info2, false)); - this.name = "InvalidDatasourceError"; - this.code = "P5002"; - } -}; -__name(InvalidDatasourceError, "InvalidDatasourceError"); - -// ../engine-core/src/data-proxy/errors/NotImplementedYetError.ts -var NotImplementedYetError = class extends DataProxyError { - constructor(message, info2) { - super(message, setRetryable(info2, false)); - this.name = "NotImplementedYetError"; - this.code = "P5004"; - } -}; -__name(NotImplementedYetError, "NotImplementedYetError"); - -// ../engine-core/src/data-proxy/errors/DataProxyAPIError.ts -var DataProxyAPIError = class extends DataProxyError { - constructor(message, info2) { - var _a3; - super(message, info2); - this.response = info2.response; - const requestId = (_a3 = this.response.headers) == null ? void 0 : _a3["Prisma-Request-Id"]; - if (requestId) { - const messageSuffix = `(The request id was: ${requestId})`; - this.message = this.message + " " + messageSuffix; - } - } -}; -__name(DataProxyAPIError, "DataProxyAPIError"); - -// ../engine-core/src/data-proxy/errors/SchemaMissingError.ts -var SchemaMissingError = class extends DataProxyAPIError { - constructor(info2) { - super("Schema needs to be uploaded", setRetryable(info2, true)); - this.name = "SchemaMissingError"; - this.code = "P5005"; - } -}; -__name(SchemaMissingError, "SchemaMissingError"); - -// ../engine-core/src/data-proxy/errors/BadRequestError.ts -var BAD_REQUEST_DEFAULT_MESSAGE = "This request could not be understood by the server"; -var BadRequestError = class extends DataProxyAPIError { - constructor(info2, message, code) { - super(message || BAD_REQUEST_DEFAULT_MESSAGE, setRetryable(info2, false)); - this.name = "BadRequestError"; - this.code = "P5000"; - if (code) - this.code = code; - } -}; -__name(BadRequestError, "BadRequestError"); - -// ../engine-core/src/data-proxy/errors/EngineHealthcheckTimeoutError.ts -var HealthcheckTimeoutError = class extends DataProxyAPIError { - constructor(info2, logs) { - super("Engine not started: healthcheck timeout", setRetryable(info2, true)); - this.name = "HealthcheckTimeoutError"; - this.code = "P5013"; - this.logs = logs; - } -}; -__name(HealthcheckTimeoutError, "HealthcheckTimeoutError"); - -// ../engine-core/src/data-proxy/errors/EngineStartupError.ts -var EngineStartupError = class extends DataProxyAPIError { - constructor(info2, message, logs) { - super(message, setRetryable(info2, true)); - this.name = "EngineStartupError"; - this.code = "P5014"; - this.logs = logs; - } -}; -__name(EngineStartupError, "EngineStartupError"); - -// ../engine-core/src/data-proxy/errors/EngineVersionNotSupportedError.ts -var EngineVersionNotSupportedError = class extends DataProxyAPIError { - constructor(info2) { - super("Engine version is not supported", setRetryable(info2, false)); - this.name = "EngineVersionNotSupportedError"; - this.code = "P5012"; - } -}; -__name(EngineVersionNotSupportedError, "EngineVersionNotSupportedError"); - -// ../engine-core/src/data-proxy/errors/GatewayTimeoutError.ts -var GATEWAY_TIMEOUT_DEFAULT_MESSAGE = "Request timed out"; -var GatewayTimeoutError = class extends DataProxyAPIError { - constructor(info2, message = GATEWAY_TIMEOUT_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, false)); - this.name = "GatewayTimeoutError"; - this.code = "P5009"; - } -}; -__name(GatewayTimeoutError, "GatewayTimeoutError"); - -// ../engine-core/src/data-proxy/errors/InteractiveTransactionError.ts -var INTERACTIVE_TRANSACTION_ERROR_DEFAULT_MESSAGE = "Interactive transaction error"; -var InteractiveTransactionError = class extends DataProxyAPIError { - constructor(info2, message = INTERACTIVE_TRANSACTION_ERROR_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, false)); - this.name = "InteractiveTransactionError"; - this.code = "P5015"; - } -}; -__name(InteractiveTransactionError, "InteractiveTransactionError"); - -// ../engine-core/src/data-proxy/errors/InvalidRequestError.ts -var INVALID_REQUEST_DEFAULT_MESSAGE = "Request parameters are invalid"; -var InvalidRequestError = class extends DataProxyAPIError { - constructor(info2, message = INVALID_REQUEST_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, false)); - this.name = "InvalidRequestError"; - this.code = "P5011"; - } -}; -__name(InvalidRequestError, "InvalidRequestError"); - -// ../engine-core/src/data-proxy/errors/NotFoundError.ts -var NOT_FOUND_DEFAULT_MESSAGE = "Requested resource does not exist"; -var NotFoundError = class extends DataProxyAPIError { - constructor(info2, message = NOT_FOUND_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, false)); - this.name = "NotFoundError"; - this.code = "P5003"; - } -}; -__name(NotFoundError, "NotFoundError"); - -// ../engine-core/src/data-proxy/errors/ServerError.ts -var SERVER_ERROR_DEFAULT_MESSAGE = "Unknown server error"; -var ServerError = class extends DataProxyAPIError { - constructor(info2, message, logs) { - super(message || SERVER_ERROR_DEFAULT_MESSAGE, setRetryable(info2, true)); - this.name = "ServerError"; - this.code = "P5006"; - this.logs = logs; - } -}; -__name(ServerError, "ServerError"); - -// ../engine-core/src/data-proxy/errors/UnauthorizedError.ts -var UNAUTHORIZED_DEFAULT_MESSAGE = "Unauthorized, check your connection string"; -var UnauthorizedError = class extends DataProxyAPIError { - constructor(info2, message = UNAUTHORIZED_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, false)); - this.name = "UnauthorizedError"; - this.code = "P5007"; - } -}; -__name(UnauthorizedError, "UnauthorizedError"); - -// ../engine-core/src/data-proxy/errors/UsageExceededError.ts -var USAGE_EXCEEDED_DEFAULT_MESSAGE = "Usage exceeded, retry again later"; -var UsageExceededError = class extends DataProxyAPIError { - constructor(info2, message = USAGE_EXCEEDED_DEFAULT_MESSAGE) { - super(message, setRetryable(info2, true)); - this.name = "UsageExceededError"; - this.code = "P5008"; - } -}; -__name(UsageExceededError, "UsageExceededError"); - -// ../engine-core/src/data-proxy/errors/utils/responseToError.ts -async function getResponseErrorBody(response) { - let text; - try { - text = await response.text(); - } catch (e2) { - return { type: "EmptyError" }; - } - try { - const error2 = JSON.parse(text); - if (typeof error2 === "string") { - switch (error2) { - case "InternalDataProxyError": - return { type: "DataProxyError", body: error2 }; - default: - return { type: "UnknownTextError", body: error2 }; - } - } - if (typeof error2 === "object" && error2 !== null) { - if ("is_panic" in error2 && "message" in error2 && "error_code" in error2) { - return { type: "QueryEngineError", body: error2 }; - } - if ("EngineNotStarted" in error2 || "InteractiveTransactionMisrouted" in error2 || "InvalidRequestError" in error2) { - const reason = Object.values(error2)[0].reason; - if (typeof reason === "string" && !["SchemaMissing", "EngineVersionNotSupported"].includes(reason)) { - return { type: "UnknownJsonError", body: error2 }; - } - return { type: "DataProxyError", body: error2 }; - } - } - return { type: "UnknownJsonError", body: error2 }; - } catch (e2) { - return text === "" ? { type: "EmptyError" } : { type: "UnknownTextError", body: text }; - } -} -__name(getResponseErrorBody, "getResponseErrorBody"); -async function responseToError(response, clientVersion2) { - if (response.ok) - return void 0; - const info2 = { clientVersion: clientVersion2, response }; - const error2 = await getResponseErrorBody(response); - if (error2.type === "QueryEngineError") { - throw new PrismaClientKnownRequestError(error2.body.message, { code: error2.body.error_code, clientVersion: clientVersion2 }); - } - if (error2.type === "DataProxyError") { - if (error2.body === "InternalDataProxyError") { - throw new ServerError(info2, "Internal Data Proxy error"); - } - if ("EngineNotStarted" in error2.body) { - if (error2.body.EngineNotStarted.reason === "SchemaMissing") { - return new SchemaMissingError(info2); - } - if (error2.body.EngineNotStarted.reason === "EngineVersionNotSupported") { - throw new EngineVersionNotSupportedError(info2); - } - if ("EngineStartupError" in error2.body.EngineNotStarted.reason) { - const { msg, logs } = error2.body.EngineNotStarted.reason.EngineStartupError; - throw new EngineStartupError(info2, msg, logs); - } - if ("KnownEngineStartupError" in error2.body.EngineNotStarted.reason) { - const { msg, error_code } = error2.body.EngineNotStarted.reason.KnownEngineStartupError; - throw new PrismaClientInitializationError(msg, clientVersion2, error_code); - } - if ("HealthcheckTimeout" in error2.body.EngineNotStarted.reason) { - const { logs } = error2.body.EngineNotStarted.reason.HealthcheckTimeout; - throw new HealthcheckTimeoutError(info2, logs); - } - } - if ("InteractiveTransactionMisrouted" in error2.body) { - const messageByReason = { - 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 InteractiveTransactionError(info2, messageByReason[error2.body.InteractiveTransactionMisrouted.reason]); - } - if ("InvalidRequestError" in error2.body) { - throw new InvalidRequestError(info2, error2.body.InvalidRequestError.reason); - } - } - if (response.status === 401 || response.status === 403) { - throw new UnauthorizedError(info2, buildErrorMessage(UNAUTHORIZED_DEFAULT_MESSAGE, error2)); - } - if (response.status === 404) { - return new NotFoundError(info2, buildErrorMessage(NOT_FOUND_DEFAULT_MESSAGE, error2)); - } - if (response.status === 429) { - throw new UsageExceededError(info2, buildErrorMessage(USAGE_EXCEEDED_DEFAULT_MESSAGE, error2)); - } - if (response.status === 504) { - throw new GatewayTimeoutError(info2, buildErrorMessage(GATEWAY_TIMEOUT_DEFAULT_MESSAGE, error2)); - } - if (response.status >= 500) { - throw new ServerError(info2, buildErrorMessage(SERVER_ERROR_DEFAULT_MESSAGE, error2)); - } - if (response.status >= 400) { - throw new BadRequestError(info2, buildErrorMessage(BAD_REQUEST_DEFAULT_MESSAGE, error2)); - } - return void 0; -} -__name(responseToError, "responseToError"); -function buildErrorMessage(defaultMessage, errorBody) { - if (errorBody.type === "EmptyError") { - return defaultMessage; - } - return `${defaultMessage}: ${JSON.stringify(errorBody)}`; -} -__name(buildErrorMessage, "buildErrorMessage"); - -// ../engine-core/src/data-proxy/utils/backOff.ts -var BACKOFF_INTERVAL = 50; -function backOff(n2) { - const baseDelay = Math.pow(2, n2) * BACKOFF_INTERVAL; - const jitter = Math.ceil(Math.random() * baseDelay) - Math.ceil(baseDelay / 2); - const total = baseDelay + jitter; - return new Promise((done) => setTimeout(() => done(total), total)); -} -__name(backOff, "backOff"); - -// ../engines/package.json -var devDependencies = { - "@prisma/debug": "workspace:*", - "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", - "@prisma/fetch-engine": "workspace:*", - "@prisma/get-platform": "workspace:*", - "@swc/core": "1.3.14", - "@swc/jest": "0.2.23", - "@types/jest": "29.2.4", - "@types/node": "16.18.9", - execa: "5.1.1", - jest: "29.3.1", - typescript: "4.8.4" -}; - -// ../engine-core/src/data-proxy/errors/NetworkError.ts -var RequestError = class extends DataProxyError { - constructor(message, info2) { - super(`Cannot fetch data from service: -${message}`, setRetryable(info2, true)); - this.name = "RequestError"; - this.code = "P5010"; - } -}; -__name(RequestError, "RequestError"); - -// ../engine-core/src/data-proxy/utils/getJSRuntimeName.ts -function getJSRuntimeName() { - if (typeof self === "undefined") { - return "node"; - } - return "browser"; -} -__name(getJSRuntimeName, "getJSRuntimeName"); - -// ../engine-core/src/data-proxy/utils/request.ts -async function request(url, options) { - var _a3; - const clientVersion2 = options.clientVersion; - const jsRuntimeName = getJSRuntimeName(); - try { - if (jsRuntimeName === "browser") { - return await fetch(url, options); - } else { - return await nodeFetch(url, options); - } - } catch (e2) { - const message = (_a3 = e2.message) != null ? _a3 : "Unknown error"; - throw new RequestError(message, { clientVersion: clientVersion2 }); - } -} -__name(request, "request"); -function buildHeaders(options) { - return { - ...options.headers, - "Content-Type": "application/json" - }; -} -__name(buildHeaders, "buildHeaders"); -function buildOptions(options) { - return { - method: options.method, - headers: buildHeaders(options) - }; -} -__name(buildOptions, "buildOptions"); -function buildResponse(incomingData, response) { - return { - text: () => Buffer.concat(incomingData).toString(), - json: () => JSON.parse(Buffer.concat(incomingData).toString()), - ok: response.statusCode >= 200 && response.statusCode <= 299, - status: response.statusCode, - url: response.url, - headers: response.headers - }; -} -__name(buildResponse, "buildResponse"); -async function nodeFetch(url, options = {}) { - const https = include("https"); - const httpsOptions = buildOptions(options); - const incomingData = []; - const { origin } = new URL(url); - return new Promise((resolve, reject) => { - var _a3; - const request2 = https.request(url, httpsOptions, (response) => { - const { statusCode, headers: { location } } = response; - if (statusCode >= 301 && statusCode <= 399 && location) { - if (location.startsWith("http") === false) { - resolve(nodeFetch(`${origin}${location}`, options)); - } else { - resolve(nodeFetch(location, options)); - } - } - response.on("data", (chunk) => incomingData.push(chunk)); - response.on("end", () => resolve(buildResponse(incomingData, response))); - response.on("error", reject); - }); - request2.on("error", reject); - request2.end((_a3 = options.body) != null ? _a3 : ""); - }); -} -__name(nodeFetch, "nodeFetch"); -var include = typeof require !== "undefined" ? require : () => { -}; - -// ../engine-core/src/data-proxy/utils/getClientVersion.ts -var semverRegex = /^[1-9][0-9]*\.[0-9]+\.[0-9]+$/; -var debug6 = src_default("prisma:client:dataproxyEngine"); -async function _getClientVersion(config2) { - var _a3, _b2, _c; - const engineVersion = devDependencies["@prisma/engines-version"]; - const clientVersion2 = (_a3 = config2.clientVersion) != null ? _a3 : "unknown"; - if (process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION) { - return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION; - } - const [version, suffix] = (_b2 = clientVersion2 == null ? void 0 : clientVersion2.split("-")) != null ? _b2 : []; - if (suffix === void 0 && semverRegex.test(version)) { - return version; - } - if (suffix !== void 0 || clientVersion2 === "0.0.0") { - const [version2] = (_c = engineVersion.split("-")) != null ? _c : []; - const [major2, minor, patch] = version2.split("."); - const pkgURL = prismaPkgURL(`<=${major2}.${minor}.${patch}`); - const res = await request(pkgURL, { clientVersion: clientVersion2 }); - if (!res.ok) { - throw new Error( - `Failed to fetch stable Prisma version, unpkg.com status ${res.status} ${res.statusText}, response body: ${await res.text() || ""}` - ); - } - const bodyAsText = await res.text(); - debug6("length of body fetched from unpkg.com", bodyAsText.length); - let bodyAsJson; - try { - bodyAsJson = JSON.parse(bodyAsText); - } catch (e2) { - console.error("JSON.parse error: body fetched from unpkg.com: ", bodyAsText); - throw e2; - } - return bodyAsJson["version"]; - } - throw new NotImplementedYetError("Only `major.minor.patch` versions are supported by Prisma Data Proxy.", { - clientVersion: clientVersion2 - }); -} -__name(_getClientVersion, "_getClientVersion"); -async function getClientVersion(config2) { - const version = await _getClientVersion(config2); - debug6("version", version); - return version; -} -__name(getClientVersion, "getClientVersion"); -function prismaPkgURL(version) { - return encodeURI(`https://unpkg.com/prisma@${version}/package.json`); -} -__name(prismaPkgURL, "prismaPkgURL"); - -// ../engine-core/src/data-proxy/DataProxyEngine.ts -var MAX_RETRIES = 10; -var P = Promise.resolve(); -var debug7 = src_default("prisma:client:dataproxyEngine"); -var DataProxyEngine = class extends Engine { - constructor(config2) { - var _a3, _b2, _c, _d; - super(); - this.config = config2; - this.env = { ...this.config.env, ...process.env }; - this.inlineSchema = (_a3 = config2.inlineSchema) != null ? _a3 : ""; - this.inlineDatasources = (_b2 = config2.inlineDatasources) != null ? _b2 : {}; - this.inlineSchemaHash = (_c = config2.inlineSchemaHash) != null ? _c : ""; - this.clientVersion = (_d = config2.clientVersion) != null ? _d : "unknown"; - this.logEmitter = config2.logEmitter; - const [host, apiKey] = this.extractHostAndApiKey(); - this.remoteClientVersion = P.then(() => getClientVersion(this.config)); - this.headers = { Authorization: `Bearer ${apiKey}` }; - this.host = host; - debug7("host", this.host); - } - version() { - return "unknown"; - } - async start() { - } - async stop() { - } - on(event, listener) { - if (event === "beforeExit") { - throw new NotImplementedYetError("beforeExit event is not yet supported", { - clientVersion: this.clientVersion - }); - } else { - this.logEmitter.on(event, listener); - } - } - async url(s) { - return `https://${this.host}/${await this.remoteClientVersion}/${this.inlineSchemaHash}/${s}`; - } - async getConfig() { - return Promise.resolve({ - datasources: [ - { - activeProvider: this.config.activeProvider - } - ] - }); - } - getDmmf() { - throw new NotImplementedYetError("getDmmf is not yet supported", { - clientVersion: this.clientVersion - }); - } - async uploadSchema() { - const response = await request(await this.url("schema"), { - method: "PUT", - headers: this.headers, - body: this.inlineSchema, - clientVersion: this.clientVersion - }); - if (!response.ok) { - debug7("schema response status", response.status); - } - const err = await responseToError(response, this.clientVersion); - if (err) { - this.logEmitter.emit("warn", { message: `Error while uploading schema: ${err.message}` }); - throw err; - } else { - this.logEmitter.emit("info", { - message: `Schema (re)uploaded (hash: ${this.inlineSchemaHash})` - }); - } - } - request({ query: query2, headers = {}, transaction }) { - this.logEmitter.emit("query", { query: query2 }); - return this.requestInternal({ query: query2, variables: {} }, headers, transaction); - } - async requestBatch({ - queries, - headers = {}, - transaction - }) { - const isTransaction = Boolean(transaction); - this.logEmitter.emit("query", { - query: `Batch${isTransaction ? " in transaction" : ""} (${queries.length}): -${queries.join("\n")}` - }); - const body = { - batch: queries.map((query2) => ({ query: query2, variables: {} })), - transaction: isTransaction, - isolationLevel: transaction == null ? void 0 : transaction.isolationLevel - }; - const { batchResult, elapsed } = await this.requestInternal(body, headers); - return batchResult.map((result) => { - if ("errors" in result && result.errors.length > 0) { - return prismaGraphQLToJSError(result.errors[0], this.clientVersion); - } - return { - data: result, - elapsed - }; - }); - } - requestInternal(body, headers, itx) { - return this.withRetry({ - actionGerund: "querying", - callback: async ({ logHttpCall }) => { - const url = itx ? `${itx.payload.endpoint}/graphql` : await this.url("graphql"); - logHttpCall(url); - const response = await request(url, { - method: "POST", - headers: { ...runtimeHeadersToHttpHeaders2(headers), ...this.headers }, - body: JSON.stringify(body), - clientVersion: this.clientVersion - }); - if (!response.ok) { - debug7("graphql response status", response.status); - } - const e2 = await responseToError(response, this.clientVersion); - await this.handleError(e2); - const data = await response.json(); - if (data.errors) { - if (data.errors.length === 1) { - throw prismaGraphQLToJSError(data.errors[0], this.config.clientVersion); - } else { - throw new PrismaClientUnknownRequestError(data.errors, { clientVersion: this.config.clientVersion }); - } - } - return data; - } - }); - } - async transaction(action, headers, arg2) { - const actionToGerund = { - start: "starting", - commit: "committing", - rollback: "rolling back" - }; - return this.withRetry({ - actionGerund: `${actionToGerund[action]} transaction`, - callback: async ({ logHttpCall }) => { - var _a3, _b2; - if (action === "start") { - const body = JSON.stringify({ - max_wait: (_a3 = arg2 == null ? void 0 : arg2.maxWait) != null ? _a3 : 2e3, - timeout: (_b2 = arg2 == null ? void 0 : arg2.timeout) != null ? _b2 : 5e3, - isolation_level: arg2 == null ? void 0 : arg2.isolationLevel - }); - const url = await this.url("transaction/start"); - logHttpCall(url); - const response = await request(url, { - method: "POST", - headers: { ...runtimeHeadersToHttpHeaders2(headers), ...this.headers }, - body, - clientVersion: this.clientVersion - }); - const err = await responseToError(response, this.clientVersion); - await this.handleError(err); - const json = await response.json(); - const id = json.id; - const endpoint = json["data-proxy"].endpoint; - return { id, payload: { endpoint } }; - } else { - const url = `${arg2.payload.endpoint}/${action}`; - logHttpCall(url); - const response = await request(url, { - method: "POST", - headers: { ...runtimeHeadersToHttpHeaders2(headers), ...this.headers }, - clientVersion: this.clientVersion - }); - const err = await responseToError(response, this.clientVersion); - await this.handleError(err); - return void 0; - } - } - }); - } - extractHostAndApiKey() { - const datasources = this.mergeOverriddenDatasources(); - const mainDatasourceName = Object.keys(datasources)[0]; - const mainDatasource = datasources[mainDatasourceName]; - const dataProxyURL = this.resolveDatasourceURL(mainDatasourceName, mainDatasource); - let url; - try { - url = new URL(dataProxyURL); - } catch (e2) { - throw new InvalidDatasourceError("Could not parse URL of the datasource", { - clientVersion: this.clientVersion - }); - } - const { protocol, host, searchParams } = url; - if (protocol !== "prisma:") { - throw new InvalidDatasourceError("Datasource URL must use prisma:// protocol when --data-proxy is used", { - clientVersion: this.clientVersion - }); - } - const apiKey = searchParams.get("api_key"); - if (apiKey === null || apiKey.length < 1) { - throw new InvalidDatasourceError("No valid API key found in the datasource URL", { - clientVersion: this.clientVersion - }); - } - return [host, apiKey]; - } - mergeOverriddenDatasources() { - if (this.config.datasources === void 0) { - return this.inlineDatasources; - } - const finalDatasources = { ...this.inlineDatasources }; - for (const override of this.config.datasources) { - if (!this.inlineDatasources[override.name]) { - throw new Error(`Unknown datasource: ${override.name}`); - } - finalDatasources[override.name] = { - url: { - fromEnvVar: null, - value: override.url - } - }; - } - return finalDatasources; - } - resolveDatasourceURL(name, datasource) { - if (datasource.url.value) { - return datasource.url.value; - } - if (datasource.url.fromEnvVar) { - const envVar = datasource.url.fromEnvVar; - const loadedEnvURL = this.env[envVar]; - if (loadedEnvURL === void 0) { - throw new InvalidDatasourceError( - `Datasource "${name}" references an environment variable "${envVar}" that is not set`, - { - clientVersion: this.clientVersion - } - ); - } - return loadedEnvURL; - } - throw new InvalidDatasourceError( - `Datasource "${name}" specification is invalid: both value and fromEnvVar are null`, - { - clientVersion: this.clientVersion - } - ); - } - metrics(options) { - throw new NotImplementedYetError("Metric are not yet supported for Data Proxy", { - clientVersion: this.clientVersion - }); - } - async withRetry(args) { - var _a3; - for (let attempt = 0; ; attempt++) { - const logHttpCall = /* @__PURE__ */ __name((url) => { - this.logEmitter.emit("info", { - message: `Calling ${url} (n=${attempt})` - }); - }, "logHttpCall"); - try { - return await args.callback({ logHttpCall }); - } catch (e2) { - if (!(e2 instanceof DataProxyError)) - throw e2; - if (!e2.isRetryable) - throw e2; - if (attempt >= MAX_RETRIES) { - if (e2 instanceof ForcedRetryError) { - throw e2.cause; - } else { - throw e2; - } - } - this.logEmitter.emit("warn", { - message: `Attempt ${attempt + 1}/${MAX_RETRIES} failed for ${args.actionGerund}: ${(_a3 = e2.message) != null ? _a3 : "(unknown)"}` - }); - const delay = await backOff(attempt); - this.logEmitter.emit("warn", { message: `Retrying after ${delay}ms` }); - } - } - } - async handleError(error2) { - if (error2 instanceof SchemaMissingError) { - await this.uploadSchema(); - throw new ForcedRetryError({ - clientVersion: this.clientVersion, - cause: error2 - }); - } else if (error2) { - throw error2; - } - } -}; -__name(DataProxyEngine, "DataProxyEngine"); -function runtimeHeadersToHttpHeaders2(headers) { - if (headers.transactionId) { - const httpHeaders = { ...headers }; - delete httpHeaders.transactionId; - return httpHeaders; - } - return headers; -} -__name(runtimeHeadersToHttpHeaders2, "runtimeHeadersToHttpHeaders"); - -// ../engine-core/src/library/LibraryEngine.ts -var import_chalk5 = __toESM(require_source()); -var import_fs7 = __toESM(require("fs")); - -// ../engine-core/src/library/DefaultLibraryLoader.ts -var import_chalk4 = __toESM(require_source()); -var import_fs6 = __toESM(require("fs")); -var import_path4 = __toESM(require("path")); -var debug8 = src_default("prisma:client:libraryEngine:loader"); -var DefaultLibraryLoader = class { - constructor(config2) { - this.libQueryEnginePath = null; - this.platform = null; - this.config = config2; - } - async loadLibrary() { - if (!this.libQueryEnginePath) { - this.libQueryEnginePath = await this.getLibQueryEnginePath(); - } - debug8(`loadEngine using ${this.libQueryEnginePath}`); - try { - return eval("require")(this.libQueryEnginePath); - } catch (e2) { - if (import_fs6.default.existsSync(this.libQueryEnginePath)) { - if (this.libQueryEnginePath.endsWith(".node")) { - throw new PrismaClientInitializationError( - `Unable to load Node-API Library from ${import_chalk4.default.dim(this.libQueryEnginePath)}, Library may be corrupt: ${e2.message}`, - this.config.clientVersion - ); - } else { - throw new PrismaClientInitializationError( - `Expected an Node-API Library but received ${import_chalk4.default.dim(this.libQueryEnginePath)}`, - this.config.clientVersion - ); - } - } else { - throw new PrismaClientInitializationError( - `Unable to load Node-API Library from ${import_chalk4.default.dim(this.libQueryEnginePath)}, It does not exist`, - this.config.clientVersion - ); - } - } - } - async getLibQueryEnginePath() { - var _a3, _b2, _c, _d; - const libPath = (_a3 = process.env.PRISMA_QUERY_ENGINE_LIBRARY) != null ? _a3 : this.config.prismaPath; - if (libPath && import_fs6.default.existsSync(libPath) && libPath.endsWith(".node")) { - return libPath; - } - this.platform = (_b2 = this.platform) != null ? _b2 : await getPlatform(); - const { enginePath: enginePath2, searchedLocations: searchedLocations2 } = await this.resolveEnginePath(); - if (!import_fs6.default.existsSync(enginePath2)) { - const incorrectPinnedPlatformErrorStr = this.platform ? ` -You incorrectly pinned it to ${import_chalk4.default.redBright.bold(`${this.platform}`)} -` : ""; - let errorText = `Query engine library for current platform "${import_chalk4.default.bold( - this.platform - )}" could not be found.${incorrectPinnedPlatformErrorStr} -This probably happens, because you built Prisma Client on a different platform. -(Prisma Client looked in "${import_chalk4.default.underline(enginePath2)}") - -Searched Locations: - -${searchedLocations2.map((f2) => { - let msg = ` ${f2}`; - if (process.env.DEBUG === "node-engine-search-locations" && import_fs6.default.existsSync(f2)) { - const dir = import_fs6.default.readdirSync(f2); - msg += dir.map((d2) => ` ${d2}`).join("\n"); - } - return msg; - }).join("\n" + (process.env.DEBUG === "node-engine-search-locations" ? "\n" : ""))} -`; - if (this.config.generator) { - this.platform = (_c = this.platform) != null ? _c : await getPlatform(); - if (this.config.generator.binaryTargets.find((object) => object.value === this.platform) || this.config.generator.binaryTargets.find((object) => object.value === "native")) { - errorText += ` -You already added the platform${this.config.generator.binaryTargets.length > 1 ? "s" : ""} ${this.config.generator.binaryTargets.map((t2) => `"${import_chalk4.default.bold(t2.value)}"`).join(", ")} to the "${import_chalk4.default.underline("generator")}" block -in the "schema.prisma" file as described in https://pris.ly/d/client-generator, -but something went wrong. That's suboptimal. - -Please create an issue at https://github.com/prisma/prisma/issues/new`; - errorText += ``; - } else { - errorText += ` - -To solve this problem, add the platform "${this.platform}" to the "${import_chalk4.default.underline( - "binaryTargets" - )}" attribute in the "${import_chalk4.default.underline("generator")}" block in the "schema.prisma" file: -${import_chalk4.default.greenBright(this.getFixedGenerator())} - -Then run "${import_chalk4.default.greenBright("prisma generate")}" for your changes to take effect. -Read more about deploying Prisma Client: https://pris.ly/d/client-generator`; - } - } else { - errorText += ` - -Read more about deploying Prisma Client: https://pris.ly/d/client-generator -`; - } - throw new PrismaClientInitializationError(errorText, this.config.clientVersion); - } - this.platform = (_d = this.platform) != null ? _d : await getPlatform(); - return enginePath2; - } - async resolveEnginePath() { - var _a3, _b2, _c, _d; - const searchedLocations = []; - let enginePath; - if (this.libQueryEnginePath) { - return { enginePath: this.libQueryEnginePath, searchedLocations }; - } - this.platform = (_a3 = this.platform) != null ? _a3 : await getPlatform(); - if (__filename.includes("DefaultLibraryLoader")) { - enginePath = import_path4.default.join(getEnginesPath(), getNodeAPIName(this.platform, "fs")); - return { enginePath, searchedLocations }; - } - const dirname = eval("__dirname"); - const searchLocations = [ - import_path4.default.resolve(dirname, "../../../.prisma/client"), - (_d = (_c = (_b2 = this.config.generator) == null ? void 0 : _b2.output) == null ? void 0 : _c.value) != null ? _d : dirname, - import_path4.default.resolve(dirname, ".."), - import_path4.default.dirname(this.config.datamodelPath), - this.config.cwd, - "/tmp/prisma-engines" - ]; - if (this.config.dirname) { - searchLocations.push(this.config.dirname); - } - for (const location of searchLocations) { - searchedLocations.push(location); - debug8(`Searching for Query Engine Library in ${location}`); - enginePath = import_path4.default.join(location, getNodeAPIName(this.platform, "fs")); - if (import_fs6.default.existsSync(enginePath)) { - return { enginePath, searchedLocations }; - } - } - enginePath = import_path4.default.join(__dirname, getNodeAPIName(this.platform, "fs")); - return { enginePath: enginePath != null ? enginePath : "", searchedLocations }; - } - getFixedGenerator() { - const fixedGenerator = { - ...this.config.generator, - binaryTargets: fixBinaryTargets(this.config.generator.binaryTargets, this.platform) - }; - return printGeneratorConfig(fixedGenerator); - } -}; -__name(DefaultLibraryLoader, "DefaultLibraryLoader"); - -// ../engine-core/src/library/ExitHooks.ts -var debug9 = src_default("prisma:client:libraryEngine:exitHooks"); -var ExitHooks = class { - constructor() { - this.nextOwnerId = 1; - this.ownerToIdMap = /* @__PURE__ */ new WeakMap(); - this.idToListenerMap = /* @__PURE__ */ new Map(); - this.areHooksInstalled = false; - } - install() { - if (this.areHooksInstalled) { - return; - } - this.installHook("beforeExit"); - this.installHook("exit"); - this.installHook("SIGINT", true); - this.installHook("SIGUSR2", true); - this.installHook("SIGTERM", true); - this.areHooksInstalled = true; - } - setListener(owner, listener) { - if (listener) { - let id = this.ownerToIdMap.get(owner); - if (!id) { - id = this.nextOwnerId++; - this.ownerToIdMap.set(owner, id); - } - this.idToListenerMap.set(id, listener); - } else { - const id = this.ownerToIdMap.get(owner); - if (id !== void 0) { - this.ownerToIdMap.delete(owner); - this.idToListenerMap.delete(id); - } - } - } - getListener(owner) { - const id = this.ownerToIdMap.get(owner); - if (id === void 0) { - return void 0; - } - return this.idToListenerMap.get(id); - } - installHook(event, shouldExit = false) { - process.once(event, async (code) => { - debug9(`exit event received: ${event}`); - for (const listener of this.idToListenerMap.values()) { - await listener(); - } - this.idToListenerMap.clear(); - if (shouldExit && process.listenerCount(event) === 0) { - process.exit(code); - } - }); - } -}; -__name(ExitHooks, "ExitHooks"); - -// ../engine-core/src/library/LibraryEngine.ts -var debug10 = src_default("prisma:client:libraryEngine"); -function isQueryEvent(event) { - return event["item_type"] === "query" && "query" in event; -} -__name(isQueryEvent, "isQueryEvent"); -function isPanicEvent(event) { - if ("level" in event) { - return event.level === "error" && event["message"] === "PANIC"; - } else { - return false; - } -} -__name(isPanicEvent, "isPanicEvent"); -var knownPlatforms2 = [...platforms, "native"]; -var engineInstanceCount = 0; -var exitHooks = new ExitHooks(); -var LibraryEngine = class extends Engine { - constructor(config2, loader = new DefaultLibraryLoader(config2)) { - var _a3, _b2; - super(); - this.datamodel = import_fs7.default.readFileSync(config2.datamodelPath, "utf-8"); - this.config = config2; - this.libraryStarted = false; - this.logQueries = (_a3 = config2.logQueries) != null ? _a3 : false; - this.logLevel = (_b2 = config2.logLevel) != null ? _b2 : "error"; - this.libraryLoader = loader; - this.logEmitter = config2.logEmitter; - this.datasourceOverrides = config2.datasources ? this.convertDatasources(config2.datasources) : {}; - if (config2.enableDebugLogs) { - this.logLevel = "debug"; - } - this.libraryInstantiationPromise = this.instantiateLibrary(); - exitHooks.install(); - this.checkForTooManyEngines(); - } - get beforeExitListener() { - return exitHooks.getListener(this); - } - set beforeExitListener(listener) { - exitHooks.setListener(this, listener); - } - checkForTooManyEngines() { - if (engineInstanceCount === 10) { - console.warn( - `${import_chalk5.default.yellow("warn(prisma-client)")} There are already 10 instances of Prisma Client actively running.` - ); - } - } - async transaction(action, headers, arg2) { - var _a3, _b2, _c, _d, _e; - await this.start(); - const headerStr = JSON.stringify(headers); - let result; - if (action === "start") { - const jsonOptions = JSON.stringify({ - max_wait: (_a3 = arg2 == null ? void 0 : arg2.maxWait) != null ? _a3 : 2e3, - timeout: (_b2 = arg2 == null ? void 0 : arg2.timeout) != null ? _b2 : 5e3, - isolation_level: arg2 == null ? void 0 : arg2.isolationLevel - }); - result = await ((_c = this.engine) == null ? void 0 : _c.startTransaction(jsonOptions, headerStr)); - } else if (action === "commit") { - result = await ((_d = this.engine) == null ? void 0 : _d.commitTransaction(arg2.id, headerStr)); - } else if (action === "rollback") { - result = await ((_e = this.engine) == null ? void 0 : _e.rollbackTransaction(arg2.id, headerStr)); - } - const response = this.parseEngineResponse(result); - if (response.error_code) { - throw new PrismaClientKnownRequestError(response.message, { - code: response.error_code, - clientVersion: this.config.clientVersion, - meta: response.meta - }); - } - return response; - } - async instantiateLibrary() { - debug10("internalSetup"); - if (this.libraryInstantiationPromise) { - return this.libraryInstantiationPromise; - } - await isNodeAPISupported(); - this.platform = await this.getPlatform(); - await this.loadEngine(); - this.version(); - } - async getPlatform() { - if (this.platform) - return this.platform; - const platform3 = await getPlatform(); - if (!knownPlatforms2.includes(platform3)) { - throw new PrismaClientInitializationError( - `Unknown ${import_chalk5.default.red("PRISMA_QUERY_ENGINE_LIBRARY")} ${import_chalk5.default.redBright.bold( - platform3 - )}. Possible binaryTargets: ${import_chalk5.default.greenBright( - knownPlatforms2.join(", ") - )} or a path to the query engine library. -You may have to run ${import_chalk5.default.greenBright("prisma generate")} for your changes to take effect.`, - this.config.clientVersion - ); - } - return platform3; - } - parseEngineResponse(response) { - if (!response) { - throw new PrismaClientUnknownRequestError(`Response from the Engine was empty`, { - clientVersion: this.config.clientVersion - }); - } - try { - const config2 = JSON.parse(response); - return config2; - } catch (err) { - throw new PrismaClientUnknownRequestError(`Unable to JSON.parse response from engine`, { - clientVersion: this.config.clientVersion - }); - } - } - convertDatasources(datasources) { - const obj = /* @__PURE__ */ Object.create(null); - for (const { name, url } of datasources) { - obj[name] = url; - } - return obj; - } - async loadEngine() { - var _a3; - if (!this.engine) { - if (!this.QueryEngineConstructor) { - this.library = await this.libraryLoader.loadLibrary(); - this.QueryEngineConstructor = this.library.QueryEngine; - } - try { - const weakThis = new WeakRef(this); - this.engine = new this.QueryEngineConstructor( - { - datamodel: this.datamodel, - env: process.env, - logQueries: (_a3 = this.config.logQueries) != null ? _a3 : false, - ignoreEnvVarErrors: false, - datasourceOverrides: this.datasourceOverrides, - logLevel: this.logLevel, - configDir: this.config.cwd - }, - (log3) => { - var _a4; - (_a4 = weakThis.deref()) == null ? void 0 : _a4.logger(log3); - } - ); - engineInstanceCount++; - } catch (_e) { - const e2 = _e; - const error2 = this.parseInitError(e2.message); - if (typeof error2 === "string") { - throw e2; - } else { - throw new PrismaClientInitializationError(error2.message, this.config.clientVersion, error2.error_code); - } - } - } - } - logger(log3) { - var _a3; - const event = this.parseEngineResponse(log3); - if (!event) - return; - if ("span" in event) { - if (this.config.tracingConfig.enabled === true) { - void createSpan(event); - } - return; - } - event.level = (_a3 = event == null ? void 0 : event.level.toLowerCase()) != null ? _a3 : "unknown"; - if (isQueryEvent(event)) { - this.logEmitter.emit("query", { - timestamp: new Date(), - query: event.query, - params: event.params, - duration: Number(event.duration_ms), - target: event.module_path - }); - } else if (isPanicEvent(event)) { - this.loggerRustPanic = new PrismaClientRustPanicError( - this.getErrorMessageWithLink( - `${event.message}: ${event.reason} in ${event.file}:${event.line}:${event.column}` - ), - this.config.clientVersion - ); - } else { - this.logEmitter.emit(event.level, { - timestamp: new Date(), - message: event.message, - target: event.module_path - }); - } - } - getErrorMessageWithLink(title) { - var _a3; - return getErrorMessageWithLink({ - platform: this.platform, - title, - version: this.config.clientVersion, - engineVersion: (_a3 = this.versionInfo) == null ? void 0 : _a3.commit, - database: this.config.activeProvider, - query: this.lastQuery - }); - } - parseInitError(str) { - try { - const error2 = JSON.parse(str); - return error2; - } catch (e2) { - } - return str; - } - parseRequestError(str) { - try { - const error2 = JSON.parse(str); - return error2; - } catch (e2) { - } - return str; - } - on(event, listener) { - if (event === "beforeExit") { - this.beforeExitListener = listener; - } else { - this.logEmitter.on(event, listener); - } - } - async start() { - await this.libraryInstantiationPromise; - await this.libraryStoppingPromise; - if (this.libraryStartingPromise) { - debug10(`library already starting, this.libraryStarted: ${this.libraryStarted}`); - return this.libraryStartingPromise; - } - if (this.libraryStarted) { - return; - } - const startFn = /* @__PURE__ */ __name(async () => { - var _a3; - debug10("library starting"); - try { - const headers = { - traceparent: getTraceParent({ tracingConfig: this.config.tracingConfig }) - }; - await ((_a3 = this.engine) == null ? void 0 : _a3.connect(JSON.stringify(headers))); - this.libraryStarted = true; - debug10("library started"); - } catch (err) { - const error2 = this.parseInitError(err.message); - if (typeof error2 === "string") { - throw err; - } else { - throw new PrismaClientInitializationError(error2.message, this.config.clientVersion, error2.error_code); - } - } finally { - this.libraryStartingPromise = void 0; - } - }, "startFn"); - const spanConfig = { - name: "connect", - enabled: this.config.tracingConfig.enabled - }; - this.libraryStartingPromise = runInChildSpan(spanConfig, startFn); - return this.libraryStartingPromise; - } - async stop() { - await this.libraryStartingPromise; - await this.executingQueryPromise; - if (this.libraryStoppingPromise) { - debug10("library is already stopping"); - return this.libraryStoppingPromise; - } - if (!this.libraryStarted) { - return; - } - const stopFn = /* @__PURE__ */ __name(async () => { - var _a3; - await new Promise((r2) => setTimeout(r2, 5)); - debug10("library stopping"); - const headers = { - traceparent: getTraceParent({ tracingConfig: this.config.tracingConfig }) - }; - await ((_a3 = this.engine) == null ? void 0 : _a3.disconnect(JSON.stringify(headers))); - this.libraryStarted = false; - this.libraryStoppingPromise = void 0; - debug10("library stopped"); - }, "stopFn"); - const spanConfig = { - name: "disconnect", - enabled: this.config.tracingConfig.enabled - }; - this.libraryStoppingPromise = runInChildSpan(spanConfig, stopFn); - return this.libraryStoppingPromise; - } - async getConfig() { - await this.libraryInstantiationPromise; - return this.library.getConfig({ - datamodel: this.datamodel, - datasourceOverrides: this.datasourceOverrides, - ignoreEnvVarErrors: true, - env: process.env - }); - } - async getDmmf() { - await this.start(); - return JSON.parse(await this.engine.dmmf()); - } - version() { - var _a3, _b2, _c; - this.versionInfo = (_a3 = this.library) == null ? void 0 : _a3.version(); - return (_c = (_b2 = this.versionInfo) == null ? void 0 : _b2.version) != null ? _c : "unknown"; - } - debugPanic(message) { - var _a3; - return (_a3 = this.library) == null ? void 0 : _a3.debugPanic(message); - } - async request({ query: query2, headers = {} }) { - var _a3, _b2; - debug10(`sending request, this.libraryStarted: ${this.libraryStarted}`); - const request2 = { query: query2, variables: {} }; - const headerStr = JSON.stringify(headers); - const queryStr = JSON.stringify(request2); - try { - await this.start(); - this.executingQueryPromise = (_a3 = this.engine) == null ? void 0 : _a3.query(queryStr, headerStr, headers.transactionId); - this.lastQuery = queryStr; - const data = this.parseEngineResponse(await this.executingQueryPromise); - if (data.errors) { - if (data.errors.length === 1) { - throw this.buildQueryError(data.errors[0]); - } - throw new PrismaClientUnknownRequestError(JSON.stringify(data.errors), { - clientVersion: this.config.clientVersion - }); - } else if (this.loggerRustPanic) { - throw this.loggerRustPanic; - } - return { data, elapsed: 0 }; - } catch (e2) { - if (e2 instanceof PrismaClientInitializationError) { - throw e2; - } - if (e2.code === "GenericFailure" && ((_b2 = e2.message) == null ? void 0 : _b2.startsWith("PANIC:"))) { - throw new PrismaClientRustPanicError(this.getErrorMessageWithLink(e2.message), this.config.clientVersion); - } - const error2 = this.parseRequestError(e2.message); - if (typeof error2 === "string") { - throw e2; - } else { - throw new PrismaClientUnknownRequestError(`${error2.message} -${error2.backtrace}`, { - clientVersion: this.config.clientVersion - }); - } - } - } - async requestBatch({ - queries, - headers = {}, - transaction - }) { - debug10("requestBatch"); - const request2 = { - batch: queries.map((query2) => ({ query: query2, variables: {} })), - transaction: Boolean(transaction), - isolationLevel: transaction == null ? void 0 : transaction.isolationLevel - }; - await this.start(); - this.lastQuery = JSON.stringify(request2); - this.executingQueryPromise = this.engine.query(this.lastQuery, JSON.stringify(headers), headers.transactionId); - const result = await this.executingQueryPromise; - const data = this.parseEngineResponse(result); - if (data.errors) { - if (data.errors.length === 1) { - throw this.buildQueryError(data.errors[0]); - } - throw new PrismaClientUnknownRequestError(JSON.stringify(data.errors), { - clientVersion: this.config.clientVersion - }); - } - const { batchResult, errors } = data; - if (Array.isArray(batchResult)) { - return batchResult.map((result2) => { - var _a3; - if (result2.errors && result2.errors.length > 0) { - return (_a3 = this.loggerRustPanic) != null ? _a3 : this.buildQueryError(result2.errors[0]); - } - return { - data: result2, - elapsed: 0 - }; - }); - } else { - if (errors && errors.length === 1) { - throw new Error(errors[0].error); - } - throw new Error(JSON.stringify(data)); - } - } - buildQueryError(error2) { - if (error2.user_facing_error.is_panic) { - return new PrismaClientRustPanicError( - this.getErrorMessageWithLink(error2.user_facing_error.message), - this.config.clientVersion - ); - } - return prismaGraphQLToJSError(error2, this.config.clientVersion); - } - async metrics(options) { - await this.start(); - const responseString = await this.engine.metrics(JSON.stringify(options)); - if (options.format === "prometheus") { - return responseString; - } - return this.parseEngineResponse(responseString); - } -}; -__name(LibraryEngine, "LibraryEngine"); - -// ../generator-helper/src/dmmf.ts -var DMMF; -((DMMF2) => { - let ModelAction; - ((ModelAction2) => { - ModelAction2["findUnique"] = "findUnique"; - ModelAction2["findUniqueOrThrow"] = "findUniqueOrThrow"; - ModelAction2["findFirst"] = "findFirst"; - ModelAction2["findFirstOrThrow"] = "findFirstOrThrow"; - ModelAction2["findMany"] = "findMany"; - ModelAction2["create"] = "create"; - ModelAction2["createMany"] = "createMany"; - ModelAction2["update"] = "update"; - ModelAction2["updateMany"] = "updateMany"; - ModelAction2["upsert"] = "upsert"; - ModelAction2["delete"] = "delete"; - ModelAction2["deleteMany"] = "deleteMany"; - ModelAction2["groupBy"] = "groupBy"; - ModelAction2["count"] = "count"; - ModelAction2["aggregate"] = "aggregate"; - ModelAction2["findRaw"] = "findRaw"; - ModelAction2["aggregateRaw"] = "aggregateRaw"; - })(ModelAction = DMMF2.ModelAction || (DMMF2.ModelAction = {})); -})(DMMF || (DMMF = {})); - -// ../internals/src/logger.ts -var logger_exports = {}; -__export(logger_exports, { - error: () => error, - info: () => info, - log: () => log, - query: () => query, - should: () => should, - tags: () => tags, - warn: () => warn -}); -var import_chalk6 = __toESM(require_source()); -var tags = { - error: import_chalk6.default.red("prisma:error"), - warn: import_chalk6.default.yellow("prisma:warn"), - info: import_chalk6.default.cyan("prisma:info"), - query: import_chalk6.default.blue("prisma:query") -}; -var should = { - warn: () => !process.env.PRISMA_DISABLE_WARNINGS -}; -function log(...data) { - console.log(...data); -} -__name(log, "log"); -function warn(message, ...optionalParams) { - if (should.warn()) { - console.warn(`${tags.warn} ${message}`, ...optionalParams); - } -} -__name(warn, "warn"); -function info(message, ...optionalParams) { - console.info(`${tags.info} ${message}`, ...optionalParams); -} -__name(info, "info"); -function error(message, ...optionalParams) { - console.error(`${tags.error} ${message}`, ...optionalParams); -} -__name(error, "error"); -function query(message, ...optionalParams) { - console.log(`${tags.query} ${message}`, ...optionalParams); -} -__name(query, "query"); - -// ../internals/src/utils/callOnce.ts -function callOnce(fn) { - let result; - return (...args) => result != null ? result : result = fn(...args); -} -__name(callOnce, "callOnce"); - -// ../internals/src/utils/hasOwnProperty.ts -function hasOwnProperty2(object, key) { - return Object.prototype.hasOwnProperty.call(object, key); -} -__name(hasOwnProperty2, "hasOwnProperty"); - -// ../internals/src/utils/isPromiseLike.ts -function isPromiseLike(value) { - return value != null && typeof value["then"] === "function"; -} -__name(isPromiseLike, "isPromiseLike"); - -// ../internals/src/utils/keyBy.ts -var keyBy = /* @__PURE__ */ __name((collection, iteratee) => { - return collection.reduce((acc, curr) => { - acc[iteratee(curr)] = curr; - return acc; - }, {}); -}, "keyBy"); - -// ../internals/src/utils/mapObjectValues.ts -function mapObjectValues(object, mapper) { - return Object.fromEntries( - Object.entries(object).map(([key, value]) => [key, mapper(value, key)]) - ); -} -__name(mapObjectValues, "mapObjectValues"); - -// ../internals/src/warnOnce.ts -var alreadyWarned = /* @__PURE__ */ new Set(); -var warnOnce = /* @__PURE__ */ __name((key, message, ...args) => { - if (!alreadyWarned.has(key)) { - alreadyWarned.add(key); - warn(message, ...args); - } -}, "warnOnce"); - -// src/runtime/core/extensions/wrapExtensionCallback.ts -var PrismaClientExtensionError = class extends Error { - constructor(extensionName, cause) { - super(`${getTitleFromExtensionName(extensionName)}: ${getMessageFromCause(cause)}`, { cause }); - this.extensionName = extensionName; - this.name = "PrismaClientExtensionError"; - if (!this.cause) { - this.cause = cause; - } - if (typeof Error.captureStackTrace === "function") { - Error.captureStackTrace(this, PrismaClientExtensionError); - } - } - get [Symbol.toStringTag]() { - return "PrismaClientExtensionError"; - } -}; -__name(PrismaClientExtensionError, "PrismaClientExtensionError"); -function getTitleFromExtensionName(extensionName) { - if (extensionName) { - return `Error caused by extension "${extensionName}"`; - } - return "Error caused by an extension"; -} -__name(getTitleFromExtensionName, "getTitleFromExtensionName"); -function getMessageFromCause(cause) { - if (cause instanceof Error) { - return cause.message; - } - return `${cause}`; -} -__name(getMessageFromCause, "getMessageFromCause"); -function wrapExtensionCallback(name, fn) { - return function(...args) { - try { - const result = fn.apply(this, args); - if (isPromiseLike(result)) { - return result.then(void 0, (error2) => Promise.reject(new PrismaClientExtensionError(name, error2))); - } - return result; - } catch (error2) { - throw new PrismaClientExtensionError(name, error2); - } - }; -} -__name(wrapExtensionCallback, "wrapExtensionCallback"); -function wrapAllExtensionCallbacks(name, object) { - if (!object) { - return object; - } - return mapObjectValues( - object, - (prop) => typeof prop === "function" ? wrapExtensionCallback(name, prop) : prop - ); -} -__name(wrapAllExtensionCallbacks, "wrapAllExtensionCallbacks"); - -// src/runtime/core/metrics/MetricsClient.ts -var MetricsClient = class { - constructor(engine) { - this._engine = engine; - } - prometheus(options) { - return this._engine.metrics({ format: "prometheus", ...options }); - } - json(options) { - return this._engine.metrics({ format: "json", ...options }); - } -}; -__name(MetricsClient, "MetricsClient"); - -// src/runtime/utils/applyMixins.ts -function applyMixins(derivedCtor, constructors) { - var _a3; - for (const baseCtor of constructors) { - for (const name of Object.getOwnPropertyNames(baseCtor.prototype)) { - Object.defineProperty( - derivedCtor.prototype, - name, - (_a3 = Object.getOwnPropertyDescriptor(baseCtor.prototype, name)) != null ? _a3 : /* @__PURE__ */ Object.create(null) - ); - } - } -} -__name(applyMixins, "applyMixins"); - -// src/runtime/utils/common.ts -var import_chalk7 = __toESM(require_source()); - -// ../../node_modules/.pnpm/decimal.js@10.4.2/node_modules/decimal.js/decimal.mjs -var EXP_LIMIT = 9e15; -var MAX_DIGITS = 1e9; -var NUMERALS = "0123456789abcdef"; -var LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058"; -var PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789"; -var DEFAULTS = { - precision: 20, - rounding: 4, - modulo: 1, - toExpNeg: -7, - toExpPos: 21, - minE: -EXP_LIMIT, - maxE: EXP_LIMIT, - crypto: false -}; -var inexact; -var quadrant; -var external = true; -var decimalError = "[DecimalError] "; -var invalidArgument = decimalError + "Invalid argument: "; -var precisionLimitExceeded = decimalError + "Precision limit exceeded"; -var cryptoUnavailable = decimalError + "crypto unavailable"; -var tag = "[object Decimal]"; -var mathfloor = Math.floor; -var mathpow = Math.pow; -var isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i; -var isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i; -var isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i; -var isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; -var BASE = 1e7; -var LOG_BASE = 7; -var MAX_SAFE_INTEGER = 9007199254740991; -var LN10_PRECISION = LN10.length - 1; -var PI_PRECISION = PI.length - 1; -var P2 = { toStringTag: tag }; -P2.absoluteValue = P2.abs = function() { - var x = new this.constructor(this); - if (x.s < 0) - x.s = 1; - return finalise(x); -}; -P2.ceil = function() { - return finalise(new this.constructor(this), this.e + 1, 2); -}; -P2.clampedTo = P2.clamp = function(min2, max2) { - var k, x = this, Ctor = x.constructor; - min2 = new Ctor(min2); - max2 = new Ctor(max2); - if (!min2.s || !max2.s) - return new Ctor(NaN); - if (min2.gt(max2)) - throw Error(invalidArgument + max2); - k = x.cmp(min2); - return k < 0 ? min2 : x.cmp(max2) > 0 ? max2 : new Ctor(x); -}; -P2.comparedTo = P2.cmp = function(y) { - var i, j, xdL, ydL, x = this, xd = x.d, yd = (y = new x.constructor(y)).d, xs = x.s, ys = y.s; - if (!xd || !yd) { - return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; - } - if (!xd[0] || !yd[0]) - return xd[0] ? xs : yd[0] ? -ys : 0; - if (xs !== ys) - return xs; - if (x.e !== y.e) - return x.e > y.e ^ xs < 0 ? 1 : -1; - xdL = xd.length; - ydL = yd.length; - for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { - if (xd[i] !== yd[i]) - return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; - } - return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; -}; -P2.cosine = P2.cos = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.d) - return new Ctor(NaN); - if (!x.d[0]) - return new Ctor(1); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; - Ctor.rounding = 1; - x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); -}; -P2.cubeRoot = P2.cbrt = function() { - var e2, m2, n2, r2, rep, s, sd, t2, t3, t3plusx, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - external = false; - s = x.s * mathpow(x.s * x, 1 / 3); - if (!s || Math.abs(s) == 1 / 0) { - n2 = digitsToString(x.d); - e2 = x.e; - if (s = (e2 - n2.length + 1) % 3) - n2 += s == 1 || s == -2 ? "0" : "00"; - s = mathpow(n2, 1 / 3); - e2 = mathfloor((e2 + 1) / 3) - (e2 % 3 == (e2 < 0 ? -1 : 2)); - if (s == 1 / 0) { - n2 = "5e" + e2; - } else { - n2 = s.toExponential(); - n2 = n2.slice(0, n2.indexOf("e") + 1) + e2; - } - r2 = new Ctor(n2); - r2.s = x.s; - } else { - r2 = new Ctor(s.toString()); - } - sd = (e2 = Ctor.precision) + 3; - for (; ; ) { - t2 = r2; - t3 = t2.times(t2).times(t2); - t3plusx = t3.plus(x); - r2 = divide(t3plusx.plus(x).times(t2), t3plusx.plus(t3), sd + 2, 1); - if (digitsToString(t2.d).slice(0, sd) === (n2 = digitsToString(r2.d)).slice(0, sd)) { - n2 = n2.slice(sd - 3, sd + 1); - if (n2 == "9999" || !rep && n2 == "4999") { - if (!rep) { - finalise(t2, e2 + 1, 0); - if (t2.times(t2).times(t2).eq(x)) { - r2 = t2; - break; - } - } - sd += 4; - rep = 1; - } else { - if (!+n2 || !+n2.slice(1) && n2.charAt(0) == "5") { - finalise(r2, e2 + 1, 1); - m2 = !r2.times(r2).times(r2).eq(x); - } - break; - } - } - } - external = true; - return finalise(r2, e2, Ctor.rounding, m2); -}; -P2.decimalPlaces = P2.dp = function() { - var w2, d2 = this.d, n2 = NaN; - if (d2) { - w2 = d2.length - 1; - n2 = (w2 - mathfloor(this.e / LOG_BASE)) * LOG_BASE; - w2 = d2[w2]; - if (w2) - for (; w2 % 10 == 0; w2 /= 10) - n2--; - if (n2 < 0) - n2 = 0; - } - return n2; -}; -P2.dividedBy = P2.div = function(y) { - return divide(this, new this.constructor(y)); -}; -P2.dividedToIntegerBy = P2.divToInt = function(y) { - var x = this, Ctor = x.constructor; - return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); -}; -P2.equals = P2.eq = function(y) { - return this.cmp(y) === 0; -}; -P2.floor = function() { - return finalise(new this.constructor(this), this.e + 1, 3); -}; -P2.greaterThan = P2.gt = function(y) { - return this.cmp(y) > 0; -}; -P2.greaterThanOrEqualTo = P2.gte = function(y) { - var k = this.cmp(y); - return k == 1 || k === 0; -}; -P2.hyperbolicCosine = P2.cosh = function() { - var k, n2, pr, rm, len, x = this, Ctor = x.constructor, one = new Ctor(1); - if (!x.isFinite()) - return new Ctor(x.s ? 1 / 0 : NaN); - if (x.isZero()) - return one; - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; - Ctor.rounding = 1; - len = x.d.length; - if (len < 32) { - k = Math.ceil(len / 3); - n2 = (1 / tinyPow(4, k)).toString(); - } else { - k = 16; - n2 = "2.3283064365386962890625e-10"; - } - x = taylorSeries(Ctor, 1, x.times(n2), new Ctor(1), true); - var cosh2_x, i = k, d8 = new Ctor(8); - for (; i--; ) { - cosh2_x = x.times(x); - x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); - } - return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); -}; -P2.hyperbolicSine = P2.sinh = function() { - var k, pr, rm, len, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; - Ctor.rounding = 1; - len = x.d.length; - if (len < 3) { - x = taylorSeries(Ctor, 2, x, x, true); - } else { - k = 1.4 * Math.sqrt(len); - k = k > 16 ? 16 : k | 0; - x = x.times(1 / tinyPow(5, k)); - x = taylorSeries(Ctor, 2, x, x, true); - var sinh2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); - for (; k--; ) { - sinh2_x = x.times(x); - x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); - } - } - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(x, pr, rm, true); -}; -P2.hyperbolicTangent = P2.tanh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(x.s); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 7; - Ctor.rounding = 1; - return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); -}; -P2.inverseCosine = P2.acos = function() { - var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding; - if (k !== -1) { - return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN); - } - if (x.isZero()) - return getPi(Ctor, pr + 4, rm).times(0.5); - Ctor.precision = pr + 6; - Ctor.rounding = 1; - x = x.asin(); - halfPi = getPi(Ctor, pr + 4, rm).times(0.5); - Ctor.precision = pr; - Ctor.rounding = rm; - return halfPi.minus(x); -}; -P2.inverseHyperbolicCosine = P2.acosh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (x.lte(1)) - return new Ctor(x.eq(1) ? 0 : NaN); - if (!x.isFinite()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; - Ctor.rounding = 1; - external = false; - x = x.times(x).minus(1).sqrt().plus(x); - external = true; - Ctor.precision = pr; - Ctor.rounding = rm; - return x.ln(); -}; -P2.inverseHyperbolicSine = P2.asinh = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite() || x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; - Ctor.rounding = 1; - external = false; - x = x.times(x).plus(1).sqrt().plus(x); - external = true; - Ctor.precision = pr; - Ctor.rounding = rm; - return x.ln(); -}; -P2.inverseHyperbolicTangent = P2.atanh = function() { - var pr, rm, wpr, xsd, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.e >= 0) - return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); - pr = Ctor.precision; - rm = Ctor.rounding; - xsd = x.sd(); - if (Math.max(xsd, pr) < 2 * -x.e - 1) - return finalise(new Ctor(x), pr, rm, true); - Ctor.precision = wpr = xsd - x.e; - x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); - Ctor.precision = pr + 4; - Ctor.rounding = 1; - x = x.ln(); - Ctor.precision = pr; - Ctor.rounding = rm; - return x.times(0.5); -}; -P2.inverseSine = P2.asin = function() { - var halfPi, k, pr, rm, x = this, Ctor = x.constructor; - if (x.isZero()) - return new Ctor(x); - k = x.abs().cmp(1); - pr = Ctor.precision; - rm = Ctor.rounding; - if (k !== -1) { - if (k === 0) { - halfPi = getPi(Ctor, pr + 4, rm).times(0.5); - halfPi.s = x.s; - return halfPi; - } - return new Ctor(NaN); - } - Ctor.precision = pr + 6; - Ctor.rounding = 1; - x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); - Ctor.precision = pr; - Ctor.rounding = rm; - return x.times(2); -}; -P2.inverseTangent = P2.atan = function() { - var i, j, k, n2, px, t2, r2, wpr, x2, x = this, Ctor = x.constructor, pr = Ctor.precision, rm = Ctor.rounding; - if (!x.isFinite()) { - if (!x.s) - return new Ctor(NaN); - if (pr + 4 <= PI_PRECISION) { - r2 = getPi(Ctor, pr + 4, rm).times(0.5); - r2.s = x.s; - return r2; - } - } else if (x.isZero()) { - return new Ctor(x); - } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { - r2 = getPi(Ctor, pr + 4, rm).times(0.25); - r2.s = x.s; - return r2; - } - Ctor.precision = wpr = pr + 10; - Ctor.rounding = 1; - k = Math.min(28, wpr / LOG_BASE + 2 | 0); - for (i = k; i; --i) - x = x.div(x.times(x).plus(1).sqrt().plus(1)); - external = false; - j = Math.ceil(wpr / LOG_BASE); - n2 = 1; - x2 = x.times(x); - r2 = new Ctor(x); - px = x; - for (; i !== -1; ) { - px = px.times(x2); - t2 = r2.minus(px.div(n2 += 2)); - px = px.times(x2); - r2 = t2.plus(px.div(n2 += 2)); - if (r2.d[j] !== void 0) - for (i = j; r2.d[i] === t2.d[i] && i--; ) - ; - } - if (k) - r2 = r2.times(2 << k - 1); - external = true; - return finalise(r2, Ctor.precision = pr, Ctor.rounding = rm, true); -}; -P2.isFinite = function() { - return !!this.d; -}; -P2.isInteger = P2.isInt = function() { - return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; -}; -P2.isNaN = function() { - return !this.s; -}; -P2.isNegative = P2.isNeg = function() { - return this.s < 0; -}; -P2.isPositive = P2.isPos = function() { - return this.s > 0; -}; -P2.isZero = function() { - return !!this.d && this.d[0] === 0; -}; -P2.lessThan = P2.lt = function(y) { - return this.cmp(y) < 0; -}; -P2.lessThanOrEqualTo = P2.lte = function(y) { - return this.cmp(y) < 1; -}; -P2.logarithm = P2.log = function(base) { - var isBase10, d2, denominator, k, inf, num, sd, r2, arg2 = this, Ctor = arg2.constructor, pr = Ctor.precision, rm = Ctor.rounding, guard = 5; - if (base == null) { - base = new Ctor(10); - isBase10 = true; - } else { - base = new Ctor(base); - d2 = base.d; - if (base.s < 0 || !d2 || !d2[0] || base.eq(1)) - return new Ctor(NaN); - isBase10 = base.eq(10); - } - d2 = arg2.d; - if (arg2.s < 0 || !d2 || !d2[0] || arg2.eq(1)) { - return new Ctor(d2 && !d2[0] ? -1 / 0 : arg2.s != 1 ? NaN : d2 ? 0 : 1 / 0); - } - if (isBase10) { - if (d2.length > 1) { - inf = true; - } else { - for (k = d2[0]; k % 10 === 0; ) - k /= 10; - inf = k !== 1; - } - } - external = false; - sd = pr + guard; - num = naturalLogarithm(arg2, sd); - denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); - r2 = divide(num, denominator, sd, 1); - if (checkRoundingDigits(r2.d, k = pr, rm)) { - do { - sd += 10; - num = naturalLogarithm(arg2, sd); - denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); - r2 = divide(num, denominator, sd, 1); - if (!inf) { - if (+digitsToString(r2.d).slice(k + 1, k + 15) + 1 == 1e14) { - r2 = finalise(r2, pr + 1, 0); - } - break; - } - } while (checkRoundingDigits(r2.d, k += 10, rm)); - } - external = true; - return finalise(r2, pr, rm); -}; -P2.minus = P2.sub = function(y) { - var d2, e2, i, j, k, len, pr, rm, xd, xe, xLTy, yd, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.d) { - if (!x.s || !y.s) - y = new Ctor(NaN); - else if (x.d) - y.s = -y.s; - else - y = new Ctor(y.d || x.s !== y.s ? x : NaN); - return y; - } - if (x.s != y.s) { - y.s = -y.s; - return x.plus(y); - } - xd = x.d; - yd = y.d; - pr = Ctor.precision; - rm = Ctor.rounding; - if (!xd[0] || !yd[0]) { - if (yd[0]) - y.s = -y.s; - else if (xd[0]) - y = new Ctor(x); - else - return new Ctor(rm === 3 ? -0 : 0); - return external ? finalise(y, pr, rm) : y; - } - e2 = mathfloor(y.e / LOG_BASE); - xe = mathfloor(x.e / LOG_BASE); - xd = xd.slice(); - k = xe - e2; - if (k) { - xLTy = k < 0; - if (xLTy) { - d2 = xd; - k = -k; - len = yd.length; - } else { - d2 = yd; - e2 = xe; - len = xd.length; - } - i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; - if (k > i) { - k = i; - d2.length = 1; - } - d2.reverse(); - for (i = k; i--; ) - d2.push(0); - d2.reverse(); - } else { - i = xd.length; - len = yd.length; - xLTy = i < len; - if (xLTy) - len = i; - for (i = 0; i < len; i++) { - if (xd[i] != yd[i]) { - xLTy = xd[i] < yd[i]; - break; - } - } - k = 0; - } - if (xLTy) { - d2 = xd; - xd = yd; - yd = d2; - y.s = -y.s; - } - len = xd.length; - for (i = yd.length - len; i > 0; --i) - xd[len++] = 0; - for (i = yd.length; i > k; ) { - if (xd[--i] < yd[i]) { - for (j = i; j && xd[--j] === 0; ) - xd[j] = BASE - 1; - --xd[j]; - xd[i] += BASE; - } - xd[i] -= yd[i]; - } - for (; xd[--len] === 0; ) - xd.pop(); - for (; xd[0] === 0; xd.shift()) - --e2; - if (!xd[0]) - return new Ctor(rm === 3 ? -0 : 0); - y.d = xd; - y.e = getBase10Exponent(xd, e2); - return external ? finalise(y, pr, rm) : y; -}; -P2.modulo = P2.mod = function(y) { - var q, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.s || y.d && !y.d[0]) - return new Ctor(NaN); - if (!y.d || x.d && !x.d[0]) { - return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); - } - external = false; - if (Ctor.modulo == 9) { - q = divide(x, y.abs(), 0, 3, 1); - q.s *= y.s; - } else { - q = divide(x, y, 0, Ctor.modulo, 1); - } - q = q.times(y); - external = true; - return x.minus(q); -}; -P2.naturalExponential = P2.exp = function() { - return naturalExponential(this); -}; -P2.naturalLogarithm = P2.ln = function() { - return naturalLogarithm(this); -}; -P2.negated = P2.neg = function() { - var x = new this.constructor(this); - x.s = -x.s; - return finalise(x); -}; -P2.plus = P2.add = function(y) { - var carry, d2, e2, i, k, len, pr, rm, xd, yd, x = this, Ctor = x.constructor; - y = new Ctor(y); - if (!x.d || !y.d) { - if (!x.s || !y.s) - y = new Ctor(NaN); - else if (!x.d) - y = new Ctor(y.d || x.s === y.s ? x : NaN); - return y; - } - if (x.s != y.s) { - y.s = -y.s; - return x.minus(y); - } - xd = x.d; - yd = y.d; - pr = Ctor.precision; - rm = Ctor.rounding; - if (!xd[0] || !yd[0]) { - if (!yd[0]) - y = new Ctor(x); - return external ? finalise(y, pr, rm) : y; - } - k = mathfloor(x.e / LOG_BASE); - e2 = mathfloor(y.e / LOG_BASE); - xd = xd.slice(); - i = k - e2; - if (i) { - if (i < 0) { - d2 = xd; - i = -i; - len = yd.length; - } else { - d2 = yd; - e2 = k; - len = xd.length; - } - k = Math.ceil(pr / LOG_BASE); - len = k > len ? k + 1 : len + 1; - if (i > len) { - i = len; - d2.length = 1; - } - d2.reverse(); - for (; i--; ) - d2.push(0); - d2.reverse(); - } - len = xd.length; - i = yd.length; - if (len - i < 0) { - i = len; - d2 = yd; - yd = xd; - xd = d2; - } - for (carry = 0; i; ) { - carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; - xd[i] %= BASE; - } - if (carry) { - xd.unshift(carry); - ++e2; - } - for (len = xd.length; xd[--len] == 0; ) - xd.pop(); - y.d = xd; - y.e = getBase10Exponent(xd, e2); - return external ? finalise(y, pr, rm) : y; -}; -P2.precision = P2.sd = function(z) { - var k, x = this; - if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) - throw Error(invalidArgument + z); - if (x.d) { - k = getPrecision(x.d); - if (z && x.e + 1 > k) - k = x.e + 1; - } else { - k = NaN; - } - return k; -}; -P2.round = function() { - var x = this, Ctor = x.constructor; - return finalise(new Ctor(x), x.e + 1, Ctor.rounding); -}; -P2.sine = P2.sin = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; - Ctor.rounding = 1; - x = sine(Ctor, toLessThanHalfPi(Ctor, x)); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); -}; -P2.squareRoot = P2.sqrt = function() { - var m2, n2, sd, r2, rep, t2, x = this, d2 = x.d, e2 = x.e, s = x.s, Ctor = x.constructor; - if (s !== 1 || !d2 || !d2[0]) { - return new Ctor(!s || s < 0 && (!d2 || d2[0]) ? NaN : d2 ? x : 1 / 0); - } - external = false; - s = Math.sqrt(+x); - if (s == 0 || s == 1 / 0) { - n2 = digitsToString(d2); - if ((n2.length + e2) % 2 == 0) - n2 += "0"; - s = Math.sqrt(n2); - e2 = mathfloor((e2 + 1) / 2) - (e2 < 0 || e2 % 2); - if (s == 1 / 0) { - n2 = "5e" + e2; - } else { - n2 = s.toExponential(); - n2 = n2.slice(0, n2.indexOf("e") + 1) + e2; - } - r2 = new Ctor(n2); - } else { - r2 = new Ctor(s.toString()); - } - sd = (e2 = Ctor.precision) + 3; - for (; ; ) { - t2 = r2; - r2 = t2.plus(divide(x, t2, sd + 2, 1)).times(0.5); - if (digitsToString(t2.d).slice(0, sd) === (n2 = digitsToString(r2.d)).slice(0, sd)) { - n2 = n2.slice(sd - 3, sd + 1); - if (n2 == "9999" || !rep && n2 == "4999") { - if (!rep) { - finalise(t2, e2 + 1, 0); - if (t2.times(t2).eq(x)) { - r2 = t2; - break; - } - } - sd += 4; - rep = 1; - } else { - if (!+n2 || !+n2.slice(1) && n2.charAt(0) == "5") { - finalise(r2, e2 + 1, 1); - m2 = !r2.times(r2).eq(x); - } - break; - } - } - } - external = true; - return finalise(r2, e2, Ctor.rounding, m2); -}; -P2.tangent = P2.tan = function() { - var pr, rm, x = this, Ctor = x.constructor; - if (!x.isFinite()) - return new Ctor(NaN); - if (x.isZero()) - return new Ctor(x); - pr = Ctor.precision; - rm = Ctor.rounding; - Ctor.precision = pr + 10; - Ctor.rounding = 1; - x = x.sin(); - x.s = 1; - x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); - Ctor.precision = pr; - Ctor.rounding = rm; - return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); -}; -P2.times = P2.mul = function(y) { - var carry, e2, i, k, r2, rL, t2, xdL, ydL, x = this, Ctor = x.constructor, xd = x.d, yd = (y = new Ctor(y)).d; - y.s *= x.s; - if (!xd || !xd[0] || !yd || !yd[0]) { - return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd ? NaN : !xd || !yd ? y.s / 0 : y.s * 0); - } - e2 = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); - xdL = xd.length; - ydL = yd.length; - if (xdL < ydL) { - r2 = xd; - xd = yd; - yd = r2; - rL = xdL; - xdL = ydL; - ydL = rL; - } - r2 = []; - rL = xdL + ydL; - for (i = rL; i--; ) - r2.push(0); - for (i = ydL; --i >= 0; ) { - carry = 0; - for (k = xdL + i; k > i; ) { - t2 = r2[k] + yd[i] * xd[k - i - 1] + carry; - r2[k--] = t2 % BASE | 0; - carry = t2 / BASE | 0; - } - r2[k] = (r2[k] + carry) % BASE | 0; - } - for (; !r2[--rL]; ) - r2.pop(); - if (carry) - ++e2; - else - r2.shift(); - y.d = r2; - y.e = getBase10Exponent(r2, e2); - return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; -}; -P2.toBinary = function(sd, rm) { - return toStringBinary(this, 2, sd, rm); -}; -P2.toDecimalPlaces = P2.toDP = function(dp, rm) { - var x = this, Ctor = x.constructor; - x = new Ctor(x); - if (dp === void 0) - return x; - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - return finalise(x, dp + x.e + 1, rm); -}; -P2.toExponential = function(dp, rm) { - var str, x = this, Ctor = x.constructor; - if (dp === void 0) { - str = finiteToString(x, true); - } else { - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - x = finalise(new Ctor(x), dp + 1, rm); - str = finiteToString(x, true, dp + 1); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P2.toFixed = function(dp, rm) { - var str, y, x = this, Ctor = x.constructor; - if (dp === void 0) { - str = finiteToString(x); - } else { - checkInt32(dp, 0, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - y = finalise(new Ctor(x), dp + x.e + 1, rm); - str = finiteToString(y, false, dp + y.e + 1); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P2.toFraction = function(maxD) { - var d2, d0, d1, d22, e2, k, n2, n0, n1, pr, q, r2, x = this, xd = x.d, Ctor = x.constructor; - if (!xd) - return new Ctor(x); - n1 = d0 = new Ctor(1); - d1 = n0 = new Ctor(0); - d2 = new Ctor(d1); - e2 = d2.e = getPrecision(xd) - x.e - 1; - k = e2 % LOG_BASE; - d2.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); - if (maxD == null) { - maxD = e2 > 0 ? d2 : n1; - } else { - n2 = new Ctor(maxD); - if (!n2.isInt() || n2.lt(n1)) - throw Error(invalidArgument + n2); - maxD = n2.gt(d2) ? e2 > 0 ? d2 : n1 : n2; - } - external = false; - n2 = new Ctor(digitsToString(xd)); - pr = Ctor.precision; - Ctor.precision = e2 = xd.length * LOG_BASE * 2; - for (; ; ) { - q = divide(n2, d2, 0, 1, 1); - d22 = d0.plus(q.times(d1)); - if (d22.cmp(maxD) == 1) - break; - d0 = d1; - d1 = d22; - d22 = n1; - n1 = n0.plus(q.times(d22)); - n0 = d22; - d22 = d2; - d2 = n2.minus(q.times(d22)); - n2 = d22; - } - d22 = divide(maxD.minus(d0), d1, 0, 1, 1); - n0 = n0.plus(d22.times(n1)); - d0 = d0.plus(d22.times(d1)); - n0.s = n1.s = x.s; - r2 = divide(n1, d1, e2, 1).minus(x).abs().cmp(divide(n0, d0, e2, 1).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; - Ctor.precision = pr; - external = true; - return r2; -}; -P2.toHexadecimal = P2.toHex = function(sd, rm) { - return toStringBinary(this, 16, sd, rm); -}; -P2.toNearest = function(y, rm) { - var x = this, Ctor = x.constructor; - x = new Ctor(x); - if (y == null) { - if (!x.d) - return x; - y = new Ctor(1); - rm = Ctor.rounding; - } else { - y = new Ctor(y); - if (rm === void 0) { - rm = Ctor.rounding; - } else { - checkInt32(rm, 0, 8); - } - if (!x.d) - return y.s ? x : y; - if (!y.d) { - if (y.s) - y.s = x.s; - return y; - } - } - if (y.d[0]) { - external = false; - x = divide(x, y, 0, rm, 1).times(y); - external = true; - finalise(x); - } else { - y.s = x.s; - x = y; - } - return x; -}; -P2.toNumber = function() { - return +this; -}; -P2.toOctal = function(sd, rm) { - return toStringBinary(this, 8, sd, rm); -}; -P2.toPower = P2.pow = function(y) { - var e2, k, pr, r2, rm, s, x = this, Ctor = x.constructor, yn = +(y = new Ctor(y)); - if (!x.d || !y.d || !x.d[0] || !y.d[0]) - return new Ctor(mathpow(+x, yn)); - x = new Ctor(x); - if (x.eq(1)) - return x; - pr = Ctor.precision; - rm = Ctor.rounding; - if (y.eq(1)) - return finalise(x, pr, rm); - e2 = mathfloor(y.e / LOG_BASE); - if (e2 >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { - r2 = intPow(Ctor, x, k, pr); - return y.s < 0 ? new Ctor(1).div(r2) : finalise(r2, pr, rm); - } - s = x.s; - if (s < 0) { - if (e2 < y.d.length - 1) - return new Ctor(NaN); - if ((y.d[e2] & 1) == 0) - s = 1; - if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { - x.s = s; - return x; - } - } - k = mathpow(+x, yn); - e2 = k == 0 || !isFinite(k) ? mathfloor(yn * (Math.log("0." + digitsToString(x.d)) / Math.LN10 + x.e + 1)) : new Ctor(k + "").e; - if (e2 > Ctor.maxE + 1 || e2 < Ctor.minE - 1) - return new Ctor(e2 > 0 ? s / 0 : 0); - external = false; - Ctor.rounding = x.s = 1; - k = Math.min(12, (e2 + "").length); - r2 = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); - if (r2.d) { - r2 = finalise(r2, pr + 5, 1); - if (checkRoundingDigits(r2.d, pr, rm)) { - e2 = pr + 10; - r2 = finalise(naturalExponential(y.times(naturalLogarithm(x, e2 + k)), e2), e2 + 5, 1); - if (+digitsToString(r2.d).slice(pr + 1, pr + 15) + 1 == 1e14) { - r2 = finalise(r2, pr + 1, 0); - } - } - } - r2.s = s; - external = true; - Ctor.rounding = rm; - return finalise(r2, pr, rm); -}; -P2.toPrecision = function(sd, rm) { - var str, x = this, Ctor = x.constructor; - if (sd === void 0) { - str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - } else { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - x = finalise(new Ctor(x), sd, rm); - str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); - } - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P2.toSignificantDigits = P2.toSD = function(sd, rm) { - var x = this, Ctor = x.constructor; - if (sd === void 0) { - sd = Ctor.precision; - rm = Ctor.rounding; - } else { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - } - return finalise(new Ctor(x), sd, rm); -}; -P2.toString = function() { - var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - return x.isNeg() && !x.isZero() ? "-" + str : str; -}; -P2.truncated = P2.trunc = function() { - return finalise(new this.constructor(this), this.e + 1, 1); -}; -P2.valueOf = P2.toJSON = function() { - var x = this, Ctor = x.constructor, str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); - return x.isNeg() ? "-" + str : str; -}; -function digitsToString(d2) { - var i, k, ws, indexOfLastWord = d2.length - 1, str = "", w2 = d2[0]; - if (indexOfLastWord > 0) { - str += w2; - for (i = 1; i < indexOfLastWord; i++) { - ws = d2[i] + ""; - k = LOG_BASE - ws.length; - if (k) - str += getZeroString(k); - str += ws; - } - w2 = d2[i]; - ws = w2 + ""; - k = LOG_BASE - ws.length; - if (k) - str += getZeroString(k); - } else if (w2 === 0) { - return "0"; - } - for (; w2 % 10 === 0; ) - w2 /= 10; - return str + w2; -} -__name(digitsToString, "digitsToString"); -function checkInt32(i, min2, max2) { - if (i !== ~~i || i < min2 || i > max2) { - throw Error(invalidArgument + i); - } -} -__name(checkInt32, "checkInt32"); -function checkRoundingDigits(d2, i, rm, repeating) { - var di, k, r2, rd; - for (k = d2[0]; k >= 10; k /= 10) - --i; - if (--i < 0) { - i += LOG_BASE; - di = 0; - } else { - di = Math.ceil((i + 1) / LOG_BASE); - i %= LOG_BASE; - } - k = mathpow(10, LOG_BASE - i); - rd = d2[di] % k | 0; - if (repeating == null) { - if (i < 3) { - if (i == 0) - rd = rd / 100 | 0; - else if (i == 1) - rd = rd / 10 | 0; - r2 = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 5e4 || rd == 0; - } else { - r2 = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && (d2[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || (rd == k / 2 || rd == 0) && (d2[di + 1] / k / 100 | 0) == 0; - } - } else { - if (i < 4) { - if (i == 0) - rd = rd / 1e3 | 0; - else if (i == 1) - rd = rd / 100 | 0; - else if (i == 2) - rd = rd / 10 | 0; - r2 = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; - } else { - r2 = ((repeating || rm < 4) && rd + 1 == k || !repeating && rm > 3 && rd + 1 == k / 2) && (d2[di + 1] / k / 1e3 | 0) == mathpow(10, i - 3) - 1; - } - } - return r2; -} -__name(checkRoundingDigits, "checkRoundingDigits"); -function convertBase(str, baseIn, baseOut) { - var j, arr = [0], arrL, i = 0, strL = str.length; - for (; i < strL; ) { - for (arrL = arr.length; arrL--; ) - arr[arrL] *= baseIn; - arr[0] += NUMERALS.indexOf(str.charAt(i++)); - for (j = 0; j < arr.length; j++) { - if (arr[j] > baseOut - 1) { - if (arr[j + 1] === void 0) - arr[j + 1] = 0; - arr[j + 1] += arr[j] / baseOut | 0; - arr[j] %= baseOut; - } - } - } - return arr.reverse(); -} -__name(convertBase, "convertBase"); -function cosine(Ctor, x) { - var k, len, y; - if (x.isZero()) - return x; - len = x.d.length; - if (len < 32) { - k = Math.ceil(len / 3); - y = (1 / tinyPow(4, k)).toString(); - } else { - k = 16; - y = "2.3283064365386962890625e-10"; - } - Ctor.precision += k; - x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); - for (var i = k; i--; ) { - var cos2x = x.times(x); - x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); - } - Ctor.precision -= k; - return x; -} -__name(cosine, "cosine"); -var divide = function() { - function multiplyInteger(x, k, base) { - var temp, carry = 0, i = x.length; - for (x = x.slice(); i--; ) { - temp = x[i] * k + carry; - x[i] = temp % base | 0; - carry = temp / base | 0; - } - if (carry) - x.unshift(carry); - return x; - } - __name(multiplyInteger, "multiplyInteger"); - function compare(a, b2, aL, bL) { - var i, r2; - if (aL != bL) { - r2 = aL > bL ? 1 : -1; - } else { - for (i = r2 = 0; i < aL; i++) { - if (a[i] != b2[i]) { - r2 = a[i] > b2[i] ? 1 : -1; - break; - } - } - } - return r2; - } - __name(compare, "compare"); - function subtract(a, b2, aL, base) { - var i = 0; - for (; aL--; ) { - a[aL] -= i; - i = a[aL] < b2[aL] ? 1 : 0; - a[aL] = i * base + a[aL] - b2[aL]; - } - for (; !a[0] && a.length > 1; ) - a.shift(); - } - __name(subtract, "subtract"); - return function(x, y, pr, rm, dp, base) { - var cmp, e2, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t2, xi, xL, yd0, yL, yz, Ctor = x.constructor, sign2 = x.s == y.s ? 1 : -1, xd = x.d, yd = y.d; - if (!xd || !xd[0] || !yd || !yd[0]) { - return new Ctor( - !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : xd && xd[0] == 0 || !yd ? sign2 * 0 : sign2 / 0 - ); - } - if (base) { - logBase = 1; - e2 = x.e - y.e; - } else { - base = BASE; - logBase = LOG_BASE; - e2 = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); - } - yL = yd.length; - xL = xd.length; - q = new Ctor(sign2); - qd = q.d = []; - for (i = 0; yd[i] == (xd[i] || 0); i++) - ; - if (yd[i] > (xd[i] || 0)) - e2--; - if (pr == null) { - sd = pr = Ctor.precision; - rm = Ctor.rounding; - } else if (dp) { - sd = pr + (x.e - y.e) + 1; - } else { - sd = pr; - } - if (sd < 0) { - qd.push(1); - more = true; - } else { - sd = sd / logBase + 2 | 0; - i = 0; - if (yL == 1) { - k = 0; - yd = yd[0]; - sd++; - for (; (i < xL || k) && sd--; i++) { - t2 = k * base + (xd[i] || 0); - qd[i] = t2 / yd | 0; - k = t2 % yd | 0; - } - more = k || i < xL; - } else { - k = base / (yd[0] + 1) | 0; - if (k > 1) { - yd = multiplyInteger(yd, k, base); - xd = multiplyInteger(xd, k, base); - yL = yd.length; - xL = xd.length; - } - xi = yL; - rem = xd.slice(0, yL); - remL = rem.length; - for (; remL < yL; ) - rem[remL++] = 0; - yz = yd.slice(); - yz.unshift(0); - yd0 = yd[0]; - if (yd[1] >= base / 2) - ++yd0; - do { - k = 0; - cmp = compare(yd, rem, yL, remL); - if (cmp < 0) { - rem0 = rem[0]; - if (yL != remL) - rem0 = rem0 * base + (rem[1] || 0); - k = rem0 / yd0 | 0; - if (k > 1) { - if (k >= base) - k = base - 1; - prod = multiplyInteger(yd, k, base); - prodL = prod.length; - remL = rem.length; - cmp = compare(prod, rem, prodL, remL); - if (cmp == 1) { - k--; - subtract(prod, yL < prodL ? yz : yd, prodL, base); - } - } else { - if (k == 0) - cmp = k = 1; - prod = yd.slice(); - } - prodL = prod.length; - if (prodL < remL) - prod.unshift(0); - subtract(rem, prod, remL, base); - if (cmp == -1) { - remL = rem.length; - cmp = compare(yd, rem, yL, remL); - if (cmp < 1) { - k++; - subtract(rem, yL < remL ? yz : yd, remL, base); - } - } - remL = rem.length; - } else if (cmp === 0) { - k++; - rem = [0]; - } - qd[i++] = k; - if (cmp && rem[0]) { - rem[remL++] = xd[xi] || 0; - } else { - rem = [xd[xi]]; - remL = 1; - } - } while ((xi++ < xL || rem[0] !== void 0) && sd--); - more = rem[0] !== void 0; - } - if (!qd[0]) - qd.shift(); - } - if (logBase == 1) { - q.e = e2; - inexact = more; - } else { - for (i = 1, k = qd[0]; k >= 10; k /= 10) - i++; - q.e = i + e2 * logBase - 1; - finalise(q, dp ? pr + q.e + 1 : pr, rm, more); - } - return q; - }; -}(); -function finalise(x, sd, rm, isTruncated) { - var digits, i, j, k, rd, roundUp, w2, xd, xdi, Ctor = x.constructor; - out: - if (sd != null) { - xd = x.d; - if (!xd) - return x; - for (digits = 1, k = xd[0]; k >= 10; k /= 10) - digits++; - i = sd - digits; - if (i < 0) { - i += LOG_BASE; - j = sd; - w2 = xd[xdi = 0]; - rd = w2 / mathpow(10, digits - j - 1) % 10 | 0; - } else { - xdi = Math.ceil((i + 1) / LOG_BASE); - k = xd.length; - if (xdi >= k) { - if (isTruncated) { - for (; k++ <= xdi; ) - xd.push(0); - w2 = rd = 0; - digits = 1; - i %= LOG_BASE; - j = i - LOG_BASE + 1; - } else { - break out; - } - } else { - w2 = k = xd[xdi]; - for (digits = 1; k >= 10; k /= 10) - digits++; - i %= LOG_BASE; - j = i - LOG_BASE + digits; - rd = j < 0 ? 0 : w2 / mathpow(10, digits - j - 1) % 10 | 0; - } - } - isTruncated = isTruncated || sd < 0 || xd[xdi + 1] !== void 0 || (j < 0 ? w2 : w2 % mathpow(10, digits - j - 1)); - roundUp = rm < 4 ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && (i > 0 ? j > 0 ? w2 / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7)); - if (sd < 1 || !xd[0]) { - xd.length = 0; - if (roundUp) { - sd -= x.e + 1; - xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); - x.e = -sd || 0; - } else { - xd[0] = x.e = 0; - } - return x; - } - if (i == 0) { - xd.length = xdi; - k = 1; - xdi--; - } else { - xd.length = xdi + 1; - k = mathpow(10, LOG_BASE - i); - xd[xdi] = j > 0 ? (w2 / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; - } - if (roundUp) { - for (; ; ) { - if (xdi == 0) { - for (i = 1, j = xd[0]; j >= 10; j /= 10) - i++; - j = xd[0] += k; - for (k = 1; j >= 10; j /= 10) - k++; - if (i != k) { - x.e++; - if (xd[0] == BASE) - xd[0] = 1; - } - break; - } else { - xd[xdi] += k; - if (xd[xdi] != BASE) - break; - xd[xdi--] = 0; - k = 1; - } - } - } - for (i = xd.length; xd[--i] === 0; ) - xd.pop(); - } - if (external) { - if (x.e > Ctor.maxE) { - x.d = null; - x.e = NaN; - } else if (x.e < Ctor.minE) { - x.e = 0; - x.d = [0]; - } - } - return x; -} -__name(finalise, "finalise"); -function finiteToString(x, isExp, sd) { - if (!x.isFinite()) - return nonFiniteToString(x); - var k, e2 = x.e, str = digitsToString(x.d), len = str.length; - if (isExp) { - if (sd && (k = sd - len) > 0) { - str = str.charAt(0) + "." + str.slice(1) + getZeroString(k); - } else if (len > 1) { - str = str.charAt(0) + "." + str.slice(1); - } - str = str + (x.e < 0 ? "e" : "e+") + x.e; - } else if (e2 < 0) { - str = "0." + getZeroString(-e2 - 1) + str; - if (sd && (k = sd - len) > 0) - str += getZeroString(k); - } else if (e2 >= len) { - str += getZeroString(e2 + 1 - len); - if (sd && (k = sd - e2 - 1) > 0) - str = str + "." + getZeroString(k); - } else { - if ((k = e2 + 1) < len) - str = str.slice(0, k) + "." + str.slice(k); - if (sd && (k = sd - len) > 0) { - if (e2 + 1 === len) - str += "."; - str += getZeroString(k); - } - } - return str; -} -__name(finiteToString, "finiteToString"); -function getBase10Exponent(digits, e2) { - var w2 = digits[0]; - for (e2 *= LOG_BASE; w2 >= 10; w2 /= 10) - e2++; - return e2; -} -__name(getBase10Exponent, "getBase10Exponent"); -function getLn10(Ctor, sd, pr) { - if (sd > LN10_PRECISION) { - external = true; - if (pr) - Ctor.precision = pr; - throw Error(precisionLimitExceeded); - } - return finalise(new Ctor(LN10), sd, 1, true); -} -__name(getLn10, "getLn10"); -function getPi(Ctor, sd, rm) { - if (sd > PI_PRECISION) - throw Error(precisionLimitExceeded); - return finalise(new Ctor(PI), sd, rm, true); -} -__name(getPi, "getPi"); -function getPrecision(digits) { - var w2 = digits.length - 1, len = w2 * LOG_BASE + 1; - w2 = digits[w2]; - if (w2) { - for (; w2 % 10 == 0; w2 /= 10) - len--; - for (w2 = digits[0]; w2 >= 10; w2 /= 10) - len++; - } - return len; -} -__name(getPrecision, "getPrecision"); -function getZeroString(k) { - var zs = ""; - for (; k--; ) - zs += "0"; - return zs; -} -__name(getZeroString, "getZeroString"); -function intPow(Ctor, x, n2, pr) { - var isTruncated, r2 = new Ctor(1), k = Math.ceil(pr / LOG_BASE + 4); - external = false; - for (; ; ) { - if (n2 % 2) { - r2 = r2.times(x); - if (truncate(r2.d, k)) - isTruncated = true; - } - n2 = mathfloor(n2 / 2); - if (n2 === 0) { - n2 = r2.d.length - 1; - if (isTruncated && r2.d[n2] === 0) - ++r2.d[n2]; - break; - } - x = x.times(x); - truncate(x.d, k); - } - external = true; - return r2; -} -__name(intPow, "intPow"); -function isOdd(n2) { - return n2.d[n2.d.length - 1] & 1; -} -__name(isOdd, "isOdd"); -function maxOrMin(Ctor, args, ltgt) { - var y, x = new Ctor(args[0]), i = 0; - for (; ++i < args.length; ) { - y = new Ctor(args[i]); - if (!y.s) { - x = y; - break; - } else if (x[ltgt](y)) { - x = y; - } - } - return x; -} -__name(maxOrMin, "maxOrMin"); -function naturalExponential(x, sd) { - var denominator, guard, j, pow2, sum3, t2, wpr, rep = 0, i = 0, k = 0, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; - if (!x.d || !x.d[0] || x.e > 17) { - return new Ctor(x.d ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 : x.s ? x.s < 0 ? 0 : x : 0 / 0); - } - if (sd == null) { - external = false; - wpr = pr; - } else { - wpr = sd; - } - t2 = new Ctor(0.03125); - while (x.e > -2) { - x = x.times(t2); - k += 5; - } - guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; - wpr += guard; - denominator = pow2 = sum3 = new Ctor(1); - Ctor.precision = wpr; - for (; ; ) { - pow2 = finalise(pow2.times(x), wpr, 1); - denominator = denominator.times(++i); - t2 = sum3.plus(divide(pow2, denominator, wpr, 1)); - if (digitsToString(t2.d).slice(0, wpr) === digitsToString(sum3.d).slice(0, wpr)) { - j = k; - while (j--) - sum3 = finalise(sum3.times(sum3), wpr, 1); - if (sd == null) { - if (rep < 3 && checkRoundingDigits(sum3.d, wpr - guard, rm, rep)) { - Ctor.precision = wpr += 10; - denominator = pow2 = t2 = new Ctor(1); - i = 0; - rep++; - } else { - return finalise(sum3, Ctor.precision = pr, rm, external = true); - } - } else { - Ctor.precision = pr; - return sum3; - } - } - sum3 = t2; - } -} -__name(naturalExponential, "naturalExponential"); -function naturalLogarithm(y, sd) { - var c, c0, denominator, e2, numerator, rep, sum3, t2, wpr, x1, x2, n2 = 1, guard = 10, x = y, xd = x.d, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision; - if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { - return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); - } - if (sd == null) { - external = false; - wpr = pr; - } else { - wpr = sd; - } - Ctor.precision = wpr += guard; - c = digitsToString(xd); - c0 = c.charAt(0); - if (Math.abs(e2 = x.e) < 15e14) { - while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { - x = x.times(y); - c = digitsToString(x.d); - c0 = c.charAt(0); - n2++; - } - e2 = x.e; - if (c0 > 1) { - x = new Ctor("0." + c); - e2++; - } else { - x = new Ctor(c0 + "." + c.slice(1)); - } - } else { - t2 = getLn10(Ctor, wpr + 2, pr).times(e2 + ""); - x = naturalLogarithm(new Ctor(c0 + "." + c.slice(1)), wpr - guard).plus(t2); - Ctor.precision = pr; - return sd == null ? finalise(x, pr, rm, external = true) : x; - } - x1 = x; - sum3 = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); - x2 = finalise(x.times(x), wpr, 1); - denominator = 3; - for (; ; ) { - numerator = finalise(numerator.times(x2), wpr, 1); - t2 = sum3.plus(divide(numerator, new Ctor(denominator), wpr, 1)); - if (digitsToString(t2.d).slice(0, wpr) === digitsToString(sum3.d).slice(0, wpr)) { - sum3 = sum3.times(2); - if (e2 !== 0) - sum3 = sum3.plus(getLn10(Ctor, wpr + 2, pr).times(e2 + "")); - sum3 = divide(sum3, new Ctor(n2), wpr, 1); - if (sd == null) { - if (checkRoundingDigits(sum3.d, wpr - guard, rm, rep)) { - Ctor.precision = wpr += guard; - t2 = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); - x2 = finalise(x.times(x), wpr, 1); - denominator = rep = 1; - } else { - return finalise(sum3, Ctor.precision = pr, rm, external = true); - } - } else { - Ctor.precision = pr; - return sum3; - } - } - sum3 = t2; - denominator += 2; - } -} -__name(naturalLogarithm, "naturalLogarithm"); -function nonFiniteToString(x) { - return String(x.s * x.s / 0); -} -__name(nonFiniteToString, "nonFiniteToString"); -function parseDecimal(x, str) { - var e2, i, len; - if ((e2 = str.indexOf(".")) > -1) - str = str.replace(".", ""); - if ((i = str.search(/e/i)) > 0) { - if (e2 < 0) - e2 = i; - e2 += +str.slice(i + 1); - str = str.substring(0, i); - } else if (e2 < 0) { - e2 = str.length; - } - for (i = 0; str.charCodeAt(i) === 48; i++) - ; - for (len = str.length; str.charCodeAt(len - 1) === 48; --len) - ; - str = str.slice(i, len); - if (str) { - len -= i; - x.e = e2 = e2 - i - 1; - x.d = []; - i = (e2 + 1) % LOG_BASE; - if (e2 < 0) - i += LOG_BASE; - if (i < len) { - if (i) - x.d.push(+str.slice(0, i)); - for (len -= LOG_BASE; i < len; ) - x.d.push(+str.slice(i, i += LOG_BASE)); - str = str.slice(i); - i = LOG_BASE - str.length; - } else { - i -= len; - } - for (; i--; ) - str += "0"; - x.d.push(+str); - if (external) { - if (x.e > x.constructor.maxE) { - x.d = null; - x.e = NaN; - } else if (x.e < x.constructor.minE) { - x.e = 0; - x.d = [0]; - } - } - } else { - x.e = 0; - x.d = [0]; - } - return x; -} -__name(parseDecimal, "parseDecimal"); -function parseOther(x, str) { - var base, Ctor, divisor, i, isFloat, len, p2, xd, xe; - if (str.indexOf("_") > -1) { - str = str.replace(/(\d)_(?=\d)/g, "$1"); - if (isDecimal.test(str)) - return parseDecimal(x, str); - } else if (str === "Infinity" || str === "NaN") { - if (!+str) - x.s = NaN; - x.e = NaN; - x.d = null; - return x; - } - if (isHex.test(str)) { - base = 16; - str = str.toLowerCase(); - } else if (isBinary.test(str)) { - base = 2; - } else if (isOctal.test(str)) { - base = 8; - } else { - throw Error(invalidArgument + str); - } - i = str.search(/p/i); - if (i > 0) { - p2 = +str.slice(i + 1); - str = str.substring(2, i); - } else { - str = str.slice(2); - } - i = str.indexOf("."); - isFloat = i >= 0; - Ctor = x.constructor; - if (isFloat) { - str = str.replace(".", ""); - len = str.length; - i = len - i; - divisor = intPow(Ctor, new Ctor(base), i, i * 2); - } - xd = convertBase(str, base, BASE); - xe = xd.length - 1; - for (i = xe; xd[i] === 0; --i) - xd.pop(); - if (i < 0) - return new Ctor(x.s * 0); - x.e = getBase10Exponent(xd, xe); - x.d = xd; - external = false; - if (isFloat) - x = divide(x, divisor, len * 4); - if (p2) - x = x.times(Math.abs(p2) < 54 ? mathpow(2, p2) : Decimal.pow(2, p2)); - external = true; - return x; -} -__name(parseOther, "parseOther"); -function sine(Ctor, x) { - var k, len = x.d.length; - if (len < 3) { - return x.isZero() ? x : taylorSeries(Ctor, 2, x, x); - } - k = 1.4 * Math.sqrt(len); - k = k > 16 ? 16 : k | 0; - x = x.times(1 / tinyPow(5, k)); - x = taylorSeries(Ctor, 2, x, x); - var sin2_x, d5 = new Ctor(5), d16 = new Ctor(16), d20 = new Ctor(20); - for (; k--; ) { - sin2_x = x.times(x); - x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); - } - return x; -} -__name(sine, "sine"); -function taylorSeries(Ctor, n2, x, y, isHyperbolic) { - var j, t2, u, x2, i = 1, pr = Ctor.precision, k = Math.ceil(pr / LOG_BASE); - external = false; - x2 = x.times(x); - u = new Ctor(y); - for (; ; ) { - t2 = divide(u.times(x2), new Ctor(n2++ * n2++), pr, 1); - u = isHyperbolic ? y.plus(t2) : y.minus(t2); - y = divide(t2.times(x2), new Ctor(n2++ * n2++), pr, 1); - t2 = u.plus(y); - if (t2.d[k] !== void 0) { - for (j = k; t2.d[j] === u.d[j] && j--; ) - ; - if (j == -1) - break; - } - j = u; - u = y; - y = t2; - t2 = j; - i++; - } - external = true; - t2.d.length = k + 1; - return t2; -} -__name(taylorSeries, "taylorSeries"); -function tinyPow(b2, e2) { - var n2 = b2; - while (--e2) - n2 *= b2; - return n2; -} -__name(tinyPow, "tinyPow"); -function toLessThanHalfPi(Ctor, x) { - var t2, isNeg = x.s < 0, pi = getPi(Ctor, Ctor.precision, 1), halfPi = pi.times(0.5); - x = x.abs(); - if (x.lte(halfPi)) { - quadrant = isNeg ? 4 : 1; - return x; - } - t2 = x.divToInt(pi); - if (t2.isZero()) { - quadrant = isNeg ? 3 : 2; - } else { - x = x.minus(t2.times(pi)); - if (x.lte(halfPi)) { - quadrant = isOdd(t2) ? isNeg ? 2 : 3 : isNeg ? 4 : 1; - return x; - } - quadrant = isOdd(t2) ? isNeg ? 1 : 4 : isNeg ? 3 : 2; - } - return x.minus(pi).abs(); -} -__name(toLessThanHalfPi, "toLessThanHalfPi"); -function toStringBinary(x, baseOut, sd, rm) { - var base, e2, i, k, len, roundUp, str, xd, y, Ctor = x.constructor, isExp = sd !== void 0; - if (isExp) { - checkInt32(sd, 1, MAX_DIGITS); - if (rm === void 0) - rm = Ctor.rounding; - else - checkInt32(rm, 0, 8); - } else { - sd = Ctor.precision; - rm = Ctor.rounding; - } - if (!x.isFinite()) { - str = nonFiniteToString(x); - } else { - str = finiteToString(x); - i = str.indexOf("."); - if (isExp) { - base = 2; - if (baseOut == 16) { - sd = sd * 4 - 3; - } else if (baseOut == 8) { - sd = sd * 3 - 2; - } - } else { - base = baseOut; - } - if (i >= 0) { - str = str.replace(".", ""); - y = new Ctor(1); - y.e = str.length - i; - y.d = convertBase(finiteToString(y), 10, base); - y.e = y.d.length; - } - xd = convertBase(str, 10, base); - e2 = len = xd.length; - for (; xd[--len] == 0; ) - xd.pop(); - if (!xd[0]) { - str = isExp ? "0p+0" : "0"; - } else { - if (i < 0) { - e2--; - } else { - x = new Ctor(x); - x.d = xd; - x.e = e2; - x = divide(x, y, sd, rm, 0, base); - xd = x.d; - e2 = x.e; - roundUp = inexact; - } - i = xd[sd]; - k = base / 2; - roundUp = roundUp || xd[sd + 1] !== void 0; - roundUp = rm < 4 ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || rm === (x.s < 0 ? 8 : 7)); - xd.length = sd; - if (roundUp) { - for (; ++xd[--sd] > base - 1; ) { - xd[sd] = 0; - if (!sd) { - ++e2; - xd.unshift(1); - } - } - } - for (len = xd.length; !xd[len - 1]; --len) - ; - for (i = 0, str = ""; i < len; i++) - str += NUMERALS.charAt(xd[i]); - if (isExp) { - if (len > 1) { - if (baseOut == 16 || baseOut == 8) { - i = baseOut == 16 ? 4 : 3; - for (--len; len % i; len++) - str += "0"; - xd = convertBase(str, base, baseOut); - for (len = xd.length; !xd[len - 1]; --len) - ; - for (i = 1, str = "1."; i < len; i++) - str += NUMERALS.charAt(xd[i]); - } else { - str = str.charAt(0) + "." + str.slice(1); - } - } - str = str + (e2 < 0 ? "p" : "p+") + e2; - } else if (e2 < 0) { - for (; ++e2; ) - str = "0" + str; - str = "0." + str; - } else { - if (++e2 > len) - for (e2 -= len; e2--; ) - str += "0"; - else if (e2 < len) - str = str.slice(0, e2) + "." + str.slice(e2); - } - } - str = (baseOut == 16 ? "0x" : baseOut == 2 ? "0b" : baseOut == 8 ? "0o" : "") + str; - } - return x.s < 0 ? "-" + str : str; -} -__name(toStringBinary, "toStringBinary"); -function truncate(arr, len) { - if (arr.length > len) { - arr.length = len; - return true; - } -} -__name(truncate, "truncate"); -function abs(x) { - return new this(x).abs(); -} -__name(abs, "abs"); -function acos(x) { - return new this(x).acos(); -} -__name(acos, "acos"); -function acosh(x) { - return new this(x).acosh(); -} -__name(acosh, "acosh"); -function add(x, y) { - return new this(x).plus(y); -} -__name(add, "add"); -function asin(x) { - return new this(x).asin(); -} -__name(asin, "asin"); -function asinh(x) { - return new this(x).asinh(); -} -__name(asinh, "asinh"); -function atan(x) { - return new this(x).atan(); -} -__name(atan, "atan"); -function atanh(x) { - return new this(x).atanh(); -} -__name(atanh, "atanh"); -function atan2(y, x) { - y = new this(y); - x = new this(x); - var r2, pr = this.precision, rm = this.rounding, wpr = pr + 4; - if (!y.s || !x.s) { - r2 = new this(NaN); - } else if (!y.d && !x.d) { - r2 = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); - r2.s = y.s; - } else if (!x.d || y.isZero()) { - r2 = x.s < 0 ? getPi(this, pr, rm) : new this(0); - r2.s = y.s; - } else if (!y.d || x.isZero()) { - r2 = getPi(this, wpr, 1).times(0.5); - r2.s = y.s; - } else if (x.s < 0) { - this.precision = wpr; - this.rounding = 1; - r2 = this.atan(divide(y, x, wpr, 1)); - x = getPi(this, wpr, 1); - this.precision = pr; - this.rounding = rm; - r2 = y.s < 0 ? r2.minus(x) : r2.plus(x); - } else { - r2 = this.atan(divide(y, x, wpr, 1)); - } - return r2; -} -__name(atan2, "atan2"); -function cbrt(x) { - return new this(x).cbrt(); -} -__name(cbrt, "cbrt"); -function ceil(x) { - return finalise(x = new this(x), x.e + 1, 2); -} -__name(ceil, "ceil"); -function clamp(x, min2, max2) { - return new this(x).clamp(min2, max2); -} -__name(clamp, "clamp"); -function config(obj) { - if (!obj || typeof obj !== "object") - throw Error(decimalError + "Object expected"); - var i, p2, v, useDefaults = obj.defaults === true, ps = [ - "precision", - 1, - MAX_DIGITS, - "rounding", - 0, - 8, - "toExpNeg", - -EXP_LIMIT, - 0, - "toExpPos", - 0, - EXP_LIMIT, - "maxE", - 0, - EXP_LIMIT, - "minE", - -EXP_LIMIT, - 0, - "modulo", - 0, - 9 - ]; - for (i = 0; i < ps.length; i += 3) { - if (p2 = ps[i], useDefaults) - this[p2] = DEFAULTS[p2]; - if ((v = obj[p2]) !== void 0) { - if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) - this[p2] = v; - else - throw Error(invalidArgument + p2 + ": " + v); - } - } - if (p2 = "crypto", useDefaults) - this[p2] = DEFAULTS[p2]; - if ((v = obj[p2]) !== void 0) { - if (v === true || v === false || v === 0 || v === 1) { - if (v) { - if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) { - this[p2] = true; - } else { - throw Error(cryptoUnavailable); - } - } else { - this[p2] = false; - } - } else { - throw Error(invalidArgument + p2 + ": " + v); - } - } - return this; -} -__name(config, "config"); -function cos(x) { - return new this(x).cos(); -} -__name(cos, "cos"); -function cosh(x) { - return new this(x).cosh(); -} -__name(cosh, "cosh"); -function clone(obj) { - var i, p2, ps; - function Decimal2(v) { - var e2, i2, t2, x = this; - if (!(x instanceof Decimal2)) - return new Decimal2(v); - x.constructor = Decimal2; - if (isDecimalInstance(v)) { - x.s = v.s; - if (external) { - if (!v.d || v.e > Decimal2.maxE) { - x.e = NaN; - x.d = null; - } else if (v.e < Decimal2.minE) { - x.e = 0; - x.d = [0]; - } else { - x.e = v.e; - x.d = v.d.slice(); - } - } else { - x.e = v.e; - x.d = v.d ? v.d.slice() : v.d; - } - return; - } - t2 = typeof v; - if (t2 === "number") { - if (v === 0) { - x.s = 1 / v < 0 ? -1 : 1; - x.e = 0; - x.d = [0]; - return; - } - if (v < 0) { - v = -v; - x.s = -1; - } else { - x.s = 1; - } - if (v === ~~v && v < 1e7) { - for (e2 = 0, i2 = v; i2 >= 10; i2 /= 10) - e2++; - if (external) { - if (e2 > Decimal2.maxE) { - x.e = NaN; - x.d = null; - } else if (e2 < Decimal2.minE) { - x.e = 0; - x.d = [0]; - } else { - x.e = e2; - x.d = [v]; - } - } else { - x.e = e2; - x.d = [v]; - } - return; - } else if (v * 0 !== 0) { - if (!v) - x.s = NaN; - x.e = NaN; - x.d = null; - return; - } - return parseDecimal(x, v.toString()); - } else if (t2 !== "string") { - throw Error(invalidArgument + v); - } - if ((i2 = v.charCodeAt(0)) === 45) { - v = v.slice(1); - x.s = -1; - } else { - if (i2 === 43) - v = v.slice(1); - x.s = 1; - } - return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); - } - __name(Decimal2, "Decimal"); - Decimal2.prototype = P2; - Decimal2.ROUND_UP = 0; - Decimal2.ROUND_DOWN = 1; - Decimal2.ROUND_CEIL = 2; - Decimal2.ROUND_FLOOR = 3; - Decimal2.ROUND_HALF_UP = 4; - Decimal2.ROUND_HALF_DOWN = 5; - Decimal2.ROUND_HALF_EVEN = 6; - Decimal2.ROUND_HALF_CEIL = 7; - Decimal2.ROUND_HALF_FLOOR = 8; - Decimal2.EUCLID = 9; - Decimal2.config = Decimal2.set = config; - Decimal2.clone = clone; - Decimal2.isDecimal = isDecimalInstance; - Decimal2.abs = abs; - Decimal2.acos = acos; - Decimal2.acosh = acosh; - Decimal2.add = add; - Decimal2.asin = asin; - Decimal2.asinh = asinh; - Decimal2.atan = atan; - Decimal2.atanh = atanh; - Decimal2.atan2 = atan2; - Decimal2.cbrt = cbrt; - Decimal2.ceil = ceil; - Decimal2.clamp = clamp; - Decimal2.cos = cos; - Decimal2.cosh = cosh; - Decimal2.div = div; - Decimal2.exp = exp; - Decimal2.floor = floor; - Decimal2.hypot = hypot; - Decimal2.ln = ln; - Decimal2.log = log2; - Decimal2.log10 = log10; - Decimal2.log2 = log22; - Decimal2.max = max; - Decimal2.min = min; - Decimal2.mod = mod; - Decimal2.mul = mul; - Decimal2.pow = pow; - Decimal2.random = random; - Decimal2.round = round; - Decimal2.sign = sign; - Decimal2.sin = sin; - Decimal2.sinh = sinh; - Decimal2.sqrt = sqrt; - Decimal2.sub = sub; - Decimal2.sum = sum; - Decimal2.tan = tan; - Decimal2.tanh = tanh; - Decimal2.trunc = trunc; - if (obj === void 0) - obj = {}; - if (obj) { - if (obj.defaults !== true) { - ps = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"]; - for (i = 0; i < ps.length; ) - if (!obj.hasOwnProperty(p2 = ps[i++])) - obj[p2] = this[p2]; - } - } - Decimal2.config(obj); - return Decimal2; -} -__name(clone, "clone"); -function div(x, y) { - return new this(x).div(y); -} -__name(div, "div"); -function exp(x) { - return new this(x).exp(); -} -__name(exp, "exp"); -function floor(x) { - return finalise(x = new this(x), x.e + 1, 3); -} -__name(floor, "floor"); -function hypot() { - var i, n2, t2 = new this(0); - external = false; - for (i = 0; i < arguments.length; ) { - n2 = new this(arguments[i++]); - if (!n2.d) { - if (n2.s) { - external = true; - return new this(1 / 0); - } - t2 = n2; - } else if (t2.d) { - t2 = t2.plus(n2.times(n2)); - } - } - external = true; - return t2.sqrt(); -} -__name(hypot, "hypot"); -function isDecimalInstance(obj) { - return obj instanceof Decimal || obj && obj.toStringTag === tag || false; -} -__name(isDecimalInstance, "isDecimalInstance"); -function ln(x) { - return new this(x).ln(); -} -__name(ln, "ln"); -function log2(x, y) { - return new this(x).log(y); -} -__name(log2, "log"); -function log22(x) { - return new this(x).log(2); -} -__name(log22, "log2"); -function log10(x) { - return new this(x).log(10); -} -__name(log10, "log10"); -function max() { - return maxOrMin(this, arguments, "lt"); -} -__name(max, "max"); -function min() { - return maxOrMin(this, arguments, "gt"); -} -__name(min, "min"); -function mod(x, y) { - return new this(x).mod(y); -} -__name(mod, "mod"); -function mul(x, y) { - return new this(x).mul(y); -} -__name(mul, "mul"); -function pow(x, y) { - return new this(x).pow(y); -} -__name(pow, "pow"); -function random(sd) { - var d2, e2, k, n2, i = 0, r2 = new this(1), rd = []; - if (sd === void 0) - sd = this.precision; - else - checkInt32(sd, 1, MAX_DIGITS); - k = Math.ceil(sd / LOG_BASE); - if (!this.crypto) { - for (; i < k; ) - rd[i++] = Math.random() * 1e7 | 0; - } else if (crypto.getRandomValues) { - d2 = crypto.getRandomValues(new Uint32Array(k)); - for (; i < k; ) { - n2 = d2[i]; - if (n2 >= 429e7) { - d2[i] = crypto.getRandomValues(new Uint32Array(1))[0]; - } else { - rd[i++] = n2 % 1e7; - } - } - } else if (crypto.randomBytes) { - d2 = crypto.randomBytes(k *= 4); - for (; i < k; ) { - n2 = d2[i] + (d2[i + 1] << 8) + (d2[i + 2] << 16) + ((d2[i + 3] & 127) << 24); - if (n2 >= 214e7) { - crypto.randomBytes(4).copy(d2, i); - } else { - rd.push(n2 % 1e7); - i += 4; - } - } - i = k / 4; - } else { - throw Error(cryptoUnavailable); - } - k = rd[--i]; - sd %= LOG_BASE; - if (k && sd) { - n2 = mathpow(10, LOG_BASE - sd); - rd[i] = (k / n2 | 0) * n2; - } - for (; rd[i] === 0; i--) - rd.pop(); - if (i < 0) { - e2 = 0; - rd = [0]; - } else { - e2 = -1; - for (; rd[0] === 0; e2 -= LOG_BASE) - rd.shift(); - for (k = 1, n2 = rd[0]; n2 >= 10; n2 /= 10) - k++; - if (k < LOG_BASE) - e2 -= LOG_BASE - k; - } - r2.e = e2; - r2.d = rd; - return r2; -} -__name(random, "random"); -function round(x) { - return finalise(x = new this(x), x.e + 1, this.rounding); -} -__name(round, "round"); -function sign(x) { - x = new this(x); - return x.d ? x.d[0] ? x.s : 0 * x.s : x.s || NaN; -} -__name(sign, "sign"); -function sin(x) { - return new this(x).sin(); -} -__name(sin, "sin"); -function sinh(x) { - return new this(x).sinh(); -} -__name(sinh, "sinh"); -function sqrt(x) { - return new this(x).sqrt(); -} -__name(sqrt, "sqrt"); -function sub(x, y) { - return new this(x).sub(y); -} -__name(sub, "sub"); -function sum() { - var i = 0, args = arguments, x = new this(args[i]); - external = false; - for (; x.s && ++i < args.length; ) - x = x.plus(args[i]); - external = true; - return finalise(x, this.precision, this.rounding); -} -__name(sum, "sum"); -function tan(x) { - return new this(x).tan(); -} -__name(tan, "tan"); -function tanh(x) { - return new this(x).tanh(); -} -__name(tanh, "tanh"); -function trunc(x) { - return finalise(x = new this(x), x.e + 1, 1); -} -__name(trunc, "trunc"); -P2[Symbol.for("nodejs.util.inspect.custom")] = P2.toString; -P2[Symbol.toStringTag] = "Decimal"; -var Decimal = P2.constructor = clone(DEFAULTS); -LN10 = new Decimal(LN10); -PI = new Decimal(PI); -var decimal_default = Decimal; - -// src/runtime/utils/common.ts -var import_indent_string2 = __toESM(require_indent_string()); -var import_js_levenshtein = __toESM(require_js_levenshtein()); - -// src/runtime/core/model/FieldRef.ts -var FieldRefImpl = class { - constructor(modelName, name, fieldType, isList) { - this.modelName = modelName; - this.name = name; - this.typeName = fieldType; - this.isList = isList; - } - _toGraphQLInputType() { - const prefix = this.isList ? `List${this.typeName}` : this.typeName; - return `${prefix}FieldRefInput<${this.modelName}>`; - } -}; -__name(FieldRefImpl, "FieldRefImpl"); - -// src/runtime/object-enums.ts -var objectEnumNames = ["JsonNullValueInput", "NullableJsonNullValueInput", "JsonNullValueFilter"]; -var secret = Symbol(); -var representations = /* @__PURE__ */ new WeakMap(); -var ObjectEnumValue = class { - constructor(arg2) { - if (arg2 === secret) { - representations.set(this, `Prisma.${this._getName()}`); - } else { - representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - } - _getName() { - return this.constructor.name; - } - toString() { - return representations.get(this); - } -}; -__name(ObjectEnumValue, "ObjectEnumValue"); -var NullTypesEnumValue = class extends ObjectEnumValue { - _getNamespace() { - return "NullTypes"; - } -}; -__name(NullTypesEnumValue, "NullTypesEnumValue"); -var DbNull = class extends NullTypesEnumValue { -}; -__name(DbNull, "DbNull"); -var JsonNull = class extends NullTypesEnumValue { -}; -__name(JsonNull, "JsonNull"); -var AnyNull = class extends NullTypesEnumValue { -}; -__name(AnyNull, "AnyNull"); -var objectEnumValues = { - classes: { - DbNull, - JsonNull, - AnyNull - }, - instances: { - DbNull: new DbNull(secret), - JsonNull: new JsonNull(secret), - AnyNull: new AnyNull(secret) - } -}; - -// src/runtime/utils/decimalJsLike.ts -function isDecimalJsLike(value) { - if (Decimal.isDecimal(value)) { - return true; - } - return value !== null && typeof value === "object" && typeof value.s === "number" && typeof value.e === "number" && Array.isArray(value.d); -} -__name(isDecimalJsLike, "isDecimalJsLike"); -function stringifyDecimalJsLike(value) { - if (Decimal.isDecimal(value)) { - return JSON.stringify(String(value)); - } - const tmpDecimal = new Decimal(0); - tmpDecimal.d = value.d; - tmpDecimal.e = value.e; - tmpDecimal.s = value.s; - return JSON.stringify(String(tmpDecimal)); -} -__name(stringifyDecimalJsLike, "stringifyDecimalJsLike"); - -// src/runtime/utils/common.ts -var keyBy2 = /* @__PURE__ */ __name((collection, prop) => { - const acc = {}; - for (const obj of collection) { - const key = obj[prop]; - acc[key] = obj; - } - return acc; -}, "keyBy"); -var ScalarTypeTable = { - String: true, - Int: true, - Float: true, - Boolean: true, - Long: true, - DateTime: true, - ID: true, - UUID: true, - Json: true, - Bytes: true, - Decimal: true, - BigInt: true -}; -var JSTypeToGraphQLType = { - string: "String", - boolean: "Boolean", - object: "Json", - symbol: "Symbol" -}; -function stringifyGraphQLType(type) { - if (typeof type === "string") { - return type; - } - return type.name; -} -__name(stringifyGraphQLType, "stringifyGraphQLType"); -function wrapWithList(str, isList) { - if (isList) { - return `List<${str}>`; - } - return str; -} -__name(wrapWithList, "wrapWithList"); -var RFC_3339_REGEX = /^(\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60))(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/; -var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; -function getGraphQLType(value, inputType) { - const potentialType = inputType == null ? void 0 : inputType.type; - if (value === null) { - return "null"; - } - if (Object.prototype.toString.call(value) === "[object BigInt]") { - return "BigInt"; - } - if (decimal_default.isDecimal(value)) { - return "Decimal"; - } - if (potentialType === "Decimal" && isDecimalJsLike(value)) { - return "Decimal"; - } - if (Buffer.isBuffer(value)) { - return "Bytes"; - } - if (isValidEnumValue(value, inputType)) { - return potentialType.name; - } - if (value instanceof ObjectEnumValue) { - return value._getName(); - } - if (value instanceof FieldRefImpl) { - return value._toGraphQLInputType(); - } - if (Array.isArray(value)) { - let scalarTypes = value.reduce((acc, val) => { - const type = getGraphQLType(val, inputType); - if (!acc.includes(type)) { - acc.push(type); - } - return acc; - }, []); - if (scalarTypes.includes("Float") && scalarTypes.includes("Int")) { - scalarTypes = ["Float"]; - } - return `List<${scalarTypes.join(" | ")}>`; - } - const jsType = typeof value; - if (jsType === "number") { - if (Math.trunc(value) === value) { - return "Int"; - } else { - return "Float"; - } - } - if (Object.prototype.toString.call(value) === "[object Date]") { - return "DateTime"; - } - if (jsType === "string") { - if (UUID_REGEX.test(value)) { - return "UUID"; - } - const date = new Date(value); - if (date.toString() === "Invalid Date") { - return "String"; - } - if (RFC_3339_REGEX.test(value)) { - return "DateTime"; - } - } - return JSTypeToGraphQLType[jsType]; -} -__name(getGraphQLType, "getGraphQLType"); -function isValidEnumValue(value, inputType) { - var _a3; - const enumType = inputType == null ? void 0 : inputType.type; - if (!isSchemaEnum(enumType)) { - return false; - } - if ((inputType == null ? void 0 : inputType.namespace) === "prisma" && objectEnumNames.includes(enumType.name)) { - const name = (_a3 = value == null ? void 0 : value.constructor) == null ? void 0 : _a3.name; - return typeof name === "string" && objectEnumValues.instances[name] === value && enumType.values.includes(name); - } - return typeof value === "string" && enumType.values.includes(value); -} -__name(isValidEnumValue, "isValidEnumValue"); -function getSuggestion(str, possibilities) { - const bestMatch = possibilities.reduce( - (acc, curr) => { - const distance = (0, import_js_levenshtein.default)(str, curr); - if (distance < acc.distance) { - return { - distance, - str: curr - }; - } - return acc; - }, - { - distance: Math.min(Math.floor(str.length) * 1.1, ...possibilities.map((p2) => p2.length * 3)), - str: null - } - ); - return bestMatch.str; -} -__name(getSuggestion, "getSuggestion"); -function stringifyInputType(input, greenKeys = false) { - if (typeof input === "string") { - return input; - } - if (input.values) { - return `enum ${input.name} { -${(0, import_indent_string2.default)(input.values.join(", "), 2)} -}`; - } else { - const body = (0, import_indent_string2.default)( - input.fields.map((arg2) => { - const key = `${arg2.name}`; - const str = `${greenKeys ? import_chalk7.default.green(key) : key}${arg2.isRequired ? "" : "?"}: ${import_chalk7.default.white( - arg2.inputTypes.map((argType) => { - return wrapWithList( - argIsInputType(argType.type) ? argType.type.name : stringifyGraphQLType(argType.type), - argType.isList - ); - }).join(" | ") - )}`; - if (!arg2.isRequired) { - return import_chalk7.default.dim(str); - } - return str; - }).join("\n"), - 2 - ); - return `${import_chalk7.default.dim("type")} ${import_chalk7.default.bold.dim(input.name)} ${import_chalk7.default.dim("{")} -${body} -${import_chalk7.default.dim("}")}`; - } -} -__name(stringifyInputType, "stringifyInputType"); -function argIsInputType(arg2) { - if (typeof arg2 === "string") { - return false; - } - return true; -} -__name(argIsInputType, "argIsInputType"); -function getInputTypeName(input) { - if (typeof input === "string") { - if (input === "Null") { - return "null"; - } - return input; - } - return input.name; -} -__name(getInputTypeName, "getInputTypeName"); -function getOutputTypeName(input) { - if (typeof input === "string") { - return input; - } - return input.name; -} -__name(getOutputTypeName, "getOutputTypeName"); -function inputTypeToJson(input, isRequired, nameOnly = false) { - if (typeof input === "string") { - if (input === "Null") { - return "null"; - } - return input; - } - if (input.values) { - return input.values.join(" | "); - } - const inputType = input; - const showDeepType = isRequired && inputType.fields.every( - (arg2) => { - var _a3; - return arg2.inputTypes[0].location === "inputObjectTypes" || ((_a3 = arg2.inputTypes[1]) == null ? void 0 : _a3.location) === "inputObjectTypes"; - } - ); - if (nameOnly) { - return getInputTypeName(input); - } - return inputType.fields.reduce((acc, curr) => { - let str = ""; - if (!showDeepType && !curr.isRequired) { - str = curr.inputTypes.map((argType) => getInputTypeName(argType.type)).join(" | "); - } else { - str = curr.inputTypes.map((argInputType) => inputTypeToJson(argInputType.type, curr.isRequired, true)).join(" | "); - } - acc[curr.name + (curr.isRequired ? "" : "?")] = str; - return acc; - }, {}); -} -__name(inputTypeToJson, "inputTypeToJson"); -function unionBy(arr1, arr2, iteratee) { - const map = {}; - for (const element of arr1) { - map[iteratee(element)] = element; - } - for (const element of arr2) { - const key = iteratee(element); - if (!map[key]) { - map[key] = element; - } - } - return Object.values(map); -} -__name(unionBy, "unionBy"); -function lowerCase(name) { - return name.substring(0, 1).toLowerCase() + name.substring(1); -} -__name(lowerCase, "lowerCase"); -function isGroupByOutputName(type) { - return type.endsWith("GroupByOutputType"); -} -__name(isGroupByOutputName, "isGroupByOutputName"); -function isSchemaEnum(type) { - return typeof type === "object" && type !== null && typeof type.name === "string" && Array.isArray(type.values); -} -__name(isSchemaEnum, "isSchemaEnum"); - -// src/runtime/dmmf.ts -var DMMFDatamodelHelper = class { - constructor({ datamodel }) { - this.datamodel = datamodel; - this.datamodelEnumMap = this.getDatamodelEnumMap(); - this.modelMap = this.getModelMap(); - this.typeMap = this.getTypeMap(); - this.typeAndModelMap = this.getTypeModelMap(); - } - getDatamodelEnumMap() { - return keyBy2(this.datamodel.enums, "name"); - } - getModelMap() { - return { ...keyBy2(this.datamodel.models, "name") }; - } - getTypeMap() { - return { ...keyBy2(this.datamodel.types, "name") }; - } - getTypeModelMap() { - return { ...this.getTypeMap(), ...this.getModelMap() }; - } -}; -__name(DMMFDatamodelHelper, "DMMFDatamodelHelper"); -var DMMFMappingsHelper = class { - constructor({ mappings }) { - this.mappings = mappings; - this.mappingsMap = this.getMappingsMap(); - } - getMappingsMap() { - return keyBy2(this.mappings.modelOperations, "model"); - } -}; -__name(DMMFMappingsHelper, "DMMFMappingsHelper"); -var DMMFSchemaHelper = class { - constructor({ schema }) { - this.outputTypeToMergedOutputType = /* @__PURE__ */ __name((outputType) => { - return { - ...outputType, - fields: outputType.fields - }; - }, "outputTypeToMergedOutputType"); - this.schema = schema; - this.enumMap = this.getEnumMap(); - this.queryType = this.getQueryType(); - this.mutationType = this.getMutationType(); - this.outputTypes = this.getOutputTypes(); - this.outputTypeMap = this.getMergedOutputTypeMap(); - this.resolveOutputTypes(); - this.inputObjectTypes = this.schema.inputObjectTypes; - this.inputTypeMap = this.getInputTypeMap(); - this.resolveInputTypes(); - this.resolveFieldArgumentTypes(); - this.queryType = this.outputTypeMap.Query; - this.mutationType = this.outputTypeMap.Mutation; - this.rootFieldMap = this.getRootFieldMap(); - } - get [Symbol.toStringTag]() { - return "DMMFClass"; - } - resolveOutputTypes() { - for (const type of this.outputTypes.model) { - for (const field of type.fields) { - if (typeof field.outputType.type === "string" && !ScalarTypeTable[field.outputType.type]) { - field.outputType.type = this.outputTypeMap[field.outputType.type] || this.outputTypeMap[field.outputType.type] || this.enumMap[field.outputType.type] || field.outputType.type; - } - } - type.fieldMap = keyBy2(type.fields, "name"); - } - for (const type of this.outputTypes.prisma) { - for (const field of type.fields) { - if (typeof field.outputType.type === "string" && !ScalarTypeTable[field.outputType.type]) { - field.outputType.type = this.outputTypeMap[field.outputType.type] || this.outputTypeMap[field.outputType.type] || this.enumMap[field.outputType.type] || field.outputType.type; - } - } - type.fieldMap = keyBy2(type.fields, "name"); - } - } - resolveInputTypes() { - const inputTypes = this.inputObjectTypes.prisma; - if (this.inputObjectTypes.model) { - inputTypes.push(...this.inputObjectTypes.model); - } - for (const type of inputTypes) { - for (const field of type.fields) { - for (const fieldInputType of field.inputTypes) { - const fieldType = fieldInputType.type; - if (typeof fieldType === "string" && !ScalarTypeTable[fieldType] && (this.inputTypeMap[fieldType] || this.enumMap[fieldType])) { - fieldInputType.type = this.inputTypeMap[fieldType] || this.enumMap[fieldType] || fieldType; - } - } - } - type.fieldMap = keyBy2(type.fields, "name"); - } - } - resolveFieldArgumentTypes() { - for (const type of this.outputTypes.prisma) { - for (const field of type.fields) { - for (const arg2 of field.args) { - for (const argInputType of arg2.inputTypes) { - const argType = argInputType.type; - if (typeof argType === "string" && !ScalarTypeTable[argType]) { - argInputType.type = this.inputTypeMap[argType] || this.enumMap[argType] || argType; - } - } - } - } - } - for (const type of this.outputTypes.model) { - for (const field of type.fields) { - for (const arg2 of field.args) { - for (const argInputType of arg2.inputTypes) { - const argType = argInputType.type; - if (typeof argType === "string" && !ScalarTypeTable[argType]) { - argInputType.type = this.inputTypeMap[argType] || this.enumMap[argType] || argInputType.type; - } - } - } - } - } - } - getQueryType() { - return this.schema.outputObjectTypes.prisma.find((t2) => t2.name === "Query"); - } - getMutationType() { - return this.schema.outputObjectTypes.prisma.find((t2) => t2.name === "Mutation"); - } - getOutputTypes() { - return { - model: this.schema.outputObjectTypes.model.map(this.outputTypeToMergedOutputType), - prisma: this.schema.outputObjectTypes.prisma.map(this.outputTypeToMergedOutputType) - }; - } - getEnumMap() { - return { - ...keyBy2(this.schema.enumTypes.prisma, "name"), - ...this.schema.enumTypes.model ? keyBy2(this.schema.enumTypes.model, "name") : void 0 - }; - } - hasEnumInNamespace(enumName, namespace) { - var _a3; - return ((_a3 = this.schema.enumTypes[namespace]) == null ? void 0 : _a3.find((schemaEnum) => schemaEnum.name === enumName)) !== void 0; - } - getMergedOutputTypeMap() { - return { - ...keyBy2(this.outputTypes.model, "name"), - ...keyBy2(this.outputTypes.prisma, "name") - }; - } - getInputTypeMap() { - return { - ...this.schema.inputObjectTypes.model ? keyBy2(this.schema.inputObjectTypes.model, "name") : void 0, - ...keyBy2(this.schema.inputObjectTypes.prisma, "name") - }; - } - getRootFieldMap() { - return { ...keyBy2(this.queryType.fields, "name"), ...keyBy2(this.mutationType.fields, "name") }; - } -}; -__name(DMMFSchemaHelper, "DMMFSchemaHelper"); -var BaseDMMFHelper = class { - constructor(dmmf) { - return Object.assign(this, new DMMFDatamodelHelper(dmmf), new DMMFMappingsHelper(dmmf)); - } -}; -__name(BaseDMMFHelper, "BaseDMMFHelper"); -applyMixins(BaseDMMFHelper, [DMMFDatamodelHelper, DMMFMappingsHelper]); -var DMMFHelper = class { - constructor(dmmf) { - return Object.assign(this, new BaseDMMFHelper(dmmf), new DMMFSchemaHelper(dmmf)); - } -}; -__name(DMMFHelper, "DMMFHelper"); -applyMixins(DMMFHelper, [BaseDMMFHelper, DMMFSchemaHelper]); - -// src/runtime/getPrismaClient.ts -var import_async_hooks = require("async_hooks"); -var import_events = require("events"); -var import_fs9 = __toESM(require("fs")); -var import_path5 = __toESM(require("path")); - -// ../../node_modules/.pnpm/sql-template-tag@5.0.3/node_modules/sql-template-tag/dist/index.js -var Sql = class { - constructor(rawStrings, rawValues) { - if (rawStrings.length - 1 !== rawValues.length) { - if (rawStrings.length === 0) { - throw new TypeError("Expected at least 1 string"); - } - throw new TypeError(`Expected ${rawStrings.length} strings to have ${rawStrings.length - 1} values`); - } - const valuesLength = rawValues.reduce((len, value) => len + (value instanceof Sql ? value.values.length : 1), 0); - this.values = new Array(valuesLength); - this.strings = new Array(valuesLength + 1); - this.strings[0] = rawStrings[0]; - let i = 0, pos = 0; - while (i < rawValues.length) { - const child = rawValues[i++]; - const rawString = rawStrings[i]; - if (child instanceof Sql) { - this.strings[pos] += child.strings[0]; - let childIndex = 0; - while (childIndex < child.values.length) { - this.values[pos++] = child.values[childIndex++]; - this.strings[pos] = child.strings[childIndex]; - } - this.strings[pos] += rawString; - } else { - this.values[pos++] = child; - this.strings[pos] = rawString; - } - } - } - get text() { - let i = 1, value = this.strings[0]; - while (i < this.strings.length) - value += `$${i}${this.strings[i++]}`; - return value; - } - get sql() { - let i = 1, value = this.strings[0]; - while (i < this.strings.length) - value += `?${this.strings[i++]}`; - return value; - } - inspect() { - return { - text: this.text, - sql: this.sql, - values: this.values - }; - } -}; -__name(Sql, "Sql"); -function join(values, separator = ",", prefix = "", suffix = "") { - if (values.length === 0) { - throw new TypeError("Expected `join([])` to be called with an array of multiple elements, but got an empty array"); - } - return new Sql([prefix, ...Array(values.length - 1).fill(separator), suffix], values); -} -__name(join, "join"); -function raw(value) { - return new Sql([value], []); -} -__name(raw, "raw"); -var empty = raw(""); -function sql(strings, ...values) { - return new Sql(strings, values); -} -__name(sql, "sql"); - -// src/runtime/externalToInternalDmmf.ts -var import_pluralize = __toESM(require_pluralize()); -function externalToInternalDmmf(document2) { - return { - ...document2, - mappings: getMappings(document2.mappings, document2.datamodel) - }; -} -__name(externalToInternalDmmf, "externalToInternalDmmf"); -function getMappings(mappings, datamodel) { - const modelOperations = mappings.modelOperations.filter((mapping) => { - const model = datamodel.models.find((m2) => m2.name === mapping.model); - if (!model) { - throw new Error(`Mapping without model ${mapping.model}`); - } - return model.fields.some((f2) => f2.kind !== "object"); - }).map((mapping) => ({ - model: mapping.model, - plural: (0, import_pluralize.default)(lowerCase(mapping.model)), - findUnique: mapping.findUnique || mapping.findSingle, - findUniqueOrThrow: mapping.findUniqueOrThrow, - findFirst: mapping.findFirst, - findFirstOrThrow: mapping.findFirstOrThrow, - findMany: mapping.findMany, - create: mapping.createOne || mapping.createSingle || mapping.create, - createMany: mapping.createMany, - delete: mapping.deleteOne || mapping.deleteSingle || mapping.delete, - update: mapping.updateOne || mapping.updateSingle || mapping.update, - deleteMany: mapping.deleteMany, - updateMany: mapping.updateMany, - upsert: mapping.upsertOne || mapping.upsertSingle || mapping.upsert, - aggregate: mapping.aggregate, - groupBy: mapping.groupBy, - findRaw: mapping.findRaw, - aggregateRaw: mapping.aggregateRaw - })); - return { - modelOperations, - otherOperations: mappings.otherOperations - }; -} -__name(getMappings, "getMappings"); - -// src/generation/getDMMF.ts -function getPrismaClientDMMF(dmmf) { - return externalToInternalDmmf(dmmf); -} -__name(getPrismaClientDMMF, "getPrismaClientDMMF"); - -// src/runtime/query.ts -var import_chalk11 = __toESM(require_source()); -var import_indent_string4 = __toESM(require_indent_string()); -var import_strip_ansi3 = __toESM(require_strip_ansi()); - -// src/generation/Cache.ts -var Cache = class { - constructor() { - this._map = /* @__PURE__ */ new Map(); - } - get(key) { - var _a3; - return (_a3 = this._map.get(key)) == null ? void 0 : _a3.value; - } - set(key, value) { - this._map.set(key, { value }); - } - getOrCreate(key, create) { - const cached = this._map.get(key); - if (cached) { - return cached.value; - } - const value = create(); - this.set(key, value); - return value; - } -}; -__name(Cache, "Cache"); - -// src/runtime/core/model/utils/dmmfToJSModelName.ts -function dmmfToJSModelName(name) { - return name.replace(/^./, (str) => str.toLowerCase()); -} -__name(dmmfToJSModelName, "dmmfToJSModelName"); - -// src/runtime/core/extensions/resultUtils.ts -function getComputedFields(previousComputedFields, extension, dmmfModelName) { - const jsName = dmmfToJSModelName(dmmfModelName); - if (!extension.result || !(extension.result.$allModels || extension.result[jsName])) { - return previousComputedFields; - } - return resolveDependencies({ - ...previousComputedFields, - ...getComputedFieldsFromModel(extension.name, extension.result.$allModels), - ...getComputedFieldsFromModel(extension.name, extension.result[jsName]) - }); -} -__name(getComputedFields, "getComputedFields"); -function resolveDependencies(computedFields) { - const cache = new Cache(); - const resolveNeeds = /* @__PURE__ */ __name((fieldName) => { - return cache.getOrCreate(fieldName, () => { - if (computedFields[fieldName]) { - return computedFields[fieldName].needs.flatMap(resolveNeeds); - } - return [fieldName]; - }); - }, "resolveNeeds"); - return mapObjectValues(computedFields, (field) => { - return { - ...field, - needs: resolveNeeds(field.name) - }; - }); -} -__name(resolveDependencies, "resolveDependencies"); -function getComputedFieldsFromModel(name, modelResult) { - if (!modelResult) { - return {}; - } - return mapObjectValues(modelResult, ({ needs, compute }, fieldName) => ({ - name: fieldName, - needs: needs ? Object.keys(needs).filter((key) => needs[key]) : [], - compute: wrapExtensionCallback(name, compute) - })); -} -__name(getComputedFieldsFromModel, "getComputedFieldsFromModel"); -function applyComputedFieldsToSelection(selection, computedFields) { - if (!computedFields) { - return selection; - } - const result = { ...selection }; - for (const field of Object.values(computedFields)) { - if (!selection[field.name]) { - continue; - } - for (const dependency of field.needs) { - result[dependency] = true; - } - } - return result; -} -__name(applyComputedFieldsToSelection, "applyComputedFieldsToSelection"); - -// src/runtime/utils/createErrorMessageWithContext.ts -var import_chalk9 = __toESM(require_source()); -var import_indent_string3 = __toESM(require_indent_string()); - -// src/runtime/utils/SourceFileSlice.ts -var import_fs8 = __toESM(require("fs")); - -// src/runtime/highlight/theme.ts -var import_chalk8 = __toESM(require_source()); -var orange = import_chalk8.default.rgb(246, 145, 95); -var darkBrightBlue = import_chalk8.default.rgb(107, 139, 140); -var blue = import_chalk8.default.cyan; -var brightBlue = import_chalk8.default.rgb(127, 155, 155); -var identity = /* @__PURE__ */ __name((str) => str, "identity"); -var theme = { - keyword: blue, - entity: blue, - value: brightBlue, - punctuation: darkBrightBlue, - directive: blue, - function: blue, - variable: brightBlue, - string: import_chalk8.default.greenBright, - boolean: orange, - number: import_chalk8.default.cyan, - comment: import_chalk8.default.grey -}; - -// src/runtime/highlight/prism.ts -var _self = {}; -var uniqueId = 0; -var Prism = { - manual: _self.Prism && _self.Prism.manual, - disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, - util: { - encode: function(tokens) { - if (tokens instanceof Token) { - const anyTokens = tokens; - return new Token(anyTokens.type, Prism.util.encode(anyTokens.content), anyTokens.alias); - } else if (Array.isArray(tokens)) { - return tokens.map(Prism.util.encode); - } else { - return tokens.replace(/&/g, "&").replace(/ text.length) { - return; - } - if (str instanceof Token) { - continue; - } - if (greedy && i != strarr.length - 1) { - pattern.lastIndex = pos; - var match = pattern.exec(text); - if (!match) { - break; - } - var from = match.index + (lookbehind ? match[1].length : 0), to = match.index + match[0].length, k = i, p2 = pos; - for (let len = strarr.length; k < len && (p2 < to || !strarr[k].type && !strarr[k - 1].greedy); ++k) { - p2 += strarr[k].length; - if (from >= p2) { - ++i; - pos = p2; - } - } - if (strarr[i] instanceof Token) { - continue; - } - delNum = k - i; - str = text.slice(pos, p2); - match.index -= pos; - } else { - pattern.lastIndex = 0; - var match = pattern.exec(str), delNum = 1; - } - if (!match) { - if (oneshot) { - break; - } - continue; - } - if (lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; - } - var from = match.index + lookbehindLength, match = match[0].slice(lookbehindLength), to = from + match.length, before = str.slice(0, from), after = str.slice(to); - const args = [i, delNum]; - if (before) { - ++i; - pos += before.length; - args.push(before); - } - const wrapped = new Token(token, inside ? Prism.tokenize(match, inside) : match, alias, match, greedy); - args.push(wrapped); - if (after) { - args.push(after); - } - Array.prototype.splice.apply(strarr, args); - if (delNum != 1) - Prism.matchGrammar(text, strarr, grammar, i, pos, true, token); - if (oneshot) - break; - } - } - } - }, - tokenize: function(text, grammar) { - const strarr = [text]; - const rest = grammar.rest; - if (rest) { - for (const token in rest) { - grammar[token] = rest[token]; - } - delete grammar.rest; - } - Prism.matchGrammar(text, strarr, grammar, 0, 0, false); - return strarr; - }, - hooks: { - all: {}, - add: function(name, callback) { - const hooks = Prism.hooks.all; - hooks[name] = hooks[name] || []; - hooks[name].push(callback); - }, - run: function(name, env2) { - const callbacks = Prism.hooks.all[name]; - if (!callbacks || !callbacks.length) { - return; - } - for (var i = 0, callback; callback = callbacks[i++]; ) { - callback(env2); - } - } - }, - Token -}; -Prism.languages.clike = { - comment: [ - { - pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, - lookbehind: true - }, - { - pattern: /(^|[^\\:])\/\/.*/, - lookbehind: true, - greedy: true - } - ], - string: { - pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: true - }, - "class-name": { - pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, - lookbehind: true, - 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: /[{}[\];(),.:]/ -}; -Prism.languages.javascript = Prism.languages.extend("clike", { - "class-name": [ - Prism.languages.clike["class-name"], - { - pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, - lookbehind: true - } - ], - keyword: [ - { - pattern: /((?:^|})\s*)(?:catch|finally)\b/, - lookbehind: true - }, - { - 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: true - } - ], - 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}/ -}); -Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; -Prism.languages.insertBefore("javascript", "keyword", { - regex: { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/, - lookbehind: true, - greedy: true - }, - "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: true, - inside: Prism.languages.javascript - }, - { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, - inside: Prism.languages.javascript - }, - { - pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, - lookbehind: true, - inside: Prism.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: true, - inside: Prism.languages.javascript - } - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ -}); -if (Prism.languages.markup) { - Prism.languages.markup.tag.addInlined("script", "javascript"); -} -Prism.languages.js = Prism.languages.javascript; -Prism.languages.typescript = Prism.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/ -}); -Prism.languages.ts = Prism.languages.typescript; -function Token(type, content, alias, matchedStr, greedy) { - this.type = type; - this.content = content; - this.alias = alias; - this.length = (matchedStr || "").length | 0; - this.greedy = !!greedy; -} -__name(Token, "Token"); -Token.stringify = function(o2, language) { - if (typeof o2 == "string") { - return o2; - } - if (Array.isArray(o2)) { - return o2.map(function(element) { - return Token.stringify(element, language); - }).join(""); - } - return getColorForSyntaxKind(o2.type)(o2.content); -}; -function getColorForSyntaxKind(syntaxKind) { - return theme[syntaxKind] || identity; -} -__name(getColorForSyntaxKind, "getColorForSyntaxKind"); - -// src/runtime/highlight/highlight.ts -function highlightTS(str) { - return highlight(str, Prism.languages.javascript); -} -__name(highlightTS, "highlightTS"); -function highlight(str, grammar) { - const tokens = Prism.tokenize(str, grammar); - return tokens.map((t2) => Token.stringify(t2)).join(""); -} -__name(highlight, "highlight"); - -// src/runtime/utils/dedent.ts -var import_strip_indent2 = __toESM(require_strip_indent()); -function dedent2(str) { - return (0, import_strip_indent2.default)(str); -} -__name(dedent2, "dedent"); - -// src/runtime/utils/SourceFileSlice.ts -var SourceFileSlice = class { - static read(filePath) { - let content; - try { - content = import_fs8.default.readFileSync(filePath, "utf-8"); - } catch (e2) { - return null; - } - return SourceFileSlice.fromContent(content); - } - static fromContent(content) { - const lines = content.split(/\r?\n/); - return new SourceFileSlice(1, lines); - } - constructor(firstLine, lines) { - this.firstLineNumber = firstLine; - this.lines = lines; - } - get lastLineNumber() { - return this.firstLineNumber + this.lines.length - 1; - } - mapLineAt(lineNumber, mapFn) { - if (lineNumber < this.firstLineNumber || lineNumber > this.lines.length + this.firstLineNumber) { - return this; - } - const idx = lineNumber - this.firstLineNumber; - const newLines = [...this.lines]; - newLines[idx] = mapFn(newLines[idx]); - return new SourceFileSlice(this.firstLineNumber, newLines); - } - mapLines(mapFn) { - return new SourceFileSlice( - this.firstLineNumber, - this.lines.map((line, i) => mapFn(line, this.firstLineNumber + i)) - ); - } - lineAt(lineNumber) { - return this.lines[lineNumber - this.firstLineNumber]; - } - prependSymbolAt(atLine, str) { - return this.mapLines((line, lineNumber) => { - if (lineNumber === atLine) { - return `${str} ${line}`; - } - return ` ${line}`; - }); - } - slice(fromLine, toLine) { - const slicedLines = this.lines.slice(fromLine - 1, toLine).join("\n"); - return new SourceFileSlice(fromLine, dedent2(slicedLines).split("\n")); - } - highlight() { - const highlighted = highlightTS(this.toString()); - return new SourceFileSlice(this.firstLineNumber, highlighted.split("\n")); - } - toString() { - return this.lines.join("\n"); - } -}; -__name(SourceFileSlice, "SourceFileSlice"); - -// src/runtime/utils/createErrorMessageWithContext.ts -var colorsEnabled = { - red: (str) => import_chalk9.default.red(str), - gray: (str) => import_chalk9.default.gray(str), - dim: (str) => import_chalk9.default.dim(str), - bold: (str) => import_chalk9.default.bold(str), - underline: (str) => import_chalk9.default.underline(str), - highlightSource: (source) => source.highlight() -}; -var colorsDisabled = { - red: (str) => str, - gray: (str) => str, - dim: (str) => str, - bold: (str) => str, - underline: (str) => str, - highlightSource: (source) => source -}; -function getTemplateParameters({ callsite, message, originalMethod, isPanic: isPanic2, callArguments }, colors) { - var _a3; - const templateParameters = { - functionName: `prisma.${originalMethod}()`, - message, - isPanic: isPanic2 != null ? isPanic2 : false, - callArguments - }; - if (!callsite || typeof window !== "undefined") { - return templateParameters; - } - if (process.env.NODE_ENV === "production") { - return templateParameters; - } - const callLocation = callsite.getLocation(); - if (!callLocation || !callLocation.lineNumber || !callLocation.columnNumber) { - return templateParameters; - } - const contextFirstLine = Math.max(1, callLocation.lineNumber - 3); - let source = (_a3 = SourceFileSlice.read(callLocation.fileName)) == null ? void 0 : _a3.slice(contextFirstLine, callLocation.lineNumber); - const invocationLine = source == null ? void 0 : source.lineAt(callLocation.lineNumber); - if (source && invocationLine) { - const invocationLineIndent = getIndent(invocationLine); - const invocationCallCode = findPrismaActionCall(invocationLine); - if (!invocationCallCode) { - return templateParameters; - } - templateParameters.functionName = `${invocationCallCode.code})`; - templateParameters.location = callLocation; - if (!isPanic2) { - source = source.mapLineAt(callLocation.lineNumber, (line) => line.slice(0, invocationCallCode.openingBraceIndex)); - } - source = colors.highlightSource(source); - const numberColumnWidth = String(source.lastLineNumber).length; - templateParameters.contextLines = source.mapLines((line, lineNumber) => colors.gray(String(lineNumber).padStart(numberColumnWidth)) + " " + line).mapLines((line) => colors.dim(line)).prependSymbolAt(callLocation.lineNumber, colors.bold(colors.red("\u2192"))); - if (callArguments) { - let indentValue = invocationLineIndent + numberColumnWidth + 1; - indentValue += 2; - templateParameters.callArguments = (0, import_indent_string3.default)(callArguments, indentValue).slice(indentValue); - } - } - return templateParameters; -} -__name(getTemplateParameters, "getTemplateParameters"); -function findPrismaActionCall(str) { - const allActions = Object.keys(DMMF.ModelAction).join("|"); - const regexp = new RegExp(String.raw`\S+(${allActions})\(`); - const match = regexp.exec(str); - if (match) { - return { - code: match[0], - openingBraceIndex: match.index + match[0].length - }; - } - return null; -} -__name(findPrismaActionCall, "findPrismaActionCall"); -function getIndent(line) { - let spaceCount = 0; - for (let i = 0; i < line.length; i++) { - if (line.charAt(i) !== " ") { - return spaceCount; - } - spaceCount++; - } - return spaceCount; -} -__name(getIndent, "getIndent"); -function stringifyErrorMessage({ functionName, location, message, isPanic: isPanic2, contextLines, callArguments }, colors) { - const lines = [""]; - const introSuffix = location ? " in" : ":"; - if (isPanic2) { - lines.push(colors.red(`Oops, an unknown error occurred! This is ${colors.bold("on us")}, you did nothing wrong.`)); - lines.push(colors.red(`It occurred in the ${colors.bold(`\`${functionName}\``)} invocation${introSuffix}`)); - } else { - lines.push(colors.red(`Invalid ${colors.bold(`\`${functionName}\``)} invocation${introSuffix}`)); - } - if (location) { - lines.push(colors.underline(stringifyLocationInFile(location))); - } - if (contextLines) { - lines.push(""); - const contextLineParts = [contextLines.toString()]; - if (callArguments) { - contextLineParts.push(callArguments); - contextLineParts.push(colors.dim(")")); - } - lines.push(contextLineParts.join("")); - if (callArguments) { - lines.push(""); - } - } else { - lines.push(""); - if (callArguments) { - lines.push(callArguments); - } - lines.push(""); - } - lines.push(message); - return lines.join("\n"); -} -__name(stringifyErrorMessage, "stringifyErrorMessage"); -function stringifyLocationInFile(location) { - const parts = [location.fileName]; - if (location.lineNumber) { - parts.push(String(location.lineNumber)); - } - if (location.columnNumber) { - parts.push(String(location.columnNumber)); - } - return parts.join(":"); -} -__name(stringifyLocationInFile, "stringifyLocationInFile"); -function createErrorMessageWithContext(args) { - const colors = args.showColors ? colorsEnabled : colorsDisabled; - const templateParameters = getTemplateParameters(args, colors); - return stringifyErrorMessage(templateParameters, colors); -} -__name(createErrorMessageWithContext, "createErrorMessageWithContext"); - -// src/runtime/utils/deep-extend.ts -function isSpecificValue(val) { - return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false; -} -__name(isSpecificValue, "isSpecificValue"); -function cloneSpecificValue(val) { - if (val instanceof Buffer) { - const x = Buffer.alloc ? Buffer.alloc(val.length) : new Buffer(val.length); - val.copy(x); - return x; - } else if (val instanceof Date) { - return new Date(val.getTime()); - } else if (val instanceof RegExp) { - return new RegExp(val); - } else { - throw new Error("Unexpected situation"); - } -} -__name(cloneSpecificValue, "cloneSpecificValue"); -function deepCloneArray(arr) { - const clone2 = []; - arr.forEach(function(item, index) { - if (typeof item === "object" && item !== null) { - if (Array.isArray(item)) { - clone2[index] = deepCloneArray(item); - } else if (isSpecificValue(item)) { - clone2[index] = cloneSpecificValue(item); - } else { - clone2[index] = deepExtend({}, item); - } - } else { - clone2[index] = item; - } - }); - return clone2; -} -__name(deepCloneArray, "deepCloneArray"); -function safeGetProperty(object, property) { - return property === "__proto__" ? void 0 : object[property]; -} -__name(safeGetProperty, "safeGetProperty"); -var deepExtend = /* @__PURE__ */ __name(function(target, ...args) { - if (!target || typeof target !== "object") { - return false; - } - if (args.length === 0) { - return target; - } - let val, src; - for (const obj of args) { - if (typeof obj !== "object" || obj === null || Array.isArray(obj)) { - continue; - } - for (const key of Object.keys(obj)) { - src = safeGetProperty(target, key); - val = safeGetProperty(obj, key); - if (val === target) { - continue; - } else if (typeof val !== "object" || val === null) { - target[key] = val; - continue; - } else if (Array.isArray(val)) { - target[key] = deepCloneArray(val); - continue; - } else if (isSpecificValue(val)) { - target[key] = cloneSpecificValue(val); - continue; - } else if (typeof src !== "object" || src === null || Array.isArray(src)) { - target[key] = deepExtend({}, val); - continue; - } else { - target[key] = deepExtend(src, val); - continue; - } - } - } - return target; -}, "deepExtend"); - -// src/runtime/utils/deep-set.ts -var keys = /* @__PURE__ */ __name((ks) => Array.isArray(ks) ? ks : ks.split("."), "keys"); -var deepGet = /* @__PURE__ */ __name((o2, kp) => keys(kp).reduce((o3, k) => o3 && o3[k], o2), "deepGet"); -var deepSet = /* @__PURE__ */ __name((o2, kp, v) => keys(kp).reduceRight((v2, k, i, ks) => Object.assign({}, deepGet(o2, ks.slice(0, i)), { [k]: v2 }), v), "deepSet"); - -// src/runtime/utils/filterObject.ts -function filterObject(obj, cb) { - if (!obj || typeof obj !== "object" || typeof obj.hasOwnProperty !== "function") { - return obj; - } - const newObj = {}; - for (const key in obj) { - const value = obj[key]; - if (Object.hasOwnProperty.call(obj, key) && cb(key, value)) { - newObj[key] = value; - } - } - return newObj; -} -__name(filterObject, "filterObject"); - -// src/runtime/utils/isObject.ts -var notReallyObjects = { - "[object Date]": true, - "[object Uint8Array]": true, - "[object Decimal]": true -}; -function isObject2(value) { - if (!value) { - return false; - } - return typeof value === "object" && !notReallyObjects[Object.prototype.toString.call(value)]; -} -__name(isObject2, "isObject"); - -// src/runtime/utils/omit.ts -function omit2(object, path7) { - const result = {}; - const paths = Array.isArray(path7) ? path7 : [path7]; - for (const key in object) { - if (Object.hasOwnProperty.call(object, key) && !paths.includes(key)) { - result[key] = object[key]; - } - } - return result; -} -__name(omit2, "omit"); - -// src/runtime/utils/printJsonErrors.ts -var import_chalk10 = __toESM(require_source()); -var import_strip_ansi2 = __toESM(require_strip_ansi()); - -// src/runtime/utils/stringifyObject.ts -var isRegexp = require_is_regexp(); -var isObj = require_is_obj(); -var getOwnEnumPropSymbols = require_lib2().default; -var stringifyObject = /* @__PURE__ */ __name((input, options, pad) => { - const seen = []; - return (/* @__PURE__ */ __name(function stringifyObject2(input2, options2 = {}, pad2 = "", path7 = []) { - options2.indent = options2.indent || " "; - let tokens; - if (options2.inlineCharacterLimit === void 0) { - tokens = { - newLine: "\n", - newLineOrSpace: "\n", - pad: pad2, - indent: pad2 + options2.indent - }; - } else { - tokens = { - newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@", - newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@", - pad: "@@__STRINGIFY_OBJECT_PAD__@@", - indent: "@@__STRINGIFY_OBJECT_INDENT__@@" - }; - } - const expandWhiteSpace = /* @__PURE__ */ __name((string) => { - if (options2.inlineCharacterLimit === void 0) { - return string; - } - const oneLined = string.replace(new RegExp(tokens.newLine, "g"), "").replace(new RegExp(tokens.newLineOrSpace, "g"), " ").replace(new RegExp(tokens.pad + "|" + tokens.indent, "g"), ""); - if (oneLined.length <= options2.inlineCharacterLimit) { - return oneLined; - } - return string.replace(new RegExp(tokens.newLine + "|" + tokens.newLineOrSpace, "g"), "\n").replace(new RegExp(tokens.pad, "g"), pad2).replace(new RegExp(tokens.indent, "g"), pad2 + options2.indent); - }, "expandWhiteSpace"); - if (seen.indexOf(input2) !== -1) { - return '"[Circular]"'; - } - if (Buffer.isBuffer(input2)) { - return `Buffer(${Buffer.length})`; - } - if (input2 === null || input2 === void 0 || typeof input2 === "number" || typeof input2 === "boolean" || typeof input2 === "function" || typeof input2 === "symbol" || input2 instanceof ObjectEnumValue || isRegexp(input2)) { - return String(input2); - } - if (input2 instanceof Date) { - return `new Date('${input2.toISOString()}')`; - } - if (input2 instanceof FieldRefImpl) { - return `prisma.${lowerCase(input2.modelName)}.fields.${input2.name}`; - } - if (Array.isArray(input2)) { - if (input2.length === 0) { - return "[]"; - } - seen.push(input2); - const ret = "[" + tokens.newLine + input2.map((el, i) => { - const eol = input2.length - 1 === i ? tokens.newLine : "," + tokens.newLineOrSpace; - let value = stringifyObject2(el, options2, pad2 + options2.indent, [...path7, i]); - if (options2.transformValue) { - value = options2.transformValue(input2, i, value); - } - return tokens.indent + value + eol; - }).join("") + tokens.pad + "]"; - seen.pop(); - return expandWhiteSpace(ret); - } - if (isObj(input2)) { - let objKeys = Object.keys(input2).concat(getOwnEnumPropSymbols(input2)); - if (options2.filter) { - objKeys = objKeys.filter((el) => options2.filter(input2, el)); - } - if (objKeys.length === 0) { - return "{}"; - } - seen.push(input2); - const ret = "{" + tokens.newLine + objKeys.map((el, i) => { - const eol = objKeys.length - 1 === i ? tokens.newLine : "," + tokens.newLineOrSpace; - const isSymbol = typeof el === "symbol"; - const isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el); - const key = isSymbol || isClassic ? el : stringifyObject2(el, options2, void 0, [...path7, el]); - let value = stringifyObject2(input2[el], options2, pad2 + options2.indent, [...path7, el]); - if (options2.transformValue) { - value = options2.transformValue(input2, el, value); - } - let line = tokens.indent + String(key) + ": " + value + eol; - if (options2.transformLine) { - line = options2.transformLine({ - obj: input2, - indent: tokens.indent, - key, - stringifiedValue: value, - value: input2[el], - eol, - originalLine: line, - path: path7.concat(key) - }); - } - return line; - }).join("") + tokens.pad + "}"; - seen.pop(); - return expandWhiteSpace(ret); - } - input2 = String(input2).replace(/[\r\n]/g, (x) => x === "\n" ? "\\n" : "\\r"); - if (options2.singleQuotes === false) { - input2 = input2.replace(/"/g, '\\"'); - return `"${input2}"`; - } - input2 = input2.replace(/\\?'/g, "\\'"); - return `'${input2}'`; - }, "stringifyObject"))(input, options, pad); -}, "stringifyObject"); -var stringifyObject_default = stringifyObject; - -// src/runtime/utils/printJsonErrors.ts -var DIM_TOKEN = "@@__DIM_POINTER__@@"; -function printJsonWithErrors({ ast, keyPaths, valuePaths, missingItems }) { - let obj = ast; - for (const { path: path7, type } of missingItems) { - obj = deepSet(obj, path7, type); - } - return stringifyObject_default(obj, { - indent: " ", - transformLine: ({ indent: indent4, key, value, stringifiedValue, eol, path: path7 }) => { - const dottedPath = path7.join("."); - const keyError = keyPaths.includes(dottedPath); - const valueError = valuePaths.includes(dottedPath); - const missingItem = missingItems.find((item) => item.path === dottedPath); - let valueStr = stringifiedValue; - if (missingItem) { - if (typeof value === "string") { - valueStr = valueStr.slice(1, valueStr.length - 1); - } - const isRequiredStr = missingItem.isRequired ? "" : "?"; - const prefix = missingItem.isRequired ? "+" : "?"; - const color = missingItem.isRequired ? import_chalk10.default.greenBright : import_chalk10.default.green; - let output = color(prefixLines(key + isRequiredStr + ": " + valueStr + eol, indent4, prefix)); - if (!missingItem.isRequired) { - output = import_chalk10.default.dim(output); - } - return output; - } else { - const isOnMissingItemPath = missingItems.some((item) => dottedPath.startsWith(item.path)); - const isOptional = key[key.length - 2] === "?"; - if (isOptional) { - key = key.slice(1, key.length - 1); - } - if (isOptional && typeof value === "object" && value !== null) { - valueStr = valueStr.split("\n").map((line, index, arr) => index === arr.length - 1 ? line + DIM_TOKEN : line).join("\n"); - } - if (isOnMissingItemPath && typeof value === "string") { - valueStr = valueStr.slice(1, valueStr.length - 1); - if (!isOptional) { - valueStr = import_chalk10.default.bold(valueStr); - } - } - if ((typeof value !== "object" || value === null) && !valueError && !isOnMissingItemPath) { - valueStr = import_chalk10.default.dim(valueStr); - } - const keyStr = keyError ? import_chalk10.default.redBright(key) : key; - valueStr = valueError ? import_chalk10.default.redBright(valueStr) : valueStr; - let output = indent4 + keyStr + ": " + valueStr + (isOnMissingItemPath ? eol : import_chalk10.default.dim(eol)); - if (keyError || valueError) { - const lines = output.split("\n"); - const keyLength = String(key).length; - const keyScribbles = keyError ? import_chalk10.default.redBright("~".repeat(keyLength)) : " ".repeat(keyLength); - const valueLength = valueError ? getValueLength(indent4, key, value, stringifiedValue) : 0; - const hideValueScribbles = valueError && isRenderedAsObject(value); - const valueScribbles = valueError ? " " + import_chalk10.default.redBright("~".repeat(valueLength)) : ""; - if (keyScribbles && keyScribbles.length > 0 && !hideValueScribbles) { - lines.splice(1, 0, indent4 + keyScribbles + valueScribbles); - } - if (keyScribbles && keyScribbles.length > 0 && hideValueScribbles) { - lines.splice(lines.length - 1, 0, indent4.slice(0, indent4.length - 2) + valueScribbles); - } - output = lines.join("\n"); - } - return output; - } - } - }); -} -__name(printJsonWithErrors, "printJsonWithErrors"); -function getValueLength(indent4, key, value, stringifiedValue) { - if (value === null) { - return 4; - } - if (typeof value === "string") { - return value.length + 2; - } - if (isRenderedAsObject(value)) { - return Math.abs(getLongestLine(`${key}: ${(0, import_strip_ansi2.default)(stringifiedValue)}`) - indent4.length); - } - return String(value).length; -} -__name(getValueLength, "getValueLength"); -function isRenderedAsObject(value) { - return typeof value === "object" && value !== null && !(value instanceof ObjectEnumValue); -} -__name(isRenderedAsObject, "isRenderedAsObject"); -function getLongestLine(str) { - return str.split("\n").reduce((max2, curr) => curr.length > max2 ? curr.length : max2, 0); -} -__name(getLongestLine, "getLongestLine"); -function prefixLines(str, indent4, prefix) { - return str.split("\n").map( - (line, index, arr) => index === 0 ? prefix + indent4.slice(1) + line : index < arr.length - 1 ? prefix + line.slice(1) : line - ).map((line) => { - return (0, import_strip_ansi2.default)(line).includes(DIM_TOKEN) ? import_chalk10.default.dim(line.replace(DIM_TOKEN, "")) : line.includes("?") ? import_chalk10.default.dim(line) : line; - }).join("\n"); -} -__name(prefixLines, "prefixLines"); - -// src/runtime/query.ts -var tab = 2; -var Document = class { - constructor(type, children) { - this.type = type; - this.children = children; - this.printFieldError = /* @__PURE__ */ __name(({ error: error2 }, missingItems, minimal) => { - if (error2.type === "emptySelect") { - const additional = minimal ? "" : ` Available options are listed in ${import_chalk11.default.greenBright.dim("green")}.`; - return `The ${import_chalk11.default.redBright("`select`")} statement for type ${import_chalk11.default.bold( - getOutputTypeName(error2.field.outputType.type) - )} must not be empty.${additional}`; - } - if (error2.type === "emptyInclude") { - if (missingItems.length === 0) { - return `${import_chalk11.default.bold( - getOutputTypeName(error2.field.outputType.type) - )} does not have any relation and therefore can't have an ${import_chalk11.default.redBright("`include`")} statement.`; - } - const additional = minimal ? "" : ` Available options are listed in ${import_chalk11.default.greenBright.dim("green")}.`; - return `The ${import_chalk11.default.redBright("`include`")} statement for type ${import_chalk11.default.bold( - getOutputTypeName(error2.field.outputType.type) - )} must not be empty.${additional}`; - } - if (error2.type === "noTrueSelect") { - return `The ${import_chalk11.default.redBright("`select`")} statement for type ${import_chalk11.default.bold( - getOutputTypeName(error2.field.outputType.type) - )} needs ${import_chalk11.default.bold("at least one truthy value")}.`; - } - if (error2.type === "includeAndSelect") { - return `Please ${import_chalk11.default.bold("either")} use ${import_chalk11.default.greenBright("`include`")} or ${import_chalk11.default.greenBright( - "`select`" - )}, but ${import_chalk11.default.redBright("not both")} at the same time.`; - } - if (error2.type === "invalidFieldName") { - const statement = error2.isInclude ? "include" : "select"; - const wording = error2.isIncludeScalar ? "Invalid scalar" : "Unknown"; - const additional = minimal ? "" : error2.isInclude && missingItems.length === 0 ? ` -This model has no relations, so you can't use ${import_chalk11.default.redBright("include")} with it.` : ` Available options are listed in ${import_chalk11.default.greenBright.dim("green")}.`; - let str = `${wording} field ${import_chalk11.default.redBright(`\`${error2.providedName}\``)} for ${import_chalk11.default.bold( - statement - )} statement on model ${import_chalk11.default.bold.white(error2.modelName)}.${additional}`; - if (error2.didYouMean) { - str += ` Did you mean ${import_chalk11.default.greenBright(`\`${error2.didYouMean}\``)}?`; - } - if (error2.isIncludeScalar) { - str += ` -Note, that ${import_chalk11.default.bold("include")} statements only accept relation fields.`; - } - return str; - } - if (error2.type === "invalidFieldType") { - const str = `Invalid value ${import_chalk11.default.redBright( - `${stringifyObject_default(error2.providedValue)}` - )} of type ${import_chalk11.default.redBright(getGraphQLType(error2.providedValue, void 0))} for field ${import_chalk11.default.bold( - `${error2.fieldName}` - )} on model ${import_chalk11.default.bold.white(error2.modelName)}. Expected either ${import_chalk11.default.greenBright( - "true" - )} or ${import_chalk11.default.greenBright("false")}.`; - return str; - } - return void 0; - }, "printFieldError"); - this.printArgError = /* @__PURE__ */ __name(({ error: error2, path: path7, id }, hasMissingItems, minimal) => { - if (error2.type === "invalidName") { - let str = `Unknown arg ${import_chalk11.default.redBright(`\`${error2.providedName}\``)} in ${import_chalk11.default.bold( - path7.join(".") - )} for type ${import_chalk11.default.bold(error2.outputType ? error2.outputType.name : getInputTypeName(error2.originalType))}.`; - if (error2.didYouMeanField) { - str += ` -\u2192 Did you forget to wrap it with \`${import_chalk11.default.greenBright("select")}\`? ${import_chalk11.default.dim( - "e.g. " + import_chalk11.default.greenBright(`{ select: { ${error2.providedName}: ${error2.providedValue} } }`) - )}`; - } else if (error2.didYouMeanArg) { - str += ` Did you mean \`${import_chalk11.default.greenBright(error2.didYouMeanArg)}\`?`; - if (!hasMissingItems && !minimal) { - str += ` ${import_chalk11.default.dim("Available args:")} -` + stringifyInputType(error2.originalType, true); - } - } else { - if (error2.originalType.fields.length === 0) { - str += ` The field ${import_chalk11.default.bold(error2.originalType.name)} has no arguments.`; - } else if (!hasMissingItems && !minimal) { - str += ` Available args: - -` + stringifyInputType(error2.originalType, true); - } - } - return str; - } - if (error2.type === "invalidType") { - let valueStr = stringifyObject_default(error2.providedValue, { indent: " " }); - const multilineValue = valueStr.split("\n").length > 1; - if (multilineValue) { - valueStr = ` -${valueStr} -`; - } - if (error2.requiredType.bestFittingType.location === "enumTypes") { - return `Argument ${import_chalk11.default.bold(error2.argName)}: Provided value ${import_chalk11.default.redBright(valueStr)}${multilineValue ? "" : " "}of type ${import_chalk11.default.redBright(getGraphQLType(error2.providedValue))} on ${import_chalk11.default.bold( - `prisma.${this.children[0].name}` - )} is not a ${import_chalk11.default.greenBright( - wrapWithList( - stringifyGraphQLType(error2.requiredType.bestFittingType.type), - error2.requiredType.bestFittingType.isList - ) - )}. -\u2192 Possible values: ${error2.requiredType.bestFittingType.type.values.map((v) => import_chalk11.default.greenBright(`${stringifyGraphQLType(error2.requiredType.bestFittingType.type)}.${v}`)).join(", ")}`; - } - let typeStr = "."; - if (isInputArgType(error2.requiredType.bestFittingType.type)) { - typeStr = ":\n" + stringifyInputType(error2.requiredType.bestFittingType.type); - } - let expected = `${error2.requiredType.inputType.map( - (t2) => import_chalk11.default.greenBright(wrapWithList(stringifyGraphQLType(t2.type), error2.requiredType.bestFittingType.isList)) - ).join(" or ")}${typeStr}`; - const inputType = error2.requiredType.inputType.length === 2 && error2.requiredType.inputType.find((t2) => isInputArgType(t2.type)) || null; - if (inputType) { - expected += ` -` + stringifyInputType(inputType.type, true); - } - return `Argument ${import_chalk11.default.bold(error2.argName)}: Got invalid value ${import_chalk11.default.redBright(valueStr)}${multilineValue ? "" : " "}on ${import_chalk11.default.bold(`prisma.${this.children[0].name}`)}. Provided ${import_chalk11.default.redBright( - getGraphQLType(error2.providedValue) - )}, expected ${expected}`; - } - if (error2.type === "invalidNullArg") { - const forStr = path7.length === 1 && path7[0] === error2.name ? "" : ` for ${import_chalk11.default.bold(`${path7.join(".")}`)}`; - const undefinedTip = ` Please use ${import_chalk11.default.bold.greenBright("undefined")} instead.`; - return `Argument ${import_chalk11.default.greenBright(error2.name)}${forStr} must not be ${import_chalk11.default.bold("null")}.${undefinedTip}`; - } - if (error2.type === "missingArg") { - const forStr = path7.length === 1 && path7[0] === error2.missingName ? "" : ` for ${import_chalk11.default.bold(`${path7.join(".")}`)}`; - return `Argument ${import_chalk11.default.greenBright(error2.missingName)}${forStr} is missing.`; - } - if (error2.type === "atLeastOne") { - const additional = minimal ? "" : ` Available args are listed in ${import_chalk11.default.dim.green("green")}.`; - const atLeastFieldsError = error2.atLeastFields ? ` and at least one argument for ${error2.atLeastFields.map((field) => import_chalk11.default.bold(field)).join(", or ")}` : ""; - return `Argument ${import_chalk11.default.bold(path7.join("."))} of type ${import_chalk11.default.bold( - error2.inputType.name - )} needs ${import_chalk11.default.greenBright("at least one")} argument${import_chalk11.default.bold(atLeastFieldsError)}.${additional}`; - } - if (error2.type === "atMostOne") { - const additional = minimal ? "" : ` Please choose one. ${import_chalk11.default.dim("Available args:")} -${stringifyInputType(error2.inputType, true)}`; - return `Argument ${import_chalk11.default.bold(path7.join("."))} of type ${import_chalk11.default.bold( - error2.inputType.name - )} needs ${import_chalk11.default.greenBright("exactly one")} argument, but you provided ${error2.providedKeys.map((key) => import_chalk11.default.redBright(key)).join(" and ")}.${additional}`; - } - return void 0; - }, "printArgError"); - this.type = type; - this.children = children; - } - get [Symbol.toStringTag]() { - return "Document"; - } - toString() { - return `${this.type} { -${(0, import_indent_string4.default)(this.children.map(String).join("\n"), tab)} -}`; - } - validate(select, isTopLevelQuery = false, originalMethod, errorFormat, validationCallsite) { - var _a3; - if (!select) { - select = {}; - } - const invalidChildren = this.children.filter((child) => child.hasInvalidChild || child.hasInvalidArg); - if (invalidChildren.length === 0) { - return; - } - const fieldErrors = []; - const argErrors = []; - const prefix = select && select.select ? "select" : select.include ? "include" : void 0; - for (const child of invalidChildren) { - const errors = child.collectErrors(prefix); - fieldErrors.push( - ...errors.fieldErrors.map((e2) => ({ - ...e2, - path: isTopLevelQuery ? e2.path : e2.path.slice(1) - })) - ); - argErrors.push( - ...errors.argErrors.map((e2) => ({ - ...e2, - path: isTopLevelQuery ? e2.path : e2.path.slice(1) - })) - ); - } - const topLevelQueryName = this.children[0].name; - const queryName = isTopLevelQuery ? this.type : topLevelQueryName; - const keyPaths = []; - const valuePaths = []; - const missingItems = []; - for (const fieldError of fieldErrors) { - const path7 = this.normalizePath(fieldError.path, select).join("."); - if (fieldError.error.type === "invalidFieldName") { - keyPaths.push(path7); - const fieldType = fieldError.error.outputType; - const { isInclude } = fieldError.error; - fieldType.fields.filter((field) => isInclude ? field.outputType.location === "outputObjectTypes" : true).forEach((field) => { - const splittedPath = path7.split("."); - missingItems.push({ - path: `${splittedPath.slice(0, splittedPath.length - 1).join(".")}.${field.name}`, - type: "true", - isRequired: false - }); - }); - } else if (fieldError.error.type === "includeAndSelect") { - keyPaths.push("select"); - keyPaths.push("include"); - } else { - valuePaths.push(path7); - } - if (fieldError.error.type === "emptySelect" || fieldError.error.type === "noTrueSelect" || fieldError.error.type === "emptyInclude") { - const selectPathArray = this.normalizePath(fieldError.path, select); - const selectPath = selectPathArray.slice(0, selectPathArray.length - 1).join("."); - const fieldType = fieldError.error.field.outputType.type; - (_a3 = fieldType.fields) == null ? void 0 : _a3.filter( - (field) => fieldError.error.type === "emptyInclude" ? field.outputType.location === "outputObjectTypes" : true - ).forEach((field) => { - missingItems.push({ - path: `${selectPath}.${field.name}`, - type: "true", - isRequired: false - }); - }); - } - } - for (const argError of argErrors) { - const path7 = this.normalizePath(argError.path, select).join("."); - if (argError.error.type === "invalidName") { - keyPaths.push(path7); - } else if (argError.error.type !== "missingArg" && argError.error.type !== "atLeastOne") { - valuePaths.push(path7); - } else if (argError.error.type === "missingArg") { - const type = argError.error.missingArg.inputTypes.length === 1 ? argError.error.missingArg.inputTypes[0].type : argError.error.missingArg.inputTypes.map((t2) => { - const inputTypeName = getInputTypeName(t2.type); - if (inputTypeName === "Null") { - return "null"; - } - if (t2.isList) { - return inputTypeName + "[]"; - } - return inputTypeName; - }).join(" | "); - missingItems.push({ - path: path7, - type: inputTypeToJson(type, true, path7.split("where.").length === 2), - isRequired: argError.error.missingArg.isRequired - }); - } - } - const renderErrorStr = /* @__PURE__ */ __name((callsite) => { - const hasRequiredMissingArgsErrors = argErrors.some( - (e2) => e2.error.type === "missingArg" && e2.error.missingArg.isRequired - ); - const hasOptionalMissingArgsErrors = Boolean( - argErrors.find((e2) => e2.error.type === "missingArg" && !e2.error.missingArg.isRequired) - ); - const hasMissingArgsErrors = hasOptionalMissingArgsErrors || hasRequiredMissingArgsErrors; - let missingArgsLegend = ""; - if (hasRequiredMissingArgsErrors) { - missingArgsLegend += ` -${import_chalk11.default.dim("Note: Lines with ")}${import_chalk11.default.reset.greenBright("+")} ${import_chalk11.default.dim( - "are required" - )}`; - } - if (hasOptionalMissingArgsErrors) { - if (missingArgsLegend.length === 0) { - missingArgsLegend = "\n"; - } - if (hasRequiredMissingArgsErrors) { - missingArgsLegend += import_chalk11.default.dim(`, lines with ${import_chalk11.default.green("?")} are optional`); - } else { - missingArgsLegend += import_chalk11.default.dim(`Note: Lines with ${import_chalk11.default.green("?")} are optional`); - } - missingArgsLegend += import_chalk11.default.dim("."); - } - const relevantArgErrors = argErrors.filter((e2) => e2.error.type !== "missingArg" || e2.error.missingArg.isRequired); - let errorMessages = relevantArgErrors.map((e2) => this.printArgError(e2, hasMissingArgsErrors, errorFormat === "minimal")).join("\n"); - errorMessages += ` -${fieldErrors.map((e2) => this.printFieldError(e2, missingItems, errorFormat === "minimal")).join("\n")}`; - if (errorFormat === "minimal") { - return (0, import_strip_ansi3.default)(errorMessages); - } - let printJsonArgs = { - ast: isTopLevelQuery ? { [topLevelQueryName]: select } : select, - keyPaths, - valuePaths, - missingItems - }; - if (originalMethod == null ? void 0 : originalMethod.endsWith("aggregate")) { - printJsonArgs = transformAggregatePrintJsonArgs(printJsonArgs); - } - const errorStr = createErrorMessageWithContext({ - callsite, - originalMethod: originalMethod || queryName, - showColors: errorFormat && errorFormat === "pretty", - callArguments: printJsonWithErrors(printJsonArgs), - message: `${errorMessages}${missingArgsLegend} -` - }); - if (process.env.NO_COLOR || errorFormat === "colorless") { - return (0, import_strip_ansi3.default)(errorStr); - } - return errorStr; - }, "renderErrorStr"); - const error2 = new PrismaClientValidationError(renderErrorStr(validationCallsite)); - if (process.env.NODE_ENV !== "production") { - Object.defineProperty(error2, "render", { - get: () => renderErrorStr, - enumerable: false - }); - } - throw error2; - } - normalizePath(inputPath, select) { - const path7 = inputPath.slice(); - const newPath = []; - let key; - let pointer = select; - while ((key = path7.shift()) !== void 0) { - if (!Array.isArray(pointer) && key === 0) { - continue; - } - if (key === "select") { - if (!pointer[key]) { - pointer = pointer.include; - } else { - pointer = pointer[key]; - } - } else if (pointer && pointer[key]) { - pointer = pointer[key]; - } - newPath.push(key); - } - return newPath; - } -}; -__name(Document, "Document"); -var PrismaClientValidationError = class extends Error { - get [Symbol.toStringTag]() { - return "PrismaClientValidationError"; - } -}; -__name(PrismaClientValidationError, "PrismaClientValidationError"); -var PrismaClientConstructorValidationError = class extends Error { - constructor(message) { - super(message + ` -Read more at https://pris.ly/d/client-constructor`); - } - get [Symbol.toStringTag]() { - return "PrismaClientConstructorValidationError"; - } -}; -__name(PrismaClientConstructorValidationError, "PrismaClientConstructorValidationError"); -var Field = class { - constructor({ name, args, children, error: error2, schemaField }) { - this.name = name; - this.args = args; - this.children = children; - this.error = error2; - this.schemaField = schemaField; - this.hasInvalidChild = children ? children.some((child) => Boolean(child.error || child.hasInvalidArg || child.hasInvalidChild)) : false; - this.hasInvalidArg = args ? args.hasInvalidArg : false; - } - get [Symbol.toStringTag]() { - return "Field"; - } - toString() { - let str = this.name; - if (this.error) { - return str + " # INVALID_FIELD"; - } - if (this.args && this.args.args && this.args.args.length > 0) { - if (this.args.args.length === 1) { - str += `(${this.args.toString()})`; - } else { - str += `( -${(0, import_indent_string4.default)(this.args.toString(), tab)} -)`; - } - } - if (this.children) { - str += ` { -${(0, import_indent_string4.default)(this.children.map(String).join("\n"), tab)} -}`; - } - return str; - } - collectErrors(prefix = "select") { - const fieldErrors = []; - const argErrors = []; - if (this.error) { - fieldErrors.push({ - path: [this.name], - error: this.error - }); - } - if (this.children) { - for (const child of this.children) { - const errors = child.collectErrors(prefix); - fieldErrors.push( - ...errors.fieldErrors.map((e2) => ({ - ...e2, - path: [this.name, prefix, ...e2.path] - })) - ); - argErrors.push( - ...errors.argErrors.map((e2) => ({ - ...e2, - path: [this.name, prefix, ...e2.path] - })) - ); - } - } - if (this.args) { - argErrors.push(...this.args.collectErrors().map((e2) => ({ ...e2, path: [this.name, ...e2.path] }))); - } - return { - fieldErrors, - argErrors - }; - } -}; -__name(Field, "Field"); -var Args = class { - constructor(args = []) { - this.args = args; - this.hasInvalidArg = args ? args.some((arg2) => Boolean(arg2.hasError)) : false; - } - get [Symbol.toStringTag]() { - return "Args"; - } - toString() { - if (this.args.length === 0) { - return ""; - } - return `${this.args.map((arg2) => arg2.toString()).filter((a) => a).join("\n")}`; - } - collectErrors() { - if (!this.hasInvalidArg) { - return []; - } - return this.args.flatMap((arg2) => arg2.collectErrors()); - } -}; -__name(Args, "Args"); -function stringify(value, inputType) { - if (Buffer.isBuffer(value)) { - return JSON.stringify(value.toString("base64")); - } - if (value instanceof FieldRefImpl) { - return `{ _ref: ${JSON.stringify(value.name)}}`; - } - if (Object.prototype.toString.call(value) === "[object BigInt]") { - return value.toString(); - } - if (typeof (inputType == null ? void 0 : inputType.type) === "string" && inputType.type === "Json") { - if (value === null) { - return "null"; - } - if (value && value.values && value.__prismaRawParameters__) { - return JSON.stringify(value.values); - } - if ((inputType == null ? void 0 : inputType.isList) && Array.isArray(value)) { - return JSON.stringify(value.map((o2) => JSON.stringify(o2))); - } - return JSON.stringify(JSON.stringify(value)); - } - if (value === void 0) { - return null; - } - if (value === null) { - return "null"; - } - if (decimal_default.isDecimal(value) || (inputType == null ? void 0 : inputType.type) === "Decimal" && isDecimalJsLike(value)) { - return stringifyDecimalJsLike(value); - } - if ((inputType == null ? void 0 : inputType.location) === "enumTypes" && typeof value === "string") { - if (Array.isArray(value)) { - return `[${value.join(", ")}]`; - } - return value; - } - if (typeof value === "number" && (inputType == null ? void 0 : inputType.type) === "Float") { - return value.toExponential(); - } - return JSON.stringify(value, null, 2); -} -__name(stringify, "stringify"); -var Arg2 = class { - constructor({ key, value, isEnum = false, error: error2, schemaArg, inputType }) { - this.inputType = inputType; - this.key = key; - this.value = value instanceof ObjectEnumValue ? value._getName() : value; - this.isEnum = isEnum; - this.error = error2; - this.schemaArg = schemaArg; - this.isNullable = (schemaArg == null ? void 0 : schemaArg.inputTypes.reduce((isNullable) => isNullable && schemaArg.isNullable, true)) || false; - this.hasError = Boolean(error2) || (value instanceof Args ? value.hasInvalidArg : false) || Array.isArray(value) && value.some((v) => v instanceof Args ? v.hasInvalidArg : false); - } - get [Symbol.toStringTag]() { - return "Arg"; - } - _toString(value, key) { - var _a3; - if (typeof value === "undefined") { - return void 0; - } - if (value instanceof Args) { - return `${key}: { -${(0, import_indent_string4.default)(value.toString(), 2)} -}`; - } - if (Array.isArray(value)) { - if (((_a3 = this.inputType) == null ? void 0 : _a3.type) === "Json") { - return `${key}: ${stringify(value, this.inputType)}`; - } - const isScalar = !value.some((v) => typeof v === "object"); - return `${key}: [${isScalar ? "" : "\n"}${(0, import_indent_string4.default)( - value.map((nestedValue) => { - if (nestedValue instanceof Args) { - return `{ -${(0, import_indent_string4.default)(nestedValue.toString(), tab)} -}`; - } - return stringify(nestedValue, this.inputType); - }).join(`,${isScalar ? " " : "\n"}`), - isScalar ? 0 : tab - )}${isScalar ? "" : "\n"}]`; - } - return `${key}: ${stringify(value, this.inputType)}`; - } - toString() { - return this._toString(this.value, this.key); - } - collectErrors() { - var _a3; - if (!this.hasError) { - return []; - } - const errors = []; - if (this.error) { - const id = typeof ((_a3 = this.inputType) == null ? void 0 : _a3.type) === "object" ? `${this.inputType.type.name}${this.inputType.isList ? "[]" : ""}` : void 0; - errors.push({ - error: this.error, - path: [this.key], - id - }); - } - if (Array.isArray(this.value)) { - return errors.concat( - this.value.flatMap((val, index) => { - if (!(val == null ? void 0 : val.collectErrors)) { - return []; - } - return val.collectErrors().map((e2) => { - return { ...e2, path: [this.key, index, ...e2.path] }; - }); - }) - ); - } - if (this.value instanceof Args) { - return errors.concat(this.value.collectErrors().map((e2) => ({ ...e2, path: [this.key, ...e2.path] }))); - } - return errors; - } -}; -__name(Arg2, "Arg"); -function makeDocument({ - dmmf, - rootTypeName, - rootField, - select, - modelName, - extensions -}) { - if (!select) { - select = {}; - } - const rootType = rootTypeName === "query" ? dmmf.queryType : dmmf.mutationType; - const fakeRootField = { - args: [], - outputType: { - isList: false, - type: rootType, - location: "outputObjectTypes" - }, - name: rootTypeName - }; - const context3 = { - modelName - }; - const children = selectionToFields({ - dmmf, - selection: { [rootField]: select }, - schemaField: fakeRootField, - path: [rootTypeName], - context: context3, - extensions - }); - return new Document(rootTypeName, children); -} -__name(makeDocument, "makeDocument"); -function transformDocument(document2) { - return document2; -} -__name(transformDocument, "transformDocument"); -function selectionToFields({ - dmmf, - selection, - schemaField, - path: path7, - context: context3, - extensions -}) { - const outputType = schemaField.outputType.type; - const computedFields = context3.modelName ? extensions.getAllComputedFields(context3.modelName) : {}; - selection = applyComputedFieldsToSelection(selection, computedFields); - return Object.entries(selection).reduce((acc, [name, value]) => { - const field = outputType.fieldMap ? outputType.fieldMap[name] : outputType.fields.find((f2) => f2.name === name); - if (computedFields == null ? void 0 : computedFields[name]) { - return acc; - } - if (!field) { - acc.push( - new Field({ - name, - children: [], - error: { - type: "invalidFieldName", - modelName: outputType.name, - providedName: name, - didYouMean: getSuggestion( - name, - outputType.fields.map((f2) => f2.name).concat(Object.keys(computedFields != null ? computedFields : {})) - ), - outputType - } - }) - ); - return acc; - } - if (field.outputType.location === "scalar" && field.args.length === 0 && typeof value !== "boolean") { - acc.push( - new Field({ - name, - children: [], - error: { - type: "invalidFieldType", - modelName: outputType.name, - fieldName: name, - providedValue: value - } - }) - ); - return acc; - } - if (value === false) { - return acc; - } - const transformedField = { - name: field.name, - fields: field.args, - constraints: { - minNumFields: null, - maxNumFields: null - } - }; - const argsWithoutIncludeAndSelect = typeof value === "object" ? omit2(value, ["include", "select"]) : void 0; - const args = argsWithoutIncludeAndSelect ? objectToArgs( - argsWithoutIncludeAndSelect, - transformedField, - context3, - [], - typeof field === "string" ? void 0 : field.outputType.type - ) : void 0; - const isRelation = field.outputType.location === "outputObjectTypes"; - if (value) { - if (value.select && value.include) { - acc.push( - new Field({ - name, - children: [ - new Field({ - name: "include", - args: new Args(), - error: { - type: "includeAndSelect", - field - } - }) - ] - }) - ); - } else if (value.include) { - const keys2 = Object.keys(value.include); - if (keys2.length === 0) { - acc.push( - new Field({ - name, - children: [ - new Field({ - name: "include", - args: new Args(), - error: { - type: "emptyInclude", - field - } - }) - ] - }) - ); - return acc; - } - if (field.outputType.location === "outputObjectTypes") { - const fieldOutputType = field.outputType.type; - const allowedKeys = fieldOutputType.fields.filter((f2) => f2.outputType.location === "outputObjectTypes").map((f2) => f2.name); - const invalidKeys = keys2.filter((key) => !allowedKeys.includes(key)); - if (invalidKeys.length > 0) { - acc.push( - ...invalidKeys.map( - (invalidKey) => new Field({ - name: invalidKey, - children: [ - new Field({ - name: invalidKey, - args: new Args(), - error: { - type: "invalidFieldName", - modelName: fieldOutputType.name, - outputType: fieldOutputType, - providedName: invalidKey, - didYouMean: getSuggestion(invalidKey, allowedKeys) || void 0, - isInclude: true, - isIncludeScalar: fieldOutputType.fields.some((f2) => f2.name === invalidKey) - } - }) - ] - }) - ) - ); - return acc; - } - } - } else if (value.select) { - const values = Object.values(value.select); - if (values.length === 0) { - acc.push( - new Field({ - name, - children: [ - new Field({ - name: "select", - args: new Args(), - error: { - type: "emptySelect", - field - } - }) - ] - }) - ); - return acc; - } - const truthyValues = values.filter((v) => v); - if (truthyValues.length === 0) { - acc.push( - new Field({ - name, - children: [ - new Field({ - name: "select", - args: new Args(), - error: { - type: "noTrueSelect", - field - } - }) - ] - }) - ); - return acc; - } - } - } - const defaultSelection = isRelation ? getDefaultSelection(dmmf, field.outputType.type) : null; - let select = defaultSelection; - if (value) { - if (value.select) { - select = value.select; - } else if (value.include) { - select = deepExtend(defaultSelection, value.include); - } else if (value.by && Array.isArray(value.by) && field.outputType.namespace === "prisma" && field.outputType.location === "outputObjectTypes" && isGroupByOutputName(field.outputType.type.name)) { - select = byToSelect(value.by); - } - } - let children; - if (select !== false && isRelation) { - let modelName = context3.modelName; - if (typeof field.outputType.type === "object" && field.outputType.namespace === "model" && field.outputType.location === "outputObjectTypes") { - modelName = field.outputType.type.name; - } - children = selectionToFields({ - dmmf, - selection: select, - schemaField: field, - path: [...path7, name], - context: { modelName }, - extensions - }); - } - acc.push(new Field({ name, args, children, schemaField: field })); - return acc; - }, []); -} -__name(selectionToFields, "selectionToFields"); -function byToSelect(by) { - const obj = /* @__PURE__ */ Object.create(null); - for (const b2 of by) { - obj[b2] = true; - } - return obj; -} -__name(byToSelect, "byToSelect"); -function getDefaultSelection(dmmf, outputType) { - const acc = /* @__PURE__ */ Object.create(null); - for (const f2 of outputType.fields) { - if (dmmf.typeMap[f2.outputType.type.name] !== void 0) { - acc[f2.name] = true; - } - if (f2.outputType.location === "scalar" || f2.outputType.location === "enumTypes") { - acc[f2.name] = true; - } - } - return acc; -} -__name(getDefaultSelection, "getDefaultSelection"); -function getInvalidTypeArg(key, value, arg2, bestFittingType) { - const arrg = new Arg2({ - key, - value, - isEnum: bestFittingType.location === "enumTypes", - inputType: bestFittingType, - error: { - type: "invalidType", - providedValue: value, - argName: key, - requiredType: { - inputType: arg2.inputTypes, - bestFittingType - } - } - }); - return arrg; -} -__name(getInvalidTypeArg, "getInvalidTypeArg"); -function hasCorrectScalarType(value, inputType, context3) { - const { isList } = inputType; - const expectedType = getExpectedType(inputType, context3); - const graphQLType = getGraphQLType(value, inputType); - if (graphQLType === expectedType) { - return true; - } - if (isList && graphQLType === "List<>") { - return true; - } - if (expectedType === "Json" && graphQLType !== "Symbol" && !(value instanceof ObjectEnumValue) && !(value instanceof FieldRefImpl)) { - return true; - } - if (graphQLType === "Int" && expectedType === "BigInt") { - return true; - } - if ((graphQLType === "Int" || graphQLType === "Float") && expectedType === "Decimal") { - return true; - } - if (graphQLType === "DateTime" && expectedType === "String") { - return true; - } - if (graphQLType === "UUID" && expectedType === "String") { - return true; - } - if (graphQLType === "String" && expectedType === "ID") { - return true; - } - if (graphQLType === "Int" && expectedType === "Float") { - return true; - } - if (graphQLType === "Int" && expectedType === "Long") { - return true; - } - if (graphQLType === "String" && expectedType === "Decimal" && isDecimalString(value)) { - return true; - } - if (value === null) { - return true; - } - if (inputType.isList && Array.isArray(value)) { - return value.every((v) => hasCorrectScalarType(v, { ...inputType, isList: false }, context3)); - } - return false; -} -__name(hasCorrectScalarType, "hasCorrectScalarType"); -function getExpectedType(inputType, context3, isList = inputType.isList) { - let type = stringifyGraphQLType(inputType.type); - if (inputType.location === "fieldRefTypes" && context3.modelName) { - type += `<${context3.modelName}>`; - } - return wrapWithList(type, isList); -} -__name(getExpectedType, "getExpectedType"); -var cleanObject = /* @__PURE__ */ __name((obj) => filterObject(obj, (k, v) => v !== void 0), "cleanObject"); -function isDecimalString(value) { - return /^\-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i.test(value); -} -__name(isDecimalString, "isDecimalString"); -function valueToArg(key, value, arg2, context3) { - let maybeArg = null; - const argsWithErrors = []; - for (const inputType of arg2.inputTypes) { - maybeArg = tryInferArgs(key, value, arg2, inputType, context3); - if ((maybeArg == null ? void 0 : maybeArg.collectErrors().length) === 0) { - return maybeArg; - } - if (maybeArg && (maybeArg == null ? void 0 : maybeArg.collectErrors())) { - const argErrors = maybeArg == null ? void 0 : maybeArg.collectErrors(); - if (argErrors && argErrors.length > 0) { - argsWithErrors.push({ arg: maybeArg, errors: argErrors }); - } - } - } - if ((maybeArg == null ? void 0 : maybeArg.hasError) && argsWithErrors.length > 0) { - const argsWithScores = argsWithErrors.map(({ arg: arg3, errors }) => { - const errorScores = errors.map((e2) => { - let score = 1; - if (e2.error.type === "invalidType") { - score = 2 * Math.exp(getDepth(e2.error.providedValue)) + 1; - } - score += Math.log(e2.path.length); - if (e2.error.type === "missingArg") { - if (arg3.inputType && isInputArgType(arg3.inputType.type) && arg3.inputType.type.name.includes("Unchecked")) { - score *= 2; - } - } - if (e2.error.type === "invalidName") { - if (isInputArgType(e2.error.originalType)) { - if (e2.error.originalType.name.includes("Unchecked")) { - score *= 2; - } - } - } - return score; - }); - return { - score: errors.length + sum2(errorScores), - arg: arg3, - errors - }; - }); - argsWithScores.sort((a, b2) => a.score < b2.score ? -1 : 1); - return argsWithScores[0].arg; - } - return maybeArg; -} -__name(valueToArg, "valueToArg"); -function getDepth(object) { - let level = 1; - if (!object || typeof object !== "object") { - return level; - } - for (const key in object) { - if (!Object.prototype.hasOwnProperty.call(object, key)) { - continue; - } - if (typeof object[key] === "object") { - const depth = getDepth(object[key]) + 1; - level = Math.max(depth, level); - } - } - return level; -} -__name(getDepth, "getDepth"); -function sum2(n2) { - return n2.reduce((acc, curr) => acc + curr, 0); -} -__name(sum2, "sum"); -function tryInferArgs(key, value, arg2, inputType, context3) { - var _a3, _b2, _c, _d, _e; - if (typeof value === "undefined") { - if (!arg2.isRequired) { - return null; - } - return new Arg2({ - key, - value, - isEnum: inputType.location === "enumTypes", - inputType, - error: { - type: "missingArg", - missingName: key, - missingArg: arg2, - atLeastOne: false, - atMostOne: false - } - }); - } - const { isNullable, isRequired } = arg2; - if (value === null && !isNullable && !isRequired) { - const isAtLeastOne = isInputArgType(inputType.type) ? inputType.type.constraints.minNumFields !== null && inputType.type.constraints.minNumFields > 0 : false; - if (!isAtLeastOne) { - return new Arg2({ - key, - value, - isEnum: inputType.location === "enumTypes", - inputType, - error: { - type: "invalidNullArg", - name: key, - invalidType: arg2.inputTypes, - atLeastOne: false, - atMostOne: false - } - }); - } - } - if (!inputType.isList) { - if (isInputArgType(inputType.type)) { - if (typeof value !== "object" || Array.isArray(value) || inputType.location === "inputObjectTypes" && !isObject2(value)) { - return getInvalidTypeArg(key, value, arg2, inputType); - } else { - const val = cleanObject(value); - let error2; - const keys2 = Object.keys(val || {}); - const numKeys = keys2.length; - if (numKeys === 0 && typeof inputType.type.constraints.minNumFields === "number" && inputType.type.constraints.minNumFields > 0 || ((_a3 = inputType.type.constraints.fields) == null ? void 0 : _a3.some((field) => keys2.includes(field))) === false) { - error2 = { - type: "atLeastOne", - key, - inputType: inputType.type, - atLeastFields: inputType.type.constraints.fields - }; - } else if (numKeys > 1 && typeof inputType.type.constraints.maxNumFields === "number" && inputType.type.constraints.maxNumFields < 2) { - error2 = { - type: "atMostOne", - key, - inputType: inputType.type, - providedKeys: keys2 - }; - } - return new Arg2({ - key, - value: val === null ? null : objectToArgs(val, inputType.type, context3, arg2.inputTypes), - isEnum: inputType.location === "enumTypes", - error: error2, - inputType, - schemaArg: arg2 - }); - } - } else { - return scalarToArg(key, value, arg2, inputType, context3); - } - } - if (!Array.isArray(value) && inputType.isList) { - if (key !== "updateMany") { - value = [value]; - } - } - if (inputType.location === "enumTypes" || inputType.location === "scalar") { - return scalarToArg(key, value, arg2, inputType, context3); - } - const argInputType = inputType.type; - const hasAtLeastOneError = typeof ((_b2 = argInputType.constraints) == null ? void 0 : _b2.minNumFields) === "number" && ((_c = argInputType.constraints) == null ? void 0 : _c.minNumFields) > 0 ? Array.isArray(value) && value.some((v) => !v || Object.keys(cleanObject(v)).length === 0) : false; - let err = hasAtLeastOneError ? { - inputType: argInputType, - key, - type: "atLeastOne" - } : void 0; - if (!err) { - const hasOneOfError = typeof ((_d = argInputType.constraints) == null ? void 0 : _d.maxNumFields) === "number" && ((_e = argInputType.constraints) == null ? void 0 : _e.maxNumFields) < 2 ? Array.isArray(value) && value.find((v) => !v || Object.keys(cleanObject(v)).length !== 1) : false; - if (hasOneOfError) { - err = { - inputType: argInputType, - key, - type: "atMostOne", - providedKeys: Object.keys(hasOneOfError) - }; - } - } - if (!Array.isArray(value)) { - for (const nestedArgInputType of arg2.inputTypes) { - const args = objectToArgs(value, nestedArgInputType.type, context3); - if (args.collectErrors().length === 0) { - return new Arg2({ - key, - value: args, - isEnum: false, - schemaArg: arg2, - inputType: nestedArgInputType - }); - } - } - } - return new Arg2({ - key, - value: value.map((v) => { - if (inputType.isList && typeof v !== "object") { - return v; - } - if (typeof v !== "object" || !value) { - return getInvalidTypeArg(key, v, arg2, inputType); - } - return objectToArgs(v, argInputType, context3); - }), - isEnum: false, - inputType, - schemaArg: arg2, - error: err - }); -} -__name(tryInferArgs, "tryInferArgs"); -function isInputArgType(argType) { - if (typeof argType === "string") { - return false; - } - if (Object.hasOwnProperty.call(argType, "values")) { - return false; - } - return true; -} -__name(isInputArgType, "isInputArgType"); -function scalarToArg(key, value, arg2, inputType, context3) { - if (hasCorrectScalarType(value, inputType, context3)) { - return new Arg2({ - key, - value, - isEnum: inputType.location === "enumTypes", - schemaArg: arg2, - inputType - }); - } - return getInvalidTypeArg(key, value, arg2, inputType); -} -__name(scalarToArg, "scalarToArg"); -function objectToArgs(initialObj, inputType, context3, possibilities, outputType) { - var _a3; - if ((_a3 = inputType.meta) == null ? void 0 : _a3.source) { - context3 = { modelName: inputType.meta.source }; - } - const obj = cleanObject(initialObj); - const { fields: args, fieldMap } = inputType; - const requiredArgs = args.map((arg2) => [arg2.name, void 0]); - const objEntries = Object.entries(obj || {}); - const entries = unionBy(objEntries, requiredArgs, (a) => a[0]); - const argsList = entries.reduce((acc, [argName, value]) => { - const schemaArg = fieldMap ? fieldMap[argName] : args.find((a) => a.name === argName); - if (!schemaArg) { - const didYouMeanField = typeof value === "boolean" && outputType && outputType.fields.some((f2) => f2.name === argName) ? argName : null; - acc.push( - new Arg2({ - key: argName, - value, - error: { - type: "invalidName", - providedName: argName, - providedValue: value, - didYouMeanField, - didYouMeanArg: !didYouMeanField && getSuggestion(argName, [...args.map((a) => a.name), "select"]) || void 0, - originalType: inputType, - possibilities, - outputType - } - }) - ); - return acc; - } - const arg2 = valueToArg(argName, value, schemaArg, context3); - if (arg2) { - acc.push(arg2); - } - return acc; - }, []); - if (typeof inputType.constraints.minNumFields === "number" && objEntries.length < inputType.constraints.minNumFields || argsList.find((arg2) => { - var _a4, _b2; - return ((_a4 = arg2.error) == null ? void 0 : _a4.type) === "missingArg" || ((_b2 = arg2.error) == null ? void 0 : _b2.type) === "atLeastOne"; - })) { - const optionalMissingArgs = inputType.fields.filter( - (field) => !field.isRequired && obj && (typeof obj[field.name] === "undefined" || obj[field.name] === null) - ); - argsList.push( - ...optionalMissingArgs.map((arg2) => { - const argInputType = arg2.inputTypes[0]; - return new Arg2({ - key: arg2.name, - value: void 0, - isEnum: argInputType.location === "enumTypes", - error: { - type: "missingArg", - missingName: arg2.name, - missingArg: arg2, - atLeastOne: Boolean(inputType.constraints.minNumFields) || false, - atMostOne: inputType.constraints.maxNumFields === 1 || false - }, - inputType: argInputType - }); - }) - ); - } - return new Args(argsList); -} -__name(objectToArgs, "objectToArgs"); -function unpack({ document: document2, path: path7, data }) { - const result = deepGet(data, path7); - if (result === "undefined") { - return null; - } - if (typeof result !== "object") { - return result; - } - const field = getField(document2, path7); - return mapScalars({ field, data: result }); -} -__name(unpack, "unpack"); -function mapScalars({ field, data }) { - var _a3; - if (!data || typeof data !== "object" || !field.children || !field.schemaField) { - return data; - } - const deserializers = { - DateTime: (value) => new Date(value), - Json: (value) => JSON.parse(value), - Bytes: (value) => Buffer.from(value, "base64"), - Decimal: (value) => { - return new decimal_default(value); - }, - BigInt: (value) => BigInt(value) - }; - for (const child of field.children) { - const outputType = (_a3 = child.schemaField) == null ? void 0 : _a3.outputType.type; - if (outputType && typeof outputType === "string") { - const deserializer = deserializers[outputType]; - if (deserializer) { - if (Array.isArray(data)) { - for (const entry of data) { - if (typeof entry[child.name] !== "undefined" && entry[child.name] !== null) { - if (Array.isArray(entry[child.name])) { - entry[child.name] = entry[child.name].map(deserializer); - } else { - entry[child.name] = deserializer(entry[child.name]); - } - } - } - } else { - if (typeof data[child.name] !== "undefined" && data[child.name] !== null) { - if (Array.isArray(data[child.name])) { - data[child.name] = data[child.name].map(deserializer); - } else { - data[child.name] = deserializer(data[child.name]); - } - } - } - } - } - if (child.schemaField && child.schemaField.outputType.location === "outputObjectTypes") { - if (Array.isArray(data)) { - for (const entry of data) { - mapScalars({ field: child, data: entry[child.name] }); - } - } else { - mapScalars({ field: child, data: data[child.name] }); - } - } - } - return data; -} -__name(mapScalars, "mapScalars"); -function getField(document2, path7) { - const todo = path7.slice(); - const firstElement = todo.shift(); - let pointer = document2.children.find((c) => c.name === firstElement); - if (!pointer) { - throw new Error(`Could not find field ${firstElement} in document ${document2}`); - } - while (todo.length > 0) { - const key = todo.shift(); - if (!pointer.children) { - throw new Error(`Can't get children for field ${pointer} with child ${key}`); - } - const child = pointer.children.find((c) => c.name === key); - if (!child) { - throw new Error(`Can't find child ${key} of field ${pointer}`); - } - pointer = child; - } - return pointer; -} -__name(getField, "getField"); -function removeSelectFromPath(path7) { - return path7.split(".").filter((p2) => p2 !== "select").join("."); -} -__name(removeSelectFromPath, "removeSelectFromPath"); -function removeSelectFromObject(obj) { - const type = Object.prototype.toString.call(obj); - if (type === "[object Object]") { - const copy = {}; - for (const key in obj) { - if (key === "select") { - for (const subKey in obj["select"]) { - copy[subKey] = removeSelectFromObject(obj["select"][subKey]); - } - } else { - copy[key] = removeSelectFromObject(obj[key]); - } - } - return copy; - } - return obj; -} -__name(removeSelectFromObject, "removeSelectFromObject"); -function transformAggregatePrintJsonArgs({ - ast, - keyPaths, - missingItems, - valuePaths -}) { - const newKeyPaths = keyPaths.map(removeSelectFromPath); - const newValuePaths = valuePaths.map(removeSelectFromPath); - const newMissingItems = missingItems.map((item) => ({ - path: removeSelectFromPath(item.path), - isRequired: item.isRequired, - type: item.type - })); - const newAst = removeSelectFromObject(ast); - return { - ast: newAst, - keyPaths: newKeyPaths, - missingItems: newMissingItems, - valuePaths: newValuePaths - }; -} -__name(transformAggregatePrintJsonArgs, "transformAggregatePrintJsonArgs"); - -// src/runtime/core/compositeProxy/addObjectProperties.ts -function addObjectProperties(object) { - return { - getKeys() { - return Object.keys(object); - }, - getPropertyValue(key) { - return object[key]; - } - }; -} -__name(addObjectProperties, "addObjectProperties"); - -// src/runtime/core/compositeProxy/addProperty.ts -function addProperty(key, factory) { - return { - getKeys() { - return [key]; - }, - getPropertyValue() { - return factory(); - } - }; -} -__name(addProperty, "addProperty"); - -// src/runtime/core/compositeProxy/cacheProperties.ts -function cacheProperties(baseLayer) { - const cache = new Cache(); - return { - getKeys() { - return baseLayer.getKeys(); - }, - getPropertyValue(key) { - return cache.getOrCreate(key, () => baseLayer.getPropertyValue(key)); - }, - getPropertyDescriptor(key) { - var _a3; - return (_a3 = baseLayer.getPropertyDescriptor) == null ? void 0 : _a3.call(baseLayer, key); - } - }; -} -__name(cacheProperties, "cacheProperties"); - -// src/runtime/core/compositeProxy/createCompositeProxy.ts -var import_util7 = require("util"); - -// src/runtime/core/model/utils/defaultProxyHandlers.ts -var defaultPropertyDescriptor = { - enumerable: true, - configurable: true, - writable: true -}; -function defaultProxyHandlers(ownKeys) { - const _ownKeys = new Set(ownKeys); - return { - getOwnPropertyDescriptor: () => defaultPropertyDescriptor, - has: (target, prop) => _ownKeys.has(prop), - set: (target, prop, value) => { - return _ownKeys.add(prop) && Reflect.set(target, prop, value); - }, - ownKeys: () => [..._ownKeys] - }; -} -__name(defaultProxyHandlers, "defaultProxyHandlers"); - -// src/runtime/core/compositeProxy/createCompositeProxy.ts -var customInspect = Symbol.for("nodejs.util.inspect.custom"); -function createCompositeProxy(target, layers) { - const keysToLayerMap = mapKeysToLayers(layers); - const overwrittenKeys = /* @__PURE__ */ new Set(); - const proxy = new Proxy(target, { - get(target2, prop) { - if (overwrittenKeys.has(prop)) { - return target2[prop]; - } - const layer = keysToLayerMap.get(prop); - if (layer) { - return layer.getPropertyValue(prop); - } - return target2[prop]; - }, - has(target2, prop) { - var _a3, _b2; - if (overwrittenKeys.has(prop)) { - return true; - } - const layer = keysToLayerMap.get(prop); - if (layer) { - return (_b2 = (_a3 = layer.has) == null ? void 0 : _a3.call(layer, prop)) != null ? _b2 : true; - } - return Reflect.has(target2, prop); - }, - ownKeys(target2) { - const targetKeys = getExistingKeys(Reflect.ownKeys(target2), keysToLayerMap); - const layerKeys = getExistingKeys(Array.from(keysToLayerMap.keys()), keysToLayerMap); - return [.../* @__PURE__ */ new Set([...targetKeys, ...layerKeys, ...overwrittenKeys])]; - }, - set(target2, prop, value) { - var _a3, _b2; - const layer = keysToLayerMap.get(prop); - if (((_b2 = (_a3 = layer == null ? void 0 : layer.getPropertyDescriptor) == null ? void 0 : _a3.call(layer, prop)) == null ? void 0 : _b2.writable) === false) { - return false; - } - overwrittenKeys.add(prop); - return Reflect.set(target2, prop, value); - }, - getOwnPropertyDescriptor(target2, prop) { - const layer = keysToLayerMap.get(prop); - if (layer && layer.getPropertyDescriptor) { - return { - ...defaultPropertyDescriptor, - ...layer.getPropertyDescriptor(prop) - }; - } - return defaultPropertyDescriptor; - }, - defineProperty(target2, property, attributes) { - overwrittenKeys.add(property); - return Reflect.defineProperty(target2, property, attributes); - } - }); - proxy[customInspect] = function(depth, options, defaultInspect = import_util7.inspect) { - const toLog = { ...this }; - delete toLog[customInspect]; - return defaultInspect(toLog, options); - }; - return proxy; -} -__name(createCompositeProxy, "createCompositeProxy"); -function mapKeysToLayers(layers) { - const keysToLayerMap = /* @__PURE__ */ new Map(); - for (const layer of layers) { - const keys2 = layer.getKeys(); - for (const key of keys2) { - keysToLayerMap.set(key, layer); - } - } - return keysToLayerMap; -} -__name(mapKeysToLayers, "mapKeysToLayers"); -function getExistingKeys(keys2, keysToLayerMap) { - return keys2.filter((key) => { - var _a3, _b2; - const layer = keysToLayerMap.get(key); - return (_b2 = (_a3 = layer == null ? void 0 : layer.has) == null ? void 0 : _a3.call(layer, key)) != null ? _b2 : true; - }); -} -__name(getExistingKeys, "getExistingKeys"); - -// src/runtime/core/compositeProxy/removeProperties.ts -function removeProperties(keys2) { - return { - getKeys() { - return keys2; - }, - has() { - return false; - }, - getPropertyValue() { - return void 0; - } - }; -} -__name(removeProperties, "removeProperties"); - -// ../../node_modules/.pnpm/stacktrace-parser@0.1.10/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js -var UNKNOWN_FUNCTION = ""; -function parse(stackString) { - var lines = stackString.split("\n"); - return lines.reduce(function(stack, line) { - var parseResult = parseChrome(line) || parseWinjs(line) || parseGecko(line) || parseNode(line) || parseJSC(line); - if (parseResult) { - stack.push(parseResult); - } - return stack; - }, []); -} -__name(parse, "parse"); -var chromeRe = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; -var chromeEvalRe = /\((\S*)(?::(\d+))(?::(\d+))\)/; -function parseChrome(line) { - var parts = chromeRe.exec(line); - if (!parts) { - return null; - } - var isNative = parts[2] && parts[2].indexOf("native") === 0; - var isEval = parts[2] && parts[2].indexOf("eval") === 0; - var submatch = chromeEvalRe.exec(parts[2]); - if (isEval && submatch != null) { - parts[2] = submatch[1]; - parts[3] = submatch[2]; - parts[4] = submatch[3]; - } - return { - file: !isNative ? parts[2] : null, - methodName: parts[1] || UNKNOWN_FUNCTION, - arguments: isNative ? [parts[2]] : [], - lineNumber: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null - }; -} -__name(parseChrome, "parseChrome"); -var winjsRe = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function parseWinjs(line) { - var parts = winjsRe.exec(line); - if (!parts) { - return null; - } - return { - file: parts[2], - methodName: parts[1] || UNKNOWN_FUNCTION, - arguments: [], - lineNumber: +parts[3], - column: parts[4] ? +parts[4] : null - }; -} -__name(parseWinjs, "parseWinjs"); -var geckoRe = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i; -var geckoEvalRe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -function parseGecko(line) { - var parts = geckoRe.exec(line); - if (!parts) { - return null; - } - var isEval = parts[3] && parts[3].indexOf(" > eval") > -1; - var submatch = geckoEvalRe.exec(parts[3]); - if (isEval && submatch != null) { - parts[3] = submatch[1]; - parts[4] = submatch[2]; - parts[5] = null; - } - return { - file: parts[3], - methodName: parts[1] || UNKNOWN_FUNCTION, - arguments: parts[2] ? parts[2].split(",") : [], - lineNumber: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null - }; -} -__name(parseGecko, "parseGecko"); -var javaScriptCoreRe = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; -function parseJSC(line) { - var parts = javaScriptCoreRe.exec(line); - if (!parts) { - return null; - } - return { - file: parts[3], - methodName: parts[1] || UNKNOWN_FUNCTION, - arguments: [], - lineNumber: +parts[4], - column: parts[5] ? +parts[5] : null - }; -} -__name(parseJSC, "parseJSC"); -var nodeRe = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function parseNode(line) { - var parts = nodeRe.exec(line); - if (!parts) { - return null; - } - return { - file: parts[2], - methodName: parts[1] || UNKNOWN_FUNCTION, - arguments: [], - lineNumber: +parts[3], - column: parts[4] ? +parts[4] : null - }; -} -__name(parseNode, "parseNode"); - -// src/runtime/utils/CallSite.ts -var DisabledCallSite = class { - getLocation() { - return null; - } -}; -__name(DisabledCallSite, "DisabledCallSite"); -var EnabledCallSite = class { - constructor() { - this._error = new Error(); - } - getLocation() { - const stack = this._error.stack; - if (!stack) { - return null; - } - const stackFrames = parse(stack); - const frame = stackFrames.find((t2) => { - return t2.file && t2.file !== "" && !t2.file.includes("@prisma") && !t2.file.includes("getPrismaClient") && !t2.file.startsWith("internal/") && !t2.methodName.includes("new ") && !t2.methodName.includes("getCallSite") && !t2.methodName.includes("Proxy.") && t2.methodName.split(".").length < 4; - }); - if (!frame || !frame.file) { - return null; - } - return { - fileName: frame.file, - lineNumber: frame.lineNumber, - columnNumber: frame.column - }; - } -}; -__name(EnabledCallSite, "EnabledCallSite"); -function getCallSite(errorFormat) { - if (errorFormat === "minimal") { - return new DisabledCallSite(); - } - return new EnabledCallSite(); -} -__name(getCallSite, "getCallSite"); - -// src/runtime/core/request/createPrismaPromise.ts -function createPrismaPromise(callback) { - let promise; - const _callback = /* @__PURE__ */ __name((transaction, lock, cached = true) => { - try { - if (cached === true) { - return promise != null ? promise : promise = valueToPromise(callback(transaction, lock)); - } - return valueToPromise(callback(transaction, lock)); - } catch (error2) { - return Promise.reject(error2); - } - }, "_callback"); - return { - then(onFulfilled, onRejected, transaction) { - return _callback(createItx(transaction), void 0).then(onFulfilled, onRejected, transaction); - }, - catch(onRejected, transaction) { - return _callback(createItx(transaction), void 0).catch(onRejected, transaction); - }, - finally(onFinally, transaction) { - return _callback(createItx(transaction), void 0).finally(onFinally, transaction); - }, - requestTransaction(transactionOptions, lock) { - const transaction = { kind: "batch", ...transactionOptions }; - const promise2 = _callback(transaction, lock, false); - if (promise2.requestTransaction) { - return promise2.requestTransaction(transaction, lock); - } - return promise2; - }, - [Symbol.toStringTag]: "PrismaPromise" - }; -} -__name(createPrismaPromise, "createPrismaPromise"); -function createItx(transaction) { - if (transaction) { - return { kind: "itx", ...transaction }; - } - return void 0; -} -__name(createItx, "createItx"); -function valueToPromise(thing) { - if (typeof thing["then"] === "function") { - return thing; - } - return Promise.resolve(thing); -} -__name(valueToPromise, "valueToPromise"); - -// src/runtime/core/model/aggregates/utils/aggregateMap.ts -var aggregateMap = { - _avg: true, - _count: true, - _sum: true, - _min: true, - _max: true -}; - -// src/runtime/core/model/aggregates/aggregate.ts -function desugarUserArgs(args = {}) { - const _args = desugarCountInUserArgs(args); - const userArgsEntries = Object.entries(_args); - return userArgsEntries.reduce( - (aggregateArgs, [key, value]) => { - if (aggregateMap[key] !== void 0) { - aggregateArgs["select"][key] = { select: value }; - } else { - aggregateArgs[key] = value; - } - return aggregateArgs; - }, - { select: {} } - ); -} -__name(desugarUserArgs, "desugarUserArgs"); -function desugarCountInUserArgs(args = {}) { - if (typeof args["_count"] === "boolean") { - return { ...args, _count: { _all: args["_count"] } }; - } - return args; -} -__name(desugarCountInUserArgs, "desugarCountInUserArgs"); -function createUnpacker(args = {}) { - return (data) => { - if (typeof args["_count"] === "boolean") { - data["_count"] = data["_count"]["_all"]; - } - return data; - }; -} -__name(createUnpacker, "createUnpacker"); -function aggregate(args, modelAction) { - const aggregateUnpacker = createUnpacker(args); - return modelAction({ - action: "aggregate", - unpacker: aggregateUnpacker, - argsMapper: desugarUserArgs - })(args); -} -__name(aggregate, "aggregate"); - -// src/runtime/core/model/aggregates/count.ts -function desugarUserArgs2(args = {}) { - const { select, ..._args } = args; - if (typeof select === "object") { - return desugarUserArgs({ ..._args, _count: select }); - } else { - return desugarUserArgs({ ..._args, _count: { _all: true } }); - } -} -__name(desugarUserArgs2, "desugarUserArgs"); -function createUnpacker2(args = {}) { - if (typeof args["select"] === "object") { - return (data) => createUnpacker(args)(data)["_count"]; - } else { - return (data) => createUnpacker(args)(data)["_count"]["_all"]; - } -} -__name(createUnpacker2, "createUnpacker"); -function count(args, modelAction) { - return modelAction({ - action: "count", - unpacker: createUnpacker2(args), - argsMapper: desugarUserArgs2 - })(args); -} -__name(count, "count"); - -// src/runtime/core/model/aggregates/groupBy.ts -function desugarUserArgs3(args = {}) { - const _args = desugarUserArgs(args); - if (Array.isArray(_args["by"])) { - for (const key of _args["by"]) { - if (typeof key === "string") { - _args["select"][key] = true; - } - } - } - return _args; -} -__name(desugarUserArgs3, "desugarUserArgs"); -function createUnpacker3(args = {}) { - return (data) => { - if (typeof (args == null ? void 0 : args["_count"]) === "boolean") { - data.forEach((row) => { - row["_count"] = row["_count"]["_all"]; - }); - } - return data; - }; -} -__name(createUnpacker3, "createUnpacker"); -function groupBy(args, modelAction) { - return modelAction({ - action: "groupBy", - unpacker: createUnpacker3(args), - argsMapper: desugarUserArgs3 - })(args); -} -__name(groupBy, "groupBy"); - -// src/runtime/core/model/applyAggregates.ts -function applyAggregates(client, action, modelAction) { - if (action === "aggregate") - return (userArgs) => aggregate(userArgs, modelAction); - if (action === "count") - return (userArgs) => count(userArgs, modelAction); - if (action === "groupBy") - return (userArgs) => groupBy(userArgs, modelAction); - return void 0; -} -__name(applyAggregates, "applyAggregates"); - -// src/runtime/core/model/applyFieldsProxy.ts -function applyFieldsProxy(model) { - const scalarFieldsList = model.fields.filter((field) => !field.relationName); - const scalarFields = keyBy(scalarFieldsList, (field) => field.name); - return new Proxy( - {}, - { - get(target, prop) { - if (prop in target || typeof prop === "symbol") { - return target[prop]; - } - const dmmfField = scalarFields[prop]; - if (dmmfField) { - return new FieldRefImpl(model.name, prop, dmmfField.type, dmmfField.isList); - } - return void 0; - }, - ...defaultProxyHandlers(Object.keys(scalarFields)) - } - ); -} -__name(applyFieldsProxy, "applyFieldsProxy"); - -// src/runtime/core/model/applyFluent.ts -function getNextDataPath(fluentPropName, prevDataPath) { - if (fluentPropName === void 0 || prevDataPath === void 0) - return []; - return [...prevDataPath, "select", fluentPropName]; -} -__name(getNextDataPath, "getNextDataPath"); -function getNextUserArgs(callArgs, prevArgs, nextDataPath) { - if (prevArgs === void 0) - return callArgs != null ? callArgs : {}; - return deepSet(prevArgs, nextDataPath, callArgs || true); -} -__name(getNextUserArgs, "getNextUserArgs"); -function applyFluent(client, dmmfModelName, modelAction, fluentPropName, prevDataPath, prevUserArgs) { - const dmmfModel = client._baseDmmf.modelMap[dmmfModelName]; - const dmmfModelFieldMap = dmmfModel.fields.reduce( - (acc, field) => ({ ...acc, [field.name]: field }), - {} - ); - return (userArgs) => { - const callsite = getCallSite(client._errorFormat); - const nextDataPath = getNextDataPath(fluentPropName, prevDataPath); - const nextUserArgs = getNextUserArgs(userArgs, prevUserArgs, nextDataPath); - const prismaPromise = modelAction({ dataPath: nextDataPath, callsite })(nextUserArgs); - const ownKeys = getOwnKeys(client, dmmfModelName); - return new Proxy(prismaPromise, { - get(target, prop) { - if (!ownKeys.includes(prop)) - return target[prop]; - const dmmfModelName2 = dmmfModelFieldMap[prop].type; - const modelArgs = [dmmfModelName2, modelAction, prop]; - const dataArgs = [nextDataPath, nextUserArgs]; - return applyFluent(client, ...modelArgs, ...dataArgs); - }, - ...defaultProxyHandlers([...ownKeys, ...Object.getOwnPropertyNames(prismaPromise)]) - }); - }; -} -__name(applyFluent, "applyFluent"); -function getOwnKeys(client, dmmfModelName) { - return client._baseDmmf.modelMap[dmmfModelName].fields.filter((field) => field.kind === "object").map((field) => field.name); -} -__name(getOwnKeys, "getOwnKeys"); - -// src/runtime/utils/clientVersion.ts -var clientVersion = require_package3().version; - -// src/runtime/utils/rejectOnNotFound.ts -var NotFoundError2 = class extends PrismaClientKnownRequestError { - constructor(message) { - super(message, { code: "P2025", clientVersion }); - this.name = "NotFoundError"; - } -}; -__name(NotFoundError2, "NotFoundError"); -function getRejectOnNotFound(action, modelName, args, clientInstance) { - let rejectOnNotFound; - if (args && typeof args === "object" && "rejectOnNotFound" in args && args["rejectOnNotFound"] !== void 0) { - rejectOnNotFound = args["rejectOnNotFound"]; - delete args["rejectOnNotFound"]; - } else if (typeof clientInstance === "boolean") { - rejectOnNotFound = clientInstance; - } else if (clientInstance && typeof clientInstance === "object" && action in clientInstance) { - const rejectPerOperation = clientInstance[action]; - if (rejectPerOperation && typeof rejectPerOperation === "object") { - if (modelName in rejectPerOperation) { - return rejectPerOperation[modelName]; - } - return void 0; - } - rejectOnNotFound = getRejectOnNotFound(action, modelName, args, rejectPerOperation); - } else if (typeof clientInstance === "function") { - rejectOnNotFound = clientInstance; - } else { - rejectOnNotFound = false; - } - return rejectOnNotFound; -} -__name(getRejectOnNotFound, "getRejectOnNotFound"); -var REGEX = /(findUnique|findFirst)/; -function throwIfNotFound(data, clientMethod, typeName, rejectOnNotFound) { - if (rejectOnNotFound && !data && REGEX.exec(clientMethod)) { - if (typeof rejectOnNotFound === "boolean" && rejectOnNotFound) { - throw new NotFoundError2(`No ${typeName} found`); - } else if (typeof rejectOnNotFound === "function") { - throw rejectOnNotFound(new NotFoundError2(`No ${typeName} found`)); - } else if (isError(rejectOnNotFound)) { - throw rejectOnNotFound; - } - throw new NotFoundError2(`No ${typeName} found`); - } -} -__name(throwIfNotFound, "throwIfNotFound"); - -// src/runtime/core/model/applyOrThrowErrorAdapter.ts -function adaptErrors(action, dmmfModelName, requestCallback) { - if (action === DMMF.ModelAction.findFirstOrThrow || action === DMMF.ModelAction.findUniqueOrThrow) { - return applyOrThrowWrapper(dmmfModelName, requestCallback); - } - return requestCallback; -} -__name(adaptErrors, "adaptErrors"); -function applyOrThrowWrapper(dmmfModelName, requestCallback) { - return async (requestParams) => { - if ("rejectOnNotFound" in requestParams.args) { - const message = createErrorMessageWithContext({ - originalMethod: requestParams.clientMethod, - callsite: requestParams.callsite, - message: "'rejectOnNotFound' option is not supported" - }); - throw new PrismaClientValidationError(message); - } - const result = await requestCallback(requestParams).catch((e2) => { - if (e2 instanceof PrismaClientKnownRequestError && e2.code === "P2025") { - throw new NotFoundError2(`No ${dmmfModelName} found`); - } else { - throw e2; - } - }); - return result; - }; -} -__name(applyOrThrowWrapper, "applyOrThrowWrapper"); - -// src/runtime/core/model/applyModel.ts -var fluentProps = [ - "findUnique", - "findUniqueOrThrow", - "findFirst", - "findFirstOrThrow", - "create", - "update", - "upsert", - "delete" -]; -var aggregateProps = ["aggregate", "count", "groupBy"]; -function applyModel(client, dmmfModelName) { - var _a3; - const layers = [modelActionsLayer(client, dmmfModelName)]; - if ((_a3 = client._engineConfig.previewFeatures) == null ? void 0 : _a3.includes("fieldReference")) { - layers.push(fieldsPropertyLayer(client, dmmfModelName)); - } - const modelExtensions = client._extensions.getAllModelExtensions(dmmfModelName); - if (modelExtensions) { - layers.push(addObjectProperties(modelExtensions)); - } - return createCompositeProxy({}, layers); -} -__name(applyModel, "applyModel"); -function modelActionsLayer(client, dmmfModelName) { - const jsModelName = dmmfToJSModelName(dmmfModelName); - const ownKeys = getOwnKeys2(client, dmmfModelName); - return { - getKeys() { - return ownKeys; - }, - getPropertyValue(key) { - const dmmfActionName = key; - let requestFn = /* @__PURE__ */ __name((params) => client._request(params), "requestFn"); - requestFn = adaptErrors(dmmfActionName, dmmfModelName, requestFn); - const action = /* @__PURE__ */ __name((paramOverrides) => (userArgs) => { - const callSite = getCallSite(client._errorFormat); - return createPrismaPromise((transaction, lock) => { - const params = { - args: userArgs, - dataPath: [], - action: dmmfActionName, - model: dmmfModelName, - clientMethod: `${jsModelName}.${key}`, - jsModelName, - transaction, - lock, - callsite: callSite - }; - return requestFn({ ...params, ...paramOverrides }); - }); - }, "action"); - if (fluentProps.includes(dmmfActionName)) { - return applyFluent(client, dmmfModelName, action); - } - if (isValidAggregateName(key)) { - return applyAggregates(client, key, action); - } - return action({}); - } - }; -} -__name(modelActionsLayer, "modelActionsLayer"); -function getOwnKeys2(client, dmmfModelName) { - const actionKeys = Object.keys(client._baseDmmf.mappingsMap[dmmfModelName]).filter( - (key) => key !== "model" && key !== "plural" - ); - actionKeys.push("count"); - return actionKeys; -} -__name(getOwnKeys2, "getOwnKeys"); -function isValidAggregateName(action) { - return aggregateProps.includes(action); -} -__name(isValidAggregateName, "isValidAggregateName"); -function fieldsPropertyLayer(client, dmmfModelName) { - return cacheProperties( - addProperty("fields", () => { - const model = client._baseDmmf.modelMap[dmmfModelName]; - return applyFieldsProxy(model); - }) - ); -} -__name(fieldsPropertyLayer, "fieldsPropertyLayer"); - -// src/runtime/core/model/utils/jsToDMMFModelName.ts -function jsToDMMFModelName(name) { - return name.replace(/^./, (str) => str.toUpperCase()); -} -__name(jsToDMMFModelName, "jsToDMMFModelName"); - -// src/runtime/core/model/applyModelsAndClientExtensions.ts -var rawClient = Symbol(); -function applyModelsAndClientExtensions(client) { - const layers = [modelsLayer(client), addProperty(rawClient, () => client)]; - const clientExtensions = client._extensions.getAllClientExtensions(); - if (clientExtensions) { - layers.push(addObjectProperties(clientExtensions)); - } - return createCompositeProxy(client, layers); -} -__name(applyModelsAndClientExtensions, "applyModelsAndClientExtensions"); -function modelsLayer(client) { - const dmmfModelKeys = Object.keys(client._baseDmmf.modelMap); - const jsModelKeys = dmmfModelKeys.map(dmmfToJSModelName); - const allKeys = [...new Set(dmmfModelKeys.concat(jsModelKeys))]; - return cacheProperties({ - getKeys() { - return allKeys; - }, - getPropertyValue(prop) { - const dmmfModelName = jsToDMMFModelName(prop); - if (client._baseDmmf.modelMap[dmmfModelName] !== void 0) { - return applyModel(client, dmmfModelName); - } - if (client._baseDmmf.modelMap[prop] !== void 0) { - return applyModel(client, prop); - } - return void 0; - }, - getPropertyDescriptor(key) { - if (!jsModelKeys.includes(key)) { - return { enumerable: false }; - } - return void 0; - } - }); -} -__name(modelsLayer, "modelsLayer"); -function unapplyModelsAndClientExtensions(client) { - if (client[rawClient]) { - return client[rawClient]; - } - return client; -} -__name(unapplyModelsAndClientExtensions, "unapplyModelsAndClientExtensions"); - -// src/runtime/core/extensions/$extends.ts -function $extends(extension) { - if (!this._hasPreviewFlag("clientExtensions")) { - throw new PrismaClientValidationError( - "Extensions are not yet generally available, please add `clientExtensions` to the `previewFeatures` field in the `generator` block in the `schema.prisma` file." - ); - } - if (typeof extension === "function") { - return extension(this); - } - const oldClient = unapplyModelsAndClientExtensions(this); - const newClient = Object.create(oldClient, { - _extensions: { - value: this._extensions.append(extension) - } - }); - return applyModelsAndClientExtensions(newClient); -} -__name($extends, "$extends"); - -// ../../node_modules/.pnpm/klona@2.0.5/node_modules/klona/dist/index.mjs -function klona(x) { - if (typeof x !== "object") - return x; - var k, tmp, str = Object.prototype.toString.call(x); - if (str === "[object Object]") { - if (x.constructor !== Object && typeof x.constructor === "function") { - tmp = new x.constructor(); - for (k in x) { - if (x.hasOwnProperty(k) && tmp[k] !== x[k]) { - tmp[k] = klona(x[k]); - } - } - } else { - tmp = {}; - for (k in x) { - if (k === "__proto__") { - Object.defineProperty(tmp, k, { - value: klona(x[k]), - configurable: true, - enumerable: true, - writable: true - }); - } else { - tmp[k] = klona(x[k]); - } - } - } - return tmp; - } - if (str === "[object Array]") { - k = x.length; - for (tmp = Array(k); k--; ) { - tmp[k] = klona(x[k]); - } - return tmp; - } - if (str === "[object Set]") { - tmp = /* @__PURE__ */ new Set(); - x.forEach(function(val) { - tmp.add(klona(val)); - }); - return tmp; - } - if (str === "[object Map]") { - tmp = /* @__PURE__ */ new Map(); - x.forEach(function(val, key) { - tmp.set(klona(key), klona(val)); - }); - return tmp; - } - if (str === "[object Date]") { - return new Date(+x); - } - if (str === "[object RegExp]") { - tmp = new RegExp(x.source, x.flags); - tmp.lastIndex = x.lastIndex; - return tmp; - } - if (str === "[object DataView]") { - return new x.constructor(klona(x.buffer)); - } - if (str === "[object ArrayBuffer]") { - return x.slice(0); - } - if (str.slice(-6) === "Array]") { - return new x.constructor(x); - } - return x; -} -__name(klona, "klona"); - -// src/runtime/core/extensions/applyQueryExtensions.ts -function iterateAndCallQueryCallbacks(client, params, queryCbs, i = 0) { - if (queryCbs.length === 0) - return client._executeRequest(params); - return createPrismaPromise((transaction, lock) => { - var _a3, _b2; - if (transaction !== void 0) { - void ((_a3 = params.lock) == null ? void 0 : _a3.then()); - params.transaction = transaction; - params.lock = lock; - } - if (i === queryCbs.length) { - return client._executeRequest(params); - } - return queryCbs[i]({ - model: params.model, - operation: params.action, - args: klona((_b2 = params.args) != null ? _b2 : {}), - query: (args) => { - params.args = args; - return iterateAndCallQueryCallbacks(client, params, queryCbs, i + 1); - } - }); - }); -} -__name(iterateAndCallQueryCallbacks, "iterateAndCallQueryCallbacks"); -function applyQueryExtensions(client, params) { - const { jsModelName, action } = params; - if (jsModelName === void 0 || client._extensions.isEmpty()) { - return client._executeRequest(params); - } - return iterateAndCallQueryCallbacks(client, params, client._extensions.getAllQueryCallbacks(jsModelName, action)); -} -__name(applyQueryExtensions, "applyQueryExtensions"); - -// src/generation/lazyProperty.ts -function lazyProperty(compute) { - let resultContainer; - return { - get() { - if (resultContainer) { - return resultContainer.value; - } - resultContainer = { value: compute() }; - return resultContainer.value; - } - }; -} -__name(lazyProperty, "lazyProperty"); - -// src/runtime/core/extensions/MergedExtensionsList.ts -var MergedExtensionsListNode = class { - constructor(extension, previous) { - this.extension = extension; - this.previous = previous; - this.computedFieldsCache = new Cache(); - this.modelExtensionsCache = new Cache(); - this.queryCallbacksCache = new Cache(); - this.clientExtensions = lazyProperty(() => { - var _a3, _b2; - if (!this.extension.client) { - return (_a3 = this.previous) == null ? void 0 : _a3.getAllClientExtensions(); - } - return { - ...(_b2 = this.previous) == null ? void 0 : _b2.getAllClientExtensions(), - ...wrapAllExtensionCallbacks(this.extension.name, this.extension.client) - }; - }); - } - getAllComputedFields(dmmfModelName) { - return this.computedFieldsCache.getOrCreate(dmmfModelName, () => { - var _a3; - return getComputedFields((_a3 = this.previous) == null ? void 0 : _a3.getAllComputedFields(dmmfModelName), this.extension, dmmfModelName); - }); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(dmmfModelName) { - return this.modelExtensionsCache.getOrCreate(dmmfModelName, () => { - var _a3, _b2; - const jsModelName = dmmfToJSModelName(dmmfModelName); - if (!this.extension.model || !(this.extension.model[jsModelName] || this.extension.model.$allModels)) { - return (_a3 = this.previous) == null ? void 0 : _a3.getAllModelExtensions(dmmfModelName); - } - return { - ...(_b2 = this.previous) == null ? void 0 : _b2.getAllModelExtensions(dmmfModelName), - ...wrapAllExtensionCallbacks(this.extension.name, this.extension.model.$allModels), - ...wrapAllExtensionCallbacks(this.extension.name, this.extension.model[jsModelName]) - }; - }); - } - getAllQueryCallbacks(jsModelName, action) { - return this.queryCallbacksCache.getOrCreate(`${jsModelName}:${action}`, () => { - var _a3, _b2; - const previous = (_b2 = (_a3 = this.previous) == null ? void 0 : _a3.getAllQueryCallbacks(jsModelName, action)) != null ? _b2 : []; - const query2 = this.extension.query; - if (!query2 || !(query2[jsModelName] || query2.$allModels)) { - return previous; - } - const newCallbacks = []; - if (query2[jsModelName] !== void 0) { - if (query2[jsModelName][action] !== void 0) { - newCallbacks.push(query2[jsModelName][action]); - } - if (query2[jsModelName]["$allOperations"] !== void 0) { - newCallbacks.push(query2[jsModelName]["$allOperations"]); - } - } - if (query2["$allModels"] !== void 0) { - if (query2["$allModels"][action] !== void 0) { - newCallbacks.push(query2["$allModels"][action]); - } - if (query2["$allModels"]["$allOperations"] !== void 0) { - newCallbacks.push(query2["$allModels"]["$allOperations"]); - } - } - return previous.concat(newCallbacks.map((callback) => wrapExtensionCallback(this.extension.name, callback))); - }); - } -}; -__name(MergedExtensionsListNode, "MergedExtensionsListNode"); -var MergedExtensionsList = class { - constructor(head) { - this.head = head; - } - static empty() { - return new MergedExtensionsList(); - } - static single(extension) { - return new MergedExtensionsList(new MergedExtensionsListNode(extension)); - } - isEmpty() { - return this.head === void 0; - } - append(extension) { - return new MergedExtensionsList(new MergedExtensionsListNode(extension, this.head)); - } - getAllComputedFields(dmmfModelName) { - var _a3; - return (_a3 = this.head) == null ? void 0 : _a3.getAllComputedFields(dmmfModelName); - } - getAllClientExtensions() { - var _a3; - return (_a3 = this.head) == null ? void 0 : _a3.getAllClientExtensions(); - } - getAllModelExtensions(dmmfModelName) { - var _a3; - return (_a3 = this.head) == null ? void 0 : _a3.getAllModelExtensions(dmmfModelName); - } - getAllQueryCallbacks(jsModelName, action) { - var _a3, _b2; - return (_b2 = (_a3 = this.head) == null ? void 0 : _a3.getAllQueryCallbacks(jsModelName, action)) != null ? _b2 : []; - } -}; -__name(MergedExtensionsList, "MergedExtensionsList"); - -// src/runtime/core/transaction/utils/createLockCountPromise.ts -function getLockCountPromise(knock, cb = () => { -}) { - let resolve; - const lock = new Promise((res) => resolve = res); - return { - then(onFulfilled) { - if (--knock === 0) - resolve(cb()); - return onFulfilled == null ? void 0 : onFulfilled(lock); - } - }; -} -__name(getLockCountPromise, "getLockCountPromise"); - -// src/runtime/getLogLevel.ts -function getLogLevel(log3) { - if (typeof log3 === "string") { - return log3; - } - return log3.reduce((acc, curr) => { - const currentLevel = typeof curr === "string" ? curr : curr.level; - if (currentLevel === "query") { - return acc; - } - if (!acc) { - return currentLevel; - } - if (curr === "info" || acc === "info") { - return "info"; - } - return currentLevel; - }, void 0); -} -__name(getLogLevel, "getLogLevel"); - -// src/runtime/mergeBy.ts -function mergeBy(arr1, arr2, cb) { - const groupedArr1 = groupBy2(arr1, cb); - const groupedArr2 = groupBy2(arr2, cb); - const result = Object.values(groupedArr2).map((value) => value[value.length - 1]); - const arr2Keys = Object.keys(groupedArr2); - Object.entries(groupedArr1).forEach(([key, value]) => { - if (!arr2Keys.includes(key)) { - result.push(value[value.length - 1]); - } - }); - return result; -} -__name(mergeBy, "mergeBy"); -var groupBy2 = /* @__PURE__ */ __name((arr, cb) => { - return arr.reduce((acc, curr) => { - const key = cb(curr); - if (!acc[key]) { - acc[key] = []; - } - acc[key].push(curr); - return acc; - }, {}); -}, "groupBy"); - -// src/runtime/MiddlewareHandler.ts -var MiddlewareHandler = class { - constructor() { - this._middlewares = []; - } - use(middleware) { - this._middlewares.push(middleware); - } - get(id) { - return this._middlewares[id]; - } - has(id) { - return !!this._middlewares[id]; - } - length() { - return this._middlewares.length; - } -}; -__name(MiddlewareHandler, "MiddlewareHandler"); -var Middlewares = class { - constructor() { - this.query = new MiddlewareHandler(); - this.engine = new MiddlewareHandler(); - } -}; -__name(Middlewares, "Middlewares"); - -// src/runtime/RequestHandler.ts -var import_strip_ansi4 = __toESM(require_strip_ansi()); - -// src/runtime/core/extensions/applyResultExtensions.ts -function applyResultExtensions({ result, modelName, select, extensions }) { - const computedFields = extensions.getAllComputedFields(modelName); - if (!computedFields) { - return result; - } - const computedPropertiesLayers = []; - const maskingLayers = []; - for (const field of Object.values(computedFields)) { - if (select) { - if (!select[field.name]) { - continue; - } - const toMask = field.needs.filter((prop) => !select[prop]); - if (toMask.length > 0) { - maskingLayers.push(removeProperties(toMask)); - } - } - if (areNeedsMet(result, field.needs)) { - computedPropertiesLayers.push( - computedPropertyLayer(field, createCompositeProxy(result, computedPropertiesLayers)) - ); - } - } - if (computedPropertiesLayers.length > 0 || maskingLayers.length > 0) { - return createCompositeProxy(result, [...computedPropertiesLayers, ...maskingLayers]); - } - return result; -} -__name(applyResultExtensions, "applyResultExtensions"); -function areNeedsMet(result, neededProperties) { - return neededProperties.every((property) => hasOwnProperty2(result, property)); -} -__name(areNeedsMet, "areNeedsMet"); -function computedPropertyLayer(field, result) { - return cacheProperties(addProperty(field.name, () => field.compute(result))); -} -__name(computedPropertyLayer, "computedPropertyLayer"); - -// src/runtime/core/extensions/visitQueryResult.ts -function visitQueryResult({ visitor, result, args, dmmf, model }) { - var _a3; - if (Array.isArray(result)) { - for (let i = 0; i < result.length; i++) { - result[i] = visitQueryResult({ - result: result[i], - args, - model, - dmmf, - visitor - }); - } - return result; - } - const visitResult = (_a3 = visitor(result, model, args)) != null ? _a3 : result; - if (args.include) { - visitNested({ includeOrSelect: args.include, result: visitResult, parentModel: model, dmmf, visitor }); - } - if (args.select) { - visitNested({ includeOrSelect: args.select, result: visitResult, parentModel: model, dmmf, visitor }); - } - return visitResult; -} -__name(visitQueryResult, "visitQueryResult"); -function visitNested({ includeOrSelect, result, parentModel, dmmf, visitor }) { - for (const [fieldName, subConfig] of Object.entries(includeOrSelect)) { - if (!subConfig || result[fieldName] == null) { - continue; - } - const field = parentModel.fields.find((field2) => field2.name === fieldName); - if (!field || field.kind !== "object" || !field.relationName) { - continue; - } - const args = typeof subConfig === "object" ? subConfig : {}; - result[fieldName] = visitQueryResult({ - visitor, - result: result[fieldName], - args, - model: dmmf.getModelMap()[field.type], - dmmf - }); - } -} -__name(visitNested, "visitNested"); - -// src/runtime/DataLoader.ts -var DataLoader = class { - constructor(options) { - this.options = options; - this.tickActive = false; - this.batches = {}; - } - request(request2) { - const hash = this.options.batchBy(request2); - if (!hash) { - return this.options.singleLoader(request2); - } - if (!this.batches[hash]) { - this.batches[hash] = []; - if (!this.tickActive) { - this.tickActive = true; - process.nextTick(() => { - this.dispatchBatches(); - this.tickActive = false; - }); - } - } - return new Promise((resolve, reject) => { - this.batches[hash].push({ - request: request2, - resolve, - reject - }); - }); - } - dispatchBatches() { - for (const key in this.batches) { - const batch = this.batches[key]; - delete this.batches[key]; - if (batch.length === 1) { - this.options.singleLoader(batch[0].request).then((result) => { - if (result instanceof Error) { - batch[0].reject(result); - } else { - batch[0].resolve(result); - } - }).catch((e2) => { - batch[0].reject(e2); - }); - } else { - this.options.batchLoader(batch.map((j) => j.request)).then((results) => { - if (results instanceof Error) { - for (let i = 0; i < batch.length; i++) { - batch[i].reject(results); - } - } else { - for (let i = 0; i < batch.length; i++) { - const value = results[i]; - if (value instanceof Error) { - batch[i].reject(value); - } else { - batch[i].resolve(value); - } - } - } - }).catch((e2) => { - for (let i = 0; i < batch.length; i++) { - batch[i].reject(e2); - } - }); - } - } - } - get [Symbol.toStringTag]() { - return "DataLoader"; - } -}; -__name(DataLoader, "DataLoader"); - -// src/runtime/RequestHandler.ts -var debug11 = src_default("prisma:client:request_handler"); -function getRequestInfo(request2) { - var _a3; - const transaction = request2.transaction; - const headers = (_a3 = request2.headers) != null ? _a3 : {}; - const traceparent = getTraceParent({ tracingConfig: request2.tracingConfig }); - if ((transaction == null ? void 0 : transaction.kind) === "itx") { - headers.transactionId = transaction.id; - } - if (traceparent !== void 0) { - headers.traceparent = traceparent; - } - return { - transaction, - headers - }; -} -__name(getRequestInfo, "getRequestInfo"); -var RequestHandler = class { - constructor(client, hooks, logEmitter) { - this.logEmmitter = logEmitter; - this.client = client; - this.hooks = hooks; - this.dataloader = new DataLoader({ - batchLoader: (requests) => { - var _a3; - const info2 = getRequestInfo(requests[0]); - const queries = requests.map((r2) => String(r2.document)); - const traceparent = getTraceParent({ context: requests[0].otelParentCtx, tracingConfig: client._tracingConfig }); - if (traceparent) - info2.headers.traceparent = traceparent; - const containsWrite = requests.some((r2) => r2.document.type === "mutation"); - const batchTransaction = ((_a3 = info2.transaction) == null ? void 0 : _a3.kind) === "batch" ? info2.transaction : void 0; - return this.client._engine.requestBatch({ - queries, - headers: info2.headers, - transaction: batchTransaction, - containsWrite - }); - }, - singleLoader: (request2) => { - var _a3; - const info2 = getRequestInfo(request2); - const query2 = String(request2.document); - const interactiveTransaction = ((_a3 = info2.transaction) == null ? void 0 : _a3.kind) === "itx" ? info2.transaction : void 0; - return this.client._engine.request({ - query: query2, - headers: info2.headers, - transaction: interactiveTransaction, - isWrite: request2.document.type === "mutation" - }); - }, - batchBy: (request2) => { - var _a3; - if ((_a3 = request2.transaction) == null ? void 0 : _a3.id) { - return `transaction-${request2.transaction.id}`; - } - return batchFindUniqueBy(request2); - } - }); - } - async request({ - document: document2, - dataPath = [], - rootField, - typeName, - isList, - callsite, - rejectOnNotFound, - clientMethod, - engineHook, - args, - headers, - transaction, - unpacker, - extensions, - otelParentCtx, - otelChildCtx - }) { - if (this.hooks && this.hooks.beforeRequest) { - const query2 = String(document2); - this.hooks.beforeRequest({ - query: query2, - path: dataPath, - rootField, - typeName, - document: document2, - isList, - clientMethod, - args - }); - } - try { - let data, elapsed; - if (engineHook) { - const result = await engineHook( - { - document: document2, - runInTransaction: Boolean(transaction) - }, - (params) => { - return this.dataloader.request({ ...params, tracingConfig: this.client._tracingConfig }); - } - ); - data = result.data; - elapsed = result.elapsed; - } else { - const result = await this.dataloader.request({ - document: document2, - headers, - transaction, - otelParentCtx, - otelChildCtx, - tracingConfig: this.client._tracingConfig - }); - data = result == null ? void 0 : result.data; - elapsed = result == null ? void 0 : result.elapsed; - } - const unpackResult = this.unpack(document2, data, dataPath, rootField, unpacker); - throwIfNotFound(unpackResult, clientMethod, typeName, rejectOnNotFound); - const extendedResult = this.applyResultExtensions({ result: unpackResult, modelName: typeName, args, extensions }); - if (process.env.PRISMA_CLIENT_GET_TIME) { - return { data: extendedResult, elapsed }; - } - return extendedResult; - } catch (error2) { - this.handleAndLogRequestError({ error: error2, clientMethod, callsite, transaction }); - } - } - handleAndLogRequestError({ error: error2, clientMethod, callsite, transaction }) { - try { - this.handleRequestError({ error: error2, clientMethod, callsite, transaction }); - } catch (err) { - if (this.logEmmitter) { - this.logEmmitter.emit("error", { message: err.message, target: clientMethod, timestamp: new Date() }); - } - throw err; - } - } - handleRequestError({ error: error2, clientMethod, callsite, transaction }) { - debug11(error2); - if (isMismatchingBatchIndex(error2, transaction)) { - throw error2; - } - if (error2 instanceof NotFoundError2) { - throw error2; - } - let message = error2.message; - if (callsite) { - message = createErrorMessageWithContext({ - callsite, - originalMethod: clientMethod, - isPanic: error2.isPanic, - showColors: this.client._errorFormat === "pretty", - message - }); - } - message = this.sanitizeMessage(message); - if (error2.code) { - throw new PrismaClientKnownRequestError(message, { - code: error2.code, - clientVersion: this.client._clientVersion, - meta: error2.meta, - batchRequestIdx: error2.batchRequestIdx - }); - } else if (error2.isPanic) { - throw new PrismaClientRustPanicError(message, this.client._clientVersion); - } else if (error2 instanceof PrismaClientUnknownRequestError) { - throw new PrismaClientUnknownRequestError(message, { - clientVersion: this.client._clientVersion, - batchRequestIdx: error2.batchRequestIdx - }); - } else if (error2 instanceof PrismaClientInitializationError) { - throw new PrismaClientInitializationError(message, this.client._clientVersion); - } else if (error2 instanceof PrismaClientRustPanicError) { - throw new PrismaClientRustPanicError(message, this.client._clientVersion); - } - error2.clientVersion = this.client._clientVersion; - throw error2; - } - sanitizeMessage(message) { - if (this.client._errorFormat && this.client._errorFormat !== "pretty") { - return (0, import_strip_ansi4.default)(message); - } - return message; - } - unpack(document2, data, path7, rootField, unpacker) { - if (data == null ? void 0 : data.data) { - data = data.data; - } - if (unpacker) { - data[rootField] = unpacker(data[rootField]); - } - const getPath = []; - if (rootField) { - getPath.push(rootField); - } - getPath.push(...path7.filter((p2) => p2 !== "select" && p2 !== "include")); - return unpack({ document: document2, data, path: getPath }); - } - applyResultExtensions({ result, modelName, args, extensions }) { - if (extensions.isEmpty() || result == null) { - return result; - } - const model = this.client._baseDmmf.getModelMap()[modelName]; - if (!model) { - return result; - } - return visitQueryResult({ - result, - args: args != null ? args : {}, - model, - dmmf: this.client._baseDmmf, - visitor(value, model2, args2) { - const modelName2 = dmmfToJSModelName(model2.name); - return applyResultExtensions({ result: value, modelName: modelName2, select: args2.select, extensions }); - } - }); - } - get [Symbol.toStringTag]() { - return "RequestHandler"; - } -}; -__name(RequestHandler, "RequestHandler"); -function isMismatchingBatchIndex(error2, transaction) { - return hasBatchIndex(error2) && (transaction == null ? void 0 : transaction.kind) === "batch" && error2.batchRequestIdx !== transaction.index; -} -__name(isMismatchingBatchIndex, "isMismatchingBatchIndex"); -function batchFindUniqueBy(request2) { - var _a3; - if (!request2.document.children[0].name.startsWith("findUnique")) { - return void 0; - } - const args = (_a3 = request2.document.children[0].args) == null ? void 0 : _a3.args.map((a) => { - if (a.value instanceof Args) { - return `${a.key}-${a.value.args.map((a2) => a2.key).join(",")}`; - } - return a.key; - }).join(","); - const selectionSet = request2.document.children[0].children.join(","); - return `${request2.document.children[0].name}|${args}|${selectionSet}`; -} -__name(batchFindUniqueBy, "batchFindUniqueBy"); - -// src/runtime/utils/deserializeRawResults.ts -function deserializeRawResults(rows) { - return rows.map((row) => { - const mappedRow = {}; - for (const key of Object.keys(row)) { - mappedRow[key] = deserializeValue(row[key]); - } - return mappedRow; - }); -} -__name(deserializeRawResults, "deserializeRawResults"); -function deserializeValue({ prisma__type: type, prisma__value: value }) { - switch (type) { - case "bigint": - return BigInt(value); - case "bytes": - return Buffer.from(value, "base64"); - case "decimal": - return new decimal_default(value); - case "datetime": - case "date": - return new Date(value); - case "time": - return new Date(`1970-01-01T${value}Z`); - case "array": - return value.map(deserializeValue); - default: - return value; - } -} -__name(deserializeValue, "deserializeValue"); - -// src/runtime/utils/mssqlPreparedStatement.ts -var mssqlPreparedStatement = /* @__PURE__ */ __name((template) => { - return template.reduce((acc, str, idx) => `${acc}@P${idx}${str}`); -}, "mssqlPreparedStatement"); - -// src/runtime/utils/serializeRawParameters.ts -function serializeRawParameters(parameters) { - try { - return serializeRawParametersInternal(parameters, "fast"); - } catch (error2) { - return serializeRawParametersInternal(parameters, "slow"); - } -} -__name(serializeRawParameters, "serializeRawParameters"); -function serializeRawParametersInternal(parameters, objectSerialization) { - return JSON.stringify(parameters.map((parameter) => encodeParameter(parameter, objectSerialization))); -} -__name(serializeRawParametersInternal, "serializeRawParametersInternal"); -function encodeParameter(parameter, objectSerialization) { - if (typeof parameter === "bigint") { - return { - prisma__type: "bigint", - prisma__value: parameter.toString() - }; - } - if (isDate(parameter)) { - return { - prisma__type: "date", - prisma__value: parameter.toJSON() - }; - } - if (decimal_default.isDecimal(parameter)) { - return { - prisma__type: "decimal", - prisma__value: parameter.toJSON() - }; - } - if (Buffer.isBuffer(parameter)) { - return { - prisma__type: "bytes", - prisma__value: parameter.toString("base64") - }; - } - if (isArrayBufferLike(parameter) || ArrayBuffer.isView(parameter)) { - return { - prisma__type: "bytes", - prisma__value: Buffer.from(parameter).toString("base64") - }; - } - if (typeof parameter === "object" && objectSerialization === "slow") { - return preprocessObject(parameter); - } - return parameter; -} -__name(encodeParameter, "encodeParameter"); -function isDate(value) { - if (value instanceof Date) { - return true; - } - return Object.prototype.toString.call(value) === "[object Date]" && typeof value.toJSON === "function"; -} -__name(isDate, "isDate"); -function isArrayBufferLike(value) { - if (value instanceof ArrayBuffer || value instanceof SharedArrayBuffer) { - return true; - } - if (typeof value === "object" && value !== null) { - return value[Symbol.toStringTag] === "ArrayBuffer" || value[Symbol.toStringTag] === "SharedArrayBuffer"; - } - return false; -} -__name(isArrayBufferLike, "isArrayBufferLike"); -function preprocessObject(obj) { - if (typeof obj !== "object" || obj === null) { - return obj; - } - if (typeof obj.toJSON === "function") { - return obj.toJSON(); - } - if (Array.isArray(obj)) { - return obj.map(preprocessValueInObject); - } - const result = {}; - for (const key of Object.keys(obj)) { - result[key] = preprocessValueInObject(obj[key]); - } - return result; -} -__name(preprocessObject, "preprocessObject"); -function preprocessValueInObject(value) { - if (typeof value === "bigint") { - return value.toString(); - } - return preprocessObject(value); -} -__name(preprocessValueInObject, "preprocessValueInObject"); - -// src/runtime/utils/validatePrismaClientOptions.ts -var import_js_levenshtein2 = __toESM(require_js_levenshtein()); -var knownProperties = ["datasources", "errorFormat", "log", "__internal", "rejectOnNotFound"]; -var errorFormats = ["pretty", "colorless", "minimal"]; -var logLevels = ["info", "query", "warn", "error"]; -var validators = { - datasources: (options, datasourceNames) => { - if (!options) { - return; - } - if (typeof options !== "object" || Array.isArray(options)) { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(options)} for "datasources" provided to PrismaClient constructor` - ); - } - for (const [key, value] of Object.entries(options)) { - if (!datasourceNames.includes(key)) { - const didYouMean = getDidYouMean(key, datasourceNames) || `Available datasources: ${datasourceNames.join(", ")}`; - throw new PrismaClientConstructorValidationError( - `Unknown datasource ${key} provided to PrismaClient constructor.${didYouMean}` - ); - } - if (typeof value !== "object" || Array.isArray(value)) { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(options)} for datasource "${key}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }` - ); - } - if (value && typeof value === "object") { - for (const [key1, value1] of Object.entries(value)) { - if (key1 !== "url") { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(options)} for datasource "${key}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }` - ); - } - if (typeof value1 !== "string") { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(value1)} for datasource "${key}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }` - ); - } - } - } - } - }, - errorFormat: (options) => { - if (!options) { - return; - } - if (typeof options !== "string") { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(options)} for "errorFormat" provided to PrismaClient constructor.` - ); - } - if (!errorFormats.includes(options)) { - const didYouMean = getDidYouMean(options, errorFormats); - throw new PrismaClientConstructorValidationError( - `Invalid errorFormat ${options} provided to PrismaClient constructor.${didYouMean}` - ); - } - }, - log: (options) => { - if (!options) { - return; - } - if (!Array.isArray(options)) { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(options)} for "log" provided to PrismaClient constructor.` - ); - } - function validateLogLevel(level) { - if (typeof level === "string") { - if (!logLevels.includes(level)) { - const didYouMean = getDidYouMean(level, logLevels); - throw new PrismaClientConstructorValidationError( - `Invalid log level "${level}" provided to PrismaClient constructor.${didYouMean}` - ); - } - } - } - __name(validateLogLevel, "validateLogLevel"); - for (const option of options) { - validateLogLevel(option); - const logValidators = { - level: validateLogLevel, - emit: (value) => { - const emits = ["stdout", "event"]; - if (!emits.includes(value)) { - const didYouMean = getDidYouMean(value, emits); - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify( - value - )} for "emit" in logLevel provided to PrismaClient constructor.${didYouMean}` - ); - } - } - }; - if (option && typeof option === "object") { - for (const [key, value] of Object.entries(option)) { - if (logValidators[key]) { - logValidators[key](value); - } else { - throw new PrismaClientConstructorValidationError( - `Invalid property ${key} for "log" provided to PrismaClient constructor` - ); - } - } - } - } - }, - __internal: (value) => { - if (!value) { - return; - } - const knownKeys = ["debug", "hooks", "engine", "measurePerformance"]; - if (typeof value !== "object") { - throw new PrismaClientConstructorValidationError( - `Invalid value ${JSON.stringify(value)} for "__internal" to PrismaClient constructor` - ); - } - for (const [key] of Object.entries(value)) { - if (!knownKeys.includes(key)) { - const didYouMean = getDidYouMean(key, knownKeys); - throw new PrismaClientConstructorValidationError( - `Invalid property ${JSON.stringify(key)} for "__internal" provided to PrismaClient constructor.${didYouMean}` - ); - } - } - }, - rejectOnNotFound: (value) => { - if (!value) { - return; - } - if (isError(value) || typeof value === "boolean" || typeof value === "object" || typeof value === "function") { - return value; - } - throw new PrismaClientConstructorValidationError( - `Invalid rejectOnNotFound expected a boolean/Error/{[modelName: Error | boolean]} but received ${JSON.stringify( - value - )}` - ); - } -}; -function validatePrismaClientOptions(options, datasourceNames) { - for (const [key, value] of Object.entries(options)) { - if (!knownProperties.includes(key)) { - const didYouMean = getDidYouMean(key, knownProperties); - throw new PrismaClientConstructorValidationError( - `Unknown property ${key} provided to PrismaClient constructor.${didYouMean}` - ); - } - validators[key](value, datasourceNames); - } -} -__name(validatePrismaClientOptions, "validatePrismaClientOptions"); -function getDidYouMean(str, options) { - if (options.length === 0) { - return ""; - } - if (typeof str !== "string") { - return ""; - } - const alternative = getAlternative(str, options); - if (!alternative) { - return ""; - } - return ` Did you mean "${alternative}"?`; -} -__name(getDidYouMean, "getDidYouMean"); -function getAlternative(str, options) { - if (options.length === 0) { - return null; - } - const optionsWithDistances = options.map((value) => ({ - value, - distance: (0, import_js_levenshtein2.default)(str, value) - })); - optionsWithDistances.sort((a, b2) => { - return a.distance < b2.distance ? -1 : 1; - }); - const bestAlternative = optionsWithDistances[0]; - if (bestAlternative.distance < 3) { - return bestAlternative.value; - } - return null; -} -__name(getAlternative, "getAlternative"); - -// src/runtime/utils/waitForBatch.ts -function waitForBatch(promises) { - if (promises.length === 0) { - return Promise.resolve([]); - } - return new Promise((resolve, reject) => { - const successfulResults = new Array(promises.length); - let bestError = null; - let done = false; - let settledPromisesCount = 0; - const settleOnePromise = /* @__PURE__ */ __name(() => { - if (done) { - return; - } - settledPromisesCount++; - if (settledPromisesCount === promises.length) { - done = true; - if (bestError) { - reject(bestError); - } else { - resolve(successfulResults); - } - } - }, "settleOnePromise"); - const immediatelyReject = /* @__PURE__ */ __name((error2) => { - if (!done) { - done = true; - reject(error2); - } - }, "immediatelyReject"); - for (let i = 0; i < promises.length; i++) { - promises[i].then( - (result) => { - successfulResults[i] = result; - settleOnePromise(); - }, - (error2) => { - if (!hasBatchIndex(error2)) { - immediatelyReject(error2); - return; - } - if (error2.batchRequestIdx === i) { - immediatelyReject(error2); - } else { - if (!bestError) { - bestError = error2; - } - settleOnePromise(); - } - } - ); - } - }); -} -__name(waitForBatch, "waitForBatch"); - -// src/runtime/getPrismaClient.ts -var debug12 = src_default("prisma:client"); -var ALTER_RE = /^(\s*alter\s)/i; -typeof globalThis === "object" ? globalThis.NODE_CLIENT = true : 0; -function isReadonlyArray(arg2) { - return Array.isArray(arg2); -} -__name(isReadonlyArray, "isReadonlyArray"); -function checkAlter(query2, values, invalidCall) { - if (values.length > 0 && ALTER_RE.exec(query2)) { - throw new Error(`Running ALTER using ${invalidCall} 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 -`); - } -} -__name(checkAlter, "checkAlter"); -var actionOperationMap = { - findUnique: "query", - findUniqueOrThrow: "query", - findFirst: "query", - findFirstOrThrow: "query", - findMany: "query", - count: "query", - create: "mutation", - createMany: "mutation", - update: "mutation", - updateMany: "mutation", - upsert: "mutation", - delete: "mutation", - deleteMany: "mutation", - executeRaw: "mutation", - queryRaw: "mutation", - aggregate: "query", - groupBy: "query", - runCommandRaw: "mutation", - findRaw: "query", - aggregateRaw: "query" -}; -var TX_ID = Symbol.for("prisma.client.transaction.id"); -var BatchTxIdCounter = { - id: 0, - nextId() { - return ++this.id; - } -}; -function getPrismaClient(config2) { - class PrismaClient { - constructor(optionsArg) { - this._middlewares = new Middlewares(); - this._getDmmf = callOnce(async (params) => { - try { - const dmmf = await this._engine.getDmmf(); - return new DMMFHelper(getPrismaClientDMMF(dmmf)); - } catch (error2) { - this._fetcher.handleAndLogRequestError({ ...params, error: error2 }); - } - }); - this.$extends = $extends; - var _a3, _b2, _c, _d, _e, _f, _g, _h, _i; - if (optionsArg) { - validatePrismaClientOptions(optionsArg, config2.datasourceNames); - } - const logEmitter = new import_events.EventEmitter().on("error", (e2) => { - }); - this._extensions = MergedExtensionsList.empty(); - this._previewFeatures = (_b2 = (_a3 = config2.generator) == null ? void 0 : _a3.previewFeatures) != null ? _b2 : []; - this._rejectOnNotFound = optionsArg == null ? void 0 : optionsArg.rejectOnNotFound; - this._clientVersion = (_c = config2.clientVersion) != null ? _c : clientVersion; - this._activeProvider = config2.activeProvider; - this._dataProxy = config2.dataProxy; - this._tracingConfig = getTracingConfig(this._previewFeatures); - this._clientEngineType = getClientEngineType(config2.generator); - const envPaths = { - rootEnvPath: config2.relativeEnvPaths.rootEnvPath && import_path5.default.resolve(config2.dirname, config2.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config2.relativeEnvPaths.schemaEnvPath && import_path5.default.resolve(config2.dirname, config2.relativeEnvPaths.schemaEnvPath) - }; - const loadedEnv = tryLoadEnvs(envPaths, { conflictCheck: "none" }); - try { - const options = optionsArg != null ? optionsArg : {}; - const internal = (_d = options.__internal) != null ? _d : {}; - const useDebug = internal.debug === true; - if (useDebug) { - src_default.enable("prisma:client"); - } - if (internal.hooks) { - this._hooks = internal.hooks; - } - let cwd = import_path5.default.resolve(config2.dirname, config2.relativePath); - if (!import_fs9.default.existsSync(cwd)) { - cwd = config2.dirname; - } - debug12("dirname", config2.dirname); - debug12("relativePath", config2.relativePath); - debug12("cwd", cwd); - const thedatasources = options.datasources || {}; - const inputDatasources = Object.entries(thedatasources).filter(([_, source]) => { - return source && source.url; - }).map(([name, { url }]) => ({ - name, - url - })); - const datasources = mergeBy([], inputDatasources, (source) => source.name); - const engineConfig = internal.engine || {}; - if (options.errorFormat) { - this._errorFormat = options.errorFormat; - } else if (process.env.NODE_ENV === "production") { - this._errorFormat = "minimal"; - } else if (process.env.NO_COLOR) { - this._errorFormat = "colorless"; - } else { - this._errorFormat = "colorless"; - } - this._baseDmmf = new BaseDMMFHelper(config2.document); - if (this._dataProxy) { - const rawDmmf = config2.document; - this._dmmf = new DMMFHelper(rawDmmf); - } - this._engineConfig = { - cwd, - dirname: config2.dirname, - enableDebugLogs: useDebug, - allowTriggerPanic: engineConfig.allowTriggerPanic, - datamodelPath: import_path5.default.join(config2.dirname, (_e = config2.filename) != null ? _e : "schema.prisma"), - prismaPath: (_f = engineConfig.binaryPath) != null ? _f : void 0, - engineEndpoint: engineConfig.endpoint, - datasources, - generator: config2.generator, - showColors: this._errorFormat === "pretty", - logLevel: options.log && getLogLevel(options.log), - logQueries: options.log && Boolean( - typeof options.log === "string" ? options.log === "query" : options.log.find((o2) => typeof o2 === "string" ? o2 === "query" : o2.level === "query") - ), - env: (_i = (_h = loadedEnv == null ? void 0 : loadedEnv.parsed) != null ? _h : (_g = config2.injectableEdgeEnv) == null ? void 0 : _g.parsed) != null ? _i : {}, - flags: [], - clientVersion: config2.clientVersion, - previewFeatures: this._previewFeatures, - activeProvider: config2.activeProvider, - inlineSchema: config2.inlineSchema, - inlineDatasources: config2.inlineDatasources, - inlineSchemaHash: config2.inlineSchemaHash, - tracingConfig: this._tracingConfig, - logEmitter - }; - debug12("clientVersion", config2.clientVersion); - debug12("clientEngineType", this._dataProxy ? "dataproxy" : this._clientEngineType); - if (this._dataProxy) { - const runtime = true ? "Node.js" : "edge"; - debug12(`using Data Proxy with ${runtime} runtime`); - } - this._engine = this.getEngine(); - void this._getActiveProvider(); - this._fetcher = new RequestHandler(this, this._hooks, logEmitter); - if (options.log) { - for (const log3 of options.log) { - const level = typeof log3 === "string" ? log3 : log3.emit === "stdout" ? log3.level : null; - if (level) { - this.$on(level, (event) => { - var _a4; - logger_exports.log(`${(_a4 = logger_exports.tags[level]) != null ? _a4 : ""}`, event.message || event.query); - }); - } - } - } - this._metrics = new MetricsClient(this._engine); - } catch (e2) { - e2.clientVersion = this._clientVersion; - throw e2; - } - return applyModelsAndClientExtensions(this); - } - get [Symbol.toStringTag]() { - return "PrismaClient"; - } - getEngine() { - if (this._dataProxy === true) { - return new DataProxyEngine(this._engineConfig); - } else if (this._clientEngineType === "library" /* Library */) { - return new LibraryEngine(this._engineConfig); - } else if (this._clientEngineType === "binary" /* Binary */) { - return new BinaryEngine(this._engineConfig); - } - throw new PrismaClientValidationError("Invalid client engine type, please use `library` or `binary`"); - } - $use(arg0, arg1) { - if (typeof arg0 === "function") { - this._middlewares.query.use(arg0); - } else if (arg0 === "all") { - this._middlewares.query.use(arg1); - } else if (arg0 === "engine") { - this._middlewares.engine.use(arg1); - } else { - throw new Error(`Invalid middleware ${arg0}`); - } - } - $on(eventType, callback) { - if (eventType === "beforeExit") { - this._engine.on("beforeExit", callback); - } else { - this._engine.on(eventType, (event) => { - var _a3, _b2, _c, _d; - const fields = event.fields; - if (eventType === "query") { - return callback({ - timestamp: event.timestamp, - query: (_a3 = fields == null ? void 0 : fields.query) != null ? _a3 : event.query, - params: (_b2 = fields == null ? void 0 : fields.params) != null ? _b2 : event.params, - duration: (_c = fields == null ? void 0 : fields.duration_ms) != null ? _c : event.duration, - target: event.target - }); - } else { - return callback({ - timestamp: event.timestamp, - message: (_d = fields == null ? void 0 : fields.message) != null ? _d : event.message, - target: event.target - }); - } - }); - } - } - $connect() { - try { - return this._engine.start(); - } catch (e2) { - e2.clientVersion = this._clientVersion; - throw e2; - } - } - async _runDisconnect() { - await this._engine.stop(); - delete this._connectionPromise; - this._engine = this.getEngine(); - delete this._disconnectionPromise; - delete this._getConfigPromise; - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (e2) { - e2.clientVersion = this._clientVersion; - throw e2; - } finally { - clearLogs(); - if (!this._dataProxy) { - this._dmmf = void 0; - } - } - } - async _getActiveProvider() { - try { - const configResult = await this._engine.getConfig(); - this._activeProvider = configResult.datasources[0].activeProvider; - } catch (e2) { - } - } - $executeRawInternal(transaction, lock, query2, ...values) { - let queryString = ""; - let parameters = void 0; - if (typeof query2 === "string") { - queryString = query2; - parameters = { - values: serializeRawParameters(values || []), - __prismaRawParameters__: true - }; - checkAlter(queryString, values, "prisma.$executeRawUnsafe(, [...values])"); - } else if (isReadonlyArray(query2)) { - switch (this._activeProvider) { - case "sqlite": - case "mysql": { - const queryInstance = new Sql(query2, values); - queryString = queryInstance.sql; - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true - }; - break; - } - case "cockroachdb": - case "postgresql": { - const queryInstance = new Sql(query2, values); - queryString = queryInstance.text; - checkAlter(queryString, queryInstance.values, "prisma.$executeRaw``"); - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true - }; - break; - } - case "sqlserver": { - queryString = mssqlPreparedStatement(query2); - parameters = { - values: serializeRawParameters(values), - __prismaRawParameters__: true - }; - break; - } - default: { - throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`); - } - } - } else { - switch (this._activeProvider) { - case "sqlite": - case "mysql": - queryString = query2.sql; - break; - case "cockroachdb": - case "postgresql": - queryString = query2.text; - checkAlter(queryString, query2.values, "prisma.$executeRaw(sql``)"); - break; - case "sqlserver": - queryString = mssqlPreparedStatement(query2.strings); - break; - default: - throw new Error(`The ${this._activeProvider} provider does not support $executeRaw`); - } - parameters = { - values: serializeRawParameters(query2.values), - __prismaRawParameters__: true - }; - } - if (parameters == null ? void 0 : parameters.values) { - debug12(`prisma.$executeRaw(${queryString}, ${parameters.values})`); - } else { - debug12(`prisma.$executeRaw(${queryString})`); - } - const args = { query: queryString, parameters }; - debug12(`Prisma Client call:`); - return this._request({ - args, - clientMethod: "$executeRaw", - dataPath: [], - action: "executeRaw", - callsite: getCallSite(this._errorFormat), - transaction, - lock - }); - } - $executeRaw(query2, ...values) { - return createPrismaPromise((transaction, lock) => { - if (query2.raw !== void 0 || query2.sql !== void 0) { - return this.$executeRawInternal(transaction, lock, query2, ...values); - } - throw new PrismaClientValidationError(`\`$executeRaw\` is a tag function, please use it like the following: -\`\`\` -const result = await prisma.$executeRaw\`UPDATE User SET cool = \${true} WHERE email = \${'user@email.com'};\` -\`\`\` - -Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw -`); - }); - } - $executeRawUnsafe(query2, ...values) { - return createPrismaPromise((transaction, lock) => { - return this.$executeRawInternal(transaction, lock, query2, ...values); - }); - } - $runCommandRaw(command) { - if (config2.activeProvider !== "mongodb") { - throw new PrismaClientValidationError( - `The ${config2.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.` - ); - } - return createPrismaPromise((transaction, lock) => { - return this._request({ - args: { command }, - clientMethod: "$runCommandRaw", - dataPath: [], - action: "runCommandRaw", - callsite: getCallSite(this._errorFormat), - transaction, - lock - }); - }); - } - async $queryRawInternal(transaction, lock, query2, ...values) { - let queryString = ""; - let parameters = void 0; - if (typeof query2 === "string") { - queryString = query2; - parameters = { - values: serializeRawParameters(values || []), - __prismaRawParameters__: true - }; - } else if (isReadonlyArray(query2)) { - switch (this._activeProvider) { - case "sqlite": - case "mysql": { - const queryInstance = new Sql(query2, values); - queryString = queryInstance.sql; - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true - }; - break; - } - case "cockroachdb": - case "postgresql": { - const queryInstance = new Sql(query2, values); - queryString = queryInstance.text; - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true - }; - break; - } - case "sqlserver": { - const queryInstance = new Sql(query2, values); - queryString = mssqlPreparedStatement(queryInstance.strings); - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true - }; - break; - } - default: { - throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`); - } - } - } else { - switch (this._activeProvider) { - case "sqlite": - case "mysql": - queryString = query2.sql; - break; - case "cockroachdb": - case "postgresql": - queryString = query2.text; - break; - case "sqlserver": - queryString = mssqlPreparedStatement(query2.strings); - break; - default: { - throw new Error(`The ${this._activeProvider} provider does not support $queryRaw`); - } - } - parameters = { - values: serializeRawParameters(query2.values), - __prismaRawParameters__: true - }; - } - if (parameters == null ? void 0 : parameters.values) { - debug12(`prisma.queryRaw(${queryString}, ${parameters.values})`); - } else { - debug12(`prisma.queryRaw(${queryString})`); - } - const args = { query: queryString, parameters }; - debug12(`Prisma Client call:`); - return this._request({ - args, - clientMethod: "$queryRaw", - dataPath: [], - action: "queryRaw", - callsite: getCallSite(this._errorFormat), - transaction, - lock - }).then(deserializeRawResults); - } - $queryRaw(query2, ...values) { - return createPrismaPromise((txId, lock) => { - if (query2.raw !== void 0 || query2.sql !== void 0) { - return this.$queryRawInternal(txId, lock, query2, ...values); - } - throw new PrismaClientValidationError(`\`$queryRaw\` is a tag function, please use it like the following: -\`\`\` -const result = await prisma.$queryRaw\`SELECT * FROM User WHERE id = \${1} OR email = \${'user@email.com'};\` -\`\`\` - -Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw -`); - }); - } - $queryRawUnsafe(query2, ...values) { - return createPrismaPromise((txId, lock) => { - return this.$queryRawInternal(txId, lock, query2, ...values); - }); - } - __internal_triggerPanic(fatal) { - if (!this._engineConfig.allowTriggerPanic) { - throw new Error(`In order to use .__internal_triggerPanic(), please enable it like so: -new PrismaClient({ - __internal: { - engine: { - allowTriggerPanic: true - } - } -})`); - } - const headers = fatal ? { "X-DEBUG-FATAL": "1" } : { "X-DEBUG-NON-FATAL": "1" }; - return this._request({ - action: "queryRaw", - args: { - query: "SELECT 1", - parameters: void 0 - }, - clientMethod: "queryRaw", - dataPath: [], - headers, - callsite: getCallSite(this._errorFormat) - }); - } - _transactionWithArray({ - promises, - options - }) { - const id = BatchTxIdCounter.nextId(); - const lock = getLockCountPromise(promises.length); - const requests = promises.map((request2, index) => { - var _a3, _b2; - if ((request2 == null ? void 0 : request2[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.` - ); - } - return (_b2 = (_a3 = request2.requestTransaction) == null ? void 0 : _a3.call(request2, { id, index, isolationLevel: options == null ? void 0 : options.isolationLevel }, lock)) != null ? _b2 : request2; - }); - return waitForBatch(requests); - } - async _transactionWithCallback({ - callback, - options - }) { - const headers = { traceparent: getTraceParent({ tracingConfig: this._tracingConfig }) }; - const info2 = await this._engine.transaction("start", headers, options); - let result; - try { - result = await callback(transactionProxy(this, { id: info2.id, payload: info2.payload })); - await this._engine.transaction("commit", headers, info2); - } catch (e2) { - await this._engine.transaction("rollback", headers, info2).catch(() => { - }); - throw e2; - } - return result; - } - $transaction(input, options) { - let callback; - if (typeof input === "function") { - callback = /* @__PURE__ */ __name(() => this._transactionWithCallback({ callback: input, options }), "callback"); - } else { - callback = /* @__PURE__ */ __name(() => this._transactionWithArray({ promises: input, options }), "callback"); - } - const spanOptions = { - name: "transaction", - enabled: this._tracingConfig.enabled, - attributes: { method: "$transaction" } - }; - return runInChildSpan(spanOptions, callback); - } - async _request(internalParams) { - internalParams.otelParentCtx = context2.active(); - try { - const params = { - args: internalParams.args, - dataPath: internalParams.dataPath, - runInTransaction: Boolean(internalParams.transaction), - action: internalParams.action, - model: internalParams.model - }; - const spanOptions = { - middleware: { - name: "middleware", - enabled: this._tracingConfig.middleware, - attributes: { method: "$use" }, - active: false - }, - operation: { - name: "operation", - enabled: this._tracingConfig.enabled, - attributes: { - method: params.action, - model: params.model, - name: `${params.model}.${params.action}` - } - } - }; - let index = -1; - const consumer = /* @__PURE__ */ __name((changedMiddlewareParams) => { - const nextMiddleware = this._middlewares.query.get(++index); - if (nextMiddleware) { - return runInChildSpan(spanOptions.middleware, async (span) => { - return nextMiddleware(changedMiddlewareParams, (p2) => (span == null ? void 0 : span.end(), consumer(p2))); - }); - } - const { runInTransaction, ...changedRequestParams } = changedMiddlewareParams; - const requestParams = { - ...internalParams, - ...changedRequestParams - }; - if (!runInTransaction) { - requestParams.transaction = void 0; - } - return applyQueryExtensions(this, requestParams); - }, "consumer"); - return await runInChildSpan(spanOptions.operation, () => { - if (true) { - const asyncRes = new import_async_hooks.AsyncResource("prisma-client-request"); - return asyncRes.runInAsyncScope(() => consumer(params)); - } - return consumer(params); - }); - } catch (e2) { - e2.clientVersion = this._clientVersion; - throw e2; - } - } - async _executeRequest({ - args, - clientMethod, - jsModelName, - dataPath, - callsite, - action, - model, - headers, - argsMapper, - transaction, - lock, - unpacker, - otelParentCtx - }) { - var _a3, _b2; - if (this._dmmf === void 0) { - this._dmmf = await this._getDmmf({ clientMethod, callsite }); - } - args = argsMapper ? argsMapper(args) : args; - let rootField; - const operation = actionOperationMap[action]; - if (action === "executeRaw" || action === "queryRaw" || action === "runCommandRaw") { - rootField = action; - } - let mapping; - if (model !== void 0) { - mapping = (_a3 = this._dmmf) == null ? void 0 : _a3.mappingsMap[model]; - if (mapping === void 0) { - throw new Error(`Could not find mapping for model ${model}`); - } - rootField = mapping[action === "count" ? "aggregate" : action]; - } - if (operation !== "query" && operation !== "mutation") { - throw new Error(`Invalid operation ${operation} for action ${action}`); - } - const field = (_b2 = this._dmmf) == null ? void 0 : _b2.rootFieldMap[rootField]; - if (field === void 0) { - throw new Error( - `Could not find rootField ${rootField} for action ${action} for model ${model} on rootType ${operation}` - ); - } - const { isList } = field.outputType; - const typeName = getOutputTypeName(field.outputType.type); - const rejectOnNotFound = getRejectOnNotFound(action, typeName, args, this._rejectOnNotFound); - warnAboutRejectOnNotFound(rejectOnNotFound, jsModelName, action); - const serializationFn = /* @__PURE__ */ __name(() => { - const document3 = makeDocument({ - dmmf: this._dmmf, - rootField, - rootTypeName: operation, - select: args, - modelName: model, - extensions: this._extensions - }); - document3.validate(args, false, clientMethod, this._errorFormat, callsite); - return transformDocument(document3); - }, "serializationFn"); - const spanOptions = { - name: "serialize", - enabled: this._tracingConfig.enabled - }; - const document2 = await runInChildSpan(spanOptions, serializationFn); - if (src_default.enabled("prisma:client")) { - const query2 = String(document2); - debug12(`Prisma Client call:`); - debug12( - `prisma.${clientMethod}(${printJsonWithErrors({ - ast: args, - keyPaths: [], - valuePaths: [], - missingItems: [] - })})` - ); - debug12(`Generated request:`); - debug12(query2 + "\n"); - } - await lock; - return this._fetcher.request({ - document: document2, - clientMethod, - typeName, - dataPath, - rejectOnNotFound, - isList, - rootField, - callsite, - args, - engineHook: this._middlewares.engine.get(0), - extensions: this._extensions, - headers, - transaction, - unpacker, - otelParentCtx, - otelChildCtx: context2.active() - }); - } - get $metrics() { - if (!this._hasPreviewFlag("metrics")) { - throw new PrismaClientValidationError( - "`metrics` preview feature must be enabled in order to access metrics API" - ); - } - return this._metrics; - } - _hasPreviewFlag(feature) { - var _a3; - return !!((_a3 = this._engineConfig.previewFeatures) == null ? void 0 : _a3.includes(feature)); - } - } - __name(PrismaClient, "PrismaClient"); - return PrismaClient; -} -__name(getPrismaClient, "getPrismaClient"); -var forbidden = ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; -function transactionProxy(thing, transaction) { - if (typeof thing !== "object") - return thing; - return new Proxy(thing, { - get: (target, prop) => { - if (forbidden.includes(prop)) - return void 0; - if (prop === TX_ID) - return transaction == null ? void 0 : transaction.id; - if (typeof target[prop] === "function") { - return (...args) => { - if (prop === "then") - return target[prop](args[0], args[1], transaction); - if (prop === "catch") - return target[prop](args[0], transaction); - if (prop === "finally") - return target[prop](args[0], transaction); - return transactionProxy(target[prop](...args), transaction); - }; - } - return transactionProxy(target[prop], transaction); - }, - has(target, prop) { - if (forbidden.includes(prop)) { - return false; - } - return Reflect.has(target, prop); - } - }); -} -__name(transactionProxy, "transactionProxy"); -var rejectOnNotFoundReplacements = { - findUnique: "findUniqueOrThrow", - findFirst: "findFirstOrThrow" -}; -function warnAboutRejectOnNotFound(rejectOnNotFound, model, action) { - if (rejectOnNotFound) { - const replacementAction = rejectOnNotFoundReplacements[action]; - const replacementCall = model ? `prisma.${model}.${replacementAction}` : `prisma.${replacementAction}`; - const key = `rejectOnNotFound.${model != null ? model : ""}.${action}`; - warnOnce( - key, - `\`rejectOnNotFound\` option is deprecated and will be removed in Prisma 5. Please use \`${replacementCall}\` method instead` - ); - } -} -__name(warnAboutRejectOnNotFound, "warnAboutRejectOnNotFound"); - -// src/runtime/strictEnum.ts -var allowList = /* @__PURE__ */ new Set([ - "toJSON", - "asymmetricMatch", - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive -]); -function makeStrictEnum(definition) { - return new Proxy(definition, { - get(target, property) { - if (property in target) { - return target[property]; - } - if (allowList.has(property)) { - return void 0; - } - throw new TypeError(`Invalid enum value: ${String(property)}`); - } - }); -} -__name(makeStrictEnum, "makeStrictEnum"); - -// src/runtime/utils/find.ts -var import_fs10 = __toESM(require("fs")); -var import_path6 = __toESM(require("path")); -var import_util8 = require("util"); -var readdirAsync = (0, import_util8.promisify)(import_fs10.default.readdir); -var realpathAsync = (0, import_util8.promisify)(import_fs10.default.realpath); -var statAsync = (0, import_util8.promisify)(import_fs10.default.stat); -var readdirSync = import_fs10.default.readdirSync; -var realpathSync = import_fs10.default.realpathSync; -var statSync = import_fs10.default.statSync; -function direntToType(dirent) { - return dirent.isFile() ? "f" : dirent.isDirectory() ? "d" : dirent.isSymbolicLink() ? "l" : void 0; -} -__name(direntToType, "direntToType"); -function isMatched(string, regexs) { - for (const regex of regexs) { - if (typeof regex === "string") { - if (string.includes(regex)) { - return true; - } - } else if (regex.exec(string)) { - return true; - } - } - return false; -} -__name(isMatched, "isMatched"); -function findSync(root, match, types = ["f", "d", "l"], deep = [], limit = Infinity, handler = () => true, found = [], seen = {}) { - try { - const realRoot = realpathSync(root); - if (seen[realRoot]) { - return found; - } - if (limit - found.length <= 0) { - return found; - } - if (direntToType(statSync(realRoot)) !== "d") { - return found; - } - const items = readdirSync(root, { withFileTypes: true }); - seen[realRoot] = true; - for (const item of items) { - const itemName = item.name; - const itemType = direntToType(item); - const itemPath = import_path6.default.join(root, item.name); - if (itemType && types.includes(itemType)) { - if (isMatched(itemPath, match)) { - const value = handler(root, itemName, itemType); - if (typeof value === "string") { - found.push(value); - } else if (value === true) { - found.push(itemPath); - } - } - } - if (deep.includes(itemType)) { - findSync(itemPath, match, types, deep, limit, handler, found, seen); - } - } - } catch (e2) { - } - return found; -} -__name(findSync, "findSync"); - -// src/runtime/warnEnvConflicts.ts -function warnEnvConflicts(envPaths) { - tryLoadEnvs(envPaths, { conflictCheck: "warn" }); -} -__name(warnEnvConflicts, "warnEnvConflicts"); - -// src/runtime/index.ts -var decompressFromBase642 = lzString.decompressFromBase64; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - DMMF, - DMMFClass, - Debug, - Decimal, - Engine, - Extensions, - MetricsClient, - NotFoundError, - PrismaClientExtensionError, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Sql, - Types, - decompressFromBase64, - empty, - findSync, - getPrismaClient, - join, - makeDocument, - makeStrictEnum, - objectEnumValues, - raw, - sqltag, - transformDocument, - unpack, - warnEnvConflicts -}); -/*! - * decimal.js v10.4.2 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - */ -/*! - * @description Recursive object extending - * @author Viacheslav Lotsmanov - * @license MIT - * - * The MIT License (MIT) - * - * Copyright (c) 2013-2018 Viacheslav Lotsmanov - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/*! formdata-polyfill. MIT License. Jimmy Wärting */ diff --git a/packages/desktop/prisma/client/schema.prisma b/packages/desktop/prisma/client/schema.prisma deleted file mode 100644 index c6351e8..0000000 --- a/packages/desktop/prisma/client/schema.prisma +++ /dev/null @@ -1,87 +0,0 @@ -generator client { - provider = "prisma-client-js" - output = "./client" - binaryTargets = ["native", "darwin", "darwin-arm64"] -} - -datasource db { - provider = "sqlite" - url = env("DATABASE_URL") -} - -model AccountData { - id String @id @unique - json String - updatedAt DateTime @updatedAt -} - -model AppData { - id String @id @unique - value String -} - -model Track { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model Album { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model Artist { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model ArtistAlbum { - id Int @id @unique - hotAlbums String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model Playlist { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model Audio { - id Int @id @unique - bitRate Int - format String - source String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - queriedAt DateTime @default(now()) -} - -model Lyrics { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model AppleMusicAlbum { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model AppleMusicArtist { - id Int @id @unique - json String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} diff --git a/packages/desktop/prisma/r3play.db b/packages/desktop/prisma/r3play.db deleted file mode 100644 index a078382..0000000 Binary files a/packages/desktop/prisma/r3play.db and /dev/null differ diff --git a/packages/desktop/scripts/build.sqlite3.ts b/packages/desktop/scripts/build.sqlite3.ts deleted file mode 100644 index a49ca51..0000000 --- a/packages/desktop/scripts/build.sqlite3.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const { rebuild } = require('electron-rebuild') -const fs = require('fs') -const minimist = require('minimist') -const pc = require('picocolors') -const releases = require('electron-releases') -const pkg = require(`${process.cwd()}/package.json`) -const axios = require('axios') -const { execSync } = require('child_process') -const { resolve } = require('path') - -const isWindows = process.platform === 'win32' -const isMac = process.platform === 'darwin' -const isLinux = process.platform === 'linux' - -const electronVersion = pkg.devDependencies.electron.replaceAll('^', '') -const betterSqlite3Version = pkg.dependencies['better-sqlite3'].replaceAll( - '^', - '' -) -const electronModuleVersion = releases.find(r => - r.version.includes(electronVersion) -)?.deps?.modules -if (!electronModuleVersion) { - console.error( - pc.red('Can not find electron module version in electron-releases') - ) - process.exit(1) -} -const argv = minimist(process.argv.slice(2)) - -const projectDir = resolve(process.cwd(), '../../') -const tmpDir = resolve(projectDir, `./tmp/better-sqlite3`) -const binDir = resolve(projectDir, `./tmp/bin`) -console.log(pc.cyan(`projectDir=${projectDir}`)) -console.log(pc.cyan(`binDir=${binDir}`)) - -if (!fs.existsSync(binDir)) { - console.log(pc.cyan(`Creating dist/binary directory: ${binDir}`)) - fs.mkdirSync(binDir, { - recursive: true, - }) -} - -const download = async arch => { - console.log(pc.cyan(`Downloading for ${arch}...`)) - if (!electronModuleVersion) { - console.log(pc.red('No electron module version found! Skip download.')) - return false - } - const fileName = `better-sqlite3-v${betterSqlite3Version}-electron-v${electronModuleVersion}-${process.platform}-${arch}` - const zipFileName = `${fileName}.tar.gz` - const url = `https://github.com/JoshuaWise/better-sqlite3/releases/download/v${betterSqlite3Version}/${zipFileName}` - if (!fs.existsSync(tmpDir)) { - fs.mkdirSync(tmpDir, { - recursive: true, - }) - } - - try { - await axios({ - method: 'get', - url, - responseType: 'stream', - }).then(response => { - response.data.pipe( - fs.createWriteStream(resolve(tmpDir, `./${zipFileName}`)) - ) - return true - }) - } catch (e) { - console.log(pc.red('Download failed! Skip download.')) - return false - } - - try { - execSync(`tar -xvzf ${tmpDir}/${zipFileName} -C ${tmpDir}`) - } catch (e) { - console.log(pc.red('Extract failed! Skip extract.')) - return false - } - - try { - fs.copyFileSync( - resolve(tmpDir, './build/Release/better_sqlite3.node'), - resolve(binDir, `./better_sqlite3_${process.platform}_${arch}.node`) - ) - } catch (e) { - console.log(pc.red('Copy failed! Skip copy.', e)) - return false - } - - try { - fs.rmSync(resolve(tmpDir, `./build`), { recursive: true, force: true }) - } catch (e) { - console.log(pc.red('Delete failed! Skip delete.')) - return false - } - - return true -} - -const build = async arch => { - const downloaded = await download(arch) - if (downloaded) return - - console.log(pc.cyan(`Building for ${arch}...`)) - await rebuild({ - projectRootPath: projectDir, - buildPath: process.cwd(), - electronVersion, - arch, - onlyModules: ['better-sqlite3'], - force: true, - }) - .then(() => { - console.info('Build succeeded') - - const from = resolve( - projectDir, - `./node_modules/better-sqlite3/build/Release/better_sqlite3.node` - ) - const to = resolve( - binDir, - `./better_sqlite3_${process.platform}_${arch}.node` - ) - console.info(`copy ${from} to ${to}`) - fs.copyFileSync(from, to) - }) - .catch(e => { - console.error(pc.red('Build failed!')) - console.error(pc.red(e)) - }) -} - -const main = async () => { - if (argv.x64 || argv.arm64 || argv.arm) { - if (argv.x64) await build('x64') - if (argv.arm64) await build('arm64') - if (argv.arm) await build('arm') - } else { - if (isWindows) { - await build('x64') - } else if (isMac) { - await build('x64') - await build('arm64') - } else if (isLinux) { - await build('x64') - await build('arm64') - await build('arm') - } - } -} - -main() diff --git a/packages/desktop/scripts/copySQLite3.js b/packages/desktop/scripts/copySQLite3.js deleted file mode 100644 index 5d6d90b..0000000 --- a/packages/desktop/scripts/copySQLite3.js +++ /dev/null @@ -1,63 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const path = require('path') -const pc = require('picocolors') -const fs = require('fs') - -const archs = ['ia32', 'x64', 'armv7l', 'arm64', 'universal'] - -const projectDir = path.resolve(process.cwd(), '../../') -const binDir = `${projectDir}/tmp/bin` -console.log(pc.cyan(`projectDir=${projectDir}`)) -console.log(pc.cyan(`binDir=${binDir}`)) - -exports.default = async function (context) { - // console.log(context) - const platform = context.electronPlatformName - const arch = archs?.[context.arch] - - // Mac - if (platform === 'darwin') { - if (arch === 'universal') return // Skip universal we already copy binary for x64 and arm64 - if (arch !== 'x64' && arch !== 'arm64') return // Skip other archs - - const from = `${binDir}/better_sqlite3_darwin_${arch}.node` - const to = `${context.appOutDir}/${context.packager.appInfo.productFilename}.app/Contents/Resources/bin/better_sqlite3.node` - console.info(`copy ${from} to ${to}`) - - const toFolder = to.replace('/better_sqlite3.node', '') - if (!fs.existsSync(toFolder)) { - fs.mkdirSync(toFolder, { - recursive: true, - }) - } - - try { - fs.copyFileSync(from, to) - } catch (e) { - console.log(pc.red('Copy failed! Process stopped.')) - throw e - } - } - - if (platform === 'win32') { - if (arch !== 'x64') return // Skip other archs - - const from = `${binDir}/better_sqlite3_win32_${arch}.node` - const to = `${context.appOutDir}/resources/bin/better_sqlite3.node` - console.info(`copy ${from} to ${to}`) - - const toFolder = to.replace('/better_sqlite3.node', '') - if (!fs.existsSync(toFolder)) { - fs.mkdirSync(toFolder, { - recursive: true, - }) - } - - try { - fs.copyFileSync(from, to) - } catch (e) { - console.log(pc.red('Copy failed! Process stopped.')) - throw e - } - } -} diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index a2be9b3..fdf1aa2 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -3,12 +3,12 @@ import AutoLoad, { AutoloadPluginOptions } from '@fastify/autoload' import { FastifyPluginAsync } from 'fastify' const app: FastifyPluginAsync = async (fastify, opts) => { - void fastify.register(AutoLoad, { + fastify.register(AutoLoad, { dir: join(__dirname, 'plugins'), options: opts, }) - void fastify.register(AutoLoad, { + fastify.register(AutoLoad, { dir: join(__dirname, 'routes'), options: opts, }) diff --git a/packages/server/src/routes/apple-music/album.ts b/packages/server/src/routes/apple-music/album.ts index 97ca9ca..4682c7d 100644 --- a/packages/server/src/routes/apple-music/album.ts +++ b/packages/server/src/routes/apple-music/album.ts @@ -82,7 +82,6 @@ const album: FastifyPluginAsync = async (fastify, opts): Promise => { method: 'GET', url: `/albums/${album.id}`, params: { - 'fields[albums]': 'editorialNotes', 'omit[resource:albums]': 'relationships', l: lang === 'zh-CN' ? 'en-US' : 'zh-CN', }, @@ -114,7 +113,12 @@ const album: FastifyPluginAsync = async (fastify, opts): Promise => { .create({ data: { ...data, - editorialNote: { create: editorialNote }, + editorialNote: { + connectOrCreate: { + where: { id: data.id }, + create: editorialNote, + }, + }, }, }) .catch(e => console.error(e)) diff --git a/packages/server/src/routes/apple-music/artist.ts b/packages/server/src/routes/apple-music/artist.ts index 47197af..4c3146e 100644 --- a/packages/server/src/routes/apple-music/artist.ts +++ b/packages/server/src/routes/apple-music/artist.ts @@ -102,7 +102,12 @@ const artist: FastifyPluginAsync = async (fastify, opts): Promise => { .create({ data: { ...data, - artistBio: { create: artistBio }, + artistBio: { + connectOrCreate: { + where: { id: data.id }, + create: artistBio, + }, + }, }, }) .catch(e => console.error(e)) diff --git a/packages/server/src/utils/appleMusicRequest.ts b/packages/server/src/utils/appleMusicRequest.ts index b029a71..e6e9faa 100644 --- a/packages/server/src/utils/appleMusicRequest.ts +++ b/packages/server/src/utils/appleMusicRequest.ts @@ -1,17 +1,11 @@ -import axios, { - AxiosError, - AxiosInstance, - AxiosRequestConfig, - AxiosResponse, -} from 'axios' +import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios' export const baseURL = 'https://amp-api.music.apple.com/v1/catalog/us' export const headers = { Authority: 'amp-api.music.apple.com', Accept: '*/*', - Authorization: - 'Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNjYxNDQwNDMyLCJleHAiOjE2NzY5OTI0MzIsInJvb3RfaHR0cHNfb3JpZ2luIjpbImFwcGxlLmNvbSJdfQ.z4BMv9_O4MpMK2iFhYkDqPsx53soPSnlXXK3jm99pHqGOrZADvTgEUw2U7_B1W0MAtFiWBYhYcGvWrzaOig6Bw', + Authorization: process.env.APPLE_MUSIC_TOKEN || '', Referer: 'https://music.apple.com/', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', diff --git a/packages/web/api/hooks/useLyric.ts b/packages/web/api/hooks/useLyric.ts index 107d879..db272ea 100644 --- a/packages/web/api/hooks/useLyric.ts +++ b/packages/web/api/hooks/useLyric.ts @@ -11,7 +11,7 @@ export default function useLyric(params: FetchLyricParams) { key, async () => { // fetch from cache as initial data - const cache = window.ipcRenderer?.invoke(IpcChannels.GetApiCache, { + const cache = await window.ipcRenderer?.invoke(IpcChannels.GetApiCache, { api: CacheAPIs.Lyric, query: { id: params.id, diff --git a/packages/web/components/ArtistRow.tsx b/packages/web/components/ArtistRow.tsx index 875bc01..92900e2 100644 --- a/packages/web/components/ArtistRow.tsx +++ b/packages/web/components/ArtistRow.tsx @@ -12,10 +12,7 @@ const Artist = ({ artist }: { artist: Artist }) => { } return ( -
prefetchArtist({ id: artist.id })} - > +
prefetchArtist({ id: artist.id })}> { return (
{[...new Array(row * 5).keys()].map(i => ( -
+
{ return ( -
+
{/* Title */} {title && (

@@ -83,7 +77,7 @@ const ArtistRow = ({ {/* Artists */} {artists && ( -
+
{artists.map(artist => (
diff --git a/packages/web/components/CoverRow.tsx b/packages/web/components/CoverRow.tsx index e256a0f..51c8694 100644 --- a/packages/web/components/CoverRow.tsx +++ b/packages/web/components/CoverRow.tsx @@ -99,12 +99,12 @@ const CoverRow = ({ itemSubtitle?: ItemSubTitle }) => { return ( -
+
{/* Title */} {title &&

{title}

} {/* Items */} -
+
{albums?.map(album => ( ))} diff --git a/packages/web/components/VideoRow.tsx b/packages/web/components/VideoRow.tsx index 64a39a3..aa577d4 100644 --- a/packages/web/components/VideoRow.tsx +++ b/packages/web/components/VideoRow.tsx @@ -3,21 +3,20 @@ import uiStates from '../states/uiStates' const VideoRow = ({ videos }: { videos: Video[] }) => { return ( -
- {videos.map(video => ( -
(uiStates.playingVideoID = Number(video.vid))} - > - -
- {video.creator?.at(0)?.userName} - {video.title} +
+
+ {videos.map(video => ( +
(uiStates.playingVideoID = Number(video.vid))}> + +
+ {video.creator?.at(0)?.userName} - {video.title} +
-
- ))} + ))} +
) } diff --git a/packages/web/package.json b/packages/web/package.json index cf44bc8..46367f7 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -24,6 +24,7 @@ "@emotion/css": "^11.10.5", "@sentry/react": "^7.29.0", "@sentry/tracing": "^7.29.0", + "@tailwindcss/container-queries": "^0.1.0", "@tanstack/react-query": "^4.20.9", "@tanstack/react-query-devtools": "^4.20.9", "ahooks": "^3.7.4", diff --git a/packages/web/pages/Album/Header.tsx b/packages/web/pages/Album/Header.tsx index 638cb1c..b765506 100644 --- a/packages/web/pages/Album/Header.tsx +++ b/packages/web/pages/Album/Header.tsx @@ -37,7 +37,9 @@ const Header = () => { const creatorLink = `/artist/${album?.artist.id}` const description = isLoadingAppleMusicAlbum ? '' - : appleMusicAlbum?.editorialNote?.[i18n.language.replace('-', '_')] || album?.description + : appleMusicAlbum?.editorialNote?.[i18n.language.replace('-', '_')] || + album?.description || + appleMusicAlbum?.editorialNote?.en_US const extraInfo = useMemo(() => { const duration = album?.songs?.reduce((acc, cur) => acc + cur.dt, 0) || 0 const albumDuration = formatDuration(duration, i18n.language, 'hh[hr] mm[min]') diff --git a/packages/web/pages/Artist/Header/ArtistInfo.tsx b/packages/web/pages/Artist/Header/ArtistInfo.tsx index b1681a1..c5330c0 100644 --- a/packages/web/pages/Artist/Header/ArtistInfo.tsx +++ b/packages/web/pages/Artist/Header/ArtistInfo.tsx @@ -16,7 +16,9 @@ const ArtistInfo = ({ artist, isLoading }: { artist?: Artist; isLoading: boolean const [isOpenDescription, setIsOpenDescription] = useState(false) const description = - artistFromApple?.artistBio?.[i18n.language.replace('-', '_')] || artist?.briefDesc + artistFromApple?.artistBio?.[i18n.language.replace('-', '_')] || + artist?.briefDesc || + artistFromApple?.artistBio?.en_US return (
diff --git a/packages/web/tailwind.config.js b/packages/web/tailwind.config.js index 1a2ee39..b1b0f1a 100644 --- a/packages/web/tailwind.config.js +++ b/packages/web/tailwind.config.js @@ -121,4 +121,7 @@ module.exports = { } }, }, + plugins: [ + require('@tailwindcss/container-queries'), + ], } diff --git a/packages/web/utils/common.ts b/packages/web/utils/common.ts index f73a4bd..63de0b5 100644 --- a/packages/web/utils/common.ts +++ b/packages/web/utils/common.ts @@ -21,8 +21,8 @@ export function resizeImage(url: string, size: 'xs' | 'sm' | 'md' | 'lg'): strin lg: '1024', } + // from Apple Music if (url.includes('mzstatic.com')) { - // from Apple Music return url.replace('{w}', sizeMap[size]).replace('{h}', sizeMap[size]) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 927afcd..d455a74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,6 +25,7 @@ importers: '@fastify/cookie': ^8.3.0 '@fastify/http-proxy': ^8.4.0 '@fastify/multipart': ^7.4.0 + '@fastify/static': ^6.6.1 '@prisma/client': ^4.8.1 '@prisma/engines': ^4.9.0 '@sentry/electron': ^3.0.7 @@ -36,7 +37,7 @@ importers: compare-versions: ^4.1.3 cross-env: ^7.0.3 dotenv: ^16.0.3 - electron: ^22.0.0 + electron: ^22.1.0 electron-builder: 23.6.0 electron-devtools-installer: ^3.2.0 electron-log: ^4.4.8 @@ -45,6 +46,7 @@ importers: electron-store: ^8.1.0 esbuild: ^0.16.10 fast-folder-size: ^1.7.1 + fastify: ^4.5.3 minimist: ^1.2.7 music-metadata: ^8.1.0 open-cli: ^7.1.0 @@ -58,12 +60,11 @@ importers: vitest: ^0.20.3 wait-on: ^7.0.1 ytdl-core: ^4.11.2 - ytsr: ^3.8.0 - zx: ^7.1.1 dependencies: '@fastify/cookie': 8.3.0 '@fastify/http-proxy': 8.4.0 '@fastify/multipart': 7.4.0 + '@fastify/static': 6.6.1 '@prisma/client': 4.8.1_prisma@4.8.1 '@prisma/engines': 4.9.0 '@sentry/electron': 3.0.7 @@ -74,17 +75,16 @@ importers: electron-log: 4.4.8 electron-store: 8.1.0 fast-folder-size: 1.7.1 + fastify: 4.5.3 pretty-bytes: 6.0.0 prisma: 4.8.1 ytdl-core: 4.11.2 - ytsr: 3.8.0 - zx: 7.1.1 devDependencies: '@vitest/ui': 0.20.3 axios: 1.2.1 cross-env: 7.0.3 dotenv: 16.0.3 - electron: 22.0.0 + electron: 22.2.0 electron-builder: 23.6.0 electron-devtools-installer: 3.2.0 electron-rebuild: 3.2.9 @@ -150,6 +150,7 @@ importers: '@storybook/builder-vite': ^0.1.35 '@storybook/react': ^6.5.5 '@storybook/testing-library': ^0.0.11 + '@tailwindcss/container-queries': ^0.1.0 '@tanstack/react-query': ^4.20.9 '@tanstack/react-query-devtools': ^4.20.9 '@testing-library/react': ^13.3.0 @@ -205,6 +206,7 @@ importers: '@emotion/css': 11.10.5 '@sentry/react': 7.29.0_react@18.2.0 '@sentry/tracing': 7.29.0 + '@tailwindcss/container-queries': 0.1.0_tailwindcss@3.2.4 '@tanstack/react-query': 4.20.9_biqbaboplfbrettd7655fr4n2y '@tanstack/react-query-devtools': 4.20.9_hin5uqs2feg5fwcu6eooischsu ahooks: 3.7.4_react@18.2.0 @@ -3375,7 +3377,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.6.4 + '@types/node': 18.11.17 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -5470,6 +5472,14 @@ packages: defer-to-connect: 2.0.1 dev: true + /@tailwindcss/container-queries/0.1.0_tailwindcss@3.2.4: + resolution: {integrity: sha512-t1GeJ9P8ual160BvKy6Y1sG7bjChArMaK6iRXm3ZYjZGN2FTzmqb5ztsTDb9AsTSJD4NMHtsnaI2ielrXEk+hw==} + peerDependencies: + tailwindcss: '>=3.2.0' + dependencies: + tailwindcss: 3.2.4_postcss@8.4.20 + dev: false + /@tanstack/match-sorter-utils/8.7.2: resolution: {integrity: sha512-bptNeoexeDB947fWoCPwUchPSx5FA9gwzU0bkXz0du5pT8Ud2+1ob+xOgHj6EF3VN0kdXtLhwjPyhY7/dJglkg==} engines: {node: '>=12'} @@ -5649,6 +5659,7 @@ packages: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: '@types/node': 18.11.17 + dev: true /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} @@ -5750,6 +5761,7 @@ packages: /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + dev: true /@types/ms/0.7.31: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} @@ -5768,6 +5780,7 @@ packages: /@types/node/18.11.17: resolution: {integrity: sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==} + dev: true /@types/node/18.6.4: resolution: {integrity: sha512-I4BD3L+6AWiUobfxZ49DlU43gtI+FTHSv9pE2Zekg6KjMpre4ByusaljW3vYSLJrvQ1ck1hUaeVu8HVlY3vzHg==} @@ -5804,10 +5817,6 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/ps-tree/1.1.2: - resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==} - dev: false - /@types/qrcode/1.4.2: resolution: {integrity: sha512-7uNT9L4WQTNJejHTSTdaJhfBSCN73xtXaHFyBJ8TSwiLhe4PRuTue7Iph0s2nG9R/ifUaSnGhLUOZavlBEqDWQ==} dependencies: @@ -5904,10 +5913,6 @@ packages: source-map: 0.6.1 dev: true - /@types/which/2.0.1: - resolution: {integrity: sha512-Jjakcv8Roqtio6w1gr0D7y6twbhx6gGgFGF5BLwajPpnOIOxFkakFhCq+LmyyeAz7BX6ULrjBOxdKaCDy+4+dQ==} - dev: false - /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -5934,7 +5939,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.6.4 + '@types/node': 18.11.17 dev: true optional: true @@ -6351,12 +6356,10 @@ packages: acorn: 7.4.1 acorn-walk: 7.2.0 xtend: 4.0.2 - dev: true /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} - dev: true /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} @@ -6372,7 +6375,6 @@ packages: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} hasBin: true - dev: true /acorn/8.8.0: resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} @@ -6661,7 +6663,6 @@ packages: /arg/5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - dev: true /argparse/1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -7654,7 +7655,6 @@ packages: /camelcase-css/2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - dev: true /camelcase-keys/2.1.0: resolution: {integrity: sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==} @@ -7779,6 +7779,7 @@ packages: /chalk/5.0.1: resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: true /change-case/4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} @@ -8531,7 +8532,6 @@ packages: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} hasBin: true - dev: true /csso/4.2.0: resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==} @@ -8575,11 +8575,6 @@ packages: engines: {node: '>= 6'} dev: false - /data-uri-to-buffer/4.0.0: - resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==} - engines: {node: '>= 12'} - dev: false - /data-urls/3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -8763,7 +8758,6 @@ packages: /defined/1.0.0: resolution: {integrity: sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==} - dev: true /degenerator/3.0.2: resolution: {integrity: sha512-c0mef3SNQo56t6urUU6tdQAs+ThoD0o9B9MJ8HEt7NQcGEILCRFqQb7ZbP9JAv+QF1Ky5plydhMR/IrqWDm+TQ==} @@ -8859,11 +8853,9 @@ packages: acorn-node: 1.8.2 defined: 1.0.0 minimist: 1.2.7 - dev: true /didyoumean/1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} - dev: true /diff/4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -8904,10 +8896,10 @@ packages: engines: {node: '>=8'} dependencies: path-type: 4.0.0 + dev: true /dlv/1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - dev: true /dmg-builder/23.6.0: resolution: {integrity: sha512-jFZvY1JohyHarIAlTbfQOk+HnceGjjAdFjVn3n8xlDWKsYNqbO4muca6qXEZTfGXeQMG7TYim6CeS5XKSfSsGA==} @@ -9064,10 +9056,6 @@ packages: engines: {node: '>=10'} dev: true - /duplexer/0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: false - /duplexer2/0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} dependencies: @@ -9197,8 +9185,8 @@ packages: resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} dev: true - /electron/22.0.0: - resolution: {integrity: sha512-cgRc4wjyM+81A0E8UGv1HNJjL1HBI5cWNh/DUIjzYvoUuiEM0SS0hAH/zaFQ18xOz2ced6Yih8SybpOiOYJhdg==} + /electron/22.2.0: + resolution: {integrity: sha512-puRZSF2vWJ4pz3oetL5Td8LcuivTWz3MoAk/gjImHSN1B/2VJNEQlw1jGdkte+ppid2craOswE2lmCOZ7SwF1g==} engines: {node: '>= 12.20.55'} hasBin: true requiresBuild: true @@ -10111,18 +10099,6 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - /event-stream/3.3.4: - resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} - dependencies: - duplexer: 0.1.2 - from: 0.1.7 - map-stream: 0.1.0 - pause-stream: 0.0.11 - split: 0.3.3 - stream-combiner: 0.0.4 - through: 2.3.8 - dev: false - /event-target-shim/5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -10454,14 +10430,6 @@ packages: pend: 1.2.0 dev: true - /fetch-blob/3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} - engines: {node: ^12.20 || >= 14.13} - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.2.1 - dev: false - /fetch-retry/5.0.3: resolution: {integrity: sha512-uJQyMrX5IJZkhoEUBQ3EjxkeiZkppBd5jS/fMTJmfZxLSiaQjv2zD0kTvuvkSH89uFvgSlB6ueGpjD3HWN7Bxw==} dev: true @@ -10741,13 +10709,6 @@ packages: combined-stream: 1.0.8 mime-types: 2.1.35 - /formdata-polyfill/4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - dependencies: - fetch-blob: 3.2.0 - dev: false - /forwarded/0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -10782,10 +10743,6 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - /from/0.1.7: - resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} - dev: false - /from2/2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: @@ -10800,6 +10757,7 @@ packages: graceful-fs: 4.2.10 jsonfile: 6.1.0 universalify: 2.0.0 + dev: true /fs-extra/8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} @@ -11051,7 +11009,6 @@ packages: engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 - dev: true /glob-promise/3.4.0_glob@7.2.3: resolution: {integrity: sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==} @@ -11153,17 +11110,6 @@ packages: slash: 3.0.0 dev: true - /globby/13.1.2: - resolution: {integrity: sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.0 - merge2: 1.4.1 - slash: 4.0.0 - dev: false - /globby/9.2.0: resolution: {integrity: sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==} engines: {node: '>=6'} @@ -11685,6 +11631,7 @@ packages: /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} + dev: true /image-size/0.5.5: resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} @@ -12219,6 +12166,7 @@ packages: /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true /isobject/2.1.0: resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} @@ -12308,7 +12256,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.5 - '@types/node': 18.6.4 + '@types/node': 18.11.17 anymatch: 3.1.2 fb-watchman: 2.0.1 graceful-fs: 4.2.10 @@ -12351,7 +12299,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.6.4 + '@types/node': 18.11.17 chalk: 4.1.2 graceful-fs: 4.2.10 is-ci: 2.0.0 @@ -12371,7 +12319,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.6.4 + '@types/node': 18.11.17 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -12552,6 +12500,7 @@ packages: universalify: 2.0.0 optionalDependencies: graceful-fs: 4.2.10 + dev: true /jsonpointer/5.0.1: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} @@ -12664,7 +12613,6 @@ packages: /lilconfig/2.0.6: resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} engines: {node: '>=10'} - dev: true /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -12952,10 +12900,6 @@ packages: resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} dev: true - /map-stream/0.1.0: - resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} - dev: false - /map-visit/1.0.0: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} @@ -13557,11 +13501,6 @@ packages: minimatch: 3.1.2 dev: true - /node-domexception/1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - dev: false - /node-fetch/2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} engines: {node: 4.x || >=6.0.0} @@ -13574,15 +13513,6 @@ packages: whatwg-url: 5.0.0 dev: true - /node-fetch/3.2.10: - resolution: {integrity: sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - data-uri-to-buffer: 4.0.0 - fetch-blob: 3.2.0 - formdata-polyfill: 4.0.10 - dev: false - /node-gyp-build/4.5.0: resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} hasBin: true @@ -13756,7 +13686,6 @@ packages: /object-hash/3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} - dev: true /object-inspect/1.12.2: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} @@ -14254,12 +14183,6 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /pause-stream/0.0.11: - resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} - dependencies: - through: 2.3.8 - dev: false - /pbkdf2/3.1.2: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} engines: {node: '>=0.12'} @@ -14298,7 +14221,6 @@ packages: /pify/2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - dev: true /pify/3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} @@ -14463,7 +14385,6 @@ packages: postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.1 - dev: true /postcss-js/4.0.0_postcss@8.4.20: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} @@ -14473,7 +14394,6 @@ packages: dependencies: camelcase-css: 2.0.1 postcss: 8.4.20 - dev: true /postcss-load-config/3.1.4_postcss@8.4.20: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} @@ -14490,7 +14410,6 @@ packages: lilconfig: 2.0.6 postcss: 8.4.20 yaml: 1.10.2 - dev: true /postcss-loader/4.3.0_gzaxsinx64nntyd3vmdqwl7coe: resolution: {integrity: sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==} @@ -14563,7 +14482,6 @@ packages: dependencies: postcss: 8.4.20 postcss-selector-parser: 6.0.10 - dev: true /postcss-prefix-selector/1.16.0_postcss@5.2.18: resolution: {integrity: sha512-rdVMIi7Q4B0XbXqNUEI+Z4E+pueiu/CS5E6vRCQommzdQ/sgsS4dK42U7GX8oJR+TJOtT+Qv3GkNo6iijUMp3Q==} @@ -14579,11 +14497,9 @@ packages: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - dev: true /postcss-value-parser/4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - dev: true /postcss/5.2.18: resolution: {integrity: sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==} @@ -14835,14 +14751,6 @@ packages: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} dev: true - /ps-tree/1.2.0: - resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==} - engines: {node: '>= 0.10'} - hasBin: true - dependencies: - event-stream: 3.3.4 - dev: false - /psl/1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true @@ -14947,7 +14855,6 @@ packages: /quick-lru/5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - dev: true /ramda/0.28.0: resolution: {integrity: sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==} @@ -15219,7 +15126,6 @@ packages: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} dependencies: pify: 2.3.0 - dev: true /read-config-file/6.2.0: resolution: {integrity: sha512-gx7Pgr5I56JtYz+WuqEbQHj/xWo+5Vwua2jhb1VwM4Wid5PqYmZ4i00ZB0YEGIfkVBsCv9UrjgyqCiQfS/Oosg==} @@ -16075,11 +15981,6 @@ packages: engines: {node: '>=8'} dev: true - /slash/4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: false - /slice-ansi/3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -16266,12 +16167,6 @@ packages: extend-shallow: 3.0.2 dev: true - /split/0.3.3: - resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} - dependencies: - through: 2.3.8 - dev: false - /split2/3.2.2: resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} dependencies: @@ -16393,12 +16288,6 @@ packages: readable-stream: 2.3.7 dev: true - /stream-combiner/0.0.4: - resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} - dependencies: - duplexer: 0.1.2 - dev: false - /stream-each/1.2.3: resolution: {integrity: sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==} dependencies: @@ -16785,7 +16674,6 @@ packages: resolve: 1.22.1 transitivePeerDependencies: - ts-node - dev: true /tapable/1.1.3: resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} @@ -16977,10 +16865,6 @@ packages: engines: {node: '>=10'} dev: false - /through/2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: false - /through2/2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: @@ -17577,6 +17461,7 @@ packages: /universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} + dev: true /unpipe/1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -18160,11 +18045,6 @@ packages: resolution: {integrity: sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==} dev: true - /web-streams-polyfill/3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} - engines: {node: '>= 8'} - dev: false - /webidl-conversions/3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true @@ -18380,6 +18260,7 @@ packages: hasBin: true dependencies: isexe: 2.0.0 + dev: true /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -18642,7 +18523,6 @@ packages: /xtend/4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} - dev: true /y18n/4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} @@ -18666,11 +18546,6 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - /yaml/2.1.1: - resolution: {integrity: sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==} - engines: {node: '>= 14'} - dev: false - /yargs-parser/18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -18754,33 +18629,6 @@ packages: sax: 1.2.4 dev: false - /ytsr/3.8.0: - resolution: {integrity: sha512-R+RfYXvBBMAr2e4OxrQ5SBv5x/Mdhmcj1Q8TH0f2HK5d2jbhHOtK4BdzPvLriA6MDoMwqqX04GD8Rpf9UNtSTg==} - engines: {node: '>=8'} - dependencies: - miniget: 4.2.2 - dev: false - /zwitch/1.0.5: resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==} dev: true - - /zx/7.1.1: - resolution: {integrity: sha512-5YlTO2AJ+Ku2YuZKSSSqnUKuagcM/f/j4LmHs15O84Ch80Z9gzR09ZK3gR7GV+rc8IFpz2H/XNFtFVmj31yrZA==} - engines: {node: '>= 16.0.0'} - hasBin: true - dependencies: - '@types/fs-extra': 9.0.13 - '@types/minimist': 1.2.2 - '@types/node': 18.11.17 - '@types/ps-tree': 1.1.2 - '@types/which': 2.0.1 - chalk: 5.0.1 - fs-extra: 10.1.0 - globby: 13.1.2 - minimist: 1.2.7 - node-fetch: 3.2.10 - ps-tree: 1.2.0 - which: 2.0.2 - yaml: 2.1.1 - dev: false