text: module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var r=n[t]={i:t,l:false,exports:{}};var i=true;try{e[t].call(r.exports,r,r.exports,__webpack_require__);i=false}finally{if(i)delete n[t]}r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(57)}t(__webpack_require__);return startup()}({5:function(e,t,n){"use strict";const{finished:r}=n(794);const{InvalidArgumentError:i,InvalidReturnValueError:s}=n(306);const o=n(652);const{AsyncResource:a}=n(303);class StreamHandler extends a{constructor(e,t,n){if(!e||typeof e!=="object"){throw new i("invalid opts")}if(typeof t!=="function"){throw new i("invalid factory")}if(e.method==="CONNECT"){throw new i("invalid method")}super("UNDICI_STREAM");this.opaque=e.opaque||null;this.factory=t;this.callback=n;this.res=null;this.trailers=null}onHeaders(e,t,n){const{factory:i,opaque:a}=this;if(e<200){return}this.factory=null;const u=this.runInAsyncScope(i,null,{statusCode:e,headers:o.parseHeaders(t),opaque:a});if(!u||typeof u.write!=="function"||typeof u.end!=="function"||typeof u.on!=="function"){throw new s("expected Writable")}u.on("drain",n);r(u,{readable:false},e=>{const{callback:t,res:n,opaque:r,trailers:i}=this;this.res=null;if(e||!n.readable){o.destroy(n,e)}this.callback=null;this.runInAsyncScope(t,null,e||null,{opaque:r,trailers:i})});this.res=u}onData(e){const{res:t}=this;if(o.isDestroyed(t)){return}return t.write(e)}onComplete(e){const{res:t}=this;if(o.isDestroyed(t)){return}this.trailers=o.parseHeaders(e);t.end()}onError(e){const{res:t,callback:n,opaque:r}=this;this.factory=null;if(t){this.res=null;o.destroy(t,e)}else if(n){this.callback=null;this.runInAsyncScope(n,null,e,{opaque:r})}}}function stream(e,t,n,r){if(r===undefined){return new Promise((r,i)=>{stream(e,t,n,(e,t)=>{return e?i(e):r(t)})})}if(typeof r!=="function"){throw new i("invalid callback")}try{e.dispatch(t,new StreamHandler(t,n,r))}catch(e){process.nextTick(r,e,null)}}e.exports={stream:stream,StreamHandler:StreamHandler}},16:function(e){e.exports=require("tls")},27:function(e,t,n){"use strict";const r=n(354);e.exports=(e=>{const t=r(e);if(t===0){return e}const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")})},38:function(e,t,n){"use strict";const{URL:r}=n(835);const i=n(631);const s=n(16);const{HTTPParser:o}=process.binding("http_parser");const a=n(614);const u=n(357);const l=n(652);const c=n(979);const{ContentLengthMismatchError:f,SocketTimeoutError:d,InvalidArgumentError:p,RequestAbortedError:h,ClientDestroyedError:m,ClientClosedError:g,HeadersTimeoutError:y,SocketError:b,InformationalError:w}=n(306);const{kUrl:v,kReset:_,kPause:E,kResume:T,kClient:C,kParser:S,kConnect:P,kResuming:x,kWriting:O,kQueue:A,kDrained:$,kServerName:R,kIdleTimeout:M,kSocketTimeout:k,kRequestTimeout:L,kTLSOpts:j,kClosed:F,kDestroyed:I,kPendingIdx:D,kRunningIdx:q,kError:N,kOnDestroyed:B,kPipelining:U,kRetryDelay:G,kRetryTimeout:V,kMaxAbortedPayload:J,kSocket:H,kSocketPath:z,kKeepAliveTimeout:W,kMaxHeadersSize:Q,kHeadersTimeout:Y,kMaxKeepAliveTimeout:K,kKeepAliveTimeoutThreshold:Z}=n(390);const X=n(5).stream;const ee=n(898).request;const te=n(208).pipeline;const ne=n(901).upgrade;const re=n(147).connect;const ie=Buffer.from("\r\n","ascii");const se=parseInt(process.version.split(".")[0].slice(1));const oe=process.execArgv.includes("--insecure-http-parser");class Client extends a{constructor(e,{maxAbortedPayload:t,maxHeaderSize:n,headersTimeout:i,socketTimeout:s,idleTimeout:o,maxKeepAliveTimeout:a,keepAliveTimeoutThreshold:u,socketPath:l,requestTimeout:c,pipelining:f,tls:d}={}){super();if(typeof e==="string"){e=new r(e)}if(!e||typeof e!=="object"){throw new p("invalid url")}if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port))){throw new p("invalid port")}if(l!=null&&typeof l!=="string"){throw new p("invalid socketPath")}if(e.hostname!=null&&typeof e.hostname!=="string"){throw new p("invalid hostname")}if(!/https?/.test(e.protocol)){throw new p("invalid protocol")}if(/\/.+/.test(e.pathname)||e.search||e.hash){throw new p("invalid url")}if(t!=null&&!Number.isFinite(t)){throw new p("invalid maxAbortedPayload")}if(n!=null&&!Number.isFinite(n)){throw new p("invalid maxHeaderSize")}if(s!=null&&!Number.isFinite(s)){throw new p("invalid socketTimeout")}if(o!=null&&(!Number.isFinite(o)||o<=0)){throw new p("invalid idleTimeout")}if(a!=null&&(!Number.isFinite(a)||a<=0)){throw new p("invalid maxKeepAliveTimeout")}if(u!=null&&!Number.isFinite(u)){throw new p("invalid keepAliveTimeoutThreshold")}if(c!=null&&!Number.isFinite(c)){throw new p("invalid requestTimeout")}if(i!=null&&!Number.isFinite(i)){throw new p("invalid headersTimeout")}this[H]=null;this[_]=false;this[U]=f||1;this[Q]=n||16384;this[Y]=i==null?3e4:i;this[v]=e;this[z]=l;this[k]=s==null?3e4:s;this[K]=a==null?6e5:a;this[M]=o==null?4e3:o;this[Z]=u==null?1e3:u;this[W]=this[M];this[L]=c==null?3e4:c;this[F]=false;this[I]=false;this[R]=null;this[j]=d;this[G]=0;this[V]=null;this[B]=[];this[O]=false;this[x]=0;this[$]=false;this[J]=t||1048576;this[A]=[];this[q]=0;this[D]=0}get pipelining(){return this[U]}set pipelining(e){this[U]=e;resume(this)}get connected(){return this[H]&&this[H].connecting!==true&&(this[H].authorized!==false||this[H].authorizationError)&&!this[H].destroyed}get pending(){return this[A].length-this[D]}get running(){return this[D]-this[q]}get size(){return this[A].length-this[q]}get busy(){if(this.running>=this[U]){return true}if(this.size>=this[U]){return true}if(this.size&&!this.connected){return true}if(this[_]||this[O]){return true}if(this[x]){for(let e=this[D];e<this[A].length;e++){const{idempotent:t,body:n,reset:r,aborted:i}=this[A][e];if(i){continue}if(!t||r){return true}if(l.isStream(n)&&l.bodyLength(n)!==0){return true}}}else if(this.pending>0){return true}return false}get destroyed(){return this[I]}get closed(){return this[F]}[P](e){connect(this);this.once("connect",e)}dispatch(e,t){const n=new c(e,this,t);try{if(this[I]){throw new m}if(this[F]){throw new g}this[A].push(n);if(this[x]){}else if(l.isStream(n.body)){this[x]=1;process.nextTick(resume,this)}else{resume(this)}}catch(e){n.onError(e)}}close(e){if(e===undefined){return new Promise((e,t)=>{this.close((n,r)=>{return n?t(n):e(r)})})}if(typeof e!=="function"){throw new p("invalid callback")}if(this[I]){process.nextTick(e,new m,null);return}this[F]=true;if(!this.size){this.destroy(e)}else{this[B].push(e)}}destroy(e,t){if(typeof e==="function"){t=e;e=null}if(t===undefined){return new Promise((t,n)=>{this.destroy(e,(e,r)=>{return e?n(e):t(r)})})}if(typeof t!=="function"){throw new p("invalid callback")}if(this[I]){if(this[B]){this[B].push(t)}else{process.nextTick(t,null,null)}return}clearTimeout(this[V]);this[V]=null;this[F]=true;this[I]=true;this[B].push(t);const n=()=>{const e=this[B];this[B]=null;for(const t of e){t(null,null)}};if(!this[H]){process.nextTick(n)}else{l.destroy(this[H].on("close",n),e)}resume(this)}request(e,t){return ee(this,e,t)}stream(e,t,n){return X(this,e,t,n)}pipeline(e,t){return te(this,e,t)}upgrade(e,t){return ne(this,e,t)}connect(e,t){return re(this,e,t)}}class Parser extends o{constructor(e,t){if(se>=12){super();this.initialize(o.RESPONSE,{},e[Q],oe,e[Y])}else{super(o.RESPONSE,false)}this.client=e;this.socket=t;this.statusCode=null;this.upgrade=false;this.headers=null;this.shouldKeepAlive=false;this.read=0}[o.kOnTimeout](){if(this.statusCode){this.socket._unrefTimer()}else{l.destroy(this.socket,new y)}}[o.kOnHeaders](e){if(this.headers){Array.prototype.push.apply(this.headers,e)}else{this.headers=e}}[o.kOnExecute](e){const{upgrade:t,socket:n}=this;if(!Number.isFinite(e)){u(e instanceof Error);l.destroy(n,e);return}n._unrefTimer();if(t&&!n.destroyed){const{client:t,headers:r,statusCode:i}=this;const s=t[A][t[q]];u(!n.destroyed);u(n===t[H]);u(!n.isPaused());u(s.upgrade||s.method==="CONNECT");this.read=0;this.headers=null;this.statusCode=null;n._readableState.flowing=null;n.unshift(this.getCurrentBuffer().slice(e));s.onUpgrade(i,r,n);if(!n.destroyed){detachSocket(n);t[H]=null;t[A][t[q]++]=null;t.emit("disconnect",new w("upgrade"));this.unconsume();setImmediate(()=>this.close());resume(t)}}}[o.kOnHeadersComplete](e,t,n,r,i,s,o,a,c){const{client:f,socket:d}=this;const p=f[A][f[q]];if(d.destroyed){return}u(!this.upgrade);u(this.statusCode<200);if(s===100){l.destroy(d,new b("bad response"));return 1}if(a!==p.upgrade){l.destroy(d,new b("bad upgrade"));return 1}if(this.headers){Array.prototype.push.apply(this.headers,n)}else{this.headers=n}this.statusCode=s;this.shouldKeepAlive=c;if(a||p.method==="CONNECT"){this.upgrade=true;return 2}if(!c){f[_]=true}const{headers:h}=this;this.headers=null;let m=l.parseKeepAliveTimeout(c,h);if(Number.isFinite(m)){m=Math.min(m-f[Z],f[K]);if(!m||m<1e3){f[_]=true}else{f[W]=m}}else{f[W]=f[M]}p.onHeaders(s,h,s<200?null:d[T]);return p.method==="HEAD"||s<200?1:0}[o.kOnBody](e,t,n){const{client:r,socket:i,statusCode:s}=this;if(i.destroyed){return}u(s>=200);const o=r[A][r[q]];this.read+=n;const a=o.onBody(e,t,n);if(a==null){if(this.read>r[J]){r[A][r[q]++]=null;l.destroy(i,new w("max aborted payload"))}}else if(a===false){i.pause()}}[o.kOnMessageComplete](){const{client:e,socket:t,statusCode:n,headers:r,upgrade:i}=this;const s=e[A][e[q]];if(t.destroyed){return}u(n>=100);if(i){u(n<300||s.method==="CONNECT");return}this.read=0;this.statusCode=null;this.headers=null;if(n<200){u(!t.isPaused());return}s.onComplete(r);e[A][e[q]++]=null;if(e[O]){l.destroy(t,new w("reset"))}else if(e[_]){if(!e.running){l.destroy(t,new w("reset"))}}else if(!this.shouldKeepAlive){l.destroy(t,new w("reset"))}else{t.resume();resume(e)}}}function onSocketConnect(){const{[C]:e}=this;u(!this.destroyed);u(!e[O]);u(!e[V]);e[_]=false;e[G]=0;e.emit("connect");resume(e)}function onSocketTimeout(){l.destroy(this,new d)}function onSocketError(e){const{[C]:t,[R]:n}=this;this[N]=e;if(e.code==="ERR_TLS_CERT_ALTNAME_INVALID"){u(!t.running);while(t.pending&&t[A][t[D]].servername===n){t[A][t[D]++].onError(e)}}else if(!t.running&&e.code!=="ECONNRESET"&&e.code!=="ECONNREFUSED"&&e.code!=="EHOSTUNREACH"&&e.code!=="EHOSTDOWN"&&e.code!=="UND_ERR_SOCKET"&&e.code!=="UND_ERR_INFO"){u(t[D]===t[q]);for(const n of t[A].splice(t[q])){n.onError(e)}}}function onSocketEnd(){l.destroy(this,new b("other side closed"))}function onSocketClose(){const{[C]:e,[S]:t}=this;const n=this[N]||new b("closed");e[H]=null;t.unconsume();setImmediate(()=>t.close());if(e.running>0){if(n.code!=="UND_ERR_INFO"){e[A][e[q]++].onError(n)}const t=[];for(const n of e[A].slice(e[q],e[D])){const{idempotent:e,body:r,aborted:i}=n;u(e&&!l.isStream(r));if(!i){t.push(n)}}e[A].splice(0,e[D],...t);e[D]=0;e[q]=0}if(!e.destroyed){e.emit("disconnect",n)}resume(e)}function detachSocket(e){e[E]=null;e[T]=null;e[C]=null;e[S]=null;e[N]=null;e[R]=null;e.removeListener("timeout",onSocketTimeout).removeListener("error",onSocketError).removeListener("end",onSocketEnd).removeListener("close",onSocketClose)}function connect(e){u(!e[H]);u(!e[V]);const{protocol:t,port:n,hostname:r}=e[v];let o=null;let a;if(t==="https:"){o=e[R]||e[j]&&e[j].servername;const t={...e[j],servername:o};a=e[z]?s.connect(e[z],t):s.connect(n||443,r,t)}else{a=e[z]?i.connect(e[z]):i.connect(n||80,r)}e[H]=a;const l=new Parser(e,a);if(se>=12){u(a._handle);l.consume(a._handle)}else{u(a._handle&&a._handle._externalStream);l.consume(a._handle._externalStream)}a[E]=a.pause.bind(a);a[T]=a.resume.bind(a);a[N]=null;a[S]=l;a[C]=e;a[R]=o;a.setNoDelay(true).setTimeout(e[M]).on(t==="https:"?"secureConnect":"connect",onSocketConnect).on("timeout",onSocketTimeout).on("error",onSocketError).on("end",onSocketEnd).on("close",onSocketClose)}function resume(e){if(e[x]===2){return}e[x]=2;_resume(e);e[x]=0;if(e[q]>256){e[A].splice(0,e[q]);e[D]-=e[q];e[q]=0}}function _resume(e){while(true){if(e[I]){const t=new m;for(const n of e[A].splice(e[D])){n.onError(t)}return}if(e[F]&&!e.size){e.destroy(l.nop);continue}if(e[H]){const t=e.running?e[k]:e[W];if(e[H].timeout!==t){e[H].setTimeout(t)}}if(!e.pending){if(!e[$]&&!e.busy){e[$]=true;e.emit("drain");continue}return}else{e[$]=false}if(e.running>=e[U]){return}const t=e[A][e[D]];if(t.aborted){e[A].splice(e[D],1);continue}if(e[R]!==t.servername){if(e.running){return}e[R]=t.servername;if(e[H]){l.destroy(e[H],new w("servername changed"));return}}if(!e[H]&&!e[V]){if(e[G]){e[V]=setTimeout(()=>{e[V]=null;connect(e)},e[G]);e[G]=Math.min(e[G]*2,e[k])}else{connect(e);e[G]=1e3}return}if(!e.connected){return}if(e[O]||e[_]){return}if(e.running&&!t.idempotent){return}if(e.running&&(t.upgrade||t.method==="CONNECT")){return}if(l.isStream(t.body)&&l.bodyLength(t.body)===0){t.body.on("data",function(){u(false)}).on("error",function(e){t.onError(e)}).on("end",function(){l.destroy(this)});t.body=null}if(e.running&&l.isStream(t.body)){return}try{write(e,t);e[D]++}catch(e){t.onError(e)}}}function write(e,t){const{body:n,header:r}=t;if(n&&typeof n.read==="function"){n.read(0)}let i=l.bodyLength(n);if(i===null){i=t.contentLength}if(i===0&&!t.expectsPayload){i=null}if(t.contentLength!==null&&t.contentLength!==i){throw new f}if(t.reset){e[_]=true}const s=e[H];if(!n){if(i===0){s.write(`${r}content-length: ${i}\r\n\r\n\r\n`,"ascii")}else{u(i===null,"no body must not have content length");s.write(`${r}\r\n`,"ascii")}}else if(l.isBuffer(n)){u(i!==null,"buffer body must have content length");s.cork();s.write(`${r}content-length: ${i}\r\n\r\n`,"ascii");s.write(n);s.write(ie);s.uncork();t.body=null}else{u(l.isStream(n));u(i!==0||!e.running,"stream body cannot be pipelined");let o=false;let a=0;const c=function(e){u(!o);const t=Buffer.byteLength(e);if(!t){return}if(i!==null&&a+t>i){l.destroy(s,new f);return}if(a===0){if(i===null){s.write(`${r}transfer-encoding: chunked\r\n`,"ascii")}else{s.write(`${r}content-length: ${i}\r\n\r\n`,"ascii")}}if(i===null){s.write(`\r\n${t.toString(16)}\r\n`,"ascii")}a+=t;if(!s.write(e)&&this.pause){this.pause()}};const d=function(){u(!o);if(n.resume){n.resume()}};const p=function(){g(new h)};const m=function(){u(false,"socket should not close without error")};const g=function(h){if(o){return}o=true;u(e[O]&&e.running<=1);e[O]=false;if(!h&&i!==null&&a!==i){h=new f}s.removeListener("drain",d).removeListener("error",g).removeListener("close",m);n.removeListener("data",c).removeListener("end",g).removeListener("error",g).removeListener("close",p);t.body=null;l.destroy(n,h);if(h){l.destroy(s,h);return}if(a===0){if(t.expectsPayload){s.write(`${r}content-length: 0\r\n\r\n\r\n`,"ascii")}else{s.write(`${r}\r\n`,"ascii")}}else if(i===null){s.write("\r\n0\r\n\r\n","ascii")}resume(e)};n.on("data",c).on("end",g).on("error",g).on("close",p);s.on("drain",d).on("error",g).on("close",g);e[O]=true}}e.exports=Client},45:function(e,t,n){t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}r++;if(e==="%c"){i=r}});t.splice(i,0,n)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(782)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},49:function(e){"use strict";const t=(e,t,n)=>{let r=e.indexOf(t);if(r===-1){return e}const i=t.length;let s=0;let o="";do{o+=e.substr(s,r-s)+t+n;s=r+i;r=e.indexOf(t,s)}while(r!==-1);o+=e.substr(s);return o};const n=(e,t,n,r)=>{let i=0;let s="";do{const o=e[r-1]==="\r";s+=e.substr(i,(o?r-1:r)-i)+t+(o?"\r\n":"\n")+n;i=r+1;r=e.indexOf("\n",i)}while(r!==-1);s+=e.substr(i);return s};e.exports={stringReplaceAll:t,stringEncaseCRLFWithFirstIndex:n}},57:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});var o=n(388);Object.defineProperty(t,"DMMF",{enumerable:true,get:function(){return o.DMMF}});var a=n(248);Object.defineProperty(t,"DMMFClass",{enumerable:true,get:function(){return a.DMMFClass}});var u=n(222);Object.defineProperty(t,"makeDocument",{enumerable:true,get:function(){return u.makeDocument}});Object.defineProperty(t,"transformDocument",{enumerable:true,get:function(){return u.transformDocument}});Object.defineProperty(t,"unpack",{enumerable:true,get:function(){return u.unpack}});Object.defineProperty(t,"PrismaClientValidationError",{enumerable:true,get:function(){return u.PrismaClientValidationError}});var l=n(531);Object.defineProperty(t,"debugLib",{enumerable:true,get:function(){return l.default}});var c=n(58);Object.defineProperty(t,"Engine",{enumerable:true,get:function(){return c.Engine}});Object.defineProperty(t,"PrismaClientKnownRequestError",{enumerable:true,get:function(){return c.PrismaClientKnownRequestError}});Object.defineProperty(t,"PrismaClientUnknownRequestError",{enumerable:true,get:function(){return c.PrismaClientUnknownRequestError}});Object.defineProperty(t,"PrismaClientInitializationError",{enumerable:true,get:function(){return c.PrismaClientInitializationError}});Object.defineProperty(t,"PrismaClientRustPanicError",{enumerable:true,get:function(){return c.PrismaClientRustPanicError}});var f=n(998);Object.defineProperty(t,"getPrismaClient",{enumerable:true,get:function(){return f.getPrismaClient}});t.sqltag=s(n(925))},58:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(422);Object.defineProperty(t,"PrismaClientKnownRequestError",{enumerable:true,get:function(){return r.PrismaClientKnownRequestError}});Object.defineProperty(t,"PrismaClientUnknownRequestError",{enumerable:true,get:function(){return r.PrismaClientUnknownRequestError}});Object.defineProperty(t,"PrismaClientInitializationError",{enumerable:true,get:function(){return r.PrismaClientInitializationError}});Object.defineProperty(t,"PrismaClientRustPanicError",{enumerable:true,get:function(){return r.PrismaClientRustPanicError}});var i=n(532);Object.defineProperty(t,"Engine",{enumerable:true,get:function(){return i.NodeEngine}});var s=n(102);Object.defineProperty(t,"getInternalDatamodelJson",{enumerable:true,get:function(){return s.getInternalDatamodelJson}});var o=n(915);Object.defineProperty(t,"printGeneratorConfig",{enumerable:true,get:function(){return o.printGeneratorConfig}});var a=n(471);Object.defineProperty(t,"fixBinaryTargets",{enumerable:true,get:function(){return a.fixBinaryTargets}})},63:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Token=t.Prism=void 0;const r=n(699);var i={};var s=0;t.Prism={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Token){const n=e;return new Token(n.type,t.Prism.util.encode(n.content),n.alias)}else if(Array.isArray(e)){return e.map(t.Prism.util.encode)}else{return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")}},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){if(!e["__id"]){Object.defineProperty(e,"__id",{value:++s})}return e["__id"]},clone:function deepClone(e,n){var r,i,s=t.Prism.util.type(e);n=n||{};switch(s){case"Object":i=t.Prism.util.objId(e);if(n[i]){return n[i]}r={};n[i]=r;for(var o in e){if(e.hasOwnProperty(o)){r[o]=deepClone(e[o],n)}}return r;case"Array":i=t.Prism.util.objId(e);if(n[i]){return n[i]}r=[];n[i]=r;e.forEach(function(e,t){r[t]=deepClone(e,n)});return r;default:return e}}},languages:{extend:function(e,n){var r=t.Prism.util.clone(t.Prism.languages[e]);for(var i in n){r[i]=n[i]}return r},insertBefore:function(e,n,r,i){i=i||t.Prism.languages;var s=i[e];var o={};for(var a in s){if(s.hasOwnProperty(a)){if(a==n){for(var u in r){if(r.hasOwnProperty(u)){o[u]=r[u]}}}if(!r.hasOwnProperty(a)){o[a]=s[a]}}}var l=i[e];i[e]=o;t.Prism.languages.DFS(t.Prism.languages,function(t,n){if(n===l&&t!=e){this[t]=o}});return o},DFS:function DFS(e,n,r,i){i=i||{};var s=t.Prism.util.objId;for(var o in e){if(e.hasOwnProperty(o)){n.call(e,o,e[o],r||o);var a=e[o],u=t.Prism.util.type(a);if(u==="Object"&&!i[s(a)]){i[s(a)]=true;DFS(a,n,null,i)}else if(u==="Array"&&!i[s(a)]){i[s(a)]=true;DFS(a,n,o,i)}}}}},plugins:{},highlight:function(e,n,r){var i={code:e,grammar:n,language:r};t.Prism.hooks.run("before-tokenize",i);i.tokens=t.Prism.tokenize(i.code,i.grammar);t.Prism.hooks.run("after-tokenize",i);return Token.stringify(t.Prism.util.encode(i.tokens),i.language)},matchGrammar:function(e,n,r,i,s,o,a){for(var u in r){if(!r.hasOwnProperty(u)||!r[u]){continue}if(u==a){return}var l=r[u];l=t.Prism.util.type(l)==="Array"?l:[l];for(var c=0;c<l.length;++c){var f=l[c],d=f.inside,p=!!f.lookbehind,h=!!f.greedy,m=0,g=f.alias;if(h&&!f.pattern.global){var y=f.pattern.toString().match(/[imuy]*$/)[0];f.pattern=RegExp(f.pattern.source,y+"g")}f=f.pattern||f;for(var b=i,w=s;b<n.length;w+=n[b].length,++b){var v=n[b];if(n.length>e.length){return}if(v instanceof Token){continue}if(h&&b!=n.length-1){f.lastIndex=w;var _=f.exec(e);if(!_){break}var E=_.index+(p?_[1].length:0),T=_.index+_[0].length,C=b,S=w;for(var P=n.length;C<P&&(S<T||!n[C].type&&!n[C-1].greedy);++C){S+=n[C].length;if(E>=S){++b;w=S}}if(n[b]instanceof Token){continue}x=C-b;v=e.slice(w,S);_.index-=w}else{f.lastIndex=0;var _=f.exec(v),x=1}if(!_){if(o){break}continue}if(p){m=_[1]?_[1].length:0}var E=_.index+m,_=_[0].slice(m),T=E+_.length,O=v.slice(0,E),A=v.slice(T);var $=[b,x];if(O){++b;w+=O.length;$.push(O)}var R=new Token(u,d?t.Prism.tokenize(_,d):_,g,_,h);$.push(R);if(A){$.push(A)}Array.prototype.splice.apply(n,$);if(x!=1)t.Prism.matchGrammar(e,n,r,b,w,true,u);if(o)break}}}},tokenize:function(e,n){var r=[e];var i=n.rest;if(i){for(var s in i){n[s]=i[s]}delete n.rest}t.Prism.matchGrammar(e,r,n,0,0,false);return r},hooks:{all:{},add:function(e,n){var r=t.Prism.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.Prism.hooks.all[e];if(!r||!r.length){return}for(var i=0,s;s=r[i++];){s(n)}}},Token:Token};t.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:true},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:true,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};t.Prism.languages.javascript=t.Prism.languages.extend("clike",{"class-name":[t.Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:true}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:true},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:true}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});t.Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;t.Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:true,greedy:true},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:true,inside:t.Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:t.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:true,inside:t.Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:true,inside:t.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});if(t.Prism.languages.markup){t.Prism.languages.markup.tag.addInlined("script","javascript")}t.Prism.languages.js=t.Prism.languages.javascript;t.Prism.languages.typescript=t.Prism.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});t.Prism.languages.ts=t.Prism.languages.typescript;function Token(e,t,n,r,i){this.type=e;this.content=t;this.alias=n;this.length=(r||"").length|0;this.greedy=!!i}t.Token=Token;Token.stringify=function(e,t){if(typeof e=="string"){return e}if(Array.isArray(e)){return e.map(function(e){return Token.stringify(e,t)}).join("")}return getColorForSyntaxKind(e.type)(e.content)};function getColorForSyntaxKind(e){return r.theme[e]||r.identity}},71:function(e,t,n){"use strict";const{PassThrough:r}=n(794);e.exports=function(){var e=[];var t=new r({objectMode:true});t.setMaxListeners(0);t.add=add;t.isEmpty=isEmpty;t.on("unpipe",remove);Array.prototype.slice.call(arguments).forEach(add);return t;function add(n){if(Array.isArray(n)){n.forEach(add);return this}e.push(n);n.once("end",remove.bind(null,n));n.once("error",t.emit.bind(t,"error"));n.pipe(t,{end:false});return this}function isEmpty(){return e.length==0}function remove(n){e=e.filter(function(e){return e!==n});if(!e.length&&t.readable){t.end()}}}},78:function(e,t,n){"use strict";const{PassThrough:r}=n(794);e.exports=(e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i=n==="buffer";let s=false;if(t){s=!(n||i)}else{n=n||"utf8"}if(i){n=null}const o=new r({objectMode:s});if(n){o.setEncoding(n)}let a=0;const u=[];o.on("data",e=>{u.push(e);if(s){a=u.length}else{a+=e.length}});o.getBufferedValue=(()=>{if(t){return u}return i?Buffer.concat(u,a):u.join("")});o.getBufferedLength=(()=>a);return o})},87:function(e){e.exports=require("os")},96:function(e,t,n){"use strict";e=n.nmd(e);const r=(e,t)=>(...n)=>{const r=e(...n);return`[${r+t}m`};const i=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`};const s=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`};const o=e=>e;const a=(e,t,n)=>[e,t,n];const u=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true});return r},enumerable:true,configurable:true})};let l;const c=(e,t,r,i)=>{if(l===undefined){l=n(707)}const s=i?10:0;const o={};for(const[n,i]of Object.entries(l)){const a=n==="ansi16"?"ansi":n;if(n===t){o[a]=e(r,s)}else if(typeof i==="object"){o[a]=e(i[t],s)}}return o};function assembleStyles(){const e=new Map;const t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright;t.bgColor.bgGray=t.bgColor.bgBlackBright;t.color.grey=t.color.blackBright;t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[n,r]of Object.entries(t)){for(const[n,i]of Object.entries(r)){t[n]={open:`[${i[0]}m`,close:`[${i[1]}m`};r[n]=t[n];e.set(i[0],i[1])}Object.defineProperty(t,n,{value:r,enumerable:false})}Object.defineProperty(t,"codes",{value:e,enumerable:false});t.color.close="[39m";t.bgColor.close="[49m";u(t.color,"ansi",()=>c(r,"ansi16",o,false));u(t.color,"ansi256",()=>c(i,"ansi256",o,false));u(t.color,"ansi16m",()=>c(s,"rgb",a,false));u(t.bgColor,"ansi",()=>c(r,"ansi16",o,true));u(t.bgColor,"ansi256",()=>c(i,"ansi256",o,true));u(t.bgColor,"ansi16m",()=>c(s,"rgb",a,true));return t}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},102:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInternalDatamodelJson=void 0;const i=r(n(622));const s=n(129);const o=r(n(609));function getInternalDatamodelJson(e,t=i.default.join(__dirname,"../schema-inferrer-bin")){return new Promise((n,r)=>{const i=s.spawn(t,{stdio:["pipe","pipe",process.stderr]});i.on("error",function(e){console.error("[schema-inferrer-bin] error: %s",e);r(e)});i.on("exit",function(e,t){if(e!==0){console.error("[schema-inferrer-bin] exit: code=%s signal=%s",e,t)}r()});const a=o.default(i.stdout);a.on("data",e=>{const t=JSON.parse(e);const r=Buffer.from(JSON.stringify(t)).toString("base64");n(r)});const u=e.replace(/\n/g," ");i.stdin.write(JSON.stringify({dataModel:u})+"\n")})}t.getInternalDatamodelJson=getInternalDatamodelJson},105:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},110:function(e){"use strict";e.exports=/^#!(.*)/},121:function(e,t,n){var r=n(267);e.exports=r(once);e.exports.strict=r(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var n=e.name||"Function wrapped with `once`";t.onceError=n+" shouldn't be called more than once";t.called=false;return t}},128:function(e,t,n){"use strict";const r=n(87);const i=n(867);const s=n(425);const{env:o}=process;let a;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){a=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){a=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR==="true"){a=1}else if(o.FORCE_COLOR==="false"){a=0}else{a=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(a===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(e&&!t&&a===undefined){return 0}const n=a||0;if(o.TERM==="dumb"){return n}if(process.platform==="win32"){const e=r.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if("GITHUB_ACTIONS"in o){return 1}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return n}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,i.isatty(1))),stderr:translateLevel(supportsColor(true,i.isatty(2)))}},129:function(e){e.exports=require("child_process")},147:function(e,t,n){"use strict";const{InvalidArgumentError:r}=n(306);const{AsyncResource:i}=n(303);const s=n(652);class ConnectHandler extends i{constructor(e,t){if(!e||typeof e!=="object"){throw new r("invalid opts")}super("UNDICI_CONNECT");this.opaque=e.opaque||null;this.callback=t}onUpgrade(e,t,n){const{callback:r,opaque:i}=this;this.callback=null;this.runInAsyncScope(r,null,null,{statusCode:e,headers:s.parseHeaders(t),socket:n,opaque:i})}onError(e){const{callback:t,opaque:n}=this;if(t){this.callback=null;t(e,{opaque:n})}}}function connect(e,t,n){if(n===undefined){return new Promise((n,r)=>{connect(e,t,(e,t)=>{return e?r(e):n(t)})})}if(typeof n!=="function"){throw new r("invalid callback")}try{const r=new ConnectHandler(t,n);const{path:i,headers:s,servername:o,signal:a,requestTimeout:u}=t;e.dispatch({path:i,method:"CONNECT",headers:s,servername:o,signal:a,requestTimeout:u},r)}catch(e){process.nextTick(n,e,null)}}e.exports={connect:connect,ConnectHandler:ConnectHandler}},150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.convertLog=t.isRustError=void 0;function isRustError(e){return typeof e.is_panic!=="undefined"}t.isRustError=isRustError;function convertLog(e){const t=isQueryLog(e.fields);const n=t?"query":e.level.toLowerCase();return{...e,level:n,timestamp:new Date((new Date).getFullYear()+" "+e.timestamp)}}t.convertLog=convertLog;function isQueryLog(e){return Boolean(e.query)}},161:function(e){"use strict";e.exports=((e,t=1,n)=>{n={indent:" ",includeEmptyLines:false,...n};if(typeof e!=="string"){throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``)}if(typeof t!=="number"){throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``)}if(typeof n.indent!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``)}if(t===0){return e}const r=n.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,n.indent.repeat(t))})},173:function(e,t,n){"use strict";const r=n(796);const i=n(374);const s=n(71);const o=(e,t)=>{if(t===undefined||e.stdin===undefined){return}if(r(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}};const a=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr){return}const n=s();if(e.stdout){n.add(e.stdout)}if(e.stderr){n.add(e.stderr)}return n};const u=async(e,t)=>{if(!e){return}e.destroy();try{return await t}catch(e){return e.bufferedData}};const l=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!e||!n){return}if(t){return i(e,{encoding:t,maxBuffer:r})}return i.buffer(e,{maxBuffer:r})};const c=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},o)=>{const a=l(e,{encoding:r,buffer:i,maxBuffer:s});const c=l(t,{encoding:r,buffer:i,maxBuffer:s});const f=l(n,{encoding:r,buffer:i,maxBuffer:s*2});try{return await Promise.all([o,a,c,f])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},u(e,a),u(t,c),u(n,f)])}};const f=({input:e})=>{if(r(e)){throw new TypeError("The `input` option cannot be a stream in sync mode")}};e.exports={handleInput:o,makeAllStream:a,getSpawnedResult:c,validateInputSync:f}},177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.replaceDates=t.serializeRawParameters=void 0;function serializeRawParameters(e){return JSON.stringify(replaceDates(e))}t.serializeRawParameters=serializeRawParameters;function replaceDates(e){const t=Object.prototype.toString.call(e);if(t==="[object Date]"){return{prisma__type:"date",prisma__value:e.toJSON()}}if(t==="[object Object]"){const t={};for(let n in e){if(n!=="__proto__"){t[n]=replaceDates(e[n])}}return t}if(t==="[object Array]"){let t=e.length;let n;for(n=new Array(t);t--;){n[t]=replaceDates(e[t])}return n}return e}t.replaceDates=replaceDates},198:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.mergeBy=void 0;function mergeBy(e,t,r){const i=n(e,r);const s=n(t,r);const o=Object.values(s).map(e=>e[e.length-1]);const a=Object.keys(s);Object.entries(i).forEach(([e,t])=>{if(!a.includes(e)){o.push(t[t.length-1])}});return o}t.mergeBy=mergeBy;const n=(e,t)=>{return e.reduce((e,n)=>{const r=t(n);if(!e[r]){e[r]=[]}e[r].push(n);return e},{})}},208:function(e,t,n){"use strict";const{Readable:r,Duplex:i,PassThrough:s}=n(794);const{InvalidArgumentError:o,InvalidReturnValueError:a,RequestAbortedError:u}=n(306);const l=n(652);const{AsyncResource:c}=n(303);const f=Symbol("resume");class PipelineRequest extends r{constructor(){super({autoDestroy:true});this[f]=null}_read(){const{[f]:e}=this;if(e){this[f]=null;e()}}_destroy(e,t){this._read();if(!e&&!this._readableState.endEmitted){}t(e)}}class PipelineResponse extends r{constructor(e){super({autoDestroy:true,read:e})}_destroy(e,t){this._read();if(!e&&!this._readableState.endEmitted){e=new u}t(e)}}class PipelineHandler extends c{constructor(e,t){if(!e||typeof e!=="object"){throw new o("invalid opts")}if(typeof t!=="function"){throw new o("invalid handler")}if(e.method==="CONNECT"){throw new o("invalid method")}super("UNDICI_PIPELINE");this.opaque=e.opaque||null;this.handler=t;this.req=new PipelineRequest;this.ret=new i({readableObjectMode:e.objectMode,autoDestroy:true,read:()=>{const{body:e}=this;if(e&&e.resume){e.resume()}},write:(e,t,n)=>{const{req:r}=this;if(r.push(e,t)||r._readableState.destroyed){n()}else{r[f]=n}},destroy:(e,t)=>{const{body:n,req:r,res:i,ret:s}=this;if(!e&&!s._readableState.endEmitted){e=new u}l.destroy(n,e);l.destroy(r,e);l.destroy(i,e);t(e)}}).on("prefinish",()=>{const{req:e}=this;e.push(null)});this.res=null}onHeaders(e,t,n){const{opaque:r,handler:i}=this;if(e<200){return}this.res=new PipelineResponse(n);let s;try{this.handler=null;s=this.runInAsyncScope(i,null,{statusCode:e,headers:l.parseHeaders(t),opaque:r,body:this.res})}catch(e){this.res.on("error",l.nop);throw e}if(!s||typeof s.on!=="function"){throw new a("expected Readable")}s.on("data",e=>{const{ret:t,body:n}=this;if(!t.push(e)&&n.pause){n.pause()}}).on("error",e=>{const{ret:t}=this;l.destroy(t,e)}).on("end",()=>{const{ret:e}=this;e.push(null)}).on("close",()=>{const{ret:e}=this;if(!e._readableState.ended){l.destroy(e,new u)}});this.body=s}onData(e){const{res:t}=this;if(t._readableState.destroyed){return}return t.push(e)}onComplete(e){const{res:t}=this;if(t._readableState.destroyed){return}t.push(null)}onError(e){const{ret:t}=this;this.handler=null;l.destroy(t,e)}}function pipeline(e,t,n){try{const r=new PipelineHandler(t,n);const{path:i,method:o,headers:a,idempotent:u,servername:l,signal:c,requestTimeout:f}=t;e.dispatch({path:i,method:o,body:r.req,headers:a,idempotent:u,servername:l,signal:c,requestTimeout:f},r);return r.ret}catch(e){return(new s).destroy(e)}}e.exports={pipeline:pipeline,PipelineHandler:PipelineHandler}},209:function(e,t,n){"use strict";const r=n(932);const i=new WeakMap;const s=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let n;let s=false;let o=0;const a=e.displayName||e.name||"<anonymous>";const u=function(...r){i.set(u,++o);if(s){if(t.throw===true){throw new Error(`Function \`${a}\` can only be called once`)}return n}s=true;n=e.apply(this,r);e=null;return n};r(u,e);i.set(u,o);return u};e.exports=s;e.exports.default=s;e.exports.callCount=(e=>{if(!i.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return i.get(e)})},210:function(e,t,n){"use strict";const r=n(622);const i=n(625);const s=n(501);const o=n(724);const a=process.platform==="win32";const u=/\.(?:com|exe)$/i;const l=/node_modules[\\\/].bin[\\\/][^\\\/]+\.cmd$/i;function detectShebang(e){e.file=i(e);const t=e.file&&o(e.file);if(t){e.args.unshift(e.file);e.command=t;return i(e)}return e.file}function parseNonShell(e){if(!a){return e}const t=detectShebang(e);const n=!u.test(t);if(e.options.forceShell||n){const n=l.test(t);e.command=r.normalize(e.command);e.command=s.command(e.command);e.args=e.args.map(e=>s.argument(e,n));const i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parse(e,t,n){if(t&&!Array.isArray(t)){n=t;t=null}t=t?t.slice(0):[];n=Object.assign({},n);const r={command:e,args:t,options:n,file:undefined,original:{command:e,args:t}};return n.shell?r:parseNonShell(r)}e.exports=parse},222:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getField=t.mapJson=t.mapDates=t.unpack=t.isInputArgType=t.selectionToFields=t.transformDocument=t.makeDocument=t.Arg=t.Args=t.Field=t.PrismaClientValidationError=t.Document=void 0;const i=r(n(304));const s=r(n(161));const o=n(624);const a=n(563);const u=n(753);const l=n(377);const c=n(491);const f=n(784);const d=n(320);const p=r(n(437));const h=n(450);const m=r(n(971));const g=n(768);const y=2;class Document{constructor(e,t){this.type=e;this.children=t;this.printFieldError=(({error:e,path:t},n,r)=>{if(e.type==="emptySelect"){const t=r?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`select`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} must not be empty.${t}`}if(e.type==="emptyInclude"){if(n.length===0){return`${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} does not have any relation and therefore can't have an ${i.default.redBright("`include`")} statement.`}const t=r?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`include`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} must not be empty.${t}`}if(e.type==="noTrueSelect"){const t=r?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`select`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} needs ${i.default.bold("at least one truthy value")}.`}if(e.type==="includeAndSelect"){return`Please ${i.default.bold("either")} use ${i.default.greenBright("`include`")} or ${i.default.greenBright("`select`")}, but ${i.default.redBright("not both")} at the same time.`}if(e.type==="invalidFieldName"){const t=e.isInclude?"include":"select";const s=e.isIncludeScalar?"Invalid scalar":"Unknown";const o=r?"":e.isInclude&&n.length===0?`\nThis model has no relations, so you can't use ${i.default.redBright("include")} with it.`:` Available options are listed in ${i.default.greenBright.dim("green")}.`;let a=`${s} field ${i.default.redBright(`\`${e.providedName}\``)} for ${i.default.bold(t)} statement on model ${i.default.bold.white(e.modelName)}.${o}`;if(e.didYouMean){a+=` Did you mean ${i.default.greenBright(`\`${e.didYouMean}\``)}?`}if(e.isIncludeScalar){a+=`\nNote, that ${i.default.bold("include")} statements only accept relation fields.`}return a}if(e.type==="invalidFieldType"){const t=`Invalid value ${i.default.redBright(`${p.default(e.providedValue)}`)} of type ${i.default.redBright(o.getGraphQLType(e.providedValue,undefined))} for field ${i.default.bold(`${e.fieldName}`)} on model ${i.default.bold.white(e.modelName)}. Expected either ${i.default.greenBright("true")} or ${i.default.greenBright("false")}.`;return t}});this.printArgError=(({error:e,path:t},n,r)=>{if(e.type==="invalidName"){let s=`Unknown arg ${i.default.redBright(`\`${e.providedName}\``)} in ${i.default.bold(t.join("."))} for type ${i.default.bold(e.outputType?e.outputType.name:o.getInputTypeName(e.originalType))}.`;if(e.didYouMeanField){s+=`\n→ Did you forget to wrap it with \`${i.default.greenBright("select")}\`? ${i.default.dim("e.g. "+i.default.greenBright(`{ select: { ${e.providedName}: ${e.providedValue} } }`))}`}else if(e.didYouMeanArg){s+=` Did you mean \`${i.default.greenBright(e.didYouMeanArg)}\`?`;if(!n&&!r){s+=` ${i.default.dim("Available args:")}\n`+o.stringifyInputType(e.originalType,true)}}else{if(e.originalType.fields.length===0){s+=` The field ${i.default.bold(e.originalType.name)} has no arguments.`}else if(!n&&!r){s+=` Available args:\n\n`+o.stringifyInputType(e.originalType,true)}}return s}if(e.type==="invalidType"){let t=p.default(e.providedValue,{indent:"  "});const n=t.split("\n").length>1;if(n){t=`\n${t}\n`}if(e.requiredType.bestFittingType.kind==="enum"){return`Argument ${i.default.bold(e.argName)}: Provided value ${i.default.redBright(t)}${n?"":" "}of type ${i.default.redBright(o.getGraphQLType(e.providedValue))} on ${i.default.bold(`prisma.${this.children[0].name}`)} is not a ${i.default.greenBright(o.wrapWithList(o.stringifyGraphQLType(e.requiredType.bestFittingType.kind),e.requiredType.bestFittingType.isList))}.\n→ Possible values: ${e.requiredType.bestFittingType.type.values.map(t=>i.default.greenBright(`${o.stringifyGraphQLType(e.requiredType.bestFittingType.type)}.${t}`)).join(", ")}`}let r=".";if(isInputArgType(e.requiredType.bestFittingType.type)){r=":\n"+o.stringifyInputType(e.requiredType.bestFittingType.type)}let s=`${e.requiredType.inputType.map(t=>i.default.greenBright(o.wrapWithList(o.stringifyGraphQLType(t.type),e.requiredType.bestFittingType.isList))).join(" or ")}${r}`;const a=e.requiredType.inputType.length===2&&e.requiredType.inputType.find(e=>isInputArgType(e.type))||null;if(a){s+=`\n`+o.stringifyInputType(a.type,true)}return`Argument ${i.default.bold(e.argName)}: Got invalid value ${i.default.redBright(t)}${n?"":" "}on ${i.default.bold(`prisma.${this.children[0].name}`)}. Provided ${i.default.redBright(o.getGraphQLType(e.providedValue))}, expected ${s}`}if(e.type==="invalidNullArg"){const n=t.length===1&&t[0]===e.name?"":` for ${i.default.bold(`${t.join(".")}`)}`;const r=` Please use ${i.default.bold.greenBright("undefined")} instead.`;return`Argument ${i.default.greenBright(e.name)}${n} must not be ${i.default.bold("null")}.${r}`}if(e.type==="missingArg"){const n=t.length===1&&t[0]===e.missingName?"":` for ${i.default.bold(`${t.join(".")}`)}`;return`Argument ${i.default.greenBright(e.missingName)}${n} is missing.`}if(e.type==="atLeastOne"){const n=r?"":` Available args are listed in ${i.default.dim.green("green")}.`;return`Argument ${i.default.bold(t.join("."))} of type ${i.default.bold(e.inputType.name)} needs ${i.default.greenBright("at least one")} argument.${n}`}if(e.type==="atMostOne"){const n=r?"":` Please choose one. ${i.default.dim("Available args:")} \n${o.stringifyInputType(e.inputType,true)}`;return`Argument ${i.default.bold(t.join("."))} of type ${i.default.bold(e.inputType.name)} needs ${i.default.greenBright("exactly one")} argument, but you provided ${e.providedKeys.map(e=>i.default.redBright(e)).join(" and ")}.${n}`}});this.type=e;this.children=t}toString(){return`${this.type} {\n${s.default(this.children.map(String).join("\n"),y)}\n}`}validate(e,t=false,n,r,a){if(!e){e={}}const u=this.children.filter(e=>e.hasInvalidChild||e.hasInvalidArg);if(u.length===0){return}const l=[];const c=[];const p=e&&e.select?"select":e.include?"include":undefined;for(const e of u){const n=e.collectErrors(p);l.push(...n.fieldErrors.map(e=>({...e,path:t?e.path:e.path.slice(1)})));c.push(...n.argErrors.map(e=>({...e,path:t?e.path:e.path.slice(1)})))}const h=this.children[0].name;const g=t?this.type:h;const y=[];const b=[];const w=[];for(const t of l){const n=this.normalizePath(t.path,e).join(".");if(t.error.type==="invalidFieldName"){y.push(n);const e=t.error.outputType;const{isInclude:r}=t.error;e.fields.filter(e=>r?e.outputType.kind==="object":true).forEach(e=>{const t=n.split(".");w.push({path:`${t.slice(0,t.length-1).join(".")}.${e.name}`,type:"true",isRequired:false})})}else if(t.error.type==="includeAndSelect"){y.push("select");y.push("include")}else{b.push(n)}if(t.error.type==="emptySelect"||t.error.type==="noTrueSelect"||t.error.type==="emptyInclude"){const n=this.normalizePath(t.path,e);const r=n.slice(0,n.length-1).join(".");const i=t.error.field.outputType.type;i.fields.filter(e=>t.error.type==="emptyInclude"?e.outputType.kind==="object":true).forEach(e=>{w.push({path:`${r}.${e.name}`,type:"true",isRequired:false})})}}for(const t of c){const n=this.normalizePath(t.path,e).join(".");if(t.error.type==="invalidName"){y.push(n)}else if(t.error.type!=="missingArg"&&t.error.type!=="atLeastOne"){b.push(n)}else if(t.error.type==="missingArg"){const e=t.error.missingType.length===1?t.error.missingType[0].type:t.error.missingType.map(e=>o.getInputTypeName(e.type)).join(" | ");w.push({path:n,type:o.inputTypeToJson(e,true,n.split("where.").length===2),isRequired:t.error.missingType[0].isRequired})}}const v=o=>{const a=c.some(e=>e.error.type==="missingArg"&&e.error.missingType[0].isRequired);const u=c.some(e=>e.error.type==="missingArg"&&!e.error.missingType[0].isRequired);const p=u||a;let v="";if(a){v+=`\n${i.default.dim("Note: Lines with ")}${i.default.reset.greenBright("+")} ${i.default.dim("are required")}`}if(u){if(v.length===0){v="\n"}if(a){v+=i.default.dim(`, lines with ${i.default.green("?")} are optional`)}else{v+=i.default.dim(`Note: Lines with ${i.default.green("?")} are optional`)}v+=i.default.dim(".")}const _=`${c.filter(e=>e.error.type!=="missingArg"||e.error.missingType[0].isRequired).map(e=>this.printArgError(e,p,r==="minimal")).join("\n")}\n${l.map(e=>this.printFieldError(e,w,r==="minimal")).join("\n")}`;if(r==="minimal"){return m.default(_)}const{stack:E,indent:T,afterLines:C}=d.printStack({callsite:o,originalMethod:n||g,showColors:r&&r==="pretty",isValidationError:true});let S={ast:t?{[h]:e}:e,keyPaths:y,valuePaths:b,missingItems:w};if(n===null||n===void 0?void 0:n.endsWith("aggregate")){S=transformAggregatePrintJsonArgs(S)}const P=`${E}${s.default(f.printJsonWithErrors(S),T).slice(T)}${i.default.dim(C)}\n\n${_}${v}\n`;if(process.env.NO_COLOR||r==="colorless"){return m.default(P)}return P};const _=new PrismaClientValidationError(v(a));if(process.env.NODE_ENV!=="production"){Object.defineProperty(_,"render",{get:()=>v,enumerable:false})}throw _}normalizePath(e,t){const n=e.slice();const r=[];let i;let s=t;while((i=n.shift())!==undefined){if(!Array.isArray(s)&&i===0){continue}if(i==="select"){if(!s[i]){s=s.include}else{s=s[i]}}else if(s&&s[i]){s=s[i]}r.push(i)}return r}}t.Document=Document;class PrismaClientValidationError extends Error{}t.PrismaClientValidationError=PrismaClientValidationError;class Field{constructor({name:e,args:t,children:n,error:r,schemaField:i}){this.name=e;this.args=t;this.children=n;this.error=r;this.schemaField=i;this.hasInvalidChild=n?n.some(e=>Boolean(e.error||e.hasInvalidArg||e.hasInvalidChild)):false;this.hasInvalidArg=t?t.hasInvalidArg:false}toString(){let e=this.name;if(this.error){return e+" # INVALID_FIELD"}if(this.args&&this.args.args&&this.args.args.length>0){if(this.args.args.length===1){e+=`(${this.args.toString()})`}else{e+=`(\n${s.default(this.args.toString(),y)}\n)`}}if(this.children){e+=` {\n${s.default(this.children.map(String).join("\n"),y)}\n}`}return e}collectErrors(e="select"){const t=[];const n=[];if(this.error){t.push({path:[this.name],error:this.error})}if(this.children){for(const r of this.children){const i=r.collectErrors(e);t.push(...i.fieldErrors.map(t=>({...t,path:[this.name,e,...t.path]})));n.push(...i.argErrors.map(t=>({...t,path:[this.name,e,...t.path]})))}}if(this.args){n.push(...this.args.collectErrors().map(e=>({...e,path:[this.name,...e.path]})))}return{fieldErrors:t,argErrors:n}}}t.Field=Field;class Args{constructor(e=[]){this.args=e;this.hasInvalidArg=e?e.some(e=>Boolean(e.hasError)):false}toString(){if(this.args.length===0){return""}return`${this.args.map(e=>e.toString()).filter(e=>e).join("\n")}`}collectErrors(){if(!this.hasInvalidArg){return[]}return g.flatMap(this.args,e=>e.collectErrors())}}t.Args=Args;function stringify(e,t,n,r,i){if(i){if(e&&e.values&&e.__prismaRawParamaters__){return JSON.stringify(e.values)}return JSON.stringify(JSON.stringify(e))}if(e===undefined){return null}if(e===null){return"null"}if(r&&typeof e==="string"){return e}if(r&&Array.isArray(e)){return`[${e.join(", ")}]`}return JSON.stringify(e,t,n)}class Arg{constructor({key:e,value:t,argType:n,isEnum:r=false,error:i,schemaArg:s}){this.key=e;this.value=t;this.argType=n;this.isEnum=r;this.error=i;this.schemaArg=s;this.isNullable=(s===null||s===void 0?void 0:s.inputType.reduce((e,t)=>e&&t.isNullable,true))||false;this.hasError=Boolean(i)||(t instanceof Args?t.hasInvalidArg:false)||Array.isArray(t)&&t.some(e=>e instanceof Args?e.hasInvalidArg:false)}_toString(e,t){if(typeof e==="undefined"){return undefined}if(e instanceof Args){return`${t}: {\n${s.default(e.toString(),2)}\n}`}if(Array.isArray(e)){if(this.argType==="Json"){return`${t}: ${stringify(e,null,2,this.isEnum,this.argType==="Json")}`}const n=!e.some(e=>typeof e==="object");return`${t}: [${n?"":"\n"}${s.default(e.map(e=>{if(e instanceof Args){return`{\n${s.default(e.toString(),y)}\n}`}return stringify(e,null,2,this.isEnum)}).join(`,${n?" ":"\n"}`),n?0:y)}${n?"":"\n"}]`}return`${t}: ${stringify(e,null,2,this.isEnum,this.argType==="Json")}`}toString(){return this._toString(this.value,this.key)}collectErrors(){if(!this.hasError){return[]}const e=[];if(this.error){e.push({error:this.error,path:[this.key]})}if(Array.isArray(this.value)){e.push(...g.flatMap(this.value,(e,t)=>{if(!e.collectErrors){return[]}return e.collectErrors().map(e=>{return{...e,path:[this.key,t,...e.path]}})}))}if(this.value instanceof Args){e.push(...this.value.collectErrors().map(e=>({...e,path:[this.key,...e.path]})))}return e}}t.Arg=Arg;function makeDocument({dmmf:e,rootTypeName:t,rootField:n,select:r}){if(!r){r={}}const i=t==="query"?e.queryType:e.mutationType;const s={args:[],outputType:{isList:false,isRequired:true,type:i,kind:"object"},name:t};const o=selectionToFields(e,{[n]:r},s,[t]);return new Document(t,o)}t.makeDocument=makeDocument;function transformDocument(e){function transformWhereArgs(e){return new Args(e.args.map(e=>{var t;if(isArgsArray(e.value)){const t=e.value.map(e=>{return transformWhereArgs(e)});return new Arg({...e,value:t})}else if(e.value instanceof Args){if(e.schemaArg&&!e.schemaArg.isRelationFilter){for(let t=e.value.args.length;t--;){const n=e.value.args[t];if(n.key==="not"&&(typeof n.value!=="object"||n.argType==="DateTime")){n.value=new Args([new Arg({key:"equals",value:n.value,argType:n.argType,schemaArg:n.schemaArg})])}if(n.key==="notIn"){let r=e.value.args.find(e=>e.key==="not");if(!r){r=new Arg({key:"not",value:new Args,argType:n.argType,schemaArg:n.schemaArg});e.value.args.push(r)}if(typeof r.value!=="object"||r.argType==="DateTime"||r.value===null){r.value=new Args([new Arg({key:"equals",value:r.value,argType:r.argType,schemaArg:r.schemaArg})])}const i=r.value.args.findIndex(e=>e.key==="in");const s=new Arg({key:"in",value:n.value,argType:n.argType,schemaArg:n.schemaArg});if(i>-1){s.value.push(...r.value.args[i].value);r.value.args[i]=s}else{r.value.args.push(s)}e.value.args.splice(t,1)}}}}if(e.isEnum||typeof e.argType==="string"&&o.isScalar(e.argType)){if(typeof e.value!=="object"||e.argType==="DateTime"||e.argType==="Json"||e.value===null){e.value=new Args([new Arg({key:"equals",value:e.value,argType:e.argType,schemaArg:e.schemaArg})])}}else if(typeof e.value==="object"&&((t=e.schemaArg)===null||t===void 0?void 0:t.inputType[0].kind)==="object"&&e.key!=="is"){if(e.value instanceof Args){if(!e.value.args.find(e=>e.key==="is")){e.value=new Args([new Arg({key:"is",value:e.value,argType:e.argType,schemaArg:e.schemaArg})])}}}return e}))}return h.visit(e,{Arg:{enter(e){const{argType:t,schemaArg:n}=e;if(!t){return undefined}if(isInputArgType(t)){if(t.isWhereType&&n){let{value:t}=e;if(isArgsArray(e.value)){t=e.value.map(e=>transformWhereArgs(e))}else if(e.value instanceof Args){t=transformWhereArgs(e.value)}return new Arg({...e,value:t})}}return undefined}}})}t.transformDocument=transformDocument;function isArgsArray(e){if(Array.isArray(e)){return e.every(e=>e instanceof Args)}return false}function getFilterArgName(e,t){if(t==="equals"){return e}return`${e}_${convertToSnakeCase(t)}`}function convertToSnakeCase(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function selectionToFields(e,t,n,r){const i=n.outputType.type;return Object.entries(t).reduce((t,[n,s])=>{const u=i.fieldMap?i.fieldMap[n]:i.fields.find(e=>e.name===n);if(!u){t.push(new Field({name:n,children:[],error:{type:"invalidFieldName",modelName:i.name,providedName:n,didYouMean:o.getSuggestion(n,i.fields.map(e=>e.name)),outputType:i}}));return t}if(typeof s!=="boolean"&&u.outputType.kind==="scalar"&&u.name!=="executeRaw"&&u.name!=="queryRaw"&&i.name!=="Query"&&!n.startsWith("aggregate")&&u.name!=="count"){t.push(new Field({name:n,children:[],error:{type:"invalidFieldType",modelName:i.name,fieldName:n,providedValue:s}}));return t}if(s===false){return t}const l={name:u.name,fields:u.args};const f=typeof s==="object"?c.omit(s,["include","select"]):undefined;const d=f?objectToArgs(f,l,[],typeof u==="string"?undefined:u.outputType.type):undefined;const p=u.outputType.kind==="object";if(s){if(s.select&&s.include){t.push(new Field({name:n,children:[new Field({name:"include",args:new Args,error:{type:"includeAndSelect",field:u}})]}))}else if(s.include){const e=Object.keys(s.include);if(e.length===0){t.push(new Field({name:n,children:[new Field({name:"include",args:new Args,error:{type:"emptyInclude",field:u}})]}));return t}if(u.outputType.kind==="object"){const n=u.outputType.type;const r=n.fields.filter(e=>e.outputType.kind==="object").map(e=>e.name);const i=e.filter(e=>!r.includes(e));if(i.length>0){t.push(...i.map(e=>new Field({name:e,children:[new Field({name:e,args:new Args,error:{type:"invalidFieldName",modelName:n.name,outputType:n,providedName:e,didYouMean:o.getSuggestion(e,r)||undefined,isInclude:true,isIncludeScalar:n.fields.some(t=>t.name===e)}})]})));return t}}}else if(s.select){const e=Object.values(s.select);if(e.length===0){t.push(new Field({name:n,children:[new Field({name:"select",args:new Args,error:{type:"emptySelect",field:u}})]}));return t}const r=e.filter(e=>e);if(r.length===0){t.push(new Field({name:n,children:[new Field({name:"select",args:new Args,error:{type:"noTrueSelect",field:u}})]}));return t}}}const h=p?getDefaultSelection(u.outputType.type):null;let m=h;if(s){if(s.select){m=s.select}else if(s.include){m=a.deepExtend(h,s.include)}}const g=m!==false&&p?selectionToFields(e,m,u,[...r,n]):undefined;t.push(new Field({name:n,args:d,children:g,schemaField:u}));return t},[])}t.selectionToFields=selectionToFields;function getDefaultSelection(e){return e.fields.reduce((e,t)=>{if(t.outputType.kind==="scalar"||t.outputType.kind==="enum"){e[t.name]=true}else{if(t.outputType.type.isEmbedded){e[t.name]={select:getDefaultSelection(t.outputType.type)}}}return e},{})}function getInvalidTypeArg(e,t,n,r){const i=new Arg({key:e,value:t,isEnum:r.kind==="enum",argType:r.type,error:{type:"invalidType",providedValue:t,argName:e,requiredType:{inputType:n.inputType,bestFittingType:r}}});return i}function hasCorrectScalarType(e,t,n){const{type:r}=n;const i=t.inputType[0].isList;const s=o.wrapWithList(o.stringifyGraphQLType(r),i);const a=o.getGraphQLType(e,r);if(i&&a==="List<>"){return true}if(s==="Json"){return true}if(a==="DateTime"&&s==="String"){return true}if(a==="List<DateTime>"&&s==="List<String>"){return true}if(a==="UUID"&&s==="String"){return true}if(a==="List<UUID>"&&s==="List<String>"){return true}if(a==="String"&&s==="ID"){return true}if(a==="List<String>"&&s==="List<ID>"){return true}if(s==="List<String>"&&(a==="List<String | UUID>"||a==="List<UUID | String>")){return true}if(a==="Int"&&s==="Float"){return true}if(a==="List<Int>"&&s==="List<Float>"){return true}if(a==="Int"&&s==="Long"){return true}if(a==="List<Int>"&&s==="List<Long>"){return true}if(a===s){return true}if(!n.isRequired&&e===null){return true}return false}const b=e=>l.filterObject(e,(e,t)=>t!==undefined);function valueToArg(e,t,n){const r=n.inputType[0];if(typeof t==="undefined"){if(!r.isRequired){return null}return new Arg({key:e,value:t,isEnum:r.kind==="enum",error:{type:"missingArg",missingName:e,missingType:n.inputType,atLeastOne:false,atMostOne:false}})}if(t===null&&n.inputType.length===1){const e=n.inputType[0];if(isInputArgType(e.type)&&e.type.isOrderType){return null}}const i=n.inputType[0].isNullable||(n.inputType.length>1?n.inputType[1].isNullable:false);const s=n.inputType[0].isRequired||(n.inputType.length>1?n.inputType[1].isRequired:false);if(t===null&&!i&&!s){const i=isInputArgType(n.inputType[0].type)?n.inputType[0].type.atLeastOne:false;if(!i){return new Arg({key:e,value:t,isEnum:r.kind==="enum",error:{type:"invalidNullArg",name:e,invalidType:n.inputType,atLeastOne:false,atMostOne:false}})}}if(!r.isList){const i=n.inputType.map(i=>{if(isInputArgType(i.type)){if(typeof t!=="object"){return getInvalidTypeArg(e,t,n,i)}else{let s=b(t);if(i.type.isWhereType&&s){for(const e of i.type.fields){if(e.nullEqualsUndefined&&s[e.name]===null){delete s[e.name]}}}if(i.type.isOrderType){s=l.filterObject(s,(e,t)=>t!==null)}let o;const a=Object.keys(s||{});const u=a.length;if(u===0&&i.type.atLeastOne){o={type:"atLeastOne",key:e,inputType:i.type}}else if(u>1&&i.type.isOneOf){o={type:"atMostOne",key:e,inputType:i.type,providedKeys:a}}else if(u>1&&i.type.atMostOne){o={type:"atMostOne",key:e,inputType:i.type,providedKeys:a}}return new Arg({key:e,value:s===null?null:objectToArgs(s,i.type,n.inputType),isEnum:r.kind==="enum",error:o,argType:i.type,schemaArg:n})}}else{return scalarToArg(e,t,n,i)}});if(i.length===1){return i[0]}const s=i.find(e=>!e.hasError);if(s){return s}const o=(e,t)=>{if(t===null&&(e==="null"||!isInputArgType(e))){return true}return isInputArgType(e)?typeof t==="object":typeof t!=="object"};if(i.length>1){const e=i.filter(e=>o(e.argType,t));const n=e.length>0?e:i;const r=n.reduce((e,t)=>{const n=t.collectErrors().length;if(n<e.numErrors){return{arg:t,numErrors:n}}return e},{arg:null,numErrors:Infinity});return r.arg}}if(n.inputType.length>1){throw new Error(`List types with union input types are not supported`)}if(!Array.isArray(t)){if(e==="OR"&&n.name==="OR"&&n.isRelationFilter){return scalarToArg(e,t,n,r)}t=[t]}if(r.kind==="enum"||r.kind==="scalar"){return scalarToArg(e,t,n,r)}const o=r.type;const a=o.atLeastOne?t.some(e=>!e||Object.keys(b(e)).length===0):false;let u=a?{inputType:o,key:e,type:"atLeastOne"}:undefined;if(!u){const n=o.isOneOf?t.find(e=>!e||Object.keys(b(e)).length!==1):false;if(n){u={inputType:o,key:e,type:"atMostOne",providedKeys:Object.keys(n)}}}return new Arg({key:e,value:t.map(i=>{if(typeof i!=="object"||!t){return getInvalidTypeArg(e,i,n,r)}return objectToArgs(i,r.type)}),isEnum:false,argType:r.type,schemaArg:n,error:u})}function isInputArgType(e){if(typeof e==="string"){return false}if(e.hasOwnProperty("values")){return false}return true}t.isInputArgType=isInputArgType;function scalarToArg(e,t,n,r){if(hasCorrectScalarType(t,n,r)){return new Arg({key:e,value:t,isEnum:n.inputType[0].kind==="enum",argType:r.type,schemaArg:n})}return getInvalidTypeArg(e,t,n,r)}function objectToArgs(e,t,n,r){const i=b(e);const{fields:s,fieldMap:a}=t;const u=s.filter(e=>e.inputType.some(e=>e.isRequired)).map(e=>[e.name,undefined]);const l=o.unionBy(Object.entries(i||{}),u,e=>e[0]);const c=l.reduce((e,[i,u])=>{const l=a?a[i]:s.find(e=>e.name===i);if(!l){const a=typeof u==="boolean"&&r&&r.fields.some(e=>e.name===i)?i:null;e.push(new Arg({key:i,value:u,error:{type:"invalidName",providedName:i,providedValue:u,didYouMeanField:a,didYouMeanArg:!a&&o.getSuggestion(i,[...s.map(e=>e.name),"select"])||undefined,originalType:t,possibilities:n,outputType:r}}));return e}const c=valueToArg(i,u,l);if(c){e.push(c)}return e},[]);if(l.length===0&&t.atLeastOne||c.find(e=>e.error&&e.error.type==="missingArg")){const e=t.fields.filter(e=>!l.some(([t])=>t===e.name));c.push(...e.map(e=>{const n=e.inputType[0];return new Arg({key:e.name,value:undefined,isEnum:n.kind==="enum",error:{type:"missingArg",missingName:e.name,missingType:e.inputType,atLeastOne:t.atLeastOne||false,atMostOne:t.atMostOne||false}})}))}return new Args(c)}function unpack({document:e,path:t,data:n}){const r=u.deepGet(n,t);if(r==="undefined"){return null}if(typeof r!=="object"){return r}const i=getField(e,t);const s=mapDates({field:i,data:r});return mapJson({field:i,data:s})}t.unpack=unpack;function mapDates({field:e,data:t}){if(!t||typeof t!=="object"||!e.children||!e.schemaField){return t}for(const n of e.children){if(n.schemaField&&n.schemaField.outputType.type==="DateTime"){if(Array.isArray(t)){for(const e of t){if(typeof e[n.name]!=="undefined"){e[n.name]=e[n.name]?new Date(e[n.name]):e[n.name]}}}else{if(typeof t[n.name]!=="undefined"){t[n.name]=t[n.name]?new Date(t[n.name]):t[n.name]}}}if(n.schemaField&&n.schemaField.outputType.kind==="object"){if(Array.isArray(t)){for(const e of t){mapDates({field:n,data:e[n.name]})}}else{mapDates({field:n,data:t[n.name]})}}}return t}t.mapDates=mapDates;function mapJson({field:e,data:t}){if(!t||typeof t!=="object"||!e.children||!e.schemaField){return t}for(const n of e.children){if(n.schemaField&&n.schemaField.outputType.type==="Json"){if(Array.isArray(t)){for(const e of t){if(typeof e[n.name]!=="undefined"){e[n.name]=e[n.name]?JSON.parse(e[n.name]):e[n.name]}}}else{if(typeof t[n.name]!=="undefined"){t[n.name]=t[n.name]?JSON.parse(t[n.name]):t[n.name]}}}if(n.schemaField&&n.schemaField.outputType.kind==="object"){if(Array.isArray(t)){for(const e of t){mapJson({field:n,data:e[n.name]})}}else{mapJson({field:n,data:t[n.name]})}}}return t}t.mapJson=mapJson;function getField(e,t){const n=t.slice();const r=n.shift();let i=e.children.find(e=>e.name===r);if(!i){throw new Error(`Could not find field ${r} in document ${e}`)}while(n.length>0){const e=n.shift();if(!i.children){throw new Error(`Can't get children for field ${i} with child ${e}`)}const t=i.children.find(t=>t.name===e);if(!t){throw new Error(`Can't find child ${e} of field ${i}`)}i=t}return i}t.getField=getField;function removeSelectFromPath(e){return e.split(".").filter(e=>e!=="select").join(".")}function removeSelectFromObject(e){const t=Object.prototype.toString.call(e);if(t==="[object Object]"){const t={};for(const n in e){if(n==="select"){for(const n in e["select"]){t[n]=removeSelectFromObject(e["select"][n])}}else{t[n]=removeSelectFromObject(e[n])}}return t}return e}function transformAggregatePrintJsonArgs({ast:e,keyPaths:t,missingItems:n,valuePaths:r}){const i=t.map(removeSelectFromPath);const s=r.map(removeSelectFromPath);const o=n.map(e=>({path:removeSelectFromPath(e.path),isRequired:e.isRequired,type:e.type}));const a=removeSelectFromObject(e);return{ast:a,keyPaths:i,missingItems:o,valuePaths:s}}},228:function(e,t,n){var r=n(357);var i=n(549);var s=/^win/i.test(process.platform);var o=n(614);if(typeof o!=="function"){o=o.EventEmitter}var a;if(process.__signal_exit_emitter__){a=process.__signal_exit_emitter__}else{a=process.__signal_exit_emitter__=new o;a.count=0;a.emitted={}}if(!a.infinite){a.setMaxListeners(Infinity);a.infinite=true}e.exports=function(e,t){r.equal(typeof e,"function","a callback must be provided for exit handler");if(l===false){load()}var n="exit";if(t&&t.alwaysLast){n="afterexit"}var i=function(){a.removeListener(n,e);if(a.listeners("exit").length===0&&a.listeners("afterexit").length===0){unload()}};a.on(n,e);return i};e.exports.unload=unload;function unload(){if(!l){return}l=false;i.forEach(function(e){try{process.removeListener(e,u[e])}catch(e){}});process.emit=f;process.reallyExit=c;a.count-=1}function emit(e,t,n){if(a.emitted[e]){return}a.emitted[e]=true;a.emit(e,t,n)}var u={};i.forEach(function(e){u[e]=function listener(){var t=process.listeners(e);if(t.length===a.count){unload();emit("exit",null,e);emit("afterexit",null,e);if(s&&e==="SIGHUP"){e="SIGINT"}process.kill(process.pid,e)}}});e.exports.signals=function(){return i};e.exports.load=load;var l=false;function load(){if(l){return}l=true;a.count+=1;i=i.filter(function(e){try{process.on(e,u[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var c=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);c.call(process,process.exitCode)}var f=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var n=f.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return n}else{return f.apply(this,arguments)}}},230:function(e){"use strict";e.exports=(e=>{const t=typeof e==="string"?"\n":"\n".charCodeAt();const n=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===n){e=e.slice(0,e.length-1)}return e})},248:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DMMFClass=void 0;const r=n(624);class DMMFClass{constructor({datamodel:e,schema:t,mappings:n}){this.outputTypeMap={};this.outputTypeToMergedOutputType=(e=>{const t=this.modelMap[e.name];return{...e,isEmbedded:t?t.isEmbedded:false,fields:e.fields}});this.datamodel=e;this.schema=t;this.mappings=n;this.enumMap=this.getEnumMap();this.queryType=this.getQueryType();this.mutationType=this.getMutationType();this.modelMap=this.getModelMap();this.outputTypes=this.getOutputTypes();this.outputTypeMap=this.getMergedOutputTypeMap();this.resolveOutputTypes(this.outputTypes);this.inputTypes=this.schema.inputTypes;this.inputTypeMap=this.getInputTypeMap();this.resolveInputTypes(this.inputTypes);this.resolveFieldArgumentTypes(this.outputTypes,this.inputTypeMap);this.mappingsMap=this.getMappingsMap();this.queryType=this.outputTypeMap.Query;this.mutationType=this.outputTypeMap.Mutation;this.outputTypes=this.outputTypes;this.rootFieldMap=this.getRootFieldMap()}resolveOutputTypes(e){for(const t of e){for(const e of t.fields){if(typeof e.outputType.type==="string"&&!r.ScalarTypeTable[e.outputType.type]){e.outputType.type=this.outputTypeMap[e.outputType.type]||this.enumMap[e.outputType.type]||e.outputType.type}}t.fieldMap=r.keyBy(t.fields,"name")}}resolveInputTypes(e){for(const t of e){for(const e of t.fields){const t=e.inputType[0].type;if(typeof t==="string"&&!r.ScalarTypeTable[t]&&(this.inputTypeMap[t]||this.enumMap[t])){e.inputType[0].type=this.inputTypeMap[t]||this.enumMap[t]||e.inputType[0].type}const n=e.inputType[1]&&e.inputType[1].type;if(typeof n==="string"&&!r.ScalarTypeTable[n]&&(this.inputTypeMap[n]||this.enumMap[n])){e.inputType[1].type=this.inputTypeMap[n]||this.enumMap[n]||e.inputType[1].type}}t.fieldMap=r.keyBy(t.fields,"name")}}resolveFieldArgumentTypes(e,t){for(const n of e){for(const e of n.fields){for(const n of e.args){const e=n.inputType[0].type;if(typeof e==="string"&&!r.ScalarTypeTable[e]){n.inputType[0].type=t[e]||this.enumMap[e]||n.inputType[0].type}const i=n.inputType[1]&&n.inputType[1].type;if(i&&typeof i==="string"&&!r.ScalarTypeTable[i]){n.inputType[1].type=t[i]||this.enumMap[i]||n.inputType[1].type}}}}}getQueryType(){return this.schema.outputTypes.find(e=>e.name==="Query")}getMutationType(){return this.schema.outputTypes.find(e=>e.name==="Mutation")}getOutputTypes(){return this.schema.outputTypes.map(this.outputTypeToMergedOutputType)}getEnumMap(){return r.keyBy(this.schema.enums,"name")}getModelMap(){return r.keyBy(this.datamodel.models,"name")}getMergedOutputTypeMap(){return r.keyBy(this.outputTypes,"name")}getInputTypeMap(){return r.keyBy(this.schema.inputTypes,"name")}getMappingsMap(){return r.keyBy(this.mappings,"model")}getRootFieldMap(){return r.keyBy2(this.queryType.fields,this.mutationType.fields,"name")}}t.DMMFClass=DMMFClass},264:function(e,t,n){const r=n(867);const i=n(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.colors=[6,2,3,4,5,1];try{const e=n(128);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>{return t.toUpperCase()});let r=process.env[t];if(/^(yes|on|true|enabled)$/i.test(r)){r=true}else if(/^(no|off|false|disabled)$/i.test(r)){r=false}else if(r==="null"){r=null}else{r=Number(r)}e[n]=r;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:r}=this;if(r){const r=this.color;const i="[3"+(r<8?r:"8;5;"+r);const s=`  ${i};1m${n} [0m`;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++){e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}}e.exports=n(782)(t);const{formatters:s}=e.exports;s.o=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},267:function(e){e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(t){wrapper[t]=e[t]});return wrapper;function wrapper(){var t=new Array(arguments.length);for(var n=0;n<t.length;n++){t[n]=arguments[n]}var r=e.apply(this,t);var i=t[t.length-1];if(typeof r==="function"&&r!==i){Object.keys(i).forEach(function(e){r[e]=i[e]})}return r}}},270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(749);Object.defineProperty(t,"getPlatform",{enumerable:true,get:function(){return r.getPlatform}});Object.defineProperty(t,"getos",{enumerable:true,get:function(){return r.getos}});var i=n(492);Object.defineProperty(t,"mayBeCompatible",{enumerable:true,get:function(){return i.mayBeCompatible}});var s=n(492);Object.defineProperty(t,"platforms",{enumerable:true,get:function(){return s.platforms}})},278:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.omit=void 0;function omit(e,t){return Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>{t[n]=e[n];return t},{})}t.omit=omit},293:function(e){"use strict";const t=["stdin","stdout","stderr"];const n=e=>t.some(t=>e[t]!==undefined);const r=e=>{if(!e){return}const{stdio:r}=e;if(r===undefined){return t.map(t=>e[t])}if(n(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(e=>`\`${e}\``).join(", ")}`)}if(typeof r==="string"){return r}if(!Array.isArray(r)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``)}const i=Math.max(r.length,t.length);return Array.from({length:i},(e,t)=>r[t])};e.exports=r;e.exports.node=(e=>{const t=r(e);if(t==="ipc"){return"ipc"}if(t===undefined||typeof t==="string"){return[t,t,t,"ipc"]}if(t.includes("ipc")){return t}return[...t,"ipc"]})},297:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGRTMAX=t.getRealtimeSignals=void 0;const n=function(){const e=s-i+1;return Array.from({length:e},r)};t.getRealtimeSignals=n;const r=function(e,t){return{name:`SIGRT${t+1}`,number:i+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}};const i=34;const s=64;t.SIGRTMAX=s},302:function(e,t,n){"use strict";const r=n(38);const i=n(838);const s=n(306);function undici(e,t){return new i(e,t)}undici.Pool=i;undici.Client=r;undici.errors=s;e.exports=undici},303:function(e){e.exports=require("async_hooks")},304:function(e,t,n){"use strict";const r=n(96);const{stdout:i,stderr:s}=n(128);const{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:a}=n(49);const{isArray:u}=Array;const l=["ansi","ansi","ansi256","ansi16m"];const c=Object.create(null);const f=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const n=i?i.level:0;e.level=t.level===undefined?n:t.level};class ChalkClass{constructor(e){return d(e)}}const d=e=>{const t={};f(t,e);t.template=((...e)=>w(t.template,...e));Object.setPrototypeOf(t,Chalk.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=(()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")});t.template.Instance=ChalkClass;return t.template};function Chalk(e){return d(e)}for(const[e,t]of Object.entries(r)){c[e]={get(){const n=g(this,m(t.open,t.close,this._styler),this._isEmpty);Object.defineProperty(this,e,{value:n});return n}}}c.visible={get(){const e=g(this,this._styler,true);Object.defineProperty(this,"visible",{value:e});return e}};const p=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of p){c[e]={get(){const{level:t}=this;return function(...n){const i=m(r.color[l[t]][e](...n),r.color.close,this._styler);return g(this,i,this._isEmpty)}}}}for(const e of p){const t="bg"+e[0].toUpperCase()+e.slice(1);c[t]={get(){const{level:t}=this;return function(...n){const i=m(r.bgColor[l[t]][e](...n),r.bgColor.close,this._styler);return g(this,i,this._isEmpty)}}}}const h=Object.defineProperties(()=>{},{...c,level:{enumerable:true,get(){return this._generator.level},set(e){this._generator.level=e}}});const m=(e,t,n)=>{let r;let i;if(n===undefined){r=e;i=t}else{r=n.openAll+e;i=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:i,parent:n}};const g=(e,t,n)=>{const r=(...e)=>{if(u(e[0])&&u(e[0].raw)){return y(r,w(r,...e))}return y(r,e.length===1?""+e[0]:e.join(" "))};Object.setPrototypeOf(r,h);r._generator=e;r._styler=t;r._isEmpty=n;return r};const y=(e,t)=>{if(e.level<=0||!t){return e._isEmpty?"":t}let n=e._styler;if(n===undefined){return t}const{openAll:r,closeAll:i}=n;if(t.indexOf("")!==-1){while(n!==undefined){t=o(t,n.close,n.open);n=n.parent}}const s=t.indexOf("\n");if(s!==-1){t=a(t,i,r,s)}return r+t+i};let b;const w=(e,...t)=>{const[r]=t;if(!u(r)||!u(r.raw)){return t.join(" ")}const i=t.slice(1);const s=[r.raw[0]];for(let e=1;e<r.length;e++){s.push(String(i[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]))}if(b===undefined){b=n(935)}return b(e,s.join(""))};Object.defineProperties(Chalk.prototype,c);const v=Chalk();v.supportsColor=i;v.stderr=Chalk({level:s?s.level:0});v.stderr.supportsColor=s;e.exports=v},306:function(e){"use strict";class UndiciError extends Error{constructor(e){super(e);this.name="UndiciError";this.code="UND_ERR"}}class HeadersTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,HeadersTimeoutError);this.name="HeadersTimeoutError";this.message=e||"Headers Timeout Error";this.code="UND_ERR_HEADERS_TIMEOUT"}}class SocketTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,SocketTimeoutError);this.name="SocketTimeoutError";this.message=e||"Socket Timeout Error";this.code="UND_ERR_SOCKET_TIMEOUT"}}class RequestTimeoutError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,RequestTimeoutError);this.name="RequestTimeoutError";this.message=e||"Request Timeout Error";this.code="UND_ERR_REQUEST_TIMEOUT"}}class InvalidArgumentError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InvalidArgumentError);this.name="InvalidArgumentError";this.message=e||"Invalid Argument Error";this.code="UND_ERR_INVALID_ARG"}}class InvalidReturnValueError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InvalidReturnValueError);this.name="InvalidReturnValueError";this.message=e||"Invalid Return Value Error";this.code="UND_ERR_INVALID_RETURN_VALUE"}}class RequestAbortedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,RequestAbortedError);this.name="RequestAbortedError";this.message=e||"Request aborted";this.code="UND_ERR_ABORTED"}}class InformationalError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,InformationalError);this.name="InformationalError";this.message=e||"Request information";this.code="UND_ERR_INFO"}}class ContentLengthMismatchError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ContentLengthMismatchError);this.name="ContentLengthMismatchError";this.message=e||"Request body length does not match content-length header";this.code="UND_ERR_CONTENT_LENGTH_MISMATCH"}}class ClientDestroyedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ClientDestroyedError);this.name="ClientDestroyedError";this.message=e||"The client is destroyed";this.code="UND_ERR_DESTROYED"}}class ClientClosedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,ClientClosedError);this.name="ClientClosedError";this.message=e||"The client is closed";this.code="UND_ERR_CLOSED"}}class SocketError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,SocketError);this.name="SocketError";this.message=e||"Socket error";this.code="UND_ERR_SOCKET"}}class NotSupportedError extends UndiciError{constructor(e){super(e);Error.captureStackTrace(this,NotSupportedError);this.name="NotSupportedError";this.message=e||"Not supported error";this.code="UND_ERR_NOT_SUPPORTED"}}e.exports={UndiciError:UndiciError,SocketTimeoutError:SocketTimeoutError,HeadersTimeoutError:HeadersTimeoutError,RequestTimeoutError:RequestTimeoutError,ContentLengthMismatchError:ContentLengthMismatchError,ContentLengthMismatch:ContentLengthMismatchError,InvalidArgumentError:InvalidArgumentError,InvalidReturnValueError:InvalidReturnValueError,RequestAbortedError:RequestAbortedError,ClientDestroyedError:ClientDestroyedError,ClientClosedError:ClientClosedError,InformationalError:InformationalError,SocketError:SocketError,NotSupportedError:NotSupportedError}},320:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.printStack=void 0;const a=o(n(304));const u=s(n(328));const l=n(725);const c=n(779);function renderN(e,t){const n=String(t).length;const r=String(e).length;if(r>=n){return String(e)}return" ".repeat(n-r)+e}t.printStack=(({callsite:e,originalMethod:t,onUs:r,showColors:i,renderPathRelative:s,printFullStack:o,isValidationError:f})=>{const d=20;let p=":";let h="\n";let m="";let g=0;let y=`prisma.${t}()`;if(e&&typeof window==="undefined"){const t=u.parse(e);const b=t.find((e,t)=>{if(t<3){if(e.methodName.includes("Object.")){return false}}return e.file&&!e.file.includes("@prisma")&&!e.file.includes("getPrismaClient")&&!e.methodName.includes("new ")&&!e.methodName.includes("_getCallsite")&&e.methodName.split(".").length<4});if(process.env.NODE_ENV!=="production"&&b&&b.file&&b.lineNumber&&b.column&&!b.file.startsWith("internal/")){const t=b.lineNumber;const u=s?n(622).relative(process.cwd(),b.file):b.file;p=e?` in\n${a.default.underline(`${u}:${b.lineNumber}:${b.column}`)}`:"";const w=process.stdout.rows||20;const v=Math.max(0,t-5);const _=d+t-v;if(w>_||o){const e=n(747);const s=e.existsSync(b.file);if(s){const n=e.readFileSync(b.file,"utf-8");const s=n.split("\n").slice(v,t).join("\n");const o=c.dedent(s).split("\n");const u=o[o.length-1];if(!u||u.trim()===""){p=":"}else{const e=/(\S+(create|updateMany|deleteMany|update|delete|findMany|findOne)\()/;const n=u.match(e);if(n){y=`${n[1]})`}const s=u.indexOf("{");const c=o.map((e,t,n)=>!r&&t===n.length-1?e.slice(0,s>-1?s:e.length-1):e).join("\n");const d=i?l.highlightTS(c).split("\n"):c.split("\n");h="\n"+d.map((e,n)=>a.default.grey(renderN(n+v+1,t+v+1)+" ")+a.default.reset()+e).map((e,t,n)=>t===n.length-1?`${a.default.red.bold("→")} ${a.default.dim(e)}`:a.default.dim("  "+e)).join("\n");if(!n&&!f){h+="\n\n"}m=")";g=String(t+v+1).length+getIndent(u)+1+(n?2:0)}}}}}function getIndent(e){let t=0;for(let n=0;n<e.length;n++){if(e.charAt(n)!==" "){return t}t++}return t}const b=r?a.default.red(`Oops, an unknown error occured! This is ${a.default.bold("on us")}, you did nothing wrong.\nIt occured in the ${a.default.bold(`\`${y}\``)} invocation${p}`):a.default.red(`Invalid ${a.default.bold(`\`${y}\``)} invocation${p}`);const w=`\n${b}\n${h}${a.default.reset()}`;return{indent:g,stack:w,afterLines:m,lastErrorHeight:d}})},328:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n="<unknown>";function parse(e){var t=e.split("\n");return t.reduce(function(e,t){var n=parseChrome(t)||parseWinjs(t)||parseGecko(t)||parseNode(t)||parseJSC(t);if(n){e.push(n)}return e},[])}var r=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;var i=/\((\S*)(?::(\d+))(?::(\d+))\)/;function parseChrome(e){var t=r.exec(e);if(!t){return null}var s=t[2]&&t[2].indexOf("native")===0;var o=t[2]&&t[2].indexOf("eval")===0;var a=i.exec(t[2]);if(o&&a!=null){t[2]=a[1];t[3]=a[2];t[4]=a[3]}return{file:!s?t[2]:null,methodName:t[1]||n,arguments:s?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseWinjs(e){var t=s.exec(e);if(!t){return null}return{file:t[2],methodName:t[1]||n,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}var o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;var a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function parseGecko(e){var t=o.exec(e);if(!t){return null}var r=t[3]&&t[3].indexOf(" > eval")>-1;var i=a.exec(t[3]);if(r&&i!=null){t[3]=i[1];t[4]=i[2];t[5]=null}return{file:t[3],methodName:t[1]||n,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var u=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function parseJSC(e){var t=u.exec(e);if(!t){return null}return{file:t[3],methodName:t[1]||n,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}var l=/^\s*at (?:((?:\[object object\])?[^\\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseNode(e){var t=l.exec(e);if(!t){return null}return{file:t[2],methodName:t[1]||n,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}t.parse=parse},354:function(e){"use strict";e.exports=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);if(!t){return 0}return t.reduce((e,t)=>Math.min(e,t.length),Infinity)})},357:function(e){e.exports=require("assert")},369:function(e){"use strict";e.exports=((e={})=>{let t;if(e.repoUrl){t=e.repoUrl}else if(e.user&&e.repo){t=`https://github.com/${e.user}/${e.repo}`}else{throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options")}const n=new URL(`${t}/issues/new`);const r=["body","title","labels","template","milestone","assignee","projects"];for(const t of r){let r=e[t];if(r===undefined){continue}if(t==="labels"||t==="projects"){if(!Array.isArray(r)){throw new TypeError(`The \`${t}\` option should be an array`)}r=r.join(",")}n.searchParams.set(t,r)}return n.toString()});e.exports.default=e.exports},372:function(e){"use strict";e.exports=(e=>Object.prototype.toString.call(e)==="[object RegExp]")},374:function(e,t,n){"use strict";const r=n(847);const i=n(78);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:n}=t;let s;await new Promise((o,a)=>{const u=e=>{if(e){e.bufferedData=s.getBufferedValue()}a(e)};s=r(e,i(t),e=>{if(e){u(e);return}o()});s.on("data",()=>{if(s.getBufferedLength()>n){u(new MaxBufferError)}})});return s.getBufferedValue()}e.exports=getStream;e.exports.default=getStream;e.exports.buffer=((e,t)=>getStream(e,{...t,encoding:"buffer"}));e.exports.array=((e,t)=>getStream(e,{...t,array:true}));e.exports.MaxBufferError=MaxBufferError},377:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.filterObject=void 0;function filterObject(e,t){if(!e||typeof e!=="object"||typeof e.hasOwnProperty!=="function"){return e}const n={};for(const r in e){const i=e[r];if(e.hasOwnProperty(r)&&t(r,i)){n[r]=i}}return n}t.filterObject=filterObject},388:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DMMF=void 0;var n;(function(e){let t;(function(e){e["findOne"]="findOne";e["findMany"]="findMany";e["create"]="create";e["update"]="update";e["updateMany"]="updateMany";e["upsert"]="upsert";e["delete"]="delete";e["deleteMany"]="deleteMany"})(t=e.ModelAction||(e.ModelAction={}))})(n=t.DMMF||(t.DMMF={}))},390:function(e){e.exports={kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kResume:Symbol("resume"),kPause:Symbol("pause"),kSocketTimeout:Symbol("socket timeout"),kIdleTimeout:Symbol("idle timeout"),kMaxKeepAliveTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeouthreshold"),kRequestTimeout:Symbol("request timeout"),kKeepAliveTimeout:Symbol("keep alive timeout"),kServerName:Symbol("server name"),kTLSOpts:Symbol("TLS Options"),kClosed:Symbol("closed"),kDrained:Symbol("drained"),kReset:Symbol("reset"),kDestroyed:Symbol("destroyed"),kMaxHeadersSize:Symbol("maxHeaderSize"),kHeadersTimeout:Symbol("maxHeaderSize"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelinig"),kRetryDelay:Symbol("retry delay"),kSocketPath:Symbol("socket path"),kSocket:Symbol("socket"),kClients:Symbol("clients"),kRetryTimeout:Symbol("retry timeout"),kMaxAbortedPayload:Symbol("max aborted payload")}},392:function(e,t,n){var r=n(121);var i=function(){};var s=function(e){return e.setHeader&&typeof e.abort==="function"};var o=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,t,n){if(typeof t==="function")return a(e,null,t);if(!t)t={};n=r(n||i);var u=e._writableState;var l=e._readableState;var c=t.readable||t.readable!==false&&e.readable;var f=t.writable||t.writable!==false&&e.writable;var d=false;var p=function(){if(!e.writable)h()};var h=function(){f=false;if(!c)n.call(e)};var m=function(){c=false;if(!f)n.call(e)};var g=function(t){n.call(e,t?new Error("exited with error code: "+t):null)};var y=function(t){n.call(e,t)};var b=function(){process.nextTick(w)};var w=function(){if(d)return;if(c&&!(l&&(l.ended&&!l.destroyed)))return n.call(e,new Error("premature close"));if(f&&!(u&&(u.ended&&!u.destroyed)))return n.call(e,new Error("premature close"))};var v=function(){e.req.on("finish",h)};if(s(e)){e.on("complete",h);e.on("abort",b);if(e.req)v();else e.on("request",v)}else if(f&&!u){e.on("end",p);e.on("close",p)}if(o(e))e.on("exit",g);e.on("end",m);e.on("finish",h);if(t.error!==false)e.on("error",y);e.on("close",b);return function(){d=true;e.removeListener("complete",h);e.removeListener("abort",b);e.removeListener("request",v);if(e.req)e.req.removeListener("finish",h);e.removeListener("end",p);e.removeListener("close",p);e.removeListener("finish",h);e.removeListener("exit",g);e.removeListener("end",m);e.removeListener("error",y);e.removeListener("close",b)}};e.exports=a},406:function(e,t,n){var r=n(509);t.operation=function(e){var n=t.timeouts(e);return new r(n,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};t.timeouts=function(e){if(e instanceof Array){return[].concat(e)}var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var n in e){t[n]=e[n]}if(t.minTimeout>t.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var r=[];for(var i=0;i<t.retries;i++){r.push(this.createTimeout(i,t))}if(e&&e.forever&&!r.length){r.push(this.createTimeout(i,t))}r.sort(function(e,t){return e-t});return r};t.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1;var r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));r=Math.min(r,t.maxTimeout);return r};t.wrap=function(e,n,r){if(n instanceof Array){r=n;n=null}if(!r){r=[];for(var i in e){if(typeof e[i]==="function"){r.push(i)}}}for(var s=0;s<r.length;s++){var o=r[s];var a=e[o];e[o]=function retryWrapper(r){var i=t.operation(n);var s=Array.prototype.slice.call(arguments,1);var o=s.pop();s.push(function(e){if(i.retry(e)){return}if(e){arguments[0]=i.mainError()}o.apply(this,arguments)});i.attempt(function(){r.apply(e,s)})}.bind(e,a);e[o].options=n}}},413:function(e,t,n){const r=n(899);function buildGraph(){const e={};const t=Object.keys(r);for(let n=t.length,r=0;r<n;r++){e[t[r]]={distance:-1,parent:null}}return e}function deriveBFS(e){const t=buildGraph();const n=[e];t[e].distance=0;while(n.length){const e=n.pop();const i=Object.keys(r[e]);for(let r=i.length,s=0;s<r;s++){const r=i[s];const o=t[r];if(o.distance===-1){o.distance=t[e].distance+1;o.parent=e;n.unshift(r)}}}return t}function link(e,t){return function(n){return t(e(n))}}function wrapConversion(e,t){const n=[t[e].parent,e];let i=r[t[e].parent][e];let s=t[e].parent;while(t[s].parent){n.unshift(t[s].parent);i=link(r[t[s].parent][s],i);s=t[s].parent}i.conversion=n;return i}e.exports=function(e){const t=deriveBFS(e);const n={};const r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){const e=r[i];const s=t[e];if(s.parent===null){continue}n[e]=wrapConversion(e,t)}return n}},417:function(e){e.exports=require("crypto")},419:function(e,t,n){"use strict";const r=n(622);const i=n(129);const s=n(543);const o=n(230);const a=n(805);const u=n(209);const l=n(985);const c=n(293);const{spawnedKill:f,spawnedCancel:d,setupTimeout:p,setExitHandler:h}=n(612);const{handleInput:m,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=n(173);const{mergePromise:w,getSpawnedPromise:v}=n(938);const{joinCommand:_,parseCommand:E}=n(963);const T=1e3*1e3*100;const C=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{const s=t?{...process.env,...e}:e;if(n){return a.env({env:s,cwd:r,execPath:i})}return s};const S=(e,t,n={})=>{const i=s._parse(e,t,n);e=i.command;t=i.args;n=i.options;n={maxBuffer:T,buffer:true,stripFinalNewline:true,extendEnv:true,preferLocal:false,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:true,cleanup:true,all:false,windowsHide:true,...n};n.env=C(n);n.stdio=c(n);if(process.platform==="win32"&&r.basename(e,".exe")==="cmd"){t.unshift("/q")}return{file:e,args:t,options:n,parsed:i}};const P=(e,t,n)=>{if(typeof t!=="string"&&!Buffer.isBuffer(t)){return n===undefined?undefined:""}if(e.stripFinalNewline){return o(t)}return t};const x=(e,t,n)=>{const r=S(e,t,n);const o=_(e,t);let a;try{a=i.spawn(r.file,r.args,r.options)}catch(e){const t=new i.ChildProcess;const n=Promise.reject(l({error:e,stdout:"",stderr:"",all:"",command:o,parsed:r,timedOut:false,isCanceled:false,killed:false}));return w(t,n)}const c=v(a);const b=p(a,r.options,c);const E=h(a,r.options,b);const T={isCanceled:false};a.kill=f.bind(null,a.kill.bind(a));a.cancel=d.bind(null,a,T);const C=async()=>{const[{error:e,exitCode:t,signal:n,timedOut:i},s,u,c]=await g(a,r.options,E);const f=P(r.options,s);const d=P(r.options,u);const p=P(r.options,c);if(e||t!==0||n!==null){const s=l({error:e,exitCode:t,signal:n,stdout:f,stderr:d,all:p,command:o,parsed:r,timedOut:i,isCanceled:T.isCanceled,killed:a.killed});if(!r.options.reject){return s}throw s}return{command:o,exitCode:0,stdout:f,stderr:d,all:p,failed:false,timedOut:false,isCanceled:false,killed:false}};const x=u(C);s._enoent.hookChildProcess(a,r.parsed);m(a,r.options.input);a.all=y(a,r.options);return w(a,x)};e.exports=x;e.exports.sync=((e,t,n)=>{const r=S(e,t,n);const s=_(e,t);b(r.options);let o;try{o=i.spawnSync(r.file,r.args,r.options)}catch(e){throw l({error:e,stdout:"",stderr:"",all:"",command:s,parsed:r,timedOut:false,isCanceled:false,killed:false})}const a=P(r.options,o.stdout,o.error);const u=P(r.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){const e=l({stdout:a,stderr:u,error:o.error,signal:o.signal,exitCode:o.status,command:s,parsed:r,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:false,killed:o.signal!==null});if(!r.options.reject){return e}throw e}return{command:s,exitCode:0,stdout:a,stderr:u,failed:false,timedOut:false,isCanceled:false,killed:false}});e.exports.command=((e,t)=>{const[n,...r]=E(e);return x(n,r,t)});e.exports.commandSync=((e,t)=>{const[n,...r]=E(e);return x.sync(n,r,t)});e.exports.node=((e,t,n={})=>{if(t&&!Array.isArray(t)&&typeof t==="object"){n=t;t=[]}const r=c.node(n);const{nodePath:i=process.execPath,nodeOptions:s=process.execArgv}=n;return x(i,[...s,e,...Array.isArray(t)?t:[]],{...n,stdin:undefined,stdout:undefined,stderr:undefined,stdio:r,shell:false})})},422:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getErrorMessageWithLink=t.PrismaClientInitializationError=t.PrismaClientRustPanicError=t.PrismaClientUnknownRequestError=t.PrismaClientKnownRequestError=t.getMessage=t.PrismaQueryEngineError=void 0;const i=n(150);const s=n(531);const o=n(471);const a=r(n(971));class PrismaQueryEngineError extends Error{constructor(e,t){super(e);this.code=t}}t.PrismaQueryEngineError=PrismaQueryEngineError;function getMessage(e){if(typeof e==="string"){return e}else if(i.isRustError(e)){return e.message}else if(e.fields&&e.fields.message){if(e.fields.reason){return`${e.fields.message}: ${e.fields.reason}`}return e.fields.message}else{return JSON.stringify(e)}}t.getMessage=getMessage;class PrismaClientKnownRequestError extends Error{constructor(e,t,n){super(e);this.code=t;this.meta=n}}t.PrismaClientKnownRequestError=PrismaClientKnownRequestError;class PrismaClientUnknownRequestError extends Error{constructor(e){super(e)}}t.PrismaClientUnknownRequestError=PrismaClientUnknownRequestError;class PrismaClientRustPanicError extends Error{constructor(e){super(e)}}t.PrismaClientRustPanicError=PrismaClientRustPanicError;class PrismaClientInitializationError extends Error{constructor(e){super(e)}}t.PrismaClientInitializationError=PrismaClientInitializationError;function getErrorMessageWithLink({version:e,platform:t,title:n,description:r}){const i=normalizeLogs(a.default(s.getLogs()));const u=r?`# Description\n\`\`\`\n${r}\n\`\`\``:"";const l=a.default(`Hi Prisma Team! My Prisma Client just crashed. This is the report:\n## Versions\n\n| Name     | Version            |\n|----------|--------------------|\n| Node     | ${process.version.padEnd(19)}| \n| OS       | ${t.padEnd(19)}|\n| Prisma   | ${e.padEnd(19)}|\n\n${u}\n\n## Logs\n\`\`\`\n${i}\n\`\`\``);const c=o.getGithubIssueUrl({title:n,body:l});return`${n}\n\nThis is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.\n\n${o.link(c)}\n\nIf you want the Prisma team to look into it, please open the link above 🙏\n`}t.getErrorMessageWithLink=getErrorMessageWithLink;function normalizeLogs(e){return e.split("\n").map(e=>{return e.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")}).join("\n")}},425:function(e){"use strict";e.exports=((e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const i=t.indexOf("--");return r!==-1&&(i===-1||r<i)})},430:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getLogLevel=void 0;function getLogLevel(e){if(typeof e==="string"){return e}return e.reduce((e,t)=>{const n=typeof t==="string"?t:t.level;if(n==="query"){return e}if(!e){return n}if(t==="info"||e==="info"){return"info"}return n},undefined)}t.getLogLevel=getLogLevel},437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(372);const i=n(859);const s=n(890).default;const o=(e,t,n)=>{const o=[];return function stringifyObject(e,t={},n="",a=[]){t.indent=t.indent||"\t";let u;if(t.inlineCharacterLimit===undefined){u={newLine:"\n",newLineOrSpace:"\n",pad:n,indent:n+t.indent}}else{u={newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"}}const l=e=>{if(t.inlineCharacterLimit===undefined){return e}const r=e.replace(new RegExp(u.newLine,"g"),"").replace(new RegExp(u.newLineOrSpace,"g")," ").replace(new RegExp(u.pad+"|"+u.indent,"g"),"");if(r.length<=t.inlineCharacterLimit){return r}return e.replace(new RegExp(u.newLine+"|"+u.newLineOrSpace,"g"),"\n").replace(new RegExp(u.pad,"g"),n).replace(new RegExp(u.indent,"g"),n+t.indent)};if(o.indexOf(e)!==-1){return'"[Circular]"'}if(e===null||e===undefined||typeof e==="number"||typeof e==="boolean"||typeof e==="function"||typeof e==="symbol"||r(e)){return String(e)}if(e instanceof Date){return`new Date('${e.toISOString()}')`}if(Array.isArray(e)){if(e.length===0){return"[]"}o.push(e);const r="["+u.newLine+e.map((r,i)=>{const s=e.length-1===i?u.newLine:","+u.newLineOrSpace;let o=stringifyObject(r,t,n+t.indent,[...a,i]);if(t.transformValue){o=t.transformValue(e,i,o)}return u.indent+o+s}).join("")+u.pad+"]";o.pop();return l(r)}if(i(e)){let r=Object.keys(e).concat(s(e));if(t.filter){r=r.filter(n=>t.filter(e,n))}if(r.length===0){return"{}"}o.push(e);const i="{"+u.newLine+r.map((i,s)=>{const o=r.length-1===s?u.newLine:","+u.newLineOrSpace;const l=typeof i==="symbol";const c=!l&&/^[a-z$_][a-z$_0-9]*$/i.test(i);const f=l||c?i:stringifyObject(i,t,undefined,[...a,i]);let d=stringifyObject(e[i],t,n+t.indent,[...a,i]);if(t.transformValue){d=t.transformValue(e,i,d)}let p=u.indent+String(f)+": "+d+o;if(t.transformLine){p=t.transformLine({obj:e,indent:u.indent,key:f,stringifiedValue:d,value:e[i],eol:o,originalLine:p,path:a.concat(f)})}return p}).join("")+u.pad+"}";o.pop();return l(i)}e=String(e).replace(/[\r\n]/g,e=>e==="\n"?"\\n":"\\r");if(t.singleQuotes===false){e=e.replace(/"/g,'\\"');return`"${e}"`}e=e.replace(/\\?'/g,"\\'");return`'${e}'`}(e,t,n)};t.default=o},450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.visit=void 0;const r=n(222);function visit(e,t){const n=e.children.map(e=>visitField(e,t));if(e.children.length===n.length&&e.children.every((e,t)=>e===n[t])){return e}const i=new r.Document(e.type,n);return i}t.visit=visit;function visitField(e,t){const n=e.args?e.args.args.map(e=>visitArg(e,t)):undefined;const i=n?new r.Args(n):undefined;const s=e.children?e.children.map(e=>visitField(e,t)):undefined;const o=!i&&!e.args||e.args&&i&&(e.args.args.length===i.args.length&&e.args.args.every((e,t)=>e===i.args[t]));const a=!e.children&&!s||e.children&&s&&e.children.length===s.length&&e.children.every((e,t)=>e===s[t]);if(o&&a){return e}return new r.Field({name:e.name,args:i,children:s,error:e.error,schemaField:e.schemaField})}function isArgsArray(e){if(Array.isArray(e)){return e.every(e=>e instanceof r.Args)}return false}function visitArg(e,t){function mapArgs(e){const{args:n}=e;const i=n.map(e=>visitArg(e,t));if(i.length!==n.length||n.find((e,t)=>e!==i[t])){return new r.Args(i)}return e}const n=t.Arg.enter(e)||e;let i=n.value;if(isArgsArray(n.value)){i=n.value.map(mapArgs)}else if(n.value instanceof r.Args){i=mapArgs(n.value)}if(i!==n.value){return new r.Arg({key:n.key,value:i,error:n.error,argType:n.argType,isEnum:n.isEnum})}return n}},454:function(e){"use strict";const t=(e={})=>{const t=e.env||process.env;const n=e.platform||process.platform;if(n!=="win32"){return"PATH"}return Object.keys(t).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};e.exports=t;e.exports.default=t},471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getRandomString=t.getGithubIssueUrl=t.link=t.fixBinaryTargets=t.plusX=void 0;const i=r(n(747));const s=r(n(982));const o=r(n(369));const a=r(n(304));const u=r(n(531));const l=r(n(417));const c=u.default("plusX");function plusX(e){const t=i.default.statSync(e);const n=t.mode|64|8|1;if(t.mode===n){c(`Execution permissions of ${e} are fine`);return}const r=n.toString(8).slice(-3);c(`Have to call plusX on ${e}`);i.default.chmodSync(e,r)}t.plusX=plusX;function fixBinaryTargets(e,t){e=e||[];if(!e.includes("native")){return["native",...e]}return[...e,t]}t.fixBinaryTargets=fixBinaryTargets;function link(e){return s.default(e,e,{fallback:e=>a.default.underline(e)})}t.link=link;function getGithubIssueUrl({title:e,user:t="prisma",repo:n="prisma-client-js",template:r="bug_report.md",body:i}){return o.default({user:t,repo:n,template:r,title:e,body:i})}t.getGithubIssueUrl=getGithubIssueUrl;function getRandomString(){return l.default.randomBytes(12).toString("hex")}t.getRandomString=getRandomString},491:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.omit=void 0;function omit(e,t){const n={};const r=Array.isArray(t)?t:[t];for(const t in e){if(e.hasOwnProperty(t)&&!r.includes(t)){n[t]=e[t]}}return n}t.omit=omit},492:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.mayBeCompatible=t.platforms=void 0;t.platforms=["darwin","debian-openssl-1.0.x","debian-openssl-1.1.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","linux-musl","linux-nixos","windows","freebsd11","freebsd12","openbsd","netbsd","arm"];function mayBeCompatible(e,t){if(e.startsWith("freebsd")||t.startsWith("freebsd")){return false}if(e==="native"||t==="native"){return true}if(e==="darwin"||t==="darwin"){return false}if(e==="windows"||t==="windows"){return false}return true}t.mayBeCompatible=mayBeCompatible},499:function(e,t,n){e.exports=n(406)},501:function(e){"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,n){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(n){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},503:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSignals=void 0;var r=n(87);var i=n(730);var s=n(297);const o=function(){const e=(0,s.getRealtimeSignals)();const t=[...i.SIGNALS,...e].map(a);return t};t.getSignals=o;const a=function({name:e,number:t,description:n,action:i,forced:s=false,standard:o}){const{signals:{[e]:a}}=r.constants;const u=a!==undefined;const l=u?a:t;return{name:e,number:l,description:n,supported:u,action:i,forced:s,standard:o}}},505:function(e,t,n){e.exports=isexe;isexe.sync=sync;var r=n(747);function checkPathExt(e,t){var n=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!n){return true}n=n.split(";");if(n.indexOf("")!==-1){return true}for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(e,t,n){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,n)}function isexe(e,t,n){r.stat(e,function(r,i){n(r,r?false:checkStat(i,e,t))})}function sync(e,t){return checkStat(r.statSync(e),e,t)}},509:function(e){function RetryOperation(e,t){if(typeof t==="boolean"){t={forever:t}}this._originalTimeouts=JSON.parse(JSON.stringify(e));this._timeouts=e;this._options=t||{};this._maxRetryTime=t&&t.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}e.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(e){if(this._timeout){clearTimeout(this._timeout)}if(!e){return false}var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var n=this._timeouts.shift();if(n===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);n=this._timeouts.shift()}else{return false}}var r=this;var i=setTimeout(function(){r._attempts++;if(r._operationTimeoutCb){r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout);if(r._options.unref){r._timeout.unref()}}r._fn(r._attempts)},n);if(this._options.unref){i.unref()}return true};RetryOperation.prototype.attempt=function(e,t){this._fn=e;if(t){if(t.timeout){this._operationTimeout=t.timeout}if(t.cb){this._operationTimeoutCb=t.cb}}var n=this;if(this._operationTimeoutCb){this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated");this.attempt(e)};RetryOperation.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated");this.attempt(e)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var e={};var t=null;var n=0;for(var r=0;r<this._errors.length;r++){var i=this._errors[r];var s=i.message;var o=(e[s]||0)+1;e[s]=o;if(o>=n){t=i;n=o}}return t}},531:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getLogs=void 0;const i=r(n(599));const s=[];const o=100;const a=[];const u=new Map;const l=process.env.DEBUG?process.env.DEBUG+",":"";const c=i.default.skips.slice();const f=i.default.names.slice();function isEnabledByEnvVar(e){if(e[e.length-1]==="*"){return true}for(const t of c){if(t.test(e)){return false}}for(const t of f){if(t.test(e)){return true}}return false}function Debug(e){const t=i.default(e);a.push(e);i.default.enable(l+a.join(","));process.env.DEBUG=l;if(isEnabledByEnvVar(e)){u.set(e,true)}const n=(e,...n)=>{return t(e,...n)};n.log=console.error.bind(console);n.color=t.color;n.namespace=t.namespace;n.enabled=t.enabled;n.destroy=t.destroy;n.extend=t.extend;t.log=((...t)=>{s.push(t);if(s.length>o){s.shift()}if(u.has(e)){n.log(...t)}});return n}t.default=Debug;Debug.enable=(e=>{u.set(e,true)});Debug.enabled=(e=>u.has(e));function getLogs(e=7500){let t=s.map(e=>e.join("  ")).join("\n");if(t.length<e){return t}return t.slice(-e)}t.getLogs=getLogs},532:function(__unusedmodule,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});exports.NodeEngine=void 0;const Engine_1=__webpack_require__(422);const debug_1=__importDefault(__webpack_require__(599));const get_platform_1=__webpack_require__(270);const path_1=__importDefault(__webpack_require__(622));const net_1=__importDefault(__webpack_require__(631));const fs_1=__importDefault(__webpack_require__(747));const chalk_1=__importDefault(__webpack_require__(304));const printGeneratorConfig_1=__webpack_require__(915);const util_1=__webpack_require__(471);const util_2=__webpack_require__(669);const events_1=__importDefault(__webpack_require__(614));const log_1=__webpack_require__(150);const child_process_1=__webpack_require__(129);const byline_1=__importDefault(__webpack_require__(609));const p_retry_1=__importDefault(__webpack_require__(969));const execa_1=__importDefault(__webpack_require__(419));const omit_1=__webpack_require__(278);const undici_1=__webpack_require__(647);const debug=debug_1.default("engine");const exists=util_2.promisify(fs_1.default.exists);const readdir=util_2.promisify(fs_1.default.readdir);const knownPlatforms=["native","darwin","debian-openssl-1.0.x","debian-openssl-1.1.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","linux-musl","linux-nixos","windows","freebsd11","freebsd12","openbsd","netbsd","arm"];const engines=[];const socketPaths=[];class NodeEngine{constructor({cwd:e,datamodelPath:t,prismaPath:n,generator:r,datasources:i,showColors:s,logLevel:o,logQueries:a,env:u,flags:l,clientVersion:c,enableExperimental:f,engineEndpoint:d,enableDebugLogs:p,enableEngineDebugMode:h,useUds:m}){var g;this.restartCount=0;this.queryEngineStarted=false;this.enableExperimental=[];this.useUds=false;this.queryEngineKilled=false;this.managementApiEnabled=false;this.ready=false;this.stderrLogs="";this.stdoutLogs="";this.handleRequestError=(async(e,t)=>{var n,r,i,s;debug({error:e});let o;if(this.currentRequestPromise.isCanceled&&this.lastError){if(this.lastError.is_panic){o=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastError),version:this.clientVersion}));this.lastPanic=o}else{o=new Engine_1.PrismaClientUnknownRequestError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastError),version:this.clientVersion}))}}else if(this.currentRequestPromise.isCanceled&&this.lastErrorLog){if(((r=(n=this.lastErrorLog)===null||n===void 0?void 0:n.fields)===null||r===void 0?void 0:r.message)==="PANIC"){o=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastErrorLog),version:this.clientVersion}));this.lastPanic=o}else{o=new Engine_1.PrismaClientUnknownRequestError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastErrorLog),version:this.clientVersion}))}}else if(e.code&&e.code==="ECONNRESET"||e.code==="ECONNREFUSED"||e.code==="UND_ERR_SOCKET"&&e.message.toLowerCase().includes("closed")||e.message.toLowerCase().includes("client is destroyed")||e.message.toLowerCase().includes("other side closed")){if(this.globalKillSignalReceived&&!this.child.connected){throw new Engine_1.PrismaClientUnknownRequestError(`The Node.js process already received a ${this.globalKillSignalReceived} signal, therefore the Prisma query engine exited\nand your request can't be processed.\nYou probably have some open handle that prevents your process from exiting.\nIt could be an open http server or stream that didn't close yet.\nWe recommend using the \`wtfnode\` package to debug open handles.`)}if(this.restartCount>4){throw new Error(`Query engine is trying to restart, but can't.\nPlease look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.`)}if(this.lastError){if(this.lastError.is_panic){o=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastError),version:this.clientVersion}));this.lastPanic=o}else{o=new Engine_1.PrismaClientUnknownRequestError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastError),version:this.clientVersion}))}}else if(this.lastErrorLog){if(((s=(i=this.lastErrorLog)===null||i===void 0?void 0:i.fields)===null||s===void 0?void 0:s.message)==="PANIC"){o=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastErrorLog),version:this.clientVersion}));this.lastPanic=o}else{o=new Engine_1.PrismaClientUnknownRequestError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:Engine_1.getMessage(this.lastErrorLog),version:this.clientVersion}))}}if(!o){let n=this.getLastLog();if(!n){await new Promise(e=>setTimeout(e,500));n=this.getLastLog()}const r=n||this.stderrLogs||this.stdoutLogs;let i=n!==null&&n!==void 0?n:e.message;let s=e.stack+"\nExit code: "+this.exitCode+"\n"+r;s=`signalCode: ${this.child.signalCode} | exitCode: ${this.child.exitCode} | killed: ${this.child.killed}\n`+s;o=new Engine_1.PrismaClientUnknownRequestError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:i,version:this.clientVersion,description:s}));debug(o.message);if(t){return false}}}if(o){throw o}throw e});this.env=u;this.cwd=this.resolveCwd(e);this.enableDebugLogs=p!==null&&p!==void 0?p:false;this.enableEngineDebugMode=h!==null&&h!==void 0?h:false;this.datamodelPath=t;this.prismaPath=(g=process.env.PRISMA_QUERY_ENGINE_BINARY)!==null&&g!==void 0?g:n;this.generator=r;this.datasources=i;this.logEmitter=new events_1.default;this.showColors=s!==null&&s!==void 0?s:false;this.logLevel=o;this.logQueries=a!==null&&a!==void 0?a:false;this.clientVersion=c;this.flags=l!==null&&l!==void 0?l:[];this.enableExperimental=f!==null&&f!==void 0?f:[];const y=["middlewares","aggregateApi","distinct","aggregations"];const b=this.enableExperimental.filter(e=>y.includes(e));if(b.length>0){console.log(`Info: The preview flags \`${b.join("`, `")}\` were removed, you can now safely remove them from your schema.prisma.`)}this.enableExperimental=this.enableExperimental.filter(e=>!y.includes(e));this.engineEndpoint=d;if(m&&process.platform!=="win32"){this.socketPath=`/tmp/prisma-${util_1.getRandomString()}.sock`;socketPaths.push(this.socketPath);this.useUds=m}if(d){const e=new URL(d);this.port=Number(e.port)}this.logEmitter.on("error",e=>{if(this.enableDebugLogs){debug_1.default("engine:log")(e)}if(e instanceof Error){debug_1.default("engine:error")(e)}else{this.lastErrorLog=e;if(e.fields.message==="PANIC"){this.handlePanic(e)}}});if(this.platform){if(!knownPlatforms.includes(this.platform)&&!fs_1.default.existsSync(this.platform)){throw new Engine_1.PrismaClientInitializationError(`Unknown ${chalk_1.default.red("PRISMA_QUERY_ENGINE_BINARY")} ${chalk_1.default.redBright.bold(this.platform)}. Possible binaryTargets: ${chalk_1.default.greenBright(knownPlatforms.join(", "))} or a path to the query engine binary.\nYou may have to run ${chalk_1.default.greenBright("prisma generate")} for your changes to take effect.`)}}else{this.getPlatform()}if(this.enableDebugLogs){debug_1.default.enable("*")}engines.push(this)}resolveCwd(e){if(e&&fs_1.default.existsSync(e)&&fs_1.default.lstatSync(e).isDirectory()){return e}return process.cwd()}on(e,t){this.logEmitter.on(e,t)}async getPlatform(){if(this.platformPromise){return this.platformPromise}this.platformPromise=get_platform_1.getPlatform();return this.platformPromise}getQueryEnginePath(e,t=__dirname){let n=path_1.default.join(t,`query-engine-${e}`);if(e==="windows"){n=`${n}.exe`}return n}handlePanic(e){var t;(t=this.child)===null||t===void 0?void 0:t.kill();if(this.currentRequestPromise){this.currentRequestPromise.cancel()}}async resolvePrismaPath(){if(this.prismaPath){return this.prismaPath}const platform=await this.getPlatform();if(this.platform&&this.platform!==platform){this.incorrectlyPinnedBinaryTarget=this.platform}this.platform=this.platform||platform;const fileName=eval(`require('path').basename(__filename)`);if(fileName==="NodeEngine.js"){return this.getQueryEnginePath(this.platform,path_1.default.resolve(__dirname,`..`))}else{const dotPrismaPath=await this.getQueryEnginePath(this.platform,eval(`require('path').join(__dirname, '../../../.prisma/client')`));debug({dotPrismaPath:dotPrismaPath});if(fs_1.default.existsSync(dotPrismaPath)){return dotPrismaPath}const dirnamePath=await this.getQueryEnginePath(this.platform,eval("__dirname"));debug({dirnamePath:dirnamePath});if(fs_1.default.existsSync(dirnamePath)){return dirnamePath}const parentDirName=await this.getQueryEnginePath(this.platform,path_1.default.join(eval("__dirname"),".."));debug({parentDirName:parentDirName});if(fs_1.default.existsSync(parentDirName)){return parentDirName}const datamodelDirName=await this.getQueryEnginePath(this.platform,path_1.default.dirname(this.datamodelPath));if(fs_1.default.existsSync(datamodelDirName)){return datamodelDirName}const cwdPath=await this.getQueryEnginePath(this.platform,this.cwd);if(fs_1.default.existsSync(cwdPath)){return cwdPath}const prismaPath=await this.getQueryEnginePath(this.platform);debug({prismaPath:prismaPath});return prismaPath}}async getPrismaPath(){const e=await this.resolvePrismaPath();const t=await this.getPlatform();if(!await exists(e)){const n=this.incorrectlyPinnedBinaryTarget?`\nYou incorrectly pinned it to ${chalk_1.default.redBright.bold(`${this.incorrectlyPinnedBinaryTarget}`)}\n`:"";const r=path_1.default.dirname(e);const i=fs_1.default.existsSync(r);let s=[];if(i){s=await readdir(r)}let o=`Query engine binary for current platform "${chalk_1.default.bold(t)}" could not be found.${n}\nThis probably happens, because you built Prisma Client on a different platform.\n(Prisma Client looked in "${chalk_1.default.underline(e)}")\n\nFiles in ${r}:\n\n${s.map(e=>`  ${e}`).join("\n")}\n`;if(this.generator){if(this.generator.binaryTargets.includes(this.platform)||this.generator.binaryTargets.includes("native")){o+=`\nYou already added the platform${this.generator.binaryTargets.length>1?"s":""} ${this.generator.binaryTargets.map(e=>`"${chalk_1.default.bold(e)}"`).join(", ")} to the "${chalk_1.default.underline("generator")}" block\nin the "schema.prisma" file as described in https://pris.ly/d/client-generator,\nbut something went wrong. That's suboptimal.\n\nPlease create an issue at https://github.com/prisma/prisma-client-js/issues/new`}else{o+=`\n\nTo solve this problem, add the platform "${this.platform}" to the "${chalk_1.default.underline("generator")}" block in the "schema.prisma" file:\n${chalk_1.default.greenBright(this.getFixedGenerator())}\n\nThen run "${chalk_1.default.greenBright("prisma generate")}" for your changes to take effect.\nRead more about deploying Prisma Client: https://pris.ly/d/client-generator`}}else{o+=`\n\nRead more about deploying Prisma Client: https://pris.ly/d/client-generator\n`}throw new Engine_1.PrismaClientInitializationError(o)}if(this.incorrectlyPinnedBinaryTarget){console.error(`${chalk_1.default.yellow("Warning:")} You pinned the platform ${chalk_1.default.bold(this.incorrectlyPinnedBinaryTarget)}, but Prisma Client detects ${chalk_1.default.bold(await this.getPlatform())}.\nThis means you should very likely pin the platform ${chalk_1.default.greenBright(await this.getPlatform())} instead.\n${chalk_1.default.dim("In case we're mistaken, please report this to us 🙏.")}`)}if(process.platform!=="win32"){util_1.plusX(e)}return e}getFixedGenerator(){const e={...this.generator,binaryTargets:util_1.fixBinaryTargets(this.generator.binaryTargets,this.platform)};return printGeneratorConfig_1.printGeneratorConfig(e)}printDatasources(){if(this.datasources){return JSON.stringify(this.datasources)}return"[]"}async start(){if(!this.startPromise){this.startPromise=this.internalStart()}return this.startPromise}async getEngineEnvVars(){const e={PRISMA_DML_PATH:this.datamodelPath,RUST_BACKTRACE:"1",RUST_LOG:"info"};if(!this.useUds){e.PORT=String(this.port);debug(`port: ${this.port}`)}if(this.logQueries||this.logLevel==="info"){e.RUST_LOG="info";if(this.logQueries){e.LOG_QUERIES="true"}}if(this.datasources){e.OVERWRITE_DATASOURCES=this.printDatasources()}if(!process.env.NO_COLOR&&this.showColors){e.CLICOLOR_FORCE="1"}return{...this.env,...process.env,...e}}internalStart(){return new Promise(async(e,t)=>{var n,r,i;if(this.engineEndpoint){try{await p_retry_1.default(()=>this.undici.status(),{retries:10})}catch(e){return t(e)}return e()}try{if((n=this.child)===null||n===void 0?void 0:n.connected){debug(`There is a child that still runs and we want to start again. We're killing that child process now.`);this.queryEngineKilled=true;(r=this.child)===null||r===void 0?void 0:r.kill()}this.queryEngineStarted=false;this.lastError=undefined;this.lastErrorLog=undefined;this.lastPanic=undefined;this.queryEngineKilled=false;this.globalKillSignalReceived=undefined;debug({cwd:this.cwd});const s=await this.getPrismaPath();const o=this.enableExperimental&&Array.isArray(this.enableExperimental)&&this.enableExperimental.length>0?[`--enable-experimental=${this.enableExperimental.join(",")}`]:[];const a=this.enableEngineDebugMode?["--debug"]:[];const u=[...o,...a,"--enable-raw-queries",...this.flags];if(this.useUds){u.push("--unix-path",this.socketPath)}debug({flags:u});this.port=await this.getFreePort();const l=await this.getEngineEnvVars();this.child=child_process_1.spawn(s,u,{env:l,cwd:this.cwd,stdio:["ignore","pipe","pipe"]});byline_1.default(this.child.stderr).on("data",e=>{const t=String(e);debug("stderr",t);try{const e=JSON.parse(t);if(typeof e.is_panic!=="undefined"){debug(e);this.lastError=e;if(this.engineStartDeferred){const e=new Engine_1.PrismaClientInitializationError(this.lastError.message);this.engineStartDeferred.reject(e)}}}catch(e){if(!t.includes("Printing to stderr")&&!t.includes("Listening on ")){this.stderrLogs+="\n"+t}}});byline_1.default(this.child.stdout).on("data",e=>{var t;const n=String(e);try{const e=JSON.parse(n);debug("stdout",e);if(this.engineStartDeferred&&e.level==="INFO"&&e.target==="query_engine::server"&&((t=e.fields)===null||t===void 0?void 0:t.message.startsWith("Started http server"))){if(this.useUds){this.undici=new undici_1.Undici({hostname:"localhost",protocol:"http:"},{socketPath:this.socketPath})}else{this.undici=new undici_1.Undici(`http://localhost:${this.port}`)}this.engineStartDeferred.resolve();this.engineStartDeferred=undefined;this.queryEngineStarted=true}if(typeof e.is_panic==="undefined"){const t=log_1.convertLog(e);this.logEmitter.emit(t.level,t);this.lastLog=t}else{this.lastError=e}}catch(e){debug(e,n)}});this.child.on("exit",e=>{var t;(t=this.undici)===null||t===void 0?void 0:t.close();this.exitCode=e;if(!this.queryEngineKilled&&this.queryEngineStarted&&this.restartCount<5){p_retry_1.default(async e=>{debug(`Restart attempt ${e}. Waiting for backoff`);if(this.backoffPromise){await this.backoffPromise}debug(`Restart attempt ${e}. Backoff done`);this.restartCount++;const t=Math.random()*2*Math.pow(Math.E,this.restartCount);this.startPromise=undefined;this.backoffPromise=new Promise(e=>setTimeout(e,t));return this.start()},{retries:4,randomize:true,minTimeout:1e3,maxTimeout:60*1e3,factor:Math.E,onFailedAttempt:e=>{debug(e)}});return}if(e!==0&&this.engineStartDeferred){let t;if(e!==null){t=new Engine_1.PrismaClientInitializationError(`Query engine exited with code ${e}\n`+this.stderrLogs)}else if(this.child.signalCode){t=new Engine_1.PrismaClientInitializationError(`Query engine process killed with signal ${this.child.signalCode} for unknown reason.\nMake sure that the engine binary at ${s} is not corrupt.\n`+this.stderrLogs)}else{t=new Engine_1.PrismaClientInitializationError(this.stderrLogs)}this.engineStartDeferred.reject(t)}if(!this.child){return}if(this.lastError){return}if(this.lastErrorLog){this.lastErrorLog.target="exit";return}if(e===126){this.lastErrorLog={timestamp:new Date,target:"exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system.\nYou very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}}else{this.lastErrorLog={target:"exit",timestamp:new Date,level:"error",fields:{message:(this.stderrLogs||"")+(this.stdoutLogs||"")+`\nExit code: ${e}`}}}});this.child.on("error",e=>{this.lastError={message:e.message,backtrace:"Could not start query engine",is_panic:false};t(e)});this.child.on("close",(e,t)=>{var n,r;(n=this.undici)===null||n===void 0?void 0:n.close();if(e===null&&t==="SIGABRT"&&this.child){const e=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:`Panic in Query Engine with SIGABRT signal`,description:this.stderrLogs,version:this.clientVersion}));this.logEmitter.emit("error",e)}else if(e===255&&t===null&&((r=this.lastErrorLog)===null||r===void 0?void 0:r.fields.message)==="PANIC"&&!this.lastPanic){const e=new Engine_1.PrismaClientRustPanicError(Engine_1.getErrorMessageWithLink({platform:this.platform,title:`${this.lastErrorLog.fields.message}: ${this.lastErrorLog.fields.reason} in\n${this.lastErrorLog.fields.file}:${this.lastErrorLog.fields.line}:${this.lastErrorLog.fields.column}`,version:this.clientVersion}));this.logEmitter.emit("error",e)}});if(this.lastError){return t(new Engine_1.PrismaClientInitializationError(Engine_1.getMessage(this.lastError)))}if(this.lastErrorLog){return t(new Engine_1.PrismaClientInitializationError(Engine_1.getMessage(this.lastErrorLog)))}try{await new Promise((e,t)=>{this.engineStartDeferred={resolve:e,reject:t}})}catch(e){(i=this.child)===null||i===void 0?void 0:i.kill();throw e}this.url=`http://localhost:${this.port}`;e()}catch(e){t(e)}})}async stop(){var e,t;await this.start();if(this.currentRequestPromise){try{await this.currentRequestPromise}catch(e){}}if(this.child){debug(`Stopping Prisma engine`);this.queryEngineKilled=true;(e=this.undici)===null||e===void 0?void 0:e.close();(t=this.child)===null||t===void 0?void 0:t.kill();delete this.child}setTimeout(()=>{if(this.socketPath){try{fs_1.default.unlinkSync(this.socketPath)}catch(e){debug(e)}socketPaths.splice(socketPaths.indexOf(this.socketPath),1);this.socketPath=undefined}})}async kill(e){var t,n;this.globalKillSignalReceived=e;this.queryEngineKilled=true;(t=this.child)===null||t===void 0?void 0:t.kill();(n=this.undici)===null||n===void 0?void 0:n.close()}getFreePort(){return new Promise((e,t)=>{const n=net_1.default.createServer(e=>e.end(""));n.unref();n.on("error",t);n.listen(0,()=>{const r=n.address();const i=typeof r==="string"?parseInt(r.split(":").slice(-1)[0],10):r.port;n.close(n=>{if(n){t(n)}e(i)})})})}async getConfig(){const e=await this.getPrismaPath();const t=await this.getEngineEnvVars();const n=await execa_1.default(e,["cli","get-config"],{env:omit_1.omit(t,["PORT"]),cwd:this.cwd});return JSON.parse(n.stdout)}async version(){const e=await this.getPrismaPath();const t=await execa_1.default(e,["--version"],{env:{...process.env}});return t.stdout}async request(e,t,n=1){await this.start();if(!this.child&&!this.engineEndpoint){throw new Engine_1.PrismaClientUnknownRequestError(`Can't perform request, as the Engine has already been stopped`)}this.currentRequestPromise=this.undici.request(stringifyQuery(e),t);return this.currentRequestPromise.then(({data:e,headers:t})=>{if(e.errors){if(e.errors.length===1){throw this.graphQLToJSError(e.errors[0])}throw new Error(JSON.stringify(e.errors))}const n=parseInt(t["x-elapsed"])/1e3;if(this.restartCount>0){this.restartCount=0}return{data:e,elapsed:n}}).catch(async r=>{const i=await this.handleRequestError(r,n<3);if(!i){if(n<3){await new Promise(e=>setTimeout(e,Math.random()*1e3));return this.request(e,t,n+1)}}throw i})}async requestBatch(e,t=false,n=1){await this.start();if(!this.child&&!this.engineEndpoint){throw new Engine_1.PrismaClientUnknownRequestError(`Can't perform request, as the Engine has already been stopped`)}const r={};const i={batch:e.map(e=>({query:e,variables:r})),transaction:t};this.currentRequestPromise=this.undici.request(JSON.stringify(i));return this.currentRequestPromise.then(({data:e,headers:t})=>{const n=parseInt(t["x-elapsed"])/1e3;if(Array.isArray(e)){return e.map(e=>{if(e.errors){return this.graphQLToJSError(e.errors[0])}return{data:e,elapsed:n}})}else{if(e.errors&&e.errors.length===1){throw new Error(e.errors[0].error)}throw new Error(JSON.stringify(e))}}).catch(async r=>{const i=await this.handleRequestError(r,n<3);if(!i){if(n<3){await new Promise(e=>setTimeout(e,Math.random()*1e3));return this.requestBatch(e,t,n+1)}}throw i})}getLastLog(){var e,t,n;const r=(t=(e=this.lastLog)===null||e===void 0?void 0:e.fields)===null||t===void 0?void 0:t.message;if(r){const e=Object.entries((n=this.lastLog)===null||n===void 0?void 0:n.fields).filter(([e])=>e!=="message").map(([e,t])=>{return`${e}: ${t}`}).join(", ");if(e){return`${r}  ${e}`}return r}return null}graphQLToJSError(e){if(e.user_facing_error.error_code){return new Engine_1.PrismaClientKnownRequestError(e.user_facing_error.message,e.user_facing_error.error_code,e.user_facing_error.meta)}return new Engine_1.PrismaClientUnknownRequestError(e.user_facing_error.message)}}exports.NodeEngine=NodeEngine;function stringifyQuery(e){return`{"variables":{},"query":${JSON.stringify(e)}}`}function hookProcess(e,t=false){process.once(e,()=>{for(const t of engines){t.kill(e)}engines.splice(0,engines.length);if(t){process.exit()}if(socketPaths.length>0){for(const e of socketPaths){try{fs_1.default.unlinkSync(e)}catch(e){}}}})}hookProcess("beforeExit");hookProcess("exit");hookProcess("SIGINT",true);hookProcess("SIGUSR1",true);hookProcess("SIGUSR2",true);hookProcess("SIGTERM",true)},538:function(e,t,n){e.exports=isexe;isexe.sync=sync;var r=n(747);function isexe(e,t,n){r.stat(e,function(e,r){n(e,e?false:checkStat(r,t))})}function sync(e,t){return checkStat(r.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var n=e.mode;var r=e.uid;var i=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var u=parseInt("010",8);var l=parseInt("001",8);var c=a|u;var f=n&l||n&u&&i===o||n&a&&r===s||n&c&&s===0;return f}},543:function(e,t,n){"use strict";const r=n(129);const i=n(210);const s=n(814);function spawn(e,t,n){const o=i(e,t,n);const a=r.spawn(o.command,o.args,o.options);s.hookChildProcess(a,o);return a}function spawnSync(e,t,n){const o=i(e,t,n);const a=r.spawnSync(o.command,o.args,o.options);a.error=a.error||s.verifyENOENTSync(a.status,o);return a}e.exports=spawn;e.exports.spawn=spawn;e.exports.sync=spawnSync;e.exports._parse=i;e.exports._enoent=s},549:function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},563:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deepExtend=void 0;function isSpecificValue(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp?true:false}function cloneSpecificValue(e){if(e instanceof Buffer){const t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);e.copy(t);return t}else if(e instanceof Date){return new Date(e.getTime())}else if(e instanceof RegExp){return new RegExp(e)}else{throw new Error("Unexpected situation")}}function deepCloneArray(e){const n=[];e.forEach(function(e,r){if(typeof e==="object"&&e!==null){if(Array.isArray(e)){n[r]=deepCloneArray(e)}else if(isSpecificValue(e)){n[r]=cloneSpecificValue(e)}else{n[r]=t.deepExtend({},e)}}else{n[r]=e}});return n}function safeGetProperty(e,t){return t==="__proto__"?undefined:e[t]}t.deepExtend=function(e,...n){if(!e||typeof e!=="object"){return false}if(n.length===0){return e}let r,i;for(const s of n){if(typeof s!=="object"||s===null||Array.isArray(s)){continue}for(const n of Object.keys(s)){i=safeGetProperty(e,n);r=safeGetProperty(s,n);if(r===e){continue}else if(typeof r!=="object"||r===null){e[n]=r;continue}else if(Array.isArray(r)){e[n]=deepCloneArray(r);continue}else if(isSpecificValue(r)){e[n]=cloneSpecificValue(r);continue}else if(typeof i!=="object"||i===null||Array.isArray(i)){e[n]=t.deepExtend({},r);continue}else{e[n]=t.deepExtend(i,r);continue}}}return e}},599:function(e,t,n){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(45)}else{e.exports=n(264)}},601:function(e,t,n){const r=n(747);const i=n(622);function log(e){console.log(`[dotenv][DEBUG] ${e}`)}const s="\n";const o=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/;const a=/\\n/g;const u=/\n|\r|\r\n/;function parse(e,t){const n=Boolean(t&&t.debug);const r={};e.toString().split(u).forEach(function(e,t){const i=e.match(o);if(i!=null){const e=i[1];let t=i[2]||"";const n=t.length-1;const o=t[0]==='"'&&t[n]==='"';const u=t[0]==="'"&&t[n]==="'";if(u||o){t=t.substring(1,n);if(o){t=t.replace(a,s)}}else{t=t.trim()}r[e]=t}else if(n){log(`did not match key and value when parsing line ${t+1}: ${e}`)}});return r}function config(e){let t=i.resolve(process.cwd(),".env");let n="utf8";let s=false;if(e){if(e.path!=null){t=e.path}if(e.encoding!=null){n=e.encoding}if(e.debug!=null){s=true}}try{const e=parse(r.readFileSync(t,{encoding:n}),{debug:s});Object.keys(e).forEach(function(t){if(!Object.prototype.hasOwnProperty.call(process.env,t)){process.env[t]=e[t]}else if(s){log(`"${t}" is already defined in \`process.env\` and will not be overwritten`)}});return{parsed:e}}catch(e){return{error:e}}}e.exports.config=config;e.exports.parse=parse},605:function(e){e.exports=require("http")},609:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLineStream=void 0;var r=n(794),i=n(669);function byline(t,n){return e.exports.createStream(t,n)}t.default=byline;e.exports.createStream=function(e,t){if(e){return createLineStream(e,t)}else{return new LineStream(t)}};function createLineStream(e,t){if(!e){throw new Error("expected readStream")}if(!e.readable){throw new Error("readStream must be readable")}var n=new LineStream(t);e.pipe(n);return n}t.createLineStream=createLineStream;e.exports.LineStream=LineStream;function LineStream(e){r.Transform.call(this,e);e=e||{};this._readableState.objectMode=true;this._lineBuffer=[];this._keepEmptyLines=e.keepEmptyLines||false;this._lastChunkEndedWithCR=false;this.on("pipe",function(e){if(!this.encoding){if(e instanceof r.Readable){this.encoding=e._readableState.encoding}}})}i.inherits(LineStream,r.Transform);LineStream.prototype._transform=function(e,t,n){t=t||"utf8";if(Buffer.isBuffer(e)){if(t=="buffer"){e=e.toString();t="utf8"}else{e=e.toString(t)}}this._chunkEncoding=t;var r=e.split(/\r\n|\r|\n/g);if(this._lastChunkEndedWithCR&&e[0]=="\n"){r.shift()}if(this._lineBuffer.length>0){this._lineBuffer[this._lineBuffer.length-1]+=r[0];r.shift()}this._lastChunkEndedWithCR=e[e.length-1]=="\r";this._lineBuffer=this._lineBuffer.concat(r);this._pushBuffer(t,1,n)};LineStream.prototype._pushBuffer=function(e,t,n){while(this._lineBuffer.length>t){var r=this._lineBuffer.shift();if(this._keepEmptyLines||r.length>0){if(!this.push(this._reencode(r,e))){var i=this;setImmediate(function(){i._pushBuffer(e,t,n)});return}}}n()};LineStream.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};LineStream.prototype._reencode=function(e,t){if(this.encoding&&this.encoding!=t){return Buffer.from(e,t).toString(this.encoding)}else if(this.encoding){return e}else{return Buffer.from(e,t)}}},612:function(e,t,n){"use strict";const r=n(87);const i=n(228);const s=1e3*5;const o=(e,t="SIGTERM",n={})=>{const r=e(t);a(e,t,n,r);return r};const a=(e,t,n,r)=>{if(!u(t,n,r)){return}const i=c(n);const s=setTimeout(()=>{e("SIGKILL")},i);if(s.unref){s.unref()}};const u=(e,{forceKillAfterTimeout:t},n)=>{return l(e)&&t!==false&&n};const l=e=>{return e===r.constants.signals.SIGTERM||typeof e==="string"&&e.toUpperCase()==="SIGTERM"};const c=({forceKillAfterTimeout:e=true})=>{if(e===true){return s}if(!Number.isInteger(e)||e<0){throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}return e};const f=(e,t)=>{const n=e.kill();if(n){t.isCanceled=true}};const d=(e,t,n)=>{e.kill(t);n(Object.assign(new Error("Timed out"),{timedOut:true,signal:t}))};const p=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===undefined){return r}if(!Number.isInteger(t)||t<0){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)}let i;const s=new Promise((r,s)=>{i=setTimeout(()=>{d(e,n,s)},t)});const o=r.finally(()=>{clearTimeout(i)});return Promise.race([s,o])};const h=async(e,{cleanup:t,detached:n},r)=>{if(!t||n){return r}const s=i(()=>{e.kill()});return r.finally(()=>{s()})};e.exports={spawnedKill:o,spawnedCancel:f,setupTimeout:p,setExitHandler:h}},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},624:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.lowerCase=t.capitalize=t.uniqBy=t.unionBy=t.destroyCircular=t.inputTypeToJson=t.getOutputTypeName=t.getInputTypeName=t.stringifyInputType=t.getSuggestion=t.graphQLToJSType=t.getGraphQLType=t.wrapWithList=t.stringifyGraphQLType=t.JSTypeToGraphQLType=t.JSOutputTypeToInputType=t.GraphQLScalarToJSTypeTable=t.isScalar=t.ScalarTypeTable=t.keyBy2=t.keyBy=void 0;const i=r(n(304));const s=r(n(161));const o=r(n(667));t.keyBy=((e,t)=>{const n={};for(const r of e){const e=r[t];n[e]=r}return n});t.keyBy2=((e,t,n)=>{const r={};for(const t of e){const e=t[n];r[e]=t}for(const e of t){const t=e[n];r[t]=e}return r});t.ScalarTypeTable={String:true,Int:true,Float:true,Boolean:true,Long:true,DateTime:true,ID:true,UUID:true,Json:true};function isScalar(e){if(typeof e!=="string"){return false}return t.ScalarTypeTable[e]||false}t.isScalar=isScalar;t.GraphQLScalarToJSTypeTable={String:"string",Int:"number",Float:"number",Boolean:"boolean",Long:"number",DateTime:["Date","string"],ID:"string",UUID:"string",Json:"JsonValue"};t.JSOutputTypeToInputType={JsonValue:"InputJsonValue"};t.JSTypeToGraphQLType={string:"String",boolean:"Boolean",object:"Json"};function stringifyGraphQLType(e){if(typeof e==="string"){return e}return e.name}t.stringifyGraphQLType=stringifyGraphQLType;function wrapWithList(e,t){if(t){return`List<${e}>`}return e}t.wrapWithList=wrapWithList;function getGraphQLType(e,n){if(e===null){return"null"}if(Array.isArray(e)){let t=e.reduce((e,t)=>{const r=getGraphQLType(t,n);if(!e.includes(r)){e.push(r)}return e},[]);if(t.includes("Float")&&t.includes("Int")){t=["Float"]}return`List<${t.join(" | ")}>`}const r=typeof e;if(r==="number"){if(Math.trunc(e)===e){return"Int"}else{return"Float"}}if(Object.prototype.toString.call(e)==="[object Date]"){return"DateTime"}if(r==="string"){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)){return"UUID"}const t=new Date(e);if(n&&typeof n==="object"&&n.values&&n.values.includes(e)){return n.name}if(t.toString()==="Invalid Date"){return"String"}if(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/.test(e)){return"DateTime"}}return t.JSTypeToGraphQLType[r]}t.getGraphQLType=getGraphQLType;function graphQLToJSType(e){return t.GraphQLScalarToJSTypeTable[e]}t.graphQLToJSType=graphQLToJSType;function getSuggestion(e,t){const n=t.reduce((t,n)=>{const r=o.default(e,n);if(r<t.distance){return{distance:r,str:n}}return t},{distance:Math.min(Math.floor(e.length)*1.1,...t.map(e=>e.length*3)),str:null});return n.str}t.getSuggestion=getSuggestion;function stringifyInputType(e,t=false){if(typeof e==="string"){return e}if(e.values){return`enum ${e.name} {\n${s.default(e.values.join(", "),2)}\n}`}else{const n=s.default(e.fields.map(e=>{const n=e.inputType[0];const r=`${e.name}`;const s=`${t?i.default.green(r):r}${n.isRequired?"":"?"}: ${i.default.white(e.inputType.map(e=>argIsInputType(e.type)?e.type.name:wrapWithList(stringifyGraphQLType(e.type),e.isList)).join(" | "))}`;if(!n.isRequired){return i.default.dim(s)}return s}).join("\n"),2);return`${i.default.dim("type")} ${i.default.bold.dim(e.name)} ${i.default.dim("{")}\n${n}\n${i.default.dim("}")}`}}t.stringifyInputType=stringifyInputType;function argIsInputType(e){if(typeof e==="string"){return false}return true}function getInputTypeName(e){if(typeof e==="string"){return e}return e.name}t.getInputTypeName=getInputTypeName;function getOutputTypeName(e){if(typeof e==="string"){return e}return e.name}t.getOutputTypeName=getOutputTypeName;function inputTypeToJson(e,t,n=false){if(typeof e==="string"){return e}if(e.values){return e.values.join(" | ")}const r=e;const i=t&&r.fields.every(e=>e.inputType[0].kind==="object")&&!r.isWhereType&&!r.atLeastOne;if(n){return getInputTypeName(e)}return r.fields.reduce((e,t)=>{const n=t.inputType[0];e[t.name+(n.isRequired?"":"?")]=t.isRelationFilter&&!i&&!n.isRequired?getInputTypeName(n.type):inputTypeToJson(n.type,n.isRequired,true);return e},{})}t.inputTypeToJson=inputTypeToJson;function destroyCircular(e,t=[]){const n=Array.isArray(e)?[]:{};t.push(e);for(const r of Object.keys(e)){const i=e[r];if(typeof i==="function"){continue}if(!i||typeof i!=="object"){n[r]=i;continue}if(t.indexOf(e[r])===-1){n[r]=destroyCircular(e[r],t.slice(0));continue}n[r]="[Circular]"}if(typeof e.name==="string"){n.name=e.name}if(typeof e.message==="string"){n.message=e.message}if(typeof e.stack==="string"){n.stack=e.stack}return n}t.destroyCircular=destroyCircular;function unionBy(e,t,n){const r={};for(const t of e){r[n(t)]=t}for(const e of t){const t=n(e);if(!r[t]){r[t]=e}}return Object.values(r)}t.unionBy=unionBy;function uniqBy(e,t){const n={};for(const r of e){n[t(r)]=r}return Object.values(n)}t.uniqBy=uniqBy;function capitalize(e){return e[0].toUpperCase()+e.slice(1)}t.capitalize=capitalize;function lowerCase(e){return e.substring(0,1).toLowerCase()+e.substring(1)}t.lowerCase=lowerCase},625:function(e,t,n){"use strict";const r=n(622);const i=n(687);const s=n(454);function resolveCommandAttempt(e,t){const n=e.options.env||process.env;const o=process.cwd();const a=e.options.cwd!=null;const u=a&&process.chdir!==undefined&&!process.chdir.disabled;if(u){try{process.chdir(e.options.cwd)}catch(e){}}let l;try{l=i.sync(e.command,{path:n[s({env:n})],pathExt:t?r.delimiter:undefined})}catch(e){}finally{if(u){process.chdir(o)}}if(l){l=r.resolve(a?e.options.cwd:"",l)}return l}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},626:function(e){"use strict";const t=e.exports;e.exports.default=t;const n="[";const r="]";const i="";const s=";";const o=process.env.TERM_PROGRAM==="Apple_Terminal";t.cursorTo=((e,t)=>{if(typeof e!=="number"){throw new TypeError("The `x` argument is required")}if(typeof t!=="number"){return n+(e+1)+"G"}return n+(t+1)+";"+(e+1)+"H"});t.cursorMove=((e,t)=>{if(typeof e!=="number"){throw new TypeError("The `x` argument is required")}let r="";if(e<0){r+=n+-e+"D"}else if(e>0){r+=n+e+"C"}if(t<0){r+=n+-t+"A"}else if(t>0){r+=n+t+"B"}return r});t.cursorUp=((e=1)=>n+e+"A");t.cursorDown=((e=1)=>n+e+"B");t.cursorForward=((e=1)=>n+e+"C");t.cursorBackward=((e=1)=>n+e+"D");t.cursorLeft=n+"G";t.cursorSavePosition=o?"7":n+"s";t.cursorRestorePosition=o?"8":n+"u";t.cursorGetPosition=n+"6n";t.cursorNextLine=n+"E";t.cursorPrevLine=n+"F";t.cursorHide=n+"?25l";t.cursorShow=n+"?25h";t.eraseLines=(e=>{let n="";for(let r=0;r<e;r++){n+=t.eraseLine+(r<e-1?t.cursorUp():"")}if(e){n+=t.cursorLeft}return n});t.eraseEndLine=n+"K";t.eraseStartLine=n+"1K";t.eraseLine=n+"2K";t.eraseDown=n+"J";t.eraseUp=n+"1J";t.eraseScreen=n+"2J";t.scrollUp=n+"S";t.scrollDown=n+"T";t.clearScreen="c";t.clearTerminal=process.platform==="win32"?`${t.eraseScreen}${n}0f`:`${t.eraseScreen}${n}3J${n}H`;t.beep=i;t.link=((e,t)=>{return[r,"8",s,s,t,i,e,r,"8",s,s,i].join("")});t.image=((e,t={})=>{let n=`${r}1337;File=inline=1`;if(t.width){n+=`;width=${t.width}`}if(t.height){n+=`;height=${t.height}`}if(t.preserveAspectRatio===false){n+=";preserveAspectRatio=0"}return n+":"+e.toString("base64")+i});t.iTerm={setCwd:(e=process.cwd())=>`${r}50;CurrentDir=${e}${i}`,annotation:(e,t={})=>{let n=`${r}1337;`;const s=typeof t.x!=="undefined";const o=typeof t.y!=="undefined";if((s||o)&&!(s&&o&&typeof t.length!=="undefined")){throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined")}e=e.replace(/\|/g,"");n+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=";if(t.length>0){n+=(s?[e,t.length,t.x,t.y]:[t.length,e]).join("|")}else{n+=e}return n+i}}},629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.signalsByNumber=t.signalsByName=void 0;var r=n(87);var i=n(503);var s=n(297);const o=function(){const e=(0,i.getSignals)();return e.reduce(a,{})};const a=function(e,{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}}};const u=o();t.signalsByName=u;const l=function(){const e=(0,i.getSignals)();const t=s.SIGRTMAX+1;const n=Array.from({length:t},(t,n)=>c(n,e));return Object.assign({},...n)};const c=function(e,t){const n=f(e,t);if(n===undefined){return{}}const{name:r,description:i,supported:s,action:o,forced:a,standard:u}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:u}}};const f=function(e,t){const n=t.find(({name:t})=>r.constants.signals[t]===e);if(n!==undefined){return n}return t.find(t=>t.number===e)};const d=l();t.signalsByNumber=d},631:function(e){e.exports=require("net")},638:function(e){var t=1e3;var n=t*60;var r=n*60;var i=r*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=r){return Math.round(e/r)+"h"}if(s>=n){return Math.round(e/n)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=r){return plural(e,s,r,"hour")}if(s>=n){return plural(e,s,n,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+" "+r+(i?"s":"")}},640:function(e){"use strict";e.exports=(({onlyFirst:e=false}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?undefined:"g")})},647:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Undici=void 0;const i=r(n(374));const s=n(302);class Undici{constructor(e,t){this.closed=false;this.pool=new s.Pool(e,{connections:100,pipelining:10,requestTimeout:0,socketTimeout:0,...t})}request(e,t){return new Promise((n,r)=>{this.pool.request({path:"/",method:"POST",headers:{"Content-Type":"application/json",...t},body:e},async(e,t)=>{if(e){r(e)}else{const{statusCode:e,headers:r,body:s}=t;const o=JSON.parse(await i.default(s));n({statusCode:e,headers:r,data:o})}})})}status(){return new Promise((e,t)=>{this.pool.request({path:"/",method:"GET"},async(n,r)=>{if(n){t(n)}else{const{statusCode:t,headers:n,body:s}=r;const o=JSON.parse(await i.default(s));e({statusCode:t,headers:n,data:o})}})})}close(){if(!this.closed){this.pool.close(()=>{})}this.closed=true}}t.Undici=Undici},652:function(e,t,n){"use strict";const r=n(357);const{kDestroyed:i}=n(390);const{IncomingMessage:s}=n(605);function nop(){}function isStream(e){return!!(e&&typeof e.on==="function")}function bodyLength(e){if(e&&typeof e.on==="function"){const t=e._readableState;return t&&t.ended===true&&Number.isFinite(t.length)?t.length:null}r(!e||Number.isFinite(e.byteLength));return e?e.length:0}function isDestroyed(e){return!e||!!(e.destroyed||e[i])}function destroy(e,t){if(!isStream(e)||isDestroyed(e)){return}if(typeof e.destroy==="function"){if(t||Object.getPrototypeOf(e).constructor!==s){e.destroy(t)}}else if(t){process.nextTick((e,t)=>{e.emit("error",t)},e,t)}if(e.destroyed!==true){e[i]=true}}function parseKeepAliveTimeout(e,t){if(!e){return null}let n;for(let e=0;e<t.length;e+=2){const r=t[e+0];if(r.length===10&&r.toLowerCase()==="keep-alive"){n=t[e+1];break}}const r=n&&n.match(/timeout=(\d+)/);return r?Number(r[1])*1e3:null}function parseHeaders(e){const t={};for(var n=0;n<e.length;n+=2){var r=e[n].toLowerCase();var i=t[r];if(!i){t[r]=e[n+1]}else{if(!Array.isArray(i)){i=[i];t[r]=i}i.push(e[n+1])}}return t}function isBuffer(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}e.exports={nop:nop,isStream:isStream,isDestroyed:isDestroyed,parseHeaders:parseHeaders,parseKeepAliveTimeout:parseKeepAliveTimeout,destroy:destroy,bodyLength:bodyLength,isBuffer:isBuffer}},667:function(e){"use strict";e.exports=function(){function _min(e,t,n,r,i){return e<t||n<t?e>n?n+1:e+1:r===i?t:t+1}return function(e,t){if(e===t){return 0}if(e.length>t.length){var n=e;e=t;t=n}var r=e.length;var i=t.length;while(r>0&&e.charCodeAt(r-1)===t.charCodeAt(i-1)){r--;i--}var s=0;while(s<r&&e.charCodeAt(s)===t.charCodeAt(s)){s++}r-=s;i-=s;if(r===0||i<3){return i}var o=0;var a;var u;var l;var c;var f;var d;var p;var h;var m;var g;var y;var b;var w=[];for(a=0;a<r;a++){w.push(a+1);w.push(e.charCodeAt(s+a))}var v=w.length-1;for(;o<i-3;){m=t.charCodeAt(s+(u=o));g=t.charCodeAt(s+(l=o+1));y=t.charCodeAt(s+(c=o+2));b=t.charCodeAt(s+(f=o+3));d=o+=4;for(a=0;a<v;a+=2){p=w[a];h=w[a+1];u=_min(p,u,l,m,h);l=_min(u,l,c,g,h);c=_min(l,c,f,y,h);d=_min(c,f,d,b,h);w[a]=d;f=c;c=l;l=u;u=p}}for(;o<i;){m=t.charCodeAt(s+(u=o));d=++o;for(a=0;a<v;a+=2){p=w[a];w[a]=d=_min(p,u,d,m,w[a+1]);u=p}}return d}}()},669:function(e){e.exports=require("util")},687:function(e,t,n){const r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=n(622);const s=r?";":":";const o=n(766);const a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const u=(e,t)=>{const n=t.colon||s;const i=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)];const o=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=r?o.split(n):[""];if(r){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const l=(e,t,n)=>{if(typeof t==="function"){n=t;t={}}if(!t)t={};const{pathEnv:r,pathExt:s,pathExtExe:l}=u(e,t);const c=[];const f=n=>new Promise((s,o)=>{if(n===r.length)return t.all&&c.length?s(c):o(a(e));const u=r[n];const l=/^".*"$/.test(u)?u.slice(1,-1):u;const f=i.join(l,e);const p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;s(d(p,n,0))});const d=(e,n,r)=>new Promise((i,a)=>{if(r===s.length)return i(f(n+1));const u=s[r];o(e+u,{pathExt:l},(s,o)=>{if(!s&&o){if(t.all)c.push(e+u);else return i(e+u)}return i(d(e,n,r+1))})});return n?f(0).then(e=>n(null,e),n):f(0)};const c=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:s}=u(e,t);const l=[];for(let a=0;a<n.length;a++){const u=n[a];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const f=i.join(c,e);const d=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let e=0;e<r.length;e++){const n=d+r[e];try{const e=o.sync(n,{pathExt:s});if(e){if(t.all)l.push(n);else return n}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)};e.exports=l;l.sync=c},694:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Dataloader=void 0;class Dataloader{constructor(e){this.options=e;this.tickActive=false;this.batches={}}request(e){const t=this.options.batchBy(e);if(!t){return this.options.singleLoader(e)}if(!this.batches[t]){this.batches[t]=[];if(!this.tickActive){this.tickActive=true;process.nextTick(()=>{this.dispatchBatches();this.tickActive=false})}}return new Promise((n,r)=>{this.batches[t].push({request:e,resolve:n,reject:r})})}dispatchBatches(){for(const e in this.batches){const t=this.batches[e];delete this.batches[e];if(t.length===1){this.options.singleLoader(t[0].request).then(e=>{if(e instanceof Error){t[0].reject(e)}else{t[0].resolve(e)}}).catch(e=>{t[0].reject(e)})}else{this.options.batchLoader(t.map(e=>e.request)).then(e=>{if(e instanceof Error){for(let n=0;n<t.length;n++){t[n].reject(e)}}else{for(let n=0;n<t.length;n++){const r=e[n];if(r instanceof Error){t[n].reject(r)}else{t[n].resolve(r)}}}}).catch(e=>{for(let n=0;n<t.length;n++){t[n].reject(e)}})}}}}t.Dataloader=Dataloader},699:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.theme=t.identity=t.brightBlue=t.blue=t.darkBrightBlue=t.orange=void 0;const i=r(n(304));t.orange=i.default.rgb(246,145,95);t.darkBrightBlue=i.default.rgb(107,139,140);t.blue=i.default.cyan;t.brightBlue=i.default.rgb(127,155,155);t.identity=(e=>e);t.theme={keyword:t.blue,entity:t.blue,value:t.brightBlue,punctuation:t.darkBrightBlue,directive:t.blue,function:t.blue,variable:t.brightBlue,string:i.default.greenBright,boolean:t.orange,number:i.default.cyan,comment:i.default.grey}},707:function(e,t,n){const r=n(899);const i=n(413);const s={};const o=Object.keys(r);function wrapRaw(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function wrapRounded(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}const r=e(t);if(typeof r==="object"){for(let e=r.length,t=0;t<e;t++){r[t]=Math.round(r[t])}}return r};if("conversion"in e){t.conversion=e.conversion}return t}o.forEach(e=>{s[e]={};Object.defineProperty(s[e],"channels",{value:r[e].channels});Object.defineProperty(s[e],"labels",{value:r[e].labels});const t=i(e);const n=Object.keys(t);n.forEach(n=>{const r=t[n];s[e][n]=wrapRounded(r);s[e][n].raw=wrapRaw(r)})});e.exports=s},724:function(e,t,n){"use strict";const r=n(747);const i=n(884);function readShebang(e){const t=150;const n=Buffer.alloc(t);let s;try{s=r.openSync(e,"r");r.readSync(s,n,0,t,0);r.closeSync(s)}catch(e){}return i(n.toString())}e.exports=readShebang},725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.highlightTS=void 0;const r=n(63);function highlightTS(e){return highlight(e,r.Prism.languages.javascript)}t.highlightTS=highlightTS;function highlight(e,t){const n=r.Prism.tokenize(e,t);return n.map(e=>r.Token.stringify(e)).join("")}},730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGNALS=void 0;const n=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:true},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:true},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:true},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];t.SIGNALS=n},737:function(e,t,n){"use strict";const r=n(128);const i=n(425);function parseVersion(e){if(/^\d{3,4}$/.test(e)){const t=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}const t=(e||"").split(".").map(e=>parseInt(e,10));return{major:t[0],minor:t[1],patch:t[2]}}function supportsHyperlink(e){const{env:t}=process;if("FORCE_HYPERLINK"in t){return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0)}if(i("no-hyperlink")||i("no-hyperlinks")||i("hyperlink=false")||i("hyperlink=never")){return false}if(i("hyperlink=true")||i("hyperlink=always")){return true}if(!r.supportsColor(e)){return false}if(e&&!e.isTTY){return false}if(process.platform==="win32"){return false}if("CI"in t){return false}if("TEAMCITY_VERSION"in t){return false}if("TERM_PROGRAM"in t){const e=parseVersion(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":if(e.major===3){return e.minor>=1}return e.major>3}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0"){return false}const e=parseVersion(t.VTE_VERSION);return e.major>0||e.minor>=50}return false}e.exports={supportsHyperlink:supportsHyperlink,stdout:supportsHyperlink(process.stdout),stderr:supportsHyperlink(process.stderr)}},747:function(e){e.exports=require("fs")},749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getPlatform=t.getOpenSSLVersion=t.parseOpenSSLVersion=t.resolveDistro=t.parseDistro=t.getos=void 0;const i=r(n(87));const s=r(n(747));const o=n(669);const a=n(129);const u=o.promisify(s.default.readFile);const l=o.promisify(s.default.exists);async function getos(){const e=i.default.platform();if(e==="freebsd"){const e=await gracefulExec(`freebsd-version`);if(e&&e.trim().length>0){const t=/^(\d+)\.?/;const n=t.exec(e);if(n){return{platform:"freebsd",distro:`freebsd${n[1]}`}}}}if(e!=="linux"){return{platform:e}}return{platform:"linux",libssl:await getOpenSSLVersion(),distro:await resolveDistro()}}t.getos=getos;function parseDistro(e){const t=/^ID="?([^"\n]*)"?$/im;const n=/^ID_LIKE="?([^"\n]*)"?$/im;const r=t.exec(e);const i=r&&r[1]&&r[1].toLowerCase()||"";const s=n.exec(e);const o=s&&s[1]&&s[1].toLowerCase()||"";if(i==="raspbian"){return"arm"}if(i==="nixos"){return"nixos"}if(o.includes("centos")||o.includes("fedora")||o.includes("rhel")||i==="fedora"){return"rhel"}if(o.includes("debian")||o.includes("ubuntu")||i==="debian"){return"debian"}return}t.parseDistro=parseDistro;async function resolveDistro(){const e="/etc/os-release";const t="/etc/alpine-release";if(await l(t)){return"musl"}else if(await l(e)){return parseDistro(await u(e,"utf-8"))}else{return}}t.resolveDistro=resolveDistro;function parseOpenSSLVersion(e){const t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){return t[1]+".x"}return}t.parseOpenSSLVersion=parseOpenSSLVersion;async function getOpenSSLVersion(){const[e,t]=await Promise.all([gracefulExec(`openssl version -v`),gracefulExec(`\n      ls -l /lib64 | grep ssl;\n      ls -l /usr/lib64 | grep ssl;\n    `)]);if(e){const t=parseOpenSSLVersion(e);if(t){return t}}if(t){const e=/libssl\.so\.(\d+\.\d+)\.\d+/.exec(t);if(e){return e[1]+".x"}}return undefined}t.getOpenSSLVersion=getOpenSSLVersion;async function gracefulExec(e){return new Promise(t=>{try{a.exec(e,(e,n)=>{t(String(n))})}catch(e){t(undefined);return undefined}})}async function getPlatform(){const{platform:e,libssl:t,distro:n}=await getos();if(e==="darwin"){return"darwin"}if(e==="win32"){return"windows"}if(e==="freebsd"){return n}if(e==="openbsd"){return"openbsd"}if(e==="netbsd"){return"netbsd"}if(e==="linux"&&n==="nixos"){return"linux-nixos"}if(e==="linux"&&n==="musl"){return"linux-musl"}if(e==="linux"&&n&&t){return n+"-openssl-"+t}if(t){return"debian-openssl-"+t}if(n){return n+"-openssl-1.1.x"}return"debian-openssl-1.1.x"}t.getPlatform=getPlatform},753:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deepSet=t.deepGet=void 0;const n=e=>Array.isArray(e)?e:e.split(".");t.deepGet=((e,t)=>n(t).reduce((e,t)=>e&&e[t],e));t.deepSet=((e,r,i)=>n(r).reduceRight((n,r,i,s)=>Object.assign({},t.deepGet(e,s.slice(0,i)),{[r]:n}),i))},766:function(e,t,n){var r=n(747);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=n(505)}else{i=n(538)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,n){if(typeof t==="function"){n=t;t={}}if(!n){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(n,r){isexe(e,t||{},function(e,t){if(e){r(e)}else{n(t)}})})}i(e,t||{},function(e,r){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;r=false}}n(e,r)})}function sync(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},768:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.flatMap=void 0;function flatten(e){return Array.prototype.concat.apply([],e)}function flatMap(e,t,n){return flatten(e.map(t,n))}t.flatMap=flatMap},779:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.dedent=void 0;const i=r(n(27));function dedent(e){return i.default(e)}t.dedent=dedent},782:function(e,t,n){function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(638);Object.keys(e).forEach(t=>{createDebug[t]=e[t]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n);t|=0}return createDebug.colors[Math.abs(t)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let t;function debug(...e){if(!debug.enabled){return}const n=debug;const r=Number(new Date);const i=r-(t||r);n.diff=i;n.prev=t;n.curr=r;t=r;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if(t==="%%"){return t}s++;const i=createDebug.formatters[r];if(typeof i==="function"){const r=e[s];t=i.call(n,r);e.splice(s,1);s--}return t});createDebug.formatArgs.call(n,e);const o=n.log||createDebug.log;o.apply(n,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,t){const n=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let t;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const r=n.length;for(t=0;t<r;t++){if(!n[t]){continue}e=n[t].replace(/\*/g,".*?");if(e[0]==="-"){createDebug.skips.push(new RegExp("^"+e.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+e+"$"))}}for(t=0;t<createDebug.instances.length;t++){const e=createDebug.instances[t];e.enabled=createDebug.enabled(e.namespace)}}function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(e=>"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let n;for(t=0,n=createDebug.skips.length;t<n;t++){if(createDebug.skips[t].test(e)){return false}}for(t=0,n=createDebug.names.length;t<n;t++){if(createDebug.names[t].test(e)){return true}}return false}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},784:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.printJsonWithErrors=void 0;const i=r(n(304));const s=r(n(971));const o=n(753);const a=r(n(437));const u="@@__DIM_POINTER__@@";function printJsonWithErrors({ast:e,keyPaths:t,valuePaths:n,missingItems:r}){let s=e;for(const{path:e,type:t}of r){s=o.deepSet(s,e,t)}return a.default(s,{indent:"  ",transformLine:({indent:e,key:s,value:o,stringifiedValue:a,eol:l,path:c})=>{const f=c.join(".");const d=t.includes(f);const p=n.includes(f);const h=r.find(e=>e.path===f);let m=a;if(h){if(typeof o==="string"){m=m.slice(1,m.length-1)}const t=h.isRequired?"":"?";const n=h.isRequired?"+":"?";const r=h.isRequired?i.default.greenBright:i.default.green;let a=r(prefixLines(s+t+": "+m+l,e,n));if(!h.isRequired){a=i.default.dim(a)}return a}else{const t=r.some(e=>f.startsWith(e.path));const n=s[s.length-2]==="?";if(n){s=s.slice(1,s.length-1)}if(n&&typeof o==="object"&&o!==null){m=m.split("\n").map((e,t,n)=>t===n.length-1?e+u:e).join("\n")}if(t&&typeof o==="string"){m=m.slice(1,m.length-1);if(!n){m=i.default.bold(m)}}if((typeof o!=="object"||o===null)&&!p&&!t){m=i.default.dim(m)}const c=d?i.default.redBright(s):s;m=p?i.default.redBright(m):m;let h=e+c+": "+m+(t?l:i.default.dim(l));if(d||p){const t=h.split("\n");const n=String(s).length;const r=d?i.default.redBright("~".repeat(n)):" ".repeat(n);const u=p?getValueLength(e,s,o,a):0;const l=Boolean(p&&typeof o==="object"&&o!==null);const c=p?"  "+i.default.redBright("~".repeat(u)):"";if(r&&r.length>0&&!l){t.splice(1,0,e+r+c)}if(r&&r.length>0&&l){t.splice(t.length-1,0,e.slice(0,e.length-2)+c)}h=t.join("\n")}return h}}})}t.printJsonWithErrors=printJsonWithErrors;function getValueLength(e,t,n,r){if(n===null){return 4}if(typeof n==="string"){return n.length+2}if(typeof n==="object"){return getLongestLine(`${t}: ${s.default(r)}`)-e.length}return String(n).length}function getLongestLine(e){return e.split("\n").reduce((e,t)=>t.length>e?t.length:e,0)}function prefixLines(e,t,n){return e.split("\n").map((e,r,i)=>r===0?n+t.slice(1)+e:r<i.length-1?n+e.slice(1):e).map(e=>{return s.default(e).includes(u)?i.default.dim(e.replace(u,"")):e.includes("?")?i.default.dim(e):e}).join("\n")}},794:function(e){e.exports=require("stream")},796:function(e){"use strict";const t=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";t.writable=(e=>t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object");t.readable=(e=>t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object");t.duplex=(e=>t.writable(e)&&t.readable(e));t.transform=(e=>t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object");e.exports=t},805:function(e,t,n){"use strict";const r=n(622);const i=n(454);const s=e=>{e={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...e};let t;let n=r.resolve(e.cwd);const s=[];while(t!==n){s.push(r.join(n,"node_modules/.bin"));t=n;n=r.resolve(n,"..")}const o=r.resolve(e.cwd,e.execPath,"..");s.push(o);return s.concat(e.path).join(r.delimiter)};e.exports=s;e.exports.default=s;e.exports.env=(t=>{t={env:process.env,...t};const n={...t.env};const r=i({env:n});t.path=n[r];n[r]=e.exports(t);return n})},814:function(e){"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,n){if(!t){return}const r=e.emit;e.emit=function(t,i){if(t==="exit"){const t=verifyENOENT(i,n,"spawn");if(t){return r.call(e,"error",t)}}return r.apply(e,arguments)}}function verifyENOENT(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawn")}return null}function verifyENOENTSync(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},827:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.mapPreviewFeatures=void 0;const n={transactionApi:"transaction",aggregateApi:"aggregations"};function mapPreviewFeatures(e){if(Array.isArray(e)&&e.length>0){return e.map(e=>{var t;return(t=n[e])!==null&&t!==void 0?t:e})}return[]}t.mapPreviewFeatures=mapPreviewFeatures},835:function(e){e.exports=require("url")},838:function(e,t,n){"use strict";const r=n(38);const{InvalidArgumentError:i}=n(306);const{PassThrough:s}=n(794);const{kClients:o,kQueue:a,kPendingIdx:u}=n(390);const{PipelineHandler:l}=n(208);class Pool{constructor(e,{connections:t,...n}={}){if(t!=null&&(!Number.isFinite(t)||t<=0)){throw new i("invalid connections")}this[a]=[];this[u]=0;this[o]=Array.from({length:t||10},()=>new r(e,n));const s=this;function onDrain(){while(s[u]<s[a].length&&!this.busy){const{fn:e,args:t}=s[a][s[u]];s[a][s[u]++]=null;e.apply(this,t)}if(s[u]>256){s[a].splice(0,s[u]);s[u]=0}}for(const e of this[o]){e.on("drain",onDrain)}}stream(e,t,n){if(n===undefined){return new Promise((n,r)=>{this.stream(e,t,(e,t)=>{return e?r(e):n(t)})})}enqueue(this,r.prototype.stream,e,t,n)}pipeline(e,t){try{const n=new l(e,t);const{path:r,method:i,headers:o,idempotent:a,servername:u,signal:c,requestTimeout:f}=e;this.dispatch({path:r,method:i,body:n.req,headers:o,idempotent:a,servername:u,signal:c,requestTimeout:f},n);return n.ret}catch(e){return(new s).destroy(e)}}request(e,t){if(t===undefined){return new Promise((t,n)=>{this.request(e,(e,r)=>{return e?n(e):t(r)})})}enqueue(this,r.prototype.request,e,t)}upgrade(e,t){if(t===undefined){return new Promise((t,n)=>{this.upgrade(e,(e,r)=>{return e?n(e):t(r)})})}enqueue(this,r.prototype.upgrade,e,t)}connect(e,t){if(t===undefined){return new Promise((t,n)=>{this.connect(e,(e,r)=>{return e?n(e):t(r)})})}enqueue(this,r.prototype.connect,e,t)}dispatch(e,t){enqueue(this,r.prototype.dispatch,e,t)}close(e){const t=Promise.all(this[o].map(e=>e.close()));if(e){t.then(()=>e(null,null),t=>e(t,null))}else{return t}}destroy(e,t){if(typeof e==="function"){t=e;e=null}const n=Promise.all(this[o].map(t=>t.destroy(e)));if(t){n.then(()=>t(null,null))}else{return n}}}function enqueue(e,t,...n){const r=e[o].find(e=>!e.busy);if(!r){e[a].push({fn:t,args:n})}else{t.apply(r,n)}}e.exports=Pool},847:function(e,t,n){var r=n(121);var i=n(392);var s=n(747);var o=function(){};var a=/^v?\.0/.test(process.version);var u=function(e){return typeof e==="function"};var l=function(e){if(!a)return false;if(!s)return false;return(e instanceof(s.ReadStream||o)||e instanceof(s.WriteStream||o))&&u(e.close)};var c=function(e){return e.setHeader&&u(e.abort)};var f=function(e,t,n,s){s=r(s);var a=false;e.on("close",function(){a=true});i(e,{readable:t,writable:n},function(e){if(e)return s(e);a=true;s()});var f=false;return function(t){if(a)return;if(f)return;f=true;if(l(e))return e.close(o);if(c(e))return e.abort();if(u(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var d=function(e){e()};var p=function(e,t){return e.pipe(t)};var h=function(){var e=Array.prototype.slice.call(arguments);var t=u(e[e.length-1]||o)&&e.pop()||o;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var n;var r=e.map(function(i,s){var o=s<e.length-1;var a=s>0;return f(i,o,a,function(e){if(!n)n=e;if(e)r.forEach(d);if(o)return;r.forEach(d);t(n)})});return e.reduce(p)};e.exports=h},859:function(e){"use strict";e.exports=(e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")})},867:function(e){e.exports=require("tty")},884:function(e,t,n){"use strict";const r=n(110);e.exports=((e="")=>{const t=e.match(r);if(!t){return null}const[n,i]=t[0].replace(/#! ?/,"").split(" ");const s=n.split("/").pop();if(s==="env"){return i}return i?`${s} ${i}`:s})},890:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=(e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t)))},898:function(e,t,n){"use strict";const{Readable:r}=n(794);const{InvalidArgumentError:i,RequestAbortedError:s}=n(306);const o=n(652);const{AsyncResource:a}=n(303);class RequestResponse extends r{constructor(e){super({autoDestroy:true,read:e})}_destroy(e,t){this._read();if(!e&&!this._readableState.endEmitted){e=new s}t(e)}}class RequestHandler extends a{constructor(e,t){if(!e||typeof e!=="object"){throw new i("invalid opts")}if(e.method==="CONNECT"){throw new i("invalid method")}super("UNDICI_REQUEST");this.opaque=e.opaque||null;this.callback=t;this.res=null}onHeaders(e,t,n){const{callback:r,opaque:i}=this;if(e<200){return}const s=new RequestResponse(n);this.callback=null;this.res=s;this.runInAsyncScope(r,null,null,{statusCode:e,headers:o.parseHeaders(t),opaque:i,body:s})}onData(e){const{res:t}=this;if(t._readableState.destroyed){return}return t.push(e)}onComplete(e){const{res:t}=this;if(t._readableState.destroyed){return}t.push(null)}onError(e){const{res:t,callback:n,opaque:r}=this;if(n){this.callback=null;this.runInAsyncScope(n,null,e,{opaque:r})}if(t){this.res=null;o.destroy(t,e)}}}function request(e,t,n){if(n===undefined){return new Promise((n,r)=>{request(e,t,(e,t)=>{return e?r(e):n(t)})})}if(typeof n!=="function"){throw new i("invalid callback")}try{e.dispatch(t,new RequestHandler(t,n))}catch(e){process.nextTick(n,e,null)}}e.exports={request:request,RequestHandler:RequestHandler}},899:function(e,t,n){const r=n(105);const i={};for(const e of Object.keys(r)){i[r[e]]=e}const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e])){throw new Error("missing channels property: "+e)}if(!("labels"in s[e])){throw new Error("missing channel labels property: "+e)}if(s[e].labels.length!==s[e].channels){throw new Error("channel and label counts mismatch: "+e)}const{channels:t,labels:n}=s[e];delete s[e].channels;delete s[e].labels;Object.defineProperty(s[e],"channels",{value:t});Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.min(t,n,r);const s=Math.max(t,n,r);const o=s-i;let a;let u;if(s===i){a=0}else if(t===s){a=(n-r)/o}else if(n===s){a=2+(r-t)/o}else if(r===s){a=4+(t-n)/o}a=Math.min(a*60,360);if(a<0){a+=360}const l=(i+s)/2;if(s===i){u=0}else if(l<=.5){u=o/(s+i)}else{u=o/(2-s-i)}return[a,u*100,l*100]};s.rgb.hsv=function(e){let t;let n;let r;let i;let s;const o=e[0]/255;const a=e[1]/255;const u=e[2]/255;const l=Math.max(o,a,u);const c=l-Math.min(o,a,u);const f=function(e){return(l-e)/6/c+1/2};if(c===0){i=0;s=0}else{s=c/l;t=f(o);n=f(a);r=f(u);if(o===l){i=r-n}else if(a===l){i=1/3+t-r}else if(u===l){i=2/3+n-t}if(i<0){i+=1}else if(i>1){i-=1}}return[i*360,s*100,l*100]};s.rgb.hwb=function(e){const t=e[0];const n=e[1];let r=e[2];const i=s.rgb.hsl(e)[0];const o=1/255*Math.min(t,Math.min(n,r));r=1-1/255*Math.max(t,Math.max(n,r));return[i,o*100,r*100]};s.rgb.cmyk=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.min(1-t,1-n,1-r);const s=(1-t-i)/(1-i)||0;const o=(1-n-i)/(1-i)||0;const a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}s.rgb.keyword=function(e){const t=i[e];if(t){return t}let n=Infinity;let s;for(const t of Object.keys(r)){const i=r[t];const o=comparativeDistance(e,i);if(o<n){n=o;s=t}}return s};s.keyword.rgb=function(e){return r[e]};s.rgb.xyz=function(e){let t=e[0]/255;let n=e[1]/255;let r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805;const s=t*.2126+n*.7152+r*.0722;const o=t*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0];let r=t[1];let i=t[2];n/=95.047;r/=100;i/=108.883;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16;const a=500*(n-r);const u=200*(r-i);return[o,a,u]};s.hsl.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;let i;let s;let o;if(n===0){o=r*255;return[o,o,o]}if(r<.5){i=r*(1+n)}else{i=r+n-r*n}const a=2*r-i;const u=[0,0,0];for(let e=0;e<3;e++){s=t+1/3*-(e-1);if(s<0){s++}if(s>1){s--}if(6*s<1){o=a+(i-a)*6*s}else if(2*s<1){o=i}else if(3*s<2){o=a+(i-a)*(2/3-s)*6}else{o=a}u[e]=o*255}return u};s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100;let r=e[2]/100;let i=n;const s=Math.max(r,.01);r*=2;n*=r<=1?r:2-r;i*=s<=1?s:2-s;const o=(r+n)/2;const a=r===0?2*i/(s+i):2*n/(r+n);return[t,a*100,o*100]};s.hsv.rgb=function(e){const t=e[0]/60;const n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6;const s=t-Math.floor(t);const o=255*r*(1-n);const a=255*r*(1-n*s);const u=255*r*(1-n*(1-s));r*=255;switch(i){case 0:return[r,u,o];case 1:return[a,r,o];case 2:return[o,r,u];case 3:return[o,a,r];case 4:return[u,o,r];case 5:return[r,o,a]}};s.hsv.hsl=function(e){const t=e[0];const n=e[1]/100;const r=e[2]/100;const i=Math.max(r,.01);let s;let o;o=(2-n)*r;const a=(2-n)*i;s=n*i;s/=a<=1?a:2-a;s=s||0;o/=2;return[t,s*100,o*100]};s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100;let r=e[2]/100;const i=n+r;let s;if(i>1){n/=i;r/=i}const o=Math.floor(6*t);const a=1-r;s=6*t-o;if((o&1)!==0){s=1-s}const u=n+s*(a-n);let l;let c;let f;switch(o){default:case 6:case 0:l=a;c=u;f=n;break;case 1:l=u;c=a;f=n;break;case 2:l=n;c=a;f=u;break;case 3:l=n;c=u;f=a;break;case 4:l=u;c=n;f=a;break;case 5:l=a;c=n;f=u;break}return[l*255,c*255,f*255]};s.cmyk.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;const i=e[3]/100;const s=1-Math.min(1,t*(1-i)+i);const o=1-Math.min(1,n*(1-i)+i);const a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};s.xyz.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;let i;let s;let o;i=t*3.2406+n*-1.5372+r*-.4986;s=t*-.9689+n*1.8758+r*.0415;o=t*.0557+n*-.204+r*1.057;i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92;s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92;o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92;i=Math.min(Math.max(0,i),1);s=Math.min(Math.max(0,s),1);o=Math.min(Math.max(0,o),1);return[i*255,s*255,o*255]};s.xyz.lab=function(e){let t=e[0];let n=e[1];let r=e[2];t/=95.047;n/=100;r/=108.883;t=t>.008856?t**(1/3):7.787*t+16/116;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16;const s=500*(t-n);const o=200*(n-r);return[i,s,o]};s.lab.xyz=function(e){const t=e[0];const n=e[1];const r=e[2];let i;let s;let o;s=(t+16)/116;i=n/500+s;o=s-r/200;const a=s**3;const u=i**3;const l=o**3;s=a>.008856?a:(s-16/116)/7.787;i=u>.008856?u:(i-16/116)/7.787;o=l>.008856?l:(o-16/116)/7.787;i*=95.047;s*=100;o*=108.883;return[i,s,o]};s.lab.lch=function(e){const t=e[0];const n=e[1];const r=e[2];let i;const s=Math.atan2(r,n);i=s*360/2/Math.PI;if(i<0){i+=360}const o=Math.sqrt(n*n+r*r);return[t,o,i]};s.lch.lab=function(e){const t=e[0];const n=e[1];const r=e[2];const i=r/360*2*Math.PI;const s=n*Math.cos(i);const o=n*Math.sin(i);return[t,s,o]};s.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?s.rgb.hsv(e)[2]:t;o=Math.round(o/50);if(o===0){return 30}let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));if(o===2){a+=60}return a};s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])};s.rgb.ansi256=function(e){const t=e[0];const n=e[1];const r=e[2];if(t===n&&n===r){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}const i=16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return i};s.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}const n=(~~(e>50)+1)*.5;const r=(t&1)*n*255;const i=(t>>1&1)*n*255;const s=(t>>2&1)*n*255;return[r,i,s]};s.ansi256.rgb=function(e){if(e>=232){const t=(e-232)*10+8;return[t,t,t]}e-=16;let t;const n=Math.floor(e/36)/5*255;const r=Math.floor((t=e%36)/6)/5*255;const i=t%6/5*255;return[n,r,i]};s.rgb.hex=function(e){const t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);const n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}let n=t[0];if(t[0].length===3){n=n.split("").map(e=>{return e+e}).join("")}const r=parseInt(n,16);const i=r>>16&255;const s=r>>8&255;const o=r&255;return[i,s,o]};s.rgb.hcg=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.max(Math.max(t,n),r);const s=Math.min(Math.min(t,n),r);const o=i-s;let a;let u;if(o<1){a=s/(1-o)}else{a=0}if(o<=0){u=0}else if(i===t){u=(n-r)/o%6}else if(i===n){u=2+(r-t)/o}else{u=4+(t-n)/o}u/=6;u%=1;return[u*360,o*100,a*100]};s.hsl.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=n<.5?2*t*n:2*t*(1-n);let i=0;if(r<1){i=(n-.5*r)/(1-r)}return[e[0],r*100,i*100]};s.hsv.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=t*n;let i=0;if(r<1){i=(n-r)/(1-r)}return[e[0],r*100,i*100]};s.hcg.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;if(n===0){return[r*255,r*255,r*255]}const i=[0,0,0];const s=t%1*6;const o=s%1;const a=1-o;let u=0;switch(Math.floor(s)){case 0:i[0]=1;i[1]=o;i[2]=0;break;case 1:i[0]=a;i[1]=1;i[2]=0;break;case 2:i[0]=0;i[1]=1;i[2]=o;break;case 3:i[0]=0;i[1]=a;i[2]=1;break;case 4:i[0]=o;i[1]=0;i[2]=1;break;default:i[0]=1;i[1]=0;i[2]=a}u=(1-n)*r;return[(n*i[0]+u)*255,(n*i[1]+u)*255,(n*i[2]+u)*255]};s.hcg.hsv=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);let i=0;if(r>0){i=t/r}return[e[0],i*100,r*100]};s.hcg.hsl=function(e){const t=e[1]/100;const n=e[2]/100;const r=n*(1-t)+.5*t;let i=0;if(r>0&&r<.5){i=t/(2*r)}else if(r>=.5&&r<1){i=t/(2*(1-r))}return[e[0],i*100,r*100]};s.hcg.hwb=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};s.hwb.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=1-n;const i=r-t;let s=0;if(i<1){s=(r-i)/(1-i)}return[e[0],i*100,s*100]};s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};s.gray.hsl=function(e){return[0,0,e[0]]};s.gray.hsv=s.gray.hsl;s.gray.hwb=function(e){return[0,100,e[0]]};s.gray.cmyk=function(e){return[0,0,0,e[0]]};s.gray.lab=function(e){return[e[0],0,0]};s.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255;const n=(t<<16)+(t<<8)+t;const r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};s.rgb.gray=function(e){const t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},901:function(e,t,n){"use strict";const{InvalidArgumentError:r}=n(306);const{AsyncResource:i}=n(303);const s=n(652);class UpgradeHandler extends i{constructor(e,t){if(!e||typeof e!=="object"){throw new r("invalid opts")}super("UNDICI_UPGRADE");this.opaque=e.opaque||null;this.callback=t}onUpgrade(e,t,n){const{callback:r,opaque:i}=this;this.callback=null;this.runInAsyncScope(r,null,null,{headers:s.parseHeaders(t),socket:n,opaque:i})}onError(e){const{callback:t,opaque:n}=this;if(t){this.callback=null;t(e,{opaque:n})}}}function upgrade(e,t,n){if(n===undefined){return new Promise((n,r)=>{upgrade(e,t,(e,t)=>{return e?r(e):n(t)})})}if(typeof n!=="function"){throw new r("invalid callback")}try{const r=new UpgradeHandler(t,n);const{path:i,method:s,headers:o,servername:a,signal:u,requestTimeout:l,protocol:c}=t;e.dispatch({path:i,method:s||"GET",headers:o,servername:a,signal:u,requestTimeout:l,upgrade:c||"Websocket"},r)}catch(e){process.nextTick(n,e,null)}}e.exports={upgrade:upgrade,UpgradeHandler:UpgradeHandler}},915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.printDatamodelObject=t.GeneratorConfigClass=t.printGeneratorConfig=void 0;const i=r(n(161));function printGeneratorConfig(e){return String(new GeneratorConfigClass(e))}t.printGeneratorConfig=printGeneratorConfig;class GeneratorConfigClass{constructor(e){this.config=e}toString(){const{config:e}=this;const t=JSON.parse(JSON.stringify({provider:e.provider,binaryTargets:e.binaryTargets||undefined}));return`generator ${e.name} {\n${i.default(printDatamodelObject(t),2)}\n}`}}t.GeneratorConfigClass=GeneratorConfigClass;function printDatamodelObject(e){const t=Object.keys(e).reduce((e,t)=>Math.max(e,t.length),0);return Object.entries(e).map(([e,n])=>`${e.padEnd(t)} = ${niceStringify(n)}`).join("\n")}t.printDatamodelObject=printDatamodelObject;function niceStringify(e){return JSON.parse(JSON.stringify(e,(e,t)=>{if(Array.isArray(t)){return`[${t.map(e=>JSON.stringify(e)).join(", ")}]`}return JSON.stringify(t)}))}},925:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.sqltag=t.empty=t.raw=t.join=t.Sql=void 0;const r=n(669);class Sql{constructor(e,t){if(e.length===0){throw new TypeError("Expected at least 1 string")}if(e.length-1!==t.length){throw new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`)}let n=t.length;let r=e.length;for(const e of t){if(e instanceof Sql){n+=e.values.length-1;r+=e.strings.length-2}}this.values=new Array(n);this.strings=new Array(r);this.strings[0]=e[0];let i=1;let s=0;while(i<e.length){const n=t[i-1];const r=e[i++];if(n instanceof Sql){this.strings[s]+=n.strings[0];let e=0;while(e<n.values.length){this.values[s++]=n.values[e++];this.strings[s]=n.strings[e]}this.strings[s]+=r}else{this.values[s++]=n;this.strings[s]=r}}}get text(){return this.strings.reduce((e,t,n)=>`${e}$${n}${t}`)}get sql(){return this.strings.join("?")}[r.inspect.custom](){return{text:this.text,sql:this.sql,values:this.values}}}t.Sql=Sql;Object.defineProperty(Sql.prototype,"sql",{enumerable:true});Object.defineProperty(Sql.prototype,"text",{enumerable:true});function join(e,t=","){if(e.length===0){throw new TypeError("Expected `join([])` to be called with an array of multiple elements, but got an empty array")}return new Sql(["",...Array(e.length-1).fill(t),""],e)}t.join=join;function raw(e){return new Sql([e],[])}t.raw=raw;t.empty=raw("");function sqltag(e,...t){return new Sql(e.raw,t)}t.sqltag=sqltag;t.default=sqltag},932:function(e){"use strict";const t=(e,t)=>{for(const n of Reflect.ownKeys(t)){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}return e};e.exports=t;e.exports.default=t},935:function(e){"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const i=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(e){const t=e[0]==="u";const n=e[1]==="{";if(t&&!n&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}if(t&&n){return String.fromCodePoint(parseInt(e.slice(2,-1),16))}return s.get(e)||e}function parseArguments(e,t){const n=[];const s=t.trim().split(/\s*,\s*/g);let o;for(const t of s){const s=Number(t);if(!Number.isNaN(s)){n.push(s)}else if(o=t.match(r)){n.push(o[2].replace(i,(e,t,n)=>t?unescape(t):n))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return n}function parseStyle(e){n.lastIndex=0;const t=[];let r;while((r=n.exec(e))!==null){const e=r[1];if(r[2]){const n=parseArguments(e,r[2]);t.push([e].concat(n))}else{t.push([e])}}return t}function buildStyle(e,t){const n={};for(const e of t){for(const t of e.styles){n[t[0]]=e.inverse?null:t.slice(1)}}let r=e;for(const[e,t]of Object.entries(n)){if(!Array.isArray(t)){continue}if(!(e in r)){throw new Error(`Unknown Chalk style: ${e}`)}r=t.length>0?r[e](...t):r[e]}return r}e.exports=((e,n)=>{const r=[];const i=[];let s=[];n.replace(t,(t,n,o,a,u,l)=>{if(n){s.push(unescape(n))}else if(a){const t=s.join("");s=[];i.push(r.length===0?t:buildStyle(e,r)(t));r.push({inverse:o,styles:parseStyle(a)})}else if(u){if(r.length===0){throw new Error("Found extraneous } in Chalk template literal")}i.push(buildStyle(e,r)(s.join("")));s=[];r.pop()}else{s.push(l)}});i.push(s.join(""));if(r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")})},938:function(e){"use strict";const t=(async()=>{})().constructor.prototype;const n=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]);const r=(e,t)=>{for(const[r,i]of n){const n=typeof t==="function"?(...e)=>Reflect.apply(i.value,t(),e):i.value.bind(t);Reflect.defineProperty(e,r,{...i,value:n})}return e};const i=e=>{return new Promise((t,n)=>{e.on("exit",(e,n)=>{t({exitCode:e,signal:n})});e.on("error",e=>{n(e)});if(e.stdin){e.stdin.on("error",e=>{n(e)})}})};e.exports={mergePromise:r,getSpawnedPromise:i}},963:function(e){"use strict";const t=/ +/g;const n=(e,t=[])=>{if(!Array.isArray(t)){return e}return[e,...t].join(" ")};const r=(e,t,n)=>{if(n===0){return[t]}const r=e[e.length-1];if(r.endsWith("\\")){return[...e.slice(0,-1),`${r.slice(0,-1)} ${t}`]}return[...e,t]};const i=e=>{return e.trim().split(t).reduce(r,[])};e.exports={joinCommand:n,parseCommand:i}},969:function(e,t,n){"use strict";const r=n(499);class AbortError extends Error{constructor(e){super();if(e instanceof Error){this.originalError=e;({message:e}=e)}else{this.originalError=new Error(e);this.originalError.stack=this.stack}this.name="AbortError";this.message=e}}const i=(e,t,n)=>{const r=n.retries-(t-1);e.attemptNumber=t;e.retriesLeft=r;return e};const s=(e,t)=>new Promise((n,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};const o=r.operation(t);o.attempt(async r=>{try{n(await e(r))}catch(e){if(!(e instanceof Error)){s(new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`));return}if(e instanceof AbortError){o.stop();s(e.originalError)}else if(e instanceof TypeError){o.stop();s(e)}else{i(e,r,t);try{await t.onFailedAttempt(e)}catch(e){s(e);return}if(!o.retry(e)){s(o.mainError())}}}})});e.exports=s;e.exports.default=s;e.exports.AbortError=AbortError},971:function(e,t,n){"use strict";const r=n(640);e.exports=(e=>typeof e==="string"?e.replace(r(),""):e)},979:function(e,t,n){"use strict";const{InvalidArgumentError:r,RequestAbortedError:i,RequestTimeoutError:s,NotSupportedError:o}=n(306);const a=n(631);const u=n(652);const{kRequestTimeout:l,kUrl:c}=n(390);const f=Symbol("abort");const d=Symbol("timeout");const p=Symbol("resume");const h=Symbol("signal");const m=Symbol("handler");class Request{constructor({path:e,method:t,body:n,headers:g,idempotent:y,upgrade:b,signal:w,requestTimeout:v},{[l]:_,[c]:{hostname:E,protocol:T}},C){if(typeof e!=="string"||e[0]!=="/"){throw new r("path must be a valid path")}if(typeof t!=="string"){throw new r("method must be a string")}if(b&&typeof b!=="string"){throw new r("upgrade must be a string")}if(w&&typeof w.on!=="function"&&typeof w.addEventListener!=="function"){throw new r("signal must be an EventEmitter or EventTarget")}v=v==null&&_?_:v;if(v!=null&&(!Number.isInteger(v)||v<0)){throw new r("requestTimeout must be a positive integer or zero")}this[m]=C;this.method=t;if(n==null){this.body=null}else if(u.isStream(n)){this.body=n}else if(u.isBuffer(n)){this.body=n.length?n:null}else if(typeof n==="string"){this.body=n.length?Buffer.from(n):null}else{throw new r("body must be a string, a Buffer or a Readable stream")}const S=g&&(g.host||g.Host);if(S&&T==="https:"&&!/^\[/.test(S)&&!a.isIP(S)){this.servername=S}else{this.servername=null}this.aborted=false;this.upgrade=!!b;this.idempotent=y==null?t==="HEAD"||t==="GET":y;this.contentLength=null;{let n=`${t} ${e} HTTP/1.1\r\n`;if(b){n+=`connection: upgrade\r\nupgrade: ${b}\r\n`}else{n+="connection: keep-alive\r\n"}if(!S){n+=`host: ${E}\r\n`}if(g){for(const[e,t]of Object.entries(g)){if(typeof t==="object"){throw new r(`invalid ${e} header`)}else if(t===undefined){continue}if(this.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){this.contentLength=parseInt(t);if(!Number.isFinite(this.contentLength)){throw new r("invalid content-length header")}}else if(e.length===17&&e.toLowerCase()==="transfer-encoding"){throw new r("invalid transfer-encoding header")}else if(e.length===10&&e.toLowerCase()==="connection"){throw new r("invalid connection header")}else if(e.length===10&&e.toLowerCase()==="keep-alive"){throw new r("invalid keep-alive header")}else if(e.length===7&&e.toLowerCase()==="upgrade"){throw new r("invalid upgrade header")}else if(e.length===6&&e.toLowerCase()==="expect"){throw new o("expect header not supported")}else{n+=`${e}: ${t}\r\n`}}}this.header=n}if(u.isStream(this.body)){this.body.on("error",e=>{this.onError(e)})}if(w){this[h]=w;this[f]=(()=>{this.onError(new i)});if("addEventListener"in w){w.addEventListener("abort",this[f])}else{w.addListener("abort",this[f])}}else{this[h]=null;this[f]=null}this[d]=v?setTimeout(e=>{e.onError(new s)},v,this):null;this[p]=null}get expectsPayload(){const{method:e}=this;return e==="PUT"||e==="POST"||e==="PATCH"}get reset(){const{method:e,upgrade:t,body:n}=this;if(e==="HEAD"){return true}if(e==="CONNECT"||t){return true}if(n&&!this.expectsPayload&&u.bodyLength(n)!==0){return true}return false}onUpgrade(e,t,n){if(this.aborted){u.destroy(n,new i);return}reset.call(this);try{this[m].onUpgrade(e,t,n)}catch(e){this.onError(e);u.destroy(n,e)}}onHeaders(e,t,n){if(this.aborted){return}this[p]=n;const{[d]:r}=this;if(r){this[d]=null;clearTimeout(r)}try{this[m].onHeaders(e,t||[],n)}catch(e){this.onError(e)}}onBody(e,t,n){if(this.aborted){return}try{return this[m].onData(e.slice(t,t+n))}catch(e){this.onError(e)}}onComplete(e){if(this.aborted){return}reset.call(this);try{this[m].onComplete(e||[])}catch(e){this.onError(e)}}onError(e){if(this.aborted){return}this.aborted=true;reset.call(this,e);const{[p]:t}=this;if(t){this[p]=null;t()}process.nextTick((e,t)=>{e.onError(t)},this[m],e)}}function reset(e){const{body:t,[d]:n,[h]:r}=this;if(n){this[d]=null;clearTimeout(n)}if(t){this.body=null;u.destroy(t,e)}if(r){this[h]=null;if("removeEventListener"in r){r.removeEventListener("abort",this[f])}else{r.removeListener("abort",this[f])}}}e.exports=Request},982:function(e,t,n){"use strict";const r=n(626);const i=n(737);const s=(e,t,{target:n="stdout",...s}={})=>{if(!i[n]){if(s.fallback===false){return e}return typeof s.fallback==="function"?s.fallback(e,t):`${e} (​${t}​)`}return r.link(e,t)};e.exports=((e,t,n={})=>s(e,t,n));e.exports.stderr=((e,t,n={})=>s(e,t,{target:"stderr",...n}));e.exports.isSupported=i.stdout;e.exports.stderr.isSupported=i.stderr},985:function(e,t,n){"use strict";const{signalsByName:r}=n(629);const i=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>{if(e){return`timed out after ${t} milliseconds`}if(o){return"was canceled"}if(n!==undefined){return`failed with ${n}`}if(r!==undefined){return`was killed with ${r} (${i})`}if(s!==undefined){return`failed with exit code ${s}`}return"failed"};const s=({stdout:e,stderr:t,all:n,error:s,signal:o,exitCode:a,command:u,timedOut:l,isCanceled:c,killed:f,parsed:{options:{timeout:d}}})=>{a=a===null?undefined:a;o=o===null?undefined:o;const p=o===undefined?undefined:r[o].description;const h=s&&s.code;const m=i({timedOut:l,timeout:d,errorCode:h,signal:o,signalDescription:p,exitCode:a,isCanceled:c});const g=`Command ${m}: ${u}`;const y=Object.prototype.toString.call(s)==="[object Error]";const b=y?`${g}\n${s.message}`:g;const w=[b,t,e].filter(Boolean).join("\n");if(y){s.originalMessage=s.message;s.message=w}else{s=new Error(w)}s.shortMessage=b;s.command=u;s.exitCode=a;s.signal=o;s.signalDescription=p;s.stdout=e;s.stderr=t;if(n!==undefined){s.all=n}if("bufferedData"in s){delete s.bufferedData}s.failed=true;s.timedOut=Boolean(l);s.isCanceled=c;s.killed=f&&!l;return s};e.exports=s},998:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getOperation=t.PrismaClientFetcher=t.getPrismaClient=void 0;const a=n(248);const u=n(388);const l=o(n(622));const c=n(57);const f=n(532);const d=n(222);const p=o(n(531));const h=p.default("prisma-client");const m=o(n(747));const g=o(n(304));const y=s(n(925));const b=n(601);const w=n(430);const v=n(198);const _=n(624);const E=n(753);const T=n(694);const C=n(320);const S=o(n(971));const P=n(784);const x=n(491);const O=n(827);const A=n(177);const $=n(303);const R={findOne:"query",findMany:"query",count:"query",create:"mutation",update:"mutation",updateMany:"mutation",upsert:"mutation",delete:"mutation",deleteMany:"mutation",executeRaw:"mutation",queryRaw:"mutation",aggregate:"query"};const M={avg:true,count:true,sum:true,min:true,max:true};function getPrismaClient(e){class NewPrismaClient{constructor(t){var n,r,i,s,o;this._middlewares=[];this._engineMiddlewares=[];const u=t!==null&&t!==void 0?t:{};const c=(n=u.__internal)!==null&&n!==void 0?n:{};const d=c.debug===true;if(d){p.default.enable("prisma-client")}if(c.hooks){this._hooks=c.hooks}let y=(r=e.sqliteDatasourceOverrides)!==null&&r!==void 0?r:[];y=y.map(t=>({name:t.name,url:"file:"+l.default.resolve(e.dirname,t.url)}));const b=Object.entries(u.datasources||{}).filter(([e,t])=>{return t&&t.url}).map(([e,{url:t}])=>({name:e,url:t}));const _=v.mergeBy(y,b,e=>e.name);const E=c.engine||{};if(u.errorFormat){this._errorFormat=u.errorFormat}else if(process.env.NODE_ENV==="production"){this._errorFormat="minimal"}else if(process.env.NO_COLOR){this._errorFormat="colorless"}else{this._errorFormat="colorless"}const T=this.readEnv();this._dmmf=new a.DMMFClass(e.document);let C=l.default.resolve(e.dirname,e.relativePath);if(!m.default.existsSync(C)){C=e.dirname}const S=(s=(i=e.generator)===null||i===void 0?void 0:i.previewFeatures)!==null&&s!==void 0?s:[];this._engineConfig={cwd:C,enableDebugLogs:d,enableEngineDebugMode:E.enableEngineDebugMode,datamodelPath:l.default.join(e.dirname,"schema.prisma"),prismaPath:(o=E.binaryPath)!==null&&o!==void 0?o:undefined,engineEndpoint:E.endpoint,datasources:_,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&w.getLogLevel(u.log),logQueries:u.log&&Boolean(typeof u.log==="string"?u.log==="query":u.log.find(e=>typeof e==="string"?e==="query":e.level==="query")),env:T,flags:[],clientVersion:e.clientVersion,enableExperimental:O.mapPreviewFeatures(S),useUds:c.useUds};const P=x.omit(this._engineConfig,["env","datasources"]);h({engineConfig:P});this._engine=new f.NodeEngine(this._engineConfig);this._fetcher=new PrismaClientFetcher(this,false,this._hooks);if(u.log){for(const e of u.log){const t=typeof e==="string"?e:e.emit==="stdout"?e.level:null;if(t){this.$on(t,e=>{const n={query:"blue",info:"cyan",warn:"yellow",error:"red"};console.error(g.default[n[t]](`prisma:${t}`.padEnd(13))+(e.message||e.query))})}}}this._bootstrapClient()}readEnv(){const t=l.default.resolve(e.dirname,e.relativePath,".env");if(m.default.existsSync(t)){return b.parse(m.default.readFileSync(t,"utf-8"))}return{}}use(...e){console.warn(`${g.default.yellow("warn")} prisma.use() is deprecated, please use prisma.$use() instead`);return this.$use(...e)}$use(e,t){if(typeof e==="function"){this._middlewares.push(e)}else if(typeof e==="string"){if(e==="all"){this._middlewares.push(t)}else if(e==="engine"){this._engineMiddlewares.push(t)}else{throw new Error(`Unknown middleware hook ${e}`)}}else{throw new Error(`Invalid middleware ${e}`)}}on(e,t){console.warn(`${g.default.yellow("warn")} prisma.on() is deprecated, please use prisma.$on() instead`);return this.$on(e,t)}$on(e,t){this._engine.on(e,n=>{const r=n.fields;if(e==="query"){t({timestamp:n.timestamp,query:r.query,params:r.params,duration:r.duration_ms,target:n.target})}else{t({timestamp:n.timestamp,message:r.message,target:n.target})}})}connect(){console.warn(`${g.default.yellow("warn")} prisma.connect() is deprecated, please use prisma.$connect() instead`);return this.$connect()}async $connect(){if(this._disconnectionPromise){await this._disconnectionPromise}if(this._connectionPromise){return this._connectionPromise}this._connectionPromise=(async()=>{await this._engine.start();let{engineVersion:t,clientVersion:n}=e;if(this._engineConfig.prismaPath||process.env.QUERY_ENGINE_BINARY_PATH||!t){t=await this._engine.version()}h(`Client Version ${n}`);h(`Engine Version ${t}`)})();return this._connectionPromise}async _getConfig(){if(!this._getConfigPromise){this._getConfigPromise=this._engine.getConfig()}return this._getConfigPromise}async _runDisconnect(){await this._engine.stop();delete this._connectionPromise;this._engine=new f.NodeEngine(this._engineConfig);delete this._disconnectionPromise;delete this._getConfigPromise}disconnect(){console.warn(`${g.default.yellow("warn")} prisma.disconnect() is deprecated, please use prisma.$disconnect() instead`);return this.$disconnect()}async $disconnect(){if(!this._disconnectionPromise){this._disconnectionPromise=this._runDisconnect()}return this._disconnectionPromise}async _getActiveProvider(){const e=await this._getConfig();return e.datasources[0].activeProvider}executeRaw(e,...t){console.warn(`${g.default.yellow("warn")} prisma.executeRaw() is deprecated, please use prisma.$executeRaw() instead`);return this.$executeRaw(e,...t)}async $executeRaw(e,...t){let n="";let r=undefined;const i=await this._getActiveProvider()==="postgresql"?"text":"sql";h(`Prisma Client call:`);if(Array.isArray(e)){const s=y.sqltag(e,...t);n=s[i];r={values:A.serializeRawParameters(s.values),__prismaRawParamaters__:true}}else if("string"===typeof e){n=e;if(t.length){r={values:A.serializeRawParameters(t),__prismaRawParamaters__:true}}}else{n=e[i];r={values:A.serializeRawParameters(e.values),__prismaRawParamaters__:true}}if(r===null||r===void 0?void 0:r.values){h(`prisma.executeRaw(${n}, ${r.values})`)}else{h(`prisma.executeRaw(${n})`)}const s={query:n,parameters:r};return this._request({args:s,clientMethod:"executeRaw",dataPath:[],action:"executeRaw",callsite:this._getCallsite(),runInTransaction:false})}_getCallsite(){if(this._errorFormat!=="minimal"){return(new Error).stack}return undefined}queryRaw(e,...t){console.warn(`${g.default.yellow("warn")} prisma.queryRaw() is deprecated, please use prisma.$queryRaw() instead`);return this.$queryRaw(e,...t)}async $queryRaw(e,...t){let n="";let r=undefined;const i=await this._getActiveProvider()==="postgresql"?"text":"sql";h(`Prisma Client call:`);if(Array.isArray(e)){const s=y.sqltag(e,...t);n=s[i];r={values:A.serializeRawParameters(s.values),__prismaRawParamaters__:true}}else if("string"===typeof e){n=e;if(t.length){r={values:A.serializeRawParameters(t),__prismaRawParamaters__:true}}}else{n=e[i];r={values:A.serializeRawParameters(e.values),__prismaRawParamaters__:true}}if(r===null||r===void 0?void 0:r.values){h(`prisma.queryRaw(${n}, ${r.values})`)}else{h(`prisma.queryRaw(${n})`)}const s={query:n,parameters:r};return this._request({args:s,clientMethod:"queryRaw",dataPath:[],action:"queryRaw",callsite:this._getCallsite(),runInTransaction:false})}async __internal_triggerPanic(e){if(!this._engineConfig.enableEngineDebugMode){throw new Error(`In order to use .__internal_triggerPanic(), please enable the debug mode like so:\nnew PrismaClient({\n  __internal: {\n    engine: {\n      enableEngineDebugMode: true\n    }\n  }\n})`)}const t="SELECT 1";const n=e?{"X-DEBUG-FATAL":"1"}:{"X-DEBUG-NON-FATAL":"1"};return this._request({action:"queryRaw",args:{query:t,parameters:undefined},clientMethod:"queryRaw",dataPath:[],runInTransaction:false,headers:n,callsite:this._getCallsite()})}transaction(e){console.warn(`${g.default.yellow("warn")} prisma.transaction() is deprecated, please use prisma.$transaction() instead`);return this.$transaction(e)}async $transaction(t){var n,r;if((r=(n=e.generator)===null||n===void 0?void 0:n.previewFeatures)===null||r===void 0?void 0:r.includes("transactionApi")){for(const e of t){if(!e.requestTransaction||typeof e.requestTransaction!=="function"){throw new Error(`All elements of the array need to be Prisma Client promises.`)}}return Promise.all(t.map(e=>e.requestTransaction()))}else{throw new Error(`In order to use the .transaction() api, please enable 'previewFeatures = "transactionApi" in your schema.`)}}_request(e){const t=new $.AsyncResource("prisma-client-request");if(this._middlewares.length>0){const n={args:e.args,dataPath:e.dataPath,runInTransaction:e.runInTransaction,action:e.action,model:e.model};return t.runInAsyncScope(()=>this._requestWithMiddlewares(n,this._middlewares.slice(),e.clientMethod,e.callsite,e.headers))}return t.runInAsyncScope(()=>this._executeRequest(e))}_requestWithMiddlewares(e,t,n,r,i){const s=t.shift();if(s){return s(e,e=>this._requestWithMiddlewares(e,t,n,r))}e.clientMethod=n;e.callsite=r;e.headers=i;return this._executeRequest(e)}_executeRequest({args:e,clientMethod:t,dataPath:n,callsite:r,runInTransaction:i,action:s,model:o,headers:a}){if(s!=="executeRaw"&&s!=="queryRaw"&&!o){throw new Error(`Model missing for action ${s}`)}if((s==="executeRaw"||s==="queryRaw")&&o){throw new Error(`executeRaw and queryRaw can't be executed on a model basis. The model ${o} has been provided`)}let u;const l=R[s];if(s==="executeRaw"||s==="queryRaw"){u=s}let c;if(o){c=this._dmmf.mappingsMap[o];if(!c){throw new Error(`Could not find mapping for model ${o}`)}u=c[s]}if(l!=="query"&&l!=="mutation"){throw new Error(`Invalid operation ${l} for action ${s}`)}const f=this._dmmf.rootFieldMap[u];if(!f){throw new Error(`Could not find rootField ${u} for action ${s} for model ${o} on rootType ${l}`)}const{isList:m}=f.outputType;const g=_.getOutputTypeName(f.outputType.type);let y=d.makeDocument({dmmf:this._dmmf,rootField:u,rootTypeName:l,select:e});y.validate(e,false,t,this._errorFormat,r);y=d.transformDocument(y);if(p.default.enabled("prisma-client")){const n=String(y);h(`Prisma Client call:`);h(`prisma.${t}(${P.printJsonWithErrors({ast:e,keyPaths:[],valuePaths:[],missingItems:[]})})`);h(`Generated request:`);h(n+"\n")}return this._fetcher.request({document:y,clientMethod:t,typeName:g,dataPath:n,isList:m,rootField:u,callsite:r,showColors:this._errorFormat==="pretty",args:e,engineHook:this._engineMiddlewares[0],runInTransaction:i,headers:a})}_bootstrapClient(){const e=this._dmmf.mappings.reduce((t,n)=>{const r=_.lowerCase(n.model);const i=this._dmmf.modelMap[n.model];if(!i){throw new Error(`Invalid mapping ${n.model}, can't find model`)}const s=({operation:t,actionName:n,args:s,dataPath:o,modelName:a})=>{o=o!==null&&o!==void 0?o:[];const u=`${r}.${n}`;let l;const c=this._getCallsite();const f=a!==null&&a!==void 0?a:i.name;const d={then:(e,t)=>{if(!l){l=this._request({args:s,dataPath:o,action:n,model:f,clientMethod:u,callsite:c,runInTransaction:false})}return l.then(e,t)},requestTransaction:()=>{if(!l){l=this._request({args:s,dataPath:o,action:n,model:f,clientMethod:u,callsite:c,runInTransaction:true})}return l},catch:e=>{if(!l){l=this._request({args:s,dataPath:o,action:n,model:f,clientMethod:u,callsite:c,runInTransaction:false})}return l.catch(e)},finally:e=>{if(!l){l=this._request({args:s,dataPath:o,action:n,model:f,clientMethod:u,callsite:c,runInTransaction:false})}return l.finally(e)}};for(const r of i.fields.filter(e=>e.kind==="object")){d[r.name]=(u=>{const l=o.includes("select")?"select":o.includes("include")?"include":"select";const c=[...o,l,r.name];const f=E.deepSet(s,c,u||true);return e[r.type]({operation:t,actionName:n,args:f,dataPath:c,isList:r.isList,modelName:a||i.name})})}return d};t[i.name]=s;return t},{});for(const t of this._dmmf.mappings){const n=_.lowerCase(t.model);const r={model:true,plural:true,aggregate:true};const i=Object.entries(t).reduce((n,[i,s])=>{if(!r[i]){const r=getOperation(i);n[i]=(n=>e[t.model]({operation:r,actionName:i,args:n}))}return n},{});i.count=(n=>{return e[t.model]({operation:"query",actionName:`aggregate`,args:n?{...n,select:{count:true}}:undefined,dataPath:["count"]})});i.aggregate=(n=>{const r=Object.entries(n).reduce((e,[t,n])=>{if(M[t]){if(!e.select){e.select={}}if(t==="count"){e.select[t]=n}else{e.select[t]={select:n}}}else{e[t]=n}return e},{});return e[t.model]({operation:"query",actionName:"aggregate",rootField:t.aggregate,args:r,dataPath:[]})});this[n]=i}}}return NewPrismaClient}t.getPrismaClient=getPrismaClient;class PrismaClientFetcher{constructor(e,t=false,n){this.prisma=e;this.debug=t;this.hooks=n;this.dataloader=new T.Dataloader({batchLoader:async e=>{const t=e.map(e=>String(e.document));await this.prisma.$connect();const n=e[0].runInTransaction;return this.prisma._engine.requestBatch(t,n)},singleLoader:async e=>{const t=String(e.document);await this.prisma.$connect();return this.prisma._engine.request(t,e.headers)},batchBy:e=>{var t;if(e.runInTransaction){return"transaction-batch"}if(!e.document.children[0].name.startsWith("findOne")){return null}const n=e.document.children[0].children.join(",");const r=(t=e.document.children[0].args)===null||t===void 0?void 0:t.args.map(e=>{if(e.value instanceof d.Args){return e.key+"-"+e.value.args.map(e=>e.key).join(",")}return e.key}).join(",");return`${e.document.children[0].name}|${r}|${n}`}})}async request({document:e,dataPath:t=[],rootField:n,typeName:r,isList:i,callsite:s,clientMethod:o,runInTransaction:a,showColors:u,engineHook:l,args:f,headers:d}){if(this.hooks&&this.hooks.beforeRequest){const s=String(e);this.hooks.beforeRequest({query:s,path:t,rootField:n,typeName:r,document:e,isList:i,clientMethod:o,args:f})}try{let r,i;if(l){const t=await l({document:e,runInTransaction:a},e=>this.dataloader.request(e));r=t.data;i=t.elapsed}else{const t=await this.dataloader.request({document:e,runInTransaction:a,headers:d});r=t.data;i=t.elapsed}const f=this.unpack(e,r,t,n);if(process.env.PRISMA_CLIENT_GET_TIME){return{data:f,elapsed:i}}return f}catch(e){h(e);let t=e.message;if(s){const{stack:n}=C.printStack({callsite:s,originalMethod:o,onUs:e.isPanic,showColors:u});t=n+"\n  "+e.message}t=this.sanitizeMessage(t);if(e.code){throw new c.PrismaClientKnownRequestError(t,e.code,e.meta)}else if(e.isPanic){throw new c.PrismaClientRustPanicError(t)}else if(e instanceof c.PrismaClientUnknownRequestError){throw new c.PrismaClientUnknownRequestError(t)}else if(e instanceof c.PrismaClientInitializationError){throw new c.PrismaClientInitializationError(t)}else if(e instanceof c.PrismaClientRustPanicError){throw new c.PrismaClientRustPanicError(t)}throw e}}sanitizeMessage(e){if(this.prisma.errorFormat&&this.prisma.errorFormat!=="pretty"){return S.default(e)}return e}unpack(e,t,n,r){if(t.data){t=t.data}const i=[];if(r){i.push(r)}i.push(...n.filter(e=>e!=="select"&&e!=="include"));return d.unpack({document:e,data:t,path:i})}}t.PrismaClientFetcher=PrismaClientFetcher;function getOperation(e){if(e===u.DMMF.ModelAction.findMany||e===u.DMMF.ModelAction.findOne){return"query"}return"mutation"}t.getOperation=getOperation}},function(e){"use strict";!function(){e.nmd=function(e){e.paths=[];if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});return e}}()});
  //# sourceMappingURL=index.js.map