@prisma/client 6.19.1-dev.3 → 6.19.1-dev.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.
- package/generator-build/index.js +2 -2
- package/package.json +27 -27
- package/runtime/binary.js +2 -2
- package/runtime/binary.js.map +1 -1
- package/runtime/binary.mjs +2 -2
- package/runtime/binary.mjs.map +1 -1
- package/runtime/client.js +2 -2
- package/runtime/client.js.map +1 -1
- package/runtime/client.mjs +2 -2
- package/runtime/client.mjs.map +1 -1
- package/runtime/edge-esm.js +2 -2
- package/runtime/edge-esm.js.map +3 -3
- package/runtime/edge.js +2 -2
- package/runtime/edge.js.map +3 -3
- package/runtime/library.js +2 -2
- package/runtime/library.js.map +1 -1
- package/runtime/library.mjs +2 -2
- package/runtime/library.mjs.map +1 -1
- package/runtime/react-native.js +2 -2
- package/runtime/react-native.js.map +3 -3
- package/runtime/wasm-compiler-edge.js +2 -2
- package/runtime/wasm-compiler-edge.js.map +2 -2
- package/runtime/wasm-compiler-edge.mjs +2 -2
- package/runtime/wasm-compiler-edge.mjs.map +2 -2
- package/runtime/wasm-engine-edge.js +2 -2
- package/runtime/wasm-engine-edge.js.map +2 -2
- package/runtime/wasm-engine-edge.mjs +2 -2
- package/runtime/wasm-engine-edge.mjs.map +2 -2
- package/scripts/default-index.js +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Ds=Object.create;var jr=Object.defineProperty;var Os=Object.getOwnPropertyDescriptor;var ks=Object.getOwnPropertyNames;var _s=Object.getPrototypeOf,Ms=Object.prototype.hasOwnProperty;var ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var dt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),er=(t,e)=>{for(var r in e)jr(t,r,{get:e[r],enumerable:!0})},Ls=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ks(e))!Ms.call(t,i)&&i!==r&&jr(t,i,{get:()=>e[i],enumerable:!(n=Os(e,i))||n.enumerable});return t};var ft=(t,e,r)=>(r=t!=null?Ds(_s(t)):{},Ls(e||!t||!t.__esModule?jr(r,"default",{value:t,enumerable:!0}):r,t));function Qr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(qs.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.length*2),n=new DataView(r.buffer);for(let i=0;i<t.length;i++)n.setUint16(i*2,t.charCodeAt(i),!0);return r}if(e==="hex"){let r=new y(t.length/2);for(let n=0,i=0;i<t.length;i+=2,n++)r[n]=parseInt(t.slice(i,i+2),16);return r}Jn(`encoding "${e}"`)}function Fs(t){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(v=0){return G(v,"offset"),re(v,"offset"),K(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,R=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),I=Us[A];return G(R,"offset"),re(R,"offset"),K(R,"offset",this.length-1),Ns(v,"value",I[0],I[1]),new DataView(this.buffer)[r[a]](R,v,f),R+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Jn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function tr(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function K(t,e,r=$s+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function G(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function re(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Ns(t,e,r,n){if(t<r||t>n){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Gn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function js(t,e="utf8"){return y.from(t,e)}var y,Us,qs,Vs,Bs,$s,h,Gr,u=ae(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return Gn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Qr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return Bs.includes(e)}static compare(e,r){tr(e,"buff1"),tr(r,"buff2");for(let n=0;n<e.length;n++){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Qr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return n.getUint8(0)&128&&(i-=Math.pow(256,r)),i}readIntLE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return n.getUint8(r-1)&128&&(i-=Math.pow(256,r)),i}readUIntBE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return i}readUintBE(e,r){return this.readUIntBE(e,r)}readUIntLE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return i}readUintLE(e,r){return this.readUIntLE(e,r)}writeIntBE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntBE(e,r,n)}writeIntLE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntLE(e,r,n)}writeUIntBE(e,r,n){G(r,"offset"),re(r,"offset"),K(r,"offset",this.length-1),G(n,"byteLength"),re(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=n-1;o>=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){G(r,"offset"),re(r,"offset"),K(r,"offset",this.length-1),G(n,"byteLength"),re(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;o<n;o++)i.setUint8(o,e&255),e=e/256;return r+n}writeUintLE(e,r,n){return this.writeUIntLE(e,r,n)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=2)e.setUint16(r,e.getUint16(r,!0),!1);return this}swap32(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=4)e.setUint32(r,e.getUint32(r,!0),!1);return this}swap64(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=8)e.setBigUint64(r,e.getBigUint64(r,!0),!1);return this}compare(e,r=0,n=e.length,i=0,o=this.length){return tr(e,"target"),G(r,"targetStart"),G(n,"targetEnd"),G(i,"sourceStart"),G(o,"sourceEnd"),K(r,"targetStart"),K(n,"targetEnd",e.length),K(i,"sourceStart"),K(o,"sourceEnd",this.length),t.compare(this.slice(i,o),e.slice(r,n))}equals(e){return tr(e,"otherBuffer"),this.length===e.length&&this.every((r,n)=>r===e[n])}copy(e,r=0,n=0,i=this.length){K(r,"targetStart"),K(n,"sourceStart",this.length),K(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n<i&&!(this[n]===void 0||e[r]===void 0);)e[r]=this[n],o++,n++,r++;return o}write(e,r,n,i="utf8"){let o=typeof r=="string"?0:r??0,s=typeof n=="string"?this.length-o:n??this.length-o;return i=typeof r=="string"?r:typeof n=="string"?n:i,G(o,"offset"),G(s,"length"),K(o,"offset",this.length),K(s,"length",this.length),(i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")&&(s=s-s%2),Qr(e,i).copy(this,o,0,s)}fill(e=0,r=0,n=this.length,i="utf-8"){let o=typeof r=="string"?0:r,s=typeof n=="string"?this.length:n;if(i=typeof r=="string"?r:typeof n=="string"?n:i,e=t.from(typeof e=="number"?[e]:e??[],i),Gn(i,"encoding"),K(o,"offset",this.length),K(s,"end",this.length),e.length!==0)for(let a=o;a<s;a+=e.length)super.set(e.slice(0,e.length+a>=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,v)=>(i?v<=a:v>=a)&&this[v]===s[0]&&s.every((A,I)=>this[v+I]===A))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return Vs.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Gr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Gr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1<i.byteLength?Gr(i.getUint16(s*2,!0)):"").join("")}if(e==="hex")return this.slice(r,n).reduce((i,o)=>i+o.toString(16).padStart(2,"0"),"");Jn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};Us={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},qs=new TextEncoder,Vs=new TextDecoder,Bs=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],$s=4294967295;Fs(y.prototype);h=new Proxy(js,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Gr=String.fromCodePoint});var g,w,c=ae(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:w}=g});var x,p=ae(()=>{"use strict";x=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,m=ae(()=>{"use strict";E=()=>{};E.prototype=E});var b,d=ae(()=>{"use strict";b=class{value;constructor(e){this.value=e}deref(){return this.value}}});function zn(t,e){var r,n,i,o,s,a,f,v,R=t.constructor,A=R.precision;if(!t.s||!e.s)return e.s||(e=new R(t)),$?N(e,A):e;if(f=t.d,v=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(A/B),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/H|0,f[o]%=H;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,$?N(e,A):e}function de(t,e,r){if(t!==~~t||t<e||t>r)throw Error(_e+t)}function me(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)n=t[e]+"",r=B-n.length,r&&(o+=ve(r)),o+=n;s=t[e],n=s+"",r=B-n.length,r&&(o+=ve(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function Yn(t,e){var r,n,i,o,s,a,f=0,v=0,R=t.constructor,A=R.precision;if(J(t)>16)throw Error(Wr+J(t));if(!t.s)return new R(ie);for(e==null?($=!1,a=A):a=e,s=new R(.03125);t.abs().gte(.1);)t=t.times(s),v+=5;for(n=Math.log(ke(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new R(ie),R.precision=a;;){if(i=N(i.times(t),a),r=r.times(++f),s=o.plus(we(i,r,a)),me(s.d).slice(0,a)===me(o.d).slice(0,a)){for(;v--;)o=N(o.times(o),a);return R.precision=A,e==null?($=!0,N(o,A)):o}o=s}}function J(t){for(var e=t.e*B,r=t.d[0];r>=10;r/=10)e++;return e}function Jr(t,e,r){if(e>t.LN10.sd())throw $=!0,r&&(t.precision=r),Error(le+"LN10 precision limit exceeded");return N(new t(t.LN10),e)}function ve(t){for(var e="";t--;)e+="0";return e}function gt(t,e){var r,n,i,o,s,a,f,v,R,A=1,I=10,C=t,M=C.d,D=C.constructor,k=D.precision;if(C.s<1)throw Error(le+(C.s?"NaN":"-Infinity"));if(C.eq(ie))return new D(0);if(e==null?($=!1,v=k):v=e,C.eq(10))return e==null&&($=!0),Jr(D,v);if(v+=I,D.precision=v,r=me(M),n=r.charAt(0),o=J(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(t),r=me(C.d),n=r.charAt(0),A++;o=J(C),n>1?(C=new D("0."+r),o++):C=new D(n+"."+r.slice(1))}else return f=Jr(D,v+2,k).times(o+""),C=gt(new D(n+"."+r.slice(1)),v-I).plus(f),D.precision=k,e==null?($=!0,N(C,k)):C;for(a=s=C=we(C.minus(ie),C.plus(ie),v),R=N(C.times(C),v),i=3;;){if(s=N(s.times(R),v),f=a.plus(we(s,new D(i),v)),me(f.d).slice(0,v)===me(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(Jr(D,v+2,k).times(o+""))),a=we(a,new D(A),v),D.precision=k,e==null?($=!0,N(a,k)):a;a=f,i+=2}}function Wn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Qe(r/B),t.d=[],n=(r+1)%B,r<0&&(n+=B),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=B;n<i;)t.d.push(+e.slice(n,n+=B));e=e.slice(n),n=B-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),$&&(t.e>rr||t.e<-rr))throw Error(Wr+r)}else t.s=0,t.e=0,t.d=[0];return t}function N(t,e,r){var n,i,o,s,a,f,v,R,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=B,i=e,v=A[R=0];else{if(R=Math.ceil((n+1)/B),o=A.length,R>=o)return t;for(v=o=A[R],s=1;o>=10;o/=10)s++;n%=B,i=n-B+s}if(r!==void 0&&(o=ke(10,s-i-1),a=v/o%10|0,f=e<0||A[R+1]!==void 0||v%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?v/ke(10,s-i):0:A[R-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=J(t),A.length=1,e=e-o-1,A[0]=ke(10,(B-e%B)%B),t.e=Qe(-e/B)||0):(A.length=1,A[0]=t.e=t.s=0),t;if(n==0?(A.length=R,o=1,R--):(A.length=R+1,o=ke(10,B-n),A[R]=i>0?(v/ke(10,s-i)%ke(10,i)|0)*o:0),f)for(;;)if(R==0){(A[0]+=o)==H&&(A[0]=1,++t.e);break}else{if(A[R]+=o,A[R]!=H)break;A[R--]=0,o=1}for(n=A.length;A[--n]===0;)A.pop();if($&&(t.e>rr||t.e<-rr))throw Error(Wr+J(t));return t}function Xn(t,e){var r,n,i,o,s,a,f,v,R,A,I=t.constructor,C=I.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new I(t),$?N(e,C):e;if(f=t.d,A=e.d,n=e.e,v=t.e,f=f.slice(),s=v-n,s){for(R=s<0,R?(r=f,s=-s,a=A.length):(r=A,n=v,a=f.length),i=Math.max(Math.ceil(C/B),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=A.length,R=i<a,R&&(a=i),i=0;i<a;i++)if(f[i]!=A[i]){R=f[i]<A[i];break}s=0}for(R&&(r=f,f=A,A=r,e.s=-e.s),a=f.length,i=A.length-a;i>0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]<A[i]){for(o=i;o&&f[--o]===0;)f[o]=H-1;--f[o],f[i]+=H}f[i]-=A[i]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(e.d=f,e.e=n,$?N(e,C):e):new I(0)}function Me(t,e,r){var n,i=J(t),o=me(t.d),s=o.length;return e?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ve(-i-1)+o,r&&(n=r-s)>0&&(o+=ve(n))):i>=s?(o+=ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ve(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=ve(n))),t.s<0?"-"+o:o}function Kn(t,e){if(t.length>e)return t.length=e,!0}function Zn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(_e+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Wn(s,o.toString())}else if(typeof o!="string")throw Error(_e+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Gs.test(o))Wn(s,o);else throw Error(_e+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Zn,i.config=i.set=Js,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function Js(t){if(!t||typeof t!="object")throw Error(le+"Object expected");var e,r,n,i=["precision",1,je,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(Qe(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(_e+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(_e+r+": "+n);return this}var je,Qs,Kr,$,le,_e,Wr,Qe,ke,Gs,ie,H,B,Hn,rr,S,we,Kr,nr,ei=ae(()=>{"use strict";u();c();p();m();d();l();je=1e9,Qs={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},$=!0,le="[DecimalError] ",_e=le+"Invalid argument: ",Wr=le+"Exponent out of range: ",Qe=Math.floor,ke=Math.pow,Gs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,H=1e7,B=7,Hn=9007199254740991,rr=Qe(Hn/B),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*B;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return we(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return N(we(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return J(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(ie))throw Error(le+"NaN");if(r.s<1)throw Error(le+(r.s?"NaN":"-Infinity"));return r.eq(ie)?new n(0):($=!1,e=we(gt(r,o),gt(t,o),o),$=!0,N(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Xn(e,t):zn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(le+"NaN");return r.s?($=!1,e=we(r,t,0,1).times(t),$=!0,r.minus(e)):N(new n(r),i)};S.naturalExponential=S.exp=function(){return Yn(this)};S.naturalLogarithm=S.ln=function(){return gt(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?zn(e,t):Xn(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(_e+t);if(e=J(i)+1,n=i.d.length-1,r=n*B+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(le+"NaN")}for(t=J(a),$=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=me(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Qe((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(we(a,o,s+2)).times(.5),me(o.d).slice(0,s)===(e=me(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(N(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return $=!0,N(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,v,R=this,A=R.constructor,I=R.d,C=(t=new A(t)).d;if(!R.s||!t.s)return new A(0);for(t.s*=R.s,r=R.e+t.e,f=I.length,v=C.length,f<v&&(o=I,I=C,C=o,s=f,f=v,v=s),o=[],s=f+v,n=s;n--;)o.push(0);for(n=v;--n>=0;){for(e=0,i=f+n;i>n;)a=o[i]+C[n]*I[i-n-1]+e,o[i--]=a%H|0,e=a/H|0;o[i]=(o[i]+e)%H|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,$?N(t,A.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(de(t,0,je),e===void 0?e=n.rounding:de(e,0,8),N(r,t+J(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Me(n,!0):(de(t,0,je),e===void 0?e=i.rounding:de(e,0,8),n=N(new i(n),t+1,e),r=Me(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Me(i):(de(t,0,je),e===void 0?e=o.rounding:de(e,0,8),n=N(new o(i),t+J(i)+1,e),r=Me(n.abs(),!1,t+J(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return N(new e(t),J(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,v=12,R=+(t=new f(t));if(!t.s)return new f(ie);if(a=new f(a),!a.s){if(t.s<1)throw Error(le+"Infinity");return a}if(a.eq(ie))return a;if(n=f.precision,t.eq(ie))return N(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=R<0?-R:R)<=Hn){for(i=new f(ie),e=Math.ceil(n/B+4),$=!1;r%2&&(i=i.times(a),Kn(i.d,e)),r=Qe(r/2),r!==0;)a=a.times(a),Kn(a.d,e);return $=!0,t.s<0?new f(ie).div(i):N(i,n)}}else if(o<0)throw Error(le+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,$=!1,i=t.times(gt(a,n+v)),$=!0,i=Yn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=J(i),n=Me(i,r<=o.toExpNeg||r>=o.toExpPos)):(de(t,1,je),e===void 0?e=o.rounding:de(e,0,8),i=N(new o(i),t,e),r=J(i),n=Me(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(de(t,1,je),e===void 0?e=n.rounding:de(e,0,8)),N(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=J(t),r=t.constructor;return Me(t,e<=r.toExpNeg||e>=r.toExpPos)};we=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%H|0,s=o/H|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;a<o;a++)if(n[a]!=i[a]){f=n[a]>i[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*H+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,f,v,R,A,I,C,M,D,k,Ee,ee,U,te,Oe,$r,ue,Xt,Zt=n.constructor,Is=n.s==i.s?1:-1,pe=n.d,Q=i.d;if(!n.s)return new Zt(n);if(!i.s)throw Error(le+"Division by zero");for(f=n.e-i.e,ue=Q.length,Oe=pe.length,C=new Zt(Is),M=C.d=[],v=0;Q[v]==(pe[v]||0);)++v;if(Q[v]>(pe[v]||0)&&--f,o==null?ee=o=Zt.precision:s?ee=o+(J(n)-J(i))+1:ee=o,ee<0)return new Zt(0);if(ee=ee/B+2|0,v=0,ue==1)for(R=0,Q=Q[0],ee++;(v<Oe||R)&&ee--;v++)U=R*H+(pe[v]||0),M[v]=U/Q|0,R=U%Q|0;else{for(R=H/(Q[0]+1)|0,R>1&&(Q=t(Q,R),pe=t(pe,R),ue=Q.length,Oe=pe.length),te=ue,D=pe.slice(0,ue),k=D.length;k<ue;)D[k++]=0;Xt=Q.slice(),Xt.unshift(0),$r=Q[0],Q[1]>=H/2&&++$r;do R=0,a=e(Q,D,ue,k),a<0?(Ee=D[0],ue!=k&&(Ee=Ee*H+(D[1]||0)),R=Ee/$r|0,R>1?(R>=H&&(R=H-1),A=t(Q,R),I=A.length,k=D.length,a=e(A,D,I,k),a==1&&(R--,r(A,ue<I?Xt:Q,I))):(R==0&&(a=R=1),A=Q.slice()),I=A.length,I<k&&A.unshift(0),r(D,A,k),a==-1&&(k=D.length,a=e(Q,D,ue,k),a<1&&(R++,r(D,ue<k?Xt:Q,k))),k=D.length):a===0&&(R++,D=[0]),M[v++]=R,a&&D[0]?D[k++]=pe[te]||0:(D=[pe[te]],k=1);while((te++<Oe||D[0]!==void 0)&&ee--)}return M[0]||M.shift(),C.e=f,N(C,s?o+J(C)+1:o)}}();Kr=Zn(Qs);ie=new Kr(1);nr=Kr});var P,Re,l=ae(()=>{"use strict";ei();P=class extends nr{static isDecimal(e){return e instanceof nr}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new nr(`0.${n.slice(0,e)}`)}}},Re=P});function Xs(){return!1}function Yr(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Zs(){return Yr()}function ea(){return[]}function ta(t){t(null,[])}function ra(){return""}function na(){return""}function ia(){}function oa(){}function sa(){}function aa(){}function la(){}function ua(){}function ca(){}function pa(){}function ma(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function da(t,e){e(null,Yr())}var fa,ga,Ei,wi=ae(()=>{"use strict";u();c();p();m();d();l();fa={},ga={existsSync:Xs,lstatSync:Yr,stat:da,statSync:Zs,readdirSync:ea,readdir:ta,readlinkSync:ra,realpathSync:na,chmodSync:ia,renameSync:oa,mkdirSync:sa,rmdirSync:aa,rmSync:la,unlinkSync:ua,watchFile:ca,unwatchFile:pa,watch:ma,promises:fa},Ei=ga});var xi=dt((Hp,ya)=>{ya.exports={name:"@prisma/internals",version:"6.19.1-dev.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":"18.19.76","@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":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function ba(...t){return t.join("/")}function Ea(...t){return t.join("/")}function wa(t){let e=Pi(t),r=Ti(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Pi(t){let e=t.split("/");return e[e.length-1]}function Ti(t){return t.split("/").slice(0,-1).join("/")}function Pa(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var vi,xa,Ta,va,ar,Ri=ae(()=>{"use strict";u();c();p();m();d();l();vi="/",xa=":";Ta={sep:vi},va={basename:Pi,delimiter:xa,dirname:Ti,join:Ea,normalize:Pa,parse:wa,posix:Ta,resolve:ba,sep:vi},ar=va});var rn=dt((ad,Ia)=>{Ia.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},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 Ci=dt(cr=>{"use strict";u();c();p();m();d();l();Object.defineProperty(cr,"__esModule",{value:!0});cr.enginesVersion=void 0;cr.enginesVersion=rn().prisma.enginesVersion});var Di=dt((Pd,Ii)=>{"use strict";u();c();p();m();d();l();Ii.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var pn=dt((Xh,Li)=>{"use strict";u();c();p();m();d();l();Li.exports=function(){function t(e,r,n,i,o){return e<r||n<r?e>n?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&e.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,f,v,R,A,I,C,M,D,k,Ee,ee,U,te=[];for(f=0;f<i;f++)te.push(f+1),te.push(e.charCodeAt(s+f));for(var Oe=te.length-1;a<o-3;)for(k=r.charCodeAt(s+(v=a)),Ee=r.charCodeAt(s+(R=a+1)),ee=r.charCodeAt(s+(A=a+2)),U=r.charCodeAt(s+(I=a+3)),C=a+=4,f=0;f<Oe;f+=2)M=te[f],D=te[f+1],v=t(M,v,R,k,D),R=t(v,R,A,Ee,D),A=t(R,A,I,ee,D),C=t(A,I,C,U,D),te[f]=C,I=A,A=R,R=v,v=M;for(;a<o;)for(k=r.charCodeAt(s+(v=a)),C=++a,f=0;f<Oe;f+=2)M=te[f],te[f]=C=t(M,v,C,k,te[f+1]),v=M;return C}}()});var Vi=ae(()=>{"use strict";u();c();p();m();d();l()});var Bi=ae(()=>{"use strict";u();c();p();m();d();l()});var kr,lo=ae(()=>{"use strict";u();c();p();m();d();l();kr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});u();c();p();m();d();l();var ni={};er(ni,{defineExtension:()=>ti,getExtensionContext:()=>ri});u();c();p();m();d();l();u();c();p();m();d();l();function ti(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();p();m();d();l();function ri(t){return t}var oi={};er(oi,{validator:()=>ii});u();c();p();m();d();l();u();c();p();m();d();l();function ii(...t){return e=>e}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Hr,si,ai,li,ui=!0;typeof g<"u"&&({FORCE_COLOR:Hr,NODE_DISABLE_COLORS:si,NO_COLOR:ai,TERM:li}=g.env||{},ui=g.stdout&&g.stdout.isTTY);var Ws={enabled:!si&&ai==null&&li!=="dumb"&&(Hr!=null&&Hr!=="0"||ui)};function q(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!Ws.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jc=q(0,0),ir=q(1,22),or=q(2,22),Wc=q(3,23),ci=q(4,24),Kc=q(7,27),Hc=q(8,28),zc=q(9,29),Yc=q(30,39),Ge=q(31,39),pi=q(32,39),mi=q(33,39),di=q(34,39),Xc=q(35,39),fi=q(36,39),Zc=q(37,39),gi=q(90,39),ep=q(90,39),tp=q(40,49),rp=q(41,49),np=q(42,49),ip=q(43,49),op=q(44,49),sp=q(45,49),ap=q(46,49),lp=q(47,49);u();c();p();m();d();l();var Ks=100,yi=["green","yellow","blue","magenta","cyan","red"],sr=[],hi=Date.now(),Hs=0,zr=typeof g<"u"?g.env:{};globalThis.DEBUG??=zr.DEBUG??"";globalThis.DEBUG_COLORS??=zr.DEBUG_COLORS?zr.DEBUG_COLORS==="true":!0;var yt={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function zs(t){let e={color:yi[Hs++%yi.length],enabled:yt.enabled(t),namespace:t,log:yt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&sr.push([o,...n]),sr.length>Ks&&sr.shift(),yt.enabled(o)||i){let f=n.map(R=>typeof R=="string"?R:Ys(R)),v=`+${Date.now()-hi}ms`;hi=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var j=new Proxy(zs,{get:(t,e)=>yt[e],set:(t,e,r)=>yt[e]=r});function Ys(t,e=2){let r=new Set;return JSON.stringify(t,(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},e)}function bi(){sr.length=0}u();c();p();m();d();l();u();c();p();m();d();l();var Xr=["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"];u();c();p();m();d();l();var ha=xi(),Zr=ha.version;u();c();p();m();d();l();function Je(t){let e=Ra();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Aa())}function Ra(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Aa(){return"library"}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();function en(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();p();m();d();l();function lr(t){return{ok:!0,value:t,map(e){return lr(e(t))},flatMap(e){return e(t)}}}function Le(t){return{ok:!1,error:t,map(){return Le(t)},flatMap(){return Le(t)}}}var Ai=j("driver-adapter-utils"),tn=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var ur=(t,e=new tn)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:xe(e,t.queryRaw.bind(t)),executeRaw:xe(e,t.executeRaw.bind(t)),executeScript:xe(e,t.executeScript.bind(t)),dispose:xe(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await xe(e,t.startTransaction.bind(t))(...n)).map(o=>Ca(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=Sa(e,t.getConnectionInfo.bind(t))),r},Ca=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:xe(t,e.queryRaw.bind(e)),executeRaw:xe(t,e.executeRaw.bind(e)),commit:xe(t,e.commit.bind(e)),rollback:xe(t,e.rollback.bind(e))});function xe(t,e){return async(...r)=>{try{return lr(await e(...r))}catch(n){if(Ai("[error@wrapAsync]",n),en(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}function Sa(t,e){return(...r)=>{try{return lr(e(...r))}catch(n){if(Ai("[error@wrapSync]",n),en(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}u();c();p();m();d();l();var Si="prisma+postgres",pr=`${Si}:`;function mr(t){return t?.toString().startsWith(`${pr}//`)??!1}function nn(t){if(!mr(t))return!1;let{host:e}=new URL(t);return e.includes("localhost")||e.includes("127.0.0.1")||e.includes("[::1]")}var bt={};er(bt,{error:()=>ka,info:()=>Oa,log:()=>Da,query:()=>_a,should:()=>Oi,tags:()=>ht,warn:()=>on});u();c();p();m();d();l();var ht={error:Ge("prisma:error"),warn:mi("prisma:warn"),info:fi("prisma:info"),query:di("prisma:query")},Oi={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Da(...t){console.log(...t)}function on(t,...e){Oi.warn()&&console.warn(`${ht.warn} ${t}`,...e)}function Oa(t,...e){console.info(`${ht.info} ${t}`,...e)}function ka(t,...e){console.error(`${ht.error} ${t}`,...e)}function _a(t,...e){console.log(`${ht.query} ${t}`,...e)}u();c();p();m();d();l();function dr(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();p();m();d();l();function Fe(t,e){throw new Error(e)}u();c();p();m();d();l();u();c();p();m();d();l();function sn({onlyFirst:t=!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,t?void 0:"g")}var Ma=sn();function an(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Ma,"")}u();c();p();m();d();l();function ln(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();p();m();d();l();function fr(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();p();m();d();l();function un(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n<t.length;n++)e(r,t[n])<0&&(r=t[n]);return r}u();c();p();m();d();l();function O(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();p();m();d();l();var ki=new Set,gr=(t,e,...r)=>{ki.has(t)||(ki.add(t),on(e,...r))};var L=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};O(L,"PrismaClientInitializationError");u();c();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};O(X,"PrismaClientKnownRequestError");u();c();p();m();d();l();var Ae=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};O(Ae,"PrismaClientRustPanicError");u();c();p();m();d();l();var W=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};O(W,"PrismaClientUnknownRequestError");u();c();p();m();d();l();var Y=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};O(Y,"PrismaClientValidationError");u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var fe=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();p();m();d();l();function Ce(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();p();m();d();l();function Mi(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();p();m();d();l();function Et(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();p();m();d();l();function La(t){return{models:cn(t.models),enums:cn(t.enums),types:cn(t.types)}}function cn(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();p();m();d();l();function We(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function yr(t){return t.toString()!=="Invalid Date"}u();c();p();m();d();l();l();function Ke(t){return P.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();p();m();d();l();u();c();p();m();d();l();var hr={};er(hr,{ModelAction:()=>wt,datamodelEnumToSchemaEnum:()=>Fa});u();c();p();m();d();l();u();c();p();m();d();l();function Fa(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();p();m();d();l();var wt=(U=>(U.findUnique="findUnique",U.findUniqueOrThrow="findUniqueOrThrow",U.findFirst="findFirst",U.findFirstOrThrow="findFirstOrThrow",U.findMany="findMany",U.create="create",U.createMany="createMany",U.createManyAndReturn="createManyAndReturn",U.update="update",U.updateMany="updateMany",U.updateManyAndReturn="updateManyAndReturn",U.upsert="upsert",U.delete="delete",U.deleteMany="deleteMany",U.groupBy="groupBy",U.count="count",U.aggregate="aggregate",U.findRaw="findRaw",U.aggregateRaw="aggregateRaw",U))(wt||{});var Na=ft(Di());var Ua={red:Ge,gray:gi,dim:or,bold:ir,underline:ci,highlightSource:t=>t.highlight()},qa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function Va({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function Ba({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" 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(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline($a(e))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
|
|
1
|
+
var Ds=Object.create;var jr=Object.defineProperty;var Os=Object.getOwnPropertyDescriptor;var ks=Object.getOwnPropertyNames;var _s=Object.getPrototypeOf,Ms=Object.prototype.hasOwnProperty;var ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var dt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),er=(t,e)=>{for(var r in e)jr(t,r,{get:e[r],enumerable:!0})},Ls=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ks(e))!Ms.call(t,i)&&i!==r&&jr(t,i,{get:()=>e[i],enumerable:!(n=Os(e,i))||n.enumerable});return t};var ft=(t,e,r)=>(r=t!=null?Ds(_s(t)):{},Ls(e||!t||!t.__esModule?jr(r,"default",{value:t,enumerable:!0}):r,t));function Qr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(qs.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.length*2),n=new DataView(r.buffer);for(let i=0;i<t.length;i++)n.setUint16(i*2,t.charCodeAt(i),!0);return r}if(e==="hex"){let r=new y(t.length/2);for(let n=0,i=0;i<t.length;i+=2,n++)r[n]=parseInt(t.slice(i,i+2),16);return r}Jn(`encoding "${e}"`)}function Fs(t){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(v=0){return G(v,"offset"),re(v,"offset"),K(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,R=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),I=Us[A];return G(R,"offset"),re(R,"offset"),K(R,"offset",this.length-1),Ns(v,"value",I[0],I[1]),new DataView(this.buffer)[r[a]](R,v,f),R+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Jn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function tr(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function K(t,e,r=$s+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function G(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function re(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Ns(t,e,r,n){if(t<r||t>n){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Gn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function js(t,e="utf8"){return y.from(t,e)}var y,Us,qs,Vs,Bs,$s,h,Gr,u=ae(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return Gn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Qr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return Bs.includes(e)}static compare(e,r){tr(e,"buff1"),tr(r,"buff2");for(let n=0;n<e.length;n++){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Qr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return n.getUint8(0)&128&&(i-=Math.pow(256,r)),i}readIntLE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return n.getUint8(r-1)&128&&(i-=Math.pow(256,r)),i}readUIntBE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return i}readUintBE(e,r){return this.readUIntBE(e,r)}readUIntLE(e,r){G(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),G(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return i}readUintLE(e,r){return this.readUIntLE(e,r)}writeIntBE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntBE(e,r,n)}writeIntLE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntLE(e,r,n)}writeUIntBE(e,r,n){G(r,"offset"),re(r,"offset"),K(r,"offset",this.length-1),G(n,"byteLength"),re(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=n-1;o>=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){G(r,"offset"),re(r,"offset"),K(r,"offset",this.length-1),G(n,"byteLength"),re(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;o<n;o++)i.setUint8(o,e&255),e=e/256;return r+n}writeUintLE(e,r,n){return this.writeUIntLE(e,r,n)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=2)e.setUint16(r,e.getUint16(r,!0),!1);return this}swap32(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=4)e.setUint32(r,e.getUint32(r,!0),!1);return this}swap64(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=8)e.setBigUint64(r,e.getBigUint64(r,!0),!1);return this}compare(e,r=0,n=e.length,i=0,o=this.length){return tr(e,"target"),G(r,"targetStart"),G(n,"targetEnd"),G(i,"sourceStart"),G(o,"sourceEnd"),K(r,"targetStart"),K(n,"targetEnd",e.length),K(i,"sourceStart"),K(o,"sourceEnd",this.length),t.compare(this.slice(i,o),e.slice(r,n))}equals(e){return tr(e,"otherBuffer"),this.length===e.length&&this.every((r,n)=>r===e[n])}copy(e,r=0,n=0,i=this.length){K(r,"targetStart"),K(n,"sourceStart",this.length),K(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n<i&&!(this[n]===void 0||e[r]===void 0);)e[r]=this[n],o++,n++,r++;return o}write(e,r,n,i="utf8"){let o=typeof r=="string"?0:r??0,s=typeof n=="string"?this.length-o:n??this.length-o;return i=typeof r=="string"?r:typeof n=="string"?n:i,G(o,"offset"),G(s,"length"),K(o,"offset",this.length),K(s,"length",this.length),(i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")&&(s=s-s%2),Qr(e,i).copy(this,o,0,s)}fill(e=0,r=0,n=this.length,i="utf-8"){let o=typeof r=="string"?0:r,s=typeof n=="string"?this.length:n;if(i=typeof r=="string"?r:typeof n=="string"?n:i,e=t.from(typeof e=="number"?[e]:e??[],i),Gn(i,"encoding"),K(o,"offset",this.length),K(s,"end",this.length),e.length!==0)for(let a=o;a<s;a+=e.length)super.set(e.slice(0,e.length+a>=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,v)=>(i?v<=a:v>=a)&&this[v]===s[0]&&s.every((A,I)=>this[v+I]===A))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return Vs.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Gr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Gr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1<i.byteLength?Gr(i.getUint16(s*2,!0)):"").join("")}if(e==="hex")return this.slice(r,n).reduce((i,o)=>i+o.toString(16).padStart(2,"0"),"");Jn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};Us={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},qs=new TextEncoder,Vs=new TextDecoder,Bs=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],$s=4294967295;Fs(y.prototype);h=new Proxy(js,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Gr=String.fromCodePoint});var g,w,c=ae(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:w}=g});var x,p=ae(()=>{"use strict";x=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,m=ae(()=>{"use strict";E=()=>{};E.prototype=E});var b,d=ae(()=>{"use strict";b=class{value;constructor(e){this.value=e}deref(){return this.value}}});function zn(t,e){var r,n,i,o,s,a,f,v,R=t.constructor,A=R.precision;if(!t.s||!e.s)return e.s||(e=new R(t)),$?N(e,A):e;if(f=t.d,v=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(A/B),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/H|0,f[o]%=H;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,$?N(e,A):e}function de(t,e,r){if(t!==~~t||t<e||t>r)throw Error(_e+t)}function me(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)n=t[e]+"",r=B-n.length,r&&(o+=ve(r)),o+=n;s=t[e],n=s+"",r=B-n.length,r&&(o+=ve(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function Yn(t,e){var r,n,i,o,s,a,f=0,v=0,R=t.constructor,A=R.precision;if(J(t)>16)throw Error(Wr+J(t));if(!t.s)return new R(ie);for(e==null?($=!1,a=A):a=e,s=new R(.03125);t.abs().gte(.1);)t=t.times(s),v+=5;for(n=Math.log(ke(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new R(ie),R.precision=a;;){if(i=N(i.times(t),a),r=r.times(++f),s=o.plus(we(i,r,a)),me(s.d).slice(0,a)===me(o.d).slice(0,a)){for(;v--;)o=N(o.times(o),a);return R.precision=A,e==null?($=!0,N(o,A)):o}o=s}}function J(t){for(var e=t.e*B,r=t.d[0];r>=10;r/=10)e++;return e}function Jr(t,e,r){if(e>t.LN10.sd())throw $=!0,r&&(t.precision=r),Error(le+"LN10 precision limit exceeded");return N(new t(t.LN10),e)}function ve(t){for(var e="";t--;)e+="0";return e}function gt(t,e){var r,n,i,o,s,a,f,v,R,A=1,I=10,C=t,M=C.d,D=C.constructor,k=D.precision;if(C.s<1)throw Error(le+(C.s?"NaN":"-Infinity"));if(C.eq(ie))return new D(0);if(e==null?($=!1,v=k):v=e,C.eq(10))return e==null&&($=!0),Jr(D,v);if(v+=I,D.precision=v,r=me(M),n=r.charAt(0),o=J(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(t),r=me(C.d),n=r.charAt(0),A++;o=J(C),n>1?(C=new D("0."+r),o++):C=new D(n+"."+r.slice(1))}else return f=Jr(D,v+2,k).times(o+""),C=gt(new D(n+"."+r.slice(1)),v-I).plus(f),D.precision=k,e==null?($=!0,N(C,k)):C;for(a=s=C=we(C.minus(ie),C.plus(ie),v),R=N(C.times(C),v),i=3;;){if(s=N(s.times(R),v),f=a.plus(we(s,new D(i),v)),me(f.d).slice(0,v)===me(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(Jr(D,v+2,k).times(o+""))),a=we(a,new D(A),v),D.precision=k,e==null?($=!0,N(a,k)):a;a=f,i+=2}}function Wn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Qe(r/B),t.d=[],n=(r+1)%B,r<0&&(n+=B),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=B;n<i;)t.d.push(+e.slice(n,n+=B));e=e.slice(n),n=B-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),$&&(t.e>rr||t.e<-rr))throw Error(Wr+r)}else t.s=0,t.e=0,t.d=[0];return t}function N(t,e,r){var n,i,o,s,a,f,v,R,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=B,i=e,v=A[R=0];else{if(R=Math.ceil((n+1)/B),o=A.length,R>=o)return t;for(v=o=A[R],s=1;o>=10;o/=10)s++;n%=B,i=n-B+s}if(r!==void 0&&(o=ke(10,s-i-1),a=v/o%10|0,f=e<0||A[R+1]!==void 0||v%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?v/ke(10,s-i):0:A[R-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=J(t),A.length=1,e=e-o-1,A[0]=ke(10,(B-e%B)%B),t.e=Qe(-e/B)||0):(A.length=1,A[0]=t.e=t.s=0),t;if(n==0?(A.length=R,o=1,R--):(A.length=R+1,o=ke(10,B-n),A[R]=i>0?(v/ke(10,s-i)%ke(10,i)|0)*o:0),f)for(;;)if(R==0){(A[0]+=o)==H&&(A[0]=1,++t.e);break}else{if(A[R]+=o,A[R]!=H)break;A[R--]=0,o=1}for(n=A.length;A[--n]===0;)A.pop();if($&&(t.e>rr||t.e<-rr))throw Error(Wr+J(t));return t}function Xn(t,e){var r,n,i,o,s,a,f,v,R,A,I=t.constructor,C=I.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new I(t),$?N(e,C):e;if(f=t.d,A=e.d,n=e.e,v=t.e,f=f.slice(),s=v-n,s){for(R=s<0,R?(r=f,s=-s,a=A.length):(r=A,n=v,a=f.length),i=Math.max(Math.ceil(C/B),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=A.length,R=i<a,R&&(a=i),i=0;i<a;i++)if(f[i]!=A[i]){R=f[i]<A[i];break}s=0}for(R&&(r=f,f=A,A=r,e.s=-e.s),a=f.length,i=A.length-a;i>0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]<A[i]){for(o=i;o&&f[--o]===0;)f[o]=H-1;--f[o],f[i]+=H}f[i]-=A[i]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(e.d=f,e.e=n,$?N(e,C):e):new I(0)}function Me(t,e,r){var n,i=J(t),o=me(t.d),s=o.length;return e?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ve(-i-1)+o,r&&(n=r-s)>0&&(o+=ve(n))):i>=s?(o+=ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ve(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=ve(n))),t.s<0?"-"+o:o}function Kn(t,e){if(t.length>e)return t.length=e,!0}function Zn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(_e+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Wn(s,o.toString())}else if(typeof o!="string")throw Error(_e+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Gs.test(o))Wn(s,o);else throw Error(_e+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Zn,i.config=i.set=Js,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function Js(t){if(!t||typeof t!="object")throw Error(le+"Object expected");var e,r,n,i=["precision",1,je,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(Qe(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(_e+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(_e+r+": "+n);return this}var je,Qs,Kr,$,le,_e,Wr,Qe,ke,Gs,ie,H,B,Hn,rr,S,we,Kr,nr,ei=ae(()=>{"use strict";u();c();p();m();d();l();je=1e9,Qs={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},$=!0,le="[DecimalError] ",_e=le+"Invalid argument: ",Wr=le+"Exponent out of range: ",Qe=Math.floor,ke=Math.pow,Gs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,H=1e7,B=7,Hn=9007199254740991,rr=Qe(Hn/B),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*B;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return we(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return N(we(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return J(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(ie))throw Error(le+"NaN");if(r.s<1)throw Error(le+(r.s?"NaN":"-Infinity"));return r.eq(ie)?new n(0):($=!1,e=we(gt(r,o),gt(t,o),o),$=!0,N(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Xn(e,t):zn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(le+"NaN");return r.s?($=!1,e=we(r,t,0,1).times(t),$=!0,r.minus(e)):N(new n(r),i)};S.naturalExponential=S.exp=function(){return Yn(this)};S.naturalLogarithm=S.ln=function(){return gt(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?zn(e,t):Xn(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(_e+t);if(e=J(i)+1,n=i.d.length-1,r=n*B+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(le+"NaN")}for(t=J(a),$=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=me(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Qe((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(we(a,o,s+2)).times(.5),me(o.d).slice(0,s)===(e=me(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(N(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return $=!0,N(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,v,R=this,A=R.constructor,I=R.d,C=(t=new A(t)).d;if(!R.s||!t.s)return new A(0);for(t.s*=R.s,r=R.e+t.e,f=I.length,v=C.length,f<v&&(o=I,I=C,C=o,s=f,f=v,v=s),o=[],s=f+v,n=s;n--;)o.push(0);for(n=v;--n>=0;){for(e=0,i=f+n;i>n;)a=o[i]+C[n]*I[i-n-1]+e,o[i--]=a%H|0,e=a/H|0;o[i]=(o[i]+e)%H|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,$?N(t,A.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(de(t,0,je),e===void 0?e=n.rounding:de(e,0,8),N(r,t+J(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Me(n,!0):(de(t,0,je),e===void 0?e=i.rounding:de(e,0,8),n=N(new i(n),t+1,e),r=Me(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Me(i):(de(t,0,je),e===void 0?e=o.rounding:de(e,0,8),n=N(new o(i),t+J(i)+1,e),r=Me(n.abs(),!1,t+J(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return N(new e(t),J(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,v=12,R=+(t=new f(t));if(!t.s)return new f(ie);if(a=new f(a),!a.s){if(t.s<1)throw Error(le+"Infinity");return a}if(a.eq(ie))return a;if(n=f.precision,t.eq(ie))return N(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=R<0?-R:R)<=Hn){for(i=new f(ie),e=Math.ceil(n/B+4),$=!1;r%2&&(i=i.times(a),Kn(i.d,e)),r=Qe(r/2),r!==0;)a=a.times(a),Kn(a.d,e);return $=!0,t.s<0?new f(ie).div(i):N(i,n)}}else if(o<0)throw Error(le+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,$=!1,i=t.times(gt(a,n+v)),$=!0,i=Yn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=J(i),n=Me(i,r<=o.toExpNeg||r>=o.toExpPos)):(de(t,1,je),e===void 0?e=o.rounding:de(e,0,8),i=N(new o(i),t,e),r=J(i),n=Me(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(de(t,1,je),e===void 0?e=n.rounding:de(e,0,8)),N(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=J(t),r=t.constructor;return Me(t,e<=r.toExpNeg||e>=r.toExpPos)};we=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%H|0,s=o/H|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;a<o;a++)if(n[a]!=i[a]){f=n[a]>i[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*H+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,f,v,R,A,I,C,M,D,k,Ee,ee,U,te,Oe,$r,ue,Xt,Zt=n.constructor,Is=n.s==i.s?1:-1,pe=n.d,Q=i.d;if(!n.s)return new Zt(n);if(!i.s)throw Error(le+"Division by zero");for(f=n.e-i.e,ue=Q.length,Oe=pe.length,C=new Zt(Is),M=C.d=[],v=0;Q[v]==(pe[v]||0);)++v;if(Q[v]>(pe[v]||0)&&--f,o==null?ee=o=Zt.precision:s?ee=o+(J(n)-J(i))+1:ee=o,ee<0)return new Zt(0);if(ee=ee/B+2|0,v=0,ue==1)for(R=0,Q=Q[0],ee++;(v<Oe||R)&&ee--;v++)U=R*H+(pe[v]||0),M[v]=U/Q|0,R=U%Q|0;else{for(R=H/(Q[0]+1)|0,R>1&&(Q=t(Q,R),pe=t(pe,R),ue=Q.length,Oe=pe.length),te=ue,D=pe.slice(0,ue),k=D.length;k<ue;)D[k++]=0;Xt=Q.slice(),Xt.unshift(0),$r=Q[0],Q[1]>=H/2&&++$r;do R=0,a=e(Q,D,ue,k),a<0?(Ee=D[0],ue!=k&&(Ee=Ee*H+(D[1]||0)),R=Ee/$r|0,R>1?(R>=H&&(R=H-1),A=t(Q,R),I=A.length,k=D.length,a=e(A,D,I,k),a==1&&(R--,r(A,ue<I?Xt:Q,I))):(R==0&&(a=R=1),A=Q.slice()),I=A.length,I<k&&A.unshift(0),r(D,A,k),a==-1&&(k=D.length,a=e(Q,D,ue,k),a<1&&(R++,r(D,ue<k?Xt:Q,k))),k=D.length):a===0&&(R++,D=[0]),M[v++]=R,a&&D[0]?D[k++]=pe[te]||0:(D=[pe[te]],k=1);while((te++<Oe||D[0]!==void 0)&&ee--)}return M[0]||M.shift(),C.e=f,N(C,s?o+J(C)+1:o)}}();Kr=Zn(Qs);ie=new Kr(1);nr=Kr});var P,Re,l=ae(()=>{"use strict";ei();P=class extends nr{static isDecimal(e){return e instanceof nr}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new nr(`0.${n.slice(0,e)}`)}}},Re=P});function Xs(){return!1}function Yr(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Zs(){return Yr()}function ea(){return[]}function ta(t){t(null,[])}function ra(){return""}function na(){return""}function ia(){}function oa(){}function sa(){}function aa(){}function la(){}function ua(){}function ca(){}function pa(){}function ma(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function da(t,e){e(null,Yr())}var fa,ga,Ei,wi=ae(()=>{"use strict";u();c();p();m();d();l();fa={},ga={existsSync:Xs,lstatSync:Yr,stat:da,statSync:Zs,readdirSync:ea,readdir:ta,readlinkSync:ra,realpathSync:na,chmodSync:ia,renameSync:oa,mkdirSync:sa,rmdirSync:aa,rmSync:la,unlinkSync:ua,watchFile:ca,unwatchFile:pa,watch:ma,promises:fa},Ei=ga});var xi=dt((Hp,ya)=>{ya.exports={name:"@prisma/internals",version:"6.19.1-dev.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":"18.19.76","@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":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function ba(...t){return t.join("/")}function Ea(...t){return t.join("/")}function wa(t){let e=Pi(t),r=Ti(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Pi(t){let e=t.split("/");return e[e.length-1]}function Ti(t){return t.split("/").slice(0,-1).join("/")}function Pa(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var vi,xa,Ta,va,ar,Ri=ae(()=>{"use strict";u();c();p();m();d();l();vi="/",xa=":";Ta={sep:vi},va={basename:Pi,delimiter:xa,dirname:Ti,join:Ea,normalize:Pa,parse:wa,posix:Ta,resolve:ba,sep:vi},ar=va});var rn=dt((ad,Ia)=>{Ia.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},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 Ci=dt(cr=>{"use strict";u();c();p();m();d();l();Object.defineProperty(cr,"__esModule",{value:!0});cr.enginesVersion=void 0;cr.enginesVersion=rn().prisma.enginesVersion});var Di=dt((Pd,Ii)=>{"use strict";u();c();p();m();d();l();Ii.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var pn=dt((Xh,Li)=>{"use strict";u();c();p();m();d();l();Li.exports=function(){function t(e,r,n,i,o){return e<r||n<r?e>n?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&e.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,f,v,R,A,I,C,M,D,k,Ee,ee,U,te=[];for(f=0;f<i;f++)te.push(f+1),te.push(e.charCodeAt(s+f));for(var Oe=te.length-1;a<o-3;)for(k=r.charCodeAt(s+(v=a)),Ee=r.charCodeAt(s+(R=a+1)),ee=r.charCodeAt(s+(A=a+2)),U=r.charCodeAt(s+(I=a+3)),C=a+=4,f=0;f<Oe;f+=2)M=te[f],D=te[f+1],v=t(M,v,R,k,D),R=t(v,R,A,Ee,D),A=t(R,A,I,ee,D),C=t(A,I,C,U,D),te[f]=C,I=A,A=R,R=v,v=M;for(;a<o;)for(k=r.charCodeAt(s+(v=a)),C=++a,f=0;f<Oe;f+=2)M=te[f],te[f]=C=t(M,v,C,k,te[f+1]),v=M;return C}}()});var Vi=ae(()=>{"use strict";u();c();p();m();d();l()});var Bi=ae(()=>{"use strict";u();c();p();m();d();l()});var kr,lo=ae(()=>{"use strict";u();c();p();m();d();l();kr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});u();c();p();m();d();l();var ni={};er(ni,{defineExtension:()=>ti,getExtensionContext:()=>ri});u();c();p();m();d();l();u();c();p();m();d();l();function ti(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();p();m();d();l();function ri(t){return t}var oi={};er(oi,{validator:()=>ii});u();c();p();m();d();l();u();c();p();m();d();l();function ii(...t){return e=>e}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Hr,si,ai,li,ui=!0;typeof g<"u"&&({FORCE_COLOR:Hr,NODE_DISABLE_COLORS:si,NO_COLOR:ai,TERM:li}=g.env||{},ui=g.stdout&&g.stdout.isTTY);var Ws={enabled:!si&&ai==null&&li!=="dumb"&&(Hr!=null&&Hr!=="0"||ui)};function q(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!Ws.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jc=q(0,0),ir=q(1,22),or=q(2,22),Wc=q(3,23),ci=q(4,24),Kc=q(7,27),Hc=q(8,28),zc=q(9,29),Yc=q(30,39),Ge=q(31,39),pi=q(32,39),mi=q(33,39),di=q(34,39),Xc=q(35,39),fi=q(36,39),Zc=q(37,39),gi=q(90,39),ep=q(90,39),tp=q(40,49),rp=q(41,49),np=q(42,49),ip=q(43,49),op=q(44,49),sp=q(45,49),ap=q(46,49),lp=q(47,49);u();c();p();m();d();l();var Ks=100,yi=["green","yellow","blue","magenta","cyan","red"],sr=[],hi=Date.now(),Hs=0,zr=typeof g<"u"?g.env:{};globalThis.DEBUG??=zr.DEBUG??"";globalThis.DEBUG_COLORS??=zr.DEBUG_COLORS?zr.DEBUG_COLORS==="true":!0;var yt={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function zs(t){let e={color:yi[Hs++%yi.length],enabled:yt.enabled(t),namespace:t,log:yt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&sr.push([o,...n]),sr.length>Ks&&sr.shift(),yt.enabled(o)||i){let f=n.map(R=>typeof R=="string"?R:Ys(R)),v=`+${Date.now()-hi}ms`;hi=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var j=new Proxy(zs,{get:(t,e)=>yt[e],set:(t,e,r)=>yt[e]=r});function Ys(t,e=2){let r=new Set;return JSON.stringify(t,(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},e)}function bi(){sr.length=0}u();c();p();m();d();l();u();c();p();m();d();l();var Xr=["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"];u();c();p();m();d();l();var ha=xi(),Zr=ha.version;u();c();p();m();d();l();function Je(t){let e=Ra();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Aa())}function Ra(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Aa(){return"library"}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();function en(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();p();m();d();l();function lr(t){return{ok:!0,value:t,map(e){return lr(e(t))},flatMap(e){return e(t)}}}function Le(t){return{ok:!1,error:t,map(){return Le(t)},flatMap(){return Le(t)}}}var Ai=j("driver-adapter-utils"),tn=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var ur=(t,e=new tn)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:xe(e,t.queryRaw.bind(t)),executeRaw:xe(e,t.executeRaw.bind(t)),executeScript:xe(e,t.executeScript.bind(t)),dispose:xe(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await xe(e,t.startTransaction.bind(t))(...n)).map(o=>Ca(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=Sa(e,t.getConnectionInfo.bind(t))),r},Ca=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:xe(t,e.queryRaw.bind(e)),executeRaw:xe(t,e.executeRaw.bind(e)),commit:xe(t,e.commit.bind(e)),rollback:xe(t,e.rollback.bind(e))});function xe(t,e){return async(...r)=>{try{return lr(await e(...r))}catch(n){if(Ai("[error@wrapAsync]",n),en(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}function Sa(t,e){return(...r)=>{try{return lr(e(...r))}catch(n){if(Ai("[error@wrapSync]",n),en(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}u();c();p();m();d();l();var Si="prisma+postgres",pr=`${Si}:`;function mr(t){return t?.toString().startsWith(`${pr}//`)??!1}function nn(t){if(!mr(t))return!1;let{host:e}=new URL(t);return e.includes("localhost")||e.includes("127.0.0.1")||e.includes("[::1]")}var bt={};er(bt,{error:()=>ka,info:()=>Oa,log:()=>Da,query:()=>_a,should:()=>Oi,tags:()=>ht,warn:()=>on});u();c();p();m();d();l();var ht={error:Ge("prisma:error"),warn:mi("prisma:warn"),info:fi("prisma:info"),query:di("prisma:query")},Oi={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Da(...t){console.log(...t)}function on(t,...e){Oi.warn()&&console.warn(`${ht.warn} ${t}`,...e)}function Oa(t,...e){console.info(`${ht.info} ${t}`,...e)}function ka(t,...e){console.error(`${ht.error} ${t}`,...e)}function _a(t,...e){console.log(`${ht.query} ${t}`,...e)}u();c();p();m();d();l();function dr(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();p();m();d();l();function Fe(t,e){throw new Error(e)}u();c();p();m();d();l();u();c();p();m();d();l();function sn({onlyFirst:t=!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,t?void 0:"g")}var Ma=sn();function an(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Ma,"")}u();c();p();m();d();l();function ln(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();p();m();d();l();function fr(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();p();m();d();l();function un(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n<t.length;n++)e(r,t[n])<0&&(r=t[n]);return r}u();c();p();m();d();l();function O(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();p();m();d();l();var ki=new Set,gr=(t,e,...r)=>{ki.has(t)||(ki.add(t),on(e,...r))};var L=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};O(L,"PrismaClientInitializationError");u();c();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};O(X,"PrismaClientKnownRequestError");u();c();p();m();d();l();var Ae=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};O(Ae,"PrismaClientRustPanicError");u();c();p();m();d();l();var W=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};O(W,"PrismaClientUnknownRequestError");u();c();p();m();d();l();var Y=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};O(Y,"PrismaClientValidationError");u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var fe=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();p();m();d();l();function Ce(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();p();m();d();l();function Mi(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();p();m();d();l();function Et(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();p();m();d();l();function La(t){return{models:cn(t.models),enums:cn(t.enums),types:cn(t.types)}}function cn(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();p();m();d();l();function We(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function yr(t){return t.toString()!=="Invalid Date"}u();c();p();m();d();l();l();function Ke(t){return P.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();p();m();d();l();u();c();p();m();d();l();var hr={};er(hr,{ModelAction:()=>wt,datamodelEnumToSchemaEnum:()=>Fa});u();c();p();m();d();l();u();c();p();m();d();l();function Fa(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();p();m();d();l();var wt=(U=>(U.findUnique="findUnique",U.findUniqueOrThrow="findUniqueOrThrow",U.findFirst="findFirst",U.findFirstOrThrow="findFirstOrThrow",U.findMany="findMany",U.create="create",U.createMany="createMany",U.createManyAndReturn="createManyAndReturn",U.update="update",U.updateMany="updateMany",U.updateManyAndReturn="updateManyAndReturn",U.upsert="upsert",U.delete="delete",U.deleteMany="deleteMany",U.groupBy="groupBy",U.count="count",U.aggregate="aggregate",U.findRaw="findRaw",U.aggregateRaw="aggregateRaw",U))(wt||{});var Na=ft(Di());var Ua={red:Ge,gray:gi,dim:or,bold:ir,underline:ci,highlightSource:t=>t.highlight()},qa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function Va({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function Ba({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" 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(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline($a(e))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
|
|
2
2
|
`)}function $a(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function br(t){let e=t.showColors?Ua:qa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=Va(t),Ba(r,e)}u();c();p();m();d();l();var ji=ft(pn());u();c();p();m();d();l();function Ui(t,e,r){let n=qi(t),i=ja(n),o=Ga(i);o?Er(o,e,r):e.addErrorMessage(()=>"Unknown error")}function qi(t){return t.errors.flatMap(e=>e.kind==="Union"?qi(e):[e])}function ja(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:Qa(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function Qa(t,e){return[...new Set(t.concat(e))]}function Ga(t){return un(t,(e,r)=>{let n=Fi(e),i=Fi(r);return n!==i?n-i:Ni(e)-Ni(r)})}function Fi(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function Ni(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();p();m();d();l();var oe=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();p();m();d();l();u();c();p();m();d();l();Bi();u();c();p();m();d();l();var He=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,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(e);return this}writeLine(e){return this.write(e).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let e=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,e?.(),this}withIndent(e){return this.indent(),e(this),this.unindent(),this}afterNextNewline(e){return this.afterNextNewLineCallback=e,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
|
|
3
3
|
`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};Vi();u();c();p();m();d();l();u();c();p();m();d();l();var wr=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();p();m();d();l();var xr=t=>t,Pr={bold:xr,red:xr,green:xr,dim:xr,enabled:!1},$i={bold:ir,red:Ge,green:pi,dim:or,enabled:!0},ze={write(t){t.writeLine(",")}};u();c();p();m();d();l();var ge=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();p();m();d();l();var Se=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Ye=class extends Se{items=[];addItem(e){return this.items.push(new wr(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new ge("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(ze,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Xe=class t extends Se{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof Ye&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new ge("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(ze,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();p();m();d();l();var z=class extends Se{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();p();m();d();l();var xt=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(ze,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Er(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":Ja(t,e);break;case"IncludeOnScalar":Wa(t,e);break;case"EmptySelection":Ka(t,e,r);break;case"UnknownSelectionField":Xa(t,e);break;case"InvalidSelectionValue":Za(t,e);break;case"UnknownArgument":el(t,e);break;case"UnknownInputField":tl(t,e);break;case"RequiredArgumentMissing":rl(t,e);break;case"InvalidArgumentType":nl(t,e);break;case"InvalidArgumentValue":il(t,e);break;case"ValueTooLarge":ol(t,e);break;case"SomeFieldsMissing":sl(t,e);break;case"TooManyFieldsGiven":al(t,e);break;case"Union":Ui(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function Ja(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Wa(t,e){let[r,n]=Ze(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new oe(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Pt(s)}`:a+=".",a+=`
|
|
4
4
|
Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ka(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ha(t,e,i);return}if(n.hasField("select")){za(t,e);return}}if(r?.[Ce(t.outputType.name)]){Ya(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function Ha(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new oe(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function za(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ji(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Pt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ya(t,e){let r=new xt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new oe("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=Ze(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Xe;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function Xa(t,e){let r=Wi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ji(n,t.outputType);break;case"include":ll(n,t.outputType);break;case"omit":ul(n,t.outputType);break}}e.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(`\`${t.outputType.name}\``)}.`),i.push(Pt(n)),i.join(" ")})}function Za(t,e){let r=Wi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function el(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),cl(n,t.arguments)),e.addErrorMessage(i=>Qi(i,r,t.arguments.map(o=>o.name)))}function tl(t,e){let[r,n]=Ze(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ki(o,t.inputType)}e.addErrorMessage(o=>Qi(o,n,t.inputType.fields.map(s=>s.name)))}function Qi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=ml(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(Pt(t)),n.join(" ")}function rl(t,e){let r;e.addErrorMessage(f=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=Ze(t.argumentPath),s=new xt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new oe(o,s).makeRequired())}else{let f=t.inputTypes.map(Gi).join(" | ");a.addSuggestion(new oe(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=Ze(t.dependentArgumentPath);e.addErrorMessage(v=>`Argument \`${v.green(o)}\` is required because argument \`${v.green(f)}\` was provided.`)}}}function Gi(t){return t.kind==="list"?`${Gi(t.elementType)}[]`:t.name}function nl(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Tr("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function il(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Tr("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ol(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}e.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 sl(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&Ki(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Tr("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(Pt(i)),o.join(" ")})}function al(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Tr("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function Ji(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new oe(r.name,"true"))}function ll(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new oe(r.name,"true"))}function ul(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new oe(r.name,"true"))}function cl(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new oe(r.name,r.typeNames.join(" | ")))}function Wi(t,e){let[r,n]=Ze(t),i=e.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(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ki(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new oe(r.name,r.typeNames.join(" | ")))}function Ze(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function Pt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Tr(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var pl=3;function ml(t,e){let r=1/0,n;for(let i of e){let o=(0,ji.default)(t,i);o>pl||o<r&&(r=o,n=i)}return n}u();c();p();m();d();l();u();c();p();m();d();l();var Tt=class{modelName;name;typeName;isList;isEnum;constructor(e,r,n,i,o){this.modelName=e,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let e=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${e}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function et(t){return t instanceof Tt}u();c();p();m();d();l();var vr=Symbol(),dn=new WeakMap,Pe=class{constructor(e){e===vr?dn.set(this,`Prisma.${this._getName()}`):dn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return dn.get(this)}},vt=class extends Pe{_getNamespace(){return"NullTypes"}},Rt=class extends vt{#e};gn(Rt,"DbNull");var At=class extends vt{#e};gn(At,"JsonNull");var Ct=class extends vt{#e};gn(Ct,"AnyNull");var fn={classes:{DbNull:Rt,JsonNull:At,AnyNull:Ct},instances:{DbNull:new Rt(vr),JsonNull:new At(vr),AnyNull:new Ct(vr)}};function gn(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();p();m();d();l();var Hi=": ",Rr=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Hi.length}write(e){let r=new ge(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(Hi).write(this.value)}};var yn=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(`
|
|
5
5
|
`)}};function tt(t){return new yn(zi(t))}function zi(t){let e=new Xe;for(let[r,n]of Object.entries(t)){let i=new Rr(r,Yi(n));e.addField(i)}return e}function Yi(t){if(typeof t=="string")return new z(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new z(String(t));if(typeof t=="bigint")return new z(`${t}n`);if(t===null)return new z("null");if(t===void 0)return new z("undefined");if(Ke(t))return new z(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return h.isBuffer(t)?new z(`Buffer.alloc(${t.byteLength})`):new z(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=yr(t)?t.toISOString():"Invalid Date";return new z(`new Date("${e}")`)}return t instanceof Pe?new z(`Prisma.${t._getName()}`):et(t)?new z(`prisma.${Ce(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?dl(t):typeof t=="object"?zi(t):new z(Object.prototype.toString.call(t))}function dl(t){let e=new Ye;for(let r of t)e.addItem(Yi(r));return e}function Ar(t,e){let r=e==="pretty"?$i:Pr,n=t.renderAllMessages(r),i=new He(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Cr({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=tt(t);for(let A of e)Er(A,a,s);let{message:f,args:v}=Ar(a,r),R=br({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:v});throw new Y(R,{clientVersion:o})}u();c();p();m();d();l();u();c();p();m();d();l();function ye(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();p();m();d();l();function Zi(t,e,r){let n=ye(r);return!e.result||!(e.result.$allModels||e.result[n])?t:fl({...t,...Xi(e.name,t,e.result.$allModels),...Xi(e.name,t,e.result[n])})}function fl(t){let e=new fe,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return fr(t,n=>({...n,needs:r(n.name,new Set)}))}function Xi(t,e,r){return r?fr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:gl(e,o,i)})):{}}function gl(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function eo(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function to(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var Sr=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new fe;modelExtensionsCache=new fe;queryCallbacksCache=new fe;clientExtensions=Et(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Et(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Zi(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ye(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},rt=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new Sr(e))}isEmpty(){return this.head===void 0}append(e){return new t(new Sr(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();p();m();d();l();var Ir=class{constructor(e){this.name=e}};function ro(t){return t instanceof Ir}function yl(t){return new Ir(t)}u();c();p();m();d();l();u();c();p();m();d();l();var no=Symbol(),St=class{constructor(e){if(e!==no)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?hn:e}},hn=new St(no);function he(t){return t instanceof St}var hl={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},io="explicitly `undefined` values are not allowed";function En({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=rt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:v,globalOmit:R}){let A=new bn({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:v,globalOmit:R});return{modelName:t,action:hl[e],query:It(r,A)}}function It({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:so(r,n),selection:bl(t,e,i,n)}}function bl(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Pl(t,n)):El(n,e,r)}function El(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&wl(n,e,t),xl(n,r,t),n}function wl(t,e,r){for(let[n,i]of Object.entries(e)){if(he(i))continue;let o=r.nestSelection(n);if(wn(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=It(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=It(i,o)}}function xl(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=to(i,n);for(let[s,a]of Object.entries(o)){if(he(a))continue;wn(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Pl(t,e){let r={},n=e.getComputedFields(),i=eo(t,n);for(let[o,s]of Object.entries(i)){if(he(s))continue;let a=e.nestSelection(o);wn(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||he(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=It({},a):r[o]=!0;continue}r[o]=It(s,a)}}return r}function oo(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(We(t)){if(yr(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ro(t))return{$type:"Param",value:t.name};if(et(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return Tl(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:h.from(r,n,i).toString("base64")}}if(vl(t))return t.values;if(Ke(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Pe){if(t!==fn.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Rl(t))return t.toJSON();if(typeof t=="object")return so(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function so(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);he(i)||(i!==void 0?r[n]=oo(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:io}))}return r}function Tl(t,e){let r=[];for(let n=0;n<t.length;n++){let i=e.nestArgument(String(n)),o=t[n];if(o===void 0||he(o)){let s=o===void 0?"undefined":"Prisma.skip";e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${e.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}r.push(oo(o,i))}return r}function vl(t){return typeof t=="object"&&t!==null&&t.__prismaRawParameters__===!0}function Rl(t){return typeof t=="object"&&t!==null&&typeof t.toJSON=="function"}function wn(t,e){t===void 0&&e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidSelectionValue",selectionPath:e.getSelectionPath(),underlyingError:io})}var bn=class t{constructor(e){this.params=e;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}modelOrType;throwValidationError(e){Cr({errors:[e],originalMethod:this.params.originalMethod,args:this.params.rootArgs??{},callsite:this.params.callsite,errorFormat:this.params.errorFormat,clientVersion:this.params.clientVersion,globalOmit:this.params.globalOmit})}getSelectionPath(){return this.params.selectionPath}getArgumentPath(){return this.params.argumentPath}getArgumentName(){return this.params.argumentPath[this.params.argumentPath.length-1]}getOutputTypeDescription(){if(!(!this.params.modelName||!this.modelOrType))return{name:this.params.modelName,fields:this.modelOrType.fields.map(e=>({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ce(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();p();m();d();l();function ao(t){if(!t._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Dt=class{_client;constructor(e){this._client=e}prometheus(e){return ao(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return ao(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();p();m();d();l();function Al(t,e){let r=Et(()=>Cl(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Cl(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function xn(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();p();m();d();l();var Pn=new WeakMap,Dr="$$PrismaTypedSql",Ot=class{constructor(e,r){Pn.set(this,{sql:e,values:r}),Object.defineProperty(this,Dr,{value:Dr})}get sql(){return Pn.get(this).sql}get values(){return Pn.get(this).values}};function Sl(t){return(...e)=>new Ot(t,e)}function Or(t){return t!=null&&t[Dr]===Dr}u();c();p();m();d();l();var Ss=ft(rn());u();c();p();m();d();l();lo();wi();Ri();u();c();p();m();d();l();var se=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;i<r.length;){let s=r[i++],a=e[i];if(s instanceof t){this.strings[o]+=s.strings[0];let f=0;for(;f<s.values.length;)this.values[o++]=s.values[f++],this.strings[o]=s.strings[f];this.strings[o]+=a}else this.values[o++]=s,this.strings[o]=a}}get sql(){let e=this.strings.length,r=1,n=this.strings[0];for(;r<e;)n+=`?${this.strings[r++]}`;return n}get statement(){let e=this.strings.length,r=1,n=this.strings[0];for(;r<e;)n+=`:${r}${this.strings[r++]}`;return n}get text(){let e=this.strings.length,r=1,n=this.strings[0];for(;r<e;)n+=`$${r}${this.strings[r++]}`;return n}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Il(t,e=",",r="",n=""){if(t.length===0)throw new TypeError("Expected `join([])` to be called with an array of multiple elements, but got an empty array");return new se([r,...Array(t.length-1).fill(e),n],t)}function uo(t){return new se([t],[])}var Dl=uo("");function co(t,...e){return new se(t,e)}u();c();p();m();d();l();u();c();p();m();d();l();function kt(t){return{getKeys(){return Object.keys(t)},getPropertyValue(e){return t[e]}}}u();c();p();m();d();l();function Z(t,e){return{getKeys(){return[t]},getPropertyValue(){return e()}}}u();c();p();m();d();l();function Ne(t){let e=new fe;return{getKeys(){return t.getKeys()},getPropertyValue(r){return e.getOrCreate(r,()=>t.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();p();m();d();l();u();c();p();m();d();l();var _r={enumerable:!0,configurable:!0,writable:!0};function Mr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>_r,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var po=Symbol.for("nodejs.util.inspect.custom");function ce(t,e){let r=Ol(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=mo(Reflect.ownKeys(o),r),a=mo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{..._r,...f?.getPropertyDescriptor(s)}:_r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[po]=function(){let o={...this};return delete o[po],o},i}function Ol(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function mo(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();p();m();d();l();function nt(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();p();m();d();l();function it(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();p();m();d();l();function fo(t){if(t===void 0)return"";let e=tt(t);return new He(0,{colors:Pr}).write(e).toString()}u();c();p();m();d();l();var kl="P2037";function ot({error:t,user_facing_error:e},r,n){return e.error_code?new X(_l(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new W(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function _l(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===kl&&(r+=`
|
|
6
6
|
Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Tn=class{getLocation(){return null}};function Ie(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Tn}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var go={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function st(t={}){let e=Ll(t);return Object.entries(e).reduce((n,[i,o])=>(go[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ll(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function Lr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function yo(t,e){let r=Lr(t);return e({action:"aggregate",unpacker:r,argsMapper:st})(t)}u();c();p();m();d();l();function Fl(t={}){let{select:e,...r}=t;return typeof e=="object"?st({...r,_count:e}):st({...r,_count:{_all:!0}})}function Nl(t={}){return typeof t.select=="object"?e=>Lr(t)(e)._count:e=>Lr(t)(e)._count._all}function ho(t,e){return e({action:"count",unpacker:Nl(t),argsMapper:Fl})(t)}u();c();p();m();d();l();function Ul(t={}){let e=st(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function ql(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function bo(t,e){return e({action:"groupBy",unpacker:ql(t),argsMapper:Ul})(t)}function Eo(t,e,r){if(e==="aggregate")return n=>yo(n,r);if(e==="count")return n=>ho(n,r);if(e==="groupBy")return n=>bo(n,r)}u();c();p();m();d();l();function wo(t,e){let r=e.fields.filter(i=>!i.relationName),n=Mi(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Tt(t,o,s.type,s.isList,s.kind==="enum")},...Mr(Object.keys(n))})}u();c();p();m();d();l();u();c();p();m();d();l();var xo=t=>Array.isArray(t)?t:t.split("."),vn=(t,e)=>xo(e).reduce((r,n)=>r&&r[n],t),Po=(t,e,r)=>xo(e).reduceRight((n,i,o,s)=>Object.assign({},vn(t,s.slice(0,o)),{[i]:n}),r);function Vl(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function Bl(t,e,r){return e===void 0?t??{}:Po(e,r,t||!0)}function Rn(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,v)=>({...f,[v.name]:v}),{});return f=>{let v=Ie(t._errorFormat),R=Vl(n,i),A=Bl(f,o,R),I=r({dataPath:R,callsite:v})(A),C=$l(t,e);return new Proxy(I,{get(M,D){if(!C.includes(D))return M[D];let Ee=[a[D].type,r,D],ee=[R,A];return Rn(t,...Ee,...ee)},...Mr([...C,...Object.getOwnPropertyNames(I)])})}}function $l(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var jl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Ql=["aggregate","count","groupBy"];function An(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[Gl(t,e),Wl(t,e),kt(r),Z("name",()=>e),Z("$name",()=>e),Z("$parent",()=>t._appliedParent)];return ce({},n)}function Gl(t,e){let r=ye(e),n=Object.keys(wt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let v=Ie(t._errorFormat);return t._createPrismaPromise(R=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:R,callsite:v};return t._request({...A,...a})},{action:o,args:f,model:e})};return jl.includes(o)?Rn(t,e,s):Jl(i)?Eo(t,i,s):s({})}}}function Jl(t){return Ql.includes(t)}function Wl(t,e){return Ne(Z("fields",()=>{let r=t._runtimeDataModel.models[e];return wo(e,r)}))}u();c();p();m();d();l();function To(t){return t.replace(/^./,e=>e.toUpperCase())}var Cn=Symbol();function _t(t){let e=[Kl(t),Hl(t),Z(Cn,()=>t),Z("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(kt(r)),ce(t,e)}function Kl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function Hl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ye),n=[...new Set(e.concat(r))];return Ne({getKeys(){return n},getPropertyValue(i){let o=To(i);if(t._runtimeDataModel.models[o]!==void 0)return An(t,o);if(t._runtimeDataModel.models[i]!==void 0)return An(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function vo(t){return t[Cn]?t[Cn]:t}function Ro(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return _t(e)}u();c();p();m();d();l();u();c();p();m();d();l();function Ao({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let v=f.needs.filter(R=>n[R]);v.length>0&&a.push(nt(v))}else if(r){if(!r[f.name])continue;let v=f.needs.filter(R=>!r[R]);v.length>0&&a.push(nt(v))}zl(t,f.needs)&&s.push(Yl(f,ce(t,s)))}return s.length>0||a.length>0?ce(t,[...s,...a]):t}function zl(t,e){return e.every(r=>ln(t,r))}function Yl(t,e){return Ne(Z(t.name,()=>t.compute(e)))}u();c();p();m();d();l();function Fr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=Fr({result:e[s],args:r,modelName:i,runtimeDataModel:n,visitor:t});return e}let o=t(e,i,r)??e;return r.include&&Co({includeOrSelect:r.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),r.select&&Co({includeOrSelect:r.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),o}function Co({includeOrSelect:t,result:e,parentModelName:r,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(t)){if(!s||e[o]==null||he(s))continue;let f=n.models[r].fields.find(R=>R.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let v=typeof s=="object"?s:{};e[o]=Fr({visitor:i,result:e[o],args:v,modelName:f.type,runtimeDataModel:n})}}function So({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:Fr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,v)=>{let R=ye(f);return Ao({result:a,modelName:R,select:v.select,omit:v.select?void 0:{...o?.[R],...v.omit},extensions:n})}})}u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();var Xl=["$connect","$disconnect","$on","$transaction","$extends"],Io=Xl;function Do(t){if(t instanceof se)return Zl(t);if(Or(t))return eu(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n<t.length;n++)r[n]=Mt(t[n]);return r}let e={};for(let r in t)e[r]=Mt(t[r]);return e}function Zl(t){return new se(t.strings,t.values)}function eu(t){return new Ot(t.sql,t.values)}function Mt(t){if(typeof t!="object"||t==null||t instanceof Pe||et(t))return t;if(Ke(t))return new Re(t.toFixed());if(We(t))return new Date(+t);if(ArrayBuffer.isView(t))return t.slice(0);if(Array.isArray(t)){let e=t.length,r;for(r=Array(e);e--;)r[e]=Mt(t[e]);return r}if(typeof t=="object"){let e={};for(let r in t)r==="__proto__"?Object.defineProperty(e,r,{value:Mt(t[r]),configurable:!0,enumerable:!0,writable:!0}):e[r]=Mt(t[r]);return e}Fe(t,"Unknown value")}function ko(t,e,r,n=0){return t._createPrismaPromise(i=>{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:Do(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Fo(o,f),a.args=s,ko(t,a,r,n+1)}})})}function _o(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return ko(t,e,s)}function Mo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?Lo(r,n,0,t):t(r)}}function Lo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Fo(i,f),Lo(a,e,r+1,n)}})}var Oo=t=>t;function Fo(t=Oo,e=Oo){return r=>t(e(r))}u();c();p();m();d();l();var No=j("prisma:client"),Uo={Vercel:"vercel","Netlify CI":"netlify"};function qo({postinstall:t,ciName:e,clientVersion:r,generator:n}){if(No("checkPlatformCaching:postinstall",t),No("checkPlatformCaching:ciName",e),t===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&e&&e in Uo){let i=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process.
|
|
7
7
|
|
|
8
|
-
Learn how: https://pris.ly/d/${Uo[e]}-build`;throw console.error(i),new L(i,r)}}u();c();p();m();d();l();function Vo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();l();function Bo(t,e){throw new Error(e)}function tu(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function ru(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function Lt(t){return t===null?t:Array.isArray(t)?t.map(Lt):typeof t=="object"?tu(t)?nu(t):t.constructor!==null&&t.constructor.name!=="Object"?t:ru(t,Lt):t}function nu({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=h.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new P(e);case"Json":return JSON.parse(e);default:Bo(e,"Unknown tagged value")}}var $o="6.19.1-dev.
|
|
8
|
+
Learn how: https://pris.ly/d/${Uo[e]}-build`;throw console.error(i),new L(i,r)}}u();c();p();m();d();l();function Vo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();l();function Bo(t,e){throw new Error(e)}function tu(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function ru(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function Lt(t){return t===null?t:Array.isArray(t)?t.map(Lt):typeof t=="object"?tu(t)?nu(t):t.constructor!==null&&t.constructor.name!=="Object"?t:ru(t,Lt):t}function nu({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=h.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new P(e);case"Json":return JSON.parse(e);default:Bo(e,"Unknown tagged value")}}var $o="6.19.1-dev.4";u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var ou=()=>globalThis.process?.release?.name==="node",su=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,au=()=>!!globalThis.Deno,lu=()=>typeof globalThis.Netlify=="object",uu=()=>typeof globalThis.EdgeRuntime=="object",cu=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function pu(){return[[lu,"netlify"],[uu,"edge-light"],[cu,"workerd"],[au,"deno"],[su,"bun"],[ou,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var mu={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 Ft(){let t=pu();return{id:t,prettyName:mu[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}function at({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[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 Ft().id==="workerd"?new L(`error: Environment variable not found: ${s.fromEnvVar}.
|
|
9
9
|
|
|
10
10
|
In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`.
|
|
11
11
|
To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new L(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new L("error: Missing URL environment variable, value, or override.",n);return i}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Nr=class extends Error{clientVersion;cause;constructor(e,r){super(e),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ne=class extends Nr{isRetryable;constructor(e,r){super(e,r),this.isRetryable=r.isRetryable??!0}};u();c();p();m();d();l();function _(t,e){return{...t,isRetryable:e}}var Ue=class extends ne{name="InvalidDatasourceError";code="P6001";constructor(e,r){super(e,_(r,!1))}};O(Ue,"InvalidDatasourceError");function jo(t){let e={clientVersion:t.clientVersion},r=Object.keys(t.inlineDatasources)[0],n=at({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,clientVersion:t.clientVersion,env:{...t.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new Ue(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,e)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==pr)throw new Ue(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,e);let a=s.get("api_key");if(a===null||a.length<1)throw new Ue(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,e);let f=nn(i)?"http:":"https:";g.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(f="http:");let v=new URL(i.href.replace(o,f));return{apiKey:a,url:v}}u();c();p();m();d();l();var Qo=ft(Ci()),Ur=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:e,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=e,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:e,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Qo.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=e??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let e=[];return this.tracingHelper.isEnabled()&&e.push("tracing"),this.logLevel&&e.push(this.logLevel),this.logQueries&&e.push("query"),e}};u();c();p();m();d();l();function du(t){return t[0]*1e3+t[1]/1e6}function Sn(t){return new Date(du(t))}u();c();p();m();d();l();u();c();p();m();d();l();var lt=class extends ne{name="ForcedRetryError";code="P5001";constructor(e){super("This request must be retried",_(e,!0))}};O(lt,"ForcedRetryError");u();c();p();m();d();l();var qe=class extends ne{name="NotImplementedYetError";code="P5004";constructor(e,r){super(e,_(r,!1))}};O(qe,"NotImplementedYetError");u();c();p();m();d();l();u();c();p();m();d();l();var V=class extends ne{response;constructor(e,r){super(e,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ve=class extends V{name="SchemaMissingError";code="P5005";constructor(e){super("Schema needs to be uploaded",_(e,!0))}};O(Ve,"SchemaMissingError");u();c();p();m();d();l();u();c();p();m();d();l();var In="This request could not be understood by the server",Nt=class extends V{name="BadRequestError";code="P5000";constructor(e,r,n){super(r||In,_(e,!1)),n&&(this.code=n)}};O(Nt,"BadRequestError");u();c();p();m();d();l();var Ut=class extends V{name="HealthcheckTimeoutError";code="P5013";logs;constructor(e,r){super("Engine not started: healthcheck timeout",_(e,!0)),this.logs=r}};O(Ut,"HealthcheckTimeoutError");u();c();p();m();d();l();var qt=class extends V{name="EngineStartupError";code="P5014";logs;constructor(e,r,n){super(r,_(e,!0)),this.logs=n}};O(qt,"EngineStartupError");u();c();p();m();d();l();var Vt=class extends V{name="EngineVersionNotSupportedError";code="P5012";constructor(e){super("Engine version is not supported",_(e,!1))}};O(Vt,"EngineVersionNotSupportedError");u();c();p();m();d();l();var Dn="Request timed out",Bt=class extends V{name="GatewayTimeoutError";code="P5009";constructor(e,r=Dn){super(r,_(e,!1))}};O(Bt,"GatewayTimeoutError");u();c();p();m();d();l();var fu="Interactive transaction error",$t=class extends V{name="InteractiveTransactionError";code="P5015";constructor(e,r=fu){super(r,_(e,!1))}};O($t,"InteractiveTransactionError");u();c();p();m();d();l();var gu="Request parameters are invalid",jt=class extends V{name="InvalidRequestError";code="P5011";constructor(e,r=gu){super(r,_(e,!1))}};O(jt,"InvalidRequestError");u();c();p();m();d();l();var On="Requested resource does not exist",Qt=class extends V{name="NotFoundError";code="P5003";constructor(e,r=On){super(r,_(e,!1))}};O(Qt,"NotFoundError");u();c();p();m();d();l();var kn="Unknown server error",ut=class extends V{name="ServerError";code="P5006";logs;constructor(e,r,n){super(r||kn,_(e,!0)),this.logs=n}};O(ut,"ServerError");u();c();p();m();d();l();var _n="Unauthorized, check your connection string",Gt=class extends V{name="UnauthorizedError";code="P5007";constructor(e,r=_n){super(r,_(e,!1))}};O(Gt,"UnauthorizedError");u();c();p();m();d();l();var Mn="Usage exceeded, retry again later",Jt=class extends V{name="UsageExceededError";code="P5008";constructor(e,r=Mn){super(r,_(e,!0))}};O(Jt,"UsageExceededError");async function yu(t){let e;try{e=await t.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(e);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return e===""?{type:"EmptyError"}:{type:"UnknownTextError",body:e}}}async function Wt(t,e){if(t.ok)return;let r={clientVersion:e,response:t},n=await yu(t);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:e});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ut(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ve(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Vt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new L(i,e,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Ut(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new $t(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new jt(r,n.body.InvalidRequestError.reason)}if(t.status===401||t.status===403)throw new Gt(r,ct(_n,n));if(t.status===404)return new Qt(r,ct(On,n));if(t.status===429)throw new Jt(r,ct(Mn,n));if(t.status===504)throw new Bt(r,ct(Dn,n));if(t.status>=500)throw new ut(r,ct(kn,n));if(t.status>=400)throw new Nt(r,ct(In,n))}function ct(t,e){return e.type==="EmptyError"?t:`${t}: ${JSON.stringify(e)}`}u();c();p();m();d();l();function Go(t){let e=Math.pow(2,t)*50,r=Math.ceil(Math.random()*e)-Math.ceil(e/2),n=e+r;return new Promise(i=>setTimeout(()=>i(n),n))}u();c();p();m();d();l();var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Jo(t){let e=new TextEncoder().encode(t),r="",n=e.byteLength,i=n%3,o=n-i,s,a,f,v,R;for(let A=0;A<o;A=A+3)R=e[A]<<16|e[A+1]<<8|e[A+2],s=(R&16515072)>>18,a=(R&258048)>>12,f=(R&4032)>>6,v=R&63,r+=Te[s]+Te[a]+Te[f]+Te[v];return i==1?(R=e[o],s=(R&252)>>2,a=(R&3)<<4,r+=Te[s]+Te[a]+"=="):i==2&&(R=e[o]<<8|e[o+1],s=(R&64512)>>10,a=(R&1008)>>4,f=(R&15)<<2,r+=Te[s]+Te[a]+Te[f]+"="),r}u();c();p();m();d();l();function Wo(t){if(!!t.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new L("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",t.clientVersion)}u();c();p();m();d();l();var Ko={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};u();c();p();m();d();l();u();c();p();m();d();l();var Kt=class extends ne{name="RequestError";code="P5010";constructor(e,r){super(`Cannot fetch data from service:
|