@seed-design/codemod 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/index.cjs CHANGED
@@ -1,66 +1,66 @@
1
1
  #!/usr/bin/env node
2
- var yx=Object.create;var No=Object.defineProperty;var bx=Object.getOwnPropertyDescriptor;var wx=Object.getOwnPropertyNames;var xx=Object.getPrototypeOf,Sx=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vx=(e,t)=>{for(var r in t)No(e,r,{get:t[r],enumerable:!0})},_x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wx(t))!Sx.call(e,s)&&s!==r&&No(e,s,{get:()=>t[s],enumerable:!(n=bx(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?yx(xx(e)):{},_x(t||!e||!e.__esModule?No(r,"default",{value:e,enumerable:!0}):r,e));var Mu=x((yL,Pu)=>{Pu.exports=Nu;Nu.sync=OS;var Du=require("fs");function TS(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function Lu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:TS(t,r)}function Nu(e,t,r){Du.stat(e,function(n,s){r(n,n?!1:Lu(s,e,t))})}function OS(e,t){return Lu(Du.statSync(e),e,t)}});var Gu=x((bL,Uu)=>{Uu.exports=ju;ju.sync=RS;var Fu=require("fs");function ju(e,t,r){Fu.stat(e,function(n,s){r(n,n?!1:Bu(s,t))})}function RS(e,t){return Bu(Fu.statSync(e),t)}function Bu(e,t){return e.isFile()&&kS(e,t)}function kS(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var Vu=x((xL,qu)=>{var wL=require("fs"),jn;process.platform==="win32"||global.TESTING_WINDOWS?jn=Mu():jn=Gu();qu.exports=Xo;Xo.sync=CS;function Xo(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){Xo(e,t||{},function(o,i){o?s(o):n(i)})})}jn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function CS(e,t){try{return jn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ku=x((SL,Xu)=>{var Jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=require("path"),AS=Jt?";":":",Wu=Vu(),Hu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Zu=(e,t)=>{let r=t.colon||AS,n=e.match(/\//)||Jt&&e.match(/\\/)?[""]:[...Jt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Jt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Jt?s.split(r):[""];return Jt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Yu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Zu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Hu(e));let d=n[u],p=/^".*"$/.test(d)?d.slice(1,-1):d,b=zu.join(p,e),T=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((d,p)=>{if(f===s.length)return d(a(l+1));let b=s[f];Wu(u+b,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+b);else return d(u+b);return d(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},IS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Zu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=zu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let d=l+n[f];try{if(Wu.sync(d,{pathExt:s}))if(t.all)o.push(d);else return d}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Hu(e)};Xu.exports=Yu;Yu.sync=IS});var Qu=x((vL,Ko)=>{"use strict";var Ju=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Ko.exports=Ju;Ko.exports.default=Ju});var nl=x((_L,rl)=>{"use strict";var el=require("path"),$S=Ku(),DS=Qu();function tl(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=$S.sync(e.command,{path:r[DS({env:r})],pathExt:t?el.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=el.resolve(s?e.options.cwd:"",i)),i}function LS(e){return tl(e)||tl(e,!0)}rl.exports=LS});var sl=x((EL,Qo)=>{"use strict";var Jo=/([()\][%!^"`<>&|;, *?])/g;function NS(e){return e=e.replace(Jo,"^$1"),e}function PS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Jo,"^$1"),t&&(e=e.replace(Jo,"^$1")),e}Qo.exports.command=NS;Qo.exports.argument=PS});var il=x((TL,ol)=>{"use strict";ol.exports=/^#!(.*)/});var cl=x((OL,al)=>{"use strict";var MS=il();al.exports=(e="")=>{let t=e.match(MS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var ll=x((RL,ul)=>{"use strict";var ei=require("fs"),FS=cl();function jS(e){let r=Buffer.alloc(150),n;try{n=ei.openSync(e,"r"),ei.readSync(n,r,0,150,0),ei.closeSync(n)}catch{}return FS(r.toString())}ul.exports=jS});var ml=x((kL,pl)=>{"use strict";var BS=require("path"),fl=nl(),dl=sl(),US=ll(),GS=process.platform==="win32",qS=/\.(?:com|exe)$/i,VS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zS(e){e.file=fl(e);let t=e.file&&US(e.file);return t?(e.args.unshift(e.file),e.command=t,fl(e)):e.file}function WS(e){if(!GS)return e;let t=zS(e),r=!qS.test(t);if(e.options.forceShell||r){let n=VS.test(t);e.command=BS.normalize(e.command),e.command=dl.command(e.command),e.args=e.args.map(o=>dl.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function HS(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:WS(n)}pl.exports=HS});var yl=x((CL,gl)=>{"use strict";var ti=process.platform==="win32";function ri(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 ZS(e,t){if(!ti)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=hl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function hl(e,t){return ti&&e===1&&!t.file?ri(t.original,"spawn"):null}function YS(e,t){return ti&&e===1&&!t.file?ri(t.original,"spawnSync"):null}gl.exports={hookChildProcess:ZS,verifyENOENT:hl,verifyENOENTSync:YS,notFoundError:ri}});var xl=x((AL,Qt)=>{"use strict";var bl=require("child_process"),ni=ml(),si=yl();function wl(e,t,r){let n=ni(e,t,r),s=bl.spawn(n.command,n.args,n.options);return si.hookChildProcess(s,n),s}function XS(e,t,r){let n=ni(e,t,r),s=bl.spawnSync(n.command,n.args,n.options);return s.error=s.error||si.verifyENOENTSync(s.status,n),s}Qt.exports=wl;Qt.exports.spawn=wl;Qt.exports.sync=XS;Qt.exports._parse=ni;Qt.exports._enoent=si});var Xr=x((yG,Gm)=>{var q0="2.0.0",V0=Number.MAX_SAFE_INTEGER||9007199254740991,z0=16,W0=250,H0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:z0,MAX_SAFE_BUILD_LENGTH:W0,MAX_SAFE_INTEGER:V0,RELEASE_TYPES:H0,SEMVER_SPEC_VERSION:q0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Kr=x((bG,qm)=>{var Z0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};qm.exports=Z0});var pr=x((We,Vm)=>{var{MAX_SAFE_COMPONENT_LENGTH:Ta,MAX_SAFE_BUILD_LENGTH:Y0,MAX_LENGTH:X0}=Xr(),K0=Kr();We=Vm.exports={};var J0=We.re=[],Q0=We.safeRe=[],S=We.src=[],eO=We.safeSrc=[],v=We.t={},tO=0,Oa="[a-zA-Z0-9-]",rO=[["\\s",1],["\\d",X0],[Oa,Y0]],nO=e=>{for(let[t,r]of rO)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=nO(t),s=tO++;K0(e,s,t),v[e]=s,S[s]=t,eO[s]=n,J0[s]=new RegExp(t,r?"g":void 0),Q0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Oa}*`);A("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${S[v.NUMERICIDENTIFIER]}|${S[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NUMERICIDENTIFIERLOOSE]}|${S[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Oa}+`);A("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);A("FULL",`^${S[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);A("LOOSE",`^${S[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);A("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ta}})(?:\\.(\\d{1,${Ta}}))?(?:\\.(\\d{1,${Ta}}))?`);A("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",S[v.COERCE],!0);A("COERCERTLFULL",S[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);We.tildeTrimReplace="$1~";A("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);We.caretTrimReplace="$1^";A("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);We.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var js=x((wG,zm)=>{var sO=Object.freeze({loose:!0}),oO=Object.freeze({}),iO=e=>e?typeof e!="object"?sO:e:oO;zm.exports=iO});var Ra=x((xG,Zm)=>{var Wm=/^[0-9]+$/,Hm=(e,t)=>{let r=Wm.test(e),n=Wm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},aO=(e,t)=>Hm(t,e);Zm.exports={compareIdentifiers:Hm,rcompareIdentifiers:aO}});var te=x((SG,Jm)=>{var Bs=Kr(),{MAX_LENGTH:Ym,MAX_SAFE_INTEGER:Us}=Xr(),{safeRe:Xm,safeSrc:Km,t:Gs}=pr(),cO=js(),{compareIdentifiers:mr}=Ra(),ka=class e{constructor(t,r){if(r=cO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ym)throw new TypeError(`version is longer than ${Ym} characters`);Bs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Xm[Gs.LOOSE]:Xm[Gs.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Us||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Us||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Us||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<Us)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Bs("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mr(this.major,t.major)||mr(this.minor,t.minor)||mr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Bs("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Bs("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=new RegExp(`^${this.options.loose?Km[Gs.PRERELEASELOOSE]:Km[Gs.PRERELEASE]}$`),o=`-${r}`.match(s);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),mr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Jm.exports=ka});var Rt=x((vG,eh)=>{var Qm=te(),uO=(e,t,r=!1)=>{if(e instanceof Qm)return e;try{return new Qm(e,t)}catch(n){if(!r)return null;throw n}};eh.exports=uO});var rh=x((_G,th)=>{var lO=Rt(),fO=(e,t)=>{let r=lO(e,t);return r?r.version:null};th.exports=fO});var sh=x((EG,nh)=>{var dO=Rt(),pO=(e,t)=>{let r=dO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};nh.exports=pO});var ah=x((TG,ih)=>{var oh=te(),mO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new oh(e instanceof oh?e.version:e,r).inc(t,n,s).version}catch{return null}};ih.exports=mO});var lh=x((OG,uh)=>{var ch=Rt(),hO=(e,t)=>{let r=ch(e,null,!0),n=ch(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};uh.exports=hO});var dh=x((RG,fh)=>{var gO=te(),yO=(e,t)=>new gO(e,t).major;fh.exports=yO});var mh=x((kG,ph)=>{var bO=te(),wO=(e,t)=>new bO(e,t).minor;ph.exports=wO});var gh=x((CG,hh)=>{var xO=te(),SO=(e,t)=>new xO(e,t).patch;hh.exports=SO});var bh=x((AG,yh)=>{var vO=Rt(),_O=(e,t)=>{let r=vO(e,t);return r&&r.prerelease.length?r.prerelease:null};yh.exports=_O});var _e=x((IG,xh)=>{var wh=te(),EO=(e,t,r)=>new wh(e,r).compare(new wh(t,r));xh.exports=EO});var vh=x(($G,Sh)=>{var TO=_e(),OO=(e,t,r)=>TO(t,e,r);Sh.exports=OO});var Eh=x((DG,_h)=>{var RO=_e(),kO=(e,t)=>RO(e,t,!0);_h.exports=kO});var qs=x((LG,Oh)=>{var Th=te(),CO=(e,t,r)=>{let n=new Th(e,r),s=new Th(t,r);return n.compare(s)||n.compareBuild(s)};Oh.exports=CO});var kh=x((NG,Rh)=>{var AO=qs(),IO=(e,t)=>e.sort((r,n)=>AO(r,n,t));Rh.exports=IO});var Ah=x((PG,Ch)=>{var $O=qs(),DO=(e,t)=>e.sort((r,n)=>$O(n,r,t));Ch.exports=DO});var Jr=x((MG,Ih)=>{var LO=_e(),NO=(e,t,r)=>LO(e,t,r)>0;Ih.exports=NO});var Vs=x((FG,$h)=>{var PO=_e(),MO=(e,t,r)=>PO(e,t,r)<0;$h.exports=MO});var Ca=x((jG,Dh)=>{var FO=_e(),jO=(e,t,r)=>FO(e,t,r)===0;Dh.exports=jO});var Aa=x((BG,Lh)=>{var BO=_e(),UO=(e,t,r)=>BO(e,t,r)!==0;Lh.exports=UO});var zs=x((UG,Nh)=>{var GO=_e(),qO=(e,t,r)=>GO(e,t,r)>=0;Nh.exports=qO});var Ws=x((GG,Ph)=>{var VO=_e(),zO=(e,t,r)=>VO(e,t,r)<=0;Ph.exports=zO});var Ia=x((qG,Mh)=>{var WO=Ca(),HO=Aa(),ZO=Jr(),YO=zs(),XO=Vs(),KO=Ws(),JO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return WO(e,r,n);case"!=":return HO(e,r,n);case">":return ZO(e,r,n);case">=":return YO(e,r,n);case"<":return XO(e,r,n);case"<=":return KO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Mh.exports=JO});var jh=x((VG,Fh)=>{var QO=te(),eR=Rt(),{safeRe:Hs,t:Zs}=pr(),tR=(e,t)=>{if(e instanceof QO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Hs[Zs.COERCEFULL]:Hs[Zs.COERCE]);else{let c=t.includePrerelease?Hs[Zs.COERCERTLFULL]:Hs[Zs.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return eR(`${n}.${s}.${o}${i}${a}`,t)};Fh.exports=tR});var Uh=x((zG,Bh)=>{var $a=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};Bh.exports=$a});var Ee=x((WG,zh)=>{var rR=/\s+/g,Da=class e{constructor(t,r){if(r=sR(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof La)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(rR," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!qh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&fR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&uR)|(this.options.loose&&lR))+":"+t,s=Gh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,SR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],iR),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],aR),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],cR),G("caret trim",t);let a=t.split(" ").map(f=>dR(f,this.options)).join(" ").split(/\s+/).map(f=>xR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[oe.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new La(f,this.options));for(let f of u){if(qh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Gh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Vh(n,r)&&t.set.some(s=>Vh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new oR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(vR(this.set[r],t,this.options))return!0;return!1}};zh.exports=Da;var nR=Uh(),Gh=new nR,sR=js(),La=Qr(),G=Kr(),oR=te(),{safeRe:ue,t:oe,comparatorTrimReplace:iR,tildeTrimReplace:aR,caretTrimReplace:cR}=pr(),{FLAG_INCLUDE_PRERELEASE:uR,FLAG_LOOSE:lR}=Xr(),qh=e=>e.value==="<0.0.0-0",fR=e=>e.value==="",Vh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},dR=(e,t)=>(G("comp",e,t),e=hR(e,t),G("caret",e),e=pR(e,t),G("tildes",e),e=yR(e,t),G("xrange",e),e=wR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",pR=(e,t)=>e.trim().split(/\s+/).map(r=>mR(r,t)).join(" "),mR=(e,t)=>{let r=t.loose?ue[oe.TILDELOOSE]:ue[oe.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ie(s)?c="":ie(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ie(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},hR=(e,t)=>e.trim().split(/\s+/).map(r=>gR(r,t)).join(" "),gR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[oe.CARETLOOSE]:ue[oe.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return ie(o)?u="":ie(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ie(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},yR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>bR(r,t)).join(" ")),bR=(e,t)=>{e=e.trim();let r=t.loose?ue[oe.XRANGELOOSE]:ue[oe.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ie(o),l=u||ie(i),f=l||ie(a),d=f;return s==="="&&d&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&d?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},wR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),xR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),SR=e=>(t,r,n,s,o,i,a,c,u,l,f,d)=>(ie(n)?r="":ie(s)?r=`>=${n}.0.0${e?"-0":""}`:ie(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ie(u)?c="":ie(l)?c=`<${+u+1}.0.0-0`:ie(f)?c=`<${u}.${+l+1}.0-0`:d?c=`<=${u}.${l}.${f}-${d}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),vR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==La.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Qr=x((HG,Kh)=>{var en=Symbol("SemVer ANY"),Ma=class e{static get ANY(){return en}constructor(t,r){if(r=Wh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Pa("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===en?this.value="":this.value=this.operator+this.semver.version,Pa("comp",this)}parse(t){let r=this.options.loose?Hh[Zh.COMPARATORLOOSE]:Hh[Zh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Yh(n[2],this.options.loose):this.semver=en}toString(){return this.value}test(t){if(Pa("Comparator.test",t,this.options.loose),this.semver===en||t===en)return!0;if(typeof t=="string")try{t=new Yh(t,this.options)}catch{return!1}return Na(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Xh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Xh(this.value,r).test(t.semver):(r=Wh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Na(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Na(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Kh.exports=Ma;var Wh=js(),{safeRe:Hh,t:Zh}=pr(),Na=Ia(),Pa=Kr(),Yh=te(),Xh=Ee()});var tn=x((ZG,Jh)=>{var _R=Ee(),ER=(e,t,r)=>{try{t=new _R(t,r)}catch{return!1}return t.test(e)};Jh.exports=ER});var eg=x((YG,Qh)=>{var TR=Ee(),OR=(e,t)=>new TR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Qh.exports=OR});var rg=x((XG,tg)=>{var RR=te(),kR=Ee(),CR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new kR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new RR(n,r))}),n};tg.exports=CR});var sg=x((KG,ng)=>{var AR=te(),IR=Ee(),$R=(e,t,r)=>{let n=null,s=null,o=null;try{o=new IR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new AR(n,r))}),n};ng.exports=$R});var ag=x((JG,ig)=>{var Fa=te(),DR=Ee(),og=Jr(),LR=(e,t)=>{e=new DR(e,t);let r=new Fa("0.0.0");if(e.test(r)||(r=new Fa("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new Fa(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||og(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||og(r,o))&&(r=o)}return r&&e.test(r)?r:null};ig.exports=LR});var ug=x((QG,cg)=>{var NR=Ee(),PR=(e,t)=>{try{return new NR(e,t).range||"*"}catch{return null}};cg.exports=PR});var Ys=x((e9,pg)=>{var MR=te(),dg=Qr(),{ANY:FR}=dg,jR=Ee(),BR=tn(),lg=Jr(),fg=Vs(),UR=Ws(),GR=zs(),qR=(e,t,r,n)=>{e=new MR(e,n),t=new jR(t,n);let s,o,i,a,c;switch(r){case">":s=lg,o=UR,i=fg,a=">",c=">=";break;case"<":s=fg,o=GR,i=lg,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(BR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===FR&&(p=new dg(">=0.0.0")),f=f||p,d=d||p,s(p.semver,f.semver,n)?f=p:i(p.semver,d.semver,n)&&(d=p)}),f.operator===a||f.operator===c||(!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&i(e,d.semver))return!1}return!0};pg.exports=qR});var hg=x((t9,mg)=>{var VR=Ys(),zR=(e,t,r)=>VR(e,t,">",r);mg.exports=zR});var yg=x((r9,gg)=>{var WR=Ys(),HR=(e,t,r)=>WR(e,t,"<",r);gg.exports=HR});var xg=x((n9,wg)=>{var bg=Ee(),ZR=(e,t,r)=>(e=new bg(e,r),t=new bg(t,r),e.intersects(t,r));wg.exports=ZR});var vg=x((s9,Sg)=>{var YR=tn(),XR=_e();Sg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>XR(l,f,r));for(let l of i)YR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var kg=x((o9,Rg)=>{var _g=Ee(),Ba=Qr(),{ANY:ja}=Ba,rn=tn(),Ua=_e(),KR=(e,t,r={})=>{if(e===t)return!0;e=new _g(e,r),t=new _g(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=QR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},JR=[new Ba(">=0.0.0-0")],Eg=[new Ba(">=0.0.0")],QR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ja){if(t.length===1&&t[0].semver===ja)return!0;r.includePrerelease?e=JR:e=Eg}if(t.length===1&&t[0].semver===ja){if(r.includePrerelease)return!0;t=Eg}let n=new Set,s,o;for(let p of e)p.operator===">"||p.operator===">="?s=Tg(s,p,r):p.operator==="<"||p.operator==="<="?o=Og(o,p,r):n.add(p.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Ua(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(s&&!rn(p,String(s),r)||o&&!rn(p,String(o),r))return null;for(let b of t)if(!rn(p,String(b),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of t){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=Tg(s,p,r),a===p&&a!==s)return!1}else if(s.operator===">="&&!rn(s.semver,String(p),r))return!1}if(o){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(c=Og(o,p,r),c===p&&c!==o)return!1}else if(o.operator==="<="&&!rn(o.semver,String(p),r))return!1}if(!p.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||d||f)},Tg=(e,t,r)=>{if(!e)return t;let n=Ua(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Og=(e,t,r)=>{if(!e)return t;let n=Ua(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Rg.exports=KR});var $g=x((i9,Ig)=>{var Ga=pr(),Cg=Xr(),ek=te(),Ag=Ra(),tk=Rt(),rk=rh(),nk=sh(),sk=ah(),ok=lh(),ik=dh(),ak=mh(),ck=gh(),uk=bh(),lk=_e(),fk=vh(),dk=Eh(),pk=qs(),mk=kh(),hk=Ah(),gk=Jr(),yk=Vs(),bk=Ca(),wk=Aa(),xk=zs(),Sk=Ws(),vk=Ia(),_k=jh(),Ek=Qr(),Tk=Ee(),Ok=tn(),Rk=eg(),kk=rg(),Ck=sg(),Ak=ag(),Ik=ug(),$k=Ys(),Dk=hg(),Lk=yg(),Nk=xg(),Pk=vg(),Mk=kg();Ig.exports={parse:tk,valid:rk,clean:nk,inc:sk,diff:ok,major:ik,minor:ak,patch:ck,prerelease:uk,compare:lk,rcompare:fk,compareLoose:dk,compareBuild:pk,sort:mk,rsort:hk,gt:gk,lt:yk,eq:bk,neq:wk,gte:xk,lte:Sk,cmp:vk,coerce:_k,Comparator:Ek,Range:Tk,satisfies:Ok,toComparators:Rk,maxSatisfying:kk,minSatisfying:Ck,minVersion:Ak,validRange:Ik,outside:$k,gtr:Dk,ltr:Lk,intersects:Nk,simplifyRange:Pk,subset:Mk,SemVer:ek,re:Ga.re,src:Ga.src,tokens:Ga.t,SEMVER_SPEC_VERSION:Cg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Cg.RELEASE_TYPES,compareIdentifiers:Ag.compareIdentifiers,rcompareIdentifiers:Ag.rcompareIdentifiers}});var Hg=x((j9,Wg)=>{var _r=1e3,Er=_r*60,Tr=Er*60,Vt=Tr*24,ZC=Vt*7,YC=Vt*365.25;Wg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return XC(e);if(r==="number"&&isFinite(e))return t.long?JC(e):KC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function XC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\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(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*YC;case"weeks":case"week":case"w":return r*ZC;case"days":case"day":case"d":return r*Vt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Er;case"seconds":case"second":case"secs":case"sec":case"s":return r*_r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function KC(e){var t=Math.abs(e);return t>=Vt?Math.round(e/Vt)+"d":t>=Tr?Math.round(e/Tr)+"h":t>=Er?Math.round(e/Er)+"m":t>=_r?Math.round(e/_r)+"s":e+"ms"}function JC(e){var t=Math.abs(e);return t>=Vt?ro(e,t,Vt,"day"):t>=Tr?ro(e,t,Tr,"hour"):t>=Er?ro(e,t,Er,"minute"):t>=_r?ro(e,t,_r,"second"):e+" ms"}function ro(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Wa=x((B9,Zg)=>{function QC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Hg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let d=0;d<l.length;d++)f=(f<<5)-f+l.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,d=null,p,b;function T(...P){if(!T.enabled)return;let M=T,j=Number(new Date),Y=j-(f||j);M.diff=Y,M.prev=f,M.curr=j,f=j,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=P[X];ce=Ie.call(M,xe),P.splice(X,1),X--}return ce}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,b=r.enabled(l)),b),set:P=>{d=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let d=r(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function o(l,f){let d=0,p=0,b=-1,T=0;for(;d<l.length;)if(p<f.length&&(f[p]===l[d]||f[p]==="*"))f[p]==="*"?(b=p,T=d,p++):(d++,p++);else if(b!==-1)p=b+1,T++,d=T;else return!1;for(;p<f.length&&f[p]==="*";)p++;return p===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Zg.exports=QC});var Yg=x((ge,no)=>{ge.formatArgs=tA;ge.save=rA;ge.load=nA;ge.useColors=eA;ge.storage=sA();ge.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ge.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 eA(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function tA(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+no.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ge.log=console.debug||console.log||(()=>{});function rA(e){try{e?ge.storage.setItem("debug",e):ge.storage.removeItem("debug")}catch{}}function nA(){let e;try{e=ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function sA(){try{return localStorage}catch{}}no.exports=Wa()(ge);var{formatters:oA}=no.exports;oA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Kg=x((U9,Xg)=>{"use strict";Xg.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var ey=x((G9,Qg)=>{"use strict";var iA=require("os"),Jg=require("tty"),ke=Kg(),{env:J}=process,so;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?so=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(so=1);function aA(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function cA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function uA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=aA();n!==void 0&&(so=n);let s=r?so:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=iA.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function Ha(e,t={}){let r=uA(e,{streamIsTTY:e&&e.isTTY,...t});return cA(r)}Qg.exports={supportsColor:Ha,stdout:Ha({isTTY:Jg.isatty(1)}),stderr:Ha({isTTY:Jg.isatty(2)})}});var ry=x((Q,io)=>{var lA=require("tty"),oo=require("util");Q.init=yA;Q.log=mA;Q.formatArgs=dA;Q.save=hA;Q.load=gA;Q.useColors=fA;Q.destroy=oo.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=ey();e&&(e.stderr||e).level>=2&&(Q.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{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function fA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:lA.isatty(process.stderr.fd)}function dA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
2
+ var gx=Object.create;var Po=Object.defineProperty;var yx=Object.getOwnPropertyDescriptor;var bx=Object.getOwnPropertyNames;var wx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Sx=(e,t)=>{for(var r in t)Po(e,r,{get:t[r],enumerable:!0})},vx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bx(t))!xx.call(e,s)&&s!==r&&Po(e,s,{get:()=>t[s],enumerable:!(n=yx(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?gx(wx(e)):{},vx(t||!e||!e.__esModule?Po(r,"default",{value:e,enumerable:!0}):r,e));var Fu=x((gL,Mu)=>{Mu.exports=Pu;Pu.sync=TS;var Lu=require("fs");function ES(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function Nu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:ES(t,r)}function Pu(e,t,r){Lu.stat(e,function(n,s){r(n,n?!1:Nu(s,e,t))})}function TS(e,t){return Nu(Lu.statSync(e),e,t)}});var qu=x((yL,Gu)=>{Gu.exports=Bu;Bu.sync=OS;var ju=require("fs");function Bu(e,t,r){ju.stat(e,function(n,s){r(n,n?!1:Uu(s,t))})}function OS(e,t){return Uu(ju.statSync(e),t)}function Uu(e,t){return e.isFile()&&RS(e,t)}function RS(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var zu=x((wL,Vu)=>{var bL=require("fs"),jn;process.platform==="win32"||global.TESTING_WINDOWS?jn=Fu():jn=qu();Vu.exports=Ko;Ko.sync=kS;function Ko(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){Ko(e,t||{},function(o,i){o?s(o):n(i)})})}jn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function kS(e,t){try{return jn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ju=x((xL,Ku)=>{var Jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Wu=require("path"),CS=Jt?";":":",Hu=zu(),Zu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Yu=(e,t)=>{let r=t.colon||CS,n=e.match(/\//)||Jt&&e.match(/\\/)?[""]:[...Jt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Jt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Jt?s.split(r):[""];return Jt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Xu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Yu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Zu(e));let d=n[u],p=/^".*"$/.test(d)?d.slice(1,-1):d,b=Wu.join(p,e),T=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((d,p)=>{if(f===s.length)return d(a(l+1));let b=s[f];Hu(u+b,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+b);else return d(u+b);return d(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},AS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Yu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Wu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let d=l+n[f];try{if(Hu.sync(d,{pathExt:s}))if(t.all)o.push(d);else return d}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Zu(e)};Ku.exports=Xu;Xu.sync=AS});var el=x((SL,Jo)=>{"use strict";var Qu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Jo.exports=Qu;Jo.exports.default=Qu});var sl=x((vL,nl)=>{"use strict";var tl=require("path"),IS=Ju(),$S=el();function rl(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=IS.sync(e.command,{path:r[$S({env:r})],pathExt:t?tl.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=tl.resolve(s?e.options.cwd:"",i)),i}function DS(e){return rl(e)||rl(e,!0)}nl.exports=DS});var ol=x((_L,ei)=>{"use strict";var Qo=/([()\][%!^"`<>&|;, *?])/g;function LS(e){return e=e.replace(Qo,"^$1"),e}function NS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Qo,"^$1"),t&&(e=e.replace(Qo,"^$1")),e}ei.exports.command=LS;ei.exports.argument=NS});var al=x((EL,il)=>{"use strict";il.exports=/^#!(.*)/});var ul=x((TL,cl)=>{"use strict";var PS=al();cl.exports=(e="")=>{let t=e.match(PS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var fl=x((OL,ll)=>{"use strict";var ti=require("fs"),MS=ul();function FS(e){let r=Buffer.alloc(150),n;try{n=ti.openSync(e,"r"),ti.readSync(n,r,0,150,0),ti.closeSync(n)}catch{}return MS(r.toString())}ll.exports=FS});var hl=x((RL,ml)=>{"use strict";var jS=require("path"),dl=sl(),pl=ol(),BS=fl(),US=process.platform==="win32",GS=/\.(?:com|exe)$/i,qS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function VS(e){e.file=dl(e);let t=e.file&&BS(e.file);return t?(e.args.unshift(e.file),e.command=t,dl(e)):e.file}function zS(e){if(!US)return e;let t=VS(e),r=!GS.test(t);if(e.options.forceShell||r){let n=qS.test(t);e.command=jS.normalize(e.command),e.command=pl.command(e.command),e.args=e.args.map(o=>pl.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function WS(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:zS(n)}ml.exports=WS});var bl=x((kL,yl)=>{"use strict";var ri=process.platform==="win32";function ni(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 HS(e,t){if(!ri)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=gl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function gl(e,t){return ri&&e===1&&!t.file?ni(t.original,"spawn"):null}function ZS(e,t){return ri&&e===1&&!t.file?ni(t.original,"spawnSync"):null}yl.exports={hookChildProcess:HS,verifyENOENT:gl,verifyENOENTSync:ZS,notFoundError:ni}});var Sl=x((CL,Qt)=>{"use strict";var wl=require("child_process"),si=hl(),oi=bl();function xl(e,t,r){let n=si(e,t,r),s=wl.spawn(n.command,n.args,n.options);return oi.hookChildProcess(s,n),s}function YS(e,t,r){let n=si(e,t,r),s=wl.spawnSync(n.command,n.args,n.options);return s.error=s.error||oi.verifyENOENTSync(s.status,n),s}Qt.exports=xl;Qt.exports.spawn=xl;Qt.exports.sync=YS;Qt.exports._parse=si;Qt.exports._enoent=oi});var Xr=x((gG,qm)=>{"use strict";var G0="2.0.0",q0=Number.MAX_SAFE_INTEGER||9007199254740991,V0=16,z0=250,W0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];qm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:V0,MAX_SAFE_BUILD_LENGTH:z0,MAX_SAFE_INTEGER:q0,RELEASE_TYPES:W0,SEMVER_SPEC_VERSION:G0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Kr=x((yG,Vm)=>{"use strict";var H0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Vm.exports=H0});var pr=x((We,zm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Oa,MAX_SAFE_BUILD_LENGTH:Z0,MAX_LENGTH:Y0}=Xr(),X0=Kr();We=zm.exports={};var K0=We.re=[],J0=We.safeRe=[],S=We.src=[],Q0=We.safeSrc=[],v=We.t={},eO=0,Ra="[a-zA-Z0-9-]",tO=[["\\s",1],["\\d",Y0],[Ra,Z0]],rO=e=>{for(let[t,r]of tO)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=rO(t),s=eO++;X0(e,s,t),v[e]=s,S[s]=t,Q0[s]=n,K0[s]=new RegExp(t,r?"g":void 0),J0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ra}*`);A("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Ra}+`);A("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);A("FULL",`^${S[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);A("LOOSE",`^${S[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);A("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Oa}})(?:\\.(\\d{1,${Oa}}))?(?:\\.(\\d{1,${Oa}}))?`);A("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",S[v.COERCE],!0);A("COERCERTLFULL",S[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);We.tildeTrimReplace="$1~";A("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);We.caretTrimReplace="$1^";A("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);We.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var js=x((bG,Wm)=>{"use strict";var nO=Object.freeze({loose:!0}),sO=Object.freeze({}),oO=e=>e?typeof e!="object"?nO:e:sO;Wm.exports=oO});var ka=x((wG,Ym)=>{"use strict";var Hm=/^[0-9]+$/,Zm=(e,t)=>{let r=Hm.test(e),n=Hm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},iO=(e,t)=>Zm(t,e);Ym.exports={compareIdentifiers:Zm,rcompareIdentifiers:iO}});var te=x((xG,Km)=>{"use strict";var Bs=Kr(),{MAX_LENGTH:Xm,MAX_SAFE_INTEGER:Us}=Xr(),{safeRe:Gs,t:qs}=pr(),aO=js(),{compareIdentifiers:mr}=ka(),Ca=class e{constructor(t,r){if(r=aO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Xm)throw new TypeError(`version is longer than ${Xm} characters`);Bs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Gs[qs.LOOSE]:Gs[qs.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Us||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Us||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Us||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<Us)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Bs("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mr(this.major,t.major)||mr(this.minor,t.minor)||mr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Bs("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Bs("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Gs[qs.PRERELEASELOOSE]:Gs[qs.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),mr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Km.exports=Ca});var Rt=x((SG,Qm)=>{"use strict";var Jm=te(),cO=(e,t,r=!1)=>{if(e instanceof Jm)return e;try{return new Jm(e,t)}catch(n){if(!r)return null;throw n}};Qm.exports=cO});var th=x((vG,eh)=>{"use strict";var uO=Rt(),lO=(e,t)=>{let r=uO(e,t);return r?r.version:null};eh.exports=lO});var nh=x((_G,rh)=>{"use strict";var fO=Rt(),dO=(e,t)=>{let r=fO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};rh.exports=dO});var ih=x((EG,oh)=>{"use strict";var sh=te(),pO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new sh(e instanceof sh?e.version:e,r).inc(t,n,s).version}catch{return null}};oh.exports=pO});var uh=x((TG,ch)=>{"use strict";var ah=Rt(),mO=(e,t)=>{let r=ah(e,null,!0),n=ah(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};ch.exports=mO});var fh=x((OG,lh)=>{"use strict";var hO=te(),gO=(e,t)=>new hO(e,t).major;lh.exports=gO});var ph=x((RG,dh)=>{"use strict";var yO=te(),bO=(e,t)=>new yO(e,t).minor;dh.exports=bO});var hh=x((kG,mh)=>{"use strict";var wO=te(),xO=(e,t)=>new wO(e,t).patch;mh.exports=xO});var yh=x((CG,gh)=>{"use strict";var SO=Rt(),vO=(e,t)=>{let r=SO(e,t);return r&&r.prerelease.length?r.prerelease:null};gh.exports=vO});var _e=x((AG,wh)=>{"use strict";var bh=te(),_O=(e,t,r)=>new bh(e,r).compare(new bh(t,r));wh.exports=_O});var Sh=x((IG,xh)=>{"use strict";var EO=_e(),TO=(e,t,r)=>EO(t,e,r);xh.exports=TO});var _h=x(($G,vh)=>{"use strict";var OO=_e(),RO=(e,t)=>OO(e,t,!0);vh.exports=RO});var Vs=x((DG,Th)=>{"use strict";var Eh=te(),kO=(e,t,r)=>{let n=new Eh(e,r),s=new Eh(t,r);return n.compare(s)||n.compareBuild(s)};Th.exports=kO});var Rh=x((LG,Oh)=>{"use strict";var CO=Vs(),AO=(e,t)=>e.sort((r,n)=>CO(r,n,t));Oh.exports=AO});var Ch=x((NG,kh)=>{"use strict";var IO=Vs(),$O=(e,t)=>e.sort((r,n)=>IO(n,r,t));kh.exports=$O});var Jr=x((PG,Ah)=>{"use strict";var DO=_e(),LO=(e,t,r)=>DO(e,t,r)>0;Ah.exports=LO});var zs=x((MG,Ih)=>{"use strict";var NO=_e(),PO=(e,t,r)=>NO(e,t,r)<0;Ih.exports=PO});var Aa=x((FG,$h)=>{"use strict";var MO=_e(),FO=(e,t,r)=>MO(e,t,r)===0;$h.exports=FO});var Ia=x((jG,Dh)=>{"use strict";var jO=_e(),BO=(e,t,r)=>jO(e,t,r)!==0;Dh.exports=BO});var Ws=x((BG,Lh)=>{"use strict";var UO=_e(),GO=(e,t,r)=>UO(e,t,r)>=0;Lh.exports=GO});var Hs=x((UG,Nh)=>{"use strict";var qO=_e(),VO=(e,t,r)=>qO(e,t,r)<=0;Nh.exports=VO});var $a=x((GG,Ph)=>{"use strict";var zO=Aa(),WO=Ia(),HO=Jr(),ZO=Ws(),YO=zs(),XO=Hs(),KO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return zO(e,r,n);case"!=":return WO(e,r,n);case">":return HO(e,r,n);case">=":return ZO(e,r,n);case"<":return YO(e,r,n);case"<=":return XO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Ph.exports=KO});var Fh=x((qG,Mh)=>{"use strict";var JO=te(),QO=Rt(),{safeRe:Zs,t:Ys}=pr(),eR=(e,t)=>{if(e instanceof JO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Zs[Ys.COERCEFULL]:Zs[Ys.COERCE]);else{let c=t.includePrerelease?Zs[Ys.COERCERTLFULL]:Zs[Ys.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return QO(`${n}.${s}.${o}${i}${a}`,t)};Mh.exports=eR});var Bh=x((VG,jh)=>{"use strict";var Da=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};jh.exports=Da});var Ee=x((zG,Vh)=>{"use strict";var tR=/\s+/g,La=class e{constructor(t,r){if(r=nR(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Na)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(tR," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Gh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&lR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&cR)|(this.options.loose&&uR))+":"+t,s=Uh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,xR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],oR),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],iR),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],aR),G("caret trim",t);let a=t.split(" ").map(f=>fR(f,this.options)).join(" ").split(/\s+/).map(f=>wR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[oe.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Na(f,this.options));for(let f of u){if(Gh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Uh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>qh(n,r)&&t.set.some(s=>qh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new sR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(SR(this.set[r],t,this.options))return!0;return!1}};Vh.exports=La;var rR=Bh(),Uh=new rR,nR=js(),Na=Qr(),G=Kr(),sR=te(),{safeRe:ue,t:oe,comparatorTrimReplace:oR,tildeTrimReplace:iR,caretTrimReplace:aR}=pr(),{FLAG_INCLUDE_PRERELEASE:cR,FLAG_LOOSE:uR}=Xr(),Gh=e=>e.value==="<0.0.0-0",lR=e=>e.value==="",qh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},fR=(e,t)=>(G("comp",e,t),e=mR(e,t),G("caret",e),e=dR(e,t),G("tildes",e),e=gR(e,t),G("xrange",e),e=bR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",dR=(e,t)=>e.trim().split(/\s+/).map(r=>pR(r,t)).join(" "),pR=(e,t)=>{let r=t.loose?ue[oe.TILDELOOSE]:ue[oe.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ie(s)?c="":ie(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ie(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},mR=(e,t)=>e.trim().split(/\s+/).map(r=>hR(r,t)).join(" "),hR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[oe.CARETLOOSE]:ue[oe.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return ie(o)?u="":ie(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ie(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},gR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>yR(r,t)).join(" ")),yR=(e,t)=>{e=e.trim();let r=t.loose?ue[oe.XRANGELOOSE]:ue[oe.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ie(o),l=u||ie(i),f=l||ie(a),d=f;return s==="="&&d&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&d?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},bR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),wR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),xR=e=>(t,r,n,s,o,i,a,c,u,l,f,d)=>(ie(n)?r="":ie(s)?r=`>=${n}.0.0${e?"-0":""}`:ie(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ie(u)?c="":ie(l)?c=`<${+u+1}.0.0-0`:ie(f)?c=`<${u}.${+l+1}.0-0`:d?c=`<=${u}.${l}.${f}-${d}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),SR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==Na.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Qr=x((WG,Xh)=>{"use strict";var en=Symbol("SemVer ANY"),Fa=class e{static get ANY(){return en}constructor(t,r){if(r=zh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Ma("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===en?this.value="":this.value=this.operator+this.semver.version,Ma("comp",this)}parse(t){let r=this.options.loose?Wh[Hh.COMPARATORLOOSE]:Wh[Hh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zh(n[2],this.options.loose):this.semver=en}toString(){return this.value}test(t){if(Ma("Comparator.test",t,this.options.loose),this.semver===en||t===en)return!0;if(typeof t=="string")try{t=new Zh(t,this.options)}catch{return!1}return Pa(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Yh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Yh(this.value,r).test(t.semver):(r=zh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Pa(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Pa(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Xh.exports=Fa;var zh=js(),{safeRe:Wh,t:Hh}=pr(),Pa=$a(),Ma=Kr(),Zh=te(),Yh=Ee()});var tn=x((HG,Kh)=>{"use strict";var vR=Ee(),_R=(e,t,r)=>{try{t=new vR(t,r)}catch{return!1}return t.test(e)};Kh.exports=_R});var Qh=x((ZG,Jh)=>{"use strict";var ER=Ee(),TR=(e,t)=>new ER(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Jh.exports=TR});var tg=x((YG,eg)=>{"use strict";var OR=te(),RR=Ee(),kR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new RR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new OR(n,r))}),n};eg.exports=kR});var ng=x((XG,rg)=>{"use strict";var CR=te(),AR=Ee(),IR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new AR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new CR(n,r))}),n};rg.exports=IR});var ig=x((KG,og)=>{"use strict";var ja=te(),$R=Ee(),sg=Jr(),DR=(e,t)=>{e=new $R(e,t);let r=new ja("0.0.0");if(e.test(r)||(r=new ja("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new ja(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||sg(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||sg(r,o))&&(r=o)}return r&&e.test(r)?r:null};og.exports=DR});var cg=x((JG,ag)=>{"use strict";var LR=Ee(),NR=(e,t)=>{try{return new LR(e,t).range||"*"}catch{return null}};ag.exports=NR});var Xs=x((QG,dg)=>{"use strict";var PR=te(),fg=Qr(),{ANY:MR}=fg,FR=Ee(),jR=tn(),ug=Jr(),lg=zs(),BR=Hs(),UR=Ws(),GR=(e,t,r,n)=>{e=new PR(e,n),t=new FR(t,n);let s,o,i,a,c;switch(r){case">":s=ug,o=BR,i=lg,a=">",c=">=";break;case"<":s=lg,o=UR,i=ug,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===MR&&(p=new fg(">=0.0.0")),f=f||p,d=d||p,s(p.semver,f.semver,n)?f=p:i(p.semver,d.semver,n)&&(d=p)}),f.operator===a||f.operator===c||(!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&i(e,d.semver))return!1}return!0};dg.exports=GR});var mg=x((e9,pg)=>{"use strict";var qR=Xs(),VR=(e,t,r)=>qR(e,t,">",r);pg.exports=VR});var gg=x((t9,hg)=>{"use strict";var zR=Xs(),WR=(e,t,r)=>zR(e,t,"<",r);hg.exports=WR});var wg=x((r9,bg)=>{"use strict";var yg=Ee(),HR=(e,t,r)=>(e=new yg(e,r),t=new yg(t,r),e.intersects(t,r));bg.exports=HR});var Sg=x((n9,xg)=>{"use strict";var ZR=tn(),YR=_e();xg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>YR(l,f,r));for(let l of i)ZR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var Rg=x((s9,Og)=>{"use strict";var vg=Ee(),Ua=Qr(),{ANY:Ba}=Ua,rn=tn(),Ga=_e(),XR=(e,t,r={})=>{if(e===t)return!0;e=new vg(e,r),t=new vg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=JR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},KR=[new Ua(">=0.0.0-0")],_g=[new Ua(">=0.0.0")],JR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ba){if(t.length===1&&t[0].semver===Ba)return!0;r.includePrerelease?e=KR:e=_g}if(t.length===1&&t[0].semver===Ba){if(r.includePrerelease)return!0;t=_g}let n=new Set,s,o;for(let p of e)p.operator===">"||p.operator===">="?s=Eg(s,p,r):p.operator==="<"||p.operator==="<="?o=Tg(o,p,r):n.add(p.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Ga(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(s&&!rn(p,String(s),r)||o&&!rn(p,String(o),r))return null;for(let b of t)if(!rn(p,String(b),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of t){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=Eg(s,p,r),a===p&&a!==s)return!1}else if(s.operator===">="&&!rn(s.semver,String(p),r))return!1}if(o){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(c=Tg(o,p,r),c===p&&c!==o)return!1}else if(o.operator==="<="&&!rn(o.semver,String(p),r))return!1}if(!p.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||d||f)},Eg=(e,t,r)=>{if(!e)return t;let n=Ga(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Tg=(e,t,r)=>{if(!e)return t;let n=Ga(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Og.exports=XR});var Ig=x((o9,Ag)=>{"use strict";var qa=pr(),kg=Xr(),QR=te(),Cg=ka(),ek=Rt(),tk=th(),rk=nh(),nk=ih(),sk=uh(),ok=fh(),ik=ph(),ak=hh(),ck=yh(),uk=_e(),lk=Sh(),fk=_h(),dk=Vs(),pk=Rh(),mk=Ch(),hk=Jr(),gk=zs(),yk=Aa(),bk=Ia(),wk=Ws(),xk=Hs(),Sk=$a(),vk=Fh(),_k=Qr(),Ek=Ee(),Tk=tn(),Ok=Qh(),Rk=tg(),kk=ng(),Ck=ig(),Ak=cg(),Ik=Xs(),$k=mg(),Dk=gg(),Lk=wg(),Nk=Sg(),Pk=Rg();Ag.exports={parse:ek,valid:tk,clean:rk,inc:nk,diff:sk,major:ok,minor:ik,patch:ak,prerelease:ck,compare:uk,rcompare:lk,compareLoose:fk,compareBuild:dk,sort:pk,rsort:mk,gt:hk,lt:gk,eq:yk,neq:bk,gte:wk,lte:xk,cmp:Sk,coerce:vk,Comparator:_k,Range:Ek,satisfies:Tk,toComparators:Ok,maxSatisfying:Rk,minSatisfying:kk,minVersion:Ck,validRange:Ak,outside:Ik,gtr:$k,ltr:Dk,intersects:Lk,simplifyRange:Nk,subset:Pk,SemVer:QR,re:qa.re,src:qa.src,tokens:qa.t,SEMVER_SPEC_VERSION:kg.SEMVER_SPEC_VERSION,RELEASE_TYPES:kg.RELEASE_TYPES,compareIdentifiers:Cg.compareIdentifiers,rcompareIdentifiers:Cg.rcompareIdentifiers}});var Wg=x((F9,zg)=>{var _r=1e3,Er=_r*60,Tr=Er*60,Vt=Tr*24,HC=Vt*7,ZC=Vt*365.25;zg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return YC(e);if(r==="number"&&isFinite(e))return t.long?KC(e):XC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function YC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\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(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZC;case"weeks":case"week":case"w":return r*HC;case"days":case"day":case"d":return r*Vt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Er;case"seconds":case"second":case"secs":case"sec":case"s":return r*_r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function XC(e){var t=Math.abs(e);return t>=Vt?Math.round(e/Vt)+"d":t>=Tr?Math.round(e/Tr)+"h":t>=Er?Math.round(e/Er)+"m":t>=_r?Math.round(e/_r)+"s":e+"ms"}function KC(e){var t=Math.abs(e);return t>=Vt?no(e,t,Vt,"day"):t>=Tr?no(e,t,Tr,"hour"):t>=Er?no(e,t,Er,"minute"):t>=_r?no(e,t,_r,"second"):e+" ms"}function no(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Ha=x((j9,Hg)=>{function JC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Wg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let d=0;d<l.length;d++)f=(f<<5)-f+l.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,d=null,p,b;function T(...P){if(!T.enabled)return;let M=T,j=Number(new Date),Y=j-(f||j);M.diff=Y,M.prev=f,M.curr=j,f=j,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=P[X];ce=Ie.call(M,xe),P.splice(X,1),X--}return ce}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,b=r.enabled(l)),b),set:P=>{d=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let d=r(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function o(l,f){let d=0,p=0,b=-1,T=0;for(;d<l.length;)if(p<f.length&&(f[p]===l[d]||f[p]==="*"))f[p]==="*"?(b=p,T=d,p++):(d++,p++);else if(b!==-1)p=b+1,T++,d=T;else return!1;for(;p<f.length&&f[p]==="*";)p++;return p===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Hg.exports=JC});var Zg=x((ge,so)=>{ge.formatArgs=eA;ge.save=tA;ge.load=rA;ge.useColors=QC;ge.storage=nA();ge.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ge.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 QC(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function eA(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+so.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ge.log=console.debug||console.log||(()=>{});function tA(e){try{e?ge.storage.setItem("debug",e):ge.storage.removeItem("debug")}catch{}}function rA(){let e;try{e=ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function nA(){try{return localStorage}catch{}}so.exports=Ha()(ge);var{formatters:sA}=so.exports;sA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Xg=x((B9,Yg)=>{"use strict";Yg.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var Qg=x((U9,Jg)=>{"use strict";var oA=require("os"),Kg=require("tty"),ke=Xg(),{env:J}=process,oo;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?oo=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(oo=1);function iA(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function aA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=iA();n!==void 0&&(oo=n);let s=r?oo:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=oA.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function Za(e,t={}){let r=cA(e,{streamIsTTY:e&&e.isTTY,...t});return aA(r)}Jg.exports={supportsColor:Za,stdout:Za({isTTY:Kg.isatty(1)}),stderr:Za({isTTY:Kg.isatty(2)})}});var ty=x((Q,ao)=>{var uA=require("tty"),io=require("util");Q.init=gA;Q.log=pA;Q.formatArgs=fA;Q.save=mA;Q.load=hA;Q.useColors=lA;Q.destroy=io.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=Qg();e&&(e.stderr||e).level>=2&&(Q.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{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function lA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:uA.isatty(process.stderr.fd)}function fA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
3
3
  `).join(`
4
- `+o),e.push(s+"m+"+io.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=pA()+t+" "+e[0]}function pA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function mA(...e){return process.stderr.write(oo.formatWithOptions(Q.inspectOpts,...e)+`
5
- `)}function hA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function gA(){return process.env.DEBUG}function yA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}io.exports=Wa()(Q);var{formatters:ty}=io.exports;ty.o=function(e){return this.inspectOpts.colors=this.useColors,oo.inspect(e,this.inspectOpts).split(`
6
- `).map(t=>t.trim()).join(" ")};ty.O=function(e){return this.inspectOpts.colors=this.useColors,oo.inspect(e,this.inspectOpts)}});var Ya=x((q9,Za)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Za.exports=Yg():Za.exports=ry()});var ny=x(ye=>{"use strict";var bA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var wA=require("fs"),xA=bA(Ya()),Or=xA.default("@kwsites/file-exists");function SA(e,t,r){Or("checking %s",e);try{let n=wA.statSync(e);return n.isFile()&&t?(Or("[OK] path represents a file"),!0):n.isDirectory()&&r?(Or("[OK] path represents a directory"),!0):(Or("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Or("[FAIL] path is not accessible: %o",n),!1;throw Or("[FATAL] %o",n),n}}function vA(e,t=ye.READABLE){return SA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=vA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var sy=x(ao=>{"use strict";function _A(e){for(var t in e)ao.hasOwnProperty(t)||(ao[t]=e[t])}Object.defineProperty(ao,"__esModule",{value:!0});_A(ny())});var Ka=x(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.createDeferred=zt.deferred=void 0;function Xa(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}zt.deferred=Xa;zt.createDeferred=Xa;zt.default=Xa});var Vw=x((T3,Uc)=>{var Ao=process||{},Gw=Ao.argv||[],Co=Ao.env||{},L$=!(Co.NO_COLOR||Gw.includes("--no-color"))&&(!!Co.FORCE_COLOR||Gw.includes("--color")||Ao.platform==="win32"||(Ao.stdout||{}).isTTY&&Co.TERM!=="dumb"||!!Co.CI),N$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+P$(s,t,r,o)+t:e+s+t},P$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},qw=(e=L$)=>{let t=e?N$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Uc.exports=qw();Uc.exports.createColors=qw});var Hw=x((R3,M$)=>{M$.exports={name:"@seed-design/codemod",version:"0.0.25",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.20",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^22.14.1","csv-parse":"^5.6.0",dotenv:"^16.5.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.24","@karrotmarket/react-multicolor-icon":"^0.0.16"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Hc=require("events");function Po(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ex(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function Tx(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let d=t.alias!==void 0,p=t.unknown!==void 0,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Po(t.string),t.boolean=Po(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Po(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=p?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),p&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],p&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);Ex(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Zc=e=>e.replace(/[<[].+/,"").trim(),Ox=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},Rx=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},zc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Wc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,kx=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),Cx=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},Ax=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},Ix=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Yc=e=>e.split(".").map((t,r)=>r===0?kx(t):t).join("."),Ir=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},Mo=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Zc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Yc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},$x=process.argv,Dx=`${process.platform}-${process.arch} node-${process.version}`,_n=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Zc(t),this.args=Ox(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new Mo(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof En}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=zc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Wc(l.rawName,u.length)} ${l.description}`).join(`
4
+ `+o),e.push(s+"m+"+ao.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=dA()+t+" "+e[0]}function dA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pA(...e){return process.stderr.write(io.formatWithOptions(Q.inspectOpts,...e)+`
5
+ `)}function mA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function hA(){return process.env.DEBUG}function gA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}ao.exports=Ha()(Q);var{formatters:ey}=ao.exports;ey.o=function(e){return this.inspectOpts.colors=this.useColors,io.inspect(e,this.inspectOpts).split(`
6
+ `).map(t=>t.trim()).join(" ")};ey.O=function(e){return this.inspectOpts.colors=this.useColors,io.inspect(e,this.inspectOpts)}});var Xa=x((G9,Ya)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ya.exports=Zg():Ya.exports=ty()});var ry=x(ye=>{"use strict";var yA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var bA=require("fs"),wA=yA(Xa()),Or=wA.default("@kwsites/file-exists");function xA(e,t,r){Or("checking %s",e);try{let n=bA.statSync(e);return n.isFile()&&t?(Or("[OK] path represents a file"),!0):n.isDirectory()&&r?(Or("[OK] path represents a directory"),!0):(Or("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Or("[FAIL] path is not accessible: %o",n),!1;throw Or("[FATAL] %o",n),n}}function SA(e,t=ye.READABLE){return xA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=SA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var ny=x(co=>{"use strict";function vA(e){for(var t in e)co.hasOwnProperty(t)||(co[t]=e[t])}Object.defineProperty(co,"__esModule",{value:!0});vA(ry())});var Ja=x(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.createDeferred=zt.deferred=void 0;function Ka(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}zt.deferred=Ka;zt.createDeferred=Ka;zt.default=Ka});var qw=x((E3,Gc)=>{var Io=process||{},Uw=Io.argv||[],Ao=Io.env||{},D$=!(Ao.NO_COLOR||Uw.includes("--no-color"))&&(!!Ao.FORCE_COLOR||Uw.includes("--color")||Io.platform==="win32"||(Io.stdout||{}).isTTY&&Ao.TERM!=="dumb"||!!Ao.CI),L$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+N$(s,t,r,o)+t:e+s+t},N$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},Gw=(e=D$)=>{let t=e?L$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Gc.exports=Gw();Gc.exports.createColors=Gw});var Ww=x((O3,P$)=>{P$.exports={name:"@seed-design/codemod",version:"0.0.26",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.20",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^22.14.1","csv-parse":"^5.6.0",dotenv:"^16.5.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.26","@karrotmarket/react-multicolor-icon":"^0.0.16"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Zc=require("events");function Mo(e){return e==null?[]:Array.isArray(e)?e:[e]}function _x(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function Ex(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let d=t.alias!==void 0,p=t.unknown!==void 0,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Mo(t.string),t.boolean=Mo(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Mo(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=p?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),p&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],p&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);_x(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Yc=e=>e.replace(/[<[].+/,"").trim(),Tx=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},Ox=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},Wc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Hc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,Rx=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),kx=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},Cx=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},Ax=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Xc=e=>e.split(".").map((t,r)=>r===0?Rx(t):t).join("."),Ir=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},Fo=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Yc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Xc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},Ix=process.argv,$x=`${process.platform}-${process.arch} node-${process.version}`,_n=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Yc(t),this.args=Tx(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new Fo(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof En}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=Wc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Hc(l.rawName,u.length)} ${l.description}`).join(`
7
7
  `)}),i.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${t}${l.name===""?"":` ${l.name}`} --help`).join(`
8
- `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=zc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Wc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
8
+ `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=Wc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Hc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
9
9
  `)})}this.examples.length>0&&i.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(t):u).join(`
10
10
  `)}),o&&(i=o(i)||i),console.log(i.map(u=>u.title?`${u.title}:
11
11
  ${u.body}`:u.body).join(`
12
12
 
13
- `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${Dx}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Ir(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Ir(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Ir(`option \`${s.rawName}\` value is missing`)}}}},En=class extends _n{constructor(t){super("@@global@@","",{},t)}},vn=Object.assign,Fo=class extends Hc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new En(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new _n(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=$x,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Ix(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=vn(vn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=Rx(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=Tx(t,s);a=Object.keys(a).reduce((d,p)=>vn(vn({},d),{[Yc(p)]:a[p]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let d of n){if(!l&&d.config.default!==void 0)for(let p of d.names)u[p]=d.config.default;Array.isArray(d.config.type)&&f[d.name]===void 0&&(f[d.name]=Object.create(null),f[d.name].shouldTransform=!0,f[d.name].transformFunction=d.config.type[0])}for(let d of Object.keys(a))if(d!=="_"){let p=d.split(".");Cx(u,p,a[d]),Ax(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Xc=(e="")=>new Fo(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Kc=require("node:url"),Yt=(e,t)=>{let r=Bo(Lx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Lx=e=>jo(e)?e.toString():e,jo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Bo=e=>e instanceof URL?(0,Kc.fileURLToPath)(e):e;var Tn=(e,t=[],r={})=>{let n=Yt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var iu=require("node:child_process");var Jc=require("node:string_decoder"),{toString:Qc}=Object.prototype,eu=e=>Qc.call(e)==="[object ArrayBuffer]",K=e=>Qc.call(e)==="[object Uint8Array]",Je=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Nx=new TextEncoder,tu=e=>Nx.encode(e),Px=new TextDecoder,On=e=>Px.decode(e),ru=(e,t)=>Mx(e,t).join(""),Mx=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Jc.StringDecoder(t),n=e.map(o=>typeof o=="string"?tu(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},$r=e=>e.length===1&&K(e[0])?e[0]:Uo(Fx(e)),Fx=e=>e.map(t=>typeof t=="string"?tu(t):t),Uo=e=>{let t=new Uint8Array(jx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},jx=e=>{let t=0;for(let r of e)t+=r.length;return t};var au=e=>Array.isArray(e)&&Array.isArray(e.raw),cu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=Bx({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},Bx=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=Ux(s,e.raw[n]),c=su(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>ou(f)):[ou(u)];return su(c,l,a)},Ux=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=nu.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(nu.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
- `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=Gx[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},nu=new Set([" "," ","\r",`
15
- `]),Gx={x:3,u:5},su=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],ou=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return qx(e);throw e instanceof iu.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},qx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return On(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var vp=require("node:child_process");var lu=require("node:util");var Rn=q(require("node:process"),1),De=e=>kn.includes(e),kn=[Rn.default.stdin,Rn.default.stdout,Rn.default.stderr],Se=["stdin","stdout","stderr"],Cn=e=>Se[e]??`stdio[${e}]`;var fu=e=>{let t={...e};for(let r of Vo)t[r]=Go(e,r);return t},Go=(e,t)=>{let r=Array.from({length:Vx(e)+1}),n=zx(e[t],r,t);return Xx(n,t)},Vx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,zx=(e,t,r)=>W(e)?Wx(e,t,r):t.fill(e),Wx=(e,t,r)=>{for(let n of Object.keys(e).sort(Hx))for(let s of Zx(n,r,t))t[s]=e[n];return t},Hx=(e,t)=>uu(e)<uu(t)?1:-1,uu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,Zx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=qo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
13
+ `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${$x}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Ir(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Ir(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Ir(`option \`${s.rawName}\` value is missing`)}}}},En=class extends _n{constructor(t){super("@@global@@","",{},t)}},vn=Object.assign,jo=class extends Zc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new En(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new _n(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=Ix,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Ax(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=vn(vn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=Ox(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=Ex(t,s);a=Object.keys(a).reduce((d,p)=>vn(vn({},d),{[Xc(p)]:a[p]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let d of n){if(!l&&d.config.default!==void 0)for(let p of d.names)u[p]=d.config.default;Array.isArray(d.config.type)&&f[d.name]===void 0&&(f[d.name]=Object.create(null),f[d.name].shouldTransform=!0,f[d.name].transformFunction=d.config.type[0])}for(let d of Object.keys(a))if(d!=="_"){let p=d.split(".");kx(u,p,a[d]),Cx(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Kc=(e="")=>new jo(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Jc=require("node:url"),Yt=(e,t)=>{let r=Uo(Dx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Dx=e=>Bo(e)?e.toString():e,Bo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Uo=e=>e instanceof URL?(0,Jc.fileURLToPath)(e):e;var Tn=(e,t=[],r={})=>{let n=Yt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var au=require("node:child_process");var Qc=require("node:string_decoder"),{toString:eu}=Object.prototype,tu=e=>eu.call(e)==="[object ArrayBuffer]",K=e=>eu.call(e)==="[object Uint8Array]",Je=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Lx=new TextEncoder,ru=e=>Lx.encode(e),Nx=new TextDecoder,On=e=>Nx.decode(e),nu=(e,t)=>Px(e,t).join(""),Px=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Qc.StringDecoder(t),n=e.map(o=>typeof o=="string"?ru(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},$r=e=>e.length===1&&K(e[0])?e[0]:Go(Mx(e)),Mx=e=>e.map(t=>typeof t=="string"?ru(t):t),Go=e=>{let t=new Uint8Array(Fx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},Fx=e=>{let t=0;for(let r of e)t+=r.length;return t};var cu=e=>Array.isArray(e)&&Array.isArray(e.raw),uu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=jx({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},jx=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=Bx(s,e.raw[n]),c=ou(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>iu(f)):[iu(u)];return ou(c,l,a)},Bx=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=su.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(su.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
+ `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=Ux[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},su=new Set([" "," ","\r",`
15
+ `]),Ux={x:3,u:5},ou=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],iu=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return Gx(e);throw e instanceof au.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},Gx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return On(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var _p=require("node:child_process");var fu=require("node:util");var Rn=q(require("node:process"),1),De=e=>kn.includes(e),kn=[Rn.default.stdin,Rn.default.stdout,Rn.default.stderr],Se=["stdin","stdout","stderr"],Cn=e=>Se[e]??`stdio[${e}]`;var du=e=>{let t={...e};for(let r of zo)t[r]=qo(e,r);return t},qo=(e,t)=>{let r=Array.from({length:qx(e)+1}),n=Vx(e[t],r,t);return Yx(n,t)},qx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,Vx=(e,t,r)=>W(e)?zx(e,t,r):t.fill(e),zx=(e,t,r)=>{for(let n of Object.keys(e).sort(Wx))for(let s of Hx(n,r,t))t[s]=e[n];return t},Wx=(e,t)=>lu(e)<lu(t)?1:-1,lu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,Hx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Vo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
16
16
  It must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.
17
- Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},qo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Yx.exec(e);if(t!==null)return Number(t[1])},Yx=/^fd(\d+)$/,Xx=(e,t)=>e.map(r=>r===void 0?Jx[t]:r),Kx=(0,lu.debuglog)("execa").enabled?"full":"none",Jx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Kx,stripFinalNewline:!0},Vo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Qe=(e,t)=>t==="ipc"?e.at(-1):e[t];var Xt=({verbose:e},t)=>zo(e,t)!=="none",Kt=({verbose:e},t)=>!["none","short"].includes(zo(e,t)),du=({verbose:e},t)=>{let r=zo(e,t);return An(r)?r:void 0},zo=(e,t)=>t===void 0?Qx(e):Qe(e,t),Qx=e=>e.find(t=>An(t))??In.findLast(t=>e.includes(t)),An=e=>typeof e=="function",In=["none","short","full"];var Au=require("node:util");var pu=require("node:process"),mu=require("node:util"),hu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>oS(gu(o))).join(" ");return{command:n,escapedCommand:s}},Dr=e=>(0,mu.stripVTControlCharacters)(e).split(`
18
- `).map(t=>gu(t)).join(`
19
- `),gu=e=>e.replaceAll(rS,t=>eS(t)),eS=e=>{let t=nS[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=sS?`\\u${n.padStart(4,"0")}`:`\\U${n}`},tS=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},rS=tS(),nS={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},sS=65535,oS=e=>iS.test(e)?e:pu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,iS=/^[\w./-]+$/;var Wo=q(require("node:process"),1);function Ho(){let{env:e}=Wo.default,{TERM:t,TERM_PROGRAM:r}=e;return Wo.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var yu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},bu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},aS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},cS={...yu,...bu},uS={...yu,...aS},lS=Ho(),fS=lS?cS:uS,$n=fS,lD=Object.entries(bu);var vu=q(require("node:tty"),1),wu,xu,Dn,Su,dS=((Su=(Dn=(xu=(wu=vu.default)==null?void 0:wu.WriteStream)==null?void 0:xu.prototype)==null?void 0:Dn.hasColors)==null?void 0:Su.call(Dn))??!1,D=(e,t)=>{if(!dS)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},dD=D(0,0),_u=D(1,22),pD=D(2,22),mD=D(3,23),hD=D(4,24),gD=D(53,55),yD=D(7,27),bD=D(8,28),wD=D(9,29),xD=D(30,39),SD=D(31,39),vD=D(32,39),_D=D(33,39),ED=D(34,39),TD=D(35,39),OD=D(36,39),RD=D(37,39),Ln=D(90,39),kD=D(40,49),CD=D(41,49),AD=D(42,49),ID=D(43,49),$D=D(44,49),DD=D(45,49),LD=D(46,49),ND=D(47,49),PD=D(100,49),Eu=D(91,39),MD=D(92,39),Tu=D(93,39),FD=D(94,39),jD=D(95,39),BD=D(96,39),UD=D(97,39),GD=D(101,49),qD=D(102,49),VD=D(103,49),zD=D(104,49),WD=D(105,49),HD=D(106,49),ZD=D(107,49);var ku=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=pS(r),c=mS[e]({failed:o,reject:i,piped:n}),u=hS[e]({reject:i});return`${Ln(`[${a}]`)} ${Ln(`[${s}]`)} ${u(c)} ${u(t)}`},pS=e=>`${Nn(e.getHours(),2)}:${Nn(e.getMinutes(),2)}:${Nn(e.getSeconds(),2)}.${Nn(e.getMilliseconds(),3)}`,Nn=(e,t)=>String(e).padStart(t,"0"),Ou=({failed:e,reject:t})=>e?t?$n.cross:$n.warning:$n.tick,mS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ou,duration:Ou},Ru=e=>e,hS={command:()=>_u,output:()=>Ru,ipc:()=>Ru,error:({reject:e})=>e?Eu:Tu,duration:()=>Ln};var Cu=(e,t,r)=>{let n=du(t,r);return e.map(({verboseLine:s,verboseObject:o})=>gS(s,o,n)).filter(s=>s!==void 0).map(s=>yS(s)).join("")},gS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},yS=e=>e.endsWith(`
17
+ Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Vo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Zx.exec(e);if(t!==null)return Number(t[1])},Zx=/^fd(\d+)$/,Yx=(e,t)=>e.map(r=>r===void 0?Kx[t]:r),Xx=(0,fu.debuglog)("execa").enabled?"full":"none",Kx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Xx,stripFinalNewline:!0},zo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Qe=(e,t)=>t==="ipc"?e.at(-1):e[t];var Xt=({verbose:e},t)=>Wo(e,t)!=="none",Kt=({verbose:e},t)=>!["none","short"].includes(Wo(e,t)),pu=({verbose:e},t)=>{let r=Wo(e,t);return An(r)?r:void 0},Wo=(e,t)=>t===void 0?Jx(e):Qe(e,t),Jx=e=>e.find(t=>An(t))??In.findLast(t=>e.includes(t)),An=e=>typeof e=="function",In=["none","short","full"];var Iu=require("node:util");var mu=require("node:process"),hu=require("node:util"),gu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>sS(yu(o))).join(" ");return{command:n,escapedCommand:s}},Dr=e=>(0,hu.stripVTControlCharacters)(e).split(`
18
+ `).map(t=>yu(t)).join(`
19
+ `),yu=e=>e.replaceAll(tS,t=>Qx(t)),Qx=e=>{let t=rS[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=nS?`\\u${n.padStart(4,"0")}`:`\\U${n}`},eS=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},tS=eS(),rS={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},nS=65535,sS=e=>oS.test(e)?e:mu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,oS=/^[\w./-]+$/;var Ho=q(require("node:process"),1);function Zo(){let{env:e}=Ho.default,{TERM:t,TERM_PROGRAM:r}=e;return Ho.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var bu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},wu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},iS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},aS={...bu,...wu},cS={...bu,...iS},uS=Zo(),lS=uS?aS:cS,$n=lS,uD=Object.entries(wu);var _u=q(require("node:tty"),1),xu,Su,Dn,vu,fS=((vu=(Dn=(Su=(xu=_u.default)==null?void 0:xu.WriteStream)==null?void 0:Su.prototype)==null?void 0:Dn.hasColors)==null?void 0:vu.call(Dn))??!1,D=(e,t)=>{if(!fS)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},fD=D(0,0),Eu=D(1,22),dD=D(2,22),pD=D(3,23),mD=D(4,24),hD=D(53,55),gD=D(7,27),yD=D(8,28),bD=D(9,29),wD=D(30,39),xD=D(31,39),SD=D(32,39),vD=D(33,39),_D=D(34,39),ED=D(35,39),TD=D(36,39),OD=D(37,39),Ln=D(90,39),RD=D(40,49),kD=D(41,49),CD=D(42,49),AD=D(43,49),ID=D(44,49),$D=D(45,49),DD=D(46,49),LD=D(47,49),ND=D(100,49),Tu=D(91,39),PD=D(92,39),Ou=D(93,39),MD=D(94,39),FD=D(95,39),jD=D(96,39),BD=D(97,39),UD=D(101,49),GD=D(102,49),qD=D(103,49),VD=D(104,49),zD=D(105,49),WD=D(106,49),HD=D(107,49);var Cu=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=dS(r),c=pS[e]({failed:o,reject:i,piped:n}),u=mS[e]({reject:i});return`${Ln(`[${a}]`)} ${Ln(`[${s}]`)} ${u(c)} ${u(t)}`},dS=e=>`${Nn(e.getHours(),2)}:${Nn(e.getMinutes(),2)}:${Nn(e.getSeconds(),2)}.${Nn(e.getMilliseconds(),3)}`,Nn=(e,t)=>String(e).padStart(t,"0"),Ru=({failed:e,reject:t})=>e?t?$n.cross:$n.warning:$n.tick,pS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ru,duration:Ru},ku=e=>e,mS={command:()=>Eu,output:()=>ku,ipc:()=>ku,error:({reject:e})=>e?Tu:Ou,duration:()=>Ln};var Au=(e,t,r)=>{let n=pu(t,r);return e.map(({verboseLine:s,verboseObject:o})=>hS(s,o,n)).filter(s=>s!==void 0).map(s=>gS(s)).join("")},hS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},gS=e=>e.endsWith(`
20
20
  `)?e:`${e}
21
- `;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=bS({type:e,result:s,verboseInfo:n}),i=wS(t,o),a=Cu(i,n,r);a!==""&&console.warn(a.slice(0,-1))},bS=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),wS=(e,t)=>e.split(`
22
- `).map(r=>xS({...t,message:r})),xS=e=>({verboseLine:ku(e),verboseObject:e}),Pn=e=>{let t=typeof e=="string"?e:(0,Au.inspect)(e);return Dr(t).replaceAll(" "," ".repeat(SS))},SS=2;var Iu=(e,t)=>{Xt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var $u=(e,t,r)=>{ES(e);let n=vS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},vS=e=>Xt({verbose:e})?_S++:void 0,_S=0n,ES=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!In.includes(t)&&!An(t)){let r=In.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var Zo=require("node:process"),Mn=()=>Zo.hrtime.bigint(),Yo=e=>Number(Zo.hrtime.bigint()-e)/1e6;var Fn=(e,t,r)=>{let n=Mn(),{command:s,escapedCommand:o}=hu(e,t),i=Go(r,"verbose"),a=$u(i,o,{...r});return Iu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Hf=q(require("node:path"),1),wi=q(require("node:process"),1),Zf=q(xl(),1);var Lr=q(require("node:process"),1),ct=q(require("node:path"),1);function Bn(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var Sl=require("node:util"),ii=require("node:child_process"),oi=q(require("node:path"),1),vl=require("node:url"),$L=(0,Sl.promisify)(ii.execFile);function Un(e){return e instanceof URL?(0,vl.fileURLToPath)(e):e}function _l(e){return{*[Symbol.iterator](){let t=oi.default.resolve(Un(e)),r;for(;r!==t;)yield t,r=t,t=oi.default.resolve(t,"..")}}}var DL=10*1024*1024;var KS=({cwd:e=Lr.default.cwd(),path:t=Lr.default.env[Bn()],preferLocal:r=!0,execPath:n=Lr.default.execPath,addExecPath:s=!0}={})=>{let o=ct.default.resolve(Un(e)),i=[],a=t.split(ct.default.delimiter);return r&&JS(i,a,o),s&&QS(i,a,n,o),t===""||t===ct.default.delimiter?`${i.join(ct.default.delimiter)}${t}`:[...i,t].join(ct.default.delimiter)},JS=(e,t,r)=>{for(let n of _l(r)){let s=ct.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},QS=(e,t,r,n)=>{let s=ct.default.resolve(n,Un(r),"..");t.includes(s)||e.push(s)},El=({env:e=Lr.default.env,...t}={})=>{e={...e};let r=Bn({env:e});return t.path=e[r],e[r]=KS(t),e};var Bl=require("node:timers/promises");var Tl=(e,t,r)=>{let n=r?Pr:Nr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Ol=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,kl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Rl=e=>Gn(e)&&kl in e,kl=Symbol("isExecaError"),Gn=e=>Object.prototype.toString.call(e)==="[object Error]",Nr=class extends Error{};Ol(Nr,Nr.name);var Pr=class extends Error{};Ol(Pr,Pr.name);var er=require("node:os");var Ll=require("node:os");var Cl=()=>{let e=Il-Al+1;return Array.from({length:e},ev)},ev=(e,t)=>({name:`SIGRT${t+1}`,number:Al+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Al=34,Il=64;var Dl=require("node:os");var $l=[{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"}];var ai=()=>{let e=Cl();return[...$l,...e].map(tv)},tv=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Dl.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var rv=()=>{let e=ai();return Object.fromEntries(e.map(nv))},nv=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Nl=rv(),sv=()=>{let e=ai(),t=65,r=Array.from({length:t},(n,s)=>ov(s,e));return Object.assign({},...r)},ov=(e,t)=>{let r=iv(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},iv=(e,t)=>{let r=t.find(({name:n})=>Ll.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},WL=sv();var Ml=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return jl(e,t)},Fl=e=>e===0?e:jl(e,"`subprocess.kill()`'s argument"),jl=(e,t)=>{if(Number.isInteger(e))return av(e,t);if(typeof e=="string")return uv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
- ${ci()}`)},av=(e,t)=>{if(Pl.has(e))return Pl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
- ${ci()}`)},cv=()=>new Map(Object.entries(er.constants.signals).reverse().map(([e,t])=>[t,e])),Pl=cv(),uv=(e,t)=>{if(e in er.constants.signals)return e;throw e.toUpperCase()in er.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
- ${ci()}`)},ci=()=>`Available signal names: ${lv()}.
26
- Available signal numbers: ${fv()}.`,lv=()=>Object.keys(er.constants.signals).sort().map(e=>`'${e}'`).join(", "),fv=()=>[...new Set(Object.values(er.constants.signals).sort((e,t)=>e-t))].join(", "),qn=e=>Nl[e].description;var Ul=e=>{if(e===!1)return e;if(e===!0)return dv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},dv=1e3*5,Gl=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=pv(i,a,r);mv(u,n);let l=e(c);return hv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},pv=(e,t,r)=>{let[n=r,s]=Gn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Gn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:Fl(n),error:s}},mv=(e,t)=>{e!==void 0&&t.reject(e)},hv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&ui({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ui=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Bl.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var ql=require("node:events"),Vn=async(e,t)=>{e.aborted||await(0,ql.once)(e,"abort",{signal:t})};var Vl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},zl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[gv(e,t,n,s)],gv=async(e,t,r,{signal:n})=>{throw await Vn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Tf=require("node:timers/promises");var _f=require("node:util");var tr=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{yv(e,t,r),li(e,t,n)},yv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},li=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ut(t)} has already exited or disconnected.`)},Wl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ut(e)} exited or disconnected.`)},Hl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is sending a message too, instead of listening to incoming messages.
21
+ `;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=yS({type:e,result:s,verboseInfo:n}),i=bS(t,o),a=Au(i,n,r);a!==""&&console.warn(a.slice(0,-1))},yS=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),bS=(e,t)=>e.split(`
22
+ `).map(r=>wS({...t,message:r})),wS=e=>({verboseLine:Cu(e),verboseObject:e}),Pn=e=>{let t=typeof e=="string"?e:(0,Iu.inspect)(e);return Dr(t).replaceAll(" "," ".repeat(xS))},xS=2;var $u=(e,t)=>{Xt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var Du=(e,t,r)=>{_S(e);let n=SS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},SS=e=>Xt({verbose:e})?vS++:void 0,vS=0n,_S=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!In.includes(t)&&!An(t)){let r=In.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var Yo=require("node:process"),Mn=()=>Yo.hrtime.bigint(),Xo=e=>Number(Yo.hrtime.bigint()-e)/1e6;var Fn=(e,t,r)=>{let n=Mn(),{command:s,escapedCommand:o}=gu(e,t),i=qo(r,"verbose"),a=Du(i,o,{...r});return $u(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Zf=q(require("node:path"),1),xi=q(require("node:process"),1),Yf=q(Sl(),1);var Lr=q(require("node:process"),1),ct=q(require("node:path"),1);function Bn(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var vl=require("node:util"),ai=require("node:child_process"),ii=q(require("node:path"),1),_l=require("node:url"),IL=(0,vl.promisify)(ai.execFile);function Un(e){return e instanceof URL?(0,_l.fileURLToPath)(e):e}function El(e){return{*[Symbol.iterator](){let t=ii.default.resolve(Un(e)),r;for(;r!==t;)yield t,r=t,t=ii.default.resolve(t,"..")}}}var $L=10*1024*1024;var XS=({cwd:e=Lr.default.cwd(),path:t=Lr.default.env[Bn()],preferLocal:r=!0,execPath:n=Lr.default.execPath,addExecPath:s=!0}={})=>{let o=ct.default.resolve(Un(e)),i=[],a=t.split(ct.default.delimiter);return r&&KS(i,a,o),s&&JS(i,a,n,o),t===""||t===ct.default.delimiter?`${i.join(ct.default.delimiter)}${t}`:[...i,t].join(ct.default.delimiter)},KS=(e,t,r)=>{for(let n of El(r)){let s=ct.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},JS=(e,t,r,n)=>{let s=ct.default.resolve(n,Un(r),"..");t.includes(s)||e.push(s)},Tl=({env:e=Lr.default.env,...t}={})=>{e={...e};let r=Bn({env:e});return t.path=e[r],e[r]=XS(t),e};var Ul=require("node:timers/promises");var Ol=(e,t,r)=>{let n=r?Pr:Nr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Rl=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Cl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},kl=e=>Gn(e)&&Cl in e,Cl=Symbol("isExecaError"),Gn=e=>Object.prototype.toString.call(e)==="[object Error]",Nr=class extends Error{};Rl(Nr,Nr.name);var Pr=class extends Error{};Rl(Pr,Pr.name);var er=require("node:os");var Nl=require("node:os");var Al=()=>{let e=$l-Il+1;return Array.from({length:e},QS)},QS=(e,t)=>({name:`SIGRT${t+1}`,number:Il+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Il=34,$l=64;var Ll=require("node:os");var Dl=[{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"}];var ci=()=>{let e=Al();return[...Dl,...e].map(ev)},ev=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Ll.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var tv=()=>{let e=ci();return Object.fromEntries(e.map(rv))},rv=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Pl=tv(),nv=()=>{let e=ci(),t=65,r=Array.from({length:t},(n,s)=>sv(s,e));return Object.assign({},...r)},sv=(e,t)=>{let r=ov(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},ov=(e,t)=>{let r=t.find(({name:n})=>Nl.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},zL=nv();var Fl=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Bl(e,t)},jl=e=>e===0?e:Bl(e,"`subprocess.kill()`'s argument"),Bl=(e,t)=>{if(Number.isInteger(e))return iv(e,t);if(typeof e=="string")return cv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
+ ${ui()}`)},iv=(e,t)=>{if(Ml.has(e))return Ml.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
+ ${ui()}`)},av=()=>new Map(Object.entries(er.constants.signals).reverse().map(([e,t])=>[t,e])),Ml=av(),cv=(e,t)=>{if(e in er.constants.signals)return e;throw e.toUpperCase()in er.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
+ ${ui()}`)},ui=()=>`Available signal names: ${uv()}.
26
+ Available signal numbers: ${lv()}.`,uv=()=>Object.keys(er.constants.signals).sort().map(e=>`'${e}'`).join(", "),lv=()=>[...new Set(Object.values(er.constants.signals).sort((e,t)=>e-t))].join(", "),qn=e=>Pl[e].description;var Gl=e=>{if(e===!1)return e;if(e===!0)return fv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},fv=1e3*5,ql=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=dv(i,a,r);pv(u,n);let l=e(c);return mv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},dv=(e,t,r)=>{let[n=r,s]=Gn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Gn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:jl(n),error:s}},pv=(e,t)=>{e!==void 0&&t.reject(e)},mv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&li({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},li=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Ul.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var Vl=require("node:events"),Vn=async(e,t)=>{e.aborted||await(0,Vl.once)(e,"abort",{signal:t})};var zl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},Wl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[hv(e,t,n,s)],hv=async(e,t,r,{signal:n})=>{throw await Vn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Of=require("node:timers/promises");var Ef=require("node:util");var tr=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{gv(e,t,r),fi(e,t,n)},gv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},fi=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ut(t)} has already exited or disconnected.`)},Hl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ut(e)} exited or disconnected.`)},Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is sending a message too, instead of listening to incoming messages.
27
27
  This can be fixed by both sending a message and listening to incoming messages at the same time:
28
28
 
29
29
  const [receivedMessage] = await Promise.all([
30
30
  ${Ne("getOneMessage",e)},
31
31
  ${Ne("sendMessage",e,"message, {strict: true}")},
32
- ]);`)},zn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ut(t)}.`,{cause:e}),Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is not listening to incoming messages.`)},Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} exited without listening to incoming messages.`)},Xl=()=>new Error(`\`cancelSignal\` aborted: the ${ut(!0)} disconnected.`),Kl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Jl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ut(r)} is disconnecting.`,{cause:e})},Ql=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(bv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},bv=({code:e,message:t})=>wv.has(e)||xv.some(r=>t.includes(r)),wv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),xv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${Sv(t)}${e}(${r})`,Sv=e=>e?"":"subprocess.",ut=e=>e?"parent process":"subprocess",rr=e=>{e.connected&&e.disconnect()};var Ue=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var Hn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=ef(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(tf(o,t,n,!0));return i},nr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=ef(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(tf(o,t,n,!1));return i},Ge=new WeakMap,ef=(e,t,r)=>{let n=vv(t,r);return _v(n,t,r,e),n},vv=(e,t)=>{let r=qo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Mr(t)}" must not be "${e}".
32
+ ]);`)},zn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ut(t)}.`,{cause:e}),Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is not listening to incoming messages.`)},Xl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} exited without listening to incoming messages.`)},Kl=()=>new Error(`\`cancelSignal\` aborted: the ${ut(!0)} disconnected.`),Jl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Ql=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ut(r)} is disconnecting.`,{cause:e})},ef=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(yv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},yv=({code:e,message:t})=>bv.has(e)||wv.some(r=>t.includes(r)),bv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),wv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${xv(t)}${e}(${r})`,xv=e=>e?"":"subprocess.",ut=e=>e?"parent process":"subprocess",rr=e=>{e.connected&&e.disconnect()};var Ue=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var Hn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=tf(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(rf(o,t,n,!0));return i},nr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=tf(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(rf(o,t,n,!1));return i},Ge=new WeakMap,tf=(e,t,r)=>{let n=Sv(t,r);return vv(n,t,r,e),n},Sv=(e,t)=>{let r=Vo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Mr(t)}" must not be "${e}".
33
33
  It must be ${n} or "fd3", "fd4" (and so on).
34
- It is optional and defaults to "${s}".`)},_v=(e,t,r,n)=>{let s=n[rf(e)];if(s===void 0)throw new TypeError(`"${Mr(r)}" must not be ${t}. That file descriptor does not exist.
35
- Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},tf=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=Ev(e,r);return`The "${s}: ${Wn(o)}" option is incompatible with using "${Mr(n)}: ${Wn(t)}".
36
- Please set this option with "pipe" instead.`},Ev=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=rf(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},rf=e=>e==="all"?1:e,Mr=e=>e?"to":"from",Wn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var gf=require("node:events");var nf=require("node:events"),St=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,nf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var hf=require("node:events");var af=require("node:events"),cf=require("node:timers/promises");var Zn=(e,t)=>{t&&fi(e)},fi=e=>{e.refCounted()},Yn=(e,t)=>{t&&di(e)},di=e=>{e.unrefCounted()},sf=(e,t)=>{t&&(di(e),di(e))},of=(e,t)=>{t&&(fi(e),fi(e))};var uf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(df(s)||mf(s))return;Xn.has(e)||Xn.set(e,[]);let o=Xn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await pf(e,n,s),await cf.scheduler.yield();let i=await ff({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},lf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{pi();let o=Xn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,af.once)(n,"message:done");e.removeListener("message",s),of(t,r),n.connected=!1,n.emit("disconnect")},Xn=new WeakMap;var lt=(e,t,r)=>{if(Kn.has(e))return Kn.get(e);let n=new hf.EventEmitter;return n.connected=!0,Kn.set(e,n),Tv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Kn=new WeakMap,Tv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=uf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",lf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),sf(r,n)},Jn=e=>{let t=Kn.get(e);return t===void 0?e.channel!==null:t.connected};var yf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=lt(e,t,r),i=ts(e,o);return{id:Ov++,type:es,message:n,hasListeners:i}},Ov=0n,bf=(e,t)=>{if(!((t==null?void 0:t.type)!==es||t.hasListeners))for(let{id:r}of e)r!==void 0&&Qn[r].resolve({isDeadlock:!0,hasListeners:!1})},ff=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==es||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:xf,message:ts(t,s)};try{await rs({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},df=e=>{var n;if((e==null?void 0:e.type)!==xf)return!1;let{id:t,message:r}=e;return(n=Qn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},wf=async(e,t,r)=>{if((e==null?void 0:e.type)!==es)return;let n=Ue();Qn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,Rv(t,r,s)]);o&&Hl(r),i||Zl(r)}finally{s.abort(),delete Qn[e.id]}},Qn={},Rv=async(e,t,{signal:r})=>{St(e,1,r),await(0,gf.once)(e,"disconnect",{signal:r}),Yl(t)},es="execa:ipc:request",xf="execa:ipc:response";var Sf=(e,t,r)=>{Fr.has(e)||Fr.set(e,new Set);let n=Fr.get(e),s=Ue(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},vf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},pf=async(e,t,r)=>{var n;for(;!ts(e,t)&&((n=Fr.get(e))==null?void 0:n.size)>0;){let s=[...Fr.get(e)];bf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Fr=new WeakMap,ts=(e,t)=>t.listenerCount("message")>kv(e),kv=e=>Ge.has(e)&&!Qe(Ge.get(e).options.buffer,"ipc")?1:0;var rs=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return tr({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),Cv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},Cv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=yf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=Sf(e,i,o);try{await hi({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw rr(e),c}finally{vf(a)}},hi=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Av(e);try{await Promise.all([wf(n,e,r),o(n)])}catch(i){throw Jl({error:i,methodName:t,isSubprocess:r}),Ql({error:i,methodName:t,isSubprocess:r,message:s}),i}},Av=e=>{if(mi.has(e))return mi.get(e);let t=(0,_f.promisify)(e.send.bind(e));return mi.set(e,t),t},mi=new WeakMap;var Of=(e,t)=>{let r="cancelSignal";return li(r,!1,e.connected),hi({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:kf,message:t},message:t})},Rf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Iv({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),gi.signal),Iv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Ef){if(Ef=!0,!n){Kl();return}if(t===null){pi();return}lt(e,t,r),await Tf.scheduler.yield()}},Ef=!1,mf=e=>(e==null?void 0:e.type)!==kf?!1:(gi.abort(e.message),!0),kf="execa:ipc:cancel",pi=()=>{gi.abort(Xl())},gi=new AbortController;var Cf=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},Af=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[$v({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],$v=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Vn(t,s);let o=Dv(t);throw await Of(e,o),ui({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},Dv=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var If=require("node:timers/promises");var $f=({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})`)},Df=(e,t,r,n)=>t===0||t===void 0?[]:[Lv(e,t,r,n)],Lv=async(e,t,r,{signal:n})=>{throw await(0,If.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ns=require("node:process"),yi=q(require("node:path"),1);var Lf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Nf=(e,t,{node:r=!1,nodePath:n=ns.execPath,nodeOptions:s=ns.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Yt(n,'The "nodePath" option'),u=yi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(yi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Pf=require("node:v8"),Mf=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Mv[r](e)}},Nv=e=>{try{(0,Pf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Pv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Mv={advanced:Nv,json:Pv},Ff=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Bf=({encoding:e})=>{if(bi.has(e))return;let t=jv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
37
- Please rename it to ${ss(t)}.`);let r=[...bi].map(n=>ss(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
38
- Please rename it to one of: ${r}.`)},Fv=new Set(["utf8","utf16le"]),he=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),bi=new Set([...Fv,...he]),jv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in jf)return jf[t];if(bi.has(t))return t},jf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},ss=e=>typeof e=="string"?`"${e}"`:String(e);var Uf=require("node:fs"),Gf=q(require("node:path"),1),qf=q(require("node:process"),1);var Vf=(e=zf())=>{let t=Yt(e,'The "cwd" option');return Gf.default.resolve(t)},zf=()=>{try{return qf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
- ${e.message}`,e}},Wf=(e,t)=>{if(t===zf())return e;let r;try{r=(0,Uf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
34
+ It is optional and defaults to "${s}".`)},vv=(e,t,r,n)=>{let s=n[nf(e)];if(s===void 0)throw new TypeError(`"${Mr(r)}" must not be ${t}. That file descriptor does not exist.
35
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},rf=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=_v(e,r);return`The "${s}: ${Wn(o)}" option is incompatible with using "${Mr(n)}: ${Wn(t)}".
36
+ Please set this option with "pipe" instead.`},_v=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=nf(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},nf=e=>e==="all"?1:e,Mr=e=>e?"to":"from",Wn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var yf=require("node:events");var sf=require("node:events"),St=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,sf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var gf=require("node:events");var cf=require("node:events"),uf=require("node:timers/promises");var Zn=(e,t)=>{t&&di(e)},di=e=>{e.refCounted()},Yn=(e,t)=>{t&&pi(e)},pi=e=>{e.unrefCounted()},of=(e,t)=>{t&&(pi(e),pi(e))},af=(e,t)=>{t&&(di(e),di(e))};var lf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(pf(s)||hf(s))return;Xn.has(e)||Xn.set(e,[]);let o=Xn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await mf(e,n,s),await uf.scheduler.yield();let i=await df({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},ff=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{mi();let o=Xn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,cf.once)(n,"message:done");e.removeListener("message",s),af(t,r),n.connected=!1,n.emit("disconnect")},Xn=new WeakMap;var lt=(e,t,r)=>{if(Kn.has(e))return Kn.get(e);let n=new gf.EventEmitter;return n.connected=!0,Kn.set(e,n),Ev({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Kn=new WeakMap,Ev=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=lf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",ff.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),of(r,n)},Jn=e=>{let t=Kn.get(e);return t===void 0?e.channel!==null:t.connected};var bf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=lt(e,t,r),i=ts(e,o);return{id:Tv++,type:es,message:n,hasListeners:i}},Tv=0n,wf=(e,t)=>{if(!((t==null?void 0:t.type)!==es||t.hasListeners))for(let{id:r}of e)r!==void 0&&Qn[r].resolve({isDeadlock:!0,hasListeners:!1})},df=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==es||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:Sf,message:ts(t,s)};try{await rs({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},pf=e=>{var n;if((e==null?void 0:e.type)!==Sf)return!1;let{id:t,message:r}=e;return(n=Qn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},xf=async(e,t,r)=>{if((e==null?void 0:e.type)!==es)return;let n=Ue();Qn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,Ov(t,r,s)]);o&&Zl(r),i||Yl(r)}finally{s.abort(),delete Qn[e.id]}},Qn={},Ov=async(e,t,{signal:r})=>{St(e,1,r),await(0,yf.once)(e,"disconnect",{signal:r}),Xl(t)},es="execa:ipc:request",Sf="execa:ipc:response";var vf=(e,t,r)=>{Fr.has(e)||Fr.set(e,new Set);let n=Fr.get(e),s=Ue(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},_f=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},mf=async(e,t,r)=>{var n;for(;!ts(e,t)&&((n=Fr.get(e))==null?void 0:n.size)>0;){let s=[...Fr.get(e)];wf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Fr=new WeakMap,ts=(e,t)=>t.listenerCount("message")>Rv(e),Rv=e=>Ge.has(e)&&!Qe(Ge.get(e).options.buffer,"ipc")?1:0;var rs=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return tr({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),kv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},kv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=bf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=vf(e,i,o);try{await gi({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw rr(e),c}finally{_f(a)}},gi=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Cv(e);try{await Promise.all([xf(n,e,r),o(n)])}catch(i){throw Ql({error:i,methodName:t,isSubprocess:r}),ef({error:i,methodName:t,isSubprocess:r,message:s}),i}},Cv=e=>{if(hi.has(e))return hi.get(e);let t=(0,Ef.promisify)(e.send.bind(e));return hi.set(e,t),t},hi=new WeakMap;var Rf=(e,t)=>{let r="cancelSignal";return fi(r,!1,e.connected),gi({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:Cf,message:t},message:t})},kf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Av({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),yi.signal),Av=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Tf){if(Tf=!0,!n){Jl();return}if(t===null){mi();return}lt(e,t,r),await Of.scheduler.yield()}},Tf=!1,hf=e=>(e==null?void 0:e.type)!==Cf?!1:(yi.abort(e.message),!0),Cf="execa:ipc:cancel",mi=()=>{yi.abort(Kl())},yi=new AbortController;var Af=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},If=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[Iv({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],Iv=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Vn(t,s);let o=$v(t);throw await Rf(e,o),li({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},$v=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var $f=require("node:timers/promises");var Df=({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})`)},Lf=(e,t,r,n)=>t===0||t===void 0?[]:[Dv(e,t,r,n)],Dv=async(e,t,r,{signal:n})=>{throw await(0,$f.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ns=require("node:process"),bi=q(require("node:path"),1);var Nf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Pf=(e,t,{node:r=!1,nodePath:n=ns.execPath,nodeOptions:s=ns.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Yt(n,'The "nodePath" option'),u=bi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(bi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Mf=require("node:v8"),Ff=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Pv[r](e)}},Lv=e=>{try{(0,Mf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Nv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Pv={advanced:Lv,json:Nv},jf=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Uf=({encoding:e})=>{if(wi.has(e))return;let t=Fv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
37
+ Please rename it to ${ss(t)}.`);let r=[...wi].map(n=>ss(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
38
+ Please rename it to one of: ${r}.`)},Mv=new Set(["utf8","utf16le"]),he=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),wi=new Set([...Mv,...he]),Fv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in Bf)return Bf[t];if(wi.has(t))return t},Bf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},ss=e=>typeof e=="string"?`"${e}"`:String(e);var Gf=require("node:fs"),qf=q(require("node:path"),1),Vf=q(require("node:process"),1);var zf=(e=Wf())=>{let t=Yt(e,'The "cwd" option');return qf.default.resolve(t)},Wf=()=>{try{return Vf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
+ ${e.message}`,e}},Hf=(e,t)=>{if(t===Wf())return e;let r;try{r=(0,Gf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
40
40
  ${n.message}
41
41
  ${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.
42
- ${e}`};var os=(e,t,r)=>{r.cwd=Vf(r.cwd);let[n,s,o]=Nf(e,t,r),{command:i,args:a,options:c}=Zf.default._parse(n,s,o),u=fu(c),l=Bv(u);return $f(l),Bf(l),Mf(l),Vl(l),Cf(l),l.shell=Bo(l.shell),l.env=Uv(l),l.killSignal=Ml(l.killSignal),l.forceKillAfterDelay=Ul(l.forceKillAfterDelay),l.lines=l.lines.map((f,d)=>f&&!he.has(l.encoding)&&l.buffer[d]),wi.default.platform==="win32"&&Hf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},Bv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:d,ipc:p=d!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:d,ipc:p,serialization:b}),Uv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...wi.default.env,...e}:e;return r||n?El({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var gd=require("node:util");function sr(e){if(typeof e=="string")return Gv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return qv(e)}var Gv=e=>e.at(-1)===Yf?e.slice(0,e.at(-2)===Xf?-2:-1):e,qv=e=>e.at(-1)===Vv?e.subarray(0,e.at(-2)===zv?-2:-1):e,Yf=`
43
- `,Vv=Yf.codePointAt(0),Xf="\r",zv=Xf.codePointAt(0);var cd=require("node:events"),ud=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function xi(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vt(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function Si(e,t){return xi(e,t)&&vt(e,t)}var Wv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),vi=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},_i=Symbol();function Kf(){return this[_i].next()}Object.defineProperty(Kf,"name",{value:"next"});function Jf(e){return this[_i].return(e)}Object.defineProperty(Jf,"name",{value:"return"});var Hv=Object.create(Wv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Kf},return:{enumerable:!0,configurable:!0,writable:!0,value:Jf}});function Ei({preventCancel:e=!1}={}){let t=this.getReader(),r=new vi(t,e),n=Object.create(Hv);return n[_i]=r,n}var Qf=e=>{if(vt(e,{checkOpen:!1})&&jr.on!==void 0)return Yv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Zv.call(e)==="[object ReadableStream]")return Ei.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Zv}=Object.prototype,Yv=async function*(e){let t=new AbortController,r={};Xv(e,t,r);try{for await(let[n]of jr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},Xv=async(e,t,r)=>{try{await jr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},jr={};var or=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Qf(e),l=t();l.length=0;try{for await(let f of u){let d=Jv(f),p=r[d](f,l);rd({convertedChunk:p,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Kv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let d=typeof f=="object"&&f!==null?f:new Error(f);throw d.bufferedData=a(l),d}},Kv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&rd({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},rd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){ed(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&ed(c,t,s,o),new qe},ed=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Jv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=td.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&td.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:td}=Object.prototype,qe=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var et=e=>e,Br=()=>{},is=({contents:e})=>e,as=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},cs=e=>e.length;async function us(e,t){return or(e,r_,t)}var Qv=()=>({contents:[]}),e_=()=>1,t_=(e,{contents:t})=>(t.push(e),t),r_={init:Qv,convertChunk:{string:et,buffer:et,arrayBuffer:et,dataView:et,typedArray:et,others:et},getSize:e_,truncateChunk:Br,addChunk:t_,getFinalChunk:Br,finalize:is};async function ls(e,t){return or(e,f_,t)}var n_=()=>({contents:new ArrayBuffer(0)}),s_=e=>o_.encode(e),o_=new TextEncoder,nd=e=>new Uint8Array(e),sd=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i_=(e,t)=>e.slice(0,t),a_=(e,{contents:t,length:r},n)=>{let s=ad()?u_(t,n):c_(t,n);return new Uint8Array(s).set(e,r),s},c_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(id(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},u_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:id(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},id=e=>od**Math.ceil(Math.log(e)/Math.log(od)),od=2,l_=({contents:e,length:t})=>ad()?e:e.slice(0,t),ad=()=>"resize"in ArrayBuffer.prototype,f_={init:n_,convertChunk:{string:s_,buffer:nd,arrayBuffer:nd,dataView:sd,typedArray:sd,others:as},getSize:cs,truncateChunk:i_,addChunk:a_,getFinalChunk:Br,finalize:l_};async function ds(e,t){return or(e,g_,t)}var d_=()=>({contents:"",textDecoder:new TextDecoder}),fs=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),p_=(e,{contents:t})=>t+e,m_=(e,t)=>e.slice(0,t),h_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},g_={init:d_,convertChunk:{string:et,buffer:fs,arrayBuffer:fs,dataView:fs,typedArray:fs,others:as},getSize:cs,truncateChunk:m_,addChunk:p_,getFinalChunk:h_,finalize:is};Object.assign(jr,{on:cd.on,finished:ud.finished});var ld=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof qe))throw e;if(o==="all")return e;let i=y_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},y_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",fd=(e,t,r)=>{if(t.length!==r)return;let n=new qe;throw n.maxBufferInfo={fdNumber:"ipc"},n},dd=(e,t)=>{let{streamName:r,threshold:n,unit:s}=b_(e,t);return`Command's ${r} was larger than ${n} ${s}`},b_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Qe(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Cn(r),threshold:s,unit:n}},pd=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>ps(r)),md=(e,t,r)=>{if(!t)return e;let n=ps(r);return e.length>n?e.slice(0,n):e},ps=([,e])=>e;var yd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=w_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b}),X=S_(n,M),we=X===void 0?"":`
44
- ${X}`,ce=`${Y}: ${a}${we}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>v_(xe)).join(`
45
- `)].map(xe=>Dr(sr(__(xe)))).filter(Boolean).join(`
42
+ ${e}`};var os=(e,t,r)=>{r.cwd=zf(r.cwd);let[n,s,o]=Pf(e,t,r),{command:i,args:a,options:c}=Yf.default._parse(n,s,o),u=du(c),l=jv(u);return Df(l),Uf(l),Ff(l),zl(l),Af(l),l.shell=Uo(l.shell),l.env=Bv(l),l.killSignal=Fl(l.killSignal),l.forceKillAfterDelay=Gl(l.forceKillAfterDelay),l.lines=l.lines.map((f,d)=>f&&!he.has(l.encoding)&&l.buffer[d]),xi.default.platform==="win32"&&Zf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},jv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:d,ipc:p=d!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:d,ipc:p,serialization:b}),Bv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...xi.default.env,...e}:e;return r||n?Tl({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var yd=require("node:util");function sr(e){if(typeof e=="string")return Uv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Gv(e)}var Uv=e=>e.at(-1)===Xf?e.slice(0,e.at(-2)===Kf?-2:-1):e,Gv=e=>e.at(-1)===qv?e.subarray(0,e.at(-2)===Vv?-2:-1):e,Xf=`
43
+ `,qv=Xf.codePointAt(0),Kf="\r",Vv=Kf.codePointAt(0);var ud=require("node:events"),ld=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function Si(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vt(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vi(e,t){return Si(e,t)&&vt(e,t)}var zv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),_i=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},Ei=Symbol();function Jf(){return this[Ei].next()}Object.defineProperty(Jf,"name",{value:"next"});function Qf(e){return this[Ei].return(e)}Object.defineProperty(Qf,"name",{value:"return"});var Wv=Object.create(zv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Jf},return:{enumerable:!0,configurable:!0,writable:!0,value:Qf}});function Ti({preventCancel:e=!1}={}){let t=this.getReader(),r=new _i(t,e),n=Object.create(Wv);return n[Ei]=r,n}var ed=e=>{if(vt(e,{checkOpen:!1})&&jr.on!==void 0)return Zv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Hv.call(e)==="[object ReadableStream]")return Ti.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hv}=Object.prototype,Zv=async function*(e){let t=new AbortController,r={};Yv(e,t,r);try{for await(let[n]of jr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},Yv=async(e,t,r)=>{try{await jr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},jr={};var or=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=ed(e),l=t();l.length=0;try{for await(let f of u){let d=Kv(f),p=r[d](f,l);nd({convertedChunk:p,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Xv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let d=typeof f=="object"&&f!==null?f:new Error(f);throw d.bufferedData=a(l),d}},Xv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&nd({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},nd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){td(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&td(c,t,s,o),new qe},td=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Kv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=rd.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&rd.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:rd}=Object.prototype,qe=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var et=e=>e,Br=()=>{},is=({contents:e})=>e,as=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},cs=e=>e.length;async function us(e,t){return or(e,t_,t)}var Jv=()=>({contents:[]}),Qv=()=>1,e_=(e,{contents:t})=>(t.push(e),t),t_={init:Jv,convertChunk:{string:et,buffer:et,arrayBuffer:et,dataView:et,typedArray:et,others:et},getSize:Qv,truncateChunk:Br,addChunk:e_,getFinalChunk:Br,finalize:is};async function ls(e,t){return or(e,l_,t)}var r_=()=>({contents:new ArrayBuffer(0)}),n_=e=>s_.encode(e),s_=new TextEncoder,sd=e=>new Uint8Array(e),od=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o_=(e,t)=>e.slice(0,t),i_=(e,{contents:t,length:r},n)=>{let s=cd()?c_(t,n):a_(t,n);return new Uint8Array(s).set(e,r),s},a_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(ad(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},c_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:ad(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},ad=e=>id**Math.ceil(Math.log(e)/Math.log(id)),id=2,u_=({contents:e,length:t})=>cd()?e:e.slice(0,t),cd=()=>"resize"in ArrayBuffer.prototype,l_={init:r_,convertChunk:{string:n_,buffer:sd,arrayBuffer:sd,dataView:od,typedArray:od,others:as},getSize:cs,truncateChunk:o_,addChunk:i_,getFinalChunk:Br,finalize:u_};async function ds(e,t){return or(e,h_,t)}var f_=()=>({contents:"",textDecoder:new TextDecoder}),fs=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),d_=(e,{contents:t})=>t+e,p_=(e,t)=>e.slice(0,t),m_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},h_={init:f_,convertChunk:{string:et,buffer:fs,arrayBuffer:fs,dataView:fs,typedArray:fs,others:as},getSize:cs,truncateChunk:p_,addChunk:d_,getFinalChunk:m_,finalize:is};Object.assign(jr,{on:ud.on,finished:ld.finished});var fd=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof qe))throw e;if(o==="all")return e;let i=g_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},g_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",dd=(e,t,r)=>{if(t.length!==r)return;let n=new qe;throw n.maxBufferInfo={fdNumber:"ipc"},n},pd=(e,t)=>{let{streamName:r,threshold:n,unit:s}=y_(e,t);return`Command's ${r} was larger than ${n} ${s}`},y_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Qe(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Cn(r),threshold:s,unit:n}},md=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>ps(r)),hd=(e,t,r)=>{if(!t)return e;let n=ps(r);return e.length>n?e.slice(0,n):e},ps=([,e])=>e;var bd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=b_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b}),X=x_(n,M),we=X===void 0?"":`
44
+ ${X}`,ce=`${Y}: ${a}${we}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>S_(xe)).join(`
45
+ `)].map(xe=>Dr(sr(v_(xe)))).filter(Boolean).join(`
46
46
 
47
- `);return{originalMessage:X,shortMessage:ce,message:Ie}},w_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:d,killSignal:p})=>{let b=x_(f,d);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${dd(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${p} (${qn(p)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},x_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",S_=(e,t)=>{if(e instanceof Le)return;let r=Rl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Dr(Wf(r,t));return n===""?void 0:n},v_=e=>typeof e=="string"?e:(0,gd.inspect)(e),__=e=>Array.isArray(e)?e.map(t=>sr(hd(t))).filter(Boolean).join(`
48
- `):hd(e),hd=e=>typeof e=="string"?e:K(e)?On(e):"";var ms=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>bd({command:e,escapedCommand:t,cwd:o,durationMs:Yo(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),ir=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Ur({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),Ur=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:d,ipcOutput:p,options:{timeoutDuration:b,timeout:T=b,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ae}=T_(u,l),{originalMessage:Ie,shortMessage:xe,message:Ar}=yd({stdio:f,all:d,ipcOutput:p,originalError:e,signal:ce,signalDescription:Ae,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),xt=Tl(e,Ar,X);return Object.assign(xt,E_({error:xt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ae,stdio:f,all:d,ipcOutput:p,cwd:j,originalMessage:Ie,shortMessage:xe})),xt},E_=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:d,all:p,ipcOutput:b,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return bd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Yo(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:b,pipedFrom:[]})},bd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),T_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:qn(t);return{exitCode:r,signal:n,signalDescription:s}};var wd=e=>Number.isFinite(e)?e:0;function O_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(wd(e*1e3)%1e3),nanoseconds:Math.trunc(wd(e*1e6)%1e3)}}function R_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function Ti(e){switch(typeof e){case"number":{if(Number.isFinite(e))return O_(e);break}case"bigint":return R_(e)}throw new TypeError("Expected a finite number or bigint")}var k_=e=>e===0||e===0n,C_=(e,t)=>t===1||t===1n?e:`${e}s`,A_=1e-7,I_=24n*60n*60n*1000n;function Oi(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let d=Math.floor(l*10**f+A_);return(Math.round(d)/10**f).toFixed(f)},i=(l,f,d,p)=>{if(!((s.length===0||!t.colonNotation)&&k_(l)&&!(t.colonNotation&&d==="m"))){if(p??=String(l),t.colonNotation){let b=p.includes(".")?p.split(".")[0].length:p.length,T=s.length>0?2:1;p="0".repeat(Math.max(0,T-b))+p}else p+=t.verbose?" "+C_(f,l):d;s.push(p)}},a=Ti(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),p=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(d,"microsecond","\xB5s"),i(p,"nanosecond","ns");else{let b=f+d/1e3+p/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=b>=1?Math.round(b):Math.ceil(b),M=T?b.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%I_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,d=o(l,f),p=t.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");i(Number.parseFloat(p),"second","s",p)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var xd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var Sd=(e,t)=>{Xt(t)&&(xd(e,t),$_(e,t))},$_=(e,t)=>{let r=`(done in ${Oi(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ar=(e,t,{reject:r})=>{if(Sd(e,t),e.failed&&r)throw e;return e};var Li=require("node:fs");var Ed=(e,t)=>_t(e)?"asyncGenerator":Rd(e)?"generator":hs(e)?"fileUrl":M_(e)?"filePath":B_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":U_(e)?"asyncIterable":G_(e)?"iterable":Ci(e)?Td({transform:e},t):P_(e)?D_(e,t):"native",D_=(e,t)=>Si(e.transform,{checkOpen:!1})?L_(e,t):Ci(e.transform)?Td(e,t):N_(e,t),L_=(e,t)=>(Od(e,t,"Duplex stream"),"duplex"),Td=(e,t)=>(Od(e,t,"web TransformStream"),"webTransform"),Od=({final:e,binary:t,objectMode:r},n,s)=>{vd(e,`${n}.final`,s),vd(t,`${n}.binary`,s),Ri(r,`${n}.objectMode`)},vd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},N_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!_d(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Si(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ci(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!_d(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return Ri(r,`${s}.binary`),Ri(n,`${s}.objectMode`),_t(e)||_t(t)?"asyncGenerator":"generator"},Ri=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},_d=e=>_t(e)||Rd(e),_t=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Rd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",P_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),hs=e=>Object.prototype.toString.call(e)==="[object URL]",kd=e=>hs(e)&&e.protocol!=="file:",M_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>F_.has(t))&&ki(e.file),F_=new Set(["file","append"]),ki=e=>typeof e=="string",Cd=(e,t)=>e==="native"&&typeof t=="string"&&!j_.has(t),j_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Ad=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",gs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",B_=e=>Ad(e)||gs(e),Ci=e=>Ad(e==null?void 0:e.readable)&&gs(e==null?void 0:e.writable),U_=e=>Id(e)&&typeof e[Symbol.asyncIterator]=="function",G_=e=>Id(e)&&typeof e[Symbol.iterator]=="function",Id=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ys=new Set(["fileUrl","filePath","fileNumber"]),Ai=new Set(["fileUrl","filePath"]),$d=new Set([...Ai,"webStream","nodeStream"]),Dd=new Set(["webTransform","duplex"]),ft={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var Ii=(e,t,r,n)=>n==="output"?q_(e,t,r):V_(e,t,r),q_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},V_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},Ld=(e,t)=>{let r=e.findLast(({type:n})=>ve.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Nd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...z_(e,t,r,n)],z_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>ve.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=W_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return X_(o,r)},W_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?H_({stdioItem:e,optionName:s}):t==="webTransform"?Z_({stdioItem:e,index:r,newTransforms:n,direction:o}):Y_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),H_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},Z_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ii(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},Y_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||he.has(o),{writableObjectMode:d,readableObjectMode:p}=Ii(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:d,readableObjectMode:p}}},X_=(e,t)=>t==="input"?e.reverse():e;var bs=q(require("node:process"),1);var Pd=(e,t,r)=>{let n=e.map(s=>K_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??eE},K_=({type:e,value:t},r)=>J_[r]??Md[e](t),J_=["input","output","output"],cr=()=>{},$i=()=>"input",Md={generator:cr,asyncGenerator:cr,fileUrl:cr,filePath:cr,iterable:$i,asyncIterable:$i,uint8Array:$i,webStream:e=>gs(e)?"output":"input",nodeStream(e){return vt(e,{checkOpen:!1})?xi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:cr,duplex:cr,native(e){let t=Q_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Md.nodeStream(e)}},Q_=e=>{if([0,bs.default.stdin].includes(e))return"input";if([1,2,bs.default.stdout,bs.default.stderr].includes(e))return"output"},eE="output";var Fd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var jd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=tE(e,n).map((a,c)=>Bd(a,c));return o?nE(i,r,s):Fd(i,t)},tE=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(rE(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Se.length);return Array.from({length:r},(n,s)=>e[s])},rE=e=>Se.some(t=>e[t]!==void 0),Bd=(e,t)=>Array.isArray(e)?e.map(r=>Bd(r,t)):e??(t>=Se.length?"ignore":"pipe"),nE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Kt(r,s)&&sE(n)?"ignore":n),sE=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Gd=require("node:fs"),qd=q(require("node:tty"),1);var Vd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?oE({stdioItem:e,fdNumber:n,direction:s}):cE({stdioItem:e,fdNumber:n}),oE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=iE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},iE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=aE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(qd.default.isatty(s))throw new TypeError(`The \`${t}: ${Wn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Je((0,Gd.readFileSync)(s)),optionName:t}}},aE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=kn.indexOf(e);if(r!==-1)return r},cE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Ud(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Ud(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Ud=(e,t,r)=>{let n=kn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var zd=({input:e,inputFile:t},r)=>r===0?[...uE(e),...fE(t)]:[],uE=e=>e===void 0?[]:[{type:lE(e),value:e,optionName:"input"}],lE=e=>{if(vt(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},fE=e=>e===void 0?[]:[{...dE(e),optionName:"inputFile"}],dE=e=>{if(hs(e))return{type:"fileUrl",value:e};if(ki(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Wd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Hd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=pE(s,e);if(i.length!==0){if(o){mE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if($d.has(e))return Zd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Dd.has(e)&&gE({otherStdioItems:i,type:e,value:t,optionName:r})}},pE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),mE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ai.has(t)&&Zd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Zd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>hE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Yd(i,n,t),s==="output"?o[0].stream:void 0},hE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,gE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Yd(s,n,t)},Yd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${ft[r]} that is the same.`)};var ws=(e,t,r,n)=>{let o=jd(t,r,n).map((a,c)=>yE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=TE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>kE(a)),i},yE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Cn(t),{stdioItems:o,isStdioArray:i}=bE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Pd(o,t,s),c=o.map(f=>Vd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Nd(c,s,a,r),l=Ld(u,a);return EE(u,l),{direction:a,objectMode:l,stdioItems:u}},bE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>wE(c,n)),...zd(r,t)],i=Wd(o),a=i.length>1;return xE(i,a,n),vE(i),{stdioItems:i,isStdioArray:a}},wE=(e,t)=>({type:Ed(e,t),value:e,optionName:t}),xE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(SE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},SE=new Set(["ignore","ipc"]),vE=e=>{for(let t of e)_E(t)},_E=({type:e,value:t,optionName:r})=>{if(kd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Cd(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},EE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>ys.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},TE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(OE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Di(s),o}},OE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>RE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},RE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Hd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Di=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},kE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Kd=(e,t)=>ws(AE,e,t,!0),Ve=({type:e,optionName:t})=>{Jd(t,ft[e])},CE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Jd(e,`"${t}"`),{}),Jd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Xd={generator(){},asyncGenerator:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:CE},AE={input:{...Xd,fileUrl:({value:e})=>({contents:[Je((0,Li.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Je((0,Li.readFileSync)(e))]}),fileNumber:Ve,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Xd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Ve,string:Ve,uint8Array:Ve}};var tt=(e,{stripFinalNewline:t},r)=>Ni(t,r)&&e!==void 0&&!Array.isArray(e)?sr(e):e,Ni=(e,t)=>t==="all"?e[1]||e[2]:e[t];var qr=require("node:stream");var xs=(e,t,r,n)=>e||r?void 0:ep(t,n),Mi=(e,t,r)=>r?e.flatMap(n=>Qd(n,t)):Qd(e,t),Qd=(e,t)=>{let{transform:r,final:n}=ep(t,{});return[...r(e),...n()]},ep=(e,t)=>(t.previousChunks="",{transform:IE.bind(void 0,t,e),final:DE.bind(void 0,t)}),IE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
- `){let i=$E(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Pi(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Pi(n,r.slice(s+1))),e.previousChunks=n},$E=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),DE=function*({previousChunks:e}){e.length>0&&(yield e)},tp=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:LE.bind(void 0,n)},LE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?NE:ME;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Pi=(e,t)=>`${e}${t}`,NE={windowsNewline:`\r
47
+ `);return{originalMessage:X,shortMessage:ce,message:Ie}},b_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:d,killSignal:p})=>{let b=w_(f,d);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${pd(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${p} (${qn(p)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},w_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",x_=(e,t)=>{if(e instanceof Le)return;let r=kl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Dr(Hf(r,t));return n===""?void 0:n},S_=e=>typeof e=="string"?e:(0,yd.inspect)(e),v_=e=>Array.isArray(e)?e.map(t=>sr(gd(t))).filter(Boolean).join(`
48
+ `):gd(e),gd=e=>typeof e=="string"?e:K(e)?On(e):"";var ms=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>wd({command:e,escapedCommand:t,cwd:o,durationMs:Xo(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),ir=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Ur({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),Ur=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:d,ipcOutput:p,options:{timeoutDuration:b,timeout:T=b,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ae}=E_(u,l),{originalMessage:Ie,shortMessage:xe,message:Ar}=bd({stdio:f,all:d,ipcOutput:p,originalError:e,signal:ce,signalDescription:Ae,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),xt=Ol(e,Ar,X);return Object.assign(xt,__({error:xt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ae,stdio:f,all:d,ipcOutput:p,cwd:j,originalMessage:Ie,shortMessage:xe})),xt},__=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:d,all:p,ipcOutput:b,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return wd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Xo(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:b,pipedFrom:[]})},wd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),E_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:qn(t);return{exitCode:r,signal:n,signalDescription:s}};var xd=e=>Number.isFinite(e)?e:0;function T_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(xd(e*1e3)%1e3),nanoseconds:Math.trunc(xd(e*1e6)%1e3)}}function O_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function Oi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return T_(e);break}case"bigint":return O_(e)}throw new TypeError("Expected a finite number or bigint")}var R_=e=>e===0||e===0n,k_=(e,t)=>t===1||t===1n?e:`${e}s`,C_=1e-7,A_=24n*60n*60n*1000n;function Ri(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let d=Math.floor(l*10**f+C_);return(Math.round(d)/10**f).toFixed(f)},i=(l,f,d,p)=>{if(!((s.length===0||!t.colonNotation)&&R_(l)&&!(t.colonNotation&&d==="m"))){if(p??=String(l),t.colonNotation){let b=p.includes(".")?p.split(".")[0].length:p.length,T=s.length>0?2:1;p="0".repeat(Math.max(0,T-b))+p}else p+=t.verbose?" "+k_(f,l):d;s.push(p)}},a=Oi(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),p=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(d,"microsecond","\xB5s"),i(p,"nanosecond","ns");else{let b=f+d/1e3+p/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=b>=1?Math.round(b):Math.ceil(b),M=T?b.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%A_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,d=o(l,f),p=t.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");i(Number.parseFloat(p),"second","s",p)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var Sd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var vd=(e,t)=>{Xt(t)&&(Sd(e,t),I_(e,t))},I_=(e,t)=>{let r=`(done in ${Ri(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ar=(e,t,{reject:r})=>{if(vd(e,t),e.failed&&r)throw e;return e};var Ni=require("node:fs");var Td=(e,t)=>_t(e)?"asyncGenerator":kd(e)?"generator":hs(e)?"fileUrl":P_(e)?"filePath":j_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":B_(e)?"asyncIterable":U_(e)?"iterable":Ai(e)?Od({transform:e},t):N_(e)?$_(e,t):"native",$_=(e,t)=>vi(e.transform,{checkOpen:!1})?D_(e,t):Ai(e.transform)?Od(e,t):L_(e,t),D_=(e,t)=>(Rd(e,t,"Duplex stream"),"duplex"),Od=(e,t)=>(Rd(e,t,"web TransformStream"),"webTransform"),Rd=({final:e,binary:t,objectMode:r},n,s)=>{_d(e,`${n}.final`,s),_d(t,`${n}.binary`,s),ki(r,`${n}.objectMode`)},_d=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},L_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!Ed(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(vi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ai(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!Ed(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return ki(r,`${s}.binary`),ki(n,`${s}.objectMode`),_t(e)||_t(t)?"asyncGenerator":"generator"},ki=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},Ed=e=>_t(e)||kd(e),_t=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",kd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",N_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),hs=e=>Object.prototype.toString.call(e)==="[object URL]",Cd=e=>hs(e)&&e.protocol!=="file:",P_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>M_.has(t))&&Ci(e.file),M_=new Set(["file","append"]),Ci=e=>typeof e=="string",Ad=(e,t)=>e==="native"&&typeof t=="string"&&!F_.has(t),F_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Id=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",gs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",j_=e=>Id(e)||gs(e),Ai=e=>Id(e==null?void 0:e.readable)&&gs(e==null?void 0:e.writable),B_=e=>$d(e)&&typeof e[Symbol.asyncIterator]=="function",U_=e=>$d(e)&&typeof e[Symbol.iterator]=="function",$d=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ys=new Set(["fileUrl","filePath","fileNumber"]),Ii=new Set(["fileUrl","filePath"]),Dd=new Set([...Ii,"webStream","nodeStream"]),Ld=new Set(["webTransform","duplex"]),ft={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var $i=(e,t,r,n)=>n==="output"?G_(e,t,r):q_(e,t,r),G_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},q_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},Nd=(e,t)=>{let r=e.findLast(({type:n})=>ve.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Pd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...V_(e,t,r,n)],V_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>ve.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=z_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return Y_(o,r)},z_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?W_({stdioItem:e,optionName:s}):t==="webTransform"?H_({stdioItem:e,index:r,newTransforms:n,direction:o}):Z_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),W_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},H_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=$i(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},Z_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||he.has(o),{writableObjectMode:d,readableObjectMode:p}=$i(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:d,readableObjectMode:p}}},Y_=(e,t)=>t==="input"?e.reverse():e;var bs=q(require("node:process"),1);var Md=(e,t,r)=>{let n=e.map(s=>X_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??Q_},X_=({type:e,value:t},r)=>K_[r]??Fd[e](t),K_=["input","output","output"],cr=()=>{},Di=()=>"input",Fd={generator:cr,asyncGenerator:cr,fileUrl:cr,filePath:cr,iterable:Di,asyncIterable:Di,uint8Array:Di,webStream:e=>gs(e)?"output":"input",nodeStream(e){return vt(e,{checkOpen:!1})?Si(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:cr,duplex:cr,native(e){let t=J_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Fd.nodeStream(e)}},J_=e=>{if([0,bs.default.stdin].includes(e))return"input";if([1,2,bs.default.stdout,bs.default.stderr].includes(e))return"output"},Q_="output";var jd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Bd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=eE(e,n).map((a,c)=>Ud(a,c));return o?rE(i,r,s):jd(i,t)},eE=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(tE(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Se.length);return Array.from({length:r},(n,s)=>e[s])},tE=e=>Se.some(t=>e[t]!==void 0),Ud=(e,t)=>Array.isArray(e)?e.map(r=>Ud(r,t)):e??(t>=Se.length?"ignore":"pipe"),rE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Kt(r,s)&&nE(n)?"ignore":n),nE=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var qd=require("node:fs"),Vd=q(require("node:tty"),1);var zd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?sE({stdioItem:e,fdNumber:n,direction:s}):aE({stdioItem:e,fdNumber:n}),sE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=oE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},oE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=iE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Vd.default.isatty(s))throw new TypeError(`The \`${t}: ${Wn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Je((0,qd.readFileSync)(s)),optionName:t}}},iE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=kn.indexOf(e);if(r!==-1)return r},aE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Gd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Gd(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Gd=(e,t,r)=>{let n=kn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var Wd=({input:e,inputFile:t},r)=>r===0?[...cE(e),...lE(t)]:[],cE=e=>e===void 0?[]:[{type:uE(e),value:e,optionName:"input"}],uE=e=>{if(vt(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},lE=e=>e===void 0?[]:[{...fE(e),optionName:"inputFile"}],fE=e=>{if(hs(e))return{type:"fileUrl",value:e};if(Ci(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Hd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Zd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=dE(s,e);if(i.length!==0){if(o){pE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(Dd.has(e))return Yd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Ld.has(e)&&hE({otherStdioItems:i,type:e,value:t,optionName:r})}},dE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),pE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ii.has(t)&&Yd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Yd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>mE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Xd(i,n,t),s==="output"?o[0].stream:void 0},mE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,hE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Xd(s,n,t)},Xd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${ft[r]} that is the same.`)};var ws=(e,t,r,n)=>{let o=Bd(t,r,n).map((a,c)=>gE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=EE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>RE(a)),i},gE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Cn(t),{stdioItems:o,isStdioArray:i}=yE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Md(o,t,s),c=o.map(f=>zd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Pd(c,s,a,r),l=Nd(u,a);return _E(u,l),{direction:a,objectMode:l,stdioItems:u}},yE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>bE(c,n)),...Wd(r,t)],i=Hd(o),a=i.length>1;return wE(i,a,n),SE(i),{stdioItems:i,isStdioArray:a}},bE=(e,t)=>({type:Td(e,t),value:e,optionName:t}),wE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(xE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},xE=new Set(["ignore","ipc"]),SE=e=>{for(let t of e)vE(t)},vE=({type:e,value:t,optionName:r})=>{if(Cd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Ad(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},_E=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>ys.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},EE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(TE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Li(s),o}},TE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>OE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},OE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Zd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Li=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},RE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Jd=(e,t)=>ws(CE,e,t,!0),Ve=({type:e,optionName:t})=>{Qd(t,ft[e])},kE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Qd(e,`"${t}"`),{}),Qd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Kd={generator(){},asyncGenerator:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:kE},CE={input:{...Kd,fileUrl:({value:e})=>({contents:[Je((0,Ni.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Je((0,Ni.readFileSync)(e))]}),fileNumber:Ve,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Kd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Ve,string:Ve,uint8Array:Ve}};var tt=(e,{stripFinalNewline:t},r)=>Pi(t,r)&&e!==void 0&&!Array.isArray(e)?sr(e):e,Pi=(e,t)=>t==="all"?e[1]||e[2]:e[t];var qr=require("node:stream");var xs=(e,t,r,n)=>e||r?void 0:tp(t,n),Fi=(e,t,r)=>r?e.flatMap(n=>ep(n,t)):ep(e,t),ep=(e,t)=>{let{transform:r,final:n}=tp(t,{});return[...r(e),...n()]},tp=(e,t)=>(t.previousChunks="",{transform:AE.bind(void 0,t,e),final:$E.bind(void 0,t)}),AE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
+ `){let i=IE(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Mi(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Mi(n,r.slice(s+1))),e.previousChunks=n},IE=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),$E=function*({previousChunks:e}){e.length>0&&(yield e)},rp=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:DE.bind(void 0,n)},DE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?LE:PE;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Mi=(e,t)=>`${e}${t}`,LE={windowsNewline:`\r
51
51
  `,unixNewline:`
52
52
  `,LF:`
53
- `,concatBytes:Pi},PE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},ME={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:PE};var rp=require("node:buffer");var np=(e,t)=>e?void 0:FE.bind(void 0,t),FE=function*(e,t){if(typeof t!="string"&&!K(t)&&!rp.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},sp=(e,t)=>e?jE.bind(void 0,t):BE.bind(void 0,t),jE=function*(e,t){op(e,t),yield t},BE=function*(e,t){if(op(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},op=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
53
+ `,concatBytes:Mi},NE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},PE={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:NE};var np=require("node:buffer");var sp=(e,t)=>e?void 0:ME.bind(void 0,t),ME=function*(e,t){if(typeof t!="string"&&!K(t)&&!np.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},op=(e,t)=>e?FE.bind(void 0,t):jE.bind(void 0,t),FE=function*(e,t){ip(e,t),yield t},jE=function*(e,t){if(ip(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},ip=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
54
54
  Instead, \`yield\` should either be called with a value, or not be called at all. For example:
55
- if (condition) { yield value; }`)};var ip=require("node:buffer"),ap=require("node:string_decoder");var Ss=(e,t,r)=>{if(r)return;if(e)return{transform:UE.bind(void 0,new TextEncoder)};let n=new ap.StringDecoder(t);return{transform:GE.bind(void 0,n),final:qE.bind(void 0,n)}},UE=function*(e,t){ip.Buffer.isBuffer(t)?yield Je(t):typeof t=="string"?yield e.encode(t):yield t},GE=function*(e,t){yield K(t)?e.write(t):t},qE=function*(e){let t=e.end();t!==""&&(yield t)};var Fi=require("node:util"),ji=(0,Fi.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),vs=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=zE}=t[r];for await(let s of n(e))yield*vs(s,t,r+1)},cp=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*VE(r,Number(t),e)},VE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*vs(n,r,t+1)},up=(0,Fi.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),zE=function*(e){yield e};var Bi=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},lp=(e,t)=>[...t.flatMap(r=>[...Et(r,e,0)]),...Gr(e)],Et=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=HE}=t[r];for(let s of n(e))yield*Et(s,t,r+1)},Gr=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*WE(r,Number(t),e)},WE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*Et(n,r,t+1)},HE=function*(e){yield e};var Ui=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=fp(e,i,o),u=_t(t),l=_t(r),f=u?ji.bind(void 0,vs,a):Bi.bind(void 0,Et),d=u||l?ji.bind(void 0,cp,a):Bi.bind(void 0,Gr),p=u||l?up.bind(void 0,a):void 0;return{stream:new qr.Transform({writableObjectMode:n,writableHighWaterMark:(0,qr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,qr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){d([c],this,T)},destroy:p})}},_s=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=fp(i,r,a);e=lp(c,e)}return e},fp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:np(n,a)},Ss(r,i,n),xs(r,o,n,c),{transform:e,final:t},{transform:sp(s,a)},tp({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var dp=(e,t)=>{for(let r of ZE(e))YE(e,r,t)},ZE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),YE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${ft[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>XE(a,n));r.input=$r(i)},XE=(e,t)=>{let r=_s(e,t,"utf8",!0);return KE(r),$r(r)},KE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var Ts=require("node:fs");var Es=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Kt(r,n)&&!he.has(t)&&JE(n)&&(e.some(({type:s,value:o})=>s==="native"&&QE.has(o))||e.every(({type:s})=>ve.has(s))),JE=e=>e===1||e===2,QE=new Set(["pipe","overlapped"]),pp=async(e,t,r,n)=>{for await(let s of e)eT(t)||hp(s,r,n)},mp=(e,t,r)=>{for(let n of e)hp(n,t,r)},eT=e=>e._readableState.pipes.length>0,hp=(e,t,r)=>{let n=Pn(e);Be({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var gp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>tT({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},tT=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let d=md(e,o,f),p=Je(d),{stdioItems:b,objectMode:T}=t[r],P=rT([p],b,c,n),{serializedResult:M,finalResult:j=M}=nT({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});sT({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&oT(M,b,s),Y}catch(X){return n.error=X,Y}},rT=(e,t,r,n)=>{try{return _s(e,t,r,!1)}catch(s){return n.error=s,e}},nT=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:$r(e)};let i=ru(e,r);return n[o]?{serializedResult:i,finalResult:Mi(i,!s[o],t)}:{serializedResult:i}},sT=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!Es({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Mi(e,!1,i);try{mp(a,t,n)}catch(c){r.error??=c}},oT=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ys.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,Ts.appendFileSync)(n,e):(r.add(o),(0,Ts.writeFileSync)(n,e))}};var yp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,tt(t,r,"all")]:Array.isArray(t)?[tt(e,r,"all"),...t]:K(e)&&K(t)?Uo([e,t]):`${e}${t}`};var Os=require("node:events");var bp=async(e,t)=>{let[r,n]=await iT(e);return t.isForcefullyTerminated??=!1,[r,n]},iT=async e=>{let[t,r]=await Promise.allSettled([(0,Os.once)(e,"spawn"),(0,Os.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?wp(e):r.value},wp=async e=>{try{return await(0,Os.once)(e,"exit")}catch{return wp(e)}},xp=async e=>{let[t,r]=await e;if(!aT(t,r)&&Gi(t,r))throw new Le;return[t,r]},aT=(e,t)=>e===void 0&&t===void 0,Gi=(e,t)=>e!==0||t!==null;var Sp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=cT(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=pd(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},cT=(e,t,r)=>e!==void 0?e:Gi(t,r)?new Le:void 0;var _p=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=uT(e,t,r),f=dT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ar(f,c,u)},uT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),a=lT(r),{file:c,commandArguments:u,options:l}=os(e,t,a);fT(l);let f=Kd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},lT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,fT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Rs("ipcInput"),e&&Rs("ipc: true"),r&&Rs("detached: true"),n&&Rs("cancelSignal")},Rs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},dT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=pT({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p}=Sp(c,r),{output:b,error:T=u}=gp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:p,verboseInfo:o}),P=b.map((j,Y)=>tt(j,r,Y)),M=tt(yp(b,r),r,"all");return hT({error:T,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},pT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{dp(o,r);let a=mT(r);return(0,vp.spawnSync)(e,t,a)}catch(a){return ir({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},mT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:ps(t)}),hT=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?ms({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Ur({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var Im=require("node:events"),$m=require("node:child_process");var Vi=q(require("node:process"),1);var ur=require("node:events");var Ep=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(tr({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),gT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),gT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Zn(t,s);let o=lt(e,t,r),i=new AbortController;try{return await Promise.race([yT(o,n,i),bT(o,r,i),wT(o,r,i)])}catch(a){throw rr(e),a}finally{i.abort(),Yn(t,s)}},yT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ur.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ur.on)(e,"message",{signal:r}))if(t(n))return n},bT=async(e,t,{signal:r})=>{await(0,ur.once)(e,"disconnect",{signal:r}),Wl(t)},wT=async(e,t,{signal:r})=>{let[n]=await(0,ur.once)(e,"strict:error",{signal:r});throw zn(n,t)};var Vr=require("node:events");var Op=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>qi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),qi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{tr({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),Zn(t,o);let i=lt(e,t,r),a=new AbortController,c={};return xT(e,i,a),ST({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),vT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},xT=async(e,t,r)=>{try{await(0,Vr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},ST=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Vr.once)(e,"strict:error",{signal:r.signal});n.error=zn(s,t),r.abort()}catch{}},vT=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,Vr.on)(r,"message",{signal:o.signal}))Tp(i),yield c}catch{Tp(i)}finally{o.abort(),Yn(t,a),n||rr(e),s&&await e}},Tp=({error:e})=>{if(e)throw e};var Rp=(e,{ipc:t})=>{Object.assign(e,Cp(e,!1,t))},kp=()=>{let e=Vi.default,t=!0,r=Vi.default.channel!==void 0;return{...Cp(e,t,r),getCancelSignal:Rf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Cp=(e,t,r)=>({sendMessage:rs.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Ep.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Op.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ap=require("node:child_process"),dt=require("node:stream");var Ip=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Di(n);let a=new Ap.ChildProcess;_T(a,n),Object.assign(a,{readable:ET,writable:TT,duplex:OT});let c=ir({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=RT(c,i,s);return{subprocess:a,promise:u}},_T=(e,t)=>{let r=zr(),n=zr(),s=zr(),o=Array.from({length:t.length-3},zr),i=zr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},zr=()=>{let e=new dt.PassThrough;return e.end(),e},ET=()=>new dt.Readable({read(){}}),TT=()=>new dt.Writable({write(){}}),OT=()=>new dt.Duplex({read(){},write(){}}),RT=async(e,t,r)=>ar(e,t,r);var lr=require("node:fs"),Dp=require("node:buffer"),ze=require("node:stream");var Lp=(e,t)=>ws(kT,e,t,!1),Wr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ft[e]}.`)},$p={fileNumber:Wr,generator:Ui,asyncGenerator:Ui,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:ze.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},kT={input:{...$p,fileUrl:({value:e})=>({stream:(0,lr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,lr.createReadStream)(e)}),webStream:({value:e})=>({stream:ze.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ze.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ze.Readable.from(e)}),string:({value:e})=>({stream:ze.Readable.from(e)}),uint8Array:({value:e})=>({stream:ze.Readable.from(Dp.Buffer.from(e))})},output:{...$p,fileUrl:({value:e})=>({stream:(0,lr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,lr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ze.Writable.fromWeb(e)}),iterable:Wr,asyncIterable:Wr,string:Wr,uint8Array:Wr}};var Hr=require("node:events"),Cs=require("node:stream"),Hi=require("node:stream/promises");function Tt(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Wi(s);let t=e.some(({readableObjectMode:s})=>s),r=CT(e,t),n=new zi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var CT=(e,t)=>{if(e.length===0)return(0,Cs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},zi=class extends Cs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Wi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=AT(this,this.#t,this.#o);let r=DT({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(Wi(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},AT=async(e,t,r)=>{ks(e,Np);let n=new AbortController;try{await Promise.race([IT(e,n),$T(e,t,r,n)])}finally{n.abort(),ks(e,-Np)}},IT=async(e,{signal:t})=>{try{await(0,Hi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Mp(e,r),r}},$T=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Hr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Wi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},DT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{ks(e,Pp);let a=new AbortController;try{await Promise.race([LT(o,t,a),NT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),PT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),ks(e,-Pp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Zi(e):MT(e))},LT=async(e,t,{signal:r})=>{try{await e,r.aborted||Zi(t)}catch(n){r.aborted||Mp(t,n)}},NT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Hi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;Fp(i)?s.add(t):jp(e,i)}},PT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Hr.once)(e,s,{signal:o}),!e.readable)return(0,Hr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},MT=e=>{e.writable&&e.end()},Mp=(e,t)=>{Fp(t)?Zi(e):jp(e,t)},Fp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",Zi=e=>{(e.readable||e.writable)&&e.destroy()},jp=(e,t)=>{e.destroyed||(e.once("error",FT),e.destroy(t))},FT=()=>{},ks=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Np=2,Pp=1;var Yi=require("node:stream/promises");var fr=(e,t)=>{e.pipe(t),jT(e,t),BT(e,t)},jT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Yi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Xi(t)}},Xi=e=>{e.writable&&e.end()},BT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Yi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Ki(e)}},Ki=e=>{e.readable&&e.destroy()};var Bp=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>ve.has(c)))UT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))qT({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:Tt(o);fr(i,s)}},UT=(e,t,r,n)=>{r==="output"?fr(e.stdio[n],t):fr(t,e.stdio[n]);let s=GT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},GT=["stdin","stdout","stderr"],qT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;VT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},VT=(e,{signal:t})=>{De(e)&&St(e,zT,t)},zT=2;var Gp=require("node:events");var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var As=e=>!!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",Ji=Symbol.for("signal-exit emitter"),Qi=globalThis,WT=Object.defineProperty.bind(Object),ea=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qi[Ji])return Qi[Ji];WT(Qi,Ji,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Is=class{},HT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),ta=class extends Is{onExit(){return()=>{}}load(){}unload(){}},ra=class extends Is{#t=na.platform==="win32"?"SIGINT":"SIGHUP";#r=new ea;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Ot)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!As(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Ot)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Ot.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return As(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&As(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},na=globalThis.process,{onExit:Up,load:Nj,unload:Pj}=HT(As(na)?new ra(na):new ta);var qp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Up(()=>{e.kill()});(0,Gp.addAbortListener)(n,()=>{s()})};var zp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Mn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=ZT(r,n,s),{sourceStream:f,sourceError:d}=XT(e,u),{options:p,fileDescriptors:b}=Ge.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:p,sourceError:d,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},ZT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=YT(e,t,...r),a=Hn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},YT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Vp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||jo(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=Tn(r,...n);return{destination:t(Vp)(s,o,i),pipeOptions:i}}if(Ge.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Vp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),XT=(e,t)=>{try{return{sourceStream:nr(e,t)}}catch(r){return{sourceError:r}}};var Hp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=KT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw sa({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},KT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Ki(e),n;if(t!==void 0)return Xi(r),t},sa=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>ir({error:e,command:Wp,escapedCommand:Wp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Wp="source.pipe(destination)";var Zp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Yp=require("node:stream/promises");var Xp=(e,t,r)=>{let n=$s.has(t)?QT(e,t):JT(e,t);return St(e,t0,r.signal),St(t,r0,r.signal),e0(t),n},JT=(e,t)=>{let r=Tt([e]);return fr(r,t),$s.set(t,r),r},QT=(e,t)=>{let r=$s.get(t);return r.add(e),r},e0=async e=>{try{await(0,Yp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}$s.delete(e)},$s=new WeakMap,t0=2,r0=1;var Kp=require("node:util");var Jp=(e,t)=>e===void 0?[]:[n0(e,t)],n0=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Kp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw sa({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Ds=(e,...t)=>{if(W(t[0]))return Ds.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=zp(e,...t),s=s0({...n,destination:r});return s.pipe=Ds.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},s0=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=o0(e,s);Hp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let d=Xp(t,o,f);return await Promise.race([Zp(l),...Jp(a,{sourceStream:t,mergedStream:d,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},o0=(e,t)=>Promise.allSettled([e,t]);var nm=require("node:timers/promises");var em=require("node:events"),tm=require("node:stream");var Ls=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return i0(t,i),rm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},i0=async(e,t)=>{try{await e}catch{}finally{t.abort()}},oa=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;a0(t,i,e);let a=e.readableObjectMode&&!o;return rm({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},a0=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},rm=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,em.on)(e,"data",{signal:t.signal,highWaterMark:Qp,highWatermark:Qp});return c0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},ia=(0,tm.getDefaultHighWaterMark)(!0),Qp=ia,c0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=u0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*Et(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Gr(a)}},u0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[Ss(e,r,!t),xs(e,s,!n,{})].filter(Boolean);var sm=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=l0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([f0(e),f]);return}let d=Ni(c,r),p=oa({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:d,allMixed:a}),[b]=await Promise.all([d0({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},l0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!Es({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=oa({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await pp(a,e,r,o)},f0=async e=>{await(0,nm.setImmediate)(),e.readableFlowing===null&&e.resume()},d0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await us(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await ls(r,{maxBuffer:o})):await ds(r,{maxBuffer:o})}catch(a){return om(ld({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},aa=async e=>{try{return await e}catch(t){return om(t)}},om=({bufferedData:e})=>eu(e)?new Uint8Array(e):e;var am=require("node:stream/promises"),Zr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=p0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,am.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||g0(a,t,r,n)}finally{i.abort()}},p0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&m0(e,r,n),n},m0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{h0(t,r),n.call(e,...s)}},h0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},g0=(e,t,r,n)=>{if(!y0(e,t,r,n))throw e},y0=(e,t,r,n=!0)=>r.propagating?im(e)||Ns(e):(r.propagating=!0,ca(r,t)===n?im(e):Ns(e)),ca=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ns=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",im=e=>(e==null?void 0:e.code)==="EPIPE";var cm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>ua({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),ua=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Zr(e,t,u);if(ca(u,t)){await l;return}let[f]=await Promise.all([sm({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var um=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Tt([e,t].filter(Boolean)):void 0,lm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>ua({...b0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:w0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),b0=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},w0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var hm=require("node:events");var fm=e=>Kt(e,"ipc"),dm=(e,t)=>{let r=Pn(e);Be({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var pm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=fm(o),a=Qe(t,"ipc"),c=Qe(r,"ipc");for await(let u of qi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(fd(e,s,c),s.push(u)),i&&dm(u,o);return s},mm=async(e,t)=>(await Promise.allSettled([e]),t);var gm=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:d,verboseInfo:p,fileDescriptors:b,originalStreams:T,onInternalError:P,controller:M})=>{let j=bp(e,d),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=cm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),we=lm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),ce=[],Ae=pm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:p}),Ie=x0(T,e,Y),xe=S0(b,Y);try{return await Promise.race([Promise.all([{},xp(j),Promise.all(X),we,Ae,Ff(e,f),...Ie,...xe]),P,v0(e,M),...Df(e,o,d,M),...zl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:d,controller:M}),...Af({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:d,controller:M})])}catch(Ar){return d.terminationReason??="other",Promise.all([{error:Ar},j,Promise.all(X.map(xt=>aa(xt))),aa(we),mm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},x0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Zr(n,s,r)),S0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Pe(o,{checkOpen:!1})&&!De(o)).map(({type:s,value:o,stream:i=o})=>Zr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),v0=async(e,{signal:t})=>{let[r]=await(0,hm.once)(e,"error",{signal:t});throw r};var ym=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Yr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Ue();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},dr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var wm=require("node:stream"),xm=require("node:util");var la=require("node:stream/promises");var fa=async e=>{if(e!==void 0)try{await da(e)}catch{}},bm=async e=>{if(e!==void 0)try{await pa(e)}catch{}},da=async e=>{await(0,la.finished)(e,{cleanup:!0,readable:!1,writable:!0})},pa=async e=>{await(0,la.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ps=async(e,t)=>{if(await e,t)throw t},Ms=(e,t,r)=>{r&&!Ns(r)?e.destroy(r):t&&e.destroy()};var Sm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||he.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ma(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=ha(a,i),{read:d,onStdoutDataDone:p}=ga({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new wm.Readable({read:d,destroy:(0,xm.callbackify)(ba.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ya({subprocessStdout:a,onStdoutDataDone:p,readable:b,subprocess:e}),b},ma=(e,t,r)=>{let n=nr(e,t),s=Yr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},ha=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:ia},ga=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Ue(),i=Ls({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){_0(this,i,o)},onStdoutDataDone:o}},_0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ya=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await pa(e),await n,await fa(s),await t,r.readable&&r.push(null)}catch(o){await fa(s),vm(r,o)}},ba=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await dr(r,t)&&(vm(e,n),await Ps(t,n))},vm=(e,t)=>{Ms(e,e.readable,t)};var _m=require("node:stream"),wa=require("node:util");var Em=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=xa(e,r,t),i=new _m.Writable({...Sa(n,e,s),destroy:(0,wa.callbackify)(_a.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return va(n,i),i},xa=(e,t,r)=>{let n=Hn(e,t),s=Yr(r,n,"writableFinal"),o=Yr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},Sa=(e,t,r)=>({write:E0.bind(void 0,e),final:(0,wa.callbackify)(T0.bind(void 0,e,t,r))}),E0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},T0=async(e,t,r)=>{await dr(r,t)&&(e.writable&&e.end(),await t)},va=async(e,t,r)=>{try{await da(e),t.writable&&t.end()}catch(n){await bm(r),Tm(t,n)}},_a=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await dr(r,t),await dr(n,t)&&(Tm(e,s),await Ps(t,s))},Tm=(e,t)=>{Ms(e,e.writable,t)};var Om=require("node:stream"),Rm=require("node:util");var km=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||he.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ma(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:d}=xa(e,s,t),{readableEncoding:p,readableObjectMode:b,readableHighWaterMark:T}=ha(c,a),{read:P,onStdoutDataDone:M}=ga({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Om.Duplex({read:P,...Sa(l,e,f),destroy:(0,Rm.callbackify)(O0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:d})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:p});return ya({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),va(l,j,c),j},O0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([ba({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),_a({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var Ea=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||he.has(t),i=nr(e,r),a=Ls({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return R0(a,i,e)},R0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Cm=(e,{encoding:t})=>{let r=ym();e.readable=Sm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Em.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=km.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ea.bind(void 0,e,t),e[Symbol.asyncIterator]=Ea.bind(void 0,e,t,{})};var Am=(e,t)=>{for(let[r,n]of C0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},k0=(async()=>{})().constructor.prototype,C0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(k0,e)]);var Dm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=A0(e,t,r),{subprocess:d,promise:p}=$0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return d.pipe=Ds.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:n}),Am(d,p),Ge.set(d,{options:l,fileDescriptors:f}),d},A0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),{file:a,commandArguments:c,options:u}=os(e,t,r),l=I0(u),f=Lp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},I0=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},$0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,$m.spawn)(e,t,r)}catch(b){return Ip({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Im.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Bp(c,a,u),qp(c,r,u);let f={},d=Ue();c.kill=Gl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:d,context:f,controller:u}),c.all=um(c,r),Cm(c,r),Rp(c,r);let p=D0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:d,controller:u});return{subprocess:c,promise:p}},D0=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[d,p],b,T,P]=await gm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=b.map((X,we)=>tt(X,t,we)),j=tt(T,t,"all"),Y=L0({errorInfo:f,exitCode:d,signal:p,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ar(Y,n,t)},L0=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?Ur({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof qe,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ms({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Fs=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,N0(n,e[n],s)]));return{...e,...r}},N0=(e,t,r)=>P0.has(e)&&W(t)&&W(r)?{...t,...r}:r,P0=new Set(["env",...Vo]);var pt=(e,t,r,n)=>{let s=(i,a,c)=>pt(i,a,r,c),o=(...i)=>M0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},M0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Fs(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=F0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?_p(a,c,u):Dm(a,c,u,s)},F0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=au(t)?cu(t,r):[t,...r],[i,a,c]=Tn(...o),u=Fs(Fs(n,s),c),{file:l=i,commandArguments:f=a,options:d=u,isSync:p=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:d,isSync:p}};var Lm=({file:e,commandArguments:t})=>Pm(e,t),Nm=({file:e,commandArguments:t})=>({...Pm(e,t),isSync:!0}),Pm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=j0(e);return{file:r,commandArguments:n}},j0=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(B0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},B0=/ +/g;var Mm=(e,t,r)=>{e.sync=t(U0,r),e.s=e.sync},Fm=({options:e})=>jm(e),U0=({options:e})=>({...jm(e),isSync:!0}),jm=e=>({options:{...G0(e),...e}}),G0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Bm={preferLocal:!0};var Um=pt(()=>({})),aG=pt(()=>({isSync:!0})),cG=pt(Lm),uG=pt(Nm),lG=pt(Lf),fG=pt(Fm,{},Bm,Mm),{sendMessage:dG,getOneMessage:pG,getEachMessage:mG,getCancelSignal:hG}=kp();var Yw=require("fs"),$o=require("path"),Do=q($g());var Fe={};vx(Fe,{BRAND:()=>uC,DIRTY:()=>kt,EMPTY_PATH:()=>Uk,INVALID:()=>R,NEVER:()=>HC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>gt,ZodArray:()=>ot,ZodBigInt:()=>At,ZodBoolean:()=>It,ZodBranded:()=>an,ZodCatch:()=>Gt,ZodDate:()=>$t,ZodDefault:()=>Ut,ZodDiscriminatedUnion:()=>Qs,ZodEffects:()=>Re,ZodEnum:()=>jt,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>to,ZodIntersection:()=>Pt,ZodIssueCode:()=>m,ZodLazy:()=>Mt,ZodLiteral:()=>Ft,ZodMap:()=>xr,ZodNaN:()=>vr,ZodNativeEnum:()=>Bt,ZodNever:()=>Me,ZodNull:()=>Lt,ZodNullable:()=>Ye,ZodNumber:()=>Ct,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>w,ZodPipeline:()=>cn,ZodPromise:()=>yt,ZodReadonly:()=>qt,ZodRecord:()=>eo,ZodSchema:()=>L,ZodSet:()=>Sr,ZodString:()=>ht,ZodSymbol:()=>br,ZodTransformer:()=>Re,ZodTuple:()=>Ze,ZodType:()=>L,ZodUndefined:()=>Dt,ZodUnion:()=>Nt,ZodUnknown:()=>st,ZodVoid:()=>wr,addIssueToContext:()=>y,any:()=>bC,array:()=>vC,bigint:()=>pC,boolean:()=>Vg,coerce:()=>WC,custom:()=>Ug,date:()=>mC,datetimeRegex:()=>jg,defaultErrorMap:()=>rt,discriminatedUnion:()=>OC,effect:()=>FC,enum:()=>NC,function:()=>$C,getErrorMap:()=>hr,getParsedType:()=>He,instanceof:()=>fC,intersection:()=>RC,isAborted:()=>Xs,isAsync:()=>gr,isDirty:()=>Ks,isValid:()=>mt,late:()=>lC,lazy:()=>DC,literal:()=>LC,makeIssue:()=>nn,map:()=>AC,nan:()=>dC,nativeEnum:()=>PC,never:()=>xC,null:()=>yC,nullable:()=>BC,number:()=>qg,object:()=>_C,objectUtil:()=>qa,oboolean:()=>zC,onumber:()=>VC,optional:()=>jC,ostring:()=>qC,pipeline:()=>GC,preprocess:()=>UC,promise:()=>MC,quotelessJson:()=>Fk,record:()=>CC,set:()=>IC,setErrorMap:()=>Bk,strictObject:()=>EC,string:()=>Gg,symbol:()=>hC,transformer:()=>FC,tuple:()=>kC,undefined:()=>gC,union:()=>TC,unknown:()=>wC,util:()=>N,void:()=>SC});var N;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var qa;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(qa||(qa={}));var w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),He=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(e)?w.array:e===null?w.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?w.promise:typeof Map<"u"&&e instanceof Map?w.map:typeof Set<"u"&&e instanceof Set?w.set:typeof Date<"u"&&e instanceof Date?w.date:w.object;default:return w.unknown}};var m=N.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Fk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),le=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var jk=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===w.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,N.assertNever(e)}return{message:r}},rt=jk;var Dg=rt;function Bk(e){Dg=e}function hr(){return Dg}var nn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Uk=[];function y(e,t){let r=hr(),n=nn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===rt?void 0:rt].filter(s=>!!s)});e.common.issues.push(n)}var ee=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return R;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return R;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},R=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Xs=e=>e.status==="aborted",Ks=e=>e.status==="dirty",mt=e=>e.status==="valid",gr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Js=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Pg=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},sn,on,Oe=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Lg=(e,t)=>{if(mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{let{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var L=class{get description(){return this._def.description}_getType(t){return He(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Lg(n,s)}"~validate"(t){var n,s;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return mt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>mt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(gr(s)?s:Promise.resolve(s));return Lg(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Re({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Te.create(this,this._def)}nullable(){return Ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this)}promise(){return yt.create(this,this._def)}or(t){return Nt.create([this,t],this._def)}and(t){return Pt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new an({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gt({...$(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return cn.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Gk=/^c[^\s-]{8,}$/i,qk=/^[0-9a-z]+$/,Vk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wk=/^[a-z0-9_-]{21}$/i,Hk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Yk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Va,Kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",nC=new RegExp(`^${Mg}$`);function Fg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function sC(e){return new RegExp(`^${Fg(e)}$`)}function jg(e){let t=`${Mg}T${Fg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function oC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}function iC(e,t){if(!Hk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function aC(e,t){return!!((t==="v4"||!t)&&Jk.test(e)||(t==="v6"||!t)&&eC.test(e))}var ht=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.string,received:o.parsedType}),R}let n=new ee,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Yk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Va||(Va=new RegExp(Xk,"u")),Va.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Wk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Gk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?jg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?nC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?sC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?oC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?iC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?aC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):N.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ht.create=e=>new ht({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function cC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return o%i/10**s}var Ct=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==w.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.number,received:o.parsedType}),R}let n,s=new ee;for(let o of this._def.checks)o.kind==="int"?N.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?cC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==w.bigint)return this._getInvalidInput(t);let n,s=new ee;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.bigint,received:r.parsedType}),R}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};At.create=e=>new At({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var It=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==w.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.boolean,received:n.parsedType}),R}return re(t.data)}};It.create=e=>new It({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var $t=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==w.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.date,received:o.parsedType}),R}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),R}let n=new ee,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};$t.create=e=>new $t({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==w.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.symbol,received:n.parsedType}),R}return re(t.data)}};br.create=e=>new br({typeName:k.ZodSymbol,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.undefined,received:n.parsedType}),R}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodUndefined,...$(e)});var Lt=class extends L{_parse(t){if(this._getType(t)!==w.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.null,received:n.parsedType}),R}return re(t.data)}};Lt.create=e=>new Lt({typeName:k.ZodNull,...$(e)});var gt=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};gt.create=e=>new gt({typeName:k.ZodAny,...$(e)});var st=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};st.create=e=>new st({typeName:k.ZodUnknown,...$(e)});var Me=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.never,received:r.parsedType}),R}};Me.create=e=>new Me({typeName:k.ZodNever,...$(e)});var wr=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.void,received:n.parsedType}),R}return re(t.data)}};wr.create=e=>new wr({typeName:k.ZodVoid,...$(e)});var ot=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==w.array)return y(r,{code:m.invalid_type,expected:w.array,received:r.parsedType}),R;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Oe(r,i,r.path,a)))).then(i=>ee.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Oe(r,i,r.path,a)));return ee.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};ot.create=(e,t)=>new ot({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function yr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(yr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof ot?new ot({...e._def,type:yr(e.element)}):e instanceof Te?Te.create(yr(e.unwrap())):e instanceof Ye?Ye.create(yr(e.unwrap())):e instanceof Ze?Ze.create(e.items.map(t=>yr(t))):e}var fe=class e extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=N.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==w.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:w.object,received:u.parsedType}),R}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Oe(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Me){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Oe(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,d=await l.value;u.push({key:f,value:d,alwaysSet:l.alwaysSet})}return u}).then(u=>ee.mergeObjectSync(n,u)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i;let s=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of N.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of N.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return yr(this)}partial(t){let r={};for(let n of N.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of N.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Te;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return Bg(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});var Nt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new le(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),R}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new le(c));return y(r,{code:m.invalid_union,unionErrors:a}),R}}get options(){return this._def.options}};Nt.create=(e,t)=>new Nt({options:e,typeName:k.ZodUnion,...$(t)});var nt=e=>e instanceof Mt?nt(e.schema):e instanceof Re?nt(e.innerType()):e instanceof Ft?[e.value]:e instanceof jt?e.options:e instanceof Bt?N.objectValues(e.enum):e instanceof Ut?nt(e._def.innerType):e instanceof Dt?[void 0]:e instanceof Lt?[null]:e instanceof Te?[void 0,...nt(e.unwrap())]:e instanceof Ye?[null,...nt(e.unwrap())]:e instanceof an||e instanceof qt?nt(e.unwrap()):e instanceof Gt?nt(e._def.innerType):[],Qs=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.object)return y(r,{code:m.invalid_type,expected:w.object,received:r.parsedType}),R;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=nt(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function za(e,t){let r=He(e),n=He(t);if(e===t)return{valid:!0,data:e};if(r===w.object&&n===w.object){let s=N.objectKeys(t),o=N.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=za(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=za(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===w.date&&n===w.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Pt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Xs(o)||Xs(i))return R;let a=za(o.value,i.value);return a.valid?((Ks(o)||Ks(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pt.create=(e,t,r)=>new Pt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var Ze=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.array)return y(n,{code:m.invalid_type,expected:w.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Oe(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ee.mergeArray(r,i)):ee.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ze.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ze({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var eo=class e extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.object)return y(n,{code:m.invalid_type,expected:w.object,received:n.parsedType}),R;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Oe(n,a,n.path,a)),value:i._parse(new Oe(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ee.mergeObjectAsync(r,s):ee.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof L?new e({keyType:t,valueType:r,typeName:k.ZodRecord,...$(n)}):new e({keyType:ht.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},xr=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.map)return y(n,{code:m.invalid_type,expected:w.map,received:n.parsedType}),R;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Oe(n,a,n.path,[u,"key"])),value:o._parse(new Oe(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};xr.create=(e,t,r)=>new xr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var Sr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.set)return y(n,{code:m.invalid_type,expected:w.set,received:n.parsedType}),R;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Oe(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Sr.create=(e,t)=>new Sr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var to=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.function)return y(r,{code:m.invalid_type,expected:w.function,received:r.parsedType}),R;function n(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof yt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})})}else{let a=this;return re(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new le([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new le([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ze.create(t).rest(st.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Ze.create([]).rest(st.create()),returns:r||st.create(),typeName:k.ZodFunction,...$(n)})}},Mt=class extends L{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Mt.create=(e,t)=>new Mt({getter:e,typeName:k.ZodLazy,...$(t)});var Ft=class extends L{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ft.create=(e,t)=>new Ft({value:e,typeName:k.ZodLiteral,...$(t)});function Bg(e,t){return new jt({values:e,typeName:k.ZodEnum,...$(t)})}var jt=class e extends L{constructor(){super(...arguments),sn.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:m.invalid_type}),R}if(Js(this,sn,"f")||Pg(this,sn,new Set(this._def.values),"f"),!Js(this,sn,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),R}return re(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};sn=new WeakMap;jt.create=Bg;var Bt=class extends L{constructor(){super(...arguments),on.set(this,void 0)}_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==w.string&&n.parsedType!==w.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),R}if(Js(this,on,"f")||Pg(this,on,new Set(N.getValidEnumValues(this._def.values)),"f"),!Js(this,on,"f").has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),R}return re(t.data)}get enum(){return this._def.values}};on=new WeakMap;Bt.create=(e,t)=>new Bt({values:e,typeName:k.ZodNativeEnum,...$(t)});var yt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:w.promise,received:r.parsedType}),R;let n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};yt.create=(e,t)=>new yt({type:e,typeName:k.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return R;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?R:c.status==="dirty"?kt(c.value):r.value==="dirty"?kt(c.value):c});{if(r.value==="aborted")return R;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?R:a.status==="dirty"?kt(a.value):r.value==="dirty"?kt(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mt(i))return i;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>mt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:k.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...$(r)});var Te=class extends L{_parse(t){return this._getType(t)===w.undefined?re(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:k.ZodOptional,...$(t)});var Ye=class extends L{_parse(t){return this._getType(t)===w.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ye.create=(e,t)=>new Ye({innerType:e,typeName:k.ZodNullable,...$(t)});var Ut=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Gt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gr(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var vr=class extends L{_parse(t){if(this._getType(t)!==w.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.nan,received:n.parsedType}),R}return{status:"valid",value:t.data}}};vr.create=e=>new vr({typeName:k.ZodNaN,...$(e)});var uC=Symbol("zod_brand"),an=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},cn=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?R:o.status==="dirty"?(r.dirty(),kt(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?R:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:k.ZodPipeline})}},qt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(mt(s)&&(s.value=Object.freeze(s.value)),s);return gr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};qt.create=(e,t)=>new qt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Ng(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Ug(e,t={},r){return e?gt.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Ng(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Ng(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):gt.create()}var lC={object:fe.lazycreate},k;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(k||(k={}));var fC=(e,t={message:`Input not instance of ${e.name}`})=>Ug(r=>r instanceof e,t),Gg=ht.create,qg=Ct.create,dC=vr.create,pC=At.create,Vg=It.create,mC=$t.create,hC=br.create,gC=Dt.create,yC=Lt.create,bC=gt.create,wC=st.create,xC=Me.create,SC=wr.create,vC=ot.create,_C=fe.create,EC=fe.strictCreate,TC=Nt.create,OC=Qs.create,RC=Pt.create,kC=Ze.create,CC=eo.create,AC=xr.create,IC=Sr.create,$C=to.create,DC=Mt.create,LC=Ft.create,NC=jt.create,PC=Bt.create,MC=yt.create,FC=Re.create,jC=Te.create,BC=Ye.create,UC=Re.createWithPreprocess,GC=cn.create,qC=()=>Gg().optional(),VC=()=>qg().optional(),zC=()=>Vg().optional(),WC={string:e=>ht.create({...e,coerce:!0}),number:e=>Ct.create({...e,coerce:!0}),boolean:e=>It.create({...e,coerce:!0}),bigint:e=>At.create({...e,coerce:!0}),date:e=>$t.create({...e,coerce:!0})};var HC=R;var zg=Fe.object({list:Fe.boolean().optional(),log:Fe.boolean().optional(),track:Fe.boolean().optional(),parser:Fe.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Fe.string().optional(),ignoreConfig:Fe.string().optional(),match:Fe.any().optional()});var So=q(sy(),1),yo=q(Ya(),1),Ab=require("child_process"),pw=q(Ka(),1),Rr=q(Ka(),1),jw=require("node:events"),wo=Object.defineProperty,EA=Object.defineProperties,TA=Object.getOwnPropertyDescriptor,OA=Object.getOwnPropertyDescriptors,yc=Object.getOwnPropertyNames,oy=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,RA=Object.prototype.propertyIsEnumerable,iy=(e,t,r)=>t in e?wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))Fy.call(t,r)&&iy(e,r,t[r]);if(oy)for(var r of oy(t))RA.call(t,r)&&iy(e,r,t[r]);return e},fn=(e,t)=>EA(e,OA(t)),g=(e,t)=>function(){return e&&(t=(0,e[yc(e)[0]])(e=0)),t},kA=(e,t)=>function(){return t||(0,e[yc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)wo(e,r,{get:t[r],enumerable:!0})},CA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of yc(t))!Fy.call(e,s)&&s!==r&&wo(e,s,{get:()=>t[s],enumerable:!(n=TA(t,s))||n.enumerable});return e},V=e=>CA(wo({},"__esModule",{value:!0}),e),ln=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function AA(...e){let t=new String(e);return xo.set(t,e),t}function ho(e){return e instanceof String&&xo.has(e)}function ay(e){return xo.get(e)||[]}var xo,hn=g({"src/lib/args/pathspec.ts"(){"use strict";xo=new WeakMap}}),at,wt=g({"src/lib/errors/git-error.ts"(){"use strict";at=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),gn,Cr=g({"src/lib/errors/git-response-error.ts"(){"use strict";wt(),gn=class extends at{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),jy,By=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";wt(),jy=class extends at{constructor(e){super(void 0,e)}}}});function Uy(e){return typeof e=="function"?e:Zt}function Gy(e){return typeof e=="function"&&e!==Zt}function qy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Vy(e,t=0){return zy(e)&&e.length>t?e[t]:void 0}function Ht(e,t=0){if(zy(e)&&e.length>t)return e[e.length-1-t]}function zy(e){return!!(e&&typeof e.length=="number")}function yn(e="",t=!0,r=`
56
- `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function bc(e,t){return yn(e,!0).map(r=>t(r))}function wc(e){return(0,So.exists)(e,So.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Wy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function vo(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Xe(e){return Array.isArray(e)?e:[e]}function Hy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Zy(e){return Xe(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function dn(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function pn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Yy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function sc(e=0){return new Promise(t=>setTimeout(t,e))}function oc(e){if(e!==!1)return e}var kr,Zt,bn,_o=g({"src/lib/utils/util.ts"(){"use strict";kr="\0",Zt=()=>{},bn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ke(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function xc(e,t){let r=ho(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Sc(e){return!!e&&bn(e)==="[object Object]"}function Xy(e){return typeof e=="function"}var wn,ne,Ky,go,vc,Jy=g({"src/lib/utils/argument-filters.ts"(){"use strict";_o(),hn(),wn=e=>Array.isArray(e),ne=e=>typeof e=="string",Ky=e=>Array.isArray(e)&&e.every(ne),go=e=>ne(e)||Array.isArray(e)&&e.every(ne),vc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),ic,IA=g({"src/lib/utils/exit-codes.ts"(){"use strict";ic=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(ic||{})}}),mn,$A=g({"src/lib/utils/git-output-streams.ts"(){"use strict";mn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new mn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,bt,DA=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},bt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Qy(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},eb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var eb,LA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";eb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function _c(e,t=[]){return Sc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return ho(s)?r.push(s):xc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function de(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return _c(Ec(e),n),r||n.push(...NA(e)),n}function NA(e){let t=typeof Ht(e)=="function";return Ke(Ht(e,t?1:0),wn,[])}function Ec(e){let t=Xy(Ht(e));return Ke(Ht(e,t?1:0),Sc)}function z(e,t=!0){let r=Uy(Ht(e));return t||Gy(r)?r:void 0}var PA=g({"src/lib/utils/task-options.ts"(){"use strict";Jy(),_o(),hn()}});function ac(e,t){return e(t.stdOut,t.stdErr)}function me(e,t,r,n=!0){return Xe(r).forEach(s=>{for(let o=yn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var MA=g({"src/lib/utils/task-parser.ts"(){"use strict";_o()}}),tb={};Z(tb,{ExitCodes:()=>ic,GitOutputStreams:()=>mn,LineParser:()=>I,NOOP:()=>Zt,NULL:()=>kr,RemoteLineParser:()=>bt,append:()=>F,appendTaskOptions:()=>_c,asArray:()=>Xe,asCamelCase:()=>Hy,asFunction:()=>Uy,asNumber:()=>U,asStringArray:()=>Zy,bufferToString:()=>pn,callTaskParser:()=>ac,createInstanceConfig:()=>Qy,delay:()=>sc,filterArray:()=>wn,filterFunction:()=>Xy,filterHasLength:()=>vc,filterPlainObject:()=>Sc,filterPrimitives:()=>xc,filterString:()=>ne,filterStringArray:()=>Ky,filterStringOrStringArray:()=>go,filterType:()=>Ke,first:()=>Vy,folderExists:()=>wc,forEachLineWithContent:()=>bc,getTrailingOptions:()=>de,including:()=>Wy,isUserFunction:()=>Gy,last:()=>Ht,objectToString:()=>bn,orVoid:()=>oc,parseStringResponse:()=>me,pick:()=>Yy,prefixedArray:()=>dn,remove:()=>vo,splitOn:()=>qy,toLinesWithContent:()=>yn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>Ec});var C=g({"src/lib/utils/index.ts"(){"use strict";Jy(),IA(),$A(),DA(),LA(),PA(),MA(),_o()}}),rb={};Z(rb,{CheckRepoActions:()=>cc,checkIsBareRepoTask:()=>sb,checkIsRepoRootTask:()=>nb,checkIsRepoTask:()=>FA});function FA(e){switch(e){case"bare":return sb();case"root":return nb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Eo,parser:Tc}}function nb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Eo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function sb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Eo,parser:Tc}}function jA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var cc,Eo,Tc,ob=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),cc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(cc||{}),Eo=({exitCode:e},t,r,n)=>{if(e===128&&jA(t))return r(Buffer.from("false"));n(t)},Tc=e=>e.trim()==="true"}});function BA(e,t){let r=new ib(e),n=e?cb:ab;return yn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(ub.test(o)?r.folders:r.files).push(o)}),r}var ib,ab,cb,ub,UA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ib=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},ab=/^[a-z]+\s*/i,cb=/^[a-z]+\s+[a-z]+\s*/i,ub=/\/$/}}),uc={};Z(uc,{EMPTY_COMMANDS:()=>To,adhocExecTask:()=>lb,configurationErrorTask:()=>pe,isBufferTask:()=>db,isEmptyTask:()=>pb,straightThroughBufferTask:()=>fb,straightThroughStringTask:()=>ae});function lb(e){return{commands:To,format:"empty",parser:e}}function pe(e){return{commands:To,format:"empty",parser(){throw typeof e=="string"?new jy(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function fb(e){return{commands:e,format:"buffer",parser(t){return t}}}function db(e){return e.format==="buffer"}function pb(e){return e.format==="empty"||!e.commands.length}var To,H=g({"src/lib/tasks/task.ts"(){"use strict";By(),To=[]}}),mb={};Z(mb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Oc,CONFIG_ERROR_MODE_REQUIRED:()=>Rc,CONFIG_ERROR_UNKNOWN_OPTION:()=>kc,CleanOptions:()=>lo,cleanTask:()=>hb,cleanWithOptionsTask:()=>GA,isCleanOptionsArray:()=>qA});function GA(e,t){let{cleanMode:r,options:n,valid:s}=VA(e);return r?s.options?(n.push(...t),n.some(HA)?pe(Oc):hb(r,n)):pe(kc+JSON.stringify(e)):pe(Rc)}function hb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return BA(e==="n",n)}}}function qA(e){return Array.isArray(e)&&e.every(t=>Cc.has(t))}function VA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{zA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&WA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function zA(e){return e==="f"||e==="n"}function WA(e){return/^-[a-z]$/i.test(e)&&Cc.has(e.charAt(1))}function HA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Oc,Rc,kc,lo,Cc,gb=g({"src/lib/tasks/clean.ts"(){"use strict";UA(),C(),H(),Oc="Git clean interactive mode is not supported",Rc='Git clean mode parameter ("n" or "f") is required',kc="Git clean unknown option found in: ",lo=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(lo||{}),Cc=new Set(["i",...Zy(Object.values(lo))])}});function ZA(e){let t=new bb;for(let r of yb(e))t.addValue(r.file,String(r.key),r.value);return t}function YA(e,t){let r=null,n=[],s=new Map;for(let o of yb(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function XA(e){return e.replace(/^(file):/,"")}function*yb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=XA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
- `)){let c=qy(i,`
58
- `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var bb,KA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),bb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=Ht(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Ja(e,t){return typeof e=="string"&&lc.hasOwnProperty(e)?e:t}function JA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function QA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return YA(n,e)}}}function eI(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return ZA(r)}}}function tI(){return{addConfig(e,t,...r){return this._runTask(JA(e,t,r[0]===!0,Ja(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(QA(e,Ja(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(eI(Ja(e[0],void 0)),z(arguments))}}}var lc,wb=g({"src/lib/tasks/config.ts"(){"use strict";KA(),C(),lc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(lc||{})}});function rI(e){return xb.has(e)}var Qa,xb,Sb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Qa=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Qa||{}),xb=new Set(Object.values(Qa))}});function nI(...e){return new _b().param(...e)}function sI(e){let t=new Set,r={};return bc(e,n=>{let[s,o,i]=n.split(kr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function oI(){return{grep(e){let t=z(arguments),r=de(arguments);for(let s of vb)if(r.includes(s))return this._runTask(pe(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=nI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return sI(s)}},t)}}}var vb,un,cy,_b,Eb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),vb=["-h"],un=Symbol("grepQuery"),_b=class{constructor(){this[cy]=[]}*[(cy=un,Symbol.iterator)](){for(let e of this[un])yield e}and(...e){return e.length&&this[un].push("--and","(",...dn(e,"-e"),")"),this}param(...e){return this[un].push(...dn(e,"-e")),this}}}}),Tb={};Z(Tb,{ResetMode:()=>fo,getResetMode:()=>aI,resetTask:()=>iI});function iI(e,t){let r=["reset"];return Ob(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function aI(e){if(Ob(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Ob(e){return Rb.includes(e)}var fo,Rb,kb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),fo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(fo||{}),Rb=Array.from(Object.values(fo))}});function cI(){return(0,yo.default)("simple-git")}function uy(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function uI(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Ac(e,t,r,n=cI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=uI(Ke(t,ne),i,n);return u(r);function c(l,f){return F(o,Ac(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",d=i&&uy(i,f)||Zt,p=uy(n,`${s} ${f}`,d);return Object.assign(i?d:p,{label:e,sibling:c,info:p,step:u})}}var Cb=g({"src/lib/git-logger.ts"(){"use strict";C(),yo.default.formatters.L=e=>String(vc(e)?e.length:"-"),yo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):bn(e)}}),co,fc,lI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";wt(),Cb(),co=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=co.getName(e.commands[0]),r=Ac(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new at(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++co.counter}`}},fc=co,fc.counter=0}});function Wt(e,t){return{method:Vy(e.commands)||"",commands:t}}function fI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function ly(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var dc,dI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";wt(),H(),C(),lI(),dc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new fc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return ln(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield pb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof at?Object.assign(t,{task:e}):new at(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return ln(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Wt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Wt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),db(e)?ac(e.parser,o):ac(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return ln(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Wt(e,t)),r));if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",bn(f)),c(new mn(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new mn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return ln(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Wt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,r)),{kill(d){l=d||l}}));let f=(0,Ab.spawn)(t,r,i);f.stdout.on("data",ly(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",ly(u,"stdErr",s,o.step("stdErr"))),f.on("error",fI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,fn(Ce({},Wt(e,r)),{spawned:f,close(d,p){a({stdOut:c,stdErr:u,exitCode:d,rejection:l||p})},kill(d){f.killed||(l=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,t)),{kill(n){r=n||r}})),r}}}}),Ib={};Z(Ib,{GitExecutor:()=>$b});var $b,pI=g({"src/lib/runners/git-executor.ts"(){"use strict";dI(),$b=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new dc(this,this._scheduler,this._plugins)}chain(){return new dc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function mI(e,t,r=Zt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof gn?hI(o):o,void 0)};t.then(n,s)}function hI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Zt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var gI=g({"src/lib/task-callback.ts"(){"use strict";Cr(),C()}});function fy(e,t){return lb(r=>{if(!wc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var yI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function ec(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=vo(t,"-B")),ae(t)}function bI(){return{checkout(){return this._runTask(ec(de(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(ec(["-b",e,t,...de(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(ec(["-b",e,...de(arguments)]),z(arguments))}}}var wI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function xI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function SI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return me(xI(),[Db],e)}})}}}var Db,vI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Db=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Hy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function _I(e){return me({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Lb,e)}var Lb,EI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Lb=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function TI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...dn(e,"-m"),...t,...r],format:"utf-8",parser:_I}}function OI(){return{commit(t,...r){let n=z(arguments),s=e(t)||TI(Xe(t),Xe(Ke(r[0],go,[])),[...Ke(r[1],wn,[]),...de(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!go(t)&&pe("git.commit: requires the commit message to be supplied as a string/string[]")}}var RI=g({"src/lib/tasks/commit.ts"(){"use strict";EI(),C(),H()}});function kI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var CI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function AI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var II=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function $I(e,t,r){let n=String(r).trim(),s;if(s=Nb.exec(n))return new po(e,t,!1,s[1]);if(s=Pb.exec(n))return new po(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new po(e,t,/^re/i.test(n),o)}var po,Nb,Pb,DI=g({"src/lib/responses/InitSummary.ts"(){"use strict";po=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Nb=/^Init.+ repository in (.+)$/,Pb=/^Rein.+ in (.+)$/}});function LI(e){return e.includes(Ic)}function NI(e=!1,t,r){let n=["init",...r];return e&&!LI(n)&&n.splice(1,0,Ic),{commands:n,format:"utf-8",parser(s){return $I(n.includes("--bare"),t,s)}}}var Ic,PI=g({"src/lib/tasks/init.ts"(){"use strict";DI(),Ic="--bare"}});function $c(e){for(let t=0;t<e.length;t++){let r=Dc.exec(e[t]);if(r)return`--${r[1]}`}return""}function MI(e){return Dc.test(e)}var Dc,xn=g({"src/lib/args/log-format.ts"(){"use strict";Dc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Mb,FI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Mb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Fb(e=""){let t=jb[e];return r=>me(new Mb,t,r,!1)}var tc,dy,py,my,jb,Bb=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";xn(),FI(),Sb(),C(),tc=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],dy=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],py=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],my=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:oc(rI(t)&&t),from:oc(!!o&&n!==o&&n),similarity:U(r)})})],jb={"":tc,"--stat":tc,"--numstat":dy,"--name-status":my,"--name-only":py}}});function jI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Ub(e=Pc,t=Gb,r=""){let n=Fb(r);return function(s){let o=yn(s.trim(),!1,Lc).map(function(i){let a=i.split(Nc),c=jI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var Lc,Nc,Pc,Gb,qb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Bb(),xn(),Lc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Nc=" \xF2\xF2",Pc=" \xF2 ",Gb=["hash","date","message","refs","author_name","author_email"]}}),Vb={};Z(Vb,{diffSummaryTask:()=>BI,validateLogFormatConfig:()=>Oo});function BI(e){let t=$c(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Oo(r)||{commands:r,format:"utf-8",parser:Fb(t)}}function Oo(e){let t=e.filter(MI);if(t.length>1)return pe(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return pe(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Mc=g({"src/lib/tasks/diff.ts"(){"use strict";xn(),Bb(),H()}});function UI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function GI(e){return Object.keys(e).reduce((t,r)=>(r in pc||(t[r]=e[r]),t),{})}function zb(e={},t=[]){let r=Ke(e.splitter,ne,Pc),n=!xc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=UI(n,r),i=[],a=[`--pretty=format:${Lc}${o}${Nc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return ne(e.file)&&a.push("--follow",AA(e.file)),_c(GI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function qI(e,t,r){let n=Ub(e,t,$c(r));return{commands:["log",...r],format:"utf-8",parser:n}}function VI(){return{log(...r){let n=z(arguments),s=zb(Ec(arguments),Ke(arguments[0],wn)),o=t(...r)||Oo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return qI(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&pe("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var pc,Wb=g({"src/lib/tasks/log.ts"(){"use strict";xn(),hn(),qb(),C(),H(),Mc(),pc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(pc||{})}}),mo,Hb,zI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";mo=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Hb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),mc,Zb,WI=g({"src/lib/responses/PullSummary.ts"(){"use strict";mc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Zb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function rc(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function hy(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Yb,HI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Yb=[new bt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=rc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=rc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=rc(e.remoteMessages);s.total=hy(t),s.reused=hy(r),s.packReused=U(n)})]}});function Xb(e,t){return me({remoteMessages:new Jb},Kb,t)}var Kb,Jb,Qb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),HI(),Kb=[new bt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Yb,new bt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new bt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Jb=class{constructor(){this.all=[]}}}});function ZI(e,t){let r=me(new Zb,ew,[e,t]);return r.message&&r}var gy,yy,by,wy,ew,xy,Fc,tw=g({"src/lib/parsers/parse-pull.ts"(){"use strict";WI(),C(),Qb(),gy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,yy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,by=/^(create|delete) mode \d+ (.+)/,wy=[new I(gy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(yy,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(by,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],ew=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],xy=(e,t)=>me(new mc,wy,[e,t]),Fc=(e,t)=>Object.assign(new mc,xy(e,t),Xb(e,t))}}),Sy,rw,vy,YI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";zI(),C(),tw(),Sy=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new mo(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new mo(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new mo(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],rw=(e,t)=>Object.assign(vy(e,t),Fc(e,t)),vy=e=>me(new Hb,Sy,e)}});function _y(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=rw(t,r);if(n.failed)throw new gn(n);return n}}:pe("Git.merge requires at least one option")}var XI=g({"src/lib/tasks/merge.ts"(){"use strict";Cr(),YI(),H()}});function KI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var Ey,nw,Ty,JI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Qb(),Ey=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=fn(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(KI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=fn(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],nw=(e,t)=>{let r=Ty(e,t),n=Xb(e,t);return Ce(Ce({},r),n)},Ty=(e,t)=>me({pushed:[]},Ey,[e,t])}}),sw={};Z(sw,{pushTagsTask:()=>QI,pushTask:()=>jc});function QI(e={},t){return F(t,"--tags"),jc(e,t)}function jc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),vo(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:nw}}var ow=g({"src/lib/tasks/push.ts"(){"use strict";JI(),C()}});function e1(){return{showBuffer(){let e=["show",...de(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(fb(e),z(arguments))},show(){let e=["show",...de(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var t1=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),Oy,iw,r1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Oy=/^(.+)\0(.+)$/,iw=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Oy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function Ry(e){let[t,r]=e.split(kr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function nc(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function n1(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=aw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new iw(i,s,o))}}var ky,aw,cw,s1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),r1(),ky=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},aw=new Map([be(" ","A",(e,t)=>F(e.created,t)),be(" ","D",(e,t)=>F(e.deleted,t)),be(" ","M",(e,t)=>F(e.modified,t)),be("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),be("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),be("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),be("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("R"," ",(e,t)=>{F(e.renamed,Ry(t))}),be("R","M",(e,t)=>{let r=Ry(t);F(e.renamed,r),F(e.modified,r.to)}),be("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),be("?","?",(e,t)=>F(e.not_added,t)),...nc("A","A","U"),...nc("D","D","U"),...nc("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),cw=function(e){let t=e.split(kr),r=new ky;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=kr+(t[n++]||"")),n1(r,o))}return r}}});function o1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!uw.includes(r))],parser(r){return cw(r)}}}var uw,i1=g({"src/lib/tasks/status.ts"(){"use strict";s1(),uw=["--null","-z"]}});function bo(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function a1(){return bo(0,0,0,"",!1)}function c1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:u1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Bc));n(t)}})}}}function u1(e){return e===Bc?a1():me(bo(0,0,0,e),lw,e)}var Bc,lw,l1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Bc="installed=false",lw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,bo(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,bo(U(t),U(r),n,s))})]}}),fw={};Z(fw,{SimpleGitApi:()=>hc});var hc,f1=g({"src/lib/simple-git-api.ts"(){"use strict";gI(),yI(),wI(),vI(),RI(),wb(),CI(),Eb(),II(),PI(),Wb(),XI(),ow(),t1(),i1(),H(),l1(),C(),hc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&mI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...Xe(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(fy(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(fy(e.path,e.root&&this._executor||void 0),t):this._runTask(pe("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(AI(e,t===!0),z(arguments))}init(e){return this._runTask(NI(e===!0,this._executor.cwd,de(arguments)),z(arguments))}merge(){return this._runTask(_y(de(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(_y([e,t,...de(arguments)]),z(arguments,!1)):this._runTask(pe("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=jc({remote:Ke(arguments[0],ne),branch:Ke(arguments[1],ne)},de(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...de(arguments)]),z(arguments))}status(){return this._runTask(o1(de(arguments)),z(arguments))}},Object.assign(hc.prototype,bI(),OI(),tI(),SI(),kI(),oI(),VI(),e1(),c1())}}),dw={};Z(dw,{Scheduler:()=>mw});var Cy,mw,d1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),Cb(),Cy=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,pw.createDeferred)();return{promise:t,done:r,id:e}}})(),mw=class{constructor(e=2){this.concurrency=e,this.logger=Ac("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),vo(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Cy());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),hw={};Z(hw,{applyPatchTask:()=>p1});function p1(e,t){return ae(["apply",...t,...e])}var m1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function h1(e,t){return{branch:e,hash:t,success:!0}}function g1(e){return{branch:e,hash:null,success:!1}}var gw,y1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";gw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function yw(e,t){return t===1&&gc.test(e)}var Ay,gc,Iy,Ro,b1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";y1(),C(),Ay=/(\S+)\s+\(\S+\s([^)]+)\)/,gc=/^error[^']+'([^']+)'/m,Iy=[new I(Ay,(e,[t,r])=>{let n=h1(t,r);e.all.push(n),e.branches[t]=n}),new I(gc,(e,[t])=>{let r=g1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Ro=(e,t)=>me(new gw,Iy,[e,t])}}),bw,w1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";bw=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function $y(e){return e?e.charAt(0):""}function ww(e){return me(new bw,xw,e)}var xw,x1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";w1(),C(),xw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push($y(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push($y(t),!1,r,n,s)})]}}),Sw={};Z(Sw,{branchLocalTask:()=>v1,branchTask:()=>S1,containsDeleteBranchCommand:()=>vw,deleteBranchTask:()=>E1,deleteBranchesTask:()=>_1});function vw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function S1(e){let t=vw(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?Ro(n,s).all[0]:ww(n)}}}function v1(){return{format:"utf-8",commands:["branch","-v"],parser:ww}}function _1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Ro(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!yw(String(s),r))return i(s);o(n)}}}function E1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return Ro(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!yw(String(i),n))return c(i);throw new gn(r.parser(pn(o),pn(s)),String(i))}};return r}var T1=g({"src/lib/tasks/branch.ts"(){"use strict";Cr(),b1(),x1(),C()}}),_w,O1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";_w=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Ew={};Z(Ew,{checkIgnoreTask:()=>R1});function R1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:_w}}var k1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";O1()}}),Tw={};Z(Tw,{cloneMirrorTask:()=>A1,cloneTask:()=>Ow});function C1(e){return/^--upload-pack(=|$)/.test(e)}function Ow(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(C1)?pe("git.fetch: potential exploit argument blocked."):ae(n)}function A1(e,t,r){return F(r,"--mirror"),Ow(e,t,r)}var I1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function $1(e,t){return me({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Rw,[e,t])}var Rw,D1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),Rw=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),kw={};Z(kw,{fetchTask:()=>N1});function L1(e){return/^--upload-pack(=|$)/.test(e)}function N1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(L1)?pe("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:$1}}var P1=g({"src/lib/tasks/fetch.ts"(){"use strict";D1(),H()}});function M1(e){return me({moves:[]},Cw,e)}var Cw,F1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Cw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Aw={};Z(Aw,{moveTask:()=>j1});function j1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:M1}}var B1=g({"src/lib/tasks/move.ts"(){"use strict";F1(),C()}}),Iw={};Z(Iw,{pullTask:()=>U1});function U1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return Fc(s,o)},onError(s,o,i,a){let c=ZI(pn(s.stdOut),pn(s.stdErr));if(c)return a(new gn(c));a(o)}}}var G1=g({"src/lib/tasks/pull.ts"(){"use strict";Cr(),tw(),C()}});function q1(e){let t={};return $w(e,([r])=>t[r]={name:r}),Object.values(t)}function V1(e){let t={};return $w(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function $w(e,t){bc(e,r=>t(r.split(/\s+/)))}var z1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Dw={};Z(Dw,{addRemoteTask:()=>W1,getRemotesTask:()=>H1,listRemotesTask:()=>Z1,remoteTask:()=>Y1,removeRemoteTask:()=>X1});function W1(e,t,r){return ae(["remote","add",...r,e,t])}function H1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?V1:q1}}function Z1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Y1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function X1(e){return ae(["remote","remove",e])}var K1=g({"src/lib/tasks/remote.ts"(){"use strict";z1(),H()}}),Lw={};Z(Lw,{stashListTask:()=>J1});function J1(e={},t){let r=zb(e),n=["stash","list",...r.commands,...t],s=Ub(r.splitter,r.fields,$c(n));return Oo(n)||{commands:n,format:"utf-8",parser:s}}var Q1=g({"src/lib/tasks/stash-list.ts"(){"use strict";xn(),qb(),Mc(),Wb()}}),Nw={};Z(Nw,{addSubModuleTask:()=>e$,initSubModuleTask:()=>t$,subModuleTask:()=>ko,updateSubModuleTask:()=>r$});function e$(e,t){return ko(["add",e,t])}function t$(e){return ko(["init",...e])}function ko(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function r$(e){return ko(["update",...e])}var n$=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function s$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Pw(e,t):0}function Pw(e,t){return e===t?0:e>t?1:-1}function o$(e){return e.trim()}function uo(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var Dy,Mw,i$=g({"src/lib/responses/TagList.ts"(){"use strict";Dy=class{constructor(e,t){this.all=e,this.latest=t}},Mw=function(e,t=!1){let r=e.split(`
59
- `).map(o$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return s$(uo(i[0]),uo(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Pw(uo(i[c]),uo(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new Dy(r,n)}}}),Fw={};Z(Fw,{addAnnotatedTagTask:()=>u$,addTagTask:()=>c$,tagListTask:()=>a$});function a$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Mw(r,t)}}}function c$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function u$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var l$=g({"src/lib/tasks/tag.ts"(){"use strict";i$()}}),f$=kA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(pI(),V(Ib)),{SimpleGitApi:n}=(f1(),V(fw)),{Scheduler:s}=(d1(),V(dw)),{configurationErrorTask:o}=(H(),V(uc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:d,trailingFunctionArgument:p,trailingOptionsArgument:b}=(C(),V(tb)),{applyPatchTask:T}=(m1(),V(hw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(T1(),V(Sw)),{checkIgnoreTask:X}=(k1(),V(Ew)),{checkIsRepoTask:we}=(ob(),V(rb)),{cloneTask:ce,cloneMirrorTask:Ae}=(I1(),V(Tw)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(gb(),V(mb)),{diffSummaryTask:Ar}=(Mc(),V(Vb)),{fetchTask:xt}=(P1(),V(kw)),{moveTask:Jw}=(B1(),V(Aw)),{pullTask:Qw}=(G1(),V(Iw)),{pushTagsTask:ex}=(ow(),V(sw)),{addRemoteTask:tx,getRemotesTask:rx,listRemotesTask:nx,remoteTask:sx,removeRemoteTask:ox}=(K1(),V(Dw)),{getResetMode:ix,resetTask:ax}=(kb(),V(Tb)),{stashListTask:cx}=(Q1(),V(Lw)),{addSubModuleTask:ux,initSubModuleTask:lx,subModuleTask:fx,updateSubModuleTask:dx}=(n$(),V(Nw)),{addAnnotatedTagTask:px,addTagTask:mx,tagListTask:hx}=(l$(),V(Fw)),{straightThroughBufferTask:gx,straightThroughStringTask:je}=(H(),V(uc));function O(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(O.prototype=Object.create(n.prototype)).constructor=O,O.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},O.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},O.prototype.stashList=function(h){return this._runTask(cx(b(arguments)||{},a(h)&&h||[]),p(arguments))};function Vc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),d(arguments))}O.prototype.clone=function(){return this._runTask(Vc("clone",ce,...arguments),p(arguments))},O.prototype.mirror=function(){return this._runTask(Vc("mirror",Ae,...arguments),p(arguments))},O.prototype.mv=function(h,E){return this._runTask(Jw(h,E),p(arguments))},O.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},O.prototype.pull=function(h,E,B,se){return this._runTask(Qw(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.fetch=function(h,E){return this._runTask(xt(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},O.prototype.tags=function(h,E){return this._runTask(hx(d(arguments)),p(arguments))},O.prototype.rebase=function(){return this._runTask(je(["rebase",...d(arguments)]),p(arguments))},O.prototype.reset=function(h){return this._runTask(ax(ix(h),d(arguments)),p(arguments))},O.prototype.revert=function(h){let E=p(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(je(["revert",...d(arguments,0,!0),h]),E)},O.prototype.addTag=function(h){let E=typeof h=="string"?mx(h):o("Git.addTag requires a tag name");return this._runTask(E,p(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(px(h,E),p(arguments))},O.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.branch=function(h,E){return this._runTask(P(d(arguments)),p(arguments))},O.prototype.branchLocal=function(h){return this._runTask(M(),p(arguments))},O.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...d(arguments,0,!0));var se=p(arguments);return B.length?this._runTask(je(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},O.prototype.submoduleAdd=function(h,E,B){return this._runTask(ux(h,E),p(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(dx(d(arguments,!0)),p(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(lx(d(arguments,!0)),p(arguments))},O.prototype.subModule=function(h,E){return this._runTask(fx(d(arguments)),p(arguments))},O.prototype.listRemote=function(){return this._runTask(nx(d(arguments)),p(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(tx(h,E,d(arguments)),p(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(ox(h),p(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(rx(h===!0),p(arguments))},O.prototype.remote=function(h,E){return this._runTask(sx(d(arguments)),p(arguments))},O.prototype.tag=function(h,E){let B=d(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(je(B),p(arguments))},O.prototype.updateServerInfo=function(h){return this._runTask(je(["update-server-info"]),p(arguments))},O.prototype.pushTags=function(h,E){let B=ex({remote:f(h,u)},d(arguments));return this._runTask(B,p(arguments))},O.prototype.rm=function(h){return this._runTask(je(["rm","-f",...i(h)]),p(arguments))},O.prototype.rmKeepLocal=function(h){return this._runTask(je(["rm","--cached",...i(h)]),p(arguments))},O.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},O.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},O.prototype._catFile=function(h,E){var B=p(E),se=["cat-file"],$e=E[0];if(typeof $e=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray($e)&&se.push.apply(se,$e);let Lo=h==="buffer"?gx(se):je(se);return this._runTask(Lo,B)},O.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):je(["diff",...d(arguments)]);return this._runTask(B,p(arguments))},O.prototype.diffSummary=function(){return this._runTask(Ar(d(arguments,1)),p(arguments))},O.prototype.applyPatch=function(h){let E=l(h)?T(i(h),d([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,p(arguments))},O.prototype.revparse=function(){let h=["rev-parse",...d(arguments,!0)];return this._runTask(je(h,!0),p(arguments))},O.prototype.clean=function(h,E,B){let se=xe(h),$e=se&&h.join("")||f(h,u)||"",Lo=d([].slice.call(arguments,se?1:0));return this._runTask(Ie($e,Lo),p(arguments))},O.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},O.prototype.clearQueue=function(){return this},O.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),p(arguments))},O.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),p(arguments))},t.exports=O}});hn();wt();var d$=class extends at{constructor(e,t){super(void 0,t),this.config=e}};wt();wt();var it=class extends at{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Cr();By();ob();gb();wb();Sb();Eb();kb();function p$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new it(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new it(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function m$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function h$(e,t){if(m$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new it(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function g$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new it(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new it(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new it(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function y$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||h$(s,i),t||g$(s,n.method)}),r}}}C();function b$(e){let t=dn(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Ly=(0,Rr.deferred)().promise;function w$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Rr.deferred)(),closeTimeout:(0,Rr.deferred)(),exit:(0,Rr.deferred)(),exitTimeout:(0,Rr.deferred)()},i=Promise.race([e===!1?Ly:o.closeTimeout.promise,t===!1?Ly:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>sc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return ln(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),d=!0,p=()=>void(d=!1);(u=a.stdout)==null||u.on("data",p),(l=a.stderr)==null||l.on("data",p),a.on("error",p),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,d&&(yield sc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var x$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ny="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function S$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Py(e,t){if(e.length<1||e.length>2)throw new it(void 0,"binary",x$);if(e.some(S$))if(t)console.warn(Ny);else throw new it(void 0,"binary",Ny);let[n,s]=e;return{binary:n,prefix:s}}function v$(e,t=["git"],r=!1){let n=Py(Xe(t),r);e.on("binary",s=>{n=Py(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}wt();function _$(e){return!!(e.exitCode&&e.stdErr.length)}function E$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function T$(e=!1,t=_$,r=E$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function My(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new at(void 0,n.toString("utf-8"))}:{error:n}}}}C();var O$=class{constructor(){this.plugins=new Set,this.events=new jw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Xe(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function R$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Wy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:k$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function k$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function C$(e){let t=Yy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function A$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,d;(f=s.spawned.stdout)==null||f.off("data",c),(d=s.spawned.stderr)==null||d.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new it(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}hn();function I$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(ho(o)){n(ay(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>ho(i)&&ay(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var $$=f$();function D$(e,t){var r;let n=new O$,s=Qy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!wc(s.baseDir))throw new d$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(b$(s.config)),n.add(y$(s.unsafe)),n.add(I$()),n.add(w$(s.completion)),s.abort&&n.add(p$(s.abort)),s.progress&&n.add(R$(s.progress)),s.timeout&&n.add(A$(s.timeout)),s.spawnOptions&&n.add(C$(s.spawnOptions)),n.add(My(T$(!0))),s.errors&&n.add(My(s.errors)),v$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new $$(s,n)}Cr();var Bw=D$;async function Uw(){let e=Bw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var zw=q(Vw()),Gc=zw.default.bold("@seed-design/codemod"),Ww=e=>({event:t,properties:r})=>console.log(Gc,t,r,e);var Xw=(0,$o.resolve)(__dirname,"transforms"),Zw=Xc(),Io=Hw(),Sn=null,Kw=null;function F$(){Uw().then(e=>{Kw=e,Sn=Ww({...e}),j$(Sn)})}function j$(e){B$(),Zw.version(Io.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=zg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=q$();s.list&&(qc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),qc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),qc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,$o.resolve)(Xw,t,"index.js");console.log(Gc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await G$(i,t,r,s)}),Zw.parse()}function B$(){(0,Do.satisfies)(process.versions.node,Io.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Io.engines.node}"
55
+ if (condition) { yield value; }`)};var ap=require("node:buffer"),cp=require("node:string_decoder");var Ss=(e,t,r)=>{if(r)return;if(e)return{transform:BE.bind(void 0,new TextEncoder)};let n=new cp.StringDecoder(t);return{transform:UE.bind(void 0,n),final:GE.bind(void 0,n)}},BE=function*(e,t){ap.Buffer.isBuffer(t)?yield Je(t):typeof t=="string"?yield e.encode(t):yield t},UE=function*(e,t){yield K(t)?e.write(t):t},GE=function*(e){let t=e.end();t!==""&&(yield t)};var ji=require("node:util"),Bi=(0,ji.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),vs=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=VE}=t[r];for await(let s of n(e))yield*vs(s,t,r+1)},up=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*qE(r,Number(t),e)},qE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*vs(n,r,t+1)},lp=(0,ji.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),VE=function*(e){yield e};var Ui=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},fp=(e,t)=>[...t.flatMap(r=>[...Et(r,e,0)]),...Gr(e)],Et=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=WE}=t[r];for(let s of n(e))yield*Et(s,t,r+1)},Gr=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*zE(r,Number(t),e)},zE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*Et(n,r,t+1)},WE=function*(e){yield e};var Gi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=dp(e,i,o),u=_t(t),l=_t(r),f=u?Bi.bind(void 0,vs,a):Ui.bind(void 0,Et),d=u||l?Bi.bind(void 0,up,a):Ui.bind(void 0,Gr),p=u||l?lp.bind(void 0,a):void 0;return{stream:new qr.Transform({writableObjectMode:n,writableHighWaterMark:(0,qr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,qr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){d([c],this,T)},destroy:p})}},_s=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=dp(i,r,a);e=fp(c,e)}return e},dp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:sp(n,a)},Ss(r,i,n),xs(r,o,n,c),{transform:e,final:t},{transform:op(s,a)},rp({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var pp=(e,t)=>{for(let r of HE(e))ZE(e,r,t)},HE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),ZE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${ft[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>YE(a,n));r.input=$r(i)},YE=(e,t)=>{let r=_s(e,t,"utf8",!0);return XE(r),$r(r)},XE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var Ts=require("node:fs");var Es=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Kt(r,n)&&!he.has(t)&&KE(n)&&(e.some(({type:s,value:o})=>s==="native"&&JE.has(o))||e.every(({type:s})=>ve.has(s))),KE=e=>e===1||e===2,JE=new Set(["pipe","overlapped"]),mp=async(e,t,r,n)=>{for await(let s of e)QE(t)||gp(s,r,n)},hp=(e,t,r)=>{for(let n of e)gp(n,t,r)},QE=e=>e._readableState.pipes.length>0,gp=(e,t,r)=>{let n=Pn(e);Be({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var yp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>eT({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},eT=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let d=hd(e,o,f),p=Je(d),{stdioItems:b,objectMode:T}=t[r],P=tT([p],b,c,n),{serializedResult:M,finalResult:j=M}=rT({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});nT({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&sT(M,b,s),Y}catch(X){return n.error=X,Y}},tT=(e,t,r,n)=>{try{return _s(e,t,r,!1)}catch(s){return n.error=s,e}},rT=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:$r(e)};let i=nu(e,r);return n[o]?{serializedResult:i,finalResult:Fi(i,!s[o],t)}:{serializedResult:i}},nT=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!Es({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Fi(e,!1,i);try{hp(a,t,n)}catch(c){r.error??=c}},sT=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ys.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,Ts.appendFileSync)(n,e):(r.add(o),(0,Ts.writeFileSync)(n,e))}};var bp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,tt(t,r,"all")]:Array.isArray(t)?[tt(e,r,"all"),...t]:K(e)&&K(t)?Go([e,t]):`${e}${t}`};var Os=require("node:events");var wp=async(e,t)=>{let[r,n]=await oT(e);return t.isForcefullyTerminated??=!1,[r,n]},oT=async e=>{let[t,r]=await Promise.allSettled([(0,Os.once)(e,"spawn"),(0,Os.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?xp(e):r.value},xp=async e=>{try{return await(0,Os.once)(e,"exit")}catch{return xp(e)}},Sp=async e=>{let[t,r]=await e;if(!iT(t,r)&&qi(t,r))throw new Le;return[t,r]},iT=(e,t)=>e===void 0&&t===void 0,qi=(e,t)=>e!==0||t!==null;var vp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=aT(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=md(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},aT=(e,t,r)=>e!==void 0?e:qi(t,r)?new Le:void 0;var Ep=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=cT(e,t,r),f=fT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ar(f,c,u)},cT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),a=uT(r),{file:c,commandArguments:u,options:l}=os(e,t,a);lT(l);let f=Jd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},uT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,lT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Rs("ipcInput"),e&&Rs("ipc: true"),r&&Rs("detached: true"),n&&Rs("cancelSignal")},Rs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},fT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=dT({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p}=vp(c,r),{output:b,error:T=u}=yp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:p,verboseInfo:o}),P=b.map((j,Y)=>tt(j,r,Y)),M=tt(bp(b,r),r,"all");return mT({error:T,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},dT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{pp(o,r);let a=pT(r);return(0,_p.spawnSync)(e,t,a)}catch(a){return ir({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},pT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:ps(t)}),mT=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?ms({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Ur({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var $m=require("node:events"),Dm=require("node:child_process");var zi=q(require("node:process"),1);var ur=require("node:events");var Tp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(tr({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),hT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),hT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Zn(t,s);let o=lt(e,t,r),i=new AbortController;try{return await Promise.race([gT(o,n,i),yT(o,r,i),bT(o,r,i)])}catch(a){throw rr(e),a}finally{i.abort(),Yn(t,s)}},gT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ur.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ur.on)(e,"message",{signal:r}))if(t(n))return n},yT=async(e,t,{signal:r})=>{await(0,ur.once)(e,"disconnect",{signal:r}),Hl(t)},bT=async(e,t,{signal:r})=>{let[n]=await(0,ur.once)(e,"strict:error",{signal:r});throw zn(n,t)};var Vr=require("node:events");var Rp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Vi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Vi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{tr({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),Zn(t,o);let i=lt(e,t,r),a=new AbortController,c={};return wT(e,i,a),xT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),ST({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},wT=async(e,t,r)=>{try{await(0,Vr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},xT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Vr.once)(e,"strict:error",{signal:r.signal});n.error=zn(s,t),r.abort()}catch{}},ST=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,Vr.on)(r,"message",{signal:o.signal}))Op(i),yield c}catch{Op(i)}finally{o.abort(),Yn(t,a),n||rr(e),s&&await e}},Op=({error:e})=>{if(e)throw e};var kp=(e,{ipc:t})=>{Object.assign(e,Ap(e,!1,t))},Cp=()=>{let e=zi.default,t=!0,r=zi.default.channel!==void 0;return{...Ap(e,t,r),getCancelSignal:kf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Ap=(e,t,r)=>({sendMessage:rs.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Tp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Rp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ip=require("node:child_process"),dt=require("node:stream");var $p=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Li(n);let a=new Ip.ChildProcess;vT(a,n),Object.assign(a,{readable:_T,writable:ET,duplex:TT});let c=ir({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=OT(c,i,s);return{subprocess:a,promise:u}},vT=(e,t)=>{let r=zr(),n=zr(),s=zr(),o=Array.from({length:t.length-3},zr),i=zr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},zr=()=>{let e=new dt.PassThrough;return e.end(),e},_T=()=>new dt.Readable({read(){}}),ET=()=>new dt.Writable({write(){}}),TT=()=>new dt.Duplex({read(){},write(){}}),OT=async(e,t,r)=>ar(e,t,r);var lr=require("node:fs"),Lp=require("node:buffer"),ze=require("node:stream");var Np=(e,t)=>ws(RT,e,t,!1),Wr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ft[e]}.`)},Dp={fileNumber:Wr,generator:Gi,asyncGenerator:Gi,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:ze.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},RT={input:{...Dp,fileUrl:({value:e})=>({stream:(0,lr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,lr.createReadStream)(e)}),webStream:({value:e})=>({stream:ze.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ze.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ze.Readable.from(e)}),string:({value:e})=>({stream:ze.Readable.from(e)}),uint8Array:({value:e})=>({stream:ze.Readable.from(Lp.Buffer.from(e))})},output:{...Dp,fileUrl:({value:e})=>({stream:(0,lr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,lr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ze.Writable.fromWeb(e)}),iterable:Wr,asyncIterable:Wr,string:Wr,uint8Array:Wr}};var Hr=require("node:events"),Cs=require("node:stream"),Zi=require("node:stream/promises");function Tt(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Hi(s);let t=e.some(({readableObjectMode:s})=>s),r=kT(e,t),n=new Wi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var kT=(e,t)=>{if(e.length===0)return(0,Cs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Wi=class extends Cs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Hi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=CT(this,this.#t,this.#o);let r=$T({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(Hi(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},CT=async(e,t,r)=>{ks(e,Pp);let n=new AbortController;try{await Promise.race([AT(e,n),IT(e,t,r,n)])}finally{n.abort(),ks(e,-Pp)}},AT=async(e,{signal:t})=>{try{await(0,Zi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Fp(e,r),r}},IT=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Hr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Hi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},$T=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{ks(e,Mp);let a=new AbortController;try{await Promise.race([DT(o,t,a),LT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),NT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),ks(e,-Mp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Yi(e):PT(e))},DT=async(e,t,{signal:r})=>{try{await e,r.aborted||Yi(t)}catch(n){r.aborted||Fp(t,n)}},LT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Zi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;jp(i)?s.add(t):Bp(e,i)}},NT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Hr.once)(e,s,{signal:o}),!e.readable)return(0,Hr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},PT=e=>{e.writable&&e.end()},Fp=(e,t)=>{jp(t)?Yi(e):Bp(e,t)},jp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",Yi=e=>{(e.readable||e.writable)&&e.destroy()},Bp=(e,t)=>{e.destroyed||(e.once("error",MT),e.destroy(t))},MT=()=>{},ks=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Pp=2,Mp=1;var Xi=require("node:stream/promises");var fr=(e,t)=>{e.pipe(t),FT(e,t),jT(e,t)},FT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Xi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Ki(t)}},Ki=e=>{e.writable&&e.end()},jT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Xi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Ji(e)}},Ji=e=>{e.readable&&e.destroy()};var Up=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>ve.has(c)))BT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))GT({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:Tt(o);fr(i,s)}},BT=(e,t,r,n)=>{r==="output"?fr(e.stdio[n],t):fr(t,e.stdio[n]);let s=UT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},UT=["stdin","stdout","stderr"],GT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;qT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},qT=(e,{signal:t})=>{De(e)&&St(e,VT,t)},VT=2;var qp=require("node:events");var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var As=e=>!!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",Qi=Symbol.for("signal-exit emitter"),ea=globalThis,zT=Object.defineProperty.bind(Object),ta=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ea[Qi])return ea[Qi];zT(ea,Qi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Is=class{},WT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),ra=class extends Is{onExit(){return()=>{}}load(){}unload(){}},na=class extends Is{#t=sa.platform==="win32"?"SIGINT":"SIGHUP";#r=new ta;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Ot)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!As(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Ot)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Ot.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return As(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&As(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},sa=globalThis.process,{onExit:Gp,load:Lj,unload:Nj}=WT(As(sa)?new na(sa):new ra);var Vp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Gp(()=>{e.kill()});(0,qp.addAbortListener)(n,()=>{s()})};var Wp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Mn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=HT(r,n,s),{sourceStream:f,sourceError:d}=YT(e,u),{options:p,fileDescriptors:b}=Ge.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:p,sourceError:d,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},HT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=ZT(e,t,...r),a=Hn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},ZT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(zp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Bo(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=Tn(r,...n);return{destination:t(zp)(s,o,i),pipeOptions:i}}if(Ge.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},zp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),YT=(e,t)=>{try{return{sourceStream:nr(e,t)}}catch(r){return{sourceError:r}}};var Zp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=XT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw oa({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},XT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Ji(e),n;if(t!==void 0)return Ki(r),t},oa=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>ir({error:e,command:Hp,escapedCommand:Hp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Hp="source.pipe(destination)";var Yp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Xp=require("node:stream/promises");var Kp=(e,t,r)=>{let n=$s.has(t)?JT(e,t):KT(e,t);return St(e,e0,r.signal),St(t,t0,r.signal),QT(t),n},KT=(e,t)=>{let r=Tt([e]);return fr(r,t),$s.set(t,r),r},JT=(e,t)=>{let r=$s.get(t);return r.add(e),r},QT=async e=>{try{await(0,Xp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}$s.delete(e)},$s=new WeakMap,e0=2,t0=1;var Jp=require("node:util");var Qp=(e,t)=>e===void 0?[]:[r0(e,t)],r0=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Jp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw oa({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Ds=(e,...t)=>{if(W(t[0]))return Ds.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=Wp(e,...t),s=n0({...n,destination:r});return s.pipe=Ds.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},n0=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=s0(e,s);Zp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let d=Kp(t,o,f);return await Promise.race([Yp(l),...Qp(a,{sourceStream:t,mergedStream:d,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},s0=(e,t)=>Promise.allSettled([e,t]);var sm=require("node:timers/promises");var tm=require("node:events"),rm=require("node:stream");var Ls=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return o0(t,i),nm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},o0=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ia=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;i0(t,i,e);let a=e.readableObjectMode&&!o;return nm({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},i0=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},nm=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,tm.on)(e,"data",{signal:t.signal,highWaterMark:em,highWatermark:em});return a0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},aa=(0,rm.getDefaultHighWaterMark)(!0),em=aa,a0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=c0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*Et(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Gr(a)}},c0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[Ss(e,r,!t),xs(e,s,!n,{})].filter(Boolean);var om=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=u0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([l0(e),f]);return}let d=Pi(c,r),p=ia({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:d,allMixed:a}),[b]=await Promise.all([f0({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},u0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!Es({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ia({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await mp(a,e,r,o)},l0=async e=>{await(0,sm.setImmediate)(),e.readableFlowing===null&&e.resume()},f0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await us(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await ls(r,{maxBuffer:o})):await ds(r,{maxBuffer:o})}catch(a){return im(fd({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},ca=async e=>{try{return await e}catch(t){return im(t)}},im=({bufferedData:e})=>tu(e)?new Uint8Array(e):e;var cm=require("node:stream/promises"),Zr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=d0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,cm.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||h0(a,t,r,n)}finally{i.abort()}},d0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&p0(e,r,n),n},p0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{m0(t,r),n.call(e,...s)}},m0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},h0=(e,t,r,n)=>{if(!g0(e,t,r,n))throw e},g0=(e,t,r,n=!0)=>r.propagating?am(e)||Ns(e):(r.propagating=!0,ua(r,t)===n?am(e):Ns(e)),ua=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ns=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",am=e=>(e==null?void 0:e.code)==="EPIPE";var um=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>la({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),la=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Zr(e,t,u);if(ua(u,t)){await l;return}let[f]=await Promise.all([om({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var lm=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Tt([e,t].filter(Boolean)):void 0,fm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>la({...y0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:b0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),y0=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},b0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var gm=require("node:events");var dm=e=>Kt(e,"ipc"),pm=(e,t)=>{let r=Pn(e);Be({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var mm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=dm(o),a=Qe(t,"ipc"),c=Qe(r,"ipc");for await(let u of Vi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(dd(e,s,c),s.push(u)),i&&pm(u,o);return s},hm=async(e,t)=>(await Promise.allSettled([e]),t);var ym=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:d,verboseInfo:p,fileDescriptors:b,originalStreams:T,onInternalError:P,controller:M})=>{let j=wp(e,d),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=um({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),we=fm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),ce=[],Ae=mm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:p}),Ie=w0(T,e,Y),xe=x0(b,Y);try{return await Promise.race([Promise.all([{},Sp(j),Promise.all(X),we,Ae,jf(e,f),...Ie,...xe]),P,S0(e,M),...Lf(e,o,d,M),...Wl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:d,controller:M}),...If({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:d,controller:M})])}catch(Ar){return d.terminationReason??="other",Promise.all([{error:Ar},j,Promise.all(X.map(xt=>ca(xt))),ca(we),hm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},w0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Zr(n,s,r)),x0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Pe(o,{checkOpen:!1})&&!De(o)).map(({type:s,value:o,stream:i=o})=>Zr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),S0=async(e,{signal:t})=>{let[r]=await(0,gm.once)(e,"error",{signal:t});throw r};var bm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Yr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Ue();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},dr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var xm=require("node:stream"),Sm=require("node:util");var fa=require("node:stream/promises");var da=async e=>{if(e!==void 0)try{await pa(e)}catch{}},wm=async e=>{if(e!==void 0)try{await ma(e)}catch{}},pa=async e=>{await(0,fa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ma=async e=>{await(0,fa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ps=async(e,t)=>{if(await e,t)throw t},Ms=(e,t,r)=>{r&&!Ns(r)?e.destroy(r):t&&e.destroy()};var vm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||he.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ha(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=ga(a,i),{read:d,onStdoutDataDone:p}=ya({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new xm.Readable({read:d,destroy:(0,Sm.callbackify)(wa.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ba({subprocessStdout:a,onStdoutDataDone:p,readable:b,subprocess:e}),b},ha=(e,t,r)=>{let n=nr(e,t),s=Yr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},ga=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:aa},ya=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Ue(),i=Ls({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){v0(this,i,o)},onStdoutDataDone:o}},v0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ba=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await ma(e),await n,await da(s),await t,r.readable&&r.push(null)}catch(o){await da(s),_m(r,o)}},wa=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await dr(r,t)&&(_m(e,n),await Ps(t,n))},_m=(e,t)=>{Ms(e,e.readable,t)};var Em=require("node:stream"),xa=require("node:util");var Tm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=Sa(e,r,t),i=new Em.Writable({...va(n,e,s),destroy:(0,xa.callbackify)(Ea.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return _a(n,i),i},Sa=(e,t,r)=>{let n=Hn(e,t),s=Yr(r,n,"writableFinal"),o=Yr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},va=(e,t,r)=>({write:_0.bind(void 0,e),final:(0,xa.callbackify)(E0.bind(void 0,e,t,r))}),_0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},E0=async(e,t,r)=>{await dr(r,t)&&(e.writable&&e.end(),await t)},_a=async(e,t,r)=>{try{await pa(e),t.writable&&t.end()}catch(n){await wm(r),Om(t,n)}},Ea=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await dr(r,t),await dr(n,t)&&(Om(e,s),await Ps(t,s))},Om=(e,t)=>{Ms(e,e.writable,t)};var Rm=require("node:stream"),km=require("node:util");var Cm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||he.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ha(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:d}=Sa(e,s,t),{readableEncoding:p,readableObjectMode:b,readableHighWaterMark:T}=ga(c,a),{read:P,onStdoutDataDone:M}=ya({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Rm.Duplex({read:P,...va(l,e,f),destroy:(0,km.callbackify)(T0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:d})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:p});return ba({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),_a(l,j,c),j},T0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([wa({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),Ea({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var Ta=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||he.has(t),i=nr(e,r),a=Ls({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return O0(a,i,e)},O0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Am=(e,{encoding:t})=>{let r=bm();e.readable=vm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Tm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Cm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ta.bind(void 0,e,t),e[Symbol.asyncIterator]=Ta.bind(void 0,e,t,{})};var Im=(e,t)=>{for(let[r,n]of k0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},R0=(async()=>{})().constructor.prototype,k0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(R0,e)]);var Lm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=C0(e,t,r),{subprocess:d,promise:p}=I0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return d.pipe=Ds.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:n}),Im(d,p),Ge.set(d,{options:l,fileDescriptors:f}),d},C0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),{file:a,commandArguments:c,options:u}=os(e,t,r),l=A0(u),f=Np(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},A0=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},I0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,Dm.spawn)(e,t,r)}catch(b){return $p({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,$m.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Up(c,a,u),Vp(c,r,u);let f={},d=Ue();c.kill=ql.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:d,context:f,controller:u}),c.all=lm(c,r),Am(c,r),kp(c,r);let p=$0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:d,controller:u});return{subprocess:c,promise:p}},$0=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[d,p],b,T,P]=await ym({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=b.map((X,we)=>tt(X,t,we)),j=tt(T,t,"all"),Y=D0({errorInfo:f,exitCode:d,signal:p,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ar(Y,n,t)},D0=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?Ur({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof qe,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ms({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Fs=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,L0(n,e[n],s)]));return{...e,...r}},L0=(e,t,r)=>N0.has(e)&&W(t)&&W(r)?{...t,...r}:r,N0=new Set(["env",...zo]);var pt=(e,t,r,n)=>{let s=(i,a,c)=>pt(i,a,r,c),o=(...i)=>P0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},P0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Fs(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=M0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?Ep(a,c,u):Lm(a,c,u,s)},M0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=cu(t)?uu(t,r):[t,...r],[i,a,c]=Tn(...o),u=Fs(Fs(n,s),c),{file:l=i,commandArguments:f=a,options:d=u,isSync:p=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:d,isSync:p}};var Nm=({file:e,commandArguments:t})=>Mm(e,t),Pm=({file:e,commandArguments:t})=>({...Mm(e,t),isSync:!0}),Mm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=F0(e);return{file:r,commandArguments:n}},F0=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(j0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},j0=/ +/g;var Fm=(e,t,r)=>{e.sync=t(B0,r),e.s=e.sync},jm=({options:e})=>Bm(e),B0=({options:e})=>({...Bm(e),isSync:!0}),Bm=e=>({options:{...U0(e),...e}}),U0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Um={preferLocal:!0};var Gm=pt(()=>({})),iG=pt(()=>({isSync:!0})),aG=pt(Nm),cG=pt(Pm),uG=pt(Nf),lG=pt(jm,{},Um,Fm),{sendMessage:fG,getOneMessage:dG,getEachMessage:pG,getCancelSignal:mG}=Cp();var Zw=require("fs"),Do=require("path"),Lo=q(Ig());var Fe={};Sx(Fe,{BRAND:()=>cC,DIRTY:()=>kt,EMPTY_PATH:()=>Bk,INVALID:()=>R,NEVER:()=>WC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>gt,ZodArray:()=>ot,ZodBigInt:()=>At,ZodBoolean:()=>It,ZodBranded:()=>an,ZodCatch:()=>Gt,ZodDate:()=>$t,ZodDefault:()=>Ut,ZodDiscriminatedUnion:()=>eo,ZodEffects:()=>Re,ZodEnum:()=>jt,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>ro,ZodIntersection:()=>Pt,ZodIssueCode:()=>m,ZodLazy:()=>Mt,ZodLiteral:()=>Ft,ZodMap:()=>xr,ZodNaN:()=>vr,ZodNativeEnum:()=>Bt,ZodNever:()=>Me,ZodNull:()=>Lt,ZodNullable:()=>Ye,ZodNumber:()=>Ct,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>w,ZodPipeline:()=>cn,ZodPromise:()=>yt,ZodReadonly:()=>qt,ZodRecord:()=>to,ZodSchema:()=>L,ZodSet:()=>Sr,ZodString:()=>ht,ZodSymbol:()=>br,ZodTransformer:()=>Re,ZodTuple:()=>Ze,ZodType:()=>L,ZodUndefined:()=>Dt,ZodUnion:()=>Nt,ZodUnknown:()=>st,ZodVoid:()=>wr,addIssueToContext:()=>y,any:()=>yC,array:()=>SC,bigint:()=>dC,boolean:()=>qg,coerce:()=>zC,custom:()=>Bg,date:()=>pC,datetimeRegex:()=>Fg,defaultErrorMap:()=>rt,discriminatedUnion:()=>TC,effect:()=>MC,enum:()=>LC,function:()=>IC,getErrorMap:()=>hr,getParsedType:()=>He,instanceof:()=>lC,intersection:()=>OC,isAborted:()=>Ks,isAsync:()=>gr,isDirty:()=>Js,isValid:()=>mt,late:()=>uC,lazy:()=>$C,literal:()=>DC,makeIssue:()=>nn,map:()=>CC,nan:()=>fC,nativeEnum:()=>NC,never:()=>wC,null:()=>gC,nullable:()=>jC,number:()=>Gg,object:()=>vC,objectUtil:()=>Va,oboolean:()=>VC,onumber:()=>qC,optional:()=>FC,ostring:()=>GC,pipeline:()=>UC,preprocess:()=>BC,promise:()=>PC,quotelessJson:()=>Mk,record:()=>kC,set:()=>AC,setErrorMap:()=>jk,strictObject:()=>_C,string:()=>Ug,symbol:()=>mC,transformer:()=>MC,tuple:()=>RC,undefined:()=>hC,union:()=>EC,unknown:()=>bC,util:()=>N,void:()=>xC});var N;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var Va;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Va||(Va={}));var w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),He=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(e)?w.array:e===null?w.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?w.promise:typeof Map<"u"&&e instanceof Map?w.map:typeof Set<"u"&&e instanceof Set?w.set:typeof Date<"u"&&e instanceof Date?w.date:w.object;default:return w.unknown}};var m=N.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),le=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var Fk=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===w.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,N.assertNever(e)}return{message:r}},rt=Fk;var $g=rt;function jk(e){$g=e}function hr(){return $g}var nn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Bk=[];function y(e,t){let r=hr(),n=nn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===rt?void 0:rt].filter(s=>!!s)});e.common.issues.push(n)}var ee=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return R;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return R;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},R=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Ks=e=>e.status==="aborted",Js=e=>e.status==="dirty",mt=e=>e.status==="valid",gr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Qs=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Ng=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},sn,on,Oe=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dg=(e,t)=>{if(mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{let{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var L=class{get description(){return this._def.description}_getType(t){return He(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Dg(n,s)}"~validate"(t){var n,s;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return mt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>mt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(gr(s)?s:Promise.resolve(s));return Dg(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Re({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Te.create(this,this._def)}nullable(){return Ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this)}promise(){return yt.create(this,this._def)}or(t){return Nt.create([this,t],this._def)}and(t){return Pt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new an({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gt({...$(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return cn.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Uk=/^c[^\s-]{8,}$/i,Gk=/^[0-9a-z]+$/,qk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zk=/^[a-z0-9_-]{21}$/i,Wk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Hk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Zk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",za,Xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Jk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${Pg}$`);function Mg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nC(e){return new RegExp(`^${Mg(e)}$`)}function Fg(e){let t=`${Pg}T${Mg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sC(e,t){return!!((t==="v4"||!t)&&Xk.test(e)||(t==="v6"||!t)&&Jk.test(e))}function oC(e,t){if(!Wk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function iC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}var ht=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.string,received:o.parsedType}),R}let n=new ee,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")za||(za=new RegExp(Yk,"u")),za.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Uk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Gk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Fg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Hk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?sC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?oC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?iC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?eC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):N.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ht.create=e=>new ht({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function aC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return o%i/10**s}var Ct=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==w.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.number,received:o.parsedType}),R}let n,s=new ee;for(let o of this._def.checks)o.kind==="int"?N.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?aC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==w.bigint)return this._getInvalidInput(t);let n,s=new ee;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.bigint,received:r.parsedType}),R}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};At.create=e=>new At({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var It=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==w.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.boolean,received:n.parsedType}),R}return re(t.data)}};It.create=e=>new It({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var $t=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==w.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.date,received:o.parsedType}),R}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),R}let n=new ee,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};$t.create=e=>new $t({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==w.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.symbol,received:n.parsedType}),R}return re(t.data)}};br.create=e=>new br({typeName:k.ZodSymbol,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.undefined,received:n.parsedType}),R}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodUndefined,...$(e)});var Lt=class extends L{_parse(t){if(this._getType(t)!==w.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.null,received:n.parsedType}),R}return re(t.data)}};Lt.create=e=>new Lt({typeName:k.ZodNull,...$(e)});var gt=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};gt.create=e=>new gt({typeName:k.ZodAny,...$(e)});var st=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};st.create=e=>new st({typeName:k.ZodUnknown,...$(e)});var Me=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.never,received:r.parsedType}),R}};Me.create=e=>new Me({typeName:k.ZodNever,...$(e)});var wr=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.void,received:n.parsedType}),R}return re(t.data)}};wr.create=e=>new wr({typeName:k.ZodVoid,...$(e)});var ot=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==w.array)return y(r,{code:m.invalid_type,expected:w.array,received:r.parsedType}),R;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Oe(r,i,r.path,a)))).then(i=>ee.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Oe(r,i,r.path,a)));return ee.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};ot.create=(e,t)=>new ot({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function yr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(yr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof ot?new ot({...e._def,type:yr(e.element)}):e instanceof Te?Te.create(yr(e.unwrap())):e instanceof Ye?Ye.create(yr(e.unwrap())):e instanceof Ze?Ze.create(e.items.map(t=>yr(t))):e}var fe=class e extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=N.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==w.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:w.object,received:u.parsedType}),R}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Oe(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Me){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Oe(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,d=await l.value;u.push({key:f,value:d,alwaysSet:l.alwaysSet})}return u}).then(u=>ee.mergeObjectSync(n,u)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i;let s=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of N.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of N.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return yr(this)}partial(t){let r={};for(let n of N.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of N.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Te;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return jg(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});var Nt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new le(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),R}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new le(c));return y(r,{code:m.invalid_union,unionErrors:a}),R}}get options(){return this._def.options}};Nt.create=(e,t)=>new Nt({options:e,typeName:k.ZodUnion,...$(t)});var nt=e=>e instanceof Mt?nt(e.schema):e instanceof Re?nt(e.innerType()):e instanceof Ft?[e.value]:e instanceof jt?e.options:e instanceof Bt?N.objectValues(e.enum):e instanceof Ut?nt(e._def.innerType):e instanceof Dt?[void 0]:e instanceof Lt?[null]:e instanceof Te?[void 0,...nt(e.unwrap())]:e instanceof Ye?[null,...nt(e.unwrap())]:e instanceof an||e instanceof qt?nt(e.unwrap()):e instanceof Gt?nt(e._def.innerType):[],eo=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.object)return y(r,{code:m.invalid_type,expected:w.object,received:r.parsedType}),R;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=nt(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function Wa(e,t){let r=He(e),n=He(t);if(e===t)return{valid:!0,data:e};if(r===w.object&&n===w.object){let s=N.objectKeys(t),o=N.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=Wa(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=Wa(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===w.date&&n===w.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Pt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ks(o)||Ks(i))return R;let a=Wa(o.value,i.value);return a.valid?((Js(o)||Js(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pt.create=(e,t,r)=>new Pt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var Ze=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.array)return y(n,{code:m.invalid_type,expected:w.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Oe(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ee.mergeArray(r,i)):ee.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ze.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ze({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var to=class e extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.object)return y(n,{code:m.invalid_type,expected:w.object,received:n.parsedType}),R;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Oe(n,a,n.path,a)),value:i._parse(new Oe(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ee.mergeObjectAsync(r,s):ee.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof L?new e({keyType:t,valueType:r,typeName:k.ZodRecord,...$(n)}):new e({keyType:ht.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},xr=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.map)return y(n,{code:m.invalid_type,expected:w.map,received:n.parsedType}),R;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Oe(n,a,n.path,[u,"key"])),value:o._parse(new Oe(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};xr.create=(e,t,r)=>new xr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var Sr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.set)return y(n,{code:m.invalid_type,expected:w.set,received:n.parsedType}),R;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Oe(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Sr.create=(e,t)=>new Sr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var ro=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.function)return y(r,{code:m.invalid_type,expected:w.function,received:r.parsedType}),R;function n(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof yt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})})}else{let a=this;return re(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new le([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new le([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ze.create(t).rest(st.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Ze.create([]).rest(st.create()),returns:r||st.create(),typeName:k.ZodFunction,...$(n)})}},Mt=class extends L{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Mt.create=(e,t)=>new Mt({getter:e,typeName:k.ZodLazy,...$(t)});var Ft=class extends L{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ft.create=(e,t)=>new Ft({value:e,typeName:k.ZodLiteral,...$(t)});function jg(e,t){return new jt({values:e,typeName:k.ZodEnum,...$(t)})}var jt=class e extends L{constructor(){super(...arguments),sn.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:m.invalid_type}),R}if(Qs(this,sn,"f")||Ng(this,sn,new Set(this._def.values),"f"),!Qs(this,sn,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),R}return re(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};sn=new WeakMap;jt.create=jg;var Bt=class extends L{constructor(){super(...arguments),on.set(this,void 0)}_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==w.string&&n.parsedType!==w.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),R}if(Qs(this,on,"f")||Ng(this,on,new Set(N.getValidEnumValues(this._def.values)),"f"),!Qs(this,on,"f").has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),R}return re(t.data)}get enum(){return this._def.values}};on=new WeakMap;Bt.create=(e,t)=>new Bt({values:e,typeName:k.ZodNativeEnum,...$(t)});var yt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:w.promise,received:r.parsedType}),R;let n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};yt.create=(e,t)=>new yt({type:e,typeName:k.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return R;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?R:c.status==="dirty"?kt(c.value):r.value==="dirty"?kt(c.value):c});{if(r.value==="aborted")return R;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?R:a.status==="dirty"?kt(a.value):r.value==="dirty"?kt(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mt(i))return i;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>mt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:k.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...$(r)});var Te=class extends L{_parse(t){return this._getType(t)===w.undefined?re(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:k.ZodOptional,...$(t)});var Ye=class extends L{_parse(t){return this._getType(t)===w.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ye.create=(e,t)=>new Ye({innerType:e,typeName:k.ZodNullable,...$(t)});var Ut=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Gt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gr(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var vr=class extends L{_parse(t){if(this._getType(t)!==w.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.nan,received:n.parsedType}),R}return{status:"valid",value:t.data}}};vr.create=e=>new vr({typeName:k.ZodNaN,...$(e)});var cC=Symbol("zod_brand"),an=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},cn=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?R:o.status==="dirty"?(r.dirty(),kt(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?R:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:k.ZodPipeline})}},qt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(mt(s)&&(s.value=Object.freeze(s.value)),s);return gr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};qt.create=(e,t)=>new qt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Lg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Bg(e,t={},r){return e?gt.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Lg(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Lg(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):gt.create()}var uC={object:fe.lazycreate},k;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(k||(k={}));var lC=(e,t={message:`Input not instance of ${e.name}`})=>Bg(r=>r instanceof e,t),Ug=ht.create,Gg=Ct.create,fC=vr.create,dC=At.create,qg=It.create,pC=$t.create,mC=br.create,hC=Dt.create,gC=Lt.create,yC=gt.create,bC=st.create,wC=Me.create,xC=wr.create,SC=ot.create,vC=fe.create,_C=fe.strictCreate,EC=Nt.create,TC=eo.create,OC=Pt.create,RC=Ze.create,kC=to.create,CC=xr.create,AC=Sr.create,IC=ro.create,$C=Mt.create,DC=Ft.create,LC=jt.create,NC=Bt.create,PC=yt.create,MC=Re.create,FC=Te.create,jC=Ye.create,BC=Re.createWithPreprocess,UC=cn.create,GC=()=>Ug().optional(),qC=()=>Gg().optional(),VC=()=>qg().optional(),zC={string:e=>ht.create({...e,coerce:!0}),number:e=>Ct.create({...e,coerce:!0}),boolean:e=>It.create({...e,coerce:!0}),bigint:e=>At.create({...e,coerce:!0}),date:e=>$t.create({...e,coerce:!0})};var WC=R;var Vg=Fe.object({list:Fe.boolean().optional(),log:Fe.boolean().optional(),track:Fe.boolean().optional(),parser:Fe.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Fe.string().optional(),ignoreConfig:Fe.string().optional(),match:Fe.any().optional()});var vo=q(ny(),1),bo=q(Xa(),1),Cb=require("child_process"),dw=q(Ja(),1),Rr=q(Ja(),1),Fw=require("node:events"),xo=Object.defineProperty,_A=Object.defineProperties,EA=Object.getOwnPropertyDescriptor,TA=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertyNames,sy=Object.getOwnPropertySymbols,My=Object.prototype.hasOwnProperty,OA=Object.prototype.propertyIsEnumerable,oy=(e,t,r)=>t in e?xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))My.call(t,r)&&oy(e,r,t[r]);if(sy)for(var r of sy(t))OA.call(t,r)&&oy(e,r,t[r]);return e},fn=(e,t)=>_A(e,TA(t)),g=(e,t)=>function(){return e&&(t=(0,e[bc(e)[0]])(e=0)),t},RA=(e,t)=>function(){return t||(0,e[bc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)xo(e,r,{get:t[r],enumerable:!0})},kA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bc(t))!My.call(e,s)&&s!==r&&xo(e,s,{get:()=>t[s],enumerable:!(n=EA(t,s))||n.enumerable});return e},V=e=>kA(xo({},"__esModule",{value:!0}),e),ln=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function CA(...e){let t=new String(e);return So.set(t,e),t}function go(e){return e instanceof String&&So.has(e)}function iy(e){return So.get(e)||[]}var So,hn=g({"src/lib/args/pathspec.ts"(){"use strict";So=new WeakMap}}),at,wt=g({"src/lib/errors/git-error.ts"(){"use strict";at=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),gn,Cr=g({"src/lib/errors/git-response-error.ts"(){"use strict";wt(),gn=class extends at{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Fy,jy=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";wt(),Fy=class extends at{constructor(e){super(void 0,e)}}}});function By(e){return typeof e=="function"?e:Zt}function Uy(e){return typeof e=="function"&&e!==Zt}function Gy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function qy(e,t=0){return Vy(e)&&e.length>t?e[t]:void 0}function Ht(e,t=0){if(Vy(e)&&e.length>t)return e[e.length-1-t]}function Vy(e){return!!(e&&typeof e.length=="number")}function yn(e="",t=!0,r=`
56
+ `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function wc(e,t){return yn(e,!0).map(r=>t(r))}function xc(e){return(0,vo.exists)(e,vo.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function zy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function _o(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Xe(e){return Array.isArray(e)?e:[e]}function Wy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Hy(e){return Xe(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function dn(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function pn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Zy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function oc(e=0){return new Promise(t=>setTimeout(t,e))}function ic(e){if(e!==!1)return e}var kr,Zt,bn,Eo=g({"src/lib/utils/util.ts"(){"use strict";kr="\0",Zt=()=>{},bn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ke(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function Sc(e,t){let r=go(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function vc(e){return!!e&&bn(e)==="[object Object]"}function Yy(e){return typeof e=="function"}var wn,ne,Xy,yo,_c,Ky=g({"src/lib/utils/argument-filters.ts"(){"use strict";Eo(),hn(),wn=e=>Array.isArray(e),ne=e=>typeof e=="string",Xy=e=>Array.isArray(e)&&e.every(ne),yo=e=>ne(e)||Array.isArray(e)&&e.every(ne),_c=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),ac,AA=g({"src/lib/utils/exit-codes.ts"(){"use strict";ac=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(ac||{})}}),mn,IA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";mn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new mn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,bt,$A=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},bt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Jy(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},Qy),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Qy,DA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Qy={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Ec(e,t=[]){return vc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return go(s)?r.push(s):Sc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function de(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return Ec(Tc(e),n),r||n.push(...LA(e)),n}function LA(e){let t=typeof Ht(e)=="function";return Ke(Ht(e,t?1:0),wn,[])}function Tc(e){let t=Yy(Ht(e));return Ke(Ht(e,t?1:0),vc)}function z(e,t=!0){let r=By(Ht(e));return t||Uy(r)?r:void 0}var NA=g({"src/lib/utils/task-options.ts"(){"use strict";Ky(),Eo(),hn()}});function cc(e,t){return e(t.stdOut,t.stdErr)}function me(e,t,r,n=!0){return Xe(r).forEach(s=>{for(let o=yn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var PA=g({"src/lib/utils/task-parser.ts"(){"use strict";Eo()}}),eb={};Z(eb,{ExitCodes:()=>ac,GitOutputStreams:()=>mn,LineParser:()=>I,NOOP:()=>Zt,NULL:()=>kr,RemoteLineParser:()=>bt,append:()=>F,appendTaskOptions:()=>Ec,asArray:()=>Xe,asCamelCase:()=>Wy,asFunction:()=>By,asNumber:()=>U,asStringArray:()=>Hy,bufferToString:()=>pn,callTaskParser:()=>cc,createInstanceConfig:()=>Jy,delay:()=>oc,filterArray:()=>wn,filterFunction:()=>Yy,filterHasLength:()=>_c,filterPlainObject:()=>vc,filterPrimitives:()=>Sc,filterString:()=>ne,filterStringArray:()=>Xy,filterStringOrStringArray:()=>yo,filterType:()=>Ke,first:()=>qy,folderExists:()=>xc,forEachLineWithContent:()=>wc,getTrailingOptions:()=>de,including:()=>zy,isUserFunction:()=>Uy,last:()=>Ht,objectToString:()=>bn,orVoid:()=>ic,parseStringResponse:()=>me,pick:()=>Zy,prefixedArray:()=>dn,remove:()=>_o,splitOn:()=>Gy,toLinesWithContent:()=>yn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>Tc});var C=g({"src/lib/utils/index.ts"(){"use strict";Ky(),AA(),IA(),$A(),DA(),NA(),PA(),Eo()}}),tb={};Z(tb,{CheckRepoActions:()=>uc,checkIsBareRepoTask:()=>nb,checkIsRepoRootTask:()=>rb,checkIsRepoTask:()=>MA});function MA(e){switch(e){case"bare":return nb();case"root":return rb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:To,parser:Oc}}function rb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:To,parser(t){return/^\.(git)?$/.test(t.trim())}}}function nb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:To,parser:Oc}}function FA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var uc,To,Oc,sb=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),uc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(uc||{}),To=({exitCode:e},t,r,n)=>{if(e===128&&FA(t))return r(Buffer.from("false"));n(t)},Oc=e=>e.trim()==="true"}});function jA(e,t){let r=new ob(e),n=e?ab:ib;return yn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(cb.test(o)?r.folders:r.files).push(o)}),r}var ob,ib,ab,cb,BA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ob=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},ib=/^[a-z]+\s*/i,ab=/^[a-z]+\s+[a-z]+\s*/i,cb=/\/$/}}),lc={};Z(lc,{EMPTY_COMMANDS:()=>Oo,adhocExecTask:()=>ub,configurationErrorTask:()=>pe,isBufferTask:()=>fb,isEmptyTask:()=>db,straightThroughBufferTask:()=>lb,straightThroughStringTask:()=>ae});function ub(e){return{commands:Oo,format:"empty",parser:e}}function pe(e){return{commands:Oo,format:"empty",parser(){throw typeof e=="string"?new Fy(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function lb(e){return{commands:e,format:"buffer",parser(t){return t}}}function fb(e){return e.format==="buffer"}function db(e){return e.format==="empty"||!e.commands.length}var Oo,H=g({"src/lib/tasks/task.ts"(){"use strict";jy(),Oo=[]}}),pb={};Z(pb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Rc,CONFIG_ERROR_MODE_REQUIRED:()=>kc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Cc,CleanOptions:()=>fo,cleanTask:()=>mb,cleanWithOptionsTask:()=>UA,isCleanOptionsArray:()=>GA});function UA(e,t){let{cleanMode:r,options:n,valid:s}=qA(e);return r?s.options?(n.push(...t),n.some(WA)?pe(Rc):mb(r,n)):pe(Cc+JSON.stringify(e)):pe(kc)}function mb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return jA(e==="n",n)}}}function GA(e){return Array.isArray(e)&&e.every(t=>Ac.has(t))}function qA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{VA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&zA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function VA(e){return e==="f"||e==="n"}function zA(e){return/^-[a-z]$/i.test(e)&&Ac.has(e.charAt(1))}function WA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Rc,kc,Cc,fo,Ac,hb=g({"src/lib/tasks/clean.ts"(){"use strict";BA(),C(),H(),Rc="Git clean interactive mode is not supported",kc='Git clean mode parameter ("n" or "f") is required',Cc="Git clean unknown option found in: ",fo=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(fo||{}),Ac=new Set(["i",...Hy(Object.values(fo))])}});function HA(e){let t=new yb;for(let r of gb(e))t.addValue(r.file,String(r.key),r.value);return t}function ZA(e,t){let r=null,n=[],s=new Map;for(let o of gb(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function YA(e){return e.replace(/^(file):/,"")}function*gb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=YA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
+ `)){let c=Gy(i,`
58
+ `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var yb,XA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),yb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=Ht(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Qa(e,t){return typeof e=="string"&&fc.hasOwnProperty(e)?e:t}function KA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function JA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ZA(n,e)}}}function QA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return HA(r)}}}function eI(){return{addConfig(e,t,...r){return this._runTask(KA(e,t,r[0]===!0,Qa(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(JA(e,Qa(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(QA(Qa(e[0],void 0)),z(arguments))}}}var fc,bb=g({"src/lib/tasks/config.ts"(){"use strict";XA(),C(),fc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(fc||{})}});function tI(e){return wb.has(e)}var ec,wb,xb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";ec=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(ec||{}),wb=new Set(Object.values(ec))}});function rI(...e){return new vb().param(...e)}function nI(e){let t=new Set,r={};return wc(e,n=>{let[s,o,i]=n.split(kr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function sI(){return{grep(e){let t=z(arguments),r=de(arguments);for(let s of Sb)if(r.includes(s))return this._runTask(pe(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=rI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return nI(s)}},t)}}}var Sb,un,ay,vb,_b=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),Sb=["-h"],un=Symbol("grepQuery"),vb=class{constructor(){this[ay]=[]}*[(ay=un,Symbol.iterator)](){for(let e of this[un])yield e}and(...e){return e.length&&this[un].push("--and","(",...dn(e,"-e"),")"),this}param(...e){return this[un].push(...dn(e,"-e")),this}}}}),Eb={};Z(Eb,{ResetMode:()=>po,getResetMode:()=>iI,resetTask:()=>oI});function oI(e,t){let r=["reset"];return Tb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function iI(e){if(Tb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Tb(e){return Ob.includes(e)}var po,Ob,Rb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),po=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(po||{}),Ob=Array.from(Object.values(po))}});function aI(){return(0,bo.default)("simple-git")}function cy(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function cI(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Ic(e,t,r,n=aI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=cI(Ke(t,ne),i,n);return u(r);function c(l,f){return F(o,Ic(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",d=i&&cy(i,f)||Zt,p=cy(n,`${s} ${f}`,d);return Object.assign(i?d:p,{label:e,sibling:c,info:p,step:u})}}var kb=g({"src/lib/git-logger.ts"(){"use strict";C(),bo.default.formatters.L=e=>String(_c(e)?e.length:"-"),bo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):bn(e)}}),uo,dc,uI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";wt(),kb(),uo=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=uo.getName(e.commands[0]),r=Ic(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new at(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++uo.counter}`}},dc=uo,dc.counter=0}});function Wt(e,t){return{method:qy(e.commands)||"",commands:t}}function lI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function uy(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var pc,fI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";wt(),H(),C(),uI(),pc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new dc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return ln(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield db(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof at?Object.assign(t,{task:e}):new at(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return ln(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Wt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Wt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),fb(e)?cc(e.parser,o):cc(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return ln(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Wt(e,t)),r));if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",bn(f)),c(new mn(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new mn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return ln(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Wt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,r)),{kill(d){l=d||l}}));let f=(0,Cb.spawn)(t,r,i);f.stdout.on("data",uy(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",uy(u,"stdErr",s,o.step("stdErr"))),f.on("error",lI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,fn(Ce({},Wt(e,r)),{spawned:f,close(d,p){a({stdOut:c,stdErr:u,exitCode:d,rejection:l||p})},kill(d){f.killed||(l=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,t)),{kill(n){r=n||r}})),r}}}}),Ab={};Z(Ab,{GitExecutor:()=>Ib});var Ib,dI=g({"src/lib/runners/git-executor.ts"(){"use strict";fI(),Ib=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new pc(this,this._scheduler,this._plugins)}chain(){return new pc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function pI(e,t,r=Zt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof gn?mI(o):o,void 0)};t.then(n,s)}function mI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Zt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var hI=g({"src/lib/task-callback.ts"(){"use strict";Cr(),C()}});function ly(e,t){return ub(r=>{if(!xc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var gI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function tc(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=_o(t,"-B")),ae(t)}function yI(){return{checkout(){return this._runTask(tc(de(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(tc(["-b",e,t,...de(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(tc(["-b",e,...de(arguments)]),z(arguments))}}}var bI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function wI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function xI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return me(wI(),[$b],e)}})}}}var $b,SI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),$b=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Wy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function vI(e){return me({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Db,e)}var Db,_I=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Db=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function EI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...dn(e,"-m"),...t,...r],format:"utf-8",parser:vI}}function TI(){return{commit(t,...r){let n=z(arguments),s=e(t)||EI(Xe(t),Xe(Ke(r[0],yo,[])),[...Ke(r[1],wn,[]),...de(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!yo(t)&&pe("git.commit: requires the commit message to be supplied as a string/string[]")}}var OI=g({"src/lib/tasks/commit.ts"(){"use strict";_I(),C(),H()}});function RI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var kI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function CI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var AI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function II(e,t,r){let n=String(r).trim(),s;if(s=Lb.exec(n))return new mo(e,t,!1,s[1]);if(s=Nb.exec(n))return new mo(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new mo(e,t,/^re/i.test(n),o)}var mo,Lb,Nb,$I=g({"src/lib/responses/InitSummary.ts"(){"use strict";mo=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Lb=/^Init.+ repository in (.+)$/,Nb=/^Rein.+ in (.+)$/}});function DI(e){return e.includes($c)}function LI(e=!1,t,r){let n=["init",...r];return e&&!DI(n)&&n.splice(1,0,$c),{commands:n,format:"utf-8",parser(s){return II(n.includes("--bare"),t,s)}}}var $c,NI=g({"src/lib/tasks/init.ts"(){"use strict";$I(),$c="--bare"}});function Dc(e){for(let t=0;t<e.length;t++){let r=Lc.exec(e[t]);if(r)return`--${r[1]}`}return""}function PI(e){return Lc.test(e)}var Lc,xn=g({"src/lib/args/log-format.ts"(){"use strict";Lc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Pb,MI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Pb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Mb(e=""){let t=Fb[e];return r=>me(new Pb,t,r,!1)}var rc,fy,dy,py,Fb,jb=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";xn(),MI(),xb(),C(),rc=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],fy=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],dy=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],py=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:ic(tI(t)&&t),from:ic(!!o&&n!==o&&n),similarity:U(r)})})],Fb={"":rc,"--stat":rc,"--numstat":fy,"--name-status":py,"--name-only":dy}}});function FI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Bb(e=Mc,t=Ub,r=""){let n=Mb(r);return function(s){let o=yn(s.trim(),!1,Nc).map(function(i){let a=i.split(Pc),c=FI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var Nc,Pc,Mc,Ub,Gb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),jb(),xn(),Nc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Pc=" \xF2\xF2",Mc=" \xF2 ",Ub=["hash","date","message","refs","author_name","author_email"]}}),qb={};Z(qb,{diffSummaryTask:()=>jI,validateLogFormatConfig:()=>Ro});function jI(e){let t=Dc(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Ro(r)||{commands:r,format:"utf-8",parser:Mb(t)}}function Ro(e){let t=e.filter(PI);if(t.length>1)return pe(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return pe(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Fc=g({"src/lib/tasks/diff.ts"(){"use strict";xn(),jb(),H()}});function BI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function UI(e){return Object.keys(e).reduce((t,r)=>(r in mc||(t[r]=e[r]),t),{})}function Vb(e={},t=[]){let r=Ke(e.splitter,ne,Mc),n=!Sc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=BI(n,r),i=[],a=[`--pretty=format:${Nc}${o}${Pc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return ne(e.file)&&a.push("--follow",CA(e.file)),Ec(UI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function GI(e,t,r){let n=Bb(e,t,Dc(r));return{commands:["log",...r],format:"utf-8",parser:n}}function qI(){return{log(...r){let n=z(arguments),s=Vb(Tc(arguments),Ke(arguments[0],wn)),o=t(...r)||Ro(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return GI(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&pe("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var mc,zb=g({"src/lib/tasks/log.ts"(){"use strict";xn(),hn(),Gb(),C(),H(),Fc(),mc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(mc||{})}}),ho,Wb,VI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";ho=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Wb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),hc,Hb,zI=g({"src/lib/responses/PullSummary.ts"(){"use strict";hc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Hb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function nc(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function my(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Zb,WI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Zb=[new bt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=nc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=nc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=nc(e.remoteMessages);s.total=my(t),s.reused=my(r),s.packReused=U(n)})]}});function Yb(e,t){return me({remoteMessages:new Kb},Xb,t)}var Xb,Kb,Jb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),WI(),Xb=[new bt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Zb,new bt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new bt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Kb=class{constructor(){this.all=[]}}}});function HI(e,t){let r=me(new Hb,Qb,[e,t]);return r.message&&r}var hy,gy,yy,by,Qb,wy,jc,ew=g({"src/lib/parsers/parse-pull.ts"(){"use strict";zI(),C(),Jb(),hy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,gy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,yy=/^(create|delete) mode \d+ (.+)/,by=[new I(hy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(gy,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(yy,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],Qb=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],wy=(e,t)=>me(new hc,by,[e,t]),jc=(e,t)=>Object.assign(new hc,wy(e,t),Yb(e,t))}}),xy,tw,Sy,ZI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";VI(),C(),ew(),xy=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new ho(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new ho(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new ho(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],tw=(e,t)=>Object.assign(Sy(e,t),jc(e,t)),Sy=e=>me(new Wb,xy,e)}});function vy(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=tw(t,r);if(n.failed)throw new gn(n);return n}}:pe("Git.merge requires at least one option")}var YI=g({"src/lib/tasks/merge.ts"(){"use strict";Cr(),ZI(),H()}});function XI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var _y,rw,Ey,KI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Jb(),_y=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=fn(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(XI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=fn(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],rw=(e,t)=>{let r=Ey(e,t),n=Yb(e,t);return Ce(Ce({},r),n)},Ey=(e,t)=>me({pushed:[]},_y,[e,t])}}),nw={};Z(nw,{pushTagsTask:()=>JI,pushTask:()=>Bc});function JI(e={},t){return F(t,"--tags"),Bc(e,t)}function Bc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),_o(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:rw}}var sw=g({"src/lib/tasks/push.ts"(){"use strict";KI(),C()}});function QI(){return{showBuffer(){let e=["show",...de(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(lb(e),z(arguments))},show(){let e=["show",...de(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var e1=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),Ty,ow,t1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Ty=/^(.+)\0(.+)$/,ow=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Ty.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function Oy(e){let[t,r]=e.split(kr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function sc(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function r1(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=iw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new ow(i,s,o))}}var Ry,iw,aw,n1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),t1(),Ry=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},iw=new Map([be(" ","A",(e,t)=>F(e.created,t)),be(" ","D",(e,t)=>F(e.deleted,t)),be(" ","M",(e,t)=>F(e.modified,t)),be("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),be("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),be("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),be("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("R"," ",(e,t)=>{F(e.renamed,Oy(t))}),be("R","M",(e,t)=>{let r=Oy(t);F(e.renamed,r),F(e.modified,r.to)}),be("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),be("?","?",(e,t)=>F(e.not_added,t)),...sc("A","A","U"),...sc("D","D","U"),...sc("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),aw=function(e){let t=e.split(kr),r=new Ry;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=kr+(t[n++]||"")),r1(r,o))}return r}}});function s1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!cw.includes(r))],parser(r){return aw(r)}}}var cw,o1=g({"src/lib/tasks/status.ts"(){"use strict";n1(),cw=["--null","-z"]}});function wo(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function i1(){return wo(0,0,0,"",!1)}function a1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:c1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Uc));n(t)}})}}}function c1(e){return e===Uc?i1():me(wo(0,0,0,e),uw,e)}var Uc,uw,u1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Uc="installed=false",uw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,wo(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,wo(U(t),U(r),n,s))})]}}),lw={};Z(lw,{SimpleGitApi:()=>gc});var gc,l1=g({"src/lib/simple-git-api.ts"(){"use strict";hI(),gI(),bI(),SI(),OI(),bb(),kI(),_b(),AI(),NI(),zb(),YI(),sw(),e1(),o1(),H(),u1(),C(),gc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&pI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...Xe(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(ly(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(ly(e.path,e.root&&this._executor||void 0),t):this._runTask(pe("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(CI(e,t===!0),z(arguments))}init(e){return this._runTask(LI(e===!0,this._executor.cwd,de(arguments)),z(arguments))}merge(){return this._runTask(vy(de(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(vy([e,t,...de(arguments)]),z(arguments,!1)):this._runTask(pe("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Bc({remote:Ke(arguments[0],ne),branch:Ke(arguments[1],ne)},de(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...de(arguments)]),z(arguments))}status(){return this._runTask(s1(de(arguments)),z(arguments))}},Object.assign(gc.prototype,yI(),TI(),eI(),xI(),RI(),sI(),qI(),QI(),a1())}}),fw={};Z(fw,{Scheduler:()=>pw});var ky,pw,f1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),kb(),ky=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,dw.createDeferred)();return{promise:t,done:r,id:e}}})(),pw=class{constructor(e=2){this.concurrency=e,this.logger=Ic("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),_o(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,ky());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),mw={};Z(mw,{applyPatchTask:()=>d1});function d1(e,t){return ae(["apply",...t,...e])}var p1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function m1(e,t){return{branch:e,hash:t,success:!0}}function h1(e){return{branch:e,hash:null,success:!1}}var hw,g1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";hw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function gw(e,t){return t===1&&yc.test(e)}var Cy,yc,Ay,ko,y1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";g1(),C(),Cy=/(\S+)\s+\(\S+\s([^)]+)\)/,yc=/^error[^']+'([^']+)'/m,Ay=[new I(Cy,(e,[t,r])=>{let n=m1(t,r);e.all.push(n),e.branches[t]=n}),new I(yc,(e,[t])=>{let r=h1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],ko=(e,t)=>me(new hw,Ay,[e,t])}}),yw,b1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";yw=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function Iy(e){return e?e.charAt(0):""}function bw(e){return me(new yw,ww,e)}var ww,w1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";b1(),C(),ww=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Iy(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(Iy(t),!1,r,n,s)})]}}),xw={};Z(xw,{branchLocalTask:()=>S1,branchTask:()=>x1,containsDeleteBranchCommand:()=>Sw,deleteBranchTask:()=>_1,deleteBranchesTask:()=>v1});function Sw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function x1(e){let t=Sw(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?ko(n,s).all[0]:bw(n)}}}function S1(){return{format:"utf-8",commands:["branch","-v"],parser:bw}}function v1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return ko(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!gw(String(s),r))return i(s);o(n)}}}function _1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return ko(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!gw(String(i),n))return c(i);throw new gn(r.parser(pn(o),pn(s)),String(i))}};return r}var E1=g({"src/lib/tasks/branch.ts"(){"use strict";Cr(),y1(),w1(),C()}}),vw,T1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";vw=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),_w={};Z(_w,{checkIgnoreTask:()=>O1});function O1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:vw}}var R1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";T1()}}),Ew={};Z(Ew,{cloneMirrorTask:()=>C1,cloneTask:()=>Tw});function k1(e){return/^--upload-pack(=|$)/.test(e)}function Tw(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(k1)?pe("git.fetch: potential exploit argument blocked."):ae(n)}function C1(e,t,r){return F(r,"--mirror"),Tw(e,t,r)}var A1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function I1(e,t){return me({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Ow,[e,t])}var Ow,$1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),Ow=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),Rw={};Z(Rw,{fetchTask:()=>L1});function D1(e){return/^--upload-pack(=|$)/.test(e)}function L1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(D1)?pe("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:I1}}var N1=g({"src/lib/tasks/fetch.ts"(){"use strict";$1(),H()}});function P1(e){return me({moves:[]},kw,e)}var kw,M1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),kw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Cw={};Z(Cw,{moveTask:()=>F1});function F1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:P1}}var j1=g({"src/lib/tasks/move.ts"(){"use strict";M1(),C()}}),Aw={};Z(Aw,{pullTask:()=>B1});function B1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return jc(s,o)},onError(s,o,i,a){let c=HI(pn(s.stdOut),pn(s.stdErr));if(c)return a(new gn(c));a(o)}}}var U1=g({"src/lib/tasks/pull.ts"(){"use strict";Cr(),ew(),C()}});function G1(e){let t={};return Iw(e,([r])=>t[r]={name:r}),Object.values(t)}function q1(e){let t={};return Iw(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Iw(e,t){wc(e,r=>t(r.split(/\s+/)))}var V1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),$w={};Z($w,{addRemoteTask:()=>z1,getRemotesTask:()=>W1,listRemotesTask:()=>H1,remoteTask:()=>Z1,removeRemoteTask:()=>Y1});function z1(e,t,r){return ae(["remote","add",...r,e,t])}function W1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?q1:G1}}function H1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Z1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function Y1(e){return ae(["remote","remove",e])}var X1=g({"src/lib/tasks/remote.ts"(){"use strict";V1(),H()}}),Dw={};Z(Dw,{stashListTask:()=>K1});function K1(e={},t){let r=Vb(e),n=["stash","list",...r.commands,...t],s=Bb(r.splitter,r.fields,Dc(n));return Ro(n)||{commands:n,format:"utf-8",parser:s}}var J1=g({"src/lib/tasks/stash-list.ts"(){"use strict";xn(),Gb(),Fc(),zb()}}),Lw={};Z(Lw,{addSubModuleTask:()=>Q1,initSubModuleTask:()=>e$,subModuleTask:()=>Co,updateSubModuleTask:()=>t$});function Q1(e,t){return Co(["add",e,t])}function e$(e){return Co(["init",...e])}function Co(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function t$(e){return Co(["update",...e])}var r$=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function n$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Nw(e,t):0}function Nw(e,t){return e===t?0:e>t?1:-1}function s$(e){return e.trim()}function lo(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var $y,Pw,o$=g({"src/lib/responses/TagList.ts"(){"use strict";$y=class{constructor(e,t){this.all=e,this.latest=t}},Pw=function(e,t=!1){let r=e.split(`
59
+ `).map(s$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return n$(lo(i[0]),lo(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Nw(lo(i[c]),lo(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new $y(r,n)}}}),Mw={};Z(Mw,{addAnnotatedTagTask:()=>c$,addTagTask:()=>a$,tagListTask:()=>i$});function i$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Pw(r,t)}}}function a$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function c$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var u$=g({"src/lib/tasks/tag.ts"(){"use strict";o$()}}),l$=RA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(dI(),V(Ab)),{SimpleGitApi:n}=(l1(),V(lw)),{Scheduler:s}=(f1(),V(fw)),{configurationErrorTask:o}=(H(),V(lc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:d,trailingFunctionArgument:p,trailingOptionsArgument:b}=(C(),V(eb)),{applyPatchTask:T}=(p1(),V(mw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(E1(),V(xw)),{checkIgnoreTask:X}=(R1(),V(_w)),{checkIsRepoTask:we}=(sb(),V(tb)),{cloneTask:ce,cloneMirrorTask:Ae}=(A1(),V(Ew)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(hb(),V(pb)),{diffSummaryTask:Ar}=(Fc(),V(qb)),{fetchTask:xt}=(N1(),V(Rw)),{moveTask:Kw}=(j1(),V(Cw)),{pullTask:Jw}=(U1(),V(Aw)),{pushTagsTask:Qw}=(sw(),V(nw)),{addRemoteTask:ex,getRemotesTask:tx,listRemotesTask:rx,remoteTask:nx,removeRemoteTask:sx}=(X1(),V($w)),{getResetMode:ox,resetTask:ix}=(Rb(),V(Eb)),{stashListTask:ax}=(J1(),V(Dw)),{addSubModuleTask:cx,initSubModuleTask:ux,subModuleTask:lx,updateSubModuleTask:fx}=(r$(),V(Lw)),{addAnnotatedTagTask:dx,addTagTask:px,tagListTask:mx}=(u$(),V(Mw)),{straightThroughBufferTask:hx,straightThroughStringTask:je}=(H(),V(lc));function O(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(O.prototype=Object.create(n.prototype)).constructor=O,O.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},O.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},O.prototype.stashList=function(h){return this._runTask(ax(b(arguments)||{},a(h)&&h||[]),p(arguments))};function zc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),d(arguments))}O.prototype.clone=function(){return this._runTask(zc("clone",ce,...arguments),p(arguments))},O.prototype.mirror=function(){return this._runTask(zc("mirror",Ae,...arguments),p(arguments))},O.prototype.mv=function(h,E){return this._runTask(Kw(h,E),p(arguments))},O.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},O.prototype.pull=function(h,E,B,se){return this._runTask(Jw(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.fetch=function(h,E){return this._runTask(xt(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},O.prototype.tags=function(h,E){return this._runTask(mx(d(arguments)),p(arguments))},O.prototype.rebase=function(){return this._runTask(je(["rebase",...d(arguments)]),p(arguments))},O.prototype.reset=function(h){return this._runTask(ix(ox(h),d(arguments)),p(arguments))},O.prototype.revert=function(h){let E=p(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(je(["revert",...d(arguments,0,!0),h]),E)},O.prototype.addTag=function(h){let E=typeof h=="string"?px(h):o("Git.addTag requires a tag name");return this._runTask(E,p(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(dx(h,E),p(arguments))},O.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.branch=function(h,E){return this._runTask(P(d(arguments)),p(arguments))},O.prototype.branchLocal=function(h){return this._runTask(M(),p(arguments))},O.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...d(arguments,0,!0));var se=p(arguments);return B.length?this._runTask(je(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},O.prototype.submoduleAdd=function(h,E,B){return this._runTask(cx(h,E),p(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(fx(d(arguments,!0)),p(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(ux(d(arguments,!0)),p(arguments))},O.prototype.subModule=function(h,E){return this._runTask(lx(d(arguments)),p(arguments))},O.prototype.listRemote=function(){return this._runTask(rx(d(arguments)),p(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(ex(h,E,d(arguments)),p(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(sx(h),p(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(tx(h===!0),p(arguments))},O.prototype.remote=function(h,E){return this._runTask(nx(d(arguments)),p(arguments))},O.prototype.tag=function(h,E){let B=d(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(je(B),p(arguments))},O.prototype.updateServerInfo=function(h){return this._runTask(je(["update-server-info"]),p(arguments))},O.prototype.pushTags=function(h,E){let B=Qw({remote:f(h,u)},d(arguments));return this._runTask(B,p(arguments))},O.prototype.rm=function(h){return this._runTask(je(["rm","-f",...i(h)]),p(arguments))},O.prototype.rmKeepLocal=function(h){return this._runTask(je(["rm","--cached",...i(h)]),p(arguments))},O.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},O.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},O.prototype._catFile=function(h,E){var B=p(E),se=["cat-file"],$e=E[0];if(typeof $e=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray($e)&&se.push.apply(se,$e);let No=h==="buffer"?hx(se):je(se);return this._runTask(No,B)},O.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):je(["diff",...d(arguments)]);return this._runTask(B,p(arguments))},O.prototype.diffSummary=function(){return this._runTask(Ar(d(arguments,1)),p(arguments))},O.prototype.applyPatch=function(h){let E=l(h)?T(i(h),d([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,p(arguments))},O.prototype.revparse=function(){let h=["rev-parse",...d(arguments,!0)];return this._runTask(je(h,!0),p(arguments))},O.prototype.clean=function(h,E,B){let se=xe(h),$e=se&&h.join("")||f(h,u)||"",No=d([].slice.call(arguments,se?1:0));return this._runTask(Ie($e,No),p(arguments))},O.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},O.prototype.clearQueue=function(){return this},O.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),p(arguments))},O.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),p(arguments))},t.exports=O}});hn();wt();var f$=class extends at{constructor(e,t){super(void 0,t),this.config=e}};wt();wt();var it=class extends at{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Cr();jy();sb();hb();bb();xb();_b();Rb();function d$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new it(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new it(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function p$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function m$(e,t){if(p$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new it(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function h$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new it(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new it(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new it(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function g$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||m$(s,i),t||h$(s,n.method)}),r}}}C();function y$(e){let t=dn(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Dy=(0,Rr.deferred)().promise;function b$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Rr.deferred)(),closeTimeout:(0,Rr.deferred)(),exit:(0,Rr.deferred)(),exitTimeout:(0,Rr.deferred)()},i=Promise.race([e===!1?Dy:o.closeTimeout.promise,t===!1?Dy:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>oc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return ln(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),d=!0,p=()=>void(d=!1);(u=a.stdout)==null||u.on("data",p),(l=a.stderr)==null||l.on("data",p),a.on("error",p),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,d&&(yield oc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var w$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ly="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function x$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Ny(e,t){if(e.length<1||e.length>2)throw new it(void 0,"binary",w$);if(e.some(x$))if(t)console.warn(Ly);else throw new it(void 0,"binary",Ly);let[n,s]=e;return{binary:n,prefix:s}}function S$(e,t=["git"],r=!1){let n=Ny(Xe(t),r);e.on("binary",s=>{n=Ny(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}wt();function v$(e){return!!(e.exitCode&&e.stdErr.length)}function _$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function E$(e=!1,t=v$,r=_$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Py(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new at(void 0,n.toString("utf-8"))}:{error:n}}}}C();var T$=class{constructor(){this.plugins=new Set,this.events=new Fw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Xe(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function O$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?zy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:R$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function R$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function k$(e){let t=Zy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function C$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,d;(f=s.spawned.stdout)==null||f.off("data",c),(d=s.spawned.stderr)==null||d.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new it(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}hn();function A$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(go(o)){n(iy(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>go(i)&&iy(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var I$=l$();function $$(e,t){var r;let n=new T$,s=Jy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!xc(s.baseDir))throw new f$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(y$(s.config)),n.add(g$(s.unsafe)),n.add(A$()),n.add(b$(s.completion)),s.abort&&n.add(d$(s.abort)),s.progress&&n.add(O$(s.progress)),s.timeout&&n.add(C$(s.timeout)),s.spawnOptions&&n.add(k$(s.spawnOptions)),n.add(Py(E$(!0))),s.errors&&n.add(Py(s.errors)),S$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new I$(s,n)}Cr();var jw=$$;async function Bw(){let e=jw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var Vw=q(qw()),qc=Vw.default.bold("@seed-design/codemod"),zw=e=>({event:t,properties:r})=>console.log(qc,t,r,e);var Yw=(0,Do.resolve)(__dirname,"transforms"),Hw=Kc(),$o=Ww(),Sn=null,Xw=null;function M$(){Bw().then(e=>{Xw=e,Sn=zw({...e}),F$(Sn)})}function F$(e){j$(),Hw.version($o.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=Vg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=G$();s.list&&(Vc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Vc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Vc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,Do.resolve)(Yw,t,"index.js");console.log(qc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await U$(i,t,r,s)}),Hw.parse()}function j$(){(0,Lo.satisfies)(process.versions.node,$o.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${$o.engines.node}"
60
60
  Node.js \uBC84\uC804\uC744 \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC8FC\uC138\uC694.
61
61
  \uD604\uC7AC \uBC84\uC804: ${process.versions.node}
62
62
 
63
- $ nvm install ${(0,Do.minVersion)(Io.engines.node)}`),process.exit(1))}var U$=["replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function G$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,$o.resolve)(process.cwd(),d));if(U$.includes(t)){require(e).processCssFiles(r,n);return}c&&(Sn==null||Sn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l];i&&f.push("--extensions",i),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Kw)};await Um("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function q$(){return(0,Yw.readdirSync)(Xw)}function qc(e){console.log(`
63
+ $ nvm install ${(0,Lo.minVersion)($o.engines.node)}`),process.exit(1))}var B$=["replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function U$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,Do.resolve)(process.cwd(),d));if(B$.includes(t)){require(e).processCssFiles(r,n);return}c&&(Sn==null||Sn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l];i&&f.push("--extensions",i),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Xw)};await Gm("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function G$(){return(0,Zw.readdirSync)(Yw)}function Vc(e){console.log(`
64
64
  \uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
65
65
  `,e.join(`
66
- `))}F$();
66
+ `))}M$();