prisma
Version:
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.
7 lines • 3.12 MB
JavaScript
#!/usr/bin/env node
"use strict";var Swt=Object.create;var Sk=Object.defineProperty;var _wt=Object.getOwnPropertyDescriptor;var Twt=Object.getOwnPropertyNames;var Dwt=Object.getPrototypeOf,Cwt=Object.prototype.hasOwnProperty;var W=(e,r)=>()=>(e&&(r=e(e=0)),r);var A=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Io=(e,r)=>{for(var n in r)Sk(e,n,{get:r[n],enumerable:!0})},Ek=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Twt(r))!Cwt.call(e,o)&&o!==n&&Sk(e,o,{get:()=>r[o],enumerable:!(i=_wt(r,o))||i.enumerable});return e},ED=(e,r,n)=>(Ek(e,r,"default"),n&&Ek(n,r,"default")),U=(e,r,n)=>(n=e!=null?Swt(Dwt(e)):{},Ek(r||!e||!e.__esModule?Sk(n,"default",{value:e,enumerable:!0}):n,e)),Awt=e=>Ek(Sk({},"__esModule",{value:!0}),e);var _k={};Io(_k,{$:()=>Cxe,bgBlack:()=>kwt,bgBlue:()=>Nwt,bgCyan:()=>Bwt,bgGreen:()=>Mwt,bgMagenta:()=>Lwt,bgRed:()=>OG,bgWhite:()=>jwt,bgYellow:()=>$wt,black:()=>Iwt,blue:()=>nu,bold:()=>G,cyan:()=>Ku,dim:()=>me,gray:()=>Dx,green:()=>ge,grey:()=>Cm,hidden:()=>Owt,inverse:()=>Pwt,italic:()=>zu,magenta:()=>Rwt,red:()=>Te,reset:()=>SD,strikethrough:()=>Fwt,underline:()=>hr,white:()=>PG,yellow:()=>sr});function Wn(e,r){let n=new RegExp(`\\x1b\\[${r}m`,"g"),i=`\x1B[${e}m`,o=`\x1B[${r}m`;return function(a){return!Cxe.enabled||a==null?a:i+(~(""+a).indexOf(o)?a.replace(n,o+i):a)+o}}var AG,Sxe,_xe,Txe,Dxe,Cxe,SD,G,me,zu,hr,Pwt,Owt,Fwt,Iwt,Te,ge,sr,nu,Rwt,Ku,PG,Dx,Cm,kwt,OG,Mwt,$wt,Nwt,Lwt,Bwt,jwt,je=W(()=>{"use strict";Dxe=!0;typeof process<"u"&&({FORCE_COLOR:AG,NODE_DISABLE_COLORS:Sxe,NO_COLOR:_xe,TERM:Txe}=process.env||{},Dxe=process.stdout&&process.stdout.isTTY);Cxe={enabled:!Sxe&&_xe==null&&Txe!=="dumb"&&(AG!=null&&AG!=="0"||Dxe)};SD=Wn(0,0),G=Wn(1,22),me=Wn(2,22),zu=Wn(3,23),hr=Wn(4,24),Pwt=Wn(7,27),Owt=Wn(8,28),Fwt=Wn(9,29),Iwt=Wn(30,39),Te=Wn(31,39),ge=Wn(32,39),sr=Wn(33,39),nu=Wn(34,39),Rwt=Wn(35,39),Ku=Wn(36,39),PG=Wn(37,39),Dx=Wn(90,39),Cm=Wn(90,39),kwt=Wn(40,49),OG=Wn(41,49),Mwt=Wn(42,49),$wt=Wn(43,49),Nwt=Wn(44,49),Lwt=Wn(45,49),Bwt=Wn(46,49),jwt=Wn(47,49)});function Gwt(e){let r={color:Axe[Uwt++%Axe.length],enabled:_D.enabled(e),namespace:e,log:_D.log,extend:()=>{}},n=(...i)=>{let{enabled:o,namespace:a,color:c,log:u}=r;if(i.length!==0&&FG.push([a,...i]),FG.length>qwt&&FG.shift(),_D.enabled(a)||o){let l=i.map(f=>typeof f=="string"?f:Wwt(f)),p=`+${Date.now()-Pxe}ms`;Pxe=Date.now(),globalThis.DEBUG_COLORS?u(_k[c](G(a)),...l,_k[c](p)):u(a,...l,p)}};return new Proxy(n,{get:(i,o)=>r[o],set:(i,o,a)=>r[o]=a})}function Wwt(e,r=2){let n=new Set;return JSON.stringify(e,(i,o)=>{if(typeof o=="object"&&o!==null){if(n.has(o))return"[Circular *]";n.add(o)}else if(typeof o=="bigint")return o.toString();return o},r)}var qwt,Axe,FG,Pxe,Uwt,IG,_D,La,ze,ar=W(()=>{"use strict";je();je();qwt=100,Axe=["green","yellow","blue","magenta","cyan","red"],FG=[],Pxe=Date.now(),Uwt=0,IG=typeof process<"u"?process.env:{};globalThis.DEBUG??=IG.DEBUG??"";globalThis.DEBUG_COLORS??=IG.DEBUG_COLORS?IG.DEBUG_COLORS==="true":!0;_D={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(o=>o.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),n=r.some(o=>o===""||o[0]==="-"?!1:e.match(RegExp(o.split("*").join(".*")+"$"))),i=r.some(o=>o===""||o[0]!=="-"?!1:e.match(RegExp(o.slice(1).split("*").join(".*")+"$")));return n&&!i},log:(...e)=>{let[r,n,...i]=e;(console.warn??console.log)(`${r} ${n}`,...i)},formatters:{}};La=new Proxy(Gwt,{get:(e,r)=>_D[r],set:(e,r,n)=>_D[r]=n});ze=La});function xE(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&Oxe.default.existsSync(e))&&process.arch==="ia32")throw new Error('The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)')}var Oxe,Fxe=W(()=>{"use strict";Oxe=U(require("fs"))});var TD,Ixe=W(()=>{"use strict";TD=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"]});function fc(e,r){let n=r==="url";return e.includes("windows")?n?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?n?`${Tk}.dylib.node`:`${Tk}-${e}.dylib.node`:n?`${Tk}.so.node`:`${Tk}-${e}.so.node`}var Tk,Rxe=W(()=>{"use strict";Tk="libquery_engine"});function Hwt(...e){if(e.length===1){let[r]=e;return n=>As(r,n,()=>{})}if(e.length===2){let[r,n]=e;return As(r,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function Ps(e){return Object.assign(e,{optional:()=>LG(e),and:r=>oi(e,r),or:r=>Mxe(e,r),select:r=>r===void 0?CD(e):CD(r,e)})}function kG(e){return Object.assign((r=>Object.assign(r,{[Symbol.iterator](){let n=0,i=[{value:Object.assign(r,{[kxe]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=i[n++])!=null?o:i.at(-1)}}}}))(e),{optional:()=>kG(LG(e)),select:r=>kG(r===void 0?CD(e):CD(r,e))})}function LG(e){return Ps({[dc]:()=>({match:r=>{let n={},i=(o,a)=>{n[o]=a};return r===void 0?(iu(e).forEach(o=>i(o,void 0)),{matched:!0,selections:n}):{matched:As(e,r,i),selections:n}},getSelectionKeys:()=>iu(e),matcherType:"optional"})})}function oi(...e){return Ps({[dc]:()=>({match:r=>{let n={},i=(o,a)=>{n[o]=a};return{matched:e.every(o=>As(o,r,i)),selections:n}},getSelectionKeys:()=>DD(e,iu),matcherType:"and"})})}function Mxe(...e){return Ps({[dc]:()=>({match:r=>{let n={},i=(o,a)=>{n[o]=a};return DD(e,iu).forEach(o=>i(o,void 0)),{matched:e.some(o=>As(o,r,i)),selections:n}},getSelectionKeys:()=>DD(e,iu),matcherType:"or"})})}function Or(e){return{[dc]:()=>({match:r=>({matched:!!e(r)})})}}function CD(...e){let r=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return Ps({[dc]:()=>({match:i=>{let o={[r??Ck]:i};return{matched:n===void 0||As(n,i,(a,c)=>{o[a]=c}),selections:o}},getSelectionKeys:()=>[r??Ck].concat(n===void 0?[]:iu(n))})})}function jf(e){return typeof e=="number"}function Tg(e){return typeof e=="string"}function Dg(e){return typeof e=="bigint"}function qt(e){return new NG(e,$G)}var dc,kxe,Ck,RG,Dk,As,iu,DD,Vwt,zwt,$xe,Kwt,Cg,Jwt,qf,Ywt,Ag,Zwt,Qwt,Xwt,eEt,tEt,na,MG,$G,NG,co=W(()=>{"use strict";dc=Symbol.for("@ts-pattern/matcher"),kxe=Symbol.for("@ts-pattern/isVariadic"),Ck="@ts-pattern/anonymous-select-key",RG=e=>!!(e&&typeof e=="object"),Dk=e=>e&&!!e[dc],As=(e,r,n)=>{if(Dk(e)){let i=e[dc](),{matched:o,selections:a}=i.match(r);return o&&a&&Object.keys(a).forEach(c=>n(c,a[c])),o}if(RG(e)){if(!RG(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let i=[],o=[],a=[];for(let c of e.keys()){let u=e[c];Dk(u)&&u[kxe]?a.push(u):a.length?o.push(u):i.push(u)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.length<i.length+o.length)return!1;let c=r.slice(0,i.length),u=o.length===0?[]:r.slice(-o.length),l=r.slice(i.length,o.length===0?1/0:-o.length);return i.every((p,f)=>As(p,c[f],n))&&o.every((p,f)=>As(p,u[f],n))&&(a.length===0||As(a[0],l,n))}return e.length===r.length&&e.every((c,u)=>As(c,r[u],n))}return Reflect.ownKeys(e).every(i=>{let o=e[i];return(i in r||Dk(a=o)&&a[dc]().matcherType==="optional")&&As(o,r[i],n);var a})}return Object.is(r,e)},iu=e=>{var r,n,i;return RG(e)?Dk(e)?(r=(n=(i=e[dc]()).getSelectionKeys)==null?void 0:n.call(i))!=null?r:[]:Array.isArray(e)?DD(e,iu):DD(Object.values(e),iu):[]},DD=(e,r)=>e.reduce((n,i)=>n.concat(r(i)),[]);Vwt=(e,r)=>{for(let n of e)if(!r(n))return!1;return!0},zwt=(e,r)=>{for(let[n,i]of e.entries())if(!r(i,n))return!1;return!0};$xe=Ps(Or(function(e){return!0})),Kwt=$xe,Cg=e=>Object.assign(Ps(e),{startsWith:r=>{return Cg(oi(e,(n=r,Or(i=>Tg(i)&&i.startsWith(n)))));var n},endsWith:r=>{return Cg(oi(e,(n=r,Or(i=>Tg(i)&&i.endsWith(n)))));var n},minLength:r=>Cg(oi(e,(n=>Or(i=>Tg(i)&&i.length>=n))(r))),length:r=>Cg(oi(e,(n=>Or(i=>Tg(i)&&i.length===n))(r))),maxLength:r=>Cg(oi(e,(n=>Or(i=>Tg(i)&&i.length<=n))(r))),includes:r=>{return Cg(oi(e,(n=r,Or(i=>Tg(i)&&i.includes(n)))));var n},regex:r=>{return Cg(oi(e,(n=r,Or(i=>Tg(i)&&!!i.match(n)))));var n}}),Jwt=Cg(Or(Tg)),qf=e=>Object.assign(Ps(e),{between:(r,n)=>qf(oi(e,((i,o)=>Or(a=>jf(a)&&i<=a&&o>=a))(r,n))),lt:r=>qf(oi(e,(n=>Or(i=>jf(i)&&i<n))(r))),gt:r=>qf(oi(e,(n=>Or(i=>jf(i)&&i>n))(r))),lte:r=>qf(oi(e,(n=>Or(i=>jf(i)&&i<=n))(r))),gte:r=>qf(oi(e,(n=>Or(i=>jf(i)&&i>=n))(r))),int:()=>qf(oi(e,Or(r=>jf(r)&&Number.isInteger(r)))),finite:()=>qf(oi(e,Or(r=>jf(r)&&Number.isFinite(r)))),positive:()=>qf(oi(e,Or(r=>jf(r)&&r>0))),negative:()=>qf(oi(e,Or(r=>jf(r)&&r<0)))}),Ywt=qf(Or(jf)),Ag=e=>Object.assign(Ps(e),{between:(r,n)=>Ag(oi(e,((i,o)=>Or(a=>Dg(a)&&i<=a&&o>=a))(r,n))),lt:r=>Ag(oi(e,(n=>Or(i=>Dg(i)&&i<n))(r))),gt:r=>Ag(oi(e,(n=>Or(i=>Dg(i)&&i>n))(r))),lte:r=>Ag(oi(e,(n=>Or(i=>Dg(i)&&i<=n))(r))),gte:r=>Ag(oi(e,(n=>Or(i=>Dg(i)&&i>=n))(r))),positive:()=>Ag(oi(e,Or(r=>Dg(r)&&r>0))),negative:()=>Ag(oi(e,Or(r=>Dg(r)&&r<0)))}),Zwt=Ag(Or(Dg)),Qwt=Ps(Or(function(e){return typeof e=="boolean"})),Xwt=Ps(Or(function(e){return typeof e=="symbol"})),eEt=Ps(Or(function(e){return e==null})),tEt=Ps(Or(function(e){return e!=null})),na={__proto__:null,matcher:dc,optional:LG,array:function(...e){return kG({[dc]:()=>({match:r=>{if(!Array.isArray(r))return{matched:!1};if(e.length===0)return{matched:!0};let n=e[0],i={};if(r.length===0)return iu(n).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};let o=(a,c)=>{i[a]=(i[a]||[]).concat([c])};return{matched:r.every(a=>As(n,a,o)),selections:i}},getSelectionKeys:()=>e.length===0?[]:iu(e[0])})})},set:function(...e){return Ps({[dc]:()=>({match:r=>{if(!(r instanceof Set))return{matched:!1};let n={};if(r.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};let i=(a,c)=>{n[a]=(n[a]||[]).concat([c])},o=e[0];return{matched:Vwt(r,a=>As(o,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:iu(e[0])})})},map:function(...e){return Ps({[dc]:()=>({match:r=>{if(!(r instanceof Map))return{matched:!1};let n={};if(r.size===0)return{matched:!0,selections:n};let i=(u,l)=>{n[u]=(n[u]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);let[a,c]=e;return{matched:zwt(r,(u,l)=>{let p=As(a,l,i),f=As(c,u,i);return p&&f}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...iu(e[0]),...iu(e[1])]})})},intersection:oi,union:Mxe,not:function(e){return Ps({[dc]:()=>({match:r=>({matched:!As(e,r,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:Or,select:CD,any:$xe,_:Kwt,string:Jwt,number:Ywt,bigint:Zwt,boolean:Qwt,symbol:Xwt,nullish:eEt,nonNullable:tEt,instanceOf:function(e){return Ps(Or(function(r){return n=>n instanceof r}(e)))},shape:function(e){return Ps(Or(Hwt(e)))}},MG=class extends Error{constructor(r){let n;try{n=JSON.stringify(r)}catch{n=r}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=r}},$G={matched:!1,value:void 0};NG=class e{constructor(r,n){this.input=void 0,this.state=void 0,this.input=r,this.state=n}with(...r){if(this.state.matched)return this;let n=r[r.length-1],i=[r[0]],o;r.length===3&&typeof r[1]=="function"?o=r[1]:r.length>2&&i.push(...r.slice(1,r.length-1));let a=!1,c={},u=(p,f)=>{a=!0,c[p]=f},l=!i.some(p=>As(p,this.input,u))||o&&!o(this.input)?$G:{matched:!0,value:n(a?Ck in c?c[Ck]:c:this.input,this.input)};return new e(this.input,l)}when(r,n){if(this.state.matched)return this;let i=!!r(this.input);return new e(this.input,i?{matched:!0,value:n(this.input,this.input)}:$G)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new MG(this.input)}run(){return this.exhaustive()}returnType(){return this}}});function Ak(e,...r){nEt.warn()&&console.warn(`${rEt.warn} ${e}`,...r)}var rEt,nEt,Nxe=W(()=>{"use strict";je();rEt={warn:sr("prisma:warn")},nEt={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS}});async function Uxe(){let e=Ok.default.platform(),r=process.arch;if(e==="freebsd"){let c=await Fk("freebsd-version");if(c&&c.trim().length>0){let l=/^(\d+)\.?/.exec(c);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let n=await aEt(),i=await hEt(),o=uEt({arch:r,archFromUname:i,familyDistro:n.familyDistro}),{libssl:a}=await lEt(o);return{platform:"linux",libssl:a,arch:r,archFromUname:i,...n}}function sEt(e){let r=/^ID="?([^"\n]*)"?$/im,n=/^ID_LIKE="?([^"\n]*)"?$/im,i=r.exec(e),o=i&&i[1]&&i[1].toLowerCase()||"",a=n.exec(e),c=a&&a[1]&&a[1].toLowerCase()||"",u=qt({id:o,idLike:c}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>o==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return Ba(`Found distro info:
${JSON.stringify(u,null,2)}`),u}async function aEt(){let e="/etc/os-release";try{let r=await BG.default.readFile(e,{encoding:"utf-8"});return sEt(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function cEt(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let n=`${r[1]}.x`;return Gxe(n)}}function Lxe(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let n=`${r[1]}${r[2]??".0"}.x`;return Gxe(n)}}function Gxe(e){let r=(()=>{if(Hxe(e))return e;let n=e.split(".");return n[1]="0",n.join(".")})();if(oEt.includes(r))return r}function uEt(e){return qt(e).with({familyDistro:"musl"},()=>(Ba('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(Ba('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(Ba('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:n,archFromUname:i})=>(Ba(`Don't know any platform-specific paths for "${r}" on ${n} (${i})`),[]))}async function lEt(e){let r='grep -v "libssl.so.0"',n=await Bxe(e);if(n){Ba(`Found libssl.so file using platform-specific paths: ${n}`);let a=Lxe(n);if(Ba(`The parsed libssl version is: ${a}`),a)return{libssl:a,strategy:"libssl-specific-path"}}Ba('Falling back to "ldconfig" and other generic paths');let i=await Fk(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(i||(i=await Bxe(["/lib64","/usr/lib64","/lib","/usr/lib"])),i){Ba(`Found libssl.so file using "ldconfig" or other generic paths: ${i}`);let a=Lxe(i);if(Ba(`The parsed libssl version is: ${a}`),a)return{libssl:a,strategy:"ldconfig"}}let o=await Fk("openssl version -v");if(o){Ba(`Found openssl binary with version: ${o}`);let a=cEt(o);if(Ba(`The parsed openssl version is: ${a}`),a)return{libssl:a,strategy:"openssl-binary"}}return Ba("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Bxe(e){for(let r of e){let n=await pEt(r);if(n)return n}}async function pEt(e){try{return(await BG.default.readdir(e)).find(n=>n.startsWith("libssl.so.")&&!n.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function Ro(){let{binaryTarget:e}=await Wxe();return e}function fEt(e){return e.binaryTarget!==void 0}async function AD(){let{memoized:e,...r}=await Wxe();return r}async function Wxe(){if(fEt(Pk))return Promise.resolve({...Pk,memoized:!0});let e=await Uxe(),r=dEt(e);return Pk={...e,binaryTarget:r},{...Pk,memoized:!1}}function dEt(e){let{platform:r,arch:n,archFromUname:i,libssl:o,targetDistro:a,familyDistro:c,originalDistro:u}=e;r==="linux"&&!["x64","arm64"].includes(n)&&Ak(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${n}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${i}".`);let l="1.1.x";if(r==="linux"&&o===void 0){let f=qt({familyDistro:c}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Ak(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}".
${f}`)}let p="debian";if(r==="linux"&&a===void 0&&Ba(`Distro is "${u}". Falling back to Prisma engines built for "${p}".`),r==="darwin"&&n==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return a;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&a==="nixos")return"linux-nixos";if(r==="linux"&&n==="arm64")return`${a==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${o||l}`;if(r==="linux"&&n==="arm")return`linux-arm-openssl-${o||l}`;if(r==="linux"&&a==="musl"){let f="linux-musl";return!o||Hxe(o)?f:`${f}-openssl-${o}`}return r==="linux"&&a&&o?`${a}-openssl-${o}`:(r!=="linux"&&Ak(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),o?`${p}-openssl-${o}`:a?`${a}-openssl-${l}`:`${p}-openssl-${l}`)}async function mEt(e){try{return await e()}catch{return}}function Fk(e){return mEt(async()=>{let r=await iEt(e);return Ba(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function hEt(){return typeof Ok.default.machine=="function"?Ok.default.machine():(await Fk("uname -m"))?.trim()}function Hxe(e){return e.startsWith("1.")}var jxe,BG,Ok,qxe,iEt,Ba,oEt,Pk,Vxe=W(()=>{"use strict";ar();jxe=U(require("child_process")),BG=U(require("fs/promises")),Ok=U(require("os"));co();qxe=require("util");Nxe();iEt=(0,qxe.promisify)(jxe.default.exec),Ba=ze("prisma:get-platform"),oEt=["1.0.x","1.1.x","3.0.x"];Pk={}});var Ik,A6r,P6r,O6r,F6r,I6r,R6r,k6r,M6r,$6r,PD,N6r,L6r,B6r,j6r,q6r,zxe=W(()=>{"use strict";Ik=globalThis.window?.document!==void 0,A6r=globalThis.process?.versions?.node!==void 0,P6r=globalThis.process?.versions?.bun!==void 0,O6r=globalThis.Deno?.version?.deno!==void 0,F6r=globalThis.process?.versions?.electron!==void 0,I6r=globalThis.navigator?.userAgent?.includes("jsdom")===!0,R6r=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,k6r=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,M6r=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,$6r=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,PD=globalThis.navigator?.userAgentData?.platform,N6r=PD==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",L6r=PD==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",B6r=PD==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",j6r=PD==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),q6r=PD==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android"});var Cx={};Io(Cx,{beep:()=>qEt,clearScreen:()=>NEt,clearTerminal:()=>LEt,cursorBackward:()=>EEt,cursorDown:()=>vEt,cursorForward:()=>wEt,cursorGetPosition:()=>TEt,cursorHide:()=>AEt,cursorLeft:()=>Yxe,cursorMove:()=>bEt,cursorNextLine:()=>DEt,cursorPrevLine:()=>CEt,cursorRestorePosition:()=>_Et,cursorSavePosition:()=>SEt,cursorShow:()=>PEt,cursorTo:()=>xEt,cursorUp:()=>Jxe,enterAlternativeScreen:()=>BEt,eraseDown:()=>REt,eraseEndLine:()=>FEt,eraseLine:()=>Zxe,eraseLines:()=>OEt,eraseScreen:()=>jG,eraseStartLine:()=>IEt,eraseUp:()=>kEt,exitAlternativeScreen:()=>jEt,iTerm:()=>WEt,image:()=>GEt,link:()=>UEt,scrollDown:()=>$Et,scrollUp:()=>MEt});var Rk,Xr,FD,bE,OD,Kxe,gEt,yEt,xEt,bEt,Jxe,vEt,wEt,EEt,Yxe,SEt,_Et,TEt,DEt,CEt,AEt,PEt,OEt,FEt,IEt,Zxe,REt,kEt,jG,MEt,$Et,NEt,LEt,BEt,jEt,qEt,UEt,GEt,WEt,qG=W(()=>{"use strict";Rk=U(require("node:process"),1);zxe();Xr="\x1B[",FD="\x1B]",bE="\x07",OD=";",Kxe=!Ik&&Rk.default.env.TERM_PROGRAM==="Apple_Terminal",gEt=!Ik&&Rk.default.platform==="win32",yEt=Ik?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Rk.default.cwd,xEt=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?Xr+(e+1)+"G":Xr+(r+1)+OD+(e+1)+"H"},bEt=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let n="";return e<0?n+=Xr+-e+"D":e>0&&(n+=Xr+e+"C"),r<0?n+=Xr+-r+"A":r>0&&(n+=Xr+r+"B"),n},Jxe=(e=1)=>Xr+e+"A",vEt=(e=1)=>Xr+e+"B",wEt=(e=1)=>Xr+e+"C",EEt=(e=1)=>Xr+e+"D",Yxe=Xr+"G",SEt=Kxe?"\x1B7":Xr+"s",_Et=Kxe?"\x1B8":Xr+"u",TEt=Xr+"6n",DEt=Xr+"E",CEt=Xr+"F",AEt=Xr+"?25l",PEt=Xr+"?25h",OEt=e=>{let r="";for(let n=0;n<e;n++)r+=Zxe+(n<e-1?Jxe():"");return e&&(r+=Yxe),r},FEt=Xr+"K",IEt=Xr+"1K",Zxe=Xr+"2K",REt=Xr+"J",kEt=Xr+"1J",jG=Xr+"2J",MEt=Xr+"S",$Et=Xr+"T",NEt="\x1Bc",LEt=gEt?`${jG}${Xr}0f`:`${jG}${Xr}3J${Xr}H`,BEt=Xr+"?1049h",jEt=Xr+"?1049l",qEt=bE,UEt=(e,r)=>[FD,"8",OD,OD,r,bE,e,FD,"8",OD,OD,bE].join(""),GEt=(e,r={})=>{let n=`${FD}1337;File=inline=1`;return r.width&&(n+=`;width=${r.width}`),r.height&&(n+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(n+=";preserveAspectRatio=0"),n+":"+Buffer.from(e).toString("base64")+bE},WEt={setCwd:(e=yEt())=>`${FD}50;CurrentDir=${e}${bE}`,annotation(e,r={}){let n=`${FD}1337;`,i=r.x!==void 0,o=r.y!==void 0;if((i||o)&&!(i&&o&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),n+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?n+=(i?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):n+=e,n+bE}}});var UG=W(()=>{"use strict";qG();qG()});var kk=A((V6r,Qxe)=>{"use strict";Qxe.exports=(e,r=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",i=r.indexOf(n+e),o=r.indexOf("--");return i!==-1&&(o===-1||i<o)}});var tbe=A((z6r,ebe)=>{"use strict";var HEt=require("os"),Xxe=require("tty"),Ju=kk(),{env:Qo}=process,Pg;Ju("no-color")||Ju("no-colors")||Ju("color=false")||Ju("color=never")?Pg=0:(Ju("color")||Ju("colors")||Ju("color=true")||Ju("color=always"))&&(Pg=1);"FORCE_COLOR"in Qo&&(Qo.FORCE_COLOR==="true"?Pg=1:Qo.FORCE_COLOR==="false"?Pg=0:Pg=Qo.FORCE_COLOR.length===0?1:Math.min(parseInt(Qo.FORCE_COLOR,10),3));function GG(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function WG(e,r){if(Pg===0)return 0;if(Ju("color=16m")||Ju("color=full")||Ju("color=truecolor"))return 3;if(Ju("color=256"))return 2;if(e&&!r&&Pg===void 0)return 0;let n=Pg||0;if(Qo.TERM==="dumb")return n;if(process.platform==="win32"){let i=HEt.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in Qo)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in Qo)||Qo.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Qo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qo.TEAMCITY_VERSION)?1:0;if(Qo.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Qo){let i=parseInt((Qo.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qo.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Qo.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Qo.TERM)||"COLORTERM"in Qo?1:n}function VEt(e){let r=WG(e,e&&e.isTTY);return GG(r)}ebe.exports={supportsColor:VEt,stdout:GG(WG(!0,Xxe.isatty(1))),stderr:GG(WG(!0,Xxe.isatty(2)))}});var ibe=A((K6r,nbe)=>{"use strict";var zEt=tbe(),vE=kk();function rbe(e){if(/^\d{3,4}$/.test(e)){let n=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(n[1],10),patch:parseInt(n[2],10)}}let r=(e||"").split(".").map(n=>parseInt(n,10));return{major:r[0],minor:r[1],patch:r[2]}}function HG(e){let{CI:r,FORCE_HYPERLINK:n,NETLIFY:i,TEAMCITY_VERSION:o,TERM_PROGRAM:a,TERM_PROGRAM_VERSION:c,VTE_VERSION:u,TERM:l}=process.env;if(n)return!(n.length>0&&parseInt(n,10)===0);if(vE("no-hyperlink")||vE("no-hyperlinks")||vE("hyperlink=false")||vE("hyperlink=never"))return!1;if(vE("hyperlink=true")||vE("hyperlink=always")||i)return!0;if(!zEt.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||o)return!1;if(a){let p=rbe(c||"");switch(a){case"iTerm.app":return p.major===3?p.minor>=1:p.major>3;case"WezTerm":return p.major>=20200620;case"vscode":return p.major>1||p.major===1&&p.minor>=72;case"ghostty":return!0}}if(u){if(u==="0.50.0")return!1;let p=rbe(u);return p.major>0||p.minor>=50}switch(l){case"alacritty":return!0}return!1}nbe.exports={supportsHyperlink:HG,stdout:HG(process.stdout),stderr:HG(process.stderr)}});function Am(e,r,{target:n="stdout",...i}={}){return Mk.default[n]?Cx.link(e,r):i.fallback===!1?e:typeof i.fallback=="function"?i.fallback(e,r):`${e} (\u200B${r}\u200B)`}var Mk,VG=W(()=>{"use strict";UG();Mk=U(ibe(),1);Am.isSupported=Mk.default.stdout;Am.stderr=(e,r,n={})=>Am(e,r,{target:"stderr",...n});Am.stderr.isSupported=Mk.default.stderr});function zG(e){return Am(e,e,{fallback:hr})}var obe=W(()=>{"use strict";je();VG()});var lbe=A((e$r,ube)=>{"use strict";ube.exports=cbe;cbe.sync=JEt;var sbe=require("fs");function KEt(e,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var i=0;i<n.length;i++){var o=n[i].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function abe(e,r,n){return!e.isSymbolicLink()&&!e.isFile()?!1:KEt(r,n)}function cbe(e,r,n){sbe.stat(e,function(i,o){n(i,i?!1:abe(o,e,r))})}function JEt(e,r){return abe(sbe.statSync(e),e,r)}});var hbe=A((t$r,mbe)=>{"use strict";mbe.exports=fbe;fbe.sync=YEt;var pbe=require("fs");function fbe(e,r,n){pbe.stat(e,function(i,o){n(i,i?!1:dbe(o,r))})}function YEt(e,r){return dbe(pbe.statSync(e),r)}function dbe(e,r){return e.isFile()&&ZEt(e,r)}function ZEt(e,r){var n=e.mode,i=e.uid,o=e.gid,a=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),c=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),u=parseInt("100",8),l=parseInt("010",8),p=parseInt("001",8),f=u|l,g=n&p||n&l&&o===c||n&u&&i===a||n&f&&a===0;return g}});var ybe=A((n$r,gbe)=>{"use strict";var r$r=require("fs"),$k;process.platform==="win32"||global.TESTING_WINDOWS?$k=lbe():$k=hbe();gbe.exports=KG;KG.sync=QEt;function KG(e,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,o){KG(e,r||{},function(a,c){a?o(a):i(c)})})}$k(e,r||{},function(i,o){i&&(i.code==="EACCES"||r&&r.ignoreErrors)&&(i=null,o=!1),n(i,o)})}function QEt(e,r){try{return $k.sync(e,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var JG=A((i$r,Sbe)=>{"use strict";var wE=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",xbe=require("path"),XEt=wE?";":":",bbe=ybe(),vbe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),wbe=(e,r)=>{let n=r.colon||XEt,i=e.match(/\//)||wE&&e.match(/\\/)?[""]:[...wE?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],o=wE?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=wE?o.split(n):[""];return wE&&e.indexOf(".")!==-1&&a[0]!==""&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:o}},Ebe=(e,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:i,pathExt:o,pathExtExe:a}=wbe(e,r),c=[],u=p=>new Promise((f,g)=>{if(p===i.length)return r.all&&c.length?f(c):g(vbe(e));let x=i[p],b=/^".*"$/.test(x)?x.slice(1,-1):x,v=xbe.join(b,e),E=!b&&/^\.[\\\/]/.test(e)?e.slice(0,2)+v:v;f(l(E,p,0))}),l=(p,f,g)=>new Promise((x,b)=>{if(g===o.length)return x(u(f+1));let v=o[g];bbe(p+v,{pathExt:a},(E,_)=>{if(!E&&_)if(r.all)c.push(p+v);else return x(p+v);return x(l(p,f,g+1))})});return n?u(0).then(p=>n(null,p),n):u(0)},e1t=(e,r)=>{r=r||{};let{pathEnv:n,pathExt:i,pathExtExe:o}=wbe(e,r),a=[];for(let c=0;c<n.length;c++){let u=n[c],l=/^".*"$/.test(u)?u.slice(1,-1):u,p=xbe.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let g=0;g<i.length;g++){let x=f+i[g];try{if(bbe.sync(x,{pathExt:o}))if(r.all)a.push(x);else return x}catch{}}}if(r.all&&a.length)return a;if(r.nothrow)return null;throw vbe(e)};Sbe.exports=Ebe;Ebe.sync=e1t});var Nk=A((o$r,YG)=>{"use strict";var _be=(e={})=>{let r=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};YG.exports=_be;YG.exports.default=_be});var Abe=A((s$r,Cbe)=>{"use strict";var Tbe=require("path"),t1t=JG(),r1t=Nk();function Dbe(e,r){let n=e.options.env||process.env,i=process.cwd(),o=e.options.cwd!=null,a=o&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(e.options.cwd)}catch{}let c;try{c=t1t.sync(e.command,{path:n[r1t({env:n})],pathExt:r?Tbe.delimiter:void 0})}catch{}finally{a&&process.chdir(i)}return c&&(c=Tbe.resolve(o?e.options.cwd:"",c)),c}function n1t(e){return Dbe(e)||Dbe(e,!0)}Cbe.exports=n1t});var Pbe=A((a$r,QG)=>{"use strict";var ZG=/([()\][%!^"`<>&|;, *?])/g;function i1t(e){return e=e.replace(ZG,"^$1"),e}function o1t(e,r){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ZG,"^$1"),r&&(e=e.replace(ZG,"^$1")),e}QG.exports.command=i1t;QG.exports.argument=o1t});var Fbe=A((c$r,Obe)=>{"use strict";Obe.exports=/^#!(.*)/});var XG=A((u$r,Ibe)=>{"use strict";var s1t=Fbe();Ibe.exports=(e="")=>{let r=e.match(s1t);if(!r)return null;let[n,i]=r[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?i:i?`${o} ${i}`:o}});var kbe=A((l$r,Rbe)=>{"use strict";var eW=require("fs"),a1t=XG();function c1t(e){let n=Buffer.alloc(150),i;try{i=eW.openSync(e,"r"),eW.readSync(i,n,0,150,0),eW.closeSync(i)}catch{}return a1t(n.toString())}Rbe.exports=c1t});var Lbe=A((p$r,Nbe)=>{"use strict";var u1t=require("path"),Mbe=Abe(),$be=Pbe(),l1t=kbe(),p1t=process.platform==="win32",f1t=/\.(?:com|exe)$/i,d1t=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function m1t(e){e.file=Mbe(e);let r=e.file&&l1t(e.file);return r?(e.args.unshift(e.file),e.command=r,Mbe(e)):e.file}function h1t(e){if(!p1t)return e;let r=m1t(e),n=!f1t.test(r);if(e.options.forceShell||n){let i=d1t.test(r);e.command=u1t.normalize(e.command),e.command=$be.command(e.command),e.args=e.args.map(a=>$be.argument(a,i));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function g1t(e,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let i={command:e,args:r,options:n,file:void 0,original:{command:e,args:r}};return n.shell?i:h1t(i)}Nbe.exports=g1t});var qbe=A((f$r,jbe)=>{"use strict";var tW=process.platform==="win32";function rW(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function y1t(e,r){if(!tW)return;let n=e.emit;e.emit=function(i,o){if(i==="exit"){let a=Bbe(o,r,"spawn");if(a)return n.call(e,"error",a)}return n.apply(e,arguments)}}function Bbe(e,r){return tW&&e===1&&!r.file?rW(r.original,"spawn"):null}function x1t(e,r){return tW&&e===1&&!r.file?rW(r.original,"spawnSync"):null}jbe.exports={hookChildProcess:y1t,verifyENOENT:Bbe,verifyENOENTSync:x1t,notFoundError:rW}});var Wbe=A((d$r,EE)=>{"use strict";var Ube=require("child_process"),nW=Lbe(),iW=qbe();function Gbe(e,r,n){let i=nW(e,r,n),o=Ube.spawn(i.command,i.args,i.options);return iW.hookChildProcess(o,i),o}function b1t(e,r,n){let i=nW(e,r,n),o=Ube.spawnSync(i.command,i.args,i.options);return o.error=o.error||iW.verifyENOENTSync(o.status,i),o}EE.exports=Gbe;EE.exports.spawn=Gbe;EE.exports.sync=b1t;EE.exports._parse=nW;EE.exports._enoent=iW});var Vbe=A((m$r,Hbe)=>{"use strict";Hbe.exports=e=>{let r=typeof e=="string"?`
`:10,n=typeof e=="string"?"\r":13;return e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}});var Jbe=A((h$r,RD)=>{"use strict";var ID=require("path"),zbe=Nk(),Kbe=e=>{e={cwd:process.cwd(),path:process.env[zbe()],execPath:process.execPath,...e};let r,n=ID.resolve(e.cwd),i=[];for(;r!==n;)i.push(ID.join(n,"node_modules/.bin")),r=n,n=ID.resolve(n,"..");let o=ID.resolve(e.cwd,e.execPath,"..");return i.push(o),i.concat(e.path).join(ID.delimiter)};RD.exports=Kbe;RD.exports.default=Kbe;RD.exports.env=e=>{e={env:process.env,...e};let r={...e.env},n=zbe({env:r});return e.path=r[n],r[n]=RD.exports(e),r}});var Zbe=A((g$r,oW)=>{"use strict";var Ybe=(e,r)=>{for(let n of Reflect.ownKeys(r))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n));return e};oW.exports=Ybe;oW.exports.default=Ybe});var Xbe=A((y$r,Bk)=>{"use strict";var v1t=Zbe(),Lk=new WeakMap,Qbe=(e,r={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,o=e.displayName||e.name||"<anonymous>",a=function(...c){if(Lk.set(a,++i),i===1)n=e.apply(this,c),e=null;else if(r.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return v1t(a,e),Lk.set(a,i),a};Bk.exports=Qbe;Bk.exports.default=Qbe;Bk.exports.callCount=e=>{if(!Lk.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Lk.get(e)}});var eve=A(jk=>{"use strict";Object.defineProperty(jk,"__esModule",{value:!0});jk.SIGNALS=void 0;var w1t=[{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:!0},{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:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{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"}];jk.SIGNALS=w1t});var sW=A(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.SIGRTMAX=SE.getRealtimeSignals=void 0;var E1t=function(){let e=rve-tve+1;return Array.from({length:e},S1t)};SE.getRealtimeSignals=E1t;var S1t=function(e,r){return{name:`SIGRT${r+1}`,number:tve+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},tve=34,rve=64;SE.SIGRTMAX=rve});var nve=A(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});qk.getSignals=void 0;var _1t=require("os"),T1t=eve(),D1t=sW(),C1t=function(){let e=(0,D1t.getRealtimeSignals)();return[...T1t.SIGNALS,...e].map(A1t)};qk.getSignals=C1t;var A1t=function({name:e,number:r,description:n,action:i,forced:o=!1,standard:a}){let{signals:{[e]:c}}=_1t.constants,u=c!==void 0;return{name:e,number:u?c:r,description:n,supported:u,action:i,forced:o,standard:a}}});var ove=A(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.signalsByNumber=_E.signalsByName=void 0;var P1t=require("os"),ive=nve(),O1t=sW(),F1t=function(){return(0,ive.getSignals)().reduce(I1t,{})},I1t=function(e,{name:r,number:n,description:i,supported:o,action:a,forced:c,standard:u}){return{...e,[r]:{name:r,number:n,description:i,supported:o,action:a,forced:c,standard:u}}},R1t=F1t();_E.signalsByName=R1t;var k1t=function(){let e=(0,ive.getSignals)(),r=O1t.SIGRTMAX+1,n=Array.from({length:r},(i,o)=>M1t(o,e));return Object.assign({},...n)},M1t=function(e,r){let n=$1t(e,r);if(n===void 0)return{};let{name:i,description:o,supported:a,action:c,forced:u,standard:l}=n;return{[e]:{name:i,number:e,description:o,supported:a,action:c,forced:u,standard:l}}},$1t=function(e,r){let n=r.find(({name:i})=>P1t.constants.signals[i]===e);return n!==void 0?n:r.find(i=>i.number===e)},N1t=k1t();_E.signalsByNumber=N1t});var ave=A((E$r,sve)=>{"use strict";var{signalsByName:L1t}=ove(),B1t=({timedOut:e,timeout:r,errorCode:n,signal:i,signalDescription:o,exitCode:a,isCanceled:c})=>e?`timed out after ${r} milliseconds`:c?"was canceled":n!==void 0?`failed with ${n}`:i!==void 0?`was killed with ${i} (${o})`:a!==void 0?`failed with exit code ${a}`:"failed",j1t=({stdout:e,stderr:r,all:n,error:i,signal:o,exitCode:a,command:c,escapedCommand:u,timedOut:l,isCanceled:p,killed:f,parsed:{options:{timeout:g}}})=>{a=a===null?void 0:a,o=o===null?void 0:o;let x=o===void 0?void 0:L1t[o].description,b=i&&i.code,E=`Command ${B1t({timedOut:l,timeout:g,errorCode:b,signal:o,signalDescription:x,exitCode:a,isCanceled:p})}: ${c}`,_=Object.prototype.toString.call(i)==="[object Error]",C=_?`${E}
${i.message}`:E,F=[C,r,e].filter(Boolean).join(`
`);return _?(i.originalMessage=i.message,i.message=F):i=new Error(F),i.shortMessage=C,i.command=c,i.escapedCommand=u,i.exitCode=a,i.signal=o,i.signalDescription=x,i.stdout=e,i.stderr=r,n!==void 0&&(i.all=n),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=!!l,i.isCanceled=p,i.killed=f&&!l,i};sve.exports=j1t});var uve=A((S$r,aW)=>{"use strict";var Uk=["stdin","stdout","stderr"],q1t=e=>Uk.some(r=>e[r]!==void 0),cve=e=>{if(!e)return;let{stdio:r}=e;if(r===void 0)return Uk.map(i=>e[i]);if(q1t(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Uk.map(i=>`\`${i}\``).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}\``);let n=Math.max(r.length,Uk.length);return Array.from({length:n},(i,o)=>r[o])};aW.exports=cve;aW.exports.node=e=>{let r=cve(e);return r==="ipc"?"ipc":r===void 0||typeof r=="string"?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]}});var lve=A((_$r,Gk)=>{"use strict";Gk.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Gk.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Gk.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var hve=A((T$r,CE)=>{"use strict";var xi=global.process,Ax=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Ax(xi)?(pve=require("assert"),TE=lve(),fve=/^win/i.test(xi.platform),kD=require("events"),typeof kD!="function"&&(kD=kD.EventEmitter),xi.__signal_exit_emitter__?Xo=xi.__signal_exit_emitter__:(Xo=xi.__signal_exit_emitter__=new kD,Xo.count=0,Xo.emitted={}),Xo.infinite||(Xo.setMaxListeners(1/0),Xo.infinite=!0),CE.exports=function(e,r){if(!Ax(global.process))return function(){};pve.equal(typeof e,"function","a callback must be provided for exit handler"),DE===!1&&cW();var n="exit";r&&r.alwaysLast&&(n="afterexit");var i=function(){Xo.removeListener(n,e),Xo.listeners("exit").length===0&&Xo.listeners("afterexit").length===0&&Wk()};return Xo.on(n,e),i},Wk=function(){!DE||!Ax(global.process)||(DE=!1,TE.forEach(function(r){try{xi.removeListener(r,Hk[r])}catch{}}),xi.emit=Vk,xi.reallyExit=uW,Xo.count-=1)},CE.exports.unload=Wk,Px=function(r,n,i){Xo.emitted[r]||(Xo.emitted[r]=!0,Xo.emit(r,n,i))},Hk={},TE.forEach(function(e){Hk[e]=function(){if(Ax(global.process)){var n=xi.listeners(e);n.length===Xo.count&&(Wk(),Px("exit",null,e),Px("afterexit",null,e),fve&&e==="SIGHUP"&&(e="SIGINT"),xi.kill(xi.pid,e))}}}),CE.exports.signals=function(){return TE},DE=!1,cW=function(){DE||!Ax(global.process)||(DE=!0,Xo.count+=1,TE=TE.filter(function(r){try{return xi.on(r,Hk[r]),!0}catch{return!1}}),xi.emit=mve,xi.reallyExit=dve)},CE.exports.load=cW,uW=xi.reallyExit,dve=function(r){Ax(global.process)&&(xi.exitCode=r||0,Px("exit",xi.exitCode,null),Px("afterexit",xi.exitCode,null),uW.call(xi,xi.exitCode))},Vk=xi.emit,mve=function(r,n){if(r==="exit"&&Ax(global.process)){n!==void 0&&(xi.exitCode=n);var i=Vk.apply(this,arguments);return Px("exit",xi.exitCode,null),Px("afterexit",xi.exitCode,null),i}else return Vk.apply(this,arguments)}):CE.exports=function(){return function(){}};var pve,TE,fve,kD,Xo,Wk,Px,Hk,DE,cW,uW,dve,Vk,mve});var yve=A((D$r,gve)=>{"use strict";var U1t=require("os"),G1t=hve(),W1t=1e3*5,H1t=(e,r="SIGTERM",n={})=>{let i=e(r);return V1t(e,r,n,i),i},V1t=(e,r,n,i)=>{if(!z1t(r,n,i))return;let o=J1t(n),a=setTimeout(()=>{e("SIGKILL")},o);a.unref&&a.unref()},z1t=(e,{forceKillAfterTimeout:r},n)=>K1t(e)&&r!==!1&&n,K1t=e=>e===U1t.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",J1t=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return W1t;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Y1t=(e,r)=>{e.kill()&&(r.isCanceled=!0)},Z1t=(e,r,n)=>{e.kill(r),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:r}))},Q1t=(e,{timeout:r,killSignal:n="SIGTERM"},i)=>{if(r===0||r===void 0)return i;let o,a=new Promise((u,l)=>{o=setTimeout(()=>{Z1t(e,n,l)},r)}),c=i.finally(()=>{clearTimeout(o)});return Promise.race([a,c])},X1t=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},eSt=async(e,{cleanup:r,detached:n},i)=>{if(!r||n)return i;let o=G1t(()=>{e.kill()});return i.finally(()=>{o()})};gve.exports={spawnedKill:H1t,spawnedCancel:Y1t,setupTimeout:Q1t,validateTimeout:X1t,setExitHandler:eSt}});var zk=A((C$r,xve)=>{"use strict";var Uf=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";Uf.writable=e=>Uf(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Uf.readable=e=>Uf(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Uf.duplex=e=>Uf.writable(e)&&Uf.readable(e);Uf.transform=e=>Uf.duplex(e)&&typeof e._transform=="function";xve.exports=Uf});var vve=A((A$r,bve)=>{"use strict";var{PassThrough:tSt}=require("stream");bve.exports=e=>{e={...e};let{array:r}=e,{encoding:n}=e,i=n==="buffer",o=!1;r?o=!(n||i):n=n||"utf8",i&&(n=null);let a=new tSt({objectMode:o});n&&a.setEncoding(n);let c=0,u=[];return a.on("data",l=>{u.push(l),o?c=u.length:c+=l.length}),a.getBufferedValue=()=>r?u:i?Buffer.concat(u,c):u.join(""),a.getBufferedLength=()=>c,a}});var wve=A((P$r,MD)=>{"use strict";var{constants:rSt}=require("buffer"),nSt=require("stream"),{promisify:iSt}=require("util"),oSt=vve(),sSt=iSt(nSt.pipeline),Kk=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function lW(e,r){if(!e)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};let{maxBuffer:n}=r,i=oSt(r);return await new Promise((o,a)=>{let c=u=>{u&&i.getBufferedLength()<=rSt.MAX_LENGTH&&(u.bufferedData=i.getBufferedValue()),a(u)};(async()=>{try{await sSt(e,i),o()}catch(u){c(u)}})(),i.on("data",()=>{i.getBufferedLength()>n&&c(new Kk)})}),i.getBufferedValue()}MD.exports=lW;MD.exports.buffer=(e,r)=>lW(e,{...r,encoding:"buffer"});MD.exports.array=(e,r)=>lW(e,{...r,array:!0});MD.exports.MaxBufferError=Kk});var Sve=A((O$r,Eve)=>{"use strict";var{PassThrough:aSt}=require("stream");Eve.exports=function(){var e=[],r=new aSt({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=i,r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(a){return Array.isArray(a)?(a.forEach(n),this):(e.push(a),a.once("end",o.bind(null,a)),a.once("error",r.emit.bind(r,"error")),a.pipe(r,{end:!1}),this)}function i(){return e.length==0}function o(a){e=e.filter(function(c){return c!==a}),!e.length&&r.readable&&r.end()}}});var Cve=A((F$r,Dve)=>{"use strict";var Tve=zk(),_ve=wve(),cSt=Sve(),uSt=(e,r)=>{r===void 0||e.stdin===void 0||(Tve(r)?r.pipe(e.stdin):e.stdin.end(r))},lSt=(e,{all:r})=>{if(!r||!e.stdout&&!e.stderr)return;let n=cSt();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},pW=async(e,r)=>{if(e){e.destroy();try{return await r}catch(n){return n.bufferedData}}},fW=(e,{encoding:r,buffer:n,maxBuffer:i})=>{if(!(!e||!n))return r?_ve(e,{encoding:r,maxBuffer:i}):_ve.buffer(e,{maxBuffer:i})},pSt=async({stdout:e,stderr:r,all:n},{encoding:i,buffer:o,maxBuffer:a},c)=>{let u=fW(e,{encoding:i,buffer:o,maxBuffer:a}),l=fW(r,{encoding:i,buffer:o,maxBuffer:a}),p=fW(n,{encoding:i,buffer:o,maxBuffer:a*2});try{return await Promise.all([c,u,l,p])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},pW(e,u),pW(r,l),pW(n,p)])}},fSt=({input:e})=>{if(Tve(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};Dve.exports={handleInput:uSt,makeAllStream:lSt,getSpawnedResult:pSt,validateInputSync:fSt}});var Pve=A((I$r,Ave)=>{"use strict";var dSt=(async()=>{})().constructor.prototype,mSt=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(dSt,e)]),hSt=(e,r)=>{for(let[n,i]of mSt){let o=typeof r=="function"?(...a)=>Reflect.apply(i.value,r(),a):i.value.bind(r);Reflect.defineProperty(e,n,{...i,value:o})}return e},gSt=e=>new Promise((r,n)=>{e.on("exit",(i,o)=>{r({exitCode:i,signal:o})}),e.on("error",i=>{n(i)}),e.stdin&&e.stdin.on("error",i=>{n(i)})});Ave.exports={mergePromise:hSt,getSpawnedPromise:gSt}})