@seed-design/codemod 1.0.0 → 1.0.1
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 +46 -46
- package/bin/transforms/replace-alpha-color/index.js +30 -30
- package/bin/transforms/replace-css-seed-design-color-variable/index.js +43 -42
- package/bin/transforms/replace-css-seed-design-typography-variable/index.js +41 -40
- package/bin/transforms/replace-custom-color-to-seed-design-vars-color/index.js +30 -30
- package/bin/transforms/replace-custom-imported-typography-variable/index.js +29 -29
- package/bin/transforms/replace-custom-seed-design-color/index.js +29 -29
- package/bin/transforms/replace-custom-seed-design-text-component/index.js +29 -29
- package/bin/transforms/replace-custom-seed-design-typography/index.js +26 -26
- package/bin/transforms/replace-custom-seed-design-vars/index.js +27 -27
- package/bin/transforms/replace-custom-text-component-color-prop/index.js +28 -28
- package/bin/transforms/replace-react-icon/index.js +29 -29
- package/bin/transforms/replace-seed-design-token-typography-classname/index.js +30 -30
- package/bin/transforms/replace-seed-design-token-vars/index.js +24 -24
- package/bin/transforms/replace-semantic-stroke-color/index.js +30 -30
- package/bin/transforms/replace-stitches-styled-color/index.js +30 -30
- package/bin/transforms/replace-stitches-styled-typography/index.js +30 -30
- package/bin/transforms/replace-stitches-theme-color/index.js +27 -27
- package/bin/transforms/replace-tailwind-color/index.js +26 -26
- package/bin/transforms/replace-tailwind-typography/index.js +30 -30
- package/package.json +9 -10
package/bin/index.cjs
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var cx=Object.create;var Ao=Object.defineProperty;var ux=Object.getOwnPropertyDescriptor;var lx=Object.getOwnPropertyNames;var fx=Object.getPrototypeOf,dx=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),px=(e,t)=>{for(var r in t)Ao(e,r,{get:t[r],enumerable:!0})},mx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of lx(t))!dx.call(e,s)&&s!==r&&Ao(e,s,{get:()=>t[s],enumerable:!(n=ux(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?cx(fx(e)):{},mx(t||!e||!e.__esModule?Ao(r,"default",{value:e,enumerable:!0}):r,e));var Iu=w((iL,Au)=>{Au.exports=Cu;Cu.sync=yS;var Ru=require("fs");function gS(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 ku(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gS(t,r)}function Cu(e,t,r){Ru.stat(e,function(n,s){r(n,n?!1:ku(s,e,t))})}function yS(e,t){return ku(Ru.statSync(e),e,t)}});var Pu=w((aL,Nu)=>{Nu.exports=Du;Du.sync=bS;var $u=require("fs");function Du(e,t,r){$u.stat(e,function(n,s){r(n,n?!1:Lu(s,t))})}function bS(e,t){return Lu($u.statSync(e),t)}function Lu(e,t){return e.isFile()&&wS(e,t)}function wS(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 Fu=w((uL,Mu)=>{var cL=require("fs"),Dn;process.platform==="win32"||global.TESTING_WINDOWS?Dn=Iu():Dn=Pu();Mu.exports=zo;zo.sync=xS;function zo(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){zo(e,t||{},function(o,i){o?s(o):n(i)})})}Dn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function xS(e,t){try{return Dn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var zu=w((lL,Vu)=>{var Kt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ju=require("path"),SS=Kt?";":":",Bu=Fu(),Uu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Gu=(e,t)=>{let r=t.colon||SS,n=e.match(/\//)||Kt&&e.match(/\\/)?[""]:[...Kt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Kt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Kt?s.split(r):[""];return Kt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},qu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Gu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Uu(e));let p=n[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,x=ju.join(d,e),T=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+x:x;l(c(T,u,0))}),c=(u,l,f)=>new Promise((p,d)=>{if(f===s.length)return p(a(l+1));let x=s[f];Bu(u+x,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+x);else return p(u+x);return p(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},vS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Gu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=ju.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let p=l+n[f];try{if(Bu.sync(p,{pathExt:s}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Uu(e)};Vu.exports=qu;qu.sync=vS});var Hu=w((fL,Wo)=>{"use strict";var Wu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Wo.exports=Wu;Wo.exports.default=Wu});var Ku=w((dL,Xu)=>{"use strict";var Zu=require("path"),_S=zu(),ES=Hu();function Yu(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[ES({env:r})],pathExt:t?Zu.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=Zu.resolve(s?e.options.cwd:"",i)),i}function TS(e){return Yu(e)||Yu(e,!0)}Xu.exports=TS});var Ju=w((pL,Zo)=>{"use strict";var Ho=/([()\][%!^"`<>&|;, *?])/g;function OS(e){return e=e.replace(Ho,"^$1"),e}function RS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Ho,"^$1"),t&&(e=e.replace(Ho,"^$1")),e}Zo.exports.command=OS;Zo.exports.argument=RS});var el=w((mL,Qu)=>{"use strict";Qu.exports=/^#!(.*)/});var rl=w((hL,tl)=>{"use strict";var kS=el();tl.exports=(e="")=>{let t=e.match(kS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var sl=w((gL,nl)=>{"use strict";var Yo=require("fs"),CS=rl();function AS(e){let r=Buffer.alloc(150),n;try{n=Yo.openSync(e,"r"),Yo.readSync(n,r,0,150,0),Yo.closeSync(n)}catch{}return CS(r.toString())}nl.exports=AS});var cl=w((yL,al)=>{"use strict";var IS=require("path"),ol=Ku(),il=Ju(),$S=sl(),DS=process.platform==="win32",LS=/\.(?:com|exe)$/i,NS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function PS(e){e.file=ol(e);let t=e.file&&$S(e.file);return t?(e.args.unshift(e.file),e.command=t,ol(e)):e.file}function MS(e){if(!DS)return e;let t=PS(e),r=!LS.test(t);if(e.options.forceShell||r){let n=NS.test(t);e.command=IS.normalize(e.command),e.command=il.command(e.command),e.args=e.args.map(o=>il.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 FS(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:MS(n)}al.exports=FS});var fl=w((bL,ll)=>{"use strict";var Xo=process.platform==="win32";function Ko(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 jS(e,t){if(!Xo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=ul(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function ul(e,t){return Xo&&e===1&&!t.file?Ko(t.original,"spawn"):null}function BS(e,t){return Xo&&e===1&&!t.file?Ko(t.original,"spawnSync"):null}ll.exports={hookChildProcess:jS,verifyENOENT:ul,verifyENOENTSync:BS,notFoundError:Ko}});var ml=w((wL,Jt)=>{"use strict";var dl=require("child_process"),Jo=cl(),Qo=fl();function pl(e,t,r){let n=Jo(e,t,r),s=dl.spawn(n.command,n.args,n.options);return Qo.hookChildProcess(s,n),s}function US(e,t,r){let n=Jo(e,t,r),s=dl.spawnSync(n.command,n.args,n.options);return s.error=s.error||Qo.verifyENOENTSync(s.status,n),s}Jt.exports=pl;Jt.exports.spawn=pl;Jt.exports.sync=US;Jt.exports._parse=Jo;Jt.exports._enoent=Qo});var Yr=w((uG,Pm)=>{"use strict";var L0="2.0.0",N0=Number.MAX_SAFE_INTEGER||9007199254740991,P0=16,M0=250,F0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Pm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:P0,MAX_SAFE_BUILD_LENGTH:M0,MAX_SAFE_INTEGER:N0,RELEASE_TYPES:F0,SEMVER_SPEC_VERSION:L0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Xr=w((lG,Mm)=>{"use strict";var j0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Mm.exports=j0});var dr=w((ze,Fm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:xa,MAX_SAFE_BUILD_LENGTH:B0,MAX_LENGTH:U0}=Yr(),G0=Xr();ze=Fm.exports={};var q0=ze.re=[],V0=ze.safeRe=[],S=ze.src=[],z0=ze.safeSrc=[],v=ze.t={},W0=0,Sa="[a-zA-Z0-9-]",H0=[["\\s",1],["\\d",U0],[Sa,B0]],Z0=e=>{for(let[t,r]of H0)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=Z0(t),s=W0++;G0(e,s,t),v[e]=s,S[s]=t,z0[s]=n,q0[s]=new RegExp(t,r?"g":void 0),V0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sa}*`);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",`${Sa}+`);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,${xa}})(?:\\.(\\d{1,${xa}}))?(?:\\.(\\d{1,${xa}}))?`);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);ze.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);ze.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);ze.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 Ls=w((fG,jm)=>{"use strict";var Y0=Object.freeze({loose:!0}),X0=Object.freeze({}),K0=e=>e?typeof e!="object"?Y0:e:X0;jm.exports=K0});var va=w((dG,Gm)=>{"use strict";var Bm=/^[0-9]+$/,Um=(e,t)=>{let r=Bm.test(e),n=Bm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},J0=(e,t)=>Um(t,e);Gm.exports={compareIdentifiers:Um,rcompareIdentifiers:J0}});var te=w((pG,Vm)=>{"use strict";var Ns=Xr(),{MAX_LENGTH:qm,MAX_SAFE_INTEGER:Ps}=Yr(),{safeRe:Ms,t:Fs}=dr(),Q0=Ls(),{compareIdentifiers:pr}=va(),_a=class e{constructor(t,r){if(r=Q0(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>qm)throw new TypeError(`version is longer than ${qm} characters`);Ns("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Ms[Fs.LOOSE]:Ms[Fs.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>Ps||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ps||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ps||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<Ps)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(Ns("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)),pr(this.major,t.major)||pr(this.minor,t.minor)||pr(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(Ns("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 pr(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(Ns("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 pr(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?Ms[Fs.PRERELEASELOOSE]:Ms[Fs.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]),pr(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}};Vm.exports=_a});var Ot=w((mG,Wm)=>{"use strict";var zm=te(),eO=(e,t,r=!1)=>{if(e instanceof zm)return e;try{return new zm(e,t)}catch(n){if(!r)return null;throw n}};Wm.exports=eO});var Zm=w((hG,Hm)=>{"use strict";var tO=Ot(),rO=(e,t)=>{let r=tO(e,t);return r?r.version:null};Hm.exports=rO});var Xm=w((gG,Ym)=>{"use strict";var nO=Ot(),sO=(e,t)=>{let r=nO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Ym.exports=sO});var Qm=w((yG,Jm)=>{"use strict";var Km=te(),oO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new Km(e instanceof Km?e.version:e,r).inc(t,n,s).version}catch{return null}};Jm.exports=oO});var rh=w((bG,th)=>{"use strict";var eh=Ot(),iO=(e,t)=>{let r=eh(e,null,!0),n=eh(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"};th.exports=iO});var sh=w((wG,nh)=>{"use strict";var aO=te(),cO=(e,t)=>new aO(e,t).major;nh.exports=cO});var ih=w((xG,oh)=>{"use strict";var uO=te(),lO=(e,t)=>new uO(e,t).minor;oh.exports=lO});var ch=w((SG,ah)=>{"use strict";var fO=te(),dO=(e,t)=>new fO(e,t).patch;ah.exports=dO});var lh=w((vG,uh)=>{"use strict";var pO=Ot(),mO=(e,t)=>{let r=pO(e,t);return r&&r.prerelease.length?r.prerelease:null};uh.exports=mO});var _e=w((_G,dh)=>{"use strict";var fh=te(),hO=(e,t,r)=>new fh(e,r).compare(new fh(t,r));dh.exports=hO});var mh=w((EG,ph)=>{"use strict";var gO=_e(),yO=(e,t,r)=>gO(t,e,r);ph.exports=yO});var gh=w((TG,hh)=>{"use strict";var bO=_e(),wO=(e,t)=>bO(e,t,!0);hh.exports=wO});var js=w((OG,bh)=>{"use strict";var yh=te(),xO=(e,t,r)=>{let n=new yh(e,r),s=new yh(t,r);return n.compare(s)||n.compareBuild(s)};bh.exports=xO});var xh=w((RG,wh)=>{"use strict";var SO=js(),vO=(e,t)=>e.sort((r,n)=>SO(r,n,t));wh.exports=vO});var vh=w((kG,Sh)=>{"use strict";var _O=js(),EO=(e,t)=>e.sort((r,n)=>_O(n,r,t));Sh.exports=EO});var Kr=w((CG,_h)=>{"use strict";var TO=_e(),OO=(e,t,r)=>TO(e,t,r)>0;_h.exports=OO});var Bs=w((AG,Eh)=>{"use strict";var RO=_e(),kO=(e,t,r)=>RO(e,t,r)<0;Eh.exports=kO});var Ea=w((IG,Th)=>{"use strict";var CO=_e(),AO=(e,t,r)=>CO(e,t,r)===0;Th.exports=AO});var Ta=w(($G,Oh)=>{"use strict";var IO=_e(),$O=(e,t,r)=>IO(e,t,r)!==0;Oh.exports=$O});var Us=w((DG,Rh)=>{"use strict";var DO=_e(),LO=(e,t,r)=>DO(e,t,r)>=0;Rh.exports=LO});var Gs=w((LG,kh)=>{"use strict";var NO=_e(),PO=(e,t,r)=>NO(e,t,r)<=0;kh.exports=PO});var Oa=w((NG,Ch)=>{"use strict";var MO=Ea(),FO=Ta(),jO=Kr(),BO=Us(),UO=Bs(),GO=Gs(),qO=(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 MO(e,r,n);case"!=":return FO(e,r,n);case">":return jO(e,r,n);case">=":return BO(e,r,n);case"<":return UO(e,r,n);case"<=":return GO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Ch.exports=qO});var Ih=w((PG,Ah)=>{"use strict";var VO=te(),zO=Ot(),{safeRe:qs,t:Vs}=dr(),WO=(e,t)=>{if(e instanceof VO)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?qs[Vs.COERCEFULL]:qs[Vs.COERCE]);else{let c=t.includePrerelease?qs[Vs.COERCERTLFULL]:qs[Vs.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 zO(`${n}.${s}.${o}${i}${a}`,t)};Ah.exports=WO});var Dh=w((MG,$h)=>{"use strict";var Ra=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}};$h.exports=Ra});var Ee=w((FG,Mh)=>{"use strict";var HO=/\s+/g,ka=class e{constructor(t,r){if(r=YO(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Ca)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(HO," "),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=>!Nh(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&&rR(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&&eR)|(this.options.loose&&tR))+":"+t,s=Lh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,dR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],KO),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],JO),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],QO),G("caret trim",t);let a=t.split(" ").map(f=>nR(f,this.options)).join(" ").split(/\s+/).map(f=>fR(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 Ca(f,this.options));for(let f of u){if(Nh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Lh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Ph(n,r)&&t.set.some(s=>Ph(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 XO(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(pR(this.set[r],t,this.options))return!0;return!1}};Mh.exports=ka;var ZO=Dh(),Lh=new ZO,YO=Ls(),Ca=Jr(),G=Xr(),XO=te(),{safeRe:ue,t:oe,comparatorTrimReplace:KO,tildeTrimReplace:JO,caretTrimReplace:QO}=dr(),{FLAG_INCLUDE_PRERELEASE:eR,FLAG_LOOSE:tR}=Yr(),Nh=e=>e.value==="<0.0.0-0",rR=e=>e.value==="",Ph=(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},nR=(e,t)=>(G("comp",e,t),e=iR(e,t),G("caret",e),e=sR(e,t),G("tildes",e),e=cR(e,t),G("xrange",e),e=lR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",sR=(e,t)=>e.trim().split(/\s+/).map(r=>oR(r,t)).join(" "),oR=(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})},iR=(e,t)=>e.trim().split(/\s+/).map(r=>aR(r,t)).join(" "),aR=(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})},cR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>uR(r,t)).join(" ")),uR=(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),p=f;return s==="="&&p&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&p?(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})},lR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),fR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),dR=e=>(t,r,n,s,o,i,a,c,u,l,f,p)=>(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`:p?c=`<=${u}.${l}.${f}-${p}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),pR=(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!==Ca.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 Jr=w((jG,qh)=>{"use strict";var Qr=Symbol("SemVer ANY"),$a=class e{static get ANY(){return Qr}constructor(t,r){if(r=Fh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Ia("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Qr?this.value="":this.value=this.operator+this.semver.version,Ia("comp",this)}parse(t){let r=this.options.loose?jh[Bh.COMPARATORLOOSE]:jh[Bh.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 Uh(n[2],this.options.loose):this.semver=Qr}toString(){return this.value}test(t){if(Ia("Comparator.test",t,this.options.loose),this.semver===Qr||t===Qr)return!0;if(typeof t=="string")try{t=new Uh(t,this.options)}catch{return!1}return Aa(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 Gh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Gh(this.value,r).test(t.semver):(r=Fh(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("=")||Aa(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Aa(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};qh.exports=$a;var Fh=Ls(),{safeRe:jh,t:Bh}=dr(),Aa=Oa(),Ia=Xr(),Uh=te(),Gh=Ee()});var en=w((BG,Vh)=>{"use strict";var mR=Ee(),hR=(e,t,r)=>{try{t=new mR(t,r)}catch{return!1}return t.test(e)};Vh.exports=hR});var Wh=w((UG,zh)=>{"use strict";var gR=Ee(),yR=(e,t)=>new gR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));zh.exports=yR});var Zh=w((GG,Hh)=>{"use strict";var bR=te(),wR=Ee(),xR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new wR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new bR(n,r))}),n};Hh.exports=xR});var Xh=w((qG,Yh)=>{"use strict";var SR=te(),vR=Ee(),_R=(e,t,r)=>{let n=null,s=null,o=null;try{o=new vR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new SR(n,r))}),n};Yh.exports=_R});var Qh=w((VG,Jh)=>{"use strict";var Da=te(),ER=Ee(),Kh=Kr(),TR=(e,t)=>{e=new ER(e,t);let r=new Da("0.0.0");if(e.test(r)||(r=new Da("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 Da(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||Kh(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||Kh(r,o))&&(r=o)}return r&&e.test(r)?r:null};Jh.exports=TR});var tg=w((zG,eg)=>{"use strict";var OR=Ee(),RR=(e,t)=>{try{return new OR(e,t).range||"*"}catch{return null}};eg.exports=RR});var zs=w((WG,og)=>{"use strict";var kR=te(),sg=Jr(),{ANY:CR}=sg,AR=Ee(),IR=en(),rg=Kr(),ng=Bs(),$R=Gs(),DR=Us(),LR=(e,t,r,n)=>{e=new kR(e,n),t=new AR(t,n);let s,o,i,a,c;switch(r){case">":s=rg,o=$R,i=ng,a=">",c=">=";break;case"<":s=ng,o=DR,i=rg,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(IR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,p=null;if(l.forEach(d=>{d.semver===CR&&(d=new sg(">=0.0.0")),f=f||d,p=p||d,s(d.semver,f.semver,n)?f=d:i(d.semver,p.semver,n)&&(p=d)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&i(e,p.semver))return!1}return!0};og.exports=LR});var ag=w((HG,ig)=>{"use strict";var NR=zs(),PR=(e,t,r)=>NR(e,t,">",r);ig.exports=PR});var ug=w((ZG,cg)=>{"use strict";var MR=zs(),FR=(e,t,r)=>MR(e,t,"<",r);cg.exports=FR});var dg=w((YG,fg)=>{"use strict";var lg=Ee(),jR=(e,t,r)=>(e=new lg(e,r),t=new lg(t,r),e.intersects(t,r));fg.exports=jR});var mg=w((XG,pg)=>{"use strict";var BR=en(),UR=_e();pg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>UR(l,f,r));for(let l of i)BR(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 xg=w((KG,wg)=>{"use strict";var hg=Ee(),Na=Jr(),{ANY:La}=Na,tn=en(),Pa=_e(),GR=(e,t,r={})=>{if(e===t)return!0;e=new hg(e,r),t=new hg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=VR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},qR=[new Na(">=0.0.0-0")],gg=[new Na(">=0.0.0")],VR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===La){if(t.length===1&&t[0].semver===La)return!0;r.includePrerelease?e=qR:e=gg}if(t.length===1&&t[0].semver===La){if(r.includePrerelease)return!0;t=gg}let n=new Set,s,o;for(let d of e)d.operator===">"||d.operator===">="?s=yg(s,d,r):d.operator==="<"||d.operator==="<="?o=bg(o,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Pa(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let d of n){if(s&&!tn(d,String(s),r)||o&&!tn(d,String(o),r))return null;for(let x of t)if(!tn(d,String(x),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=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 d of t){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(a=yg(s,d,r),a===d&&a!==s)return!1}else if(s.operator===">="&&!tn(s.semver,String(d),r))return!1}if(o){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(c=bg(o,d,r),c===d&&c!==o)return!1}else if(o.operator==="<="&&!tn(o.semver,String(d),r))return!1}if(!d.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||p||f)},yg=(e,t,r)=>{if(!e)return t;let n=Pa(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},bg=(e,t,r)=>{if(!e)return t;let n=Pa(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};wg.exports=GR});var Eg=w((JG,_g)=>{"use strict";var Ma=dr(),Sg=Yr(),zR=te(),vg=va(),WR=Ot(),HR=Zm(),ZR=Xm(),YR=Qm(),XR=rh(),KR=sh(),JR=ih(),QR=ch(),ek=lh(),tk=_e(),rk=mh(),nk=gh(),sk=js(),ok=xh(),ik=vh(),ak=Kr(),ck=Bs(),uk=Ea(),lk=Ta(),fk=Us(),dk=Gs(),pk=Oa(),mk=Ih(),hk=Jr(),gk=Ee(),yk=en(),bk=Wh(),wk=Zh(),xk=Xh(),Sk=Qh(),vk=tg(),_k=zs(),Ek=ag(),Tk=ug(),Ok=dg(),Rk=mg(),kk=xg();_g.exports={parse:WR,valid:HR,clean:ZR,inc:YR,diff:XR,major:KR,minor:JR,patch:QR,prerelease:ek,compare:tk,rcompare:rk,compareLoose:nk,compareBuild:sk,sort:ok,rsort:ik,gt:ak,lt:ck,eq:uk,neq:lk,gte:fk,lte:dk,cmp:pk,coerce:mk,Comparator:hk,Range:gk,satisfies:yk,toComparators:bk,maxSatisfying:wk,minSatisfying:xk,minVersion:Sk,validRange:vk,outside:_k,gtr:Ek,ltr:Tk,intersects:Ok,simplifyRange:Rk,subset:kk,SemVer:zR,re:Ma.re,src:Ma.src,tokens:Ma.t,SEMVER_SPEC_VERSION:Sg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Sg.RELEASE_TYPES,compareIdentifiers:vg.compareIdentifiers,rcompareIdentifiers:vg.rcompareIdentifiers}});var Fg=w((R9,Mg)=>{var vr=1e3,_r=vr*60,Er=_r*60,qt=Er*24,jC=qt*7,BC=qt*365.25;Mg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return UC(e);if(r==="number"&&isFinite(e))return t.long?qC(e):GC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function UC(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*BC;case"weeks":case"week":case"w":return r*jC;case"days":case"day":case"d":return r*qt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Er;case"minutes":case"minute":case"mins":case"min":case"m":return r*_r;case"seconds":case"second":case"secs":case"sec":case"s":return r*vr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function GC(e){var t=Math.abs(e);return t>=qt?Math.round(e/qt)+"d":t>=Er?Math.round(e/Er)+"h":t>=_r?Math.round(e/_r)+"m":t>=vr?Math.round(e/vr)+"s":e+"ms"}function qC(e){var t=Math.abs(e);return t>=qt?Ks(e,t,qt,"day"):t>=Er?Ks(e,t,Er,"hour"):t>=_r?Ks(e,t,_r,"minute"):t>=vr?Ks(e,t,vr,"second"):e+" ms"}function Ks(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Ua=w((k9,jg)=>{function VC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Fg(),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 p=0;p<l.length;p++)f=(f<<5)-f+l.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,p=null,d,x;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,Ce)=>{if(ce==="%%")return"%";X++;let Ae=r.formatters[Ce];if(typeof Ae=="function"){let xe=P[X];ce=Ae.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:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,x=r.enabled(l)),x),set:P=>{p=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let p=r(this.namespace+(typeof f>"u"?":":f)+l);return p.log=this.log,p}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(l,f){let p=0,d=0,x=-1,T=0;for(;p<l.length;)if(d<f.length&&(f[d]===l[p]||f[d]==="*"))f[d]==="*"?(x=d,T=p,d++):(p++,d++);else if(x!==-1)d=x+1,T++,p=T;else return!1;for(;d<f.length&&f[d]==="*";)d++;return d===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}jg.exports=VC});var Bg=w((de,Js)=>{de.formatArgs=WC;de.save=HC;de.load=ZC;de.useColors=zC;de.storage=YC();de.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`."))}})();de.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 zC(){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 WC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Js.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)}de.log=console.debug||console.log||(()=>{});function HC(e){try{e?de.storage.setItem("debug",e):de.storage.removeItem("debug")}catch{}}function ZC(){let e;try{e=de.storage.getItem("debug")||de.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function YC(){try{return localStorage}catch{}}Js.exports=Ua()(de);var{formatters:XC}=Js.exports;XC.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Gg=w((C9,Ug)=>{"use strict";Ug.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 zg=w((A9,Vg)=>{"use strict";var KC=require("os"),qg=require("tty"),ke=Gg(),{env:J}=process,Qs;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?Qs=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(Qs=1);function JC(){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 QC(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function eA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=JC();n!==void 0&&(Qs=n);let s=r?Qs: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=KC.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 Ga(e,t={}){let r=eA(e,{streamIsTTY:e&&e.isTTY,...t});return QC(r)}Vg.exports={supportsColor:Ga,stdout:Ga({isTTY:qg.isatty(1)}),stderr:Ga({isTTY:qg.isatty(2)})}});var Hg=w((Q,to)=>{var tA=require("tty"),eo=require("util");Q.init=cA;Q.log=oA;Q.formatArgs=nA;Q.save=iA;Q.load=aA;Q.useColors=rA;Q.destroy=eo.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=zg();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 rA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:tA.isatty(process.stderr.fd)}function nA(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 ux=Object.create;var Co=Object.defineProperty;var lx=Object.getOwnPropertyDescriptor;var fx=Object.getOwnPropertyNames;var dx=Object.getPrototypeOf,px=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mx=(e,t)=>{for(var r in t)Co(e,r,{get:t[r],enumerable:!0})},hx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of fx(t))!px.call(e,s)&&s!==r&&Co(e,s,{get:()=>t[s],enumerable:!(n=lx(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?ux(dx(e)):{},hx(t||!e||!e.__esModule?Co(r,"default",{value:e,enumerable:!0}):r,e));var $u=w((mL,Iu)=>{Iu.exports=Au;Au.sync=bS;var Ru=require("fs");function yS(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 Cu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:yS(t,r)}function Au(e,t,r){Ru.stat(e,function(n,s){r(n,n?!1:Cu(s,e,t))})}function bS(e,t){return Cu(Ru.statSync(e),e,t)}});var Mu=w((hL,Pu)=>{Pu.exports=Lu;Lu.sync=wS;var Du=require("fs");function Lu(e,t,r){Du.stat(e,function(n,s){r(n,n?!1:Nu(s,t))})}function wS(e,t){return Nu(Du.statSync(e),t)}function Nu(e,t){return e.isFile()&&xS(e,t)}function xS(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 ju=w((yL,Fu)=>{var gL=require("fs"),In;process.platform==="win32"||global.TESTING_WINDOWS?In=$u():In=Mu();Fu.exports=qo;qo.sync=SS;function qo(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){qo(e,t||{},function(o,i){o?s(o):n(i)})})}In(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function SS(e,t){try{return In.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Wu=w((bL,zu)=>{var Kt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Bu=require("path"),vS=Kt?";":":",Uu=ju(),Gu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),qu=(e,t)=>{let r=t.colon||vS,n=e.match(/\//)||Kt&&e.match(/\\/)?[""]:[...Kt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Kt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Kt?s.split(r):[""];return Kt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Vu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=qu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Gu(e));let p=n[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,x=Bu.join(d,e),T=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+x:x;l(c(T,u,0))}),c=(u,l,f)=>new Promise((p,d)=>{if(f===s.length)return p(a(l+1));let x=s[f];Uu(u+x,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+x);else return p(u+x);return p(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},_S=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=qu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Bu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let p=l+n[f];try{if(Uu.sync(p,{pathExt:s}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Gu(e)};zu.exports=Vu;Vu.sync=_S});var Zu=w((wL,Vo)=>{"use strict";var Hu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Vo.exports=Hu;Vo.exports.default=Hu});var Ju=w((xL,Ku)=>{"use strict";var Yu=require("path"),ES=Wu(),TS=Zu();function Xu(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=ES.sync(e.command,{path:r[TS({env:r})],pathExt:t?Yu.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=Yu.resolve(s?e.options.cwd:"",i)),i}function OS(e){return Xu(e)||Xu(e,!0)}Ku.exports=OS});var Qu=w((SL,Wo)=>{"use strict";var zo=/([()\][%!^"`<>&|;, *?])/g;function kS(e){return e=e.replace(zo,"^$1"),e}function RS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(zo,"^$1"),t&&(e=e.replace(zo,"^$1")),e}Wo.exports.command=kS;Wo.exports.argument=RS});var tl=w((vL,el)=>{"use strict";el.exports=/^#!(.*)/});var nl=w((_L,rl)=>{"use strict";var CS=tl();rl.exports=(e="")=>{let t=e.match(CS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var ol=w((EL,sl)=>{"use strict";var Ho=require("fs"),AS=nl();function IS(e){let r=Buffer.alloc(150),n;try{n=Ho.openSync(e,"r"),Ho.readSync(n,r,0,150,0),Ho.closeSync(n)}catch{}return AS(r.toString())}sl.exports=IS});var ul=w((TL,cl)=>{"use strict";var $S=require("path"),il=Ju(),al=Qu(),DS=ol(),LS=process.platform==="win32",NS=/\.(?:com|exe)$/i,PS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function MS(e){e.file=il(e);let t=e.file&&DS(e.file);return t?(e.args.unshift(e.file),e.command=t,il(e)):e.file}function FS(e){if(!LS)return e;let t=MS(e),r=!NS.test(t);if(e.options.forceShell||r){let n=PS.test(t);e.command=$S.normalize(e.command),e.command=al.command(e.command),e.args=e.args.map(o=>al.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 jS(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:FS(n)}cl.exports=jS});var dl=w((OL,fl)=>{"use strict";var Zo=process.platform==="win32";function Yo(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 BS(e,t){if(!Zo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=ll(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function ll(e,t){return Zo&&e===1&&!t.file?Yo(t.original,"spawn"):null}function US(e,t){return Zo&&e===1&&!t.file?Yo(t.original,"spawnSync"):null}fl.exports={hookChildProcess:BS,verifyENOENT:ll,verifyENOENTSync:US,notFoundError:Yo}});var hl=w((kL,Jt)=>{"use strict";var pl=require("child_process"),Xo=ul(),Ko=dl();function ml(e,t,r){let n=Xo(e,t,r),s=pl.spawn(n.command,n.args,n.options);return Ko.hookChildProcess(s,n),s}function GS(e,t,r){let n=Xo(e,t,r),s=pl.spawnSync(n.command,n.args,n.options);return s.error=s.error||Ko.verifyENOENTSync(s.status,n),s}Jt.exports=ml;Jt.exports.spawn=ml;Jt.exports.sync=GS;Jt.exports._parse=Xo;Jt.exports._enoent=Ko});var Zr=w((yG,Mm)=>{"use strict";var N0="2.0.0",P0=Number.MAX_SAFE_INTEGER||9007199254740991,M0=16,F0=250,j0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Mm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:M0,MAX_SAFE_BUILD_LENGTH:F0,MAX_SAFE_INTEGER:P0,RELEASE_TYPES:j0,SEMVER_SPEC_VERSION:N0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Yr=w((bG,Fm)=>{"use strict";var B0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Fm.exports=B0});var dr=w((We,jm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ba,MAX_SAFE_BUILD_LENGTH:U0,MAX_LENGTH:G0}=Zr(),q0=Yr();We=jm.exports={};var V0=We.re=[],z0=We.safeRe=[],S=We.src=[],W0=We.safeSrc=[],v=We.t={},H0=0,wa="[a-zA-Z0-9-]",Z0=[["\\s",1],["\\d",G0],[wa,U0]],Y0=e=>{for(let[t,r]of Z0)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},I=(e,t,r)=>{let n=Y0(t),s=H0++;q0(e,s,t),v[e]=s,S[s]=t,W0[s]=n,V0[s]=new RegExp(t,r?"g":void 0),z0[s]=new RegExp(n,r?"g":void 0)};I("NUMERICIDENTIFIER","0|[1-9]\\d*");I("NUMERICIDENTIFIERLOOSE","\\d+");I("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${wa}*`);I("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);I("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);I("PRERELEASEIDENTIFIER",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIER]})`);I("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIERLOOSE]})`);I("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);I("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);I("BUILDIDENTIFIER",`${wa}+`);I("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);I("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);I("FULL",`^${S[v.FULLPLAIN]}$`);I("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);I("LOOSE",`^${S[v.LOOSEPLAIN]}$`);I("GTLT","((?:<|>)?=?)");I("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);I("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);I("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);I("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);I("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);I("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);I("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ba}})(?:\\.(\\d{1,${ba}}))?(?:\\.(\\d{1,${ba}}))?`);I("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);I("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);I("COERCERTL",S[v.COERCE],!0);I("COERCERTLFULL",S[v.COERCEFULL],!0);I("LONETILDE","(?:~>?)");I("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);We.tildeTrimReplace="$1~";I("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);I("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);I("LONECARET","(?:\\^)");I("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);We.caretTrimReplace="$1^";I("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);I("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);I("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);I("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);I("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);We.comparatorTrimReplace="$1$2$3";I("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);I("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);I("STAR","(<|>)?=?\\s*\\*");I("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");I("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var $s=w((wG,Bm)=>{"use strict";var X0=Object.freeze({loose:!0}),K0=Object.freeze({}),J0=e=>e?typeof e!="object"?X0:e:K0;Bm.exports=J0});var xa=w((xG,qm)=>{"use strict";var Um=/^[0-9]+$/,Gm=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=Um.test(e),n=Um.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Q0=(e,t)=>Gm(t,e);qm.exports={compareIdentifiers:Gm,rcompareIdentifiers:Q0}});var re=w((SG,zm)=>{"use strict";var Ds=Yr(),{MAX_LENGTH:Vm,MAX_SAFE_INTEGER:Ls}=Zr(),{safeRe:Ns,t:Ps}=dr(),eO=$s(),{compareIdentifiers:Sa}=xa(),va=class e{constructor(t,r){if(r=eO(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>Vm)throw new TypeError(`version is longer than ${Vm} characters`);Ds("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Ns[Ps.LOOSE]:Ns[Ps.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>Ls||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ls||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ls||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<Ls)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(Ds("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)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}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(Ds("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 Sa(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(Ds("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 Sa(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?Ns[Ps.PRERELEASELOOSE]:Ns[Ps.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]),Sa(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}};zm.exports=va});var Ot=w((vG,Hm)=>{"use strict";var Wm=re(),tO=(e,t,r=!1)=>{if(e instanceof Wm)return e;try{return new Wm(e,t)}catch(n){if(!r)return null;throw n}};Hm.exports=tO});var Ym=w((_G,Zm)=>{"use strict";var rO=Ot(),nO=(e,t)=>{let r=rO(e,t);return r?r.version:null};Zm.exports=nO});var Km=w((EG,Xm)=>{"use strict";var sO=Ot(),oO=(e,t)=>{let r=sO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Xm.exports=oO});var eh=w((TG,Qm)=>{"use strict";var Jm=re(),iO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new Jm(e instanceof Jm?e.version:e,r).inc(t,n,s).version}catch{return null}};Qm.exports=iO});var nh=w((OG,rh)=>{"use strict";var th=Ot(),aO=(e,t)=>{let r=th(e,null,!0),n=th(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"};rh.exports=aO});var oh=w((kG,sh)=>{"use strict";var cO=re(),uO=(e,t)=>new cO(e,t).major;sh.exports=uO});var ah=w((RG,ih)=>{"use strict";var lO=re(),fO=(e,t)=>new lO(e,t).minor;ih.exports=fO});var uh=w((CG,ch)=>{"use strict";var dO=re(),pO=(e,t)=>new dO(e,t).patch;ch.exports=pO});var fh=w((AG,lh)=>{"use strict";var mO=Ot(),hO=(e,t)=>{let r=mO(e,t);return r&&r.prerelease.length?r.prerelease:null};lh.exports=hO});var Ee=w((IG,ph)=>{"use strict";var dh=re(),gO=(e,t,r)=>new dh(e,r).compare(new dh(t,r));ph.exports=gO});var hh=w(($G,mh)=>{"use strict";var yO=Ee(),bO=(e,t,r)=>yO(t,e,r);mh.exports=bO});var yh=w((DG,gh)=>{"use strict";var wO=Ee(),xO=(e,t)=>wO(e,t,!0);gh.exports=xO});var Ms=w((LG,wh)=>{"use strict";var bh=re(),SO=(e,t,r)=>{let n=new bh(e,r),s=new bh(t,r);return n.compare(s)||n.compareBuild(s)};wh.exports=SO});var Sh=w((NG,xh)=>{"use strict";var vO=Ms(),_O=(e,t)=>e.sort((r,n)=>vO(r,n,t));xh.exports=_O});var _h=w((PG,vh)=>{"use strict";var EO=Ms(),TO=(e,t)=>e.sort((r,n)=>EO(n,r,t));vh.exports=TO});var Xr=w((MG,Eh)=>{"use strict";var OO=Ee(),kO=(e,t,r)=>OO(e,t,r)>0;Eh.exports=kO});var Fs=w((FG,Th)=>{"use strict";var RO=Ee(),CO=(e,t,r)=>RO(e,t,r)<0;Th.exports=CO});var _a=w((jG,Oh)=>{"use strict";var AO=Ee(),IO=(e,t,r)=>AO(e,t,r)===0;Oh.exports=IO});var Ea=w((BG,kh)=>{"use strict";var $O=Ee(),DO=(e,t,r)=>$O(e,t,r)!==0;kh.exports=DO});var js=w((UG,Rh)=>{"use strict";var LO=Ee(),NO=(e,t,r)=>LO(e,t,r)>=0;Rh.exports=NO});var Bs=w((GG,Ch)=>{"use strict";var PO=Ee(),MO=(e,t,r)=>PO(e,t,r)<=0;Ch.exports=MO});var Ta=w((qG,Ah)=>{"use strict";var FO=_a(),jO=Ea(),BO=Xr(),UO=js(),GO=Fs(),qO=Bs(),VO=(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 FO(e,r,n);case"!=":return jO(e,r,n);case">":return BO(e,r,n);case">=":return UO(e,r,n);case"<":return GO(e,r,n);case"<=":return qO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Ah.exports=VO});var $h=w((VG,Ih)=>{"use strict";var zO=re(),WO=Ot(),{safeRe:Us,t:Gs}=dr(),HO=(e,t)=>{if(e instanceof zO)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?Us[Gs.COERCEFULL]:Us[Gs.COERCE]);else{let c=t.includePrerelease?Us[Gs.COERCERTLFULL]:Us[Gs.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 WO(`${n}.${s}.${o}${i}${a}`,t)};Ih.exports=HO});var Lh=w((zG,Dh)=>{"use strict";var Oa=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}};Dh.exports=Oa});var Te=w((WG,Fh)=>{"use strict";var ZO=/\s+/g,ka=class e{constructor(t,r){if(r=XO(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Ra)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(ZO," "),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=>!Ph(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&&nk(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&&tk)|(this.options.loose&&rk))+":"+t,s=Nh.get(n);if(s)return s;let o=this.options.loose,i=o?ie[ne.HYPHENRANGELOOSE]:ie[ne.HYPHENRANGE];t=t.replace(i,pk(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ie[ne.COMPARATORTRIM],JO),G("comparator trim",t),t=t.replace(ie[ne.TILDETRIM],QO),G("tilde trim",t),t=t.replace(ie[ne.CARETTRIM],ek),G("caret trim",t);let a=t.split(" ").map(f=>sk(f,this.options)).join(" ").split(/\s+/).map(f=>dk(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ie[ne.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Ra(f,this.options));for(let f of u){if(Ph(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Nh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Mh(n,r)&&t.set.some(s=>Mh(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 KO(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(mk(this.set[r],t,this.options))return!0;return!1}};Fh.exports=ka;var YO=Lh(),Nh=new YO,XO=$s(),Ra=Kr(),G=Yr(),KO=re(),{safeRe:ie,t:ne,comparatorTrimReplace:JO,tildeTrimReplace:QO,caretTrimReplace:ek}=dr(),{FLAG_INCLUDE_PRERELEASE:tk,FLAG_LOOSE:rk}=Zr(),Ph=e=>e.value==="<0.0.0-0",nk=e=>e.value==="",Mh=(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},sk=(e,t)=>(e=e.replace(ie[ne.BUILD],""),G("comp",e,t),e=ak(e,t),G("caret",e),e=ok(e,t),G("tildes",e),e=uk(e,t),G("xrange",e),e=fk(e,t),G("stars",e),e),ae=e=>!e||e.toLowerCase()==="x"||e==="*",ok=(e,t)=>e.trim().split(/\s+/).map(r=>ik(r,t)).join(" "),ik=(e,t)=>{let r=t.loose?ie[ne.TILDELOOSE]:ie[ne.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ae(s)?c="":ae(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ae(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})},ak=(e,t)=>e.trim().split(/\s+/).map(r=>ck(r,t)).join(" "),ck=(e,t)=>{G("caret",e,t);let r=t.loose?ie[ne.CARETLOOSE]:ie[ne.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 ae(o)?u="":ae(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ae(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})},uk=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>lk(r,t)).join(" ")),lk=(e,t)=>{e=e.trim();let r=t.loose?ie[ne.XRANGELOOSE]:ie[ne.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ae(o),l=u||ae(i),f=l||ae(a),p=f;return s==="="&&p&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&p?(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})},fk=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ie[ne.STAR],"")),dk=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ie[t.includePrerelease?ne.GTE0PRE:ne.GTE0],"")),pk=e=>(t,r,n,s,o,i,a,c,u,l,f,p)=>(ae(n)?r="":ae(s)?r=`>=${n}.0.0${e?"-0":""}`:ae(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ae(u)?c="":ae(l)?c=`<${+u+1}.0.0-0`:ae(f)?c=`<${u}.${+l+1}.0-0`:p?c=`<=${u}.${l}.${f}-${p}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),mk=(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!==Ra.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 Kr=w((HG,Vh)=>{"use strict";var Jr=Symbol("SemVer ANY"),Ia=class e{static get ANY(){return Jr}constructor(t,r){if(r=jh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Aa("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Jr?this.value="":this.value=this.operator+this.semver.version,Aa("comp",this)}parse(t){let r=this.options.loose?Bh[Uh.COMPARATORLOOSE]:Bh[Uh.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 Gh(n[2],this.options.loose):this.semver=Jr}toString(){return this.value}test(t){if(Aa("Comparator.test",t,this.options.loose),this.semver===Jr||t===Jr)return!0;if(typeof t=="string")try{t=new Gh(t,this.options)}catch{return!1}return Ca(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 qh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new qh(this.value,r).test(t.semver):(r=jh(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("=")||Ca(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Ca(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Vh.exports=Ia;var jh=$s(),{safeRe:Bh,t:Uh}=dr(),Ca=Ta(),Aa=Yr(),Gh=re(),qh=Te()});var Qr=w((ZG,zh)=>{"use strict";var hk=Te(),gk=(e,t,r)=>{try{t=new hk(t,r)}catch{return!1}return t.test(e)};zh.exports=gk});var Hh=w((YG,Wh)=>{"use strict";var yk=Te(),bk=(e,t)=>new yk(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Wh.exports=bk});var Yh=w((XG,Zh)=>{"use strict";var wk=re(),xk=Te(),Sk=(e,t,r)=>{let n=null,s=null,o=null;try{o=new xk(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new wk(n,r))}),n};Zh.exports=Sk});var Kh=w((KG,Xh)=>{"use strict";var vk=re(),_k=Te(),Ek=(e,t,r)=>{let n=null,s=null,o=null;try{o=new _k(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new vk(n,r))}),n};Xh.exports=Ek});var eg=w((JG,Qh)=>{"use strict";var $a=re(),Tk=Te(),Jh=Xr(),Ok=(e,t)=>{e=new Tk(e,t);let r=new $a("0.0.0");if(e.test(r)||(r=new $a("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 $a(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||Jh(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||Jh(r,o))&&(r=o)}return r&&e.test(r)?r:null};Qh.exports=Ok});var rg=w((QG,tg)=>{"use strict";var kk=Te(),Rk=(e,t)=>{try{return new kk(e,t).range||"*"}catch{return null}};tg.exports=Rk});var qs=w((e9,ig)=>{"use strict";var Ck=re(),og=Kr(),{ANY:Ak}=og,Ik=Te(),$k=Qr(),ng=Xr(),sg=Fs(),Dk=Bs(),Lk=js(),Nk=(e,t,r,n)=>{e=new Ck(e,n),t=new Ik(t,n);let s,o,i,a,c;switch(r){case">":s=ng,o=Dk,i=sg,a=">",c=">=";break;case"<":s=sg,o=Lk,i=ng,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($k(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,p=null;if(l.forEach(d=>{d.semver===Ak&&(d=new og(">=0.0.0")),f=f||d,p=p||d,s(d.semver,f.semver,n)?f=d:i(d.semver,p.semver,n)&&(p=d)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&i(e,p.semver))return!1}return!0};ig.exports=Nk});var cg=w((t9,ag)=>{"use strict";var Pk=qs(),Mk=(e,t,r)=>Pk(e,t,">",r);ag.exports=Mk});var lg=w((r9,ug)=>{"use strict";var Fk=qs(),jk=(e,t,r)=>Fk(e,t,"<",r);ug.exports=jk});var pg=w((n9,dg)=>{"use strict";var fg=Te(),Bk=(e,t,r)=>(e=new fg(e,r),t=new fg(t,r),e.intersects(t,r));dg.exports=Bk});var hg=w((s9,mg)=>{"use strict";var Uk=Qr(),Gk=Ee();mg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>Gk(l,f,r));for(let l of i)Uk(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 Sg=w((o9,xg)=>{"use strict";var gg=Te(),La=Kr(),{ANY:Da}=La,en=Qr(),Na=Ee(),qk=(e,t,r={})=>{if(e===t)return!0;e=new gg(e,r),t=new gg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=zk(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},Vk=[new La(">=0.0.0-0")],yg=[new La(">=0.0.0")],zk=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Da){if(t.length===1&&t[0].semver===Da)return!0;r.includePrerelease?e=Vk:e=yg}if(t.length===1&&t[0].semver===Da){if(r.includePrerelease)return!0;t=yg}let n=new Set,s,o;for(let d of e)d.operator===">"||d.operator===">="?s=bg(s,d,r):d.operator==="<"||d.operator==="<="?o=wg(o,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Na(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let d of n){if(s&&!en(d,String(s),r)||o&&!en(d,String(o),r))return null;for(let x of t)if(!en(d,String(x),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=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 d of t){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(a=bg(s,d,r),a===d&&a!==s)return!1}else if(s.operator===">="&&!en(s.semver,String(d),r))return!1}if(o){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(c=wg(o,d,r),c===d&&c!==o)return!1}else if(o.operator==="<="&&!en(o.semver,String(d),r))return!1}if(!d.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||p||f)},bg=(e,t,r)=>{if(!e)return t;let n=Na(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},wg=(e,t,r)=>{if(!e)return t;let n=Na(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};xg.exports=qk});var Tg=w((i9,Eg)=>{"use strict";var Pa=dr(),vg=Zr(),Wk=re(),_g=xa(),Hk=Ot(),Zk=Ym(),Yk=Km(),Xk=eh(),Kk=nh(),Jk=oh(),Qk=ah(),eR=uh(),tR=fh(),rR=Ee(),nR=hh(),sR=yh(),oR=Ms(),iR=Sh(),aR=_h(),cR=Xr(),uR=Fs(),lR=_a(),fR=Ea(),dR=js(),pR=Bs(),mR=Ta(),hR=$h(),gR=Kr(),yR=Te(),bR=Qr(),wR=Hh(),xR=Yh(),SR=Kh(),vR=eg(),_R=rg(),ER=qs(),TR=cg(),OR=lg(),kR=pg(),RR=hg(),CR=Sg();Eg.exports={parse:Hk,valid:Zk,clean:Yk,inc:Xk,diff:Kk,major:Jk,minor:Qk,patch:eR,prerelease:tR,compare:rR,rcompare:nR,compareLoose:sR,compareBuild:oR,sort:iR,rsort:aR,gt:cR,lt:uR,eq:lR,neq:fR,gte:dR,lte:pR,cmp:mR,coerce:hR,Comparator:gR,Range:yR,satisfies:bR,toComparators:wR,maxSatisfying:xR,minSatisfying:SR,minVersion:vR,validRange:_R,outside:ER,gtr:TR,ltr:OR,intersects:kR,simplifyRange:RR,subset:CR,SemVer:Wk,re:Pa.re,src:Pa.src,tokens:Pa.t,SEMVER_SPEC_VERSION:vg.SEMVER_SPEC_VERSION,RELEASE_TYPES:vg.RELEASE_TYPES,compareIdentifiers:_g.compareIdentifiers,rcompareIdentifiers:_g.rcompareIdentifiers}});var jg=w((N9,Fg)=>{var Sr=1e3,vr=Sr*60,_r=vr*60,qt=_r*24,BC=qt*7,UC=qt*365.25;Fg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return GC(e);if(r==="number"&&isFinite(e))return t.long?VC(e):qC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function GC(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*UC;case"weeks":case"week":case"w":return r*BC;case"days":case"day":case"d":return r*qt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_r;case"minutes":case"minute":case"mins":case"min":case"m":return r*vr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Sr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function qC(e){var t=Math.abs(e);return t>=qt?Math.round(e/qt)+"d":t>=_r?Math.round(e/_r)+"h":t>=vr?Math.round(e/vr)+"m":t>=Sr?Math.round(e/Sr)+"s":e+"ms"}function VC(e){var t=Math.abs(e);return t>=qt?Ys(e,t,qt,"day"):t>=_r?Ys(e,t,_r,"hour"):t>=vr?Ys(e,t,vr,"minute"):t>=Sr?Ys(e,t,Sr,"second"):e+" ms"}function Ys(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Ba=w((P9,Bg)=>{function zC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=jg(),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 p=0;p<l.length;p++)f=(f<<5)-f+l.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,p=null,d,x;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,(ue,Ae)=>{if(ue==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let Se=P[X];ue=Ie.call(M,Se),P.splice(X,1),X--}return ue}),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:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,x=r.enabled(l)),x),set:P=>{p=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let p=r(this.namespace+(typeof f>"u"?":":f)+l);return p.log=this.log,p}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(l,f){let p=0,d=0,x=-1,T=0;for(;p<l.length;)if(d<f.length&&(f[d]===l[p]||f[d]==="*"))f[d]==="*"?(x=d,T=p,d++):(p++,d++);else if(x!==-1)d=x+1,T++,p=T;else return!1;for(;d<f.length&&f[d]==="*";)d++;return d===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}Bg.exports=zC});var Ug=w((de,Xs)=>{de.formatArgs=HC;de.save=ZC;de.load=YC;de.useColors=WC;de.storage=XC();de.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`."))}})();de.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 WC(){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 HC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Xs.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)}de.log=console.debug||console.log||(()=>{});function ZC(e){try{e?de.storage.setItem("debug",e):de.storage.removeItem("debug")}catch{}}function YC(){let e;try{e=de.storage.getItem("debug")||de.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function XC(){try{return localStorage}catch{}}Xs.exports=Ba()(de);var{formatters:KC}=Xs.exports;KC.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var qg=w((M9,Gg)=>{"use strict";Gg.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 Wg=w((F9,zg)=>{"use strict";var JC=require("os"),Vg=require("tty"),Ce=qg(),{env:J}=process,Ks;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?Ks=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(Ks=1);function QC(){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 eA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function tA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=QC();n!==void 0&&(Ks=n);let s=r?Ks:n;if(s===0)return 0;if(r){if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("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=JC.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 Ua(e,t={}){let r=tA(e,{streamIsTTY:e&&e.isTTY,...t});return eA(r)}zg.exports={supportsColor:Ua,stdout:Ua({isTTY:Vg.isatty(1)}),stderr:Ua({isTTY:Vg.isatty(2)})}});var Zg=w((Q,Qs)=>{var rA=require("tty"),Js=require("util");Q.init=uA;Q.log=iA;Q.formatArgs=sA;Q.save=aA;Q.load=cA;Q.useColors=nA;Q.destroy=Js.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=Wg();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 nA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:rA.isatty(process.stderr.fd)}function sA(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+"+
|
|
5
|
-
`)}function
|
|
6
|
-
`).map(t=>t.trim()).join(" ")};
|
|
7
|
-
`)}
|
|
8
|
-
`)})}let
|
|
9
|
-
`)})}this.examples.length>0&&
|
|
10
|
-
`)}),
|
|
11
|
-
${
|
|
4
|
+
`+o),e.push(s+"m+"+Qs.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=oA()+t+" "+e[0]}function oA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function iA(...e){return process.stderr.write(Js.formatWithOptions(Q.inspectOpts,...e)+`
|
|
5
|
+
`)}function aA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function cA(){return process.env.DEBUG}function uA(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]]}Qs.exports=Ba()(Q);var{formatters:Hg}=Qs.exports;Hg.o=function(e){return this.inspectOpts.colors=this.useColors,Js.inspect(e,this.inspectOpts).split(`
|
|
6
|
+
`).map(t=>t.trim()).join(" ")};Hg.O=function(e){return this.inspectOpts.colors=this.useColors,Js.inspect(e,this.inspectOpts)}});var qa=w((j9,Ga)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ga.exports=Ug():Ga.exports=Zg()});var Yg=w(ye=>{"use strict";var lA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var fA=require("fs"),dA=lA(qa()),Er=dA.default("@kwsites/file-exists");function pA(e,t,r){Er("checking %s",e);try{let n=fA.statSync(e);return n.isFile()&&t?(Er("[OK] path represents a file"),!0):n.isDirectory()&&r?(Er("[OK] path represents a directory"),!0):(Er("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Er("[FAIL] path is not accessible: %o",n),!1;throw Er("[FATAL] %o",n),n}}function mA(e,t=ye.READABLE){return pA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=mA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var Xg=w(eo=>{"use strict";function hA(e){for(var t in e)eo.hasOwnProperty(t)||(eo[t]=e[t])}Object.defineProperty(eo,"__esModule",{value:!0});hA(Yg())});var za=w(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.createDeferred=Vt.deferred=void 0;function Va(){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}}}Vt.deferred=Va;Vt.createDeferred=Va;Vt.default=Va});var Pw=w((w3,Lc)=>{var Eo=process||{},Lw=Eo.argv||[],_o=Eo.env||{},O$=!(_o.NO_COLOR||Lw.includes("--no-color"))&&(!!_o.FORCE_COLOR||Lw.includes("--color")||Eo.platform==="win32"||(Eo.stdout||{}).isTTY&&_o.TERM!=="dumb"||!!_o.CI),k$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+R$(s,t,r,o)+t:e+s+t},R$=(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)},Nw=(e=O$)=>{let t=e?k$:()=>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")}};Lc.exports=Nw();Lc.exports.createColors=Nw});var jw=w((S3,C$)=>{C$.exports={name:"@seed-design/codemod",version:"1.0.1",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 test","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^1.0.0",cac:"^7.0.0","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.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":"^25.0.0","csv-parse":"^6.0.0",dotenv:"^17.0.0",esbuild:"^0.27.0",typescript:"^6.0.0"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^1.17.0","@karrotmarket/react-multicolor-icon":"^1.17.0"},publishConfig:{access:"public"},engines:{node:">=20.19.0"}}});function Ao(e){return e==null?[]:Array.isArray(e)?e:[e]}function gx(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 yx(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let p=t.alias!==void 0,d=t.unknown!==void 0,x=t.default!==void 0;if(t.alias=t.alias||{},t.string=Ao(t.string),t.boolean=Ao(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Ao(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(x){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=d?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),d&&!~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],d&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);gx(a,o,l+1<n.length||i,t)}}}if(x)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}function Uc(e){return e.replace(/[<[].+/,"").trim()}function bx(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}function wx(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((s,o)=>o!==r&&s.names.some(i=>n.names.includes(i))&&typeof s.required=="boolean")||t.boolean.push(n.names[0]));return t}function Fc(e){return e.sort((t,r)=>t.length>r.length?-1:1)[0]}function jc(e,t){return e.length>=t?e:`${e}${" ".repeat(t-e.length)}`}function xx(e){return e.replaceAll(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase())}function Sx(e,t,r){let n=e;for(let s=0;s<t.length;s++){let o=t[s];if(s===t.length-1){n[o]=r;return}if(n[o]==null){let i=+t[s+1]>-1;n[o]=i?[]:{}}n=n[o]}}function vx(e,t){for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=[e[r]].flat(),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}}function _x(e){let t=/([^\\/]+)$/.exec(e);return t?t[1]:""}function Gc(e){return e.split(".").map((t,r)=>r===0?xx(t):t).join(".")}var hn=class extends Error{constructor(e){super(e),this.name="CACError",typeof Error.captureStackTrace!="function"&&(this.stack=new Error(e).stack)}},Ex=class{rawName;description;name;names;isBoolean;required;config;negated;constructor(e,t,r){this.rawName=e,this.description=t,this.config=Object.assign({},r),e=e.replaceAll(".*",""),this.negated=!1,this.names=Uc(e).split(",").map(n=>{let s=n.trim().replace(/^-{1,2}/,"");return s.startsWith("no-")&&(this.negated=!0,s=s.replace(/^no-/,"")),Gc(s)}).sort((n,s)=>n.length>s.length?1:-1),this.name=this.names.at(-1),this.negated&&this.config.default==null&&(this.config.default=!0),e.includes("<")?this.required=!0:e.includes("[")?this.required=!1:this.isBoolean=!0}},Io,gn,Bc;if(typeof process<"u"){let e;typeof Deno<"u"&&typeof((Bc=Deno.version)==null?void 0:Bc.deno)=="string"?e="deno":typeof Bun<"u"&&typeof Bun.version=="string"?e="bun":e="node",gn=`${process.platform}-${process.arch} ${e}-${process.version}`,Io=process.argv}else typeof navigator>"u"?gn="unknown":gn=`${navigator.platform} ${navigator.userAgent}`;var qc=class{rawName;description;config;cli;options;aliasNames;name;args;commandAction;usageText;versionNumber;examples;helpCallback;globalCommand;constructor(e,t,r={},n){this.rawName=e,this.description=t,this.config=r,this.cli=n,this.options=[],this.aliasNames=[],this.name=Uc(e),this.args=bx(e),this.examples=[]}usage(e){return this.usageText=e,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(e,t="-v, --version"){return this.versionNumber=e,this.option(t,"Display version number"),this}example(e){return this.examples.push(e),this}option(e,t,r){let n=new Ex(e,t,r);return this.options.push(n),this}alias(e){return this.aliasNames.push(e),this}action(e){return this.commandAction=e,this}isMatched(e){return this.name===e||this.aliasNames.includes(e)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof Vc}hasOption(e){return e=e.split(".")[0],this.options.find(t=>t.names.includes(e))}outputHelp(){let{name:e,commands:t}=this.cli,{versionNumber:r,options:n,helpCallback:s}=this.cli.globalCommand,o=[{body:`${e}${r?`/${r}`:""}`}];if(o.push({title:"Usage",body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&t.length>0){let a=Fc(t.map(c=>c.rawName));o.push({title:"Commands",body:t.map(c=>` ${jc(c.rawName,a.length)} ${c.description}`).join(`
|
|
7
|
+
`)},{title:"For more info, run any command with the `--help` flag",body:t.map(c=>` $ ${e}${c.name===""?"":` ${c.name}`} --help`).join(`
|
|
8
|
+
`)})}let i=this.isGlobalCommand?n:[...this.options,...n||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(i=i.filter(a=>a.name!=="version")),i.length>0){let a=Fc(i.map(c=>c.rawName));o.push({title:"Options",body:i.map(c=>` ${jc(c.rawName,a.length)} ${c.description} ${c.config.default===void 0?"":`(default: ${c.config.default})`}`).join(`
|
|
9
|
+
`)})}this.examples.length>0&&o.push({title:"Examples",body:this.examples.map(a=>typeof a=="function"?a(e):a).join(`
|
|
10
|
+
`)}),s&&(o=s(o)||o),console.info(o.map(a=>a.title?`${a.title}:
|
|
11
|
+
${a.body}`:a.body).join(`
|
|
12
12
|
|
|
13
|
-
`))}outputVersion(){let{name:
|
|
14
|
-
`?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=
|
|
15
|
-
`]),
|
|
13
|
+
`))}outputVersion(){let{name:e}=this.cli,{versionNumber:t}=this.cli.globalCommand;t&&console.info(`${e}/${t} ${gn}`)}checkRequiredArgs(){let e=this.args.filter(t=>t.required).length;if(this.cli.args.length<e)throw new hn(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:e,globalCommand:t}=this.cli;if(!this.config.allowUnknownOptions){for(let r of Object.keys(e))if(r!=="--"&&!this.hasOption(r)&&!t.hasOption(r))throw new hn(`Unknown option \`${r.length>1?`--${r}`:`-${r}`}\``)}}checkOptionValue(){let{options:e,globalCommand:t}=this.cli,r=[...t.options,...this.options];for(let n of r){let s=e[n.name.split(".")[0]];if(n.required){let o=r.some(i=>i.negated&&i.names.includes(n.name));if(s===!0||s===!1&&!o)throw new hn(`option \`${n.rawName}\` value is missing`)}}}checkUnusedArgs(){let e=this.args.some(t=>t.variadic)?1/0:this.args.length;if(e<this.cli.args.length)throw new hn(`Unused args: ${this.cli.args.slice(e).map(t=>`\`${t}\``).join(", ")}`)}},Vc=class extends qc{constructor(e){super("@@global@@","",{},e)}},Tx=class extends EventTarget{name;commands;globalCommand;matchedCommand;matchedCommandName;rawArgs;args;options;showHelpOnExit;showVersionOnExit;constructor(e=""){super(),this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new Vc(this),this.globalCommand.usage("<command> [options]")}usage(e){return this.globalCommand.usage(e),this}command(e,t,r){let n=new qc(e,t||"",r,this);return n.globalCommand=this.globalCommand,this.commands.push(n),n}option(e,t,r){return this.globalCommand.option(e,t,r),this}help(e){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=e,this.showHelpOnExit=!0,this}version(e,t="-v, --version"){return this.globalCommand.version(e,t),this.showVersionOnExit=!0,this}example(e){return this.globalCommand.example(e),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:e,options:t},r,n){return this.args=e,this.options=t,r&&(this.matchedCommand=r),n&&(this.matchedCommandName=n),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e,{run:t=!0}={}){if(!e){if(!Io)throw new Error("No argv provided and runtime process argv is not available.");e=Io}this.rawArgs=e,this.name||(this.name=e[1]?_x(e[1]):"cli");let r=!0;for(let s of this.commands){let o=this.mri(e.slice(2),s),i=o.args[0];if(s.isMatched(i)){r=!1;let a={...o,args:o.args.slice(1)};this.setParsedInfo(a,s,i),this.dispatchEvent(new CustomEvent(`command:${i}`,{detail:s}))}}if(r){for(let s of this.commands)if(s.isDefaultCommand){r=!1;let o=this.mri(e.slice(2),s);this.setParsedInfo(o,s),this.dispatchEvent(new CustomEvent("command:!",{detail:s}))}}if(r){let s=this.mri(e.slice(2));this.setParsedInfo(s)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),t=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),t=!1,this.unsetMatchedCommand());let n={args:this.args,options:this.options};return t&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.dispatchEvent(new CustomEvent("command:*",{detail:this.args[0]})),n}mri(e,t){let r=[...this.globalCommand.options,...t?t.options:[]],n=wx(r),s=[],o=e.indexOf("--");o!==-1&&(s=e.slice(o+1),e=e.slice(0,o));let i=yx(e,n);i=Object.keys(i).reduce((f,p)=>({...f,[Gc(p)]:i[p]}),{_:[]});let a=i._,c={"--":s},u=t&&t.config.ignoreOptionDefaultValue?t.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,l=Object.create(null);for(let f of r){if(!u&&f.config.default!==void 0)for(let p of f.names)c[p]=f.config.default;Array.isArray(f.config.type)&&l[f.name]===void 0&&(l[f.name]=Object.create(null),l[f.name].shouldTransform=!0,l[f.name].transformFunction=f.config.type[0])}for(let f of Object.keys(i))f!=="_"&&(Sx(c,f.split("."),i[f]),vx(c,l));return{args:a,options:c}}runMatchedCommand(){let{args:e,options:t,matchedCommand:r}=this;if(!r||!r.commandAction)return;r.checkUnknownOptions(),r.checkOptionValue(),r.checkRequiredArgs(),r.checkUnusedArgs();let n=[];return r.args.forEach((s,o)=>{s.variadic?n.push(e.slice(o)):n.push(e[o])}),n.push(t),r.commandAction.apply(this,n)}},zc=(e="")=>new Tx(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 Wc=require("node:url"),Zt=(e,t)=>{let r=Do(Ox(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Ox=e=>$o(e)?e.toString():e,$o=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Do=e=>e instanceof URL?(0,Wc.fileURLToPath)(e):e;var yn=(e,t=[],r={})=>{let n=Zt(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 tu=require("node:child_process");var Hc=require("node:string_decoder"),{toString:Zc}=Object.prototype,Yc=e=>Zc.call(e)==="[object ArrayBuffer]",K=e=>Zc.call(e)==="[object Uint8Array]",Ke=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),kx=new TextEncoder,Xc=e=>kx.encode(e),Rx=new TextDecoder,bn=e=>Rx.decode(e),Kc=(e,t)=>Cx(e,t).join(""),Cx=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Hc.StringDecoder(t),n=e.map(o=>typeof o=="string"?Xc(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},Ar=e=>e.length===1&&K(e[0])?e[0]:Lo(Ax(e)),Ax=e=>e.map(t=>typeof t=="string"?Xc(t):t),Lo=e=>{let t=new Uint8Array(Ix(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},Ix=e=>{let t=0;for(let r of e)t+=r.length;return t};var ru=e=>Array.isArray(e)&&Array.isArray(e.raw),nu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=$x({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,{}]},$x=({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}=Dx(s,e.raw[n]),c=Qc(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>eu(f)):[eu(u)];return Qc(c,l,a)},Dx=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=Jc.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(Jc.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+=Lx[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},Jc=new Set([" "," ","\r",`
|
|
15
|
+
`]),Lx={x:3,u:5},Qc=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],eu=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 Nx(e);throw e instanceof tu.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`)},Nx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return bn(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 yp=require("node:child_process");var ou=require("node:util");var wn=q(require("node:process"),1),De=e=>xn.includes(e),xn=[wn.default.stdin,wn.default.stdout,wn.default.stderr],ve=["stdin","stdout","stderr"],Sn=e=>ve[e]??`stdio[${e}]`;var iu=e=>{let t={...e};for(let r of Mo)t[r]=No(e,r);return t},No=(e,t)=>{let r=Array.from({length:Px(e)+1}),n=Mx(e[t],r,t);return Gx(n,t)},Px=({stdio:e})=>Array.isArray(e)?Math.max(e.length,ve.length):ve.length,Mx=(e,t,r)=>W(e)?Fx(e,t,r):t.fill(e),Fx=(e,t,r)=>{for(let n of Object.keys(e).sort(jx))for(let s of Bx(n,r,t))t[s]=e[n];return t},jx=(e,t)=>su(e)<su(t)?1:-1,su=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,Bx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Po(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]},
|
|
18
|
-
`).map(t=>
|
|
19
|
-
`),
|
|
17
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Po=e=>{if(e==="all")return e;if(ve.includes(e))return ve.indexOf(e);let t=Ux.exec(e);if(t!==null)return Number(t[1])},Ux=/^fd(\d+)$/,Gx=(e,t)=>e.map(r=>r===void 0?Vx[t]:r),qx=(0,ou.debuglog)("execa").enabled?"full":"none",Vx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:qx,stripFinalNewline:!0},Mo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Je=(e,t)=>t==="ipc"?e.at(-1):e[t];var Yt=({verbose:e},t)=>Fo(e,t)!=="none",Xt=({verbose:e},t)=>!["none","short"].includes(Fo(e,t)),au=({verbose:e},t)=>{let r=Fo(e,t);return vn(r)?r:void 0},Fo=(e,t)=>t===void 0?zx(e):Je(e,t),zx=e=>e.find(t=>vn(t))??_n.findLast(t=>e.includes(t)),vn=e=>typeof e=="function",_n=["none","short","full"];var Tu=require("node:util");var cu=require("node:process"),uu=require("node:util"),lu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>Kx(fu(o))).join(" ");return{command:n,escapedCommand:s}},Ir=e=>(0,uu.stripVTControlCharacters)(e).split(`
|
|
18
|
+
`).map(t=>fu(t)).join(`
|
|
19
|
+
`),fu=e=>e.replaceAll(Zx,t=>Wx(t)),Wx=e=>{let t=Yx[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=Xx?`\\u${n.padStart(4,"0")}`:`\\U${n}`},Hx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Zx=Hx(),Yx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Xx=65535,Kx=e=>Jx.test(e)?e:cu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Jx=/^[\w./-]+$/;var jo=q(require("node:process"),1);function Bo(){let{env:e}=jo.default,{TERM:t,TERM_PROGRAM:r}=e;return jo.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 du={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"},pu={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"},Qx={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"},eS={...du,...pu},tS={...du,...Qx},rS=Bo(),nS=rS?eS:tS,En=nS,aD=Object.entries(pu);var yu=q(require("node:tty"),1),mu,hu,Tn,gu,sS=((gu=(Tn=(hu=(mu=yu.default)==null?void 0:mu.WriteStream)==null?void 0:hu.prototype)==null?void 0:Tn.hasColors)==null?void 0:gu.call(Tn))??!1,D=(e,t)=>{if(!sS)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,l=(t===22?n:"")+r;for(;i!==-1;)a+=o.slice(c,i)+l,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},uD=D(0,0),bu=D(1,22),lD=D(2,22),fD=D(3,23),dD=D(4,24),pD=D(53,55),mD=D(7,27),hD=D(8,28),gD=D(9,29),yD=D(30,39),bD=D(31,39),wD=D(32,39),xD=D(33,39),SD=D(34,39),vD=D(35,39),_D=D(36,39),ED=D(37,39),On=D(90,39),TD=D(40,49),OD=D(41,49),kD=D(42,49),RD=D(43,49),CD=D(44,49),AD=D(45,49),ID=D(46,49),$D=D(47,49),DD=D(100,49),wu=D(91,39),LD=D(92,39),xu=D(93,39),ND=D(94,39),PD=D(95,39),MD=D(96,39),FD=D(97,39),jD=D(101,49),BD=D(102,49),UD=D(103,49),GD=D(104,49),qD=D(105,49),VD=D(106,49),zD=D(107,49);var _u=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=oS(r),c=iS[e]({failed:o,reject:i,piped:n}),u=aS[e]({reject:i});return`${On(`[${a}]`)} ${On(`[${s}]`)} ${u(c)} ${u(t)}`},oS=e=>`${kn(e.getHours(),2)}:${kn(e.getMinutes(),2)}:${kn(e.getSeconds(),2)}.${kn(e.getMilliseconds(),3)}`,kn=(e,t)=>String(e).padStart(t,"0"),Su=({failed:e,reject:t})=>e?t?En.cross:En.warning:En.tick,iS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Su,duration:Su},vu=e=>e,aS={command:()=>bu,output:()=>vu,ipc:()=>vu,error:({reject:e})=>e?wu:xu,duration:()=>On};var Eu=(e,t,r)=>{let n=au(t,r);return e.map(({verboseLine:s,verboseObject:o})=>cS(s,o,n)).filter(s=>s!==void 0).map(s=>uS(s)).join("")},cS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},uS=e=>e.endsWith(`
|
|
20
20
|
`)?e:`${e}
|
|
21
|
-
`;var
|
|
22
|
-
`).map(r=>
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
Available signal numbers: ${
|
|
21
|
+
`;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=lS({type:e,result:s,verboseInfo:n}),i=fS(t,o),a=Eu(i,n,r);a!==""&&console.warn(a.slice(0,-1))},lS=({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}),fS=(e,t)=>e.split(`
|
|
22
|
+
`).map(r=>dS({...t,message:r})),dS=e=>({verboseLine:_u(e),verboseObject:e}),Rn=e=>{let t=typeof e=="string"?e:(0,Tu.inspect)(e);return Ir(t).replaceAll(" "," ".repeat(pS))},pS=2;var Ou=(e,t)=>{Yt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var ku=(e,t,r)=>{gS(e);let n=mS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},mS=e=>Yt({verbose:e})?hS++:void 0,hS=0n,gS=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(!_n.includes(t)&&!vn(t)){let r=_n.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var Uo=require("node:process"),Cn=()=>Uo.hrtime.bigint(),Go=e=>Number(Uo.hrtime.bigint()-e)/1e6;var An=(e,t,r)=>{let n=Cn(),{command:s,escapedCommand:o}=lu(e,t),i=No(r,"verbose"),a=ku(i,o,{...r});return Ou(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Gf=q(require("node:path"),1),di=q(require("node:process"),1),qf=q(hl(),1);var $r=q(require("node:process"),1),at=q(require("node:path"),1);function $n(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 gl=require("node:util"),Qo=require("node:child_process"),Jo=q(require("node:path"),1),yl=require("node:url"),CL=(0,gl.promisify)(Qo.execFile);function Dn(e){return e instanceof URL?(0,yl.fileURLToPath)(e):e}function bl(e){return{*[Symbol.iterator](){let t=Jo.default.resolve(Dn(e)),r;for(;r!==t;)yield t,r=t,t=Jo.default.resolve(t,"..")}}}var AL=10*1024*1024;var qS=({cwd:e=$r.default.cwd(),path:t=$r.default.env[$n()],preferLocal:r=!0,execPath:n=$r.default.execPath,addExecPath:s=!0}={})=>{let o=at.default.resolve(Dn(e)),i=[],a=t.split(at.default.delimiter);return r&&VS(i,a,o),s&&zS(i,a,n,o),t===""||t===at.default.delimiter?`${i.join(at.default.delimiter)}${t}`:[...i,t].join(at.default.delimiter)},VS=(e,t,r)=>{for(let n of bl(r)){let s=at.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},zS=(e,t,r,n)=>{let s=at.default.resolve(n,Dn(r),"..");t.includes(s)||e.push(s)},wl=({env:e=$r.default.env,...t}={})=>{e={...e};let r=$n({env:e});return t.path=e[r],e[r]=qS(t),e};var Nl=require("node:timers/promises");var xl=(e,t,r)=>{let n=r?Lr:Dr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Sl=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,_l,{value:!0,writable:!1,enumerable:!1,configurable:!1})},vl=e=>Ln(e)&&_l in e,_l=Symbol("isExecaError"),Ln=e=>Object.prototype.toString.call(e)==="[object Error]",Dr=class extends Error{};Sl(Dr,Dr.name);var Lr=class extends Error{};Sl(Lr,Lr.name);var Qt=require("node:os");var Cl=require("node:os");var El=()=>{let e=Ol-Tl+1;return Array.from({length:e},WS)},WS=(e,t)=>({name:`SIGRT${t+1}`,number:Tl+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Tl=34,Ol=64;var Rl=require("node:os");var kl=[{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 ei=()=>{let e=El();return[...kl,...e].map(HS)},HS=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Rl.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var ZS=()=>{let e=ei();return Object.fromEntries(e.map(YS))},YS=({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}],Al=ZS(),XS=()=>{let e=ei(),t=65,r=Array.from({length:t},(n,s)=>KS(s,e));return Object.assign({},...r)},KS=(e,t)=>{let r=JS(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}}},JS=(e,t)=>{let r=t.find(({name:n})=>Cl.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},qL=XS();var $l=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Ll(e,t)},Dl=e=>e===0?e:Ll(e,"`subprocess.kill()`'s argument"),Ll=(e,t)=>{if(Number.isInteger(e))return QS(e,t);if(typeof e=="string")return tv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
|
|
23
|
+
${ti()}`)},QS=(e,t)=>{if(Il.has(e))return Il.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
|
|
24
|
+
${ti()}`)},ev=()=>new Map(Object.entries(Qt.constants.signals).reverse().map(([e,t])=>[t,e])),Il=ev(),tv=(e,t)=>{if(e in Qt.constants.signals)return e;throw e.toUpperCase()in Qt.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
|
+
${ti()}`)},ti=()=>`Available signal names: ${rv()}.
|
|
26
|
+
Available signal numbers: ${nv()}.`,rv=()=>Object.keys(Qt.constants.signals).sort().map(e=>`'${e}'`).join(", "),nv=()=>[...new Set(Object.values(Qt.constants.signals).sort((e,t)=>e-t))].join(", "),Nn=e=>Al[e].description;var Pl=e=>{if(e===!1)return e;if(e===!0)return sv;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},sv=1e3*5,Ml=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=ov(i,a,r);iv(u,n);let l=e(c);return av({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},ov=(e,t,r)=>{let[n=r,s]=Ln(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&&!Ln(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:Dl(n),error:s}},iv=(e,t)=>{e!==void 0&&t.reject(e)},av=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&ri({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ri=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Nl.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var Fl=require("node:events"),Pn=async(e,t)=>{e.aborted||await(0,Fl.once)(e,"abort",{signal:t})};var jl=({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)}`)},Bl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[cv(e,t,n,s)],cv=async(e,t,r,{signal:n})=>{throw await Pn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var xf=require("node:timers/promises");var bf=require("node:util");var er=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{uv(e,t,r),ni(e,t,n)},uv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ni=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ct(t)} has already exited or disconnected.`)},Ul=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ct(e)} exited or disconnected.`)},Gl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(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
|
-
${
|
|
31
|
-
${
|
|
32
|
-
]);`)},
|
|
30
|
+
${Ne("getOneMessage",e)},
|
|
31
|
+
${Ne("sendMessage",e,"message, {strict: true}")},
|
|
32
|
+
]);`)},Mn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ct(t)}.`,{cause:e}),ql=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} is not listening to incoming messages.`)},Vl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} exited without listening to incoming messages.`)},zl=()=>new Error(`\`cancelSignal\` aborted: the ${ct(!0)} disconnected.`),Wl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Hl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ct(r)} is disconnecting.`,{cause:e})},Zl=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(lv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},lv=({code:e,message:t})=>fv.has(e)||dv.some(r=>t.includes(r)),fv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),dv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${pv(t)}${e}(${r})`,pv=e=>e?"":"subprocess.",ct=e=>e?"parent process":"subprocess",tr=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 jn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=Yl(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(Xl(o,t,n,!0));return i},rr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=Yl(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(Xl(o,t,n,!1));return i},Ge=new WeakMap,Yl=(e,t,r)=>{let n=mv(t,r);return hv(n,t,r,e),n},mv=(e,t)=>{let r=Po(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(`"${Nr(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}".`)},
|
|
35
|
-
Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${
|
|
36
|
-
Please set this option with "pipe" instead.`},
|
|
37
|
-
Please rename it to ${
|
|
38
|
-
Please rename it to one of: ${r}.`)},
|
|
39
|
-
${e.message}`,e}},
|
|
34
|
+
It is optional and defaults to "${s}".`)},hv=(e,t,r,n)=>{let s=n[Kl(e)];if(s===void 0)throw new TypeError(`"${Nr(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(`"${Nr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Nr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Xl=(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}=gv(e,r);return`The "${s}: ${Fn(o)}" option is incompatible with using "${Nr(n)}: ${Fn(t)}".
|
|
36
|
+
Please set this option with "pipe" instead.`},gv=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=Kl(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]}},Kl=e=>e==="all"?1:e,Nr=e=>e?"to":"from",Fn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var ff=require("node:events");var Jl=require("node:events"),xt=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,Jl.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var lf=require("node:events");var tf=require("node:events"),rf=require("node:timers/promises");var Bn=(e,t)=>{t&&si(e)},si=e=>{e.refCounted()},Un=(e,t)=>{t&&oi(e)},oi=e=>{e.unrefCounted()},Ql=(e,t)=>{t&&(oi(e),oi(e))},ef=(e,t)=>{t&&(si(e),si(e))};var nf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(af(s)||uf(s))return;Gn.has(e)||Gn.set(e,[]);let o=Gn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await cf(e,n,s),await rf.scheduler.yield();let i=await of({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},sf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{ii();let o=Gn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,tf.once)(n,"message:done");e.removeListener("message",s),ef(t,r),n.connected=!1,n.emit("disconnect")},Gn=new WeakMap;var ut=(e,t,r)=>{if(qn.has(e))return qn.get(e);let n=new lf.EventEmitter;return n.connected=!0,qn.set(e,n),yv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},qn=new WeakMap,yv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=nf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",sf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),Ql(r,n)},Vn=e=>{let t=qn.get(e);return t===void 0?e.channel!==null:t.connected};var df=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=ut(e,t,r),i=Hn(e,o);return{id:bv++,type:Wn,message:n,hasListeners:i}},bv=0n,pf=(e,t)=>{if(!((t==null?void 0:t.type)!==Wn||t.hasListeners))for(let{id:r}of e)r!==void 0&&zn[r].resolve({isDeadlock:!0,hasListeners:!1})},of=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==Wn||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:hf,message:Hn(t,s)};try{await Zn({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},af=e=>{var n;if((e==null?void 0:e.type)!==hf)return!1;let{id:t,message:r}=e;return(n=zn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},mf=async(e,t,r)=>{if((e==null?void 0:e.type)!==Wn)return;let n=Ue();zn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,wv(t,r,s)]);o&&Gl(r),i||ql(r)}finally{s.abort(),delete zn[e.id]}},zn={},wv=async(e,t,{signal:r})=>{xt(e,1,r),await(0,ff.once)(e,"disconnect",{signal:r}),Vl(t)},Wn="execa:ipc:request",hf="execa:ipc:response";var gf=(e,t,r)=>{Pr.has(e)||Pr.set(e,new Set);let n=Pr.get(e),s=Ue(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},yf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},cf=async(e,t,r)=>{var n;for(;!Hn(e,t)&&((n=Pr.get(e))==null?void 0:n.size)>0;){let s=[...Pr.get(e)];pf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Pr=new WeakMap,Hn=(e,t)=>t.listenerCount("message")>xv(e),xv=e=>Ge.has(e)&&!Je(Ge.get(e).options.buffer,"ipc")?1:0;var Zn=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return er({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),Sv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},Sv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=df({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=gf(e,i,o);try{await ci({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw tr(e),c}finally{yf(a)}},ci=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=vv(e);try{await Promise.all([mf(n,e,r),o(n)])}catch(i){throw Hl({error:i,methodName:t,isSubprocess:r}),Zl({error:i,methodName:t,isSubprocess:r,message:s}),i}},vv=e=>{if(ai.has(e))return ai.get(e);let t=(0,bf.promisify)(e.send.bind(e));return ai.set(e,t),t},ai=new WeakMap;var Sf=(e,t)=>{let r="cancelSignal";return ni(r,!1,e.connected),ci({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:_f,message:t},message:t})},vf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await _v({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),ui.signal),_v=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!wf){if(wf=!0,!n){Wl();return}if(t===null){ii();return}ut(e,t,r),await xf.scheduler.yield()}},wf=!1,uf=e=>(e==null?void 0:e.type)!==_f?!1:(ui.abort(e.message),!0),_f="execa:ipc:cancel",ii=()=>{ui.abort(zl())},ui=new AbortController;var Ef=({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.")}},Tf=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[Ev({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],Ev=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Pn(t,s);let o=Tv(t);throw await Sf(e,o),ri({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},Tv=({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 Of=require("node:timers/promises");var kf=({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})`)},Rf=(e,t,r,n)=>t===0||t===void 0?[]:[Ov(e,t,r,n)],Ov=async(e,t,r,{signal:n})=>{throw await(0,Of.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var Yn=require("node:process"),li=q(require("node:path"),1);var Cf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Af=(e,t,{node:r=!1,nodePath:n=Yn.execPath,nodeOptions:s=Yn.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=Zt(n,'The "nodePath" option'),u=li.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(li.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 If=require("node:v8"),$f=({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`.");Cv[r](e)}},kv=e=>{try{(0,If.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Rv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Cv={advanced:kv,json:Rv},Df=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Nf=({encoding:e})=>{if(fi.has(e))return;let t=Iv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${Xn(e)}\`.
|
|
37
|
+
Please rename it to ${Xn(t)}.`);let r=[...fi].map(n=>Xn(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Xn(e)}\`.
|
|
38
|
+
Please rename it to one of: ${r}.`)},Av=new Set(["utf8","utf16le"]),ge=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),fi=new Set([...Av,...ge]),Iv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in Lf)return Lf[t];if(fi.has(t))return t},Lf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Xn=e=>typeof e=="string"?`"${e}"`:String(e);var Pf=require("node:fs"),Mf=q(require("node:path"),1),Ff=q(require("node:process"),1);var jf=(e=Bf())=>{let t=Zt(e,'The "cwd" option');return Mf.default.resolve(t)},Bf=()=>{try{return Ff.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
|
|
39
|
+
${e.message}`,e}},Uf=(e,t)=>{if(t===Bf())return e;let r;try{r=(0,Pf.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
|
|
43
|
-
`,
|
|
44
|
-
${X}`,
|
|
45
|
-
`)].map(
|
|
42
|
+
${e}`};var Kn=(e,t,r)=>{r.cwd=jf(r.cwd);let[n,s,o]=Af(e,t,r),{command:i,args:a,options:c}=qf.default._parse(n,s,o),u=iu(c),l=$v(u);return kf(l),Nf(l),$f(l),jl(l),Ef(l),l.shell=Do(l.shell),l.env=Dv(l),l.killSignal=$l(l.killSignal),l.forceKillAfterDelay=Pl(l.forceKillAfterDelay),l.lines=l.lines.map((f,p)=>f&&!ge.has(l.encoding)&&l.buffer[p]),di.default.platform==="win32"&&Gf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},$v=({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:p,ipc:d=p!==void 0||f,serialization:x="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:p,ipc:d,serialization:x}),Dv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...di.default.env,...e}:e;return r||n?wl({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var Jn=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];var fd=require("node:util");function nr(e){if(typeof e=="string")return Lv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Nv(e)}var Lv=e=>e.at(-1)===Vf?e.slice(0,e.at(-2)===zf?-2:-1):e,Nv=e=>e.at(-1)===Pv?e.subarray(0,e.at(-2)===Mv?-2:-1):e,Vf=`
|
|
43
|
+
`,Pv=Vf.codePointAt(0),zf="\r",Mv=zf.codePointAt(0);var nd=require("node:events"),sd=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 pi(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 St(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 mi(e,t){return pi(e,t)&&St(e,t)}var Fv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),hi=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}}},gi=Symbol();function Wf(){return this[gi].next()}Object.defineProperty(Wf,"name",{value:"next"});function Hf(e){return this[gi].return(e)}Object.defineProperty(Hf,"name",{value:"return"});var jv=Object.create(Fv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Wf},return:{enumerable:!0,configurable:!0,writable:!0,value:Hf}});function yi({preventCancel:e=!1}={}){let t=this.getReader(),r=new hi(t,e),n=Object.create(jv);return n[gi]=r,n}var Zf=e=>{if(St(e,{checkOpen:!1})&&Mr.on!==void 0)return Uv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Bv.call(e)==="[object ReadableStream]")return yi.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Bv}=Object.prototype,Uv=async function*(e){let t=new AbortController,r={};Gv(e,t,r);try{for await(let[n]of Mr.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()}},Gv=async(e,t,r)=>{try{await Mr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},Mr={};var sr=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Zf(e),l=t();l.length=0;try{for await(let f of u){let p=Vv(f),d=r[p](f,l);Kf({convertedChunk:d,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return qv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let p=typeof f=="object"&&f!==null?f:new Error(f);throw p.bufferedData=a(l),p}},qv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&Kf({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},Kf=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){Yf(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&Yf(c,t,s,o),new qe},Yf=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Vv=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=Xf.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&Xf.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:Xf}=Object.prototype,qe=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var Qe=e=>e,Fr=()=>{},Qn=({contents:e})=>e,es=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},ts=e=>e.length;async function rs(e,t){return sr(e,Zv,t)}var zv=()=>({contents:[]}),Wv=()=>1,Hv=(e,{contents:t})=>(t.push(e),t),Zv={init:zv,convertChunk:{string:Qe,buffer:Qe,arrayBuffer:Qe,dataView:Qe,typedArray:Qe,others:Qe},getSize:Wv,truncateChunk:Fr,addChunk:Hv,getFinalChunk:Fr,finalize:Qn};async function ns(e,t){return sr(e,n_,t)}var Yv=()=>({contents:new ArrayBuffer(0)}),Xv=e=>Kv.encode(e),Kv=new TextEncoder,Jf=e=>new Uint8Array(e),Qf=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Jv=(e,t)=>e.slice(0,t),Qv=(e,{contents:t,length:r},n)=>{let s=rd()?t_(t,n):e_(t,n);return new Uint8Array(s).set(e,r),s},e_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(td(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},t_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:td(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},td=e=>ed**Math.ceil(Math.log(e)/Math.log(ed)),ed=2,r_=({contents:e,length:t})=>rd()?e:e.slice(0,t),rd=()=>"resize"in ArrayBuffer.prototype,n_={init:Yv,convertChunk:{string:Xv,buffer:Jf,arrayBuffer:Jf,dataView:Qf,typedArray:Qf,others:es},getSize:ts,truncateChunk:Jv,addChunk:Qv,getFinalChunk:Fr,finalize:r_};async function os(e,t){return sr(e,c_,t)}var s_=()=>({contents:"",textDecoder:new TextDecoder}),ss=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),o_=(e,{contents:t})=>t+e,i_=(e,t)=>e.slice(0,t),a_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},c_={init:s_,convertChunk:{string:Qe,buffer:ss,arrayBuffer:ss,dataView:ss,typedArray:ss,others:es},getSize:ts,truncateChunk:i_,addChunk:o_,getFinalChunk:a_,finalize:Qn};Object.assign(Mr,{on:nd.on,finished:sd.finished});var od=({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=u_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},u_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",id=(e,t,r)=>{if(t.length!==r)return;let n=new qe;throw n.maxBufferInfo={fdNumber:"ipc"},n},ad=(e,t)=>{let{streamName:r,threshold:n,unit:s}=l_(e,t);return`Command's ${r} was larger than ${n} ${s}`},l_=(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=Je(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Sn(r),threshold:s,unit:n}},cd=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>is(r)),ud=(e,t,r)=>{if(!t)return e;let n=is(r);return e.length>n?e.slice(0,n):e},is=([,e])=>e;var dd=({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:p,forceKillAfterDelay:d,killSignal:x,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=f_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:x}),X=p_(n,M),xe=X===void 0?"":`
|
|
44
|
+
${X}`,ue=`${Y}: ${a}${xe}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ue,...Ae,...e.slice(3),r.map(Se=>m_(Se)).join(`
|
|
45
|
+
`)].map(Se=>Ir(nr(h_(Se)))).filter(Boolean).join(`
|
|
46
46
|
|
|
47
|
-
`);return{originalMessage:X,shortMessage:
|
|
48
|
-
`):ud(e),ud=e=>typeof e=="string"?e:K(e)?xn(e):"";var us=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>dd({command:e,escapedCommand:t,cwd:o,durationMs:Vo(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:[]}),or=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Br({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}),Br=({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:p,ipcOutput:d,options:{timeoutDuration:x,timeout:T=x,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ce}=g_(u,l),{originalMessage:Ae,shortMessage:xe,message:Cr}=fd({stdio:f,all:p,ipcOutput:d,originalError:e,signal:ce,signalDescription:Ce,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),wt=wl(e,Cr,X);return Object.assign(wt,h_({error:wt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ce,stdio:f,all:p,ipcOutput:d,cwd:j,originalMessage:Ae,shortMessage:xe})),wt},h_=({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:p,all:d,ipcOutput:x,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return dd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Vo(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:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:x,pipedFrom:[]})},dd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),g_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Mn(t);return{exitCode:r,signal:n,signalDescription:s}};var pd=e=>Number.isFinite(e)?e:0;function y_(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(pd(e*1e3)%1e3),nanoseconds:Math.trunc(pd(e*1e6)%1e3)}}function b_(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 xi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return y_(e);break}case"bigint":return b_(e)}throw new TypeError("Expected a finite number or bigint")}var w_=e=>e===0||e===0n,x_=(e,t)=>t===1||t===1n?e:`${e}s`,S_=1e-7,v_=24n*60n*60n*1000n;function Si(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 p=Math.floor(l*10**f+S_);return(Math.round(p)/10**f).toFixed(f)},i=(l,f,p,d)=>{if(!((s.length===0||!t.colonNotation)&&w_(l)&&!(t.colonNotation&&p==="m"))){if(d??=String(l),t.colonNotation){let x=d.includes(".")?d.split(".")[0].length:d.length,T=s.length>0?2:1;d="0".repeat(Math.max(0,T-x))+d}else d+=t.verbose?" "+x_(f,l):p;s.push(d)}},a=xi(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),p=Number(a.microseconds),d=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(p,"microsecond","\xB5s"),i(d,"nanosecond","ns");else{let x=f+p/1e3+d/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=x>=1?Math.round(x):Math.ceil(x),M=T?x.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%v_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,p=o(l,f),d=t.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");i(Number.parseFloat(d),"second","s",d)}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 md=(e,t)=>{e.failed&&je({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var hd=(e,t)=>{Yt(t)&&(md(e,t),__(e,t))},__=(e,t)=>{let r=`(done in ${Si(e.durationMs)})`;je({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ir=(e,t,{reject:r})=>{if(hd(e,t),e.failed&&r)throw e;return e};var Ci=require("node:fs");var bd=(e,t)=>vt(e)?"asyncGenerator":Sd(e)?"generator":ls(e)?"fileUrl":k_(e)?"filePath":I_(e)?"webStream":Ne(e,{checkOpen:!1})?"native":K(e)?"uint8Array":$_(e)?"asyncIterable":D_(e)?"iterable":Ei(e)?wd({transform:e},t):R_(e)?E_(e,t):"native",E_=(e,t)=>gi(e.transform,{checkOpen:!1})?T_(e,t):Ei(e.transform)?wd(e,t):O_(e,t),T_=(e,t)=>(xd(e,t,"Duplex stream"),"duplex"),wd=(e,t)=>(xd(e,t,"web TransformStream"),"webTransform"),xd=({final:e,binary:t,objectMode:r},n,s)=>{gd(e,`${n}.final`,s),gd(t,`${n}.binary`,s),vi(r,`${n}.objectMode`)},gd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},O_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!yd(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(gi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ei(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!yd(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return vi(r,`${s}.binary`),vi(n,`${s}.objectMode`),vt(e)||vt(t)?"asyncGenerator":"generator"},vi=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},yd=e=>vt(e)||Sd(e),vt=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Sd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",R_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),ls=e=>Object.prototype.toString.call(e)==="[object URL]",vd=e=>ls(e)&&e.protocol!=="file:",k_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>C_.has(t))&&_i(e.file),C_=new Set(["file","append"]),_i=e=>typeof e=="string",_d=(e,t)=>e==="native"&&typeof t=="string"&&!A_.has(t),A_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Ed=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",fs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",I_=e=>Ed(e)||fs(e),Ei=e=>Ed(e==null?void 0:e.readable)&&fs(e==null?void 0:e.writable),$_=e=>Td(e)&&typeof e[Symbol.asyncIterator]=="function",D_=e=>Td(e)&&typeof e[Symbol.iterator]=="function",Td=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ds=new Set(["fileUrl","filePath","fileNumber"]),Ti=new Set(["fileUrl","filePath"]),Od=new Set([...Ti,"webStream","nodeStream"]),Rd=new Set(["webTransform","duplex"]),lt={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 Oi=(e,t,r,n)=>n==="output"?L_(e,t,r):N_(e,t,r),L_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},N_=(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}},kd=(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 Cd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...P_(e,t,r,n)],P_=(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]=M_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return U_(o,r)},M_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?F_({stdioItem:e,optionName:s}):t==="webTransform"?j_({stdioItem:e,index:r,newTransforms:n,direction:o}):B_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),F_=({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}}},j_=({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}=Oi(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},B_=({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||ge.has(o),{writableObjectMode:p,readableObjectMode:d}=Oi(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:p,readableObjectMode:d}}},U_=(e,t)=>t==="input"?e.reverse():e;var ps=q(require("node:process"),1);var Ad=(e,t,r)=>{let n=e.map(s=>G_(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)??z_},G_=({type:e,value:t},r)=>q_[r]??Id[e](t),q_=["input","output","output"],ar=()=>{},Ri=()=>"input",Id={generator:ar,asyncGenerator:ar,fileUrl:ar,filePath:ar,iterable:Ri,asyncIterable:Ri,uint8Array:Ri,webStream:e=>fs(e)?"output":"input",nodeStream(e){return St(e,{checkOpen:!1})?hi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:ar,duplex:ar,native(e){let t=V_(e);if(t!==void 0)return t;if(Ne(e,{checkOpen:!1}))return Id.nodeStream(e)}},V_=e=>{if([0,ps.default.stdin].includes(e))return"input";if([1,2,ps.default.stdout,ps.default.stderr].includes(e))return"output"},z_="output";var $d=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Dd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=W_(e,n).map((a,c)=>Ld(a,c));return o?Z_(i,r,s):$d(i,t)},W_=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(H_(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])},H_=e=>Se.some(t=>e[t]!==void 0),Ld=(e,t)=>Array.isArray(e)?e.map(r=>Ld(r,t)):e??(t>=Se.length?"ignore":"pipe"),Z_=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Xt(r,s)&&Y_(n)?"ignore":n),Y_=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Pd=require("node:fs"),Md=q(require("node:tty"),1);var Fd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?X_({stdioItem:e,fdNumber:n,direction:s}):Q_({stdioItem:e,fdNumber:n}),X_=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=K_({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Ne(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},K_=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=J_(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Md.default.isatty(s))throw new TypeError(`The \`${t}: ${Bn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Ke((0,Pd.readFileSync)(s)),optionName:t}}},J_=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=vn.indexOf(e);if(r!==-1)return r},Q_=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Nd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Nd(t,t,r),optionName:r}:Ne(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Nd=(e,t,r)=>{let n=vn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var jd=({input:e,inputFile:t},r)=>r===0?[...eE(e),...rE(t)]:[],eE=e=>e===void 0?[]:[{type:tE(e),value:e,optionName:"input"}],tE=e=>{if(St(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.")},rE=e=>e===void 0?[]:[{...nE(e),optionName:"inputFile"}],nE=e=>{if(ls(e))return{type:"fileUrl",value:e};if(_i(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Bd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Ud=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=sE(s,e);if(i.length!==0){if(o){oE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(Od.has(e))return Gd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Rd.has(e)&&aE({otherStdioItems:i,type:e,value:t,optionName:r})}},sE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map((s=>({...s,direction:r})))),oE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ti.has(t)&&Gd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Gd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>iE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return qd(i,n,t),s==="output"?o[0].stream:void 0},iE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,aE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);qd(s,n,t)},qd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${lt[r]} that is the same.`)};var ms=(e,t,r,n)=>{let o=Dd(t,r,n).map((a,c)=>cE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=gE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>wE(a)),i},cE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=_n(t),{stdioItems:o,isStdioArray:i}=uE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Ad(o,t,s),c=o.map(f=>Fd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Cd(c,s,a,r),l=kd(u,a);return hE(u,l),{direction:a,objectMode:l,stdioItems:u}},uE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>lE(c,n)),...jd(r,t)],i=Bd(o),a=i.length>1;return fE(i,a,n),pE(i),{stdioItems:i,isStdioArray:a}},lE=(e,t)=>({type:bd(e,t),value:e,optionName:t}),fE=(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(dE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},dE=new Set(["ignore","ipc"]),pE=e=>{for(let t of e)mE(t)},mE=({type:e,value:t,optionName:r})=>{if(vd(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(
|
|
50
|
-
`){let i=
|
|
47
|
+
`);return{originalMessage:X,shortMessage:ue,message:Ie}},f_=({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:p,killSignal:d})=>{let x=d_(f,p);return t?`Command timed out after ${r} milliseconds${x}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${x}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${x}`:n?`${ad(e,s)}${x}`:o!==void 0?`Command failed with ${o}${x}`:f?`Command was killed with ${d} (${Nn(d)})${x}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},d_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",p_=(e,t)=>{if(e instanceof Le)return;let r=vl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Ir(Uf(r,t));return n===""?void 0:n},m_=e=>typeof e=="string"?e:(0,fd.inspect)(e),h_=e=>Array.isArray(e)?e.map(t=>nr(ld(t))).filter(Boolean).join(`
|
|
48
|
+
`):ld(e),ld=e=>typeof e=="string"?e:K(e)?bn(e):"";var as=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>pd({command:e,escapedCommand:t,cwd:o,durationMs:Go(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:[]}),or=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>jr({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}),jr=({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:p,ipcOutput:d,options:{timeoutDuration:x,timeout:T=x,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:xe,signal:ue,signalDescription:Ae}=y_(u,l),{originalMessage:Ie,shortMessage:Se,message:Cr}=dd({stdio:f,all:p,ipcOutput:d,originalError:e,signal:ue,signalDescription:Ae,exitCode:xe,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),wt=xl(e,Cr,X);return Object.assign(wt,g_({error:wt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:xe,signal:ue,signalDescription:Ae,stdio:f,all:p,ipcOutput:d,cwd:j,originalMessage:Ie,shortMessage:Se})),wt},g_=({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:p,all:d,ipcOutput:x,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return pd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Go(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:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:x,pipedFrom:[]})},pd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),y_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Nn(t);return{exitCode:r,signal:n,signalDescription:s}};var md=e=>Number.isFinite(e)?e:0;function b_(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(md(e*1e3)%1e3),nanoseconds:Math.trunc(md(e*1e6)%1e3)}}function w_(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 bi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return b_(e);break}case"bigint":return w_(e)}throw new TypeError("Expected a finite number or bigint")}var x_=e=>e===0||e===0n,S_=(e,t)=>t===1||t===1n?e:`${e}s`,v_=1e-7,__=24n*60n*60n*1000n;function wi(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 p=Math.floor(l*10**f+v_);return(Math.round(p)/10**f).toFixed(f)},i=(l,f,p,d)=>{if(!((s.length===0||!t.colonNotation)&&x_(l)&&!(t.colonNotation&&p==="m"))){if(d??=String(l),t.colonNotation){let x=d.includes(".")?d.split(".")[0].length:d.length,T=s.length>0?2:1;d="0".repeat(Math.max(0,T-x))+d}else d+=t.verbose?" "+S_(f,l):p;s.push(d)}},a=bi(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&&!t.subSecondsAsDecimals){let l=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(p,"microsecond","\xB5s"),i(d,"nanosecond","ns");else{let x=f+p/1e3+d/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=x>=1?Math.round(x):Math.ceil(x),M=T?x.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%__):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,p=o(l,f),d=t.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");i(Number.parseFloat(d),"second","s",d)}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 hd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var gd=(e,t)=>{Yt(t)&&(hd(e,t),E_(e,t))},E_=(e,t)=>{let r=`(done in ${wi(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ir=(e,t,{reject:r})=>{if(gd(e,t),e.failed&&r)throw e;return e};var ki=require("node:fs");var wd=(e,t)=>vt(e)?"asyncGenerator":vd(e)?"generator":cs(e)?"fileUrl":C_(e)?"filePath":$_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":D_(e)?"asyncIterable":L_(e)?"iterable":vi(e)?xd({transform:e},t):R_(e)?T_(e,t):"native",T_=(e,t)=>mi(e.transform,{checkOpen:!1})?O_(e,t):vi(e.transform)?xd(e,t):k_(e,t),O_=(e,t)=>(Sd(e,t,"Duplex stream"),"duplex"),xd=(e,t)=>(Sd(e,t,"web TransformStream"),"webTransform"),Sd=({final:e,binary:t,objectMode:r},n,s)=>{yd(e,`${n}.final`,s),yd(t,`${n}.binary`,s),xi(r,`${n}.objectMode`)},yd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},k_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!bd(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(mi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(vi(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!bd(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return xi(r,`${s}.binary`),xi(n,`${s}.objectMode`),vt(e)||vt(t)?"asyncGenerator":"generator"},xi=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},bd=e=>vt(e)||vd(e),vt=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",vd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",R_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),cs=e=>Object.prototype.toString.call(e)==="[object URL]",_d=e=>cs(e)&&e.protocol!=="file:",C_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>A_.has(t))&&Si(e.file),A_=new Set(["file","append"]),Si=e=>typeof e=="string",Ed=(e,t)=>e==="native"&&typeof t=="string"&&!I_.has(t),I_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Td=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",us=e=>Object.prototype.toString.call(e)==="[object WritableStream]",$_=e=>Td(e)||us(e),vi=e=>Td(e==null?void 0:e.readable)&&us(e==null?void 0:e.writable),D_=e=>Od(e)&&typeof e[Symbol.asyncIterator]=="function",L_=e=>Od(e)&&typeof e[Symbol.iterator]=="function",Od=e=>typeof e=="object"&&e!==null,_e=new Set(["generator","asyncGenerator","duplex","webTransform"]),ls=new Set(["fileUrl","filePath","fileNumber"]),_i=new Set(["fileUrl","filePath"]),kd=new Set([..._i,"webStream","nodeStream"]),Rd=new Set(["webTransform","duplex"]),lt={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 Ei=(e,t,r,n)=>n==="output"?N_(e,t,r):P_(e,t,r),N_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},P_=(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}},Cd=(e,t)=>{let r=e.findLast(({type:n})=>_e.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Ad=(e,t,r,n)=>[...e.filter(({type:s})=>!_e.has(s)),...M_(e,t,r,n)],M_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>_e.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=F_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return G_(o,r)},F_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?j_({stdioItem:e,optionName:s}):t==="webTransform"?B_({stdioItem:e,index:r,newTransforms:n,direction:o}):U_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),j_=({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}}},B_=({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}=Ei(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},U_=({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||ge.has(o),{writableObjectMode:p,readableObjectMode:d}=Ei(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:p,readableObjectMode:d}}},G_=(e,t)=>t==="input"?e.reverse():e;var fs=q(require("node:process"),1);var Id=(e,t,r)=>{let n=e.map(s=>q_(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)??W_},q_=({type:e,value:t},r)=>V_[r]??$d[e](t),V_=["input","output","output"],ar=()=>{},Ti=()=>"input",$d={generator:ar,asyncGenerator:ar,fileUrl:ar,filePath:ar,iterable:Ti,asyncIterable:Ti,uint8Array:Ti,webStream:e=>us(e)?"output":"input",nodeStream(e){return St(e,{checkOpen:!1})?pi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:ar,duplex:ar,native(e){let t=z_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return $d.nodeStream(e)}},z_=e=>{if([0,fs.default.stdin].includes(e))return"input";if([1,2,fs.default.stdout,fs.default.stderr].includes(e))return"output"},W_="output";var Dd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Ld=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=H_(e,n).map((a,c)=>Nd(a,c));return o?Y_(i,r,s):Dd(i,t)},H_=(e,t)=>{if(e===void 0)return ve.map(n=>t[n]);if(Z_(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ve.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,ve.length);return Array.from({length:r},(n,s)=>e[s])},Z_=e=>ve.some(t=>e[t]!==void 0),Nd=(e,t)=>Array.isArray(e)?e.map(r=>Nd(r,t)):e??(t>=ve.length?"ignore":"pipe"),Y_=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Xt(r,s)&&X_(n)?"ignore":n),X_=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Md=require("node:fs"),Fd=q(require("node:tty"),1);var jd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?K_({stdioItem:e,fdNumber:n,direction:s}):eE({stdioItem:e,fdNumber:n}),K_=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=J_({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},J_=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=Q_(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Fd.default.isatty(s))throw new TypeError(`The \`${t}: ${Fn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Ke((0,Md.readFileSync)(s)),optionName:t}}},Q_=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=xn.indexOf(e);if(r!==-1)return r},eE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Pd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Pd(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Pd=(e,t,r)=>{let n=xn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var Bd=({input:e,inputFile:t},r)=>r===0?[...tE(e),...nE(t)]:[],tE=e=>e===void 0?[]:[{type:rE(e),value:e,optionName:"input"}],rE=e=>{if(St(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.")},nE=e=>e===void 0?[]:[{...sE(e),optionName:"inputFile"}],sE=e=>{if(cs(e))return{type:"fileUrl",value:e};if(Si(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Ud=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Gd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=oE(s,e);if(i.length!==0){if(o){iE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(kd.has(e))return qd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Rd.has(e)&&cE({otherStdioItems:i,type:e,value:t,optionName:r})}},oE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map((s=>({...s,direction:r})))),iE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{_i.has(t)&&qd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},qd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>aE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Vd(i,n,t),s==="output"?o[0].stream:void 0},aE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,cE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Vd(s,n,t)},Vd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${lt[r]} that is the same.`)};var ds=(e,t,r,n)=>{let o=Ld(t,r,n).map((a,c)=>uE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=yE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>xE(a)),i},uE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Sn(t),{stdioItems:o,isStdioArray:i}=lE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Id(o,t,s),c=o.map(f=>jd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Ad(c,s,a,r),l=Cd(u,a);return gE(u,l),{direction:a,objectMode:l,stdioItems:u}},lE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>fE(c,n)),...Bd(r,t)],i=Ud(o),a=i.length>1;return dE(i,a,n),mE(i),{stdioItems:i,isStdioArray:a}},fE=(e,t)=>({type:wd(e,t),value:e,optionName:t}),dE=(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(pE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},pE=new Set(["ignore","ipc"]),mE=e=>{for(let t of e)hE(t)},hE=({type:e,value:t,optionName:r})=>{if(_d(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(Ed(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},gE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>ls.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},yE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(bE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Oi(s),o}},bE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>wE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},wE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Gd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Oi=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},xE=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 Wd=(e,t)=>ds(vE,e,t,!0),Ve=({type:e,optionName:t})=>{Hd(t,lt[e])},SE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Hd(e,`"${t}"`),{}),Hd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},zd={generator(){},asyncGenerator:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:SE},vE={input:{...zd,fileUrl:({value:e})=>({contents:[Ke((0,ki.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Ke((0,ki.readFileSync)(e))]}),fileNumber:Ve,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...zd,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 et=(e,{stripFinalNewline:t},r)=>Ri(t,r)&&e!==void 0&&!Array.isArray(e)?nr(e):e,Ri=(e,t)=>t==="all"?e[1]||e[2]:e[t];var Ur=require("node:stream");var ps=(e,t,r,n)=>e||r?void 0:Yd(t,n),Ai=(e,t,r)=>r?e.flatMap(n=>Zd(n,t)):Zd(e,t),Zd=(e,t)=>{let{transform:r,final:n}=Yd(t,{});return[...r(e),...n()]},Yd=(e,t)=>(t.previousChunks="",{transform:_E.bind(void 0,t,e),final:TE.bind(void 0,t)}),_E=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=EE(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Ci(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Ci(n,r.slice(s+1))),e.previousChunks=n},EE=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),TE=function*({previousChunks:e}){e.length>0&&(yield e)},Xd=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:OE.bind(void 0,n)},OE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?kE:CE;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Ci=(e,t)=>`${e}${t}`,kE={windowsNewline:`\r
|
|
51
51
|
`,unixNewline:`
|
|
52
52
|
`,LF:`
|
|
53
|
-
`,concatBytes:
|
|
53
|
+
`,concatBytes:Ci},RE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},CE={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:RE};var Kd=require("node:buffer");var Jd=(e,t)=>e?void 0:AE.bind(void 0,t),AE=function*(e,t){if(typeof t!="string"&&!K(t)&&!Kd.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Qd=(e,t)=>e?IE.bind(void 0,t):$E.bind(void 0,t),IE=function*(e,t){ep(e,t),yield t},$E=function*(e,t){if(ep(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},ep=(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 ep=require("node:buffer"),tp=require("node:string_decoder");var gs=(e,t,r)=>{if(r)return;if(e)return{transform:$E.bind(void 0,new TextEncoder)};let n=new tp.StringDecoder(t);return{transform:DE.bind(void 0,n),final:LE.bind(void 0,n)}},$E=function*(e,t){ep.Buffer.isBuffer(t)?yield Ke(t):typeof t=="string"?yield e.encode(t):yield t},DE=function*(e,t){yield K(t)?e.write(t):t},LE=function*(e){let t=e.end();t!==""&&(yield t)};var Di=require("node:util"),Li=(0,Di.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}}),ys=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=PE}=t[r];for await(let s of n(e))yield*ys(s,t,r+1)},rp=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*NE(r,Number(t),e)},NE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*ys(n,r,t+1)},np=(0,Di.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),PE=function*(e){yield e};var Ni=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},sp=(e,t)=>[...t.flatMap(r=>[..._t(r,e,0)]),...Ur(e)],_t=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=FE}=t[r];for(let s of n(e))yield*_t(s,t,r+1)},Ur=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*ME(r,Number(t),e)},ME=function*(e,t,r){if(e!==void 0)for(let n of e())yield*_t(n,r,t+1)},FE=function*(e){yield e};var Pi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=op(e,i,o),u=vt(t),l=vt(r),f=u?Li.bind(void 0,ys,a):Ni.bind(void 0,_t),p=u||l?Li.bind(void 0,rp,a):Ni.bind(void 0,Ur),d=u||l?np.bind(void 0,a):void 0;return{stream:new Gr.Transform({writableObjectMode:n,writableHighWaterMark:(0,Gr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,Gr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){p([c],this,T)},destroy:d})}},bs=(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=op(i,r,a);e=sp(c,e)}return e},op=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:Kd(n,a)},gs(r,i,n),hs(r,o,n,c),{transform:e,final:t},{transform:Jd(s,a)},Yd({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var ip=(e,t)=>{for(let r of jE(e))BE(e,r,t)},jE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),BE=(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 ${lt[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>UE(a,n));r.input=Ir(i)},UE=(e,t)=>{let r=bs(e,t,"utf8",!0);return GE(r),Ir(r)},GE=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 xs=require("node:fs");var ws=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Xt(r,n)&&!ge.has(t)&&qE(n)&&(e.some(({type:s,value:o})=>s==="native"&&VE.has(o))||e.every(({type:s})=>ve.has(s))),qE=e=>e===1||e===2,VE=new Set(["pipe","overlapped"]),ap=async(e,t,r,n)=>{for await(let s of e)zE(t)||up(s,r,n)},cp=(e,t,r)=>{for(let n of e)up(n,t,r)},zE=e=>e._readableState.pipes.length>0,up=(e,t,r)=>{let n=An(e);je({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var lp=({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)=>WE({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},WE=({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 p=cd(e,o,f),d=Ke(p),{stdioItems:x,objectMode:T}=t[r],P=HE([d],x,c,n),{serializedResult:M,finalResult:j=M}=ZE({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});YE({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:x,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&XE(M,x,s),Y}catch(X){return n.error=X,Y}},HE=(e,t,r,n)=>{try{return bs(e,t,r,!1)}catch(s){return n.error=s,e}},ZE=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ir(e)};let i=Xc(e,r);return n[o]?{serializedResult:i,finalResult:$i(i,!s[o],t)}:{serializedResult:i}},YE=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!ws({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=$i(e,!1,i);try{cp(a,t,n)}catch(c){r.error??=c}},XE=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ds.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,xs.appendFileSync)(n,e):(r.add(o),(0,xs.writeFileSync)(n,e))}};var fp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,et(t,r,"all")]:Array.isArray(t)?[et(e,r,"all"),...t]:K(e)&&K(t)?Po([e,t]):`${e}${t}`};var Ss=require("node:events");var dp=async(e,t)=>{let[r,n]=await KE(e);return t.isForcefullyTerminated??=!1,[r,n]},KE=async e=>{let[t,r]=await Promise.allSettled([(0,Ss.once)(e,"spawn"),(0,Ss.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?pp(e):r.value},pp=async e=>{try{return await(0,Ss.once)(e,"exit")}catch{return pp(e)}},mp=async e=>{let[t,r]=await e;if(!JE(t,r)&&Mi(t,r))throw new De;return[t,r]},JE=(e,t)=>e===void 0&&t===void 0,Mi=(e,t)=>e!==0||t!==null;var hp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=QE(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=ad(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},QE=(e,t,r)=>e!==void 0?e:Mi(t,r)?new De:void 0;var yp=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=eT(e,t,r),f=nT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ir(f,c,u)},eT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=$n(e,t,r),a=tT(r),{file:c,commandArguments:u,options:l}=Qn(e,t,a);rT(l);let f=zd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},tT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,rT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&vs("ipcInput"),e&&vs("ipc: true"),r&&vs("detached: true"),n&&vs("cancelSignal")},vs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},nT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=sT({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:p,isMaxBuffer:d}=hp(c,r),{output:x,error:T=u}=lp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:o}),P=x.map((j,Y)=>et(j,r,Y)),M=et(fp(x,r),r,"all");return iT({error:T,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},sT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{ip(o,r);let a=oT(r);return(0,gp.spawnSync)(...es(e,t,a))}catch(a){return or({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},oT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:cs(t)}),iT=({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?us({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Br({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 Tm=require("node:events"),Om=require("node:child_process");var ji=q(require("node:process"),1);var cr=require("node:events");var bp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(er({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Wn(e)}),aT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),aT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Gn(t,s);let o=ut(e,t,r),i=new AbortController;try{return await Promise.race([cT(o,n,i),uT(o,r,i),lT(o,r,i)])}catch(a){throw tr(e),a}finally{i.abort(),qn(t,s)}},cT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,cr.once)(e,"message",{signal:r});return n}for await(let[n]of(0,cr.on)(e,"message",{signal:r}))if(t(n))return n},uT=async(e,t,{signal:r})=>{await(0,cr.once)(e,"disconnect",{signal:r}),Bl(t)},lT=async(e,t,{signal:r})=>{let[n]=await(0,cr.once)(e,"strict:error",{signal:r});throw jn(n,t)};var qr=require("node:events");var xp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Fi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Fi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{er({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Wn(e)}),Gn(t,o);let i=ut(e,t,r),a=new AbortController,c={};return fT(e,i,a),dT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),pT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},fT=async(e,t,r)=>{try{await(0,qr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},dT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,qr.once)(e,"strict:error",{signal:r.signal});n.error=jn(s,t),r.abort()}catch{}},pT=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,qr.on)(r,"message",{signal:o.signal}))wp(i),yield c}catch{wp(i)}finally{o.abort(),qn(t,a),n||tr(e),s&&await e}},wp=({error:e})=>{if(e)throw e};var Sp=(e,{ipc:t})=>{Object.assign(e,_p(e,!1,t))},vp=()=>{let e=ji.default,t=!0,r=ji.default.channel!==void 0;return{..._p(e,t,r),getCancelSignal:Sf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},_p=(e,t,r)=>({sendMessage:Xn.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:bp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:xp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ep=require("node:child_process"),ft=require("node:stream");var Tp=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{ki(n);let a=new Ep.ChildProcess;mT(a,n),Object.assign(a,{readable:hT,writable:gT,duplex:yT});let c=or({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=bT(c,i,s);return{subprocess:a,promise:u}},mT=(e,t)=>{let r=Vr(),n=Vr(),s=Vr(),o=Array.from({length:t.length-3},Vr),i=Vr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},Vr=()=>{let e=new ft.PassThrough;return e.end(),e},hT=()=>new ft.Readable({read(){}}),gT=()=>new ft.Writable({write(){}}),yT=()=>new ft.Duplex({read(){},write(){}}),bT=async(e,t,r)=>ir(e,t,r);var ur=require("node:fs"),Rp=require("node:buffer"),Ve=require("node:stream");var kp=(e,t)=>ms(wT,e,t,!1),zr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${lt[e]}.`)},Op={fileNumber:zr,generator:Pi,asyncGenerator:Pi,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:Ve.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},wT={input:{...Op,fileUrl:({value:e})=>({stream:(0,ur.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,ur.createReadStream)(e)}),webStream:({value:e})=>({stream:Ve.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:Ve.Readable.from(e)}),asyncIterable:({value:e})=>({stream:Ve.Readable.from(e)}),string:({value:e})=>({stream:Ve.Readable.from(e)}),uint8Array:({value:e})=>({stream:Ve.Readable.from(Rp.Buffer.from(e))})},output:{...Op,fileUrl:({value:e})=>({stream:(0,ur.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,ur.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Ve.Writable.fromWeb(e)}),iterable:zr,asyncIterable:zr,string:zr,uint8Array:zr}};var Wr=require("node:events"),Es=require("node:stream"),Gi=require("node:stream/promises");function Et(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Ui(s);let t=e.some(({readableObjectMode:s})=>s),r=xT(e,t),n=new Bi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var xT=(e,t)=>{if(e.length===0)return(0,Es.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Bi=class extends Es.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Ui(t),this.#t.has(t))return;this.#t.add(t),this.#n??=ST(this,this.#t,this.#o);let r=ET({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(Ui(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)}},ST=async(e,t,r)=>{_s(e,Cp);let n=new AbortController;try{await Promise.race([vT(e,n),_T(e,t,r,n)])}finally{n.abort(),_s(e,-Cp)}},vT=async(e,{signal:t})=>{try{await(0,Gi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Ip(e,r),r}},_T=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Wr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Ui=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},ET=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{_s(e,Ap);let a=new AbortController;try{await Promise.race([TT(o,t,a),OT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),RT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),_s(e,-Ap)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?qi(e):kT(e))},TT=async(e,t,{signal:r})=>{try{await e,r.aborted||qi(t)}catch(n){r.aborted||Ip(t,n)}},OT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Gi.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;$p(i)?s.add(t):Dp(e,i)}},RT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Wr.once)(e,s,{signal:o}),!e.readable)return(0,Wr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},kT=e=>{e.writable&&e.end()},Ip=(e,t)=>{$p(t)?qi(e):Dp(e,t)},$p=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",qi=e=>{(e.readable||e.writable)&&e.destroy()},Dp=(e,t)=>{e.destroyed||(e.once("error",CT),e.destroy(t))},CT=()=>{},_s=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Cp=2,Ap=1;var Vi=require("node:stream/promises");var lr=(e,t)=>{e.pipe(t),AT(e,t),IT(e,t)},AT=async(e,t)=>{if(!($e(e)||$e(t))){try{await(0,Vi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}zi(t)}},zi=e=>{e.writable&&e.end()},IT=async(e,t)=>{if(!($e(e)||$e(t))){try{await(0,Vi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Wi(e)}},Wi=e=>{e.readable&&e.destroy()};var Lp=(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)))$T(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))LT({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]:Et(o);lr(i,s)}},$T=(e,t,r,n)=>{r==="output"?lr(e.stdio[n],t):lr(t,e.stdio[n]);let s=DT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},DT=["stdin","stdout","stderr"],LT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;NT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},NT=(e,{signal:t})=>{$e(e)&&xt(e,PT,t)},PT=2;var Pp=require("node:events");var Tt=[];Tt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Tt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Tt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ts=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",Hi=Symbol.for("signal-exit emitter"),Zi=globalThis,MT=Object.defineProperty.bind(Object),Yi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Zi[Hi])return Zi[Hi];MT(Zi,Hi,{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}},Os=class{},FT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Xi=class extends Os{onExit(){return()=>{}}load(){}unload(){}},Ki=class extends Os{#t=Ji.platform==="win32"?"SIGINT":"SIGHUP";#r=new Yi;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Tt)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(!Ts(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 Tt)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,Tt.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 Ts(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"&&Ts(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)}},Ji=globalThis.process,{onExit:Np,load:Oj,unload:Rj}=FT(Ts(Ji)?new Ki(Ji):new Xi);var Mp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Np(()=>{e.kill()});(0,Pp.addAbortListener)(n,()=>{s()})};var jp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=In(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=jT(r,n,s),{sourceStream:f,sourceError:p}=UT(e,u),{options:d,fileDescriptors:x}=Ue.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:x,startTime:o}},jT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=BT(e,t,...r),a=Un(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},BT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Fp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Lo(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]=wn(r,...n);return{destination:t(Fp)(s,o,i),pipeOptions:i}}if(Ue.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}`)},Fp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),UT=(e,t)=>{try{return{sourceStream:rr(e,t)}}catch(r){return{sourceError:r}}};var Up=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=GT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw Qi({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},GT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Wi(e),n;if(t!==void 0)return zi(r),t},Qi=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>or({error:e,command:Bp,escapedCommand:Bp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Bp="source.pipe(destination)";var Gp=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 qp=require("node:stream/promises");var Vp=(e,t,r)=>{let n=Rs.has(t)?VT(e,t):qT(e,t);return xt(e,WT,r.signal),xt(t,HT,r.signal),zT(t),n},qT=(e,t)=>{let r=Et([e]);return lr(r,t),Rs.set(t,r),r},VT=(e,t)=>{let r=Rs.get(t);return r.add(e),r},zT=async e=>{try{await(0,qp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Rs.delete(e)},Rs=new WeakMap,WT=2,HT=1;var zp=require("node:util");var Wp=(e,t)=>e===void 0?[]:[ZT(e,t)],ZT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,zp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw Qi({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var ks=(e,...t)=>{if(W(t[0]))return ks.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=jp(e,...t),s=YT({...n,destination:r});return s.pipe=ks.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},YT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=XT(e,s);Up({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let p=Vp(t,o,f);return await Promise.race([Gp(l),...Wp(a,{sourceStream:t,mergedStream:p,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},XT=(e,t)=>Promise.allSettled([e,t]);var Kp=require("node:timers/promises");var Zp=require("node:events"),Yp=require("node:stream");var Cs=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return KT(t,i),Xp({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},KT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ea=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;JT(t,i,e);let a=e.readableObjectMode&&!o;return Xp({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},JT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Xp=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,Zp.on)(e,"data",{signal:t.signal,highWaterMark:Hp,highWatermark:Hp});return QT({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},ta=(0,Yp.getDefaultHighWaterMark)(!0),Hp=ta,QT=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=e0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*_t(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Ur(a)}},e0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[gs(e,r,!t),hs(e,s,!n,{})].filter(Boolean);var Jp=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=t0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([r0(e),f]);return}let p=Ai(c,r),d=ea({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:p,allMixed:a}),[x]=await Promise.all([n0({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return x},t0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!ws({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ea({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await ap(a,e,r,o)},r0=async e=>{await(0,Kp.setImmediate)(),e.readableFlowing===null&&e.resume()},n0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await ss(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await os(r,{maxBuffer:o})):await as(r,{maxBuffer:o})}catch(a){return Qp(sd({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},ra=async e=>{try{return await e}catch(t){return Qp(t)}},Qp=({bufferedData:e})=>Zc(e)?new Uint8Array(e):e;var tm=require("node:stream/promises"),Hr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=s0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,tm.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||a0(a,t,r,n)}finally{i.abort()}},s0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&o0(e,r,n),n},o0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{i0(t,r),n.call(e,...s)}},i0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},a0=(e,t,r,n)=>{if(!c0(e,t,r,n))throw e},c0=(e,t,r,n=!0)=>r.propagating?em(e)||As(e):(r.propagating=!0,na(r,t)===n?em(e):As(e)),na=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",As=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",em=e=>(e==null?void 0:e.code)==="EPIPE";var rm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>sa({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),sa=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=Hr(e,t,u);if(na(u,t)){await l;return}let[f]=await Promise.all([Jp({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 nm=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Et([e,t].filter(Boolean)):void 0,sm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>sa({...u0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:l0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),u0=({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}},l0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var um=require("node:events");var om=e=>Xt(e,"ipc"),im=(e,t)=>{let r=An(e);je({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var am=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=om(o),a=Je(t,"ipc"),c=Je(r,"ipc");for await(let u of Fi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(od(e,s,c),s.push(u)),i&&im(u,o);return s},cm=async(e,t)=>(await Promise.allSettled([e]),t);var lm=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:p,verboseInfo:d,fileDescriptors:x,originalStreams:T,onInternalError:P,controller:M})=>{let j=dp(e,p),Y={originalStreams:T,fileDescriptors:x,subprocess:e,exitPromise:j,propagating:!1},X=rm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),we=sm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),ce=[],Ce=am({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:d}),Ae=f0(T,e,Y),xe=d0(x,Y);try{return await Promise.race([Promise.all([{},mp(j),Promise.all(X),we,Ce,$f(e,f),...Ae,...xe]),P,p0(e,M),...Rf(e,o,p,M),...jl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:p,controller:M}),...Ef({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:M})])}catch(Cr){return p.terminationReason??="other",Promise.all([{error:Cr},j,Promise.all(X.map(wt=>ra(wt))),ra(we),cm(Ce,ce),Promise.allSettled(Ae),Promise.allSettled(xe)])}},f0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Hr(n,s,r)),d0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Ne(o,{checkOpen:!1})&&!$e(o)).map(({type:s,value:o,stream:i=o})=>Hr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),p0=async(e,{signal:t})=>{let[r]=await(0,um.once)(e,"error",{signal:t});throw r};var fm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Zr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Be();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},fr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var pm=require("node:stream"),mm=require("node:util");var oa=require("node:stream/promises");var ia=async e=>{if(e!==void 0)try{await aa(e)}catch{}},dm=async e=>{if(e!==void 0)try{await ca(e)}catch{}},aa=async e=>{await(0,oa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ca=async e=>{await(0,oa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Is=async(e,t)=>{if(await e,t)throw t},$s=(e,t,r)=>{r&&!As(r)?e.destroy(r):t&&e.destroy()};var hm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||ge.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ua(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=la(a,i),{read:p,onStdoutDataDone:d}=fa({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),x=new pm.Readable({read:p,destroy:(0,mm.callbackify)(pa.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return da({subprocessStdout:a,onStdoutDataDone:d,readable:x,subprocess:e}),x},ua=(e,t,r)=>{let n=rr(e,t),s=Zr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},la=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:ta},fa=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Be(),i=Cs({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){m0(this,i,o)},onStdoutDataDone:o}},m0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},da=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await ca(e),await n,await ia(s),await t,r.readable&&r.push(null)}catch(o){await ia(s),gm(r,o)}},pa=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await fr(r,t)&&(gm(e,n),await Is(t,n))},gm=(e,t)=>{$s(e,e.readable,t)};var ym=require("node:stream"),ma=require("node:util");var bm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=ha(e,r,t),i=new ym.Writable({...ga(n,e,s),destroy:(0,ma.callbackify)(ba.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return ya(n,i),i},ha=(e,t,r)=>{let n=Un(e,t),s=Zr(r,n,"writableFinal"),o=Zr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},ga=(e,t,r)=>({write:h0.bind(void 0,e),final:(0,ma.callbackify)(g0.bind(void 0,e,t,r))}),h0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},g0=async(e,t,r)=>{await fr(r,t)&&(e.writable&&e.end(),await t)},ya=async(e,t,r)=>{try{await aa(e),t.writable&&t.end()}catch(n){await dm(r),wm(t,n)}},ba=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await fr(r,t),await fr(n,t)&&(wm(e,s),await Is(t,s))},wm=(e,t)=>{$s(e,e.writable,t)};var xm=require("node:stream"),Sm=require("node:util");var vm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||ge.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ua(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:p}=ha(e,s,t),{readableEncoding:d,readableObjectMode:x,readableHighWaterMark:T}=la(c,a),{read:P,onStdoutDataDone:M}=fa({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new xm.Duplex({read:P,...ga(l,e,f),destroy:(0,Sm.callbackify)(y0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:x,writableObjectMode:l.writableObjectMode,encoding:d});return da({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),ya(l,j,c),j},y0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([pa({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),ba({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var wa=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||ge.has(t),i=rr(e,r),a=Cs({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return b0(a,i,e)},b0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var _m=(e,{encoding:t})=>{let r=fm();e.readable=hm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=bm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=vm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=wa.bind(void 0,e,t),e[Symbol.asyncIterator]=wa.bind(void 0,e,t,{})};var Em=(e,t)=>{for(let[r,n]of x0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},w0=(async()=>{})().constructor.prototype,x0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(w0,e)]);var Rm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=S0(e,t,r),{subprocess:p,promise:d}=_0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return p.pipe=ks.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),Em(p,d),Ue.set(p,{options:l,fileDescriptors:f}),p},S0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=$n(e,t,r),{file:a,commandArguments:c,options:u}=Qn(e,t,r),l=v0(u),f=kp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},v0=({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,Om.spawn)(...es(e,t,r))}catch(x){return Tp({error:x,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Tm.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Lp(c,a,u),Mp(c,r,u);let f={},p=Be();c.kill=Pl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:u}),c.all=nm(c,r),_m(c,r),Sp(c,r);let d=E0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:p,controller:u});return{subprocess:c,promise:d}},E0=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,[p,d],x,T,P]=await lm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=x.map((X,we)=>et(X,t,we)),j=et(T,t,"all"),Y=T0({errorInfo:f,exitCode:p,signal:d,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ir(Y,n,t)},T0=({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?Br({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 Ge,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):us({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Ds=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,O0(n,e[n],s)]));return{...e,...r}},O0=(e,t,r)=>R0.has(e)&&W(t)&&W(r)?{...t,...r}:r,R0=new Set(["env",...jo]);var dt=(e,t,r,n)=>{let s=(i,a,c)=>dt(i,a,r,c),o=(...i)=>k0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},k0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Ds(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=C0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?yp(a,c,u):Rm(a,c,u,s)},C0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=tu(t)?ru(t,r):[t,...r],[i,a,c]=wn(...o),u=Ds(Ds(n,s),c),{file:l=i,commandArguments:f=a,options:p=u,isSync:d=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:p,isSync:d}};var km=({file:e,commandArguments:t})=>Am(e,t),Cm=({file:e,commandArguments:t})=>({...Am(e,t),isSync:!0}),Am=(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]=A0(e);return{file:r,commandArguments:n}},A0=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(I0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},I0=/ +/g;var Im=(e,t,r)=>{e.sync=t($0,r),e.s=e.sync},$m=({options:e})=>Dm(e),$0=({options:e})=>({...Dm(e),isSync:!0}),Dm=e=>({options:{...D0(e),...e}}),D0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Lm={preferLocal:!0};var Nm=dt(()=>({})),QU=dt(()=>({isSync:!0})),eG=dt(km),tG=dt(Cm),rG=dt(kf),nG=dt($m,{},Lm,Im),{sendMessage:sG,getOneMessage:oG,getEachMessage:iG,getCancelSignal:aG}=vp();var Bw=require("fs"),Ro=require("path"),ko=q(Eg());var Me={};px(Me,{BRAND:()=>eC,DIRTY:()=>Rt,EMPTY_PATH:()=>$k,INVALID:()=>O,NEVER:()=>FC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>ht,ZodArray:()=>st,ZodBigInt:()=>Ct,ZodBoolean:()=>At,ZodBranded:()=>nn,ZodCatch:()=>Ut,ZodDate:()=>It,ZodDefault:()=>Bt,ZodDiscriminatedUnion:()=>Zs,ZodEffects:()=>Re,ZodEnum:()=>Ft,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>Xs,ZodIntersection:()=>Nt,ZodIssueCode:()=>m,ZodLazy:()=>Pt,ZodLiteral:()=>Mt,ZodMap:()=>wr,ZodNaN:()=>Sr,ZodNativeEnum:()=>jt,ZodNever:()=>Pe,ZodNull:()=>Dt,ZodNullable:()=>Ze,ZodNumber:()=>kt,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>b,ZodPipeline:()=>sn,ZodPromise:()=>gt,ZodReadonly:()=>Gt,ZodRecord:()=>Ys,ZodSchema:()=>L,ZodSet:()=>xr,ZodString:()=>mt,ZodSymbol:()=>yr,ZodTransformer:()=>Re,ZodTuple:()=>He,ZodType:()=>L,ZodUndefined:()=>$t,ZodUnion:()=>Lt,ZodUnknown:()=>nt,ZodVoid:()=>br,addIssueToContext:()=>y,any:()=>uC,array:()=>pC,bigint:()=>sC,boolean:()=>Ng,coerce:()=>MC,custom:()=>$g,date:()=>oC,datetimeRegex:()=>Ag,defaultErrorMap:()=>tt,discriminatedUnion:()=>yC,effect:()=>CC,enum:()=>OC,function:()=>_C,getErrorMap:()=>mr,getParsedType:()=>We,instanceof:()=>rC,intersection:()=>bC,isAborted:()=>Ws,isAsync:()=>hr,isDirty:()=>Hs,isValid:()=>pt,late:()=>tC,lazy:()=>EC,literal:()=>TC,makeIssue:()=>rn,map:()=>SC,nan:()=>nC,nativeEnum:()=>RC,never:()=>fC,null:()=>cC,nullable:()=>IC,number:()=>Lg,object:()=>mC,objectUtil:()=>Fa,oboolean:()=>PC,onumber:()=>NC,optional:()=>AC,ostring:()=>LC,pipeline:()=>DC,preprocess:()=>$C,promise:()=>kC,quotelessJson:()=>Ck,record:()=>xC,set:()=>vC,setErrorMap:()=>Ik,strictObject:()=>hC,string:()=>Dg,symbol:()=>iC,transformer:()=>CC,tuple:()=>wC,undefined:()=>aC,union:()=>gC,unknown:()=>lC,util:()=>N,void:()=>dC});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 Fa;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Fa||(Fa={}));var b=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),We=e=>{switch(typeof e){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(e)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(e)?b.array:e===null?b.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?b.promise:typeof Map<"u"&&e instanceof Map?b.map:typeof Set<"u"&&e instanceof Set?b.set:typeof Date<"u"&&e instanceof Date?b.date:b.object;default:return b.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"]),Ck=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)if(s.path.length>0){let o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var Ak=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===b.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==="bigint"?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}},tt=Ak;var Tg=tt;function Ik(e){Tg=e}function mr(){return Tg}var rn=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}},$k=[];function y(e,t){let r=mr(),n=rn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===tt?void 0:tt].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 O;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 O;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}}},O=Object.freeze({status:"aborted"}),Rt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Ws=e=>e.status==="aborted",Hs=e=>e.status==="dirty",pt=e=>e.status==="valid",hr=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 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}},Og=(e,t)=>{if(pt(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 We(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:We(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:We(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(hr(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:We(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Og(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:We(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return pt(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=>pt(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:We(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(hr(s)?s:Promise.resolve(s));return Og(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 Ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return st.create(this)}promise(){return gt.create(this,this._def)}or(t){return Lt.create([this,t],this._def)}and(t){return Nt.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 Bt({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new nn({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(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 sn.create(this,t)}readonly(){return Gt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Dk=/^c[^\s-]{8,}$/i,Lk=/^[0-9a-z]+$/,Nk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pk=/^[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,Mk=/^[a-z0-9_-]{21}$/i,Fk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jk=/^[-+]?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)?)??$/,Bk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Uk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ja,Gk=/^(?:(?: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])$/,qk=/^(?:(?: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])$/,Vk=/^(([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]))$/,zk=/^(([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])$/,Wk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Hk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kg="((\\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])))",Zk=new RegExp(`^${kg}$`);function Cg(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 Yk(e){return new RegExp(`^${Cg(e)}$`)}function Ag(e){let t=`${kg}T${Cg(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 Xk(e,t){return!!((t==="v4"||!t)&&Gk.test(e)||(t==="v6"||!t)&&Vk.test(e))}function Kk(e,t){if(!Fk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let 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 Jk(e,t){return!!((t==="v4"||!t)&&qk.test(e)||(t==="v6"||!t)&&zk.test(e))}var mt=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==b.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.string,received:o.parsedType}),O}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")Bk.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")ja||(ja=new RegExp(Uk,"u")),ja.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")Pk.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")Mk.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")Dk.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")Lk.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")Nk.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"?Ag(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"?Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Yk(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"?jk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Xk(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"?Kk(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"?Jk(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"?Wk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Hk.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}};mt.create=e=>new mt({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function Qk(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 kt=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)!==b.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.number,received:o.parsedType}),O}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"?Qk(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)}};kt.create=e=>new kt({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var Ct=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)!==b.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:b.bigint,received:r.parsedType}),O}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}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var At=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==b.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.boolean,received:n.parsedType}),O}return re(t.data)}};At.create=e=>new At({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var It=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==b.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.date,received:o.parsedType}),O}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),O}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}};It.create=e=>new It({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var yr=class extends L{_parse(t){if(this._getType(t)!==b.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.symbol,received:n.parsedType}),O}return re(t.data)}};yr.create=e=>new yr({typeName:k.ZodSymbol,...$(e)});var $t=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.undefined,received:n.parsedType}),O}return re(t.data)}};$t.create=e=>new $t({typeName:k.ZodUndefined,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==b.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.null,received:n.parsedType}),O}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodNull,...$(e)});var ht=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};ht.create=e=>new ht({typeName:k.ZodAny,...$(e)});var nt=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};nt.create=e=>new nt({typeName:k.ZodUnknown,...$(e)});var Pe=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:b.never,received:r.parsedType}),O}};Pe.create=e=>new Pe({typeName:k.ZodNever,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.void,received:n.parsedType}),O}return re(t.data)}};br.create=e=>new br({typeName:k.ZodVoid,...$(e)});var st=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==b.array)return y(r,{code:m.invalid_type,expected:b.array,received:r.parsedType}),O;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)}};st.create=(e,t)=>new st({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function gr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(gr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof st?new st({...e._def,type:gr(e.element)}):e instanceof Te?Te.create(gr(e.unwrap())):e instanceof Ze?Ze.create(gr(e.unwrap())):e instanceof He?He.create(e.items.map(t=>gr(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)!==b.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:b.object,received:u.parsedType}),O}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pe&&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 Pe){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,p=await l.value;u.push({key:f,value:p,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 gr(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 Ig(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});var Lt=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}),O}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}),O}}get options(){return this._def.options}};Lt.create=(e,t)=>new Lt({options:e,typeName:k.ZodUnion,...$(t)});var rt=e=>e instanceof Pt?rt(e.schema):e instanceof Re?rt(e.innerType()):e instanceof Mt?[e.value]:e instanceof Ft?e.options:e instanceof jt?N.objectValues(e.enum):e instanceof Bt?rt(e._def.innerType):e instanceof $t?[void 0]:e instanceof Dt?[null]:e instanceof Te?[void 0,...rt(e.unwrap())]:e instanceof Ze?[null,...rt(e.unwrap())]:e instanceof nn||e instanceof Gt?rt(e.unwrap()):e instanceof Ut?rt(e._def.innerType):[],Zs=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.object)return y(r,{code:m.invalid_type,expected:b.object,received:r.parsedType}),O;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]}),O)}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=rt(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 Ba(e,t){let r=We(e),n=We(t);if(e===t)return{valid:!0,data:e};if(r===b.object&&n===b.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=Ba(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===b.array&&n===b.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=Ba(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===b.date&&n===b.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Nt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ws(o)||Ws(i))return O;let a=Ba(o.value,i.value);return a.valid?((Hs(o)||Hs(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),O)};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}))}};Nt.create=(e,t,r)=>new Nt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var He=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.array)return y(n,{code:m.invalid_type,expected:b.array,received:n.parsedType}),O;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"}),O;!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})}};He.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new He({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var Ys=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!==b.object)return y(n,{code:m.invalid_type,expected:b.object,received:n.parsedType}),O;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:mt.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},wr=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!==b.map)return y(n,{code:m.invalid_type,expected:b.map,received:n.parsedType}),O;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 O;(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 O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};wr.create=(e,t,r)=>new wr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var xr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.set)return y(n,{code:m.invalid_type,expected:b.set,received:n.parsedType}),O;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 O;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)}};xr.create=(e,t)=>new xr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var Xs=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.function)return y(r,{code:m.invalid_type,expected:b.function,received:r.parsedType}),O;function n(a,c){return rn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mr(),tt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return rn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mr(),tt].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 gt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(d=>{throw u.addIssue(n(c,d)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw u.addIssue(s(f,d)),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:He.create(t).rest(nt.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||He.create([]).rest(nt.create()),returns:r||nt.create(),typeName:k.ZodFunction,...$(n)})}},Pt=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})}};Pt.create=(e,t)=>new Pt({getter:e,typeName:k.ZodLazy,...$(t)});var Mt=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}),O}return{status:"valid",value:t.data}}get value(){return this._def.value}};Mt.create=(e,t)=>new Mt({value:e,typeName:k.ZodLiteral,...$(t)});function Ig(e,t){return new Ft({values:e,typeName:k.ZodEnum,...$(t)})}var Ft=class e extends L{_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}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.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}),O}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})}};Ft.create=Ig;var jt=class extends L{_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==b.string&&n.parsedType!==b.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),O}return re(t.data)}get enum(){return this._def.values}};jt.create=(e,t)=>new jt({values:e,typeName:k.ZodNativeEnum,...$(t)});var gt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:b.promise,received:r.parsedType}),O;let n=r.parsedType===b.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gt.create=(e,t)=>new gt({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 O;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?O:c.status==="dirty"?Rt(c.value):r.value==="dirty"?Rt(c.value):c});{if(r.value==="aborted")return O;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?O:a.status==="dirty"?Rt(a.value):r.value==="dirty"?Rt(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"?O:(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"?O:(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(!pt(i))return O;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=>pt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):O);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)===b.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 Ze=class extends L{_parse(t){return this._getType(t)===b.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ze.create=(e,t)=>new Ze({innerType:e,typeName:k.ZodNullable,...$(t)});var Bt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Bt.create=(e,t)=>new Bt({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Ut=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 hr(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}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var Sr=class extends L{_parse(t){if(this._getType(t)!==b.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.nan,received:n.parsedType}),O}return{status:"valid",value:t.data}}};Sr.create=e=>new Sr({typeName:k.ZodNaN,...$(e)});var eC=Symbol("zod_brand"),nn=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}},sn=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"?O:o.status==="dirty"?(r.dirty(),Rt(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"?O: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})}},Gt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(pt(s)&&(s.value=Object.freeze(s.value)),s);return hr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Rg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function $g(e,t={},r){return e?ht.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Rg(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Rg(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):ht.create()}var tC={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 rC=(e,t={message:`Input not instance of ${e.name}`})=>$g(r=>r instanceof e,t),Dg=mt.create,Lg=kt.create,nC=Sr.create,sC=Ct.create,Ng=At.create,oC=It.create,iC=yr.create,aC=$t.create,cC=Dt.create,uC=ht.create,lC=nt.create,fC=Pe.create,dC=br.create,pC=st.create,mC=fe.create,hC=fe.strictCreate,gC=Lt.create,yC=Zs.create,bC=Nt.create,wC=He.create,xC=Ys.create,SC=wr.create,vC=xr.create,_C=Xs.create,EC=Pt.create,TC=Mt.create,OC=Ft.create,RC=jt.create,kC=gt.create,CC=Re.create,AC=Te.create,IC=Ze.create,$C=Re.createWithPreprocess,DC=sn.create,LC=()=>Dg().optional(),NC=()=>Lg().optional(),PC=()=>Ng().optional(),MC={string:(e=>mt.create({...e,coerce:!0})),number:(e=>kt.create({...e,coerce:!0})),boolean:(e=>At.create({...e,coerce:!0})),bigint:(e=>Ct.create({...e,coerce:!0})),date:(e=>It.create({...e,coerce:!0}))};var FC=O;var Pg=Me.object({list:Me.boolean().optional(),log:Me.boolean().optional(),track:Me.boolean().optional(),parser:Me.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Me.string().optional(),ignoreConfig:Me.string().optional(),match:Me.any().optional()});var Cy=require("node:buffer"),ho=q(Yg(),1),fo=q(Va(),1),Sb=require("child_process"),sw=q(Wa(),1),Or=q(Wa(),1),Aw=require("node:events"),dc=Object.defineProperty,hA=Object.getOwnPropertyDescriptor,pc=Object.getOwnPropertyNames,gA=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[pc(e)[0]])(e=0)),t},yA=(e,t)=>function(){return t||(0,e[pc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)dc(e,r,{get:t[r],enumerable:!0})},bA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of pc(t))!gA.call(e,s)&&s!==r&&dc(e,s,{get:()=>t[s],enumerable:!(n=hA(t,s))||n.enumerable});return e},V=e=>bA(dc({},"__esModule",{value:!0}),e);function wA(...e){let t=new String(e);return mo.set(t,e),t}function co(e){return e instanceof String&&mo.has(e)}function Xg(e){return mo.get(e)||[]}var mo,un=g({"src/lib/args/pathspec.ts"(){"use strict";mo=new WeakMap}}),it,bt=g({"src/lib/errors/git-error.ts"(){"use strict";it=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),ln,kr=g({"src/lib/errors/git-response-error.ts"(){"use strict";bt(),ln=class extends it{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Ry,ky=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";bt(),Ry=class extends it{constructor(e){super(void 0,e)}}}});function Ay(e){return typeof e!="function"?Ht:e}function Iy(e){return typeof e=="function"&&e!==Ht}function $y(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Dy(e,t=0){return Ly(e)&&e.length>t?e[t]:void 0}function Wt(e,t=0){if(Ly(e)&&e.length>t)return e[e.length-1-t]}function Ly(e){return!!(e&&typeof e.length=="number")}function fn(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
|
|
57
|
-
`)){let c
|
|
58
|
-
`);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var cb,BA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),cb=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=Wt(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 Ha(e,t){return typeof e=="string"&&ic.hasOwnProperty(e)?e:t}function UA(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 GA(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 FA(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 MA(r)}}}function VA(){return{addConfig(e,t,...r){return this._runTask(UA(e,t,r[0]===!0,Ha(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(GA(e,Ha(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(qA(Ha(e[0],void 0)),z(arguments))}}}var ic,ub=g({"src/lib/tasks/config.ts"(){"use strict";BA(),C(),ic=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(ic||{})}});function zA(e){return lb.has(e)}var Za,lb,fb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Za=(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))(Za||{}),lb=new Set(Object.values(Za))}});function WA(...e){return new pb().param(...e)}function HA(e){let t=new Set,r={};return mc(e,n=>{let[s,o,i]=n.split(Rr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function ZA(){return{grep(e){let t=z(arguments),r=pe(arguments);for(let s of db)if(r.includes(s))return this._runTask(me(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=WA().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return HA(s)}},t)}}}var db,on,Kg,pb,mb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),db=["-h"],on=Symbol("grepQuery"),pb=class{constructor(){this[Kg]=[]}*[(Kg=on,Symbol.iterator)](){for(let e of this[on])yield e}and(...e){return e.length&&this[on].push("--and","(",...an(e,"-e"),")"),this}param(...e){return this[on].push(...an(e,"-e")),this}}}}),hb={};Z(hb,{ResetMode:()=>oo,getResetMode:()=>XA,resetTask:()=>YA});function YA(e,t){let r=["reset"];return gb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function XA(e){if(gb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function gb(e){return yb.includes(e)}var oo,yb,bb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),oo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(oo||{}),yb=Array.from(Object.values(oo))}});function KA(){return(0,fo.default)("simple-git")}function Jg(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 JA(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 Ec(e,t,r,n=KA()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=JA(Xe(t,ne),i,n);return u(r);function c(l,f){return F(o,Ec(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",p=i&&Jg(i,f)||Ht,d=Jg(n,`${s} ${f}`,p);return Object.assign(i?p:d,{label:e,sibling:c,info:d,step:u})}}var wb=g({"src/lib/git-logger.ts"(){"use strict";C(),fo.default.formatters.L=e=>String(gc(e)?e.length:"-"),fo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):dn(e)}}),xb,QA=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var e;bt(),wb(),xb=(e=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=e.getName(r.commands[0]),s=Ec(this.logLabel,n);return{task:r,logger:s,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:s}]of Array.from(this._queue.entries()))n===r.task?(s.info("Failed %o",r),s("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):s.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new it(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting task"),n}static getName(r="empty"){return`task:${r}:${++e.counter}`}},e.counter=0,e)}});function zt(e,t){return{method:Dy(e.commands)||"",commands:t}}function eI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function Qg(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var ac,tI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";bt(),H(),C(),QA(),ac=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new xb}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))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return await(nb(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 it?Object.assign(t,{task:e}):new it(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",zt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],zt(e,e.commands)),s=await this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=await this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),rb(e)?nc(e.parser,o):nc(e.parser,o.asStrings())}async attemptEmptyTask(e,t){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},{...zt(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",dn(f)),c(new lo(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 lo(Buffer.concat(i),Buffer.concat(a)))})}async gitResponse(e,t,r,n,s){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},zt(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,{...zt(e,r),kill(p){l=p||l}});let f=(0,Sb.spawn)(t,r,i);f.stdout.on("data",Qg(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",Qg(u,"stdErr",s,o.step("stdErr"))),f.on("error",eI(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,{...zt(e,r),spawned:f,close(p,d){a({stdOut:c,stdErr:u,exitCode:p,rejection:l||d})},kill(p){f.killed||(l=p,f.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...zt(e,t),kill(n){r=n||r}}),r}}}}),vb={};Z(vb,{GitExecutor:()=>_b});var _b,rI=g({"src/lib/runners/git-executor.ts"(){"use strict";tI(),_b=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new ac(this,this._scheduler,this._plugins)}chain(){return new ac(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function nI(e,t,r=Ht){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof ln?sI(o):o,void 0)};t.then(n,s)}function sI(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=Ht};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 oI=g({"src/lib/task-callback.ts"(){"use strict";kr(),C()}});function ey(e,t){return eb(r=>{if(!hc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var iI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function Ya(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=go(t,"-B")),ae(t)}function aI(){return{checkout(){return this._runTask(Ya(pe(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Ya(["-b",e,t,...pe(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Ya(["-b",e,...pe(arguments)]),z(arguments))}}}var cI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function uI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function lI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return he(uI(),[Eb],e)}})}}}var Eb,fI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Eb=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Py(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function dI(e){return he({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Tb,e)}var Tb,pI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Tb=[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 mI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...an(e,"-m"),...t,...r],format:"utf-8",parser:dI}}function hI(){return{commit(t,...r){let n=z(arguments),s=e(t)||mI(Ye(t),Ye(Xe(r[0],uo,[])),[...Xe(r[1],pn,[]),...pe(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!uo(t)&&me("git.commit: requires the commit message to be supplied as a string/string[]")}}var gI=g({"src/lib/tasks/commit.ts"(){"use strict";pI(),C(),H()}});function yI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var bI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function wI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var xI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function SI(e,t,r){let n=String(r).trim(),s;if(s=Ob.exec(n))return new io(e,t,!1,s[1]);if(s=Rb.exec(n))return new io(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new io(e,t,/^re/i.test(n),o)}var io,Ob,Rb,vI=g({"src/lib/responses/InitSummary.ts"(){"use strict";io=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Ob=/^Init.+ repository in (.+)$/,Rb=/^Rein.+ in (.+)$/}});function _I(e){return e.includes(Tc)}function EI(e=!1,t,r){let n=["init",...r];return e&&!_I(n)&&n.splice(1,0,Tc),{commands:n,format:"utf-8",parser(s){return SI(n.includes("--bare"),t,s)}}}var Tc,TI=g({"src/lib/tasks/init.ts"(){"use strict";vI(),Tc="--bare"}});function Oc(e){for(let t=0;t<e.length;t++){let r=Rc.exec(e[t]);if(r)return`--${r[1]}`}return""}function OI(e){return Rc.test(e)}var Rc,mn=g({"src/lib/args/log-format.ts"(){"use strict";Rc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),kb,RI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";kb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Cb(e=""){let t=Ab[e];return r=>he(new kb,t,r,!1)}var Xa,ty,ry,ny,Ab,Ib=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";mn(),RI(),fb(),C(),Xa=[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])})],ty=[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})})],ry=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],ny=[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:ec(zA(t)&&t),from:ec(!!o&&n!==o&&n),similarity:U(r)})})],Ab={"":Xa,"--stat":Xa,"--numstat":ty,"--name-status":ny,"--name-only":ry}}});function kI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function $b(e=Ac,t=Db,r=""){let n=Cb(r);return function(s){let o=fn(s.trim(),!1,kc).map(function(i){let a=i.split(Cc),c=kI(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 kc,Cc,Ac,Db,Lb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Ib(),mn(),kc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Cc=" \xF2\xF2",Ac=" \xF2 ",Db=["hash","date","message","refs","author_name","author_email"]}}),Nb={};Z(Nb,{diffSummaryTask:()=>CI,validateLogFormatConfig:()=>So});function CI(e){let t=Oc(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),So(r)||{commands:r,format:"utf-8",parser:Cb(t)}}function So(e){let t=e.filter(OI);if(t.length>1)return me(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return me(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Ic=g({"src/lib/tasks/diff.ts"(){"use strict";mn(),Ib(),H()}});function AI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function II(e){return Object.keys(e).reduce((t,r)=>(r in cc||(t[r]=e[r]),t),{})}function Pb(e={},t=[]){let r=Xe(e.splitter,ne,Ac),n=bo(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]=AI(n,r),i=[],a=[`--pretty=format:${kc}${o}${Cc}`,...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",wA(e.file)),yc(II(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function $I(e,t,r){let n=$b(e,t,Oc(r));return{commands:["log",...r],format:"utf-8",parser:n}}function DI(){return{log(...r){let n=z(arguments),s=Pb(bc(arguments),Xe(arguments[0],pn)),o=t(...r)||So(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return $I(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&me("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var cc,Mb=g({"src/lib/tasks/log.ts"(){"use strict";mn(),un(),Lb(),C(),H(),Ic(),cc=(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))(cc||{})}}),ao,Fb,LI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";ao=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Fb=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"}}}}),uc,jb,NI=g({"src/lib/responses/PullSummary.ts"(){"use strict";uc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},jb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Ka(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 sy(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 Bb,PI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Bb=[new yt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Ka(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Ka(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=Ka(e.remoteMessages);s.total=sy(t),s.reused=sy(r),s.packReused=U(n)})]}});function Ub(e,t){return he({remoteMessages:new qb},Gb,t)}var Gb,qb,Vb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),PI(),Gb=[new yt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Bb,new yt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new yt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],qb=class{constructor(){this.all=[]}}}});function MI(e,t){let r=he(new jb,zb,[e,t]);return r.message&&r}var oy,iy,ay,cy,zb,uy,$c,Wb=g({"src/lib/parsers/parse-pull.ts"(){"use strict";NI(),C(),Vb(),oy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,iy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,ay=/^(create|delete) mode \d+ (.+)/,cy=[new I(oy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(iy,(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(ay,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],zb=[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})],uy=(e,t)=>he(new uc,cy,[e,t]),$c=(e,t)=>Object.assign(new uc,uy(e,t),Ub(e,t))}}),ly,Hb,fy,FI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";LI(),C(),Wb(),ly=[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 ao(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new ao(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new ao(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Hb=(e,t)=>Object.assign(fy(e,t),$c(e,t)),fy=e=>he(new Fb,ly,e)}});function dy(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=Hb(t,r);if(n.failed)throw new ln(n);return n}}:me("Git.merge requires at least one option")}var jI=g({"src/lib/tasks/merge.ts"(){"use strict";kr(),FI(),H()}});function BI(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 py,Zb,my,UI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Vb(),py=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(BI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch={...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}}})],Zb=(e,t)=>{let r=my(e,t),n=Ub(e,t);return{...r,...n}},my=(e,t)=>he({pushed:[]},py,[e,t])}}),Yb={};Z(Yb,{pushTagsTask:()=>GI,pushTask:()=>Dc});function GI(e={},t){return F(t,"--tags"),Dc(e,t)}function Dc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),go(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:Zb}}var Xb=g({"src/lib/tasks/push.ts"(){"use strict";UI(),C()}});function qI(){return{showBuffer(){let e=["show",...pe(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(tb(e),z(arguments))},show(){let e=["show",...pe(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var VI=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),hy,Kb,zI=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";hy=/^(.+)\0(.+)$/,Kb=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=hy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function gy(e){let[t,r]=e.split(Rr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function Ja(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function WI(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=Jb.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new Kb(i,s,o))}}var yy,Jb,Qb,HI=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),zI(),yy=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}},Jb=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,gy(t))}),be("R","M",(e,t)=>{let r=gy(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)),...Ja("A","A","U"),...Ja("D","D","U"),...Ja("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)}]]),Qb=function(e){let t=e.split(Rr),r=new yy;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=Rr+(t[n++]||"")),WI(r,o))}return r}}});function ZI(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!ew.includes(r))],parser(r){return Qb(r)}}}var ew,YI=g({"src/lib/tasks/status.ts"(){"use strict";HI(),ew=["--null","-z"]}});function po(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 XI(){return po(0,0,0,"",!1)}function KI(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:JI,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Lc));n(t)}})}}}function JI(e){return e===Lc?XI():he(po(0,0,0,e),tw,e)}var Lc,tw,QI=g({"src/lib/tasks/version.ts"(){"use strict";C(),Lc="installed=false",tw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,po(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,po(U(t),U(r),n,s))})]}}),rw={};Z(rw,{SimpleGitApi:()=>lc});var lc,e1=g({"src/lib/simple-git-api.ts"(){"use strict";oI(),iI(),cI(),fI(),gI(),ub(),bI(),mb(),xI(),TI(),Mb(),jI(),Xb(),VI(),YI(),H(),QI(),C(),lc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&nI(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",...Ye(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(ey(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(ey(e.path,e.root&&this._executor||void 0),t):this._runTask(me("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(wI(e,t===!0),z(arguments))}init(e){return this._runTask(EI(e===!0,this._executor.cwd,pe(arguments)),z(arguments))}merge(){return this._runTask(dy(pe(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(dy([e,t,...pe(arguments)]),z(arguments,!1)):this._runTask(me("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Dc({remote:Xe(arguments[0],ne),branch:Xe(arguments[1],ne)},pe(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...pe(arguments)]),z(arguments))}status(){return this._runTask(ZI(pe(arguments)),z(arguments))}},Object.assign(lc.prototype,aI(),hI(),VA(),lI(),yI(),ZA(),DI(),qI(),KI())}}),nw={};Z(nw,{Scheduler:()=>ow});var by,ow,t1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),wb(),by=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,sw.createDeferred)();return{promise:t,done:r,id:e}}})(),ow=class{constructor(e=2){this.concurrency=e,this.logger=Ec("","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),go(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,by());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),iw={};Z(iw,{applyPatchTask:()=>r1});function r1(e,t){return ae(["apply",...t,...e])}var n1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function s1(e,t){return{branch:e,hash:t,success:!0}}function o1(e){return{branch:e,hash:null,success:!1}}var aw,i1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";aw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function cw(e,t){return t===1&&fc.test(e)}var wy,fc,xy,vo,a1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";i1(),C(),wy=/(\S+)\s+\(\S+\s([^)]+)\)/,fc=/^error[^']+'([^']+)'/m,xy=[new I(wy,(e,[t,r])=>{let n=s1(t,r);e.all.push(n),e.branches[t]=n}),new I(fc,(e,[t])=>{let r=o1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],vo=(e,t)=>he(new aw,xy,[e,t])}}),uw,c1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";uw=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 Sy(e){return e?e.charAt(0):""}function lw(e){return he(new uw,fw,e)}var fw,u1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";c1(),C(),fw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Sy(t),!0,r,n,s)}),new I(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,n,s])=>{e.push(Sy(t),!1,r,n,s)})]}}),dw={};Z(dw,{branchLocalTask:()=>f1,branchTask:()=>l1,containsDeleteBranchCommand:()=>pw,deleteBranchTask:()=>p1,deleteBranchesTask:()=>d1});function pw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function l1(e){let t=pw(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?vo(n,s).all[0]:lw(n)}}}function f1(){return{format:"utf-8",commands:["branch","-v"],parser:lw}}function d1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return vo(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!cw(String(s),r))return i(s);o(n)}}}function p1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return vo(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!cw(String(i),n))return c(i);throw new ln(r.parser(cn(o),cn(s)),String(i))}};return r}var m1=g({"src/lib/tasks/branch.ts"(){"use strict";kr(),a1(),u1(),C()}}),mw,h1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";mw=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),hw={};Z(hw,{checkIgnoreTask:()=>g1});function g1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:mw}}var y1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";h1()}}),gw={};Z(gw,{cloneMirrorTask:()=>w1,cloneTask:()=>yw});function b1(e){return/^--upload-pack(=|$)/.test(e)}function yw(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(b1)?me("git.fetch: potential exploit argument blocked."):ae(n)}function w1(e,t,r){return F(r,"--mirror"),yw(e,t,r)}var x1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function S1(e,t){return he({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},bw,[e,t])}var bw,v1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),bw=[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})})]}}),ww={};Z(ww,{fetchTask:()=>E1});function _1(e){return/^--upload-pack(=|$)/.test(e)}function E1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(_1)?me("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:S1}}var T1=g({"src/lib/tasks/fetch.ts"(){"use strict";v1(),H()}});function O1(e){return he({moves:[]},xw,e)}var xw,R1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),xw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Sw={};Z(Sw,{moveTask:()=>k1});function k1(e,t){return{commands:["mv","-v",...Ye(e),t],format:"utf-8",parser:O1}}var C1=g({"src/lib/tasks/move.ts"(){"use strict";R1(),C()}}),vw={};Z(vw,{pullTask:()=>A1});function A1(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 $c(s,o)},onError(s,o,i,a){let c=MI(cn(s.stdOut),cn(s.stdErr));if(c)return a(new ln(c));a(o)}}}var I1=g({"src/lib/tasks/pull.ts"(){"use strict";kr(),Wb(),C()}});function $1(e){let t={};return _w(e,([r])=>t[r]={name:r}),Object.values(t)}function D1(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){mc(e,r=>t(r.split(/\s+/)))}var L1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Ew={};Z(Ew,{addRemoteTask:()=>N1,getRemotesTask:()=>P1,listRemotesTask:()=>M1,remoteTask:()=>F1,removeRemoteTask:()=>j1});function N1(e,t,r){return ae(["remote","add",...r,e,t])}function P1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?D1:$1}}function M1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function F1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function j1(e){return ae(["remote","remove",e])}var B1=g({"src/lib/tasks/remote.ts"(){"use strict";L1(),H()}}),Tw={};Z(Tw,{stashListTask:()=>U1});function U1(e={},t){let r=Pb(e),n=["stash","list",...r.commands,...t],s=$b(r.splitter,r.fields,Oc(n));return So(n)||{commands:n,format:"utf-8",parser:s}}var G1=g({"src/lib/tasks/stash-list.ts"(){"use strict";mn(),Lb(),Ic(),Mb()}}),Ow={};Z(Ow,{addSubModuleTask:()=>q1,initSubModuleTask:()=>V1,subModuleTask:()=>_o,updateSubModuleTask:()=>z1});function q1(e,t){return _o(["add",e,t])}function V1(e){return _o(["init",...e])}function _o(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function z1(e){return _o(["update",...e])}var W1=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function H1(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Rw(e,t):0}function Rw(e,t){return e===t?0:e>t?1:-1}function Z1(e){return e.trim()}function no(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var vy,kw,Y1=g({"src/lib/responses/TagList.ts"(){"use strict";vy=class{constructor(e,t){this.all=e,this.latest=t}},kw=function(e,t=!1){let r=e.split(`
|
|
59
|
-
`).map(Z1).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return H1(no(i[0]),no(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Rw(no(i[c]),no(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new vy(r,n)}}}),Cw={};Z(Cw,{addAnnotatedTagTask:()=>J1,addTagTask:()=>K1,tagListTask:()=>X1});function X1(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return kw(r,t)}}}function K1(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function J1(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Q1=g({"src/lib/tasks/tag.ts"(){"use strict";Y1()}}),e$=yA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(rI(),V(vb)),{SimpleGitApi:n}=(e1(),V(rw)),{Scheduler:s}=(t1(),V(nw)),{configurationErrorTask:o}=(H(),V(oc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:x}=(C(),V(zy)),{applyPatchTask:T}=(n1(),V(iw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(m1(),V(dw)),{checkIgnoreTask:X}=(y1(),V(hw)),{checkIsRepoTask:we}=(Yy(),V(Wy)),{cloneTask:ce,cloneMirrorTask:Ce}=(x1(),V(gw)),{cleanWithOptionsTask:Ae,isCleanOptionsArray:xe}=(ib(),V(sb)),{diffSummaryTask:Cr}=(Ic(),V(Nb)),{fetchTask:wt}=(T1(),V(ww)),{moveTask:qw}=(C1(),V(Sw)),{pullTask:Vw}=(I1(),V(vw)),{pushTagsTask:zw}=(Xb(),V(Yb)),{addRemoteTask:Ww,getRemotesTask:Hw,listRemotesTask:Zw,remoteTask:Yw,removeRemoteTask:Xw}=(B1(),V(Ew)),{getResetMode:Kw,resetTask:Jw}=(bb(),V(hb)),{stashListTask:Qw}=(G1(),V(Tw)),{addSubModuleTask:ex,initSubModuleTask:tx,subModuleTask:rx,updateSubModuleTask:nx}=(W1(),V(Ow)),{addAnnotatedTagTask:sx,addTagTask:ox,tagListTask:ix}=(Q1(),V(Cw)),{straightThroughBufferTask:ax,straightThroughStringTask:Fe}=(H(),V(oc));function R(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(R.prototype=Object.create(n.prototype)).constructor=R,R.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},R.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},R.prototype.stashList=function(h){return this._runTask(Qw(x(arguments)||{},a(h)&&h||[]),d(arguments))};function Fc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),p(arguments))}R.prototype.clone=function(){return this._runTask(Fc("clone",ce,...arguments),d(arguments))},R.prototype.mirror=function(){return this._runTask(Fc("mirror",Ce,...arguments),d(arguments))},R.prototype.mv=function(h,E){return this._runTask(qw(h,E),d(arguments))},R.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},R.prototype.pull=function(h,E,B,se){return this._runTask(Vw(f(h,u),f(E,u),p(arguments)),d(arguments))},R.prototype.fetch=function(h,E){return this._runTask(wt(f(h,u),f(E,u),p(arguments)),d(arguments))},R.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},R.prototype.tags=function(h,E){return this._runTask(ix(p(arguments)),d(arguments))},R.prototype.rebase=function(){return this._runTask(Fe(["rebase",...p(arguments)]),d(arguments))},R.prototype.reset=function(h){return this._runTask(Jw(Kw(h),p(arguments)),d(arguments))},R.prototype.revert=function(h){let E=d(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(Fe(["revert",...p(arguments,0,!0),h]),E)},R.prototype.addTag=function(h){let E=typeof h=="string"?ox(h):o("Git.addTag requires a tag name");return this._runTask(E,d(arguments))},R.prototype.addAnnotatedTag=function(h,E){return this._runTask(sx(h,E),d(arguments))},R.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.branch=function(h,E){return this._runTask(P(p(arguments)),d(arguments))},R.prototype.branchLocal=function(h){return this._runTask(M(),d(arguments))},R.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let Ie=0;Ie<B.length&&E;Ie++)if(!c(B[Ie])){B.splice(Ie,B.length-Ie);break}B.push(...p(arguments,0,!0));var se=d(arguments);return B.length?this._runTask(Fe(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},R.prototype.submoduleAdd=function(h,E,B){return this._runTask(ex(h,E),d(arguments))},R.prototype.submoduleUpdate=function(h,E){return this._runTask(nx(p(arguments,!0)),d(arguments))},R.prototype.submoduleInit=function(h,E){return this._runTask(tx(p(arguments,!0)),d(arguments))},R.prototype.subModule=function(h,E){return this._runTask(rx(p(arguments)),d(arguments))},R.prototype.listRemote=function(){return this._runTask(Zw(p(arguments)),d(arguments))},R.prototype.addRemote=function(h,E,B){return this._runTask(Ww(h,E,p(arguments)),d(arguments))},R.prototype.removeRemote=function(h,E){return this._runTask(Xw(h),d(arguments))},R.prototype.getRemotes=function(h,E){return this._runTask(Hw(h===!0),d(arguments))},R.prototype.remote=function(h,E){return this._runTask(Yw(p(arguments)),d(arguments))},R.prototype.tag=function(h,E){let B=p(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(Fe(B),d(arguments))},R.prototype.updateServerInfo=function(h){return this._runTask(Fe(["update-server-info"]),d(arguments))},R.prototype.pushTags=function(h,E){let B=zw({remote:f(h,u)},p(arguments));return this._runTask(B,d(arguments))},R.prototype.rm=function(h){return this._runTask(Fe(["rm","-f",...i(h)]),d(arguments))},R.prototype.rmKeepLocal=function(h){return this._runTask(Fe(["rm","--cached",...i(h)]),d(arguments))},R.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},R.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},R.prototype._catFile=function(h,E){var B=d(E),se=["cat-file"],Ie=E[0];if(typeof Ie=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray(Ie)&&se.push.apply(se,Ie);let Co=h==="buffer"?ax(se):Fe(se);return this._runTask(Co,B)},R.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"):Fe(["diff",...p(arguments)]);return this._runTask(B,d(arguments))},R.prototype.diffSummary=function(){return this._runTask(Cr(p(arguments,1)),d(arguments))},R.prototype.applyPatch=function(h){let E=l(h)?T(i(h),p([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,d(arguments))},R.prototype.revparse=function(){let h=["rev-parse",...p(arguments,!0)];return this._runTask(Fe(h,!0),d(arguments))},R.prototype.clean=function(h,E,B){let se=xe(h),Ie=se&&h.join("")||f(h,u)||"",Co=p([].slice.call(arguments,se?1:0));return this._runTask(Ae(Ie,Co),d(arguments))},R.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},R.prototype.clearQueue=function(){return this},R.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),d(arguments))},R.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),d(arguments))},t.exports=R}});un();bt();var t$=class extends it{constructor(e,t){super(void 0,t),this.config=e}};bt();bt();var ot=class extends it{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};kr();ky();Yy();ib();ub();fb();mb();bb();function r$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new ot(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new ot(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function n$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function s$(e,t){if(n$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new ot(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function o$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new ot(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 ot(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 ot(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function i$({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||s$(s,i),t||o$(s,n.method)}),r}}}C();function a$(e){let t=an(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var _y=(0,Or.deferred)().promise;function c$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Or.deferred)(),closeTimeout:(0,Or.deferred)(),exit:(0,Or.deferred)(),exitTimeout:(0,Or.deferred)()},i=Promise.race([e===!1?_y:o.closeTimeout.promise,t===!1?_y: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(()=>Qa(s))).then(i.done)}return{type:"spawn.after",async action(s,{spawned:o,close:i}){var l,f;let a=r(),c=!0,u=()=>void(c=!1);(l=o.stdout)==null||l.on("data",u),(f=o.stderr)==null||f.on("data",u),o.on("error",u),o.on("close",p=>a.close(p)),o.on("exit",p=>a.exit(p));try{await a.result,c&&await Qa(50),i(a.exitCode)}catch(p){i(a.exitCode,p)}}}}C();var u$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ey="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function l$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Ty(e,t){if(e.length<1||e.length>2)throw new ot(void 0,"binary",u$);if(e.some(l$))if(t)console.warn(Ey);else throw new ot(void 0,"binary",Ey);let[n,s]=e;return{binary:n,prefix:s}}function f$(e,t=["git"],r=!1){let n=Ty(Ye(t),r);e.on("binary",s=>{n=Ty(Ye(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}bt();function d$(e){return!!(e.exitCode&&e.stdErr.length)}function p$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function m$(e=!1,t=d$,r=p$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Oy(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 it(void 0,n.toString("utf-8"))}:{error:n}}}}C();var h$=class{constructor(){this.plugins=new Set,this.events=new Aw.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 Ye(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 g$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Ny(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:y$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function y$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function b$(e){let t=Fy(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function w$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var u,l;let o;function i(){o&&clearTimeout(o),o=setTimeout(c,e)}function a(){var f,p;(f=s.spawned.stdout)==null||f.off("data",i),(p=s.spawned.stderr)==null||p.off("data",i),s.spawned.off("exit",a),s.spawned.off("close",a),o&&clearTimeout(o)}function c(){a(),s.kill(new ot(void 0,"timeout","block timeout reached"))}r&&((u=s.spawned.stdout)==null||u.on("data",i)),t&&((l=s.spawned.stderr)==null||l.on("data",i)),s.spawned.on("exit",a),s.spawned.on("close",a),i()}}}un();function x$(){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(co(o)){n(Xg(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>co(i)&&Xg(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var S$=e$();function v$(e,t){var s;let r=new h$,n=qy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!hc(n.baseDir))throw new t$(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(a$(n.config)),r.add(i$(n.unsafe)),r.add(x$()),r.add(c$(n.completion)),n.abort&&r.add(r$(n.abort)),n.progress&&r.add(g$(n.progress)),n.timeout&&r.add(w$(n.timeout)),n.spawnOptions&&r.add(b$(n.spawnOptions)),r.add(Oy(m$(!0))),n.errors&&r.add(Oy(n.errors)),f$(r,n.binary,(s=n.unsafe)==null?void 0:s.allowUnsafeCustomBinary),new S$(n,r)}kr();var Iw=v$;async function $w(){let e=Iw();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 Pw=q(Nw()),Pc=Pw.default.bold("@seed-design/codemod"),Mw=e=>({event:t,properties:r})=>console.log(Pc,t,r,e);var Uw=(0,Ro.resolve)(__dirname,"transforms"),jw=Vc(),Oo=Fw(),hn=null,Gw=null;function R$(){$w().then(e=>{Gw=e,hn=Mw({...e}),k$(hn)})}function k$(e){C$(),jw.version(Oo.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=Pg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=$$();s.list&&(Mc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Mc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Mc(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,Ro.resolve)(Uw,t,"index.js");console.log(Pc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await I$(i,t,r,s)}),jw.parse()}function C$(){(0,ko.satisfies)(process.versions.node,Oo.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Oo.engines.node}"
|
|
55
|
+
if (condition) { yield value; }`)};var tp=require("node:buffer"),rp=require("node:string_decoder");var ms=(e,t,r)=>{if(r)return;if(e)return{transform:DE.bind(void 0,new TextEncoder)};let n=new rp.StringDecoder(t);return{transform:LE.bind(void 0,n),final:NE.bind(void 0,n)}},DE=function*(e,t){tp.Buffer.isBuffer(t)?yield Ke(t):typeof t=="string"?yield e.encode(t):yield t},LE=function*(e,t){yield K(t)?e.write(t):t},NE=function*(e){let t=e.end();t!==""&&(yield t)};var Ii=require("node:util"),$i=(0,Ii.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}}),hs=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=ME}=t[r];for await(let s of n(e))yield*hs(s,t,r+1)},np=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*PE(r,Number(t),e)},PE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*hs(n,r,t+1)},sp=(0,Ii.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),ME=function*(e){yield e};var Di=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},op=(e,t)=>[...t.flatMap(r=>[..._t(r,e,0)]),...Br(e)],_t=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=jE}=t[r];for(let s of n(e))yield*_t(s,t,r+1)},Br=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*FE(r,Number(t),e)},FE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*_t(n,r,t+1)},jE=function*(e){yield e};var Li=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=ip(e,i,o),u=vt(t),l=vt(r),f=u?$i.bind(void 0,hs,a):Di.bind(void 0,_t),p=u||l?$i.bind(void 0,np,a):Di.bind(void 0,Br),d=u||l?sp.bind(void 0,a):void 0;return{stream:new Ur.Transform({writableObjectMode:n,writableHighWaterMark:(0,Ur.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,Ur.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){p([c],this,T)},destroy:d})}},gs=(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=ip(i,r,a);e=op(c,e)}return e},ip=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:Jd(n,a)},ms(r,i,n),ps(r,o,n,c),{transform:e,final:t},{transform:Qd(s,a)},Xd({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var ap=(e,t)=>{for(let r of BE(e))UE(e,r,t)},BE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),UE=(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 ${lt[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>GE(a,n));r.input=Ar(i)},GE=(e,t)=>{let r=gs(e,t,"utf8",!0);return qE(r),Ar(r)},qE=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 bs=require("node:fs");var ys=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Xt(r,n)&&!ge.has(t)&&VE(n)&&(e.some(({type:s,value:o})=>s==="native"&&zE.has(o))||e.every(({type:s})=>_e.has(s))),VE=e=>e===1||e===2,zE=new Set(["pipe","overlapped"]),cp=async(e,t,r,n)=>{for await(let s of e)WE(t)||lp(s,r,n)},up=(e,t,r)=>{for(let n of e)lp(n,t,r)},WE=e=>e._readableState.pipes.length>0,lp=(e,t,r)=>{let n=Rn(e);Be({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var fp=({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)=>HE({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},HE=({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 p=ud(e,o,f),d=Ke(p),{stdioItems:x,objectMode:T}=t[r],P=ZE([d],x,c,n),{serializedResult:M,finalResult:j=M}=YE({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});XE({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:x,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&KE(M,x,s),Y}catch(X){return n.error=X,Y}},ZE=(e,t,r,n)=>{try{return gs(e,t,r,!1)}catch(s){return n.error=s,e}},YE=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ar(e)};let i=Kc(e,r);return n[o]?{serializedResult:i,finalResult:Ai(i,!s[o],t)}:{serializedResult:i}},XE=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!ys({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Ai(e,!1,i);try{up(a,t,n)}catch(c){r.error??=c}},KE=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ls.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,bs.appendFileSync)(n,e):(r.add(o),(0,bs.writeFileSync)(n,e))}};var dp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,et(t,r,"all")]:Array.isArray(t)?[et(e,r,"all"),...t]:K(e)&&K(t)?Lo([e,t]):`${e}${t}`};var ws=require("node:events");var pp=async(e,t)=>{let[r,n]=await JE(e);return t.isForcefullyTerminated??=!1,[r,n]},JE=async e=>{let[t,r]=await Promise.allSettled([(0,ws.once)(e,"spawn"),(0,ws.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?mp(e):r.value},mp=async e=>{try{return await(0,ws.once)(e,"exit")}catch{return mp(e)}},hp=async e=>{let[t,r]=await e;if(!QE(t,r)&&Ni(t,r))throw new Le;return[t,r]},QE=(e,t)=>e===void 0&&t===void 0,Ni=(e,t)=>e!==0||t!==null;var gp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=eT(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=cd(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},eT=(e,t,r)=>e!==void 0?e:Ni(t,r)?new Le:void 0;var bp=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=tT(e,t,r),f=sT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ir(f,c,u)},tT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=An(e,t,r),a=rT(r),{file:c,commandArguments:u,options:l}=Kn(e,t,a);nT(l);let f=Wd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},rT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,nT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&xs("ipcInput"),e&&xs("ipc: true"),r&&xs("detached: true"),n&&xs("cancelSignal")},xs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},sT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=oT({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:p,isMaxBuffer:d}=gp(c,r),{output:x,error:T=u}=fp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:o}),P=x.map((j,Y)=>et(j,r,Y)),M=et(dp(x,r),r,"all");return aT({error:T,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},oT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{ap(o,r);let a=iT(r);return(0,yp.spawnSync)(...Jn(e,t,a))}catch(a){return or({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},iT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:is(t)}),aT=({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?as({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):jr({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 Om=require("node:events"),km=require("node:child_process");var Mi=q(require("node:process"),1);var cr=require("node:events");var wp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(er({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Vn(e)}),cT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),cT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Bn(t,s);let o=ut(e,t,r),i=new AbortController;try{return await Promise.race([uT(o,n,i),lT(o,r,i),fT(o,r,i)])}catch(a){throw tr(e),a}finally{i.abort(),Un(t,s)}},uT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,cr.once)(e,"message",{signal:r});return n}for await(let[n]of(0,cr.on)(e,"message",{signal:r}))if(t(n))return n},lT=async(e,t,{signal:r})=>{await(0,cr.once)(e,"disconnect",{signal:r}),Ul(t)},fT=async(e,t,{signal:r})=>{let[n]=await(0,cr.once)(e,"strict:error",{signal:r});throw Mn(n,t)};var Gr=require("node:events");var Sp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Pi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Pi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{er({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Vn(e)}),Bn(t,o);let i=ut(e,t,r),a=new AbortController,c={};return dT(e,i,a),pT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),mT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},dT=async(e,t,r)=>{try{await(0,Gr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},pT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Gr.once)(e,"strict:error",{signal:r.signal});n.error=Mn(s,t),r.abort()}catch{}},mT=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,Gr.on)(r,"message",{signal:o.signal}))xp(i),yield c}catch{xp(i)}finally{o.abort(),Un(t,a),n||tr(e),s&&await e}},xp=({error:e})=>{if(e)throw e};var vp=(e,{ipc:t})=>{Object.assign(e,Ep(e,!1,t))},_p=()=>{let e=Mi.default,t=!0,r=Mi.default.channel!==void 0;return{...Ep(e,t,r),getCancelSignal:vf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Ep=(e,t,r)=>({sendMessage:Zn.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:wp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Sp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Tp=require("node:child_process"),ft=require("node:stream");var Op=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Oi(n);let a=new Tp.ChildProcess;hT(a,n),Object.assign(a,{readable:gT,writable:yT,duplex:bT});let c=or({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=wT(c,i,s);return{subprocess:a,promise:u}},hT=(e,t)=>{let r=qr(),n=qr(),s=qr(),o=Array.from({length:t.length-3},qr),i=qr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},qr=()=>{let e=new ft.PassThrough;return e.end(),e},gT=()=>new ft.Readable({read(){}}),yT=()=>new ft.Writable({write(){}}),bT=()=>new ft.Duplex({read(){},write(){}}),wT=async(e,t,r)=>ir(e,t,r);var ur=require("node:fs"),Rp=require("node:buffer"),ze=require("node:stream");var Cp=(e,t)=>ds(xT,e,t,!1),Vr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${lt[e]}.`)},kp={fileNumber:Vr,generator:Li,asyncGenerator:Li,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(){}},xT={input:{...kp,fileUrl:({value:e})=>({stream:(0,ur.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,ur.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(Rp.Buffer.from(e))})},output:{...kp,fileUrl:({value:e})=>({stream:(0,ur.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,ur.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ze.Writable.fromWeb(e)}),iterable:Vr,asyncIterable:Vr,string:Vr,uint8Array:Vr}};var zr=require("node:events"),vs=require("node:stream"),Bi=require("node:stream/promises");function Et(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)ji(s);let t=e.some(({readableObjectMode:s})=>s),r=ST(e,t),n=new Fi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var ST=(e,t)=>{if(e.length===0)return(0,vs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Fi=class extends vs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(ji(t),this.#t.has(t))return;this.#t.add(t),this.#n??=vT(this,this.#t,this.#o);let r=TT({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(ji(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)}},vT=async(e,t,r)=>{Ss(e,Ap);let n=new AbortController;try{await Promise.race([_T(e,n),ET(e,t,r,n)])}finally{n.abort(),Ss(e,-Ap)}},_T=async(e,{signal:t})=>{try{await(0,Bi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw $p(e,r),r}},ET=async(e,t,r,{signal:n})=>{for await(let[s]of(0,zr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},ji=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},TT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{Ss(e,Ip);let a=new AbortController;try{await Promise.race([OT(o,t,a),kT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),RT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),Ss(e,-Ip)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Ui(e):CT(e))},OT=async(e,t,{signal:r})=>{try{await e,r.aborted||Ui(t)}catch(n){r.aborted||$p(t,n)}},kT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Bi.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;Dp(i)?s.add(t):Lp(e,i)}},RT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,zr.once)(e,s,{signal:o}),!e.readable)return(0,zr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},CT=e=>{e.writable&&e.end()},$p=(e,t)=>{Dp(t)?Ui(e):Lp(e,t)},Dp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",Ui=e=>{(e.readable||e.writable)&&e.destroy()},Lp=(e,t)=>{e.destroyed||(e.once("error",AT),e.destroy(t))},AT=()=>{},Ss=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Ap=2,Ip=1;var Gi=require("node:stream/promises");var lr=(e,t)=>{e.pipe(t),IT(e,t),$T(e,t)},IT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Gi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}qi(t)}},qi=e=>{e.writable&&e.end()},$T=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Gi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Vi(e)}},Vi=e=>{e.readable&&e.destroy()};var Np=(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})=>_e.has(c)))DT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!_e.has(c)))NT({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]:Et(o);lr(i,s)}},DT=(e,t,r,n)=>{r==="output"?lr(e.stdio[n],t):lr(t,e.stdio[n]);let s=LT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},LT=["stdin","stdout","stderr"],NT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;PT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},PT=(e,{signal:t})=>{De(e)&&xt(e,MT,t)},MT=2;var Mp=require("node:events");var Tt=[];Tt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Tt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Tt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var _s=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",zi=Symbol.for("signal-exit emitter"),Wi=globalThis,FT=Object.defineProperty.bind(Object),Hi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Wi[zi])return Wi[zi];FT(Wi,zi,{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}},Es=class{},jT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Zi=class extends Es{onExit(){return()=>{}}load(){}unload(){}},Yi=class extends Es{#t=Xi.platform==="win32"?"SIGINT":"SIGHUP";#r=new Hi;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Tt)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(!_s(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 Tt)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,Tt.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 _s(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"&&_s(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)}},Xi=globalThis.process,{onExit:Pp,load:Lj,unload:Nj}=jT(_s(Xi)?new Yi(Xi):new Zi);var Fp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Pp(()=>{e.kill()});(0,Mp.addAbortListener)(n,()=>{s()})};var Bp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Cn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=BT(r,n,s),{sourceStream:f,sourceError:p}=GT(e,u),{options:d,fileDescriptors:x}=Ge.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:x,startTime:o}},BT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=UT(e,t,...r),a=jn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},UT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(jp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||$o(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]=yn(r,...n);return{destination:t(jp)(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}`)},jp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),GT=(e,t)=>{try{return{sourceStream:rr(e,t)}}catch(r){return{sourceError:r}}};var Gp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=qT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw Ki({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},qT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Vi(e),n;if(t!==void 0)return qi(r),t},Ki=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>or({error:e,command:Up,escapedCommand:Up,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Up="source.pipe(destination)";var qp=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 Vp=require("node:stream/promises");var zp=(e,t,r)=>{let n=Ts.has(t)?zT(e,t):VT(e,t);return xt(e,HT,r.signal),xt(t,ZT,r.signal),WT(t),n},VT=(e,t)=>{let r=Et([e]);return lr(r,t),Ts.set(t,r),r},zT=(e,t)=>{let r=Ts.get(t);return r.add(e),r},WT=async e=>{try{await(0,Vp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Ts.delete(e)},Ts=new WeakMap,HT=2,ZT=1;var Wp=require("node:util");var Hp=(e,t)=>e===void 0?[]:[YT(e,t)],YT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Wp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw Ki({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Os=(e,...t)=>{if(W(t[0]))return Os.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=Bp(e,...t),s=XT({...n,destination:r});return s.pipe=Os.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},XT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=KT(e,s);Gp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let p=zp(t,o,f);return await Promise.race([qp(l),...Hp(a,{sourceStream:t,mergedStream:p,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},KT=(e,t)=>Promise.allSettled([e,t]);var Jp=require("node:timers/promises");var Yp=require("node:events"),Xp=require("node:stream");var ks=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return JT(t,i),Kp({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},JT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Ji=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;QT(t,i,e);let a=e.readableObjectMode&&!o;return Kp({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},QT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Kp=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,Yp.on)(e,"data",{signal:t.signal,highWaterMark:Zp,highWatermark:Zp});return e0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},Qi=(0,Xp.getDefaultHighWaterMark)(!0),Zp=Qi,e0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=t0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*_t(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Br(a)}},t0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[ms(e,r,!t),ps(e,s,!n,{})].filter(Boolean);var Qp=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=r0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([n0(e),f]);return}let p=Ri(c,r),d=Ji({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:p,allMixed:a}),[x]=await Promise.all([s0({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return x},r0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!ys({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=Ji({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await cp(a,e,r,o)},n0=async e=>{await(0,Jp.setImmediate)(),e.readableFlowing===null&&e.resume()},s0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await rs(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await ns(r,{maxBuffer:o})):await os(r,{maxBuffer:o})}catch(a){return em(od({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},ea=async e=>{try{return await e}catch(t){return em(t)}},em=({bufferedData:e})=>Yc(e)?new Uint8Array(e):e;var rm=require("node:stream/promises"),Wr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=o0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,rm.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||c0(a,t,r,n)}finally{i.abort()}},o0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&i0(e,r,n),n},i0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{a0(t,r),n.call(e,...s)}},a0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},c0=(e,t,r,n)=>{if(!u0(e,t,r,n))throw e},u0=(e,t,r,n=!0)=>r.propagating?tm(e)||Rs(e):(r.propagating=!0,ta(r,t)===n?tm(e):Rs(e)),ta=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Rs=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",tm=e=>(e==null?void 0:e.code)==="EPIPE";var nm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>ra({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),ra=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=Wr(e,t,u);if(ta(u,t)){await l;return}let[f]=await Promise.all([Qp({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 sm=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Et([e,t].filter(Boolean)):void 0,om=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>ra({...l0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:f0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),l0=({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}},f0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var lm=require("node:events");var im=e=>Xt(e,"ipc"),am=(e,t)=>{let r=Rn(e);Be({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var cm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=im(o),a=Je(t,"ipc"),c=Je(r,"ipc");for await(let u of Pi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(id(e,s,c),s.push(u)),i&&am(u,o);return s},um=async(e,t)=>(await Promise.allSettled([e]),t);var fm=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:p,verboseInfo:d,fileDescriptors:x,originalStreams:T,onInternalError:P,controller:M})=>{let j=pp(e,p),Y={originalStreams:T,fileDescriptors:x,subprocess:e,exitPromise:j,propagating:!1},X=nm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),xe=om({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),ue=[],Ae=cm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ue,verboseInfo:d}),Ie=d0(T,e,Y),Se=p0(x,Y);try{return await Promise.race([Promise.all([{},hp(j),Promise.all(X),xe,Ae,Df(e,f),...Ie,...Se]),P,m0(e,M),...Rf(e,o,p,M),...Bl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:p,controller:M}),...Tf({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:M})])}catch(Cr){return p.terminationReason??="other",Promise.all([{error:Cr},j,Promise.all(X.map(wt=>ea(wt))),ea(xe),um(Ae,ue),Promise.allSettled(Ie),Promise.allSettled(Se)])}},d0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Wr(n,s,r)),p0=(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})=>Wr(i,n,t,{isSameDirection:_e.has(s),stopOnExit:s==="native"}))),m0=async(e,{signal:t})=>{let[r]=await(0,lm.once)(e,"error",{signal:t});throw r};var dm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Hr=(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}},fr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var mm=require("node:stream"),hm=require("node:util");var na=require("node:stream/promises");var sa=async e=>{if(e!==void 0)try{await oa(e)}catch{}},pm=async e=>{if(e!==void 0)try{await ia(e)}catch{}},oa=async e=>{await(0,na.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ia=async e=>{await(0,na.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Cs=async(e,t)=>{if(await e,t)throw t},As=(e,t,r)=>{r&&!Rs(r)?e.destroy(r):t&&e.destroy()};var gm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||ge.has(r),{subprocessStdout:a,waitReadableDestroy:c}=aa(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=ca(a,i),{read:p,onStdoutDataDone:d}=ua({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),x=new mm.Readable({read:p,destroy:(0,hm.callbackify)(fa.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return la({subprocessStdout:a,onStdoutDataDone:d,readable:x,subprocess:e}),x},aa=(e,t,r)=>{let n=rr(e,t),s=Hr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},ca=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Qi},ua=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Ue(),i=ks({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){h0(this,i,o)},onStdoutDataDone:o}},h0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},la=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await ia(e),await n,await sa(s),await t,r.readable&&r.push(null)}catch(o){await sa(s),ym(r,o)}},fa=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await fr(r,t)&&(ym(e,n),await Cs(t,n))},ym=(e,t)=>{As(e,e.readable,t)};var bm=require("node:stream"),da=require("node:util");var wm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=pa(e,r,t),i=new bm.Writable({...ma(n,e,s),destroy:(0,da.callbackify)(ga.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return ha(n,i),i},pa=(e,t,r)=>{let n=jn(e,t),s=Hr(r,n,"writableFinal"),o=Hr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},ma=(e,t,r)=>({write:g0.bind(void 0,e),final:(0,da.callbackify)(y0.bind(void 0,e,t,r))}),g0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},y0=async(e,t,r)=>{await fr(r,t)&&(e.writable&&e.end(),await t)},ha=async(e,t,r)=>{try{await oa(e),t.writable&&t.end()}catch(n){await pm(r),xm(t,n)}},ga=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await fr(r,t),await fr(n,t)&&(xm(e,s),await Cs(t,s))},xm=(e,t)=>{As(e,e.writable,t)};var Sm=require("node:stream"),vm=require("node:util");var _m=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||ge.has(r),{subprocessStdout:c,waitReadableDestroy:u}=aa(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:p}=pa(e,s,t),{readableEncoding:d,readableObjectMode:x,readableHighWaterMark:T}=ca(c,a),{read:P,onStdoutDataDone:M}=ua({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Sm.Duplex({read:P,...ma(l,e,f),destroy:(0,vm.callbackify)(b0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:x,writableObjectMode:l.writableObjectMode,encoding:d});return la({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),ha(l,j,c),j},b0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([fa({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),ga({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var ya=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||ge.has(t),i=rr(e,r),a=ks({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return w0(a,i,e)},w0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Em=(e,{encoding:t})=>{let r=dm();e.readable=gm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=wm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_m.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=ya.bind(void 0,e,t),e[Symbol.asyncIterator]=ya.bind(void 0,e,t,{})};var Tm=(e,t)=>{for(let[r,n]of S0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},x0=(async()=>{})().constructor.prototype,S0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(x0,e)]);var Rm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=v0(e,t,r),{subprocess:p,promise:d}=E0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return p.pipe=Os.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),Tm(p,d),Ge.set(p,{options:l,fileDescriptors:f}),p},v0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=An(e,t,r),{file:a,commandArguments:c,options:u}=Kn(e,t,r),l=_0(u),f=Cp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},_0=({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}},E0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,km.spawn)(...Jn(e,t,r))}catch(x){return Op({error:x,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Om.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Np(c,a,u),Fp(c,r,u);let f={},p=Ue();c.kill=Ml.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:u}),c.all=sm(c,r),Em(c,r),vp(c,r);let d=T0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:p,controller:u});return{subprocess:c,promise:d}},T0=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,[p,d],x,T,P]=await fm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=x.map((X,xe)=>et(X,t,xe)),j=et(T,t,"all"),Y=O0({errorInfo:f,exitCode:p,signal:d,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ir(Y,n,t)},O0=({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?jr({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}):as({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Is=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,k0(n,e[n],s)]));return{...e,...r}},k0=(e,t,r)=>R0.has(e)&&W(t)&&W(r)?{...t,...r}:r,R0=new Set(["env",...Mo]);var dt=(e,t,r,n)=>{let s=(i,a,c)=>dt(i,a,r,c),o=(...i)=>C0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},C0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Is(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=A0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?bp(a,c,u):Rm(a,c,u,s)},A0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=ru(t)?nu(t,r):[t,...r],[i,a,c]=yn(...o),u=Is(Is(n,s),c),{file:l=i,commandArguments:f=a,options:p=u,isSync:d=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:p,isSync:d}};var Cm=({file:e,commandArguments:t})=>Im(e,t),Am=({file:e,commandArguments:t})=>({...Im(e,t),isSync:!0}),Im=(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]=I0(e);return{file:r,commandArguments:n}},I0=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($0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},$0=/ +/g;var $m=(e,t,r)=>{e.sync=t(D0,r),e.s=e.sync},Dm=({options:e})=>Lm(e),D0=({options:e})=>({...Lm(e),isSync:!0}),Lm=e=>({options:{...L0(e),...e}}),L0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Nm={preferLocal:!0};var Pm=dt(()=>({})),aG=dt(()=>({isSync:!0})),cG=dt(Cm),uG=dt(Am),lG=dt(Cf),fG=dt(Dm,{},Nm,$m),{sendMessage:dG,getOneMessage:pG,getEachMessage:mG,getCancelSignal:hG}=_p();var Uw=require("fs"),Oo=require("path"),ko=q(Tg());var Fe={};mx(Fe,{BRAND:()=>tC,DIRTY:()=>kt,EMPTY_PATH:()=>DR,INVALID:()=>O,NEVER:()=>jC,OK:()=>se,ParseStatus:()=>te,Schema:()=>L,ZodAny:()=>ht,ZodArray:()=>st,ZodBigInt:()=>Ct,ZodBoolean:()=>At,ZodBranded:()=>rn,ZodCatch:()=>Ut,ZodDate:()=>It,ZodDefault:()=>Bt,ZodDiscriminatedUnion:()=>Ws,ZodEffects:()=>Re,ZodEnum:()=>Ft,ZodError:()=>le,ZodFirstPartyTypeKind:()=>R,ZodFunction:()=>Zs,ZodIntersection:()=>Nt,ZodIssueCode:()=>m,ZodLazy:()=>Pt,ZodLiteral:()=>Mt,ZodMap:()=>br,ZodNaN:()=>xr,ZodNativeEnum:()=>jt,ZodNever:()=>Me,ZodNull:()=>Dt,ZodNullable:()=>Ye,ZodNumber:()=>Rt,ZodObject:()=>fe,ZodOptional:()=>Oe,ZodParsedType:()=>b,ZodPipeline:()=>nn,ZodPromise:()=>gt,ZodReadonly:()=>Gt,ZodRecord:()=>Hs,ZodSchema:()=>L,ZodSet:()=>wr,ZodString:()=>mt,ZodSymbol:()=>gr,ZodTransformer:()=>Re,ZodTuple:()=>Ze,ZodType:()=>L,ZodUndefined:()=>$t,ZodUnion:()=>Lt,ZodUnknown:()=>nt,ZodVoid:()=>yr,addIssueToContext:()=>y,any:()=>lC,array:()=>mC,bigint:()=>oC,boolean:()=>Pg,coerce:()=>FC,custom:()=>Dg,date:()=>iC,datetimeRegex:()=>Ig,defaultErrorMap:()=>tt,discriminatedUnion:()=>bC,effect:()=>AC,enum:()=>kC,function:()=>EC,getErrorMap:()=>pr,getParsedType:()=>He,instanceof:()=>nC,intersection:()=>wC,isAborted:()=>Vs,isAsync:()=>mr,isDirty:()=>zs,isValid:()=>pt,late:()=>rC,lazy:()=>TC,literal:()=>OC,makeIssue:()=>tn,map:()=>vC,nan:()=>sC,nativeEnum:()=>RC,never:()=>dC,null:()=>uC,nullable:()=>$C,number:()=>Ng,object:()=>hC,objectUtil:()=>Ma,oboolean:()=>MC,onumber:()=>PC,optional:()=>IC,ostring:()=>NC,pipeline:()=>LC,preprocess:()=>DC,promise:()=>CC,quotelessJson:()=>AR,record:()=>SC,set:()=>_C,setErrorMap:()=>$R,strictObject:()=>gC,string:()=>Lg,symbol:()=>aC,transformer:()=>AC,tuple:()=>xC,undefined:()=>cC,union:()=>yC,unknown:()=>fC,util:()=>N,void:()=>pC});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 Ma;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Ma||(Ma={}));var b=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 b.undefined;case"string":return b.string;case"number":return Number.isNaN(e)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(e)?b.array:e===null?b.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?b.promise:typeof Map<"u"&&e instanceof Map?b.map:typeof Set<"u"&&e instanceof Set?b.set:typeof Date<"u"&&e instanceof Date?b.date:b.object;default:return b.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"]),AR=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)if(s.path.length>0){let o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var IR=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===b.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==="bigint"?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}},tt=IR;var Og=tt;function $R(e){Og=e}function pr(){return Og}var tn=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}},DR=[];function y(e,t){let r=pr(),n=tn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===tt?void 0:tt].filter(s=>!!s)});e.common.issues.push(n)}var te=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 O;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 O;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}}},O=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),se=e=>({status:"valid",value:e}),Vs=e=>e.status==="aborted",zs=e=>e.status==="dirty",pt=e=>e.status==="valid",mr=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 ke=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}},kg=(e,t)=>{if(pt(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 te,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(mr(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 kg(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 pt(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=>pt(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(mr(s)?s:Promise.resolve(s));return kg(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:R.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 Oe.create(this,this._def)}nullable(){return Ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return st.create(this)}promise(){return gt.create(this,this._def)}or(t){return Lt.create([this,t],this._def)}and(t){return Nt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:R.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Bt({...$(this._def),innerType:this,defaultValue:r,typeName:R.ZodDefault})}brand(){return new rn({typeName:R.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,catchValue:r,typeName:R.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return nn.create(this,t)}readonly(){return Gt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},LR=/^c[^\s-]{8,}$/i,NR=/^[0-9a-z]+$/,PR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,MR=/^[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,FR=/^[a-z0-9_-]{21}$/i,jR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,BR=/^[-+]?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)?)??$/,UR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,GR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Fa,qR=/^(?:(?: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])$/,VR=/^(?:(?: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])$/,zR=/^(([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]))$/,WR=/^(([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])$/,HR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ZR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Cg="((\\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])))",YR=new RegExp(`^${Cg}$`);function Ag(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 XR(e){return new RegExp(`^${Ag(e)}$`)}function Ig(e){let t=`${Cg}T${Ag(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 KR(e,t){return!!((t==="v4"||!t)&&qR.test(e)||(t==="v6"||!t)&&zR.test(e))}function JR(e,t){if(!jR.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let 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 QR(e,t){return!!((t==="v4"||!t)&&VR.test(e)||(t==="v6"||!t)&&WR.test(e))}var mt=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==b.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.string,received:o.parsedType}),O}let n=new te,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")UR.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")Fa||(Fa=new RegExp(GR,"u")),Fa.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")MR.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")FR.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")LR.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")NR.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")PR.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"?Ig(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"?YR.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?XR(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"?BR.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?KR(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"?JR(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"?QR(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"?HR.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?ZR.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}};mt.create=e=>new mt({checks:[],typeName:R.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function eC(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 Rt=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)!==b.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.number,received:o.parsedType}),O}let n,s=new te;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"?eC(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)}};Rt.create=e=>new Rt({checks:[],typeName:R.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var Ct=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)!==b.bigint)return this._getInvalidInput(t);let n,s=new te;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:b.bigint,received:r.parsedType}),O}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}};Ct.create=e=>new Ct({checks:[],typeName:R.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var At=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==b.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.boolean,received:n.parsedType}),O}return se(t.data)}};At.create=e=>new At({typeName:R.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var It=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==b.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.date,received:o.parsedType}),O}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),O}let n=new te,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}};It.create=e=>new It({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:R.ZodDate,...$(e)});var gr=class extends L{_parse(t){if(this._getType(t)!==b.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.symbol,received:n.parsedType}),O}return se(t.data)}};gr.create=e=>new gr({typeName:R.ZodSymbol,...$(e)});var $t=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.undefined,received:n.parsedType}),O}return se(t.data)}};$t.create=e=>new $t({typeName:R.ZodUndefined,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==b.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.null,received:n.parsedType}),O}return se(t.data)}};Dt.create=e=>new Dt({typeName:R.ZodNull,...$(e)});var ht=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return se(t.data)}};ht.create=e=>new ht({typeName:R.ZodAny,...$(e)});var nt=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return se(t.data)}};nt.create=e=>new nt({typeName:R.ZodUnknown,...$(e)});var Me=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:b.never,received:r.parsedType}),O}};Me.create=e=>new Me({typeName:R.ZodNever,...$(e)});var yr=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.void,received:n.parsedType}),O}return se(t.data)}};yr.create=e=>new yr({typeName:R.ZodVoid,...$(e)});var st=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==b.array)return y(r,{code:m.invalid_type,expected:b.array,received:r.parsedType}),O;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 ke(r,i,r.path,a)))).then(i=>te.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new ke(r,i,r.path,a)));return te.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)}};st.create=(e,t)=>new st({type:e,minLength:null,maxLength:null,exactLength:null,typeName:R.ZodArray,...$(t)});function hr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Oe.create(hr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof st?new st({...e._def,type:hr(e.element)}):e instanceof Oe?Oe.create(hr(e.unwrap())):e instanceof Ye?Ye.create(hr(e.unwrap())):e instanceof Ze?Ze.create(e.items.map(t=>hr(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)!==b.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:b.object,received:u.parsedType}),O}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 ke(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 ke(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,p=await l.value;u.push({key:f,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>te.mergeObjectSync(n,u)):te.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:R.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 hr(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 Oe;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return $g(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:R.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});var Lt=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}),O}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}),O}}get options(){return this._def.options}};Lt.create=(e,t)=>new Lt({options:e,typeName:R.ZodUnion,...$(t)});var rt=e=>e instanceof Pt?rt(e.schema):e instanceof Re?rt(e.innerType()):e instanceof Mt?[e.value]:e instanceof Ft?e.options:e instanceof jt?N.objectValues(e.enum):e instanceof Bt?rt(e._def.innerType):e instanceof $t?[void 0]:e instanceof Dt?[null]:e instanceof Oe?[void 0,...rt(e.unwrap())]:e instanceof Ye?[null,...rt(e.unwrap())]:e instanceof rn||e instanceof Gt?rt(e.unwrap()):e instanceof Ut?rt(e._def.innerType):[],Ws=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.object)return y(r,{code:m.invalid_type,expected:b.object,received:r.parsedType}),O;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]}),O)}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=rt(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:R.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function ja(e,t){let r=He(e),n=He(t);if(e===t)return{valid:!0,data:e};if(r===b.object&&n===b.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=ja(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===b.array&&n===b.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=ja(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===b.date&&n===b.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Nt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Vs(o)||Vs(i))return O;let a=ja(o.value,i.value);return a.valid?((zs(o)||zs(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),O)};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}))}};Nt.create=(e,t,r)=>new Nt({left:e,right:t,typeName:R.ZodIntersection,...$(r)});var Ze=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.array)return y(n,{code:m.invalid_type,expected:b.array,received:n.parsedType}),O;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"}),O;!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 ke(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>te.mergeArray(r,i)):te.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:R.ZodTuple,rest:null,...$(t)})};var Hs=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!==b.object)return y(n,{code:m.invalid_type,expected:b.object,received:n.parsedType}),O;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new ke(n,a,n.path,a)),value:i._parse(new ke(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?te.mergeObjectAsync(r,s):te.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:R.ZodRecord,...$(n)}):new e({keyType:mt.create(),valueType:t,typeName:R.ZodRecord,...$(r)})}},br=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!==b.map)return y(n,{code:m.invalid_type,expected:b.map,received:n.parsedType}),O;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new ke(n,a,n.path,[u,"key"])),value:o._parse(new ke(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 O;(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 O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};br.create=(e,t,r)=>new br({valueType:t,keyType:e,typeName:R.ZodMap,...$(r)});var wr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.set)return y(n,{code:m.invalid_type,expected:b.set,received:n.parsedType}),O;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 O;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 ke(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)}};wr.create=(e,t)=>new wr({valueType:e,minSize:null,maxSize:null,typeName:R.ZodSet,...$(t)});var Zs=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.function)return y(r,{code:m.invalid_type,expected:b.function,received:r.parsedType}),O;function n(a,c){return tn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pr(),tt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return tn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pr(),tt].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 gt){let a=this;return se(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(d=>{throw u.addIssue(n(c,d)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw u.addIssue(s(f,d)),u})})}else{let a=this;return se(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(nt.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(nt.create()),returns:r||nt.create(),typeName:R.ZodFunction,...$(n)})}},Pt=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})}};Pt.create=(e,t)=>new Pt({getter:e,typeName:R.ZodLazy,...$(t)});var Mt=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}),O}return{status:"valid",value:t.data}}get value(){return this._def.value}};Mt.create=(e,t)=>new Mt({value:e,typeName:R.ZodLiteral,...$(t)});function $g(e,t){return new Ft({values:e,typeName:R.ZodEnum,...$(t)})}var Ft=class e extends L{_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}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.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}),O}return se(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})}};Ft.create=$g;var jt=class extends L{_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==b.string&&n.parsedType!==b.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),O}return se(t.data)}get enum(){return this._def.values}};jt.create=(e,t)=>new jt({values:e,typeName:R.ZodNativeEnum,...$(t)});var gt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:b.promise,received:r.parsedType}),O;let n=r.parsedType===b.promise?r.data:Promise.resolve(r.data);return se(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gt.create=(e,t)=>new gt({type:e,typeName:R.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===R.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 O;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?O:c.status==="dirty"?kt(c.value):r.value==="dirty"?kt(c.value):c});{if(r.value==="aborted")return O;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?O: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"?O:(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"?O:(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(!pt(i))return O;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=>pt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):O);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:R.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:R.ZodEffects,...$(r)});var Oe=class extends L{_parse(t){return this._getType(t)===b.undefined?se(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Oe.create=(e,t)=>new Oe({innerType:e,typeName:R.ZodOptional,...$(t)});var Ye=class extends L{_parse(t){return this._getType(t)===b.null?se(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ye.create=(e,t)=>new Ye({innerType:e,typeName:R.ZodNullable,...$(t)});var Bt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Bt.create=(e,t)=>new Bt({innerType:e,typeName:R.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Ut=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 mr(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}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:R.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var xr=class extends L{_parse(t){if(this._getType(t)!==b.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.nan,received:n.parsedType}),O}return{status:"valid",value:t.data}}};xr.create=e=>new xr({typeName:R.ZodNaN,...$(e)});var tC=Symbol("zod_brand"),rn=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}},nn=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"?O: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"?O: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:R.ZodPipeline})}},Gt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(pt(s)&&(s.value=Object.freeze(s.value)),s);return mr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:R.ZodReadonly,...$(t)});function Rg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Dg(e,t={},r){return e?ht.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Rg(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Rg(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):ht.create()}var rC={object:fe.lazycreate},R;(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"})(R||(R={}));var nC=(e,t={message:`Input not instance of ${e.name}`})=>Dg(r=>r instanceof e,t),Lg=mt.create,Ng=Rt.create,sC=xr.create,oC=Ct.create,Pg=At.create,iC=It.create,aC=gr.create,cC=$t.create,uC=Dt.create,lC=ht.create,fC=nt.create,dC=Me.create,pC=yr.create,mC=st.create,hC=fe.create,gC=fe.strictCreate,yC=Lt.create,bC=Ws.create,wC=Nt.create,xC=Ze.create,SC=Hs.create,vC=br.create,_C=wr.create,EC=Zs.create,TC=Pt.create,OC=Mt.create,kC=Ft.create,RC=jt.create,CC=gt.create,AC=Re.create,IC=Oe.create,$C=Ye.create,DC=Re.createWithPreprocess,LC=nn.create,NC=()=>Lg().optional(),PC=()=>Ng().optional(),MC=()=>Pg().optional(),FC={string:(e=>mt.create({...e,coerce:!0})),number:(e=>Rt.create({...e,coerce:!0})),boolean:(e=>At.create({...e,coerce:!0})),bigint:(e=>Ct.create({...e,coerce:!0})),date:(e=>It.create({...e,coerce:!0}))};var jC=O;var Mg=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 Ay=require("node:buffer"),po=q(Xg(),1),uo=q(qa(),1),xb=require("child_process"),nw=q(za(),1),mw=require("node:path"),Tr=q(za(),1),Iw=require("node:events"),fc=Object.defineProperty,gA=Object.getOwnPropertyDescriptor,dc=Object.getOwnPropertyNames,yA=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[dc(e)[0]])(e=0)),t},bA=(e,t)=>function(){return t||(0,e[dc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)fc(e,r,{get:t[r],enumerable:!0})},wA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of dc(t))!yA.call(e,s)&&s!==r&&fc(e,s,{get:()=>t[s],enumerable:!(n=gA(t,s))||n.enumerable});return e},V=e=>wA(fc({},"__esModule",{value:!0}),e);function xA(...e){let t=new String(e);return fo.set(t,e),t}function io(e){return e instanceof String&&fo.has(e)}function Kg(e){return fo.get(e)||[]}var fo,cn=g({"src/lib/args/pathspec.ts"(){"use strict";fo=new WeakMap}}),it,bt=g({"src/lib/errors/git-error.ts"(){"use strict";it=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),un,kr=g({"src/lib/errors/git-response-error.ts"(){"use strict";bt(),un=class extends it{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Ry,Cy=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";bt(),Ry=class extends it{constructor(e){super(void 0,e)}}}});function Iy(e){return typeof e!="function"?Ht:e}function $y(e){return typeof e=="function"&&e!==Ht}function Dy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Ly(e,t=0){return Ny(e)&&e.length>t?e[t]:void 0}function Wt(e,t=0){if(Ny(e)&&e.length>t)return e[e.length-1-t]}function Ny(e){return yo(e)}function ln(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 pc(e,t){return ln(e,!0).map(r=>t(r))}function mc(e){return(0,po.exists)(e,po.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Py(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function mo(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 My(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Rr(e){return Xe(e).map(t=>t instanceof String?t:String(t))}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function on(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function an(e){return(Array.isArray(e)?Ay.Buffer.concat(e):e).toString("utf-8")}function Fy(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function Ja(e=0){return new Promise(t=>setTimeout(t,e))}function Qa(e){if(e!==!1)return e}var Or,Ht,fn,ho=g({"src/lib/utils/util.ts"(){"use strict";hc(),Or="\0",Ht=()=>{},fn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function we(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function ec(e,t){let r=io(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function go(e){return!!e&&fn(e)==="[object Object]"}function jy(e){return typeof e=="function"}var dn,By,ee,ao,yo,hc=g({"src/lib/utils/argument-filters.ts"(){"use strict";cn(),ho(),dn=e=>Array.isArray(e),By=e=>typeof e=="number",ee=e=>typeof e=="string",ao=e=>ee(e)||Array.isArray(e)&&e.every(ee),yo=e=>e==null||"number|boolean|function".includes(typeof e)?!1:typeof e.length=="number"}}),tc,SA=g({"src/lib/utils/exit-codes.ts"(){"use strict";tc=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(tc||{})}}),co,vA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";co=class Uy{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new Uy(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function _A(){throw new Error("LineParser:useMatches not implemented")}var A,yt,EA=g({"src/lib/utils/line-parser.ts"(){"use strict";A=class{constructor(e,t){this.matches=[],this.useMatches=_A,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)}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))}},yt=class extends A{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 Gy(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...qy},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var qy,TA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";qy={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function gc(e,t=[]){return go(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];if(io(s))r.push(s);else if(ec(s,["boolean"]))r.push(n+"="+s);else if(Array.isArray(s))for(let o of s)ec(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function pe(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 gc(yc(e),n),r||n.push(...OA(e)),n}function OA(e){let t=typeof Wt(e)=="function";return Rr(we(Wt(e,t?1:0),dn,[]))}function yc(e){let t=jy(Wt(e));return we(Wt(e,t?1:0),go)}function z(e,t=!0){let r=Iy(Wt(e));return t||$y(r)?r:void 0}var kA=g({"src/lib/utils/task-options.ts"(){"use strict";hc(),ho(),cn()}});function rc(e,t){return e(t.stdOut,t.stdErr)}function he(e,t,r,n=!0){return Xe(r).forEach(s=>{for(let o=ln(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 RA=g({"src/lib/utils/task-parser.ts"(){"use strict";ho()}}),Vy={};Z(Vy,{ExitCodes:()=>tc,GitOutputStreams:()=>co,LineParser:()=>A,NOOP:()=>Ht,NULL:()=>Or,RemoteLineParser:()=>yt,append:()=>F,appendTaskOptions:()=>gc,asArray:()=>Xe,asCamelCase:()=>My,asFunction:()=>Iy,asNumber:()=>U,asStringArray:()=>Rr,bufferToString:()=>an,callTaskParser:()=>rc,createInstanceConfig:()=>Gy,delay:()=>Ja,filterArray:()=>dn,filterFunction:()=>jy,filterHasLength:()=>yo,filterNumber:()=>By,filterPlainObject:()=>go,filterPrimitives:()=>ec,filterString:()=>ee,filterStringOrStringArray:()=>ao,filterType:()=>we,first:()=>Ly,folderExists:()=>mc,forEachLineWithContent:()=>pc,getTrailingOptions:()=>pe,including:()=>Py,isUserFunction:()=>$y,last:()=>Wt,objectToString:()=>fn,orVoid:()=>Qa,parseStringResponse:()=>he,pick:()=>Fy,prefixedArray:()=>on,remove:()=>mo,splitOn:()=>Dy,toLinesWithContent:()=>ln,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>yc});var C=g({"src/lib/utils/index.ts"(){"use strict";hc(),SA(),vA(),EA(),TA(),kA(),RA(),ho()}}),zy={};Z(zy,{CheckRepoActions:()=>nc,checkIsBareRepoTask:()=>Hy,checkIsRepoRootTask:()=>Wy,checkIsRepoTask:()=>CA});function CA(e){switch(e){case"bare":return Hy();case"root":return Wy()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:bo,parser:bc}}function Wy(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:bo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Hy(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:bo,parser:bc}}function AA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var nc,bo,bc,Zy=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),nc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(nc||{}),bo=({exitCode:e},t,r,n)=>{if(e===128&&AA(t))return r(Buffer.from("false"));n(t)},bc=e=>e.trim()==="true"}});function IA(e,t){let r=new Yy(e),n=e?Ky:Xy;return ln(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(Jy.test(o)?r.folders:r.files).push(o)}),r}var Yy,Xy,Ky,Jy,$A=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),Yy=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Xy=/^[a-z]+\s*/i,Ky=/^[a-z]+\s+[a-z]+\s*/i,Jy=/\/$/}}),sc={};Z(sc,{EMPTY_COMMANDS:()=>wo,adhocExecTask:()=>Qy,configurationErrorTask:()=>me,isBufferTask:()=>tb,isEmptyTask:()=>rb,straightThroughBufferTask:()=>eb,straightThroughStringTask:()=>ce});function Qy(e){return{commands:wo,format:"empty",parser:e}}function me(e){return{commands:wo,format:"empty",parser(){throw typeof e=="string"?new Ry(e):e}}}function ce(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function eb(e){return{commands:e,format:"buffer",parser(t){return t}}}function tb(e){return e.format==="buffer"}function rb(e){return e.format==="empty"||!e.commands.length}var wo,H=g({"src/lib/tasks/task.ts"(){"use strict";Cy(),wo=[]}}),nb={};Z(nb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>wc,CONFIG_ERROR_MODE_REQUIRED:()=>xc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Sc,CleanOptions:()=>ro,cleanTask:()=>sb,cleanWithOptionsTask:()=>DA,isCleanOptionsArray:()=>LA});function DA(e,t){let{cleanMode:r,options:n,valid:s}=NA(e);return r?s.options?(n.push(...t),n.some(FA)?me(wc):sb(r,n)):me(Sc+JSON.stringify(e)):me(xc)}function sb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return IA(e==="n",n)}}}function LA(e){return Array.isArray(e)&&e.every(t=>vc.has(t))}function NA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{PA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&MA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function PA(e){return e==="f"||e==="n"}function MA(e){return/^-[a-z]$/i.test(e)&&vc.has(e.charAt(1))}function FA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var wc,xc,Sc,ro,vc,ob=g({"src/lib/tasks/clean.ts"(){"use strict";$A(),C(),H(),wc="Git clean interactive mode is not supported",xc='Git clean mode parameter ("n" or "f") is required',Sc="Git clean unknown option found in: ",ro=(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))(ro||{}),vc=new Set(["i",...Rr(Object.values(ro))])}});function jA(e){let t=new ab;for(let r of ib(e))t.addValue(r.file,String(r.key),r.value);return t}function BA(e,t){let r=null,n=[],s=new Map;for(let o of ib(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 UA(e){return e.replace(/^(file):/,"")}function*ib(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=UA(r[n++]),i=r[n++],a=t;if(i.includes(`
|
|
57
|
+
`)){let c=Dy(i,`
|
|
58
|
+
`);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var ab,GA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),ab=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=Wt(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);Object.hasOwn(n,t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Wa(e,t){return typeof e=="string"&&Object.hasOwn(oc,e)?e:t}function qA(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 VA(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 BA(n,e)}}}function zA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return jA(r)}}}function WA(){return{addConfig(e,t,...r){return this._runTask(qA(e,t,r[0]===!0,Wa(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(VA(e,Wa(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(zA(Wa(e[0],void 0)),z(arguments))}}}var oc,cb=g({"src/lib/tasks/config.ts"(){"use strict";GA(),C(),oc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(oc||{})}});function HA(e){return ub.has(e)}var Ha,ub,lb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ha=(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))(Ha||{}),ub=new Set(Object.values(Ha))}});function ZA(...e){return new db().param(...e)}function YA(e){let t=new Set,r={};return pc(e,n=>{let[s,o,i]=n.split(Or);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function XA(){return{grep(e){let t=z(arguments),r=pe(arguments);for(let s of fb)if(r.includes(s))return this._runTask(me(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=ZA().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return YA(s)}},t)}}}var fb,sn,Jg,db,pb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),fb=["-h"],sn=Symbol("grepQuery"),db=class{constructor(){this[Jg]=[]}*[(Jg=sn,Symbol.iterator)](){for(let e of this[sn])yield e}and(...e){return e.length&&this[sn].push("--and","(",...on(e,"-e"),")"),this}param(...e){return this[sn].push(...on(e,"-e")),this}}}}),mb={};Z(mb,{ResetMode:()=>no,getResetMode:()=>JA,resetTask:()=>KA});function KA(e,t){let r=["reset"];return hb(e)&&r.push(`--${e}`),r.push(...t),ce(r)}function JA(e){if(hb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function hb(e){return typeof e=="string"&&gb.includes(e)}var no,gb,yb=g({"src/lib/tasks/reset.ts"(){"use strict";C(),H(),no=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(no||{}),gb=Rr(Object.values(no))}});function QA(){return(0,uo.default)("simple-git")}function Qg(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 eI(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 _c(e,t,r,n=QA()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=eI(we(t,ee),i,n);return u(r);function c(l,f){return F(o,_c(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",p=i&&Qg(i,f)||Ht,d=Qg(n,`${s} ${f}`,p);return Object.assign(i?p:d,{label:e,sibling:c,info:d,step:u})}}var bb=g({"src/lib/git-logger.ts"(){"use strict";C(),uo.default.formatters.L=e=>String(yo(e)?e.length:"-"),uo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):fn(e)}}),wb,tI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var e;bt(),bb(),wb=(e=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=e.getName(r.commands[0]),s=_c(this.logLabel,n);return{task:r,logger:s,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:s}]of Array.from(this._queue.entries()))n===r.task?(s.info("Failed %o",r),s("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):s.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new it(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting task"),n}static getName(r="empty"){return`task:${r}:${++e.counter}`}},e.counter=0,e)}});function zt(e,t){return{method:Ly(e.commands)||"",commands:t}}function rI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function ey(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var ic,nI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";bt(),H(),C(),tI(),ic=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new wb}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))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return await(rb(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 it?Object.assign(t,{task:e}):new it(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",zt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],zt(e,e.commands)),s=await this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=await this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),tb(e)?rc(e.parser,o):rc(e.parser,o.asStrings())}async attemptEmptyTask(e,t){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},{...zt(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",fn(f)),c(new co(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 co(Buffer.concat(i),Buffer.concat(a)))})}async gitResponse(e,t,r,n,s){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},zt(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,{...zt(e,r),kill(p){l=p||l}});let f=(0,xb.spawn)(t,r,i);f.stdout.on("data",ey(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",ey(u,"stdErr",s,o.step("stdErr"))),f.on("error",rI(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,{...zt(e,r),spawned:f,close(p,d){a({stdOut:c,stdErr:u,exitCode:p,rejection:l||d})},kill(p){f.killed||(l=p,f.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...zt(e,t),kill(n){r=n||r}}),r}}}}),Sb={};Z(Sb,{GitExecutor:()=>vb});var vb,sI=g({"src/lib/runners/git-executor.ts"(){"use strict";nI(),vb=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new ic(this,this._scheduler,this._plugins)}chain(){return new ic(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function oI(e,t,r=Ht){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof un?iI(o):o,void 0)};t.then(n,s)}function iI(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=Ht};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 aI=g({"src/lib/task-callback.ts"(){"use strict";kr(),C()}});function ty(e,t){return Qy(r=>{if(!mc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var cI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function Za(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=mo(t,"-B")),ce(t)}function uI(){return{checkout(){return this._runTask(Za(pe(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Za(["-b",e,t,...pe(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Za(["-b",e,...pe(arguments)]),z(arguments))}}}var lI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function fI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function dI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return he(fI(),[_b],e)}})}}}var _b,pI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),_b=new A(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=My(t);Object.hasOwn(e,n)&&(e[n]=U(r))})}});function mI(e){return he({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Eb,e)}var Eb,hI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Eb=[new A(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new A(/\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 A(/(\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 A(/^(\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 gI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...on(e,"-m"),...t,...r],format:"utf-8",parser:mI}}function yI(){return{commit(t,...r){let n=z(arguments),s=e(t)||gI(Xe(t),Xe(we(r[0],ao,[])),[...Rr(we(r[1],dn,[])),...pe(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!ao(t)&&me("git.commit: requires the commit message to be supplied as a string/string[]")}}var bI=g({"src/lib/tasks/commit.ts"(){"use strict";hI(),C(),H()}});function wI(){return{firstCommit(){return this._runTask(ce(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var xI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function SI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ce(r,!0)}var vI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function _I(e,t,r){let n=String(r).trim(),s;if(s=Tb.exec(n))return new so(e,t,!1,s[1]);if(s=Ob.exec(n))return new so(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new so(e,t,/^re/i.test(n),o)}var so,Tb,Ob,EI=g({"src/lib/responses/InitSummary.ts"(){"use strict";so=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Tb=/^Init.+ repository in (.+)$/,Ob=/^Rein.+ in (.+)$/}});function TI(e){return e.includes(Ec)}function OI(e=!1,t,r){let n=["init",...r];return e&&!TI(n)&&n.splice(1,0,Ec),{commands:n,format:"utf-8",parser(s){return _I(n.includes("--bare"),t,s)}}}var Ec,kI=g({"src/lib/tasks/init.ts"(){"use strict";EI(),Ec="--bare"}});function Tc(e){for(let t=0;t<e.length;t++){let r=Oc.exec(e[t]);if(r)return`--${r[1]}`}return""}function RI(e){return Oc.test(e)}var Oc,pn=g({"src/lib/args/log-format.ts"(){"use strict";Oc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),kb,CI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";kb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Rb(e=""){let t=Cb[e];return r=>he(new kb,t,r,!1)}var Ya,ry,ny,sy,Cb,Ab=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";pn(),CI(),lb(),C(),Ya=[new A(/^(.+)\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 A(/^(.+) \|\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 A(/(\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])})],ry=[new A(/(\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 A(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],ny=[new A(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],sy=[new A(/([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:Qa(HA(t)&&t),from:Qa(!!o&&n!==o&&n),similarity:U(r)})})],Cb={"":Ya,"--stat":Ya,"--numstat":ry,"--name-status":sy,"--name-only":ny}}});function AI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Ib(e=Cc,t=$b,r=""){let n=Rb(r);return function(s){let o=ln(s.trim(),!1,kc).map(function(i){let a=i.split(Rc),c=AI(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 kc,Rc,Cc,$b,Db=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Ab(),pn(),kc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Rc=" \xF2\xF2",Cc=" \xF2 ",$b=["hash","date","message","refs","author_name","author_email"]}}),Lb={};Z(Lb,{diffSummaryTask:()=>II,validateLogFormatConfig:()=>xo});function II(e){let t=Tc(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),xo(r)||{commands:r,format:"utf-8",parser:Rb(t)}}function xo(e){let t=e.filter(RI);if(t.length>1)return me(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return me(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Ac=g({"src/lib/tasks/diff.ts"(){"use strict";pn(),Ab(),H()}});function $I(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function DI(e){return Object.keys(e).reduce((t,r)=>(r in ac||(t[r]=e[r]),t),{})}function Nb(e={},t=[]){let r=we(e.splitter,ee,Cc),n=go(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]=$I(n,r),i=[],a=[`--pretty=format:${kc}${o}${Rc}`,...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 ee(e.file)&&a.push("--follow",xA(e.file)),gc(DI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function LI(e,t,r){let n=Ib(e,t,Tc(r));return{commands:["log",...r],format:"utf-8",parser:n}}function NI(){return{log(...r){let n=z(arguments),s=Nb(yc(arguments),Rr(we(arguments[0],dn,[]))),o=t(...r)||xo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return LI(r.splitter,r.fields,r.commands)}function t(r,n){return ee(r)&&ee(n)&&me("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var ac,Pb=g({"src/lib/tasks/log.ts"(){"use strict";pn(),cn(),Db(),C(),H(),Ac(),ac=(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))(ac||{})}}),oo,Mb,PI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";oo=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Mb=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"}}}}),cc,Fb,MI=g({"src/lib/responses/PullSummary.ts"(){"use strict";cc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Fb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Xa(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 oy(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 jb,FI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),jb=[new yt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Xa(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Xa(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=Xa(e.remoteMessages);s.total=oy(t),s.reused=oy(r),s.packReused=U(n)})]}});function Bb(e,t){return he({remoteMessages:new Gb},Ub,t)}var Ub,Gb,qb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),FI(),Ub=[new yt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...jb,new yt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new yt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Gb=class{constructor(){this.all=[]}}}});function jI(e,t){let r=he(new Fb,Vb,[e,t]);return r.message&&r}var iy,ay,cy,uy,Vb,ly,Ic,zb=g({"src/lib/parsers/parse-pull.ts"(){"use strict";MI(),C(),qb(),iy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,ay=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,cy=/^(create|delete) mode \d+ (.+)/,uy=[new A(iy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new A(ay,(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 A(cy,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],Vb=[new A(/^from\s(.+)$/i,(e,[t])=>{e.remote=t}),new A(/^fatal:\s(.+)$/,(e,[t])=>{e.message=t}),new A(/([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})],ly=(e,t)=>he(new cc,uy,[e,t]),Ic=(e,t)=>Object.assign(new cc,ly(e,t),Bb(e,t))}}),fy,Wb,dy,BI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";PI(),C(),zb(),fy=[new A(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new A(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new oo(t,r))}),new A(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new oo(t,r,{deleteRef:n}))}),new A(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new oo(t,null))}),new A(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Wb=(e,t)=>Object.assign(dy(e,t),Ic(e,t)),dy=e=>he(new Mb,fy,e)}});function py(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=Wb(t,r);if(n.failed)throw new un(n);return n}}:me("Git.merge requires at least one option")}var UI=g({"src/lib/tasks/merge.ts"(){"use strict";kr(),BI(),H()}});function GI(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 my,Hb,hy,qI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),qb(),my=[new A(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new A(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new A(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(GI(t,r,n))}),new A(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:n}}),new A(/^([^:]+):(\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}}})],Hb=(e,t)=>{let r=hy(e,t),n=Bb(e,t);return{...r,...n}},hy=(e,t)=>he({pushed:[]},my,[e,t])}}),Zb={};Z(Zb,{pushTagsTask:()=>VI,pushTask:()=>$c});function VI(e={},t){return F(t,"--tags"),$c(e,t)}function $c(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),mo(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:Hb}}var Yb=g({"src/lib/tasks/push.ts"(){"use strict";qI(),C()}});function zI(){return{showBuffer(){let e=["show",...pe(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(eb(e),z(arguments))},show(){let e=["show",...pe(arguments,1)];return this._runTask(ce(e),z(arguments))}}}var WI=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),gy,Xb,HI=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";gy=/^(.+)\0(.+)$/,Xb=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=gy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function yy(e){let[t,r]=e.split(Or);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function Ka(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function ZI(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=Kb.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new Xb(i,s,o))}}var by,Kb,Jb,YI=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),HI(),by=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}},Kb=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,yy(t))}),be("R","M",(e,t)=>{let r=yy(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)),...Ka("A","A","U"),...Ka("D","D","U"),...Ka("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s(\S+?)(?=\.{3}|$)/,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=we(a==null?void 0:a[1],ee,null),a=o.exec(t),e.tracking=we(a==null?void 0:a[1],ee,null),a=i.exec(t),a&&(e.current=we(a==null?void 0:a[1],ee,e.current)),e.detached=/\(no branch\)/.test(t)}]]),Jb=function(e){let t=e.split(Or),r=new by;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=Or+(t[n++]||"")),ZI(r,o))}return r}}});function XI(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!Qb.includes(r))],parser(r){return Jb(r)}}}var Qb,KI=g({"src/lib/tasks/status.ts"(){"use strict";YI(),Qb=["--null","-z"]}});function lo(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 JI(){return lo(0,0,0,"",!1)}function QI(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:e1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Dc));n(t)}})}}}function e1(e){return e===Dc?JI():he(lo(0,0,0,e),ew,e)}var Dc,ew,t1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Dc="installed=false",ew=[new A(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,lo(U(t),U(r),U(n),s))}),new A(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,lo(U(t),U(r),n,s))})]}}),tw={};Z(tw,{SimpleGitApi:()=>uc});var uc,r1=g({"src/lib/simple-git-api.ts"(){"use strict";aI(),cI(),lI(),pI(),bI(),cb(),xI(),pb(),vI(),kI(),Pb(),UI(),Yb(),WI(),KI(),H(),t1(),C(),uc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&oI(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(ce(["add",...Xe(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(ty(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(ty(e.path,e.root&&this._executor||void 0),t):this._runTask(me("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(SI(e,t===!0),z(arguments))}init(e){return this._runTask(OI(e===!0,this._executor.cwd,pe(arguments)),z(arguments))}merge(){return this._runTask(py(pe(arguments)),z(arguments))}mergeFromTo(e,t){return ee(e)&&ee(t)?this._runTask(py([e,t,...pe(arguments)]),z(arguments,!1)):this._runTask(me("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=$c({remote:we(arguments[0],ee),branch:we(arguments[1],ee)},pe(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ce(["stash",...pe(arguments)]),z(arguments))}status(){return this._runTask(XI(pe(arguments)),z(arguments))}},Object.assign(uc.prototype,uI(),yI(),WA(),dI(),wI(),XA(),NI(),zI(),QI())}}),rw={};Z(rw,{Scheduler:()=>sw});var wy,sw,n1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),bb(),wy=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,nw.createDeferred)();return{promise:t,done:r,id:e}}})(),sw=class{constructor(e=2){this.concurrency=e,this.logger=_c("","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),mo(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,wy());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),ow={};Z(ow,{applyPatchTask:()=>s1});function s1(e,t){return ce(["apply",...t,...e])}var o1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function i1(e,t){return{branch:e,hash:t,success:!0}}function a1(e){return{branch:e,hash:null,success:!1}}var iw,c1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";iw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function aw(e,t){return t===1&&lc.test(e)}var xy,lc,Sy,So,u1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";c1(),C(),xy=/(\S+)\s+\(\S+\s([^)]+)\)/,lc=/^error[^']+'([^']+)'/m,Sy=[new A(xy,(e,[t,r])=>{let n=i1(t,r);e.all.push(n),e.branches[t]=n}),new A(lc,(e,[t])=>{let r=a1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],So=(e,t)=>he(new iw,Sy,[e,t])}}),cw,l1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";cw=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 vy(e){return e?e.charAt(0):""}function uw(e,t=!1){return he(new cw,t?[fw]:lw,e)}var lw,fw,f1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";l1(),C(),lw=[new A(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(vy(t),!0,r,n,s)}),new A(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,n,s])=>{e.push(vy(t),!1,r,n,s)})],fw=new A(/^(\S+)$/s,(e,[t])=>{e.push("*",!1,t,"","")})}}),dw={};Z(dw,{branchLocalTask:()=>p1,branchTask:()=>d1,containsDeleteBranchCommand:()=>pw,deleteBranchTask:()=>h1,deleteBranchesTask:()=>m1});function pw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function d1(e){let t=pw(e),r=e.includes("--show-current"),n=["branch",...e];return n.length===1&&n.push("-a"),n.includes("-v")||n.splice(1,0,"-v"),{format:"utf-8",commands:n,parser(s,o){return t?So(s,o).all[0]:uw(s,r)}}}function p1(){return{format:"utf-8",commands:["branch","-v"],parser(e){return uw(e)}}}function m1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return So(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!aw(String(s),r))return i(s);o(n)}}}function h1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return So(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!aw(String(i),n))return c(i);throw new un(r.parser(an(o),an(s)),String(i))}};return r}var g1=g({"src/lib/tasks/branch.ts"(){"use strict";kr(),u1(),f1(),C()}});function y1(e){let t=e.trim().replace(/^["']|["']$/g,"");return t&&(0,mw.normalize)(t)}var hw,b1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";hw=e=>e.split(/\n/g).map(y1).filter(Boolean)}}),gw={};Z(gw,{checkIgnoreTask:()=>w1});function w1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:hw}}var x1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";b1()}}),yw={};Z(yw,{cloneMirrorTask:()=>v1,cloneTask:()=>bw});function S1(e){return/^--upload-pack(=|$)/.test(e)}function bw(e,t,r){let n=["clone",...r];return ee(e)&&n.push(e),ee(t)&&n.push(t),n.find(S1)?me("git.fetch: potential exploit argument blocked."):ce(n)}function v1(e,t,r){return F(r,"--mirror"),bw(e,t,r)}var _1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function E1(e,t){return he({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},ww,[e,t])}var ww,T1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),ww=[new A(/From (.+)$/,(e,[t])=>{e.remote=t}),new A(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new A(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new A(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new A(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),xw={};Z(xw,{fetchTask:()=>k1});function O1(e){return/^--upload-pack(=|$)/.test(e)}function k1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(O1)?me("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:E1}}var R1=g({"src/lib/tasks/fetch.ts"(){"use strict";T1(),H()}});function C1(e){return he({moves:[]},Sw,e)}var Sw,A1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Sw=[new A(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),vw={};Z(vw,{moveTask:()=>I1});function I1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:C1}}var $1=g({"src/lib/tasks/move.ts"(){"use strict";A1(),C()}}),_w={};Z(_w,{pullTask:()=>D1});function D1(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 Ic(s,o)},onError(s,o,i,a){let c=jI(an(s.stdOut),an(s.stdErr));if(c)return a(new un(c));a(o)}}}var L1=g({"src/lib/tasks/pull.ts"(){"use strict";kr(),zb(),C()}});function N1(e){let t={};return Ew(e,([r])=>t[r]={name:r}),Object.values(t)}function P1(e){let t={};return Ew(e,([r,n,s])=>{Object.hasOwn(t,r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Ew(e,t){pc(e,r=>t(r.split(/\s+/)))}var M1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Tw={};Z(Tw,{addRemoteTask:()=>F1,getRemotesTask:()=>j1,listRemotesTask:()=>B1,remoteTask:()=>U1,removeRemoteTask:()=>G1});function F1(e,t,r){return ce(["remote","add",...r,e,t])}function j1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?P1:N1}}function B1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ce(t)}function U1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ce(t)}function G1(e){return ce(["remote","remove",e])}var q1=g({"src/lib/tasks/remote.ts"(){"use strict";M1(),H()}}),Ow={};Z(Ow,{stashListTask:()=>V1});function V1(e={},t){let r=Nb(e),n=["stash","list",...r.commands,...t],s=Ib(r.splitter,r.fields,Tc(n));return xo(n)||{commands:n,format:"utf-8",parser:s}}var z1=g({"src/lib/tasks/stash-list.ts"(){"use strict";pn(),Db(),Ac(),Pb()}}),kw={};Z(kw,{addSubModuleTask:()=>W1,initSubModuleTask:()=>H1,subModuleTask:()=>vo,updateSubModuleTask:()=>Z1});function W1(e,t){return vo(["add",e,t])}function H1(e){return vo(["init",...e])}function vo(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ce(t)}function Z1(e){return vo(["update",...e])}var Y1=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function X1(e,t){let r=Number.isNaN(e),n=Number.isNaN(t);return r!==n?r?1:-1:r?Rw(e,t):0}function Rw(e,t){return e===t?0:e>t?1:-1}function K1(e){return e.trim()}function to(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var _y,Cw,J1=g({"src/lib/responses/TagList.ts"(){"use strict";_y=class{constructor(e,t){this.all=e,this.latest=t}},Cw=function(e,t=!1){let r=e.split(`
|
|
59
|
+
`).map(K1).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return X1(to(i[0]),to(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Rw(to(i[c]),to(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)}}}),Aw={};Z(Aw,{addAnnotatedTagTask:()=>t$,addTagTask:()=>e$,tagListTask:()=>Q1});function Q1(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Cw(r,t)}}}function e$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function t$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var r$=g({"src/lib/tasks/tag.ts"(){"use strict";J1()}}),n$=bA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(sI(),V(Sb)),{SimpleGitApi:n}=(r1(),V(tw)),{Scheduler:s}=(n1(),V(rw)),{configurationErrorTask:o}=(H(),V(sc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:x}=(C(),V(Vy)),{applyPatchTask:T}=(o1(),V(ow)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(g1(),V(dw)),{checkIgnoreTask:X}=(x1(),V(gw)),{checkIsRepoTask:xe}=(Zy(),V(zy)),{cloneTask:ue,cloneMirrorTask:Ae}=(_1(),V(yw)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:Se}=(ob(),V(nb)),{diffSummaryTask:Cr}=(Ac(),V(Lb)),{fetchTask:wt}=(R1(),V(xw)),{moveTask:Vw}=($1(),V(vw)),{pullTask:zw}=(L1(),V(_w)),{pushTagsTask:Ww}=(Yb(),V(Zb)),{addRemoteTask:Hw,getRemotesTask:Zw,listRemotesTask:Yw,remoteTask:Xw,removeRemoteTask:Kw}=(q1(),V(Tw)),{getResetMode:Jw,resetTask:Qw}=(yb(),V(mb)),{stashListTask:ex}=(z1(),V(Ow)),{addSubModuleTask:tx,initSubModuleTask:rx,subModuleTask:nx,updateSubModuleTask:sx}=(Y1(),V(kw)),{addAnnotatedTagTask:ox,addTagTask:ix,tagListTask:ax}=(r$(),V(Aw)),{straightThroughBufferTask:cx,straightThroughStringTask:je}=(H(),V(sc));function k(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(k.prototype=Object.create(n.prototype)).constructor=k,k.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},k.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},k.prototype.stashList=function(h){return this._runTask(ex(x(arguments)||{},a(h)&&h||[]),d(arguments))};function Mc(h,E,B,oe){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(oe,u),p(arguments))}k.prototype.clone=function(){return this._runTask(Mc("clone",ue,...arguments),d(arguments))},k.prototype.mirror=function(){return this._runTask(Mc("mirror",Ae,...arguments),d(arguments))},k.prototype.mv=function(h,E){return this._runTask(Vw(h,E),d(arguments))},k.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,oe){E.checkout(oe.latest,h)})})},k.prototype.pull=function(h,E,B,oe){return this._runTask(zw(f(h,u),f(E,u),p(arguments)),d(arguments))},k.prototype.fetch=function(h,E){return this._runTask(wt(f(h,u),f(E,u),p(arguments)),d(arguments))},k.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},k.prototype.tags=function(h,E){return this._runTask(ax(p(arguments)),d(arguments))},k.prototype.rebase=function(){return this._runTask(je(["rebase",...p(arguments)]),d(arguments))},k.prototype.reset=function(h){return this._runTask(Qw(Jw(h),p(arguments)),d(arguments))},k.prototype.revert=function(h){let E=d(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(je(["revert",...p(arguments,0,!0),h]),E)},k.prototype.addTag=function(h){let E=typeof h=="string"?ix(h):o("Git.addTag requires a tag name");return this._runTask(E,d(arguments))},k.prototype.addAnnotatedTag=function(h,E){return this._runTask(ox(h,E),d(arguments))},k.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),d(arguments))},k.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),d(arguments))},k.prototype.branch=function(h,E){return this._runTask(P(p(arguments)),d(arguments))},k.prototype.branchLocal=function(h){return this._runTask(M(),d(arguments))},k.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(...p(arguments,0,!0));var oe=d(arguments);return B.length?this._runTask(je(B,this._trimmed),oe):this._runTask(o("Raw: must supply one or more command to execute"),oe)},k.prototype.submoduleAdd=function(h,E,B){return this._runTask(tx(h,E),d(arguments))},k.prototype.submoduleUpdate=function(h,E){return this._runTask(sx(p(arguments,!0)),d(arguments))},k.prototype.submoduleInit=function(h,E){return this._runTask(rx(p(arguments,!0)),d(arguments))},k.prototype.subModule=function(h,E){return this._runTask(nx(p(arguments)),d(arguments))},k.prototype.listRemote=function(){return this._runTask(Yw(p(arguments)),d(arguments))},k.prototype.addRemote=function(h,E,B){return this._runTask(Hw(h,E,p(arguments)),d(arguments))},k.prototype.removeRemote=function(h,E){return this._runTask(Kw(h),d(arguments))},k.prototype.getRemotes=function(h,E){return this._runTask(Zw(h===!0),d(arguments))},k.prototype.remote=function(h,E){return this._runTask(Xw(p(arguments)),d(arguments))},k.prototype.tag=function(h,E){let B=p(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(je(B),d(arguments))},k.prototype.updateServerInfo=function(h){return this._runTask(je(["update-server-info"]),d(arguments))},k.prototype.pushTags=function(h,E){let B=Ww({remote:f(h,u)},p(arguments));return this._runTask(B,d(arguments))},k.prototype.rm=function(h){return this._runTask(je(["rm","-f",...i(h)]),d(arguments))},k.prototype.rmKeepLocal=function(h){return this._runTask(je(["rm","--cached",...i(h)]),d(arguments))},k.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},k.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},k.prototype._catFile=function(h,E){var B=d(E),oe=["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)&&oe.push.apply(oe,$e);let Ro=h==="buffer"?cx(oe):je(oe);return this._runTask(Ro,B)},k.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",...p(arguments)]);return this._runTask(B,d(arguments))},k.prototype.diffSummary=function(){return this._runTask(Cr(p(arguments,1)),d(arguments))},k.prototype.applyPatch=function(h){let E=l(h)?T(i(h),p([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,d(arguments))},k.prototype.revparse=function(){let h=["rev-parse",...p(arguments,!0)];return this._runTask(je(h,!0),d(arguments))},k.prototype.clean=function(h,E,B){let oe=Se(h),$e=oe&&h.join("")||f(h,u)||"",Ro=p([].slice.call(arguments,oe?1:0));return this._runTask(Ie($e,Ro),d(arguments))},k.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},k.prototype.clearQueue=function(){return this},k.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),d(arguments))},k.prototype.checkIsRepo=function(h,E){return this._runTask(xe(f(h,u)),d(arguments))},t.exports=k}});cn();bt();var s$=class extends it{constructor(e,t){super(void 0,t),this.config=e}};bt();bt();var ot=class extends it{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};kr();Cy();Zy();ob();cb();lb();pb();yb();function o$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new ot(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new ot(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function i$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function a$(e,t){if(i$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new ot(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function c$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new ot(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 ot(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 ot(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function u$({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||a$(s,i),t||c$(s,n.method)}),r}}}C();function l$(e){let t=on(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Ey=(0,Tr.deferred)().promise;function f$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Tr.deferred)(),closeTimeout:(0,Tr.deferred)(),exit:(0,Tr.deferred)(),exitTimeout:(0,Tr.deferred)()},i=Promise.race([e===!1?Ey:o.closeTimeout.promise,t===!1?Ey: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(()=>Ja(s))).then(i.done)}return{type:"spawn.after",async action(s,{spawned:o,close:i}){var l,f;let a=r(),c=!0,u=()=>{c=!1};(l=o.stdout)==null||l.on("data",u),(f=o.stderr)==null||f.on("data",u),o.on("error",u),o.on("close",p=>a.close(p)),o.on("exit",p=>a.exit(p));try{await a.result,c&&await Ja(50),i(a.exitCode)}catch(p){i(a.exitCode,p)}}}}C();var d$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ty="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function p$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Oy(e,t){if(e.length<1||e.length>2)throw new ot(void 0,"binary",d$);if(e.some(p$))if(t)console.warn(Ty);else throw new ot(void 0,"binary",Ty);let[n,s]=e;return{binary:n,prefix:s}}function m$(e,t=["git"],r=!1){let n=Oy(Xe(t),r);e.on("binary",s=>{n=Oy(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}bt();function h$(e){return!!(e.exitCode&&e.stdErr.length)}function g$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function y$(e=!1,t=h$,r=g$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function ky(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 it(void 0,n.toString("utf-8"))}:{error:n}}}}C();var b$=class{constructor(){this.plugins=new Set,this.events=new Iw.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 w$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Py(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:x$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function x$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function S$(e){let t=Fy(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function v$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var u,l;let o;function i(){o&&clearTimeout(o),o=setTimeout(c,e)}function a(){var f,p;(f=s.spawned.stdout)==null||f.off("data",i),(p=s.spawned.stderr)==null||p.off("data",i),s.spawned.off("exit",a),s.spawned.off("close",a),o&&clearTimeout(o)}function c(){a(),s.kill(new ot(void 0,"timeout","block timeout reached"))}r&&((u=s.spawned.stdout)==null||u.on("data",i)),t&&((l=s.spawned.stderr)==null||l.on("data",i)),s.spawned.on("exit",a),s.spawned.on("close",a),i()}}}cn();function _$(){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(io(o)){n(Kg(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>io(i)&&Kg(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var E$=n$();function T$(e,t){var s;let r=new b$,n=Gy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!mc(n.baseDir))throw new s$(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(l$(n.config)),r.add(u$(n.unsafe)),r.add(_$()),r.add(f$(n.completion)),n.abort&&r.add(o$(n.abort)),n.progress&&r.add(w$(n.progress)),n.timeout&&r.add(v$(n.timeout)),n.spawnOptions&&r.add(S$(n.spawnOptions)),r.add(ky(y$(!0))),n.errors&&r.add(ky(n.errors)),m$(r,n.binary,(s=n.unsafe)==null?void 0:s.allowUnsafeCustomBinary),new E$(n,r)}kr();var $w=T$;async function Dw(){let e=$w();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 Mw=q(Pw()),Nc=Mw.default.bold("@seed-design/codemod"),Fw=e=>({event:t,properties:r})=>console.log(Nc,t,r,e);var Gw=(0,Oo.resolve)(__dirname,"transforms"),Bw=zc(),To=jw(),mn=null,qw=null;function A$(){Dw().then(e=>{qw=e,mn=Fw({...e}),I$(mn)})}function I$(e){$$(),Bw.version(To.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=Mg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=N$();s.list&&(Pc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Pc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Pc(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,Oo.resolve)(Gw,t,"index.js");console.log(Nc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await L$(i,t,r,s)}),Bw.parse()}function $$(){(0,ko.satisfies)(process.versions.node,To.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${To.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,ko.minVersion)(
|
|
63
|
+
$ nvm install ${(0,ko.minVersion)(To.engines.node)}`),process.exit(1))}var D$=["replace-alpha-color","replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function L$(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,Oo.resolve)(process.cwd(),d));c&&(mn==null||mn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l],p=i;if(D$.includes(t))if(i){let d=i.split(",").map(x=>x.trim());d.includes("css")||(p=[...d,"css"].join(","))}else p="js,jsx,ts,tsx,css";p&&f.push("--extensions",p),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(qw)};await Pm("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function N$(){return(0,Uw.readdirSync)(Gw)}function Pc(e){console.log(`
|
|
64
64
|
\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
|
|
65
65
|
`,e.join(`
|
|
66
|
-
`))}
|
|
66
|
+
`))}A$();
|