@prisma/client 6.19.0-integration-next.3 → 6.19.0-integration-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var Ia=Object.create;var It=Object.defineProperty;var Fa=Object.getOwnPropertyDescriptor;var La=Object.getOwnPropertyNames;var Ma=Object.getPrototypeOf,$a=Object.prototype.hasOwnProperty;var Jn=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var r in t)It(e,r,{get:t[r],enumerable:!0})},Kn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of La(t))!$a.call(e,i)&&i!==r&&It(e,i,{get:()=>t[i],enumerable:!(n=Fa(t,i))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?Ia(Ma(e)):{},Kn(t||!e||!e.__esModule?It(r,"default",{value:e,enumerable:!0}):r,e)),Na=e=>Kn(It({},"__esModule",{value:!0}),e);var Kr=V((fm,Pi)=>{"use strict";Pi.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Ci=V((gm,Si)=>{"use strict";var Zl=require("node:os"),Ti=require("node:tty"),G=Kr(),{env:O}=process,he;G("no-color")||G("no-colors")||G("color=false")||G("color=never")?he=0:(G("color")||G("colors")||G("color=true")||G("color=always"))&&(he=1);"FORCE_COLOR"in O&&(O.FORCE_COLOR==="true"?he=1:O.FORCE_COLOR==="false"?he=0:he=O.FORCE_COLOR.length===0?1:Math.min(parseInt(O.FORCE_COLOR,10),3));function Hr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function zr(e,t){if(he===0)return 0;if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2;if(e&&!t&&he===void 0)return 0;let r=he||0;if(O.TERM==="dumb")return r;if(process.platform==="win32"){let n=Zl.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in O)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in O)||O.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in O){let n=parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:r}function Xl(e){let t=zr(e,e&&e.isTTY);return Hr(t)}Si.exports={supportsColor:Xl,stdout:Hr(zr(!0,Ti.isatty(1))),stderr:Hr(zr(!0,Ti.isatty(2)))}});var Oi=V((ym,Ri)=>{"use strict";var eu=Ci(),$e=Kr();function Ai(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function Yr(e){let{CI:t,FORCE_HYPERLINK:r,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(r)return!(r.length>0&&parseInt(r,10)===0);if($e("no-hyperlink")||$e("no-hyperlinks")||$e("hyperlink=false")||$e("hyperlink=never"))return!1;if($e("hyperlink=true")||$e("hyperlink=always")||n)return!0;if(!eu.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||t||i)return!1;if(o){let u=Ai(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=Ai(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}Ri.exports={supportsHyperlink:Yr,stdout:Yr(process.stdout),stderr:Yr(process.stderr)}});var ki=V((Om,tu)=>{tu.exports={name:"@prisma/internals",version:"6.19.0-integration-next.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <suchanek@prisma.io>",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"~20.19.0","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f","@prisma/schema-engine-wasm":"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.4.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Di=V((Mm,ou)=>{ou.exports={name:"@prisma/engines-version",version:"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"34b5a692b7bd79939a9a2c3ef97d816e749cda2f"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var en=V(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.enginesVersion=void 0;Jt.enginesVersion=Di().prisma.enginesVersion});var Li=V((zm,Fi)=>{"use strict";Fi.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var an=V((Xm,ji)=>{"use strict";ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bi=V((uf,yu)=>{yu.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Ji=V((cf,se)=>{"use strict";var mn=require("node:fs"),fn=require("node:path"),hu=require("node:os"),bu=require("node:crypto"),xu=Bi(),Gi=xu.version,wu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Eu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
1
+ "use strict";var Ia=Object.create;var It=Object.defineProperty;var Fa=Object.getOwnPropertyDescriptor;var La=Object.getOwnPropertyNames;var Ma=Object.getPrototypeOf,$a=Object.prototype.hasOwnProperty;var Jn=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var r in t)It(e,r,{get:t[r],enumerable:!0})},Kn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of La(t))!$a.call(e,i)&&i!==r&&It(e,i,{get:()=>t[i],enumerable:!(n=Fa(t,i))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?Ia(Ma(e)):{},Kn(t||!e||!e.__esModule?It(r,"default",{value:e,enumerable:!0}):r,e)),Na=e=>Kn(It({},"__esModule",{value:!0}),e);var Kr=V((fm,Pi)=>{"use strict";Pi.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Ci=V((gm,Si)=>{"use strict";var Zl=require("node:os"),Ti=require("node:tty"),G=Kr(),{env:O}=process,he;G("no-color")||G("no-colors")||G("color=false")||G("color=never")?he=0:(G("color")||G("colors")||G("color=true")||G("color=always"))&&(he=1);"FORCE_COLOR"in O&&(O.FORCE_COLOR==="true"?he=1:O.FORCE_COLOR==="false"?he=0:he=O.FORCE_COLOR.length===0?1:Math.min(parseInt(O.FORCE_COLOR,10),3));function Hr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function zr(e,t){if(he===0)return 0;if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2;if(e&&!t&&he===void 0)return 0;let r=he||0;if(O.TERM==="dumb")return r;if(process.platform==="win32"){let n=Zl.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in O)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in O)||O.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in O){let n=parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:r}function Xl(e){let t=zr(e,e&&e.isTTY);return Hr(t)}Si.exports={supportsColor:Xl,stdout:Hr(zr(!0,Ti.isatty(1))),stderr:Hr(zr(!0,Ti.isatty(2)))}});var Oi=V((ym,Ri)=>{"use strict";var eu=Ci(),$e=Kr();function Ai(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function Yr(e){let{CI:t,FORCE_HYPERLINK:r,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(r)return!(r.length>0&&parseInt(r,10)===0);if($e("no-hyperlink")||$e("no-hyperlinks")||$e("hyperlink=false")||$e("hyperlink=never"))return!1;if($e("hyperlink=true")||$e("hyperlink=always")||n)return!0;if(!eu.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||t||i)return!1;if(o){let u=Ai(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=Ai(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}Ri.exports={supportsHyperlink:Yr,stdout:Yr(process.stdout),stderr:Yr(process.stderr)}});var ki=V((Om,tu)=>{tu.exports={name:"@prisma/internals",version:"6.19.0-integration-next.4",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <suchanek@prisma.io>",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"~20.19.0","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f","@prisma/schema-engine-wasm":"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.4.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Di=V((Mm,ou)=>{ou.exports={name:"@prisma/engines-version",version:"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"34b5a692b7bd79939a9a2c3ef97d816e749cda2f"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var en=V(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.enginesVersion=void 0;Jt.enginesVersion=Di().prisma.enginesVersion});var Li=V((zm,Fi)=>{"use strict";Fi.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var an=V((Xm,ji)=>{"use strict";ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bi=V((uf,yu)=>{yu.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Ji=V((cf,se)=>{"use strict";var mn=require("node:fs"),fn=require("node:path"),hu=require("node:os"),bu=require("node:crypto"),xu=Bi(),Gi=xu.version,wu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Eu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
2
2
  `);let n;for(;(n=wu.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
3
3
  `),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function vu(e){let t=Wi(e),r=R.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Qi(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=Tu(r,a);o=R.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return R.parse(o)}function Pu(e){console.log(`[dotenv@${Gi}][WARN] ${e}`)}function ht(e){console.log(`[dotenv@${Gi}][DEBUG] ${e}`)}function Qi(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Tu(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Wi(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)mn.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=fn.resolve(process.cwd(),".env.vault");return mn.existsSync(t)?t:null}function Ui(e){return e[0]==="~"?fn.join(hu.homedir(),e.slice(1)):e}function Su(e){!!(e&&e.debug)&&ht("Loading env from encrypted .env.vault");let r=R._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),R.populate(n,r,e),{parsed:r}}function Cu(e){let t=fn.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&ht("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[Ui(e.path)];else{i=[];for(let l of e.path)i.push(Ui(l))}let o,s={};for(let l of i)try{let u=R.parse(mn.readFileSync(l,{encoding:r}));R.populate(s,u,e)}catch(u){n&&ht(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),R.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function Au(e){if(Qi(e).length===0)return R.configDotenv(e);let t=Wi(e);return t?R._configVault(e):(Pu(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),R.configDotenv(e))}function Ru(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=bu.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ou(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&ht(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var R={configDotenv:Cu,_configVault:Su,_parseVault:vu,config:Au,decrypt:Ru,parse:Eu,populate:Ou};se.exports.configDotenv=R.configDotenv;se.exports._configVault=R._configVault;se.exports._parseVault=R._parseVault;se.exports.config=R.config;se.exports.decrypt=R.decrypt;se.exports.parse=R.parse;se.exports.populate=R.populate;se.exports=R});var Yi=V((yf,zt)=>{"use strict";zt.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};zt.exports.default=zt.exports});var wn=V((fg,oo)=>{"use strict";oo.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,l,u,c,p,m,f,g,y,$,le,A,T,q=[];for(l=0;l<i;l++)q.push(l+1),q.push(t.charCodeAt(s+l));for(var Ie=q.length-1;a<o-3;)for($=r.charCodeAt(s+(u=a)),le=r.charCodeAt(s+(c=a+1)),A=r.charCodeAt(s+(p=a+2)),T=r.charCodeAt(s+(m=a+3)),f=a+=4,l=0;l<Ie;l+=2)g=q[l],y=q[l+1],u=e(g,u,c,$,y),c=e(u,c,p,le,y),p=e(c,p,m,A,y),f=e(p,m,f,T,y),q[l]=f,m=p,p=c,c=u,u=g;for(;a<o;)for($=r.charCodeAt(s+(u=a)),f=++a,l=0;l<Ie;l+=2)g=q[l],q[l]=f=e(g,u,f,$,q[l+1]),u=g;return f}}()});var co=Jn(()=>{"use strict"});var po=Jn(()=>{"use strict"});var nd={};Te(nd,{AnyNull:()=>F.AnyNull,DMMF:()=>wt,DbNull:()=>F.DbNull,Debug:()=>C,Decimal:()=>Oa.Decimal,Extensions:()=>Fr,JsonNull:()=>F.JsonNull,MetricsClient:()=>Ze,NullTypes:()=>F.NullTypes,ObjectEnumValue:()=>F.ObjectEnumValue,PrismaClientInitializationError:()=>x.PrismaClientInitializationError,PrismaClientKnownRequestError:()=>x.PrismaClientKnownRequestError,PrismaClientRustPanicError:()=>x.PrismaClientRustPanicError,PrismaClientUnknownRequestError:()=>x.PrismaClientUnknownRequestError,PrismaClientValidationError:()=>x.PrismaClientValidationError,Public:()=>Lr,Sql:()=>te.Sql,createParam:()=>ko,defineDmmfProperty:()=>$o,deserializeJsonResponse:()=>tt,deserializeRawResult:()=>kr,dmmfToRuntimeDataModel:()=>Xn,empty:()=>te.empty,getPrismaClient:()=>Ca,getRuntime:()=>Ar,isAnyNull:()=>F.isAnyNull,isDbNull:()=>F.isDbNull,isJsonNull:()=>F.isJsonNull,join:()=>te.join,makeStrictEnum:()=>Aa,makeTypedQueryFactory:()=>No,raw:()=>te.raw,serializeJsonQuery:()=>fr,skip:()=>mr,sqltag:()=>te.sql,warnEnvConflicts:()=>Ra,warnOnce:()=>xt});module.exports=Na(nd);var Fr={};Te(Fr,{defineExtension:()=>Hn,getExtensionContext:()=>zn});function Hn(e){return typeof e=="function"?e:t=>t.$extends(e)}function zn(e){return e}var Lr={};Te(Lr,{validator:()=>Yn});function Yn(...e){return t=>t}var J=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function ce(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Zn(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}function st(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Xn(e){return{models:Mr(e.models),enums:Mr(e.enums),types:Mr(e.types)}}function Mr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}var xe=require("@prisma/client-runtime-utils");var Ft={};Te(Ft,{$:()=>ii,bgBlack:()=>Ka,bgBlue:()=>Za,bgCyan:()=>el,bgGreen:()=>za,bgMagenta:()=>Xa,bgRed:()=>Ha,bgWhite:()=>tl,bgYellow:()=>Ya,black:()=>Ga,blue:()=>Se,bold:()=>_,cyan:()=>ie,dim:()=>re,gray:()=>at,green:()=>pe,grey:()=>Ja,hidden:()=>Ba,inverse:()=>Va,italic:()=>qa,magenta:()=>Qa,red:()=>B,reset:()=>ja,strikethrough:()=>Ua,underline:()=>I,white:()=>Wa,yellow:()=>ne});var $r,ei,ti,ri,ni=!0;typeof process<"u"&&({FORCE_COLOR:$r,NODE_DISABLE_COLORS:ei,NO_COLOR:ti,TERM:ri}=process.env||{},ni=process.stdout&&process.stdout.isTTY);var ii={enabled:!ei&&ti==null&&ri!=="dumb"&&($r!=null&&$r!=="0"||ni)};function E(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ii.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var ja=E(0,0),_=E(1,22),re=E(2,22),qa=E(3,23),I=E(4,24),Va=E(7,27),Ba=E(8,28),Ua=E(9,29),Ga=E(30,39),B=E(31,39),pe=E(32,39),ne=E(33,39),Se=E(34,39),Qa=E(35,39),ie=E(36,39),Wa=E(37,39),at=E(90,39),Ja=E(90,39),Ka=E(40,49),Ha=E(41,49),za=E(42,49),Ya=E(43,49),Za=E(44,49),Xa=E(45,49),el=E(46,49),tl=E(47,49);var rl=100,oi=["green","yellow","blue","magenta","cyan","red"],lt=[],si=Date.now(),nl=0,Nr=typeof process<"u"?process.env:{};globalThis.DEBUG??=Nr.DEBUG??"";globalThis.DEBUG_COLORS??=Nr.DEBUG_COLORS?Nr.DEBUG_COLORS==="true":!0;var ut={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function il(e){let t={color:oi[nl++%oi.length],enabled:ut.enabled(e),namespace:e,log:ut.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&lt.push([o,...n]),lt.length>rl&&lt.shift(),ut.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:ol(c)),u=`+${Date.now()-si}ms`;si=Date.now(),globalThis.DEBUG_COLORS?a(Ft[s](_(o)),...l,Ft[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var C=new Proxy(il,{get:(e,t)=>ut[t],set:(e,t,r)=>ut[t]=r});function ol(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ai(e=7500){let t=lt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(`
4
4
  `);return t.length<e?t:t.slice(-e)}function li(){lt.length=0}var Fe=C;var ui=w(require("node:fs"));function jr(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&ui.default.existsSync(e))&&process.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".)')}var qr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];var Lt="libquery_engine";function Mt(e,t){let r=t==="url";return e.includes("windows")?r?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?r?`${Lt}.dylib.node`:`${Lt}-${e}.dylib.node`:r?`${Lt}.so.node`:`${Lt}-${e}.so.node`}var mi=w(require("node:child_process")),Qr=w(require("node:fs/promises")),Vt=w(require("node:os"));var oe=Symbol.for("@ts-pattern/matcher"),sl=Symbol.for("@ts-pattern/isVariadic"),Nt="@ts-pattern/anonymous-select-key",Vr=e=>!!(e&&typeof e=="object"),$t=e=>e&&!!e[oe],z=(e,t,r)=>{if($t(e)){let n=e[oe](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Vr(e)){if(!Vr(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];$t(a)&&a[sl]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;let s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,c)=>z(u,s[c],r))&&i.every((u,c)=>z(u,a[c],r))&&(o.length===0||z(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>z(s,t[a],r))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in t||$t(o=i)&&o[oe]().matcherType==="optional")&&z(i,t[n],r);var o})}return Object.is(t,e)},ye=e=>{var t,r,n;return Vr(e)?$t(e)?(t=(r=(n=e[oe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?ct(e,ye):ct(Object.values(e),ye):[]},ct=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function U(e){return Object.assign(e,{optional:()=>al(e),and:t=>S(e,t),or:t=>ll(e,t),select:t=>t===void 0?ci(e):ci(t,e)})}function al(e){return U({[oe]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(ye(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:z(e,t,n),selections:r}},getSelectionKeys:()=>ye(e),matcherType:"optional"})})}function S(...e){return U({[oe]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>z(i,t,n)),selections:r}},getSelectionKeys:()=>ct(e,ye),matcherType:"and"})})}function ll(...e){return U({[oe]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return ct(e,ye).forEach(i=>n(i,void 0)),{matched:e.some(i=>z(i,t,n)),selections:r}},getSelectionKeys:()=>ct(e,ye),matcherType:"or"})})}function h(e){return{[oe]:()=>({match:t=>({matched:!!e(t)})})}}function ci(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return U({[oe]:()=>({match:n=>{let i={[t??Nt]:n};return{matched:r===void 0||z(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Nt].concat(r===void 0?[]:ye(r))})})}function K(e){return typeof e=="number"}function de(e){return typeof e=="string"}function me(e){return typeof e=="bigint"}var Ld=U(h(function(e){return!0}));var fe=e=>Object.assign(U(e),{startsWith:t=>{return fe(S(e,(r=t,h(n=>de(n)&&n.startsWith(r)))));var r},endsWith:t=>{return fe(S(e,(r=t,h(n=>de(n)&&n.endsWith(r)))));var r},minLength:t=>fe(S(e,(r=>h(n=>de(n)&&n.length>=r))(t))),length:t=>fe(S(e,(r=>h(n=>de(n)&&n.length===r))(t))),maxLength:t=>fe(S(e,(r=>h(n=>de(n)&&n.length<=r))(t))),includes:t=>{return fe(S(e,(r=t,h(n=>de(n)&&n.includes(r)))));var r},regex:t=>{return fe(S(e,(r=t,h(n=>de(n)&&!!n.match(r)))));var r}}),Md=fe(h(de)),H=e=>Object.assign(U(e),{between:(t,r)=>H(S(e,((n,i)=>h(o=>K(o)&&n<=o&&i>=o))(t,r))),lt:t=>H(S(e,(r=>h(n=>K(n)&&n<r))(t))),gt:t=>H(S(e,(r=>h(n=>K(n)&&n>r))(t))),lte:t=>H(S(e,(r=>h(n=>K(n)&&n<=r))(t))),gte:t=>H(S(e,(r=>h(n=>K(n)&&n>=r))(t))),int:()=>H(S(e,h(t=>K(t)&&Number.isInteger(t)))),finite:()=>H(S(e,h(t=>K(t)&&Number.isFinite(t)))),positive:()=>H(S(e,h(t=>K(t)&&t>0))),negative:()=>H(S(e,h(t=>K(t)&&t<0)))}),$d=H(h(K)),ge=e=>Object.assign(U(e),{between:(t,r)=>ge(S(e,((n,i)=>h(o=>me(o)&&n<=o&&i>=o))(t,r))),lt:t=>ge(S(e,(r=>h(n=>me(n)&&n<r))(t))),gt:t=>ge(S(e,(r=>h(n=>me(n)&&n>r))(t))),lte:t=>ge(S(e,(r=>h(n=>me(n)&&n<=r))(t))),gte:t=>ge(S(e,(r=>h(n=>me(n)&&n>=r))(t))),positive:()=>ge(S(e,h(t=>me(t)&&t>0))),negative:()=>ge(S(e,h(t=>me(t)&&t<0)))}),Nd=ge(h(me)),jd=U(h(function(e){return typeof e=="boolean"})),qd=U(h(function(e){return typeof e=="symbol"})),Vd=U(h(function(e){return e==null})),Bd=U(h(function(e){return e!=null}));var Br=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}},Ur={matched:!1,value:void 0};function Le(e){return new Gr(e,Ur)}var Gr=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>z(u,this.input,a))||i&&!i(this.input)?Ur:{matched:!0,value:r(o?Nt in s?s[Nt]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:Ur)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Br(this.input)}run(){return this.exhaustive()}returnType(){return this}};var fi=require("node:util");var ul={warn:ne("prisma:warn")},cl={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function jt(e,...t){cl.warn()&&console.warn(`${ul.warn} ${e}`,...t)}var pl=(0,fi.promisify)(mi.default.exec),L=Fe("prisma:get-platform"),dl=["1.0.x","1.1.x","3.0.x"];async function gi(){let e=Vt.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Bt("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await fl(),n=await vl(),i=yl({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await hl(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function ml(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=Le({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return L(`Found distro info:
@@ -107,7 +107,7 @@ ${I(p)}
107
107
  If you want the Prisma team to look into it, please open the link above \u{1F64F}
108
108
  To increase the chance of success, please post your schema and a snippet of
109
109
  how you used Prisma Client in the issue.
110
- `}var _s=require("@prisma/client-runtime-utils");var gp=require("@prisma/client-runtime-utils");function Ds(e,t){throw new Error(t)}function yp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function hp(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function tt(e){return e===null?e:Array.isArray(e)?e.map(tt):typeof e=="object"?yp(e)?bp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:hp(e,tt):e}function bp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new _s.Decimal(t);case"Json":return JSON.parse(t);default:Ds(t,"Unknown tagged value")}}function In(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function Sr(e){return{ok:!0,value:e,map(t){return Sr(t(e))},flatMap(t){return t(e)}}}function De(e){return{ok:!1,error:e,map(){return De(e)},flatMap(){return De(e)}}}var Is=C("driver-adapter-utils"),Fn=class{registeredErrors=[];consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}};var Cr=(e,t=new Fn)=>{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:ae(t,e.queryRaw.bind(e)),executeRaw:ae(t,e.executeRaw.bind(e)),executeScript:ae(t,e.executeScript.bind(e)),dispose:ae(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ae(t,e.startTransaction.bind(e))(...n)).map(o=>xp(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=wp(t,e.getConnectionInfo.bind(e))),r},xp=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ae(e,t.queryRaw.bind(t)),executeRaw:ae(e,t.executeRaw.bind(t)),commit:ae(e,t.commit.bind(t)),rollback:ae(e,t.rollback.bind(t))});function ae(e,t){return async(...r)=>{try{return Sr(await t(...r))}catch(n){if(Is("[error@wrapAsync]",n),In(n))return De(n.cause);let i=e.registerNewError(n);return De({kind:"GenericJs",id:i})}}}function wp(e,t){return(...r)=>{try{return Sr(t(...r))}catch(n){if(Is("[error@wrapSync]",n),In(n))return De(n.cause);let i=e.registerNewError(n);return De({kind:"GenericJs",id:i})}}}var Fs="6.19.0-integration-next.3";var Ln=require("@prisma/client-runtime-utils");var vp=()=>globalThis.process?.release?.name==="node",Pp=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Tp=()=>!!globalThis.Deno,Sp=()=>typeof globalThis.Netlify=="object",Cp=()=>typeof globalThis.EdgeRuntime=="object",Ap=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Rp(){return[[Sp,"netlify"],[Cp,"edge-light"],[Ap,"workerd"],[Tp,"deno"],[Pp,"bun"],[vp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Op={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ar(){let e=Rp();return{id:e,prettyName:Op[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function Ls({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Ln.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Ln.PrismaClientInitializationError("error: Missing URL environment variable, value, or override.",n);return i}var D=require("@prisma/client-runtime-utils");function Ms(e){if(e?.kind==="itx")return e.options.id}var $s=require("@prisma/client-runtime-utils");var $n=w(require("node:os")),Ns=w(require("node:path"));var Mn=Symbol("PrismaLibraryEngineCache");function kp(){let e=globalThis;return e[Mn]===void 0&&(e[Mn]={}),e[Mn]}function Dp(e){let t=kp();if(t[e]!==void 0)return t[e];let r=Ns.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=$n.default.constants.dlopen.RTLD_LAZY|$n.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var js={async loadLibrary(e){let t=await Wr(),r=await Ps("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>Dp(r))}catch(n){let i=nn({e:n,platformInfo:t,id:r});throw new $s.PrismaClientInitializationError(i,e.clientVersion)}}};var Rr=require("@prisma/client-runtime-utils");var Nn,qs={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new Rr.PrismaClientInitializationError(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ar().prettyName})`,t);if(n===void 0)throw new Rr.PrismaClientInitializationError("WASM engine was unexpectedly `undefined`",t);Nn===void 0&&(Nn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new Rr.PrismaClientInitializationError("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Nn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var _p="P2036",ee=C("prisma:client:libraryEngine");function Ip(e){return e.item_type==="query"&&"query"in e}function Fp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Vs=[...qr,"native"],Lp=0xffffffffffffffffn,jn=1n;function Mp(){let e=jn++;return jn>Lp&&(jn=1n),e}var rt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=r??js,t.engineWasm!==void 0&&(this.libraryLoader=r??qs),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Mp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if($p(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new D.PrismaClientKnownRequestError(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new D.PrismaClientUnknownRequestError(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ee("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;jr(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await this.tracingHelper.runInChildSpan("detect_platform",()=>Ce());if(!Vs.includes(t))throw new D.PrismaClientInitializationError(`Unknown ${B("PRISMA_QUERY_ENGINE_LIBRARY")} ${B(_(t))}. Possible binaryTargets: ${pe(Vs.join(", "))} or a path to the query engine library.
110
+ `}var _s=require("@prisma/client-runtime-utils");var gp=require("@prisma/client-runtime-utils");function Ds(e,t){throw new Error(t)}function yp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function hp(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function tt(e){return e===null?e:Array.isArray(e)?e.map(tt):typeof e=="object"?yp(e)?bp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:hp(e,tt):e}function bp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new _s.Decimal(t);case"Json":return JSON.parse(t);default:Ds(t,"Unknown tagged value")}}function In(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function Sr(e){return{ok:!0,value:e,map(t){return Sr(t(e))},flatMap(t){return t(e)}}}function De(e){return{ok:!1,error:e,map(){return De(e)},flatMap(){return De(e)}}}var Is=C("driver-adapter-utils"),Fn=class{registeredErrors=[];consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}};var Cr=(e,t=new Fn)=>{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:ae(t,e.queryRaw.bind(e)),executeRaw:ae(t,e.executeRaw.bind(e)),executeScript:ae(t,e.executeScript.bind(e)),dispose:ae(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ae(t,e.startTransaction.bind(e))(...n)).map(o=>xp(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=wp(t,e.getConnectionInfo.bind(e))),r},xp=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ae(e,t.queryRaw.bind(t)),executeRaw:ae(e,t.executeRaw.bind(t)),commit:ae(e,t.commit.bind(t)),rollback:ae(e,t.rollback.bind(t))});function ae(e,t){return async(...r)=>{try{return Sr(await t(...r))}catch(n){if(Is("[error@wrapAsync]",n),In(n))return De(n.cause);let i=e.registerNewError(n);return De({kind:"GenericJs",id:i})}}}function wp(e,t){return(...r)=>{try{return Sr(t(...r))}catch(n){if(Is("[error@wrapSync]",n),In(n))return De(n.cause);let i=e.registerNewError(n);return De({kind:"GenericJs",id:i})}}}var Fs="6.19.0-integration-next.4";var Ln=require("@prisma/client-runtime-utils");var vp=()=>globalThis.process?.release?.name==="node",Pp=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Tp=()=>!!globalThis.Deno,Sp=()=>typeof globalThis.Netlify=="object",Cp=()=>typeof globalThis.EdgeRuntime=="object",Ap=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Rp(){return[[Sp,"netlify"],[Cp,"edge-light"],[Ap,"workerd"],[Tp,"deno"],[Pp,"bun"],[vp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Op={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ar(){let e=Rp();return{id:e,prettyName:Op[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function Ls({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Ln.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Ln.PrismaClientInitializationError("error: Missing URL environment variable, value, or override.",n);return i}var D=require("@prisma/client-runtime-utils");function Ms(e){if(e?.kind==="itx")return e.options.id}var $s=require("@prisma/client-runtime-utils");var $n=w(require("node:os")),Ns=w(require("node:path"));var Mn=Symbol("PrismaLibraryEngineCache");function kp(){let e=globalThis;return e[Mn]===void 0&&(e[Mn]={}),e[Mn]}function Dp(e){let t=kp();if(t[e]!==void 0)return t[e];let r=Ns.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=$n.default.constants.dlopen.RTLD_LAZY|$n.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var js={async loadLibrary(e){let t=await Wr(),r=await Ps("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>Dp(r))}catch(n){let i=nn({e:n,platformInfo:t,id:r});throw new $s.PrismaClientInitializationError(i,e.clientVersion)}}};var Rr=require("@prisma/client-runtime-utils");var Nn,qs={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new Rr.PrismaClientInitializationError(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ar().prettyName})`,t);if(n===void 0)throw new Rr.PrismaClientInitializationError("WASM engine was unexpectedly `undefined`",t);Nn===void 0&&(Nn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new Rr.PrismaClientInitializationError("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Nn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var _p="P2036",ee=C("prisma:client:libraryEngine");function Ip(e){return e.item_type==="query"&&"query"in e}function Fp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Vs=[...qr,"native"],Lp=0xffffffffffffffffn,jn=1n;function Mp(){let e=jn++;return jn>Lp&&(jn=1n),e}var rt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=r??js,t.engineWasm!==void 0&&(this.libraryLoader=r??qs),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Mp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if($p(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new D.PrismaClientKnownRequestError(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new D.PrismaClientUnknownRequestError(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ee("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;jr(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await this.tracingHelper.runInChildSpan("detect_platform",()=>Ce());if(!Vs.includes(t))throw new D.PrismaClientInitializationError(`Unknown ${B("PRISMA_QUERY_ENGINE_LIBRARY")} ${B(_(t))}. Possible binaryTargets: ${pe(Vs.join(", "))} or a path to the query engine library.
111
111
  You may have to run ${pe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return t}}parseEngineResponse(t){if(!t)throw new D.PrismaClientUnknownRequestError("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new D.PrismaClientUnknownRequestError("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Cr));let r=await this.adapterPromise;r&&ee("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new D.PrismaClientInitializationError(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Ip(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):Fp(r)?this.loggerRustPanic=new D.PrismaClientRustPanicError(qn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ee(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{ee("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Cr)),await this.adapterPromise,ee("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new D.PrismaClientInitializationError(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ee("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),ee("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,ee("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){ee(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new D.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof D.PrismaClientInitializationError)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new D.PrismaClientRustPanicError(qn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new D.PrismaClientUnknownRequestError(`${a.message}
112
112
  ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){ee("requestBatch");let i=Ss(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ms(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new D.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new D.PrismaClientRustPanicError(qn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:ys(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===_p&&r){let n=t.meta?.id;Kt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Kt(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function $p(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function qn(e,t){return ks({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Bs({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=y=>{i.push({_tag:"warning",value:y})},a=y=>{let $=y.join(`
113
113
  `);o.push({_tag:"error",value:$})},l=!!e?.startsWith("prisma://"),u=sn(e),c=!!t,p=l||u;!c&&r&&p&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let m=p||!r;c&&m&&(p?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let f={accelerate:m,ppg:u,driverAdapters:c};function g(y){return y.length>0}return g(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function Gs({copyEngine:e=!0},t){let r;try{r=Ls({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Bs({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)xt(...p.value);if(!n){let p=o.errors[0];throw new Us.PrismaClientValidationError(p.value,{clientVersion:t.clientVersion})}let s=Ne(t.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return a?new rt(t):new rt(t)}function Qs({generator:e}){return e?.previewFeatures??[]}var Ws=e=>({command:e});var ea=require("@prisma/client-runtime-utils");var Js=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);var zs=require("@prisma/client-runtime-utils");function nt(e){try{return Ks(e,"fast")}catch{return Ks(e,"slow")}}function Ks(e,t){return JSON.stringify(e.map(r=>Ys(r,t)))}function Ys(e,t){if(Array.isArray(e))return e.map(r=>Ys(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Ve(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(zs.Decimal.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Np(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Zs(e):e}function Np(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Hs);let t={};for(let r of Object.keys(e))t[r]=Hs(e[r]);return t}function Hs(e){return typeof e=="bigint"?e.toString():Zs(e)}var jp=/^(\s*alter\s)/i,Xs=C("prisma:client");function Vn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&jp.exec(t))throw new Error(`Running ALTER using ${n} is not supported