@prisma/client
Version:
Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.
17 lines • 185 kB
JavaScript
import * as __banner_node_module from "node:module";
import * as __banner_node_path from "node:path";
import * as process from "node:process";
import * as __banner_node_url from "node:url";
const __filename = __banner_node_url.fileURLToPath(import.meta.url);
globalThis['__dirname'] = __banner_node_path.dirname(__filename);
const require = __banner_node_module.createRequire(import.meta.url);
var Ml=Object.create;var Qr=Object.defineProperty;var Fl=Object.getOwnPropertyDescriptor;var _l=Object.getOwnPropertyNames;var $l=Object.getPrototypeOf,Ll=Object.prototype.hasOwnProperty;var Vl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var gi=(e,t)=>()=>(e&&(t=e(e=0)),t);var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=(e,t)=>{for(var r in t)Qr(e,r,{get:t[r],enumerable:!0})},ql=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _l(t))!Ll.call(e,i)&&i!==r&&Qr(e,i,{get:()=>t[i],enumerable:!(n=Fl(t,i))||n.enumerable});return e};var fe=(e,t,r)=>(r=e!=null?Ml($l(e)):{},ql(t||!e||!e.__esModule?Qr(r,"default",{value:e,enumerable:!0}):r,e));var Oi=$((If,uu)=>{uu.exports={name:"@prisma/engines-version",version:"7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"75cbdc1eb7150937890ad5465d861175c6624711"},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 Ni=$(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.enginesVersion=void 0;Vt.enginesVersion=Oi().prisma.enginesVersion});var Mi=$((Nf,Di)=>{"use strict";Di.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Vi=$((Ff,Li)=>{"use strict";Li.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var ji=$((Bf,Ut)=>{"use strict";Ut.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()};Ut.exports.default=Ut.exports});var tn=$((_g,zi)=>{"use strict";zi.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,d,m,g,b,w,R,E,S,V=[];for(l=0;l<i;l++)V.push(l+1),V.push(t.charCodeAt(s+l));for(var Ce=V.length-1;a<o-3;)for(w=r.charCodeAt(s+(u=a)),R=r.charCodeAt(s+(c=a+1)),E=r.charCodeAt(s+(p=a+2)),S=r.charCodeAt(s+(d=a+3)),m=a+=4,l=0;l<Ce;l+=2)g=V[l],b=V[l+1],u=e(g,u,c,w,b),c=e(u,c,p,R,b),p=e(c,p,d,E,b),m=e(p,d,m,S,b),V[l]=m,d=p,p=c,c=u,u=g;for(;a<o;)for(w=r.charCodeAt(s+(u=a)),m=++a,l=0;l<Ce;l+=2)g=V[l],V[l]=m=e(g,u,m,w,V[l+1]),u=g;return m}}()});var Xi=gi(()=>{"use strict"});var eo=gi(()=>{"use strict"});var vn=$(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.anumber=Sn;be.abytes=ps;be.ahash=vp;be.aexists=Ap;be.aoutput=Cp;function Sn(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Sp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ps(e,...t){if(!Sp(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function vp(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Sn(e.outputLen),Sn(e.blockLen)}function Ap(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Cp(e,t){ps(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}});var Ds=$(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.add5L=y.add5H=y.add4H=y.add4L=y.add3H=y.add3L=y.rotlBL=y.rotlBH=y.rotlSL=y.rotlSH=y.rotr32L=y.rotr32H=y.rotrBL=y.rotrBH=y.rotrSL=y.rotrSH=y.shrSL=y.shrSH=y.toBig=void 0;y.fromBig=Cn;y.split=ds;y.add=As;var yr=BigInt(2**32-1),An=BigInt(32);function Cn(e,t=!1){return t?{h:Number(e&yr),l:Number(e>>An&yr)}:{h:Number(e>>An&yr)|0,l:Number(e&yr)|0}}function ds(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=Cn(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}var ms=(e,t)=>BigInt(e>>>0)<<An|BigInt(t>>>0);y.toBig=ms;var fs=(e,t,r)=>e>>>r;y.shrSH=fs;var gs=(e,t,r)=>e<<32-r|t>>>r;y.shrSL=gs;var ys=(e,t,r)=>e>>>r|t<<32-r;y.rotrSH=ys;var hs=(e,t,r)=>e<<32-r|t>>>r;y.rotrSL=hs;var ws=(e,t,r)=>e<<64-r|t>>>r-32;y.rotrBH=ws;var bs=(e,t,r)=>e>>>r-32|t<<64-r;y.rotrBL=bs;var xs=(e,t)=>t;y.rotr32H=xs;var Es=(e,t)=>e;y.rotr32L=Es;var Ps=(e,t,r)=>e<<r|t>>>32-r;y.rotlSH=Ps;var Ts=(e,t,r)=>t<<r|e>>>32-r;y.rotlSL=Ts;var Ss=(e,t,r)=>t<<r-32|e>>>64-r;y.rotlBH=Ss;var vs=(e,t,r)=>e<<r-32|t>>>64-r;y.rotlBL=vs;function As(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Cs=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);y.add3L=Cs;var Rs=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;y.add3H=Rs;var ks=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);y.add4L=ks;var Is=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;y.add4H=Is;var Os=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);y.add5L=Os;var Ns=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;y.add5H=Ns;var Rp={fromBig:Cn,split:ds,toBig:ms,shrSH:fs,shrSL:gs,rotrSH:ys,rotrSL:hs,rotrBH:ws,rotrBL:bs,rotr32H:xs,rotr32L:Es,rotlSH:Ps,rotlSL:Ts,rotlBH:Ss,rotlBL:vs,add:As,add3L:Cs,add3H:Rs,add4L:ks,add4H:Is,add5H:Ns,add5L:Os};y.default=Rp});var Ms=$(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.crypto=void 0;var ce=Vl("node:crypto");hr.crypto=ce&&typeof ce=="object"&&"webcrypto"in ce?ce.webcrypto:ce&&typeof ce=="object"&&"randomBytes"in ce?ce:void 0});var $s=$(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.Hash=x.nextTick=x.byteSwapIfBE=x.isLE=void 0;x.isBytes=kp;x.u8=Ip;x.u32=Op;x.createView=Np;x.rotr=Dp;x.rotl=Mp;x.byteSwap=In;x.byteSwap32=Fp;x.bytesToHex=$p;x.hexToBytes=Lp;x.asyncLoop=qp;x.utf8ToBytes=_s;x.toBytes=wr;x.concatBytes=jp;x.checkOpts=Up;x.wrapConstructor=Bp;x.wrapConstructorWithOpts=Qp;x.wrapXOFConstructorWithOpts=Jp;x.randomBytes=Hp;var Qe=Ms(),kn=vn();function kp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ip(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Op(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Np(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Dp(e,t){return e<<32-t|e>>>t}function Mp(e,t){return e<<t|e>>>32-t>>>0}x.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function In(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}x.byteSwapIfBE=x.isLE?e=>e:e=>In(e);function Fp(e){for(let t=0;t<e.length;t++)e[t]=In(e[t])}var _p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function $p(e){(0,kn.abytes)(e);let t="";for(let r=0;r<e.length;r++)t+=_p[e[r]];return t}var re={_0:48,_9:57,A:65,F:70,a:97,f:102};function Fs(e){if(e>=re._0&&e<=re._9)return e-re._0;if(e>=re.A&&e<=re.F)return e-(re.A-10);if(e>=re.a&&e<=re.f)return e-(re.a-10)}function Lp(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i<r;i++,o+=2){let s=Fs(e.charCodeAt(o)),a=Fs(e.charCodeAt(o+1));if(s===void 0||a===void 0){let l=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+o)}n[i]=s*16+a}return n}var Vp=async()=>{};x.nextTick=Vp;async function qp(e,t,r){let n=Date.now();for(let i=0;i<e;i++){r(i);let o=Date.now()-n;o>=0&&o<t||(await(0,x.nextTick)(),n+=o)}}function _s(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function wr(e){return typeof e=="string"&&(e=_s(e)),(0,kn.abytes)(e),e}function jp(...e){let t=0;for(let n=0;n<e.length;n++){let i=e[n];(0,kn.abytes)(i),t+=i.length}let r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){let o=e[n];r.set(o,i),i+=o.length}return r}var Rn=class{clone(){return this._cloneInto()}};x.Hash=Rn;function Up(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function Bp(e){let t=n=>e().update(wr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Qp(e){let t=(n,i)=>e(i).update(wr(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Jp(e){let t=(n,i)=>e(i).update(wr(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Hp(e=32){if(Qe.crypto&&typeof Qe.crypto.getRandomValues=="function")return Qe.crypto.getRandomValues(new Uint8Array(e));if(Qe.crypto&&typeof Qe.crypto.randomBytes=="function")return Qe.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Js=$(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.shake256=A.shake128=A.keccak_512=A.keccak_384=A.keccak_256=A.keccak_224=A.sha3_512=A.sha3_384=A.sha3_256=A.sha3_224=A.Keccak=void 0;A.keccakP=Bs;var Je=vn(),St=Ds(),ne=$s(),qs=[],js=[],Us=[],Gp=BigInt(0),Tt=BigInt(1),zp=BigInt(2),Wp=BigInt(7),Kp=BigInt(256),Zp=BigInt(113);for(let e=0,t=Tt,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],qs.push(2*(5*n+r)),js.push((e+1)*(e+2)/2%64);let i=Gp;for(let o=0;o<7;o++)t=(t<<Tt^(t>>Wp)*Zp)%Kp,t&zp&&(i^=Tt<<(Tt<<BigInt(o))-Tt);Us.push(i)}var[Yp,Xp]=(0,St.split)(Us,!0),Ls=(e,t,r)=>r>32?(0,St.rotlBH)(e,t,r):(0,St.rotlSH)(e,t,r),Vs=(e,t,r)=>r>32?(0,St.rotlBL)(e,t,r):(0,St.rotlSL)(e,t,r);function Bs(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,l=(s+2)%10,u=r[l],c=r[l+1],p=Ls(u,c,1)^r[a],d=Vs(u,c,1)^r[a+1];for(let m=0;m<50;m+=10)e[s+m]^=p,e[s+m+1]^=d}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=js[s],l=Ls(i,o,a),u=Vs(i,o,a),c=qs[s];i=e[c],o=e[c+1],e[c]=l,e[c+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=Yp[n],e[1]^=Xp[n]}r.fill(0)}var vt=class e extends ne.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Je.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,ne.u32)(this.state)}keccak(){ne.isLE||(0,ne.byteSwap32)(this.state32),Bs(this.state32,this.rounds),ne.isLE||(0,ne.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Je.aexists)(this);let{blockLen:r,state:n}=this;t=(0,ne.toBytes)(t);let i=t.length;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);for(let a=0;a<s;a++)n[this.pos++]^=t[o++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:n,blockLen:i}=this;t[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){(0,Je.aexists)(this,!1),(0,Je.abytes)(t),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,o=t.length;i<o;){this.posOut>=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Je.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Je.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};A.Keccak=vt;var pe=(e,t,r)=>(0,ne.wrapConstructor)(()=>new vt(t,e,r));A.sha3_224=pe(6,144,224/8);A.sha3_256=pe(6,136,256/8);A.sha3_384=pe(6,104,384/8);A.sha3_512=pe(6,72,512/8);A.keccak_224=pe(1,144,224/8);A.keccak_256=pe(1,136,256/8);A.keccak_384=pe(1,104,384/8);A.keccak_512=pe(1,72,512/8);var Qs=(e,t,r)=>(0,ne.wrapXOFConstructorWithOpts)((n={})=>new vt(t,e,n.dkLen===void 0?r:n.dkLen,!0));A.shake128=Qs(31,168,128/8);A.shake256=Qs(31,136,256/8)});var Xs=$((Mx,de)=>{"use strict";var{sha3_512:ed}=Js(),Gs=24,At=32,On=(e=4,t=Math.random)=>{let r="";for(;r.length<e;)r=r+Math.floor(t()*36).toString(36);return r};function zs(e){let t=8n,r=0n;for(let n of e.values()){let i=BigInt(n);r=(r<<t)+i}return r}var Ws=(e="")=>zs(ed(e)).toString(36).slice(1),Hs=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),td=e=>Hs[Math.floor(e()*Hs.length)],Ks=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+On(At,t):On(At,t);return Ws(n).substring(0,At)},Zs=e=>()=>e++,rd=476782367,Ys=({random:e=Math.random,counter:t=Zs(Math.floor(e()*rd)),length:r=Gs,fingerprint:n=Ks({random:e})}={})=>function(){let o=td(e),s=Date.now().toString(36),a=t().toString(36),l=On(r,e),u=`${s+l+a+n}`;return`${o+Ws(u).substring(1,r)}`},nd=Ys(),id=(e,{minLength:t=2,maxLength:r=At}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};de.exports.getConstants=()=>({defaultLength:Gs,bigLength:At});de.exports.init=Ys;de.exports.createId=nd;de.exports.bufToBigInt=zs;de.exports.createCounter=Zs;de.exports.createFingerprint=Ks;de.exports.isCuid=id});var ea=$((Fx,Ct)=>{"use strict";var{createId:od,init:sd,getConstants:ad,isCuid:ld}=Xs();Ct.exports.createId=od;Ct.exports.init=sd;Ct.exports.getConstants=ad;Ct.exports.isCuid=ld});var wi={};et(wi,{defineExtension:()=>yi,getExtensionContext:()=>hi});function yi(e){return typeof e=="function"?e:t=>t.$extends(e)}function hi(e){return e}var xi={};et(xi,{validator:()=>bi});function bi(...e){return t=>t}var H=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 se(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ei(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}function tt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function jl(e){return{models:Jr(e.models),enums:Jr(e.enums),types:Jr(e.types)}}function Jr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}import{isObjectEnumValue as sc}from"@prisma/client-runtime-utils";var Lt={};et(Lt,{$:()=>Ai,bgBlack:()=>Zl,bgBlue:()=>tu,bgCyan:()=>nu,bgGreen:()=>Xl,bgMagenta:()=>ru,bgRed:()=>Yl,bgWhite:()=>iu,bgYellow:()=>eu,black:()=>Gl,blue:()=>ye,bold:()=>B,cyan:()=>ee,dim:()=>rt,gray:()=>st,green:()=>it,grey:()=>Kl,hidden:()=>Jl,inverse:()=>Ql,italic:()=>Bl,magenta:()=>zl,red:()=>ge,reset:()=>Ul,strikethrough:()=>Hl,underline:()=>nt,white:()=>Wl,yellow:()=>ot});var Hr,Pi,Ti,Si,vi=!0;typeof process<"u"&&({FORCE_COLOR:Hr,NODE_DISABLE_COLORS:Pi,NO_COLOR:Ti,TERM:Si}=process.env||{},vi=process.stdout&&process.stdout.isTTY);var Ai={enabled:!Pi&&Ti==null&&Si!=="dumb"&&(Hr!=null&&Hr!=="0"||vi)};function T(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ai.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ul=T(0,0),B=T(1,22),rt=T(2,22),Bl=T(3,23),nt=T(4,24),Ql=T(7,27),Jl=T(8,28),Hl=T(9,29),Gl=T(30,39),ge=T(31,39),it=T(32,39),ot=T(33,39),ye=T(34,39),zl=T(35,39),ee=T(36,39),Wl=T(37,39),st=T(90,39),Kl=T(90,39),Zl=T(40,49),Yl=T(41,49),Xl=T(42,49),eu=T(43,49),tu=T(44,49),ru=T(45,49),nu=T(46,49),iu=T(47,49);var ou=100,Ci=["green","yellow","blue","magenta","cyan","red"],at=[],Ri=Date.now(),su=0,Gr=typeof process<"u"?process.env:{};globalThis.DEBUG??=Gr.DEBUG??"";globalThis.DEBUG_COLORS??=Gr.DEBUG_COLORS?Gr.DEBUG_COLORS==="true":!0;var lt={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 au(e){let t={color:Ci[su++%Ci.length],enabled:lt.enabled(e),namespace:e,log:lt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&at.push([o,...n]),at.length>ou&&at.shift(),lt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:lu(c)),u=`+${Date.now()-Ri}ms`;Ri=Date.now(),globalThis.DEBUG_COLORS?a(Lt[s](B(o)),...l,Lt[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var D=new Proxy(au,{get:(e,t)=>lt[t],set:(e,t,r)=>lt[t]=r});function lu(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 ki(e=7500){let t=at.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(`
`);return t.length<e?t:t.slice(-e)}function Ii(){at.length=0}var Fi=fe(Mi(),1);function zr(e){let t=(0,Fi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}var _i="prisma+postgres",qt=`${_i}:`;function $i(e){return e?.toString().startsWith(`${qt}//`)??!1}function Wr(e){if(!$i(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var ct={};et(ct,{error:()=>du,info:()=>pu,log:()=>cu,query:()=>mu,should:()=>qi,tags:()=>ut,warn:()=>Kr});var ut={error:ge("prisma:error"),warn:ot("prisma:warn"),info:ee("prisma:info"),query:ye("prisma:query")},qi={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function cu(...e){console.log(...e)}function Kr(e,...t){qi.warn()&&console.warn(`${ut.warn} ${e}`,...t)}function pu(e,...t){console.info(`${ut.info} ${e}`,...t)}function du(e,...t){console.error(`${ut.error} ${e}`,...t)}function mu(e,...t){console.log(`${ut.query} ${e}`,...t)}function te(e,t){throw new Error(t)}function Zr({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var fu=Zr();function Re(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(fu,"")}import jt from"node:path";function Yr(e){return jt.sep===jt.posix.sep?e:e.split(jt.sep).join(jt.posix.sep)}function Xr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function en(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++)t(r,e[n])<0&&(r=e[n]);return r}function pt(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var Ui=new Set,Bi=(e,t,...r)=>{Ui.has(e)||(Ui.add(e),Kr(t,...r))};function ke(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Qt(e){return e.toString()!=="Invalid Date"}import{Decimal as gu}from"@prisma/client-runtime-utils";function Ie(e){return gu.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}import{PrismaClientValidationError as rc}from"@prisma/client-runtime-utils";var Jt={};et(Jt,{ModelAction:()=>Oe,datamodelEnumToSchemaEnum:()=>yu});function yu(e){return{name:e.name,values:e.values.map(t=>t.name)}}var Oe=(S=>(S.findUnique="findUnique",S.findUniqueOrThrow="findUniqueOrThrow",S.findFirst="findFirst",S.findFirstOrThrow="findFirstOrThrow",S.findMany="findMany",S.create="create",S.createMany="createMany",S.createManyAndReturn="createManyAndReturn",S.update="update",S.updateMany="updateMany",S.updateManyAndReturn="updateManyAndReturn",S.upsert="upsert",S.delete="delete",S.deleteMany="deleteMany",S.groupBy="groupBy",S.count="count",S.aggregate="aggregate",S.findRaw="findRaw",S.aggregateRaw="aggregateRaw",S))(Oe||{});var Gi=fe(Vi());import Eu from"node:fs";var Qi={keyword:ee,entity:ee,value:e=>B(ye(e)),punctuation:ye,directive:ee,function:ee,variable:e=>B(ye(e)),string:e=>B(it(e)),boolean:ot,number:ee,comment:st};var hu=e=>e,Ht={},wu=0,h={manual:Ht.Prism&&Ht.Prism.manual,disableWorkerMessageHandler:Ht.Prism&&Ht.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Q){let t=e;return new Q(t.type,h.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(h.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++wu}),e.__id},clone:function e(t,r){let n,i,o=h.util.type(t);switch(r=r||{},o){case"Object":if(i=h.util.objId(t),r[i])return r[i];n={},r[i]=n;for(let s in t)t.hasOwnProperty(s)&&(n[s]=e(t[s],r));return n;case"Array":return i=h.util.objId(t),r[i]?r[i]:(n=[],r[i]=n,t.forEach(function(s,a){n[a]=e(s,r)}),n);default:return t}}},languages:{extend:function(e,t){let r=h.util.clone(h.languages[e]);for(let n in t)r[n]=t[n];return r},insertBefore:function(e,t,r,n){n=n||h.languages;let i=n[e],o={};for(let a in i)if(i.hasOwnProperty(a)){if(a==t)for(let l in r)r.hasOwnProperty(l)&&(o[l]=r[l]);r.hasOwnProperty(a)||(o[a]=i[a])}let s=n[e];return n[e]=o,h.languages.DFS(h.languages,function(a,l){l===s&&a!=e&&(this[a]=o)}),o},DFS:function e(t,r,n,i){i=i||{};let o=h.util.objId;for(let s in t)if(t.hasOwnProperty(s)){r.call(t,s,t[s],n||s);let a=t[s],l=h.util.type(a);l==="Object"&&!i[o(a)]?(i[o(a)]=!0,e(a,r,null,i)):l==="Array"&&!i[o(a)]&&(i[o(a)]=!0,e(a,r,s,i))}}},plugins:{},highlight:function(e,t,r){let n={code:e,grammar:t,language:r};return h.hooks.run("before-tokenize",n),n.tokens=h.tokenize(n.code,n.grammar),h.hooks.run("after-tokenize",n),Q.stringify(h.util.encode(n.tokens),n.language)},matchGrammar:function(e,t,r,n,i,o,s){for(let b in r){if(!r.hasOwnProperty(b)||!r[b])continue;if(b==s)return;let w=r[b];w=h.util.type(w)==="Array"?w:[w];for(let R=0;R<w.length;++R){let E=w[R],S=E.inside,V=!!E.lookbehind,Ce=!!E.greedy,Br=0,Ol=E.alias;if(Ce&&!E.pattern.global){let F=E.pattern.toString().match(/[imuy]*$/)[0];E.pattern=RegExp(E.pattern.source,F+"g")}E=E.pattern||E;for(let F=n,oe=i;F<t.length;oe+=t[F].length,++F){let Xe=t[F];if(t.length>e.length)return;if(Xe instanceof Q)continue;if(Ce&&F!=t.length-1){E.lastIndex=oe;var p=E.exec(e);if(!p)break;var c=p.index+(V?p[1].length:0),d=p.index+p[0].length,a=F,l=oe;for(let Dl=t.length;a<Dl&&(l<d||!t[a].type&&!t[a-1].greedy);++a)l+=t[a].length,c>=l&&(++F,oe=l);if(t[F]instanceof Q)continue;u=a-F,Xe=e.slice(oe,l),p.index-=oe}else{E.lastIndex=0;var p=E.exec(Xe),u=1}if(!p){if(o)break;continue}V&&(Br=p[1]?p[1].length:0);var c=p.index+Br,p=p[0].slice(Br),d=c+p.length,m=Xe.slice(0,c),g=Xe.slice(d);let $t=[F,u];m&&(++F,oe+=m.length,$t.push(m));let Nl=new Q(b,S?h.tokenize(p,S):p,Ol,p,Ce);if($t.push(Nl),g&&$t.push(g),Array.prototype.splice.apply(t,$t),u!=1&&h.matchGrammar(e,t,r,F,oe,!0,b),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return h.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=h.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=h.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:Q};h.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:/[{}[\];(),.:]/};h.languages.javascript=h.languages.extend("clike",{"class-name":[h.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}/});h.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;h.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:h.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:h.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:h.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:h.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});h.languages.markup&&h.languages.markup.tag.addInlined("script","javascript");h.languages.js=h.languages.javascript;h.languages.typescript=h.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/});h.languages.ts=h.languages.typescript;function Q(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}Q.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Q.stringify(r,t)}).join(""):bu(e.type)(e.content)};function bu(e){return Qi[e]||hu}function Ji(e){return xu(e,h.languages.javascript)}function xu(e,t){return h.tokenize(e,t).map(n=>Q.stringify(n)).join("")}function Hi(e){return zr(e)}var Gt=class e{firstLineNumber;lines;static read(t){let r;try{r=Eu.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(t<this.firstLineNumber||t>this.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(`
`);return new e(t,Hi(n).split(`
`))}highlight(){let t=Ji(this.toString());return new e(this.firstLineNumber,t.split(`
`))}toString(){return this.lines.join(`
`)}};var Pu={red:ge,gray:st,dim:rt,bold:B,underline:nt,highlightSource:e=>e.highlight()},Tu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Su({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function vu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Su({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Gt.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Cu(c),d=Au(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let m=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,b)=>o.gray(String(b).padStart(m))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+m+1;g+=2,s.callArguments=(0,Gi.default)(i,g).slice(g)}}return s}function Au(e){let t=Object.keys(Oe).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Cu(e){let t=0;for(let r=0;r<e.length;r++){if(e.charAt(r)!==" ")return t;t++}return t}function Ru({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(ku(t))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
`)}function ku(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function zt(e){let t=e.showColors?Pu:Tu,r;return r=vu(e,t),Ru(r,t)}var ro=fe(tn());function Zi(e,t,r){let n=Yi(e),i=Iu(n),o=Nu(i);o?Wt(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Yi(e){return e.errors.flatMap(t=>t.kind==="Union"?Yi(t):[t])}function Iu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ou(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ou(e,t){return[...new Set(e.concat(t))]}function Nu(e){return en(e,(t,r)=>{let n=Wi(t),i=Wi(r);return n!==i?n-i:Ki(t)-Ki(r)})}function Wi(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ki(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var L=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};eo();var Ne=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o<r.length;o++)n(r[o],this),o!==i&&this.write(t);return this}writeLine(t){return this.write(t).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let t=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,t?.(),this}withIndent(t){return this.indent(),t(this),this.unindent(),this}afterNextNewline(t){return this.afterNextNewLineCallback=t,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Xi();var Kt=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var Zt=e=>e,Yt={bold:Zt,red:Zt,green:Zt,dim:Zt,enabled:!1},to={bold:B,red:ge,green:it,dim:rt,enabled:!0},De={write(e){e.writeLine(",")}};var G=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ae=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Me=class extends ae{items=[];addItem(t){return this.items.push(new Kt(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new G("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(De,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Fe=class e extends ae{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Me&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new G("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(De,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var k=class extends ae{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new G(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var dt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(De,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Wt(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Du(e,t);break;case"IncludeOnScalar":Mu(e,t);break;case"EmptySelection":Fu(e,t,r);break;case"UnknownSelectionField":Vu(e,t);break;case"InvalidSelectionValue":qu(e,t);break;case"UnknownArgument":ju(e,t);break;case"UnknownInputField":Uu(e,t);break;case"RequiredArgumentMissing":Bu(e,t);break;case"InvalidArgumentType":Qu(e,t);break;case"InvalidArgumentValue":Ju(e,t);break;case"ValueTooLarge":Hu(e,t);break;case"SomeFieldsMissing":Gu(e,t);break;case"TooManyFieldsGiven":zu(e,t);break;case"Union":Zi(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Du(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Mu(e,t){let[r,n]=_e(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new L(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${mt(s)}`:a+=".",a+=`
Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Fu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){_u(e,t,i);return}if(n.hasField("select")){$u(e,t);return}}if(r?.[se(e.outputType.name)]){Lu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function _u(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new L(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function $u(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),oo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${mt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Lu(e,t){let r=new dt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new L("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=_e(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Fe;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Vu(e,t){let r=so(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":oo(n,e.outputType);break;case"include":Wu(n,e.outputType);break;case"omit":Ku(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(mt(n)),i.join(" ")})}function qu(e,t){let r=so(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function ju(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Zu(n,e.arguments)),t.addErrorMessage(i=>no(i,r,e.arguments.map(o=>o.name)))}function Uu(e,t){let[r,n]=_e(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ao(o,e.inputType)}t.addErrorMessage(o=>no(o,n,e.inputType.fields.map(s=>s.name)))}function no(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Xu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(mt(e)),n.join(" ")}function Bu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof k&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=_e(e.argumentPath),s=new dt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new L(o,s).makeRequired())}else{let l=e.inputTypes.map(io).join(" | ");a.addSuggestion(new L(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=_e(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function io(e){return e.kind==="list"?`${io(e.elementType)}[]`:e.name}function Qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Xt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ju(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Xt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Hu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof k&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Gu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ao(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Xt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(mt(i)),o.join(" ")})}function zu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Xt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function oo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new L(r.name,"true"))}function Wu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new L(r.name,"true"))}function Ku(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new L(r.name,"true"))}function Zu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new L(r.name,r.typeNames.join(" | ")))}function so(e,t){let[r,n]=_e(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ao(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new L(r.name,r.typeNames.join(" | ")))}function _e(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function mt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Xt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Yu=3;function Xu(e,t){let r=1/0,n;for(let i of t){let o=(0,ro.default)(e,i);o>Yu||o<r&&(r=o,n=i)}return n}import{isObjectEnumValue as ec}from"@prisma/client-runtime-utils";var ft=class{modelName;name;typeName;isList;isEnum;constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function $e(e){return e instanceof ft}var lo=": ",er=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+lo.length}write(t){let r=new G(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(lo).write(this.value)}};var nn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(`
`)}};function Le(e){return new nn(uo(e))}function uo(e){let t=new Fe;for(let[r,n]of Object.entries(e)){let i=new er(r,co(n));t.addField(i)}return t}function co(e){if(typeof e=="string")return new k(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new k(String(e));if(typeof e=="bigint")return new k(`${e}n`);if(e===null)return new k("null");if(e===void 0)return new k("undefined");if(Ie(e))return new k(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?